@draftbit/core 43.6.1-3d1384.1 → 43.6.1-81b417.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressIndicator.tsx"],"names":["ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAqBA,MAAMA,iBAAkC,GAAG,QAerC;AAAA,MAfsC;AAC1CC,IAAAA,aAD0C;AAE1CC,IAAAA,WAF0C;AAG1CC,IAAAA,sBAAsB,GAAG,CAHiB;AAI1CC,IAAAA,sBAAsB,GAAG,SAJiB;AAK1CC,IAAAA,iBAL0C;AAM1CC,IAAAA,wBAN0C;AAO1CC,IAAAA,yBAP0C;AAQ1CC,IAAAA,8BAR0C;AAS1CC,IAAAA,0BAA0B,GAAG,EATa;AAU1CC,IAAAA,uBAAuB,GAAG,eAVgB;AAW1CC,IAAAA,yBAAyB,GAAG,SAXc;AAY1CC,IAAAA,eAAe,GAAG,OAZwB;AAa1CC,IAAAA,aAAa,GAAG,SAb0B;AAc1CC,IAAAA;AAd0C,GAetC;AACJ,QAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;AACA,sBACE,oBAAC,sBAAD;AACE,IAAA,SAAS,EAAED,aADb;AAEE,IAAA,eAAe,EAAEc,eAFnB;AAGE,IAAA,YAAY,EAAE;AACZV,MAAAA,iBADY;AAEZC,MAAAA,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;AAKZW,MAAAA,uBAAuB,EAAEH,aALb;AAMZI,MAAAA,yBAAyB,EAAEL,eANf;AAOZM,MAAAA,sBAAsB,EAAEL,aAPZ;AAQZM,MAAAA,wBAAwB,EAAEP,eARd;AASZQ,MAAAA,0BAA0B,EAAEP,aAThB;AAUZQ,MAAAA,4BAA4B,EAAET,eAVlB;AAWZT,MAAAA,sBAXY;AAYZC,MAAAA,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;AAcZe,MAAAA,iCAAiC,EAAEX,yBAdvB;AAeZY,MAAAA,+BAA+B,EAAEb,uBAfrB;AAgBZH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;AAiBZJ,MAAAA,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;AAmBZF,MAAAA,0BAnBY;AAoBZe,MAAAA,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,KAAjB,CAAuBC;AApB5B;AAHhB,IADF;AA4BD,CA7CD;;eA+Ce,wBAAU3B,iBAAV,C","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<Props> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"]}
1
+ {"version":3,"sources":["ProgressIndicator.js"],"names":["ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","React","createElement","StepIndicator","stepCount","customStyles","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","step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C,EAAEhB,yBAb4E;AAc/GiB,MAAAA,+BAA+B,EAAElB,uBAd8E;AAe/GH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAfuD;AAgB/GJ,MAAAA,8BAA8B,EAAEA,8BAA8B,IAAIG,yBAhB6C;AAiB/GF,MAAAA,0BAjB+G;AAkB/GoB,MAAAA,eAAe,EAAEf,KAAK,CAACgB,UAAN,CAAiBC,KAAjB,CAAuBC;AAlBuE;AAA5E,GAAnC,CAAR;AAoBH,CAtBD;;eAuBe,wBAAUhC,iBAAV,C","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nconst ProgressIndicator = ({ numberOfSteps, currentStep, currentStepStrokeWidth = 3, stepStrokeCurrentColor = \"primary\", stepIndicatorSize, currentStepIndicatorSize, stepIndicatorCurrentColor, stepIndicatorLabelCurrentColor, stepIndicatorLabelFontSize = 12, stepNumberFinishedColor = \"strongInverse\", stepNumberUnfinishedColor = \"primary\", unfinishedColor = \"light\", finishedColor = \"primary\", theme, }) => {\n const currentPosition = currentStep - 1;\n return (React.createElement(StepIndicator, { stepCount: numberOfSteps, currentPosition: currentPosition, customStyles: {\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n } }));\n};\nexport default withTheme(ProgressIndicator);\n"]}
@@ -24,7 +24,8 @@ const SEED_DATA = {
24
24
  defaultValue: "Option"
25
25
  }),
26
26
  color: (0, _types.createColorProp)({
27
- label: "Font Color"
27
+ label: "Font Color",
28
+ defaultValue: "strong"
28
29
  })
29
30
  }
30
31
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["ActionSheetItem.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","label","group","GROUPS","basic","defaultValue","color"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,mBADiB;AAEvBC,EAAAA,GAAG,EAAE,iBAFkB;AAGvBC,EAAAA,WAAW,EAAE,mBAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALa;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,8BADJ;AAELC,IAAAA,KAAK,EAAE,2BAAe;AACpBC,MAAAA,KAAK,EAAEC,cAAOC,KADM;AAEpBH,MAAAA,KAAK,EAAE,OAFa;AAGpBI,MAAAA,YAAY,EAAE;AAHM,KAAf,CAFF;AAOLC,IAAAA,KAAK,EAAE,4BAAgB;AACrBL,MAAAA,KAAK,EAAE;AADc,KAAhB;AAPF;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createActionProp,\n createColorProp,\n createTextProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["ActionSheetItem.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","label","group","GROUPS","basic","defaultValue","color"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,mBADiB;AAEvBC,EAAAA,GAAG,EAAE,iBAFkB;AAGvBC,EAAAA,WAAW,EAAE,mBAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALa;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,8BADJ;AAELC,IAAAA,KAAK,EAAE,2BAAe;AACpBC,MAAAA,KAAK,EAAEC,cAAOC,KADM;AAEpBH,MAAAA,KAAK,EAAE,OAFa;AAGpBI,MAAAA,YAAY,EAAE;AAHM,KAAf,CAFF;AAOLC,IAAAA,KAAK,EAAE,4BAAgB;AACrBL,MAAAA,KAAK,EAAE,YADc;AAErBI,MAAAA,YAAY,EAAE;AAFO,KAAhB;AAPF;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createActionProp,\n createColorProp,\n createTextProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n defaultValue: \"strong\",\n }),\n },\n};\n"]}
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from "react";
4
2
  import { View, Text } from "react-native";
