@mapples/ui 1.0.3 → 1.0.5
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/dist/components/form/FormView/FormView.d.ts +46 -0
- package/dist/components/form/FormView/FormView.d.ts.map +1 -0
- package/dist/components/form/FormView/FormView.js +38 -0
- package/dist/components/form/FormView/FormView.js.map +1 -0
- package/dist/components/form/FormView/index.d.ts +4 -0
- package/dist/components/form/FormView/index.d.ts.map +1 -0
- package/dist/components/form/FormView/index.js +4 -0
- package/dist/components/form/FormView/index.js.map +1 -0
- package/dist/components/form/FormView/schematics.d.ts +3 -0
- package/dist/components/form/FormView/schematics.d.ts.map +1 -0
- package/dist/components/form/FormView/schematics.js +6 -0
- package/dist/components/form/FormView/schematics.js.map +1 -0
- package/dist/components/form/SubmitButton/SubmitButton.d.ts +43 -0
- package/dist/components/form/SubmitButton/SubmitButton.d.ts.map +1 -0
- package/dist/components/form/SubmitButton/SubmitButton.js +35 -0
- package/dist/components/form/SubmitButton/SubmitButton.js.map +1 -0
- package/dist/components/form/SubmitButton/index.d.ts +5 -0
- package/dist/components/form/SubmitButton/index.d.ts.map +1 -0
- package/dist/components/form/SubmitButton/index.js +5 -0
- package/dist/components/form/SubmitButton/index.js.map +1 -0
- package/dist/components/form/SubmitButton/schematics.d.ts +11 -0
- package/dist/components/form/SubmitButton/schematics.d.ts.map +1 -0
- package/dist/components/form/SubmitButton/schematics.js +14 -0
- package/dist/components/form/SubmitButton/schematics.js.map +1 -0
- package/dist/components/form/TextField/TextField.d.ts +35 -0
- package/dist/components/form/TextField/TextField.d.ts.map +1 -0
- package/dist/components/form/TextField/TextField.js +36 -0
- package/dist/components/form/TextField/TextField.js.map +1 -0
- package/dist/components/form/TextField/index.d.ts +4 -0
- package/dist/components/form/TextField/index.d.ts.map +1 -0
- package/dist/components/form/TextField/index.js +4 -0
- package/dist/components/form/TextField/index.js.map +1 -0
- package/dist/components/form/TextField/schematics.d.ts +3 -0
- package/dist/components/form/TextField/schematics.d.ts.map +1 -0
- package/dist/components/form/TextField/schematics.js +6 -0
- package/dist/components/form/TextField/schematics.js.map +1 -0
- package/dist/components/form/index.d.ts +8 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +8 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/form/schematics.d.ts +3 -0
- package/dist/components/form/schematics.d.ts.map +1 -0
- package/dist/components/form/schematics.js +9 -0
- package/dist/components/form/schematics.js.map +1 -0
- package/dist/components/media/BarCode/BarCode.d.ts +78 -0
- package/dist/components/media/BarCode/BarCode.d.ts.map +1 -0
- package/dist/components/media/BarCode/BarCode.js +127 -0
- package/dist/components/media/BarCode/BarCode.js.map +1 -0
- package/dist/components/media/BarCode/BarCodeEncoder.d.ts +56 -0
- package/dist/components/media/BarCode/BarCodeEncoder.d.ts.map +1 -0
- package/dist/components/media/BarCode/BarCodeEncoder.js +112 -0
- package/dist/components/media/BarCode/BarCodeEncoder.js.map +1 -0
- package/dist/components/media/BarCode/index.d.ts +4 -0
- package/dist/components/media/BarCode/index.d.ts.map +1 -0
- package/dist/components/media/BarCode/index.js +4 -0
- package/dist/components/media/BarCode/index.js.map +1 -0
- package/dist/components/media/BarCode/schematics.d.ts +3 -0
- package/dist/components/media/BarCode/schematics.d.ts.map +1 -0
- package/dist/components/media/BarCode/schematics.js +6 -0
- package/dist/components/media/BarCode/schematics.js.map +1 -0
- 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 +24 -5
- package/dist/components/media/Image/Image.js.map +1 -1
- package/dist/components/media/QRCode/QRCode.d.ts +83 -0
- package/dist/components/media/QRCode/QRCode.d.ts.map +1 -0
- package/dist/components/media/QRCode/QRCode.js +42 -0
- package/dist/components/media/QRCode/QRCode.js.map +1 -0
- package/dist/components/media/QRCode/index.d.ts +4 -0
- package/dist/components/media/QRCode/index.d.ts.map +1 -0
- package/dist/components/media/QRCode/index.js +4 -0
- package/dist/components/media/QRCode/index.js.map +1 -0
- package/dist/components/media/QRCode/schematics.d.ts +3 -0
- package/dist/components/media/QRCode/schematics.d.ts.map +1 -0
- package/dist/components/media/QRCode/schematics.js +6 -0
- package/dist/components/media/QRCode/schematics.js.map +1 -0
- package/dist/components/media/index.d.ts +4 -0
- package/dist/components/media/index.d.ts.map +1 -1
- package/dist/components/media/index.js +4 -0
- package/dist/components/media/index.js.map +1 -1
- package/dist/components/media/schematics.d.ts.map +1 -1
- package/dist/components/media/schematics.js +4 -0
- package/dist/components/media/schematics.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { WithStyledProps } from '@mapples/style';
|
|
3
|
+
import { ViewProps } from 'react-native';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Form View component.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type FormViewProps = PropsWithChildren<WithStyledProps<ViewProps>> & {
|
|
10
|
+
initialValues?: any;
|
|
11
|
+
onSubmit?: (values: any) => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A customizable view component with built-in styling support.
|
|
15
|
+
*
|
|
16
|
+
* The View component extends React Native's View with additional styling
|
|
17
|
+
* capabilities through the @mapples/style system. It serves as a container
|
|
18
|
+
* for other UI elements and supports all standard view properties.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <FormView
|
|
23
|
+
* styled={{
|
|
24
|
+
* style: {
|
|
25
|
+
* backgroundColor: 'lightblue',
|
|
26
|
+
* padding: 16,
|
|
27
|
+
* borderRadius: 8
|
|
28
|
+
* }
|
|
29
|
+
* }}
|
|
30
|
+
* >
|
|
31
|
+
* <Text>Content inside the view</Text>
|
|
32
|
+
* </View>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
declare const FormView: import("react").ForwardRefExoticComponent<{
|
|
38
|
+
styled?: import("@mapples/style").StyledProps<Partial<ViewProps>> | undefined;
|
|
39
|
+
} & ViewProps & {
|
|
40
|
+
children?: import("react").ReactNode | undefined;
|
|
41
|
+
} & {
|
|
42
|
+
initialValues?: any;
|
|
43
|
+
onSubmit?: (values: any) => void;
|
|
44
|
+
} & import("react").RefAttributes<unknown>>;
|
|
45
|
+
export default FormView;
|
|
46
|
+
//# sourceMappingURL=FormView.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,QAAA,MAAM,QAAQ;;;;;oBA5BI,GAAG;eACR,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI;2CA2CjC,CAAC;AAGF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { Form } from '@mapples/form';
|
|
3
|
+
import { StyledView } from '@mapples/style';
|
|
4
|
+
import { isObject } from 'lodash';
|
|
5
|
+
/**
|
|
6
|
+
* A customizable view component with built-in styling support.
|
|
7
|
+
*
|
|
8
|
+
* The View component extends React Native's View with additional styling
|
|
9
|
+
* capabilities through the @mapples/style system. It serves as a container
|
|
10
|
+
* for other UI elements and supports all standard view properties.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <FormView
|
|
15
|
+
* styled={{
|
|
16
|
+
* style: {
|
|
17
|
+
* backgroundColor: 'lightblue',
|
|
18
|
+
* padding: 16,
|
|
19
|
+
* borderRadius: 8
|
|
20
|
+
* }
|
|
21
|
+
* }}
|
|
22
|
+
* >
|
|
23
|
+
* <Text>Content inside the view</Text>
|
|
24
|
+
* </View>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
const FormView = forwardRef(({ styled, children, initialValues, onSubmit, ...props }, ref) => {
|
|
30
|
+
return (<Form initialValues={isObject(initialValues) ? initialValues : {}} onSubmit={onSubmit}>
|
|
31
|
+
<StyledView ref={ref} styled={{ ...styled }} {...props}>
|
|
32
|
+
{children}
|
|
33
|
+
</StyledView>
|
|
34
|
+
</Form>);
|
|
35
|
+
});
|
|
36
|
+
FormView.displayName = 'FormView';
|
|
37
|
+
export default FormView;
|
|
38
|
+
//# sourceMappingURL=FormView.js.map
|
|
@@ -0,0 +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;AAalC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormView/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,cAAc,cAAc,CAAC;AAE7B,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/FormView/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,cAAc,cAAc,CAAC;AAE7B,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StyledProp, StyledProps } from '@mapples/style';
|
|
2
|
+
import { PressableProps, TextStyle, View } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the SubmitButton component.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface SubmitButtonProps extends PressableProps {
|
|
9
|
+
/** The text label to display on the button */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Styling configuration for the button and its typography */
|
|
12
|
+
styled?: StyledProps<PressableProps> & {
|
|
13
|
+
/** Typography-specific styling for the button label */
|
|
14
|
+
styleTypography?: StyledProp<TextStyle>;
|
|
15
|
+
};
|
|
16
|
+
/** Typography variant to apply to the button label */
|
|
17
|
+
typographyVariant?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A customizable button component with built-in styling support.
|
|
21
|
+
*
|
|
22
|
+
* The SubmitButton component extends React Native's Pressable with additional styling
|
|
23
|
+
* capabilities and typography support. It can display a text label and supports
|
|
24
|
+
* all standard pressable interactions.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <SubmitButton
|
|
29
|
+
* label="Click me"
|
|
30
|
+
* styled={{
|
|
31
|
+
* style: { backgroundColor: 'blue', padding: 16 },
|
|
32
|
+
* styleTypography: { color: 'white', fontSize: 16 }
|
|
33
|
+
* }}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
declare const SubmitButton: import("react").ForwardRefExoticComponent<SubmitButtonProps & {
|
|
40
|
+
children?: import("react").ReactNode | undefined;
|
|
41
|
+
} & import("react").RefAttributes<View>>;
|
|
42
|
+
export default SubmitButton;
|
|
43
|
+
//# sourceMappingURL=SubmitButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/form/SubmitButton/SubmitButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,UAAU,EACV,WAAW,EAEZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG;QACrC,uDAAuD;QACvD,eAAe,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;KACzC,CAAC;IACF,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,YAAY;;wCAuBjB,CAAC;AAGF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { useFormSubmit } from '@mapples/form';
|
|
3
|
+
import { StyledPressable, Typography, } from '@mapples/style';
|
|
4
|
+
/**
|
|
5
|
+
* A customizable button component with built-in styling support.
|
|
6
|
+
*
|
|
7
|
+
* The SubmitButton component extends React Native's Pressable with additional styling
|
|
8
|
+
* capabilities and typography support. It can display a text label and supports
|
|
9
|
+
* all standard pressable interactions.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <SubmitButton
|
|
14
|
+
* label="Click me"
|
|
15
|
+
* styled={{
|
|
16
|
+
* style: { backgroundColor: 'blue', padding: 16 },
|
|
17
|
+
* styleTypography: { color: 'white', fontSize: 16 }
|
|
18
|
+
* }}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
const SubmitButton = forwardRef(({ label, styled = {}, typographyVariant, ...props }, ref) => {
|
|
25
|
+
const { styleTypography, ...styledPressableProps } = styled;
|
|
26
|
+
const { submitForm } = useFormSubmit();
|
|
27
|
+
return (<StyledPressable ref={ref} styled={styledPressableProps} {...props} onPress={submitForm}>
|
|
28
|
+
{label && (<Typography style={styled?.styleTypography} variant={typographyVariant}>
|
|
29
|
+
{label}
|
|
30
|
+
</Typography>)}
|
|
31
|
+
</StyledPressable>);
|
|
32
|
+
});
|
|
33
|
+
SubmitButton.displayName = 'SubmitButton';
|
|
34
|
+
export default SubmitButton;
|
|
35
|
+
//# sourceMappingURL=SubmitButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubmitButton.js","sourceRoot":"","sources":["../../../../src/components/form/SubmitButton/SubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,eAAe,EAGf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAoBxB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,iBAAiB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3D,MAAM,EAAE,eAAe,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,CAAC;IAC5D,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;IAEvC,OAAO,CACL,CAAC,eAAe,CACd,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,MAAM,CAAC,CAAC,oBAAoB,CAAC,CAC7B,IAAI,KAAK,CAAC,CACV,OAAO,CAAC,CAAC,UAAU,CAAC,CAEpB;QAAA,CAAC,KAAK,IAAI,CACR,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAC/B,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAE3B;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,UAAU,CAAC,CACd,CACH;MAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/SubmitButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/SubmitButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RegisteredComponent } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the Button component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the Button component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const SubmitButtonSchematic: RegisteredComponent;
|
|
11
|
+
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/form/SubmitButton/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAGnC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import SubmitButton from './SubmitButton';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the Button component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the Button component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export const SubmitButtonSchematic = {
|
|
11
|
+
type: 'SubmitButton',
|
|
12
|
+
Component: SubmitButton,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=schematics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/form/SubmitButton/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwB;IACxD,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,YAAY;CACxB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TextInputProps, TextInput } from 'react-native';
|
|
2
|
+
export interface TextFieldProps extends Omit<TextInputProps, 'onChangeText'> {
|
|
3
|
+
fieldName?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A customizable text input component with built-in styling support.
|
|
7
|
+
*
|
|
8
|
+
* The TextField component extends React Native's TextInput with additional styling
|
|
9
|
+
* capabilities through the @mapples/style system. It supports all standard
|
|
10
|
+
* TextField properties and behaviors.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <TextField
|
|
15
|
+
* placeholder="Enter your text"
|
|
16
|
+
* value={text}
|
|
17
|
+
* onChangeText={setText}
|
|
18
|
+
* styled={{
|
|
19
|
+
* style: {
|
|
20
|
+
* borderWidth: 1,
|
|
21
|
+
* borderColor: 'gray',
|
|
22
|
+
* padding: 12,
|
|
23
|
+
* borderRadius: 8
|
|
24
|
+
* }
|
|
25
|
+
* }}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & {
|
|
32
|
+
children?: import("react").ReactNode | undefined;
|
|
33
|
+
} & import("react").RefAttributes<TextInput>>;
|
|
34
|
+
export default TextField;
|
|
35
|
+
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,SAAS;;6CAiBd,CAAC;AAGF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { useFormField } from '@mapples/form';
|
|
3
|
+
import { StyledTextInput } from '@mapples/style';
|
|
4
|
+
/**
|
|
5
|
+
* A customizable text input component with built-in styling support.
|
|
6
|
+
*
|
|
7
|
+
* The TextField component extends React Native's TextInput with additional styling
|
|
8
|
+
* capabilities through the @mapples/style system. It supports all standard
|
|
9
|
+
* TextField properties and behaviors.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <TextField
|
|
14
|
+
* placeholder="Enter your text"
|
|
15
|
+
* value={text}
|
|
16
|
+
* onChangeText={setText}
|
|
17
|
+
* styled={{
|
|
18
|
+
* style: {
|
|
19
|
+
* borderWidth: 1,
|
|
20
|
+
* borderColor: 'gray',
|
|
21
|
+
* padding: 12,
|
|
22
|
+
* borderRadius: 8
|
|
23
|
+
* }
|
|
24
|
+
* }}
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
const TextField = forwardRef(({ children, fieldName, ...props }, ref) => {
|
|
31
|
+
const { value, setValue } = useFormField(fieldName || 'unknown', '', true);
|
|
32
|
+
return (<StyledTextInput ref={ref} {...props} value={value || ''} onChangeText={setValue}/>);
|
|
33
|
+
});
|
|
34
|
+
TextField.displayName = 'TextField';
|
|
35
|
+
export default TextField;
|
|
36
|
+
//# sourceMappingURL=TextField.js.map
|
|
@@ -0,0 +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;AAOjD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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,CACtC,SAAS,IAAI,SAAS,EACtB,EAAE,EACF,IAAI,CACL,CAAC;IAEF,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/TextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,cAAc,cAAc,CAAC;AAE7B,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/TextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,cAAc,cAAc,CAAC;AAE7B,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as SubmitButton } from './SubmitButton';
|
|
2
|
+
export * from './SubmitButton';
|
|
3
|
+
export { default as TextField } from './TextField';
|
|
4
|
+
export * from './TextField';
|
|
5
|
+
export { default as FormView } from './FormView';
|
|
6
|
+
export * from './FormView';
|
|
7
|
+
export * from './schematics';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as SubmitButton } from './SubmitButton';
|
|
2
|
+
export * from './SubmitButton';
|
|
3
|
+
export { default as TextField } from './TextField';
|
|
4
|
+
export * from './TextField';
|
|
5
|
+
export { default as FormView } from './FormView';
|
|
6
|
+
export * from './FormView';
|
|
7
|
+
export * from './schematics';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormViewSchematic } from './FormView';
|
|
2
|
+
import { SubmitButtonSchematic } from './SubmitButton';
|
|
3
|
+
import { TextFieldSchematics } from './TextField';
|
|
4
|
+
export const FormSchematics = {
|
|
5
|
+
[FormViewSchematic.type]: FormViewSchematic,
|
|
6
|
+
[TextFieldSchematics.type]: TextFieldSchematics,
|
|
7
|
+
[SubmitButtonSchematic.type]: SubmitButtonSchematic,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=schematics.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { StyledProp, StyledProps, WithStyledProps } from '@mapples/style';
|
|
3
|
+
import { View, ViewProps } from 'react-native';
|
|
4
|
+
import { SvgProps } from 'react-native-svg';
|
|
5
|
+
import { type BarcodeFormat } from './BarCodeEncoder';
|
|
6
|
+
/**
|
|
7
|
+
* Props for the BarCode component.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type BarCodeProps = PropsWithChildren<Omit<WithStyledProps<ViewProps>, 'styled'> & {
|
|
12
|
+
/** Styling configuration for the barcode container and SVG */
|
|
13
|
+
styled?: StyledProps<ViewProps> & {
|
|
14
|
+
/** SVG-specific styling */
|
|
15
|
+
styleSvg?: StyledProp<SvgProps>;
|
|
16
|
+
};
|
|
17
|
+
/** The value to encode as a barcode */
|
|
18
|
+
value?: string;
|
|
19
|
+
/** Height of the barcode bars */
|
|
20
|
+
height?: number;
|
|
21
|
+
/** Width of each bar module */
|
|
22
|
+
width?: number;
|
|
23
|
+
/** Background color of the barcode */
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
/** Foreground color of the barcode bars */
|
|
26
|
+
foregroundColor?: string;
|
|
27
|
+
/** Barcode format (default: CODE128) */
|
|
28
|
+
format?: BarcodeFormat;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* A customizable barcode component with built-in styling support.
|
|
32
|
+
*
|
|
33
|
+
* The BarCode component renders a barcode using BarcodeEncoder for generation
|
|
34
|
+
* and react-native-svg for rendering. It supports customizable styling
|
|
35
|
+
* through the @mapples/style system.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <BarCode
|
|
40
|
+
* value="123456789"
|
|
41
|
+
* height={100}
|
|
42
|
+
* width={2}
|
|
43
|
+
* styled={{
|
|
44
|
+
* style: {
|
|
45
|
+
* width: 300,
|
|
46
|
+
* height: 100,
|
|
47
|
+
* alignItems: 'center',
|
|
48
|
+
* justifyContent: 'center',
|
|
49
|
+
* },
|
|
50
|
+
* }}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
declare const BarCode: import("react").ForwardRefExoticComponent<Omit<WithStyledProps<ViewProps>, "styled"> & {
|
|
57
|
+
/** Styling configuration for the barcode container and SVG */
|
|
58
|
+
styled?: StyledProps<ViewProps> & {
|
|
59
|
+
/** SVG-specific styling */
|
|
60
|
+
styleSvg?: StyledProp<SvgProps>;
|
|
61
|
+
};
|
|
62
|
+
/** The value to encode as a barcode */
|
|
63
|
+
value?: string;
|
|
64
|
+
/** Height of the barcode bars */
|
|
65
|
+
height?: number;
|
|
66
|
+
/** Width of each bar module */
|
|
67
|
+
width?: number;
|
|
68
|
+
/** Background color of the barcode */
|
|
69
|
+
backgroundColor?: string;
|
|
70
|
+
/** Foreground color of the barcode bars */
|
|
71
|
+
foregroundColor?: string;
|
|
72
|
+
/** Barcode format (default: CODE128) */
|
|
73
|
+
format?: BarcodeFormat;
|
|
74
|
+
} & {
|
|
75
|
+
children?: import("react").ReactNode | undefined;
|
|
76
|
+
} & import("react").RefAttributes<View>>;
|
|
77
|
+
export default BarCode;
|
|
78
|
+
//# sourceMappingURL=BarCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarCode.d.ts","sourceRoot":"","sources":["../../../../src/components/media/BarCode/BarCode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7E,OAAO,EACL,UAAU,EACV,WAAW,EAGX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAY,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAC1C,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,GAAG;IAC3C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;KACjC,CAAC;IACF,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wCAAwC;IACxC,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,CACF,CAAC;AAiGF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,OAAO;IA7IT,8DAA8D;aACrD,WAAW,CAAC,SAAS,CAAC,GAAG;QAChC,2BAA2B;QAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;KACjC;IACD,uCAAuC;YAC/B,MAAM;IACd,iCAAiC;aACxB,MAAM;IACf,+BAA+B;YACvB,MAAM;IACd,sCAAsC;sBACpB,MAAM;IACxB,2CAA2C;sBACzB,MAAM;IACxB,wCAAwC;aAC/B,aAAa;;;wCAoLzB,CAAC;AAGF,eAAe,OAAO,CAAC"}
|