@draftbit/core 43.6.0-alpha.5 → 43.6.1-9242df.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/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +19 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/Justification.js +3 -0
- package/lib/commonjs/components/ResizeMode.js +3 -0
- package/lib/commonjs/mappings/MapView.js +6 -0
- package/lib/commonjs/mappings/MapView.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/module/components/Checkbox/CheckboxGroup.js +16 -3
- package/lib/module/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/module/components/Justification.js +1 -1
- package/lib/module/components/ResizeMode.js +1 -1
- package/lib/module/mappings/MapView.js +7 -1
- package/lib/module/mappings/MapView.js.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/package.json +3 -3
- package/src/Provider.js +9 -0
- package/src/components/Accordion/AccordionGroup.js +44 -0
- package/src/components/Accordion/AccordionItem.js +32 -0
- package/src/components/Accordion/index.js +2 -0
- package/src/components/ActionSheet/ActionSheet.js +45 -0
- package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
- package/src/components/ActionSheet/ActionSheetItem.js +30 -0
- package/src/components/ActionSheet/index.js +3 -0
- package/src/components/AnimatedCircularProgress.js +43 -0
- package/src/components/AspectRatio.js +18 -0
- package/src/components/AvatarEdit.js +30 -0
- package/src/components/Banner.js +109 -0
- package/src/components/Button.js +112 -0
- package/src/components/Card.js +57 -0
- package/src/components/CardBlock.js +54 -0
- package/src/components/CardContainer.js +69 -0
- package/src/components/CardContainerRating.js +79 -0
- package/src/components/CardContainerShortImage.js +33 -0
- package/src/components/CardInline.js +36 -0
- package/src/components/Carousel.js +66 -0
- package/src/components/Checkbox/Checkbox.js +63 -0
- package/src/components/Checkbox/CheckboxGroup.js +21 -0
- package/src/components/Checkbox/CheckboxGroupRow.js +77 -0
- package/src/components/Checkbox/CheckboxRow.js +78 -0
- package/src/components/Checkbox/context.js +14 -0
- package/src/components/Checkbox/index.js +3 -0
- package/src/components/CircleImage.js +8 -0
- package/src/components/CircularProgress.js +78 -0
- package/src/components/Config.js +63 -0
- package/src/components/Container.js +44 -0
- package/src/components/DatePicker/DatePicker.js +368 -0
- package/src/components/DatePicker/DatePickerComponent.js +13 -0
- package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
- package/src/components/DatePicker/DatePickerComponentType.js +1 -0
- package/src/components/DeprecatedButton.js +95 -0
- package/src/components/DeprecatedCardWrapper.js +18 -0
- package/src/components/DeprecatedFAB.js +115 -0
- package/src/components/Divider.js +13 -0
- package/src/components/Elevation.js +20 -0
- package/src/components/FAB.js +46 -0
- package/src/components/FieldSearchBarFull.js +53 -0
- package/src/components/FormRow.js +19 -0
- package/src/components/Header.js +44 -0
- package/src/components/HeaderLarge.js +7 -0
- package/src/components/HeaderMedium.js +7 -0
- package/src/components/HeaderOverline.js +7 -0
- package/src/components/IconButton.js +35 -0
- package/src/components/Image.js +47 -0
- package/src/components/Justification.js +1 -0
- package/src/components/Layout.js +50 -0
- package/src/components/NumberInput.js +49 -0
- package/src/components/Picker/Picker.js +56 -0
- package/src/components/Picker/PickerComponent.android.js +68 -0
- package/src/components/Picker/PickerComponent.ios.js +78 -0
- package/src/components/Picker/PickerComponent.web.js +69 -0
- package/src/components/Picker/PickerTypes.js +1 -0
- package/src/components/Portal/Portal.js +35 -0
- package/src/components/Portal/PortalConsumer.js +28 -0
- package/src/components/Portal/PortalHost.js +105 -0
- package/src/components/Portal/PortalManager.js +29 -0
- package/src/components/ProgressBar.js +118 -0
- package/src/components/ProgressCircle.js +13 -0
- package/src/components/ProgressIndicator.js +27 -0
- package/src/components/RadioButton/RadioButton.js +17 -0
- package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
- package/src/components/RadioButton/RadioButtonGroup.js +43 -0
- package/src/components/RadioButton/RadioButtonRow.js +76 -0
- package/src/components/RadioButton/context.js +14 -0
- package/src/components/RadioButton/index.js +4 -0
- package/src/components/ResizeMode.js +1 -0
- package/src/components/Row.js +48 -0
- package/src/components/RowBodyIcon.js +8 -0
- package/src/components/RowHeadlineImageCaption.js +12 -0
- package/src/components/RowHeadlineImageIcon.js +14 -0
- package/src/components/ScreenContainer.js +34 -0
- package/src/components/Slider.js +63 -0
- package/src/components/StarRating.js +50 -0
- package/src/components/StepIndicator.js +346 -0
- package/src/components/Stepper.js +39 -0
- package/src/components/Surface.js +32 -0
- package/src/components/Swiper/Swiper.js +18 -0
- package/src/components/Swiper/SwiperItem.js +9 -0
- package/src/components/Swiper/index.js +2 -0
- package/src/components/Switch.js +56 -0
- package/src/components/Text.js +28 -0
- package/src/components/TextField.js +420 -0
- package/src/components/ToggleButton.js +39 -0
- package/src/components/Touchable.js +12 -0
- package/src/components/Touchable.web.js +2 -0
- package/src/components/Typography.js +36 -0
- package/src/components/useAuthState.js +31 -0
- package/src/constants.js +10 -0
- package/src/hooks.js +12 -0
- package/src/index.js +51 -0
- package/src/interfaces/Icon.js +8 -0
- package/src/mappings/Accordion.js +41 -0
- package/src/mappings/AccordionItem.js +16 -0
- package/src/mappings/ActionSheet.js +13 -0
- package/src/mappings/ActionSheetCancel.js +19 -0
- package/src/mappings/ActionSheetItem.js +22 -0
- package/src/mappings/ActivityIndicator.js +53 -0
- package/src/mappings/AudioPlayer.js +20 -0
- package/src/mappings/AvatarEdit.js +37 -0
- package/src/mappings/Banner.js +32 -0
- package/src/mappings/BlurView.js +41 -0
- package/src/mappings/Button.js +56 -0
- package/src/mappings/Card.js +52 -0
- package/src/mappings/CardBlock.js +122 -0
- package/src/mappings/CardContainer.js +102 -0
- package/src/mappings/CardContainerRating.js +124 -0
- package/src/mappings/CardContainerShortImage.js +118 -0
- package/src/mappings/CardInline.js +51 -0
- package/src/mappings/Carousel.js +18 -0
- package/src/mappings/Checkbox.js +45 -0
- package/src/mappings/CheckboxGroup.js +25 -0
- package/src/mappings/CheckboxRow.js +56 -0
- package/src/mappings/CircleImage.js +24 -0
- package/src/mappings/Container.js +29 -0
- package/src/mappings/CustomCode.js +8 -0
- package/src/mappings/DatePicker.js +146 -0
- package/src/mappings/Divider.js +26 -0
- package/src/mappings/FAB.js +36 -0
- package/src/mappings/Fetch.js +12 -0
- package/src/mappings/FieldSearchBarFull.js +49 -0
- package/src/mappings/FlatList.js +19 -0
- package/src/mappings/HeaderLarge.js +28 -0
- package/src/mappings/HeaderMedium.js +54 -0
- package/src/mappings/HeaderOverline.js +54 -0
- package/src/mappings/Icon.js +25 -0
- package/src/mappings/IconButton.js +30 -0
- package/src/mappings/Image.js +15 -0
- package/src/mappings/ImageBackground.js +28 -0
- package/src/mappings/KeyboardAvoidingView.js +40 -0
- package/src/mappings/KeyboardAwareScrollView.js +43 -0
- package/src/mappings/Layout.js +195 -0
- package/src/mappings/LinearGradient.js +77 -0
- package/src/mappings/MapCallout.js +20 -0
- package/src/mappings/MapMarker.js +47 -0
- package/src/mappings/MapView.js +131 -0
- package/src/mappings/MapView.ts +7 -0
- package/src/mappings/Modal.js +41 -0
- package/src/mappings/Picker.js +137 -0
- package/src/mappings/ProgressBar.js +100 -0
- package/src/mappings/ProgressCircle.js +108 -0
- package/src/mappings/ProgressIndicator.js +180 -0
- package/src/mappings/RadioButton.js +50 -0
- package/src/mappings/RadioButtonGroup.js +16 -0
- package/src/mappings/RadioButtonRow.js +37 -0
- package/src/mappings/RowBodyIcon.js +75 -0
- package/src/mappings/RowHeadlineImageCaption.js +167 -0
- package/src/mappings/RowHeadlineImageIcon.js +99 -0
- package/src/mappings/SafeAreaView.js +33 -0
- package/src/mappings/ScrollView.js +30 -0
- package/src/mappings/Slider.js +59 -0
- package/src/mappings/StarRating.js +42 -0
- package/src/mappings/Stepper.js +28 -0
- package/src/mappings/Surface.js +13 -0
- package/src/mappings/Swiper.js +60 -0
- package/src/mappings/SwiperItem.js +8 -0
- package/src/mappings/Switch.js +75 -0
- package/src/mappings/Text.js +227 -0
- package/src/mappings/TextArea.js +52 -0
- package/src/mappings/TextField.js +158 -0
- package/src/mappings/TextInput.js +208 -0
- package/src/mappings/ToggleButton.js +45 -0
- package/src/mappings/Touchable.js +12 -0
- package/src/mappings/Video.js +74 -0
- package/src/mappings/View.js +206 -0
- package/src/mappings/WebView.js +18 -0
- package/src/styles/DarkTheme.js +26 -0
- package/src/styles/DefaultTheme.js +111 -0
- package/src/styles/fonts.js +62 -0
- package/src/styles/overlay.js +60 -0
- package/src/styles/shadow.js +51 -0
- package/src/theming.js +3 -0
- package/src/utilities.js +54 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetCancel.
|
|
1
|
+
{"version":3,"sources":["ActionSheetCancel.js"],"names":["ActionSheetCancel","label","color","style","onPress","React","createElement","ActionSheetItem"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,iBAAiB,GAAG,QAAkD;AAAA,MAAjD;AAAEC,IAAAA,KAAK,GAAG,QAAV;AAAoBC,IAAAA,KAApB;AAA2BC,IAAAA,KAA3B;AAAkCC,IAAAA;AAAlC,GAAiD;AACxE,sBAAQC,eAAMC,aAAN,CAAoBC,wBAApB,EAAqC;AAAEN,IAAAA,KAAK,EAAEA,KAAT;AAAgBC,IAAAA,KAAK,EAAEA,KAAK,IAAI,SAAhC;AAA2CC,IAAAA,KAAK,EAAE,CAACA,KAAD,CAAlD;AAA2DC,IAAAA,OAAO,EAAEA;AAApE,GAArC,CAAR;AACH,CAFD;;eAGeJ,iB","sourcesContent":["import React from \"react\";\nimport ActionSheetItem from \"./ActionSheetItem\";\nconst ActionSheetCancel = ({ label = \"Cancel\", color, style, onPress, }) => {\n return (React.createElement(ActionSheetItem, { label: label, color: color || \"#FF453A\", style: [style], onPress: onPress }));\n};\nexport default ActionSheetCancel;\n"]}
|
|
@@ -25,8 +25,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
30
28
|
const Button = _ref => {
|
|
31
29
|
let {
|
|
32
30
|
Icon,
|
|
@@ -128,7 +126,7 @@ const Button = _ref => {
|
|
|
128
126
|
alignSelf: "stretch",
|
|
129
127
|
...margins
|
|
130
128
|
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
129
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
132
130
|
onPress: onPress,
|
|
133
131
|
accessibilityState: {
|
|
134
132
|
disabled
|
|
@@ -136,7 +134,7 @@ const Button = _ref => {
|
|
|
136
134
|
accessibilityRole: "button",
|
|
137
135
|
disabled: disabled || loading,
|
|
138
136
|
style: [styles.button, buttonStyle, innerStyles]
|
|
139
|
-
}
|
|
137
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
138
|
style: styles.content
|
|
141
139
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: iconStyle
|
|
@@ -171,5 +169,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
171
169
|
|
|
172
170
|
var _default = (0, _theming.withTheme)(Button);
|
|
173
171
|
|
|
172
|
+
exports.default = _default;
|
|
173
|
+
//# sourceMappingURL=DeprecatedButton.js.map
|
|
174
|
+
minWidth: 64,
|
|
175
|
+
borderStyle: "solid"
|
|
176
|
+
},
|
|
177
|
+
content: {
|
|
178
|
+
flexDirection: "row",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
justifyContent: "center"
|
|
181
|
+
},
|
|
182
|
+
icon: {
|
|
183
|
+
width: _Config.default.buttonIconSize
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
var _default = (0, _theming.withTheme)(Button);
|
|
188
|
+
|
|
174
189
|
exports.default = _default;
|
|
175
190
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedButton.
|
|
1
|
+
{"version":3,"sources":["DeprecatedButton.js"],"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","React","createElement","Elevation","alignSelf","Touchable","accessibilityState","accessibilityRole","button","View","content","name","size","ActivityIndicator","Text","numberOfLines","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAC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IIc,KAAK,CAACC,aAAN,CAAoBY,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoBrD,IAAAA,KAAK,EAAE,CAACqB,SAAD,EAAYhB,UAAU,CAACyC,MAAvB;AAA3B,GAA1B,EAAuFjD,QAAvF,CAJJ,CADJ,CADI,CAAR;AAOH,CAxED;;AAyEA,MAAM6B,MAAM,GAAGT,wBAAWqC,MAAX,CAAkB;AAC7BR,EAAAA,MAAM,EAAE;AACJS,IAAAA,QAAQ,EAAE,EADN;AAEJC,IAAAA,WAAW,EAAE;AAFT,GADqB;AAK7BR,EAAAA,OAAO,EAAE;AACLS,IAAAA,aAAa,EAAE,KADV;AAELC,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GALoB;AAU7BrE,EAAAA,IAAI,EAAE;AACFuC,IAAAA,KAAK,EAAEC,gBAAOC;AADZ;AAVuB,CAAlB,CAAf;;eAce,wBAAU3C,MAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, Text, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst Button = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, labelColor, color: colorOverride, children, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = labelColor || buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n const { margin, marginEnd, marginTop, marginLeft, marginRight, marginBottom, marginHorizontal, marginVertical, ...innerStyles } = StyleSheet.flatten(style || {});\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n return (React.createElement(Elevation, { style: { elevation, alignSelf: \"stretch\", ...margins } },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: [styles.button, buttonStyle, innerStyles] },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, children)))));\n};\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\nexport default withTheme(Button);\n"]}
|
|
@@ -13,8 +13,6 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
16
|
const getWidth = numColumns => {
|
|
19
17
|
switch (numColumns) {
|
|
20
18
|
case 1:
|
|
@@ -37,6 +35,20 @@ const Card = _ref => {
|
|
|
37
35
|
...rest
|
|
38
36
|
} = _ref;
|
|
39
37
|
const width = getWidth(numColumns);
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
+
disabled: !onPress,
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
style: [style, {
|
|
42
|
+
width
|
|
43
|
+
}],
|
|
44
|
+
...rest
|
|
45
|
+
}, children);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
+
|
|
50
|
+
exports.default = _default;
|
|
51
|
+
//# sourceMappingURL=DeprecatedCardWrapper.js.map);
|
|
40
52
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
41
53
|
disabled: !onPress,
|
|
42
54
|
onPress: onPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedCardWrapper.
|
|
1
|
+
{"version":3,"sources":["DeprecatedCardWrapper.js"],"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","React","createElement","Touchable","disabled"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AACA,MAAMA,QAAQ,GAAIC,UAAD,IAAgB;AAC7B,UAAQA,UAAR;AACI,SAAK,CAAL;AACI,aAAO,KAAP;;AACJ,SAAK,CAAL;AACI,aAAO,KAAP;;AACJ;AACI,aAAO,MAAP;AANR;AAQH,CATD;;AAUA,MAAMC,IAAI,GAAG,QAA2D;AAAA,MAA1D;AAAED,IAAAA,UAAU,GAAG,CAAf;AAAkBE,IAAAA,QAAlB;AAA4BC,IAAAA,OAA5B;AAAqCC,IAAAA,KAArC;AAA4C,OAAGC;AAA/C,GAA0D;AACpE,QAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;AACA,sBAAQO,eAAMC,aAAN,CAAoBC,kBAApB,EAA+B;AAAEC,IAAAA,QAAQ,EAAE,CAACP,OAAb;AAAsBA,IAAAA,OAAO,EAAEA,OAA/B;AAAwCC,IAAAA,KAAK,EAAE,CAACA,KAAD,EAAQ;AAAEE,MAAAA;AAAF,KAAR,CAA/C;AAAmE,OAAGD;AAAtE,GAA/B,EAA6GH,QAA7G,CAAR;AACH,CAHD;;eAIe,wBAAUD,IAAV,C","sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nconst getWidth = (numColumns) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\nconst Card = ({ numColumns = 3, children, onPress, style, ...rest }) => {\n const width = getWidth(numColumns);\n return (React.createElement(Touchable, { disabled: !onPress, onPress: onPress, style: [style, { width }], ...rest }, children));\n};\nexport default withTheme(Card);\n"]}
|
|
@@ -121,6 +121,12 @@ const SEED_DATA = {
|
|
|
121
121
|
loadingBackgroundColor: (0, _types.createColorProp)({
|
|
122
122
|
label: "Loading Background Color",
|
|
123
123
|
description: "Color of the background to show while the map is loading"
|
|
124
|
+
}),
|
|
125
|
+
apiKey: (0, _types.createTextProp)({
|
|
126
|
+
label: "API Key (PWA only)",
|
|
127
|
+
description: "Your API Key",
|
|
128
|
+
required: false,
|
|
129
|
+
defaultValue: null
|
|
124
130
|
})
|
|
125
131
|
}
|
|
126
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MapView.ts"],"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","media","layout","height","width","props","provider","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","editable","group","GROUPS","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","latitudeDelta","longitudeDelta","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor"],"mappings":";;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"sources":["MapView.ts"],"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","media","layout","height","width","props","provider","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","editable","group","GROUPS","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","latitudeDelta","longitudeDelta","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","apiKey"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,UADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,gBAHU;AAIvBC,EAAAA,WAAW,EAAE,YAJU;AAKvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KALH;AAMvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,MAAM,EAAE,MADF;AAENC,IAAAA,KAAK,EAAE;AAFD,GANe;AAUvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,QAAQ,EAAEC,kBAAWC,SADb;AAERC,MAAAA,QAAQ,EAAEC,kBAAWC,MAFb;AAGRC,MAAAA,QAAQ,EAAE,IAHF;AAIRC,MAAAA,KAAK,EAAEC,cAAOC,KAJN;AAKRC,MAAAA,KAAK,EAAE,UALC;AAMRnB,MAAAA,WAAW,EAAE,mBANL;AAORoB,MAAAA,QAAQ,EAAE,KAPF;AAQRC,MAAAA,YAAY,EAAE,IARN;AASRC,MAAAA,OAAO,EAAE,CAAC,QAAD;AATD,KADL;AAYLC,IAAAA,QAAQ,EAAE,6BAAiB;AACzBJ,MAAAA,KAAK,EAAE,kBADkB;AAEzBnB,MAAAA,WAAW,EAAE,4CAFY;AAGzBoB,MAAAA,QAAQ,EAAE,KAHe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E;AALc,KAAf,CA1FV;AAiGLgB,IAAAA,cAAc,EAAE,2BAAe;AAC7BlB,MAAAA,KAAK,EAAE,iBADsB;AAE7BnB,MAAAA,WAAW,EACT,gEAH2B;AAI7BgB,MAAAA,KAAK,EAAEC,cAAOC,KAJe;AAK7BE,MAAAA,QAAQ,EAAE,KALmB;AAM7BC,MAAAA,YAAY,EAAE;AANe,KAAf,CAjGX;AAyGLiB,IAAAA,qBAAqB,EAAE,4BAAgB;AACrCnB,MAAAA,KAAK,EAAE,yBAD8B;AAErCnB,MAAAA,WAAW,EAAE;AAFwB,KAAhB,CAzGlB;AA6GLuC,IAAAA,sBAAsB,EAAE,4BAAgB;AACtCpB,MAAAA,KAAK,EAAE,0BAD+B;AAEtCnB,MAAAA,WAAW,EAAE;AAFyB,KAAhB,CA7GnB;AAiHLwC,IAAAA,MAAM,EAAE,2BAAe;AACrBrB,MAAAA,KAAK,EAAE,oBADc;AAErBnB,MAAAA,WAAW,EAAE,cAFQ;AAGrBoB,MAAAA,QAAQ,EAAE,KAHW;AAIrBC,MAAAA,YAAY,EAAE;AAJO,KAAf;AAjHH;AAVgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n height: \"100%\",\n width: \"100%\",\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n latitudeDelta: createNumberProp({\n label: \"Init Latitude Delta\",\n description: \"The latitude delta for the map's initial region\",\n required: false,\n precision: 4,\n defaultValue: 1,\n }),\n longitudeDelta: createNumberProp({\n label: \"Init Longitude Delta\",\n description: \"The longitude delta for the map's initial region\",\n required: false,\n precision: 4,\n defaultValue: 1,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom (Web)\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Scroll Enabled\",\n description: \"Whether scrolling the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading Background Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n apiKey: createTextProp({\n label: \"API Key (PWA only)\",\n description: \"Your API Key\",\n required: false,\n defaultValue: null,\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonGroup.
|
|
1
|
+
{"version":3,"sources":["RadioButtonGroup.js"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","Triggers","OnValueChange","props","direction","fieldName","handlerPropName","valuePropName","defaultValue"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,oBADe;AAErBC,EAAAA,GAAG,EAAE,kBAFgB;AAGrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHL;AAIrBC,EAAAA,MAAM,EAAE,EAJa;AAKrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,aAAV,CALW;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,SAAS,EAAE,iCADR;AAEHC,IAAAA,SAAS,EAAE,gCAAoB;AAC3BC,MAAAA,eAAe,EAAE,eADU;AAE3BC,MAAAA,aAAa,EAAE,OAFY;AAG3BC,MAAAA,YAAY,EAAE;AAHa,KAApB;AAFR;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createFieldNameProp, createDirectionProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button Group\",\n tag: \"RadioButtonGroup\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: [Triggers.OnValueChange],\n props: {\n direction: createDirectionProp(),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"radioButtonGroupValue\",\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonRow.
|
|
1
|
+
{"version":3,"sources":["RadioButtonRow.js"],"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;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,kBADe;AAErBC,EAAAA,GAAG,EAAE,gBAFgB;AAGrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHL;AAIrBC,EAAAA,MAAM,EAAE,EAJa;AAKrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE,2BAAe;AAClBA,MAAAA,KAAK,EAAE,OADW;AAElBC,MAAAA,WAAW,EAAE,qCAFK;AAGlBC,MAAAA,QAAQ,EAAE,IAHQ;AAIlBC,MAAAA,YAAY,EAAE;AAJI,KAAf,CADJ;AAOHC,IAAAA,SAAS,EAAE,+BAAmB;AAC1BJ,MAAAA,KAAK,EAAE,WADmB;AAE1BC,MAAAA,WAAW,EAAE,8DAFa;AAG1BI,MAAAA,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;AAHiB,KAAnB,CAPR;AAYHC,IAAAA,KAAK,EAAE,2BAAe;AAClBN,MAAAA,KAAK,EAAE,OADW;AAElBC,MAAAA,WAAW,EAAE,2BAFK;AAGlBE,MAAAA,YAAY,EAAE,IAHI;AAIlBD,MAAAA,QAAQ,EAAE;AAJQ,KAAf,CAZJ;AAkBHK,IAAAA,KAAK,EAAE,4BAAgB;AACnBC,MAAAA,KAAK,EAAEC,cAAOC,KADK;AAEnBT,MAAAA,WAAW,EAAE,sBAFM;AAGnBE,MAAAA,YAAY,EAAE;AAHK,KAAhB,CAlBJ;AAuBHQ,IAAAA,eAAe,EAAE,4BAAgB;AAC7BH,MAAAA,KAAK,EAAEC,cAAOC,KADe;AAE7BV,MAAAA,KAAK,EAAE,kBAFsB;AAG7BC,MAAAA,WAAW,EAAE,iCAHgB;AAI7BE,MAAAA,YAAY,EAAE;AAJe,KAAhB;AAvBd;AALc,CAAlB","sourcesContent":["import { createTextProp, createTextEnumProp, COMPONENT_TYPES, createColorProp, GROUPS, } from \"@draftbit/types\";\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: \"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"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { View } from "react-native";
|
|
5
3
|
import { checkboxGroupContext, Direction } from "./context";
|
|
@@ -27,9 +25,24 @@ const CheckboxGroup = _ref => {
|
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
return /*#__PURE__*/React.createElement(View,
|
|
28
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
31
29
|
style: [{
|
|
32
30
|
minHeight: 40
|
|
31
|
+
}, style],
|
|
32
|
+
...rest
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
34
|
+
value: {
|
|
35
|
+
values,
|
|
36
|
+
onValueChange,
|
|
37
|
+
direction
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
40
|
+
style: _containerStyle
|
|
41
|
+
}, children)));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default CheckboxGroup;
|
|
45
|
+
//# sourceMappingURL=CheckboxGroup.js.map minHeight: 40
|
|
33
46
|
}, style]
|
|
34
47
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
35
48
|
value: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CheckboxGroup.
|
|
1
|
+
{"version":3,"sources":["CheckboxGroup.js"],"names":["React","View","checkboxGroupContext","Direction","Provider","CheckboxGroup","direction","Vertical","values","onValueChange","style","children","rest","_containerStyle","flexDirection","Horizontal","overflow","push","alignItems","createElement","minHeight","value"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,oBAAT,EAA+BC,SAA/B,QAAgD,WAAhD;AACA,MAAM;AAAEC,EAAAA;AAAF,IAAeF,oBAArB;;AACA,MAAMG,aAAa,GAAG,QAAqG;AAAA,MAApG;AAAEC,IAAAA,SAAS,GAAGH,SAAS,CAACI,QAAxB;AAAkCC,IAAAA,MAAlC;AAA0CC,IAAAA,aAAa,GAAG,MAAM,CAAG,CAAnE;AAAqEC,IAAAA,KAArE;AAA4EC,IAAAA,QAA5E;AAAsF,OAAGC;AAAzF,GAAoG;AACvH,QAAMC,eAAe,GAAG,CACpB;AACIC,IAAAA,aAAa,EAAER,SAAS,KAAKH,SAAS,CAACY,UAAxB,GAAqC,KAArC,GAA6C,QADhE;AAEIC,IAAAA,QAAQ,EAAE;AAFd,GADoB,CAAxB;;AAMA,MAAIV,SAAS,KAAKH,SAAS,CAACI,QAA5B,EAAsC;AAClCM,IAAAA,eAAe,CAACI,IAAhB,CAAqB;AACjBC,MAAAA,UAAU,EAAE;AADK,KAArB;AAGH;;AACD,sBAAQlB,KAAK,CAACmB,aAAN,CAAoBlB,IAApB,EAA0B;AAAES,IAAAA,KAAK,EAAE,CAAC;AAAEU,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBV,KAApB,CAAT;AAAqC,OAAGE;AAAxC,GAA1B,eACJZ,KAAK,CAACmB,aAAN,CAAoBf,QAApB,EAA8B;AAAEiB,IAAAA,KAAK,EAAE;AAAEb,MAAAA,MAAF;AAAUC,MAAAA,aAAV;AAAyBH,MAAAA;AAAzB;AAAT,GAA9B,eACIN,KAAK,CAACmB,aAAN,CAAoBlB,IAApB,EAA0B;AAAES,IAAAA,KAAK,EAAEG;AAAT,GAA1B,EAAsDF,QAAtD,CADJ,CADI,CAAR;AAGH,CAfD;;AAgBA,eAAeN,aAAf","sourcesContent":["import * as React from \"react\";\nimport { View } from \"react-native\";\nimport { checkboxGroupContext, Direction } from \"./context\";\nconst { Provider } = checkboxGroupContext;\nconst CheckboxGroup = ({ direction = Direction.Vertical, values, onValueChange = () => { }, style, children, ...rest }) => {\n const _containerStyle = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n overflow: \"hidden\",\n },\n ];\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },\n React.createElement(Provider, { value: { values, onValueChange, direction } },\n React.createElement(View, { style: _containerStyle }, children))));\n};\nexport default CheckboxGroup;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
//# sourceMappingURL=Justification.js.map
|
|
2
|
+
//# sourceMappingURL=Justification.js.mapion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
//# sourceMappingURL=ResizeMode.js.map
|
|
2
|
+
//# sourceMappingURL=ResizeMode.js.mapode.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, GROUPS, FORM_TYPES, PROP_TYPES } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, FORM_TYPES, PROP_TYPES } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map View",
|
|
4
4
|
tag: "MapView",
|
|
@@ -113,6 +113,12 @@ export const SEED_DATA = {
|
|
|
113
113
|
loadingBackgroundColor: createColorProp({
|
|
114
114
|
label: "Loading Background Color",
|
|
115
115
|
description: "Color of the background to show while the map is loading"
|
|
116
|
+
}),
|
|
117
|
+
apiKey: createTextProp({
|
|
118
|
+
label: "API Key (PWA only)",
|
|
119
|
+
description: "Your API Key",
|
|
120
|
+
required: false,
|
|
121
|
+
defaultValue: null
|
|
116
122
|
})
|
|
117
123
|
}
|
|
118
124
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MapView.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","GROUPS","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","packageName","description","category","media","layout","height","width","props","provider","formType","flatArray","propType","STRING","editable","group","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","latitudeDelta","longitudeDelta","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,gBAJF,EAKEC,
|
|
1
|
+
{"version":3,"sources":["MapView.ts"],"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","packageName","description","category","media","layout","height","width","props","provider","formType","flatArray","propType","STRING","editable","group","basic","label","required","defaultValue","options","latitude","precision","min","max","longitude","latitudeDelta","longitudeDelta","zoom","step","mapType","zoomEnabled","showsCompass","rotateEnabled","scrollEnabled","loadingEnabled","loadingIndicatorColor","loadingBackgroundColor","apiKey"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,eAHF,EAIEC,gBAJF,EAKEC,cALF,EAMEC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mB;AAM7BC,MAAAA,YAAY,EAAE;AANe,KAAD,CAjGzB;AAyGLiB,IAAAA,qBAAqB,EAAE5C,eAAe,CAAC;AACrCyB,MAAAA,KAAK,EAAE,yBAD8B;AAErCf,MAAAA,WAAW,EAAE;AAFwB,KAAD,CAzGjC;AA6GLmC,IAAAA,sBAAsB,EAAE7C,eAAe,CAAC;AACtCyB,MAAAA,KAAK,EAAE,0BAD+B;AAEtCf,MAAAA,WAAW,EAAE;AAFyB,KAAD,CA7GlC;AAiHLoC,IAAAA,MAAM,EAAE5C,cAAc,CAAC;AACrBuB,MAAAA,KAAK,EAAE,oBADc;AAErBf,MAAAA,WAAW,EAAE,cAFQ;AAGrBgB,MAAAA,QAAQ,EAAE,KAHW;AAIrBC,MAAAA,YAAY,EAAE;AAJO,KAAD;AAjHjB;AAVgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createTextProp,\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Map View\",\n tag: \"MapView\",\n packageName: \"@draftbit/maps\",\n description: \"A map view\",\n category: COMPONENT_TYPES.media,\n layout: {\n height: \"100%\",\n width: \"100%\",\n },\n props: {\n provider: {\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n editable: true,\n group: GROUPS.basic,\n label: \"Provider\",\n description: \"The maps provider\",\n required: false,\n defaultValue: null,\n options: [\"google\"],\n },\n latitude: createNumberProp({\n label: \"Initial Latitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -90,\n max: 90,\n defaultValue: 37.40241,\n }),\n longitude: createNumberProp({\n label: \"Initial Longitude\",\n description: \"The longitude for the map's initial region\",\n required: false,\n precision: 6,\n min: -180,\n max: 180,\n defaultValue: -122.12125,\n }),\n latitudeDelta: createNumberProp({\n label: \"Init Latitude Delta\",\n description: \"The latitude delta for the map's initial region\",\n required: false,\n precision: 4,\n defaultValue: 1,\n }),\n longitudeDelta: createNumberProp({\n label: \"Init Longitude Delta\",\n description: \"The longitude delta for the map's initial region\",\n required: false,\n precision: 4,\n defaultValue: 1,\n }),\n zoom: createNumberProp({\n label: \"Initial Zoom (Web)\",\n description: \"The initial zoom of the map\",\n required: true,\n precision: 0,\n step: 1,\n defaultValue: 8,\n }),\n mapType: {\n label: \"Map Type\",\n description: \"The type of map to show\",\n group: GROUPS.basic,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n required: false,\n defaultValue: null,\n options: [\n \"standard\",\n \"satellite\",\n \"hybrid\",\n \"terrain\",\n \"none\",\n \"mutedStandard\",\n ],\n },\n zoomEnabled: createBoolProp({\n label: \"Zoom Enabled\",\n description: \"Whether zooming is enabled (native only)\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n showsCompass: createBoolProp({\n label: \"Shows Compass\",\n description: \"Whether compass is shown\",\n group: GROUPS.basic,\n required: false,\n defaultValue: false,\n }),\n rotateEnabled: createBoolProp({\n label: \"Rotate Enabled\",\n description: \"Whether rotating the map is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Scroll Enabled\",\n description: \"Whether scrolling the map view is enabled\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingEnabled: createBoolProp({\n label: \"Loading Enabled\",\n description:\n \"If true a loading indicator will show while the map is loading\",\n group: GROUPS.basic,\n required: false,\n defaultValue: true,\n }),\n loadingIndicatorColor: createColorProp({\n label: \"Loading Indicator Color\",\n description: \"Color of the loading indicator\",\n }),\n loadingBackgroundColor: createColorProp({\n label: \"Loading Background Color\",\n description: \"Color of the background to show while the map is loading\",\n }),\n apiKey: createTextProp({\n label: \"API Key (PWA only)\",\n description: \"Your API Key\",\n required: false,\n defaultValue: null,\n }),\n },\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.6.
|
|
3
|
+
"version": "43.6.1-9242df.0+9242df07",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^43.6.0
|
|
44
|
+
"@draftbit/types": "^43.6.0",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.1.7",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "9242df070ed9cbf72a83283c6821d797df0c091b"
|
|
84
84
|
}
|
package/src/Provider.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ThemeProvider } from "./theming";
|
|
3
|
+
import PortalHost from "./components/Portal/PortalHost";
|
|
4
|
+
export default class Provider extends React.Component {
|
|
5
|
+
render() {
|
|
6
|
+
return (React.createElement(PortalHost, null,
|
|
7
|
+
React.createElement(ThemeProvider, { theme: this.props.theme }, this.props.children)));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, StyleSheet, Pressable, } from "react-native";
|
|
3
|
+
import Text from "../Text";
|
|
4
|
+
import { withTheme } from "../../theming";
|
|
5
|
+
import { extractStyles } from "../../utilities";
|
|
6
|
+
const AccordionGroup = ({ label, expanded: expandedProp = false, openColor, closedColor, caretColor: caretColorProp, caretSize = 24, icon, iconSize = 24, style, children, theme, Icon, }) => {
|
|
7
|
+
const [expanded, setExpanded] = React.useState(expandedProp);
|
|
8
|
+
const { textStyles, viewStyles } = extractStyles(style);
|
|
9
|
+
const expandedColor = openColor || theme.colors.primary;
|
|
10
|
+
const collapsedColor = closedColor || theme.colors.primary;
|
|
11
|
+
const labelColor = expanded ? expandedColor : collapsedColor;
|
|
12
|
+
const caretColor = caretColorProp || labelColor;
|
|
13
|
+
const handlePressAction = () => {
|
|
14
|
+
setExpanded(!expanded);
|
|
15
|
+
};
|
|
16
|
+
return (React.createElement(React.Fragment, null,
|
|
17
|
+
React.createElement(Pressable, { style: [styles.row, viewStyles], onPress: handlePressAction, accessibilityRole: "button" },
|
|
18
|
+
icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,
|
|
19
|
+
React.createElement(View, { style: styles.content },
|
|
20
|
+
React.createElement(Text, { selectable: false, style: [
|
|
21
|
+
textStyles,
|
|
22
|
+
{
|
|
23
|
+
color: labelColor,
|
|
24
|
+
},
|
|
25
|
+
] }, label)),
|
|
26
|
+
React.createElement(Icon, { name: expanded
|
|
27
|
+
? "MaterialIcons/keyboard-arrow-up"
|
|
28
|
+
: "MaterialIcons/keyboard-arrow-down", color: caretColor, size: caretSize })),
|
|
29
|
+
expanded ? children : null));
|
|
30
|
+
};
|
|
31
|
+
const styles = StyleSheet.create({
|
|
32
|
+
row: {
|
|
33
|
+
flexDirection: "row",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
},
|
|
36
|
+
content: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
},
|
|
40
|
+
icon: {
|
|
41
|
+
marginRight: 8,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
export default withTheme(AccordionGroup);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Pressable, StyleSheet, View, } from "react-native";
|
|
3
|
+
import Text from "../Text";
|
|
4
|
+
import { extractStyles } from "../../utilities";
|
|
5
|
+
import { withTheme } from "../../theming";
|
|
6
|
+
const AccordionItem = ({ Icon, icon, label, style, iconColor, theme, ...rest }) => {
|
|
7
|
+
const { textStyles, viewStyles } = extractStyles(style);
|
|
8
|
+
return (React.createElement(Pressable, { style: [styles.container, viewStyles], ...rest },
|
|
9
|
+
React.createElement(View, { style: styles.row },
|
|
10
|
+
icon ? (React.createElement(Icon, { name: icon, size: 24, color: iconColor || theme.colors.primary })) : null,
|
|
11
|
+
React.createElement(View, { style: [styles.item, styles.content] },
|
|
12
|
+
React.createElement(Text, { selectable: false, style: textStyles }, label)))));
|
|
13
|
+
};
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
container: {
|
|
16
|
+
padding: 8,
|
|
17
|
+
},
|
|
18
|
+
row: {
|
|
19
|
+
flexDirection: "row",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
paddingLeft: 8,
|
|
22
|
+
},
|
|
23
|
+
item: {
|
|
24
|
+
marginVertical: 6,
|
|
25
|
+
paddingLeft: 8,
|
|
26
|
+
},
|
|
27
|
+
content: {
|
|
28
|
+
flex: 1,
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
export default withTheme(AccordionItem);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, StyleSheet } from "react-native";
|
|
3
|
+
import Portal from "../Portal/Portal";
|
|
4
|
+
import Touchable from "../Touchable";
|
|
5
|
+
import ActionSheetCancel from "./ActionSheetCancel";
|
|
6
|
+
const ActionSheet = ({ visible = false, onClose, children }) => {
|
|
7
|
+
return visible ? (React.createElement(Portal, null,
|
|
8
|
+
React.createElement(Touchable, { style: styles.wrapper, onPress: onClose },
|
|
9
|
+
React.createElement(View, { style: styles.overlay }),
|
|
10
|
+
React.createElement(View, { style: styles.groupWrapper },
|
|
11
|
+
React.createElement(View, { style: styles.group }, React.Children.toArray(children).filter((child) => child?.type !== ActionSheetCancel)),
|
|
12
|
+
React.createElement(View, { style: styles.group }, React.Children.toArray(children).filter((child) => child.type === ActionSheetCancel)))))) : (React.createElement(React.Fragment, null));
|
|
13
|
+
};
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
wrapper: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
},
|
|
20
|
+
overlay: {
|
|
21
|
+
position: "absolute",
|
|
22
|
+
top: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
right: 0,
|
|
25
|
+
bottom: 0,
|
|
26
|
+
backgroundColor: "#000000",
|
|
27
|
+
opacity: 0.3,
|
|
28
|
+
},
|
|
29
|
+
groupWrapper: {
|
|
30
|
+
flex: 1,
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
justifyContent: "flex-end",
|
|
33
|
+
display: "flex",
|
|
34
|
+
marginBottom: 25,
|
|
35
|
+
},
|
|
36
|
+
group: {
|
|
37
|
+
display: "flex",
|
|
38
|
+
flexDirection: "column",
|
|
39
|
+
borderRadius: 10,
|
|
40
|
+
marginHorizontal: 7,
|
|
41
|
+
marginVertical: 2.5,
|
|
42
|
+
overflow: "hidden",
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export default ActionSheet;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ActionSheetItem from "./ActionSheetItem";
|
|
3
|
+
const ActionSheetCancel = ({ label = "Cancel", color, style, onPress, }) => {
|
|
4
|
+
return (React.createElement(ActionSheetItem, { label: label, color: color || "#FF453A", style: [style], onPress: onPress }));
|
|
5
|
+
};
|
|
6
|
+
export default ActionSheetCancel;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text, StyleSheet, TouchableOpacity, } from "react-native";
|
|
3
|
+
import { extractStyles } from "../../utilities";
|
|
4
|
+
const ActionSheetItem = ({ label, style, color, onPress }) => {
|
|
5
|
+
const { textStyles, viewStyles } = extractStyles(style);
|
|
6
|
+
return (React.createElement(TouchableOpacity, { activeOpacity: 0.7, style: [styles.wrapper, viewStyles], onPress: onPress },
|
|
7
|
+
React.createElement(Text, { style: [styles.label, textStyles, { color }] }, label)));
|
|
8
|
+
};
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
wrapper: {
|
|
11
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
12
|
+
borderBottomColor: "#CCCCCC",
|
|
13
|
+
backgroundColor: "#F1F1F1",
|
|
14
|
+
minHeight: 50,
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
fontSize: 16,
|
|
21
|
+
textAlign: "center",
|
|
22
|
+
color: "#0A84FF",
|
|
23
|
+
fontWeight: "500",
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
paddingHorizontal: 20,
|
|
26
|
+
paddingVertical: 10,
|
|
27
|
+
alignSelf: "center",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export default ActionSheetItem;
|