5
3
  import Image from "./Image";
@@ -25,10 +23,11 @@ const CardContainerShortImage = _ref => {
25
23
  onPress,
26
24
  ...rest
27
25
  } = _ref;
28
- return /*#__PURE__*/React.createElement(Card, _extends({
26
+ return /*#__PURE__*/React.createElement(Card, {
29
27
  style: style,
30
- onPress: onPress
31
- }, rest), /*#__PURE__*/React.createElement(Elevation, {
28
+ onPress: onPress,
29
+ ...rest
30
+ }, /*#__PURE__*/React.createElement(Elevation, {
32
31
  style: {
33
32
  elevation,
34
33
  borderRadius: roundness
@@ -76,5 +75,17 @@ const CardContainerShortImage = _ref => {
76
75
  }))));
77
76
  };
78
77
 
78
+ export default withTheme(CardContainerShortImage);
79
+ //# sourceMappingURL=CardContainerShortImage.js.map: null), mode === "right" && /*#__PURE__*/React.createElement(Image, {
80
+ style: {
81
+ aspectRatio
82
+ },
83
+ source: typeof image === "string" ? {
84
+ uri: image
85
+ } : image,
86
+ resizeMode: "cover"
87
+ }))));
88
+ };
89
+
79
90
  export default withTheme(CardContainerShortImage);
80
91
  //# sourceMappingURL=CardContainerShortImage.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["CardContainerShortImage.tsx"],"names":["React","View","Text","Image","Card","Elevation","withTheme","Config","CardContainerShortImage","image","squareImageUrl","title","subtitle","mode","aspectRatio","elevation","theme","colors","roundness","typography","style","onPress","rest","borderRadius","overflow","flexDirection","justifyContent","uri","padding","backgroundColor","surface","flex","headline5","color","strong","body2","medium","marginTop"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB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AA5B,GAA6CA,KAFvD;AAGE,IAAA,UAAU,EAAC;AAHb,IATJ,eAeE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE;AACLmB,MAAAA,OAAO,EAAE,EADJ;AAELC,MAAAA,eAAe,EAAEZ,MAAM,CAACa,OAFnB;AAGLC,MAAAA,IAAI,EAAE;AAHD;AADT,kBAOE,oBAAC,IAAD;AACE,IAAA,aAAa,EAAE,CADjB;AAEE,IAAA,KAAK,EAAE,CAACZ,UAAU,CAACa,SAAZ,EAAuB;AAAEC,MAAAA,KAAK,EAAEhB,MAAM,CAACiB;AAAhB,KAAvB;AAFT,KAIGvB,KAJH,CAPF,EAaGC,QAAQ,gBACP,oBAAC,IAAD;AACE,IAAA,aAAa,EAAE,CADjB;AAEE,IAAA,KAAK,EAAE,CACLO,UAAU,CAACgB,KADN,EAEL;AAAEF,MAAAA,KAAK,EAAEhB,MAAM,CAACmB,MAAhB;AAAwBC,MAAAA,SAAS,EAAE;AAAnC,KAFK;AAFT,KAOGzB,QAPH,CADO,GAUL,IAvBN,CAfF,EAwCGC,IAAI,KAAK,OAAT,iBACC,oBAAC,KAAD;AACE,IAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KADT;AAEE,IAAA,MAAM,EAAE,OAAOL,KAAP,KAAiB,QAAjB,GAA4B;AAAEkB,MAAAA,GAAG,EAAElB;AAAP,KAA5B,GAA6CA,KAFvD;AAGE,IAAA,UAAU,EAAC;AAHb,IAzCJ,CANF,CADF,CADF;AA2DD,CAvED;;AAyEA,eAAeH,SAAS,CAACE,uBAAD,CAAxB","sourcesContent":["import React from \"react\";\nimport {\n View,\n Text,\n ImageSourcePropType,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n subtitle?: string;\n mode?: \"right\" | \"left\";\n aspectRatio?: number;\n elevation?: number;\n theme: typeof theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n};\n\nconst CardContainerShortImage: React.FC<Props> = ({\n image = Config.squareImageUrl,\n title,\n subtitle,\n mode = \"left\",\n aspectRatio = 1,\n elevation = 2,\n theme: { colors, roundness, typography },\n style,\n onPress,\n ...rest\n}) => {\n return (\n <Card style={style} onPress={onPress} {...rest}>\n <Elevation\n style={{\n elevation,\n borderRadius: roundness,\n }}\n >\n <View\n style={{\n overflow: \"hidden\",\n flexDirection: \"row\",\n justifyContent: mode === \"right\" ? \"space-between\" : \"flex-start\",\n borderRadius: roundness,\n }}\n >\n {mode === \"left\" && (\n <Image\n style={{ aspectRatio }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n )}\n <View\n style={{\n padding: 16,\n backgroundColor: colors.surface,\n flex: 1,\n }}\n >\n <Text\n numberOfLines={1}\n style={[typography.headline5, { color: colors.strong }]}\n >\n {title}\n </Text>\n {subtitle ? (\n <Text\n numberOfLines={1}\n style={[\n typography.body2,\n { color: colors.medium, marginTop: 4 },\n ]}\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n {mode === \"right\" && (\n <Image\n style={{ aspectRatio }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n )}\n </View>\n </Elevation>\n </Card>\n );\n};\n\nexport default withTheme(CardContainerShortImage);\n"]}
