@draftbit/core 46.4.4-1da4cc.2 → 46.4.4-1df217.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.
@@ -213,7 +213,8 @@ const DatePicker = _ref => {
213
213
  paddingLeft: leftIconName && leftIconMode === "inset" ? ICON_SIZE + (type === "solid" ? 16 : 12) : 0,
214
214
  paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,
215
215
  ...subtitle1,
216
- height: lineHeight
216
+ height: lineHeight,
217
+ ...textStyles
217
218
  };
218
219
 
219
220
  if (type === "underline") {
@@ -284,10 +285,10 @@ const DatePicker = _ref => {
284
285
  };
285
286
  const inputStyles = [styles.input, inputStyle, type === "solid" ? {
286
287
  marginHorizontal: 12
287
- } : {}, textStyles, style]; // const render = (props) => <NativeTextInput {...props} />;
288
+ } : {}, textStyles]; // const render = (props) => <NativeTextInput {...props} />;
288
289
 
289
290
  return /*#__PURE__*/React.createElement(_reactNative.View, {
290
- style: [styles.container, style]
291
+ style: [styles.container]
291
292
  }, /*#__PURE__*/React.createElement(_Touchable.default, {
292
293
  disabled: disabled,
293
294
  onPress: toggleVisibility
@@ -298,7 +299,7 @@ const DatePicker = _ref => {
298
299
  }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
299
300
  style: leftIconStyle
300
301
  })) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
301
- style: [containerStyle, style]
302
+ style: [containerStyle]
302
303
  }, type === "underline" ?
303
304
  /*#__PURE__*/
304
305
  // When type === 'flat', render an underline
@@ -356,7 +357,7 @@ const DatePicker = _ref => {
356
357
  onFocus: _handleFocus,
357
358
  onBlur: _handleBlur,
358
359
  underlineColorAndroid: "transparent",
359
- style: inputStyles
360
+ style: [inputStyles, textStyles]
360
361
  }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
361
362
  name: rightIconName,
362
363
  size: ICON_SIZE,
@@ -17,8 +17,6 @@ var _RadioButtonGroup = _interopRequireDefault(require("./RadioButtonGroup"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- 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); }
21
-
22
20
  const RadioButtonFieldGroup = _ref => {
23
21
  let {
24
22
  label,
@@ -35,6 +33,17 @@ const RadioButtonFieldGroup = _ref => {
35
33
  fontSize: theme.typography.headline4.fontSize,
36
34
  color: theme.typography.headline4.color
37
35
  }, labelStyle]
36
+ }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, {
37
+ theme: theme,
38
+ ...rest
39
+ }, children));
40
+ };
41
+
42
+ var _default = (0, _theming.withTheme)(RadioButtonFieldGroup);
43
+
44
+ exports.default = _default; fontSize: theme.typography.headline4.fontSize,
45
+ color: theme.typography.headline4.color
46
+ }, labelStyle]
38
47
  }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
39
48
  theme: theme
40
49
  }, rest), children));
@@ -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;AR_HEIGHT;
@@ -1,5 +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
-
3
1
  import React from "react";
4
2
  import { View, StyleSheet } from "react-native";
5
3
 
@@ -32,7 +30,7 @@ const AspectRatio = props => {
32
30
  }
33
31
  }
34
32
 
35
- return /*#__PURE__*/React.createElement(View, _extends({}, props, {
33
+ return /*#__PURE__*/React.createElement(View, { ...props,
36
34
  style: style,
37
35
  onLayout: _ref => {
38
36
  let {
@@ -42,7 +40,7 @@ const AspectRatio = props => {
42
40
  } = _ref;
43
41
  return setLayout(l);
44
42
  }
45
- }), props.children);
43
+ }, props.children);
46
44
  };
47
45
 
48
46
  export default AspectRatio;
@@ -190,7 +190,8 @@ const DatePicker = _ref => {
190
190
  paddingLeft: leftIconName && leftIconMode === "inset" ? ICON_SIZE + (type === "solid" ? 16 : 12) : 0,
191
191
  paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,
192
192
  ...subtitle1,
193
- height: lineHeight
193
+ height: lineHeight,
194
+ ...textStyles
194
195
  };
