@draftbit/core 46.11.2-03effa.2 → 46.11.2-c98415.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 (73) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +3 -16
  2. package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -22
  4. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  5. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  6. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  7. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -1
  8. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js.map +1 -1
  9. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +0 -1
  10. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  11. package/lib/commonjs/components/Shadow.js +11 -2
  12. package/lib/commonjs/components/Shadow.js.map +1 -1
  13. package/lib/commonjs/mappings/DeckSwiper.js +2 -2
  14. package/lib/commonjs/mappings/DeckSwiper.js.map +1 -1
  15. package/lib/commonjs/mappings/DeckSwiperCard.js +1 -2
  16. package/lib/commonjs/mappings/DeckSwiperCard.js.map +1 -1
  17. package/lib/commonjs/mappings/Layout.js +4 -4
  18. package/lib/commonjs/mappings/Layout.js.map +1 -1
  19. package/lib/commonjs/mappings/Picker.js.map +1 -1
  20. package/lib/commonjs/mappings/Shadow.js +2 -2
  21. package/lib/commonjs/mappings/Shadow.js.map +1 -1
  22. package/lib/commonjs/utilities.js +9 -1
  23. package/lib/commonjs/utilities.js.map +1 -1
  24. package/lib/module/components/DeckSwiper/DeckSwiper.js +1 -1
  25. package/lib/module/components/DeckSwiper/DeckSwiper.js.map +1 -1
  26. package/lib/module/components/DeckSwiper/DeckSwiperCard.js +0 -1
  27. package/lib/module/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  28. package/lib/module/components/Shadow.js +11 -2
  29. package/lib/module/components/Shadow.js.map +1 -1
  30. package/lib/module/mappings/DeckSwiper.js +3 -3
  31. package/lib/module/mappings/DeckSwiper.js.map +1 -1
  32. package/lib/module/mappings/DeckSwiperCard.js +2 -3
  33. package/lib/module/mappings/DeckSwiperCard.js.map +1 -1
  34. package/lib/module/mappings/Layout.js +4 -4
  35. package/lib/module/mappings/Layout.js.map +1 -1
  36. package/lib/module/mappings/Shadow.js +3 -3
  37. package/lib/module/mappings/Shadow.js.map +1 -1
  38. package/lib/module/utilities.js +6 -0
  39. package/lib/module/utilities.js.map +1 -1
  40. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +1 -1
  41. package/lib/typescript/src/components/Shadow.d.ts.map +1 -1
  42. package/lib/typescript/src/mappings/DeckSwiper.d.ts +1 -1
  43. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +1 -1
  44. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts +0 -1
  45. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts.map +1 -1
  46. package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -1
  47. package/lib/typescript/src/utilities.d.ts +2 -0
  48. package/lib/typescript/src/utilities.d.ts.map +1 -1
  49. package/package.json +3 -3
  50. package/src/components/DeckSwiper/DeckSwiper.js +1 -1
  51. package/src/components/DeckSwiper/DeckSwiper.tsx +1 -1
  52. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -1
  53. package/src/components/DeckSwiper/DeckSwiperCard.tsx +0 -1
  54. package/src/components/Shadow.js +11 -2
  55. package/src/components/Shadow.tsx +15 -3
  56. package/src/mappings/DeckSwiper.js +7 -3
  57. package/src/mappings/DeckSwiper.ts +7 -3
  58. package/src/mappings/DeckSwiperCard.js +10 -3
  59. package/src/mappings/DeckSwiperCard.ts +10 -6
  60. package/src/mappings/Layout.js +4 -4
  61. package/src/mappings/Layout.ts +4 -4
  62. package/src/mappings/Shadow.js +9 -3
  63. package/src/mappings/Shadow.ts +9 -3
  64. package/src/utilities.js +9 -0
  65. package/src/utilities.ts +19 -0
  66. package/lib/commonjs/mappings/NativeBase/Layout.js +0 -97
  67. package/lib/commonjs/mappings/NativeBase/Layout.js.map +0 -1
  68. package/lib/module/mappings/NativeBase/Layout.js +0 -90
  69. package/lib/module/mappings/NativeBase/Layout.js.map +0 -1
  70. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -107
  71. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
  72. package/src/mappings/NativeBase/Layout.js +0 -111
  73. package/src/mappings/NativeBase/Layout.ts +0 -130
