@draftbit/core 43.2.5-7c0f30.3 → 43.2.5-9da576.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/Text.js +1 -1
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/index.js +0 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/RowBodyIcon.js.map +1 -1
- package/lib/module/components/Text.js +1 -1
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/package.json +2 -3
- package/src/components/Text.js +1 -1
- package/src/components/Text.tsx +1 -1
- package/src/index.js +0 -1
- package/src/index.tsx +0 -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/lib/typescript/src/components/LinearGradient.d.ts +0 -108
- package/src/components/LinearGradient.js +0 -84
- package/src/components/LinearGradient.tsx +0 -119
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Text.tsx"],"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,iBAAD,eACMJ,IADN;AAEE,MAAA,GAAG,EAAGK,CAAD,IAAO;AACV,aAAKR,KAAL,GAAaQ,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEJ,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6BnC,MAAMQ,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBR,IAAAA,KADuB;AAEvBS,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGR;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAES,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,
|
|
1
|
+
{"version":3,"sources":["Text.tsx"],"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,iBAAD,eACMJ,IADN;AAEE,MAAA,GAAG,EAAGK,CAAD,IAAO;AACV,aAAKR,KAAL,GAAaQ,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEJ,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6BnC,MAAMQ,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBR,IAAAA,KADuB;AAEvBS,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGR;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAES,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,EAA2Dd,KAA3D,CAFT;AAGE,IAAA,KAAK,EAAES;AAHT,KAIMP,KAJN,GAMGQ,KANH,CADF;AAUD,CAhBM;;;AAkBP,MAAMK,IAAS,GAAG,wBAAUP,QAAV,CAAlB;;;eAGe,wBAAUf,IAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager, TextProps } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n theme: Theme;\n} & TextProps;\n\nclass Text extends React.Component<Props> {\n _root: any;\n\n setNativeProps(args: TextProps) {\n return this._root && this._root.setNativeProps(args);\n }\n\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n\n return (\n <NativeText\n {...rest}\n ref={(c) => {\n this._root = c;\n }}\n style={[\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ]}\n />\n );\n }\n}\n\nexport const BaseLink = ({\n style,\n theme,\n title,\n ...props\n}: any): JSX.Element => {\n return (\n <Text\n hitSlop={8}\n style={[{ color: theme.colors.primary, alignSelf: \"flex-start\" }, style]}\n theme={theme}\n {...props}\n >\n {title}\n </Text>\n );\n};\n\nconst Link: any = withTheme(BaseLink);\nexport { Link };\n\nexport default withTheme(Text);\n"]}
|
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":["RowBodyIcon.
|
|
1
|
+
{"version":3,"sources":["RowBodyIcon.tsx"],"names":["React","withTheme","Row","Config","RowBodyIcon","Icon","title","subtitle","icon","style","theme","colors","typography","body1","medium","subtitle2","light","rowSingleLineIconSize","marginLeft"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAIA,OAAOC,GAAP,MAAgB,OAAhB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAWA,MAAMC,WAA4B,GAAG,QAO/B;AAAA,MAPgC;AACpCC,IAAAA,IADoC;AAEpCC,IAAAA,KAFoC;AAGpCC,IAAAA,QAHoC;AAIpCC,IAAAA,IAJoC;AAKpCC,IAAAA,KALoC;AAMpCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAN6B,GAOhC;AACJ,sBACE,oBAAC,GAAD;AACE,IAAA,cAAc,EAAEA,UAAU,CAACC,KAD7B;AAEE,IAAA,UAAU,EAAEF,MAAM,CAACG,MAFrB;AAGE,IAAA,iBAAiB,EAAEF,UAAU,CAACG,SAHhC;AAIE,IAAA,aAAa,EAAEJ,MAAM,CAACK,KAJxB;AAKE,IAAA,KAAK,EAAEV,KALT;AAME,IAAA,QAAQ,EAAEC,QANZ;AAOE,IAAA,KAAK,EAAE,mBACL,oBAAC,IAAD;AACE,MAAA,IAAI,EAAEC,IADR;AAEE,MAAA,IAAI,EAAEL,MAAM,CAACc,qBAFf;AAGE,MAAA,KAAK,EAAEN,MAAM,CAACK,KAHhB;AAIE,MAAA,KAAK,EAAE;AAAEE,QAAAA,UAAU,EAAE;AAAd;AAJT,MARJ;AAeE,IAAA,KAAK,EAAET;AAfT,IADF;AAmBD,CA3BD;;AA6BA,eAAeR,SAAS,CAACG,WAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Row from \"./Row\";\nimport Config from \"./Config\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title?: string;\n subtitle?: string;\n icon: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst RowBodyIcon: React.FC<Props> = ({\n Icon,\n title,\n subtitle,\n icon,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Row\n titleTypeStyle={typography.body1}\n titleColor={colors.medium}\n subtitleTypeStyle={typography.subtitle2}\n subtitleColor={colors.light}\n title={title}\n subtitle={subtitle}\n right={() => (\n <Icon\n name={icon}\n size={Config.rowSingleLineIconSize}\n color={colors.light}\n style={{ marginLeft: 16 }}\n />\n )}\n style={style}\n />\n );\n};\n\nexport default withTheme(RowBodyIcon);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Text.tsx"],"names":["React","Text","NativeText","I18nManager","withTheme","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAI,IAAIC,UAAjB,EAA6BC,WAA7B,QAA2D,cAA3D;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAOA,MAAMH,IAAN,SAAmBD,KAAK,CAACK,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGV,WAAW,CAACW,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,UAAD,eACMH,IADN;AAEE,MAAA,GAAG,EAAGI,CAAD,IAAO;AACV,aAAKP,KAAL,GAAaO,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEH,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6B1C,OAAO,MAAMO,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBP,IAAAA,KADuB;AAEvBQ,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGP;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAEQ,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,
|
|
1
|
+
{"version":3,"sources":["Text.tsx"],"names":["React","Text","NativeText","I18nManager","withTheme","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAI,IAAIC,UAAjB,EAA6BC,WAA7B,QAA2D,cAA3D;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAOA,MAAMH,IAAN,SAAmBD,KAAK,CAACK,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGV,WAAW,CAACW,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,UAAD,eACMH,IADN;AAEE,MAAA,GAAG,EAAGI,CAAD,IAAO;AACV,aAAKP,KAAL,GAAaO,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEH,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6B1C,OAAO,MAAMO,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBP,IAAAA,KADuB;AAEvBQ,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGP;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAEQ,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,EAA2Db,KAA3D,CAFT;AAGE,IAAA,KAAK,EAAEQ;AAHT,KAIMN,KAJN,GAMGO,KANH,CADF;AAUD,CAhBM;AAkBP,MAAMK,IAAS,GAAGpB,SAAS,CAACa,QAAD,CAA3B;AACA,SAASO,IAAT;AAEA,eAAepB,SAAS,CAACH,IAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager, TextProps } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n theme: Theme;\n} & TextProps;\n\nclass Text extends React.Component<Props> {\n _root: any;\n\n setNativeProps(args: TextProps) {\n return this._root && this._root.setNativeProps(args);\n }\n\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n\n return (\n <NativeText\n {...rest}\n ref={(c) => {\n this._root = c;\n }}\n style={[\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ]}\n />\n );\n }\n}\n\nexport const BaseLink = ({\n style,\n theme,\n title,\n ...props\n}: any): JSX.Element => {\n return (\n <Text\n hitSlop={8}\n style={[{ color: theme.colors.primary, alignSelf: \"flex-start\" }, style]}\n theme={theme}\n {...props}\n >\n {title}\n </Text>\n );\n};\n\nconst Link: any = withTheme(BaseLink);\nexport { Link };\n\nexport default withTheme(Text);\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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AAiBC,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"]}
|
|
@@ -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.2.5-
|
|
3
|
+
"version": "43.2.5-9da576.3+9da57663",
|
|
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": "9da5766312aeb29c4b43fa8294292dfd730de35e"
|
|
84
83
|
}
|
package/src/components/Text.js
CHANGED
|
@@ -21,7 +21,7 @@ class Text extends React.Component {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
export const BaseLink = ({ style, theme, title, ...props }) => {
|
|
24
|
-
return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary, alignSelf: "
|
|
24
|
+
return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary, alignSelf: "flex-start" }, style], theme: theme, ...props }, title));
|
|
25
25
|
};
|
|
26
26
|
const Link = withTheme(BaseLink);
|
|
27
27
|
export { Link };
|
package/src/components/Text.tsx
CHANGED
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,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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AY,EAAE,GANV;AAOJC,MAAAA,GAAG,EAAE,CAPD;AAQJC,MAAAA,GAAG,EAAE,GARD;AASJC,MAAAA,IAAI,EAAE,CATF;AAUJC,MAAAA,SAAS,EAAE,CAVP;AAWJC,MAAAA,QAAQ,EAAEC,kBAAWC,MAXjB;AAYJC,MAAAA,QAAQ,EAAEC,kBAAWC;AAZjB,KAtCD;AAoDL/B,IAAAA,IAAI,EAAE;AACJgB,MAAAA,KAAK,EAAEC,cAAOC,KADV;AAEJH,MAAAA,KAAK,EAAE,OAFH;AAGJF,MAAAA,WAAW,EAAE,0BAHT;AAIJM,MAAAA,QAAQ,EAAE,IAJN;AAKJC,MAAAA,QAAQ,EAAE,KALN;AAMJC,MAAAA,YAAY,EAAE,GANV;AAOJC,MAAAA,GAAG,EAAE,CAPD;AAQJC,MAAAA,GAAG,EAAE,GARD;AASJC,MAAAA,IAAI,EAAE,CATF;AAUJC,MAAAA,SAAS,EAAE,CAVP;AAWJC,MAAAA,QAAQ,EAAEC,kBAAWC,MAXjB;AAYJC,MAAAA,QAAQ,EAAEC,kBAAWC;AAZjB;AApDD;AAJgB,CAAlB","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-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"]}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
import { createColorProp, FORM_TYPES, GROUPS, PROP_TYPES } from "@draftbit/types";
|
|
5
|
-
|
|
6
|
-
const LinearGradientComp = _ref => {
|
|
7
|
-
let {
|
|
8
|
-
children,
|
|
9
|
-
color1,
|
|
10
|
-
color2,
|
|
11
|
-
color3,
|
|
12
|
-
startX = 0,
|
|
13
|
-
startY = 0,
|
|
14
|
-
endX = 100,
|
|
15
|
-
endY = 100,
|
|
16
|
-
style
|
|
17
|
-
} = _ref;
|
|
18
|
-
const {
|
|
19
|
-
viewStyles
|
|
20
|
-
} = extractStyles(style);
|
|
21
|
-
const colors = [color1, color2, color3].filter(color => !!color);
|
|
22
|
-
const start = {
|
|
23
|
-
x: startX / 100,
|
|
24
|
-
y: startY / 100
|
|
25
|
-
};
|
|
26
|
-
const end = {
|
|
27
|
-
x: endX / 100,
|
|
28
|
-
y: endY / 100
|
|
29
|
-
};
|
|
30
|
-
return /*#__PURE__*/React.createElement(LinearGradient, {
|
|
31
|
-
colors: colors,
|
|
32
|
-
start: start,
|
|
33
|
-
end: end,
|
|
34
|
-
style: viewStyles
|
|
35
|
-
}, children);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default LinearGradientComp;
|
|
39
|
-
export const SEED_DATA = {
|
|
40
|
-
name: "LinearGradient",
|
|
41
|
-
tag: "LinearGradient",
|
|
42
|
-
description: "Linear Gradient Component",
|
|
43
|
-
props: {
|
|
44
|
-
color1: createColorProp({
|
|
45
|
-
label: "Color 1"
|
|
46
|
-
}),
|
|
47
|
-
color2: createColorProp({
|
|
48
|
-
label: "Color 2"
|
|
49
|
-
}),
|
|
50
|
-
color3: createColorProp({
|
|
51
|
-
label: "Color 3"
|
|
52
|
-
}),
|
|
53
|
-
startX: {
|
|
54
|
-
group: GROUPS.basic,
|
|
55
|
-
label: "Start X",
|
|
56
|
-
description: "Start position from Left",
|
|
57
|
-
editable: true,
|
|
58
|
-
required: false,
|
|
59
|
-
defaultValue: 0,
|
|
60
|
-
min: 0,
|
|
61
|
-
max: 100,
|
|
62
|
-
step: 1,
|
|
63
|
-
precision: 0,
|
|
64
|
-
formType: FORM_TYPES.number,
|
|
65
|
-
propType: PROP_TYPES.NUMBER
|
|
66
|
-
},
|
|
67
|
-
startY: {
|
|
68
|
-
group: GROUPS.basic,
|
|
69
|
-
label: "Start Y",
|
|
70
|
-
description: "Start position from Top",
|
|
71
|
-
editable: true,
|
|
72
|
-
required: false,
|
|
73
|
-
defaultValue: 0,
|
|
74
|
-
min: 0,
|
|
75
|
-
max: 100,
|
|
76
|
-
step: 1,
|
|
77
|
-
precision: 0,
|
|
78
|
-
formType: FORM_TYPES.number,
|
|
79
|
-
propType: PROP_TYPES.NUMBER
|
|
80
|
-
},
|
|
81
|
-
endX: {
|
|
82
|
-
group: GROUPS.basic,
|
|
83
|
-
label: "End Y",
|
|
84
|
-
description: "End position from Right",
|
|
85
|
-
editable: true,
|
|
86
|
-
required: false,
|
|
87
|
-
defaultValue: 100,
|
|
88
|
-
min: 0,
|
|
89
|
-
max: 100,
|
|
90
|
-
step: 1,
|
|
91
|
-
precision: 0,
|
|
92
|
-
formType: FORM_TYPES.number,
|
|
93
|
-
propType: PROP_TYPES.NUMBER
|
|
94
|
-
},
|
|
95
|
-
endY: {
|
|
96
|
-
group: GROUPS.basic,
|
|
97
|
-
label: "End Y",
|
|
98
|
-
description: "End position from Bottom",
|
|
99
|
-
editable: true,
|
|
100
|
-
required: false,
|
|
101
|
-
defaultValue: 100,
|
|
102
|
-
min: 0,
|
|
103
|
-
max: 100,
|
|
104
|
-
step: 1,
|
|
105
|
-
precision: 0,
|
|
106
|
-
formType: FORM_TYPES.number,
|
|
107
|
-
propType: PROP_TYPES.NUMBER
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["LinearGradient.tsx"],"names":["React","LinearGradient","extractStyles","createColorProp","FORM_TYPES","GROUPS","PROP_TYPES","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","basic","editable","required","defaultValue","min","max","step","precision","formType","number","propType","NUMBER"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OA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A,IAAI,EAAE;AACJiB,MAAAA,KAAK,EAAE1B,MAAM,CAAC2B,KADV;AAEJF,MAAAA,KAAK,EAAE,OAFH;AAGJF,MAAAA,WAAW,EAAE,yBAHT;AAIJK,MAAAA,QAAQ,EAAE,IAJN;AAKJC,MAAAA,QAAQ,EAAE,KALN;AAMJC,MAAAA,YAAY,EAAE,GANV;AAOJC,MAAAA,GAAG,EAAE,CAPD;AAQJC,MAAAA,GAAG,EAAE,GARD;AASJC,MAAAA,IAAI,EAAE,CATF;AAUJC,MAAAA,SAAS,EAAE,CAVP;AAWJC,MAAAA,QAAQ,EAAEpC,UAAU,CAACqC,MAXjB;AAYJC,MAAAA,QAAQ,EAAEpC,UAAU,CAACqC;AAZjB,KAtCD;AAoDL5B,IAAAA,IAAI,EAAE;AACJgB,MAAAA,KAAK,EAAE1B,MAAM,CAAC2B,KADV;AAEJF,MAAAA,KAAK,EAAE,OAFH;AAGJF,MAAAA,WAAW,EAAE,0BAHT;AAIJK,MAAAA,QAAQ,EAAE,IAJN;AAKJC,MAAAA,QAAQ,EAAE,KALN;AAMJC,MAAAA,YAAY,EAAE,GANV;AAOJC,MAAAA,GAAG,EAAE,CAPD;AAQJC,MAAAA,GAAG,EAAE,GARD;AASJC,MAAAA,IAAI,EAAE,CATF;AAUJC,MAAAA,SAAS,EAAE,CAVP;AAWJC,MAAAA,QAAQ,EAAEpC,UAAU,CAACqC,MAXjB;AAYJC,MAAAA,QAAQ,EAAEpC,UAAU,CAACqC;AAZjB;AApDD;AAJgB,CAAlB","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-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"]}
|
|
@@ -1,108 +0,0 @@
|
|
|
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
|
-
export declare const SEED_DATA: {
|
|
17
|
-
name: string;
|
|
18
|
-
tag: string;
|
|
19
|
-
description: string;
|
|
20
|
-
props: {
|
|
21
|
-
color1: {
|
|
22
|
-
group: string;
|
|
23
|
-
label: string;
|
|
24
|
-
description: string;
|
|
25
|
-
editable: boolean;
|
|
26
|
-
required: boolean;
|
|
27
|
-
defaultValue: null;
|
|
28
|
-
formType: string;
|
|
29
|
-
propType: string;
|
|
30
|
-
};
|
|
31
|
-
color2: {
|
|
32
|
-
group: string;
|
|
33
|
-
label: string;
|
|
34
|
-
description: string;
|
|
35
|
-
editable: boolean;
|
|
36
|
-
required: boolean;
|
|
37
|
-
defaultValue: null;
|
|
38
|
-
formType: string;
|
|
39
|
-
propType: string;
|
|
40
|
-
};
|
|
41
|
-
color3: {
|
|
42
|
-
group: string;
|
|
43
|
-
label: string;
|
|
44
|
-
description: string;
|
|
45
|
-
editable: boolean;
|
|
46
|
-
required: boolean;
|
|
47
|
-
defaultValue: null;
|
|
48
|
-
formType: string;
|
|
49
|
-
propType: string;
|
|
50
|
-
};
|
|
51
|
-
startX: {
|
|
52
|
-
group: string;
|
|
53
|
-
label: string;
|
|
54
|
-
description: string;
|
|
55
|
-
editable: boolean;
|
|
56
|
-
required: boolean;
|
|
57
|
-
defaultValue: number;
|
|
58
|
-
min: number;
|
|
59
|
-
max: number;
|
|
60
|
-
step: number;
|
|
61
|
-
precision: number;
|
|
62
|
-
formType: string;
|
|
63
|
-
propType: string;
|
|
64
|
-
};
|
|
65
|
-
startY: {
|
|
66
|
-
group: string;
|
|
67
|
-
label: string;
|
|
68
|
-
description: string;
|
|
69
|
-
editable: boolean;
|
|
70
|
-
required: boolean;
|
|
71
|
-
defaultValue: number;
|
|
72
|
-
min: number;
|
|
73
|
-
max: number;
|
|
74
|
-
step: number;
|
|
75
|
-
precision: number;
|
|
76
|
-
formType: string;
|
|
77
|
-
propType: string;
|
|
78
|
-
};
|
|
79
|
-
endX: {
|
|
80
|
-
group: string;
|
|
81
|
-
label: string;
|
|
82
|
-
description: string;
|
|
83
|
-
editable: boolean;
|
|
84
|
-
required: boolean;
|
|
85
|
-
defaultValue: number;
|
|
86
|
-
min: number;
|
|
87
|
-
max: number;
|
|
88
|
-
step: number;
|
|
89
|
-
precision: number;
|
|
90
|
-
formType: string;
|
|
91
|
-
propType: string;
|
|
92
|
-
};
|
|
93
|
-
endY: {
|
|
94
|
-
group: string;
|
|
95
|
-
label: string;
|
|
96
|
-
description: string;
|
|
97
|
-
editable: boolean;
|
|
98
|
-
required: boolean;
|
|
99
|
-
defaultValue: number;
|
|
100
|
-
min: number;
|
|
101
|
-
max: number;
|
|
102
|
-
step: number;
|
|
103
|
-
precision: number;
|
|
104
|
-
formType: string;
|
|
105
|
-
propType: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
import { createColorProp, FORM_TYPES, GROUPS, PROP_TYPES, } from "@draftbit/types";
|
|
5
|
-
const LinearGradientComp = ({ children, color1, color2, color3, startX = 0, startY = 0, endX = 100, endY = 100, style, }) => {
|
|
6
|
-
const { viewStyles } = extractStyles(style);
|
|
7
|
-
const colors = [color1, color2, color3].filter((color) => !!color);
|
|
8
|
-
const start = { x: startX / 100, y: startY / 100 };
|
|
9
|
-
const end = { x: endX / 100, y: endY / 100 };
|
|
10
|
-
return (React.createElement(LinearGradient, { colors: colors, start: start, end: end, style: viewStyles }, children));
|
|
11
|
-
};
|
|
12
|
-
export default LinearGradientComp;
|
|
13
|
-
export const SEED_DATA = {
|
|
14
|
-
name: "LinearGradient",
|
|
15
|
-
tag: "LinearGradient",
|
|
16
|
-
description: "Linear Gradient Component",
|
|
17
|
-
props: {
|
|
18
|
-
color1: createColorProp({
|
|
19
|
-
label: "Color 1",
|
|
20
|
-
}),
|
|
21
|
-
color2: createColorProp({
|
|
22
|
-
label: "Color 2",
|
|
23
|
-
}),
|
|
24
|
-
color3: createColorProp({
|
|
25
|
-
label: "Color 3",
|
|
26
|
-
}),
|
|
27
|
-
startX: {
|
|
28
|
-
group: GROUPS.basic,
|
|
29
|
-
label: "Start X",
|
|
30
|
-
description: "Start position from Left",
|
|
31
|
-
editable: true,
|
|
32
|
-
required: false,
|
|
33
|
-
defaultValue: 0,
|
|
34
|
-
min: 0,
|
|
35
|
-
max: 100,
|
|
36
|
-
step: 1,
|
|
37
|
-
precision: 0,
|
|
38
|
-
formType: FORM_TYPES.number,
|
|
39
|
-
propType: PROP_TYPES.NUMBER,
|
|
40
|
-
},
|
|
41
|
-
startY: {
|
|
42
|
-
group: GROUPS.basic,
|
|
43
|
-
label: "Start Y",
|
|
44
|
-
description: "Start position from Top",
|
|
45
|
-
editable: true,
|
|
46
|
-
required: false,
|
|
47
|
-
defaultValue: 0,
|
|
48
|
-
min: 0,
|
|
49
|
-
max: 100,
|
|
50
|
-
step: 1,
|
|
51
|
-
precision: 0,
|
|
52
|
-
formType: FORM_TYPES.number,
|
|
53
|
-
propType: PROP_TYPES.NUMBER,
|
|
54
|
-
},
|
|
55
|
-
endX: {
|
|
56
|
-
group: GROUPS.basic,
|
|
57
|
-
label: "End Y",
|
|
58
|
-
description: "End position from Right",
|
|
59
|
-
editable: true,
|
|
60
|
-
required: false,
|
|
61
|
-
defaultValue: 100,
|
|
62
|
-
min: 0,
|
|
63
|
-
max: 100,
|
|
64
|
-
step: 1,
|
|
65
|
-
precision: 0,
|
|
66
|
-
formType: FORM_TYPES.number,
|
|
67
|
-
propType: PROP_TYPES.NUMBER,
|
|
68
|
-
},
|
|
69
|
-
endY: {
|
|
70
|
-
group: GROUPS.basic,
|
|
71
|
-
label: "End Y",
|
|
72
|
-
description: "End position from Bottom",
|
|
73
|
-
editable: true,
|
|
74
|
-
required: false,
|
|
75
|
-
defaultValue: 100,
|
|
76
|
-
min: 0,
|
|
77
|
-
max: 100,
|
|
78
|
-
step: 1,
|
|
79
|
-
precision: 0,
|
|
80
|
-
formType: FORM_TYPES.number,
|
|
81
|
-
propType: PROP_TYPES.NUMBER,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
};
|
|
@@ -1,119 +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
|
-
import {
|
|
6
|
-
createColorProp,
|
|
7
|
-
FORM_TYPES,
|
|
8
|
-
GROUPS,
|
|
9
|
-
PROP_TYPES,
|
|
10
|
-
} from "@draftbit/types";
|
|
11
|
-
|
|
12
|
-
type Props = {
|
|
13
|
-
color1: string;
|
|
14
|
-
color2: string;
|
|
15
|
-
color3: string;
|
|
16
|
-
startX: number;
|
|
17
|
-
startY: number;
|
|
18
|
-
endX: number;
|
|
19
|
-
endY: number;
|
|
20
|
-
children?: any;
|
|
21
|
-
style?: StyleProp<ViewStyle>;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const LinearGradientComp = ({
|
|
25
|
-
children,
|
|
26
|
-
color1,
|
|
27
|
-
color2,
|
|
28
|
-
color3,
|
|
29
|
-
startX = 0,
|
|
30
|
-
startY = 0,
|
|
31
|
-
endX = 100,
|
|
32
|
-
endY = 100,
|
|
33
|
-
style,
|
|
34
|
-
}: Props) => {
|
|
35
|
-
const { viewStyles } = extractStyles(style);
|
|
36
|
-
const colors = [color1, color2, color3].filter((color: string) => !!color);
|
|
37
|
-
const start = { x: startX / 100, y: startY / 100 };
|
|
38
|
-
const end = { x: endX / 100, y: endY / 100 };
|
|
39
|
-
return (
|
|
40
|
-
<LinearGradient colors={colors} start={start} end={end} style={viewStyles}>
|
|
41
|
-
{children}
|
|
42
|
-
</LinearGradient>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default LinearGradientComp;
|
|
47
|
-
|
|
48
|
-
export const SEED_DATA = {
|
|
49
|
-
name: "LinearGradient",
|
|
50
|
-
tag: "LinearGradient",
|
|
51
|
-
description: "Linear Gradient Component",
|
|
52
|
-
props: {
|
|
53
|
-
color1: createColorProp({
|
|
54
|
-
label: "Color 1",
|
|
55
|
-
}),
|
|
56
|
-
color2: createColorProp({
|
|
57
|
-
label: "Color 2",
|
|
58
|
-
}),
|
|
59
|
-
color3: createColorProp({
|
|
60
|
-
label: "Color 3",
|
|
61
|
-
}),
|
|
62
|
-
startX: {
|
|
63
|
-
group: GROUPS.basic,
|
|
64
|
-
label: "Start X",
|
|
65
|
-
description: "Start position from Left",
|
|
66
|
-
editable: true,
|
|
67
|
-
required: false,
|
|
68
|
-
defaultValue: 0,
|
|
69
|
-
min: 0,
|
|
70
|
-
max: 100,
|
|
71
|
-
step: 1,
|
|
72
|
-
precision: 0,
|
|
73
|
-
formType: FORM_TYPES.number,
|
|
74
|
-
propType: PROP_TYPES.NUMBER,
|
|
75
|
-
},
|
|
76
|
-
startY: {
|
|
77
|
-
group: GROUPS.basic,
|
|
78
|
-
label: "Start Y",
|
|
79
|
-
description: "Start position from Top",
|
|
80
|
-
editable: true,
|
|
81
|
-
required: false,
|
|
82
|
-
defaultValue: 0,
|
|
83
|
-
min: 0,
|
|
84
|
-
max: 100,
|
|
85
|
-
step: 1,
|
|
86
|
-
precision: 0,
|
|
87
|
-
formType: FORM_TYPES.number,
|
|
88
|
-
propType: PROP_TYPES.NUMBER,
|
|
89
|
-
},
|
|
90
|
-
endX: {
|
|
91
|
-
group: GROUPS.basic,
|
|
92
|
-
label: "End Y",
|
|
93
|
-
description: "End position from Right",
|
|
94
|
-
editable: true,
|
|
95
|
-
required: false,
|
|
96
|
-
defaultValue: 100,
|
|
97
|
-
min: 0,
|
|
98
|
-
max: 100,
|
|
99
|
-
step: 1,
|
|
100
|
-
precision: 0,
|
|
101
|
-
formType: FORM_TYPES.number,
|
|
102
|
-
propType: PROP_TYPES.NUMBER,
|
|
103
|
-
},
|
|
104
|
-
endY: {
|
|
105
|
-
group: GROUPS.basic,
|
|
106
|
-
label: "End Y",
|
|
107
|
-
description: "End position from Bottom",
|
|
108
|
-
editable: true,
|
|
109
|
-
required: false,
|
|
110
|
-
defaultValue: 100,
|
|
111
|
-
min: 0,
|
|
112
|
-
max: 100,
|
|
113
|
-
step: 1,
|
|
114
|
-
precision: 0,
|
|
115
|
-
formType: FORM_TYPES.number,
|
|
116
|
-
propType: PROP_TYPES.NUMBER,
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
};
|