1
+ {"version":3,"sources":["CardContainerShortImage.js"],"names":["React","View","Text","Image","Card","Elevation","withTheme","Config","CardContainerShortImage","image","squareImageUrl","title","subtitle","mode","aspectRatio","elevation","theme","colors","roundness","typography","style","onPress","rest","createElement","borderRadius","overflow","flexDirection","justifyContent","source","uri","resizeMode","padding","backgroundColor","surface","flex","numberOfLines","headline5","color","strong","body2","medium","marginTop"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC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pB;AAAP,KAA5B,GAA6CA,KAA/E;AAAsFqB,IAAAA,UAAU,EAAE;AAAlG,GAA3B,CAjBzB,CAJJ,CADI,CAAR;AAuBH,CAxBD;;AAyBA,eAAexB,SAAS,CAACE,uBAAD,CAAxB","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst CardContainerShortImage = ({ image = Config.squareImageUrl, title, subtitle, mode = \"left\", aspectRatio = 1, elevation = 2, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n return (React.createElement(Card, { style: style, onPress: onPress, ...rest },\n React.createElement(Elevation, { style: {\n elevation,\n borderRadius: roundness,\n } },\n React.createElement(View, { style: {\n overflow: \"hidden\",\n flexDirection: \"row\",\n justifyContent: mode === \"right\" ? \"space-between\" : \"flex-start\",\n borderRadius: roundness,\n } },\n mode === \"left\" && (React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" })),\n React.createElement(View, { style: {\n padding: 16,\n backgroundColor: colors.surface,\n flex: 1,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [typography.headline5, { color: colors.strong }] }, title),\n subtitle ? (React.createElement(Text, { numberOfLines: 1, style: [\n typography.body2,\n { color: colors.medium, marginTop: 4 },\n ] }, subtitle)) : null),\n mode === \"right\" && (React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }))))));\n};\nexport default withTheme(CardContainerShortImage);\n"]}
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  import * as React from "react";
2
4
  import { Switch as NativeSwitch } from "react-native";
3
5
  import { withTheme } from "../theming";
@@ -37,24 +39,23 @@ function Switch(_ref) {
37
39
  setChecked(Boolean(defaultValue));
38
40
  }
39
41
  }, [defaultValue, previousDefaultValue]);
40
- return /*#__PURE__*/React.createElement(NativeSwitch, {
42
+ return /*#__PURE__*/React.createElement(NativeSwitch, _extends({
41
43
  value: checked,
42
44
  disabled: disabled,
43
45
  trackColor: {
44
46
  false: inactiveTrackThemeColor,
45
47
  true: activeTrackThemeColor
46
48
  },
47
- thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
48
- // @ts-ignore react-native-web only
49
+ thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor // @ts-ignore react-native-web only
50
+ ,
49
51
  activeThumbColor: activeThumbThemeColor,
50
52
  ios_backgroundColor: inactiveTrackThemeColor,
51
53
  style: style,
52
54
  onValueChange: bool => {
53
55
  setChecked(bool);
54
56
  onValueChange && onValueChange(bool);
55
- },
56
- ...rest
57
- });
57
+ }
58
+ }, rest));
58
59
  }
59
60
 
60
61
  function Row(_ref2) {
@@ -84,7 +85,7 @@ function Row(_ref2) {
84
85
  setChecked(defaultValue);
85
86
  }
86
87
  }, [defaultValue]);
87
- return /*#__PURE__*/React.createElement(FormRow, {
88
+ return /*#__PURE__*/React.createElement(FormRow, _extends({
88
89
  disabled: disabled,
89
90
  onPress: () => {
90
91
  setChecked(!checked);
@@ -92,9 +93,8 @@ function Row(_ref2) {
92
93
  },
93
94
  label: label,
94
95
  direction: direction,
95
- style: style,
96
- ...rest
97
- }, /*#__PURE__*/React.createElement(Switch, {
96
+ style: style
97
+ }, rest), /*#__PURE__*/React.createElement(Switch, {
98
98
  theme: theme,
99
99
  value: checked,
100
100
  disabled: disabled,
@@ -106,17 +106,6 @@ function Row(_ref2) {
106
106
  }));
107
107
  }
108
108
 
109
- const SwitchRow = withTheme(Row);
110
- export { SwitchRow };
111
- export default withTheme(Switch);
112
- //# sourceMappingURL=Switch.js.mapueChange: onValueChange,
113
- activeTrackColor: activeTrackColor,
114
- inactiveTrackColor: inactiveTrackColor,
115
- activeThumbColor: activeThumbColor,
116
- inactiveThumbColor: inactiveThumbColor
117
- }));
118
- }
119
-
120
109
  const SwitchRow = withTheme(Row);
121
110
  export { SwitchRow };
122
111
  export default withTheme(Switch);
