@multiplatform.one/components 0.2.17 → 0.7.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/LICENSE +201 -0
- package/dist/cjs/forms/FormCheckBox/FormCheckBox.stories.js +30 -1
- package/dist/cjs/forms/FormCheckBox/FormCheckBox.stories.js.map +1 -1
- package/dist/cjs/forms/{RadioSimple/RadioSimple.stories.js → FormProgress/FormProgress.stories.js} +18 -13
- package/dist/cjs/forms/FormProgress/FormProgress.stories.js.map +6 -0
- package/dist/cjs/forms/FormProgress/index.js +104 -0
- package/dist/cjs/forms/FormProgress/index.js.map +6 -0
- package/dist/cjs/forms/FormRadioGroup/FormRadioGroup.stories.js +3 -1
- package/dist/cjs/forms/FormRadioGroup/FormRadioGroup.stories.js.map +1 -1
- package/dist/cjs/forms/FormSlider/FormSlider.stories.js +2 -1
- package/dist/cjs/forms/FormSlider/FormSlider.stories.js.map +1 -1
- package/dist/cjs/forms/FormSwitch/FormSwitch.stories.js +11 -1
- package/dist/cjs/forms/FormSwitch/FormSwitch.stories.js.map +1 -1
- package/dist/cjs/forms/FormTextArea/FormTextArea.stories.js +11 -1
- package/dist/cjs/forms/FormTextArea/FormTextArea.stories.js.map +1 -1
- package/dist/cjs/forms/SimpleForm/SimpleForm.stories.js +16 -1
- package/dist/cjs/forms/SimpleForm/SimpleForm.stories.js.map +1 -1
- package/dist/cjs/hooks/useAssets/index.js +6 -13
- package/dist/cjs/hooks/useAssets/index.js.map +1 -1
- package/dist/cjs/hooks/useAssets/index.native.js +4 -10
- package/dist/cjs/hooks/useAssets/index.native.js.map +1 -1
- package/dist/cjs/images/SimpleImage/index.js +104 -123
- package/dist/cjs/images/SimpleImage/index.js.map +2 -2
- package/dist/cjs/images/SimpleImage/index.stories.js +26 -2
- package/dist/cjs/images/SimpleImage/index.stories.js.map +1 -1
- package/dist/cjs/images/index.js +2 -2
- package/dist/cjs/images/index.js.map +1 -1
- package/dist/cjs/organize/SimpleTabs/SimpleTabs.stories.js +54 -0
- package/dist/cjs/organize/SimpleTabs/SimpleTabs.stories.js.map +6 -0
- package/dist/cjs/organize/SimpleTabs/index.js +132 -0
- package/dist/cjs/organize/SimpleTabs/index.js.map +6 -0
- package/dist/cjs/{forms/RadioSimple/index.js → panels/SimpleToast/SimpleToast.stories.js} +23 -20
- package/dist/cjs/panels/SimpleToast/SimpleToast.stories.js.map +6 -0
- package/dist/cjs/panels/SimpleToast/index.js +59 -0
- package/dist/cjs/panels/SimpleToast/index.js.map +6 -0
- package/dist/esm/forms/FormCheckBox/FormCheckBox.stories.js +31 -2
- package/dist/esm/forms/FormCheckBox/FormCheckBox.stories.js.map +1 -1
- package/dist/esm/forms/FormProgress/FormProgress.stories.js +19 -0
- package/dist/esm/forms/FormProgress/FormProgress.stories.js.map +6 -0
- package/dist/esm/forms/FormProgress/index.js +71 -0
- package/dist/esm/forms/FormProgress/index.js.map +6 -0
- package/dist/esm/forms/FormRadioGroup/FormRadioGroup.stories.js +3 -1
- package/dist/esm/forms/FormRadioGroup/FormRadioGroup.stories.js.map +1 -1
- package/dist/esm/forms/FormSlider/FormSlider.stories.js +2 -1
- package/dist/esm/forms/FormSlider/FormSlider.stories.js.map +1 -1
- package/dist/esm/forms/FormSwitch/FormSwitch.stories.js +11 -1
- package/dist/esm/forms/FormSwitch/FormSwitch.stories.js.map +1 -1
- package/dist/esm/forms/FormTextArea/FormTextArea.stories.js +11 -1
- package/dist/esm/forms/FormTextArea/FormTextArea.stories.js.map +1 -1
- package/dist/esm/forms/SimpleForm/SimpleForm.stories.js +16 -1
- package/dist/esm/forms/SimpleForm/SimpleForm.stories.js.map +1 -1
- package/dist/esm/hooks/useAssets/index.js +6 -13
- package/dist/esm/hooks/useAssets/index.js.map +1 -1
- package/dist/esm/hooks/useAssets/index.native.js +4 -10
- package/dist/esm/hooks/useAssets/index.native.js.map +1 -1
- package/dist/esm/images/SimpleImage/index.js +106 -125
- package/dist/esm/images/SimpleImage/index.js.map +2 -2
- package/dist/esm/images/SimpleImage/index.stories.js +23 -1
- package/dist/esm/images/SimpleImage/index.stories.js.map +1 -1
- package/dist/esm/images/index.js +1 -1
- package/dist/esm/organize/SimpleTabs/SimpleTabs.stories.js +20 -0
- package/dist/esm/organize/SimpleTabs/SimpleTabs.stories.js.map +6 -0
- package/dist/esm/organize/SimpleTabs/index.js +96 -0
- package/dist/esm/organize/SimpleTabs/index.js.map +6 -0
- package/dist/esm/panels/SimpleToast/SimpleToast.stories.js +23 -0
- package/dist/esm/panels/SimpleToast/SimpleToast.stories.js.map +6 -0
- package/dist/esm/panels/SimpleToast/index.js +26 -0
- package/dist/esm/panels/SimpleToast/index.js.map +6 -0
- package/dist/jsx/forms/FormCheckBox/FormCheckBox.stories.js +24 -2
- package/dist/jsx/forms/FormCheckBox/FormCheckBox.stories.js.map +1 -1
- package/dist/jsx/forms/FormCheckBox/FormCheckBox.stories.mjs +24 -2
- package/dist/jsx/forms/FormCheckBox/FormCheckBox.stories.mjs.map +1 -1
- package/dist/jsx/forms/FormProgress/FormProgress.stories.js +18 -0
- package/dist/jsx/forms/FormProgress/FormProgress.stories.js.map +6 -0
- package/dist/jsx/forms/FormProgress/FormProgress.stories.mjs +18 -0
- package/dist/jsx/forms/FormProgress/FormProgress.stories.mjs.map +6 -0
- package/dist/jsx/forms/FormProgress/index.js +57 -0
- package/dist/jsx/forms/FormProgress/index.js.map +6 -0
- package/dist/jsx/forms/FormProgress/index.mjs +57 -0
- package/dist/jsx/forms/FormProgress/index.mjs.map +6 -0
- package/dist/jsx/forms/FormRadioGroup/FormRadioGroup.stories.js +2 -0
- package/dist/jsx/forms/FormRadioGroup/FormRadioGroup.stories.js.map +1 -1
- package/dist/jsx/forms/FormRadioGroup/FormRadioGroup.stories.mjs +2 -0
- package/dist/jsx/forms/FormRadioGroup/FormRadioGroup.stories.mjs.map +1 -1
- package/dist/jsx/forms/FormSlider/FormSlider.stories.js +2 -1
- package/dist/jsx/forms/FormSlider/FormSlider.stories.js.map +1 -1
- package/dist/jsx/forms/FormSlider/FormSlider.stories.mjs +2 -1
- package/dist/jsx/forms/FormSlider/FormSlider.stories.mjs.map +1 -1
- package/dist/jsx/forms/FormSwitch/FormSwitch.stories.js +8 -1
- package/dist/jsx/forms/FormSwitch/FormSwitch.stories.js.map +1 -1
- package/dist/jsx/forms/FormSwitch/FormSwitch.stories.mjs +8 -1
- package/dist/jsx/forms/FormSwitch/FormSwitch.stories.mjs.map +1 -1
- package/dist/jsx/forms/FormTextArea/FormTextArea.stories.js +8 -1
- package/dist/jsx/forms/FormTextArea/FormTextArea.stories.js.map +1 -1
- package/dist/jsx/forms/FormTextArea/FormTextArea.stories.mjs +8 -1
- package/dist/jsx/forms/FormTextArea/FormTextArea.stories.mjs.map +1 -1
- package/dist/jsx/forms/SimpleForm/SimpleForm.stories.js +15 -0
- package/dist/jsx/forms/SimpleForm/SimpleForm.stories.js.map +1 -1
- package/dist/jsx/forms/SimpleForm/SimpleForm.stories.mjs +15 -0
- package/dist/jsx/forms/SimpleForm/SimpleForm.stories.mjs.map +1 -1
- package/dist/jsx/hooks/useAssets/index.js +6 -13
- package/dist/jsx/hooks/useAssets/index.js.map +1 -1
- package/dist/jsx/hooks/useAssets/index.mjs +6 -13
- package/dist/jsx/hooks/useAssets/index.mjs.map +1 -1
- package/dist/jsx/hooks/useAssets/index.native.js +4 -10
- package/dist/jsx/hooks/useAssets/index.native.js.map +1 -1
- package/dist/jsx/hooks/useAssets/index.native.mjs +4 -10
- package/dist/jsx/hooks/useAssets/index.native.mjs.map +1 -1
- package/dist/jsx/images/SimpleImage/index.js +105 -119
- package/dist/jsx/images/SimpleImage/index.js.map +2 -2
- package/dist/jsx/images/SimpleImage/index.mjs +105 -119
- package/dist/jsx/images/SimpleImage/index.mjs.map +2 -2
- package/dist/jsx/images/SimpleImage/index.stories.js +21 -1
- package/dist/jsx/images/SimpleImage/index.stories.js.map +1 -1
- package/dist/jsx/images/SimpleImage/index.stories.mjs +21 -1
- package/dist/jsx/images/SimpleImage/index.stories.mjs.map +1 -1
- package/dist/jsx/images/index.js +1 -1
- package/dist/jsx/images/index.mjs +1 -1
- package/dist/jsx/organize/SimpleTabs/SimpleTabs.stories.js +41 -0
- package/dist/jsx/organize/SimpleTabs/SimpleTabs.stories.js.map +6 -0
- package/dist/jsx/organize/SimpleTabs/SimpleTabs.stories.mjs +41 -0
- package/dist/jsx/organize/SimpleTabs/SimpleTabs.stories.mjs.map +6 -0
- package/dist/jsx/organize/SimpleTabs/index.js +80 -0
- package/dist/jsx/organize/SimpleTabs/index.js.map +6 -0
- package/dist/jsx/organize/SimpleTabs/index.mjs +80 -0
- package/dist/jsx/organize/SimpleTabs/index.mjs.map +6 -0
- package/dist/jsx/panels/SimpleToast/SimpleToast.stories.js +25 -0
- package/dist/jsx/panels/SimpleToast/SimpleToast.stories.js.map +6 -0
- package/dist/jsx/panels/SimpleToast/SimpleToast.stories.mjs +25 -0
- package/dist/jsx/panels/SimpleToast/SimpleToast.stories.mjs.map +6 -0
- package/dist/jsx/panels/SimpleToast/index.js +24 -0
- package/dist/jsx/panels/SimpleToast/index.js.map +6 -0
- package/dist/jsx/panels/SimpleToast/index.mjs +24 -0
- package/dist/jsx/panels/SimpleToast/index.mjs.map +6 -0
- package/package.json +15 -13
- package/src/forms/FormCheckBox/FormCheckBox.stories.tsx +24 -4
- package/src/forms/FormProgress/FormProgress.stories.tsx +16 -0
- package/src/forms/FormProgress/index.tsx +74 -0
- package/src/forms/FormRadioGroup/FormRadioGroup.stories.tsx +2 -0
- package/src/forms/FormSlider/FormSlider.stories.tsx +2 -1
- package/src/forms/FormSwitch/FormSwitch.stories.tsx +8 -1
- package/src/forms/FormTextArea/FormTextArea.stories.tsx +8 -1
- package/src/forms/SimpleForm/SimpleForm.stories.tsx +15 -0
- package/src/hooks/useAssets/index.native.ts +8 -14
- package/src/hooks/useAssets/index.ts +8 -28
- package/src/images/SimpleImage/index.stories.tsx +26 -0
- package/src/images/SimpleImage/index.tsx +137 -162
- package/src/images/index.ts +1 -1
- package/src/organize/SimpleTabs/SimpleTabs.stories.tsx +63 -0
- package/src/organize/SimpleTabs/index.tsx +118 -0
- package/src/panels/SimpleToast/SimpleToast.stories.tsx +27 -0
- package/src/panels/SimpleToast/index.tsx +27 -0
- package/types/code/Code/index.d.ts +49 -15
- package/types/code/Code/index.d.ts.map +1 -1
- package/types/code/Pre/index.d.ts +16 -7
- package/types/code/Pre/index.d.ts.map +1 -1
- package/types/forms/FormCheckBox/FormCheckBox.stories.d.ts.map +1 -1
- package/types/forms/FormProgress/FormProgress.stories.d.ts +15 -0
- package/types/forms/FormProgress/FormProgress.stories.d.ts.map +1 -0
- package/types/forms/FormProgress/index.d.ts +11 -0
- package/types/forms/FormProgress/index.d.ts.map +1 -0
- package/types/forms/FormRadioGroup/FormRadioGroup.stories.d.ts.map +1 -1
- package/types/forms/FormSlider/FormSlider.stories.d.ts.map +1 -1
- package/types/forms/FormSwitch/FormSwitch.stories.d.ts.map +1 -1
- package/types/forms/FormTextArea/FormTextArea.stories.d.ts.map +1 -1
- package/types/forms/SimpleForm/SimpleForm.stories.d.ts.map +1 -1
- package/types/hooks/useAssets/index.d.ts +2 -3
- package/types/hooks/useAssets/index.d.ts.map +1 -1
- package/types/hooks/useAssets/index.native.d.ts +2 -2
- package/types/hooks/useAssets/index.native.d.ts.map +1 -1
- package/types/images/SimpleImage/index.d.ts +15 -22
- package/types/images/SimpleImage/index.d.ts.map +1 -1
- package/types/images/SimpleImage/index.stories.d.ts +8 -2
- package/types/images/SimpleImage/index.stories.d.ts.map +1 -1
- package/types/images/SvgUri/index.native.d.ts +5 -5
- package/types/images/index.d.ts +1 -1
- package/types/images/index.d.ts.map +1 -1
- package/types/mdx/LI/LI.stories.d.ts +29 -12
- package/types/mdx/LI/LI.stories.d.ts.map +1 -1
- package/types/mdx/LI/index.d.ts +29 -12
- package/types/mdx/LI/index.d.ts.map +1 -1
- package/types/mdx/UL/UL.stories.d.ts +16 -7
- package/types/mdx/UL/UL.stories.d.ts.map +1 -1
- package/types/mdx/UL/index.d.ts +16 -7
- package/types/mdx/UL/index.d.ts.map +1 -1
- package/types/mdx/components.d.ts +16 -7
- package/types/mdx/components.d.ts.map +1 -1
- package/types/organize/SimpleTabs/SimpleTabs.stories.d.ts +15 -0
- package/types/organize/SimpleTabs/SimpleTabs.stories.d.ts.map +1 -0
- package/types/organize/SimpleTabs/index.d.ts +21 -0
- package/types/organize/SimpleTabs/index.d.ts.map +1 -0
- package/types/{forms/RadioSimple/RadioSimple.stories.d.ts → panels/SimpleToast/SimpleToast.stories.d.ts} +4 -4
- package/types/panels/SimpleToast/SimpleToast.stories.d.ts.map +1 -0
- package/types/panels/SimpleToast/index.d.ts +3 -0
- package/types/panels/SimpleToast/index.d.ts.map +1 -0
- package/types/table/Table/Table.stories.d.ts +51 -10
- package/types/table/Table/Table.stories.d.ts.map +1 -1
- package/types/table/Table/index.d.ts +51 -10
- package/types/table/Table/index.d.ts.map +1 -1
- package/types/table/TableCell/index.d.ts +20 -3
- package/types/table/TableCell/index.d.ts.map +1 -1
- package/types/table/TableCol/index.d.ts +31 -7
- package/types/table/TableCol/index.d.ts.map +1 -1
- package/dist/cjs/forms/RadioSimple/RadioSimple.stories.js.map +0 -6
- package/dist/cjs/forms/RadioSimple/index.js.map +0 -6
- package/dist/cjs/hooks/useAssets/types.js +0 -16
- package/dist/cjs/hooks/useAssets/types.js.map +0 -6
- package/dist/esm/forms/RadioSimple/RadioSimple.stories.js +0 -15
- package/dist/esm/forms/RadioSimple/RadioSimple.stories.js.map +0 -6
- package/dist/esm/forms/RadioSimple/index.js +0 -20
- package/dist/esm/forms/RadioSimple/index.js.map +0 -6
- package/dist/esm/hooks/useAssets/types.js +0 -1
- package/dist/esm/hooks/useAssets/types.js.map +0 -6
- package/dist/jsx/forms/RadioSimple/RadioSimple.stories.js +0 -14
- package/dist/jsx/forms/RadioSimple/RadioSimple.stories.js.map +0 -6
- package/dist/jsx/forms/RadioSimple/RadioSimple.stories.mjs +0 -14
- package/dist/jsx/forms/RadioSimple/RadioSimple.stories.mjs.map +0 -6
- package/dist/jsx/forms/RadioSimple/index.js +0 -26
- package/dist/jsx/forms/RadioSimple/index.js.map +0 -6
- package/dist/jsx/forms/RadioSimple/index.mjs +0 -26
- package/dist/jsx/forms/RadioSimple/index.mjs.map +0 -6
- package/dist/jsx/hooks/useAssets/types.js +0 -1
- package/dist/jsx/hooks/useAssets/types.js.map +0 -6
- package/dist/jsx/hooks/useAssets/types.mjs +0 -1
- package/dist/jsx/hooks/useAssets/types.mjs.map +0 -6
- package/src/forms/RadioSimple/RadioSimple.stories.tsx +0 -12
- package/src/forms/RadioSimple/index.tsx +0 -42
- package/src/hooks/useAssets/types.ts +0 -3
- package/types/forms/RadioSimple/RadioSimple.stories.d.ts.map +0 -1
- package/types/forms/RadioSimple/index.d.ts +0 -8
- package/types/forms/RadioSimple/index.d.ts.map +0 -1
- package/types/hooks/useAssets/types.d.ts +0 -3
- package/types/hooks/useAssets/types.d.ts.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormProgress } from "./index";
|
|
2
|
+
var FormProgress_stories_default = {
|
|
3
|
+
title: "forms/FormProgress",
|
|
4
|
+
component: FormProgress,
|
|
5
|
+
parameters: {
|
|
6
|
+
status: {
|
|
7
|
+
type: "beta"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const vertical = (args) => <FormProgress value={80} size={3} width={20} vertical name="progress" {...args} />;
|
|
12
|
+
const horizontal = (args) => <FormProgress value={80} size={3} width={20} name="progress" {...args} />;
|
|
13
|
+
export {
|
|
14
|
+
FormProgress_stories_default as default,
|
|
15
|
+
horizontal,
|
|
16
|
+
vertical
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=FormProgress.stories.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/forms/FormProgress/FormProgress.stories.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,oBAAoB;AAG7B,IAAO,+BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEO,MAAM,WAAW,CAAC,SAAS,CAAC,aAAa,OAAO,IAAI,MAAM,GAAG,OAAO,IAAI,SAAS,KAAK,eAAe,MAAM;AAE3G,MAAM,aAAa,CAAC,SAAS,CAAC,aAAa,OAAO,IAAI,MAAM,GAAG,OAAO,IAAI,KAAK,eAAe,MAAM;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormProgress } from "./index";
|
|
2
|
+
var FormProgress_stories_default = {
|
|
3
|
+
title: "forms/FormProgress",
|
|
4
|
+
component: FormProgress,
|
|
5
|
+
parameters: {
|
|
6
|
+
status: {
|
|
7
|
+
type: "beta"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const vertical = (args) => <FormProgress value={80} size={3} width={20} vertical name="progress" {...args} />;
|
|
12
|
+
const horizontal = (args) => <FormProgress value={80} size={3} width={20} name="progress" {...args} />;
|
|
13
|
+
export {
|
|
14
|
+
FormProgress_stories_default as default,
|
|
15
|
+
horizontal,
|
|
16
|
+
vertical
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=FormProgress.stories.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/forms/FormProgress/FormProgress.stories.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,oBAAoB;AAG7B,IAAO,+BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEO,MAAM,WAAW,CAAC,SAAS,CAAC,aAAa,OAAO,IAAI,MAAM,GAAG,OAAO,IAAI,SAAS,KAAK,eAAe,MAAM;AAE3G,MAAM,aAAa,CAAC,SAAS,CAAC,aAAa,OAAO,IAAI,MAAM,GAAG,OAAO,IAAI,KAAK,eAAe,MAAM;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
import { Progress } from "tamagui";
|
|
3
|
+
import { useFormContext, Controller } from "react-hook-form";
|
|
4
|
+
import { FormField } from "../FormField";
|
|
5
|
+
function FormProgress({
|
|
6
|
+
control,
|
|
7
|
+
defaultValue,
|
|
8
|
+
error,
|
|
9
|
+
fieldProps,
|
|
10
|
+
helperText,
|
|
11
|
+
label,
|
|
12
|
+
name,
|
|
13
|
+
required,
|
|
14
|
+
rules,
|
|
15
|
+
size,
|
|
16
|
+
vertical,
|
|
17
|
+
...progressProps
|
|
18
|
+
}) {
|
|
19
|
+
const formContext = useFormContext();
|
|
20
|
+
const id = useId();
|
|
21
|
+
const propSize = typeof size === "number" ? `$${size}` : size;
|
|
22
|
+
if (!formContext) {
|
|
23
|
+
console.log("FormProgress", progressProps);
|
|
24
|
+
return <FormField id={id} error={!!error} helperText={helperText} label={label} required={required} {...fieldProps}><Progress
|
|
25
|
+
mt={vertical ? 86 : void 0}
|
|
26
|
+
ml={vertical ? -80 : void 0}
|
|
27
|
+
rotate={vertical ? "270deg" : void 0}
|
|
28
|
+
{...progressProps}
|
|
29
|
+
size={propSize}
|
|
30
|
+
><Progress.Indicator animation="bouncy" /></Progress></FormField>;
|
|
31
|
+
}
|
|
32
|
+
return <Controller
|
|
33
|
+
name={name}
|
|
34
|
+
control={control}
|
|
35
|
+
rules={rules}
|
|
36
|
+
defaultValue={defaultValue}
|
|
37
|
+
render={({ field: { value }, fieldState: { error: error2 } }) => <FormField
|
|
38
|
+
id={id}
|
|
39
|
+
error={!!error2}
|
|
40
|
+
helperText={error2 ? error2.message : helperText}
|
|
41
|
+
label={label}
|
|
42
|
+
required={required}
|
|
43
|
+
{...fieldProps}
|
|
44
|
+
><Progress
|
|
45
|
+
mt={vertical ? 86 : void 0}
|
|
46
|
+
ml={vertical ? -80 : void 0}
|
|
47
|
+
rotate={vertical ? "270deg" : void 0}
|
|
48
|
+
{...progressProps}
|
|
49
|
+
size={propSize}
|
|
50
|
+
value={value ?? 0}
|
|
51
|
+
/></FormField>}
|
|
52
|
+
/>;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
FormProgress
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/forms/FormProgress/index.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAgB,aAAa;AAE7B,SAAS,gBAAgB;AACzB,SAAS,gBAAgB,kBAAkB;AAE3C,SAAS,iBAAiB;AAQnB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,cAAc,eAAe;AACnC,QAAM,KAAK,MAAM;AACjB,QAAM,WAAW,OAAO,SAAS,WAAY,IAAI,SAAyB;AAC1E,MAAI,CAAC,aAAa;AAChB,YAAQ,IAAI,gBAAgB,aAAa;AACzC,WACE,CAAC,UAAU,IAAI,IAAI,OAAO,CAAC,CAAC,OAAO,YAAY,YAAY,OAAO,OAAO,UAAU,cAAc,YAC/F,CAAC;AAAA,MACC,IAAI,WAAW,KAAK;AAAA,MACpB,IAAI,WAAW,MAAM;AAAA,MACrB,QAAQ,WAAW,WAAW;AAAA,UAC1B;AAAA,MACJ,MAAM;AAAA,KAEN,CAAC,SAAS,UAAU,UAAU,SAAS,EACzC,EARC,SASH,EAVC;AAAA,EAYL;AACA,SACE,CAAC;AAAA,IACC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,cAAc;AAAA,IACd,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,OAAAA,OAAM,EAAE,MACjD,CAAC;AAAA,MACC,IAAI;AAAA,MACJ,OAAO,CAAC,CAACA;AAAA,MACT,YAAYA,SAAQA,OAAM,UAAU;AAAA,MACpC,OAAO;AAAA,MACP,UAAU;AAAA,UACN;AAAA,KAEJ,CAAC;AAAA,MACC,IAAI,WAAW,KAAK;AAAA,MACpB,IAAI,WAAW,MAAM;AAAA,MACrB,QAAQ,WAAW,WAAW;AAAA,UAC1B;AAAA,MACJ,MAAM;AAAA,MACN,OAAO,SAAS;AAAA,IAClB,EACF,EAhBC;AAAA,EAkBL;AAEJ;",
|
|
5
|
+
"names": ["error"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
import { Progress } from "tamagui";
|
|
3
|
+
import { useFormContext, Controller } from "react-hook-form";
|
|
4
|
+
import { FormField } from "../FormField";
|
|
5
|
+
function FormProgress({
|
|
6
|
+
control,
|
|
7
|
+
defaultValue,
|
|
8
|
+
error,
|
|
9
|
+
fieldProps,
|
|
10
|
+
helperText,
|
|
11
|
+
label,
|
|
12
|
+
name,
|
|
13
|
+
required,
|
|
14
|
+
rules,
|
|
15
|
+
size,
|
|
16
|
+
vertical,
|
|
17
|
+
...progressProps
|
|
18
|
+
}) {
|
|
19
|
+
const formContext = useFormContext();
|
|
20
|
+
const id = useId();
|
|
21
|
+
const propSize = typeof size === "number" ? `$${size}` : size;
|
|
22
|
+
if (!formContext) {
|
|
23
|
+
console.log("FormProgress", progressProps);
|
|
24
|
+
return <FormField id={id} error={!!error} helperText={helperText} label={label} required={required} {...fieldProps}><Progress
|
|
25
|
+
mt={vertical ? 86 : void 0}
|
|
26
|
+
ml={vertical ? -80 : void 0}
|
|
27
|
+
rotate={vertical ? "270deg" : void 0}
|
|
28
|
+
{...progressProps}
|
|
29
|
+
size={propSize}
|
|
30
|
+
><Progress.Indicator animation="bouncy" /></Progress></FormField>;
|
|
31
|
+
}
|
|
32
|
+
return <Controller
|
|
33
|
+
name={name}
|
|
34
|
+
control={control}
|
|
35
|
+
rules={rules}
|
|
36
|
+
defaultValue={defaultValue}
|
|
37
|
+
render={({ field: { value }, fieldState: { error: error2 } }) => <FormField
|
|
38
|
+
id={id}
|
|
39
|
+
error={!!error2}
|
|
40
|
+
helperText={error2 ? error2.message : helperText}
|
|
41
|
+
label={label}
|
|
42
|
+
required={required}
|
|
43
|
+
{...fieldProps}
|
|
44
|
+
><Progress
|
|
45
|
+
mt={vertical ? 86 : void 0}
|
|
46
|
+
ml={vertical ? -80 : void 0}
|
|
47
|
+
rotate={vertical ? "270deg" : void 0}
|
|
48
|
+
{...progressProps}
|
|
49
|
+
size={propSize}
|
|
50
|
+
value={value ?? 0}
|
|
51
|
+
/></FormField>}
|
|
52
|
+
/>;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
FormProgress
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/forms/FormProgress/index.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAgB,aAAa;AAE7B,SAAS,gBAAgB;AACzB,SAAS,gBAAgB,kBAAkB;AAE3C,SAAS,iBAAiB;AAQnB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,cAAc,eAAe;AACnC,QAAM,KAAK,MAAM;AACjB,QAAM,WAAW,OAAO,SAAS,WAAY,IAAI,SAAyB;AAC1E,MAAI,CAAC,aAAa;AAChB,YAAQ,IAAI,gBAAgB,aAAa;AACzC,WACE,CAAC,UAAU,IAAI,IAAI,OAAO,CAAC,CAAC,OAAO,YAAY,YAAY,OAAO,OAAO,UAAU,cAAc,YAC/F,CAAC;AAAA,MACC,IAAI,WAAW,KAAK;AAAA,MACpB,IAAI,WAAW,MAAM;AAAA,MACrB,QAAQ,WAAW,WAAW;AAAA,UAC1B;AAAA,MACJ,MAAM;AAAA,KAEN,CAAC,SAAS,UAAU,UAAU,SAAS,EACzC,EARC,SASH,EAVC;AAAA,EAYL;AACA,SACE,CAAC;AAAA,IACC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,cAAc;AAAA,IACd,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,OAAAA,OAAM,EAAE,MACjD,CAAC;AAAA,MACC,IAAI;AAAA,MACJ,OAAO,CAAC,CAACA;AAAA,MACT,YAAYA,SAAQA,OAAM,UAAU;AAAA,MACpC,OAAO;AAAA,MACP,UAAU;AAAA,UACN;AAAA,KAEJ,CAAC;AAAA,MACC,IAAI,WAAW,KAAK;AAAA,MACpB,IAAI,WAAW,MAAM;AAAA,MACrB,QAAQ,WAAW,WAAW;AAAA,UAC1B;AAAA,MACJ,MAAM;AAAA,MACN,OAAO,SAAS;AAAA,IAClB,EACF,EAhBC;AAAA,EAkBL;AAEJ;",
|
|
5
|
+
"names": ["error"]
|
|
6
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormRadioGroup } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormRadioGroup_stories_default = {
|
|
3
4
|
title: "forms/FormRadioGroup",
|
|
4
5
|
component: FormRadioGroup,
|
|
@@ -14,6 +15,7 @@ const main = () => <FormRadioGroup
|
|
|
14
15
|
{ label: "option 2", value: "option2" },
|
|
15
16
|
{ label: "option 3", value: "option3" }
|
|
16
17
|
]}
|
|
18
|
+
onValueChange={action("onValueChange")}
|
|
17
19
|
/>;
|
|
18
20
|
export {
|
|
19
21
|
FormRadioGroup_stories_default as default,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormRadioGroup/FormRadioGroup.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,sBAAsB;
|
|
4
|
+
"mappings": "AACA,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,IAAO,iCAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,EAAE;AACzC;AAEO,MAAM,OAAO,MAClB,CAAC;AAAA,EACC,KAAK;AAAA,EACL,MAAM;AAAA,EACN,WAAW;AAAA,EACX;AAAA,EACA,eAAe;AAAA,IACb,EAAE,OAAO,YAAY,OAAO,UAAU;AAAA,IACtC,EAAE,OAAO,YAAY,OAAO,UAAU;AAAA,IACtC,EAAE,OAAO,YAAY,OAAO,UAAU;AAAA,EACxC;AAAA,EACA,eAAe,OAAO,eAAe;AACvC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormRadioGroup } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormRadioGroup_stories_default = {
|
|
3
4
|
title: "forms/FormRadioGroup",
|
|
4
5
|
component: FormRadioGroup,
|
|
@@ -14,6 +15,7 @@ const main = () => <FormRadioGroup
|
|
|
14
15
|
{ label: "option 2", value: "option2" },
|
|
15
16
|
{ label: "option 3", value: "option3" }
|
|
16
17
|
]}
|
|
18
|
+
onValueChange={action("onValueChange")}
|
|
17
19
|
/>;
|
|
18
20
|
export {
|
|
19
21
|
FormRadioGroup_stories_default as default,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormRadioGroup/FormRadioGroup.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,sBAAsB;
|
|
4
|
+
"mappings": "AACA,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,IAAO,iCAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,EAAE;AACzC;AAEO,MAAM,OAAO,MAClB,CAAC;AAAA,EACC,KAAK;AAAA,EACL,MAAM;AAAA,EACN,WAAW;AAAA,EACX;AAAA,EACA,eAAe;AAAA,IACb,EAAE,OAAO,YAAY,OAAO,UAAU;AAAA,IACtC,EAAE,OAAO,YAAY,OAAO,UAAU;AAAA,IACtC,EAAE,OAAO,YAAY,OAAO,UAAU;AAAA,EACxC;AAAA,EACA,eAAe,OAAO,eAAe;AACvC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormSlider } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormSlider_stories_default = {
|
|
3
4
|
title: "forms/FormSlider",
|
|
4
5
|
component: FormSlider,
|
|
@@ -6,7 +7,7 @@ var FormSlider_stories_default = {
|
|
|
6
7
|
status: { type: "beta" }
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
|
-
const main = () => <FormSlider name="FormSlider" />;
|
|
10
|
+
const main = () => <FormSlider name="FormSlider" onValueChange={action(`onValueChange`)} />;
|
|
10
11
|
export {
|
|
11
12
|
FormSlider_stories_default as default,
|
|
12
13
|
main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormSlider/FormSlider.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;
|
|
4
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAAM,CAAC,WAAW,KAAK,aAAa,eAAe,OAAO,eAAe,GAAG;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormSlider } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormSlider_stories_default = {
|
|
3
4
|
title: "forms/FormSlider",
|
|
4
5
|
component: FormSlider,
|
|
@@ -6,7 +7,7 @@ var FormSlider_stories_default = {
|
|
|
6
7
|
status: { type: "beta" }
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
|
-
const main = () => <FormSlider name="FormSlider" />;
|
|
10
|
+
const main = () => <FormSlider name="FormSlider" onValueChange={action(`onValueChange`)} />;
|
|
10
11
|
export {
|
|
11
12
|
FormSlider_stories_default as default,
|
|
12
13
|
main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormSlider/FormSlider.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;
|
|
4
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAAM,CAAC,WAAW,KAAK,aAAa,eAAe,OAAO,eAAe,GAAG;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormSwitch } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormSwitch_stories_default = {
|
|
3
4
|
title: "forms/FormSwitch",
|
|
4
5
|
component: FormSwitch,
|
|
@@ -6,7 +7,13 @@ var FormSwitch_stories_default = {
|
|
|
6
7
|
status: { type: "beta" }
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
|
-
const main = () => <FormSwitch
|
|
10
|
+
const main = () => <FormSwitch
|
|
11
|
+
label="Example Switch"
|
|
12
|
+
name="exampleSwitch"
|
|
13
|
+
helperText="This is an example switch"
|
|
14
|
+
defaultValue={false}
|
|
15
|
+
onCheckedChange={action("onCheckedChange")}
|
|
16
|
+
/>;
|
|
10
17
|
export {
|
|
11
18
|
FormSwitch_stories_default as default,
|
|
12
19
|
main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormSwitch/FormSwitch.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;
|
|
4
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC;AAAA,EACC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,WAAW;AAAA,EACX,cAAc;AAAA,EACd,iBAAiB,OAAO,iBAAiB;AAC3C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormSwitch } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormSwitch_stories_default = {
|
|
3
4
|
title: "forms/FormSwitch",
|
|
4
5
|
component: FormSwitch,
|
|
@@ -6,7 +7,13 @@ var FormSwitch_stories_default = {
|
|
|
6
7
|
status: { type: "beta" }
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
|
-
const main = () => <FormSwitch
|
|
10
|
+
const main = () => <FormSwitch
|
|
11
|
+
label="Example Switch"
|
|
12
|
+
name="exampleSwitch"
|
|
13
|
+
helperText="This is an example switch"
|
|
14
|
+
defaultValue={false}
|
|
15
|
+
onCheckedChange={action("onCheckedChange")}
|
|
16
|
+
/>;
|
|
10
17
|
export {
|
|
11
18
|
FormSwitch_stories_default as default,
|
|
12
19
|
main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormSwitch/FormSwitch.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;
|
|
4
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC;AAAA,EACC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,WAAW;AAAA,EACX,cAAc;AAAA,EACd,iBAAiB,OAAO,iBAAiB;AAC3C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormTextArea } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormTextArea_stories_default = {
|
|
3
4
|
title: "forms/FormTextArea",
|
|
4
5
|
component: FormTextArea,
|
|
@@ -6,7 +7,13 @@ var FormTextArea_stories_default = {
|
|
|
6
7
|
status: { type: "beta" }
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
|
-
const main = () => <FormTextArea
|
|
10
|
+
const main = () => <FormTextArea
|
|
11
|
+
label="Description"
|
|
12
|
+
name="description"
|
|
13
|
+
defaultValue=""
|
|
14
|
+
rules={{ required: true }}
|
|
15
|
+
onChangeText={action("onChangeText")}
|
|
16
|
+
/>;
|
|
10
17
|
export {
|
|
11
18
|
FormTextArea_stories_default as default,
|
|
12
19
|
main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormTextArea/FormTextArea.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,oBAAoB;
|
|
4
|
+
"mappings": "AACA,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEvB,IAAO,+BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC;AAAA,EACC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,aAAa;AAAA,EACb,OAAO,EAAE,UAAU,KAAK;AAAA,EACxB,cAAc,OAAO,cAAc;AACrC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormTextArea } from "./index";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
2
3
|
var FormTextArea_stories_default = {
|
|
3
4
|
title: "forms/FormTextArea",
|
|
4
5
|
component: FormTextArea,
|
|
@@ -6,7 +7,13 @@ var FormTextArea_stories_default = {
|
|
|
6
7
|
status: { type: "beta" }
|
|
7
8
|
}
|
|
8
9
|
};
|
|
9
|
-
const main = () => <FormTextArea
|
|
10
|
+
const main = () => <FormTextArea
|
|
11
|
+
label="Description"
|
|
12
|
+
name="description"
|
|
13
|
+
defaultValue=""
|
|
14
|
+
rules={{ required: true }}
|
|
15
|
+
onChangeText={action("onChangeText")}
|
|
16
|
+
/>;
|
|
10
17
|
export {
|
|
11
18
|
FormTextArea_stories_default as default,
|
|
12
19
|
main
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/FormTextArea/FormTextArea.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,oBAAoB;
|
|
4
|
+
"mappings": "AACA,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEvB,IAAO,+BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC;AAAA,EACC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,aAAa;AAAA,EACb,OAAO,EAAE,UAAU,KAAK;AAAA,EACxB,cAAc,OAAO,cAAc;AACrC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -2,6 +2,9 @@ import { SimpleForm } from "./index";
|
|
|
2
2
|
import { FormInput } from "../FormInput";
|
|
3
3
|
import { FormSelectSimple } from "../FormSelectSimple";
|
|
4
4
|
import { FormSubmitButton } from "../FormSubmitButton";
|
|
5
|
+
import { FormTextArea } from "../FormTextArea";
|
|
6
|
+
import { FormSwitch } from "../FormSwitch";
|
|
7
|
+
import { FormRadioGroup } from "../FormRadioGroup";
|
|
5
8
|
import { Select } from "tamagui";
|
|
6
9
|
import { action } from "@storybook/addon-actions";
|
|
7
10
|
var SimpleForm_stories_default = {
|
|
@@ -23,6 +26,18 @@ const main = () => <SimpleForm padding="$4" space>
|
|
|
23
26
|
<Select.Item index={3} value="indigo"><Select.ItemText>Indigo</Select.ItemText></Select.Item>
|
|
24
27
|
<Select.Item index={3} value="violet"><Select.ItemText>Violet</Select.ItemText></Select.Item>
|
|
25
28
|
</FormSelectSimple>
|
|
29
|
+
<FormTextArea name="bio" label="Bio" />
|
|
30
|
+
<FormSwitch name="isAwesome" label="Is Awesome" />
|
|
31
|
+
<FormRadioGroup
|
|
32
|
+
radioElements={[
|
|
33
|
+
{ label: "male", value: "male" },
|
|
34
|
+
{ label: "female", value: "female" }
|
|
35
|
+
]}
|
|
36
|
+
name="Gender"
|
|
37
|
+
label="Gender"
|
|
38
|
+
horizontal
|
|
39
|
+
spacingProps={{ space: true }}
|
|
40
|
+
/>
|
|
26
41
|
<FormSubmitButton onSubmit={action("onSubmit")}>Submit</FormSubmitButton>
|
|
27
42
|
</SimpleForm>;
|
|
28
43
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/SimpleForm/SimpleForm.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC,WAAW,QAAQ,KAAK;AAAA,EACvB,CAAC,UAAU,KAAK,YAAY,MAAM,aAAa;AAAA,EAC/C,CAAC,UAAU,KAAK,WAAW,MAAM,YAAY;AAAA,EAC7C,CAAC,iBAAiB,KAAK,gBAAgB,MAAM;AAAA,IAC3C,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,MAC3B,CAAC,OAAO,SAAS,GAAG,EAAnB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,QAC3B,CAAC,OAAO,SAAS,KAAK,EAArB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,OAC3B,CAAC,OAAO,SAAS,IAAI,EAApB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,EAGV,EAtBC;AAAA,EAuBD,CAAC,iBAAiB,UAAU,OAAO,UAAU,GAAG,MAAM,EAArD;AACH,
|
|
4
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC,WAAW,QAAQ,KAAK;AAAA,EACvB,CAAC,UAAU,KAAK,YAAY,MAAM,aAAa;AAAA,EAC/C,CAAC,UAAU,KAAK,WAAW,MAAM,YAAY;AAAA,EAC7C,CAAC,iBAAiB,KAAK,gBAAgB,MAAM;AAAA,IAC3C,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,MAC3B,CAAC,OAAO,SAAS,GAAG,EAAnB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,QAC3B,CAAC,OAAO,SAAS,KAAK,EAArB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,OAC3B,CAAC,OAAO,SAAS,IAAI,EAApB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,EAGV,EAtBC;AAAA,EAuBD,CAAC,aAAa,KAAK,MAAM,MAAM,MAAM;AAAA,EACrC,CAAC,WAAW,KAAK,YAAY,MAAM,aAAa;AAAA,EAChD,CAAC;AAAA,IACC,eAAe;AAAA,MACb,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,MAC/B,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,IACrC;AAAA,IACA,KAAK;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,cAAc,EAAE,OAAO,KAAK;AAAA,EAC9B;AAAA,EACA,CAAC,iBAAiB,UAAU,OAAO,UAAU,GAAG,MAAM,EAArD;AACH,EAvCC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -2,6 +2,9 @@ import { SimpleForm } from "./index";
|
|
|
2
2
|
import { FormInput } from "../FormInput";
|
|
3
3
|
import { FormSelectSimple } from "../FormSelectSimple";
|
|
4
4
|
import { FormSubmitButton } from "../FormSubmitButton";
|
|
5
|
+
import { FormTextArea } from "../FormTextArea";
|
|
6
|
+
import { FormSwitch } from "../FormSwitch";
|
|
7
|
+
import { FormRadioGroup } from "../FormRadioGroup";
|
|
5
8
|
import { Select } from "tamagui";
|
|
6
9
|
import { action } from "@storybook/addon-actions";
|
|
7
10
|
var SimpleForm_stories_default = {
|
|
@@ -23,6 +26,18 @@ const main = () => <SimpleForm padding="$4" space>
|
|
|
23
26
|
<Select.Item index={3} value="indigo"><Select.ItemText>Indigo</Select.ItemText></Select.Item>
|
|
24
27
|
<Select.Item index={3} value="violet"><Select.ItemText>Violet</Select.ItemText></Select.Item>
|
|
25
28
|
</FormSelectSimple>
|
|
29
|
+
<FormTextArea name="bio" label="Bio" />
|
|
30
|
+
<FormSwitch name="isAwesome" label="Is Awesome" />
|
|
31
|
+
<FormRadioGroup
|
|
32
|
+
radioElements={[
|
|
33
|
+
{ label: "male", value: "male" },
|
|
34
|
+
{ label: "female", value: "female" }
|
|
35
|
+
]}
|
|
36
|
+
name="Gender"
|
|
37
|
+
label="Gender"
|
|
38
|
+
horizontal
|
|
39
|
+
spacingProps={{ space: true }}
|
|
40
|
+
/>
|
|
26
41
|
<FormSubmitButton onSubmit={action("onSubmit")}>Submit</FormSubmitButton>
|
|
27
42
|
</SimpleForm>;
|
|
28
43
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/forms/SimpleForm/SimpleForm.stories.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC,WAAW,QAAQ,KAAK;AAAA,EACvB,CAAC,UAAU,KAAK,YAAY,MAAM,aAAa;AAAA,EAC/C,CAAC,UAAU,KAAK,WAAW,MAAM,YAAY;AAAA,EAC7C,CAAC,iBAAiB,KAAK,gBAAgB,MAAM;AAAA,IAC3C,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,MAC3B,CAAC,OAAO,SAAS,GAAG,EAAnB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,QAC3B,CAAC,OAAO,SAAS,KAAK,EAArB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,OAC3B,CAAC,OAAO,SAAS,IAAI,EAApB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,EAGV,EAtBC;AAAA,EAuBD,CAAC,iBAAiB,UAAU,OAAO,UAAU,GAAG,MAAM,EAArD;AACH,
|
|
4
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,cAAc;AAEvB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,MAAM,OAAO,MAClB,CAAC,WAAW,QAAQ,KAAK;AAAA,EACvB,CAAC,UAAU,KAAK,YAAY,MAAM,aAAa;AAAA,EAC/C,CAAC,UAAU,KAAK,WAAW,MAAM,YAAY;AAAA,EAC7C,CAAC,iBAAiB,KAAK,gBAAgB,MAAM;AAAA,IAC3C,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,MAC3B,CAAC,OAAO,SAAS,GAAG,EAAnB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,QAC3B,CAAC,OAAO,SAAS,KAAK,EAArB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,OAC3B,CAAC,OAAO,SAAS,IAAI,EAApB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,IAGR,CAAC,OAAO,KAAK,OAAO,GAAG,MAAM,SAC3B,CAAC,OAAO,SAAS,MAAM,EAAtB,OAAO,SACV,EAFC,OAAO;AAAA,EAGV,EAtBC;AAAA,EAuBD,CAAC,aAAa,KAAK,MAAM,MAAM,MAAM;AAAA,EACrC,CAAC,WAAW,KAAK,YAAY,MAAM,aAAa;AAAA,EAChD,CAAC;AAAA,IACC,eAAe;AAAA,MACb,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,MAC/B,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,IACrC;AAAA,IACA,KAAK;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,cAAc,EAAE,OAAO,KAAK;AAAA,EAC9B;AAAA,EACA,CAAC,iBAAiB,UAAU,OAAO,UAAU,GAAG,MAAM,EAArD;AACH,EAvCC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
function useAssets(modules) {
|
|
2
|
-
const modulesArr = (Array.isArray(modules) ? modules : [modules]).map(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return modulesArr.map(
|
|
8
|
-
(module) => typeof module === "string" ? {
|
|
9
|
-
uri: module
|
|
10
|
-
} : {
|
|
11
|
-
uri: module.src,
|
|
12
|
-
height: module.height,
|
|
13
|
-
blurDataURL: module.blurDataURL,
|
|
14
|
-
width: module.width
|
|
2
|
+
const modulesArr = (Array.isArray(modules) ? modules : [modules]).map(
|
|
3
|
+
(module) => {
|
|
4
|
+
if (typeof module.default !== "undefined")
|
|
5
|
+
return module.default;
|
|
6
|
+
return module;
|
|
15
7
|
}
|
|
16
8
|
);
|
|
9
|
+
return modulesArr;
|
|
17
10
|
}
|
|
18
11
|
export {
|
|
19
12
|
useAssets
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/hooks/useAssets/index.ts"],
|
|
4
|
-
"mappings": "AAEO,SAAS,UAAU,
|
|
4
|
+
"mappings": "AAEO,SAAS,UAAU,SAAuD;AAC/E,QAAM,cAA+C,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,GAAG;AAAA,IACjG,CAAC,WAAgB;AACf,UAAI,OAAO,OAAO,YAAY;AAAa,eAAO,OAAO;AACzD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
function useAssets(modules) {
|
|
2
|
-
const modulesArr = (Array.isArray(modules) ? modules : [modules]).map(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return modulesArr.map(
|
|
8
|
-
(module) => typeof module === "string" ? {
|
|
9
|
-
uri: module
|
|
10
|
-
} : {
|
|
11
|
-
uri: module.src,
|
|
12
|
-
height: module.height,
|
|
13
|
-
blurDataURL: module.blurDataURL,
|
|
14
|
-
width: module.width
|
|
2
|
+
const modulesArr = (Array.isArray(modules) ? modules : [modules]).map(
|
|
3
|
+
(module) => {
|
|
4
|
+
if (typeof module.default !== "undefined")
|
|
5
|
+
return module.default;
|
|
6
|
+
return module;
|
|
15
7
|
}
|
|
16
8
|
);
|
|
9
|
+
return modulesArr;
|
|
17
10
|
}
|
|
18
11
|
export {
|
|
19
12
|
useAssets
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/hooks/useAssets/index.ts"],
|
|
4
|
-
"mappings": "AAEO,SAAS,UAAU,
|
|
4
|
+
"mappings": "AAEO,SAAS,UAAU,SAAuD;AAC/E,QAAM,cAA+C,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,GAAG;AAAA,IACjG,CAAC,WAAgB;AACf,UAAI,OAAO,OAAO,YAAY;AAAa,eAAO,OAAO;AACzD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -2,7 +2,7 @@ import { useAssets as expoUseAssets } from "expo-asset";
|
|
|
2
2
|
const logger = console;
|
|
3
3
|
function useAssets(modules) {
|
|
4
4
|
const modulesArr = (Array.isArray(modules) ? modules : [modules]).map((module) => {
|
|
5
|
-
if (typeof module.default !== "undefined"
|
|
5
|
+
if (typeof module.default !== "undefined")
|
|
6
6
|
return module.default;
|
|
7
7
|
return module;
|
|
8
8
|
});
|
|
@@ -12,15 +12,9 @@ function useAssets(modules) {
|
|
|
12
12
|
if (!assets)
|
|
13
13
|
return new Array(modulesArr.length);
|
|
14
14
|
return assets.map((asset) => ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
width: asset.width
|
|
18
|
-
height: asset.height || void 0,
|
|
19
|
-
name: asset.name,
|
|
20
|
-
hash: asset.hash,
|
|
21
|
-
localUri: asset.localUri,
|
|
22
|
-
downloading: asset.downloading,
|
|
23
|
-
downloaded: asset.downloaded
|
|
15
|
+
height: asset.height,
|
|
16
|
+
src: asset.uri,
|
|
17
|
+
width: asset.width
|
|
24
18
|
}));
|
|
25
19
|
}
|
|
26
20
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/hooks/useAssets/index.native.ts"],
|
|
4
|
-
"mappings": "AAEA,SAAS,aAAa,qBAAqB;AAE3C,MAAM,SAAS;AAER,SAAS,UAAU,
|
|
4
|
+
"mappings": "AAEA,SAAS,aAAa,qBAAqB;AAE3C,MAAM,SAAS;AAER,SAAS,UAAU,SAAuD;AAC/E,QAAM,cAAc,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,WAAgB;AACrF,QAAI,OAAO,OAAO,YAAY;AAAa,aAAO,OAAO;AACzD,WAAO;AAAA,EACT,CAAC;AACD,QAAM,CAAC,QAAQ,GAAG,IAAI,cAAc,UAAU;AAC9C,MAAI;AAAK,WAAO,MAAM,GAAG;AACzB,MAAI,CAAC;AAAQ,WAAO,IAAI,MAAM,WAAW,MAAM;AAC/C,SAAO,OAAO,IAAI,CAAC,WAAkB;AAAA,IACnC,QAAQ,MAAM;AAAA,IACd,KAAK,MAAM;AAAA,IACX,OAAO,MAAM;AAAA,EACf,EAAE;AACJ;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -2,7 +2,7 @@ import { useAssets as expoUseAssets } from "expo-asset";
|
|
|
2
2
|
const logger = console;
|
|
3
3
|
function useAssets(modules) {
|
|
4
4
|
const modulesArr = (Array.isArray(modules) ? modules : [modules]).map((module) => {
|
|
5
|
-
if (typeof module.default !== "undefined"
|
|
5
|
+
if (typeof module.default !== "undefined")
|
|
6
6
|
return module.default;
|
|
7
7
|
return module;
|
|
8
8
|
});
|
|
@@ -12,15 +12,9 @@ function useAssets(modules) {
|
|
|
12
12
|
if (!assets)
|
|
13
13
|
return new Array(modulesArr.length);
|
|
14
14
|
return assets.map((asset) => ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
width: asset.width
|
|
18
|
-
height: asset.height || void 0,
|
|
19
|
-
name: asset.name,
|
|
20
|
-
hash: asset.hash,
|
|
21
|
-
localUri: asset.localUri,
|
|
22
|
-
downloading: asset.downloading,
|
|
23
|
-
downloaded: asset.downloaded
|
|
15
|
+
height: asset.height,
|
|
16
|
+
src: asset.uri,
|
|
17
|
+
width: asset.width
|
|
24
18
|
}));
|
|
25
19
|
}
|
|
26
20
|
export {
|