@draftbit/core 43.2.5-7c0f30.3 → 43.2.5-cc755f.3
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/lib/commonjs/components/Accordion/AccordionGroup.js +1 -9
- package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Divider.js +3 -13
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -6
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/commonjs/index.js +0 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/Accordion.js +40 -0
- package/lib/commonjs/mappings/Accordion.js.map +1 -0
- package/lib/commonjs/mappings/AccordionGroup.js +1 -1
- package/lib/commonjs/mappings/AccordionGroup.js.map +1 -1
- package/lib/commonjs/mappings/AccordionItem.js +1 -1
- package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
- package/lib/commonjs/mappings/RadioButton.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/module/components/Accordion/AccordionGroup.js +1 -9
- package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/module/components/Checkbox/Checkbox.js +21 -4
- package/lib/module/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/components/RowBodyIcon.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/Accordion.js +31 -0
- package/lib/module/mappings/Accordion.js.map +1 -0
- package/lib/module/mappings/AccordionGroup.js +1 -1
- package/lib/module/mappings/AccordionGroup.js.map +1 -1
- package/lib/module/mappings/AccordionItem.js +1 -1
- package/lib/module/mappings/AccordionItem.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/{components/LinearGradient.d.ts → mappings/Accordion.d.ts} +17 -55
- package/package.json +2 -3
- package/src/components/Accordion/AccordionGroup.js +1 -12
- package/src/components/Accordion/AccordionGroup.tsx +1 -15
- package/src/index.js +0 -1
- package/src/index.tsx +0 -1
- package/src/mappings/Accordion.js +30 -0
- package/src/mappings/Accordion.ts +38 -0
- package/src/mappings/AccordionGroup.js +1 -1
- package/src/mappings/AccordionGroup.ts +1 -1
- package/src/mappings/AccordionItem.js +1 -1
- package/src/mappings/AccordionItem.ts +1 -1
- package/lib/commonjs/components/LinearGradient.js +0 -127
- package/lib/commonjs/components/LinearGradient.js.map +0 -1
- package/lib/module/components/LinearGradient.js +0 -111
- package/lib/module/components/LinearGradient.js.map +0 -1
- package/src/components/LinearGradient.js +0 -84
- package/src/components/LinearGradient.tsx +0 -119
package/lib/module/index.js
CHANGED
|
@@ -25,7 +25,6 @@ export { default as TextField } from "./components/TextField";
|
|
|
25
25
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
26
26
|
export { default as Touchable } from "./components/Touchable";
|
|
27
27
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
28
|
-
export { default as LinearGradient } from "./components/LinearGradient";
|
|
29
28
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
|
|
30
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
31
30
|
export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":["injectIcon","withTheme","ThemeProvider","default","Provider","DefaultTheme","Link","ButtonSolid","ButtonOutline","Avatar","AvatarEdit","Card","Carousel","Checkbox","CheckboxGroup","CheckboxRow","CircleImage","Container","Divider","FAB","FieldSearchBarFull","IconButton","Image","NumberInput","ScreenContainer","StarRating","Surface","Switch","SwitchRow","TextField","ToggleButton","Touchable","AccordionGroup","AccordionItem","
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["injectIcon","withTheme","ThemeProvider","default","Provider","DefaultTheme","Link","ButtonSolid","ButtonOutline","Avatar","AvatarEdit","Card","Carousel","Checkbox","CheckboxGroup","CheckboxRow","CircleImage","Container","Divider","FAB","FieldSearchBarFull","IconButton","Image","NumberInput","ScreenContainer","StarRating","Surface","Switch","SwitchRow","TextField","ToggleButton","Touchable","AccordionGroup","AccordionItem","ActionSheet","ActionSheetItem","ActionSheetCancel","Swiper","SwiperItem","Center","Circle","Square","Row","Stack","Spacer","RadioButton","RadioButtonGroup","RadioButtonRow","RadioButtonFieldGroup","Button","CardBlock","CardContainer","CardContainerRating","CardInline","DatePicker","HeaderLarge","HeaderMedium","HeaderOverline","Picker","ProgressBar","ProgressCircle","RowBodyIcon","RowHeadlineImageCaption","RowHeadlineImageIcon","Slider","Stepper","useAuthState"],"mappings":"AAAA,SAASA,UAAT,QAA2B,mBAA3B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,WAAzC;AACA,SAASC,OAAO,IAAIC,QAApB,QAAoC,YAApC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,uBAAxC;AAEA,SAASC,IAAT,QAAqB,mBAArB;AACA,SAASC,WAAT,EAAsBC,aAAtB,QAA2C,qBAA3C;AACA,SAASL,OAAO,IAAIM,MAApB,QAAkC,0BAAlC;AACA,SAASN,OAAO,IAAIO,UAApB,QAAsC,yBAAtC;AACA,SAASP,OAAO,IAAIQ,IAApB,QAAgC,mBAAhC;AACA,SAASR,OAAO,IAAIS,QAApB,QAAoC,uBAApC;AACA,SAASC,QAAT,EAAmBC,aAAnB,EAAkCC,WAAlC,QAAqD,uBAArD;AACA,SAASZ,OAAO,IAAIa,WAApB,QAAuC,0BAAvC;AACA,SAASb,OAAO,IAAIc,SAApB,QAAqC,wBAArC;AACA,SAASd,OAAO,IAAIe,OAApB,QAAmC,sBAAnC;AACA,SAASf,OAAO,IAAIgB,GAApB,QAA+B,kBAA/B;AACA,SAAShB,OA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C,2BAAxC;AACA,SAASrD,OAAO,IAAIsD,cAApB,QAA0C,6BAA1C;AACA,SAAStD,OAAO,IAAIuD,MAApB,QAAkC,4BAAlC;AACA,SAASvD,OAAO,IAAIwD,WAApB,QAAuC,0BAAvC;AACA,SAASxD,OAAO,IAAIyD,cAApB,QAA0C,6BAA1C;AACA,SAASzD,OAAO,IAAI0D,WAApB,QAAuC,0BAAvC;AACA,SAAS1D,OAAO,IAAI2D,uBAApB,QAAmD,sCAAnD;AACA,SAAS3D,OAAO,IAAI4D,oBAApB,QAAgD,mCAAhD;AACA,SAAS5D,OAAO,IAAI6D,MAApB,QAAkC,qBAAlC;AACA,SAAS7D,OAAO,IAAI8D,OAApB,QAAmC,sBAAnC;AACA,SAASC,YAAT,QAA6B,2BAA7B","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createNumberProp, createIconProp, createTextProp, createStaticBoolProp, createColorProp } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Accordion",
|
|
4
|
+
tag: "AccordionGroup",
|
|
5
|
+
description: "An expandable container containing components",
|
|
6
|
+
category: COMPONENT_TYPES.container,
|
|
7
|
+
props: {
|
|
8
|
+
openColor: createColorProp({
|
|
9
|
+
label: "Open text color"
|
|
10
|
+
}),
|
|
11
|
+
closedColor: createColorProp({
|
|
12
|
+
label: "Closed text Color"
|
|
13
|
+
}),
|
|
14
|
+
caretColor: createColorProp({
|
|
15
|
+
label: "Caret color"
|
|
16
|
+
}),
|
|
17
|
+
iconSize: createNumberProp({
|
|
18
|
+
label: "Icon size",
|
|
19
|
+
defaultValue: 24
|
|
20
|
+
}),
|
|
21
|
+
label: createTextProp({
|
|
22
|
+
label: "Label"
|
|
23
|
+
}),
|
|
24
|
+
expanded: createStaticBoolProp({
|
|
25
|
+
label: "Expanded",
|
|
26
|
+
description: "Whether the AccordionGroup should be expanded or not"
|
|
27
|
+
}),
|
|
28
|
+
icon: createIconProp()
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Accordion.ts"],"names":["COMPONENT_TYPES","createNumberProp","createIconProp","createTextProp","createStaticBoolProp","createColorProp","SEED_DATA","name","tag","description","category","container","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,cAJF,EAKEC,oBALF,EAMEC,eANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,SAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAER,eAAe,CAAC;AACzBS,MAAAA,KAAK,EAAE;AADkB,KAAD,CADrB;AAILC,IAAAA,WAAW,EAAEV,eAAe,CAAC;AAC3BS,MAAAA,KAAK,EAAE;AADoB,KAAD,CAJvB;AAOLE,IAAAA,UAAU,EAAEX,eAAe,CAAC;AAC1BS,MAAAA,KAAK,EAAE;AADmB,KAAD,CAPtB;AAULG,IAAAA,QAAQ,EAAEhB,gBAAgB,CAAC;AACzBa,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAD,CAVrB;AAcLJ,IAAAA,KAAK,EAAEX,cAAc,CAAC;AACpBW,MAAAA,KAAK,EAAE;AADa,KAAD,CAdhB;AAiBLK,IAAAA,QAAQ,EAAEf,oBAAoB,CAAC;AAC7BU,MAAAA,KAAK,EAAE,UADsB;AAE7BL,MAAAA,WAAW,EAAE;AAFgB,KAAD,CAjBzB;AAqBLW,IAAAA,IAAI,EAAElB,cAAc;AArBf;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.container,\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
|
|
@@ -3,7 +3,7 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Accordion Group",
|
|
4
4
|
tag: "AccordionGroup",
|
|
5
5
|
description: "An expandable container containing components",
|
|
6
|
-
category: COMPONENT_TYPES.
|
|
6
|
+
category: COMPONENT_TYPES.deprecated,
|
|
7
7
|
props: {
|
|
8
8
|
openColor: createColorProp({
|
|
9
9
|
label: "Open text color"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionGroup.ts"],"names":["COMPONENT_TYPES","createNumberProp","createIconProp","createTextProp","createStaticBoolProp","createColorProp","SEED_DATA","name","tag","description","category","
|
|
1
|
+
{"version":3,"sources":["AccordionGroup.ts"],"names":["COMPONENT_TYPES","createNumberProp","createIconProp","createTextProp","createStaticBoolProp","createColorProp","SEED_DATA","name","tag","description","category","deprecated","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,cAJF,EAKEC,oBALF,EAMEC,eANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,iBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,UAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAER,eAAe,CAAC;AACzBS,MAAAA,KAAK,EAAE;AADkB,KAAD,CADrB;AAILC,IAAAA,WAAW,EAAEV,eAAe,CAAC;AAC3BS,MAAAA,KAAK,EAAE;AADoB,KAAD,CAJvB;AAOLE,IAAAA,UAAU,EAAEX,eAAe,CAAC;AAC1BS,MAAAA,KAAK,EAAE;AADmB,KAAD,CAPtB;AAULG,IAAAA,QAAQ,EAAEhB,gBAAgB,CAAC;AACzBa,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAD,CAVrB;AAcLJ,IAAAA,KAAK,EAAEX,cAAc,CAAC;AACpBW,MAAAA,KAAK,EAAE;AADa,KAAD,CAdhB;AAiBLK,IAAAA,QAAQ,EAAEf,oBAAoB,CAAC;AAC7BU,MAAAA,KAAK,EAAE,UADsB;AAE7BL,MAAAA,WAAW,EAAE;AAFgB,KAAD,CAjBzB;AAqBLW,IAAAA,IAAI,EAAElB,cAAc;AArBf;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion Group\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.deprecated,\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.ts"],"names":["COMPONENT_TYPES","createIconProp","createTextProp","createColorProp","SEED_DATA","name","tag","description","category","
|
|
1
|
+
{"version":3,"sources":["AccordionItem.ts"],"names":["COMPONENT_TYPES","createIconProp","createTextProp","createColorProp","SEED_DATA","name","tag","description","category","deprecated","props","icon","label","iconColor"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,cAHF,EAIEC,eAJF,QAKO,iBALP;AAOA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,gBADiB;AAEvBC,EAAAA,GAAG,EAAE,eAFkB;AAGvBC,EAAAA,WAAW,EAAE,8BAHU;AAIvBC,EAAAA,QAAQ,EAAER,eAAe,CAACS,UAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAEV,cAAc,EADf;AAELW,IAAAA,KAAK,EAAEV,cAAc,CAAC;AACpBU,MAAAA,KAAK,EAAE;AADa,KAAD,CAFhB;AAKLC,IAAAA,SAAS,EAAEV,eAAe,CAAC;AACzBS,MAAAA,KAAK,EAAE;AADkB,KAAD;AALrB;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createIconProp,\n createTextProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion Item\",\n tag: \"AccordionItem\",\n description: \"Item to be used in Accordion\",\n category: COMPONENT_TYPES.deprecated,\n props: {\n icon: createIconProp(),\n label: createTextProp({\n label: \"Item label\",\n }),\n iconColor: createColorProp({\n label: \"Icon color\",\n }),\n },\n};\n"]}
|
|
@@ -25,7 +25,6 @@ export { default as TextField } from "./components/TextField";
|
|
|
25
25
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
26
26
|
export { default as Touchable } from "./components/Touchable";
|
|
27
27
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
28
|
-
export { default as LinearGradient } from "./components/LinearGradient";
|
|
29
28
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
|
30
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
31
30
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
declare type Props = {
|
|
4
|
-
color1: string;
|
|
5
|
-
color2: string;
|
|
6
|
-
color3: string;
|
|
7
|
-
startX: number;
|
|
8
|
-
startY: number;
|
|
9
|
-
endX: number;
|
|
10
|
-
endY: number;
|
|
11
|
-
children?: any;
|
|
12
|
-
style?: StyleProp<ViewStyle>;
|
|
13
|
-
};
|
|
14
|
-
declare const LinearGradientComp: ({ children, color1, color2, color3, startX, startY, endX, endY, style, }: Props) => JSX.Element;
|
|
15
|
-
export default LinearGradientComp;
|
|
16
1
|
export declare const SEED_DATA: {
|
|
17
2
|
name: string;
|
|
18
3
|
tag: string;
|
|
19
4
|
description: string;
|
|
5
|
+
category: string;
|
|
20
6
|
props: {
|
|
21
|
-
|
|
7
|
+
openColor: {
|
|
22
8
|
group: string;
|
|
23
9
|
label: string;
|
|
24
10
|
description: string;
|
|
@@ -28,7 +14,7 @@ export declare const SEED_DATA: {
|
|
|
28
14
|
formType: string;
|
|
29
15
|
propType: string;
|
|
30
16
|
};
|
|
31
|
-
|
|
17
|
+
closedColor: {
|
|
32
18
|
group: string;
|
|
33
19
|
label: string;
|
|
34
20
|
description: string;
|
|
@@ -38,7 +24,7 @@ export declare const SEED_DATA: {
|
|
|
38
24
|
formType: string;
|
|
39
25
|
propType: string;
|
|
40
26
|
};
|
|
41
|
-
|
|
27
|
+
caretColor: {
|
|
42
28
|
group: string;
|
|
43
29
|
label: string;
|
|
44
30
|
description: string;
|
|
@@ -48,61 +34,37 @@ export declare const SEED_DATA: {
|
|
|
48
34
|
formType: string;
|
|
49
35
|
propType: string;
|
|
50
36
|
};
|
|
51
|
-
|
|
52
|
-
group: string;
|
|
37
|
+
iconSize: {
|
|
53
38
|
label: string;
|
|
54
39
|
description: string;
|
|
55
|
-
editable: boolean;
|
|
56
|
-
required: boolean;
|
|
57
|
-
defaultValue: number;
|
|
58
|
-
min: number;
|
|
59
|
-
max: number;
|
|
60
|
-
step: number;
|
|
61
|
-
precision: number;
|
|
62
40
|
formType: string;
|
|
63
41
|
propType: string;
|
|
64
|
-
};
|
|
65
|
-
startY: {
|
|
66
42
|
group: string;
|
|
67
|
-
|
|
68
|
-
description: string;
|
|
43
|
+
defaultValue: null;
|
|
69
44
|
editable: boolean;
|
|
70
45
|
required: boolean;
|
|
71
|
-
defaultValue: number;
|
|
72
|
-
min: number;
|
|
73
|
-
max: number;
|
|
74
46
|
step: number;
|
|
75
|
-
precision: number;
|
|
76
|
-
formType: string;
|
|
77
|
-
propType: string;
|
|
78
47
|
};
|
|
79
|
-
|
|
80
|
-
|
|
48
|
+
label: any;
|
|
49
|
+
expanded: {
|
|
81
50
|
label: string;
|
|
82
51
|
description: string;
|
|
83
|
-
editable: boolean;
|
|
84
|
-
required: boolean;
|
|
85
|
-
defaultValue: number;
|
|
86
|
-
min: number;
|
|
87
|
-
max: number;
|
|
88
|
-
step: number;
|
|
89
|
-
precision: number;
|
|
90
52
|
formType: string;
|
|
91
53
|
propType: string;
|
|
92
|
-
|
|
93
|
-
|
|
54
|
+
defaultValue: boolean;
|
|
55
|
+
editable: boolean;
|
|
56
|
+
required: boolean;
|
|
94
57
|
group: string;
|
|
58
|
+
};
|
|
59
|
+
icon: {
|
|
95
60
|
label: string;
|
|
96
61
|
description: string;
|
|
97
|
-
editable: boolean;
|
|
98
|
-
required: boolean;
|
|
99
|
-
defaultValue: number;
|
|
100
|
-
min: number;
|
|
101
|
-
max: number;
|
|
102
|
-
step: number;
|
|
103
|
-
precision: number;
|
|
104
62
|
formType: string;
|
|
105
63
|
propType: string;
|
|
64
|
+
defaultValue: string;
|
|
65
|
+
required: boolean;
|
|
66
|
+
editable: boolean;
|
|
67
|
+
group: string;
|
|
106
68
|
};
|
|
107
69
|
};
|
|
108
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.2.5-
|
|
3
|
+
"version": "43.2.5-cc755f.3+cc755f65",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"color": "^3.1.2",
|
|
50
50
|
"date-fns": "^2.16.1",
|
|
51
51
|
"dateformat": "^3.0.3",
|
|
52
|
-
"expo-linear-gradient": "^9.2.0",
|
|
53
52
|
"lodash.isnumber": "^3.0.3",
|
|
54
53
|
"lodash.omit": "^4.5.0",
|
|
55
54
|
"lodash.tonumber": "^4.0.3",
|
|
@@ -80,5 +79,5 @@
|
|
|
80
79
|
]
|
|
81
80
|
]
|
|
82
81
|
},
|
|
83
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "cc755f653573e534efa0a16eb087132ddbb53454"
|
|
84
83
|
}
|
|
@@ -29,18 +29,7 @@ const AccordionGroup = ({ Icon, openColor, closedColor, caretColor, icon, iconSi
|
|
|
29
29
|
React.createElement(Icon, { name: expanded
|
|
30
30
|
? "MaterialIcons/keyboard-arrow-up"
|
|
31
31
|
: "MaterialIcons/keyboard-arrow-down", color: caretColor, size: 24 })))),
|
|
32
|
-
expandedInternal
|
|
33
|
-
? React.Children.map(children, (child) => {
|
|
34
|
-
if (React.isValidElement(child) &&
|
|
35
|
-
!child.props.left &&
|
|
36
|
-
!child.props.right) {
|
|
37
|
-
return React.cloneElement(child, {
|
|
38
|
-
style: child.props.style,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return child;
|
|
42
|
-
})
|
|
43
|
-
: null));
|
|
32
|
+
expandedInternal ? children : null));
|
|
44
33
|
};
|
|
45
34
|
const styles = StyleSheet.create({
|
|
46
35
|
row: {
|
|
@@ -97,21 +97,7 @@ const AccordionGroup = ({
|
|
|
97
97
|
</View>
|
|
98
98
|
</View>
|
|
99
99
|
</Pressable>
|
|
100
|
-
{expandedInternal
|
|
101
|
-
? React.Children.map(children, (child) => {
|
|
102
|
-
if (
|
|
103
|
-
React.isValidElement(child) &&
|
|
104
|
-
!child.props.left &&
|
|
105
|
-
!child.props.right
|
|
106
|
-
) {
|
|
107
|
-
return React.cloneElement(child, {
|
|
108
|
-
style: child.props.style,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return child;
|
|
113
|
-
})
|
|
114
|
-
: null}
|
|
100
|
+
{expandedInternal ? children : null}
|
|
115
101
|
</>
|
|
116
102
|
);
|
|
117
103
|
};
|
package/src/index.js
CHANGED
|
@@ -25,7 +25,6 @@ export { default as TextField } from "./components/TextField";
|
|
|
25
25
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
26
26
|
export { default as Touchable } from "./components/Touchable";
|
|
27
27
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
28
|
-
export { default as LinearGradient } from "./components/LinearGradient";
|
|
29
28
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
|
|
30
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
31
30
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
package/src/index.tsx
CHANGED
|
@@ -26,7 +26,6 @@ export { default as TextField } from "./components/TextField";
|
|
|
26
26
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
27
27
|
export { default as Touchable } from "./components/Touchable";
|
|
28
28
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
29
|
-
export { default as LinearGradient } from "./components/LinearGradient";
|
|
30
29
|
export {
|
|
31
30
|
ActionSheet,
|
|
32
31
|
ActionSheetItem,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createNumberProp, createIconProp, createTextProp, createStaticBoolProp, createColorProp, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Accordion",
|
|
4
|
+
tag: "AccordionGroup",
|
|
5
|
+
description: "An expandable container containing components",
|
|
6
|
+
category: COMPONENT_TYPES.container,
|
|
7
|
+
props: {
|
|
8
|
+
openColor: createColorProp({
|
|
9
|
+
label: "Open text color",
|
|
10
|
+
}),
|
|
11
|
+
closedColor: createColorProp({
|
|
12
|
+
label: "Closed text Color",
|
|
13
|
+
}),
|
|
14
|
+
caretColor: createColorProp({
|
|
15
|
+
label: "Caret color",
|
|
16
|
+
}),
|
|
17
|
+
iconSize: createNumberProp({
|
|
18
|
+
label: "Icon size",
|
|
19
|
+
defaultValue: 24,
|
|
20
|
+
}),
|
|
21
|
+
label: createTextProp({
|
|
22
|
+
label: "Label",
|
|
23
|
+
}),
|
|
24
|
+
expanded: createStaticBoolProp({
|
|
25
|
+
label: "Expanded",
|
|
26
|
+
description: "Whether the AccordionGroup should be expanded or not",
|
|
27
|
+
}),
|
|
28
|
+
icon: createIconProp(),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createNumberProp,
|
|
4
|
+
createIconProp,
|
|
5
|
+
createTextProp,
|
|
6
|
+
createStaticBoolProp,
|
|
7
|
+
createColorProp,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
export const SEED_DATA = {
|
|
11
|
+
name: "Accordion",
|
|
12
|
+
tag: "AccordionGroup",
|
|
13
|
+
description: "An expandable container containing components",
|
|
14
|
+
category: COMPONENT_TYPES.container,
|
|
15
|
+
props: {
|
|
16
|
+
openColor: createColorProp({
|
|
17
|
+
label: "Open text color",
|
|
18
|
+
}),
|
|
19
|
+
closedColor: createColorProp({
|
|
20
|
+
label: "Closed text Color",
|
|
21
|
+
}),
|
|
22
|
+
caretColor: createColorProp({
|
|
23
|
+
label: "Caret color",
|
|
24
|
+
}),
|
|
25
|
+
iconSize: createNumberProp({
|
|
26
|
+
label: "Icon size",
|
|
27
|
+
defaultValue: 24,
|
|
28
|
+
}),
|
|
29
|
+
label: createTextProp({
|
|
30
|
+
label: "Label",
|
|
31
|
+
}),
|
|
32
|
+
expanded: createStaticBoolProp({
|
|
33
|
+
label: "Expanded",
|
|
34
|
+
description: "Whether the AccordionGroup should be expanded or not",
|
|
35
|
+
}),
|
|
36
|
+
icon: createIconProp(),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -3,7 +3,7 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Accordion Group",
|
|
4
4
|
tag: "AccordionGroup",
|
|
5
5
|
description: "An expandable container containing components",
|
|
6
|
-
category: COMPONENT_TYPES.
|
|
6
|
+
category: COMPONENT_TYPES.deprecated,
|
|
7
7
|
props: {
|
|
8
8
|
openColor: createColorProp({
|
|
9
9
|
label: "Open text color",
|
|
@@ -11,7 +11,7 @@ export const SEED_DATA = {
|
|
|
11
11
|
name: "Accordion Group",
|
|
12
12
|
tag: "AccordionGroup",
|
|
13
13
|
description: "An expandable container containing components",
|
|
14
|
-
category: COMPONENT_TYPES.
|
|
14
|
+
category: COMPONENT_TYPES.deprecated,
|
|
15
15
|
props: {
|
|
16
16
|
openColor: createColorProp({
|
|
17
17
|
label: "Open text color",
|
|
@@ -9,7 +9,7 @@ export const SEED_DATA = {
|
|
|
9
9
|
name: "Accordion Item",
|
|
10
10
|
tag: "AccordionItem",
|
|
11
11
|
description: "Item to be used in Accordion",
|
|
12
|
-
category: COMPONENT_TYPES.
|
|
12
|
+
category: COMPONENT_TYPES.deprecated,
|
|
13
13
|
props: {
|
|
14
14
|
icon: createIconProp(),
|
|
15
15
|
label: createTextProp({
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.SEED_DATA = void 0;
|
|
7
|
-
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _expoLinearGradient = require("expo-linear-gradient");
|
|
11
|
-
|
|
12
|
-
var _utilities = require("../utilities");
|
|
13
|
-
|
|
14
|
-
var _types = require("@draftbit/types");
|
|
15
|
-
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
const LinearGradientComp = _ref => {
|
|
21
|
-
let {
|
|
22
|
-
children,
|
|
23
|
-
color1,
|
|
24
|
-
color2,
|
|
25
|
-
color3,
|
|
26
|
-
startX = 0,
|
|
27
|
-
startY = 0,
|
|
28
|
-
endX = 100,
|
|
29
|
-
endY = 100,
|
|
30
|
-
style
|
|
31
|
-
} = _ref;
|
|
32
|
-
const {
|
|
33
|
-
viewStyles
|
|
34
|
-
} = (0, _utilities.extractStyles)(style);
|
|
35
|
-
const colors = [color1, color2, color3].filter(color => !!color);
|
|
36
|
-
const start = {
|
|
37
|
-
x: startX / 100,
|
|
38
|
-
y: startY / 100
|
|
39
|
-
};
|
|
40
|
-
const end = {
|
|
41
|
-
x: endX / 100,
|
|
42
|
-
y: endY / 100
|
|
43
|
-
};
|
|
44
|
-
return /*#__PURE__*/React.createElement(_expoLinearGradient.LinearGradient, {
|
|
45
|
-
colors: colors,
|
|
46
|
-
start: start,
|
|
47
|
-
end: end,
|
|
48
|
-
style: viewStyles
|
|
49
|
-
}, children);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var _default = LinearGradientComp;
|
|
53
|
-
exports.default = _default;
|
|
54
|
-
const SEED_DATA = {
|
|
55
|
-
name: "LinearGradient",
|
|
56
|
-
tag: "LinearGradient",
|
|
57
|
-
description: "Linear Gradient Component",
|
|
58
|
-
props: {
|
|
59
|
-
color1: (0, _types.createColorProp)({
|
|
60
|
-
label: "Color 1"
|
|
61
|
-
}),
|
|
62
|
-
color2: (0, _types.createColorProp)({
|
|
63
|
-
label: "Color 2"
|
|
64
|
-
}),
|
|
65
|
-
color3: (0, _types.createColorProp)({
|
|
66
|
-
label: "Color 3"
|
|
67
|
-
}),
|
|
68
|
-
startX: {
|
|
69
|
-
group: _types.GROUPS.basic,
|
|
70
|
-
label: "Start X",
|
|
71
|
-
description: "Start position from Left",
|
|
72
|
-
editable: true,
|
|
73
|
-
required: false,
|
|
74
|
-
defaultValue: 0,
|
|
75
|
-
min: 0,
|
|
76
|
-
max: 100,
|
|
77
|
-
step: 1,
|
|
78
|
-
precision: 0,
|
|
79
|
-
formType: _types.FORM_TYPES.number,
|
|
80
|
-
propType: _types.PROP_TYPES.NUMBER
|
|
81
|
-
},
|
|
82
|
-
startY: {
|
|
83
|
-
group: _types.GROUPS.basic,
|
|
84
|
-
label: "Start Y",
|
|
85
|
-
description: "Start position from Top",
|
|
86
|
-
editable: true,
|
|
87
|
-
required: false,
|
|
88
|
-
defaultValue: 0,
|
|
89
|
-
min: 0,
|
|
90
|
-
max: 100,
|
|
91
|
-
step: 1,
|
|
92
|
-
precision: 0,
|
|
93
|
-
formType: _types.FORM_TYPES.number,
|
|
94
|
-
propType: _types.PROP_TYPES.NUMBER
|
|
95
|
-
},
|
|
96
|
-
endX: {
|
|
97
|
-
group: _types.GROUPS.basic,
|
|
98
|
-
label: "End Y",
|
|
99
|
-
description: "End position from Right",
|
|
100
|
-
editable: true,
|
|
101
|
-
required: false,
|
|
102
|
-
defaultValue: 100,
|
|
103
|
-
min: 0,
|
|
104
|
-
max: 100,
|
|
105
|
-
step: 1,
|
|
106
|
-
precision: 0,
|
|
107
|
-
formType: _types.FORM_TYPES.number,
|
|
108
|
-
propType: _types.PROP_TYPES.NUMBER
|
|
109
|
-
},
|
|
110
|
-
endY: {
|
|
111
|
-
group: _types.GROUPS.basic,
|
|
112
|
-
label: "End Y",
|
|
113
|
-
description: "End position from Bottom",
|
|
114
|
-
editable: true,
|
|
115
|
-
required: false,
|
|
116
|
-
defaultValue: 100,
|
|
117
|
-
min: 0,
|
|
118
|
-
max: 100,
|
|
119
|
-
step: 1,
|
|
120
|
-
precision: 0,
|
|
121
|
-
formType: _types.FORM_TYPES.number,
|
|
122
|
-
propType: _types.PROP_TYPES.NUMBER
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
exports.SEED_DATA = SEED_DATA;
|
|
127
|
-
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["LinearGradient.tsx"],"names":["LinearGradientComp","children","color1","color2","color3","startX","startY","endX","endY","style","viewStyles","colors","filter","color","start","x","y","end","SEED_DATA","name","tag","description","props","label","group","GROUPS","basic","editable","required","defaultValue","min","max","step","precision","formType","FORM_TYPES","number","propType","PROP_TYPES","NUMBER"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;;;;;AAmBA,MAAMA,kBAAkB,GAAG,QAUd;AAAA,MAVe;AAC1BC,IAAAA,QAD0B;AAE1BC,IAAAA,MAF0B;AAG1BC,IAAAA,MAH0B;AAI1BC,IAAAA,MAJ0B;AAK1BC,IAAAA,MAAM,GAAG,CALiB;AAM1BC,IAAAA,MAAM,GAAG,CANiB;AAO1BC,IAAAA,IAAI,GAAG,GAPmB;AAQ1BC,IAAAA,IAAI,GAAG,GARmB;AAS1BC,IAAAA;AAT0B,GAUf;AACX,QAAM;AAAEC,IAAAA;AAAF,MAAiB,8BAAcD,KAAd,CAAvB;AACA,QAAME,MAAM,GAAG,CAACT,MAAD,EAASC,MAAT,EAAiBC,MAAjB,EAAyBQ,MAAzB,CAAiCC,KAAD,IAAmB,CAAC,CAACA,KAArD,CAAf;AACA,QAAMC,KAAK,GAAG;AAAEC,IAAAA,CAAC,EAAEV,MAAM,GAAG,GAAd;AAAmBW,IAAAA,CAAC,EAAEV,MAAM,GAAG;AAA/B,GAAd;AACA,QAAMW,GAAG,GAAG;AAAEF,IAAAA,CAAC,EAAER,IAAI,GAAG,GAAZ;AAAiBS,IAAAA,CAAC,EAAER,IAAI,GAAG;AAA3B,GAAZ;AACA,sBAC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native\";\nimport { LinearGradient } from \"expo-linear-gradient\";\nimport { extractStyles } from \"../utilities\";\nimport {\n createColorProp,\n FORM_TYPES,\n GROUPS,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\ntype Props = {\n color1: string;\n color2: string;\n color3: string;\n startX: number;\n startY: number;\n endX: number;\n endY: number;\n children?: any;\n style?: StyleProp<ViewStyle>;\n};\n\nconst LinearGradientComp = ({\n children,\n color1,\n color2,\n color3,\n startX = 0,\n startY = 0,\n endX = 100,\n endY = 100,\n style,\n}: Props) => {\n const { viewStyles } = extractStyles(style);\n const colors = [color1, color2, color3].filter((color: string) => !!color);\n const start = { x: startX / 100, y: startY / 100 };\n const end = { x: endX / 100, y: endY / 100 };\n return (\n <LinearGradient colors={colors} start={start} end={end} style={viewStyles}>\n {children}\n </LinearGradient>\n );\n};\n\nexport default LinearGradientComp;\n\nexport const SEED_DATA = {\n name: \"LinearGradient\",\n tag: \"LinearGradient\",\n description: \"Linear Gradient Component\",\n props: {\n color1: createColorProp({\n label: \"Color 1\",\n }),\n color2: createColorProp({\n label: \"Color 2\",\n }),\n color3: createColorProp({\n label: \"Color 3\",\n }),\n startX: {\n group: GROUPS.basic,\n label: \"Start X\",\n description: \"Start position from Left\",\n editable: true,\n required: false,\n defaultValue: 0,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n startY: {\n group: GROUPS.basic,\n label: \"Start Y\",\n description: \"Start position from Top\",\n editable: true,\n required: false,\n defaultValue: 0,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n endX: {\n group: GROUPS.basic,\n label: \"End Y\",\n description: \"End position from Right\",\n editable: true,\n required: false,\n defaultValue: 100,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n endY: {\n group: GROUPS.basic,\n label: \"End Y\",\n description: \"End position from Bottom\",\n editable: true,\n required: false,\n defaultValue: 100,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n },\n};\n"]}
|