@draftbit/core 44.1.5 → 44.1.7-a27122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/Text.js +20 -5
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/Config.js.map +1 -1
- package/lib/module/components/Elevation.js +4 -15
- package/lib/module/components/Elevation.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Accordion/AccordionItem.tsx +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.tsx"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;;;;;;;;;AAWA,MAAMA,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcL,KAAd,CAAnC;
|
|
1
|
+
{"version":3,"sources":["AccordionItem.tsx"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;;;;;;;;;AAWA,MAAMA,a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,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT;AAbsB,CAAlB,CAAf;;eAmBe,wBAAUzB,aAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(AccordionItem);\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
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
19
|
|
|
22
20
|
class Text extends React.Component {
|
|
@@ -36,7 +34,7 @@ class Text extends React.Component {
|
|
|
36
34
|
...rest
|
|
37
35
|
} = this.props;
|
|
38
36
|
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
39
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text,
|
|
37
|
+
return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
|
|
40
38
|
ref: c => {
|
|
41
39
|
this._root = c;
|
|
42
40
|
},
|
|
@@ -44,7 +42,7 @@ class Text extends React.Component {
|
|
|
44
42
|
textAlign: "left",
|
|
45
43
|
writingDirection
|
|
46
44
|
}, style]
|
|
47
|
-
})
|
|
45
|
+
});
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
}
|
|
@@ -56,7 +54,24 @@ const BaseLink = _ref => {
|
|
|
56
54
|
title,
|
|
57
55
|
...props
|
|
58
56
|
} = _ref;
|
|
59
|
-
return /*#__PURE__*/React.createElement(Text,
|
|
57
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
58
|
+
hitSlop: 8,
|
|
59
|
+
style: [{
|
|
60
|
+
color: theme.colors.primary
|
|
61
|
+
}, style],
|
|
62
|
+
theme: theme,
|
|
63
|
+
...props
|
|
64
|
+
}, title);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.BaseLink = BaseLink;
|
|
68
|
+
const Link = (0, _theming.withTheme)(BaseLink);
|
|
69
|
+
exports.Link = Link;
|
|
70
|
+
|
|
71
|
+
var _default = (0, _theming.withTheme)(Text);
|
|
72
|
+
|
|
73
|
+
exports.default = _default;
|
|
74
|
+
//# sourceMappingURL=Text.js.mapnds({
|
|
60
75
|
hitSlop: 8,
|
|
61
76
|
style: [{
|
|
62
77
|
color: theme.colors.primary
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Text.
|
|
1
|
+
{"version":3,"sources":["Text.js"],"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","createElement","NativeText","ref","c","textAlign","BaseLink","theme","title","hitSlop","color","colors","primary","Link"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAAmC;AAAA;AAAA;;AAAA;AAAA;;AAE/BC,EAAAA,cAAc,CAACC,IAAD,EAAO;AACjB,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACH;;AACDE,EAAAA,MAAM,GAAG;AACL,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AACA,wBAAQX,KAAK,CAACY,aAAN,CAAoBC,iBAApB,EAAgC,EAAE,GAAGN,IAAL;AAAWO,MAAAA,GAAG,EAAGC,CAAD,IAAO;AACvD,aAAKX,KAAL,GAAaW,CAAb;AACH,OAFmC;AAEjCT,MAAAA,KAAK,EAAE,CACN;AACIU,QAAAA,SAAS,EAAE,MADf;AAEIP,QAAAA;AAFJ,OADM,EAKNH,KALM;AAF0B,KAAhC,CAAR;AASH;;AAjB8B;;AAmB5B,MAAMW,QAAQ,GAAG,QAAuC;AAAA,MAAtC;AAAEX,IAAAA,KAAF;AAASY,IAAAA,KAAT;AAAgBC,IAAAA,KAAhB;AAAuB,OAAGX;AAA1B,GAAsC;AAC3D,sBAAQR,KAAK,CAACY,aAAN,CAAoBb,IAApB,EAA0B;AAAEqB,IAAAA,OAAO,EAAE,CAAX;AAAcd,IAAAA,KAAK,EAAE,CAAC;AAAEe,MAAAA,KAAK,EAAEH,KAAK,CAACI,MAAN,CAAaC;AAAtB,KAAD,EAAkCjB,KAAlC,CAArB;AAA+DY,IAAAA,KAAK,EAAEA,KAAtE;AAA6E,OAAGV;AAAhF,GAA1B,EAAmHW,KAAnH,CAAR;AACH,CAFM;;;AAGP,MAAMK,IAAI,GAAG,wBAAUP,QAAV,CAAb;;;eAEe,wBAAUlB,IAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager } from \"react-native\";\nimport { withTheme } from \"../theming\";\nclass Text extends React.Component {\n _root;\n setNativeProps(args) {\n return this._root && this._root.setNativeProps(args);\n }\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n return (React.createElement(NativeText, { ...rest, ref: (c) => {\n this._root = c;\n }, style: [\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ] }));\n }\n}\nexport const BaseLink = ({ style, theme, title, ...props }) => {\n return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary }, style], theme: theme, ...props }, title));\n};\nconst Link = withTheme(BaseLink);\nexport { Link };\nexport default withTheme(Text);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetItem.
|
|
1
|
+
{"version":3,"sources":["ActionSheetItem.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","label","group","GROUPS","basic","defaultValue","color"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,mBADe;AAErBC,EAAAA,GAAG,EAAE,iBAFgB;AAGrBC,EAAAA,WAAW,EAAE,mBAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJL;AAKrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALW;AAMrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,SAAS,EAAE;AADP,GANa;AASrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,OAAO,EAAE,8BADN;AAEHC,IAAAA,KAAK,EAAE,2BAAe;AAClBC,MAAAA,KAAK,EAAEC,cAAOC,KADI;AAElBH,MAAAA,KAAK,EAAE,OAFW;AAGlBI,MAAAA,YAAY,EAAE;AAHI,KAAf,CAFJ;AAOHC,IAAAA,KAAK,EAAE,4BAAgB;AACnBL,MAAAA,KAAK,EAAE,YADY;AAEnBI,MAAAA,YAAY,EAAE;AAFK,KAAhB;AAPJ;AATc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createActionProp, createColorProp, createTextProp, GROUPS, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n defaultValue: \"strong\",\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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":["AccordionItem.tsx"],"names":["React","Pressable","StyleSheet","View","Text","extractStyles","withTheme","AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,SADF,EAEEC,UAFF,EAGEC,IAHF,QAMO,cANP;AAQA,OAAOC,IAAP,MAAiB,SAAjB;AAEA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,SAAT,QAA0B,eAA1B;;AAWA,MAAMC,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BX,aAAa,CAACM,KAAD,CAAhD;
|
|
1
|
+
{"version":3,"sources":["AccordionItem.tsx"],"names":["React","Pressable","StyleSheet","View","Text","extractStyles","withTheme","AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,SADF,EAEEC,UAFF,EAGEC,IAHF,QAMO,cANP;AAQA,OAAOC,IAAP,MAAiB,SAAjB;AAEA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,SAAT,QAA0B,eAA1B;;AAWA,MAAMC,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BX,aAAa,CAACM,KAAD,CAAhD;AAEA,sBACE,oBAAC,SAAD;AAAW,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmBF,UAAnB;AAAlB,KAAsDF,IAAtD,gBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEG,MAAM,CAACE;AAApB,KACGV,IAAI,gBACH,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAE,EAFR;AAGE,IAAA,KAAK,EAAEG,SAAS,IAAIC,KAAK,CAACO,MAAN,CAAaC;AAHnC,IADG,GAMD,IAPN,eAQE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACJ,MAAM,CAACK,IAAR,EAAcL,MAAM,CAACM,OAArB;AAAb,kBACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAE,KAAlB;AAAyB,IAAA,KAAK,EAAER;AAAhC,KACGL,KADH,CADF,CARF,CADF,CADF;AAkBD,CA7BD;;AA+BA,MAAMO,MAAM,GAAGf,UAAU,CAACsB,MAAX,CAAkB;AAC/BN,EAAAA,SAAS,EAAE;AACTO,IAAAA,OAAO,EAAE;AADA,GADoB;AAI/BN,EAAAA,GAAG,EAAE;AACHO,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE,QAFT;AAGHC,IAAAA,WAAW,EAAE;AAHV,GAJ0B;AAS/BN,EAAAA,IAAI,EAAE;AACJO,IAAAA,cAAc,EAAE,CADZ;AAEJD,IAAAA,WAAW,EAAE;AAFT,GATyB;AAa/BL,EAAAA,OAAO,EAAE;AACPO,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT;AAbsB,CAAlB,CAAf;AAmBA,eAAezB,SAAS,CAACC,aAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(AccordionItem);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Config.
|
|
1
|
+
{"version":3,"sources":["Config.ts"],"names":["Dimensions","Platform","getWindowDimensions","width","height","get","windowWidth","windowHeight","getFilters","options","filters","push","join","buildImageUrl","name","getExtension","OS","avatarImageUrl","avatarImageSize","cardImageSize","cardImageUrl","cardIconSize","cardIconBackgroundOpacity","cardIconElevation","placeholderImageURL","getPlaceholderImageUrl","size","squareImageUrl","FABSize","FABBorderRadius","FABFixedHeight","cardContainerShortImageAspectRatio","rowSingleLineImageSize","rowMultiLineImageSize","rowSingleLineIconSize","rowMultiLineIconSize","headerIconSize","buttonIconSize","swiperInactiveDotSize","swiperActiveDotSize","fieldSearchBarFullIconSize","stepperButtonSize","radioButtonSize","topSafeAreaViewHeight"],"mappings":"AAAA,SAASA,UAAT,EAAqBC,QAArB,QAAqC,cAArC;;AAEA,MAAMC,mBAAmB,GAAG,MAAM;AAChC,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAoBJ,UAAU,CAACK,GAAX,CAAe,QAAf,CAA1B;AACA,SAAO;AACLC,IAAAA,WAAW,EAAEH,KADR;AAELI,IAAAA,YAAY,EAAEH;AAFT,GAAP;AAID,CAND;;AAQA,MAAM;AAAEE,EAAAA,WAAF;AAAeC,EAAAA;AAAf,IAAgCL,mBAAmB,EAAzD;;AA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EV,IAAAA,KAAK,EAAEuB,IAAI,CAACvB,KAAd;AAAqBC,IAAAA,MAAM,EAAEsB,IAAI,CAACtB;AAAlC,GADW,EAEX,qBAFW,CApBF;AAwBbuB,EAAAA,cAAc,EAAEd,aAAa,CAAC;AAAEV,IAAAA,KAAK,EAAE,GAAT;AAAcC,IAAAA,MAAM,EAAE;AAAtB,GAAD,EAA8B,QAA9B,CAxBhB;AAyBbwB,EAAAA,OAAO,EAAE,EAzBI;AA0BbC,EAAAA,eAAe,EAAE,EA1BJ;AA2BbC,EAAAA,cAAc,EAAE,EA3BH;AA4BbC,EAAAA,kCAAkC,EAAE,CA5BvB;AA6BbC,EAAAA,sBAAsB,EAAE,EA7BX;AA8BbC,EAAAA,qBAAqB,EAAE,EA9BV;AA+BbC,EAAAA,qBAAqB,EAAE,EA/BV;AAgCbC,EAAAA,oBAAoB,EAAE,EAhCT;AAiCbC,EAAAA,cAAc,EAAE,EAjCH;AAkCbC,EAAAA,cAAc,EAAE,EAlCH;AAmCbC,EAAAA,qBAAqB,EAAE,CAnCV;AAoCbC,EAAAA,mBAAmB,EAAE,EApCR;AAqCbC,EAAAA,0BAA0B,EAAE,EArCf;AAsCbC,EAAAA,iBAAiB,EAAE,EAtCN;AAuCbC,EAAAA,eAAe,EAAE,EAvCJ;AAwCbC,EAAAA,qBAAqB,EAAE,CAxCV,CAyCb;;AAzCa,CAAf","sourcesContent":["import { Dimensions, Platform } from \"react-native\";\n\nconst getWindowDimensions = () => {\n const { width, height } = Dimensions.get(\"window\");\n return {\n windowWidth: width,\n windowHeight: height,\n };\n};\n\nconst { windowWidth, windowHeight } = getWindowDimensions();\n\nconst getFilters = (options: { width: number; height: number }) => {\n const { width, height } = options;\n const filters = [\"c_scale\", \"q_auto\", \"dpr_auto\"];\n\n if (width) filters.push(`w_${width}`);\n if (height) filters.push(`h_${height}`);\n\n return filters.join(\",\");\n};\n\nconst buildImageUrl = (\n options: { width: number; height: number },\n name: string\n) => {\n const filters = getFilters(options);\n return [\n \"https://res.cloudinary.com/altos/image/upload\",\n filters,\n `${name}.png`,\n ].join(\"/\");\n};\n\nconst getExtension = () => {\n return Platform.OS === \"web\" ? \".svg\" : \".png\";\n};\n\nexport default {\n windowWidth,\n windowHeight,\n avatarImageUrl: buildImageUrl(\n {\n width: 60,\n height: 60,\n },\n \"Avatar\"\n ),\n avatarImageSize: 60,\n cardImageSize: 200,\n cardImageUrl:\n \"https://static.draftbit.com/images/placeholder-image\" + getExtension(),\n cardIconSize: 16,\n cardIconBackgroundOpacity: 0.24,\n cardIconElevation: 1,\n placeholderImageURL:\n \"https://static.draftbit.com/images/placeholder-image\" + getExtension(),\n getPlaceholderImageUrl: (size: { width: number; height: number }) =>\n buildImageUrl(\n { width: size.width, height: size.height },\n \"image-placeholder_1\"\n ),\n squareImageUrl: buildImageUrl({ width: 100, height: 100 }, \"Avatar\"),\n FABSize: 40,\n FABBorderRadius: 20,\n FABFixedHeight: 64,\n cardContainerShortImageAspectRatio: 1,\n rowSingleLineImageSize: 24,\n rowMultiLineImageSize: 48,\n rowSingleLineIconSize: 24,\n rowMultiLineIconSize: 16,\n headerIconSize: 24,\n buttonIconSize: 24,\n swiperInactiveDotSize: 6,\n swiperActiveDotSize: 10,\n fieldSearchBarFullIconSize: 24,\n stepperButtonSize: 40,\n radioButtonSize: 24,\n topSafeAreaViewHeight: 0,\n // topSafeAreaViewHeight: Platform.OS === \"android\" ? Constants.statusBarHeight : 0\n};\n"]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { Animated, StyleSheet, View } from "react-native";
|
|
3
5
|
import shadow from "../styles/shadow";
|
|
4
6
|
import { withTheme } from "../theming";
|
|
5
|
-
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
6
7
|
|
|
8
|
+
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
7
9
|
const Elevation = _ref => {
|
|
8
10
|
let {
|
|
9
11
|
style,
|
|
@@ -19,24 +21,11 @@ const Elevation = _ref => {
|
|
|
19
21
|
colors
|
|
20
22
|
} = theme;
|
|
21
23
|
const borderRadius = radius;
|
|
22
|
-
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
24
|
+
return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
|
|
23
25
|
style: [{
|
|
24
26
|
borderRadius,
|
|
25
27
|
backgroundColor: colors.surface
|
|
26
28
|
}, elevation ? shadow(elevation) : null, style]
|
|
27
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
28
|
-
style: {
|
|
29
|
-
overflow: "hidden",
|
|
30
|
-
borderRadius
|
|
31
|
-
}
|
|
32
|
-
}, children));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default withTheme(Elevation);
|
|
36
|
-
//# sourceMappingURL=Elevation.js.map style: [{
|
|
37
|
-
borderRadius,
|
|
38
|
-
backgroundColor: colors.surface
|
|
39
|
-
}, elevation ? shadow(elevation) : null, style]
|
|
40
29
|
}), /*#__PURE__*/React.createElement(View, {
|
|
41
30
|
style: {
|
|
42
31
|
overflow: "hidden",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Elevation.
|
|
1
|
+
{"version":3,"sources":["Elevation.tsx"],"names":["React","Animated","StyleSheet","View","shadow","withTheme","Elevation","style","theme","children","rest","elevation","borderRadius","radius","flatten","colors","backgroundColor","surface","overflow"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,UAFF,EAMEC,IANF,QAOO,cAPP;AAQA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAQA;AACA,MAAMC,SAA0B,GAAG,QAAyC;AAAA,MAAxC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,QAAhB;AAA0B,OAAGC;AAA7B,GAAwC;AAC1E,QAAM;AAAEC,IAAAA,SAAS,GAAG,CAAd;AAAiBC,IAAAA,YAAY,EAAEC;AAA/B,MACJX,UAAU,CAACY,OAAX,CAAmBP,KAAnB,KAA6B,EAD/B;AAEA,QAAM;AAAEQ,IAAAA;AAAF,MAAaP,KAAnB;AACA,QAAMI,YAAY,GAAGC,MAArB;AAEA,sBACE,oBAAC,QAAD,CAAU,IAAV,eACMH,IADN;AAEE,IAAA,KAAK,EAAE,CACL;AACEE,MAAAA,YADF;AAEEI,MAAAA,eAAe,EAAED,MAAM,CAACE;AAF1B,KADK,EAKLN,SAAS,GAAGP,MAAM,CAACO,SAAD,CAAT,GAAuB,IAL3B,EAMLJ,KANK;AAFT,mBAWE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE;AAAEW,MAAAA,QAAQ,EAAE,QAAZ;AAAsBN,MAAAA;AAAtB;AAAb,KAAoDH,QAApD,CAXF,CADF;AAeD,CArBD;;AAuBA,eAAeJ,SAAS,CAACC,SAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n View,\n} from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation: React.FC<Props> = ({ style, theme, children, ...rest }) => {\n const { elevation = 4, borderRadius: radius } =\n StyleSheet.flatten(style) || {};\n const { colors } = theme;\n const borderRadius = radius;\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n borderRadius,\n backgroundColor: colors.surface,\n },\n elevation ? shadow(elevation) : null,\n style,\n ]}\n >\n <View style={{ overflow: \"hidden\", borderRadius }}>{children}</View>\n </Animated.View>\n );\n};\n\nexport default withTheme(Elevation);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "44.1.
|
|
3
|
+
"version": "44.1.7-a27122.0+a2712252",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
]
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "a2712252721dd3c1283678a89f543c6f7028ab4a"
|
|
83
83
|
}
|