@draftbit/core 43.4.1 → 43.4.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.
- package/lib/commonjs/components/DeprecatedFAB.js +4 -20
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/Divider.js +3 -13
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/FAB.js +19 -5
- package/lib/commonjs/components/FAB.js.map +1 -1
- package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
- package/lib/commonjs/components/HeaderOverline.js.map +1 -1
- package/lib/commonjs/components/Justification.js +1 -2
- package/lib/commonjs/components/LinearGradient.js +52 -0
- package/lib/commonjs/components/LinearGradient.js.map +1 -0
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/LinearGradient.js +63 -11
- package/lib/commonjs/mappings/LinearGradient.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/mappings/RowHeadlineImageIcon.js.map +1 -1
- package/lib/module/components/LinearGradient.js +38 -0
- package/lib/module/components/LinearGradient.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/LinearGradient.js +64 -12
- package/lib/module/mappings/LinearGradient.js.map +1 -1
- package/lib/typescript/src/components/LinearGradient.d.ts +15 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/LinearGradient.d.ts +79 -6
- package/package.json +3 -2
- package/src/components/LinearGradient.js +11 -0
- package/src/components/LinearGradient.tsx +40 -0
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/LinearGradient.js +64 -12
- package/src/mappings/LinearGradient.ts +69 -13
- package/lib/commonjs/mappings/DeprecatedButton.js +0 -111
- package/lib/commonjs/mappings/DeprecatedButton.js.map +0 -1
- package/lib/commonjs/mappings/DeprecatedFAB.js +0 -147
- package/lib/commonjs/mappings/DeprecatedFAB.js.map +0 -1
- package/lib/module/mappings/DeprecatedButton.js +0 -102
- package/lib/module/mappings/DeprecatedButton.js.map +0 -1
- package/lib/module/mappings/DeprecatedFAB.js +0 -138
- package/lib/module/mappings/DeprecatedFAB.js.map +0 -1
- package/lib/typescript/src/mappings/DeprecatedButton.d.ts +0 -89
- package/lib/typescript/src/mappings/DeprecatedFAB.d.ts +0 -178
- package/src/mappings/DeprecatedButton.js +0 -106
- package/src/mappings/DeprecatedButton.ts +0 -115
- package/src/mappings/DeprecatedFAB.js +0 -146
- package/src/mappings/DeprecatedFAB.ts +0 -153
|
@@ -27,6 +27,8 @@ 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
|
+
|
|
30
32
|
const FAB = _ref => {
|
|
31
33
|
let {
|
|
32
34
|
Icon,
|
|
@@ -128,7 +130,7 @@ const FAB = _ref => {
|
|
|
128
130
|
style: [{
|
|
129
131
|
elevation
|
|
130
132
|
}, style]
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
133
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
132
134
|
onPress: onPress,
|
|
133
135
|
accessibilityState: {
|
|
134
136
|
disabled
|
|
@@ -136,7 +138,7 @@ const FAB = _ref => {
|
|
|
136
138
|
accessibilityRole: "button",
|
|
137
139
|
disabled: disabled || loading,
|
|
138
140
|
style: buttonStyles
|
|
139
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
141
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: styles.content
|
|
141
143
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
144
|
style: iconStyle
|
|
@@ -179,23 +181,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
179
181
|
|
|
180
182
|
var _default = (0, _theming.withTheme)(FAB);
|
|
181
183
|
|
|
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
|
-
|
|
200
184
|
exports.default = _default;
|
|
201
185
|
//# sourceMappingURL=DeprecatedFAB.js.map
|
|
@@ -1 +1 @@
|
|
|
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,SAAS,GAAG,oBAAMP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AU,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
|
+
{"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;;AACA;;AACA;;AACA;;;;;;;;;;AAuDA,MAAMA,GAAoB,GAAG,QAavB;AAAA,MAbwB;AAC5BC,IAAAA,IAD4B;AAE5BC,IAAAA,IAF4B;AAG5BC,IAAAA,QAAQ,GAAG,KAHiB;AAI5BC,IAAAA,IAAI,GAAG,OAJqB;AAK5BC,IAAAA,OAAO,GAAG,KALkB;AAM5BC,IAAAA,KAAK,EAAEC,aANqB;AAO5BC,IAAAA,KAP4B;AAQ5BC,IAAAA,OAR4B;AAS5BC,IAAAA,SAAS,GAAG,CATgB;AAU5BC,IAAAA,KAV4B;AAW5BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAXqB;AAY5B,OAAGC;AAZyB,GAaxB;AACJ,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AAEA,MAAInB,IAAI,KAAK,UAAT,IAAuBA,IAAI,KAAK,UAAhC,IAA8CA,IAAI,KAAK,OAA3D,EAAoE;AAClEc,IAAAA,eAAe,GAAGI,WAAlB;;AAEA,QAAInB,QAAJ,EAAc;AACZiB,MAAAA,SAAS,GAAG,oBAAMP,MAAM,CAACW,OAAb,EAAsBC,KAAtB,CAA4BX,eAA5B,EAA6CY,GAA7C,GAAmDC,MAAnD,EAAZ;AACD,KAFD,MAEO;AACLP,MAAAA,SAAS,GAAGP,MAAM,CAACW,OAAnB;AACD;AACF,GARD,MAQO;AACLN,IAAAA,eAAe,GAAG,aAAlB;;AAEA,QAAIf,QAAJ,EAAc;AAC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;AAHT,IADF,CADD,GAQG,IATN,EAUGf,OAAO,gBACN,oBAAC,8BAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,KAAK,EAAEe,SAFT;AAGE,IAAA,KAAK,EAAEqB;AAHT,IADM,GAMJ,IAhBN,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"]}
|
|
@@ -15,6 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
+
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); }
|
|
19
|
+
|
|
18
20
|
const Divider = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
style,
|
|
@@ -24,19 +26,7 @@ const Divider = _ref => {
|
|
|
24
26
|
},
|
|
25
27
|
...rest
|
|
26
28
|
} = _ref;
|
|
27
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
-
style: [{
|
|
29
|
-
backgroundColor: color || colors.divider,
|
|
30
|
-
height: _reactNative.StyleSheet.hairlineWidth
|
|
31
|
-
}, style],
|
|
32
|
-
...rest
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var _default = (0, _theming.withTheme)(Divider);
|
|
37
|
-
|
|
38
|
-
exports.default = _default;
|
|
39
|
-
//# sourceMappingURL=Divider.js.map /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
40
30
|
style: [{
|
|
41
31
|
backgroundColor: color || colors.divider,
|
|
42
32
|
height: _reactNative.StyleSheet.hairlineWidth
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Divider.
|
|
1
|
+
{"version":3,"sources":["Divider.tsx"],"names":["Divider","style","color","theme","colors","rest","backgroundColor","divider","height","StyleSheet","hairlineWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AASA,MAAMA,OAAwB,GAAG,QAK3B;AAAA,MAL4B;AAChCC,IAAAA,KADgC;AAEhCC,IAAAA,KAFgC;AAGhCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAHyB;AAIhC,OAAGC;AAJ6B,GAK5B;AACJ,sBACE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACL;AACEC,MAAAA,eAAe,EAAEJ,KAAK,IAAIE,MAAM,CAACG,OADnC;AAEEC,MAAAA,MAAM,EAAEC,wBAAWC;AAFrB,KADK,EAKLT,KALK;AADT,KAQMI,IARN,EADF;AAYD,CAlBD;;eAoBe,wBAAUL,OAAV,C","sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n color?: string;\n theme: typeof theme;\n};\n\nconst Divider: React.FC<Props> = ({\n style,\n color,\n theme: { colors },\n ...rest\n}) => {\n return (\n <View\n style={[\n {\n backgroundColor: color || colors.divider,\n height: StyleSheet.hairlineWidth,\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nexport default withTheme(Divider);\n"]}
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const FAB = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
onPress,
|
|
@@ -40,7 +38,7 @@ const FAB = _ref => {
|
|
|
40
38
|
borderRadius: size / 2,
|
|
41
39
|
overflow: "hidden"
|
|
42
40
|
}, style]
|
|
43
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
44
42
|
onPress: onPress,
|
|
45
43
|
disabled: loading || disabled,
|
|
46
44
|
android_ripple: {
|
|
@@ -58,8 +56,9 @@ const FAB = _ref => {
|
|
|
58
56
|
borderRadius: size / 2,
|
|
59
57
|
backgroundColor
|
|
60
58
|
}];
|
|
61
|
-
}
|
|
62
|
-
|
|
59
|
+
},
|
|
60
|
+
...props
|
|
61
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
63
62
|
style: size > 50 ? {
|
|
64
63
|
marginTop: 2,
|
|
65
64
|
marginLeft: 2
|
|
@@ -89,5 +88,20 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
89
88
|
|
|
90
89
|
var _default = (0, _theming.withTheme)(FAB);
|
|
91
90
|
|
|
91
|
+
exports.default = _default;
|
|
92
|
+
//# sourceMappingURL=FAB.js.map backgroundColor: "#5a45ff",
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
..._reactNative.Platform.select({
|
|
96
|
+
web: {
|
|
97
|
+
cursor: "pointer",
|
|
98
|
+
userSelect: "none"
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
105
|
+
|
|
92
106
|
exports.default = _default;
|
|
93
107
|
//# sourceMappingURL=FAB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FAB.
|
|
1
|
+
{"version":3,"sources":["FAB.js"],"names":["FAB","onPress","disabled","loading","iconName","style","theme","iconColor","bgColor","size","Icon","props","backgroundColor","colors","primary","color","React","createElement","View","width","height","borderRadius","overflow","Pressable","android_ripple","radius","pressed","styles","button","opacity","ActivityIndicator","marginTop","marginLeft","undefined","name","StyleSheet","create","justifyContent","alignItems","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,GAAG,GAAG,QAAiI;AAAA,MAAhI;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,QAAX;AAAqBC,IAAAA,OAArB;AAA8BC,IAAAA,QAAQ,GAAG,mBAAzC;AAA8DC,IAAAA,KAA9D;AAAqEC,IAAAA,KAArE;AAA4EC,IAAAA,SAA5E;AAAuFC,IAAAA,OAAvF;AAAgGC,IAAAA,IAAI,GAAG,EAAvG;AAA2GC,IAAAA,IAA3G;AAAiH,OAAGC;AAApH,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E,CAAb;AAAgBC,MAAAA,UAAU,EAAE;AAA5B,KAAZ,GAA8CC,SAAvD;AAAkExB,IAAAA,IAAI,EAAEA,IAAI,IAAI,EAAR,GAAa,OAAb,GAAuB,OAA/F;AAAwGM,IAAAA,KAAK,EAAEA;AAA/G,GAAvC,CAAJ,gBAAuKC,KAAK,CAACC,aAAN,CAAoBP,IAApB,EAA0B;AAAEwB,IAAAA,IAAI,EAAE9B,QAAR;AAAkBK,IAAAA,IAAI,EAAEA,IAAxB;AAA8BM,IAAAA,KAAK,EAAEA;AAArC,GAA1B,CAA9M,CAfJ,CATI,CAAR;AAyBH,CA5BD;;AA6BA,MAAMY,MAAM,GAAGQ,wBAAWC,MAAX,CAAkB;AAC7BR,EAAAA,MAAM,EAAE;AACJhB,IAAAA,eAAe,EAAE,SADb;AAEJyB,IAAAA,cAAc,EAAE,QAFZ;AAGJC,IAAAA,UAAU,EAAE,QAHR;AAIJ,OAAGC,sBAASC,MAAT,CAAgB;AACfC,MAAAA,GAAG,EAAE;AACDC,QAAAA,MAAM,EAAE,SADP;AAEDC,QAAAA,UAAU,EAAE;AAFX;AADU,KAAhB;AAJC;AADqB,CAAlB,CAAf;;eAae,wBAAU3C,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, Pressable, ActivityIndicator, Platform, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ onPress, disabled, loading, iconName = \"MaterialIcons/add\", style, theme, iconColor, bgColor, size = 50, Icon, ...props }) => {\n const backgroundColor = bgColor || theme.colors.primary;\n const color = iconColor || \"#FFF\";\n return (React.createElement(View, { style: [\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n overflow: \"hidden\",\n },\n style,\n ] },\n React.createElement(Pressable, { onPress: onPress, disabled: loading || disabled, android_ripple: {\n color: \"#333\",\n radius: size / 4,\n }, style: ({ pressed }) => {\n return [\n styles.button,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor,\n },\n ];\n }, ...props },\n React.createElement(View, null, loading ? (React.createElement(ActivityIndicator, { style: size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined, size: size <= 50 ? \"small\" : \"large\", color: color })) : (React.createElement(Icon, { name: iconName, size: size, color: color }))))));\n};\nconst styles = StyleSheet.create({\n button: {\n backgroundColor: \"#5a45ff\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\nexport default withTheme(FAB);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FieldSearchBarFull.
|
|
1
|
+
{"version":3,"sources":["FieldSearchBarFull.js"],"names":["FieldSearchBarFull","showIcon","Icon","icon","placeholder","style","theme","colors","typography","onChange","changeOverride","onSubmit","submitOverride","value","defaultValue","focused","setIsFocused","React","useState","onBlur","internalValue","setInternalValue","useEffect","useCallback","text","onFocus","e","lineHeight","typeStyles","body2","handleChangeText","newValue","createElement","View","styles","container","name","size","Config","fieldSearchBarFullIconSize","color","primary","light","marginLeft","flex","TextInput","clearButtonMode","onChangeText","onSubmitEditing","placeholderTextColor","medium","StyleSheet","create","flexDirection","alignItems"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,kBAAkB,GAAG,QAA2K;AAAA,MAA1K;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,IAAZ;AAAkBC,IAAAA,IAAI,GAAG,QAAzB;AAAmCC,IAAAA,WAAW,GAAG,EAAjD;AAAqDC,IAAAA,KAArD;AAA4DC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAnE;AAA2FC,IAAAA,QAAQ,EAAEC,cAArG;AAAqHC,IAAAA,QAAQ,EAAEC,cAA/H;AAA+IC,IAAAA,KAA/I;AAAsJC,IAAAA;AAAtJ,GAA0K;AAClM,QAAM,CAACC,OAAD,EAAUC,YAAV,I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":["import * as React from \"react\";\nimport { View, TextInput, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst FieldSearchBarFull = ({ showIcon, Icon, icon = \"search\", placeholder = \"\", style, theme: { colors, typography }, onChange: changeOverride, onSubmit: submitOverride, value, defaultValue, }) => {\n const [focused, setIsFocused] = React.useState(false);\n const onBlur = () => {\n setIsFocused(false);\n };\n const [internalValue, setInternalValue] = React.useState(value || defaultValue);\n React.useEffect(() => {\n if (value != null) {\n setInternalValue(value);\n }\n }, [value]);\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n const onChange = React.useCallback((text) => {\n changeOverride && changeOverride(text);\n }, [changeOverride]);\n const onFocus = () => {\n setIsFocused(true);\n };\n const onSubmit = (e) => {\n submitOverride && submitOverride(e);\n };\n const { lineHeight, ...typeStyles } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars\n const handleChangeText = (newValue) => {\n setInternalValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n };\n return (React.createElement(View, { style: [styles.container, style] },\n showIcon && (React.createElement(Icon, { name: icon, size: Config.fieldSearchBarFullIconSize, color: focused ? colors.primary : colors.light })),\n React.createElement(View, { style: { marginLeft: showIcon ? 12 : 0, flex: 1 } },\n React.createElement(TextInput, { clearButtonMode: \"while-editing\", placeholder: placeholder, value: internalValue, onBlur: onBlur, onFocus: onFocus, onChangeText: handleChangeText, onSubmitEditing: onSubmit, placeholderTextColor: colors.light, style: [\n {\n color: colors.medium,\n },\n typeStyles,\n ] }))));\n};\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n});\nexport default withTheme(FieldSearchBarFull);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["HeaderOverline.
|
|
1
|
+
{"version":3,"sources":["HeaderOverline.tsx"],"names":["HeaderOverline","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","overline","light","toUpperCase"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;;;;;;;AAYA,MAAMA,cAA+B,GAAG,QAQlC;AAAA,MARmC;AACvCC,IAAAA,IADuC;AAEvCC,IAAAA,KAFuC;AAGvCC,IAAAA,UAHuC;AAIvCC,IAAAA,IAJuC;AAKvCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CALqB;AAMvCC,IAAAA,KANuC;AAOvCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAPgC,GAQnC;AACJ,sBACE,oBAAC,eAAD;AACE,IAAA,IAAI,EAAER,IADR;AAEE,IAAA,cAAc,EAAEQ,UAAU,CAACC,QAF7B;AAGE,IAAA,UAAU,EAAEF,MAAM,CAACG,KAHrB;AAIE,IAAA,KAAK,EAAET,KAAK,IAAIA,KAAK,CAACU,WAAN,EAJlB;AAKE,IAAA,UAAU,EAAET,UALd;AAME,IAAA,IAAI,EAAEC,IANR;AAOE,IAAA,gBAAgB,EAAE,EAPpB;AAQE,IAAA,OAAO,EAAEC,OARX;AASE,IAAA,KAAK,EAAEC;AATT,IADF;AAaD,CAtBD;;eAwBe,wBAAUN,cAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderOverline: React.FC<Props> = ({\n Icon,\n title,\n buttonText,\n icon,\n onPress = () => {},\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Header\n Icon={Icon}\n titleTypeStyle={typography.overline}\n titleColor={colors.light}\n title={title && title.toUpperCase()}\n buttonText={buttonText}\n icon={icon}\n dividerTopMargin={12}\n onPress={onPress}\n style={style}\n />\n );\n};\n\nexport default withTheme(HeaderOverline);\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _expoLinearGradient = require("expo-linear-gradient");
|
|
11
|
+
|
|
12
|
+
var _utilities = require("../utilities");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
const LinearGradientComponent = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
children,
|
|
21
|
+
color1,
|
|
22
|
+
color2,
|
|
23
|
+
color3 = undefined,
|
|
24
|
+
startX = 0,
|
|
25
|
+
startY = 0,
|
|
26
|
+
endX = 100,
|
|
27
|
+
endY = 100,
|
|
28
|
+
style
|
|
29
|
+
} = _ref;
|
|
30
|
+
const {
|
|
31
|
+
viewStyles
|
|
32
|
+
} = (0, _utilities.extractStyles)(style);
|
|
33
|
+
const colors = [color1, color2, color3].filter(color => color);
|
|
34
|
+
const start = {
|
|
35
|
+
x: startX / 100,
|
|
36
|
+
y: startY / 100
|
|
37
|
+
};
|
|
38
|
+
const end = {
|
|
39
|
+
x: endX / 100,
|
|
40
|
+
y: endY / 100
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/React.createElement(_expoLinearGradient.LinearGradient, {
|
|
43
|
+
colors: colors,
|
|
44
|
+
start: start,
|
|
45
|
+
end: end,
|
|
46
|
+
style: viewStyles
|
|
47
|
+
}, children);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var _default = LinearGradientComponent;
|
|
51
|
+
exports.default = _default;
|
|
52
|
+
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LinearGradient.tsx"],"names":["LinearGradientComponent","children","color1","color2","color3","undefined","startX","startY","endX","endY","style","viewStyles","colors","filter","color","start","x","y","end"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;;;AAcA,MAAMA,uBAAuB,GAAG,QAUI;AAAA,MAVH;AAC/BC,IAAAA,QAD+B;AAE/BC,IAAAA,MAF+B;AAG/BC,IAAAA,MAH+B;AAI/BC,IAAAA,MAAM,GAAGC,SAJsB;AAK/BC,IAAAA,MAAM,GAAG,CALsB;AAM/BC,IAAAA,MAAM,GAAG,CANsB;AAO/BC,IAAAA,IAAI,GAAG,GAPwB;AAQ/BC,IAAAA,IAAI,GAAG,GARwB;AAS/BC,IAAAA;AAT+B,GAUG;AAClC,QAAM;AAAEC,IAAAA;AAAF,MAAiB,8BAAcD,KAAd,CAAvB;AACA,QAAME,MAAM,GAAG,CAACV,MAAD,EAASC,MAAT,EAAiBC,MAAjB,EAAyBS,MAAzB,CAAiCC,KAAD,IAAWA,KAA3C,CAAf;AACA,QAAMC,KAAK,GAAG;AAAEC,IAAAA,CAAC,EAAEV,MAAM,GAAG,GAAd;AAAmBW,IAAAA,CAAC,EAAEV,MAAM,GAAG;AAA/B,GAAd;AACA,QAAMW,GAAG,GAAG;AAAEF,IAAAA,CAAC,EAAER,IAAI,GAAG,GAAZ;AAAiBS,IAAAA,CAAC,EAAER,IAAI,GAAG;AAA3B,GAAZ;AACA,sBACE,oBAAC,kCAAD;AAAgB,IAAA,MAAM,EAAEG,MAAxB;AAAgC,IAAA,KAAK,EAAEG,KAAvC;AAA8C,IAAA,GAAG,EAAEG,GAAnD;AAAwD,IAAA,KAAK,EAAEP;AAA/D,KACGV,QADH,CADF;AAKD,CApBD;;eAsBeD,uB","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport { LinearGradient } from \"expo-linear-gradient\";\nimport { extractStyles } from \"../utilities\";\n\ntype LinearGradientComponentProps = {\n color1: string;\n color2: string;\n color3?: string;\n startX: number;\n startY: number;\n endX: number;\n endY: number;\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst LinearGradientComponent = ({\n children,\n color1,\n color2,\n color3 = undefined,\n startX = 0,\n startY = 0,\n endX = 100,\n endY = 100,\n style,\n}: LinearGradientComponentProps) => {\n const { viewStyles } = extractStyles(style);\n const colors = [color1, color2, color3].filter((color) => color) as string[];\n const start = { x: startX / 100, y: startY / 100 };\n const end = { x: endX / 100, y: endY / 100 };\n return (\n <LinearGradient colors={colors} start={start} end={end} style={viewStyles}>\n {children}\n </LinearGradient>\n );\n};\n\nexport default LinearGradientComponent;\n"]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -201,6 +201,12 @@ Object.defineProperty(exports, "Image", {
|
|
|
201
201
|
return _Image.default;
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
|
+
Object.defineProperty(exports, "LinearGradient", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () {
|
|
207
|
+
return _LinearGradient.default;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
204
210
|
Object.defineProperty(exports, "Link", {
|
|
205
211
|
enumerable: true,
|
|
206
212
|
get: function () {
|
|
@@ -452,6 +458,8 @@ var _Touchable = _interopRequireDefault(require("./components/Touchable"));
|
|
|
452
458
|
|
|
453
459
|
var _Accordion = require("./components/Accordion");
|
|
454
460
|
|
|
461
|
+
var _LinearGradient = _interopRequireDefault(require("./components/LinearGradient"));
|
|
462
|
+
|
|
455
463
|
var _ActionSheet = require("./components/ActionSheet");
|
|
456
464
|
|
|
457
465
|
var _Swiper = require("./components/Swiper");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AASA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport { default as LinearGradient } from \"./components/LinearGradient\";\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"]}
|
|
@@ -10,20 +10,72 @@ var _types = require("@draftbit/types");
|
|
|
10
10
|
const SEED_DATA = {
|
|
11
11
|
name: "Linear Gradient",
|
|
12
12
|
tag: "LinearGradient",
|
|
13
|
-
|
|
14
|
-
code_link: "https://github.com/expo/expo/blob/master/packages/expo/src/effects/LinearGradient.d.ts",
|
|
15
|
-
category: _types.COMPONENT_TYPES.layout,
|
|
16
|
-
supports_list_render: false,
|
|
17
|
-
layout: {},
|
|
13
|
+
description: "Linear Gradient Component",
|
|
18
14
|
props: {
|
|
19
|
-
|
|
15
|
+
color1: (0, _types.createColorProp)({
|
|
16
|
+
label: "Color 1"
|
|
17
|
+
}),
|
|
18
|
+
color2: (0, _types.createColorProp)({
|
|
19
|
+
label: "Color 2"
|
|
20
|
+
}),
|
|
21
|
+
color3: (0, _types.createColorProp)({
|
|
22
|
+
label: "Color 3"
|
|
23
|
+
}),
|
|
24
|
+
startX: {
|
|
20
25
|
group: _types.GROUPS.basic,
|
|
21
|
-
label: "
|
|
22
|
-
description: "
|
|
26
|
+
label: "Start X",
|
|
27
|
+
description: "Start position from Left",
|
|
23
28
|
editable: true,
|
|
24
|
-
required:
|
|
25
|
-
defaultValue:
|
|
26
|
-
|
|
29
|
+
required: false,
|
|
30
|
+
defaultValue: 0,
|
|
31
|
+
min: 0,
|
|
32
|
+
max: 100,
|
|
33
|
+
step: 1,
|
|
34
|
+
precision: 0,
|
|
35
|
+
formType: _types.FORM_TYPES.number,
|
|
36
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
37
|
+
},
|
|
38
|
+
startY: {
|
|
39
|
+
group: _types.GROUPS.basic,
|
|
40
|
+
label: "Start Y",
|
|
41
|
+
description: "Start position from Top",
|
|
42
|
+
editable: true,
|
|
43
|
+
required: false,
|
|
44
|
+
defaultValue: 0,
|
|
45
|
+
min: 0,
|
|
46
|
+
max: 100,
|
|
47
|
+
step: 1,
|
|
48
|
+
precision: 0,
|
|
49
|
+
formType: _types.FORM_TYPES.number,
|
|
50
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
51
|
+
},
|
|
52
|
+
endX: {
|
|
53
|
+
group: _types.GROUPS.basic,
|
|
54
|
+
label: "End Y",
|
|
55
|
+
description: "End position from Right",
|
|
56
|
+
editable: true,
|
|
57
|
+
required: false,
|
|
58
|
+
defaultValue: 100,
|
|
59
|
+
min: 0,
|
|
60
|
+
max: 100,
|
|
61
|
+
step: 1,
|
|
62
|
+
precision: 0,
|
|
63
|
+
formType: _types.FORM_TYPES.number,
|
|
64
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
65
|
+
},
|
|
66
|
+
endY: {
|
|
67
|
+
group: _types.GROUPS.basic,
|
|
68
|
+
label: "End Y",
|
|
69
|
+
description: "End position from Bottom",
|
|
70
|
+
editable: true,
|
|
71
|
+
required: false,
|
|
72
|
+
defaultValue: 100,
|
|
73
|
+
min: 0,
|
|
74
|
+
max: 100,
|
|
75
|
+
step: 1,
|
|
76
|
+
precision: 0,
|
|
77
|
+
formType: _types.FORM_TYPES.number,
|
|
78
|
+
propType: _types.PROP_TYPES.NUMBER
|
|
27
79
|
}
|
|
28
80
|
}
|
|
29
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["LinearGradient.ts"],"names":["SEED_DATA","name","tag","
|
|
1
|
+
{"version":3,"sources":["LinearGradient.ts"],"names":["SEED_DATA","name","tag","description","props","color1","label","color2","color3","startX","group","GROUPS","basic","editable","required","defaultValue","min","max","step","precision","formType","FORM_TYPES","number","propType","PROP_TYPES","NUMBER","startY","endX","endY"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,iBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,2BAHU;AAIvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,4BAAgB;AACtBC,MAAAA,KAAK,EAAE;AADe,KAAhB,CADH;AAILC,IAAAA,MAAM,EAAE,4BAAgB;AACtBD,MAAAA,KAAK,EAAE;AADe,KAAhB,CAJH;AAOLE,IAAAA,MAAM,EAAE,4BAAgB;AACtBF,MAAAA,KAAK,EAAE;AADe,KAAhB,CAPH;AAULG,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAEC,cAAOC,KADR;AAENN,MAAAA,KAAK,EAAE,SAFD;AAGNH,MAAAA,WAAW,EAAE,0BAHP;AAINU,MAAAA,QAAQ,EAAE,IAJJ;AAKNC,MAAAA,QAAQ,EAAE,KALJ;AAMNC,MAAAA,YAAY,EAAE,CANR;AAONC,MAAAA,GAAG,EAAE,CAPC;AAQNC,MAAAA,GAAG,EAAE,GARC;AASNC,MAAAA,IAAI,EAAE,CATA;AAUNC,MAAAA,SAAS,EAAE,CAVL;AAWNC,MAAAA,QAAQ,EAAEC,kBAAWC,MAXf;AAYNC,MAAAA,QAAQ,EAAEC,kBAAWC;AAZf,KAVH;AAwBLC,IAAAA,MAAM,EAAE;AACNhB,MAAAA,KAAK,EAAEC,cAAOC,KADR;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AXjB;AAYJC,MAAAA,QAAQ,EAAEC,kBAAWC;AAZjB;AApDD;AAJgB,CAAlB","sourcesContent":["import {\n createColorProp,\n FORM_TYPES,\n GROUPS,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Linear Gradient\",\n tag: \"LinearGradient\",\n description: \"Linear Gradient Component\",\n props: {\n color1: createColorProp({\n label: \"Color 1\",\n }),\n color2: createColorProp({\n label: \"Color 2\",\n }),\n color3: createColorProp({\n label: \"Color 3\",\n }),\n startX: {\n group: GROUPS.basic,\n label: \"Start X\",\n description: \"Start position from Left\",\n editable: true,\n required: false,\n defaultValue: 0,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n startY: {\n group: GROUPS.basic,\n label: \"Start Y\",\n description: \"Start position from Top\",\n editable: true,\n required: false,\n defaultValue: 0,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n endX: {\n group: GROUPS.basic,\n label: \"End Y\",\n description: \"End position from Right\",\n editable: true,\n required: false,\n defaultValue: 100,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n endY: {\n group: GROUPS.basic,\n label: \"End Y\",\n description: \"End position from Bottom\",\n editable: true,\n required: false,\n defaultValue: 100,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n },\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonGroup.
|
|
1
|
+
{"version":3,"sources":["RadioButtonGroup.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","Triggers","OnValueChange","props","direction","fieldName","handlerPropName","valuePropName","defaultValue"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,oBADiB;AAEvBC,EAAAA,GAAG,EAAE,kBAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,aAAV,CALa;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,iCADN;AAELC,IAAAA,SAAS,EAAE,gCAAoB;AAC7BC,MAAAA,eAAe,EAAE,eADY;AAE7BC,MAAAA,aAAa,EAAE,OAFc;AAG7BC,MAAAA,YAAY,EAAE;AAHe,KAApB;AAFN;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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonRow.
|
|
1
|
+
{"version":3,"sources":["RadioButtonRow.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","description","required","defaultValue","direction","options","value","color","group","GROUPS","basic","unselectedColor"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,kBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE,qCAFO;AAGpBC,MAAAA,QAAQ,EAAE,IAHU;AAIpBC,MAAAA,YAAY,EAAE;AAJM,KAAf,CADF;AAOLC,IAAAA,SAAS,EAAE,+BAAmB;AAC5BJ,MAAAA,KAAK,EAAE,WADqB;AAE5BC,MAAAA,WAAW,EACT,8DAH0B;AAI5BI,MAAAA,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;AAJmB,KAAnB,CAPN;AAaLC,IAAAA,KAAK,EAAE,2BAAe;AACpBN,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE,2BAFO;AAGpBE,MAAAA,YAAY,EAAE,IAHM;AAIpBD,MAAAA,QAAQ,EAAE;AAJU,KAAf,CAbF;AAmBLK,IAAAA,KAAK,EAAE,4BAAgB;AACrBC,MAAAA,KAAK,EAAEC,cAAOC,KADO;AAErBT,MAAAA,WAAW,EAAE,sBAFQ;AAGrBE,MAAAA,YAAY,EAAE;AAHO,KAAhB,CAnBF;AAwBLQ,IAAAA,eAAe,EAAE,4BAAgB;AAC/BH,MAAAA,KAAK,EAAEC,cAAOC,KADiB;AAE/BV,MAAAA,KAAK,EAAE,kBAFwB;AAG/BC,MAAAA,WAAW,EAAE,iCAHkB;AAI/BE,MAAAA,YAAY,EAAE;AAJiB,KAAhB;AAxBZ;AALgB,CAAlB","sourcesContent":["import {\n createTextProp,\n createTextEnumProp,\n COMPONENT_TYPES,\n createColorProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description:\n \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n },\n};\n"]}
|