@draftbit/core 46.2.2-da5d03.1 → 46.2.4-d94d1a.0
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/CardContainerRating.js +0 -1
- package/lib/commonjs/components/TextField.js +2 -1
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/TextField.js +4 -0
- package/lib/module/components/CardContainerRating.js +1 -2
- package/lib/module/components/TextField.js +2 -1
- package/lib/module/constants.js +0 -1
- package/lib/module/mappings/TextField.js +4 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/mappings/TextField.d.ts +10 -0
- package/package.json +3 -3
- package/src/components/CardContainerRating.js +0 -1
- package/src/components/CardContainerRating.tsx +0 -2
- package/src/components/TextField.js +2 -2
- package/src/components/TextField.tsx +3 -1
- package/src/mappings/TextField.js +4 -0
- package/src/mappings/TextField.ts +4 -0
|
@@ -27,7 +27,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
27
27
|
|
|
28
28
|
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); }
|
|
29
29
|
|
|
30
|
-
// Hello! I'm a comment!
|
|
31
30
|
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
32
31
|
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
33
32
|
|
|
@@ -193,6 +193,7 @@ class TextField extends React.Component {
|
|
|
193
193
|
rightIconName,
|
|
194
194
|
assistiveText,
|
|
195
195
|
underlineColor: underlineColorProp,
|
|
196
|
+
activeBorderColor: activeBorderColorProp,
|
|
196
197
|
multiline = false,
|
|
197
198
|
numberOfLines = 4,
|
|
198
199
|
style,
|
|
@@ -220,7 +221,7 @@ class TextField extends React.Component {
|
|
|
220
221
|
underlineColor = "transparent";
|
|
221
222
|
backgroundColor = colors.divider;
|
|
222
223
|
} else {
|
|
223
|
-
activeColor = error ? colors.error :
|
|
224
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
224
225
|
placeholderColor = borderColor = colors.light;
|
|
225
226
|
underlineColor = underlineColorProp;
|
|
226
227
|
backgroundColor = colors.background;
|
|
@@ -16,4 +16,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
16
16
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
19
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
@@ -290,6 +290,10 @@ const SEED_DATA = [{
|
|
|
290
290
|
label: "Underline Color",
|
|
291
291
|
defaultValue: "light"
|
|
292
292
|
}),
|
|
293
|
+
activeBorderColor: (0, _types.createColorProp)({
|
|
294
|
+
label: "Active Border Color",
|
|
295
|
+
defaultValue: "primary"
|
|
296
|
+
}),
|
|
293
297
|
secureTextEntry: {
|
|
294
298
|
group: _types.GROUPS.basic,
|
|
295
299
|
label: "Password field",
|
|
@@ -8,8 +8,7 @@ import Card from "./DeprecatedCardWrapper";
|
|
|
8
8
|
import Elevation from "./Elevation";
|
|
9
9
|
import StarRating from "./StarRating";
|
|
10
10
|
import { withTheme } from "../theming";
|
|
11
|
-
import Config from "./Config";
|
|
12
|
-
|
|
11
|
+
import Config from "./Config";
|
|
13
12
|
const ICON_CONTAINER_SIZE = Config.cardIconSize * 2;
|
|
14
13
|
const ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;
|
|
15
14
|
|
|
@@ -177,6 +177,7 @@ class TextField extends React.Component {
|
|
|
177
177
|
rightIconName,
|
|
178
178
|
assistiveText,
|
|
179
179
|
underlineColor: underlineColorProp,
|
|
180
|
+
activeBorderColor: activeBorderColorProp,
|
|
180
181
|
multiline = false,
|
|
181
182
|
numberOfLines = 4,
|
|
182
183
|
style,
|
|
@@ -204,7 +205,7 @@ class TextField extends React.Component {
|
|
|
204
205
|
underlineColor = "transparent";
|
|
205
206
|
backgroundColor = colors.divider;
|
|
206
207
|
} else {
|
|
207
|
-
activeColor = error ? colors.error :
|
|
208
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
208
209
|
placeholderColor = borderColor = colors.light;
|
|
209
210
|
underlineColor = underlineColorProp;
|
|
210
211
|
backgroundColor = colors.background;
|
package/lib/module/constants.js
CHANGED
|
@@ -282,6 +282,10 @@ export const SEED_DATA = [{
|
|
|
282
282
|
label: "Underline Color",
|
|
283
283
|
defaultValue: "light"
|
|
284
284
|
}),
|
|
285
|
+
activeBorderColor: createColorProp({
|
|
286
|
+
label: "Active Border Color",
|
|
287
|
+
defaultValue: "primary"
|
|
288
|
+
}),
|
|
285
289
|
secureTextEntry: {
|
|
286
290
|
group: GROUPS.basic,
|
|
287
291
|
label: "Password field",
|
|
@@ -28,6 +28,16 @@ export declare const SEED_DATA: ({
|
|
|
28
28
|
formType: string;
|
|
29
29
|
propType: string;
|
|
30
30
|
};
|
|
31
|
+
activeBorderColor: {
|
|
32
|
+
group: string;
|
|
33
|
+
label: string;
|
|
34
|
+
description: string;
|
|
35
|
+
editable: boolean;
|
|
36
|
+
required: boolean;
|
|
37
|
+
defaultValue: null;
|
|
38
|
+
formType: string;
|
|
39
|
+
propType: string;
|
|
40
|
+
};
|
|
31
41
|
secureTextEntry: {
|
|
32
42
|
group: string;
|
|
33
43
|
label: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.2.
|
|
3
|
+
"version": "46.2.4-d94d1a.0+d94d1a55",
|
|
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.2.
|
|
44
|
+
"@draftbit/types": "^46.2.3",
|
|
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",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
]
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "d94d1a55b219bfcdb12682c4d2bcf3358fcc1b61"
|
|
83
83
|
}
|
|
@@ -7,7 +7,6 @@ import Elevation from "./Elevation";
|
|
|
7
7
|
import StarRating from "./StarRating";
|
|
8
8
|
import { withTheme } from "../theming";
|
|
9
9
|
import Config from "./Config";
|
|
10
|
-
// Hello! I'm a comment!
|
|
11
10
|
const ICON_CONTAINER_SIZE = Config.cardIconSize * 2;
|
|
12
11
|
const ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;
|
|
13
12
|
const CardContainerRating = ({ Icon, icon, image = Config.cardImageUrl, title, leftDescription, rightDescription, rating, aspectRatio = 1.5, elevation = 2, numColumns = 3, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {
|
|
@@ -136,7 +136,7 @@ class TextField extends React.Component {
|
|
|
136
136
|
return this._root && this._root.blur();
|
|
137
137
|
}
|
|
138
138
|
render() {
|
|
139
|
-
const { Icon, type = "underline", disabled = false, label, error = false, leftIconName, leftIconMode, rightIconName, assistiveText, underlineColor: underlineColorProp, multiline = false, numberOfLines = 4, style, theme: { colors, typography, roundness, disabledOpacity }, render = (props) => React.createElement(NativeTextInput, { ...props }), ...rest } = this.props;
|
|
139
|
+
const { Icon, type = "underline", disabled = false, label, error = false, leftIconName, leftIconMode, rightIconName, assistiveText, underlineColor: underlineColorProp, activeBorderColor: activeBorderColorProp, multiline = false, numberOfLines = 4, style, theme: { colors, typography, roundness, disabledOpacity }, render = (props) => React.createElement(NativeTextInput, { ...props }), ...rest } = this.props;
|
|
140
140
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
141
141
|
const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
|
|
142
142
|
const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
|
|
@@ -152,7 +152,7 @@ class TextField extends React.Component {
|
|
|
152
152
|
backgroundColor = colors.divider;
|
|
153
153
|
}
|
|
154
154
|
else {
|
|
155
|
-
activeColor = error ? colors.error :
|
|
155
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
156
156
|
placeholderColor = borderColor = colors.light;
|
|
157
157
|
underlineColor = underlineColorProp;
|
|
158
158
|
backgroundColor = colors.background;
|
|
@@ -42,6 +42,7 @@ export type Props = {
|
|
|
42
42
|
multiline?: boolean;
|
|
43
43
|
numberOfLines: number;
|
|
44
44
|
underlineColor?: string;
|
|
45
|
+
activeBorderColor?: string;
|
|
45
46
|
style?: StyleProp<ViewStyle> & { height?: number };
|
|
46
47
|
theme: Theme;
|
|
47
48
|
render?: (
|
|
@@ -237,6 +238,7 @@ class TextField extends React.Component<Props, State> {
|
|
|
237
238
|
rightIconName,
|
|
238
239
|
assistiveText,
|
|
239
240
|
underlineColor: underlineColorProp,
|
|
241
|
+
activeBorderColor: activeBorderColorProp,
|
|
240
242
|
multiline = false,
|
|
241
243
|
numberOfLines = 4,
|
|
242
244
|
style,
|
|
@@ -269,7 +271,7 @@ class TextField extends React.Component<Props, State> {
|
|
|
269
271
|
underlineColor = "transparent";
|
|
270
272
|
backgroundColor = colors.divider;
|
|
271
273
|
} else {
|
|
272
|
-
activeColor = error ? colors.error :
|
|
274
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
273
275
|
placeholderColor = borderColor = colors.light;
|
|
274
276
|
underlineColor = underlineColorProp;
|
|
275
277
|
backgroundColor = colors.background;
|
|
@@ -312,6 +312,10 @@ export const SEED_DATA = [
|
|
|
312
312
|
label: "Underline Color",
|
|
313
313
|
defaultValue: "light",
|
|
314
314
|
}),
|
|
315
|
+
activeBorderColor: createColorProp({
|
|
316
|
+
label: "Active Border Color",
|
|
317
|
+
defaultValue: "primary",
|
|
318
|
+
}),
|
|
315
319
|
secureTextEntry: {
|
|
316
320
|
group: GROUPS.basic,
|
|
317
321
|
label: "Password field",
|
|
@@ -334,6 +334,10 @@ export const SEED_DATA = [
|
|
|
334
334
|
label: "Underline Color",
|
|
335
335
|
defaultValue: "light",
|
|
336
336
|
}),
|
|
337
|
+
activeBorderColor: createColorProp({
|
|
338
|
+
label: "Active Border Color",
|
|
339
|
+
defaultValue: "primary",
|
|
340
|
+
}),
|
|
337
341
|
secureTextEntry: {
|
|
338
342
|
group: GROUPS.basic,
|
|
339
343
|
label: "Password field",
|