@draftbit/core 44.2.1 → 44.2.3-9cbaf6.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 +21 -5
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -19
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/TabView/TabView.js +103 -0
- package/lib/commonjs/components/TabView/TabView.js.map +1 -0
- package/lib/commonjs/components/TabView/TabViewItem.js +27 -0
- package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -0
- package/lib/commonjs/components/TabView/index.js +24 -0
- package/lib/commonjs/components/TabView/index.js.map +1 -0
- package/lib/commonjs/components/Typography.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheet.js.map +1 -1
- package/lib/commonjs/mappings/Carousel.js +1 -1
- package/lib/commonjs/mappings/Carousel.js.map +1 -1
- package/lib/commonjs/mappings/DatePicker.js +42 -41
- package/lib/commonjs/mappings/DatePicker.js.map +1 -1
- package/lib/commonjs/mappings/TabView.js +80 -0
- package/lib/commonjs/mappings/TabView.js.map +1 -0
- package/lib/module/components/Accordion/AccordionItem.js +5 -22
- package/lib/module/components/Carousel.js +20 -5
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/TabView/TabView.js +88 -0
- package/lib/module/components/TabView/TabView.js.map +1 -0
- package/lib/module/components/TabView/TabViewItem.js +19 -0
- package/lib/module/components/TabView/TabViewItem.js.map +1 -0
- package/lib/module/components/TabView/index.js +3 -0
- package/lib/module/components/TabView/index.js.map +1 -0
- package/lib/module/components/useAuthState.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/Carousel.js +1 -1
- package/lib/module/mappings/Carousel.js.map +1 -1
- package/lib/module/mappings/DatePicker.js +42 -41
- package/lib/module/mappings/DatePicker.js.map +1 -1
- package/lib/module/mappings/TabView.js +71 -0
- package/lib/module/mappings/TabView.js.map +1 -0
- package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
- package/lib/typescript/src/components/TabView/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/DatePicker.d.ts +0 -41
- package/lib/typescript/src/mappings/TabView.d.ts +111 -0
- package/package.json +5 -3
- package/src/components/TabView/TabView.js +33 -0
- package/src/components/TabView/TabView.tsx +97 -0
- package/src/components/TabView/TabViewItem.js +5 -0
- package/src/components/TabView/TabViewItem.tsx +21 -0
- package/src/components/TabView/index.js +2 -0
- package/src/components/TabView/index.ts +2 -0
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Carousel.js +1 -1
- package/src/mappings/Carousel.ts +1 -1
- package/src/mappings/DatePicker.js +42 -41
- package/src/mappings/DatePicker.ts +42 -42
- package/src/mappings/TabView.js +73 -0
- package/src/mappings/TabView.ts +80 -0
|
@@ -31,37 +31,38 @@ const SEED_DATA_PROPS = {
|
|
|
31
31
|
required: false,
|
|
32
32
|
group: GROUPS.basic,
|
|
33
33
|
},
|
|
34
|
-
locale: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
minuteInterval: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
timeZoneOffsetInMinutes: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
34
|
+
// locale: {
|
|
35
|
+
// label: "Locale",
|
|
36
|
+
// description: "Locale for the datepicker. Must be a valid Locale",
|
|
37
|
+
// formType: FORM_TYPES.string,
|
|
38
|
+
// propType: PROP_TYPES.STRING,
|
|
39
|
+
// defaultValue: null,
|
|
40
|
+
// editable: true,
|
|
41
|
+
// required: false,
|
|
42
|
+
// group: GROUPS.basic,
|
|
43
|
+
// },
|
|
44
|
+
// minuteInterval: {
|
|
45
|
+
// label: "Minute Interval",
|
|
46
|
+
// description: "The interval at which minutes can be selected",
|
|
47
|
+
// formType: FORM_TYPES.flatArray,
|
|
48
|
+
// propType: PROP_TYPES.NUMBER,
|
|
49
|
+
// options: [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30],
|
|
50
|
+
// defaultValue: null,
|
|
51
|
+
// editable: true,
|
|
52
|
+
// required: false,
|
|
53
|
+
// group: GROUPS.basic,
|
|
54
|
+
// },
|
|
55
|
+
// timeZoneOffsetInMinutes: {
|
|
56
|
+
// label: "Time zone offset",
|
|
57
|
+
// description:
|
|
58
|
+
// "By default, the datepicker uses the device's timezone. This will allow you to offset it",
|
|
59
|
+
// formType: FORM_TYPES.number,
|
|
60
|
+
// propType: PROP_TYPES.NUMBER,
|
|
61
|
+
// defaultValue: null,
|
|
62
|
+
// editable: true,
|
|
63
|
+
// required: false,
|
|
64
|
+
// group: GROUPS.basic,
|
|
65
|
+
// },
|
|
65
66
|
disabled: {
|
|
66
67
|
label: "Disabled",
|
|
67
68
|
description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
@@ -72,16 +73,16 @@ const SEED_DATA_PROPS = {
|
|
|
72
73
|
required: false,
|
|
73
74
|
group: GROUPS.basic,
|
|
74
75
|
},
|
|
75
|
-
error: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
76
|
+
// error: {
|
|
77
|
+
// label: "Error",
|
|
78
|
+
// description: "Whether the picker should display the error state",
|
|
79
|
+
// formType: FORM_TYPES.boolean,
|
|
80
|
+
// propType: PROP_TYPES.BOOLEAN,
|
|
81
|
+
// defaultValue: false,
|
|
82
|
+
// editable: true,
|
|
83
|
+
// required: false,
|
|
84
|
+
// group: GROUPS.data,
|
|
85
|
+
// },
|
|
85
86
|
leftIconName: {
|
|
86
87
|
label: "Left icon name",
|
|
87
88
|
description: "The icon to display on the left",
|
|
@@ -39,38 +39,38 @@ const SEED_DATA_PROPS = {
|
|
|
39
39
|
required: false,
|
|
40
40
|
group: GROUPS.basic,
|
|
41
41
|
},
|
|
42
|
-
locale: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
minuteInterval: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
timeZoneOffsetInMinutes: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
42
|
+
// locale: {
|
|
43
|
+
// label: "Locale",
|
|
44
|
+
// description: "Locale for the datepicker. Must be a valid Locale",
|
|
45
|
+
// formType: FORM_TYPES.string,
|
|
46
|
+
// propType: PROP_TYPES.STRING,
|
|
47
|
+
// defaultValue: null,
|
|
48
|
+
// editable: true,
|
|
49
|
+
// required: false,
|
|
50
|
+
// group: GROUPS.basic,
|
|
51
|
+
// },
|
|
52
|
+
// minuteInterval: {
|
|
53
|
+
// label: "Minute Interval",
|
|
54
|
+
// description: "The interval at which minutes can be selected",
|
|
55
|
+
// formType: FORM_TYPES.flatArray,
|
|
56
|
+
// propType: PROP_TYPES.NUMBER,
|
|
57
|
+
// options: [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30],
|
|
58
|
+
// defaultValue: null,
|
|
59
|
+
// editable: true,
|
|
60
|
+
// required: false,
|
|
61
|
+
// group: GROUPS.basic,
|
|
62
|
+
// },
|
|
63
|
+
// timeZoneOffsetInMinutes: {
|
|
64
|
+
// label: "Time zone offset",
|
|
65
|
+
// description:
|
|
66
|
+
// "By default, the datepicker uses the device's timezone. This will allow you to offset it",
|
|
67
|
+
// formType: FORM_TYPES.number,
|
|
68
|
+
// propType: PROP_TYPES.NUMBER,
|
|
69
|
+
// defaultValue: null,
|
|
70
|
+
// editable: true,
|
|
71
|
+
// required: false,
|
|
72
|
+
// group: GROUPS.basic,
|
|
73
|
+
// },
|
|
74
74
|
disabled: {
|
|
75
75
|
label: "Disabled",
|
|
76
76
|
description:
|
|
@@ -82,16 +82,16 @@ const SEED_DATA_PROPS = {
|
|
|
82
82
|
required: false,
|
|
83
83
|
group: GROUPS.basic,
|
|
84
84
|
},
|
|
85
|
-
error: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
85
|
+
// error: {
|
|
86
|
+
// label: "Error",
|
|
87
|
+
// description: "Whether the picker should display the error state",
|
|
88
|
+
// formType: FORM_TYPES.boolean,
|
|
89
|
+
// propType: PROP_TYPES.BOOLEAN,
|
|
90
|
+
// defaultValue: false,
|
|
91
|
+
// editable: true,
|
|
92
|
+
// required: false,
|
|
93
|
+
// group: GROUPS.data,
|
|
94
|
+
// },
|
|
95
95
|
leftIconName: {
|
|
96
96
|
label: "Left icon name",
|
|
97
97
|
description: "The icon to display on the left",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createTextProp, createTextEnumProp, createBoolProp, createColorProp, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = [
|
|
3
|
+
{
|
|
4
|
+
name: "TabView",
|
|
5
|
+
tag: "TabView",
|
|
6
|
+
category: COMPONENT_TYPES.container,
|
|
7
|
+
layout: {},
|
|
8
|
+
props: {
|
|
9
|
+
tabBarPosition: createTextEnumProp({
|
|
10
|
+
label: "Tab Bar Position",
|
|
11
|
+
description: "Tab Bar Position",
|
|
12
|
+
options: ["top", "bottom"],
|
|
13
|
+
defaultValue: "top",
|
|
14
|
+
}),
|
|
15
|
+
keyboardDismissMode: createTextEnumProp({
|
|
16
|
+
label: "Keyboard Dismiss Mode",
|
|
17
|
+
description: "Keyboard Dismiss Mode",
|
|
18
|
+
options: ["auto", "on-drag", "none"],
|
|
19
|
+
defaultValue: "auto",
|
|
20
|
+
}),
|
|
21
|
+
swipeEnabled: createBoolProp({
|
|
22
|
+
label: "Swipe Enabled",
|
|
23
|
+
description: "Swipe Enabled",
|
|
24
|
+
defaultValue: true,
|
|
25
|
+
}),
|
|
26
|
+
scrollEnabled: createBoolProp({
|
|
27
|
+
label: "Scroll Enabled",
|
|
28
|
+
description: "Scroll Enabled",
|
|
29
|
+
defaultValue: true,
|
|
30
|
+
}),
|
|
31
|
+
activeColor: createColorProp({
|
|
32
|
+
label: "Active Color",
|
|
33
|
+
description: "Active Color",
|
|
34
|
+
defaultValue: "primary",
|
|
35
|
+
}),
|
|
36
|
+
inactiveColor: createColorProp({
|
|
37
|
+
label: "Inactive Color",
|
|
38
|
+
description: "Inactive Color",
|
|
39
|
+
defaultValue: null,
|
|
40
|
+
}),
|
|
41
|
+
pressColor: createColorProp({
|
|
42
|
+
label: "Press Color",
|
|
43
|
+
description: "Press Color",
|
|
44
|
+
defaultValue: null,
|
|
45
|
+
}),
|
|
46
|
+
indicatorColor: createColorProp({
|
|
47
|
+
label: "Indicator Color",
|
|
48
|
+
description: "Indicator Color",
|
|
49
|
+
defaultValue: null,
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "TabViewItem",
|
|
55
|
+
tag: "TabViewItem",
|
|
56
|
+
category: COMPONENT_TYPES.container,
|
|
57
|
+
layout: {},
|
|
58
|
+
props: {
|
|
59
|
+
title: createTextProp({
|
|
60
|
+
label: "Title",
|
|
61
|
+
description: "Tab Title",
|
|
62
|
+
}),
|
|
63
|
+
id: createTextProp({
|
|
64
|
+
label: "Id",
|
|
65
|
+
description: "Tab Id",
|
|
66
|
+
}),
|
|
67
|
+
accessibilityLabel: createTextProp({
|
|
68
|
+
label: "Accessibility Label",
|
|
69
|
+
description: "Accessibility Label",
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
];
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createTextProp,
|
|
4
|
+
createTextEnumProp,
|
|
5
|
+
createBoolProp,
|
|
6
|
+
createColorProp,
|
|
7
|
+
} from "@draftbit/types";
|
|
8
|
+
|
|
9
|
+
export const SEED_DATA = [
|
|
10
|
+
{
|
|
11
|
+
name: "TabView",
|
|
12
|
+
tag: "TabView",
|
|
13
|
+
category: COMPONENT_TYPES.container,
|
|
14
|
+
layout: {},
|
|
15
|
+
props: {
|
|
16
|
+
tabBarPosition: createTextEnumProp({
|
|
17
|
+
label: "Tab Bar Position",
|
|
18
|
+
description: "Tab Bar Position",
|
|
19
|
+
options: ["top", "bottom"],
|
|
20
|
+
defaultValue: "top",
|
|
21
|
+
}),
|
|
22
|
+
keyboardDismissMode: createTextEnumProp({
|
|
23
|
+
label: "Keyboard Dismiss Mode",
|
|
24
|
+
description: "Keyboard Dismiss Mode",
|
|
25
|
+
options: ["auto", "on-drag", "none"],
|
|
26
|
+
defaultValue: "auto",
|
|
27
|
+
}),
|
|
28
|
+
swipeEnabled: createBoolProp({
|
|
29
|
+
label: "Swipe Enabled",
|
|
30
|
+
description: "Swipe Enabled",
|
|
31
|
+
defaultValue: true,
|
|
32
|
+
}),
|
|
33
|
+
scrollEnabled: createBoolProp({
|
|
34
|
+
label: "Scroll Enabled",
|
|
35
|
+
description: "Scroll Enabled",
|
|
36
|
+
defaultValue: true,
|
|
37
|
+
}),
|
|
38
|
+
activeColor: createColorProp({
|
|
39
|
+
label: "Active Color",
|
|
40
|
+
description: "Active Color",
|
|
41
|
+
defaultValue: "primary",
|
|
42
|
+
}),
|
|
43
|
+
inactiveColor: createColorProp({
|
|
44
|
+
label: "Inactive Color",
|
|
45
|
+
description: "Inactive Color",
|
|
46
|
+
defaultValue: null,
|
|
47
|
+
}),
|
|
48
|
+
pressColor: createColorProp({
|
|
49
|
+
label: "Press Color",
|
|
50
|
+
description: "Press Color",
|
|
51
|
+
defaultValue: null,
|
|
52
|
+
}),
|
|
53
|
+
indicatorColor: createColorProp({
|
|
54
|
+
label: "Indicator Color",
|
|
55
|
+
description: "Indicator Color",
|
|
56
|
+
defaultValue: null,
|
|
57
|
+
}),
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "TabViewItem",
|
|
62
|
+
tag: "TabViewItem",
|
|
63
|
+
category: COMPONENT_TYPES.container,
|
|
64
|
+
layout: {},
|
|
65
|
+
props: {
|
|
66
|
+
title: createTextProp({
|
|
67
|
+
label: "Title",
|
|
68
|
+
description: "Tab Title",
|
|
69
|
+
}),
|
|
70
|
+
id: createTextProp({
|
|
71
|
+
label: "Id",
|
|
72
|
+
description: "Tab Id",
|
|
73
|
+
}),
|
|
74
|
+
accessibilityLabel: createTextProp({
|
|
75
|
+
label: "Accessibility Label",
|
|
76
|
+
description: "Accessibility Label",
|
|
77
|
+
}),
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
];
|