@draftbit/core 46.10.3-106fd0.2 → 46.10.3-17bcb4.2
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/AvatarEdit.js +15 -4
- package/lib/commonjs/components/Banner.js +23 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -4
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
- package/lib/commonjs/components/CircularProgress.js +26 -8
- package/lib/commonjs/components/DeprecatedButton.js +20 -3
- package/lib/commonjs/components/DeprecatedCardWrapper.js +54 -0
- package/lib/commonjs/components/DeprecatedFAB.js +157 -0
- package/lib/commonjs/components/Elevation.js +14 -2
- package/lib/commonjs/components/FormRow.js +16 -2
- package/lib/commonjs/components/IconButton.js +19 -4
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/NumberInput.js +12 -3
- package/lib/commonjs/components/Picker/Picker.js +9 -6
- package/lib/commonjs/components/Picker/PickerComponent.web.js +20 -3
- package/lib/commonjs/components/Portal/Portal.js +27 -3
- package/lib/commonjs/components/Portal/PortalHost.js +44 -15
- package/lib/commonjs/components/Pressable.js +15 -2
- package/lib/commonjs/components/ProgressIndicator.js +55 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +13 -2
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +15 -2
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/ResizeMode.js +5 -0
- package/lib/commonjs/components/ScreenContainer.js +24 -6
- package/lib/commonjs/components/Slider.js +21 -4
- package/lib/commonjs/components/StarRating.js +23 -4
- package/lib/commonjs/components/StepIndicator.js +57 -18
- package/lib/commonjs/components/Surface.js +14 -2
- package/lib/commonjs/components/Switch.js +19 -10
- package/lib/commonjs/components/Table/Table.js +11 -10
- package/lib/commonjs/components/Table/TableCell.js +3 -3
- package/lib/commonjs/components/Table/TableCommon.js +30 -0
- package/lib/commonjs/components/Table/TableRow.js +4 -4
- package/lib/commonjs/components/Table/index.js +3 -27
- package/lib/commonjs/components/ToggleButton.js +15 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/hooks.js +1 -2
- package/lib/commonjs/mappings/CardBlock.js +126 -0
- package/lib/commonjs/mappings/CardContainer.js +108 -0
- package/lib/commonjs/mappings/CardContainerRating.js +130 -0
- package/lib/commonjs/mappings/CardContainerShortImage.js +124 -0
- package/lib/commonjs/mappings/CardInline.js +59 -0
- package/lib/commonjs/mappings/ProgressIndicator.js +188 -0
- package/lib/commonjs/styles/overlay.js +1 -3
- package/lib/module/components/AnimatedCircularProgress.js +13 -1
- package/lib/module/components/AspectRatio.js +1 -18
- package/lib/module/components/AvatarEdit.js +15 -4
- package/lib/module/components/Banner.js +25 -4
- package/lib/module/components/Button.js +33 -10
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -5
- package/lib/module/components/Checkbox/CheckboxRow.js +24 -6
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/CircleImage.js +1 -16
- package/lib/module/components/DatePicker/DatePicker.js +27 -13
- package/lib/module/components/DeprecatedButton.js +3 -21
- package/lib/module/components/DeprecatedCardWrapper.js +32 -0
- package/lib/module/components/DeprecatedFAB.js +167 -0
- package/lib/module/components/Divider.js +18 -1
- package/lib/module/components/IconButton.js +4 -21
- package/lib/module/components/Layout.js +42 -21
- package/lib/module/components/Picker/PickerComponent.android.js +21 -3
- package/lib/module/components/Portal/PortalConsumer.js +22 -7
- package/lib/module/components/Pressable.js +2 -15
- package/lib/module/components/ProgressIndicator.js +45 -0
- package/lib/module/components/RadioButton/RadioButton.js +13 -1
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +10 -1
- package/lib/module/components/RadioButton/context.js +1 -1
- package/lib/module/components/ResizeMode.js +1 -0
- package/lib/module/components/Shadow.js +2 -15
- package/lib/module/components/StepIndicator.js +58 -18
- package/lib/module/components/Surface.js +15 -1
- package/lib/module/components/Switch.js +21 -10
- package/lib/module/components/TabView/TabView.js +17 -7
- package/lib/module/components/TabView/TabViewItem.js +4 -3
- package/lib/module/components/Table/Table.js +12 -11
- package/lib/module/components/Table/TableCell.js +1 -1
- package/lib/module/components/Table/TableCommon.js +21 -0
- package/lib/module/components/Table/TableRow.js +3 -2
- package/lib/module/components/Table/index.js +1 -22
- package/lib/module/components/TextField.js +78 -28
- package/lib/module/mappings/CardBlock.js +119 -0
- package/lib/module/mappings/CardContainer.js +101 -0
- package/lib/module/mappings/CardContainerRating.js +123 -0
- package/lib/module/mappings/CardContainerShortImage.js +117 -0
- package/lib/module/mappings/CardInline.js +52 -0
- package/lib/module/mappings/ProgressIndicator.js +181 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +15 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -0
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +56 -0
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -0
- package/lib/typescript/src/components/ProgressIndicator.d.ts +24 -0
- package/lib/typescript/src/components/ProgressIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/ResizeMode.d.ts +2 -0
- package/lib/typescript/src/components/ResizeMode.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/Table.d.ts +7 -2
- package/lib/typescript/src/components/Table/Table.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
- package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/index.d.ts +1 -19
- package/lib/typescript/src/components/Table/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/CardBlock.d.ts +289 -0
- package/lib/typescript/src/mappings/CardBlock.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainer.d.ts +102 -0
- package/lib/typescript/src/mappings/CardContainer.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainerRating.d.ts +108 -0
- package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +139 -0
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardInline.d.ts +62 -0
- package/lib/typescript/src/mappings/CardInline.d.ts.map +1 -0
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts +181 -0
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/DeprecatedCardWrapper.js +18 -0
- package/src/components/DeprecatedCardWrapper.tsx +46 -0
- package/src/components/DeprecatedFAB.js +114 -0
- package/src/components/DeprecatedFAB.tsx +231 -0
- package/src/components/ProgressIndicator.js +27 -0
- package/src/components/ProgressIndicator.tsx +71 -0
- package/src/components/ResizeMode.js +1 -0
- package/src/components/ResizeMode.ts +7 -0
- package/src/components/Table/Table.js +4 -2
- package/src/components/Table/Table.tsx +9 -3
- package/src/components/Table/TableCell.js +1 -1
- package/src/components/Table/TableCell.tsx +5 -1
- package/src/components/Table/TableCommon.js +12 -0
- package/src/components/Table/TableCommon.ts +40 -0
- package/src/components/Table/TableRow.js +1 -1
- package/src/components/Table/TableRow.tsx +1 -1
- package/src/components/Table/index.js +1 -13
- package/src/components/Table/index.tsx +1 -42
- package/src/mappings/CardBlock.js +123 -0
- package/src/mappings/CardBlock.ts +136 -0
- package/src/mappings/CardContainer.js +104 -0
- package/src/mappings/CardContainer.ts +116 -0
- package/src/mappings/CardContainerRating.js +126 -0
- package/src/mappings/CardContainerRating.ts +137 -0
- package/src/mappings/CardContainerShortImage.js +120 -0
- package/src/mappings/CardContainerShortImage.ts +130 -0
- package/src/mappings/CardInline.js +52 -0
- package/src/mappings/CardInline.ts +61 -0
- package/src/mappings/ProgressIndicator.js +181 -0
- package/src/mappings/ProgressIndicator.ts +190 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA = {
|
|
9
|
+
name: "Progress Indicator",
|
|
10
|
+
tag: "ProgressIndicator",
|
|
11
|
+
description: "A component used to show current Step in a process",
|
|
12
|
+
category: _types.COMPONENT_TYPES.deprecated,
|
|
13
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
+
preview_image_url: "{CLOUDINARY_URL}/Control_Slider.png",
|
|
15
|
+
supports_list_render: false,
|
|
16
|
+
layout: {},
|
|
17
|
+
props: {
|
|
18
|
+
numberOfSteps: {
|
|
19
|
+
group: _types.GROUPS.data,
|
|
20
|
+
label: "Number of Steps",
|
|
21
|
+
description: "The border radius for the thumb",
|
|
22
|
+
editable: true,
|
|
23
|
+
required: false,
|
|
24
|
+
formType: _types.FORM_TYPES.number,
|
|
25
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
26
|
+
min: 0,
|
|
27
|
+
max: 10,
|
|
28
|
+
step: 1,
|
|
29
|
+
precision: 0,
|
|
30
|
+
defaultValue: 5
|
|
31
|
+
},
|
|
32
|
+
currentStep: {
|
|
33
|
+
group: _types.GROUPS.data,
|
|
34
|
+
label: "Current Step",
|
|
35
|
+
description: "The step that the user is on",
|
|
36
|
+
editable: true,
|
|
37
|
+
required: false,
|
|
38
|
+
formType: _types.FORM_TYPES.number,
|
|
39
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
40
|
+
min: 0,
|
|
41
|
+
max: 10,
|
|
42
|
+
step: 1,
|
|
43
|
+
precision: 0,
|
|
44
|
+
defaultValue: 5
|
|
45
|
+
},
|
|
46
|
+
stepIndicatorSize: {
|
|
47
|
+
group: _types.GROUPS.basic,
|
|
48
|
+
label: "Step Size",
|
|
49
|
+
description: "The size of the step circle",
|
|
50
|
+
editable: true,
|
|
51
|
+
required: false,
|
|
52
|
+
formType: _types.FORM_TYPES.number,
|
|
53
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
54
|
+
min: 10,
|
|
55
|
+
max: 100,
|
|
56
|
+
step: 5,
|
|
57
|
+
precision: 0,
|
|
58
|
+
defaultValue: 25
|
|
59
|
+
},
|
|
60
|
+
stepIndicatorLabelFontSize: {
|
|
61
|
+
group: _types.GROUPS.basic,
|
|
62
|
+
label: "Step Font Size",
|
|
63
|
+
description: "The font size of the step number",
|
|
64
|
+
editable: true,
|
|
65
|
+
required: false,
|
|
66
|
+
formType: _types.FORM_TYPES.number,
|
|
67
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
68
|
+
min: 6,
|
|
69
|
+
max: 36,
|
|
70
|
+
step: 1,
|
|
71
|
+
precision: 0,
|
|
72
|
+
defaultValue: 15
|
|
73
|
+
},
|
|
74
|
+
currentStepIndicatorLabelFontSize: {
|
|
75
|
+
group: _types.GROUPS.basic,
|
|
76
|
+
label: "Current Step Font Size",
|
|
77
|
+
description: "The font size of the current step number",
|
|
78
|
+
editable: true,
|
|
79
|
+
required: false,
|
|
80
|
+
formType: _types.FORM_TYPES.number,
|
|
81
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
82
|
+
min: 6,
|
|
83
|
+
max: 36,
|
|
84
|
+
step: 1,
|
|
85
|
+
precision: 0,
|
|
86
|
+
defaultValue: 15
|
|
87
|
+
},
|
|
88
|
+
unfinishedColor: {
|
|
89
|
+
group: _types.GROUPS.basic,
|
|
90
|
+
label: "Unfinished Color",
|
|
91
|
+
description: "The color of the step and divider when the step is either not the current step or not finished",
|
|
92
|
+
editable: true,
|
|
93
|
+
required: false,
|
|
94
|
+
formType: _types.FORM_TYPES.color,
|
|
95
|
+
propType: _types.PROP_TYPES.THEME,
|
|
96
|
+
defaultValue: null
|
|
97
|
+
},
|
|
98
|
+
finishedColor: {
|
|
99
|
+
group: _types.GROUPS.basic,
|
|
100
|
+
label: "Finished Color",
|
|
101
|
+
description: "The color of the step and divider when the step is the current step or finished",
|
|
102
|
+
editable: true,
|
|
103
|
+
required: false,
|
|
104
|
+
formType: _types.FORM_TYPES.color,
|
|
105
|
+
propType: _types.PROP_TYPES.THEME,
|
|
106
|
+
defaultValue: null
|
|
107
|
+
},
|
|
108
|
+
stepNumberUnfinishedColor: {
|
|
109
|
+
group: _types.GROUPS.basic,
|
|
110
|
+
label: "Unfinished Number Color",
|
|
111
|
+
description: "The color of the number within the step when unfinished",
|
|
112
|
+
editable: true,
|
|
113
|
+
required: false,
|
|
114
|
+
formType: _types.FORM_TYPES.color,
|
|
115
|
+
propType: _types.PROP_TYPES.THEME,
|
|
116
|
+
defaultValue: null
|
|
117
|
+
},
|
|
118
|
+
stepNumberFinishedColor: {
|
|
119
|
+
group: _types.GROUPS.basic,
|
|
120
|
+
label: "Finished Number Color",
|
|
121
|
+
description: "The color of the number within the step when finished",
|
|
122
|
+
editable: true,
|
|
123
|
+
required: false,
|
|
124
|
+
formType: _types.FORM_TYPES.color,
|
|
125
|
+
propType: _types.PROP_TYPES.THEME,
|
|
126
|
+
defaultValue: null
|
|
127
|
+
},
|
|
128
|
+
stepIndicatorCurrentColor: {
|
|
129
|
+
group: _types.GROUPS.basic,
|
|
130
|
+
label: "Current Step Color",
|
|
131
|
+
description: "The color of current step circle",
|
|
132
|
+
editable: true,
|
|
133
|
+
required: false,
|
|
134
|
+
formType: _types.FORM_TYPES.color,
|
|
135
|
+
propType: _types.PROP_TYPES.THEME,
|
|
136
|
+
defaultValue: null
|
|
137
|
+
},
|
|
138
|
+
stepIndicatorLabelCurrentColor: {
|
|
139
|
+
group: _types.GROUPS.basic,
|
|
140
|
+
label: "Current Step Number Color",
|
|
141
|
+
description: "The color of current number within the step circle",
|
|
142
|
+
editable: true,
|
|
143
|
+
required: false,
|
|
144
|
+
formType: _types.FORM_TYPES.color,
|
|
145
|
+
propType: _types.PROP_TYPES.THEME,
|
|
146
|
+
defaultValue: null
|
|
147
|
+
},
|
|
148
|
+
stepStrokeCurrentColor: {
|
|
149
|
+
group: _types.GROUPS.basic,
|
|
150
|
+
label: "Current Step Border Color",
|
|
151
|
+
description: "The color of current border color of the step",
|
|
152
|
+
editable: true,
|
|
153
|
+
required: false,
|
|
154
|
+
formType: _types.FORM_TYPES.color,
|
|
155
|
+
propType: _types.PROP_TYPES.THEME,
|
|
156
|
+
defaultValue: null
|
|
157
|
+
},
|
|
158
|
+
currentStepStrokeWidth: {
|
|
159
|
+
group: _types.GROUPS.basic,
|
|
160
|
+
label: "Current Step Border Width",
|
|
161
|
+
description: "The width of the border for the current step",
|
|
162
|
+
editable: true,
|
|
163
|
+
required: false,
|
|
164
|
+
formType: _types.FORM_TYPES.number,
|
|
165
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
166
|
+
min: 1,
|
|
167
|
+
max: 20,
|
|
168
|
+
step: 1,
|
|
169
|
+
precision: 0,
|
|
170
|
+
defaultValue: 0
|
|
171
|
+
},
|
|
172
|
+
currentStepIndicatorSize: {
|
|
173
|
+
group: _types.GROUPS.basic,
|
|
174
|
+
label: "Current Step Size",
|
|
175
|
+
description: "The size of the current step circle",
|
|
176
|
+
editable: true,
|
|
177
|
+
required: false,
|
|
178
|
+
formType: _types.FORM_TYPES.number,
|
|
179
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
180
|
+
min: 10,
|
|
181
|
+
max: 100,
|
|
182
|
+
step: 5,
|
|
183
|
+
precision: 0,
|
|
184
|
+
defaultValue: null
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -15,7 +15,6 @@ function overlay(elevation) {
|
|
|
15
15
|
let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _DarkTheme.default.colors.surface;
|
|
16
16
|
if (isAnimatedValue(elevation)) {
|
|
17
17
|
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
18
|
-
|
|
19
18
|
// @ts-expect-error: TS doesn't seem to refine the type correctly
|
|
20
19
|
return elevation.interpolate({
|
|
21
20
|
inputRange,
|
|
@@ -24,7 +23,6 @@ function overlay(elevation) {
|
|
|
24
23
|
})
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
// @ts-expect-error: TS doesn't seem to refine the type correctly
|
|
29
27
|
return calculateColor(surfaceColor, elevation);
|
|
30
28
|
}
|
|
@@ -65,4 +63,4 @@ const elevationOverlayTransparency = {
|
|
|
65
63
|
22: 15.72,
|
|
66
64
|
23: 15.84,
|
|
67
65
|
24: 16
|
|
68
|
-
};
|
|
66
|
+
};};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Animated, Easing } from "react-native";
|
|
4
3
|
import CircularProgress from "./CircularProgress";
|
|
@@ -46,6 +45,19 @@ const AnimatedCircularProgress = _ref => {
|
|
|
46
45
|
React.useEffect(() => {
|
|
47
46
|
animate();
|
|
48
47
|
}, [fill, animate]);
|
|
48
|
+
return /*#__PURE__*/React.createElement(AnimatedProgress, {
|
|
49
|
+
...other,
|
|
50
|
+
style: other.style,
|
|
51
|
+
childrenContainerStyle: other.childrenContainerStyle,
|
|
52
|
+
fill: fillAnimation,
|
|
53
|
+
tintColor: animateColor()
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
export default AnimatedCircularProgress;imation;
|
|
57
|
+
};
|
|
58
|
+
React.useEffect(() => {
|
|
59
|
+
animate();
|
|
60
|
+
}, [fill, animate]);
|
|
49
61
|
return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
|
|
50
62
|
style: other.style,
|
|
51
63
|
childrenContainerStyle: other.childrenContainerStyle,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
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); }
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { View, StyleSheet } from "react-native";
|
|
3
4
|
const AspectRatio = props => {
|
|
@@ -26,24 +27,6 @@ const AspectRatio = props => {
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
30
|
-
...props,
|
|
31
|
-
style: style,
|
|
32
|
-
onLayout: _ref => {
|
|
33
|
-
let {
|
|
34
|
-
nativeEvent: {
|
|
35
|
-
layout: l
|
|
36
|
-
}
|
|
37
|
-
} = _ref;
|
|
38
|
-
return setLayout(l);
|
|
39
|
-
}
|
|
40
|
-
}, props.children);
|
|
41
|
-
};
|
|
42
|
-
export default AspectRatio;idth,
|
|
43
|
-
height: width * (1 / aspectRatio)
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
30
|
return /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
48
31
|
style: style,
|
|
49
32
|
onLayout: _ref => {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { View } from "react-native";
|
|
4
3
|
import Touchable from "./Touchable";
|
|
@@ -23,9 +22,10 @@ const AvatarEdit = _ref => {
|
|
|
23
22
|
width: size,
|
|
24
23
|
height: size
|
|
25
24
|
};
|
|
26
|
-
return /*#__PURE__*/React.createElement(View,
|
|
27
|
-
style: [style, dimensions]
|
|
28
|
-
|
|
25
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
26
|
+
style: [style, dimensions],
|
|
27
|
+
...rest
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Touchable, {
|
|
29
29
|
onPress: onPress
|
|
30
30
|
}, /*#__PURE__*/React.createElement(CircleImage, {
|
|
31
31
|
source: image,
|
|
@@ -46,4 +46,15 @@ const AvatarEdit = _ref => {
|
|
|
46
46
|
size: size * (3 / 16)
|
|
47
47
|
}))));
|
|
48
48
|
};
|
|
49
|
+
export default withTheme(AvatarEdit);yles.editBorderColor,
|
|
50
|
+
backgroundColor: colorStyles.editBackgroundColor,
|
|
51
|
+
borderRadius: size * (3 / 16),
|
|
52
|
+
padding: size * (3 / 32)
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
55
|
+
name: "MaterialIcons/edit",
|
|
56
|
+
color: colorStyles.editIconColor,
|
|
57
|
+
size: size * (3 / 16)
|
|
58
|
+
}))));
|
|
59
|
+
};
|
|
49
60
|
export default withTheme(AvatarEdit);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Button, Text, View, StyleSheet, Animated } from "react-native";
|
|
4
3
|
import Surface from "./Surface";
|
|
@@ -61,7 +60,6 @@ const Banner = _ref => {
|
|
|
61
60
|
measured: true
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
|
-
|
|
65
63
|
// The banner animation has 2 parts:
|
|
66
64
|
// 1. Blank spacer element which animates its height to move the content
|
|
67
65
|
// 2. Actual banner which animates its translateY
|
|
@@ -71,9 +69,10 @@ const Banner = _ref => {
|
|
|
71
69
|
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
72
70
|
const height = Animated.multiply(position, layout.height);
|
|
73
71
|
const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
|
|
74
|
-
return /*#__PURE__*/React.createElement(Surface,
|
|
72
|
+
return /*#__PURE__*/React.createElement(Surface, {
|
|
73
|
+
...rest,
|
|
75
74
|
style: [styles.container, shadow(ELEVATION), style]
|
|
76
|
-
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
77
76
|
style: [styles.wrapper, contentStyle]
|
|
78
77
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
79
78
|
style: {
|
|
@@ -154,4 +153,26 @@ const styles = StyleSheet.create({
|
|
|
154
153
|
margin: 8
|
|
155
154
|
}
|
|
156
155
|
});
|
|
156
|
+
export default withTheme(Banner);
|
|
157
|
+
},
|
|
158
|
+
content: {
|
|
159
|
+
flexDirection: "row",
|
|
160
|
+
justifyContent: "flex-start",
|
|
161
|
+
marginHorizontal: 8,
|
|
162
|
+
marginTop: 16,
|
|
163
|
+
marginBottom: 0
|
|
164
|
+
},
|
|
165
|
+
icon: {
|
|
166
|
+
margin: 8
|
|
167
|
+
},
|
|
168
|
+
message: {
|
|
169
|
+
flex: 1,
|
|
170
|
+
margin: 8
|
|
171
|
+
},
|
|
172
|
+
actions: {
|
|
173
|
+
flexDirection: "row",
|
|
174
|
+
justifyContent: "flex-end",
|
|
175
|
+
margin: 8
|
|
176
|
+
}
|
|
177
|
+
});
|
|
157
178
|
export default withTheme(Banner);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
|
|
4
3
|
import { withTheme } from "../theming";
|
|
@@ -53,7 +52,7 @@ function Base(_ref) {
|
|
|
53
52
|
if (textAlign === "right") {
|
|
54
53
|
buttonStyles.justifyContent = "flex-end";
|
|
55
54
|
}
|
|
56
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
55
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
57
56
|
disabled: disabled || loading,
|
|
58
57
|
style: _ref2 => {
|
|
59
58
|
let {
|
|
@@ -62,8 +61,9 @@ function Base(_ref) {
|
|
|
62
61
|
return [styles.base, {
|
|
63
62
|
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
|
|
64
63
|
}, buttonStyles];
|
|
65
|
-
}
|
|
66
|
-
|
|
64
|
+
},
|
|
65
|
+
...props
|
|
66
|
+
}, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
67
67
|
size: "small",
|
|
68
68
|
color: color,
|
|
69
69
|
style: styles.loading
|
|
@@ -82,13 +82,14 @@ const Solid = _ref3 => {
|
|
|
82
82
|
theme,
|
|
83
83
|
...props
|
|
84
84
|
} = _ref3;
|
|
85
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
85
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
86
86
|
style: [{
|
|
87
87
|
color: "#FFF",
|
|
88
88
|
borderRadius: theme.roundness,
|
|
89
89
|
backgroundColor: theme.colors.primary
|
|
90
|
-
}, style]
|
|
91
|
-
|
|
90
|
+
}, style],
|
|
91
|
+
...props
|
|
92
|
+
});
|
|
92
93
|
};
|
|
93
94
|
const ButtonSolid = withTheme(Solid);
|
|
94
95
|
export { ButtonSolid };
|
|
@@ -100,13 +101,14 @@ const Outline = _ref4 => {
|
|
|
100
101
|
theme,
|
|
101
102
|
...props
|
|
102
103
|
} = _ref4;
|
|
103
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
104
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
104
105
|
style: [styles.outline, {
|
|
105
106
|
borderRadius: theme.roundness,
|
|
106
107
|
borderColor: theme.colors.primary,
|
|
107
108
|
color: theme.colors.primary
|
|
108
|
-
}, style]
|
|
109
|
-
|
|
109
|
+
}, style],
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
110
112
|
};
|
|
111
113
|
const ButtonOutline = withTheme(Outline);
|
|
112
114
|
export { ButtonOutline };
|
|
@@ -153,4 +155,25 @@ const styles = StyleSheet.create({
|
|
|
153
155
|
}
|
|
154
156
|
})
|
|
155
157
|
}
|
|
158
|
+
});or: "transparent",
|
|
159
|
+
padding: 0,
|
|
160
|
+
minHeight: undefined
|
|
161
|
+
},
|
|
162
|
+
loading: {
|
|
163
|
+
marginRight: 6
|
|
164
|
+
},
|
|
165
|
+
icon: {
|
|
166
|
+
...Platform.select({
|
|
167
|
+
web: {
|
|
168
|
+
marginTop: 1,
|
|
169
|
+
marginRight: 4,
|
|
170
|
+
alignSelf: "center"
|
|
171
|
+
},
|
|
172
|
+
default: {
|
|
173
|
+
marginBottom: 2,
|
|
174
|
+
marginRight: 4,
|
|
175
|
+
alignSelf: "center"
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
}
|
|
156
179
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { StyleSheet, View, Platform, Pressable } from "react-native";
|
|
4
3
|
import Checkbox from "./Checkbox";
|
|
@@ -6,7 +5,7 @@ import Text from "../Text";
|
|
|
6
5
|
import { useCheckboxGroupContext } from "./context";
|
|
7
6
|
import { Direction as GroupDirection } from "./context";
|
|
8
7
|
import { extractStyles } from "../../utilities";
|
|
9
|
-
export
|
|
8
|
+
export var Direction;
|
|
10
9
|
(function (Direction) {
|
|
11
10
|
Direction["Row"] = "row";
|
|
12
11
|
Direction["RowReverse"] = "row-reverse";
|
|
@@ -63,13 +62,14 @@ const CheckboxGroupRow = _ref => {
|
|
|
63
62
|
textStyles,
|
|
64
63
|
viewStyles
|
|
65
64
|
} = extractStyles(style);
|
|
66
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
65
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
67
66
|
onPress: handlePress,
|
|
68
67
|
style: [styles.mainParent, {
|
|
69
68
|
flexDirection: direction
|
|
70
69
|
}, viewStyles],
|
|
71
|
-
disabled: disabled
|
|
72
|
-
|
|
70
|
+
disabled: disabled,
|
|
71
|
+
...rest
|
|
72
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
73
73
|
style: [styles.label, {
|
|
74
74
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
75
75
|
}, labelContainerStyle]
|
|
@@ -107,4 +107,23 @@ const styles = StyleSheet.create({
|
|
|
107
107
|
flex: 3
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
+
export default CheckboxGroupRow;reate({
|
|
111
|
+
mainParent: {
|
|
112
|
+
alignItems: "center",
|
|
113
|
+
justifyContent: "space-around",
|
|
114
|
+
paddingStart: 20,
|
|
115
|
+
minHeight: 50,
|
|
116
|
+
paddingEnd: 20,
|
|
117
|
+
display: "flex",
|
|
118
|
+
...Platform.select({
|
|
119
|
+
web: {
|
|
120
|
+
cursor: "pointer",
|
|
121
|
+
userSelect: "none"
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
},
|
|
125
|
+
label: {
|
|
126
|
+
flex: 3
|
|
127
|
+
}
|
|
128
|
+
});
|
|
110
129
|
export default CheckboxGroupRow;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { StyleSheet, View, Platform, Pressable } from "react-native";
|
|
4
3
|
import { isString } from "lodash";
|
|
@@ -6,7 +5,7 @@ import { extractStyles } from "../../utilities";
|
|
|
6
5
|
import { usePrevious } from "../../hooks";
|
|
7
6
|
import Text from "../Text";
|
|
8
7
|
import Checkbox from "./Checkbox";
|
|
9
|
-
export
|
|
8
|
+
export var Direction;
|
|
10
9
|
(function (Direction) {
|
|
11
10
|
Direction["Row"] = "row";
|
|
12
11
|
Direction["RowReverse"] = "row-reverse";
|
|
@@ -48,7 +47,6 @@ const CheckboxRow = _ref => {
|
|
|
48
47
|
setInternalValue(status);
|
|
49
48
|
}
|
|
50
49
|
}, [status]);
|
|
51
|
-
|
|
52
50
|
// This special logic is to handle weird APIs like Airtable that return
|
|
53
51
|
// true or undefined for a boolean
|
|
54
52
|
const previousDefaultValue = usePrevious(defaultValue);
|
|
@@ -72,13 +70,14 @@ const CheckboxRow = _ref => {
|
|
|
72
70
|
textStyles,
|
|
73
71
|
viewStyles
|
|
74
72
|
} = extractStyles(style);
|
|
75
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
73
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
76
74
|
onPress: handlePress,
|
|
77
75
|
style: [viewStyles, styles.mainParent, {
|
|
78
76
|
flexDirection: direction
|
|
79
77
|
}],
|
|
80
|
-
disabled: disabled
|
|
81
|
-
|
|
78
|
+
disabled: disabled,
|
|
79
|
+
...rest
|
|
80
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
82
81
|
style: [styles.label, {
|
|
83
82
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
84
83
|
}, labelContainerStyle]
|
|
@@ -114,4 +113,23 @@ const styles = StyleSheet.create({
|
|
|
114
113
|
flex: 3
|
|
115
114
|
}
|
|
116
115
|
});
|
|
116
|
+
export default CheckboxRow;heet.create({
|
|
117
|
+
mainParent: {
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
justifyContent: "space-around",
|
|
120
|
+
paddingStart: 20,
|
|
121
|
+
minHeight: 50,
|
|
122
|
+
paddingEnd: 20,
|
|
123
|
+
display: "flex",
|
|
124
|
+
...Platform.select({
|
|
125
|
+
web: {
|
|
126
|
+
cursor: "pointer",
|
|
127
|
+
userSelect: "none"
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
},
|
|
131
|
+
label: {
|
|
132
|
+
flex: 3
|
|
133
|
+
}
|
|
134
|
+
});
|
|
117
135
|
export default CheckboxRow;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
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); }
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { Image } from "react-native";
|
|
3
4
|
import Config from "./Config";
|
|
@@ -9,22 +10,6 @@ const CircleImage = _ref => {
|
|
|
9
10
|
...props
|
|
10
11
|
} = _ref;
|
|
11
12
|
const borderRadius = size / 2;
|
|
12
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
13
|
-
style: [{
|
|
14
|
-
width: size,
|
|
15
|
-
height: size,
|
|
16
|
-
borderRadius
|
|
17
|
-
}, style],
|
|
18
|
-
source: typeof source === "string" ? {
|
|
19
|
-
uri: source
|
|
20
|
-
} : source,
|
|
21
|
-
resizeMode: "cover",
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
export default CircleImage;props
|
|
26
|
-
} = _ref;
|
|
27
|
-
const borderRadius = size / 2;
|
|
28
13
|
return /*#__PURE__*/React.createElement(Image, _extends({
|
|
29
14
|
style: [{
|
|
30
15
|
width: size,
|