@draftbit/core 43.5.1-92a046.1 → 43.5.1-9c8ce7.1

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":["ActionSheetCancel.tsx"],"names":["ActionSheetCancel","label","color","style","onPress"],"mappings":";;;;;;;AAAA;;AAEA;;;;AASA,MAAMA,iBAAkC,GAAG,QAKrC;AAAA,MALsC;AAC1CC,IAAAA,KAAK,GAAG,QADkC;AAE1CC,IAAAA,KAF0C;AAG1CC,IAAAA,KAH0C;AAI1CC,IAAAA;AAJ0C,GAKtC;AACJ,sBACE,6BAAC,wBAAD;AACE,IAAA,KAAK,EAAEH,KADT;AAEE,IAAA,KAAK,EAAEC,KAAK,IAAI,SAFlB;AAGE,IAAA,KAAK,EAAE,CAACC,KAAD,CAHT;AAIE,IAAA,OAAO,EAAEC;AAJX,IADF;AAQD,CAdD;;eAgBeJ,iB","sourcesContent":["import React from \"react\";\nimport { StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport ActionSheetItem from \"./ActionSheetItem\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetCancel: React.FC<Props> = ({\n label = \"Cancel\",\n color,\n style,\n onPress,\n}) => {\n return (\n <ActionSheetItem\n label={label}\n color={color || \"#FF453A\"}\n style={[style]}\n onPress={onPress}\n />\n );\n};\n\nexport default ActionSheetCancel;\n"]}
1
+ {"version":3,"sources":["ActionSheetCancel.js"],"names":["ActionSheetCancel","label","color","style","onPress","React","createElement","ActionSheetItem"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,iBAAiB,GAAG,QAAkD;AAAA,MAAjD;AAAEC,IAAAA,KAAK,GAAG,QAAV;AAAoBC,IAAAA,KAApB;AAA2BC,IAAAA,KAA3B;AAAkCC,IAAAA;AAAlC,GAAiD;AACxE,sBAAQC,eAAMC,aAAN,CAAoBC,wBAApB,EAAqC;AAAEN,IAAAA,KAAK,EAAEA,KAAT;AAAgBC,IAAAA,KAAK,EAAEA,KAAK,IAAI,SAAhC;AAA2CC,IAAAA,KAAK,EAAE,CAACA,KAAD,CAAlD;AAA2DC,IAAAA,OAAO,EAAEA;AAApE,GAArC,CAAR;AACH,CAFD;;eAGeJ,iB","sourcesContent":["import React from \"react\";\nimport ActionSheetItem from \"./ActionSheetItem\";\nconst ActionSheetCancel = ({ label = \"Cancel\", color, style, onPress, }) => {\n return (React.createElement(ActionSheetItem, { label: label, color: color || \"#FF453A\", style: [style], onPress: onPress }));\n};\nexport default ActionSheetCancel;\n"]}
@@ -23,8 +23,6 @@ var _Config = _interopRequireDefault(require("./Config"));
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- 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); }
27
-
28
26
  const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
29
27
  const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
30
28
 
@@ -68,11 +66,12 @@ const CardContainer = _ref => {
68
66
  break;
69
67
  }
70
68
 
71
- return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, _extends({
69
+ return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
72
70
  style: style,
73
71
  onPress: onPress,
74
- numColumns: numColumns
75
- }, rest), /*#__PURE__*/_react.default.createElement(_Elevation.default, {
72
+ numColumns: numColumns,
73
+ ...rest
74
+ }, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
76
75
  style: {
77
76
  elevation,
78
77
  borderRadius: roundness
@@ -144,5 +143,17 @@ const CardContainer = _ref => {
144
143
 
145
144
  var _default = (0, _theming.withTheme)(CardContainer);
146
145
 
146
+ exports.default = _default;
147
+ //# sourceMappingURL=CardContainer.js.mapackgroundOpacity).rgb().string()
148
+ }
149
+ }, /*#__PURE__*/_react.default.createElement(Icon, {
150
+ name: icon,
151
+ size: _Config.default.cardIconSize,
152
+ color: colors.surface
153
+ })) : null)));
154
+ };
155
+
156
+ var _default = (0, _theming.withTheme)(CardContainer);
157
+
147
158
  exports.default = _default;
148
159
  //# sourceMappingURL=CardContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["CardContainer.tsx"],"names":["ICON_CONTAINER_SIZE","Config","cardIconSize","ICON_CONTAINER_PADDING","CardContainer","Icon","icon","image","cardImageUrl","title","leftDescription","rightDescription","textCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","textJustification","titleStyle","headline6","headline5","borderRadius","overflow","backgroundColor","surface","uri","padding","flexDirection","alignItems","justifyContent","color","strong","marginTop","body2","medium","subtitle2","light","cardIconElevation","position","top","right","width","height","alpha","cardIconBackgroundOpacity","rgb","string"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AAIA;;;;;;AAGA,MAAMA,mBAAmB,GAAGC,gBAAOC,YAAP,GAAsB,CAAlD;AACA,MAAMC,sBAAsB,GAAGF,gBAAOC,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;;AAiBA,MAAME,aAA8B,GAAG,QAejC;AAAA,MAfkC;AACtCC,IAAAA,IADsC;AAEtCC,IAAAA,IAFsC;AAGtCC,IAAAA,KAAK,GAAGN,gBAAOO,YAHuB;AAItCC,IAAAA,KAJsC;AAKtCC,IAAAA,eALsC;AAMtCC,IAAAA,gBANsC;AAOtCC,IAAAA,YAPsC;AAQtCC,IAAAA,WAAW,GAAG,GARwB;AAStCC,IAAAA,SAAS,GAAG,CAT0B;AAUtCC,IAAAA,UAAU,GAAG,CAVyB;AAWtCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA;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BANH;AAOLgC,MAAAA,OAAO,EAAE7B,sBAPJ;AAQLwB,MAAAA,YAAY,EAAE3B,mBART;AASL6B,MAAAA,eAAe,EAAE,oBAAMZ,MAAM,CAACoB,MAAb,EACdY,KADc,CACRhD,gBAAOiD,yBADC,EAEdC,GAFc,GAGdC,MAHc;AATZ;AADT,kBAgBE,6BAAC,IAAD;AACE,IAAA,IAAI,EAAE9C,IADR;AAEE,IAAA,IAAI,EAAEL,gBAAOC,YAFf;AAGE,IAAA,KAAK,EAAEe,MAAM,CAACa;AAHhB,IAhBF,CADG,GAuBD,IAlFN,CADF,CADF,CADF;AA0FD,CA7HD;;eA+He,wBAAU1B,aAAV,C","sourcesContent":["import React from \"react\";\nimport {\n View,\n ImageSourcePropType,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Config from \"./Config\";\nimport { justificationType } from \"./Justification\";\n\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n textCentered: boolean;\n icon?: string;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n} & IconSlot;\n\nconst CardContainer: React.FC<Props> = ({\n Icon,\n icon,\n image = Config.cardImageUrl,\n title,\n leftDescription,\n rightDescription,\n textCentered,\n aspectRatio = 1.5,\n elevation = 2,\n numColumns = 3,\n theme: { colors, roundness, typography },\n style,\n onPress,\n ...rest\n}) => {\n let textJustification: justificationType;\n\n let titleStyle;\n\n if (textCentered && !rightDescription) {\n textJustification = \"center\";\n } else {\n textJustification = \"space-between\";\n }\n\n switch (numColumns) {\n case 2:\n titleStyle = typography.headline6;\n break;\n case 3:\n titleStyle = typography.headline5;\n break;\n }\n\n return (\n <Card style={style} onPress={onPress} numColumns={numColumns} {...rest}>\n <Elevation style={{ elevation, borderRadius: roundness }}>\n <View\n style={{\n borderRadius: roundness,\n overflow: \"hidden\",\n backgroundColor: colors.surface,\n }}\n >\n <Image\n style={{ aspectRatio }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n <View\n style={{\n padding: numColumns === 1 ? 8 : 16,\n }}\n >\n {title ? (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: textJustification,\n }}\n >\n <Text\n numberOfLines={1}\n style={[titleStyle, { color: colors.strong }]}\n >\n {title}\n </Text>\n </View>\n ) : null}\n {leftDescription ? (\n <View\n style={{\n flexDirection: \"row\",\n justifyContent: textJustification,\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n }}\n >\n <Text\n numberOfLines={1}\n style={[typography.body2, { color: colors.medium }]}\n >\n {leftDescription}\n </Text>\n {rightDescription ? (\n <Text\n numberOfLines={1}\n style={[typography.subtitle2, { color: colors.light }]}\n >\n {rightDescription}\n </Text>\n ) : null}\n </View>\n ) : null}\n </View>\n {icon ? (\n <Elevation\n style={{\n elevation: Config.cardIconElevation,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: color(colors.strong)\n .alpha(Config.cardIconBackgroundOpacity)\n .rgb()\n .string(),\n }}\n >\n <Icon\n name={icon}\n size={Config.cardIconSize}\n color={colors.surface}\n />\n </Elevation>\n ) : null}\n </View>\n </Elevation>\n </Card>\n );\n};\n\nexport default withTheme(CardContainer);\n"]}
