@draftbit/core 46.4.4-ae1fa9.2 → 46.4.4-b0ea41.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.
Files changed (38) hide show
  1. package/lib/commonjs/components/DatePicker/DatePicker.js +18 -8
  2. package/lib/commonjs/components/Text.js +6 -2
  3. package/lib/commonjs/components/TextField.js +5 -1
  4. package/lib/commonjs/mappings/DatePicker.js +13 -0
  5. package/lib/commonjs/mappings/TextField.js +1 -1
  6. package/lib/commonjs/mappings/TextInput.js +1 -1
  7. package/lib/module/components/AspectRatio.js +2 -19
  8. package/lib/module/components/DatePicker/DatePicker.js +17 -8
  9. package/lib/module/components/Divider.js +2 -20
  10. package/lib/module/components/Text.js +6 -2
  11. package/lib/module/components/TextField.js +5 -1
  12. package/lib/module/mappings/DatePicker.js +14 -1
  13. package/lib/module/mappings/TextField.js +1 -1
  14. package/lib/module/mappings/TextInput.js +1 -1
  15. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +4 -0
  16. package/lib/typescript/src/components/Text.d.ts +2 -1
  17. package/lib/typescript/src/components/TextField.d.ts +2 -1
  18. package/lib/typescript/src/mappings/DatePicker.d.ts +42 -0
  19. package/lib/typescript/src/mappings/TextField.d.ts +2 -2
  20. package/lib/typescript/src/mappings/TextInput.d.ts +1 -1
  21. package/package.json +3 -4
  22. package/src/components/DatePicker/DatePicker.js +14 -8
  23. package/src/components/DatePicker/DatePicker.tsx +23 -7
  24. package/src/components/Text.js +8 -2
  25. package/src/components/Text.tsx +6 -1
  26. package/src/components/TextField.js +6 -1
  27. package/src/components/TextField.tsx +7 -1
  28. package/src/mappings/DatePicker.js +21 -1
  29. package/src/mappings/DatePicker.ts +23 -0
  30. package/src/mappings/TextField.js +1 -1
  31. package/src/mappings/TextField.ts +1 -1
  32. package/src/mappings/TextInput.js +1 -1
  33. package/src/mappings/TextInput.ts +1 -1
  34. package/lib/commonjs/mappings/Elements.js +0 -127
  35. package/lib/module/mappings/Elements.js +0 -119
  36. package/lib/typescript/src/mappings/Elements.d.ts +0 -43
  37. package/src/mappings/Elements.js +0 -141
  38. package/src/mappings/Elements.ts +0 -150
