@draftbit/core 46.11.1-f1ce7b.2 → 46.11.1

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 (97) hide show
  1. package/lib/commonjs/components/AnimatedCircularProgress.js +2 -11
  2. package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +3 -16
  4. package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
  5. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -22
  6. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  7. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  8. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  9. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -1
  10. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js.map +1 -1
  11. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +0 -1
  12. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  13. package/lib/commonjs/components/Picker/Picker.js +13 -4
  14. package/lib/commonjs/components/Picker/Picker.js.map +1 -1
  15. package/lib/commonjs/components/Row.js.map +1 -1
  16. package/lib/commonjs/components/Shadow.js +11 -2
  17. package/lib/commonjs/components/Shadow.js.map +1 -1
  18. package/lib/commonjs/components/TabView/TabView.js +1 -1
  19. package/lib/commonjs/components/TabView/TabView.js.map +1 -1
  20. package/lib/commonjs/mappings/DeckSwiper.js +2 -2
  21. package/lib/commonjs/mappings/DeckSwiper.js.map +1 -1
  22. package/lib/commonjs/mappings/DeckSwiperCard.js +1 -2
  23. package/lib/commonjs/mappings/DeckSwiperCard.js.map +1 -1
  24. package/lib/commonjs/mappings/Layout.js +4 -4
  25. package/lib/commonjs/mappings/Layout.js.map +1 -1
  26. package/lib/commonjs/mappings/NumberInput.js.map +1 -1
  27. package/lib/commonjs/mappings/Picker.js.map +1 -1
  28. package/lib/commonjs/mappings/Shadow.js +2 -2
  29. package/lib/commonjs/mappings/Shadow.js.map +1 -1
  30. package/lib/commonjs/utilities.js +9 -1
  31. package/lib/commonjs/utilities.js.map +1 -1
  32. package/lib/module/components/DeckSwiper/DeckSwiper.js +1 -1
  33. package/lib/module/components/DeckSwiper/DeckSwiper.js.map +1 -1
  34. package/lib/module/components/DeckSwiper/DeckSwiperCard.js +0 -1
  35. package/lib/module/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  36. package/lib/module/components/FAB.js +4 -4
  37. package/lib/module/components/FAB.js.map +1 -1
  38. package/lib/module/components/Picker/Picker.js +13 -4
  39. package/lib/module/components/Picker/Picker.js.map +1 -1
  40. package/lib/module/components/RadioButton/RadioButtonRow.js +23 -5
  41. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  42. package/lib/module/components/Shadow.js +11 -2
  43. package/lib/module/components/Shadow.js.map +1 -1
  44. package/lib/module/components/TabView/TabView.js +1 -1
  45. package/lib/module/components/TabView/TabView.js.map +1 -1
  46. package/lib/module/components/Table/Table.js +6 -5
  47. package/lib/module/components/Table/Table.js.map +1 -1
  48. package/lib/module/components/YoutubePlayer/YoutubePlayerProps.js.map +1 -1
  49. package/lib/module/mappings/DeckSwiper.js +3 -3
  50. package/lib/module/mappings/DeckSwiper.js.map +1 -1
  51. package/lib/module/mappings/DeckSwiperCard.js +2 -3
  52. package/lib/module/mappings/DeckSwiperCard.js.map +1 -1
  53. package/lib/module/mappings/Layout.js +4 -4
  54. package/lib/module/mappings/Layout.js.map +1 -1
  55. package/lib/module/mappings/Shadow.js +3 -3
  56. package/lib/module/mappings/Shadow.js.map +1 -1
  57. package/lib/module/utilities.js +6 -0
  58. package/lib/module/utilities.js.map +1 -1
  59. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +1 -1
  60. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  61. package/lib/typescript/src/components/Shadow.d.ts.map +1 -1
  62. package/lib/typescript/src/mappings/DeckSwiper.d.ts +1 -1
  63. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +1 -1
  64. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts +0 -1
  65. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts.map +1 -1
  66. package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -1
  67. package/lib/typescript/src/utilities.d.ts +2 -0
  68. package/lib/typescript/src/utilities.d.ts.map +1 -1
  69. package/package.json +3 -3
  70. package/src/components/DeckSwiper/DeckSwiper.js +1 -1
  71. package/src/components/DeckSwiper/DeckSwiper.tsx +1 -1
  72. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -1
  73. package/src/components/DeckSwiper/DeckSwiperCard.tsx +0 -1
  74. package/src/components/Picker/Picker.js +16 -4
  75. package/src/components/Picker/Picker.tsx +25 -5
  76. package/src/components/Shadow.js +11 -2
  77. package/src/components/Shadow.tsx +15 -3
  78. package/src/components/TabView/TabView.js +1 -1
  79. package/src/components/TabView/TabView.tsx +1 -1
  80. package/src/mappings/DeckSwiper.js +7 -3
  81. package/src/mappings/DeckSwiper.ts +7 -3
  82. package/src/mappings/DeckSwiperCard.js +10 -3
  83. package/src/mappings/DeckSwiperCard.ts +10 -6
  84. package/src/mappings/Layout.js +4 -4
  85. package/src/mappings/Layout.ts +4 -4
  86. package/src/mappings/Shadow.js +9 -3
  87. package/src/mappings/Shadow.ts +9 -3
  88. package/src/utilities.js +9 -0
  89. package/src/utilities.ts +19 -0
  90. package/lib/commonjs/mappings/NativeBase/Layout.js +0 -97
  91. package/lib/commonjs/mappings/NativeBase/Layout.js.map +0 -1
  92. package/lib/module/mappings/NativeBase/Layout.js +0 -90
  93. package/lib/module/mappings/NativeBase/Layout.js.map +0 -1
  94. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -107
  95. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
  96. package/src/mappings/NativeBase/Layout.js +0 -111
  97. package/src/mappings/NativeBase/Layout.ts +0 -130