1
+ {"version":3,"sources":["CardContainer.js"],"names":["ICON_CONTAINER_SIZE","Config","cardIconSize","ICON_CONTAINER_PADDING","CardContainer","Icon","icon","image","cardImageUrl","title","leftDescription","rightDescription","textCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","textJustification","titleStyle","headline6","headline5","React","createElement","Card","Elevation","borderRadius","View","overflow","backgroundColor","surface","Image","source","uri","resizeMode","padding","flexDirection","alignItems","justifyContent","Text","numberOfLines","color","strong","marginTop","body2","medium","subtitle2","light","cardIconElevation","position","top","right","width","height","alpha","cardIconBackgroundOpacity","rgb","string","name","size"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,mBAAmB,GAAGC,gBAAOC,YAAP,GAAsB,CAAlD;AACA,MAAMC,sBAAsB,GAAGF,gBAAOC,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;;AACA,MAAME,aAAa,GAAG,QAA8N;AAAA,MAA7N;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAK,GAAGN,gBAAOO,YAA7B;AAA2CC,IAAAA,KAA3C;AAAkDC,IAAAA,eAAlD;AAAmEC,IAAAA,gBAAnE;AAAqFC,IAAAA,YAArF;AAAmGC,IAAAA,WAAW,GAAG,GAAjH;AAAsHC,IAAAA,SAAS,GAAG,CAAlI;AAAqIC,IAAAA,UAAU,GAAG,CAAlJ;AAAqJC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,SAAV;AAAqBC,MAAAA;AAArB,KAA5J;AAA+LC,IAAAA,KAA/L;AAAsMC,IAAAA,OAAtM;AAA+M,OAAGC;AAAlN,GAA6N;AAChP,MAAIC,iBAAJ;AACA,MAAIC,UAAJ;;AACA,MAAIZ,YAAY,IAAI,CAACD,gBAArB,EAAuC;AACnCY,IAAAA,iBAAiB,GAAG,QAApB;AACH,GAFD,MAGK;AACDA,IAAAA,iBAAiB,GAAG,eAApB;AACH;;AACD,UAAQR,UAAR;AACI,S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AAS,EAAEb,gBAAOoD,iBADsB;AAExCC,MAAAA,QAAQ,EAAE,UAF8B;AAGxCC,MAAAA,GAAG,EAAE,EAHmC;AAIxCC,MAAAA,KAAK,EAAE,EAJiC;AAKxCC,MAAAA,KAAK,EAAEzD,mBALiC;AAMxC0D,MAAAA,MAAM,EAAE1D,mBANgC;AAOxCwC,MAAAA,OAAO,EAAErC,sBAP+B;AAQxC4B,MAAAA,YAAY,EAAE/B,mBAR0B;AASxCkC,MAAAA,eAAe,EAAE,oBAAMjB,MAAM,CAAC8B,MAAb,EACZY,KADY,CACN1D,gBAAO2D,yBADD,EAEZC,GAFY,GAGZC,MAHY;AATuB;AAAT,GAA/B,eAcJnC,eAAMC,aAAN,CAAoBvB,IAApB,EAA0B;AAAE0D,IAAAA,IAAI,EAAEzD,IAAR;AAAc0D,IAAAA,IAAI,EAAE/D,gBAAOC,YAA3B;AAAyC4C,IAAAA,KAAK,EAAE7B,MAAM,CAACkB;AAAvD,GAA1B,CAdI,CAAJ,GAcgG,IArCxG,CADJ,CADI,CAAR;AAwCH,CAzDD;;eA0De,wBAAU/B,aAAV,C","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport color from \"color\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst CardContainer = ({ Icon, icon, image = Config.cardImageUrl, title, leftDescription, rightDescription, textCentered, aspectRatio = 1.5, elevation = 2, numColumns = 3, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n let textJustification;\n let titleStyle;\n if (textCentered && !rightDescription) {\n textJustification = \"center\";\n }\n else {\n textJustification = \"space-between\";\n }\n switch (numColumns) {\n case 2:\n titleStyle = typography.headline6;\n break;\n case 3:\n titleStyle = typography.headline5;\n break;\n }\n return (React.createElement(Card, { style: style, onPress: onPress, numColumns: numColumns, ...rest },\n React.createElement(Elevation, { style: { elevation, borderRadius: roundness } },\n React.createElement(View, { style: {\n borderRadius: roundness,\n overflow: \"hidden\",\n backgroundColor: colors.surface,\n } },\n React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: {\n padding: numColumns === 1 ? 8 : 16,\n } },\n title ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: textJustification,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [titleStyle, { color: colors.strong }] }, title))) : null,\n leftDescription ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n justifyContent: textJustification,\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [typography.body2, { color: colors.medium }] }, leftDescription),\n rightDescription ? (React.createElement(Text, { numberOfLines: 1, style: [typography.subtitle2, { color: colors.light }] }, rightDescription)) : null)) : null),\n icon ? (React.createElement(Elevation, { style: {\n elevation: Config.cardIconElevation,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: color(colors.strong)\n .alpha(Config.cardIconBackgroundOpacity)\n .rgb()\n .string(),\n } },\n React.createElement(Icon, { name: icon, size: Config.cardIconSize, color: colors.surface }))) : null))));\n};\nexport default withTheme(CardContainer);\n"]}
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
25
 
