@draftbit/core 46.7.2-9358f4.2 → 46.7.4
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/Justification.js +1 -5
- package/lib/commonjs/components/ResizeMode.js +1 -5
- package/lib/commonjs/index.js +0 -56
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Justification.js +0 -1
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/index.js +0 -8
- package/lib/typescript/src/index.d.ts +0 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +0 -8
- package/lib/commonjs/components/CardBlock.js +0 -106
- package/lib/commonjs/components/CardContainer.js +0 -138
- package/lib/commonjs/components/CardContainerRating.js +0 -133
- package/lib/commonjs/components/CardContainerShortImage.js +0 -84
- package/lib/commonjs/components/CardInline.js +0 -91
- package/lib/commonjs/components/Carousel.js +0 -130
- package/lib/commonjs/components/Header.js +0 -82
- package/lib/commonjs/components/HeaderLarge.js +0 -38
- package/lib/commonjs/components/HeaderMedium.js +0 -38
- package/lib/commonjs/components/HeaderOverline.js +0 -39
- package/lib/module/components/CardBlock.js +0 -98
- package/lib/module/components/CardContainer.js +0 -121
- package/lib/module/components/CardContainerRating.js +0 -125
- package/lib/module/components/CardContainerShortImage.js +0 -76
- package/lib/module/components/CardInline.js +0 -82
- package/lib/module/components/Carousel.js +0 -120
- package/lib/module/components/Header.js +0 -72
- package/lib/module/components/HeaderLarge.js +0 -28
- package/lib/module/components/HeaderMedium.js +0 -28
- package/lib/module/components/HeaderOverline.js +0 -29
- package/lib/typescript/src/components/CardBlock.d.ts +0 -21
- package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainer.d.ts +0 -23
- package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
- package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
- package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
- package/lib/typescript/src/components/CardInline.d.ts +0 -20
- package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
- package/lib/typescript/src/components/Carousel.d.ts +0 -15
- package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
- package/lib/typescript/src/components/Header.d.ts +0 -20
- package/lib/typescript/src/components/Header.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
- package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
- package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
- package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
- 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 -114
- package/src/components/Card.js +0 -57
- package/src/components/CardBlock.js +0 -54
- package/src/components/CardBlock.tsx +0 -127
- package/src/components/CardContainer.js +0 -69
- package/src/components/CardContainer.tsx +0 -165
- package/src/components/CardContainerRating.js +0 -79
- package/src/components/CardContainerRating.tsx +0 -175
- package/src/components/CardContainerShortImage.js +0 -33
- package/src/components/CardContainerShortImage.tsx +0 -101
- package/src/components/CardInline.js +0 -36
- package/src/components/CardInline.tsx +0 -93
- package/src/components/Carousel.js +0 -68
- package/src/components/Carousel.tsx +0 -134
- package/src/components/Checkbox/Checkbox.js +0 -62
- package/src/components/Checkbox/CheckboxGroup.js +0 -21
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
- package/src/components/Checkbox/CheckboxRow.js +0 -77
- 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 -81
- package/src/components/Config.js +0 -64
- package/src/components/Container.js +0 -43
- package/src/components/DatePicker/DatePicker.js +0 -377
- 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 -83
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedFAB.js +0 -114
- 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/Header.tsx +0 -105
- package/src/components/HeaderLarge.js +0 -7
- package/src/components/HeaderLarge.tsx +0 -40
- package/src/components/HeaderMedium.js +0 -7
- package/src/components/HeaderMedium.tsx +0 -41
- package/src/components/HeaderOverline.js +0 -7
- package/src/components/HeaderOverline.tsx +0 -42
- 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 -267
- package/src/components/Picker/PickerComponent.android.js +0 -69
- package/src/components/Picker/PickerComponent.ios.js +0 -79
- package/src/components/Picker/PickerComponent.web.js +0 -70
- package/src/components/Picker/PickerTypes.js +0 -1
- package/src/components/Portal/Portal.js +0 -35
- package/src/components/Portal/PortalConsumer.js +0 -27
- package/src/components/Portal/PortalHost.js +0 -107
- package/src/components/Portal/PortalManager.js +0 -32
- package/src/components/Pressable.js +0 -12
- 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/SVG.js +0 -13
- 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 -41
- package/src/components/Surface.js +0 -32
- package/src/components/Swiper/Swiper.js +0 -29
- 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 -33
- package/src/components/TextField.js +0 -428
- 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 -53
- 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 -23
- package/src/mappings/ActivityIndicator.js +0 -58
- package/src/mappings/AudioPlayer.js +0 -57
- package/src/mappings/AvatarEdit.js +0 -38
- package/src/mappings/Banner.js +0 -32
- package/src/mappings/BlurView.js +0 -42
- package/src/mappings/Button.js +0 -116
- package/src/mappings/Card.js +0 -52
- package/src/mappings/CardBlock.js +0 -123
- package/src/mappings/CardContainer.js +0 -104
- package/src/mappings/CardContainerRating.js +0 -126
- package/src/mappings/CardContainerShortImage.js +0 -120
- package/src/mappings/CardInline.js +0 -52
- package/src/mappings/Carousel.js +0 -19
- package/src/mappings/Checkbox.js +0 -46
- package/src/mappings/CheckboxGroup.js +0 -26
- package/src/mappings/CheckboxRow.js +0 -61
- package/src/mappings/CircleImage.js +0 -25
- package/src/mappings/Container.js +0 -30
- package/src/mappings/CustomCode.js +0 -8
- package/src/mappings/DatePicker.js +0 -176
- package/src/mappings/Divider.js +0 -27
- package/src/mappings/FAB.js +0 -37
- package/src/mappings/Fetch.js +0 -13
- package/src/mappings/FieldSearchBarFull.js +0 -50
- package/src/mappings/FlashList.js +0 -85
- package/src/mappings/FlatList.js +0 -37
- package/src/mappings/HeaderLarge.js +0 -29
- package/src/mappings/HeaderMedium.js +0 -55
- package/src/mappings/HeaderOverline.js +0 -55
- package/src/mappings/Icon.js +0 -32
- package/src/mappings/IconButton.js +0 -35
- package/src/mappings/Image.js +0 -35
- package/src/mappings/ImageBackground.js +0 -29
- package/src/mappings/KeyboardAvoidingView.js +0 -41
- package/src/mappings/KeyboardAwareScrollView.js +0 -50
- package/src/mappings/Layout.js +0 -200
- package/src/mappings/LinearGradient.js +0 -77
- package/src/mappings/MapCallout.js +0 -21
- package/src/mappings/MapMarker.js +0 -47
- package/src/mappings/MapView.js +0 -139
- package/src/mappings/Modal.js +0 -42
- package/src/mappings/NumberInput.js +0 -254
- package/src/mappings/Picker.js +0 -148
- package/src/mappings/ProgressBar.js +0 -101
- package/src/mappings/ProgressCircle.js +0 -109
- package/src/mappings/ProgressIndicator.js +0 -181
- package/src/mappings/RadioButton.js +0 -51
- package/src/mappings/RadioButtonGroup.js +0 -17
- package/src/mappings/RadioButtonRow.js +0 -42
- package/src/mappings/RowBodyIcon.js +0 -75
- package/src/mappings/RowHeadlineImageCaption.js +0 -167
- package/src/mappings/RowHeadlineImageIcon.js +0 -99
- package/src/mappings/SVG.js +0 -20
- package/src/mappings/SafeAreaView.js +0 -33
- package/src/mappings/ScrollView.js +0 -31
- package/src/mappings/Slider.js +0 -60
- package/src/mappings/StarRating.js +0 -43
- package/src/mappings/Stepper.js +0 -32
- package/src/mappings/Surface.js +0 -14
- package/src/mappings/Swiper.js +0 -62
- package/src/mappings/SwiperItem.js +0 -8
- package/src/mappings/Switch.js +0 -81
- package/src/mappings/Text.js +0 -251
- package/src/mappings/TextArea.js +0 -274
- package/src/mappings/TextField.js +0 -391
- package/src/mappings/TextInput.js +0 -402
- package/src/mappings/ToggleButton.js +0 -50
- package/src/mappings/Touchable.js +0 -60
- package/src/mappings/Video.js +0 -81
- package/src/mappings/View.js +0 -207
- package/src/mappings/WebView.js +0 -88
- 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 -102
package/lib/commonjs/index.js
CHANGED
|
@@ -75,36 +75,6 @@ Object.defineProperty(exports, "Card", {
|
|
|
75
75
|
return _Card.default;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
Object.defineProperty(exports, "CardBlock", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _CardBlock.default;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "CardContainer", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _CardContainer.default;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "CardContainerRating", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _CardContainerRating.default;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "CardInline", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _CardInline.default;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "Carousel", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _Carousel.default;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
78
|
Object.defineProperty(exports, "Center", {
|
|
109
79
|
enumerable: true,
|
|
110
80
|
get: function () {
|
|
@@ -177,24 +147,6 @@ Object.defineProperty(exports, "FieldSearchBarFull", {
|
|
|
177
147
|
return _FieldSearchBarFull.default;
|
|
178
148
|
}
|
|
179
149
|
});
|
|
180
|
-
Object.defineProperty(exports, "HeaderLarge", {
|
|
181
|
-
enumerable: true,
|
|
182
|
-
get: function () {
|
|
183
|
-
return _HeaderLarge.default;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
Object.defineProperty(exports, "HeaderMedium", {
|
|
187
|
-
enumerable: true,
|
|
188
|
-
get: function () {
|
|
189
|
-
return _HeaderMedium.default;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
Object.defineProperty(exports, "HeaderOverline", {
|
|
193
|
-
enumerable: true,
|
|
194
|
-
get: function () {
|
|
195
|
-
return _HeaderOverline.default;
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
150
|
Object.defineProperty(exports, "IconButton", {
|
|
199
151
|
enumerable: true,
|
|
200
152
|
get: function () {
|
|
@@ -427,7 +379,6 @@ var _Button = require("./components/Button");
|
|
|
427
379
|
var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
|
|
428
380
|
var _AvatarEdit = _interopRequireDefault(require("./components/AvatarEdit"));
|
|
429
381
|
var _Card = _interopRequireDefault(require("./components/Card"));
|
|
430
|
-
var _Carousel = _interopRequireDefault(require("./components/Carousel"));
|
|
431
382
|
var _Checkbox = require("./components/Checkbox");
|
|
432
383
|
var _Container = _interopRequireDefault(require("./components/Container"));
|
|
433
384
|
var _Divider = _interopRequireDefault(require("./components/Divider"));
|
|
@@ -450,14 +401,7 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
450
401
|
var _Swiper = require("./components/Swiper");
|
|
451
402
|
var _Layout = require("./components/Layout");
|
|
452
403
|
var _index = require("./components/RadioButton/index");
|
|
453
|
-
var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
|
|
454
|
-
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
455
|
-
var _CardContainerRating = _interopRequireDefault(require("./components/CardContainerRating"));
|
|
456
|
-
var _CardInline = _interopRequireDefault(require("./components/CardInline"));
|
|
457
404
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
458
|
-
var _HeaderLarge = _interopRequireDefault(require("./components/HeaderLarge"));
|
|
459
|
-
var _HeaderMedium = _interopRequireDefault(require("./components/HeaderMedium"));
|
|
460
|
-
var _HeaderOverline = _interopRequireDefault(require("./components/HeaderOverline"));
|
|
461
405
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
462
406
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
463
407
|
var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle"));
|
|
@@ -57,6 +57,7 @@ function extractBorderAndMarginStyles(style, additionalBorderStyles, additionalM
|
|
|
57
57
|
marginStyles
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
+
|
|
60
61
|
/**
|
|
61
62
|
* Merges a style object on top of another style object. In React Native,
|
|
62
63
|
* keys with undefined values in a style object will still override styles
|
|
@@ -89,4 +90,4 @@ function getValueForRadioButton(value) {
|
|
|
89
90
|
} else {
|
|
90
91
|
throw new Error("Invalid value: ".concat(value));
|
|
91
92
|
}
|
|
92
|
-
}
|
|
93
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/module/index.js
CHANGED
|
@@ -8,7 +8,6 @@ export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
11
|
-
export { default as Carousel } from "./components/Carousel";
|
|
12
11
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
13
12
|
export { default as CircleImage } from "./components/CircleImage";
|
|
14
13
|
export { default as Container } from "./components/Container";
|
|
@@ -34,14 +33,7 @@ export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout"
|
|
|
34
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
35
34
|
|
|
36
35
|
/* Deprecated: Fix or Delete! */
|
|
37
|
-
export { default as CardBlock } from "./components/CardBlock";
|
|
38
|
-
export { default as CardContainer } from "./components/CardContainer";
|
|
39
|
-
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
40
|
-
export { default as CardInline } from "./components/CardInline";
|
|
41
36
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
42
|
-
export { default as HeaderLarge } from "./components/HeaderLarge";
|
|
43
|
-
export { default as HeaderMedium } from "./components/HeaderMedium";
|
|
44
|
-
export { default as HeaderOverline } from "./components/HeaderOverline";
|
|
45
37
|
export { default as Picker } from "./components/Picker/Picker";
|
|
46
38
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
47
39
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
@@ -8,7 +8,6 @@ export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
11
|
-
export { default as Carousel } from "./components/Carousel";
|
|
12
11
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
13
12
|
export { default as CircleImage } from "./components/CircleImage";
|
|
14
13
|
export { default as Container } from "./components/Container";
|
|
@@ -32,14 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
32
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
33
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
34
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
35
|
-
export { default as CardBlock } from "./components/CardBlock";
|
|
36
|
-
export { default as CardContainer } from "./components/CardContainer";
|
|
37
|
-
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
38
|
-
export { default as CardInline } from "./components/CardInline";
|
|
39
34
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
40
|
-
export { default as HeaderLarge } from "./components/HeaderLarge";
|
|
41
|
-
export { default as HeaderMedium } from "./components/HeaderMedium";
|
|
42
|
-
export { default as HeaderOverline } from "./components/HeaderOverline";
|
|
43
35
|
export { default as Picker } from "./components/Picker/Picker";
|
|
44
36
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
45
37
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EACL,WAAW,EACX,eAAe,EACf,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,GAAG,EACH,KAAK,EACL,MAAM,GACP,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.7.
|
|
3
|
+
"version": "46.7.4",
|
|
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": "^46.7.
|
|
44
|
+
"@draftbit/types": "^46.7.4",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "e6a2735daa25087a2dfbcebb3ba7a3dd240ba510"
|
|
95
95
|
}
|
package/src/index.tsx
CHANGED
|
@@ -9,7 +9,6 @@ export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
|
9
9
|
export { default as Avatar } from "./components/CircleImage";
|
|
10
10
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
11
11
|
export { default as Card } from "./components/Card";
|
|
12
|
-
export { default as Carousel } from "./components/Carousel";
|
|
13
12
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
14
13
|
export { default as CircleImage } from "./components/CircleImage";
|
|
15
14
|
export { default as Container } from "./components/Container";
|
|
@@ -53,14 +52,7 @@ export {
|
|
|
53
52
|
} from "./components/RadioButton/index";
|
|
54
53
|
|
|
55
54
|
/* Deprecated: Fix or Delete! */
|
|
56
|
-
export { default as CardBlock } from "./components/CardBlock";
|
|
57
|
-
export { default as CardContainer } from "./components/CardContainer";
|
|
58
|
-
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
59
|
-
export { default as CardInline } from "./components/CardInline";
|
|
60
55
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
61
|
-
export { default as HeaderLarge } from "./components/HeaderLarge";
|
|
62
|
-
export { default as HeaderMedium } from "./components/HeaderMedium";
|
|
63
|
-
export { default as HeaderOverline } from "./components/HeaderOverline";
|
|
64
56
|
export { default as Picker } from "./components/Picker/Picker";
|
|
65
57
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
66
58
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _Image = _interopRequireDefault(require("./Image"));
|
|
10
|
-
var _DeprecatedCardWrapper = _interopRequireDefault(require("./DeprecatedCardWrapper"));
|
|
11
|
-
var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
12
|
-
var _theming = require("../theming");
|
|
13
|
-
var _Config = _interopRequireDefault(require("./Config"));
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
-
const CardBlock = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
image = _Config.default.cardImageUrl,
|
|
19
|
-
title,
|
|
20
|
-
leftDescription,
|
|
21
|
-
rightDescription,
|
|
22
|
-
titleCentered,
|
|
23
|
-
aspectRatio = 1.5,
|
|
24
|
-
elevation = 2,
|
|
25
|
-
numColumns = 3,
|
|
26
|
-
theme: {
|
|
27
|
-
colors,
|
|
28
|
-
roundness,
|
|
29
|
-
typography
|
|
30
|
-
},
|
|
31
|
-
style,
|
|
32
|
-
onPress,
|
|
33
|
-
...rest
|
|
34
|
-
} = _ref;
|
|
35
|
-
let titleJustification;
|
|
36
|
-
let titleStyle;
|
|
37
|
-
if (titleCentered && !leftDescription && !rightDescription) {
|
|
38
|
-
titleJustification = "center";
|
|
39
|
-
} else {
|
|
40
|
-
titleJustification = "space-between";
|
|
41
|
-
}
|
|
42
|
-
if (numColumns === 1) {
|
|
43
|
-
titleStyle = typography.button;
|
|
44
|
-
} else if (numColumns === 2) {
|
|
45
|
-
titleStyle = typography.headline6;
|
|
46
|
-
} else {
|
|
47
|
-
titleStyle = typography.headline5;
|
|
48
|
-
}
|
|
49
|
-
const rightDescriptionStyles = [typography.subtitle2, {
|
|
50
|
-
color: colors.light
|
|
51
|
-
}];
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, _extends({
|
|
53
|
-
style: style,
|
|
54
|
-
onPress: onPress,
|
|
55
|
-
numColumns: numColumns
|
|
56
|
-
}, rest), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
57
|
-
style: {
|
|
58
|
-
backgroundColor: colors.background
|
|
59
|
-
}
|
|
60
|
-
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
61
|
-
style: {
|
|
62
|
-
elevation,
|
|
63
|
-
borderRadius: roundness
|
|
64
|
-
}
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
66
|
-
style: {
|
|
67
|
-
borderRadius: roundness,
|
|
68
|
-
aspectRatio
|
|
69
|
-
},
|
|
70
|
-
source: typeof image === "string" ? {
|
|
71
|
-
uri: image
|
|
72
|
-
} : image,
|
|
73
|
-
resizeMode: "cover"
|
|
74
|
-
})), title ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
75
|
-
style: {
|
|
76
|
-
flexDirection: "row",
|
|
77
|
-
alignItems: "center",
|
|
78
|
-
justifyContent: titleJustification,
|
|
79
|
-
marginTop: numColumns === 3 ? 16 : 12
|
|
80
|
-
}
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
82
|
-
numberOfLines: 1,
|
|
83
|
-
style: [titleStyle, {
|
|
84
|
-
color: colors.strong
|
|
85
|
-
}]
|
|
86
|
-
}, title), !leftDescription && rightDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
87
|
-
style: rightDescriptionStyles
|
|
88
|
-
}, rightDescription) : null) : null, leftDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
89
|
-
style: {
|
|
90
|
-
flexDirection: "row",
|
|
91
|
-
justifyContent: "space-between",
|
|
92
|
-
alignItems: "center",
|
|
93
|
-
marginTop: numColumns === 3 ? 4 : 4 / 2
|
|
94
|
-
}
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
96
|
-
numberOfLines: 1,
|
|
97
|
-
style: [typography.body2, {
|
|
98
|
-
color: colors.medium
|
|
99
|
-
}]
|
|
100
|
-
}, leftDescription), rightDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
101
|
-
numberOfLines: 1,
|
|
102
|
-
style: rightDescriptionStyles
|
|
103
|
-
}, rightDescription) : null) : null));
|
|
104
|
-
};
|
|
105
|
-
var _default = (0, _theming.withTheme)(CardBlock);
|
|
106
|
-
exports.default = _default;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _color = _interopRequireDefault(require("color"));
|
|
10
|
-
var _Image = _interopRequireDefault(require("./Image"));
|
|
11
|
-
var _DeprecatedCardWrapper = _interopRequireDefault(require("./DeprecatedCardWrapper"));
|
|
12
|
-
var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
13
|
-
var _theming = require("../theming");
|
|
14
|
-
var _Config = _interopRequireDefault(require("./Config"));
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
17
|
-
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
18
|
-
const CardContainer = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
Icon,
|
|
21
|
-
icon,
|
|
22
|
-
image = _Config.default.cardImageUrl,
|
|
23
|
-
title,
|
|
24
|
-
leftDescription,
|
|
25
|
-
rightDescription,
|
|
26
|
-
textCentered,
|
|
27
|
-
aspectRatio = 1.5,
|
|
28
|
-
elevation = 2,
|
|
29
|
-
numColumns = 3,
|
|
30
|
-
theme: {
|
|
31
|
-
colors,
|
|
32
|
-
roundness,
|
|
33
|
-
typography
|
|
34
|
-
},
|
|
35
|
-
style,
|
|
36
|
-
onPress,
|
|
37
|
-
...rest
|
|
38
|
-
} = _ref;
|
|
39
|
-
let textJustification;
|
|
40
|
-
let titleStyle;
|
|
41
|
-
if (textCentered && !rightDescription) {
|
|
42
|
-
textJustification = "center";
|
|
43
|
-
} else {
|
|
44
|
-
textJustification = "space-between";
|
|
45
|
-
}
|
|
46
|
-
switch (numColumns) {
|
|
47
|
-
case 2:
|
|
48
|
-
titleStyle = typography.headline6;
|
|
49
|
-
break;
|
|
50
|
-
case 3:
|
|
51
|
-
titleStyle = typography.headline5;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
55
|
-
style: style,
|
|
56
|
-
onPress: onPress,
|
|
57
|
-
numColumns: numColumns,
|
|
58
|
-
...rest
|
|
59
|
-
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
60
|
-
style: {
|
|
61
|
-
elevation,
|
|
62
|
-
borderRadius: roundness
|
|
63
|
-
}
|
|
64
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
65
|
-
style: {
|
|
66
|
-
borderRadius: roundness,
|
|
67
|
-
overflow: "hidden",
|
|
68
|
-
backgroundColor: colors.surface
|
|
69
|
-
}
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
71
|
-
style: {
|
|
72
|
-
aspectRatio
|
|
73
|
-
},
|
|
74
|
-
source: typeof image === "string" ? {
|
|
75
|
-
uri: image
|
|
76
|
-
} : image,
|
|
77
|
-
resizeMode: "cover"
|
|
78
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
79
|
-
style: {
|
|
80
|
-
padding: numColumns === 1 ? 8 : 16
|
|
81
|
-
}
|
|
82
|
-
}, title ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
83
|
-
style: {
|
|
84
|
-
flexDirection: "row",
|
|
85
|
-
alignItems: "center",
|
|
86
|
-
justifyContent: textJustification
|
|
87
|
-
}
|
|
88
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
89
|
-
numberOfLines: 1,
|
|
90
|
-
style: [titleStyle, {
|
|
91
|
-
color: colors.strong
|
|
92
|
-
}]
|
|
93
|
-
}, title)) : null, leftDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
94
|
-
style: {
|
|
95
|
-
flexDirection: "row",
|
|
96
|
-
justifyContent: textJustification,
|
|
97
|
-
alignItems: "center",
|
|
98
|
-
marginTop: numColumns === 3 ? 4 : 4 / 2
|
|
99
|
-
}
|
|
100
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
101
|
-
numberOfLines: 1,
|
|
102
|
-
style: [typography.body2, {
|
|
103
|
-
color: colors.medium
|
|
104
|
-
}]
|
|
105
|
-
}, leftDescription), rightDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
106
|
-
numberOfLines: 1,
|
|
107
|
-
style: [typography.subtitle2, {
|
|
108
|
-
color: colors.light
|
|
109
|
-
}]
|
|
110
|
-
}, rightDescription) : null) : null), icon ? /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
111
|
-
style: {
|
|
112
|
-
elevation: _Config.default.cardIconElevation,
|
|
113
|
-
position: "absolute",
|
|
114
|
-
top: 12,
|
|
115
|
-
right: 12,
|
|
116
|
-
width: ICON_CONTAINER_SIZE,
|
|
117
|
-
height: ICON_CONTAINER_SIZE,
|
|
118
|
-
padding: ICON_CONTAINER_PADDING,
|
|
119
|
-
borderRadius: ICON_CONTAINER_SIZE,
|
|
120
|
-
backgroundColor: (0, _color.default)(colors.strong).alpha(_Config.default.cardIconBackgroundOpacity).rgb().string()
|
|
121
|
-
}
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
123
|
-
name: icon,
|
|
124
|
-
size: _Config.default.cardIconSize,
|
|
125
|
-
color: colors.surface
|
|
126
|
-
})) : null)));
|
|
127
|
-
};
|
|
128
|
-
var _default = (0, _theming.withTheme)(CardContainer);
|
|
129
|
-
exports.default = _default;0, _color.default)(colors.strong).alpha(_Config.default.cardIconBackgroundOpacity).rgb().string()
|
|
130
|
-
}
|
|
131
|
-
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
132
|
-
name: icon,
|
|
133
|
-
size: _Config.default.cardIconSize,
|
|
134
|
-
color: colors.surface
|
|
135
|
-
})) : null)));
|
|
136
|
-
};
|
|
137
|
-
var _default = (0, _theming.withTheme)(CardContainer);
|
|
138
|
-
exports.default = _default;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _color = _interopRequireDefault(require("color"));
|
|
10
|
-
var _Image = _interopRequireDefault(require("./Image"));
|
|
11
|
-
var _DeprecatedCardWrapper = _interopRequireDefault(require("./DeprecatedCardWrapper"));
|
|
12
|
-
var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
13
|
-
var _StarRating = _interopRequireDefault(require("./StarRating"));
|
|
14
|
-
var _theming = require("../theming");
|
|
15
|
-
var _Config = _interopRequireDefault(require("./Config"));
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
|
-
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
19
|
-
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
20
|
-
const CardContainerRating = _ref => {
|
|
21
|
-
let {
|
|
22
|
-
Icon,
|
|
23
|
-
icon,
|
|
24
|
-
image = _Config.default.cardImageUrl,
|
|
25
|
-
title,
|
|
26
|
-
leftDescription,
|
|
27
|
-
rightDescription,
|
|
28
|
-
rating,
|
|
29
|
-
aspectRatio = 1.5,
|
|
30
|
-
elevation = 2,
|
|
31
|
-
numColumns = 3,
|
|
32
|
-
theme: {
|
|
33
|
-
colors,
|
|
34
|
-
roundness,
|
|
35
|
-
typography
|
|
36
|
-
},
|
|
37
|
-
style,
|
|
38
|
-
onPress,
|
|
39
|
-
...rest
|
|
40
|
-
} = _ref;
|
|
41
|
-
let titleStyle, rightDescriptionStyle;
|
|
42
|
-
switch (numColumns) {
|
|
43
|
-
case 2:
|
|
44
|
-
titleStyle = typography.headline6;
|
|
45
|
-
rightDescriptionStyle = typography.body2;
|
|
46
|
-
break;
|
|
47
|
-
case 3:
|
|
48
|
-
titleStyle = typography.headline5;
|
|
49
|
-
rightDescriptionStyle = typography.caption;
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, _extends({
|
|
53
|
-
style: style,
|
|
54
|
-
onPress: onPress,
|
|
55
|
-
numColumns: numColumns
|
|
56
|
-
}, rest), /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
57
|
-
style: {
|
|
58
|
-
elevation,
|
|
59
|
-
borderRadius: roundness
|
|
60
|
-
}
|
|
61
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
62
|
-
style: {
|
|
63
|
-
borderRadius: roundness,
|
|
64
|
-
overflow: "hidden",
|
|
65
|
-
backgroundColor: colors.background
|
|
66
|
-
//background color is needed for bug on android 9 - https://github.com/facebook/react-native/issues/25093
|
|
67
|
-
}
|
|
68
|
-
}, /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
69
|
-
style: {
|
|
70
|
-
aspectRatio
|
|
71
|
-
},
|
|
72
|
-
source: typeof image === "string" ? {
|
|
73
|
-
uri: image
|
|
74
|
-
} : image,
|
|
75
|
-
resizeMode: "cover"
|
|
76
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
77
|
-
style: {
|
|
78
|
-
padding: numColumns === 1 ? 8 : 16
|
|
79
|
-
}
|
|
80
|
-
}, title ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
81
|
-
style: {
|
|
82
|
-
flexDirection: "row",
|
|
83
|
-
alignItems: "center",
|
|
84
|
-
justifyContent: "space-between"
|
|
85
|
-
}
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
87
|
-
numberOfLines: 1,
|
|
88
|
-
style: [titleStyle, {
|
|
89
|
-
color: colors.strong
|
|
90
|
-
}]
|
|
91
|
-
}, title)) : null, leftDescription ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
92
|
-
numberOfLines: 1,
|
|
93
|
-
style: [typography.body2, {
|
|
94
|
-
color: colors.medium,
|
|
95
|
-
marginTop: numColumns === 3 ? 4 : 4 / 2
|
|
96
|
-
}]
|
|
97
|
-
}, leftDescription) : null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
98
|
-
style: {
|
|
99
|
-
flexDirection: "row",
|
|
100
|
-
justifyContent: "space-between",
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
marginTop: numColumns === 3 ? 16 : 12
|
|
103
|
-
}
|
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(_StarRating.default, {
|
|
105
|
-
Icon: Icon,
|
|
106
|
-
starSize: numColumns === 1 ? 10 : 16,
|
|
107
|
-
rating: rating
|
|
108
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
109
|
-
style: [rightDescriptionStyle, {
|
|
110
|
-
color: colors.medium,
|
|
111
|
-
marginLeft: 8
|
|
112
|
-
}],
|
|
113
|
-
numberOfLines: 1
|
|
114
|
-
}, rightDescription))), icon ? /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
115
|
-
style: {
|
|
116
|
-
elevation: _Config.default.cardIconElevation,
|
|
117
|
-
position: "absolute",
|
|
118
|
-
top: 12,
|
|
119
|
-
right: 12,
|
|
120
|
-
width: ICON_CONTAINER_SIZE,
|
|
121
|
-
height: ICON_CONTAINER_SIZE,
|
|
122
|
-
padding: ICON_CONTAINER_PADDING,
|
|
123
|
-
borderRadius: ICON_CONTAINER_SIZE,
|
|
124
|
-
backgroundColor: (0, _color.default)(colors.strong).alpha(_Config.default.cardIconBackgroundOpacity).rgb().string()
|
|
125
|
-
}
|
|
126
|
-
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
127
|
-
name: icon,
|
|
128
|
-
size: _Config.default.cardIconSize,
|
|
129
|
-
color: colors.surface
|
|
130
|
-
})) : null)));
|
|
131
|
-
};
|
|
132
|
-
var _default = (0, _theming.withTheme)(CardContainerRating);
|
|
133
|
-
exports.default = _default;
|