@@ -1 +1 @@
1
- {"version":3,"sources":["Switch.js"],"names":["React","Switch","NativeSwitch","withTheme","FormRow","RowDirection","usePrevious","value","defaultValue","disabled","onValueChange","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","theme","style","rest","activeTrackThemeColor","colors","primary","inactiveTrackThemeColor","activeThumbThemeColor","inactiveThumbThemeColor","checked","setChecked","useState","useEffect","previousDefaultValue","Boolean","createElement","trackColor","false","true","thumbColor","ios_backgroundColor","bool","Row","label","direction","onPress","SwitchRow"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAM,IAAIC,YAAnB,QAAwC,cAAxC;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,WAAT,QAA4B,UAA5B;;AACA,SAASL,MAAT,OAAqK;AAAA,MAArJ;AAAEM,IAAAA,KAAF;AAASC,IAAAA,YAAT;AAAuBC,IAAAA,QAAvB;AAAiCC,IAAAA,aAAjC;AAAgDC,IAAAA,gBAAhD;AAAkEC,IAAAA,kBAAlE;AAAsFC,IAAAA,gBAAtF;AAAwGC,IAAAA,kBAAxG;AAA4HC,IAAAA,KAA5H;AAAmIC,IAAAA,KAAnI;AAA0I,OAAGC;AAA7I,GAAqJ;AACjK,QAAMC,qBAAqB,GAAGP,gBAAgB,IAAII,KAAK,CAACI,MAAN,CAAaC,OAA/D;AACA,QAAMC,uBAAuB,GAAGT,kBAAkB,IAAI,MAAtD;AACA,QAAMU,qBAAqB,GAAGT,gBAAgB,IAAI,MAAlD;AACA,QAAMU,uBAAuB,GAAGT,kBAAkB,IA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aAAN,CAAoB7B,MAApB,EAA4B;AAAEc,IAAAA,KAAK,EAAEA,KAAT;AAAgBR,IAAAA,KAAK,EAAEiB,OAAvB;AAAgCf,IAAAA,QAAQ,EAAEA,QAA1C;AAAoDC,IAAAA,aAAa,EAAEA,aAAnE;AAAkFC,IAAAA,gBAAgB,EAAEA,gBAApG;AAAsHC,IAAAA,kBAAkB,EAAEA,kBAA1I;AAA8JC,IAAAA,gBAAgB,EAAEA,gBAAhL;AAAkMC,IAAAA,kBAAkB,EAAEA;AAAtN,GAA5B,CAJI,CAAR;AAKH;;AACD,MAAM2B,SAAS,GAAGtC,SAAS,CAACkC,GAAD,CAA3B;AACA,SAASI,SAAT;AACA,eAAetC,SAAS,CAACF,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { Switch as NativeSwitch, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport FormRow from \"./FormRow\";\nimport { RowDirection } from \"@draftbit/types\";\nimport { usePrevious } from \"../hooks\";\nfunction Switch({ value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, style, ...rest }) {\n const activeTrackThemeColor = activeTrackColor || theme.colors.primary;\n const inactiveTrackThemeColor = inactiveTrackColor || \"#EEE\";\n const activeThumbThemeColor = activeThumbColor || \"#FFF\";\n const inactiveThumbThemeColor = inactiveThumbColor || \"#FFF\";\n const [checked, setChecked] = React.useState(value || defaultValue);\n React.useEffect(() => {\n if (value != null && value !== checked) {\n setChecked(value);\n }\n }, [value, checked]);\n // This special logic is to handle weird APIs like Airtable that return\n // true or undefined for a boolean\n const previousDefaultValue = usePrevious(defaultValue);\n React.useEffect(() => {\n if (defaultValue !== previousDefaultValue) {\n setChecked(Boolean(defaultValue));\n }\n }, [defaultValue, previousDefaultValue]);\n return (React.createElement(NativeSwitch, { value: checked, disabled: disabled, trackColor: {\n false: inactiveTrackThemeColor,\n true: activeTrackThemeColor,\n }, thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor, \n // @ts-ignore react-native-web only\n activeThumbColor: activeThumbThemeColor, ios_backgroundColor: inactiveTrackThemeColor, style: style, onValueChange: (bool) => {\n setChecked(bool);\n onValueChange && onValueChange(bool);\n }, ...rest }));\n}\nfunction Row({ label = \"Label\", direction = RowDirection.Row, style, value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, ...rest }) {\n const [checked, setChecked] = React.useState(value != null ? value : defaultValue);\n React.useEffect(() => {\n if (value != null) {\n setChecked(value);\n }\n }, [value]);\n React.useEffect(() => {\n if (defaultValue != null) {\n setChecked(defaultValue);\n }\n }, [defaultValue]);\n return (React.createElement(FormRow, { disabled: disabled, onPress: () => {\n setChecked(!checked);\n onValueChange && onValueChange(!checked);\n }, label: label, direction: direction, style: style, ...rest },\n React.createElement(Switch, { theme: theme, value: checked, disabled: disabled, onValueChange: onValueChange, activeTrackColor: activeTrackColor, inactiveTrackColor: inactiveTrackColor, activeThumbColor: activeThumbColor, inactiveThumbColor: inactiveThumbColor })));\n}\nconst SwitchRow = withTheme(Row);\nexport { SwitchRow };\nexport default withTheme(Switch);\n"]}
1
+ {"version":3,"sources":["Switch.tsx"],"names":["React","Switch","NativeSwitch","withTheme","FormRow","RowDirection","usePrevious","value","defaultValue","disabled","onValueChange","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","theme","style","rest","activeTrackThemeColor","colors","primary","inactiveTrackThemeColor","activeThumbThemeColor","inactiveThumbThemeColor","checked","setChecked","useState","useEffect","previousDefaultValue","Boolean","false","true","bool","Row","label","direction","SwitchRow"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,MAAM,IAAIC,YADZ,QAKO,cALP;AAMA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AAEA,SAASC,WAAT,QAA4B,UAA5B;;AAcA,SAASL,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AAEE,IAAA,OAAO,EAAE,MAAM;AACbgB,MAAAA,UAAU,CAAC,CAACD,OAAF,CAAV;AACAd,MAAAA,aAAa,IAAIA,aAAa,CAAC,CAACc,OAAF,CAA9B;AACD,KALH;AAME,IAAA,KAAK,EAAEU,KANT;AAOE,IAAA,SAAS,EAAEC,SAPb;AAQE,IAAA,KAAK,EAAEnB;AART,KASMC,IATN,gBAWE,oBAAC,MAAD;AACE,IAAA,KAAK,EAAEF,KADT;AAEE,IAAA,KAAK,EAAES,OAFT;AAGE,IAAA,QAAQ,EAAEf,QAHZ;AAIE,IAAA,aAAa,EAAEC,aAJjB;AAKE,IAAA,gBAAgB,EAAEC,gBALpB;AAME,IAAA,kBAAkB,EAAEC,kBANtB;AAOE,IAAA,gBAAgB,EAAEC,gBAPpB;AAQE,IAAA,kBAAkB,EAAEC;AARtB,IAXF,CADF;AAwBD;;AAED,MAAMsB,SAAS,GAAGjC,SAAS,CAAC8B,GAAD,CAA3B;AACA,SAASG,SAAT;AACA,eAAejC,SAAS,CAACF,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n Switch as NativeSwitch,\n SwitchProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport FormRow from \"./FormRow\";\nimport { RowDirection } from \"@draftbit/types\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport { usePrevious } from \"../hooks\";\n\ntype Props = {\n value?: boolean;\n disabled?: boolean;\n onValueChange?: (value: boolean) => void;\n defaultValue?: boolean;\n theme: Theme;\n activeTrackColor: string;\n inactiveTrackColor: string;\n activeThumbColor: string;\n inactiveThumbColor: string;\n} & SwitchProps;\n\nfunction Switch({\n value,\n defaultValue,\n disabled,\n onValueChange,\n activeTrackColor,\n inactiveTrackColor,\n activeThumbColor,\n inactiveThumbColor,\n theme,\n style,\n ...rest\n}: Props) {\n const activeTrackThemeColor = activeTrackColor || theme.colors.primary;\n const inactiveTrackThemeColor = inactiveTrackColor || \"#EEE\";\n\n const activeThumbThemeColor = activeThumbColor || \"#FFF\";\n const inactiveThumbThemeColor = inactiveThumbColor || \"#FFF\";\n\n const [checked, setChecked] = React.useState(value || defaultValue);\n\n React.useEffect(() => {\n if (value != null && value !== checked) {\n setChecked(value);\n }\n }, [value, checked]);\n\n // This special logic is to handle weird APIs like Airtable that return\n // true or undefined for a boolean\n const previousDefaultValue = usePrevious(defaultValue) as boolean | undefined;\n React.useEffect(() => {\n if (defaultValue !== previousDefaultValue) {\n setChecked(Boolean(defaultValue));\n }\n }, [defaultValue, previousDefaultValue]);\n\n return (\n <NativeSwitch\n value={checked}\n disabled={disabled}\n trackColor={{\n false: inactiveTrackThemeColor,\n true: activeTrackThemeColor,\n }}\n thumbColor={value ? activeThumbThemeColor : inactiveThumbThemeColor}\n // @ts-ignore react-native-web only\n activeThumbColor={activeThumbThemeColor}\n ios_backgroundColor={inactiveTrackThemeColor}\n style={style}\n onValueChange={(bool) => {\n setChecked(bool);\n onValueChange && onValueChange(bool);\n }}\n {...rest}\n />\n );\n}\n\ntype RowProps = {\n label: string;\n direction: RowDirection;\n style?: StyleProp<ViewStyle>;\n};\n\nfunction Row({\n label = \"Label\",\n direction = RowDirection.Row,\n style,\n value,\n defaultValue,\n disabled,\n onValueChange,\n activeTrackColor,\n inactiveTrackColor,\n activeThumbColor,\n inactiveThumbColor,\n theme,\n ...rest\n}: Props & RowProps) {\n const [checked, setChecked] = React.useState(\n value != null ? value : defaultValue\n );\n\n React.useEffect(() => {\n if (value != null) {\n setChecked(value);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setChecked(defaultValue);\n }\n }, [defaultValue]);\n\n return (\n <FormRow\n disabled={disabled}\n onPress={() => {\n setChecked(!checked);\n onValueChange && onValueChange(!checked);\n }}\n label={label}\n direction={direction}\n style={style}\n {...rest}\n >\n <Switch\n theme={theme}\n value={checked}\n disabled={disabled}\n onValueChange={onValueChange}\n activeTrackColor={activeTrackColor}\n inactiveTrackColor={inactiveTrackColor}\n activeThumbColor={activeThumbColor}\n inactiveThumbColor={inactiveThumbColor}\n />\n </FormRow>\n );\n}\n\nconst SwitchRow = withTheme(Row);\nexport { SwitchRow };\nexport default withTheme(Switch);\n"]}
@@ -16,7 +16,8 @@ export const SEED_DATA = {
16
16
  defaultValue: "Option"
17
17
  }),