195
196
 
196
197
  if (type === "underline") {
@@ -261,10 +262,10 @@ const DatePicker = _ref => {
261
262
  };
262
263
  const inputStyles = [styles.input, inputStyle, type === "solid" ? {
263
264
  marginHorizontal: 12
264
- } : {}, textStyles, style]; // const render = (props) => <NativeTextInput {...props} />;
265
+ } : {}, textStyles]; // const render = (props) => <NativeTextInput {...props} />;
265
266
 
266
267
  return /*#__PURE__*/React.createElement(View, {
267
- style: [styles.container, style]
268
+ style: [styles.container]
268
269
  }, /*#__PURE__*/React.createElement(Touchable, {
269
270
  disabled: disabled,
270
271
  onPress: toggleVisibility
@@ -275,7 +276,7 @@ const DatePicker = _ref => {
275
276
  }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
276
277
  style: leftIconStyle
277
278
  })) : null, /*#__PURE__*/React.createElement(View, {
278
- style: [containerStyle, style]
279
+ style: [containerStyle]
279
280
  }, type === "underline" ?
280
281
  /*#__PURE__*/
281
282
  // When type === 'flat', render an underline
@@ -333,7 +334,7 @@ const DatePicker = _ref => {
333
334
  onFocus: _handleFocus,
334
335
  onBlur: _handleBlur,
335
336
  underlineColorAndroid: "transparent",
336
- style: inputStyles
337
+ style: [inputStyles, textStyles]
337
338
  }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
338
339
  name: rightIconName,
339
340
  size: ICON_SIZE,
@@ -1,5 +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
-
3
1
  import * as React from "react";
4
2
  import { Switch as NativeSwitch } from "react-native";
5
3
  import { withTheme } from "../theming";
@@ -39,23 +37,24 @@ function Switch(_ref) {
39
37
  setChecked(Boolean(defaultValue));
40
38
  }
41
39
  }, [defaultValue, previousDefaultValue]);
42
- return /*#__PURE__*/React.createElement(NativeSwitch, _extends({
40
+ return /*#__PURE__*/React.createElement(NativeSwitch, {
43
41
  value: checked,
44
42
  disabled: disabled,
45
43
  trackColor: {
46
44
  false: inactiveTrackThemeColor,
47
45
  true: activeTrackThemeColor
48
46
  },
49
- thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor // @ts-ignore react-native-web only
50
- ,
47
+ thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
48
+ // @ts-ignore react-native-web only
51
49
  activeThumbColor: activeThumbThemeColor,
52
50
  ios_backgroundColor: inactiveTrackThemeColor,
53
51
  style: style,
54
52
  onValueChange: bool => {
55
53
  setChecked(bool);
56
54
  onValueChange && onValueChange(bool);
57
- }
58
- }, rest));
55
+ },
56
+ ...rest
57
+ });
59
58
  }
60
59
 
61
60
  function Row(_ref2) {
@@ -85,7 +84,7 @@ function Row(_ref2) {
85
84
  setChecked(defaultValue);
86
85
  }
87
86
  }, [defaultValue]);
88
- return /*#__PURE__*/React.createElement(FormRow, _extends({
87
+ return /*#__PURE__*/React.createElement(FormRow, {
89
88
  disabled: disabled,
90
89
  onPress: () => {
91
90
  setChecked(!checked);
@@ -93,8 +92,9 @@ function Row(_ref2) {
93
92
  },
94
93
  label: label,
95
94
  direction: direction,
96
- style: style
97
- }, rest), /*#__PURE__*/React.createElement(Switch, {
95
+ style: style,
96
+ ...rest
97
+ }, /*#__PURE__*/React.createElement(Switch, {
98
98
  theme: theme,
99
99
  value: checked,
100
100
  disabled: disabled,
@@ -106,6 +106,19 @@ function Row(_ref2) {
106
106
  }));
107
107
  }
108
108
 
109
+ const SwitchRow = withTheme(Row);
110
+ export { SwitchRow };
111
+ export default withTheme(Switch);me,
112
+ value: checked,
113
+ disabled: disabled,
114
+ onValueChange: onValueChange,
115
+ activeTrackColor: activeTrackColor,
116
+ inactiveTrackColor: inactiveTrackColor,
117
+ activeThumbColor: activeThumbColor,
118
+ inactiveThumbColor: inactiveThumbColor
119
+ }));
120
+ }
121
+
109
122
  const SwitchRow = withTheme(Row);