26
26
  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; }
27
27
 
28
+ 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); }
29
+
28
30
  const Button = _ref => {
29
31
  let {
30
32
  Icon,
@@ -126,7 +128,7 @@ const Button = _ref => {
126
128
  alignSelf: "stretch",
127
129
  ...margins
128
130
  }
129
- }, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
131
+ }, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
130
132
  onPress: onPress,
131
133
  accessibilityState: {
132
134
  disabled
@@ -134,7 +136,7 @@ const Button = _ref => {
134
136
  accessibilityRole: "button",
135
137
  disabled: disabled || loading,
136
138
  style: [styles.button, buttonStyle, innerStyles]
137
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
139
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
138
140
  style: styles.content
139
141
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
140
142
  style: iconStyle
@@ -169,22 +171,5 @@ const styles = _reactNative.StyleSheet.create({
169
171
 
170
172
  var _default = (0, _theming.withTheme)(Button);
171
173
 
172
- exports.default = _default;
173
- //# sourceMappingURL=DeprecatedButton.js.map
174
- minWidth: 64,
175
- borderStyle: "solid"
176
- },
177
- content: {
178
- flexDirection: "row",
179
- alignItems: "center",
180
- justifyContent: "center"
181
- },
182
- icon: {
183
- width: _Config.default.buttonIconSize
184
- }
185
- });
186
-
187
- var _default = (0, _theming.withTheme)(Button);
188
-
189
174
  exports.default = _default;
190
175
  //# sourceMappingURL=DeprecatedButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DeprecatedButton.js"],"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","React","createElement","Elevation","alignSelf","Touchable","accessibilityState","accessibilityRole","button","View","content","name","size","ActivityIndicator","Text","numberOfLines","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,MAAM,GAAG,QAAsN;AAAA,MAArN;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEC,IAAAA,UAAjE;AAA6EC,IAAAA,KAAK,EAAEC,aAApF;AAAmGC,IAAAA,QAAnG;AAA6GC,IAAAA,OAA7G;AAAsHC,IAAAA,SAAS,GAAG,CAAlI;AAAqIC,IAAAA,KAArI;AAA4IC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAAnJ;AAAuM,OAAGC;AAA1M,GAAqN;AACjO,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AACA,MAAIpB,IAAI,KAAK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B;AAAhB,GAA1B,EACI1D,IAAI,IAAIG,OAAO,KAAK,IAApB,gBAA4B8C,KAAK,CAACC,aAAN,CAAoBO,iBAApB,EAA0B;AAAE/C,IAAAA,KAAK,EAAEyB;AAAT,GAA1B,eACxBc,KAAK,CAACC,aAAN,CAAoBnD,IAApB,EAA0B;AAAE4D,IAAAA,IAAI,EAAE3D,IAAR;AAAc4D,IAAAA,IAAI,EAAEpB,gBAAOC,cAA3B;AAA2CpC,IAAAA,KAAK,EAAEc;AAAlD,GAA1B,CADwB,CAA5B,GACiG,IAFrG,EAGIhB,OAAO,gBAAI8C,KAAK,CAACC,aAAN,CAAoBW,8BAApB,EAAuC;AAAED,IAAAA,IAAI,EAAE,OAAR;AAAiBvD,IAAAA,KAAK,EAAEc,SAAxB;AAAmCT,IAAAA,KAAK,EAAEyB;AAA1C,GAAvC,CAAJ,GAAqG,IAHhH,eAIIc,KAAK,CAACC,aAAN,CAAoBY,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoBrD,IAAAA,KAAK,EAAE,CAACqB,SAAD,EAAYhB,UAAU,CAACyC,MAAvB;AAA3B,GAA1B,EAAuFjD,QAAvF,CAJJ,CADJ,CADI,CAAR;AAOH,CAxED;;AAyEA,MAAM6B,MAAM,GAAGT,wBAAWqC,MAAX,CAAkB;AAC7BR,EAAAA,MAAM,EAAE;AACJS,IAAAA,QAAQ,EAAE,EADN;AAEJC,IAAAA,WAAW,EAAE;AAFT,GADqB;AAK7BR,EAAAA,OAAO,EAAE;AACLS,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GALoB;AAU7BrE,EAAAA,IAAI,EAAE;AACFuC,IAAAA,KAAK,EAAEC,gBAAOC;AADZ;AAVuB,CAAlB,CAAf;;eAce,wBAAU3C,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, Text, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst Button = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, labelColor, color: colorOverride, children, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n const { margin, marginEnd, marginTop, marginLeft, marginRight, marginBottom, marginHorizontal, marginVertical, ...innerStyles } = StyleSheet.flatten(style || {});\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n return (React.createElement(Elevation, { style: { elevation, alignSelf: \"stretch\", ...margins } },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: [styles.button, buttonStyle, innerStyles] },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, children)))));\n};\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\nexport default withTheme(Button);\n"]}
1
+ {"version":3,"sources":["DeprecatedButton.tsx"],"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","alignSelf","button","content","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAqDA,MAAMA,MAAuB,GAAG,QAc1B;AAAA,MAd2B;AAC/BC,IAAAA,IAD+B;AAE/BC,IAAAA,IAF+B;AAG/BC,IAAAA,QAAQ,GAAG,KAHoB;AAI/BC,IAAAA,IAAI,GAAG,OAJwB;AAK/BC,IAAAA,OAAO,GAAG,KALqB;AAM/BC,IAAAA,UAN+B;AAO/BC,IAAAA,KAAK,EAAEC,aAPwB;AAQ/BC,IAAAA,QAR+B;AAS/BC,IAAAA,OAT+B;AAU/BC,IAAAA,SAAS,GAAG,CAVmB;AAW/BC,IAAAA,KAX+B;AAY/BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAA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AQE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEV,MAAM,CAACe;AAApB,KACGnD,IAAI,IAAIG,OAAO,KAAK,IAApB,gBACC,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEgC;AAAb,kBACE,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEnC,IADR;AAEE,IAAA,IAAI,EAAEwC,gBAAOC,cAFf;AAGE,IAAA,KAAK,EAAEtB;AAHT,IADF,CADD,GAQG,IATN,EAUGhB,OAAO,gBACN,oBAAC,8BAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,KAAK,EAAEgB,SAFT;AAGE,IAAA,KAAK,EAAEgB;AAHT,IADM,GAMJ,IAhBN,eAiBE,oBAAC,iBAAD;AAAM,IAAA,aAAa,EAAE,CAArB;AAAwB,IAAA,KAAK,EAAE,CAACJ,SAAD,EAAYhB,UAAU,CAACmC,MAAvB;AAA/B,KACG3C,QADH,CAjBF,CARF,CADF,CADF;AAkCD,CAhID;;AAkIA,MAAM6B,MAAM,GAAGT,wBAAWyB,MAAX,CAAkB;AAC/BF,EAAAA,MAAM,EAAE;AACNG,IAAAA,QAAQ,EAAE,EADJ;AAENC,IAAAA,WAAW,EAAE;AAFP,GADuB;AAK/BH,EAAAA,OAAO,EAAE;AACPI,IAAAA,aAAa,EAAE,KADR;AAEPC,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GALsB;AAU/BzD,EAAAA,IAAI,EAAE;AACJuC,IAAAA,KAAK,EAAEC,gBAAOC;AADV;AAVyB,CAAlB,CAAf;;eAee,wBAAU3C,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n Text,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A button is component that the user can press to trigger an action.\n *\n * <div class=\"screenshots\">\n * <figure>\n * <img src=\"screenshots/button-1.png\" />\n * <figcaption>Text button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-2.png\" />\n * <figcaption>Outlined button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-3.png\" />\n * <figcaption>Contained button</figcaption>\n * </figure>\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Button } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <Button icon=\"add-a-photo\" type=\"solid\" onPress={() => console.log('Pressed')}>\n * Press me\n * </Button>\n * );\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"outline\" | \"text\";\n loading?: boolean;\n icon?: string;\n labelColor?: string;\n color?: string;\n children?: React.ReactNode;\n onPress: () => void;\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst Button: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n labelColor,\n color: colorOverride,\n children,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n\n const {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n ...innerStyles\n } = StyleSheet.flatten(style || {});\n\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n\n return (\n <Elevation style={{ elevation, alignSelf: \"stretch\", ...margins }}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={[styles.button, buttonStyle, innerStyles]}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {children}\n </Text>\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\n\nexport default withTheme(Button);\n"]}
@@ -13,6 +13,8 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
+ 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); }
17
+
16
18
  const getWidth = numColumns => {
17
19
  switch (numColumns) {
18
20
  case 1:
@@ -35,20 +37,6 @@ const Card = _ref => {
35
37
  ...rest
36
38
  } = _ref;
37
39
  const width = getWidth(numColumns);
38
- return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
39
- disabled: !onPress,
40
- onPress: onPress,
41
- style: [style, {
42
- width
43
- }],
44
- ...rest
45
- }, children);
46
- };
47
-
48
- var _default = (0, _theming.withTheme)(Card);
49
-
50
- exports.default = _default;
51
- //# sourceMappingURL=DeprecatedCardWrapper.js.map);
52
40
  return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