@@ -1,43 +0,0 @@
1
- export declare const SEED_DATA: ({
2
- category: string;
3
- stylesPanelSections: string[];
4
- layout: {
5
- margin: number;
6
- };
7
- triggers: string[];
8
- name: string;
9
- tag: string;
10
- } | {
11
- props: {
12
- href: any;
13
- target: {
14
- group: string;
15
- label: string;
16
- description: string;
17
- formType: string;
18
- defaultValue: string;
19
- options: string[];
20
- };
21
- };
22
- category: string;
23
- stylesPanelSections: string[];
24
- layout: {
25
- margin: number;
26
- };
27
- triggers: string[];
28
- name: string;
29
- tag: string;
30
- } | {
31
- props: {
32
- href?: undefined;
33
- target?: undefined;
34
- };
35
- category: string;
36
- stylesPanelSections: string[];
37
- layout: {
38
- margin: number;
39
- };
40
- triggers: string[];
41
- name: string;
42
- tag: string;
43
- })[];
@@ -1,141 +0,0 @@
1
- import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES,
2
- // createBoolProp,
3
- createTextProp, FORM_TYPES, GROUPS, Triggers, } from "@draftbit/types";
4
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
5
- const ELEMENT_PROPS = {
6
- category: COMPONENT_TYPES.element,
7
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
- layout: {
9
- margin: 0,
10
- },
11
- triggers: SEED_DATA_TRIGGERS,
12
- };
13
- const HEADING_PROPS = {
14
- ...ELEMENT_PROPS,
15
- };
16
- export const SEED_DATA = [
17
- {
18
- name: "H1",
19
- tag: "H1",
20
- ...HEADING_PROPS,
21
- },
22
- {
23
- name: "H2",
24
- tag: "H2",
25
- ...HEADING_PROPS,
26
- },
27
- {
28
- name: "H3",
29
- tag: "H3",
30
- ...HEADING_PROPS,
31
- },
32
- {
33
- name: "H4",
34
- tag: "H4",
35
- ...HEADING_PROPS,
36
- },
37
- {
38
- name: "H5",
39
- tag: "H5",
40
- ...HEADING_PROPS,
41
- },
42
- {
43
- name: "H6",
44
- tag: "H6",
45
- ...HEADING_PROPS,
46
- },
47
- {
48
- name: "Anchor",
49
- tag: "A",
50
- ...ELEMENT_PROPS,
51
- props: {
52
- href: createTextProp({
53
- label: "href",
54
- description: "Specify the URL",
55
- defaultValue: "",
56
- }),
57
- target: {
58
- group: GROUPS.basic,
59
- label: "target",
60
- description: "decide where link should open",
61
- formType: FORM_TYPES.flatArray,
62
- defaultValue: "_blank",
63
- options: ["_blank", "_self", "_parent", "_top"],
64
- },
65
- },
66
- },
67
- {
68
- name: "Paragraph",
69
- tag: "P",
70
- ...ELEMENT_PROPS,
71
- props: {
72
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
73
- // strong: createBoolProp({
74
- // label: "Strong",
75
- // description: "Strong",
76
- // }),
77
- // strike: createBoolProp({
78
- // label: "Strike",
79
- // description: "Strike through",
80
- // }),
81
- // italic: createBoolProp({
82
- // label: "Italic",
83
- // description: "Italic Fonts",
84
- // }),
85
- // bold: createBoolProp({
86
- // label: "Bold",
87
- // description: "Bold",
88
- // }),
89
- },
90
- },
91
- {
92
- name: "Code",
93
- tag: "Code",
94
- ...ELEMENT_PROPS,
95
- },
96
- {
97
- name: "Pre",
98
- tag: "Pre",
99
- ...ELEMENT_PROPS,
100
- },
101
- {
102
- name: "Mark",
103
- tag: "Mark",
104
- ...ELEMENT_PROPS,
105
- },
106
- {
107
- name: "BR",
108
- tag: "BR",
109
- ...ELEMENT_PROPS,
110
- },
111
- {
112
- name: "Quote",
113
- tag: "Q",
114
- ...ELEMENT_PROPS,
115
- },
116
- {
117
- name: "BlockQuote",
118
- tag: "BlockQuote",
119
- ...ELEMENT_PROPS,
120
- },
121
- {
122
- name: "Time",
123
- tag: "Time",
124
- ...ELEMENT_PROPS,
125
- },
126
- {
127
- name: "UL",
128
- tag: "UL",
129
- ...ELEMENT_PROPS,
130
- },
131
- {
132
- name: "LI",
133
- tag: "LI",
134
- ...ELEMENT_PROPS,
135
- },
136
- {
137
- name: "HR",
138
- tag: "HR",
139
- ...ELEMENT_PROPS,
140
- },
141
- ];
@@ -1,150 +0,0 @@
1
- import {
2
- BLOCK_STYLES_SECTIONS,
3
- COMPONENT_TYPES,
4
- // createBoolProp,
5
- createTextProp,
6
- FORM_TYPES,
7
- GROUPS,
8
- Triggers,
9
- } from "@draftbit/types";
10
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
11
-
12
- const ELEMENT_PROPS = {
13
- category: COMPONENT_TYPES.element,
14
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
15
- layout: {
16
- margin: 0,
17
- },
18
- triggers: SEED_DATA_TRIGGERS,
19
- };
20
-
21
- const HEADING_PROPS = {
22
- ...ELEMENT_PROPS,
23
- };
24
-
25
- export const SEED_DATA = [
26
- {
27
- name: "H1",
28
- tag: "H1",
29
- ...HEADING_PROPS,
30
- },
31
- {
32
- name: "H2",
33
- tag: "H2",
34
- ...HEADING_PROPS,
35
- },
36
- {
37
- name: "H3",
38
- tag: "H3",
39
- ...HEADING_PROPS,
40
- },
41
- {
42
- name: "H4",
43
- tag: "H4",
44
- ...HEADING_PROPS,
45
- },
46
- {
47
- name: "H5",
48
- tag: "H5",
49
- ...HEADING_PROPS,
50
- },
51
- {
52
- name: "H6",
53
- tag: "H6",
54
- ...HEADING_PROPS,
55
- },
56
- {
57
- name: "Anchor",
58
- tag: "A",
59
- ...ELEMENT_PROPS,
60
- props: {
61
- href: createTextProp({
62
- label: "href",
63
- description: "Specify the URL",
64
- defaultValue: "",
65
- }),
66
- target: {
67
- group: GROUPS.basic,
68
- label: "target",
69
- description: "decide where link should open",
70
- formType: FORM_TYPES.flatArray,
71
- defaultValue: "_blank",
72
- options: ["_blank", "_self", "_parent", "_top"],
73
- },
74
- },
75
- },
76
- {
77
- name: "Paragraph",
78
- tag: "P",
79
- ...ELEMENT_PROPS,
80
- props: {
81
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
82
- // strong: createBoolProp({
83
- // label: "Strong",
84
- // description: "Strong",
85
- // }),
86
- // strike: createBoolProp({
87
- // label: "Strike",
88
- // description: "Strike through",
89
- // }),
90
- // italic: createBoolProp({
91
- // label: "Italic",
92
- // description: "Italic Fonts",
93
- // }),
94
- // bold: createBoolProp({
95
- // label: "Bold",
96
- // description: "Bold",
97
- // }),
98
- },
99
- },
100
- {
101
- name: "Code",
102
- tag: "Code",
103
- ...ELEMENT_PROPS,
104
- },
105
- {
106
- name: "Pre",
107
- tag: "Pre",
108
- ...ELEMENT_PROPS,
109
- },
110
- {
111
- name: "Mark",
112
- tag: "Mark",
113
- ...ELEMENT_PROPS,
114
- },
115
- {
116
- name: "BR",
117
- tag: "BR",
118
- ...ELEMENT_PROPS,
119
- },
120
- {
121
- name: "Quote",
122
- tag: "Q",
123
- ...ELEMENT_PROPS,
124
- },
125
- {
126
- name: "BlockQuote",
127
- tag: "BlockQuote",
128
- ...ELEMENT_PROPS,
129
- },
130
- {
131
- name: "Time",
132
- tag: "Time",
133
- ...ELEMENT_PROPS,
134
- },
135
- {
136
- name: "UL",
137
- tag: "UL",
138
- ...ELEMENT_PROPS,
139
- },
140
- {
141
- name: "LI",
142
- tag: "LI",
143
- ...ELEMENT_PROPS,
144
- },
145
- {
146
- name: "HR",
147
- tag: "HR",
148
- ...ELEMENT_PROPS,
149
- },
150
- ];