@draftbit/core 43.5.0 → 43.6.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion/AccordionItem.js +5 -21
- package/lib/commonjs/components/Accordion/AccordionItem.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 +4 -20
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/Justification.js +0 -3
- package/lib/commonjs/components/ResizeMode.js +0 -3
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js +5 -0
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/RowBodyIcon.js.map +1 -1
- package/lib/module/components/Justification.js +1 -1
- package/lib/module/components/ResizeMode.js +1 -1
- package/lib/module/mappings/Banner.js.map +1 -1
- package/lib/module/mappings/KeyboardAwareScrollView.js +5 -0
- package/lib/module/mappings/KeyboardAwareScrollView.js.map +1 -1
- package/lib/typescript/src/mappings/KeyboardAwareScrollView.d.ts +10 -0
- package/package.json +3 -3
- package/src/mappings/KeyboardAwareScrollView.ts +5 -0
- package/src/Provider.js +0 -9
- package/src/components/Accordion/AccordionGroup.js +0 -44
- package/src/components/Accordion/AccordionItem.js +0 -32
- package/src/components/Accordion/index.js +0 -2
- package/src/components/ActionSheet/ActionSheet.js +0 -45
- package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
- package/src/components/ActionSheet/ActionSheetItem.js +0 -30
- package/src/components/ActionSheet/index.js +0 -3
- package/src/components/AnimatedCircularProgress.js +0 -43
- package/src/components/AspectRatio.js +0 -18
- package/src/components/AvatarEdit.js +0 -30
- package/src/components/Banner.js +0 -109
- package/src/components/Button.js +0 -112
- package/src/components/Card.js +0 -57
- package/src/components/CardBlock.js +0 -54
- package/src/components/CardContainer.js +0 -69
- package/src/components/CardContainerRating.js +0 -79
- package/src/components/CardContainerShortImage.js +0 -33
- package/src/components/CardInline.js +0 -36
- package/src/components/Carousel.js +0 -66
- package/src/components/Checkbox/Checkbox.js +0 -63
- package/src/components/Checkbox/CheckboxGroup.js +0 -21
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
- package/src/components/Checkbox/CheckboxRow.js +0 -78
- package/src/components/Checkbox/context.js +0 -14
- package/src/components/Checkbox/index.js +0 -3
- package/src/components/CircleImage.js +0 -8
- package/src/components/CircularProgress.js +0 -78
- package/src/components/Config.js +0 -63
- package/src/components/Container.js +0 -44
- package/src/components/DatePicker/DatePicker.js +0 -368
- package/src/components/DatePicker/DatePickerComponent.js +0 -13
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
- package/src/components/DatePicker/DatePickerComponentType.js +0 -1
- package/src/components/DeprecatedButton.js +0 -95
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedFAB.js +0 -115
- package/src/components/Divider.js +0 -13
- package/src/components/Elevation.js +0 -20
- package/src/components/FAB.js +0 -46
- package/src/components/FieldSearchBarFull.js +0 -53
- package/src/components/FormRow.js +0 -19
- package/src/components/Header.js +0 -44
- package/src/components/HeaderLarge.js +0 -7
- package/src/components/HeaderMedium.js +0 -7
- package/src/components/HeaderOverline.js +0 -7
- package/src/components/IconButton.js +0 -35
- package/src/components/Image.js +0 -47
- package/src/components/Justification.js +0 -1
- package/src/components/Layout.js +0 -50
- package/src/components/NumberInput.js +0 -49
- package/src/components/Picker/Picker.js +0 -56
- package/src/components/Picker/PickerComponent.android.js +0 -68
- package/src/components/Picker/PickerComponent.ios.js +0 -78
- package/src/components/Picker/PickerComponent.web.js +0 -69
- package/src/components/Picker/PickerTypes.js +0 -1
- package/src/components/Portal/Portal.js +0 -35
- package/src/components/Portal/PortalConsumer.js +0 -28
- package/src/components/Portal/PortalHost.js +0 -105
- package/src/components/Portal/PortalManager.js +0 -29
- package/src/components/ProgressBar.js +0 -118
- package/src/components/ProgressCircle.js +0 -13
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/RadioButton/RadioButton.js +0 -17
- package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
- package/src/components/RadioButton/RadioButtonGroup.js +0 -43
- package/src/components/RadioButton/RadioButtonRow.js +0 -76
- package/src/components/RadioButton/context.js +0 -14
- package/src/components/RadioButton/index.js +0 -4
- package/src/components/ResizeMode.js +0 -1
- package/src/components/Row.js +0 -48
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/ScreenContainer.js +0 -34
- package/src/components/Slider.js +0 -63
- package/src/components/StarRating.js +0 -50
- package/src/components/StepIndicator.js +0 -346
- package/src/components/Stepper.js +0 -39
- package/src/components/Surface.js +0 -32
- package/src/components/Swiper/Swiper.js +0 -18
- package/src/components/Swiper/SwiperItem.js +0 -9
- package/src/components/Swiper/index.js +0 -2
- package/src/components/Switch.js +0 -56
- package/src/components/Text.js +0 -28
- package/src/components/TextField.js +0 -420
- package/src/components/ToggleButton.js +0 -39
- package/src/components/Touchable.js +0 -12
- package/src/components/Touchable.web.js +0 -2
- package/src/components/Typography.js +0 -36
- package/src/components/useAuthState.js +0 -31
- package/src/constants.js +0 -10
- package/src/hooks.js +0 -12
- package/src/index.js +0 -51
- package/src/interfaces/Icon.js +0 -8
- package/src/mappings/Accordion.js +0 -41
- package/src/mappings/AccordionItem.js +0 -16
- package/src/mappings/ActionSheet.js +0 -13
- package/src/mappings/ActionSheetCancel.js +0 -19
- package/src/mappings/ActionSheetItem.js +0 -22
- package/src/mappings/ActivityIndicator.js +0 -53
- package/src/mappings/AudioPlayer.js +0 -20
- package/src/mappings/AvatarEdit.js +0 -37
- package/src/mappings/Banner.js +0 -32
- package/src/mappings/BlurView.js +0 -41
- package/src/mappings/Button.js +0 -56
- package/src/mappings/Card.js +0 -52
- package/src/mappings/CardBlock.js +0 -122
- package/src/mappings/CardContainer.js +0 -102
- package/src/mappings/CardContainerRating.js +0 -124
- package/src/mappings/CardContainerShortImage.js +0 -118
- package/src/mappings/CardInline.js +0 -51
- package/src/mappings/Carousel.js +0 -18
- package/src/mappings/Checkbox.js +0 -45
- package/src/mappings/CheckboxGroup.js +0 -25
- package/src/mappings/CheckboxRow.js +0 -56
- package/src/mappings/CircleImage.js +0 -24
- package/src/mappings/Container.js +0 -29
- package/src/mappings/CustomCode.js +0 -8
- package/src/mappings/DatePicker.js +0 -146
- package/src/mappings/Divider.js +0 -26
- package/src/mappings/FAB.js +0 -36
- package/src/mappings/Fetch.js +0 -12
- package/src/mappings/FieldSearchBarFull.js +0 -49
- package/src/mappings/FlatList.js +0 -19
- package/src/mappings/HeaderLarge.js +0 -28
- package/src/mappings/HeaderMedium.js +0 -54
- package/src/mappings/HeaderOverline.js +0 -54
- package/src/mappings/Icon.js +0 -25
- package/src/mappings/IconButton.js +0 -30
- package/src/mappings/Image.js +0 -15
- package/src/mappings/ImageBackground.js +0 -28
- package/src/mappings/KeyboardAvoidingView.js +0 -40
- package/src/mappings/KeyboardAwareScrollView.js +0 -38
- package/src/mappings/Layout.js +0 -195
- package/src/mappings/LinearGradient.js +0 -77
- package/src/mappings/MapCallout.js +0 -19
- package/src/mappings/MapMarker.js +0 -46
- package/src/mappings/Modal.js +0 -41
- package/src/mappings/Picker.js +0 -137
- package/src/mappings/ProgressBar.js +0 -100
- package/src/mappings/ProgressCircle.js +0 -108
- package/src/mappings/ProgressIndicator.js +0 -180
- package/src/mappings/RadioButton.js +0 -50
- package/src/mappings/RadioButtonGroup.js +0 -16
- package/src/mappings/RadioButtonRow.js +0 -37
- package/src/mappings/RowBodyIcon.js +0 -75
- package/src/mappings/RowHeadlineImageCaption.js +0 -167
- package/src/mappings/RowHeadlineImageIcon.js +0 -99
- package/src/mappings/SafeAreaView.js +0 -33
- package/src/mappings/ScrollView.js +0 -30
- package/src/mappings/Slider.js +0 -59
- package/src/mappings/StarRating.js +0 -42
- package/src/mappings/Stepper.js +0 -28
- package/src/mappings/Surface.js +0 -13
- package/src/mappings/Swiper.js +0 -60
- package/src/mappings/SwiperItem.js +0 -8
- package/src/mappings/Switch.js +0 -75
- package/src/mappings/Text.js +0 -227
- package/src/mappings/TextArea.js +0 -52
- package/src/mappings/TextField.js +0 -158
- package/src/mappings/TextInput.js +0 -208
- package/src/mappings/ToggleButton.js +0 -45
- package/src/mappings/Touchable.js +0 -12
- package/src/mappings/Video.js +0 -74
- package/src/mappings/View.js +0 -206
- package/src/mappings/WebView.js +0 -18
- package/src/styles/DarkTheme.js +0 -26
- package/src/styles/DefaultTheme.js +0 -111
- package/src/styles/fonts.js +0 -62
- package/src/styles/overlay.js +0 -60
- package/src/styles/shadow.js +0 -51
- package/src/theming.js +0 -3
- package/src/utilities.js +0 -54
|
@@ -21,6 +21,8 @@ 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 || 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
|
+
|
|
24
26
|
const AccordionItem = _ref => {
|
|
25
27
|
let {
|
|
26
28
|
Icon,
|
|
@@ -35,10 +37,9 @@ const AccordionItem = _ref => {
|
|
|
35
37
|
textStyles,
|
|
36
38
|
viewStyles
|
|
37
39
|
} = (0, _utilities.extractStyles)(style);
|
|
38
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
-
style: [styles.container, viewStyles]
|
|
40
|
-
|
|
41
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
40
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
41
|
+
style: [styles.container, viewStyles]
|
|
42
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
42
43
|
style: styles.row
|
|
43
44
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
44
45
|
name: icon,
|
|
@@ -73,22 +74,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
73
74
|
|
|
74
75
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
75
76
|
|
|
76
|
-
exports.default = _default;
|
|
77
|
-
//# sourceMappingURL=AccordionItem.js.map flexDirection: "row",
|
|
78
|
-
alignItems: "center",
|
|
79
|
-
paddingLeft: 8
|
|
80
|
-
},
|
|
81
|
-
item: {
|
|
82
|
-
marginVertical: 6,
|
|
83
|
-
paddingLeft: 8
|
|
84
|
-
},
|
|
85
|
-
content: {
|
|
86
|
-
flex: 1,
|
|
87
|
-
justifyContent: "center"
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
92
|
-
|
|
93
77
|
exports.default = _default;
|
|
94
78
|
//# sourceMappingURL=AccordionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionItem.
|
|
1
|
+
{"version":3,"sources":["AccordionItem.tsx"],"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","styles","container","row","colors","primary","item","content","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;;;;;;;;;AAWA,MAAMA,aAAa,GAAG,QAQT;AAAA,MARU;AACrBC,IAAAA,IADqB;AAErBC,IAAAA,IAFqB;AAGrBC,IAAAA,KAHqB;AAIrBC,IAAAA,KAJqB;AAKrBC,IAAAA,SALqB;AAMrBC,IAAAA,KANqB;AAOrB,OAAGC;AAPkB,GAQV;AACX,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcL,KAAd,CAAnC;AACA,sBACE,oBAAC,sBAAD;AAAW,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmBF,UAAnB;AAAlB,KAAsDF,IAAtD,gBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEG,MAAM,CAACE;AAApB,KACGV,IAAI,gBACH,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAE,EAFR;AAGE,IAAA,KAAK,EAAEG,SAAS,IAAIC,KAAK,CAACO,MAAN,CAAaC;AAHnC,IADG,GAMD,IAPN,eAQE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACJ,MAAM,CAACK,IAAR,EAAcL,MAAM,CAACM,OAArB;AAAb,kBACE,oBAAC,aAAD;AAAM,IAAA,UAAU,EAAE,KAAlB;AAAyB,IAAA,KAAK,EAAER;AAAhC,KACGL,KADH,CADF,CARF,CADF,CADF;AAkBD,CA5BD;;AA8BA,MAAMO,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,OAAO,EAAE;AADA,GADoB;AAI/BP,EAAAA,GAAG,EAAE;AACHQ,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE,QAFT;AAGHC,IAAAA,WAAW,EAAE;AAHV,GAJ0B;AAS/BP,EAAAA,IAAI,EAAE;AACJQ,IAAAA,cAAc,EAAE,CADZ;AAEJD,IAAAA,WAAW,EAAE;AAFT,GATyB;AAa/BN,EAAAA,OAAO,EAAE;AACPQ,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT;AAbsB,CAAlB,CAAf;;eAmBe,wBAAUzB,aAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(AccordionItem);\n"]}
|
|
@@ -13,6 +13,8 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
const getWidth = numColumns => {
|
|
17
19
|
switch (numColumns) {
|
|
18
20
|
case 1:
|
|
@@ -35,20 +37,6 @@ const Card = _ref => {
|
|
|
35
37
|
...rest
|
|
36
38
|
} = _ref;
|
|
37
39
|
const width = getWidth(numColumns);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
-
disabled: !onPress,
|
|
40
|
-
onPress: onPress,
|
|
41
|
-
style: [style, {
|
|
42
|
-
width
|
|
43
|
-
}],
|
|
44
|
-
...rest
|
|
45
|
-
}, children);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
-
|
|
50
|
-
exports.default = _default;
|
|
51
|
-
//# sourceMappingURL=DeprecatedCardWrapper.js.map);
|
|
52
40
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
53
41
|
disabled: !onPress,
|
|
54
42
|
onPress: onPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedCardWrapper.
|
|
1
|
+
{"version":3,"sources":["DeprecatedCardWrapper.tsx"],"names":["getWidth","numColumns","Card","children","onPress","style","rest","width"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAYA,MAAMA,QAAQ,GAAIC,UAAD,IAAwB;AACvC,UAAQA,UAAR;AACE,SAAK,CAAL;AACE,aAAO,KAAP;;AACF,SAAK,CAAL;AACE,aAAO,KAAP;;AACF;AACE,aAAO,MAAP;AANJ;AAQD,CATD;;AAWA,MAAMC,IAAqB,GAAG,QAMxB;AAAA,MANyB;AAC7BD,IAAAA,UAAU,GAAG,CADgB;AAE7BE,IAAAA,QAF6B;AAG7BC,IAAAA,OAH6B;AAI7BC,IAAAA,KAJ6B;AAK7B,OAAGC;AAL0B,GAMzB;AACJ,QAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;AACA,sBACE,6BAAC,kBAAD;AACE,IAAA,QAAQ,EAAE,CAACG,OADb;AAEE,IAAA,OAAO,EAAEA,OAFX;AAGE,IAAA,KAAK,EAAE,CAACC,KAAD,EAAQ;AAAEE,MAAAA;AAAF,KAAR;AAHT,KAIMD,IAJN,GAMGH,QANH,CADF;AAUD,CAlBD;;eAoBe,wBAAUD,IAAV,C","sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n numColumns?: number;\n children?: React.ReactNode;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst getWidth = (numColumns: number) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\n\nconst Card: React.FC<Props> = ({\n numColumns = 3,\n children,\n onPress,\n style,\n ...rest\n}) => {\n const width = getWidth(numColumns);\n return (\n <Touchable\n disabled={!onPress}\n onPress={onPress}\n style={[style, { width }]}\n {...rest}\n >\n {children}\n </Touchable>\n );\n};\n\nexport default withTheme(Card);\n"]}
|
|
@@ -27,6 +27,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
|
|
30
32
|
const FAB = _ref => {
|
|
31
33
|
let {
|
|
32
34
|
Icon,
|
|
@@ -128,7 +130,7 @@ const FAB = _ref => {
|
|
|
128
130
|
style: [{
|
|
129
131
|
elevation
|
|
130
132
|
}, style]
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
133
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
132
134
|
onPress: onPress,
|
|
133
135
|
accessibilityState: {
|
|
134
136
|
disabled
|
|
@@ -136,7 +138,7 @@ const FAB = _ref => {
|
|
|
136
138
|
accessibilityRole: "button",
|
|
137
139
|
disabled: disabled || loading,
|
|
138
140
|
style: buttonStyles
|
|
139
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
141
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: styles.content
|
|
141
143
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
144
|
style: iconStyle
|
|
@@ -179,23 +181,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
179
181
|
|
|
180
182
|
var _default = (0, _theming.withTheme)(FAB);
|
|
181
183
|
|
|
182
|
-
exports.default = _default;
|
|
183
|
-
//# sourceMappingURL=DeprecatedFAB.js.map },
|
|
184
|
-
icon: {
|
|
185
|
-
alignItems: "center",
|
|
186
|
-
justifyContent: "center",
|
|
187
|
-
width: _Config.default.buttonIconSize
|
|
188
|
-
},
|
|
189
|
-
fixed: {
|
|
190
|
-
left: 0,
|
|
191
|
-
right: 0,
|
|
192
|
-
bottom: 0,
|
|
193
|
-
height: 64,
|
|
194
|
-
borderRadius: 0
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
var _default = (0, _theming.withTheme)(FAB);
|
|
199
|
-
|
|
200
184
|
exports.default = _default;
|
|
201
185
|
//# sourceMappingURL=DeprecatedFAB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedFAB.js"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","React","createElement","Elevation","Touchable","accessibilityState","accessibilityRole","View","name","size","ActivityIndicator","Text","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAuM;AAAA,MAAtM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEC,IAAAA,KAAK,EAAEC,aAAxE;AAAuFC,IAAAA,KAAvF;AAA8FC,IAAAA,OAA9F;AAAuGC,IAAAA,SAAS,GAAG,CAAnH;AAAsHC,IAAAA,KAAtH;AAA6HC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV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ACoB,MAAvB;AAA3B,GAA1B,EAAuF5B,KAAvF,CAAJ,GAAqG,IAJ9G,CADJ,CADI,CAAR;AAOH,CAnFD;;AAoFA,MAAM2B,MAAM,GAAGP,wBAAWsC,MAAX,CAAkB;AAC7B9B,EAAAA,MAAM,EAAE;AACJ+B,IAAAA,WAAW,EAAE;AADT,GADqB;AAI7B7B,EAAAA,OAAO,EAAE;AACL8B,IAAAA,aAAa,EAAE,KADV;AAELpC,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GAJoB;AAS7B/B,EAAAA,IAAI,EAAE;AACF8B,IAAAA,UAAU,EAAE,QADV;AAEFC,IAAAA,cAAc,EAAE,QAFd;AAGFS,IAAAA,KAAK,EAAEC,gBAAOC;AAHZ,GATuB;AAc7ByB,EAAAA,KAAK,EAAE;AACHC,IAAAA,IAAI,EAAE,CADH;AAEHC,IAAAA,KAAK,EAAE,CAFJ;AAGHC,IAAAA,MAAM,EAAE,CAHL;AAIH1B,IAAAA,MAAM,EAAE,EAJL;AAKHf,IAAAA,YAAY,EAAE;AALX;AAdsB,CAAlB,CAAf;;eAsBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\n"]}
|
|
1
|
+
{"version":3,"sources":["DeprecatedFAB.tsx"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAuDA,MAAMA,GAAoB,GAAG,QAavB;AAAA,MAbwB;AAC5BC,IAAAA,IAD4B;AAE5BC,IAAAA,IAF4B;AAG5BC,IAAAA,QAAQ,GAAG,KAHiB;AAI5BC,IAAAA,IAAI,GAAG,OAJqB;AAK5BC,IAAAA,OAAO,GAAG,KALkB;AAM5BC,IAAAA,KAAK,EAAEC,aANqB;AAO5BC,IAAAA,KAP4B;AAQ5BC,IAAAA,OAR4B;AAS5BC,IAAAA,SAAS,GAAG,CATgB;AAU5BC,IAAAA,KAV4B;AAW5BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAXqB;AAY5B,OAAGC;AAZyB,GAaxB;AACJ,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AAEA,MAAInB,IAAI,KAAK,UAAT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,KAAK,EAAE,CAFF;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILd,IAAAA,MAAM,EAAE,EAJH;AAKLf,IAAAA,YAAY,EAAE;AALT;AAdwB,CAAlB,CAAf;;eAuBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A floating action button represents the primary action in an application.\n *\n * <div class=\"screenshots\">\n * <img src=\"screenshots/fab-1.png\" />\n * <img src=\"screenshots/fab-2.png\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { StyleSheet } from 'react-native';\n * import { FAB } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <FAB\n * style={styles.fab}\n * type=\"outline\"\n * icon=\"add\"\n * onPress={() => console.log('Pressed')}\n * />\n * );\n *\n * const styles = StyleSheet.create({\n * fab: {\n * position: 'absolute',\n * margin: 16,\n * right: 0,\n * bottom: 0,\n * },\n * })\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"extended\" | \"outline\" | \"fixed\" | \"standard\";\n loading?: boolean;\n icon?: string;\n color?: string;\n label?: string;\n onPress: () => void;\n elevation?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst FAB: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n color: colorOverride,\n label,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle: StyleProp<ViewStyle> = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n const buttonStyles: StyleProp<ViewStyle>[] = [styles.button, buttonStyle];\n\n const contentStyle: StyleProp<ViewStyle>[] = [styles.content];\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n };\n\n const iconStyle: StyleProp<ViewStyle>[] = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n\n textStyle.margin = 16;\n }\n\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n\n return (\n <Elevation style={[{ elevation }, style]}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={buttonStyles}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n {label ? (\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {label}\n </Text>\n ) : null}\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\n\nexport default withTheme(FAB);\n"]}
|
|
@@ -41,6 +41,11 @@ const SEED_DATA = {
|
|
|
41
41
|
enableOnAndroid: (0, _types.createStaticBoolProp)({
|
|
42
42
|
label: "Enable On Android",
|
|
43
43
|
description: "Enable Android Support"
|
|
44
|
+
}),
|
|
45
|
+
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
46
|
+
label: "Shows Vertical Scroll Indicator",
|
|
47
|
+
description: "Show or hide the vertical scroll indicator",
|
|
48
|
+
defaultValue: true
|
|
44
49
|
})
|
|
45
50
|
}
|
|
46
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid"],"mappings":";;;;;;;AAAA;;AAMO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAE,iCAAqB;AACvCC,MAAAA,KAAK,EAAE,uBADgC;AAEvCN,MAAAA,WAAW,EAAE;AAF0B,KAArB,CADf;AAKLO,IAAAA,qBAAqB,EAAE,iCAAqB;AAC1CD,MAAAA,KAAK,EAAE,yBADmC;AAE1CN,MAAAA,WAAW,EACT;AAHwC,KAArB,CALlB;AAULQ,IAAAA,WAAW,EAAE,mCAAuB;AAClCF,MAAAA,KAAK,EAAE,cAD2B;AAElCN,MAAAA,WAAW,EAAE;AAFqB,KAAvB,CAVR;AAcLS,IAAAA,iBAAiB,EAAE,mCAAuB;AACxCH,MAAAA,KAAK,EAAE,qBADiC;AAExCN,MAAAA,WAAW,EACT;AAHsC,KAAvB,CAdd;AAmBLU,IAAAA,yBAAyB,EAAE,iCAAqB;AAC9CJ,MAAAA,KAAK,EAAE,oCADuC;AAE9CN,MAAAA,WAAW,EACT;AAH4C,KAArB,CAnBtB;AAwBLW,IAAAA,mBAAmB,EAAE,mCAAuB;AAC1CL,MAAAA,KAAK,EAAE,uBADmC;AAE1CN,MAAAA,WAAW,EACT;AAHwC,KAAvB,CAxBhB;AA6BLY,IAAAA,eAAe,EAAE,iCAAqB;AACpCN,MAAAA,KAAK,EAAE,mBAD6B;AAEpCN,MAAAA,WAAW,EAAE;AAFuB,KAArB;
|
|
1
|
+
{"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid","showsVerticalScrollIndicator","defaultValue"],"mappings":";;;;;;;AAAA;;AAMO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,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n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n label: \"Shows Vertical Scroll Indicator\",\n description: \"Show or hide the vertical scroll indicator\",\n defaultValue: true,\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonRow.
|
|
1
|
+
{"version":3,"sources":["RadioButtonRow.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","description","required","defaultValue","direction","options","value","color","group","GROUPS","basic","unselectedColor"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,kBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE,qCAFO;AAGpBC,MAAAA,QAAQ,EAAE,IAHU;AAIpBC,MAAAA,YAAY,EAAE;AAJM,KAAf,CADF;AAOLC,IAAAA,SAAS,EAAE,+BAAmB;AAC5BJ,MAAAA,KAAK,EAAE,WADqB;AAE5BC,MAAAA,WAAW,EACT,8DAH0B;AAI5BI,MAAAA,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;AAJmB,KAAnB,CAPN;AAaLC,IAAAA,KAAK,EAAE,2BAAe;AACpBN,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE,2BAFO;AAGpBE,MAAAA,YAAY,EAAE,IAHM;AAIpBD,MAAAA,QAAQ,EAAE;AAJU,KAAf,CAbF;AAmBLK,IAAAA,KAAK,EAAE,4BAAgB;AACrBC,MAAAA,KAAK,EAAEC,cAAOC,KADO;AAErBT,MAAAA,WAAW,EAAE,sBAFQ;AAGrBE,MAAAA,YAAY,EAAE;AAHO,KAAhB,CAnBF;AAwBLQ,IAAAA,eAAe,EAAE,4BAAgB;AAC/BH,MAAAA,KAAK,EAAEC,cAAOC,KADiB;AAE/BV,MAAAA,KAAK,EAAE,kBAFwB;AAG/BC,MAAAA,WAAW,EAAE,iCAHkB;AAI/BE,MAAAA,YAAY,EAAE;AAJiB,KAAhB;AAxBZ;AALgB,CAAlB","sourcesContent":["import {\n createTextProp,\n createTextEnumProp,\n COMPONENT_TYPES,\n createColorProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description:\n \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RowBodyIcon.
|
|
1
|
+
{"version":3,"sources":["RowBodyIcon.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","row","preview_image_url","supports_list_render","props","title","group","GROUPS","data","label","formType","FORM_TYPES","string","propType","PROP_TYPES","STRING","defaultValue","editable","required","icon","basic","ASSET","layout","subtitle"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,2BADR;AAEEC,EAAAA,GAAG,EAAE,aAFP;AAGEC,EAAAA,WAAW,EAAE,4DAHf;AAIEC,EAAAA,QAAQ,EAAEC,uBAAgBC,GAJ5B;AAKEC,EAAAA,iBAAiB,EAAE,8CALrB;AAMEC,EAAAA,oBAAoB,EAAE,IANxB;AAOEC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAEC,cAAOC,IADT;AAELC,MAAAA,KAAK,EAAE,OAFF;AAGLX,MAAAA,WAAW,EAAE,iBAHR;AAILY,MAAAA,QAAQ,EAAEC,kBAAWC,MAJhB;AAKLC,MAAAA,QAAQ,EAAEC,kBAAWC,MALhB;AAMLC,MAAAA,YAAY,EAAE,4BANT;AAOLC,MAAAA,QAAQ,EAAE,IAPL;AAQLC,MAAAA,QAAQ,EAAE;AARL,KADF;AAWLC,IAAAA,IAAI,EAAE;AACJb,MAAAA,KAAK,EAAEC,cAAOa,K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,MAAAA,KAAK,EAAEC,cAAOa,KADV;AAEJX,MAAAA,KAAK,EAAE,MAFH;AAGJX,MAAAA,WAAW,EAAE,iBAHT;AAIJY,MAAAA,QAAQ,EAAEC,kBAAWQ,IAJjB;AAKJN,MAAAA,QAAQ,EAAEC,kBAAWO,KALjB;AAMJL,MAAAA,YAAY,EAAE,IANV;AAOJC,MAAAA,QAAQ,EAAE,IAPN;AAQJC,MAAAA,QAAQ,EAAE;AARN;AArBD,GART;AAwCEI,EAAAA,MAAM,EAAE;AAxCV,CAhCuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n GROUPS,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"Row Single Line Body Icon\",\n tag: \"RowBodyIcon\",\n description: \"A row with left aligned body text and a right aligned icon\",\n category: COMPONENT_TYPES.row,\n preview_image_url: \"{CLOUDINARY_URL}/Row_SingleLine_BodyIcon.png\",\n supports_list_render: true,\n props: {\n title: {\n group: GROUPS.data,\n label: \"Title\",\n description: \"Text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Beautiful West Coast Villa\",\n editable: true,\n required: false,\n },\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Icon to display\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n },\n layout: {},\n },\n {\n name: \"Row Double Line Body Icon\",\n tag: \"RowBodyIcon\",\n description:\n \"A row with left aligned body text and subtitle text and a right aligned icon\",\n category: COMPONENT_TYPES.row,\n preview_image_url: \"{CLOUDINARY_URL}/Row_DoubleLine_BodyIcon.png\",\n supports_list_render: true,\n props: {\n title: {\n group: GROUPS.data,\n label: \"Title\",\n description: \"Text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Beautiful West Coast Villa\",\n editable: true,\n required: false,\n },\n subtitle: {\n group: GROUPS.data,\n label: \"Subtitle\",\n description: \"Subtitle text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"San Diego\",\n editable: true,\n required: false,\n },\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Icon to display\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n },\n layout: {},\n },\n];\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
//# sourceMappingURL=Justification.js.
|
|
2
|
+
//# sourceMappingURL=Justification.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
//# sourceMappingURL=ResizeMode.js.
|
|
2
|
+
//# sourceMappingURL=ResizeMode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Banner.
|
|
1
|
+
{"version":3,"sources":["Banner.ts"],"names":["COMPONENT_TYPES","createIconProp","createBoolProp","createColorProp","createTextProp","GROUPS","SEED_DATA","name","tag","category","button","props","icon","defaultValue","required","content","label","description","initiallyVisible","group","basic","dismissable","buttonColor"],"mappings":"AAAA,SACEA,eADF,EAEEC,cAFF,EAGEC,cAHF,EAIEC,eAJF,EAKEC,cALF,EAMEC,MANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,QADiB;AAEvBC,EAAAA,GAAG,EAAE,QAFkB;AAGvBC,EAAAA,QAAQ,EAAET,eAAe,CAACU,MAHH;AAIvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAEX,cAAc,CAAC;AACnBY,MAAAA,YAAY,EAAE,IADK;AAEnBC,MAAAA,QAAQ,EAAE;AAFS,KAAD,CADf;AAKLC,IAAAA,OAAO,EAAEX,cAAc,CAAC;AACtBY,MAAAA,KAAK,EAAE,SADe;AAEtBC,MAAAA,WAAW,EAAE;AAFS,KAAD,CALlB;AASLC,IAAAA,gBAAgB,EAAEhB,cAAc,CAAC;AAC/BiB,MAAAA,KAAK,EAAEd,MAAM,CAACe,KADiB;AAE/BJ,MAAAA,KAAK,EAAE,mBAFwB;AAG/BC,MAAAA,WAAW,EAAE,sCAHkB;AAI/BJ,MAAAA,YAAY,EAAE;AAJiB,KAAD,CAT3B;AAeLQ,IAAAA,WAAW,EAAEnB,cAAc,CAAC;AAC1BiB,MAAAA,KAAK,EAAEd,MAAM,CAACe,KADY;AAE1BJ,MAAAA,KAAK,EAAE,aAFmB;AAG1BC,MAAAA,WAAW,EAAE,gDAHa;AAI1BJ,MAAAA,YAAY,EAAE;AAJY,KAAD,CAftB;AAqBLS,IAAAA,WAAW,EAAEnB,eAAe,CAAC;AAC3Ba,MAAAA,KAAK,EAAE,cADoB;AAE3BH,MAAAA,YAAY,EAAE;AAFa,KAAD;AArBvB;AAJgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createIconProp,\n createBoolProp,\n createColorProp,\n createTextProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Banner\",\n tag: \"Banner\",\n category: COMPONENT_TYPES.button,\n props: {\n icon: createIconProp({\n defaultValue: null,\n required: false,\n }),\n content: createTextProp({\n label: \"Content\",\n description: \"Banner text content\",\n }),\n initiallyVisible: createBoolProp({\n group: GROUPS.basic,\n label: \"Initially visible\",\n description: \"Whether the banner should be visible\",\n defaultValue: true,\n }),\n dismissable: createBoolProp({\n group: GROUPS.basic,\n label: \"Dismissable\",\n description: \"Whether the banner should be able to be closed\",\n defaultValue: true,\n }),\n buttonColor: createColorProp({\n label: \"Button color\",\n defaultValue: \"primary\",\n }),\n },\n};\n"]}
|
|
@@ -33,6 +33,11 @@ export const SEED_DATA = {
|
|
|
33
33
|
enableOnAndroid: createStaticBoolProp({
|
|
34
34
|
label: "Enable On Android",
|
|
35
35
|
description: "Enable Android Support"
|
|
36
|
+
}),
|
|
37
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
38
|
+
label: "Shows Vertical Scroll Indicator",
|
|
39
|
+
description: "Show or hide the vertical scroll indicator",
|
|
40
|
+
defaultValue: true
|
|
36
41
|
})
|
|
37
42
|
}
|
|
38
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["COMPONENT_TYPES","createStaticBoolProp","createStaticNumberProp","SEED_DATA","name","tag","description","category","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,sBAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAET,oBAAoB,CAAC;AACvCU,MAAAA,KAAK,EAAE,uBADgC;AAEvCL,MAAAA,WAAW,EAAE;AAF0B,KAAD,CADnC;AAKLM,IAAAA,qBAAqB,EAAEX,oBAAoB,CAAC;AAC1CU,MAAAA,KAAK,EAAE,yBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CALtC;AAULO,IAAAA,WAAW,EAAEX,sBAAsB,CAAC;AAClCS,MAAAA,KAAK,EAAE,cAD2B;AAElCL,MAAAA,WAAW,EAAE;AAFqB,KAAD,CAV9B;AAcLQ,IAAAA,iBAAiB,EAAEZ,sBAAsB,CAAC;AACxCS,MAAAA,KAAK,EAAE,qBADiC;AAExCL,MAAAA,WAAW,EACT;AAHsC,KAAD,CAdpC;AAmBLS,IAAAA,yBAAyB,EAAEd,oBAAoB,CAAC;AAC9CU,MAAAA,KAAK,EAAE,oCADuC;AAE9CL,MAAAA,WAAW,EACT;AAH4C,KAAD,CAnB1C;AAwBLU,IAAAA,mBAAmB,EAAEd,sBAAsB,CAAC;AAC1CS,MAAAA,KAAK,EAAE,uBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CAxBtC;AA6BLW,IAAAA,eAAe,EAAEhB,oBAAoB,CAAC;AACpCU,MAAAA,KAAK,EAAE,mBAD6B;AAEpCL,MAAAA,WAAW,EAAE;AAFuB,KAAD;
|
|
1
|
+
{"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["COMPONENT_TYPES","createStaticBoolProp","createStaticNumberProp","SEED_DATA","name","tag","description","category","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid","showsVerticalScrollIndicator","defaultValue"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,sBAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAET,oBAAoB,CAAC;AACvCU,MAAAA,KAAK,EAAE,uBADgC;AAEvCL,MAAAA,WAAW,EAAE;AAF0B,KAAD,CADnC;AAKLM,IAAAA,qBAAqB,EAAEX,oBAAoB,CAAC;AAC1CU,MAAAA,KAAK,EAAE,yBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CALtC;AAULO,IAAAA,WAAW,EAAEX,sBAAsB,CAAC;AAClCS,MAAAA,KAAK,EAAE,cAD2B;AAElCL,MAAAA,WAAW,EAAE;AAFqB,KAAD,CAV9B;AAcLQ,IAAAA,iBAAiB,EAAEZ,sBAAsB,CAAC;AACxCS,MAAAA,KAAK,EAAE,qBADiC;AAExCL,MAAAA,WAAW,EACT;AAHsC,KAAD,CAdpC;AAmBLS,IAAAA,yBAAyB,EAAEd,oBAAoB,CAAC;AAC9CU,MAAAA,KAAK,EAAE,oCADuC;AAE9CL,MAAAA,WAAW,EACT;AAH4C,KAAD,CAnB1C;AAwBLU,IAAAA,mBAAmB,EAAEd,sBAAsB,CAAC;AAC1CS,MAAAA,KAAK,EAAE,uBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CAxBtC;AA6BLW,IAAAA,eAAe,EAAEhB,oBAAoB,CAAC;AACpCU,MAAAA,KAAK,EAAE,mBAD6B;AAEpCL,MAAAA,WAAW,EAAE;AAFuB,KAAD,CA7BhC;AAiCLY,IAAAA,4BAA4B,EAAEjB,oBAAoB,CAAC;AACjDU,MAAAA,KAAK,EAAE,iCAD0C;AAEjDL,MAAAA,WAAW,EAAE,4CAFoC;AAGjDa,MAAAA,YAAY,EAAE;AAHmC,KAAD;AAjC7C;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createStaticNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n label: \"Shows Vertical Scroll Indicator\",\n description: \"Show or hide the vertical scroll indicator\",\n defaultValue: true,\n }),\n },\n};\n"]}
|
|
@@ -78,5 +78,15 @@ export declare const SEED_DATA: {
|
|
|
78
78
|
required: boolean;
|
|
79
79
|
group: string;
|
|
80
80
|
};
|
|
81
|
+
showsVerticalScrollIndicator: {
|
|
82
|
+
label: string;
|
|
83
|
+
description: string;
|
|
84
|
+
formType: string;
|
|
85
|
+
propType: string;
|
|
86
|
+
defaultValue: boolean;
|
|
87
|
+
editable: boolean;
|
|
88
|
+
required: boolean;
|
|
89
|
+
group: string;
|
|
90
|
+
};
|
|
81
91
|
};
|
|
82
92
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.6.0-alpha.3",
|
|
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.
|
|
44
|
+
"@draftbit/types": "^43.6.0-alpha.3",
|
|
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": "f0edc5db0fa76c2e074e19fc211be5d6f3e672c5"
|
|
84
84
|
}
|
|
@@ -44,5 +44,10 @@ export const SEED_DATA = {
|
|
|
44
44
|
label: "Enable On Android",
|
|
45
45
|
description: "Enable Android Support",
|
|
46
46
|
}),
|
|
47
|
+
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
48
|
+
label: "Shows Vertical Scroll Indicator",
|
|
49
|
+
description: "Show or hide the vertical scroll indicator",
|
|
50
|
+
defaultValue: true,
|
|
51
|
+
}),
|
|
47
52
|
},
|
|
48
53
|
};
|
package/src/Provider.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
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);
|
|
@@ -1,32 +0,0 @@
|
|
|
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);
|
|
@@ -1,45 +0,0 @@
|
|
|
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;
|
|
@@ -1,6 +0,0 @@
|
|
|
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;
|