53
41
  disabled: !onPress,
54
42
  onPress: onPress,
@@ -1 +1 @@
1
- {"version":3,"sources":["DeprecatedCardWrapper.js"],"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","React","createElement","Touchable","disabled"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AACA,MAAMA,QAAQ,GAAIC,UAAD,IAAgB;AAC7B,UAAQA,UAAR;AACI,SAAK,CAAL;AACI,aAAO,KAAP;;AACJ,SAAK,CAAL;AACI,aAAO,KAAP;;AACJ;AACI,aAAO,MAAP;AANR;AAQH,CATD;;AAUA,MAAMC,IAAI,GAAG,QAA2D;AAAA,MAA1D;AAAED,IAAAA,UAAU,GAAG,CAAf;AAAkBE,IAAAA,QAAlB;AAA4BC,IAAAA,OAA5B;AAAqCC,IAAAA,KAArC;AAA4C,OAAGC;AAA/C,GAA0D;AACpE,QAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;AACA,sBAAQO,eAAMC,aAAN,CAAoBC,kBAApB,EAA+B;AAAEC,IAAAA,QAAQ,EAAE,CAACP,OAAb;AAAsBA,IAAAA,OAAO,EAAEA,OAA/B;AAAwCC,IAAAA,KAAK,EAAE,CAACA,KAAD,EAAQ;AAAEE,MAAAA;AAAF,KAAR,CAA/C;AAAmE,OAAGD;AAAtE,GAA/B,EAA6GH,QAA7G,CAAR;AACH,CAHD;;eAIe,wBAAUD,IAAV,C","sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nconst getWidth = (numColumns) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\nconst Card = ({ numColumns = 3, children, onPress, style, ...rest }) => {\n const width = getWidth(numColumns);\n return (React.createElement(Touchable, { disabled: !onPress, onPress: onPress, style: [style, { width }], ...rest }, children));\n};\nexport default withTheme(Card);\n"]}
1
+ {"version":3,"sources":["DeprecatedCardWrapper.tsx"],"names":["getWidth","numColumns","Card","children","onPress","style","rest","width"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAYA,MAAMA,QAAQ,GAAIC,UAAD,IAAwB;AACvC,UAAQA,UAAR;AACE,SAAK,CAAL;AACE,aAAO,KAAP;;AACF,SAAK,CAAL;AACE,aAAO,KAAP;;AACF;AACE,aAAO,MAAP;AANJ;AAQD,CATD;;AAWA,MAAMC,IAAqB,GAAG,QAMxB;AAAA,MANyB;AAC7BD,IAAAA,UAAU,GAAG,CADgB;AAE7BE,IAAAA,QAF6B;AAG7BC,IAAAA,OAH6B;AAI7BC,IAAAA,KAJ6B;AAK7B,OAAGC;AAL0B,GAMzB;AACJ,QAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;AACA,sBACE,6BAAC,kBAAD;AACE,IAAA,QAAQ,EAAE,CAACG,OADb;AAEE,IAAA,OAAO,EAAEA,OAFX;AAGE,IAAA,KAAK,EAAE,CAACC,KAAD,EAAQ;AAAEE,MAAAA;AAAF,KAAR;AAHT,KAIMD,IAJN,GAMGH,QANH,CADF;AAUD,CAlBD;;eAoBe,wBAAUD,IAAV,C","sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n numColumns?: number;\n children?: React.ReactNode;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst getWidth = (numColumns: number) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\n\nconst Card: React.FC<Props> = ({\n numColumns = 3,\n children,\n onPress,\n style,\n ...rest\n}) => {\n const width = getWidth(numColumns);\n return (\n <Touchable\n disabled={!onPress}\n onPress={onPress}\n style={[style, { width }]}\n {...rest}\n >\n {children}\n </Touchable>\n );\n};\n\nexport default withTheme(Card);\n"]}
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
27
 
28
28
  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; }
29
29
 
30
- 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); }
31
-
32
30
  const FAB = _ref => {
33
31
  let {
34
32
  Icon,
@@ -130,7 +128,7 @@ const FAB = _ref => {
130
128
  style: [{
131
129
  elevation
132
130
  }, style]
133
- }, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
131
+ }, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
134
132
  onPress: onPress,
135
133
  accessibilityState: {
136
134
  disabled
@@ -138,7 +136,7 @@ const FAB = _ref => {
138
136
  accessibilityRole: "button",
139
137
  disabled: disabled || loading,
140
138
  style: buttonStyles
141
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
139
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
142
140
  style: styles.content
143
141
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
144
142
  style: iconStyle
@@ -181,5 +179,23 @@ const styles = _reactNative.StyleSheet.create({
181
179
 
182
180
  var _default = (0, _theming.withTheme)(FAB);
183
181
 
182
+ exports.default = _default;
183
+ //# sourceMappingURL=DeprecatedFAB.js.map },
184
+ icon: {
185
+ alignItems: "center",
186
+ justifyContent: "center",
187
+ width: _Config.default.buttonIconSize
188
+ },
189
+ fixed: {
190
+ left: 0,
191
+ right: 0,
192
+ bottom: 0,
193
+ height: 64,
194
+ borderRadius: 0
195
+ }
196
+ });
197
+
198
+ var _default = (0, _theming.withTheme)(FAB);
199
+
184
200
  exports.default = _default;
185
201
  //# sourceMappingURL=DeprecatedFAB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DeprecatedFAB.tsx"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AACA;;AACA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AhBN,EAiBGjC,KAAK,gBACJ,oBAAC,aAAD;AAAM,IAAA,aAAa,EAAE,CAArB;AAAwB,IAAA,KAAK,EAAE,CAAC+B,SAAD,EAAYvB,UAAU,CAACoB,MAAvB;AAA/B,KACG5B,KADH,CADI,GAIF,IArBN,CARF,CADF,CADF;AAoCD,CAvID;;AAyIA,MAAM2B,MAAM,GAAGP,wBAAW0B,MAAX,CAAkB;AAC/BlB,EAAAA,MAAM,EAAE;AACNmB,IAAAA,WAAW,EAAE;AADP,GADuB;AAI/BjB,EAAAA,OAAO,EAAE;AACPkB,IAAAA,aAAa,EAAE,KADR;AAEPxB,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GAJsB;AAS/B/B,EAAAA,IAAI,EAAE;AACJ8B,IAAAA,UAAU,EAAE,QADR;AAEJC,IAAAA,cAAc,EAAE,QAFZ;AAGJS,IAAAA,KAAK,EAAEC,gBAAOC;AAHV,GATyB;AAc/Ba,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,KAAK,EAAE,CAFF;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILd,IAAAA,MAAM,EAAE,EAJH;AAKLf,IAAAA,YAAY,EAAE;AALT;AAdwB,CAAlB,CAAf;;eAuBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A floating action button represents the primary action in an application.\n *\n * <div class=\"screenshots\">\n * <img src=\"screenshots/fab-1.png\" />\n * <img src=\"screenshots/fab-2.png\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { StyleSheet } from 'react-native';\n * import { FAB } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <FAB\n * style={styles.fab}\n * type=\"outline\"\n * icon=\"add\"\n * onPress={() => console.log('Pressed')}\n * />\n * );\n *\n * const styles = StyleSheet.create({\n * fab: {\n * position: 'absolute',\n * margin: 16,\n * right: 0,\n * bottom: 0,\n * },\n * })\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"extended\" | \"outline\" | \"fixed\" | \"standard\";\n loading?: boolean;\n icon?: string;\n color?: string;\n label?: string;\n onPress: () => void;\n elevation?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst FAB: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n color: colorOverride,\n label,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle: StyleProp<ViewStyle> = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n const buttonStyles: StyleProp<ViewStyle>[] = [styles.button, buttonStyle];\n\n const contentStyle: StyleProp<ViewStyle>[] = [styles.content];\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n };\n\n const iconStyle: StyleProp<ViewStyle>[] = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n\n textStyle.margin = 16;\n }\n\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n\n return (\n <Elevation style={[{ elevation }, style]}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={buttonStyles}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n {label ? (\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {label}\n </Text>\n ) : null}\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\n\nexport default withTheme(FAB);\n"]}
1
+ {"version":3,"sources":["DeprecatedFAB.js"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","React","createElement","Elevation","Touchable","accessibilityState","accessibilityRole","View","name","size","ActivityIndicator","Text","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAuM;AAAA,MAAtM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEC,IAAAA,KAAK,EAAEC,aAAxE;AAAuFC,IAAAA,KAAvF;AAA8FC,IAAAA,OAA9F;AAAuGC,IAAAA,SAAS,GAAG,CAAnH;AAAsHC,IAAAA,KAAtH;AAA6HC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAApI;AAAwL,OAAGC;AAA3L,GAAsM;AAC/M,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AACA,MAAInB,IAAI,KAAK,UAAT,IAAuBA,IAAI,KAAK,UAAhC,IAA8CA,IAAI,KAAK,OAA3D,EAAoE;AAChEc,IAAAA,eAAe,GAAGI,WAAlB;;AACA,QAAInB,QAAJ,EAAc;AACViB,MAAAA,SAA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ACF8B,IAAAA,UAAU,EAAE,QADV;AAEFC,IAAAA,cAAc,EAAE,QAFd;AAGFS,IAAAA,KAAK,EAAEC,gBAAOC;AAHZ,GATuB;AAc7ByB,EAAAA,KAAK,EAAE;AACHC,IAAAA,IAAI,EAAE,CADH;AAEHC,IAAAA,KAAK,EAAE,CAFJ;AAGHC,IAAAA,MAAM,EAAE,CAHL;AAIH1B,IAAAA,MAAM,EAAE,EAJL;AAKHf,IAAAA,YAAY,EAAE;AALX;AAdsB,CAAlB,CAAf;;eAsBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Header.tsx"],"names":["Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","styles","container","topContainer","color","flex","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","Config","headerIconSize","marginTop","StyleSheet","create","flexDirection","justifyContent","alignItems"],"mappings":";;;;;;;A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EiB,gBAAOC,cAFf;AAGE,IAAA,KAAK,EAAEd,MAAM,CAACW;AAHhB,IAbF,CAJF,CAdJ,CADF,eAyCE,oBAAC,gBAAD;AAAS,IAAA,KAAK,EAAE;AAAEI,MAAAA,SAAS,EAAEpB,gBAAgB,IAAI;AAAjC;AAAhB,IAzCF,CADF;AA6CD,CAzDD;;AA2DA,MAAMO,MAAM,GAAGc,wBAAWC,MAAX,CAAkB;AAC/Bd,EAAAA,SAAS,EAAE;AACTI,IAAAA,SAAS,EAAE;AADF,GADoB;AAI/BH,EAAAA,YAAY,EAAE;AACZc,IAAAA,aAAa,EAAE,KADH;AAEZC,IAAAA,cAAc,EAAE,eAFJ;AAGZC,IAAAA,UAAU,EAAE;AAHA,GAJiB;AAS/BX,EAAAA,eAAe,EAAE;AACfS,IAAAA,aAAa,EAAE,KADA;AAEfC,IAAAA,cAAc,EAAE,QAFD;AAGfC,IAAAA,UAAU,EAAE;AAHG;AATc,CAAlB,CAAf;;eAgBe,wBAAU/B,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor: string;\n title: string;\n buttonText: string;\n dividerTopMargin?: number;\n icon: string;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst Header: React.FC<Props> = ({\n Icon,\n titleTypeStyle,\n titleColor,\n title,\n buttonText,\n dividerTopMargin,\n icon,\n onPress,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <View style={[styles.container, style]}>\n <View style={styles.topContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {onPress && (\n <Touchable\n style={{ alignSelf: \"center\", marginLeft: 12 }}\n onPress={onPress}\n >\n <View style={styles.buttonContainer}>\n <Text\n style={[\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ]}\n numberOfLines={1}\n >\n {buttonText}\n </Text>\n <Icon\n name={icon}\n size={Config.headerIconSize}\n color={colors.light}\n />\n </View>\n </Touchable>\n )}\n </View>\n <Divider style={{ marginTop: dividerTopMargin || 16 }} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\n\nexport default withTheme(Header);\n"]}
1
+ {"version":3,"sources":["Header.js"],"names":["Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","React","createElement","View","styles","container","topContainer","Text","color","flex","numberOfLines","Touchable","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","name","size","Config","headerIconSize","Divider","marginTop","StyleSheet","create","flexDirection","justifyContent","alignItems"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,MAAM,GAAG,QAAqI;AAAA,MAApI;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,cAAR;AAAwBC,IAAAA,UAAxB;AAAoCC,IAAAA,KAApC;AAA2CC,IAAAA,UAA3C;AAAuDC,IAAAA,gBAAvD;AAAyEC,IAAAA,IAAzE;AAA+EC,IAAAA,OAA/E;AAAwFC,IAAAA,KAAxF;AAA+FC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAAtG,GAAoI;AAChJ,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,iBAApB,EAA0B;A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BAApB,EAA6B;AAAEzB,IAAAA,KAAK,EAAE;AAAE0B,MAAAA,SAAS,EAAE7B,gBAAgB,IAAI;AAAjC;AAAT,GAA7B,CAnBI,CAAR;AAoBH,CArBD;;AAsBA,MAAMU,MAAM,GAAGoB,wBAAWC,MAAX,CAAkB;AAC7BpB,EAAAA,SAAS,EAAE;AACPO,IAAAA,SAAS,EAAE;AADJ,GADkB;AAI7BN,EAAAA,YAAY,EAAE;AACVoB,IAAAA,aAAa,EAAE,KADL;AAEVC,IAAAA,cAAc,EAAE,eAFN;AAGVC,IAAAA,UAAU,EAAE;AAHF,GAJe;AAS7Bd,EAAAA,eAAe,EAAE;AACbY,IAAAA,aAAa,EAAE,KADF;AAEbC,IAAAA,cAAc,EAAE,QAFH;AAGbC,IAAAA,UAAU,EAAE;AAHC;AATY,CAAlB,CAAf;;eAee,wBAAUxC,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, Text, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\nconst Header = ({ Icon, titleTypeStyle, titleColor, title, buttonText, dividerTopMargin, icon, onPress, style, theme: { colors, typography }, }) => {\n return (React.createElement(View, { style: [styles.container, style] },\n React.createElement(View, { style: styles.topContainer },\n React.createElement(Text, { style: [\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ], numberOfLines: 1 }, title),\n onPress && (React.createElement(Touchable, { style: { alignSelf: \"center\", marginLeft: 12 }, onPress: onPress },\n React.createElement(View, { style: styles.buttonContainer },\n React.createElement(Text, { style: [\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ], numberOfLines: 1 }, buttonText),\n React.createElement(Icon, { name: icon, size: Config.headerIconSize, color: colors.light }))))),\n React.createElement(Divider, { style: { marginTop: dividerTopMargin || 16 } })));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\nexport default withTheme(Header);\n"]}
@@ -17,8 +17,6 @@ var _RadioButtonGroup = _interopRequireDefault(require("./RadioButtonGroup"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- 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); }
21
-
22
20
  const RadioButtonFieldGroup = _ref => {
23
21
  let {
24
22
  label,
@@ -35,6 +33,17 @@ const RadioButtonFieldGroup = _ref => {
35
33
  fontSize: theme.typography.headline4.fontSize,
36
34
  color: theme.typography.headline4.color
37
35
  }, labelStyle]
36
+ }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, {
37
+ theme: theme,
38
+ ...rest
39
+ }, children));
40
+ };
41
+
42
+ var _default = (0, _theming.withTheme)(RadioButtonFieldGroup);
43
+
44
+ exports.default = _default;
45
+ //# sourceMappingURL=RadioButtonFieldGroup.js.mapography.headline4.color
46
+ }, labelStyle]
38
47
  }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
39
48
  theme: theme
40
49
  }, rest), children));
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonFieldGroup.tsx"],"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAQA,MAAMA,qBAAsC,GAAG,QAOzC;AAAA,MAP0C;AAC9CC,IAAAA,KAD8C;AAE9CC,IAAAA,QAF8C;AAG9CC,IAAAA,KAH8C;AAI9CC,IAAAA,UAJ8C;AAK9CC,IAAAA,KAL8C;AAM9C,OAAGC;AAN2C,GAO1C;AACJ,sBACE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAED;AAAb,kBACE,6BAAC,aAAD;AACE,IAAA,KAAK,EAAE,CACL;AACEE,MAAAA,QAAQ,EAAEJ,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BF,QADvC;AAEEG,MAAAA,KAAK,EAAEP,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BC;AAFpC,KADK,EAKLN,UALK;AADT,KASGH,KATH,CADF,eAYE,6BAAC,yBAAD;AAAkB,IAAA,KAAK,EAAEE;AAAzB,KAAoCG,IAApC,GACGJ,QADH,CAZF,CADF;AAkBD,CA1BD;;eA4Be,wBAAUF,qBAAV,C","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<Props> = ({\n label,\n children,\n theme,\n labelStyle,\n style,\n ...rest\n}) => {\n return (\n <View style={style}>\n <Text\n style={[\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n <RadioButtonGroup theme={theme} {...rest}>\n {children}\n </RadioButtonGroup>\n </View>\n );\n};\n\nexport default withTheme(RadioButtonFieldGroup);\n"]}
1
+ {"version":3,"sources":["RadioButtonFieldGroup.js"],"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","React","createElement","View","Text","fontSize","typography","headline4","color","RadioButtonGroup"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,qBAAqB,GAAG,QAA4D;AAAA,MAA3D;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAT;AAAmBC,IAAAA,KAAnB;AAA0BC,IAAAA,UAA1B;AAAsCC,IAAAA,KAAtC;AAA6C,OAAGC;AAAhD,GAA2D;AACtF,sBAAQC,eAAMC,aAAN,CAAoBC,iBAApB,EAA0B;AAAEJ,IAAAA,KAAK,EAAEA;AAAT,GAA1B,eACJE,eAAMC,aAAN,CAAoBE,aAApB,EAA0B;AAAEL,IAAAA,KAAK,EAAE,CAC3B;AACIM,MAAAA,QAAQ,EAAER,KAAK,CAACS,UAAN,CAAiBC,SAAjB,CAA2BF,QADzC;AAEIG,MAAAA,KAAK,EAAEX,KAAK,CAACS,UAAN,CAAiBC,SAAjB,CAA2BC;AAFtC,KAD2B,EAK3BV,UAL2B;AAAT,GAA1B,EAMSH,KANT,CADI,eAQJM,eAAMC,aAAN,CAAoBO,yBAApB,EAAsC;AAAEZ,IAAAA,KAAK,EAAEA,KAAT;AAAgB,OAAGG;AAAnB,GAAtC,EAAiEJ,QAAjE,CARI,CAAR;AASH,CAVD;;eAWe,wBAAUF,qBAAV,C","sourcesContent":["import React from \"react\";\nimport { View } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup from \"./RadioButtonGroup\";\nconst RadioButtonFieldGroup = ({ label, children, theme, labelStyle, style, ...rest }) => {\n return (React.createElement(View, { style: style },\n React.createElement(Text, { style: [\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ] }, label),\n React.createElement(RadioButtonGroup, { theme: theme, ...rest }, children)));\n};\nexport default withTheme(RadioButtonFieldGroup);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;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 { default as Banner } from \"./components/Banner\";\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
+ {"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;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\";\nexport { Link } from \"./components/Text\";\nexport { default as Banner } from \"./components/Banner\";\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 { ActionSheet, ActionSheetItem, ActionSheetCancel, } from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\nexport { Center, Circle, Square, Row, Stack, Spacer, } from \"./components/Layout\";\nexport { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from \"./components/RadioButton/index\";\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":["BlurView.ts"],"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","layout","flexGrow","flexShrink","flexBasis","props","tint","label","editable","required","defaultValue","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","group","GROUPS","basic","intensity","number","NUMBER","min","max","step","precision"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,UAFkB;AAGvBC,EAAAA,WAAW,EAAE,gBAHU;AAIvBC,EAAAA,QAAQ,EAAE,qDAJa;AAKvBC,EAAAA,SAAS,EACP,kFANqB;AAOvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAPH;AAQvBA,EAAAA,MAAM,EAAE;AACNC,IAAAA,QAAQ,EAAE,CADJ;AAENC,IAAAA,UAAU,EAAE,CAFN;AAGNC,IAAAA,SAAS,EAAE;AAHL,GARe;AAavBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,KAAK,EAAE,MADH;AAEJX,MAAAA,WAAW,EAAE,2BAFT;AAGJY,MAAAA,QAAQ,EAAE,IAHN;AAIJC,MAAAA,QAAQ,EAAE,IAJN;AAKJC,MAAAA,YAAY,EAAE,SALV;AAMJC,MAAAA,QAAQ,EAAEC,kBAAWC,SANjB;AAOJC,MAAAA,QAAQ,EAAEC,kBAAWC,MAPjB;AAQJC,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,OAAZ,EAAqB,MAArB,CARL;AASJC,MAAAA,KAAK,EAAEC,cAAOC;AATV,KADD;AAYLC,IAAAA,SAAS,EAAE;AACTd,MAAAA,KAAK,EAAE,WADE;AAETX,MAAAA,WAAW,EACT,uEAHO;AAITY,MAAAA,QAAQ,EAAE,IAJD;AAKTC,MAAAA,QAAQ,EAAE,IALD;AAMTC,MAAAA,YAAY,EAAE,EANL;AAOTC,MAAAA,QAAQ,EAAEC,kBAAWU,MAPZ;AAQTR,MAAAA,QAAQ,EAAEC,kBAAWQ,MARZ;AASTC,MAAAA,GAAG,EAAE,CATI;AAUTC,MAAAA,GAAG,EAAE,GAVI;AAWTC,MAAAA,IAAI,EAAE,CAXG;AAYTC,MAAAA,SAAS,EAAE,CAZF;AAaTT,MAAAA,KAAK,EAAEC,cAAOC;AAbL;AAZN;AAbgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Blur View\",\n tag: \"BlurView\",\n description: \"Expo Blur View\",\n doc_link: \"https://docs.expo.io/versions/latest/sdk/blur-view/\",\n code_link:\n \"https://github.com/expo/expo/blob/master/packages/expo/src/effects/BlurView.d.ts\",\n category: COMPONENT_TYPES.layout,\n layout: {\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: 0,\n },\n props: {\n tint: {\n label: \"Tint\",\n description: \"The tint of the blur view\",\n editable: true,\n required: true,\n defaultValue: \"default\",\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"default\", \"light\", \"dark\"],\n group: GROUPS.basic,\n },\n intensity: {\n label: \"Intensity\",\n description:\n \"A number from 1 to 100 that controls the intensity of the blur effect\",\n editable: true,\n required: true,\n defaultValue: 50,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n group: GROUPS.basic,\n },\n },\n};\n"]}
1
+ {"version":3,"sources":["BlurView.js"],"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","layout","flexGrow","flexShrink","flexBasis","props","tint","label","editable","required","defaultValue","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","group","GROUPS","basic","intensity","number","NUMBER","min","max","step","precision"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrB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import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, GROUPS, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Blur View\",\n tag: \"BlurView\",\n description: \"Expo Blur View\",\n doc_link: \"https://docs.expo.io/versions/latest/sdk/blur-view/\",\n code_link: \"https://github.com/expo/expo/blob/master/packages/expo/src/effects/BlurView.d.ts\",\n category: COMPONENT_TYPES.layout,\n layout: {\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: 0,\n },\n props: {\n tint: {\n label: \"Tint\",\n description: \"The tint of the blur view\",\n editable: true,\n required: true,\n defaultValue: \"default\",\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"default\", \"light\", \"dark\"],\n group: GROUPS.basic,\n },\n intensity: {\n label: \"Intensity\",\n description: \"A number from 1 to 100 that controls the intensity of the blur effect\",\n editable: true,\n required: true,\n defaultValue: 50,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n group: GROUPS.basic,\n },\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ScrollView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","horizontal","label","defaultValue","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","bounces"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,aADiB;AAEvBC,EAAAA,GAAG,EAAE,YAFkB;AAGvBC,EAAAA,WAAW,EAAE,8BAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBA,EAAAA,MAAM,EAAE,EALe;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE,iCAAqB;AAC/BC,MAAAA,KAAK,EAAE,YADwB;AAE/BN,MAAAA,WAAW,EAAE,+BAFkB;AAG/BO,MAAAA,YAAY,EAAE;AAHiB,KAArB,CADP;AAMLC,IAAAA,8BAA8B,EAAE,iCAAqB;AACnDF,MAAAA,KAAK,EAAE,kCAD4C;AAEnDN,MAAAA,WAAW,EACT,4EAHiD;AAInDO,MAAAA,YAAY,EAAE;AAJqC,KAArB,CAN3B;AAYLE,IAAAA,4BAA4B,EAAE,iCAAqB;AACjDH,MAAAA,KAAK,EAAE,gCAD0C;AAEjDN,MAAAA,WAAW,EACT,0EAH+C;AAIjDO,MAAAA,YAAY,EAAE;AAJmC,KAArB,CAZzB;AAkBLG,IAAAA,OAAO,EAAE,iCAAqB;AAC5BJ,MAAAA,KAAK,EAAE,QADqB;AAE5BN,MAAAA,WAAW,EACT,iKAH0B;AAI5BO,MAAAA,YAAY,EAAE;AAJc,KAArB;AAlBJ;AANgB,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createStaticBoolProp } from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Scroll View\",\n tag: \"ScrollView\",\n description: \"A basic ScrollView component\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n horizontal: createStaticBoolProp({\n label: \"Horizontal\",\n description: \"Render your list horizontally\",\n defaultValue: false,\n }),\n showsHorizontalScrollIndicator: createStaticBoolProp({\n label: \"Show Horizontal Scroll Indicator\",\n description:\n \"When true, shows a horizontal scroll indicator. The default value is true.\",\n defaultValue: false,\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n label: \"Show Vertical Scroll Indicator\",\n description:\n \"When true, shows a vertical scroll indicator. The default value is true.\",\n defaultValue: true,\n }),\n bounces: createStaticBoolProp({\n label: \"Bounce\",\n description:\n \"When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.\",\n defaultValue: true,\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["ScrollView.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","horizontal","label","defaultValue","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","bounces"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,aADe;AAErBC,EAAAA,GAAG,EAAE,YAFgB;AAGrBC,EAAAA,WAAW,EAAE,8BAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBA,EAAAA,MAAM,EAAE,EALa;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,UAAU,EAAE,iCAAqB;AAC7BC,MAAAA,KAAK,EAAE,YADsB;AAE7BN,MAAAA,WAAW,EAAE,+BAFgB;AAG7BO,MAAAA,YAAY,EAAE;AAHe,KAArB,CADT;AAMHC,IAAAA,8BAA8B,EAAE,iCAAqB;AACjDF,MAAAA,KAAK,EAAE,kCAD0C;AAEjDN,MAAAA,WAAW,EAAE,4EAFoC;AAGjDO,MAAAA,YAAY,EAAE;AAHmC,KAArB,CAN7B;AAWHE,IAAAA,4BAA4B,EAAE,iCAAqB;AAC/CH,MAAAA,KAAK,EAAE,gCADwC;AAE/CN,MAAAA,WAAW,EAAE,0EAFkC;AAG/CO,MAAAA,YAAY,EAAE;AAHiC,KAArB,CAX3B;AAgBHG,IAAAA,OAAO,EAAE,iCAAqB;AAC1BJ,MAAAA,KAAK,EAAE,QADmB;AAE1BN,MAAAA,WAAW,EAAE,iKAFa;AAG1BO,MAAAA,YAAY,EAAE;AAHY,KAArB;AAhBN;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createStaticBoolProp } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Scroll View\",\n tag: \"ScrollView\",\n description: \"A basic ScrollView component\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n horizontal: createStaticBoolProp({\n label: \"Horizontal\",\n description: \"Render your list horizontally\",\n defaultValue: false,\n }),\n showsHorizontalScrollIndicator: createStaticBoolProp({\n label: \"Show Horizontal Scroll Indicator\",\n description: \"When true, shows a horizontal scroll indicator. The default value is true.\",\n defaultValue: false,\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n label: \"Show Vertical Scroll Indicator\",\n description: \"When true, shows a vertical scroll indicator. The default value is true.\",\n defaultValue: true,\n }),\n bounces: createStaticBoolProp({\n label: \"Bounce\",\n description: \"When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.\",\n defaultValue: true,\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Touchable.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","layout","triggers","Triggers","OnPress","props","onPress"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,WAFkB;AAGvBC,EAAAA,WAAW,EAAE,8BAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBC,EAAAA,MAAM,EAAE,EALe;AAMvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CANa;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE;AADJ;AAPgB,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createActionProp, Triggers } from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Touchable\",\n tag: \"Touchable\",\n description: \"Simple button with no styles\",\n category: COMPONENT_TYPES.button,\n layout: {},\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n },\n};\n"]}
1
+ {"version":3,"sources":["Touchable.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","layout","triggers","Triggers","OnPress","props","onPress"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,WADe;AAErBC,EAAAA,GAAG,EAAE,WAFgB;AAGrBC,EAAAA,WAAW,EAAE,8BAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBC,EAAAA,MAAM,EAAE,EALa;AAMrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CANW;AAOrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,OAAO,EAAE;AADN;AAPc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createActionProp, Triggers } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Touchable\",\n tag: \"Touchable\",\n description: \"Simple button with no styles\",\n category: COMPONENT_TYPES.button,\n layout: {},\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.5.1-92a046.1+92a046c2",
3
+ "version": "43.5.1-9c8ce7.1+9c8ce712",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^43.5.1-92a046.1+92a046c2",
44
+ "@draftbit/types": "^43.5.1-9c8ce7.1+9c8ce712",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.1.7",
@@ -80,5 +80,5 @@
80
80
  ]
81
81
  ]
82
82
  },
83
- "gitHead": "92a046c24b95db3f63049dadc14455d78be58350"
83
+ "gitHead": "9c8ce712053653ecea3835a9e37ac51aebd211c1"
84
84
  }