@@ -1,10 +1,16 @@
1
- import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Shadow",
4
4
  tag: "Shadow",
5
5
  description: "A cross-platform, universal shadow.",
6
6
  category: COMPONENT_TYPES.view,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Size,
9
+ StylesPanelSections.Margins,
10
+ StylesPanelSections.Position,
11
+ StylesPanelSections.Borders,
12
+ StylesPanelSections.Effects,
13
+ ],
8
14
  props: {
9
15
  disabled: createDisabledProp({
10
16
  description: "Disables the shadow.",
@@ -26,7 +32,7 @@ export const SEED_DATA = {
26
32
  paintInside: createStaticBoolProp({
27
33
  label: "Paint Inside",
28
34
  description: "Apply the shadow below/inside the content.",
29
- defaultValue: false,
35
+ defaultValue: true,
30
36
  }),
31
37
  stretch: createStaticBoolProp({
32
38
  label: "Stretch",
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  COMPONENT_TYPES,
3
- CONTAINER_COMPONENT_STYLES_SECTIONS,
4
3
  createColorProp,
5
4
  createStaticNumberProp,
6
5
  createStaticBoolProp,
7
6
  createDisabledProp,
8
7
  GROUPS,
8
+ StylesPanelSections,
9
9
  } from "@draftbit/types";
10
10
 
11
11
  export const SEED_DATA = {
@@ -13,7 +13,13 @@ export const SEED_DATA = {
13
13
  tag: "Shadow",
14
14
  description: "A cross-platform, universal shadow.",
15
15
  category: COMPONENT_TYPES.view,
16
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
16
+ stylesPanelSections: [
17
+ StylesPanelSections.Size,
18
+ StylesPanelSections.Margins,
19
+ StylesPanelSections.Position,
20
+ StylesPanelSections.Borders,
21
+ StylesPanelSections.Effects,
22
+ ],
17
23
  props: {
18
24
  disabled: createDisabledProp({
19
25
  description: "Disables the shadow.",
@@ -35,7 +41,7 @@ export const SEED_DATA = {
35
41
  paintInside: createStaticBoolProp({
36
42
  label: "Paint Inside",
37
43
  description: "Apply the shadow below/inside the content.",
38
- defaultValue: false,
44
+ defaultValue: true,
39
45
  }),
40
46
  stretch: createStaticBoolProp({
41
47
  label: "Stretch",
package/src/utilities.js CHANGED
@@ -65,6 +65,15 @@ export function extractBorderAndMarginStyles(style, additionalBorderStyles, addi
65
65
  ]), identity);
66
66
  return { borderStyles, marginStyles };
67
67
  }
68
+ export const sizeStyleNames = ["width", "height"];
69
+ export function extractSizeStyles(style, additionalSizeStyles) {
70
+ const flatStyle = StyleSheet.flatten(style || {});
71
+ const sizeStyles = pickBy(pick(flatStyle, [
72
+ ...sizeStyleNames,
73
+ ...(additionalSizeStyles ? additionalSizeStyles : []),
74
+ ]), identity);
75
+ return sizeStyles;
76
+ }
68
77
  /**
69
78
  * Merges a style object on top of another style object. In React Native,
70
79
  * keys with undefined values in a style object will still override styles
package/src/utilities.ts CHANGED
@@ -98,6 +98,25 @@ export function extractBorderAndMarginStyles(
98
98
  return { borderStyles, marginStyles };
99
99
  }
100
100
 
101
+ export const sizeStyleNames = ["width", "height"];
102
+
103
+ export function extractSizeStyles(
104
+ style: StyleProp<any>,
105
+ additionalSizeStyles?: string[]
106
+ ) {
107
+ const flatStyle = StyleSheet.flatten(style || {});
108
+
109
+ const sizeStyles = pickBy(
110
+ pick(flatStyle, [
111
+ ...sizeStyleNames,
112
+ ...(additionalSizeStyles ? additionalSizeStyles : []),
113
+ ]),
114
+ identity
115
+ );
116
+
117
+ return sizeStyles;
118
+ }
119
+
101
120
  /**
102
121
  * Merges a style object on top of another style object. In React Native,
103
122
  * keys with undefined values in a style object will still override styles
@@ -1,97 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- const SHARED_SEED_DATA = {
9
- category: _types.COMPONENT_TYPES.testing /*.layout*/,
10
- packageName: "native-base",
11
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS
12
- };
13
- const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = _types.CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== _types.StylesPanelSections.LayoutFlexItems && item !== _types.StylesPanelSections.LayoutContent);
14
- const SEED_DATA = [{
15
- name: "Aspect Ratio",
16
- tag: "AspectRatio",
17
- description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
18
- ...SHARED_SEED_DATA,
19
- props: {
20
- ratio: (0, _types.createStaticNumberProp)({
21
- label: "Ratio",
22
- description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
23
- defaultValue: 1.33
24
- })
25
- },
26
- stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects]
27
- }, {
28
- name: "Box",
29
- tag: "Box",
30
- description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
31
- ...SHARED_SEED_DATA
32
- }, {
33
- name: "Center",
34
- tag: "Center",
35
- description: "Center aligns its contents to the center within itself",
36
- ...SHARED_SEED_DATA,
37
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
38
- }, {
39
- name: "Circle",
40
- tag: "Circle",
41
- description: "Center aligns its contents to the center within itself with a round border radius",
42
- ...SHARED_SEED_DATA,
43
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
44
- }, {
45
- name: "Column",
46
- tag: "Column",
47
- description: "Column aligns items vertically",
48
- layout: {
49
- flexDirection: "column"
50
- },
51
- ...SHARED_SEED_DATA
52
- }, {
53
- name: "Row",
54
- tag: "Row",
55
- description: "Column aligns items horizontally",
56
- layout: {
57
- flexDirection: "row"
58
- },
59
- ...SHARED_SEED_DATA
60
- }, {
61
- name: "Spacer",
62
- tag: "Spacer",
63
- description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
64
- layout: {
65
- flex: 1
66
- },
67
- ...SHARED_SEED_DATA,
68
- stylesPanelSections: [_types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Margins]
69
- }, {
70
- name: "Stack",
71
- tag: "Stack",
72
- description: "Stack aligns items vertically or horizontally based on the direction prop",
73
- ...SHARED_SEED_DATA,
74
- props: {
75
- isDisabled: (0, _types.createBoolProp)({
76
- label: "Disabled",
77
- description: "If true, the Stack will be disabled"
78
- }),
79
- isInvalid: (0, _types.createBoolProp)({
80
- label: "Invalid",
81
- description: "If true, the Stack will be invalid"
82
- })
83
- }
84
- }, {
85
- name: "ZStack",
86
- tag: "ZStack",
87
- description: "ZStack aligns items to the z-axis",
88
- ...SHARED_SEED_DATA,
89
- props: {
90
- reversed: (0, _types.createBoolProp)({
91
- label: "Reversed",
92
- description: "Determines whether to reverse the direction of items"
93
- })
94
- }
95
- }];
96
- exports.SEED_DATA = SEED_DATA;
97
- //# sourceMappingURL=Layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SHARED_SEED_DATA","category","COMPONENT_TYPES","testing","packageName","stylesPanelSections","CONTAINER_COMPONENT_STYLES_SECTIONS","CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX","filter","item","StylesPanelSections","LayoutFlexItems","LayoutContent","SEED_DATA","name","tag","description","props","ratio","createStaticNumberProp","label","defaultValue","Background","Size","Margins","Position","Borders","Effects","layout","flexDirection","flex","LayoutSelectedItem","isDisabled","createBoolProp","isInvalid","reversed"],"sourceRoot":"../../../../src","sources":["mappings/NativeBase/Layout.ts"],"mappings":";;;;;;AAAA;AAQA,MAAMA,gBAAgB,GAAG;EACvBC,QAAQ,EAAEC,sBAAe,CAACC,OAAO,CAAC;EAClCC,WAAW,EAAE,aAAa;EAC1BC,mBAAmB,EAAEC;AACvB,CAAC;AAED,MAAMC,uCAAuC,GAC3CD,0CAAmC,CAACE,MAAM,CACvCC,IAAI,IACHA,IAAI,KAAKC,0BAAmB,CAACC,eAAe,IAC5CF,IAAI,KAAKC,0BAAmB,CAACE,aAAa,CAC7C;AAEI,MAAMC,SAAS,GAAG,CACvB;EACEC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,aAAa;EAClBC,WAAW,EACT,iGAAiG;EACnG,GAAGhB,gBAAgB;EACnBiB,KAAK,EAAE;IACLC,KAAK,EAAE,IAAAC,6BAAsB,EAAC;MAC5BC,KAAK,EAAE,OAAO;MACdJ,WAAW,EACT,uEAAuE;MACzEK,YAAY,EAAE;IAChB,CAAC;EACH,CAAC;EACDhB,mBAAmB,EAAE,CACnBK,0BAAmB,CAACY,UAAU,EAC9BZ,0BAAmB,CAACa,IAAI,EACxBb,0BAAmB,CAACc,OAAO,EAC3Bd,0BAAmB,CAACe,QAAQ,EAC5Bf,0BAAmB,CAACgB,OAAO,EAC3BhB,0BAAmB,CAACiB,OAAO;AAE/B,CAAC,EACD;EACEb,IAAI,EAAE,KAAK;EACXC,GAAG,EAAE,KAAK;EACVC,WAAW,EACT,wFAAwF;EAC1F,GAAGhB;AACL,CAAC,EACD;EACE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,EAAE,QAAQ;EACbC,WAAW,EAAE,mCAAmC;EAChD,GAAGhB,gBAAgB;EACnBiB,KAAK,EAAE;IACLkB,QAAQ,EAAE,IAAAF,qBAAc,EAAC;MACvBb,KAAK,EAAE,UAAU;MACjBJ,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC,CACF;AAAC"}
@@ -1,90 +0,0 @@
1
- import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
2
- const SHARED_SEED_DATA = {
3
- category: COMPONENT_TYPES.testing /*.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 && item !== StylesPanelSections.LayoutContent);
8
- export const SEED_DATA = [{
9
- name: "Aspect Ratio",
10
- tag: "AspectRatio",
11
- description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
12
- ...SHARED_SEED_DATA,
13
- props: {
14
- ratio: createStaticNumberProp({
15
- label: "Ratio",
16
- description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
17
- defaultValue: 1.33
18
- })
19
- },
20
- stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects]
21
- }, {
22
- name: "Box",
23
- tag: "Box",
24
- description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
25
- ...SHARED_SEED_DATA
26
- }, {
27
- name: "Center",
28
- tag: "Center",
29
- description: "Center aligns its contents to the center within itself",
30
- ...SHARED_SEED_DATA,
31
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
32
- }, {
33
- name: "Circle",
34
- tag: "Circle",
35
- description: "Center aligns its contents to the center within itself with a round border radius",
36
- ...SHARED_SEED_DATA,
37
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
38
- }, {
39
- name: "Column",
40
- tag: "Column",
41
- description: "Column aligns items vertically",
42
- layout: {
43
- flexDirection: "column"
44
- },
45
- ...SHARED_SEED_DATA
46
- }, {
47
- name: "Row",
48
- tag: "Row",
49
- description: "Column aligns items horizontally",
50
- layout: {
51
- flexDirection: "row"
52
- },
53
- ...SHARED_SEED_DATA
54
- }, {
55
- name: "Spacer",
56
- tag: "Spacer",
57
- description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
58
- layout: {
59
- flex: 1
60
- },
61
- ...SHARED_SEED_DATA,
62
- stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
63
- }, {
64
- name: "Stack",
65
- tag: "Stack",
66
- description: "Stack aligns items vertically or horizontally based on the direction prop",
67
- ...SHARED_SEED_DATA,
68
- props: {
69
- isDisabled: createBoolProp({
70
- label: "Disabled",
71
- description: "If true, the Stack will be disabled"
72
- }),
73
- isInvalid: createBoolProp({
74
- label: "Invalid",
75
- description: "If true, the Stack will be invalid"
76
- })
77
- }
78
- }, {
79
- name: "ZStack",
80
- tag: "ZStack",
81
- description: "ZStack aligns items to the z-axis",
82
- ...SHARED_SEED_DATA,
83
- props: {
84
- reversed: createBoolProp({
85
- label: "Reversed",
86
- description: "Determines whether to reverse the direction of items"
87
- })
88
- }
89
- }];
90
- //# sourceMappingURL=Layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["COMPONENT_TYPES","createBoolProp","CONTAINER_COMPONENT_STYLES_SECTIONS","createStaticNumberProp","StylesPanelSections","SHARED_SEED_DATA","category","testing","packageName","stylesPanelSections","CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX","filter","item","LayoutFlexItems","LayoutContent","SEED_DATA","name","tag","description","props","ratio","label","defaultValue","Background","Size","Margins","Position","Borders","Effects","layout","flexDirection","flex","LayoutSelectedItem","isDisabled","isInvalid","reversed"],"sourceRoot":"../../../../src","sources":["mappings/NativeBase/Layout.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,cAAc,EACdC,mCAAmC,EACnCC,sBAAsB,EACtBC,mBAAmB,QACd,iBAAiB;AAExB,MAAMC,gBAAgB,GAAG;EACvBC,QAAQ,EAAEN,eAAe,CAACO,OAAO,CAAC;EAClCC,WAAW,EAAE,aAAa;EAC1BC,mBAAmB,EAAEP;AACvB,CAAC;AAED,MAAMQ,uCAAuC,GAC3CR,mCAAmC,CAACS,MAAM,CACvCC,IAAI,IACHA,IAAI,KAAKR,mBAAmB,CAACS,eAAe,IAC5CD,IAAI,KAAKR,mBAAmB,CAACU,aAAa,CAC7C;AAEH,OAAO,MAAMC,SAAS,GAAG,CACvB;EACEC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,aAAa;EAClBC,WAAW,EACT,iGAAiG;EACnG,GAAGb,gBAAgB;EACnBc,KAAK,EAAE;IACLC,KAAK,EAAEjB,sBAAsB,CAAC;MAC5BkB,KAAK,EAAE,OAAO;MACdH,WAAW,EACT,uEAAuE;MACzEI,YAAY,EAAE;IAChB,CAAC;EACH,CAAC;EACDb,mBAAmB,EAAE,CACnBL,mBAAmB,CAACmB,UAAU,EAC9BnB,mBAAmB,CAACoB,IAAI,EACxBpB,mBAAmB,CAACqB,OAAO,EAC3BrB,mBAAmB,CAACsB,QAAQ,EAC5BtB,mBAAmB,CAACuB,OAAO,EAC3BvB,mBAAmB,CAACwB,OAAO;AAE/B,CAAC,EACD;EACEZ,IAAI,EAAE,KAAK;EACXC,GAAG,EAAE,KAAK;EACVC,WAAW,EACT,wFAAwF;EAC1F,GAAGb;AACL,CAAC,EACD;EACEW,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EAAE,wDAAwD;EACrE,GAAGb,gBAAgB;EACnBI,mBAAmB,EAAEC;AACvB,CAAC,EACD;EACEM,IAAI,EAAE,QAAQ;EACdC,GAAG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C,CACF"}
@@ -1,107 +0,0 @@
1
- export declare const SEED_DATA: ({
2
- props: {
3
- ratio: {
4
- label: string;
5
- description: string;
6
- formType: string;
7
- propType: string;
8
- group: string;
9
- defaultValue: null;
10
- editable: boolean;
11
- required: boolean;
12
- step: number;
13
- };
14
- isDisabled?: undefined;
15
- isInvalid?: undefined;
16
- reversed?: undefined;
17
- };
18
- stylesPanelSections: string[];
19
- category: string;
20
- packageName: string;
21
- name: string;
22
- tag: string;
23
- description: string;
24
- } | {
25
- category: string;
26
- packageName: string;
27
- stylesPanelSections: string[];
28
- name: string;
29
- tag: string;
30
- description: string;
31
- } | {
32
- category: string;
33
- packageName: string;
34
- stylesPanelSections: string[];
35
- name: string;
36
- tag: string;
37
- description: string;
38
- layout: {
39
- flexDirection: string;
40
- flex?: undefined;
41
- };
42
- } | {
43
- stylesPanelSections: string[];
44
- category: string;
45
- packageName: string;
46
- name: string;
47
- tag: string;
48
- description: string;
49
- layout: {
50
- flex: number;
51
- flexDirection?: undefined;
52
- };
53
- } | {
54
- props: {
55
- isDisabled: {
56
- label: string;
57
- description: string;
58
- formType: string;
59
- propType: string;
60
- defaultValue: boolean;
61
- editable: boolean;
62
- required: boolean;
63
- group: string;
64
- };
65
- isInvalid: {
66
- label: string;
67
- description: string;
68
- formType: string;
69
- propType: string;
70
- defaultValue: boolean;
71
- editable: boolean;
72
- required: boolean;
73
- group: string;
74
- };
75
- ratio?: undefined;
76
- reversed?: undefined;
77
- };
78
- category: string;
79
- packageName: string;
80
- stylesPanelSections: string[];
81
- name: string;
82
- tag: string;
83
- description: string;
84
- } | {
85
- props: {
86
- reversed: {
87
- label: string;
88
- description: string;
89
- formType: string;
90
- propType: string;
91
- defaultValue: boolean;
92
- editable: boolean;
93
- required: boolean;
94
- group: string;
95
- };
96
- ratio?: undefined;
97
- isDisabled?: undefined;
98
- isInvalid?: undefined;
99
- };
100
- category: string;
101
- packageName: string;
102
- stylesPanelSections: string[];
103
- name: string;
104
- tag: string;
105
- description: string;
106
- })[];
107
- //# sourceMappingURL=Layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4GrB,CAAC"}
@@ -1,111 +0,0 @@
1
- import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
2
- const SHARED_SEED_DATA = {
3
- category: COMPONENT_TYPES.testing /*.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: "Column",
53
- tag: "Column",
54
- description: "Column aligns items vertically",
55
- layout: {
56
- flexDirection: "column",
57
- },
58
- ...SHARED_SEED_DATA,
59
- },
60
- {
61
- name: "Row",
62
- tag: "Row",
63
- description: "Column aligns items horizontally",
64
- layout: {
65
- flexDirection: "row",
66
- },
67
- ...SHARED_SEED_DATA,
68
- },
69
- {
70
- name: "Spacer",
71
- tag: "Spacer",
72
- description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
73
- layout: {
74
- flex: 1,
75
- },
76
- ...SHARED_SEED_DATA,
77
- stylesPanelSections: [
78
- StylesPanelSections.LayoutSelectedItem,
79
- StylesPanelSections.Background,
80
- StylesPanelSections.Margins,
81
- ],
82
- },
83
- {
84
- name: "Stack",
85
- tag: "Stack",
86
- description: "Stack aligns items vertically or horizontally based on the direction prop",
87
- ...SHARED_SEED_DATA,
88
- props: {
89
- isDisabled: createBoolProp({
90
- label: "Disabled",
91
- description: "If true, the Stack will be disabled",
92
- }),
93
- isInvalid: createBoolProp({
94
- label: "Invalid",
95
- description: "If true, the Stack will be invalid",
96
- }),
97
- },
98
- },
99
- {
100
- name: "ZStack",
101
- tag: "ZStack",
102
- description: "ZStack aligns items to the z-axis",
103
- ...SHARED_SEED_DATA,
104
- props: {
105
- reversed: createBoolProp({
106
- label: "Reversed",
107
- description: "Determines whether to reverse the direction of items",
108
- }),
109
- },
110
- },
111
- ];
@@ -1,130 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createBoolProp,
4
- CONTAINER_COMPONENT_STYLES_SECTIONS,
5
- createStaticNumberProp,
6
- StylesPanelSections,
7
- } from "@draftbit/types";
8
-
9
- const SHARED_SEED_DATA = {
10
- category: COMPONENT_TYPES.testing /*.layout*/,
11
- packageName: "native-base",
12
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
13
- };
14
-
15
- const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX =
16
- CONTAINER_COMPONENT_STYLES_SECTIONS.filter(
17
- (item) =>
18
- item !== StylesPanelSections.LayoutFlexItems &&
19
- item !== StylesPanelSections.LayoutContent
20
- );
21
-
22
- export const SEED_DATA = [
23
- {
24
- name: "Aspect Ratio",
25
- tag: "AspectRatio",
26
- description:
27
- "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
28
- ...SHARED_SEED_DATA,
29
- props: {
30
- ratio: createStaticNumberProp({
31
- label: "Ratio",
32
- description:
33
- "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
34
- defaultValue: 1.33,
35
- }),
36
- },
37
- stylesPanelSections: [
38
- StylesPanelSections.Background,
39
- StylesPanelSections.Size,
40
- StylesPanelSections.Margins,
41
- StylesPanelSections.Position,
42
- StylesPanelSections.Borders,
43
- StylesPanelSections.Effects,
44
- ],
45
- },
46
- {
47
- name: "Box",
48
- tag: "Box",
49
- description:
50
- "This is a generic component for low level layout needs. It is similar to a div in HTML",
51
- ...SHARED_SEED_DATA,
52
- },
53
- {
54
- name: "Center",
55
- tag: "Center",
56
- description: "Center aligns its contents to the center within itself",
57
- ...SHARED_SEED_DATA,
58
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
59
- },
60
- {
61
- name: "Circle",
62
- tag: "Circle",
63
- description:
64
- "Center aligns its contents to the center within itself with a round border radius",
65
- ...SHARED_SEED_DATA,
66
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
67
- },
68
- {
69
- name: "Column",
70
- tag: "Column",
71
- description: "Column aligns items vertically",
72
- layout: {
73
- flexDirection: "column",
74
- },
75
- ...SHARED_SEED_DATA,
76
- },
77
- {
78
- name: "Row",
79
- tag: "Row",
80
- description: "Column aligns items horizontally",
81
- layout: {
82
- flexDirection: "row",
83
- },
84
- ...SHARED_SEED_DATA,
85
- },
86
- {
87
- name: "Spacer",
88
- tag: "Spacer",
89
- description:
90
- "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
91
- layout: {
92
- flex: 1,
93
- },
94
- ...SHARED_SEED_DATA,
95
- stylesPanelSections: [
96
- StylesPanelSections.LayoutSelectedItem,
97
- StylesPanelSections.Background,
98
- StylesPanelSections.Margins,
99
- ],
100
- },
101
- {
102
- name: "Stack",
103
- tag: "Stack",
104
- description:
105
- "Stack aligns items vertically or horizontally based on the direction prop",
106
- ...SHARED_SEED_DATA,
107
- props: {
108
- isDisabled: createBoolProp({
109
- label: "Disabled",
110
- description: "If true, the Stack will be disabled",
111
- }),
112
- isInvalid: createBoolProp({
113
- label: "Invalid",
114
- description: "If true, the Stack will be invalid",
115
- }),
116
- },
117
- },
118
- {
119
- name: "ZStack",
120
- tag: "ZStack",
121
- description: "ZStack aligns items to the z-axis",
122
- ...SHARED_SEED_DATA,
123
- props: {
124
- reversed: createBoolProp({
125
- label: "Reversed",
126
- description: "Determines whether to reverse the direction of items",
127
- }),
128
- },
129
- },
130
- ];