@draftbit/core 43.4.2 → 43.4.3-6076c5.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/lib/commonjs/index.js +0 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/FieldSearchBarFull.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/FieldSearchBarFull.js +1 -1
- package/lib/module/mappings/FieldSearchBarFull.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/index.js +0 -1
- package/src/index.tsx +0 -1
- package/lib/commonjs/components/LinearGradient.js +0 -52
- package/lib/commonjs/components/LinearGradient.js.map +0 -1
- package/lib/module/components/LinearGradient.js +0 -38
- package/lib/module/components/LinearGradient.js.map +0 -1
- package/lib/typescript/src/components/LinearGradient.d.ts +0 -15
- package/src/components/LinearGradient.js +0 -11
- package/src/components/LinearGradient.tsx +0 -40
package/lib/commonjs/index.js
CHANGED
|
@@ -201,12 +201,6 @@ Object.defineProperty(exports, "Image", {
|
|
|
201
201
|
return _Image.default;
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
|
-
Object.defineProperty(exports, "LinearGradient", {
|
|
205
|
-
enumerable: true,
|
|
206
|
-
get: function () {
|
|
207
|
-
return _LinearGradient.default;
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
204
|
Object.defineProperty(exports, "Link", {
|
|
211
205
|
enumerable: true,
|
|
212
206
|
get: function () {
|
|
@@ -458,8 +452,6 @@ var _Touchable = _interopRequireDefault(require("./components/Touchable"));
|
|
|
458
452
|
|
|
459
453
|
var _Accordion = require("./components/Accordion");
|
|
460
454
|
|
|
461
|
-
var _LinearGradient = _interopRequireDefault(require("./components/LinearGradient"));
|
|
462
|
-
|
|
463
455
|
var _ActionSheet = require("./components/ActionSheet");
|
|
464
456
|
|
|
465
457
|
var _Swiper = require("./components/Swiper");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AASA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FieldSearchBarFull.
|
|
1
|
+
{"version":3,"sources":["FieldSearchBarFull.js"],"names":["React","View","TextInput","StyleSheet","withTheme","Config","FieldSearchBarFull","showIcon","Icon","icon","placeholder","style","theme","colors","typography","onChange","changeOverride","onSubmit","submitOverride","value","defaultValue","focused","setIsFocused","useState","onBlur","internalValue","setInternalValue","useEffect","useCallback","text","onFocus","e","lineHeight","typeStyles","body2","handleChangeText","newValue","createElement","styles","container","name","size","fieldSearchBarFullIconSize","color","primary","light","marginLeft","flex","clearButtonMode","onChangeText","onSubmitEditing","placeholderTextColor","medium","create","flexDirection","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,SAAf,EAA0BC,UAA1B,QAA6C,cAA7C;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AACA,MAAMC,kBAAkB,GAAG,QAA2K;AAAA,MAA1K;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,IAAZ;AAAkBC,IAAAA,IAAI,GAAG,QAAzB;AAAmCC,IAAAA,WAAW,GAAG,EAAjD;AAAqDC,IAAAA,KAArD;AAA4DC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAnE;AAA2FC,IAAAA,QAAQ,EAAEC,cAArG;AAAqHC,IAAAA,QAAQ,EAAEC,cAA/H;AAA+IC,IAAAA,KAA/I;AAAsJC,IAAAA;AAAtJ,GAA0K;AAClM,QAAM,CAACC,OAAD,EAAUC,YAAV,IAA0BtB,KAAK,CAACuB,QAAN,CAAe,KAAf,CA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["import * as React from \"react\";\nimport { View, TextInput, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst FieldSearchBarFull = ({ showIcon, Icon, icon = \"search\", placeholder = \"\", style, theme: { colors, typography }, onChange: changeOverride, onSubmit: submitOverride, value, defaultValue, }) => {\n const [focused, setIsFocused] = React.useState(false);\n const onBlur = () => {\n setIsFocused(false);\n };\n const [internalValue, setInternalValue] = React.useState(value || defaultValue);\n React.useEffect(() => {\n if (value != null) {\n setInternalValue(value);\n }\n }, [value]);\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n const onChange = React.useCallback((text) => {\n changeOverride && changeOverride(text);\n }, [changeOverride]);\n const onFocus = () => {\n setIsFocused(true);\n };\n const onSubmit = (e) => {\n submitOverride && submitOverride(e);\n };\n const { lineHeight, ...typeStyles } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars\n const handleChangeText = (newValue) => {\n setInternalValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n };\n return (React.createElement(View, { style: [styles.container, style] },\n showIcon && (React.createElement(Icon, { name: icon, size: Config.fieldSearchBarFullIconSize, color: focused ? colors.primary : colors.light })),\n React.createElement(View, { style: { marginLeft: showIcon ? 12 : 0, flex: 1 } },\n React.createElement(TextInput, { clearButtonMode: \"while-editing\", placeholder: placeholder, value: internalValue, onBlur: onBlur, onFocus: onFocus, onChangeText: handleChangeText, onSubmitEditing: onSubmit, placeholderTextColor: colors.light, style: [\n {\n color: colors.medium,\n },\n typeStyles,\n ] }))));\n};\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n});\nexport default withTheme(FieldSearchBarFull);\n"]}
|
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,YA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BC,UAAjB,QAAmC,qBAAnC;AAEA,SACEC,MADF,EAEEC,MAFF,EAGEC,MAHF,EAIEC,GAJF,EAKEC,KALF,EAMEC,MANF,QAOO,qBAPP;AASA,SACEC,WADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,qBAJF,QAKO,gCALP;AAOA;;AACA,SAAS7C,OAAO,IAAI8C,MAApB,QAAkC,+BAAlC;AACA,SAAS9C,OAAO,IAAI+C,SAApB,QAAqC,wBAArC;AACA,SAAS/C,OAAO,IAAIgD,aAApB,QAAyC,4BAAzC;AACA,SAAShD,OAAO,IAAIiD,mBAApB,QAA+C,kCAA/C;AACA,SAASjD,OAAO,IAAIkD,UAApB,QAAsC,yBAAtC;AACA,SAASlD,OAAO,IAAImD,UAApB,QAAsC,oCAAtC;AACA,SAASnD,OAAO,IAAIoD,WAApB,QAAuC,0BAAvC;AACA,SAASpD,OAAO,IAAIqD,YAApB,QAAwC,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"]}
|
|
@@ -7,7 +7,6 @@ export const SEED_DATA = [{
|
|
|
7
7
|
preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
|
|
8
8
|
supports_list_render: false,
|
|
9
9
|
triggers: [Triggers.OnChange],
|
|
10
|
-
// TODO Triggers.OnSubmit for multiple triggers
|
|
11
10
|
props: {
|
|
12
11
|
icon: {
|
|
13
12
|
group: GROUPS.basic,
|
|
@@ -45,4 +44,5 @@ export const SEED_DATA = [{
|
|
|
45
44
|
},
|
|
46
45
|
layout: {}
|
|
47
46
|
}];
|
|
47
|
+
//# sourceMappingURL=FieldSearchBarFull.js.map}];
|
|
48
48
|
//# sourceMappingURL=FieldSearchBarFull.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FieldSearchBarFull.
|
|
1
|
+
{"version":3,"sources":["FieldSearchBarFull.js"],"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","FIELD_NAME","Triggers","SEED_DATA","name","tag","description","category","input","preview_image_url","supports_list_render","triggers","OnChange","props","icon","group","basic","label","formType","propType","ASSET","defaultValue","editable","required","placeholder","string","STRING","onSubmit","action","fieldName","layout"],"mappings":"AAAA,SAASA,MAAT,EAAiBC,eAAjB,EAAkCC,UAAlC,EAA8CC,UAA9C,EAA0DC,UAA1D,EAAsEC,QAAtE,QAAuF,iBAAvF;AACA,OAAO,MAAMC,SAAS,GAAG,CAC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,CAAC6B,MANf;AAONT,MAAAA,QAAQ,EAAEnB,UAAU,CAAC0B,MAPf;AAQNL,MAAAA,YAAY,EAAE;AARR,KArBP;AA+BHQ,IAAAA,SAAS,EAAE,EACP,GAAG5B,UADI;AAEPoB,MAAAA,YAAY,EAAE;AAFP;AA/BR,GARX;AA4CIS,EAAAA,MAAM,EAAE;AA5CZ,CADqB,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = [\n {\n name: \"Search Bar\",\n tag: \"FieldSearchBarFull\",\n description: \"A search bar with accompanying search icon and clear button.\",\n category: COMPONENT_TYPES.input,\n preview_image_url: \"{CLOUDINARY_URL}/Field_SearchBar_Full.png\",\n supports_list_render: false,\n triggers: [Triggers.OnChange],\n props: {\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Left icon to display\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n placeholder: {\n group: GROUPS.basic,\n label: \"Placeholder\",\n description: \"Input placeholder text\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Search for...\",\n editable: true,\n required: false,\n },\n onSubmit: {\n group: GROUPS.basic,\n label: \"Submit action\",\n description: \"Action to execute on submission\",\n editable: true,\n required: false,\n formType: FORM_TYPES.action,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n fieldName: {\n ...FIELD_NAME,\n defaultValue: \"searchBarValue\",\n },\n },\n layout: {},\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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.4.
|
|
3
|
+
"version": "43.4.3-6076c5.0+6076c57c",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "6076c57cd8412eacf91392b8ea57e075961b0741"
|
|
84
84
|
}
|
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,
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = 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
|
-
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); }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
const LinearGradientComponent = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
color1,
|
|
22
|
-
color2,
|
|
23
|
-
color3 = undefined,
|
|
24
|
-
startX = 0,
|
|
25
|
-
startY = 0,
|
|
26
|
-
endX = 100,
|
|
27
|
-
endY = 100,
|
|
28
|
-
style
|
|
29
|
-
} = _ref;
|
|
30
|
-
const {
|
|
31
|
-
viewStyles
|
|
32
|
-
} = (0, _utilities.extractStyles)(style);
|
|
33
|
-
const colors = [color1, color2, color3].filter(color => color);
|
|
34
|
-
const start = {
|
|
35
|
-
x: startX / 100,
|
|
36
|
-
y: startY / 100
|
|
37
|
-
};
|
|
38
|
-
const end = {
|
|
39
|
-
x: endX / 100,
|
|
40
|
-
y: endY / 100
|
|
41
|
-
};
|
|
42
|
-
return /*#__PURE__*/React.createElement(_expoLinearGradient.LinearGradient, {
|
|
43
|
-
colors: colors,
|
|
44
|
-
start: start,
|
|
45
|
-
end: end,
|
|
46
|
-
style: viewStyles
|
|
47
|
-
}, children);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var _default = LinearGradientComponent;
|
|
51
|
-
exports.default = _default;
|
|
52
|
-
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["LinearGradient.tsx"],"names":["LinearGradientComponent","children","color1","color2","color3","undefined","startX","startY","endX","endY","style","viewStyles","colors","filter","color","start","x","y","end"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;;;AAcA,MAAMA,uBAAuB,GAAG,QAUI;AAAA,MAVH;AAC/BC,IAAAA,QAD+B;AAE/BC,IAAAA,MAF+B;AAG/BC,IAAAA,MAH+B;AAI/BC,IAAAA,MAAM,GAAGC,SAJsB;AAK/BC,IAAAA,MAAM,GAAG,CALsB;AAM/BC,IAAAA,MAAM,GAAG,CANsB;AAO/BC,IAAAA,IAAI,GAAG,GAPwB;AAQ/BC,IAAAA,IAAI,GAAG,GARwB;AAS/BC,IAAAA;AAT+B,GAUG;AAClC,QAAM;AAAEC,IAAAA;AAAF,MAAiB,8BAAcD,KAAd,CAAvB;AACA,QAAME,MAAM,GAAG,CAACV,MAAD,EAASC,MAAT,EAAiBC,MAAjB,EAAyBS,MAAzB,CAAiCC,KAAD,IAAWA,KAA3C,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,sBACE,oBAAC,kCAAD;AAAgB,IAAA,MAAM,EAAEG,MAAxB;AAAgC,IAAA,KAAK,EAAEG,KAAvC;AAA8C,IAAA,GAAG,EAAEG,GAAnD;AAAwD,IAAA,KAAK,EAAEP;AAA/D,KACGV,QADH,CADF;AAKD,CApBD;;eAsBeD,uB","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport { LinearGradient } from \"expo-linear-gradient\";\nimport { extractStyles } from \"../utilities\";\n\ntype LinearGradientComponentProps = {\n color1: string;\n color2: string;\n color3?: string;\n startX: number;\n startY: number;\n endX: number;\n endY: number;\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst LinearGradientComponent = ({\n children,\n color1,\n color2,\n color3 = undefined,\n startX = 0,\n startY = 0,\n endX = 100,\n endY = 100,\n style,\n}: LinearGradientComponentProps) => {\n const { viewStyles } = extractStyles(style);\n const colors = [color1, color2, color3].filter((color) => color) as string[];\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 LinearGradientComponent;\n"]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
|
|
5
|
-
const LinearGradientComponent = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
children,
|
|
8
|
-
color1,
|
|
9
|
-
color2,
|
|
10
|
-
color3 = undefined,
|
|
11
|
-
startX = 0,
|
|
12
|
-
startY = 0,
|
|
13
|
-
endX = 100,
|
|
14
|
-
endY = 100,
|
|
15
|
-
style
|
|
16
|
-
} = _ref;
|
|
17
|
-
const {
|
|
18
|
-
viewStyles
|
|
19
|
-
} = extractStyles(style);
|
|
20
|
-
const colors = [color1, color2, color3].filter(color => color);
|
|
21
|
-
const start = {
|
|
22
|
-
x: startX / 100,
|
|
23
|
-
y: startY / 100
|
|
24
|
-
};
|
|
25
|
-
const end = {
|
|
26
|
-
x: endX / 100,
|
|
27
|
-
y: endY / 100
|
|
28
|
-
};
|
|
29
|
-
return /*#__PURE__*/React.createElement(LinearGradient, {
|
|
30
|
-
colors: colors,
|
|
31
|
-
start: start,
|
|
32
|
-
end: end,
|
|
33
|
-
style: viewStyles
|
|
34
|
-
}, children);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default LinearGradientComponent;
|
|
38
|
-
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["LinearGradient.tsx"],"names":["React","LinearGradient","extractStyles","LinearGradientComponent","children","color1","color2","color3","undefined","startX","startY","endX","endY","style","viewStyles","colors","filter","color","start","x","y","end"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SAASC,cAAT,QAA+B,sBAA/B;AACA,SAASC,aAAT,QAA8B,cAA9B;;AAcA,MAAMC,uBAAuB,GAAG,QAUI;AAAA,MAVH;AAC/BC,IAAAA,QAD+B;AAE/BC,IAAAA,MAF+B;AAG/BC,IAAAA,MAH+B;AAI/BC,IAAAA,MAAM,GAAGC,SAJsB;AAK/BC,IAAAA,MAAM,GAAG,CALsB;AAM/BC,IAAAA,MAAM,GAAG,CANsB;AAO/BC,IAAAA,IAAI,GAAG,GAPwB;AAQ/BC,IAAAA,IAAI,GAAG,GARwB;AAS/BC,IAAAA;AAT+B,GAUG;AAClC,QAAM;AAAEC,IAAAA;AAAF,MAAiBZ,aAAa,CAACW,KAAD,CAApC;AACA,QAAME,MAAM,GAAG,CAACV,MAAD,EAASC,MAAT,EAAiBC,MAAjB,EAAyBS,MAAzB,CAAiCC,KAAD,IAAWA,KAA3C,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,sBACE,oBAAC,cAAD;AAAgB,IAAA,MAAM,EAAEG,MAAxB;AAAgC,IAAA,KAAK,EAAEG,KAAvC;AAA8C,IAAA,GAAG,EAAEG,GAAnD;AAAwD,IAAA,KAAK,EAAEP;AAA/D,KACGV,QADH,CADF;AAKD,CApBD;;AAsBA,eAAeD,uBAAf","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport { LinearGradient } from \"expo-linear-gradient\";\nimport { extractStyles } from \"../utilities\";\n\ntype LinearGradientComponentProps = {\n color1: string;\n color2: string;\n color3?: string;\n startX: number;\n startY: number;\n endX: number;\n endY: number;\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst LinearGradientComponent = ({\n children,\n color1,\n color2,\n color3 = undefined,\n startX = 0,\n startY = 0,\n endX = 100,\n endY = 100,\n style,\n}: LinearGradientComponentProps) => {\n const { viewStyles } = extractStyles(style);\n const colors = [color1, color2, color3].filter((color) => color) as string[];\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 LinearGradientComponent;\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
declare type LinearGradientComponentProps = {
|
|
4
|
-
color1: string;
|
|
5
|
-
color2: string;
|
|
6
|
-
color3?: string;
|
|
7
|
-
startX: number;
|
|
8
|
-
startY: number;
|
|
9
|
-
endX: number;
|
|
10
|
-
endY: number;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
style?: StyleProp<ViewStyle>;
|
|
13
|
-
};
|
|
14
|
-
declare const LinearGradientComponent: ({ children, color1, color2, color3, startX, startY, endX, endY, style, }: LinearGradientComponentProps) => JSX.Element;
|
|
15
|
-
export default LinearGradientComponent;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
const LinearGradientComponent = ({ children, color1, color2, color3 = undefined, startX = 0, startY = 0, endX = 100, endY = 100, style, }) => {
|
|
5
|
-
const { viewStyles } = extractStyles(style);
|
|
6
|
-
const colors = [color1, color2, color3].filter((color) => color);
|
|
7
|
-
const start = { x: startX / 100, y: startY / 100 };
|
|
8
|
-
const end = { x: endX / 100, y: endY / 100 };
|
|
9
|
-
return (React.createElement(LinearGradient, { colors: colors, start: start, end: end, style: viewStyles }, children));
|
|
10
|
-
};
|
|
11
|
-
export default LinearGradientComponent;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
4
|
-
import { extractStyles } from "../utilities";
|
|
5
|
-
|
|
6
|
-
type LinearGradientComponentProps = {
|
|
7
|
-
color1: string;
|
|
8
|
-
color2: string;
|
|
9
|
-
color3?: string;
|
|
10
|
-
startX: number;
|
|
11
|
-
startY: number;
|
|
12
|
-
endX: number;
|
|
13
|
-
endY: number;
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
style?: StyleProp<ViewStyle>;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const LinearGradientComponent = ({
|
|
19
|
-
children,
|
|
20
|
-
color1,
|
|
21
|
-
color2,
|
|
22
|
-
color3 = undefined,
|
|
23
|
-
startX = 0,
|
|
24
|
-
startY = 0,
|
|
25
|
-
endX = 100,
|
|
26
|
-
endY = 100,
|
|
27
|
-
style,
|
|
28
|
-
}: LinearGradientComponentProps) => {
|
|
29
|
-
const { viewStyles } = extractStyles(style);
|
|
30
|
-
const colors = [color1, color2, color3].filter((color) => color) as string[];
|
|
31
|
-
const start = { x: startX / 100, y: startY / 100 };
|
|
32
|
-
const end = { x: endX / 100, y: endY / 100 };
|
|
33
|
-
return (
|
|
34
|
-
<LinearGradient colors={colors} start={start} end={end} style={viewStyles}>
|
|
35
|
-
{children}
|
|
36
|
-
</LinearGradient>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default LinearGradientComponent;
|