@@ -1,12 +1,19 @@
1
- import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Deck Swiper Card",
4
4
  tag: "DeckSwiperCard",
5
5
  description: "Single Deck Swiper Card item to be used in DeckSwiper",
6
6
  category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.LayoutFlexItems,
9
+ StylesPanelSections.LayoutContent,
10
+ StylesPanelSections.Background,
11
+ StylesPanelSections.Size,
12
+ StylesPanelSections.MarginsAndPaddings,
13
+ StylesPanelSections.Borders,
14
+ StylesPanelSections.Effects,
15
+ ],
8
16
  layout: {
9
- flex: 1,
10
17
  alignItems: "center",
11
18
  justifyContent: "center",
12
19
  padding: 20,
@@ -1,16 +1,20 @@
1
- import {
2
- COMPONENT_TYPES,
3
- CONTAINER_COMPONENT_STYLES_SECTIONS,
4
- } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, StylesPanelSections } from "@draftbit/types";
5
2
 
6
3
  export const SEED_DATA = {
7
4
  name: "Deck Swiper Card",
8
5
  tag: "DeckSwiperCard",
9
6
  description: "Single Deck Swiper Card item to be used in DeckSwiper",
10
7
  category: COMPONENT_TYPES.swiper,
11
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ stylesPanelSections: [
9
+ StylesPanelSections.LayoutFlexItems,
10
+ StylesPanelSections.LayoutContent,
11
+ StylesPanelSections.Background,
12
+ StylesPanelSections.Size,
13
+ StylesPanelSections.MarginsAndPaddings,
14
+ StylesPanelSections.Borders,
15
+ StylesPanelSections.Effects,
16
+ ],
12
17
  layout: {
13
- flex: 1,
14
18
  alignItems: "center",
15
19
  justifyContent: "center",
16
20
  padding: 20,
@@ -31,7 +31,7 @@ export const SEED_DATA = [
31
31
  {
32
32
  name: "Spacer",
33
33
  tag: "Spacer",
34
- category: COMPONENT_TYPES.deprecated,
34
+ category: COMPONENT_TYPES.layout,
35
35
  props: {
36
36
  top: {
37
37
  label: "Top",
@@ -106,7 +106,7 @@ export const SEED_DATA = [
106
106
  {
107
107
  name: "Center",
108
108
  tag: "Center",
109
- category: COMPONENT_TYPES.deprecated,
109
+ category: COMPONENT_TYPES.layout,
110
110
  stylesPanelSections: [StylesPanelSections.NoStyles],
111
111
  props: {
112
112
  width: {
@@ -144,7 +144,7 @@ export const SEED_DATA = [
144
144
  {
145
145
  name: "Circle",
146
146
  tag: "Circle",
147
- category: COMPONENT_TYPES.deprecated,
147
+ category: COMPONENT_TYPES.layout,
148
148
  stylesPanelSections: [StylesPanelSections.NoStyles],
149
149
  props: {
150
150
  size: {
@@ -172,7 +172,7 @@ export const SEED_DATA = [
172
172
  {
173
173
  name: "Square",
174
174
  tag: "Square",
175
- category: COMPONENT_TYPES.deprecated,
175
+ category: COMPONENT_TYPES.layout,
176
176
  stylesPanelSections: [StylesPanelSections.NoStyles],
177
177
  props: {
178
178
  size: {
@@ -38,7 +38,7 @@ export const SEED_DATA = [
38
38
  {
39
39
  name: "Spacer",
40
40
  tag: "Spacer",
41
- category: COMPONENT_TYPES.deprecated,
41
+ category: COMPONENT_TYPES.layout,
42
42
  props: {
43
43
  top: {
44
44
  label: "Top",
@@ -113,7 +113,7 @@ export const SEED_DATA = [
113
113
  {
114
114
  name: "Center",
115
115
  tag: "Center",
116
- category: COMPONENT_TYPES.deprecated,
116
+ category: COMPONENT_TYPES.layout,
117
117
  stylesPanelSections: [StylesPanelSections.NoStyles],
118
118
  props: {
119
119
  width: {
@@ -151,7 +151,7 @@ export const SEED_DATA = [
151
151
  {
152
152
  name: "Circle",
153
153
  tag: "Circle",
154
- category: COMPONENT_TYPES.deprecated,
154
+ category: COMPONENT_TYPES.layout,
155
155
  stylesPanelSections: [StylesPanelSections.NoStyles],
156
156
  props: {
157
157
  size: {
@@ -179,7 +179,7 @@ export const SEED_DATA = [
179
179
  {
180
180
  name: "Square",
181
181
  tag: "Square",
182
- category: COMPONENT_TYPES.deprecated,
182
+ category: COMPONENT_TYPES.layout,
183
183
  stylesPanelSections: [StylesPanelSections.NoStyles],
184
184
  props: {
185
185
  size: {
@@ -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;EACEc,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EAAE,wDAAwD;EACrE,GAAGhB,gBAAgB;EACnBK,mBAAmB,EAAEE;AACvB,CAAC,EACD;EACEO,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EACT,mF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C"}
@@ -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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AAa,EAAE;EACjB,CAAC;EACD,GAAGzB;AACL,CAAC,EACD;EACEW,IAAI,EAAE,KAAK;EACXC,GAAG,EAAE,KAAK;EACVC,WAAW,EAAE,kCAAkC;EAC/CW,MAAM,EAAE;IACNC,aAAa,EAAE;EACjB,CAAC;EACD,GAAGzB;AACL,CAAC,EACD;EACEW,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EACT,oGAAoG;EACtGW,MAAM,EAAE;IACNE,IAAI,EAAE;EACR,CAAC;EACD,GAAG1B,gBAAgB;EACnBI,mBAAmB,EAAE,CACnBL,mBAAmB,CAAC4B,kBAAkB,EACtC5B,mBAAmB,CAACmB,UAAU,EAC9BnB,mBAAmB,CAACqB,OAAO;AAE/B,CAAC,EACD;EACET,IAAI,EAAE,OAAO;EACbC,GAAG,EAAE,OAAO;EACZC,WAAW,EACT,2EAA2E;EAC7E,GAAGb,gBAAgB;EACnBc,KAAK,EAAE;IACLc,UAAU,EAAEhC,cAAc,CAAC;MACzBoB,KAAK,EAAE,UAAU;MACjBH,WAAW,EAAE;IACf,CAAC,CAAC;IACFgB,SAAS,EAAEjC,cAAc,CAAC;MACxBoB,KAAK,EAAE,SAAS;MAChBH,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC,EACD;EACEF,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EAAE,mCAAmC;EAChD,GAAGb,gBAAgB;EACnBc,KAAK,EAAE;IACLgB,QAAQ,EAAElC,cAAc,CAAC;MACvBoB,KAAK,EAAE,UAAU;MACjBH,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC,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
- ];