@draftbit/core 43.4.15 → 43.4.16-cbc807.1

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.
Files changed (41) hide show
  1. package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  2. package/lib/commonjs/components/CardContainerRating.js +16 -5
  3. package/lib/commonjs/components/CardContainerRating.js.map +1 -1
  4. package/lib/commonjs/components/Config.js.map +1 -1
  5. package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
  6. package/lib/commonjs/components/Header.js.map +1 -1
  7. package/lib/commonjs/components/Picker/PickerComponent.ios.js +30 -10
  8. package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
  9. package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
  10. package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
  11. package/lib/commonjs/components/RadioButton/RadioButton.js +15 -3
  12. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  13. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +11 -2
  14. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  15. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
  16. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  17. package/lib/commonjs/components/ScreenContainer.js +3 -3
  18. package/lib/commonjs/components/ScreenContainer.js.map +1 -1
  19. package/lib/commonjs/components/Surface.js +14 -2
  20. package/lib/commonjs/components/Surface.js.map +1 -1
  21. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  22. package/lib/commonjs/mappings/Accordion.js.map +1 -1
  23. package/lib/commonjs/mappings/BlurView.js.map +1 -1
  24. package/lib/commonjs/mappings/Container.js.map +1 -1
  25. package/lib/commonjs/mappings/FAB.js.map +1 -1
  26. package/lib/commonjs/mappings/RowBodyIcon.js.map +1 -1
  27. package/lib/commonjs/mappings/Slider.js.map +1 -1
  28. package/lib/commonjs/mappings/TextArea.js.map +1 -1
  29. package/lib/module/components/IconButton.js +21 -5
  30. package/lib/module/components/IconButton.js.map +1 -1
  31. package/lib/module/components/RowHeadlineImageIcon.js.map +1 -1
  32. package/lib/module/components/ScreenContainer.js +3 -3
  33. package/lib/module/components/ScreenContainer.js.map +1 -1
  34. package/lib/module/components/Surface.js +14 -2
  35. package/lib/module/components/Surface.js.map +1 -1
  36. package/lib/typescript/src/components/ScreenContainer.d.ts +2 -2
  37. package/package.json +2 -2
  38. package/src/components/ScreenContainer.js +1 -1
  39. package/src/components/ScreenContainer.tsx +5 -5
  40. package/src/components/Surface.js +16 -5
  41. package/src/components/Surface.tsx +16 -5
@@ -29,6 +29,7 @@ const Surface: React.FC<Props> = ({
29
29
  }) => {
30
30
  const {
31
31
  elevation: styleElevation = 3,
32
+ backgroundColor,
32
33
  borderRadius,
33
34
  overflow,
34
35
  height,
@@ -41,17 +42,27 @@ const Surface: React.FC<Props> = ({
41
42
 
42
43
  const evalationStyles = elevation ? shadow(elevation) : {};
43
44
 
45
+ const getBackgroundColor = () => {
46
+ if (backgroundColor) {
47
+ return backgroundColor;
48
+ } else if (isDarkTheme && mode === "adaptive") {
49
+ return overlay(elevation, colors.surface);
50
+ } else {
51
+ return colors.surface;
52
+ }
53
+ };
54
+
44
55
  return (
45
56
  <Animated.View
46
57
  {...rest}
47
58
  style={[
48
59
  style,
49
60
  {
50
- backgroundColor:
51
- isDarkTheme && mode === "adaptive"
52
- ? overlay(elevation, colors.surface)
53
- : colors.surface,
54
- overflow: Platform.OS === "web" ? "hidden" : "visible",
61
+ backgroundColor: getBackgroundColor(),
62
+ overflow:
63
+ Platform.OS === "web" && overflow === "hidden"
64
+ ? "hidden"
65
+ : "visible",
55
66
  elevation,
56
67
  ...evalationStyles,
57
68
  },