@draftbit/core 46.10.3-93b2ea.2 → 46.10.3-a5cf6b.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/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/DeprecatedButton.js +20 -3
- package/lib/commonjs/index.js +0 -28
- package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
- package/lib/module/components/TabView/TabView.js +17 -7
- package/lib/module/index.js +0 -4
- package/lib/module/mappings/NativeBase/Layout.js +101 -0
- package/lib/typescript/src/index.d.ts +0 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/index.js +0 -4
- package/src/index.tsx +0 -4
- package/src/mappings/NativeBase/Layout.js +124 -0
- package/src/mappings/NativeBase/Layout.ts +145 -0
- package/lib/commonjs/components/Container.js +0 -93
- package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
- package/lib/commonjs/components/DeprecatedFAB.js +0 -157
- package/lib/commonjs/components/ProgressIndicator.js +0 -55
- package/lib/commonjs/components/ResizeMode.js +0 -5
- package/lib/commonjs/components/Row.js +0 -73
- package/lib/commonjs/components/RowBodyIcon.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
- package/lib/commonjs/mappings/CardBlock.js +0 -126
- package/lib/commonjs/mappings/CardContainer.js +0 -108
- package/lib/commonjs/mappings/CardContainerRating.js +0 -130
- package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
- package/lib/commonjs/mappings/CardInline.js +0 -59
- package/lib/commonjs/mappings/Container.js +0 -37
- package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
- package/lib/module/components/Container.js +0 -83
- package/lib/module/components/DeprecatedCardWrapper.js +0 -32
- package/lib/module/components/DeprecatedFAB.js +0 -147
- package/lib/module/components/ProgressIndicator.js +0 -45
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/components/Row.js +0 -63
- package/lib/module/components/RowBodyIcon.js +0 -35
- package/lib/module/components/RowHeadlineImageCaption.js +0 -35
- package/lib/module/components/RowHeadlineImageIcon.js +0 -41
- package/lib/module/mappings/CardBlock.js +0 -119
- package/lib/module/mappings/CardContainer.js +0 -101
- package/lib/module/mappings/CardContainerRating.js +0 -123
- package/lib/module/mappings/CardContainerShortImage.js +0 -117
- package/lib/module/mappings/CardInline.js +0 -52
- package/lib/module/mappings/Container.js +0 -30
- package/lib/module/mappings/ProgressIndicator.js +0 -181
- package/lib/typescript/src/components/Container.d.ts +0 -21
- package/lib/typescript/src/components/Container.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +0 -15
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
- package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
- package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
- package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
- package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
- package/lib/typescript/src/components/Row.d.ts +0 -21
- package/lib/typescript/src/components/Row.d.ts.map +0 -1
- package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
- package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardBlock.d.ts +0 -289
- package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
- package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
- package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
- package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Container.d.ts +0 -55
- package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
- package/src/components/Container.js +0 -43
- package/src/components/Container.tsx +0 -116
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedCardWrapper.tsx +0 -46
- package/src/components/DeprecatedFAB.js +0 -114
- package/src/components/DeprecatedFAB.tsx +0 -231
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/ProgressIndicator.tsx +0 -71
- package/src/components/ResizeMode.js +0 -1
- package/src/components/ResizeMode.ts +0 -7
- package/src/components/Row.js +0 -48
- package/src/components/Row.tsx +0 -108
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowBodyIcon.tsx +0 -47
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageCaption.tsx +0 -49
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/RowHeadlineImageIcon.tsx +0 -61
- package/src/mappings/CardBlock.js +0 -123
- package/src/mappings/CardBlock.ts +0 -136
- package/src/mappings/CardContainer.js +0 -104
- package/src/mappings/CardContainer.ts +0 -116
- package/src/mappings/CardContainerRating.js +0 -126
- package/src/mappings/CardContainerRating.ts +0 -137
- package/src/mappings/CardContainerShortImage.js +0 -120
- package/src/mappings/CardContainerShortImage.ts +0 -130
- package/src/mappings/CardInline.js +0 -52
- package/src/mappings/CardInline.ts +0 -61
- package/src/mappings/Container.js +0 -30
- package/src/mappings/Container.ts +0 -41
- package/src/mappings/ProgressIndicator.js +0 -181
- package/src/mappings/ProgressIndicator.ts +0 -190
package/src/index.tsx
CHANGED
|
@@ -11,7 +11,6 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
|
11
11
|
export { default as Card } from "./components/Card";
|
|
12
12
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
13
13
|
export { default as CircleImage } from "./components/CircleImage";
|
|
14
|
-
export { default as Container } from "./components/Container";
|
|
15
14
|
export { default as Divider } from "./components/Divider";
|
|
16
15
|
export { default as FAB } from "./components/FAB";
|
|
17
16
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
@@ -69,9 +68,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
69
68
|
export { default as Picker } from "./components/Picker/Picker";
|
|
70
69
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
71
70
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
72
|
-
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
73
|
-
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
74
|
-
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
75
71
|
export { default as Slider } from "./components/Slider";
|
|
76
72
|
export { default as Stepper } from "./components/Stepper";
|
|
77
73
|
export { useAuthState } from "./components/useAuthState";
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp, } from "@draftbit/types";
|
|
2
|
+
const SHARED_SEED_DATA = {
|
|
3
|
+
category: COMPONENT_TYPES.layout,
|
|
4
|
+
packageName: "native-base",
|
|
5
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
|
+
};
|
|
7
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter((item) => item !== StylesPanelSections.LayoutFlexItems &&
|
|
8
|
+
item !== StylesPanelSections.LayoutContent);
|
|
9
|
+
export const SEED_DATA = [
|
|
10
|
+
{
|
|
11
|
+
name: "Aspect Ratio",
|
|
12
|
+
tag: "AspectRatio",
|
|
13
|
+
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
14
|
+
...SHARED_SEED_DATA,
|
|
15
|
+
props: {
|
|
16
|
+
ratio: createStaticNumberProp({
|
|
17
|
+
label: "Ratio",
|
|
18
|
+
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
19
|
+
defaultValue: 1.33,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
stylesPanelSections: [
|
|
23
|
+
StylesPanelSections.Background,
|
|
24
|
+
StylesPanelSections.Size,
|
|
25
|
+
StylesPanelSections.Margins,
|
|
26
|
+
StylesPanelSections.Position,
|
|
27
|
+
StylesPanelSections.Borders,
|
|
28
|
+
StylesPanelSections.Effects,
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "Box",
|
|
33
|
+
tag: "Box",
|
|
34
|
+
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
35
|
+
...SHARED_SEED_DATA,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "Center",
|
|
39
|
+
tag: "Center",
|
|
40
|
+
description: "Center aligns its contents to the center within itself",
|
|
41
|
+
...SHARED_SEED_DATA,
|
|
42
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Circle",
|
|
46
|
+
tag: "Circle",
|
|
47
|
+
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
48
|
+
...SHARED_SEED_DATA,
|
|
49
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "Container",
|
|
53
|
+
tag: "Container",
|
|
54
|
+
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
55
|
+
props: {
|
|
56
|
+
centerContent: createStaticBoolProp({
|
|
57
|
+
label: "Center content",
|
|
58
|
+
description: "Center child elements based on their content width",
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
...SHARED_SEED_DATA,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "Column",
|
|
66
|
+
tag: "Column",
|
|
67
|
+
description: "Column aligns items vertically",
|
|
68
|
+
layout: {
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
},
|
|
71
|
+
...SHARED_SEED_DATA,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "Row",
|
|
75
|
+
tag: "Row",
|
|
76
|
+
description: "Column aligns items horizontally",
|
|
77
|
+
layout: {
|
|
78
|
+
flexDirection: "row",
|
|
79
|
+
},
|
|
80
|
+
...SHARED_SEED_DATA,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "Spacer",
|
|
84
|
+
tag: "Spacer",
|
|
85
|
+
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
86
|
+
layout: {
|
|
87
|
+
flex: 1,
|
|
88
|
+
},
|
|
89
|
+
...SHARED_SEED_DATA,
|
|
90
|
+
stylesPanelSections: [
|
|
91
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
92
|
+
StylesPanelSections.Background,
|
|
93
|
+
StylesPanelSections.Margins,
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "Stack",
|
|
98
|
+
tag: "Stack",
|
|
99
|
+
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
100
|
+
...SHARED_SEED_DATA,
|
|
101
|
+
props: {
|
|
102
|
+
isDisabled: createBoolProp({
|
|
103
|
+
label: "Disabled",
|
|
104
|
+
description: "If true, the Stack will be disabled",
|
|
105
|
+
}),
|
|
106
|
+
isInvalid: createBoolProp({
|
|
107
|
+
label: "Invalid",
|
|
108
|
+
description: "If true, the Stack will be invalid",
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "ZStack",
|
|
114
|
+
tag: "ZStack",
|
|
115
|
+
description: "ZStack aligns items to the z-axis",
|
|
116
|
+
...SHARED_SEED_DATA,
|
|
117
|
+
props: {
|
|
118
|
+
reversed: createBoolProp({
|
|
119
|
+
label: "Reversed",
|
|
120
|
+
description: "Determines whether to reverse the direction of items",
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
];
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createBoolProp,
|
|
4
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
5
|
+
createStaticNumberProp,
|
|
6
|
+
StylesPanelSections,
|
|
7
|
+
createStaticBoolProp,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
const SHARED_SEED_DATA = {
|
|
11
|
+
category: COMPONENT_TYPES.layout,
|
|
12
|
+
packageName: "native-base",
|
|
13
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX =
|
|
17
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS.filter(
|
|
18
|
+
(item) =>
|
|
19
|
+
item !== StylesPanelSections.LayoutFlexItems &&
|
|
20
|
+
item !== StylesPanelSections.LayoutContent
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export const SEED_DATA = [
|
|
24
|
+
{
|
|
25
|
+
name: "Aspect Ratio",
|
|
26
|
+
tag: "AspectRatio",
|
|
27
|
+
description:
|
|
28
|
+
"Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
29
|
+
...SHARED_SEED_DATA,
|
|
30
|
+
props: {
|
|
31
|
+
ratio: createStaticNumberProp({
|
|
32
|
+
label: "Ratio",
|
|
33
|
+
description:
|
|
34
|
+
"The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
35
|
+
defaultValue: 1.33,
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
stylesPanelSections: [
|
|
39
|
+
StylesPanelSections.Background,
|
|
40
|
+
StylesPanelSections.Size,
|
|
41
|
+
StylesPanelSections.Margins,
|
|
42
|
+
StylesPanelSections.Position,
|
|
43
|
+
StylesPanelSections.Borders,
|
|
44
|
+
StylesPanelSections.Effects,
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "Box",
|
|
49
|
+
tag: "Box",
|
|
50
|
+
description:
|
|
51
|
+
"This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
52
|
+
...SHARED_SEED_DATA,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Center",
|
|
56
|
+
tag: "Center",
|
|
57
|
+
description: "Center aligns its contents to the center within itself",
|
|
58
|
+
...SHARED_SEED_DATA,
|
|
59
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "Circle",
|
|
63
|
+
tag: "Circle",
|
|
64
|
+
description:
|
|
65
|
+
"Center aligns its contents to the center within itself with a round border radius",
|
|
66
|
+
...SHARED_SEED_DATA,
|
|
67
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "Container",
|
|
71
|
+
tag: "Container",
|
|
72
|
+
description:
|
|
73
|
+
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
74
|
+
props: {
|
|
75
|
+
centerContent: createStaticBoolProp({
|
|
76
|
+
label: "Center content",
|
|
77
|
+
description: "Center child elements based on their content width",
|
|
78
|
+
defaultValue: true,
|
|
79
|
+
}),
|
|
80
|
+
},
|
|
81
|
+
...SHARED_SEED_DATA,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "Column",
|
|
85
|
+
tag: "Column",
|
|
86
|
+
description: "Column aligns items vertically",
|
|
87
|
+
layout: {
|
|
88
|
+
flexDirection: "column",
|
|
89
|
+
},
|
|
90
|
+
...SHARED_SEED_DATA,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "Row",
|
|
94
|
+
tag: "Row",
|
|
95
|
+
description: "Column aligns items horizontally",
|
|
96
|
+
layout: {
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
},
|
|
99
|
+
...SHARED_SEED_DATA,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "Spacer",
|
|
103
|
+
tag: "Spacer",
|
|
104
|
+
description:
|
|
105
|
+
"An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
106
|
+
layout: {
|
|
107
|
+
flex: 1,
|
|
108
|
+
},
|
|
109
|
+
...SHARED_SEED_DATA,
|
|
110
|
+
stylesPanelSections: [
|
|
111
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
112
|
+
StylesPanelSections.Background,
|
|
113
|
+
StylesPanelSections.Margins,
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "Stack",
|
|
118
|
+
tag: "Stack",
|
|
119
|
+
description:
|
|
120
|
+
"Stack aligns items vertically or horizontally based on the direction prop",
|
|
121
|
+
...SHARED_SEED_DATA,
|
|
122
|
+
props: {
|
|
123
|
+
isDisabled: createBoolProp({
|
|
124
|
+
label: "Disabled",
|
|
125
|
+
description: "If true, the Stack will be disabled",
|
|
126
|
+
}),
|
|
127
|
+
isInvalid: createBoolProp({
|
|
128
|
+
label: "Invalid",
|
|
129
|
+
description: "If true, the Stack will be invalid",
|
|
130
|
+
}),
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "ZStack",
|
|
135
|
+
tag: "ZStack",
|
|
136
|
+
description: "ZStack aligns items to the z-axis",
|
|
137
|
+
...SHARED_SEED_DATA,
|
|
138
|
+
props: {
|
|
139
|
+
reversed: createBoolProp({
|
|
140
|
+
label: "Reversed",
|
|
141
|
+
description: "Determines whether to reverse the direction of items",
|
|
142
|
+
}),
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
];
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _theming = require("../theming");
|
|
10
|
-
var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
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
|
-
const Container = _ref => {
|
|
16
|
-
let {
|
|
17
|
-
useThemeGutterPadding,
|
|
18
|
-
borderColor,
|
|
19
|
-
borderWidth,
|
|
20
|
-
backgroundColor,
|
|
21
|
-
backgroundImage,
|
|
22
|
-
backgroundImageResizeMode,
|
|
23
|
-
elevation,
|
|
24
|
-
style,
|
|
25
|
-
children,
|
|
26
|
-
theme,
|
|
27
|
-
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
-
...rest
|
|
29
|
-
} = _ref;
|
|
30
|
-
const {
|
|
31
|
-
flex,
|
|
32
|
-
flexGrow,
|
|
33
|
-
flexWrap,
|
|
34
|
-
flexBasis,
|
|
35
|
-
flexShrink,
|
|
36
|
-
flexDirection,
|
|
37
|
-
alignContent,
|
|
38
|
-
justifyContent,
|
|
39
|
-
alignItems,
|
|
40
|
-
padding,
|
|
41
|
-
paddingTop,
|
|
42
|
-
paddingBottom,
|
|
43
|
-
paddingLeft,
|
|
44
|
-
paddingRight,
|
|
45
|
-
paddingVertical,
|
|
46
|
-
paddingHorizontal,
|
|
47
|
-
...styleProp
|
|
48
|
-
} = _reactNative.StyleSheet.flatten(style) || {};
|
|
49
|
-
const containerStyle = {
|
|
50
|
-
backgroundColor,
|
|
51
|
-
borderColor,
|
|
52
|
-
borderWidth,
|
|
53
|
-
width: "100%",
|
|
54
|
-
...styleProp
|
|
55
|
-
};
|
|
56
|
-
const innerStyle = {
|
|
57
|
-
flex,
|
|
58
|
-
flexGrow,
|
|
59
|
-
flexWrap,
|
|
60
|
-
flexBasis,
|
|
61
|
-
flexShrink,
|
|
62
|
-
flexDirection,
|
|
63
|
-
alignContent,
|
|
64
|
-
justifyContent,
|
|
65
|
-
alignItems,
|
|
66
|
-
padding,
|
|
67
|
-
paddingTop,
|
|
68
|
-
paddingBottom,
|
|
69
|
-
paddingLeft,
|
|
70
|
-
paddingRight,
|
|
71
|
-
paddingVertical,
|
|
72
|
-
paddingHorizontal: paddingHorizontal || useThemeGutterPadding ? 16 : 0
|
|
73
|
-
};
|
|
74
|
-
const Wrap = elevation ? _Elevation.default : _reactNative.View;
|
|
75
|
-
if (elevation) containerStyle.elevation = elevation;
|
|
76
|
-
return /*#__PURE__*/React.createElement(Wrap, _extends({
|
|
77
|
-
style: [containerStyle, style]
|
|
78
|
-
}, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
79
|
-
source: typeof backgroundImage === "string" ? {
|
|
80
|
-
uri: backgroundImage
|
|
81
|
-
} : backgroundImage,
|
|
82
|
-
resizeMode: backgroundImageResizeMode,
|
|
83
|
-
style: {
|
|
84
|
-
flex: 1
|
|
85
|
-
}
|
|
86
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
87
|
-
style: innerStyle
|
|
88
|
-
}, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
89
|
-
style: innerStyle
|
|
90
|
-
}, children));
|
|
91
|
-
};
|
|
92
|
-
var _default = (0, _theming.withTheme)(Container);
|
|
93
|
-
exports.default = _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _theming = require("../theming");
|
|
9
|
-
var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); }
|
|
12
|
-
const getWidth = numColumns => {
|
|
13
|
-
switch (numColumns) {
|
|
14
|
-
case 1:
|
|
15
|
-
return "33%";
|
|
16
|
-
case 2:
|
|
17
|
-
return "50%";
|
|
18
|
-
default:
|
|
19
|
-
return "100%";
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const Card = _ref => {
|
|
23
|
-
let {
|
|
24
|
-
numColumns = 3,
|
|
25
|
-
children,
|
|
26
|
-
onPress,
|
|
27
|
-
style,
|
|
28
|
-
...rest
|
|
29
|
-
} = _ref;
|
|
30
|
-
const width = getWidth(numColumns);
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
32
|
-
disabled: !onPress,
|
|
33
|
-
onPress: onPress,
|
|
34
|
-
style: [style, {
|
|
35
|
-
width
|
|
36
|
-
}]
|
|
37
|
-
}, rest), children);
|
|
38
|
-
};
|
|
39
|
-
var _default = (0, _theming.withTheme)(Card);
|
|
40
|
-
exports.default = _default;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _color = _interopRequireDefault(require("color"));
|
|
10
|
-
var _Config = _interopRequireDefault(require("./Config"));
|
|
11
|
-
var _Text = _interopRequireDefault(require("./Text"));
|
|
12
|
-
var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
13
|
-
var _theming = require("../theming");
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
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); }
|
|
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
|
-
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); }
|
|
18
|
-
const FAB = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
Icon,
|
|
21
|
-
icon,
|
|
22
|
-
disabled = false,
|
|
23
|
-
type = "solid",
|
|
24
|
-
loading = false,
|
|
25
|
-
color: colorOverride,
|
|
26
|
-
label,
|
|
27
|
-
onPress,
|
|
28
|
-
elevation = 0,
|
|
29
|
-
style,
|
|
30
|
-
theme: {
|
|
31
|
-
colors,
|
|
32
|
-
disabledOpacity,
|
|
33
|
-
roundness,
|
|
34
|
-
typography
|
|
35
|
-
},
|
|
36
|
-
...rest
|
|
37
|
-
} = _ref;
|
|
38
|
-
let backgroundColor, borderColor, textColor, borderWidth;
|
|
39
|
-
const buttonColor = colorOverride || colors.primary;
|
|
40
|
-
if (type === "standard" || type === "extended" || type === "fixed") {
|
|
41
|
-
backgroundColor = buttonColor;
|
|
42
|
-
if (disabled) {
|
|
43
|
-
textColor = (0, _color.default)(colors.surface).alpha(disabledOpacity).rgb().string();
|
|
44
|
-
} else {
|
|
45
|
-
textColor = colors.surface;
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
backgroundColor = "transparent";
|
|
49
|
-
if (disabled) {
|
|
50
|
-
textColor = (0, _color.default)(buttonColor).alpha(disabledOpacity).rgb().string();
|
|
51
|
-
} else {
|
|
52
|
-
textColor = buttonColor;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (type === "outline") {
|
|
56
|
-
if (disabled) {
|
|
57
|
-
borderColor = (0, _color.default)(buttonColor).alpha(disabledOpacity).rgb().string();
|
|
58
|
-
} else {
|
|
59
|
-
borderColor = buttonColor;
|
|
60
|
-
}
|
|
61
|
-
borderWidth = _reactNative.StyleSheet.hairlineWidth;
|
|
62
|
-
} else {
|
|
63
|
-
borderColor = "transparent";
|
|
64
|
-
borderWidth = 0;
|
|
65
|
-
}
|
|
66
|
-
const buttonStyle = {
|
|
67
|
-
backgroundColor,
|
|
68
|
-
borderColor,
|
|
69
|
-
borderWidth,
|
|
70
|
-
borderRadius: roundness,
|
|
71
|
-
alignItems: "center",
|
|
72
|
-
justifyContent: "center"
|
|
73
|
-
};
|
|
74
|
-
const buttonStyles = [styles.button, buttonStyle];
|
|
75
|
-
const contentStyle = [styles.content];
|
|
76
|
-
const textStyle = {
|
|
77
|
-
textAlign: "center",
|
|
78
|
-
color: textColor
|
|
79
|
-
};
|
|
80
|
-
const iconStyle = [styles.icon, {
|
|
81
|
-
width: _Config.default.buttonIconSize
|
|
82
|
-
}];
|
|
83
|
-
if (type === "standard" || type === "outline") {
|
|
84
|
-
buttonStyle.width = _Config.default.FABSize;
|
|
85
|
-
buttonStyle.height = _Config.default.FABSize;
|
|
86
|
-
buttonStyle.borderRadius = _Config.default.FABBorderRadius;
|
|
87
|
-
contentStyle.push({
|
|
88
|
-
width: _Config.default.FABSize,
|
|
89
|
-
height: _Config.default.FABSize
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
if (type === "extended" || type === "fixed") {
|
|
93
|
-
iconStyle.push({
|
|
94
|
-
marginLeft: 16,
|
|
95
|
-
marginRight: -8
|
|
96
|
-
});
|
|
97
|
-
textStyle.margin = 16;
|
|
98
|
-
}
|
|
99
|
-
if (type === "fixed") {
|
|
100
|
-
buttonStyles.push({
|
|
101
|
-
height: _Config.default.FABFixedHeight,
|
|
102
|
-
alignSelf: "stretch"
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
return /*#__PURE__*/React.createElement(_Elevation.default, {
|
|
106
|
-
style: [{
|
|
107
|
-
elevation
|
|
108
|
-
}, style]
|
|
109
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
|
|
110
|
-
onPress: onPress,
|
|
111
|
-
accessibilityState: {
|
|
112
|
-
disabled
|
|
113
|
-
},
|
|
114
|
-
accessibilityRole: "button",
|
|
115
|
-
disabled: disabled || loading,
|
|
116
|
-
style: buttonStyles
|
|
117
|
-
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
118
|
-
style: styles.content
|
|
119
|
-
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
120
|
-
style: iconStyle
|
|
121
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
122
|
-
name: icon,
|
|
123
|
-
size: _Config.default.buttonIconSize,
|
|
124
|
-
color: textColor
|
|
125
|
-
})) : null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
126
|
-
size: "small",
|
|
127
|
-
color: textColor,
|
|
128
|
-
style: iconStyle
|
|
129
|
-
}) : null, label ? /*#__PURE__*/React.createElement(_Text.default, {
|
|
130
|
-
numberOfLines: 1,
|
|
131
|
-
style: [textStyle, typography.button]
|
|
132
|
-
}, label) : null)));
|
|
133
|
-
};
|
|
134
|
-
const styles = _reactNative.StyleSheet.create({
|
|
135
|
-
button: {
|
|
136
|
-
borderStyle: "solid"
|
|
137
|
-
},
|
|
138
|
-
content: {
|
|
139
|
-
flexDirection: "row",
|
|
140
|
-
alignItems: "center",
|
|
141
|
-
justifyContent: "center"
|
|
142
|
-
},
|
|
143
|
-
icon: {
|
|
144
|
-
alignItems: "center",
|
|
145
|
-
justifyContent: "center",
|
|
146
|
-
width: _Config.default.buttonIconSize
|
|
147
|
-
},
|
|
148
|
-
fixed: {
|
|
149
|
-
left: 0,
|
|
150
|
-
right: 0,
|
|
151
|
-
bottom: 0,
|
|
152
|
-
height: 64,
|
|
153
|
-
borderRadius: 0
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
var _default = (0, _theming.withTheme)(FAB);
|
|
157
|
-
exports.default = _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _StepIndicator = _interopRequireDefault(require("./StepIndicator"));
|
|
9
|
-
var _theming = require("../theming");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); }
|
|
12
|
-
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; }
|
|
13
|
-
const ProgressIndicator = _ref => {
|
|
14
|
-
let {
|
|
15
|
-
numberOfSteps,
|
|
16
|
-
currentStep,
|
|
17
|
-
currentStepStrokeWidth = 3,
|
|
18
|
-
stepStrokeCurrentColor = "primary",
|
|
19
|
-
stepIndicatorSize,
|
|
20
|
-
currentStepIndicatorSize,
|
|
21
|
-
stepIndicatorCurrentColor,
|
|
22
|
-
stepIndicatorLabelCurrentColor,
|
|
23
|
-
stepIndicatorLabelFontSize = 12,
|
|
24
|
-
stepNumberFinishedColor = "strongInverse",
|
|
25
|
-
stepNumberUnfinishedColor = "primary",
|
|
26
|
-
unfinishedColor = "light",
|
|
27
|
-
finishedColor = "primary",
|
|
28
|
-
theme
|
|
29
|
-
} = _ref;
|
|
30
|
-
const currentPosition = currentStep - 1;
|
|
31
|
-
return /*#__PURE__*/React.createElement(_StepIndicator.default, {
|
|
32
|
-
stepCount: numberOfSteps,
|
|
33
|
-
currentPosition: currentPosition,
|
|
34
|
-
customStyles: {
|
|
35
|
-
stepIndicatorSize,
|
|
36
|
-
currentStepIndicatorSize: currentStepIndicatorSize ? currentStepIndicatorSize : stepIndicatorSize,
|
|
37
|
-
stepStrokeFinishedColor: finishedColor,
|
|
38
|
-
stepStrokeUnFinishedColor: unfinishedColor,
|
|
39
|
-
separatorFinishedColor: finishedColor,
|
|
40
|
-
separatorUnFinishedColor: unfinishedColor,
|
|
41
|
-
stepIndicatorFinishedColor: finishedColor,
|
|
42
|
-
stepIndicatorUnFinishedColor: unfinishedColor,
|
|
43
|
-
currentStepStrokeWidth,
|
|
44
|
-
stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,
|
|
45
|
-
stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,
|
|
46
|
-
stepIndicatorLabelFinishedColor: stepNumberFinishedColor,
|
|
47
|
-
stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,
|
|
48
|
-
stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,
|
|
49
|
-
stepIndicatorLabelFontSize,
|
|
50
|
-
labelFontFamily: theme.typography.body1.fontFamily
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
var _default = (0, _theming.withTheme)(ProgressIndicator);
|
|
55
|
-
exports.default = _default;
|