110
123
  export { SwitchRow };
111
124
  export default withTheme(Switch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-1da4cc.2+1da4ccf",
3
+ "version": "46.4.4-1df217.2+1df217c",
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.4.4-1da4cc.2+1da4ccf",
44
+ "@draftbit/types": "^46.4.4-1df217.2+1df217c",
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": "1da4ccf361a58e4c67eb6f67b4cb59fcac93d62c"
94
+ "gitHead": "1df217cc90554e290ea4eb2c1d9082ccd8d0bdb0"
95
95
  }
@@ -157,6 +157,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
157
157
  paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,
158
158
  ...subtitle1,
159
159
  height: lineHeight,
160
+ ...textStyles,
160
161
  };
161
162
  if (type === "underline") {
162
163
  containerStyle = {
@@ -252,15 +253,14 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
252
253
  inputStyle,
253
254
  type === "solid" ? { marginHorizontal: 12 } : {},
254
255
  textStyles,
255
- style,
256
256
  ];
257
257
  // const render = (props) => <NativeTextInput {...props} />;
258
- return (React.createElement(View, { style: [styles.container, style] },
258
+ return (React.createElement(View, { style: [styles.container] },
259
259
  React.createElement(Touchable, { disabled: disabled, onPress: toggleVisibility },
260
260
  React.createElement(View, { pointerEvents: "none" },
261
261
  React.createElement(View, { style: [styles.container] },
262
262
  leftIconName && leftIconMode === "outset" ? (React.createElement(Icon, { ...leftIconProps, style: leftIconStyle })) : null,
263
- React.createElement(View, { style: [containerStyle, style] },
263
+ React.createElement(View, { style: [containerStyle] },
264
264
  type === "underline" ? (
265
265
  // When type === 'flat', render an underline
266
266
  React.createElement(Animated.View, { style: [
@@ -310,7 +310,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
310
310
  ...leftIconStyle,
311
311
  marginLeft: type === "solid" ? 16 : 0,
312
312
  } })) : null,
313
- React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: inputStyles, ...props })),
313
+ React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles], ...props })),
314
314
  rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {
315
315
  position: "absolute",
316
316
  right: 16,
@@ -265,6 +265,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
265
265
  paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,
266
266
  ...subtitle1,
267
267
  height: lineHeight,
268
+ ...textStyles,
268
269
  };
269
270
 
270
271
  if (type === "underline") {
@@ -368,20 +369,19 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
368
369
  inputStyle,
369
370
  type === "solid" ? { marginHorizontal: 12 } : {},
370
371
  textStyles,
371
- style,
372
372
  ];
373
373
 
374
374
  // const render = (props) => <NativeTextInput {...props} />;
375
375
 
376
376
  return (
377
- <View style={[styles.container, style]}>
377
+ <View style={[styles.container]}>
378
378
  <Touchable disabled={disabled} onPress={toggleVisibility}>
379
379
  <View pointerEvents="none">
380
380
  <View style={[styles.container]}>
381
381
  {leftIconName && leftIconMode === "outset" ? (
382
382
  <Icon {...leftIconProps} style={leftIconStyle} />
383
383
  ) : null}
384
- <View style={[containerStyle, style]}>
384
+ <View style={[containerStyle]}>
385
385
  {type === "underline" ? (
386
386
  // When type === 'flat', render an underline
387
387
  <Animated.View
@@ -469,7 +469,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
469
469
  onFocus={_handleFocus}
470
470
  onBlur={_handleBlur}
471
471
  underlineColorAndroid={"transparent"}
472
- style={inputStyles}
472
+ style={[inputStyles, textStyles]}
473
473
  {...props}
474
474
  />
475
475
  </View>