@draftbit/core 46.7.3 → 46.7.5

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 (174) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
  3. package/lib/commonjs/components/AvatarEdit.js +4 -15
  4. package/lib/commonjs/components/Button.js +12 -35
  5. package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
  6. package/lib/commonjs/components/Container.js +4 -15
  7. package/lib/commonjs/components/DeprecatedButton.js +3 -20
  8. package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
  9. package/lib/commonjs/components/Elevation.js +14 -2
  10. package/lib/commonjs/components/IconButton.js +4 -2
  11. package/lib/commonjs/components/Image.js +2 -17
  12. package/lib/commonjs/components/NumberInput.js +1 -1
  13. package/lib/commonjs/components/Picker/Picker.js +4 -9
  14. package/lib/commonjs/components/Portal/PortalHost.js +15 -44
  15. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  16. package/lib/commonjs/components/Pressable.js +2 -2
  17. package/lib/commonjs/components/ProgressBar.js +7 -37
  18. package/lib/commonjs/components/Slider.js +4 -21
  19. package/lib/commonjs/components/Surface.js +2 -14
  20. package/lib/commonjs/components/TextField.js +28 -76
  21. package/lib/commonjs/components/Touchable.js +4 -17
  22. package/lib/commonjs/constants.js +1 -1
  23. package/lib/commonjs/hooks.js +2 -1
  24. package/lib/commonjs/index.js +0 -56
  25. package/lib/commonjs/mappings/Button.js +2 -2
  26. package/lib/commonjs/mappings/FlashList.js +28 -0
  27. package/lib/commonjs/mappings/FlatList.js +14 -0
  28. package/lib/commonjs/mappings/IconButton.js +4 -6
  29. package/lib/commonjs/mappings/MapView.js +3 -1
  30. package/lib/commonjs/mappings/ScrollView.js +7 -1
  31. package/lib/commonjs/mappings/Touchable.js +9 -2
  32. package/lib/commonjs/styles/overlay.js +1 -3
  33. package/lib/commonjs/utilities.js +2 -1
  34. package/lib/module/components/Button.js +12 -35
  35. package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
  36. package/lib/module/components/Checkbox/context.js +1 -1
  37. package/lib/module/components/CircleImage.js +1 -16
  38. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  39. package/lib/module/components/Divider.js +1 -18
  40. package/lib/module/components/Elevation.js +2 -14
  41. package/lib/module/components/FieldSearchBarFull.js +2 -1
  42. package/lib/module/components/FormRow.js +2 -17
  43. package/lib/module/components/IconButton.js +4 -2
  44. package/lib/module/components/Image.js +2 -18
  45. package/lib/module/components/Layout.js +21 -42
  46. package/lib/module/components/NumberInput.js +4 -13
  47. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  48. package/lib/module/components/Portal/PortalConsumer.js +7 -22
  49. package/lib/module/components/Pressable.js +2 -2
  50. package/lib/module/components/RadioButton/RadioButton.js +1 -13
  51. package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
  52. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
  53. package/lib/module/components/Slider.js +4 -21
  54. package/lib/module/components/StepIndicator.js +18 -58
  55. package/lib/module/components/TextField.js +28 -78
  56. package/lib/module/components/ToggleButton.js +2 -16
  57. package/lib/module/components/Touchable.js +4 -17
  58. package/lib/module/constants.js +2 -1
  59. package/lib/module/index.js +0 -8
  60. package/lib/module/mappings/Button.js +2 -2
  61. package/lib/module/mappings/FieldSearchBarFull.js +1 -4
  62. package/lib/module/mappings/FlashList.js +29 -1
  63. package/lib/module/mappings/FlatList.js +15 -1
  64. package/lib/module/mappings/IconButton.js +5 -7
  65. package/lib/module/mappings/MapView.js +3 -1
  66. package/lib/module/mappings/ScrollView.js +8 -2
  67. package/lib/module/mappings/Touchable.js +10 -3
  68. package/lib/module/styles/overlay.js +3 -1
  69. package/lib/module/utilities.js +2 -1
  70. package/lib/typescript/src/components/IconButton.d.ts +2 -0
  71. package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
  72. package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
  73. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  74. package/lib/typescript/src/index.d.ts +0 -8
  75. package/lib/typescript/src/index.d.ts.map +1 -1
  76. package/lib/typescript/src/mappings/FlashList.d.ts +60 -0
  77. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  78. package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
  79. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  80. package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
  81. package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
  82. package/lib/typescript/src/mappings/MapView.d.ts +2 -0
  83. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  84. package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
  85. package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
  86. package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
  87. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  88. package/package.json +3 -3
  89. package/src/components/Button.js +1 -1
  90. package/src/components/Button.tsx +2 -2
  91. package/src/components/IconButton.js +2 -2
  92. package/src/components/IconButton.tsx +6 -2
  93. package/src/components/NumberInput.js +1 -1
  94. package/src/components/NumberInput.tsx +1 -1
  95. package/src/components/Pressable.js +1 -1
  96. package/src/components/Pressable.tsx +2 -2
  97. package/src/components/Touchable.js +1 -1
  98. package/src/components/Touchable.tsx +2 -2
  99. package/src/index.js +0 -8
  100. package/src/index.tsx +0 -8
  101. package/src/mappings/Button.js +2 -2
  102. package/src/mappings/Button.ts +2 -2
  103. package/src/mappings/FlashList.js +29 -1
  104. package/src/mappings/FlashList.ts +33 -0
  105. package/src/mappings/FlatList.js +15 -1
  106. package/src/mappings/FlatList.ts +17 -0
  107. package/src/mappings/IconButton.js +5 -7
  108. package/src/mappings/IconButton.ts +5 -7
  109. package/src/mappings/MapView.js +2 -0
  110. package/src/mappings/MapView.ts +2 -0
  111. package/src/mappings/ScrollView.js +8 -2
  112. package/src/mappings/ScrollView.ts +10 -1
  113. package/src/mappings/Touchable.js +10 -3
  114. package/src/mappings/Touchable.ts +12 -2
  115. package/lib/commonjs/components/CardBlock.js +0 -115
  116. package/lib/commonjs/components/CardContainer.js +0 -138
  117. package/lib/commonjs/components/CardContainerRating.js +0 -133
  118. package/lib/commonjs/components/CardContainerShortImage.js +0 -84
  119. package/lib/commonjs/components/CardInline.js +0 -91
  120. package/lib/commonjs/components/Carousel.js +0 -130
  121. package/lib/commonjs/components/Header.js +0 -82
  122. package/lib/commonjs/components/HeaderLarge.js +0 -38
  123. package/lib/commonjs/components/HeaderMedium.js +0 -38
  124. package/lib/commonjs/components/HeaderOverline.js +0 -39
  125. package/lib/module/components/CardBlock.js +0 -108
  126. package/lib/module/components/CardContainer.js +0 -121
  127. package/lib/module/components/CardContainerRating.js +0 -135
  128. package/lib/module/components/CardContainerShortImage.js +0 -90
  129. package/lib/module/components/CardInline.js +0 -82
  130. package/lib/module/components/Carousel.js +0 -120
  131. package/lib/module/components/Header.js +0 -72
  132. package/lib/module/components/HeaderLarge.js +0 -28
  133. package/lib/module/components/HeaderMedium.js +0 -28
  134. package/lib/module/components/HeaderOverline.js +0 -29
  135. package/lib/typescript/src/components/CardBlock.d.ts +0 -21
  136. package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
  137. package/lib/typescript/src/components/CardContainer.d.ts +0 -23
  138. package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
  139. package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
  140. package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
  141. package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
  142. package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
  143. package/lib/typescript/src/components/CardInline.d.ts +0 -20
  144. package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
  145. package/lib/typescript/src/components/Carousel.d.ts +0 -15
  146. package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
  147. package/lib/typescript/src/components/Header.d.ts +0 -20
  148. package/lib/typescript/src/components/Header.d.ts.map +0 -1
  149. package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
  150. package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
  151. package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
  152. package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
  153. package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
  154. package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
  155. package/src/components/CardBlock.js +0 -54
  156. package/src/components/CardBlock.tsx +0 -127
  157. package/src/components/CardContainer.js +0 -69
  158. package/src/components/CardContainer.tsx +0 -165
  159. package/src/components/CardContainerRating.js +0 -79
  160. package/src/components/CardContainerRating.tsx +0 -175
  161. package/src/components/CardContainerShortImage.js +0 -33
  162. package/src/components/CardContainerShortImage.tsx +0 -101
  163. package/src/components/CardInline.js +0 -36
  164. package/src/components/CardInline.tsx +0 -93
  165. package/src/components/Carousel.js +0 -68
  166. package/src/components/Carousel.tsx +0 -134
  167. package/src/components/Header.js +0 -44
  168. package/src/components/Header.tsx +0 -105
  169. package/src/components/HeaderLarge.js +0 -7
  170. package/src/components/HeaderLarge.tsx +0 -40
  171. package/src/components/HeaderMedium.js +0 -7
  172. package/src/components/HeaderMedium.tsx +0 -41
  173. package/src/components/HeaderOverline.js +0 -7
  174. package/src/components/HeaderOverline.tsx +0 -42
