@draftbit/core 46.4.1-2f2c24.2 → 46.4.1-2fa4f7.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/Container.js +5 -17
- package/lib/commonjs/index.js +0 -38
- package/lib/commonjs/mappings/ActionSheet.js +1 -1
- package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
- package/lib/commonjs/mappings/ActivityIndicator.js +1 -1
- package/lib/commonjs/mappings/Banner.js +1 -1
- package/lib/commonjs/mappings/BlurView.js +1 -1
- package/lib/commonjs/mappings/Button.js +4 -12
- package/lib/commonjs/mappings/Checkbox.js +1 -1
- package/lib/commonjs/mappings/CheckboxRow.js +1 -1
- package/lib/commonjs/mappings/CircleImage.js +1 -1
- package/lib/commonjs/mappings/CustomCode.js +1 -1
- package/lib/commonjs/mappings/FAB.js +1 -1
- package/lib/commonjs/mappings/FieldSearchBarFull.js +1 -1
- package/lib/commonjs/mappings/Image.js +15 -2
- package/lib/commonjs/mappings/KeyboardAvoidingView.js +1 -1
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js +1 -1
- package/lib/commonjs/mappings/Layout.js +2 -2
- package/lib/commonjs/mappings/MapCallout.js +1 -1
- package/lib/commonjs/mappings/MapMarker.js +1 -1
- package/lib/commonjs/mappings/MapView.js +1 -1
- package/lib/commonjs/mappings/Modal.js +1 -1
- package/lib/commonjs/mappings/RadioButton.js +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js +1 -1
- package/lib/commonjs/mappings/ScrollView.js +1 -1
- package/lib/commonjs/mappings/Slider.js +1 -1
- package/lib/commonjs/mappings/StarRating.js +1 -1
- package/lib/commonjs/mappings/Stepper.js +1 -1
- package/lib/commonjs/mappings/Surface.js +1 -1
- package/lib/commonjs/mappings/Swiper.js +1 -1
- package/lib/commonjs/mappings/SwiperItem.js +1 -1
- package/lib/commonjs/mappings/Switch.js +2 -2
- package/lib/commonjs/mappings/WebView.js +1 -1
- package/lib/commonjs/utilities.js +2 -2
- package/lib/module/components/AvatarEdit.js +16 -5
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/module/components/IconButton.js +22 -5
- package/lib/module/components/Layout.js +43 -21
- package/lib/module/components/Portal/Portal.js +3 -6
- package/lib/module/constants.js +1 -0
- package/lib/module/index.js +0 -1
- package/lib/module/mappings/ActionSheet.js +1 -1
- package/lib/module/mappings/ActionSheetCancel.js +1 -1
- package/lib/module/mappings/ActionSheetItem.js +1 -1
- package/lib/module/mappings/ActivityIndicator.js +1 -1
- package/lib/module/mappings/Banner.js +1 -1
- package/lib/module/mappings/BlurView.js +1 -1
- package/lib/module/mappings/Button.js +5 -13
- package/lib/module/mappings/Checkbox.js +1 -1
- package/lib/module/mappings/CheckboxRow.js +1 -1
- package/lib/module/mappings/CircleImage.js +1 -1
- package/lib/module/mappings/CustomCode.js +1 -1
- package/lib/module/mappings/FAB.js +1 -1
- package/lib/module/mappings/FieldSearchBarFull.js +1 -1
- package/lib/module/mappings/Image.js +16 -3
- package/lib/module/mappings/KeyboardAvoidingView.js +1 -1
- package/lib/module/mappings/KeyboardAwareScrollView.js +1 -1
- package/lib/module/mappings/Layout.js +2 -2
- package/lib/module/mappings/MapCallout.js +1 -1
- package/lib/module/mappings/MapMarker.js +1 -1
- package/lib/module/mappings/MapView.js +1 -1
- package/lib/module/mappings/Modal.js +1 -1
- package/lib/module/mappings/RadioButton.js +1 -1
- package/lib/module/mappings/RadioButtonGroup.js +1 -1
- package/lib/module/mappings/RadioButtonRow.js +1 -1
- package/lib/module/mappings/ScrollView.js +1 -1
- package/lib/module/mappings/Slider.js +1 -1
- package/lib/module/mappings/StarRating.js +1 -1
- package/lib/module/mappings/Stepper.js +1 -1
- package/lib/module/mappings/Surface.js +1 -1
- package/lib/module/mappings/Swiper.js +1 -1
- package/lib/module/mappings/SwiperItem.js +1 -1
- package/lib/module/mappings/Switch.js +2 -2
- package/lib/module/mappings/WebView.js +1 -1
- package/lib/module/utilities.js +3 -3
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/mappings/Button.d.ts +16 -16
- package/lib/typescript/src/mappings/Image.d.ts +13 -0
- package/lib/typescript/src/utilities.d.ts +3 -3
- package/package.json +3 -3
- package/src/index.js +0 -1
- package/src/index.tsx +0 -9
- package/src/mappings/ActionSheet.js +1 -1
- package/src/mappings/ActionSheet.ts +1 -1
- package/src/mappings/ActionSheetCancel.js +1 -1
- package/src/mappings/ActionSheetCancel.ts +1 -1
- package/src/mappings/ActionSheetItem.js +1 -1
- package/src/mappings/ActionSheetItem.ts +1 -1
- package/src/mappings/ActivityIndicator.js +1 -1
- package/src/mappings/ActivityIndicator.ts +1 -1
- package/src/mappings/Banner.js +1 -1
- package/src/mappings/Banner.ts +1 -1
- package/src/mappings/BlurView.js +1 -1
- package/src/mappings/BlurView.ts +1 -1
- package/src/mappings/Button.js +5 -13
- package/src/mappings/Button.ts +6 -14
- package/src/mappings/Checkbox.js +1 -1
- package/src/mappings/Checkbox.ts +1 -1
- package/src/mappings/CheckboxRow.js +1 -1
- package/src/mappings/CheckboxRow.ts +1 -1
- package/src/mappings/CircleImage.js +1 -1
- package/src/mappings/CircleImage.ts +1 -1
- package/src/mappings/CustomCode.js +1 -1
- package/src/mappings/CustomCode.ts +1 -1
- package/src/mappings/FAB.js +1 -1
- package/src/mappings/FAB.ts +1 -1
- package/src/mappings/FieldSearchBarFull.js +1 -1
- package/src/mappings/FieldSearchBarFull.ts +1 -1
- package/src/mappings/Image.js +15 -1
- package/src/mappings/Image.ts +17 -0
- package/src/mappings/KeyboardAvoidingView.js +1 -1
- package/src/mappings/KeyboardAvoidingView.ts +1 -1
- package/src/mappings/KeyboardAwareScrollView.js +1 -1
- package/src/mappings/KeyboardAwareScrollView.ts +1 -1
- package/src/mappings/Layout.js +2 -2
- package/src/mappings/Layout.ts +2 -2
- package/src/mappings/MapCallout.js +1 -1
- package/src/mappings/MapCallout.ts +1 -1
- package/src/mappings/MapMarker.js +1 -1
- package/src/mappings/MapMarker.ts +1 -1
- package/src/mappings/MapView.js +1 -1
- package/src/mappings/MapView.ts +1 -1
- package/src/mappings/Modal.js +1 -1
- package/src/mappings/Modal.ts +1 -1
- package/src/mappings/RadioButton.js +1 -1
- package/src/mappings/RadioButton.ts +1 -1
- package/src/mappings/RadioButtonGroup.js +1 -1
- package/src/mappings/RadioButtonGroup.ts +1 -1
- package/src/mappings/RadioButtonRow.js +1 -1
- package/src/mappings/RadioButtonRow.ts +1 -1
- package/src/mappings/ScrollView.js +1 -1
- package/src/mappings/ScrollView.ts +1 -1
- package/src/mappings/Slider.js +1 -1
- package/src/mappings/Slider.ts +1 -1
- package/src/mappings/StarRating.js +1 -1
- package/src/mappings/StarRating.ts +1 -1
- package/src/mappings/Stepper.js +1 -1
- package/src/mappings/Stepper.ts +1 -1
- package/src/mappings/Surface.js +1 -1
- package/src/mappings/Surface.ts +1 -1
- package/src/mappings/Swiper.js +1 -1
- package/src/mappings/Swiper.ts +1 -1
- package/src/mappings/SwiperItem.js +1 -1
- package/src/mappings/SwiperItem.ts +1 -1
- package/src/mappings/Switch.js +2 -2
- package/src/mappings/Switch.ts +2 -2
- package/src/mappings/WebView.js +1 -1
- package/src/mappings/WebView.ts +1 -1
- package/src/utilities.js +2 -5
- package/src/utilities.ts +2 -13
- package/lib/commonjs/components/Table/Table.js +0 -35
- 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
|
@@ -12,7 +12,7 @@ export const SEED_DATA = {
|
|
|
12
12
|
tag: "MapMarker",
|
|
13
13
|
packageName: "@draftbit/maps",
|
|
14
14
|
description: "A marker to show inside map view",
|
|
15
|
-
category: COMPONENT_TYPES.
|
|
15
|
+
category: COMPONENT_TYPES.map,
|
|
16
16
|
layout: {},
|
|
17
17
|
props: {
|
|
18
18
|
latitude: createNumberProp({
|
package/src/mappings/MapView.js
CHANGED
package/src/mappings/MapView.ts
CHANGED
package/src/mappings/Modal.js
CHANGED
package/src/mappings/Modal.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const SEED_DATA = {
|
|
|
11
11
|
name: "Modal",
|
|
12
12
|
tag: "Modal",
|
|
13
13
|
description: "A basic Modal Component",
|
|
14
|
-
category: COMPONENT_TYPES.
|
|
14
|
+
category: COMPONENT_TYPES.layout,
|
|
15
15
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
16
16
|
props: {
|
|
17
17
|
animationType: {
|
|
@@ -2,7 +2,7 @@ import { GROUPS, COMPONENT_TYPES, createBoolProp, createColorProp, createNumberP
|
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Radio Button",
|
|
4
4
|
tag: "RadioButton",
|
|
5
|
-
category: COMPONENT_TYPES.
|
|
5
|
+
category: COMPONENT_TYPES.control,
|
|
6
6
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
7
7
|
triggers: [Triggers.OnPress],
|
|
8
8
|
props: {
|
|
@@ -2,7 +2,7 @@ import { COMPONENT_TYPES, createFieldNameProp, createDirectionProp, Triggers, St
|
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Radio Button Group",
|
|
4
4
|
tag: "RadioButtonGroup",
|
|
5
|
-
category: COMPONENT_TYPES.
|
|
5
|
+
category: COMPONENT_TYPES.control,
|
|
6
6
|
stylesPanelSections: [StylesPanelSections.Margins],
|
|
7
7
|
layout: {},
|
|
8
8
|
triggers: [Triggers.OnValueChange],
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
export const SEED_DATA = {
|
|
10
10
|
name: "Radio Button Group",
|
|
11
11
|
tag: "RadioButtonGroup",
|
|
12
|
-
category: COMPONENT_TYPES.
|
|
12
|
+
category: COMPONENT_TYPES.control,
|
|
13
13
|
stylesPanelSections: [StylesPanelSections.Margins],
|
|
14
14
|
layout: {},
|
|
15
15
|
triggers: [Triggers.OnValueChange],
|
|
@@ -2,7 +2,7 @@ import { createTextProp, createTextEnumProp, COMPONENT_TYPES, createColorProp, G
|
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Radio Button Row",
|
|
4
4
|
tag: "RadioButtonRow",
|
|
5
|
-
category: COMPONENT_TYPES.
|
|
5
|
+
category: COMPONENT_TYPES.control,
|
|
6
6
|
stylesPanelSections: [
|
|
7
7
|
StylesPanelSections.Typography,
|
|
8
8
|
StylesPanelSections.Margins,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
export const SEED_DATA = {
|
|
11
11
|
name: "Radio Button Row",
|
|
12
12
|
tag: "RadioButtonRow",
|
|
13
|
-
category: COMPONENT_TYPES.
|
|
13
|
+
category: COMPONENT_TYPES.control,
|
|
14
14
|
stylesPanelSections: [
|
|
15
15
|
StylesPanelSections.Typography,
|
|
16
16
|
StylesPanelSections.Margins,
|
|
@@ -3,7 +3,7 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Scroll View",
|
|
4
4
|
tag: "ScrollView",
|
|
5
5
|
description: "A basic ScrollView component",
|
|
6
|
-
category: COMPONENT_TYPES.
|
|
6
|
+
category: COMPONENT_TYPES.view,
|
|
7
7
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
8
|
layout: {},
|
|
9
9
|
props: {
|
|
@@ -8,7 +8,7 @@ export const SEED_DATA = {
|
|
|
8
8
|
name: "Scroll View",
|
|
9
9
|
tag: "ScrollView",
|
|
10
10
|
description: "A basic ScrollView component",
|
|
11
|
-
category: COMPONENT_TYPES.
|
|
11
|
+
category: COMPONENT_TYPES.view,
|
|
12
12
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
13
13
|
layout: {},
|
|
14
14
|
props: {
|
package/src/mappings/Slider.js
CHANGED
|
@@ -3,7 +3,7 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Slider",
|
|
4
4
|
tag: "Slider",
|
|
5
5
|
description: "A component used to set a value in a range",
|
|
6
|
-
category: COMPONENT_TYPES.
|
|
6
|
+
category: COMPONENT_TYPES.control,
|
|
7
7
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
8
8
|
layout: {
|
|
9
9
|
marginLeft: 12,
|
package/src/mappings/Slider.ts
CHANGED
|
@@ -13,7 +13,7 @@ export const SEED_DATA = {
|
|
|
13
13
|
name: "Slider",
|
|
14
14
|
tag: "Slider",
|
|
15
15
|
description: "A component used to set a value in a range",
|
|
16
|
-
category: COMPONENT_TYPES.
|
|
16
|
+
category: COMPONENT_TYPES.control,
|
|
17
17
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
18
18
|
layout: {
|
|
19
19
|
marginLeft: 12,
|
|
@@ -3,7 +3,7 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Star Rating",
|
|
4
4
|
tag: "StarRating",
|
|
5
5
|
description: "A star rating component",
|
|
6
|
-
category: COMPONENT_TYPES.
|
|
6
|
+
category: COMPONENT_TYPES.control,
|
|
7
7
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
8
8
|
triggers: [Triggers.OnPress],
|
|
9
9
|
props: {
|
|
@@ -12,7 +12,7 @@ export const SEED_DATA = {
|
|
|
12
12
|
name: "Star Rating",
|
|
13
13
|
tag: "StarRating",
|
|
14
14
|
description: "A star rating component",
|
|
15
|
-
category: COMPONENT_TYPES.
|
|
15
|
+
category: COMPONENT_TYPES.control,
|
|
16
16
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
17
17
|
triggers: [Triggers.OnPress],
|
|
18
18
|
props: {
|
package/src/mappings/Stepper.js
CHANGED
|
@@ -4,7 +4,7 @@ export const SEED_DATA = [
|
|
|
4
4
|
name: "Stepper",
|
|
5
5
|
tag: "Stepper",
|
|
6
6
|
description: "A component used to control the quantity of something",
|
|
7
|
-
category: COMPONENT_TYPES.
|
|
7
|
+
category: COMPONENT_TYPES.control,
|
|
8
8
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
9
9
|
layout: {},
|
|
10
10
|
triggers: [Triggers.OnChange],
|
package/src/mappings/Stepper.ts
CHANGED
|
@@ -13,7 +13,7 @@ export const SEED_DATA = [
|
|
|
13
13
|
name: "Stepper",
|
|
14
14
|
tag: "Stepper",
|
|
15
15
|
description: "A component used to control the quantity of something",
|
|
16
|
-
category: COMPONENT_TYPES.
|
|
16
|
+
category: COMPONENT_TYPES.control,
|
|
17
17
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
18
18
|
layout: {},
|
|
19
19
|
triggers: [Triggers.OnChange],
|
package/src/mappings/Surface.js
CHANGED
package/src/mappings/Surface.ts
CHANGED
|
@@ -8,7 +8,7 @@ export const SEED_DATA = {
|
|
|
8
8
|
name: "Surface",
|
|
9
9
|
tag: "Surface",
|
|
10
10
|
description: "An elevated container",
|
|
11
|
-
category: COMPONENT_TYPES.
|
|
11
|
+
category: COMPONENT_TYPES.container,
|
|
12
12
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
13
13
|
layout: {
|
|
14
14
|
minHeight: 40,
|
package/src/mappings/Swiper.js
CHANGED
package/src/mappings/Swiper.ts
CHANGED
package/src/mappings/Switch.js
CHANGED
|
@@ -4,7 +4,7 @@ export const SEED_DATA = [
|
|
|
4
4
|
{
|
|
5
5
|
name: "Switch",
|
|
6
6
|
tag: "Switch",
|
|
7
|
-
category: COMPONENT_TYPES.
|
|
7
|
+
category: COMPONENT_TYPES.control,
|
|
8
8
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
9
9
|
layout: {},
|
|
10
10
|
triggers: SEED_DATA_TRIGGERS,
|
|
@@ -35,7 +35,7 @@ export const SEED_DATA = [
|
|
|
35
35
|
{
|
|
36
36
|
name: "Switch Row",
|
|
37
37
|
tag: "SwitchRow",
|
|
38
|
-
category: COMPONENT_TYPES.
|
|
38
|
+
category: COMPONENT_TYPES.control,
|
|
39
39
|
stylesPanelSections: [
|
|
40
40
|
StylesPanelSections.Typography,
|
|
41
41
|
StylesPanelSections.Margins,
|
package/src/mappings/Switch.ts
CHANGED
|
@@ -15,7 +15,7 @@ export const SEED_DATA = [
|
|
|
15
15
|
{
|
|
16
16
|
name: "Switch",
|
|
17
17
|
tag: "Switch",
|
|
18
|
-
category: COMPONENT_TYPES.
|
|
18
|
+
category: COMPONENT_TYPES.control,
|
|
19
19
|
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
20
20
|
layout: {},
|
|
21
21
|
triggers: SEED_DATA_TRIGGERS,
|
|
@@ -46,7 +46,7 @@ export const SEED_DATA = [
|
|
|
46
46
|
{
|
|
47
47
|
name: "Switch Row",
|
|
48
48
|
tag: "SwitchRow",
|
|
49
|
-
category: COMPONENT_TYPES.
|
|
49
|
+
category: COMPONENT_TYPES.control,
|
|
50
50
|
stylesPanelSections: [
|
|
51
51
|
StylesPanelSections.Typography,
|
|
52
52
|
StylesPanelSections.Margins,
|
package/src/mappings/WebView.js
CHANGED
|
@@ -3,7 +3,7 @@ export const SEED_DATA = {
|
|
|
3
3
|
name: "Web View",
|
|
4
4
|
tag: "WebView",
|
|
5
5
|
description: "Render web content inside a view",
|
|
6
|
-
category: COMPONENT_TYPES.
|
|
6
|
+
category: COMPONENT_TYPES.utility,
|
|
7
7
|
stylesPanelSections: [
|
|
8
8
|
StylesPanelSections.Size,
|
|
9
9
|
StylesPanelSections.Margins,
|
package/src/mappings/WebView.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const SEED_DATA = {
|
|
|
11
11
|
name: "Web View",
|
|
12
12
|
tag: "WebView",
|
|
13
13
|
description: "Render web content inside a view",
|
|
14
|
-
category: COMPONENT_TYPES.
|
|
14
|
+
category: COMPONENT_TYPES.utility,
|
|
15
15
|
stylesPanelSections: [
|
|
16
16
|
StylesPanelSections.Size,
|
|
17
17
|
StylesPanelSections.Margins,
|
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,35 +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
|
-
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); }
|
|
15
|
-
|
|
16
|
-
const Table = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
children,
|
|
19
|
-
style,
|
|
20
|
-
...rest
|
|
21
|
-
} = _ref;
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
23
|
-
style: [styles.wrapper, style]
|
|
24
|
-
}), children);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const styles = _reactNative.StyleSheet.create({
|
|
28
|
-
wrapper: {
|
|
29
|
-
display: "flex",
|
|
30
|
-
flexDirection: "column"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
var _default = Table;
|
|
35
|
-
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;
|
|
@@ -1,41 +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 _theming = require("../../theming");
|
|
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 TableHeader = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
theme,
|
|
23
|
-
...rest
|
|
24
|
-
} = _ref;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
26
|
-
style: [styles.wrapper, {
|
|
27
|
-
borderBottomColor: theme.colors.medium
|
|
28
|
-
}, style]
|
|
29
|
-
}), children);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const styles = _reactNative.StyleSheet.create({
|
|
33
|
-
wrapper: {
|
|
34
|
-
display: "flex",
|
|
35
|
-
flexDirection: "row"
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
var _default = (0, _theming.withTheme)(TableHeader);
|
|
40
|
-
|
|
41
|
-
exports.default = _default;
|
|
@@ -1,17 +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 TablePaginator = () => /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Table Paginator"));
|
|
15
|
-
|
|
16
|
-
var _default = TablePaginator;
|
|
17
|
-
exports.default = _default;
|
|
@@ -1,47 +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 _theming = require("../../theming");
|
|
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 TableRow = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
theme,
|
|
23
|
-
...rest
|
|
24
|
-
} = _ref;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
26
|
-
style: [styles.container, {
|
|
27
|
-
borderBottomColor: theme.colors.light
|
|
28
|
-
}, style]
|
|
29
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
30
|
-
style: styles.content
|
|
31
|
-
}, children));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const styles = _reactNative.StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
display: "flex",
|
|
37
|
-
flexDirection: "row"
|
|
38
|
-
},
|
|
39
|
-
content: {
|
|
40
|
-
flex: 1,
|
|
41
|
-
flexDirection: "row"
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
var _default = (0, _theming.withTheme)(TableRow);
|
|
46
|
-
|
|
47
|
-
exports.default = _default;
|
|
@@ -1,60 +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 TableTitle = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
numeric = false,
|
|
23
|
-
isAscending = false,
|
|
24
|
-
numberOfLines = 1,
|
|
25
|
-
title,
|
|
26
|
-
...rest
|
|
27
|
-
} = _ref;
|
|
28
|
-
const {
|
|
29
|
-
textStyles,
|
|
30
|
-
viewStyles
|
|
31
|
-
} = (0, _utilities.extractStyles)(style);
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
33
|
-
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
34
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
35
|
-
style: [isAscending ? styles.sorted : {
|
|
36
|
-
color: "gray"
|
|
37
|
-
}, textStyles],
|
|
38
|
-
numberOfLines: numberOfLines
|
|
39
|
-
}, children, title));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const styles = _reactNative.StyleSheet.create({
|
|
43
|
-
wrapper: {
|
|
44
|
-
flex: 1,
|
|
45
|
-
display: "flex",
|
|
46
|
-
flexDirection: "row"
|
|
47
|
-
},
|
|
48
|
-
right: {
|
|
49
|
-
justifyContent: "flex-end"
|
|
50
|
-
},
|
|
51
|
-
sorted: {// marginLeft: 8,
|
|
52
|
-
},
|
|
53
|
-
icon: {
|
|
54
|
-
height: 24,
|
|
55
|
-
justifyContent: "center"
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var _default = TableTitle;
|
|
60
|
-
exports.default = _default;
|