@draftbit/core 46.1.4-e6469c.0 → 46.2.1-327d47.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/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +3 -1
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +2 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +17 -3
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/Config.js +3 -3
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +10 -11
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -20
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +21 -4
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -5
- package/lib/commonjs/components/Picker/Picker.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +135 -0
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +161 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js +136 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerTypes.js +6 -0
- package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/components/StepIndicator.js +1 -1
- package/lib/commonjs/components/StepIndicator.js.map +1 -1
- package/lib/commonjs/components/Stepper.js +1 -1
- package/lib/commonjs/components/Stepper.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Text.js +38 -11
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/mappings/CardContainerRating.js.map +1 -1
- package/lib/commonjs/mappings/Checkbox.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js +241 -0
- package/lib/commonjs/mappings/NumberInput.js.map +1 -0
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/Text.js +33 -26
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js +192 -2
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js +191 -2
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js +180 -29
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/styles/DarkTheme.js.map +1 -1
- package/lib/commonjs/utilities.js +1 -1
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/Carousel.js +3 -1
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/Config.js +3 -3
- package/lib/module/components/Config.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +3 -3
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/components/Picker/Picker.js +4 -5
- package/lib/module/components/Picker/Picker.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.android.js +112 -0
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.ios.js +135 -0
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.web.js +113 -0
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/module/components/Picker/PickerTypes.js +2 -0
- package/lib/module/components/Picker/PickerTypes.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButton.js +1 -1
- package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/StepIndicator.js +1 -1
- package/lib/module/components/StepIndicator.js.map +1 -1
- package/lib/module/components/Stepper.js +1 -1
- package/lib/module/components/Stepper.js.map +1 -1
- package/lib/module/components/Touchable.js +2 -16
- package/lib/module/components/Touchable.js.map +1 -1
- package/lib/module/mappings/NumberInput.js +231 -0
- package/lib/module/mappings/NumberInput.js.map +1 -0
- package/lib/module/mappings/Surface.js.map +1 -1
- package/lib/module/mappings/Text.js +33 -26
- package/lib/module/mappings/Text.js.map +1 -1
- package/lib/module/mappings/TextArea.js +193 -3
- package/lib/module/mappings/TextArea.js.map +1 -1
- package/lib/module/mappings/TextField.js +192 -3
- package/lib/module/mappings/TextField.js.map +1 -1
- package/lib/module/mappings/TextInput.js +180 -29
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/module/utilities.js +1 -1
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +7 -0
- package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerTypes.d.ts +18 -0
- package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
- package/lib/typescript/src/mappings/Text.d.ts +24 -10
- package/lib/typescript/src/mappings/TextArea.d.ts +12 -11
- package/lib/typescript/src/mappings/TextField.d.ts +4 -4
- package/lib/typescript/src/mappings/TextInput.d.ts +3 -254
- package/package.json +3 -3
- package/src/components/ActionSheet/ActionSheet.js +1 -1
- package/src/components/Carousel.js +4 -2
- package/src/components/Checkbox/Checkbox.js +3 -3
- package/src/components/Checkbox/CheckboxGroupRow.js +2 -2
- package/src/components/Checkbox/CheckboxRow.js +3 -3
- package/src/components/CircularProgress.js +29 -26
- package/src/components/DatePicker/DatePicker.js +1 -1
- package/src/components/NumberInput.js +1 -1
- package/src/components/Picker/Picker.js +8 -8
- package/src/components/Picker/Picker.tsx +8 -6
- package/src/components/Picker/PickerComponent.android.js +69 -0
- package/src/components/Picker/PickerComponent.android.tsx +116 -0
- package/src/components/Picker/PickerComponent.ios.js +79 -0
- package/src/components/Picker/PickerComponent.ios.tsx +142 -0
- package/src/components/Picker/PickerComponent.web.js +70 -0
- package/src/components/Picker/PickerComponent.web.tsx +117 -0
- package/src/components/Picker/PickerTypes.js +1 -0
- package/src/components/Picker/PickerTypes.ts +18 -0
- package/src/components/Portal/Portal.js +2 -2
- package/src/components/Portal/PortalConsumer.js +0 -1
- package/src/components/Portal/PortalHost.js +43 -41
- package/src/components/Portal/PortalManager.js +21 -18
- package/src/components/ProgressBar.js +9 -9
- package/src/components/RadioButton/RadioButton.js +3 -3
- package/src/components/RadioButton/RadioButtonGroup.js +1 -1
- package/src/components/RadioButton/RadioButtonRow.js +3 -3
- package/src/components/StepIndicator.js +225 -225
- package/src/components/Stepper.js +2 -2
- package/src/components/Text.js +0 -1
- package/src/components/TextField.js +62 -59
- package/src/constants.js +1 -1
- package/src/mappings/NumberInput.js +248 -0
- package/src/mappings/NumberInput.ts +267 -0
- package/src/mappings/Text.js +33 -26
- package/src/mappings/Text.ts +34 -27
- package/src/mappings/TextArea.js +221 -3
- package/src/mappings/TextArea.ts +227 -3
- package/src/mappings/TextField.js +220 -3
- package/src/mappings/TextField.ts +227 -3
- package/src/mappings/TextInput.js +208 -31
- package/src/mappings/TextInput.ts +214 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export { default as ActionSheet } from \"./ActionSheet\";\nexport { default as ActionSheetItem } from \"./ActionSheetItem\";\nexport { default as ActionSheetCancel } from \"./ActionSheetCancel\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA"}
|
|
@@ -21,8 +21,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
25
|
-
|
|
26
24
|
const CardBlock = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
image = _Config.default.cardImageUrl,
|
|
@@ -62,11 +60,12 @@ const CardBlock = _ref => {
|
|
|
62
60
|
const rightDescriptionStyles = [typography.subtitle2, {
|
|
63
61
|
color: colors.light
|
|
64
62
|
}];
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
66
64
|
style: style,
|
|
67
65
|
onPress: onPress,
|
|
68
|
-
numColumns: numColumns
|
|
69
|
-
|
|
66
|
+
numColumns: numColumns,
|
|
67
|
+
...rest
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
70
69
|
style: {
|
|
71
70
|
backgroundColor: colors.background
|
|
72
71
|
}
|
|
@@ -118,5 +117,16 @@ const CardBlock = _ref => {
|
|
|
118
117
|
|
|
119
118
|
var _default = (0, _theming.withTheme)(CardBlock);
|
|
120
119
|
|
|
120
|
+
exports.default = _default;
|
|
121
|
+
//# sourceMappingURL=CardBlock.js.mapcolors.medium
|
|
122
|
+
}]
|
|
123
|
+
}, leftDescription), rightDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
124
|
+
numberOfLines: 1,
|
|
125
|
+
style: rightDescriptionStyles
|
|
126
|
+
}, rightDescription) : null) : null));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var _default = (0, _theming.withTheme)(CardBlock);
|
|
130
|
+
|
|
121
131
|
exports.default = _default;
|
|
122
132
|
//# sourceMappingURL=CardBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CardBlock","image","Config","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","backgroundColor","background","borderRadius","uri","flexDirection","alignItems","justifyContent","marginTop","strong","body2","medium","withTheme"],"sources":["CardBlock.
|
|
1
|
+
{"version":3,"names":["CardBlock","image","Config","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","React","createElement","Card","View","backgroundColor","background","Elevation","borderRadius","Image","source","uri","resizeMode","flexDirection","alignItems","justifyContent","marginTop","Text","numberOfLines","strong","body2","medium","withTheme"],"sources":["CardBlock.js"],"sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst CardBlock = ({ image = Config.cardImageUrl, title, leftDescription, rightDescription, titleCentered, aspectRatio = 1.5, elevation = 2, numColumns = 3, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n let titleJustification;\n let titleStyle;\n if (titleCentered && !leftDescription && !rightDescription) {\n titleJustification = \"center\";\n }\n else {\n titleJustification = \"space-between\";\n }\n if (numColumns === 1) {\n titleStyle = typography.button;\n }\n else if (numColumns === 2) {\n titleStyle = typography.headline6;\n }\n else {\n titleStyle = typography.headline5;\n }\n const rightDescriptionStyles = [\n typography.subtitle2,\n { color: colors.light },\n ];\n return (React.createElement(Card, { style: style, onPress: onPress, numColumns: numColumns, ...rest },\n React.createElement(View, { style: { backgroundColor: colors.background } },\n React.createElement(Elevation, { style: { elevation, borderRadius: roundness } },\n React.createElement(Image, { style: {\n borderRadius: roundness,\n aspectRatio,\n }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" })),\n title ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: titleJustification,\n marginTop: numColumns === 3 ? 16 : 12,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [titleStyle, { color: colors.strong }] }, title),\n !leftDescription && rightDescription ? (React.createElement(Text, { style: rightDescriptionStyles }, rightDescription)) : null)) : null,\n leftDescription ? (React.createElement(View, { style: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\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: rightDescriptionStyles }, rightDescription)) : null)) : null)));\n};\nexport default withTheme(CardBlock);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,SAAS,GAAG,QAAmN;EAAA,IAAlN;IAAEC,KAAK,GAAGC,eAAA,CAAOC,YAAjB;IAA+BC,KAA/B;IAAsCC,eAAtC;IAAuDC,gBAAvD;IAAyEC,aAAzE;IAAwFC,WAAW,GAAG,GAAtG;IAA2GC,SAAS,GAAG,CAAvH;IAA0HC,UAAU,GAAG,CAAvI;IAA0IC,KAAK,EAAE;MAAEC,MAAF;MAAUC,SAAV;MAAqBC;IAArB,CAAjJ;IAAoLC,KAApL;IAA2LC,OAA3L;IAAoM,GAAGC;EAAvM,CAAkN;EACjO,IAAIC,kBAAJ;EACA,IAAIC,UAAJ;;EACA,IAAIZ,aAAa,IAAI,CAACF,eAAlB,IAAqC,CAACC,gBAA1C,EAA4D;IACxDY,kBAAkB,GAAG,QAArB;EACH,CAFD,MAGK;IACDA,kBAAkB,GAAG,eAArB;EACH;;EACD,IAAIR,UAAU,KAAK,CAAnB,EAAsB;IAClBS,UAAU,GAAGL,UAAU,CAACM,MAAxB;EACH,CAFD,MAGK,IAAIV,UAAU,KAAK,CAAnB,EAAsB;IACvBS,UAAU,GAAGL,UAAU,CAACO,SAAxB;EACH,CAFI,MAGA;IACDF,UAAU,GAAGL,UAAU,CAACQ,SAAxB;EACH;;EACD,MAAMC,sBAAsB,GAAG,CAC3BT,UAAU,CAACU,SADgB,EAE3B;IAAEC,KAAK,EAAEb,MAAM,CAACc;EAAhB,CAF2B,CAA/B;EAIA,oBAAQC,cAAA,CAAMC,aAAN,CAAoBC,8BAApB,EAA0B;IAAEd,KAAK,EAAEA,KAAT;IAAgBC,OAAO,EAAEA,OAAzB;IAAk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cAAA,CAAMC,aAAN,CAAoBE,iBAApB,EAA0B;IAAEf,KAAK,EAAE;MAC9CwB,aAAa,EAAE,KAD+B;MAE9CE,cAAc,EAAE,eAF8B;MAG9CD,UAAU,EAAE,QAHkC;MAI9CE,SAAS,EAAEhC,UAAU,KAAK,CAAf,GAAmB,CAAnB,GAAuB,IAAI;IAJQ;EAAT,CAA1B,eAMfiB,cAAA,CAAMC,aAAN,CAAoBe,iBAApB,EAA0B;IAAEC,aAAa,EAAE,CAAjB;IAAoB7B,KAAK,EAAE,CAACD,UAAU,CAACgC,KAAZ,EAAmB;MAAErB,KAAK,EAAEb,MAAM,CAACmC;IAAhB,CAAnB;EAA3B,CAA1B,EAAqG1C,eAArG,CANe,EAOfC,gBAAgB,gBAAIqB,cAAA,CAAMC,aAAN,CAAoBe,iBAApB,EAA0B;IAAEC,aAAa,EAAE,CAAjB;IAAoB7B,KAAK,EAAEQ;EAA3B,CAA1B,EAA+EjB,gBAA/E,CAAJ,GAAwG,IAPzG,CAAJ,GAOsH,IArBzI,CADI,CAAR;AAuBH,CA7CD;;eA8Ce,IAAA0C,kBAAA,EAAUhD,SAAV,C"}
|
|
@@ -50,6 +50,8 @@ function Pager(_ref) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
function Carousel(_ref2) {
|
|
53
|
+
var _data$length;
|
|
54
|
+
|
|
53
55
|
let {
|
|
54
56
|
data,
|
|
55
57
|
children,
|
|
@@ -59,7 +61,7 @@ function Carousel(_ref2) {
|
|
|
59
61
|
} = _ref2;
|
|
60
62
|
const [index, setIndex] = React.useState(0);
|
|
61
63
|
const length = React.Children.count(children);
|
|
62
|
-
const itemsLength = ((data === null || data === void 0 ? void 0 : data.length)
|
|
64
|
+
const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
|
|
63
65
|
const slides = Array.isArray(data) ? data : [];
|
|
64
66
|
|
|
65
67
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["screenWidth","Dimensions","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","React","useState","Children","count","itemsLength","slides","isArray","StyleSheet","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius","withTheme"],"sources":["Carousel.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport {\n ScrollView,\n View,\n StyleSheet,\n Dimensions,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\ntype Props = {\n data?: any[];\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n dotColor?: string;\n theme: any;\n};\n\nfunction Pager({\n color,\n index,\n length,\n}: {\n color: string;\n index: number;\n length: number;\n}) {\n return (\n <View style={styles.pager}>\n {Array.from({ length }).map((_, i) => {\n const current = index === i;\n const opacity = current ? 1 : 0.5;\n const size = current ? 10 : 8;\n return (\n <View\n key={i}\n style={[\n styles.bullet,\n { backgroundColor: color, opacity, width: size, height: size },\n ]}\n />\n );\n })}\n </View>\n );\n}\n\nfunction Carousel({\n data,\n children,\n dotColor = \"strong\",\n style,\n ...rest\n}: React.PropsWithChildren<Props>) {\n const [index, setIndex] = React.useState(0);\n\n const length = React.Children.count(children);\n const itemsLength = (data?.length ?? 0) + length;\n const slides = Array.isArray(data) ? data : [];\n\n const { width, height } = StyleSheet.flatten(style || {});\n const slideWidth = width || screenWidth;\n const slideHeight = height || 250;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n <ScrollView\n pagingEnabled\n horizontal\n decelerationRate=\"fast\"\n scrollEventThrottle={200}\n showsHorizontalScrollIndicator={false}\n onScroll={({ nativeEvent }) => {\n const layoutWidth = nativeEvent.layoutMeasurement.width;\n const offset = nativeEvent.contentOffset.x;\n const currentIndex = Math.ceil(offset / layoutWidth);\n setIndex(currentIndex);\n }}\n >\n {slides.length > 0\n ? slides.map((item, i) => {\n return (\n <Image\n key={i}\n resizeMode=\"cover\"\n source={typeof item === \"string\" ? { uri: item } : item}\n style={[{ width: slideWidth, height: slideHeight }]}\n />\n );\n })\n : null}\n {React.Children.map(children, (child: any) => {\n const s = child?.props?.style || {};\n return (\n <View style={{ width: slideWidth }}>\n {React.cloneElement(child, {\n style: { ...s, width: slideWidth },\n })}\n </View>\n );\n })}\n </ScrollView>\n <Pager color={dotColor} index={index} length={itemsLength} />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"#eee\",\n },\n pager: {\n position: \"absolute\",\n bottom: 12,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n bullet: {\n marginHorizontal: 2,\n width: 10,\n height: 10,\n borderRadius: 20,\n backgroundColor: \"#000\",\n },\n});\n\nexport default withTheme(Carousel);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAQA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,uBAAA,CAAWC,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;AAUA,SAASC,KAAT,OAQG;EAAA,IARY;IACbC,KADa;IAEbC,KAFa;IAGbC;EAHa,CAQZ;EACD,oBACE,oBAAC,iBAAD;IAAM,KAAK,EAAEC,MAAM,CAACC;EAApB,GACGC,KAAK,CAACC,IAAN,CAAW;IAAEJ;EAAF,CAAX,EAAuBK,GAAvB,CAA2B,CAACC,CAAD,EAAIC,CAAJ,KAAU;IACpC,MAAMC,OAAO,GAAGT,KAAK,KAAKQ,CAA1B;IACA,MAAME,OAAO,GAAGD,OAAO,GAAG,CAAH,GAAO,GAA9B;IACA,MAAME,IAAI,GAAGF,OAAO,GAAG,EAAH,GAAQ,CAA5B;IACA,oBACE,oBAAC,iBAAD;MACE,GAAG,EAAED,CADP;MAEE,KAAK,EAAE,CACLN,MAAM,CAACU,MADF,EAEL;QAAEC,eAAe,EAAEd,KAAnB;QAA0BW,OAA1B;QAAmCb,KAAK,EAAEc,IAA1C;QAAgDG,MAAM,EAAEH;MAAxD,CAFK;IAFT,EADF;EASD,CAbA,CADH,CADF;AAkBD;;AAED,SAASI,QAAT,QAMmC;EAAA,IANjB;IAChBC,IADgB;IAEhBC,QAFgB;IAGhBC,QAAQ,GAAG,QAHK;IAIhBC,KAJgB;IAKhB,GAAGC;EALa,CAMiB;EACjC,MAAM,CAACpB,KAAD,EAAQqB,QAAR,IAAoBC,KAAK,CAACC,QAAN,CAAe,CAAf,CAA1B;EAEA,MAAMtB,MAAM,GAAGqB,KAAK,CAACE,QAAN,CAAeC,KAAf,CAAqBR,QAArB,CAAf;EACA,MAAMS,WAAW,GAAG,
|
|
1
|
+
{"version":3,"names":["screenWidth","Dimensions","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","React","useState","Children","count","itemsLength","slides","isArray","StyleSheet","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius","withTheme"],"sources":["Carousel.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport {\n ScrollView,\n View,\n StyleSheet,\n Dimensions,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\ntype Props = {\n data?: any[];\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n dotColor?: string;\n theme: any;\n};\n\nfunction Pager({\n color,\n index,\n length,\n}: {\n color: string;\n index: number;\n length: number;\n}) {\n return (\n <View style={styles.pager}>\n {Array.from({ length }).map((_, i) => {\n const current = index === i;\n const opacity = current ? 1 : 0.5;\n const size = current ? 10 : 8;\n return (\n <View\n key={i}\n style={[\n styles.bullet,\n { backgroundColor: color, opacity, width: size, height: size },\n ]}\n />\n );\n })}\n </View>\n );\n}\n\nfunction Carousel({\n data,\n children,\n dotColor = \"strong\",\n style,\n ...rest\n}: React.PropsWithChildren<Props>) {\n const [index, setIndex] = React.useState(0);\n\n const length = React.Children.count(children);\n const itemsLength = (data?.length ?? 0) + length;\n const slides = Array.isArray(data) ? data : [];\n\n const { width, height } = StyleSheet.flatten(style || {});\n const slideWidth = width || screenWidth;\n const slideHeight = height || 250;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n <ScrollView\n pagingEnabled\n horizontal\n decelerationRate=\"fast\"\n scrollEventThrottle={200}\n showsHorizontalScrollIndicator={false}\n onScroll={({ nativeEvent }) => {\n const layoutWidth = nativeEvent.layoutMeasurement.width;\n const offset = nativeEvent.contentOffset.x;\n const currentIndex = Math.ceil(offset / layoutWidth);\n setIndex(currentIndex);\n }}\n >\n {slides.length > 0\n ? slides.map((item, i) => {\n return (\n <Image\n key={i}\n resizeMode=\"cover\"\n source={typeof item === \"string\" ? { uri: item } : item}\n style={[{ width: slideWidth, height: slideHeight }]}\n />\n );\n })\n : null}\n {React.Children.map(children, (child: any) => {\n const s = child?.props?.style || {};\n return (\n <View style={{ width: slideWidth }}>\n {React.cloneElement(child, {\n style: { ...s, width: slideWidth },\n })}\n </View>\n );\n })}\n </ScrollView>\n <Pager color={dotColor} index={index} length={itemsLength} />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"#eee\",\n },\n pager: {\n position: \"absolute\",\n bottom: 12,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n bullet: {\n marginHorizontal: 2,\n width: 10,\n height: 10,\n borderRadius: 20,\n backgroundColor: \"#000\",\n },\n});\n\nexport default withTheme(Carousel);\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AACE,QAAN,CAAelB,GAAf,CAAmBW,QAAnB,EAA8B4B,KAAD,IAAgB;IAAA;;IAC5C,MAAMC,CAAC,GAAG,CAAAD,KAAK,SAAL,IAAAA,KAAK,WAAL,4BAAAA,KAAK,CAAEE,KAAP,8DAAc5B,KAAd,KAAuB,EAAjC;IACA,oBACE,oBAAC,iBAAD;MAAM,KAAK,EAAE;QAAEtB,KAAK,EAAEkC;MAAT;IAAb,gBACGT,KAAK,CAAC0B,YAAN,CAAmBH,KAAnB,EAA0B;MACzB1B,KAAK,EAAE,EAAE,GAAG2B,CAAL;QAAQjD,KAAK,EAAEkC;MAAf;IADkB,CAA1B,CADH,CADF;EAOD,CATA,CAzBH,CADF,eAqCE,oBAAC,KAAD;IAAO,KAAK,EAAEb,QAAd;IAAwB,KAAK,EAAElB,KAA/B;IAAsC,MAAM,EAAE0B;EAA9C,EArCF,CADF;AAyCD;;AAED,MAAMxB,MAAM,GAAG2B,uBAAA,CAAWoB,MAAX,CAAkB;EAC/BhB,SAAS,EAAE;IACTpB,eAAe,EAAE;EADR,CADoB;EAI/BV,KAAK,EAAE;IACL+C,QAAQ,EAAE,UADL;IAELC,MAAM,EAAE,EAFH;IAGLC,IAAI,EAAE,CAHD;IAILC,KAAK,EAAE,CAJF;IAKLC,aAAa,EAAE,KALV;IAMLC,cAAc,EAAE,QANX;IAOLC,UAAU,EAAE;EAPP,CAJwB;EAa/B5C,MAAM,EAAE;IACN6C,gBAAgB,EAAE,CADZ;IAEN5D,KAAK,EAAE,EAFD;IAGNiB,MAAM,EAAE,EAHF;IAIN4C,YAAY,EAAE,EAJR;IAKN7C,eAAe,EAAE;EALX;AAbuB,CAAlB,CAAf;;eAsBe,IAAA8C,kBAAA,EAAU5C,QAAV,C"}
|
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
25
|
-
|
|
26
24
|
const Checkbox = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -73,7 +71,7 @@ const Checkbox = _ref => {
|
|
|
73
71
|
}
|
|
74
72
|
};
|
|
75
73
|
|
|
76
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
74
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
77
75
|
onPress: handlePress,
|
|
78
76
|
disabled: disabled,
|
|
79
77
|
accessibilityState: {
|
|
@@ -85,7 +83,7 @@ const Checkbox = _ref => {
|
|
|
85
83
|
width: size,
|
|
86
84
|
height: size
|
|
87
85
|
}]
|
|
88
|
-
}
|
|
86
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
89
87
|
style: styles.icon,
|
|
90
88
|
name: internalValue ? checkedIcon : uncheckedIcon,
|
|
91
89
|
size: size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Checkbox","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style","rest","internalValue","setInternalValue","React","useState","useEffect","previousDefaultValue","usePrevious","Boolean","colors","useTheme","checkboxColor","primary","handlePress","newValue","styles","container","width","height","icon","StyleSheet","absoluteFill","fillContainer","fill","opacity","borderColor","create","borderRadius","alignItems","justifyContent","alignSelf"],"sources":["Checkbox.
|
|
1
|
+
{"version":3,"names":["Checkbox","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style","rest","internalValue","setInternalValue","React","useState","useEffect","previousDefaultValue","usePrevious","Boolean","colors","useTheme","checkboxColor","primary","handlePress","newValue","createElement","Touchable","accessibilityState","accessibilityRole","accessibilityLiveRegion","styles","container","width","height","icon","name","View","StyleSheet","absoluteFill","fillContainer","fill","opacity","borderColor","create","borderRadius","alignItems","justifyContent","alignSelf"],"sources":["Checkbox.js"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, } from \"react-native\";\nimport { useTheme } from \"../../theming\";\nimport Touchable from \"../Touchable\";\nimport { usePrevious } from \"../../hooks\";\nconst Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon = \"MaterialCommunityIcons/checkbox-marked\", uncheckedIcon = \"MaterialCommunityIcons/checkbox-blank-outline\", size = 24, style, ...rest }) => {\n const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);\n React.useEffect(() => {\n if (status != null) {\n setInternalValue(status);\n }\n }, [status]);\n // This special logic is to handle weird APIs like Airtable that return\n // true or undefined for a boolean\n const previousDefaultValue = usePrevious(defaultValue);\n React.useEffect(() => {\n if (defaultValue !== previousDefaultValue) {\n setInternalValue(Boolean(defaultValue));\n }\n }, [defaultValue, previousDefaultValue]);\n const { colors } = useTheme();\n const checkboxColor = internalValue\n ? color || colors.primary\n : uncheckedColor || colors.primary;\n const handlePress = () => {\n const newValue = !internalValue;\n setInternalValue(newValue);\n onPress === null || onPress === void 0 ? void 0 : onPress(newValue);\n if (newValue) {\n onCheck === null || onCheck === void 0 ? void 0 : onCheck();\n }\n if (!newValue) {\n onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();\n }\n };\n return (React.createElement(Touchable, { ...rest, onPress: handlePress, disabled: disabled, accessibilityState: { disabled }, accessibilityRole: \"button\", accessibilityLiveRegion: \"polite\", style: [styles.container, style, { width: size, height: size }] },\n React.createElement(Icon, { style: styles.icon, name: internalValue ? checkedIcon : uncheckedIcon, size: size, color: checkboxColor }),\n React.createElement(View, { style: [StyleSheet.absoluteFill, styles.fillContainer] },\n React.createElement(View, { style: [\n styles.fill,\n { opacity: disabled ? 0.5 : 1 },\n { borderColor: checkboxColor },\n ] }))));\n};\nconst styles = StyleSheet.create({\n container: {\n borderRadius: 18,\n },\n fillContainer: {\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignSelf: \"center\",\n },\n fill: {\n borderRadius: 5,\n width: 30,\n height: 30,\n alignSelf: \"center\",\n },\n});\nexport default Checkbox;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,QAAQ,GAAG,QAA8P;EAAA,IAA7P;IAAEC,IAAF;IAAQC,MAAR;IAAgBC,QAAQ,GAAG,KAA3B;IAAkCC,OAAlC;IAA2CC,OAA3C;IAAoDC,SAApD;IAA+DC,KAA/D;IAAsEC,cAAtE;IAAsFC,YAAtF;IAAoGC,WAAW,GAAG,wCAAlH;IAA4JC,aAAa,GAAG,+CAA5K;IAA6NC,IAAI,GAAG,EAApO;IAAwOC,KAAxO;IAA+O,GAAGC;EAAlP,CAA6P;EAC3Q,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAehB,MAAM,IAAIO,YAAV,IAA0B,KAAzC,CAA1C;EACAQ,KAAK,CAACE,SAAN,CAAgB,MAAM;IAClB,IAAIjB,MAAM,IAAI,IAAd,EAAoB;MAChBc,gBAAgB,CAACd,MAAD,CAAhB;IACH;EACJ,CAJD,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ildcard(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
|
-
|
|
29
|
-
|
|
30
|
-
let Direction;
|
|
28
|
+
var Direction;
|
|
31
29
|
exports.Direction = Direction;
|
|
32
30
|
|
|
33
31
|
(function (Direction) {
|
|
@@ -91,13 +89,14 @@ const CheckboxGroupRow = _ref => {
|
|
|
91
89
|
textStyles,
|
|
92
90
|
viewStyles
|
|
93
91
|
} = (0, _utilities.extractStyles)(style);
|
|
94
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
92
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
95
93
|
onPress: handlePress,
|
|
96
94
|
style: [styles.mainParent, {
|
|
97
95
|
flexDirection: direction
|
|
98
96
|
}, viewStyles],
|
|
99
|
-
disabled: disabled
|
|
100
|
-
|
|
97
|
+
disabled: disabled,
|
|
98
|
+
...rest
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
101
100
|
style: [styles.label, {
|
|
102
101
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
103
102
|
}, labelContainerStyle]
|
|
@@ -137,6 +136,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
|
|
139
|
+
var _default = CheckboxGroupRow;
|
|
140
|
+
exports.default = _default;
|
|
141
|
+
//# sourceMappingURL=CheckboxGroupRow.js.map paddingStart: 20,
|
|
142
|
+
minHeight: 50,
|
|
143
|
+
paddingEnd: 20,
|
|
144
|
+
display: "flex",
|
|
145
|
+
..._reactNative.Platform.select({
|
|
146
|
+
web: {
|
|
147
|
+
cursor: "pointer",
|
|
148
|
+
userSelect: "none"
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
},
|
|
152
|
+
label: {
|
|
153
|
+
flex: 3
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
140
157
|
var _default = CheckboxGroupRow;
|
|
141
158
|
exports.default = _default;
|
|
142
159
|
//# sourceMappingURL=CheckboxGroupRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Direction","getCheckboxAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","CheckboxGroupRow","Icon","label","status","onPress","labelContainerStyle","checkboxStyle","disabled","
|
|
1
|
+
{"version":3,"names":["Direction","getCheckboxAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","React","createElement","Text","style","Fragment","CheckboxGroupRow","Icon","label","status","onPress","labelContainerStyle","checkboxStyle","disabled","color","uncheckedColor","rest","values","selectedValues","onValueChange","useCheckboxGroupContext","Array","isArray","isChecked","includes","handlePress","textStyles","viewStyles","extractStyles","Touchable","styles","mainParent","flexDirection","View","alignItems","flex","Checkbox","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"sources":["CheckboxGroupRow.js"],"sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View, Platform, } from \"react-native\";\nimport Checkbox from \"./Checkbox\";\nimport Text from \"../Text\";\nimport { useCheckboxGroupContext } from \"./context\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles } from \"../../utilities\";\nexport var Direction;\n(function (Direction) {\n Direction[\"Row\"] = \"row\";\n Direction[\"RowReverse\"] = \"row-reverse\";\n})(Direction || (Direction = {}));\nconst getCheckboxAlignment = (parentDirection, direction) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n }\n else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n }\n else {\n return \"flex-end\";\n }\n};\nconst renderLabel = (value, labelStyle, textStyle) => {\n if (typeof value === \"string\") {\n return React.createElement(Text, { style: [labelStyle, textStyle] }, value);\n }\n else {\n return React.createElement(React.Fragment, null, value);\n }\n};\nconst CheckboxGroupRow = ({ Icon, label = \"Label\", status, value, onPress, labelContainerStyle, labelStyle, checkboxStyle, direction = Direction.Row, disabled, style, color, uncheckedColor, ...rest }) => {\n const { values: selectedValues, onValueChange, direction: parentDirection, } = useCheckboxGroupContext();\n const values = Array.isArray(selectedValues) ? selectedValues : [];\n const isChecked = status || values.includes(value);\n const handlePress = () => {\n if (!disabled) {\n onPress === null || onPress === void 0 ? void 0 : onPress(!isChecked);\n onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(value, !isChecked);\n }\n };\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Touchable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },\n React.createElement(View, { style: [\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ] }, renderLabel(label, labelStyle, textStyles)),\n React.createElement(View, { style: {\n flex: 1,\n alignItems: getCheckboxAlignment(parentDirection, direction),\n } },\n React.createElement(Checkbox, { Icon: Icon, status: isChecked, onPress: handlePress, style: checkboxStyle, disabled: disabled, color: color, uncheckedColor: uncheckedColor }))));\n};\nconst styles = StyleSheet.create({\n mainParent: {\n alignItems: \"center\",\n justifyContent: \"space-around\",\n paddingStart: 20,\n minHeight: 50,\n paddingEnd: 20,\n display: \"flex\",\n ...Platform.select({\n web: {\n cursor: \"point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,SAAS,CAACM,GAAxB,GAA8B,YAA9B,GAA6C;IAD7D,CAF2B,EAK3BgB,mBAL2B;EAAT,CAA1B,EAMSd,WAAW,CAACW,KAAD,EAAQT,UAAR,EAAoB2B,UAApB,CANpB,CADI,eAQJzB,KAAK,CAACC,aAAN,CAAoB+B,iBAApB,EAA0B;IAAE7B,KAAK,EAAE;MAC3B+B,IAAI,EAAE,CADqB;MAE3BD,UAAU,EAAE5C,oBAAoB,CAACC,eAAD,EAAkBC,SAAlB;IAFL;EAAT,CAA1B,eAIIS,KAAK,CAACC,aAAN,CAAoBkC,iBAApB,EAA8B;IAAE7B,IAAI,EAAEA,IAAR;IAAcE,MAAM,EAAEc,SAAtB;IAAiCb,OAAO,EAAEe,WAA1C;IAAuDrB,KAAK,EAAEQ,aAA9D;IAA6EC,QAAQ,EAAEA,QAAvF;IAAiGC,KAAK,EAAEA,KAAxG;IAA+GC,cAAc,EAAEA;EAA/H,CAA9B,CAJJ,CARI,CAAR;AAaH,CAxBD;;AAyBA,MAAMe,MAAM,GAAGO,uBAAA,CAAWC,MAAX,CAAkB;EAC7BP,UAAU,EAAE;IACRG,UAAU,EAAE,QADJ;IAERK,cAAc,EAAE,cAFR;IAGRC,YAAY,EAAE,EAHN;IAIRC,SAAS,EAAE,EAJH;IAKRC,UAAU,EAAE,EALJ;IAMRC,OAAO,EAAE,MAND;IAOR,GAAGC,qBAAA,CAASC,MAAT,CAAgB;MACfC,GAAG,EAAE;QACDC,MAAM,EAAE,SADP;QAEDC,UAAU,EAAE;MAFX;IADU,CAAhB;EAPK,CADiB;EAe7BxC,KAAK,EAAE;IACH2B,IAAI,EAAE;EADH;AAfsB,CAAlB,CAAf;;eAmBe7B,gB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Direction","checkboxGroupContext","createContext","onValueChange","values","direction","undefined","useCheckboxGroupContext","useContext"],"sources":["context.
|
|
1
|
+
{"version":3,"names":["Direction","checkboxGroupContext","createContext","onValueChange","values","direction","undefined","useCheckboxGroupContext","useContext"],"sources":["context.js"],"sourcesContent":["import { createContext, useContext } from \"react\";\nexport var Direction;\n(function (Direction) {\n Direction[\"Horizontal\"] = \"horizontal\";\n Direction[\"Vertical\"] = \"vertical\";\n})(Direction || (Direction = {}));\nexport const checkboxGroupContext = createContext({\n onValueChange: () => { },\n values: [],\n direction: undefined,\n});\nexport function useCheckboxGroupContext() {\n return useContext(checkboxGroupContext);\n}\n"],"mappings":";;;;;;;;AAAA;;AACO,IAAIA,SAAJ;;;AACP,CAAC,UAAUA,SAAV,EAAqB;EAClBA,SAAS,CAAC,YAAD,CAAT,GAA0B,YAA1B;EACAA,SAAS,CAAC,UAAD,CAAT,GAAwB,UAAxB;AACH,CAHD,EAGGA,SAAS,yBAAKA,SAAS,GAAG,EAAjB,CAHZ;;AAIO,MAAMC,oBAAoB,gBAAG,IAAAC,oBAAA,EAAc;EAC9CC,aAAa,EAAE,MAAM,CAAG,CADsB;EAE9CC,MAAM,EAAE,EAFsC;EAG9CC,SAAS,EAAEC;AAHmC,CAAd,CAA7B;;;AAKA,SAASC,uBAAT,GAAmC;EACtC,OAAO,IAAAC,iBAAA,EAAWP,oBAAX,CAAP;AACH"}
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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 CircleImage = _ref => {
|
|
23
21
|
let {
|
|
24
22
|
source = _Config.default.placeholderImageURL,
|
|
@@ -27,7 +25,23 @@ const CircleImage = _ref => {
|
|
|
27
25
|
...props
|
|
28
26
|
} = _ref;
|
|
29
27
|
const borderRadius = size / 2;
|
|
30
|
-
return /*#__PURE__*/React.createElement(_reactNative.Image,
|
|
28
|
+
return /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
29
|
+
style: [{
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
borderRadius
|
|
33
|
+
}, style],
|
|
34
|
+
source: typeof source === "string" ? {
|
|
35
|
+
uri: source
|
|
36
|
+
} : source,
|
|
37
|
+
resizeMode: "cover",
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _default = CircleImage;
|
|
43
|
+
exports.default = _default;
|
|
44
|
+
//# sourceMappingURL=CircleImage.js.mapeateElement(_reactNative.Image, _extends({
|
|
31
45
|
style: [{
|
|
32
46
|
width: size,
|
|
33
47
|
height: size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CircleImage","source","Config","placeholderImageURL","size","style","props","borderRadius","width","height","uri"],"sources":["CircleImage.
|
|
1
|
+
{"version":3,"names":["CircleImage","source","Config","placeholderImageURL","size","style","props","borderRadius","React","createElement","Image","width","height","uri","resizeMode"],"sources":["CircleImage.js"],"sourcesContent":["import * as React from \"react\";\nimport { Image, } from \"react-native\";\nimport Config from \"./Config\";\nconst CircleImage = ({ source = Config.placeholderImageURL, size = 60, style, ...props }) => {\n const borderRadius = size / 2;\n return (React.createElement(Image, { style: [{ width: size, height: size, borderRadius }, style], source: typeof source === \"string\" ? { uri: source } : source, resizeMode: \"cover\", ...props }));\n};\nexport default CircleImage;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,WAAW,GAAG,QAAyE;EAAA,IAAxE;IAAEC,MAAM,GAAGC,eAAA,CAAOC,mBAAlB;IAAuCC,IAAI,GAAG,EAA9C;IAAkDC,KAAlD;IAAyD,GAAGC;EAA5D,CAAwE;EACzF,MAAMC,YAAY,GAAGH,IAAI,GAAG,CAA5B;EACA,oBAAQI,KAAK,CAACC,aAAN,CAAoBC,kBAApB,EAA2B;IAAEL,KAAK,EAAE,CAAC;MAAEM,KAAK,EAAEP,IAAT;MAAeQ,MAAM,EAAER,IAAvB;MAA6BG;IAA7B,CAAD,EAA8CF,KAA9C,CAAT;IAA+DJ,MAAM,EAAE,OAAOA,MAAP,KAAkB,QAAlB,GAA6B;MAAEY,GAAG,EAAEZ;IAAP,CAA7B,GAA+CA,MAAtH;IAA8Ha,UAAU,EAAE,OAA1I;IAAmJ,GAAGR;EAAtJ,CAA3B,CAAR;AACH,CAHD;;eAIeN,W"}
|
|
@@ -30,14 +30,14 @@ const getFilters = options => {
|
|
|
30
30
|
height
|
|
31
31
|
} = options;
|
|
32
32
|
const filters = ["c_scale", "q_auto", "dpr_auto"];
|
|
33
|
-
if (width) filters.push(
|
|
34
|
-
if (height) filters.push(
|
|
33
|
+
if (width) filters.push("w_".concat(width));
|
|
34
|
+
if (height) filters.push("h_".concat(height));
|
|
35
35
|
return filters.join(",");
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
const buildImageUrl = (options, name) => {
|
|
39
39
|
const filters = getFilters(options);
|
|
40
|
-
return ["https://res.cloudinary.com/altos/image/upload", filters,
|
|
40
|
+
return ["https://res.cloudinary.com/altos/image/upload", filters, "".concat(name, ".png")].join("/");
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const getExtension = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getWindowDimensions","width","height","Dimensions","get","windowWidth","windowHeight","getFilters","options","filters","push","join","buildImageUrl","name","getExtension","Platform","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"],"sources":["Config.
|
|
1
|
+
{"version":3,"names":["getWindowDimensions","width","height","Dimensions","get","windowWidth","windowHeight","getFilters","options","filters","push","join","buildImageUrl","name","getExtension","Platform","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"],"sources":["Config.js"],"sourcesContent":["import { Dimensions, Platform } from \"react-native\";\nconst getWindowDimensions = () => {\n const { width, height } = Dimensions.get(\"window\");\n return {\n windowWidth: width,\n windowHeight: height,\n };\n};\nconst { windowWidth, windowHeight } = getWindowDimensions();\nconst getFilters = (options) => {\n const { width, height } = options;\n const filters = [\"c_scale\", \"q_auto\", \"dpr_auto\"];\n if (width)\n filters.push(`w_${width}`);\n if (height)\n filters.push(`h_${height}`);\n return filters.join(\",\");\n};\nconst buildImageUrl = (options, name) => {\n const filters = getFilters(options);\n return [\n \"https://res.cloudinary.com/altos/image/upload\",\n filters,\n `${name}.png`,\n ].join(\"/\");\n};\nconst getExtension = () => {\n return Platform.OS === \"web\" ? \".svg\" : \".png\";\n};\nexport default {\n windowWidth,\n windowHeight,\n avatarImageUrl: buildImageUrl({\n width: 60,\n height: 60,\n }, \"Avatar\"),\n avatarImageSize: 60,\n cardImageSize: 200,\n cardImageUrl: \"https://static.draftbit.com/images/placeholder-image\" + getExtension(),\n cardIconSize: 16,\n cardIconBackgroundOpacity: 0.24,\n cardIconElevation: 1,\n placeholderImageURL: \"https://static.draftbit.com/images/placeholder-image\" + getExtension(),\n getPlaceholderImageUrl: (size) => buildImageUrl({ width: size.width, height: size.height }, \"image-placeholder_1\"),\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"],"mappings":";;;;;;;AAAA;;AACA,MAAMA,mBAAmB,GAAG,MAAM;EAC9B,MAAM;IAAEC,KAAF;IAASC;EAAT,IAAoBC,uBAAA,CAAWC,GAAX,CAAe,QAAf,CAA1B;;EACA,OAAO;IACHC,WAAW,EAAEJ,KADV;IAEHK,YAAY,EAAEJ;EAFX,CAAP;AAIH,CAND;;AAOA,MAAM;EAAEG,WAAF;EAAeC;AAAf,IAAgCN,mBAAmB,EAAzD;;AACA,MAAMO,UAAU,GAAIC,OAAD,IAAa;EAC5B,MAAM;IAAEP,KAAF;IAASC;EAAT,IA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AAO,EAAE,EAhBE;EAiBXC,eAAe,EAAE,EAjBN;EAkBXC,cAAc,EAAE,EAlBL;EAmBXC,kCAAkC,EAAE,CAnBzB;EAoBXC,sBAAsB,EAAE,EApBb;EAqBXC,qBAAqB,EAAE,EArBZ;EAsBXC,qBAAqB,EAAE,EAtBZ;EAuBXC,oBAAoB,EAAE,EAvBX;EAwBXC,cAAc,EAAE,EAxBL;EAyBXC,cAAc,EAAE,EAzBL;EA0BXC,qBAAqB,EAAE,CA1BZ;EA2BXC,mBAAmB,EAAE,EA3BV;EA4BXC,0BAA0B,EAAE,EA5BjB;EA6BXC,iBAAiB,EAAE,EA7BR;EA8BXC,eAAe,EAAE,EA9BN;EA+BXC,qBAAqB,EAAE,CA/BZ,CAgCX;;AAhCW,C"}
|
|
@@ -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 ? Object.assign.bind() : 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 AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
33
31
|
|
|
34
32
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
@@ -89,14 +87,14 @@ const DatePicker = _ref => {
|
|
|
89
87
|
if (format) return (0, _dateformat.default)(newDate, format);
|
|
90
88
|
|
|
91
89
|
if (mode === "time") {
|
|
92
|
-
return
|
|
90
|
+
return "".concat(newDate.toLocaleTimeString());
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
if (mode === "datetime") {
|
|
96
|
-
return
|
|
94
|
+
return "".concat(newDate.toLocaleString());
|
|
97
95
|
}
|
|
98
96
|
|
|
99
|
-
return
|
|
97
|
+
return "".concat(MONTHS[newDate.getMonth()], " ").concat(newDate.getDate(), ", ").concat(newDate.getFullYear());
|
|
100
98
|
};
|
|
101
99
|
|
|
102
100
|
const toggleVisibility = async () => {
|
|
@@ -284,9 +282,9 @@ const DatePicker = _ref => {
|
|
|
284
282
|
pointerEvents: "none"
|
|
285
283
|
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
286
284
|
style: [styles.container, style]
|
|
287
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon,
|
|
285
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
288
286
|
style: leftIconStyle
|
|
289
|
-
})
|
|
287
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
290
288
|
style: [containerStyle, style ? {
|
|
291
289
|
height: style.height
|
|
292
290
|
} : {}]
|
|
@@ -334,11 +332,11 @@ const DatePicker = _ref => {
|
|
|
334
332
|
opacity: hasActiveOutline ? labeled : 1
|
|
335
333
|
}],
|
|
336
334
|
numberOfLines: 1
|
|
337
|
-
}, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon,
|
|
335
|
+
}, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
338
336
|
style: { ...leftIconStyle,
|
|
339
337
|
marginLeft: type === "solid" ? 16 : 0
|
|
340
338
|
}
|
|
341
|
-
})
|
|
339
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.TextInput, {
|
|
342
340
|
value: formatDate(),
|
|
343
341
|
placeholder: label ? placeholder1 : placeholder,
|
|
344
342
|
editable: !disabled,
|
|
@@ -347,8 +345,9 @@ const DatePicker = _ref => {
|
|
|
347
345
|
onFocus: _handleFocus,
|
|
348
346
|
onBlur: _handleBlur,
|
|
349
347
|
underlineColorAndroid: "transparent",
|
|
350
|
-
style: inputStyles
|
|
351
|
-
|
|
348
|
+
style: inputStyles,
|
|
349
|
+
...props
|
|
350
|
+
})), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
352
351
|
name: rightIconName,
|
|
353
352
|
size: ICON_SIZE,
|
|
354
353
|
color: colors.light,
|