18
18
  color: createColorProp({
19
- label: "Font Color"
19
+ label: "Font Color",
20
+ defaultValue: "strong"
20
21
  })
21
22
  }
22
23
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["ActionSheetItem.ts"],"names":["COMPONENT_TYPES","createActionProp","createColorProp","createTextProp","GROUPS","Triggers","SEED_DATA","name","tag","description","category","button","triggers","OnPress","layout","textAlign","props","onPress","label","group","basic","defaultValue","color"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,eAHF,EAIEC,cAJF,EAKEC,MALF,EAMEC,QANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,mBADiB;AAEvBC,EAAAA,GAAG,EAAE,iBAFkB;AAGvBC,EAAAA,WAAW,EAAE,mBAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,MAJH;AAKvBC,EAAAA,QAAQ,EAAE,CAACP,QAAQ,CAACQ,OAAV,CALa;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAEhB,gBAAgB,EADpB;AAELiB,IAAAA,KAAK,EAAEf,cAAc,CAAC;AACpBgB,MAAAA,KAAK,EAAEf,MAAM,CAACgB,KADM;AAEpBF,MAAAA,KAAK,EAAE,OAFa;AAGpBG,MAAAA,YAAY,EAAE;AAHM,KAAD,CAFhB;AAOLC,IAAAA,KAAK,EAAEpB,eAAe,CAAC;AACrBgB,MAAAA,KAAK,EAAE;AADc,KAAD;AAPjB;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createActionProp,\n createColorProp,\n createTextProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["ActionSheetItem.ts"],"names":["COMPONENT_TYPES","createActionProp","createColorProp","createTextProp","GROUPS","Triggers","SEED_DATA","name","tag","description","category","button","triggers","OnPress","layout","textAlign","props","onPress","label","group","basic","defaultValue","color"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,eAHF,EAIEC,cAJF,EAKEC,MALF,EAMEC,QANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,mBADiB;AAEvBC,EAAAA,GAAG,EAAE,iBAFkB;AAGvBC,EAAAA,WAAW,EAAE,mBAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,MAJH;AAKvBC,EAAAA,QAAQ,EAAE,CAACP,QAAQ,CAACQ,OAAV,CALa;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GANe;AASvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAEhB,gBAAgB,EADpB;AAELiB,IAAAA,KAAK,EAAEf,cAAc,CAAC;AACpBgB,MAAAA,KAAK,EAAEf,MAAM,CAACgB,KADM;AAEpBF,MAAAA,KAAK,EAAE,OAFa;AAGpBG,MAAAA,YAAY,EAAE;AAHM,KAAD,CAFhB;AAOLC,IAAAA,KAAK,EAAEpB,eAAe,CAAC;AACrBgB,MAAAA,KAAK,EAAE,YADc;AAErBG,MAAAA,YAAY,EAAE;AAFO,KAAD;AAPjB;AATgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createActionProp,\n createColorProp,\n createTextProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n defaultValue: \"strong\",\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Fetch.ts"],"names":["COMPONENT_TYPES","SEED_DATA","name","tag","description","category","data","layout","minHeight","props"],"mappings":"AAAA,SAASA,eAAT,QAAgC,iBAAhC;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,OADiB;AAEvBC,EAAAA,GAAG,EAAE,OAFkB;AAGvBC,EAAAA,WAAW,EACT,qEAJqB;AAKvBC,EAAAA,QAAQ,EAAEL,eAAe,CAACM,IALH;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GANe;AASvBC,EAAAA,KAAK,EAAE;AATgB,CAAlB","sourcesContent":["import { COMPONENT_TYPES } from \"@draftbit/types\";\n/* TODO remove, still used inside the builder in a weird way */\nexport const SEED_DATA = {\n name: \"Fetch\",\n tag: \"Fetch\",\n description:\n \"Rest API Declarative Fetch component. Uses react-request internally\",\n category: COMPONENT_TYPES.data,\n layout: {\n minHeight: 40,\n },\n props: {},\n};\n"]}
1
+ {"version":3,"sources":["Fetch.js"],"names":["COMPONENT_TYPES","SEED_DATA","name","tag","description","category","data","layout","minHeight","props"],"mappings":"AAAA,SAASA,eAAT,QAAgC,iBAAhC;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,OADe;AAErBC,EAAAA,GAAG,EAAE,OAFgB;AAGrBC,EAAAA,WAAW,EAAE,qEAHQ;AAIrBC,EAAAA,QAAQ,EAAEL,eAAe,CAACM,IAJL;AAKrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,SAAS,EAAE;AADP,GALa;AAQrBC,EAAAA,KAAK,EAAE;AARc,CAAlB","sourcesContent":["import { COMPONENT_TYPES } from \"@draftbit/types\";\n/* TODO remove, still used inside the builder in a weird way */\nexport const SEED_DATA = {\n name: \"Fetch\",\n tag: \"Fetch\",\n description: \"Rest API Declarative Fetch component. Uses react-request internally\",\n category: COMPONENT_TYPES.data,\n layout: {\n minHeight: 40,\n },\n props: {},\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ImageBackground.ts"],"names":["COMPONENT_TYPES","createImageProp","createResizeModeProp","createTextEnumProp","createColorProp","SEED_DATA","name","tag","doc_link","code_link","description","category","media","layout","width","height","props","source","defaultValue","resizeMode","backgroundColor","label","backfaceVisibility","options"],"mappings":"AAAA,SACEA,eADF,EAEEC,eAFF,EAGEC,oBAHF,EAIEC,kBAJF,EAKEC,eALF,QAMO,iBANP;AAQA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,kBADiB;AAEvBC,EAAAA,GAAG,EAAE,iBAFkB;AAGvBC,EAAAA,QAAQ,EACN,oEAJqB;AAKvBC,EAAAA,SAAS,EACP,yFANqB;AAOvBC,EAAAA,WAAW,EACT,8FARqB;AASvBC,EAAAA,QAAQ,EAAEX,eAAe,CAACY,KATH;AAUvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,KAAK,EAAE,MADD;AAENC,IAAAA,MAAM,EAAE;AAFF,GAVe;AAcvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAEhB,eAAe,CAAC;AACtBiB,MAAAA,YAAY,EACV;AAFoB,KAAD,CADlB;AAKLC,IAAAA,UAAU,EAAEjB,oBAAoB,EAL3B;AAMLkB,IAAAA,eAAe,EAAEhB,eAAe,CAAC;AAC/BiB,MAAAA,KAAK,EAAE,kBADwB;AAE/BX,MAAAA,WAAW,EAAE;AAFkB,KAAD,CAN3B;AAULY,IAAAA,kBAAkB,EAAEnB,kBAAkB,CAAC;AACrCkB,MAAAA,KAAK,EAAE,qBAD8B;AAErCX,MAAAA,WAAW,EAAE,iDAFwB;AAGrCa,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,QAAZ;AAH4B,KAAD;AAVjC;AAdgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createImageProp,\n createResizeModeProp,\n createTextEnumProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Image Background\",\n tag: \"ImageBackground\",\n doc_link:\n \"https://docs.expo.io/versions/latest/react-native/imagebackground/\",\n code_link:\n \"https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageBackground.js\",\n description:\n \"A very simple drop-in replacement for Image that allows you to use an Image as a background.\",\n category: COMPONENT_TYPES.media,\n layout: {\n width: \"100%\",\n height: \"100%\",\n },\n props: {\n source: createImageProp({\n defaultValue:\n \"https://static.draftbit.com/images/placeholder-image-background.png\",\n }),\n resizeMode: createResizeModeProp(),\n backgroundColor: createColorProp({\n label: \"Background Color\",\n description: \"If no image is chosen render a colored background.\",\n }),\n backfaceVisibility: createTextEnumProp({\n label: \"Backface Visibility\",\n description: \"When animating a card, show the back face of it\",\n options: [\"visible\", \"hidden\"],\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["ImageBackground.js"],"names":["COMPONENT_TYPES","createImageProp","createResizeModeProp","createTextEnumProp","createColorProp","SEED_DATA","name","tag","doc_link","code_link","description","category","media","layout","width","height","props","source","defaultValue","resizeMode","backgroundColor","label","backfaceVisibility","options"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,eAA1B,EAA2CC,oBAA3C,EAAiEC,kBAAjE,EAAqFC,eAArF,QAA6G,iBAA7G;AACA,OAAO,MAAMC,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,kBADe;AAErBC,EAAAA,GAAG,EAAE,iBAFgB;AAGrBC,EAAAA,QAAQ,EAAE,oEAHW;AAIrBC,EAAAA,SAAS,EAAE,yFAJU;AAKrBC,EAAAA,WAAW,EAAE,8FALQ;AAMrBC,EAAAA,QAAQ,EAAEX,eAAe,CAACY,KANL;AAOrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,KAAK,EAAE,MADH;AAEJC,IAAAA,MAAM,EAAE;AAFJ,GAPa;AAWrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,MAAM,EAAEhB,eAAe,CAAC;AACpBiB,MAAAA,YAAY,EAAE;AADM,KAAD,CADpB;AAIHC,IAAAA,UAAU,EAAEjB,oBAAoB,EAJ7B;AAKHkB,IAAAA,eAAe,EAAEhB,eAAe,CAAC;AAC7BiB,MAAAA,KAAK,EAAE,kBADsB;AAE7BX,MAAAA,WAAW,EAAE;AAFgB,KAAD,CAL7B;AASHY,IAAAA,kBAAkB,EAAEnB,kBAAkB,CAAC;AACnCkB,MAAAA,KAAK,EAAE,qBAD4B;AAEnCX,MAAAA,WAAW,EAAE,iDAFsB;AAGnCa,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,QAAZ;AAH0B,KAAD;AATnC;AAXc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createImageProp, createResizeModeProp, createTextEnumProp, createColorProp, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Image Background\",\n tag: \"ImageBackground\",\n doc_link: \"https://docs.expo.io/versions/latest/react-native/imagebackground/\",\n code_link: \"https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageBackground.js\",\n description: \"A very simple drop-in replacement for Image that allows you to use an Image as a background.\",\n category: COMPONENT_TYPES.media,\n layout: {\n width: \"100%\",\n height: \"100%\",\n },\n props: {\n source: createImageProp({\n defaultValue: \"https://static.draftbit.com/images/placeholder-image-background.png\",\n }),\n resizeMode: createResizeModeProp(),\n backgroundColor: createColorProp({\n label: \"Background Color\",\n description: \"If no image is chosen render a colored background.\",\n }),\n backfaceVisibility: createTextEnumProp({\n label: \"Backface Visibility\",\n description: \"When animating a card, show the back face of it\",\n options: [\"visible\", \"hidden\"],\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["COMPONENT_TYPES","createStaticBoolProp","createStaticNumberProp","SEED_DATA","name","tag","description","category","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid","showsVerticalScrollIndicator","defaultValue"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,sBAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAET,oBAAoB,CAAC;AACvCU,MAAAA,KAAK,EAAE,uBADgC;AAEvCL,MAAAA,WAAW,EAAE;AAF0B,KAAD,CADnC;AAKLM,IAAAA,qBAAqB,EAAEX,oBAAoB,CAAC;AAC1CU,MAAAA,KAAK,EAAE,yBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CALtC;AAULO,IAAAA,WAAW,EAAEX,sBAAsB,CAAC;AAClCS,MAAAA,KAAK,EAAE,cAD2B;AAElCL,MAAAA,WAAW,EAAE;AAFqB,KAAD,CAV9B;AAcLQ,IAAAA,iBAAiB,EAAEZ,sBAAsB,CAAC;AACxCS,MAAAA,KAAK,EAAE,qBADiC;AAExCL,MAAAA,WAAW,EACT;AAHsC,KAAD,CAdpC;AAmBLS,IAAAA,yBAAyB,EAAEd,oBAAoB,CAAC;AAC9CU,MAAAA,KAAK,EAAE,oCADuC;AAE9CL,MAAAA,WAAW,EACT;AAH4C,KAAD,CAnB1C;AAwBLU,IAAAA,mBAAmB,EAAEd,sBAAsB,CAAC;AAC1CS,MAAAA,KAAK,EAAE,uBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CAxBtC;AA6BLW,IAAAA,eAAe,EAAEhB,oBAAoB,CAAC;AACpCU,MAAAA,KAAK,EAAE,mBAD6B;AAEpCL,MAAAA,WAAW,EAAE;AAFuB,KAAD,CA7BhC;AAiCLY,IAAAA,4BAA4B,EAAEjB,oBAAoB,CAAC;AACjDU,MAAAA,KAAK,EAAE,iCAD0C;AAEjDL,MAAAA,WAAW,EAAE,4CAFoC;AAGjDa,MAAAA,YAAY,EAAE;AAHmC,KAAD;AAjC7C;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createStaticNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n label: \"Shows Vertical Scroll Indicator\",\n description: \"Show or hide the vertical scroll indicator\",\n defaultValue: true,\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["KeyboardAwareScrollView.js"],"names":["COMPONENT_TYPES","createStaticBoolProp","createStaticNumberProp","SEED_DATA","name","tag","description","category","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid","showsVerticalScrollIndicator","defaultValue"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,oBAA1B,EAAgDC,sBAAhD,QAA+E,iBAA/E;AACA,OAAO,MAAMC,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,4BADe;AAErBC,EAAAA,GAAG,EAAE,yBAFgB;AAGrBC,EAAAA,WAAW,EAAE,mEAHQ;AAIrBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,MAJL;AAKrBA,EAAAA,MAAM,EAAE,EALa;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,kBAAkB,EAAET,oBAAoB,CAAC;AACrCU,MAAAA,KAAK,EAAE,uBAD8B;AAErCL,MAAAA,WAAW,EAAE;AAFwB,KAAD,CADrC;AAKHM,IAAAA,qBAAqB,EAAEX,oBAAoB,CAAC;AACxCU,MAAAA,KAAK,EAAE,yBADiC;AAExCL,MAAAA,WAAW,EAAE;AAF2B,KAAD,CALxC;AASHO,IAAAA,WAAW,EAAEX,sBAAsB,CAAC;AAChCS,MAAAA,KAAK,EAAE,cADyB;AAEhCL,MAAAA,WAAW,EAAE;AAFmB,KAAD,CAThC;AAaHQ,IAAAA,iBAAiB,EAAEZ,sBAAsB,CAAC;AACtCS,MAAAA,KAAK,EAAE,qBAD+B;AAEtCL,MAAAA,WAAW,EAAE;AAFyB,KAAD,CAbtC;AAiBHS,IAAAA,yBAAyB,EAAEd,oBAAoB,CAAC;AAC5CU,MAAAA,KAAK,EAAE,oCADqC;AAE5CL,MAAAA,WAAW,EAAE;AAF+B,KAAD,CAjB5C;AAqBHU,IAAAA,mBAAmB,EAAEd,sBAAsB,CAAC;AACxCS,MAAAA,KAAK,EAAE,uBADiC;AAExCL,MAAAA,WAAW,EAAE;AAF2B,KAAD,CArBxC;AAyBHW,IAAAA,eAAe,EAAEhB,oBAAoB,CAAC;AAClCU,MAAAA,KAAK,EAAE,mBAD2B;AAElCL,MAAAA,WAAW,EAAE;AAFqB,KAAD,CAzBlC;AA6BHY,IAAAA,4BAA4B,EAAEjB,oBAAoB,CAAC;AAC/CU,MAAAA,KAAK,EAAE,iCADwC;AAE/CL,MAAAA,WAAW,EAAE,4CAFkC;AAG/Ca,MAAAA,YAAY,EAAE;AAHiC,KAAD;AA7B/C;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createStaticBoolProp, createStaticNumberProp, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description: \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description: \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description: \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description: \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description: \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n label: \"Shows Vertical Scroll Indicator\",\n description: \"Show or hide the vertical scroll indicator\",\n defaultValue: true,\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonGroup.ts"],"names":["COMPONENT_TYPES","createFieldNameProp","createDirectionProp","Triggers","SEED_DATA","name","tag","category","input","layout","triggers","OnValueChange","props","direction","fieldName","handlerPropName","valuePropName","defaultValue"],"mappings":"AAAA,SACEA,eADF,EAEEC,mBAFF,EAGEC,mBAHF,EAIEC,QAJF,QAKO,iBALP;AAOA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,oBADiB;AAEvBC,EAAAA,GAAG,EAAE,kBAFkB;AAGvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,KAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,QAAQ,EAAE,CAACP,QAAQ,CAACQ,aAAV,CALa;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAEX,mBAAmB,EADzB;AAELY,IAAAA,SAAS,EAAEb,mBAAmB,CAAC;AAC7Bc,MAAAA,eAAe,EAAE,eADY;AAE7BC,MAAAA,aAAa,EAAE,OAFc;AAG7BC,MAAAA,YAAY,EAAE;AAHe,KAAD;AAFzB;AANgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createFieldNameProp,\n createDirectionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Group\",\n tag: \"RadioButtonGroup\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: [Triggers.OnValueChange],\n props: {\n direction: createDirectionProp(),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"radioButtonGroupValue\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["RadioButtonGroup.js"],"names":["COMPONENT_TYPES","createFieldNameProp","createDirectionProp","Triggers","SEED_DATA","name","tag","category","input","layout","triggers","OnValueChange","props","direction","fieldName","handlerPropName","valuePropName","defaultValue"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,mBAA1B,EAA+CC,mBAA/C,EAAoEC,QAApE,QAAqF,iBAArF;AACA,OAAO,MAAMC,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,oBADe;AAErBC,EAAAA,GAAG,EAAE,kBAFgB;AAGrBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,KAHL;AAIrBC,EAAAA,MAAM,EAAE,EAJa;AAKrBC,EAAAA,QAAQ,EAAE,CAACP,QAAQ,CAACQ,aAAV,CALW;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,SAAS,EAAEX,mBAAmB,EAD3B;AAEHY,IAAAA,SAAS,EAAEb,mBAAmB,CAAC;AAC3Bc,MAAAA,eAAe,EAAE,eADU;AAE3BC,MAAAA,aAAa,EAAE,OAFY;AAG3BC,MAAAA,YAAY,EAAE;AAHa,KAAD;AAF3B;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createFieldNameProp, createDirectionProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button Group\",\n tag: \"RadioButtonGroup\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: [Triggers.OnValueChange],\n props: {\n direction: createDirectionProp(),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"radioButtonGroupValue\",\n }),\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.6.1-3d1384.1+3d13849e",
3
+ "version": "43.6.1-81b417.2+81b417d4",
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": "3d13849eb9e0595e83ff88488b2c402881d5897e"
83
+ "gitHead": "81b417d4a8ab81c2f5694d65385a03277468f70b"
84
84
  }
@@ -17,6 +17,7 @@ export const SEED_DATA = {
17
17
  }),
18
18
  color: createColorProp({
19
19
  label: "Font Color",
20
+ defaultValue: "strong",
20
21
  }),
21
22
  },
22
23
  };
@@ -25,6 +25,7 @@ export const SEED_DATA = {
25
25
  }),
26
26
  color: createColorProp({
27
27
  label: "Font Color",
28
+ defaultValue: "strong",
28
29
  }),
29
30
  },
30
31
  };