@@ -1,105 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- View,
4
- Text,
5
- StyleSheet,
6
- StyleProp,
7
- TextStyle,
8
- ViewStyle,
9
- } from "react-native";
10
- import { withTheme } from "../theming";
11
- import Divider from "./Divider";
12
- import Touchable from "./Touchable";
13
- import Config from "./Config";
14
-
15
- import type { Theme } from "../styles/DefaultTheme";
16
- import type { IconSlot } from "../interfaces/Icon";
17
-
18
- type Props = {
19
- titleTypeStyle?: StyleProp<TextStyle>;
20
- titleColor: string;
21
- title: string;
22
- buttonText: string;
23
- dividerTopMargin?: number;
24
- icon: string;
25
- onPress: () => void;
26
- style?: StyleProp<ViewStyle>;
27
- theme: Theme;
28
- } & IconSlot;
29
-
30
- const Header: React.FC<React.PropsWithChildren<Props>> = ({
31
- Icon,
32
- titleTypeStyle,
33
- titleColor,
34
- title,
35
- buttonText,
36
- dividerTopMargin,
37
- icon,
38
- onPress,
39
- style,
40
- theme: { colors, typography },
41
- }) => {
42
- return (
43
- <View style={[styles.container, style]}>
44
- <View style={styles.topContainer}>
45
- <Text
46
- style={[
47
- titleTypeStyle,
48
- {
49
- color: titleColor,
50
- flex: 1,
51
- },
52
- ]}
53
- numberOfLines={1}
54
- >
55
- {title}
56
- </Text>
57
- {onPress && (
58
- <Touchable
59
- style={{ alignSelf: "center", marginLeft: 12 }}
60
- onPress={onPress}
61
- >
62
- <View style={styles.buttonContainer}>
63
- <Text
64
- style={[
65
- typography.subtitle2,
66
- {
67
- color: colors.light,
68
- marginRight: 8,
69
- },
70
- ]}
71
- numberOfLines={1}
72
- >
73
- {buttonText}
74
- </Text>
75
- <Icon
76
- name={icon}
77
- size={Config.headerIconSize}
78
- color={colors.light}
79
- />
80
- </View>
81
- </Touchable>
82
- )}
83
- </View>
84
- <Divider style={{ marginTop: dividerTopMargin || 16 }} />
85
- </View>
86
- );
87
- };
88
-
89
- const styles = StyleSheet.create({
90
- container: {
91
- alignSelf: "stretch",
92
- },
93
- topContainer: {
94
- flexDirection: "row",
95
- justifyContent: "space-between",
96
- alignItems: "center",
97
- },
98
- buttonContainer: {
99
- flexDirection: "row",
100
- justifyContent: "center",
101
- alignItems: "center",
102
- },
103
- });
104
-
105
- export default withTheme(Header);
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Header from "./Header";
4
- const HeaderLarge = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {
5
- return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline4, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));
6
- };
7
- export default withTheme(HeaderLarge);
@@ -1,40 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import type { Theme } from "../styles/DefaultTheme";
4
- import type { IconSlot } from "../interfaces/Icon";
5
- import Header from "./Header";
6
- import { StyleProp, ViewStyle } from "react-native";
7
-
8
- type Props = {
9
- title: string;
10
- buttonText: string;
11
- icon: string;
12
- onPress?: () => void;
13
- style?: StyleProp<ViewStyle>;
14
- theme: Theme;
15
- } & IconSlot;
16
-
17
- const HeaderLarge: React.FC<React.PropsWithChildren<Props>> = ({
18
- Icon,
19
- title,
20
- buttonText,
21
- icon,
22
- onPress = () => {},
23
- style,
24
- theme: { colors, typography },
25
- }) => {
26
- return (
27
- <Header
28
- Icon={Icon}
29
- titleTypeStyle={typography.headline4}
30
- titleColor={colors.strong}
31
- title={title}
32
- buttonText={buttonText}
33
- icon={icon}
34
- onPress={onPress}
35
- style={style}
36
- />
37
- );
38
- };
39
-
40
- export default withTheme(HeaderLarge);
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Header from "./Header";
4
- const HeaderMedium = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {
5
- return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline6, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));
6
- };
7
- export default withTheme(HeaderMedium);
@@ -1,41 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import type { Theme } from "../styles/DefaultTheme";
4
- import type { IconSlot } from "../interfaces/Icon";
5
-
6
- import Header from "./Header";
7
- import { StyleProp, ViewStyle } from "react-native";
8
-
9
- type Props = {
10
- title: string;
11
- buttonText: string;
12
- icon: string;
13
- onPress?: () => void;
14
- style?: StyleProp<ViewStyle>;
15
- theme: Theme;
16
- } & IconSlot;
17
-
18
- const HeaderMedium: React.FC<React.PropsWithChildren<Props>> = ({
19
- Icon,
20
- title,
21
- buttonText,
22
- icon,
23
- onPress = () => {},
24
- style,
25
- theme: { colors, typography },
26
- }) => {
27
- return (
28
- <Header
29
- Icon={Icon}
30
- titleTypeStyle={typography.headline6}
31
- titleColor={colors.strong}
32
- title={title}
33
- buttonText={buttonText}
34
- icon={icon}
35
- onPress={onPress}
36
- style={style}
37
- />
38
- );
39
- };
40
-
41
- export default withTheme(HeaderMedium);
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import Header from "./Header";
4
- const HeaderOverline = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {
5
- return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.overline, titleColor: colors.light, title: title && title.toUpperCase(), buttonText: buttonText, icon: icon, dividerTopMargin: 12, onPress: onPress, style: style }));
6
- };
7
- export default withTheme(HeaderOverline);
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import { withTheme } from "../theming";
3
- import type { Theme } from "../styles/DefaultTheme";
4
- import type { IconSlot } from "../interfaces/Icon";
5
-
6
- import Header from "./Header";
7
- import { StyleProp, ViewStyle } from "react-native";
8
-
9
- type Props = {
10
- title: string;
11
- buttonText: string;
12
- icon: string;
13
- onPress?: () => void;
14
- style?: StyleProp<ViewStyle>;
15
- theme: Theme;
16
- } & IconSlot;
17
-
18
- const HeaderOverline: React.FC<React.PropsWithChildren<Props>> = ({
19
- Icon,
20
- title,
21
- buttonText,
22
- icon,
23
- onPress = () => {},
24
- style,
25
- theme: { colors, typography },
26
- }) => {
27
- return (
28
- <Header
29
- Icon={Icon}
30
- titleTypeStyle={typography.overline}
31
- titleColor={colors.light}
32
- title={title && title.toUpperCase()}
33
- buttonText={buttonText}
34
- icon={icon}
35
- dividerTopMargin={12}
36
- onPress={onPress}
37
- style={style}
38
- />
39
- );
40
- };
41
-
42
- export default withTheme(HeaderOverline);