@draftbit/core 46.4.4-3bb5e5.2 → 46.4.4-602cb9.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/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +18 -3
- package/lib/commonjs/components/Container.js +5 -17
- package/lib/commonjs/components/DatePicker/DatePicker.js +6 -1
- package/lib/commonjs/components/Divider.js +16 -2
- package/lib/commonjs/index.js +0 -38
- package/lib/commonjs/mappings/DatePicker.js +1 -0
- package/lib/commonjs/utilities.js +2 -2
- package/lib/module/components/DatePicker/DatePicker.js +5 -1
- package/lib/module/index.js +0 -1
- package/lib/module/mappings/DatePicker.js +2 -1
- package/lib/module/utilities.js +3 -3
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/mappings/DatePicker.d.ts +1 -0
- package/lib/typescript/src/utilities.d.ts +3 -3
- package/package.json +3 -3
- package/src/components/DatePicker/DatePicker.js +3 -0
- package/src/components/DatePicker/DatePicker.tsx +4 -0
- package/src/index.js +0 -1
- package/src/index.tsx +0 -9
- package/src/mappings/DatePicker.js +9 -1
- package/src/mappings/DatePicker.ts +9 -0
- package/src/utilities.js +2 -5
- package/src/utilities.ts +2 -13
- package/lib/commonjs/components/Table/Table.js +0 -50
- package/lib/commonjs/components/Table/TableCell.js +0 -50
- package/lib/commonjs/components/Table/TableHeader.js +0 -41
- package/lib/commonjs/components/Table/TablePaginator.js +0 -17
- package/lib/commonjs/components/Table/TableRow.js +0 -47
- package/lib/commonjs/components/Table/TableTitle.js +0 -60
- package/lib/commonjs/components/Table/index.js +0 -55
- package/lib/commonjs/mappings/Table.js +0 -103
- package/lib/module/components/Table/Table.js +0 -23
- package/lib/module/components/Table/TableCell.js +0 -37
- package/lib/module/components/Table/TableHeader.js +0 -27
- package/lib/module/components/Table/TablePaginator.js +0 -6
- package/lib/module/components/Table/TableRow.js +0 -33
- package/lib/module/components/Table/TableTitle.js +0 -47
- package/lib/module/components/Table/index.js +0 -6
- package/lib/module/mappings/Table.js +0 -94
- package/lib/typescript/src/components/Table/Table.d.ts +0 -8
- package/lib/typescript/src/components/Table/TableCell.d.ts +0 -10
- package/lib/typescript/src/components/Table/TableHeader.d.ts +0 -12
- package/lib/typescript/src/components/Table/TablePaginator.d.ts +0 -3
- package/lib/typescript/src/components/Table/TableRow.d.ts +0 -12
- package/lib/typescript/src/components/Table/TableTitle.d.ts +0 -12
- package/lib/typescript/src/components/Table/index.d.ts +0 -6
- package/lib/typescript/src/mappings/Table.d.ts +0 -153
- package/src/components/Table/Table.js +0 -10
- package/src/components/Table/Table.tsx +0 -22
- package/src/components/Table/TableCell.js +0 -21
- package/src/components/Table/TableCell.tsx +0 -44
- package/src/components/Table/TableHeader.js +0 -11
- package/src/components/Table/TableHeader.tsx +0 -28
- package/src/components/Table/TablePaginator.js +0 -5
- package/src/components/Table/TablePaginator.tsx +0 -10
- package/src/components/Table/TableRow.js +0 -16
- package/src/components/Table/TableRow.tsx +0 -31
- package/src/components/Table/TableTitle.js +0 -28
- package/src/components/Table/TableTitle.tsx +0 -58
- package/src/components/Table/index.js +0 -6
- package/src/components/Table/index.tsx +0 -6
- package/src/mappings/Table.js +0 -137
- package/src/mappings/Table.ts +0 -145
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
padding: 8
|
|
79
|
+
},
|
|
80
|
+
row: {
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
item: {
|
|
86
|
+
marginVertical: 6,
|
|
87
|
+
paddingLeft: 8
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
justifyContent: "center"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
96
|
+
|
|
77
97
|
exports.default = _default;
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const {
|
|
21
19
|
Provider
|
|
22
20
|
} = _context.checkboxGroupContext;
|
|
@@ -41,7 +39,24 @@ const CheckboxGroup = _ref => {
|
|
|
41
39
|
});
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
42
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
|
+
style: [{
|
|
44
|
+
minHeight: 40
|
|
45
|
+
}, style],
|
|
46
|
+
...rest
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
48
|
+
value: {
|
|
49
|
+
values,
|
|
50
|
+
onValueChange,
|
|
51
|
+
direction
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
54
|
+
style: _containerStyle
|
|
55
|
+
}, children)));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var _default = CheckboxGroup;
|
|
59
|
+
exports.default = _default;s({
|
|
45
60
|
style: [{
|
|
46
61
|
minHeight: 40
|
|
47
62
|
}, style]
|
|
@@ -19,6 +19,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
+
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); }
|
|
23
|
+
|
|
22
24
|
const Container = _ref => {
|
|
23
25
|
let {
|
|
24
26
|
useThemeGutterPadding,
|
|
@@ -80,10 +82,9 @@ const Container = _ref => {
|
|
|
80
82
|
};
|
|
81
83
|
const Wrap = elevation ? _Elevation.default : _reactNative.View;
|
|
82
84
|
if (elevation) containerStyle.elevation = elevation;
|
|
83
|
-
return /*#__PURE__*/React.createElement(Wrap, {
|
|
84
|
-
style: [containerStyle, style]
|
|
85
|
-
|
|
86
|
-
}, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
85
|
+
return /*#__PURE__*/React.createElement(Wrap, _extends({
|
|
86
|
+
style: [containerStyle, style]
|
|
87
|
+
}, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
87
88
|
source: typeof backgroundImage === "string" ? {
|
|
88
89
|
uri: backgroundImage
|
|
89
90
|
} : backgroundImage,
|
|
@@ -100,17 +101,4 @@ const Container = _ref => {
|
|
|
100
101
|
|
|
101
102
|
var _default = (0, _theming.withTheme)(Container);
|
|
102
103
|
|
|
103
|
-
exports.default = _default;izeMode: backgroundImageResizeMode,
|
|
104
|
-
style: {
|
|
105
|
-
flex: 1
|
|
106
|
-
}
|
|
107
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
108
|
-
style: innerStyle
|
|
109
|
-
}, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
110
|
-
style: innerStyle
|
|
111
|
-
}, children));
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
var _default = (0, _theming.withTheme)(Container);
|
|
115
|
-
|
|
116
104
|
exports.default = _default;
|
|
@@ -21,6 +21,8 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
|
|
|
21
21
|
|
|
22
22
|
var _DatePickerComponent = _interopRequireDefault(require("./DatePickerComponent"));
|
|
23
23
|
|
|
24
|
+
var _utilities = require("../../utilities");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -271,9 +273,12 @@ const DatePicker = _ref => {
|
|
|
271
273
|
})
|
|
272
274
|
}]
|
|
273
275
|
};
|
|
276
|
+
const {
|
|
277
|
+
textStyles
|
|
278
|
+
} = (0, _utilities.extractStyles)(style);
|
|
274
279
|
const inputStyles = [styles.input, inputStyle, type === "solid" ? {
|
|
275
280
|
marginHorizontal: 12
|
|
276
|
-
} : {}]; // const render = (props) => <NativeTextInput {...props} />;
|
|
281
|
+
} : {}, textStyles]; // const render = (props) => <NativeTextInput {...props} />;
|
|
277
282
|
|
|
278
283
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
279
284
|
style: [styles.container, style]
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const Divider = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
style,
|
|
@@ -26,6 +24,22 @@ const Divider = _ref => {
|
|
|
26
24
|
},
|
|
27
25
|
...rest
|
|
28
26
|
} = _ref;
|
|
27
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
+
style: [{
|
|
29
|
+
backgroundColor: color || colors.divider,
|
|
30
|
+
height: _reactNative.StyleSheet.hairlineWidth
|
|
31
|
+
}, style],
|
|
32
|
+
...rest
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = (0, _theming.withTheme)(Divider);
|
|
37
|
+
|
|
38
|
+
exports.default = _default;me: {
|
|
39
|
+
colors
|
|
40
|
+
},
|
|
41
|
+
...rest
|
|
42
|
+
} = _ref;
|
|
29
43
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
30
44
|
style: [{
|
|
31
45
|
backgroundColor: color || colors.divider,
|
package/lib/commonjs/index.js
CHANGED
|
@@ -369,42 +369,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
369
369
|
return _Switch.SwitchRow;
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
|
-
Object.defineProperty(exports, "Table", {
|
|
373
|
-
enumerable: true,
|
|
374
|
-
get: function () {
|
|
375
|
-
return _Table.Table;
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
Object.defineProperty(exports, "TableCell", {
|
|
379
|
-
enumerable: true,
|
|
380
|
-
get: function () {
|
|
381
|
-
return _Table.TableCell;
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
Object.defineProperty(exports, "TableHeader", {
|
|
385
|
-
enumerable: true,
|
|
386
|
-
get: function () {
|
|
387
|
-
return _Table.TableHeader;
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
Object.defineProperty(exports, "TablePaginator", {
|
|
391
|
-
enumerable: true,
|
|
392
|
-
get: function () {
|
|
393
|
-
return _Table.TablePaginator;
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
Object.defineProperty(exports, "TableRow", {
|
|
397
|
-
enumerable: true,
|
|
398
|
-
get: function () {
|
|
399
|
-
return _Table.TableRow;
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
Object.defineProperty(exports, "TableTitle", {
|
|
403
|
-
enumerable: true,
|
|
404
|
-
get: function () {
|
|
405
|
-
return _Table.TableTitle;
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
372
|
Object.defineProperty(exports, "TextField", {
|
|
409
373
|
enumerable: true,
|
|
410
374
|
get: function () {
|
|
@@ -512,8 +476,6 @@ var _Layout = require("./components/Layout");
|
|
|
512
476
|
|
|
513
477
|
var _index = require("./components/RadioButton/index");
|
|
514
478
|
|
|
515
|
-
var _Table = require("./components/Table");
|
|
516
|
-
|
|
517
479
|
var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
|
|
518
480
|
|
|
519
481
|
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
@@ -145,6 +145,7 @@ const SEED_DATA = [{
|
|
|
145
145
|
category: _types.COMPONENT_TYPES.input,
|
|
146
146
|
layout: null,
|
|
147
147
|
triggers: [_types.Triggers.OnDateChange],
|
|
148
|
+
StylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Size, _types.StylesPanelSections.Typography],
|
|
148
149
|
props: { ...SEED_DATA_PROPS,
|
|
149
150
|
type: {
|
|
150
151
|
label: "Appearance",
|
|
@@ -8,6 +8,7 @@ import { withTheme } from "../../theming";
|
|
|
8
8
|
import Portal from "../Portal/Portal";
|
|
9
9
|
import Touchable from "../Touchable";
|
|
10
10
|
import DateTimePicker from "./DatePickerComponent";
|
|
11
|
+
import { extractStyles } from "../../utilities";
|
|
11
12
|
const AnimatedText = Animated.createAnimatedComponent(Text);
|
|
12
13
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
13
14
|
const BLUR_ANIMATION_DURATION = 180;
|
|
@@ -249,9 +250,12 @@ const DatePicker = _ref => {
|
|
|
249
250
|
})
|
|
250
251
|
}]
|
|
251
252
|
};
|
|
253
|
+
const {
|
|
254
|
+
textStyles
|
|
255
|
+
} = extractStyles(style);
|
|
252
256
|
const inputStyles = [styles.input, inputStyle, type === "solid" ? {
|
|
253
257
|
marginHorizontal: 12
|
|
254
|
-
} : {}]; // const render = (props) => <NativeTextInput {...props} />;
|
|
258
|
+
} : {}, textStyles]; // const render = (props) => <NativeTextInput {...props} />;
|
|
255
259
|
|
|
256
260
|
return /*#__PURE__*/React.createElement(View, {
|
|
257
261
|
style: [styles.container, style]
|
package/lib/module/index.js
CHANGED
|
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
34
|
-
export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle } from "./components/Table";
|
|
35
34
|
/* Deprecated: Fix or Delete! */
|
|
36
35
|
|
|
37
36
|
export { default as CardBlock } from "./components/CardBlock";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
label: {
|
|
4
4
|
label: "Label",
|
|
@@ -137,6 +137,7 @@ export const SEED_DATA = [{
|
|
|
137
137
|
category: COMPONENT_TYPES.input,
|
|
138
138
|
layout: null,
|
|
139
139
|
triggers: [Triggers.OnDateChange],
|
|
140
|
+
StylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Size, StylesPanelSections.Typography],
|
|
140
141
|
props: { ...SEED_DATA_PROPS,
|
|
141
142
|
type: {
|
|
142
143
|
label: "Appearance",
|
package/lib/module/utilities.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
-
import { isString, isNumber, pick, pickBy, identity
|
|
2
|
+
import { isString, isNumber, pick, pickBy, identity } from "lodash";
|
|
3
3
|
export function extractStyles(style) {
|
|
4
4
|
const {
|
|
5
5
|
color,
|
|
@@ -29,8 +29,8 @@ export function extractStyles(style) {
|
|
|
29
29
|
textDecorationStyle
|
|
30
30
|
};
|
|
31
31
|
return {
|
|
32
|
-
viewStyles
|
|
33
|
-
textStyles
|
|
32
|
+
viewStyles,
|
|
33
|
+
textStyles
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
export const borderStyleNames = ["borderRadius", "borderBottomColor", "borderBottomEndRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderEndColor", "borderLeftColor", "borderLeftWidth", "borderRadius", "borderRightColor", "borderRightWidth", "borderStartColor", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth"];
|
|
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
|
-
export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
|
|
35
34
|
export { default as CardBlock } from "./components/CardBlock";
|
|
36
35
|
export { default as CardContainer } from "./components/CardContainer";
|
|
37
36
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
|
-
import { StyleProp } from "react-native";
|
|
2
|
+
import { StyleProp, TextStyle } from "react-native";
|
|
3
3
|
export declare function extractStyles(style: StyleProp<any>): {
|
|
4
|
-
viewStyles:
|
|
5
|
-
textStyles:
|
|
4
|
+
viewStyles: any;
|
|
5
|
+
textStyles: TextStyle;
|
|
6
6
|
};
|
|
7
7
|
export declare const borderStyleNames: string[];
|
|
8
8
|
export declare const marginStyleNames: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.4.4-
|
|
3
|
+
"version": "46.4.4-602cb9.2+602cb98",
|
|
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-
|
|
44
|
+
"@draftbit/types": "^46.4.4-602cb9.2+602cb98",
|
|
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",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
]
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "602cb98b5e2406894571b6304d46320af1770deb"
|
|
85
85
|
}
|
|
@@ -6,6 +6,7 @@ import { withTheme } from "../../theming";
|
|
|
6
6
|
import Portal from "../Portal/Portal";
|
|
7
7
|
import Touchable from "../Touchable";
|
|
8
8
|
import DateTimePicker from "./DatePickerComponent";
|
|
9
|
+
import { extractStyles } from "../../utilities";
|
|
9
10
|
const AnimatedText = Animated.createAnimatedComponent(Text);
|
|
10
11
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
11
12
|
const BLUR_ANIMATION_DURATION = 180;
|
|
@@ -241,10 +242,12 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
241
242
|
},
|
|
242
243
|
],
|
|
243
244
|
};
|
|
245
|
+
const { textStyles } = extractStyles(style);
|
|
244
246
|
const inputStyles = [
|
|
245
247
|
styles.input,
|
|
246
248
|
inputStyle,
|
|
247
249
|
type === "solid" ? { marginHorizontal: 12 } : {},
|
|
250
|
+
textStyles,
|
|
248
251
|
];
|
|
249
252
|
// const render = (props) => <NativeTextInput {...props} />;
|
|
250
253
|
return (React.createElement(View, { style: [styles.container, style] },
|
|
@@ -23,6 +23,7 @@ import DateTimePicker from "./DatePickerComponent";
|
|
|
23
23
|
|
|
24
24
|
import type { Theme } from "../../styles/DefaultTheme";
|
|
25
25
|
import type { IconSlot } from "../../interfaces/Icon";
|
|
26
|
+
import { extractStyles } from "../../utilities";
|
|
26
27
|
|
|
27
28
|
const AnimatedText = Animated.createAnimatedComponent(Text);
|
|
28
29
|
|
|
@@ -347,10 +348,13 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
347
348
|
],
|
|
348
349
|
};
|
|
349
350
|
|
|
351
|
+
const { textStyles } = extractStyles(style);
|
|
352
|
+
|
|
350
353
|
const inputStyles = [
|
|
351
354
|
styles.input,
|
|
352
355
|
inputStyle,
|
|
353
356
|
type === "solid" ? { marginHorizontal: 12 } : {},
|
|
357
|
+
textStyles,
|
|
354
358
|
];
|
|
355
359
|
|
|
356
360
|
// const render = (props) => <NativeTextInput {...props} />;
|
package/src/index.js
CHANGED
|
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
|
-
export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
|
|
35
34
|
/* Deprecated: Fix or Delete! */
|
|
36
35
|
export { default as CardBlock } from "./components/CardBlock";
|
|
37
36
|
export { default as CardContainer } from "./components/CardContainer";
|
package/src/index.tsx
CHANGED
|
@@ -51,15 +51,6 @@ export {
|
|
|
51
51
|
RadioButtonFieldGroup,
|
|
52
52
|
} from "./components/RadioButton/index";
|
|
53
53
|
|
|
54
|
-
export {
|
|
55
|
-
Table,
|
|
56
|
-
TableRow,
|
|
57
|
-
TablePaginator,
|
|
58
|
-
TableHeader,
|
|
59
|
-
TableCell,
|
|
60
|
-
TableTitle,
|
|
61
|
-
} from "./components/Table";
|
|
62
|
-
|
|
63
54
|
/* Deprecated: Fix or Delete! */
|
|
64
55
|
export { default as CardBlock } from "./components/CardBlock";
|
|
65
56
|
export { default as CardContainer } from "./components/CardContainer";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
const SEED_DATA_PROPS = {
|
|
3
3
|
label: {
|
|
4
4
|
label: "Label",
|
|
@@ -139,6 +139,14 @@ export const SEED_DATA = [
|
|
|
139
139
|
category: COMPONENT_TYPES.input,
|
|
140
140
|
layout: null,
|
|
141
141
|
triggers: [Triggers.OnDateChange],
|
|
142
|
+
StylesPanelSections: [
|
|
143
|
+
StylesPanelSections.Background,
|
|
144
|
+
StylesPanelSections.Borders,
|
|
145
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
146
|
+
StylesPanelSections.Position,
|
|
147
|
+
StylesPanelSections.Size,
|
|
148
|
+
StylesPanelSections.Typography,
|
|
149
|
+
],
|
|
142
150
|
props: {
|
|
143
151
|
...SEED_DATA_PROPS,
|
|
144
152
|
type: {
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
FIELD_NAME,
|
|
6
6
|
GROUPS,
|
|
7
7
|
Triggers,
|
|
8
|
+
StylesPanelSections,
|
|
8
9
|
} from "@draftbit/types";
|
|
9
10
|
|
|
10
11
|
const SEED_DATA_PROPS = {
|
|
@@ -150,6 +151,14 @@ export const SEED_DATA = [
|
|
|
150
151
|
category: COMPONENT_TYPES.input,
|
|
151
152
|
layout: null,
|
|
152
153
|
triggers: [Triggers.OnDateChange],
|
|
154
|
+
StylesPanelSections: [
|
|
155
|
+
StylesPanelSections.Background,
|
|
156
|
+
StylesPanelSections.Borders,
|
|
157
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
158
|
+
StylesPanelSections.Position,
|
|
159
|
+
StylesPanelSections.Size,
|
|
160
|
+
StylesPanelSections.Typography,
|
|
161
|
+
],
|
|
153
162
|
props: {
|
|
154
163
|
...SEED_DATA_PROPS,
|
|
155
164
|
type: {
|
package/src/utilities.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
-
import { isString, isNumber, pick, pickBy, identity
|
|
2
|
+
import { isString, isNumber, pick, pickBy, identity } from "lodash";
|
|
3
3
|
export function extractStyles(style) {
|
|
4
4
|
const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...viewStyles } = StyleSheet.flatten(style || {});
|
|
5
5
|
const textStyles = {
|
|
@@ -15,10 +15,7 @@ export function extractStyles(style) {
|
|
|
15
15
|
textDecorationColor,
|
|
16
16
|
textDecorationStyle,
|
|
17
17
|
};
|
|
18
|
-
return {
|
|
19
|
-
viewStyles: omitBy(viewStyles, isNil),
|
|
20
|
-
textStyles: omitBy(textStyles, isNil),
|
|
21
|
-
};
|
|
18
|
+
return { viewStyles, textStyles };
|
|
22
19
|
}
|
|
23
20
|
export const borderStyleNames = [
|
|
24
21
|
"borderRadius",
|
package/src/utilities.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { StyleSheet, StyleProp, TextStyle } from "react-native";
|
|
2
|
-
import {
|
|
3
|
-
isString,
|
|
4
|
-
isNumber,
|
|
5
|
-
pick,
|
|
6
|
-
pickBy,
|
|
7
|
-
identity,
|
|
8
|
-
omitBy,
|
|
9
|
-
isNil,
|
|
10
|
-
} from "lodash";
|
|
2
|
+
import { isString, isNumber, pick, pickBy, identity } from "lodash";
|
|
11
3
|
|
|
12
4
|
export function extractStyles(style: StyleProp<any>) {
|
|
13
5
|
const {
|
|
@@ -39,10 +31,7 @@ export function extractStyles(style: StyleProp<any>) {
|
|
|
39
31
|
textDecorationStyle,
|
|
40
32
|
};
|
|
41
33
|
|
|
42
|
-
return {
|
|
43
|
-
viewStyles: omitBy(viewStyles, isNil),
|
|
44
|
-
textStyles: omitBy(textStyles, isNil),
|
|
45
|
-
};
|
|
34
|
+
return { viewStyles, textStyles };
|
|
46
35
|
}
|
|
47
36
|
|
|
48
37
|
export const borderStyleNames = [
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
const Table = _ref => {
|
|
15
|
-
let {
|
|
16
|
-
children,
|
|
17
|
-
style,
|
|
18
|
-
...rest
|
|
19
|
-
} = _ref;
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, { ...rest,
|
|
21
|
-
style: [styles.wrapper, style]
|
|
22
|
-
}, children);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const styles = _reactNative.StyleSheet.create({
|
|
26
|
-
wrapper: {
|
|
27
|
-
display: "flex",
|
|
28
|
-
flexDirection: "column"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
var _default = Table;
|
|
33
|
-
exports.default = _default;,
|
|
34
|
-
style,
|
|
35
|
-
...rest
|
|
36
|
-
} = _ref;
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
38
|
-
style: [styles.wrapper, style]
|
|
39
|
-
}), children);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const styles = _reactNative.StyleSheet.create({
|
|
43
|
-
wrapper: {
|
|
44
|
-
display: "flex",
|
|
45
|
-
flexDirection: "column"
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
var _default = Table;
|
|
50
|
-
exports.default = _default;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _utilities = require("../../utilities");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
const TableCell = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
numeric,
|
|
23
|
-
value,
|
|
24
|
-
...rest
|
|
25
|
-
} = _ref;
|
|
26
|
-
const {
|
|
27
|
-
textStyles,
|
|
28
|
-
viewStyles
|
|
29
|
-
} = (0, _utilities.extractStyles)(style);
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
31
|
-
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
32
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
33
|
-
numberOfLines: 1,
|
|
34
|
-
style: textStyles
|
|
35
|
-
}, children, value));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const styles = _reactNative.StyleSheet.create({
|
|
39
|
-
wrapper: {
|
|
40
|
-
flex: 1,
|
|
41
|
-
display: "flex",
|
|
42
|
-
flexDirection: "row"
|
|
43
|
-
},
|
|
44
|
-
right: {
|
|
45
|
-
justifyContent: "flex-end"
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
var _default = TableCell;
|
|
50
|
-
exports.default = _default;
|