@draftbit/core 43.2.3-ab8de6.0 → 43.2.3-bd5c77.0

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 (115) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +5 -21
  2. package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
  3. package/lib/commonjs/components/ActionSheet/ActionSheet.js.map +1 -1
  4. package/lib/commonjs/components/DeprecatedButton.js +4 -19
  5. package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
  6. package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
  7. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  8. package/lib/commonjs/components/DeprecatedFAB.js +4 -20
  9. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  10. package/lib/commonjs/components/Picker/PickerComponent.android.js +6 -20
  11. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
  12. package/lib/commonjs/components/ProgressCircle.js.map +1 -1
  13. package/lib/commonjs/components/TabView/TabView.js +103 -0
  14. package/lib/commonjs/components/TabView/TabView.js.map +1 -0
  15. package/lib/commonjs/components/TabView/TabViewItem.js +27 -0
  16. package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -0
  17. package/lib/commonjs/components/TabView/index.js +24 -0
  18. package/lib/commonjs/components/TabView/index.js.map +1 -0
  19. package/lib/commonjs/index.js +6 -30
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/mappings/Card.js +1 -3
  22. package/lib/commonjs/mappings/Card.js.map +1 -1
  23. package/lib/commonjs/mappings/ImageBackground.js.map +1 -1
  24. package/lib/commonjs/mappings/Layout.js.map +1 -1
  25. package/lib/commonjs/mappings/TabView.js +80 -0
  26. package/lib/commonjs/mappings/TabView.js.map +1 -0
  27. package/lib/commonjs/utilities.js +2 -8
  28. package/lib/commonjs/utilities.js.map +1 -1
  29. package/lib/module/components/ProgressIndicator.js.map +1 -1
  30. package/lib/module/components/TabView/TabView.js +88 -0
  31. package/lib/module/components/TabView/TabView.js.map +1 -0
  32. package/lib/module/components/TabView/TabViewItem.js +19 -0
  33. package/lib/module/components/TabView/TabViewItem.js.map +1 -0
  34. package/lib/module/components/TabView/index.js +3 -0
  35. package/lib/module/components/TabView/index.js.map +1 -0
  36. package/lib/module/index.js +1 -1
  37. package/lib/module/index.js.map +1 -1
  38. package/lib/module/mappings/ActionSheetCancel.js.map +1 -1
  39. package/lib/module/mappings/TabView.js +71 -0
  40. package/lib/module/mappings/TabView.js.map +1 -0
  41. package/lib/module/utilities.js +2 -4
  42. package/lib/module/utilities.js.map +1 -1
  43. package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
  44. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
  45. package/lib/typescript/src/components/TabView/index.d.ts +2 -0
  46. package/lib/typescript/src/index.d.ts +1 -1
  47. package/lib/typescript/src/mappings/TabView.d.ts +111 -0
  48. package/lib/typescript/src/utilities.d.ts +3 -4
  49. package/package.json +4 -2
  50. package/src/components/TabView/TabView.js +33 -0
  51. package/src/components/TabView/TabView.tsx +97 -0
  52. package/src/components/TabView/TabViewItem.js +5 -0
  53. package/src/components/TabView/TabViewItem.tsx +21 -0
  54. package/src/components/TabView/index.js +2 -0
  55. package/src/components/TabView/index.ts +2 -0
  56. package/src/index.js +1 -1
  57. package/src/index.tsx +1 -9
  58. package/src/mappings/TabView.js +73 -0
  59. package/src/mappings/TabView.ts +80 -0
  60. package/src/utilities.js +1 -6
  61. package/src/utilities.ts +1 -6
  62. package/lib/commonjs/components/Table/index.js +0 -56
  63. package/lib/commonjs/components/Table/index.js.map +0 -1
  64. package/lib/commonjs/components/Table/table.js +0 -36
  65. package/lib/commonjs/components/Table/table.js.map +0 -1
  66. package/lib/commonjs/components/Table/tableCell.js +0 -44
  67. package/lib/commonjs/components/Table/tableCell.js.map +0 -1
  68. package/lib/commonjs/components/Table/tableHeader.js +0 -56
  69. package/lib/commonjs/components/Table/tableHeader.js.map +0 -1
  70. package/lib/commonjs/components/Table/tablePaginator.js +0 -18
  71. package/lib/commonjs/components/Table/tablePaginator.js.map +0 -1
  72. package/lib/commonjs/components/Table/tableRow.js +0 -48
  73. package/lib/commonjs/components/Table/tableRow.js.map +0 -1
  74. package/lib/commonjs/components/Table/tableTitle.js +0 -61
  75. package/lib/commonjs/components/Table/tableTitle.js.map +0 -1
  76. package/lib/commonjs/mappings/Table.js +0 -99
  77. package/lib/commonjs/mappings/Table.js.map +0 -1
  78. package/lib/module/components/Table/index.js +0 -7
  79. package/lib/module/components/Table/index.js.map +0 -1
  80. package/lib/module/components/Table/table.js +0 -24
  81. package/lib/module/components/Table/table.js.map +0 -1
  82. package/lib/module/components/Table/tableCell.js +0 -32
  83. package/lib/module/components/Table/tableCell.js.map +0 -1
  84. package/lib/module/components/Table/tableHeader.js +0 -28
  85. package/lib/module/components/Table/tableHeader.js.map +0 -1
  86. package/lib/module/components/Table/tablePaginator.js +0 -7
  87. package/lib/module/components/Table/tablePaginator.js.map +0 -1
  88. package/lib/module/components/Table/tableRow.js +0 -34
  89. package/lib/module/components/Table/tableRow.js.map +0 -1
  90. package/lib/module/components/Table/tableTitle.js +0 -48
  91. package/lib/module/components/Table/tableTitle.js.map +0 -1
  92. package/lib/module/mappings/Table.js +0 -90
  93. package/lib/module/mappings/Table.js.map +0 -1
  94. package/lib/typescript/src/components/Table/index.d.ts +0 -6
  95. package/lib/typescript/src/components/Table/table.d.ts +0 -8
  96. package/lib/typescript/src/components/Table/tableCell.d.ts +0 -10
  97. package/lib/typescript/src/components/Table/tableHeader.d.ts +0 -12
  98. package/lib/typescript/src/components/Table/tablePaginator.d.ts +0 -3
  99. package/lib/typescript/src/components/Table/tableRow.d.ts +0 -12
  100. package/lib/typescript/src/components/Table/tableTitle.d.ts +0 -12
  101. package/src/components/Table/index.js +0 -6
  102. package/src/components/Table/index.tsx +0 -6
  103. package/src/components/Table/table.js +0 -10
  104. package/src/components/Table/table.tsx +0 -22
  105. package/src/components/Table/tableCell.js +0 -17
  106. package/src/components/Table/tableCell.tsx +0 -37
  107. package/src/components/Table/tableHeader.js +0 -11
  108. package/src/components/Table/tableHeader.tsx +0 -28
  109. package/src/components/Table/tablePaginator.js +0 -5
  110. package/src/components/Table/tablePaginator.tsx +0 -10
  111. package/src/components/Table/tableRow.js +0 -16
  112. package/src/components/Table/tableRow.tsx +0 -31
  113. package/src/components/Table/tableTitle.js +0 -28
  114. package/src/components/Table/tableTitle.tsx +0 -59
  115. package/src/mappings/Table.js +0 -102
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TabView.tsx"],"names":["TabViewComponent","Icon","tabBarPosition","keyboardDismissMode","swipeEnabled","scrollEnabled","activeColor","inactiveColor","pressColor","indicatorColor","style","children","index","setIndex","React","useState","routes","setRoutes","tabScenes","setTabScenes","useEffect","newRoutes","scenes","Children","toArray","filter","child","type","TabViewItem","forEach","props","id","push","key","indexChangeHandler","i","renderTabBar","console","log","backgroundColor","route","color","icon"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;;;;;;;;;AAmBA,MAAMA,gBAAgB,GAAG,QAYL;AAAA,MAZM;AACxBC,IAAAA,IADwB;AAExBC,IAAAA,cAFwB;AAGxBC,IAAAA,mBAHwB;AAIxBC,IAAAA,YAJwB;AAKxBC,IAAAA,aALwB;AAMxBC,IAAAA,WANwB;AAOxBC,IAAAA,aAPwB;AAQxBC,IAAAA,UARwB;AASxBC,IAAAA,cATwB;AAUxBC,IAAAA,KAVwB;AAWxBC,IAAAA;AAXwB,GAYN;AAClB,QAAM,CAACC,KAAD,EAAQC,QAAR,IAAoBC,KAAK,CAACC,QAAN,CAAe,CAAf,CAA1B;AACA,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsBH,KAAK,CAACC,QAAN,CAAe,EAAf,CAA5B;AACA,QAAM,CAACG,SAAD,EAAYC,YAAZ,IAA4BL,KAAK,CAACC,QAAN,CAAe,EAAf,CAAlC;AAEAD,EAAAA,K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YAAC;AAAE+B,UAAAA,KAAF;AAASC,UAAAA;AAAT,SAAD;AAAA,eACVD,KAAK,SAAL,IAAAA,KAAK,WAAL,IAAAA,KAAK,CAAEE,IAAP,gBACE,oBAAC,IAAD;AAAM,UAAA,IAAI,EAAEF,KAAK,CAACE,IAAlB;AAAwB,UAAA,KAAK,EAAED,KAA/B;AAAsC,UAAA,IAAI,EAAE;AAA5C,UADF,GAEI,IAHM;AAAA,OAPd;AAYE,MAAA,KAAK,EAAE/B;AAZT,OADF;AAgBD,GAlBD;;AAoBA,sBACE,oBAAC,2BAAD;AACE,IAAA,eAAe,EAAE;AAAEE,MAAAA,KAAF;AAASI,MAAAA;AAAT,KADnB;AAEE,IAAA,WAAW,EAAE,kCAASE,SAAT,CAFf;AAGE,IAAA,YAAY,EAAEkB,YAHhB;AAIE,IAAA,aAAa,EAAEF,kBAJjB;AAKE,IAAA,cAAc,EAAEhC,cALlB;AAME,IAAA,mBAAmB,EAAEC,mBANvB;AAOE,IAAA,YAAY,EAAEC;AAPhB,IADF;AAWD,CAtED;;eAwEeJ,gB","sourcesContent":["import * as React from \"react\";\nimport { StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport { TabView, TabBar, SceneMap } from \"react-native-tab-view\";\n\n// import { withTheme } from \"../../theming\";\nimport TabViewItem from \"./TabViewItem\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\ntype TabBarPosition = \"top\" | \"bottom\";\ntype KeyboardDismissMode = \"none\" | \"auto\" | \"on-drag\";\n\ntype TabViewProps = {\n tabBarPosition?: TabBarPosition;\n keyboardDismissMode?: KeyboardDismissMode;\n swipeEnabled?: boolean;\n scrollEnabled?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n pressColor?: string;\n indicatorColor?: string;\n style?: StyleProp<TextStyle | ViewStyle>;\n children: React.ReactNode;\n} & IconSlot;\n\nconst TabViewComponent = ({\n Icon,\n tabBarPosition,\n keyboardDismissMode,\n swipeEnabled,\n scrollEnabled,\n activeColor,\n inactiveColor,\n pressColor,\n indicatorColor,\n style,\n children,\n}: TabViewProps) => {\n const [index, setIndex] = React.useState(0);\n const [routes, setRoutes] = React.useState([]);\n const [tabScenes, setTabScenes] = React.useState({});\n\n React.useEffect(() => {\n const newRoutes: any = [];\n const scenes: any = {};\n\n React.Children.toArray(children)\n .filter((child: any) => child.type === TabViewItem)\n .forEach((child: any) => {\n if (child?.props?.id) {\n newRoutes.push({\n key: child?.props?.id,\n ...child?.props,\n });\n scenes[child?.props?.id] = () => child;\n }\n });\n\n setRoutes(newRoutes);\n setTabScenes(scenes);\n }, [children]);\n\n const indexChangeHandler = (i: any) => setIndex(i);\n\n const renderTabBar = (props: any) => {\n console.log(props);\n return (\n <TabBar\n {...props}\n activeColor={activeColor}\n inactiveColor={inactiveColor}\n pressColor={pressColor}\n scrollEnabled={scrollEnabled}\n indicatorStyle={{ backgroundColor: indicatorColor }}\n renderIcon={({ route, color }) =>\n route?.icon ? (\n <Icon name={route.icon} color={color} size={36} />\n ) : null\n }\n style={style}\n />\n );\n };\n\n return (\n <TabView\n navigationState={{ index, routes }}\n renderScene={SceneMap(tabScenes)}\n renderTabBar={renderTabBar}\n onIndexChange={indexChangeHandler}\n tabBarPosition={tabBarPosition}\n keyboardDismissMode={keyboardDismissMode}\n swipeEnabled={swipeEnabled}\n />\n );\n};\n\nexport default TabViewComponent;\n"]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ const TabViewItem = _ref => {
9
+ let {
10
+ title,
11
+ id,
12
+ icon,
13
+ children,
14
+ accessibilityLabel
15
+ } = _ref;
16
+ console.log({
17
+ title,
18
+ id,
19
+ icon,
20
+ accessibilityLabel
21
+ });
22
+ return children;
23
+ };
24
+
25
+ var _default = TabViewItem;
26
+ exports.default = _default;
27
+ //# sourceMappingURL=TabViewItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TabViewItem.tsx"],"names":["TabViewItem","title","id","icon","children","accessibilityLabel","console","log"],"mappings":";;;;;;;AASA,MAAMA,WAAW,GAAG,QAMI;AAAA,MANH;AACnBC,IAAAA,KADmB;AAEnBC,IAAAA,EAFmB;AAGnBC,IAAAA,IAHmB;AAInBC,IAAAA,QAJmB;AAKnBC,IAAAA;AALmB,GAMG;AACtBC,EAAAA,OAAO,CAACC,GAAR,CAAY;AAAEN,IAAAA,KAAF;AAASC,IAAAA,EAAT;AAAaC,IAAAA,IAAb;AAAmBE,IAAAA;AAAnB,GAAZ;AACA,SAAOD,QAAP;AACD,CATD;;eAWeJ,W","sourcesContent":["import React from \"react\";\ninterface TabViewItemProps {\n title: string;\n id: string;\n icon: string;\n accessibilityLabel: string;\n children: React.ReactNode;\n}\n\nconst TabViewItem = ({\n title,\n id,\n icon,\n children,\n accessibilityLabel,\n}: TabViewItemProps) => {\n console.log({ title, id, icon, accessibilityLabel });\n return children;\n};\n\nexport default TabViewItem;\n"]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "TabView", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _TabView.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "TabViewItem", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _TabViewItem.default;
16
+ }
17
+ });
18
+
19
+ var _TabView = _interopRequireDefault(require("./TabView"));
20
+
21
+ var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
22
+
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default as TabView } from \"./TabView\";\nexport { default as TabViewItem } from \"./TabViewItem\";\n"]}
@@ -357,40 +357,16 @@ Object.defineProperty(exports, "SwitchRow", {
357
357
  return _Switch.SwitchRow;
358
358
  }
359
359
  });
360
- Object.defineProperty(exports, "Table", {
360
+ Object.defineProperty(exports, "TabView", {
361
361
  enumerable: true,
362
362
  get: function () {
363
- return _Table.Table;
363
+ return _TabView.TabView;
364
364
  }
365
365
  });
366
- Object.defineProperty(exports, "TableCell", {
366
+ Object.defineProperty(exports, "TabViewItem", {
367
367
  enumerable: true,
368
368
  get: function () {
369
- return _Table.TableCell;
370
- }
371
- });
372
- Object.defineProperty(exports, "TableHeader", {
373
- enumerable: true,
374
- get: function () {
375
- return _Table.TableHeader;
376
- }
377
- });
378
- Object.defineProperty(exports, "TablePaginator", {
379
- enumerable: true,
380
- get: function () {
381
- return _Table.TablePaginator;
382
- }
383
- });
384
- Object.defineProperty(exports, "TableRow", {
385
- enumerable: true,
386
- get: function () {
387
- return _Table.TableRow;
388
- }
389
- });
390
- Object.defineProperty(exports, "TableTitle", {
391
- enumerable: true,
392
- get: function () {
393
- return _Table.TableTitle;
369
+ return _TabView.TabViewItem;
394
370
  }
395
371
  });
396
372
  Object.defineProperty(exports, "TextField", {
@@ -492,12 +468,12 @@ var _ActionSheet = require("./components/ActionSheet");
492
468
 
493
469
  var _Swiper = require("./components/Swiper");
494
470
 
471
+ var _TabView = require("./components/TabView");
472
+
495
473
  var _Layout = require("./components/Layout");
496
474
 
497
475
  var _index = require("./components/RadioButton/index");
498
476
 
499
- var _Table = require("./components/Table");
500
-
501
477
  var _DeprecatedButton = _interopRequireDefault(require("./components/DeprecatedButton"));
502
478
 
503
479
  var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AASA;;AAOA;;AAUA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\nexport {\n Table,\n TableRow,\n TablePaginator,\n TableHeader,\n TableCell,\n TableTitle,\n} from \"./components/Table\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
1
+ {"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAEA;;AASA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\nexport { TabView, TabViewItem } from \"./components/TabView\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n"]}
@@ -13,6 +13,7 @@ const SEED_DATA = {
13
13
  description: "A card you can customize however you'd like",
14
14
  category: _types.COMPONENT_TYPES.card,
15
15
  triggers: [_types.Triggers.OnPress],
16
+ //TODO: when we support multiple triggers, add Triggers.OnPressIcon
16
17
  props: {
17
18
  onPress: (0, _types.createActionProp)(),
18
19
  onPressIcon: (0, _types.createActionProp)({
@@ -59,7 +60,4 @@ const SEED_DATA = {
59
60
  }
60
61
  };
61
62
  exports.SEED_DATA = SEED_DATA;
62
- //# sourceMappingURL=Card.js.map }
63
- };
64
- exports.SEED_DATA = SEED_DATA;
65
63
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Card.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","card","triggers","Triggers","OnPress","props","onPress","onPressIcon","handlerPropName","elevation","image","title","label","defaultValue","titleStyle","subtitle","subtitleStyle","descriptionStyle","icon","aspectRatio","textCentered"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,MADe;AAErBC,EAAAA,GAAG,EAAE,MAFgB;AAGrBC,EAAAA,WAAW,EAAE,6CAHQ;AAIrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,IAJL;AAKrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALW;AAMrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,OAAO,EAAE,8BADN;AAEHC,IAAAA,WAAW,EAAE,6BAAiB;AAC1BC,MAAAA,eAAe,EAAE;AADS,KAAjB,CAFV;AAKHC,IAAAA,SAAS,EAAE,gCAAoB,CAApB,CALR;AAMHC,IAAAA,KAAK,EAAE,6BANJ;AAOHC,IAAAA,KAAK,EAAE,2BAAe;AAClBC,MAAAA,KAAK,EAAE,OADW;AAElBd,MAAAA,WAAW,EAAE,kBAFK;AAGlB;AACAe,MAAAA,YAAY,EAAE;AAJI,KAAf,CAPJ;AAaHC,IAAAA,UAAU,EAAE,4BAAgB;AACxBF,MAAAA,KAAK,EAAE;AADiB,KAAhB,CAbT;AAgBHG,IAAAA,QAAQ,EAAE,2BAAe;AACrBH,MAAAA,KAAK,EAAE,UADc;AAErBd,MAAAA,WAAW,EAAE,2BAFQ;AAGrBe,MAAAA,YAAY,EAAE,IAHO,CAIrB;;AAJqB,KAAf,CAhBP;AAsBHG,IAAAA,aAAa,EAAE,4BAAgB;AAC3BJ,MAAAA,KAAK,EAAE;AADoB,KAAhB,CAtBZ;AAyBHd,IAAAA,WAAW,EAAE,2BAAe;AACxBc,MAAAA,KAAK,EAAE,aADiB;AAExBd,MAAAA,WAAW,EAAE,mCAFW;AAGxB;AACA;AACAe,MAAAA,YAAY,EAAE;AALU,KAAf,CAzBV;AAgCHI,IAAAA,gBAAgB,EAAE,4BAAgB;AAC9BL,MAAAA,KAAK,EAAE;AADuB,KAAhB,CAhCf;AAmCHM,IAAAA,IAAI,EAAE,4BAnCH;AAoCHC,IAAAA,WAAW,EAAE,kCAAsB;AAC/BN,MAAAA,YAAY,EAAE;AADiB,KAAtB,CApCV;AAuCHO,IAAAA,YAAY,EAAE,iCAAqB;AAC/BR,MAAAA,KAAK,EAAE,eADwB;AAE/Bd,MAAAA,WAAW,EAAE;AAFkB,KAArB;AAvCX;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createElevationType, createTextProp, createImageProp, createIconProp, createAspectRatioProp, createStaticBoolProp, createTextStyle, createActionProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Card\",\n tag: \"Card\",\n description: \"A card you can customize however you'd like\",\n category: COMPONENT_TYPES.card,\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n onPressIcon: createActionProp({\n handlerPropName: \"onPressIcon\",\n }),\n elevation: createElevationType(3),\n image: createImageProp(),\n title: createTextProp({\n label: \"Title\",\n description: \"Large title text\",\n // defaultValue: \"Title\",\n defaultValue: null,\n }),\n titleStyle: createTextStyle({\n label: \"Title Style\",\n }),\n subtitle: createTextProp({\n label: \"Subtitle\",\n description: \"Text underneath the title\",\n defaultValue: null,\n // defaultValue: \"Edit me in the props panel on the right\",\n }),\n subtitleStyle: createTextStyle({\n label: \"Subtitle Style\",\n }),\n description: createTextProp({\n label: \"Description\",\n description: \"Smallest text underneath subtitle\",\n // defaultValue:\n // \"This bottom text is optional, but shows up to make your life a little easier!\",\n defaultValue: null,\n }),\n descriptionStyle: createTextStyle({\n label: \"Description Style\",\n }),\n icon: createIconProp(),\n aspectRatio: createAspectRatioProp({\n defaultValue: 1.5,\n }),\n textCentered: createStaticBoolProp({\n label: \"Centered Text\",\n description: \"Places your title and subtitle in the center\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["Card.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","card","triggers","Triggers","OnPress","props","onPress","onPressIcon","handlerPropName","elevation","image","title","label","defaultValue","titleStyle","subtitle","subtitleStyle","descriptionStyle","icon","aspectRatio","textCentered"],"mappings":";;;;;;;AAAA;;AAaO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,MADiB;AAEvBC,EAAAA,GAAG,EAAE,MAFkB;AAGvBC,EAAAA,WAAW,EAAE,6CAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,IAJH;AAKvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALa;AAKO;AAC9BC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,8BADJ;AAELC,IAAAA,WAAW,EAAE,6BAAiB;AAC5BC,MAAAA,eAAe,EAAE;AADW,KAAjB,CAFR;AAKLC,IAAAA,SAAS,EAAE,gCAAoB,CAApB,CALN;AAMLC,IAAAA,KAAK,EAAE,6BANF;AAOLC,IAAAA,KAAK,EAAE,2BAAe;AACpBC,MAAAA,KAAK,EAAE,OADa;AAEpBd,MAAAA,WAAW,EAAE,kBAFO;AAGpB;AACAe,MAAAA,YAAY,EAAE;AAJM,KAAf,CAPF;AAaLC,IAAAA,UAAU,EAAE,4BAAgB;AAC1BF,MAAAA,KAAK,EAAE;AADmB,KAAhB,CAbP;AAgBLG,IAAAA,QAAQ,EAAE,2BAAe;AACvBH,MAAAA,KAAK,EAAE,UADgB;AAEvBd,MAAAA,WAAW,EAAE,2BAFU;AAGvBe,MAAAA,YAAY,EAAE,IAHS,CAIvB;;AAJuB,KAAf,CAhBL;AAsBLG,IAAAA,aAAa,EAAE,4BAAgB;AAC7BJ,MAAAA,KAAK,EAAE;AADsB,KAAhB,CAtBV;AAyBLd,IAAAA,WAAW,EAAE,2BAAe;AAC1Bc,MAAAA,KAAK,EAAE,aADmB;AAE1Bd,MAAAA,WAAW,EAAE,mCAFa;AAG1B;AACA;AACAe,MAAAA,YAAY,EAAE;AALY,KAAf,CAzBR;AAgCLI,IAAAA,gBAAgB,EAAE,4BAAgB;AAChCL,MAAAA,KAAK,EAAE;AADyB,KAAhB,CAhCb;AAmCLM,IAAAA,IAAI,EAAE,4BAnCD;AAoCLC,IAAAA,WAAW,EAAE,kCAAsB;AACjCN,MAAAA,YAAY,EAAE;AADmB,KAAtB,CApCR;AAuCLO,IAAAA,YAAY,EAAE,iCAAqB;AACjCR,MAAAA,KAAK,EAAE,eAD0B;AAEjCd,MAAAA,WAAW,EAAE;AAFoB,KAArB;AAvCT;AANgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createElevationType,\n createTextProp,\n createImageProp,\n createIconProp,\n createAspectRatioProp,\n createStaticBoolProp,\n createTextStyle,\n createActionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Card\",\n tag: \"Card\",\n description: \"A card you can customize however you'd like\",\n category: COMPONENT_TYPES.card,\n triggers: [Triggers.OnPress], //TODO: when we support multiple triggers, add Triggers.OnPressIcon\n props: {\n onPress: createActionProp(),\n onPressIcon: createActionProp({\n handlerPropName: \"onPressIcon\",\n }),\n elevation: createElevationType(3),\n image: createImageProp(),\n title: createTextProp({\n label: \"Title\",\n description: \"Large title text\",\n // defaultValue: \"Title\",\n defaultValue: null,\n }),\n titleStyle: createTextStyle({\n label: \"Title Style\",\n }),\n subtitle: createTextProp({\n label: \"Subtitle\",\n description: \"Text underneath the title\",\n defaultValue: null,\n // defaultValue: \"Edit me in the props panel on the right\",\n }),\n subtitleStyle: createTextStyle({\n label: \"Subtitle Style\",\n }),\n description: createTextProp({\n label: \"Description\",\n description: \"Smallest text underneath subtitle\",\n // defaultValue:\n // \"This bottom text is optional, but shows up to make your life a little easier!\",\n defaultValue: null,\n }),\n descriptionStyle: createTextStyle({\n label: \"Description Style\",\n }),\n icon: createIconProp(),\n aspectRatio: createAspectRatioProp({\n defaultValue: 1.5,\n }),\n textCentered: createStaticBoolProp({\n label: \"Centered Text\",\n description: \"Places your title and subtitle in the center\",\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ImageBackground.js"],"names":["SEED_DATA","name","tag","doc_link","code_link","description","category","COMPONENT_TYPES","media","layout","width","height","props","source","defaultValue","resizeMode","backgroundColor","label","backfaceVisibility","options"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,kBADe;AAErBC,EAAAA,GAAG,EAAE,iBAFgB;AAGrBC,EAAAA,QAAQ,EAAE,oEAHW;AAIrBC,EAAAA,SAAS,EAAE,yFAJU;AAKrBC,EAAAA,WAAW,EAAE,8FALQ;AAMrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KANL;AAOrBC,EAAAA,MAAM,EAAE;AACJC,IAAAA,KAAK,EAAE,MADH;AAEJC,IAAAA,MAAM,EAAE;AAFJ,GAPa;AAWrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,MAAM,EAAE,4BAAgB;AACpBC,MAAAA,YAAY,EAAE;AADM,KAAhB,CADL;AAIHC,IAAAA,UAAU,EAAE,kCAJT;AAKHC,IAAAA,eAAe,EAAE,4BAAgB;AAC7BC,MAAAA,KAAK,EAAE,kBADsB;AAE7BZ,MAAAA,WAAW,EAAE;AAFgB,KAAhB,CALd;AASHa,IAAAA,kBAAkB,EAAE,+BAAmB;AACnCD,MAAAA,KAAK,EAAE,qBAD4B;AAEnCZ,MAAAA,WAAW,EAAE,iDAFsB;AAGnCc,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,QAAZ;AAH0B,KAAnB;AATjB;AAXc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createImageProp, createResizeModeProp, createTextEnumProp, createColorProp, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Image Background\",\n tag: \"ImageBackground\",\n doc_link: \"https://docs.expo.io/versions/latest/react-native/imagebackground/\",\n code_link: \"https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageBackground.js\",\n description: \"A very simple drop-in replacement for Image that allows you to use an Image as a background.\",\n category: COMPONENT_TYPES.media,\n layout: {\n width: \"100%\",\n height: \"100%\",\n },\n props: {\n source: createImageProp({\n defaultValue: \"https://static.draftbit.com/images/placeholder-image-background.png\",\n }),\n resizeMode: createResizeModeProp(),\n backgroundColor: createColorProp({\n label: \"Background Color\",\n description: \"If no image is chosen render a colored background.\",\n }),\n backfaceVisibility: createTextEnumProp({\n label: \"Backface Visibility\",\n description: \"When animating a card, show the back face of it\",\n options: [\"visible\", \"hidden\"],\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["ImageBackground.ts"],"names":["SEED_DATA","name","tag","doc_link","code_link","description","category","COMPONENT_TYPES","media","layout","width","height","props","source","defaultValue","resizeMode","backgroundColor","label","backfaceVisibility","options"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,kBADiB;AAEvBC,EAAAA,GAAG,EAAE,iBAFkB;AAGvBC,EAAAA,QAAQ,EACN,oEAJqB;AAKvBC,EAAAA,SAAS,EACP,yFANqB;AAOvBC,EAAAA,WAAW,EACT,8FARqB;AASvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KATH;AAUvBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,KAAK,EAAE,MADD;AAENC,IAAAA,MAAM,EAAE;AAFF,GAVe;AAcvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,4BAAgB;AACtBC,MAAAA,YAAY,EACV;AAFoB,KAAhB,CADH;AAKLC,IAAAA,UAAU,EAAE,kCALP;AAMLC,IAAAA,eAAe,EAAE,4BAAgB;AAC/BC,MAAAA,KAAK,EAAE,kBADwB;AAE/BZ,MAAAA,WAAW,EAAE;AAFkB,KAAhB,CANZ;AAULa,IAAAA,kBAAkB,EAAE,+BAAmB;AACrCD,MAAAA,KAAK,EAAE,qBAD8B;AAErCZ,MAAAA,WAAW,EAAE,iDAFwB;AAGrCc,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,QAAZ;AAH4B,KAAnB;AAVf;AAdgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createImageProp,\n createResizeModeProp,\n createTextEnumProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Image Background\",\n tag: \"ImageBackground\",\n doc_link:\n \"https://docs.expo.io/versions/latest/react-native/imagebackground/\",\n code_link:\n \"https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageBackground.js\",\n description:\n \"A very simple drop-in replacement for Image that allows you to use an Image as a background.\",\n category: COMPONENT_TYPES.media,\n layout: {\n width: \"100%\",\n height: \"100%\",\n },\n props: {\n source: createImageProp({\n defaultValue:\n \"https://static.draftbit.com/images/placeholder-image-background.png\",\n }),\n resizeMode: createResizeModeProp(),\n backgroundColor: createColorProp({\n label: \"Background Color\",\n description: \"If no image is chosen render a colored background.\",\n }),\n backfaceVisibility: createTextEnumProp({\n label: \"Backface Visibility\",\n description: \"When animating a card, show the back face of it\",\n options: [\"visible\", \"hidden\"],\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Layout.js"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","layout","props","justifyContent","label","group","GROUPS","style","description","formType","FORM_TYPES","string","propType","PROP_TYPES","STRING","defaultValue","editable","required","alignItems","top","number","NUMBER","right","bottom","left","width","height","bgColor","color","THEME","size"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG,CACrB;AACIC,EAAAA,IAAI,EAAE,KADV;AAEIC,EAAAA,GAAG,EAAE,KAFT;AAGIC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAH9B;AAIIC,EAAAA,KAAK,EAAE;AACHC,IAAAA,cAAc,EAAE;AACZC,MAAAA,KAAK,EAAE,oBADK;AAEZC,MAAAA,KAAK,EAAEC,cAAOC,KAFF;AAGZC,MAAAA,WAAW,EAAE,0CAHD;AAIZC,MAAAA,QAAQ,EAAEC,kBAAWC,MAJT;AAKZC,MAAAA,QAAQ,EAAEC,kBAAWC,MALT;AAMZC,MAAAA,YAAY,EAAE,YANF;AAOZC,MAAAA,QAAQ,EAAE,IAPE;AAQZC,MAAAA,QAAQ,EAAE;AARE,KADb;AAWHC,IAAAA,UAAU,EAAE;AACRd,MAAAA,KAAK,EAAE,kBADC;AAERC,MAAAA,KAAK,EAAEC,cAAOC,KAFN;AAGRC,MAAAA,WAAW,EAAE,wCAHL;AAIRC,MAAAA,QAAQ,EAAEC,kBAAWC,MAJb;AAKRC,MAAAA,QAAQ,EAAEC,kBAAWC,MALb;AAMRC,MAAAA,YAAY,EAAE,YANN;AAORC,MAAAA,QAAQ,EAAE,IAPF;AAQRC,MAAAA,QAAQ,EAAE;AARF;AAXT;AAJX,CADqB,EA4BrB;AACIpB,EAAAA,IAAI,EAAE,QADV;AAEIC,EAAAA,GAAG,EAAE,QAFT;AAGIC,EAAAA,QAAQ,EA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B","sourcesContent":["import { GROUPS, FORM_TYPES, PROP_TYPES, COMPONENT_TYPES, } from \"@draftbit/types\";\nexport const SEED_DATA = [\n {\n name: \"Row\",\n tag: \"Row\",\n category: COMPONENT_TYPES.layout,\n props: {\n justifyContent: {\n label: \"Align Horizontally\",\n group: GROUPS.style,\n description: \"Align Items Horizontally (on the X Axis)\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n alignItems: {\n label: \"Align Vertically\",\n group: GROUPS.style,\n description: \"Align Items Vertically (on the Y Axis)\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n },\n },\n {\n name: \"Spacer\",\n tag: \"Spacer\",\n category: COMPONENT_TYPES.layout,\n props: {\n top: {\n label: \"Top\",\n description: \"Top\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n right: {\n label: \"Right\",\n description: \"Right\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n bottom: {\n label: \"Bottom\",\n description: \"Bottom\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n left: {\n label: \"Left\",\n description: \"Left\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n },\n },\n {\n name: \"Stack\",\n tag: \"Stack\",\n category: COMPONENT_TYPES.layout,\n props: {\n justifyContent: {\n group: GROUPS.style,\n label: \"Justify\",\n description: \"Justify horizontally\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n alignItems: {\n group: GROUPS.style,\n label: \"Align\",\n description: \"Vertical align\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n },\n },\n {\n name: \"Center\",\n tag: \"Center\",\n category: COMPONENT_TYPES.layout,\n props: {\n width: {\n label: \"Width\",\n description: \"Width\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 240,\n editable: true,\n required: false,\n },\n height: {\n label: \"Height\",\n description: \"Height\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 200,\n editable: true,\n required: false,\n },\n bgColor: {\n label: \"Background Color\",\n description: \"Background color\",\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n editable: true,\n required: false,\n defaultValue: \"light\",\n group: GROUPS.style,\n },\n },\n },\n {\n name: \"Circle\",\n tag: \"Circle\",\n category: COMPONENT_TYPES.layout,\n props: {\n size: {\n label: \"Size\",\n description: \"Size\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 50,\n editable: true,\n required: false,\n },\n bgColor: {\n label: \"Background Color\",\n description: \"Background color\",\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n editable: true,\n required: false,\n defaultValue: \"light\",\n group: GROUPS.style,\n },\n },\n },\n {\n name: \"Square\",\n tag: \"Square\",\n category: COMPONENT_TYPES.layout,\n props: {\n size: {\n label: \"Size\",\n description: \"Size\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 50,\n editable: true,\n required: false,\n },\n bgColor: {\n label: \"Background Color\",\n description: \"Background color\",\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n editable: true,\n required: false,\n defaultValue: \"light\",\n group: GROUPS.style,\n },\n },\n },\n];\n"]}
1
+ {"version":3,"sources":["Layout.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","layout","props","justifyContent","label","group","GROUPS","style","description","formType","FORM_TYPES","string","propType","PROP_TYPES","STRING","defaultValue","editable","required","alignItems","top","number","NUMBER","right","bottom","left","width","height","bgColor","color","THEME","size"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,KADR;AAEEC,EAAAA,GAAG,EAAE,KAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAH5B;AAIEC,EAAAA,KAAK,EAAE;AACLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,KAAK,EAAE,oBADO;AAEdC,MAAAA,KAAK,EAAEC,cAAOC,KAFA;AAGdC,MAAAA,WAAW,EAAE,0CAHC;AAIdC,MAAAA,QAAQ,EAAEC,kBAAWC,MAJP;AAKdC,MAAAA,QAAQ,EAAEC,kBAAWC,MALP;AAMdC,MAAAA,YAAY,EAAE,YANA;AAOdC,MAAAA,QAAQ,EAAE,IAPI;AAQdC,MAAAA,QAAQ,EAAE;AARI,KADX;AAWLC,IAAAA,UAAU,EAAE;AACVd,MAAAA,KAAK,EAAE,kBADG;AAEVC,MAAAA,KAAK,EAAEC,cAAOC,KAFJ;AAGVC,MAAAA,WAAW,EAAE,wCAHH;AAIVC,MAAAA,QAAQ,EAAEC,kBAAWC,MAJX;AAKVC,MAAAA,QAAQ,EAAEC,kBAAWC,MALX;AAMVC,MAAAA,YAAY,EAAE,YANJ;AAOVC,MAAAA,QAAQ,EAAE,IAPA;AAQVC,MAAAA,QAAQ,EAAE;AARA;AAXP;AAJT,CADuB,EA4BvB;AACEpB,EAAAA,IAAI,EAAE,QADR;AAEEC,EAAAA,GAAG,EAAE,QAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAH5B;AAIEC,EAAAA,KAAK,EAAE;AACLiB,IAAAA,GAAG,EAAE;AACHf,MAAAA,KAAK,EAAE,KADJ;AAEHI,MAAAA,WAAW,EAAE,KAFV;AA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YPES.layout,\n props: {\n justifyContent: {\n label: \"Align Horizontally\",\n group: GROUPS.style,\n description: \"Align Items Horizontally (on the X Axis)\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n alignItems: {\n label: \"Align Vertically\",\n group: GROUPS.style,\n description: \"Align Items Vertically (on the Y Axis)\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n },\n },\n {\n name: \"Spacer\",\n tag: \"Spacer\",\n category: COMPONENT_TYPES.layout,\n props: {\n top: {\n label: \"Top\",\n description: \"Top\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n right: {\n label: \"Right\",\n description: \"Right\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n bottom: {\n label: \"Bottom\",\n description: \"Bottom\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n left: {\n label: \"Left\",\n description: \"Left\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 8,\n editable: true,\n required: false,\n },\n },\n },\n {\n name: \"Stack\",\n tag: \"Stack\",\n category: COMPONENT_TYPES.layout,\n props: {\n justifyContent: {\n group: GROUPS.style,\n label: \"Justify\",\n description: \"Justify horizontally\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n alignItems: {\n group: GROUPS.style,\n label: \"Align\",\n description: \"Vertical align\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"flex-start\",\n editable: true,\n required: false,\n },\n },\n },\n {\n name: \"Center\",\n tag: \"Center\",\n category: COMPONENT_TYPES.layout,\n props: {\n width: {\n label: \"Width\",\n description: \"Width\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 240,\n editable: true,\n required: false,\n },\n height: {\n label: \"Height\",\n description: \"Height\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 200,\n editable: true,\n required: false,\n },\n bgColor: {\n label: \"Background Color\",\n description: \"Background color\",\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n editable: true,\n required: false,\n defaultValue: \"light\",\n group: GROUPS.style,\n },\n },\n },\n {\n name: \"Circle\",\n tag: \"Circle\",\n category: COMPONENT_TYPES.layout,\n props: {\n size: {\n label: \"Size\",\n description: \"Size\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 50,\n editable: true,\n required: false,\n },\n bgColor: {\n label: \"Background Color\",\n description: \"Background color\",\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n editable: true,\n required: false,\n defaultValue: \"light\",\n group: GROUPS.style,\n },\n },\n },\n {\n name: \"Square\",\n tag: \"Square\",\n category: COMPONENT_TYPES.layout,\n props: {\n size: {\n label: \"Size\",\n description: \"Size\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n group: GROUPS.style,\n defaultValue: 50,\n editable: true,\n required: false,\n },\n bgColor: {\n label: \"Background Color\",\n description: \"Background color\",\n formType: FORM_TYPES.color,\n propType: PROP_TYPES.THEME,\n editable: true,\n required: false,\n defaultValue: \"light\",\n group: GROUPS.style,\n },\n },\n },\n];\n"]}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+
8
+ var _types = require("@draftbit/types");
9
+
10
+ const SEED_DATA = [{
11
+ name: "TabView",
12
+ tag: "TabView",
13
+ category: _types.COMPONENT_TYPES.container,
14
+ layout: {},
15
+ props: {
16
+ tabBarPosition: (0, _types.createTextEnumProp)({
17
+ label: "Tab Bar Position",
18
+ description: "Tab Bar Position",
19
+ options: ["top", "bottom"],
20
+ defaultValue: "top"
21
+ }),
22
+ keyboardDismissMode: (0, _types.createTextEnumProp)({
23
+ label: "Keyboard Dismiss Mode",
24
+ description: "Keyboard Dismiss Mode",
25
+ options: ["auto", "on-drag", "none"],
26
+ defaultValue: "auto"
27
+ }),
28
+ swipeEnabled: (0, _types.createBoolProp)({
29
+ label: "Swipe Enabled",
30
+ description: "Swipe Enabled",
31
+ defaultValue: true
32
+ }),
33
+ scrollEnabled: (0, _types.createBoolProp)({
34
+ label: "Scroll Enabled",
35
+ description: "Scroll Enabled",
36
+ defaultValue: true
37
+ }),
38
+ activeColor: (0, _types.createColorProp)({
39
+ label: "Active Color",
40
+ description: "Active Color",
41
+ defaultValue: "primary"
42
+ }),
43
+ inactiveColor: (0, _types.createColorProp)({
44
+ label: "Inactive Color",
45
+ description: "Inactive Color",
46
+ defaultValue: null
47
+ }),
48
+ pressColor: (0, _types.createColorProp)({
49
+ label: "Press Color",
50
+ description: "Press Color",
51
+ defaultValue: null
52
+ }),
53
+ indicatorColor: (0, _types.createColorProp)({
54
+ label: "Indicator Color",
55
+ description: "Indicator Color",
56
+ defaultValue: null
57
+ })
58
+ }
59
+ }, {
60
+ name: "TabViewItem",
61
+ tag: "TabViewItem",
62
+ category: _types.COMPONENT_TYPES.container,
63
+ layout: {},
64
+ props: {
65
+ title: (0, _types.createTextProp)({
66
+ label: "Title",
67
+ description: "Tab Title"
68
+ }),
69
+ id: (0, _types.createTextProp)({
70
+ label: "Id",
71
+ description: "Tab Id"
72
+ }),
73
+ accessibilityLabel: (0, _types.createTextProp)({
74
+ label: "Accessibility Label",
75
+ description: "Accessibility Label"
76
+ })
77
+ }
78
+ }];
79
+ exports.SEED_DATA = SEED_DATA;
80
+ //# sourceMappingURL=TabView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TabView.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","container","layout","props","tabBarPosition","label","description","options","defaultValue","keyboardDismissMode","swipeEnabled","scrollEnabled","activeColor","inactiveColor","pressColor","indicatorColor","title","id","accessibilityLabel"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,SADR;AAEEC,EAAAA,GAAG,EAAE,SAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,SAH5B;AAIEC,EAAAA,MAAM,EAAE,EAJV;AAKEC,EAAAA,KAAK,EAAE;AACLC,IAAAA,cAAc,EAAE,+BAAmB;AACjCC,MAAAA,KAAK,EAAE,kBAD0B;AAEjCC,MAAAA,WAAW,EAAE,kBAFoB;AAGjCC,MAAAA,OAAO,EAAE,CAAC,KAAD,EAAQ,QAAR,CAHwB;AAIjCC,MAAAA,YAAY,EAAE;AAJmB,KAAnB,CADX;AAOLC,IAAAA,mBAAmB,EAAE,+BAAmB;AACtCJ,MAAAA,KAAK,EAAE,uBAD+B;AAEtCC,MAAAA,WAAW,EAAE,uBAFyB;AAGtCC,MAAAA,OAAO,EAAE,CAAC,MAAD,EAAS,SAAT,EAAoB,MAApB,CAH6B;AAItCC,MAAAA,YAAY,EAAE;AAJwB,KAAnB,CAPhB;AAaLE,IAAAA,YAAY,EAAE,2BAAe;AAC3BL,MAAAA,KAAK,EAAE,eADoB;AAE3BC,MAAAA,WAAW,EAAE,eAFc;AAG3BE,MAAAA,YAAY,EAAE;AAHa,KAAf,CAbT;AAkBLG,IAAAA,aAAa,EAAE,2BAAe;AAC5BN,MAAAA,KAAK,EAAE,gBADqB;AAE5BC,MAAAA,WAAW,EAAE,gBAFe;AAG5BE,MAAAA,YAAY,EAAE;AAHc,KAAf,CAlBV;AAuBLI,IAAAA,WAAW,EAAE,4BAAgB;AAC3BP,MAAAA,KAAK,EAAE,cADoB;AAE3BC,MAAAA,WAAW,EAAE,cAFc;AAG3BE,MAAAA,YAAY,EAAE;AAHa,KAAhB,CAvBR;AA4BLK,IAAAA,aAAa,EAAE,4BAAgB;AAC7BR,MAAAA,KAAK,EAAE,gBADsB;AAE7BC,MAAAA,WAAW,EAAE,gBAFgB;AAG7BE,MAAAA,YAAY,EAAE;AAHe,KAAhB,CA5BV;AAiCLM,IAAAA,UAAU,EAAE,4BAAgB;AAC1BT,MAAAA,KAAK,EAAE,aADmB;AAE1BC,MAAAA,WAAW,EAAE,aAFa;AAG1BE,MAAAA,YAAY,EAAE;AAHY,KAAhB,CAjCP;AAsCLO,IAAAA,cAAc,EAAE,4BAAgB;AAC9BV,MAAAA,KAAK,EAAE,iBADuB;AAE9BC,MAAAA,WAAW,EAAE,iBAFiB;AAG9BE,MAAAA,YAAY,EAAE;AAHgB,KAAhB;AAtCX;AALT,CADuB,EAmDvB;AACEX,EAAAA,IAAI,EAAE,aADR;AAEEC,EAAAA,GAAG,EAAE,aAFP;AAGEC,EAAAA,QAAQ,EAAEC,uBAAgBC,SAH5B;AAIEC,EAAAA,MAAM,EAAE,EAJV;AAKEC,EAAAA,KAAK,EAAE;AACLa,IAAAA,KAAK,EAAE,2BAAe;AACpBX,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE;AAFO,KAAf,CADF;AAKLW,IAAAA,EAAE,EAAE,2BAAe;AACjBZ,MAAAA,KAAK,EAAE,IADU;AAEjBC,MAAAA,WAAW,EAAE;AAFI,KAAf,CALC;AASLY,IAAAA,kBAAkB,EAAE,2BAAe;AACjCb,MAAAA,KAAK,EAAE,qBAD0B;AAEjCC,MAAAA,WAAW,EAAE;AAFoB,KAAf;AATf;AALT,CAnDuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createTextProp,\n createTextEnumProp,\n createBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"TabView\",\n tag: \"TabView\",\n category: COMPONENT_TYPES.container,\n layout: {},\n props: {\n tabBarPosition: createTextEnumProp({\n label: \"Tab Bar Position\",\n description: \"Tab Bar Position\",\n options: [\"top\", \"bottom\"],\n defaultValue: \"top\",\n }),\n keyboardDismissMode: createTextEnumProp({\n label: \"Keyboard Dismiss Mode\",\n description: \"Keyboard Dismiss Mode\",\n options: [\"auto\", \"on-drag\", \"none\"],\n defaultValue: \"auto\",\n }),\n swipeEnabled: createBoolProp({\n label: \"Swipe Enabled\",\n description: \"Swipe Enabled\",\n defaultValue: true,\n }),\n scrollEnabled: createBoolProp({\n label: \"Scroll Enabled\",\n description: \"Scroll Enabled\",\n defaultValue: true,\n }),\n activeColor: createColorProp({\n label: \"Active Color\",\n description: \"Active Color\",\n defaultValue: \"primary\",\n }),\n inactiveColor: createColorProp({\n label: \"Inactive Color\",\n description: \"Inactive Color\",\n defaultValue: null,\n }),\n pressColor: createColorProp({\n label: \"Press Color\",\n description: \"Press Color\",\n defaultValue: null,\n }),\n indicatorColor: createColorProp({\n label: \"Indicator Color\",\n description: \"Indicator Color\",\n defaultValue: null,\n }),\n },\n },\n {\n name: \"TabViewItem\",\n tag: \"TabViewItem\",\n category: COMPONENT_TYPES.container,\n layout: {},\n props: {\n title: createTextProp({\n label: \"Title\",\n description: \"Tab Title\",\n }),\n id: createTextProp({\n label: \"Id\",\n description: \"Tab Id\",\n }),\n accessibilityLabel: createTextProp({\n label: \"Accessibility Label\",\n description: \"Accessibility Label\",\n }),\n },\n },\n];\n"]}
@@ -8,12 +8,6 @@ exports.extractStyles = extractStyles;
8
8
 
9
9
  var _reactNative = require("react-native");
10
10
 
11
- var _omitBy = _interopRequireDefault(require("lodash/omitBy"));
12
-
13
- var _isNil = _interopRequireDefault(require("lodash/isNil"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
-
17
11
  function extractStyles(style) {
18
12
  const {
19
13
  color,
@@ -44,8 +38,8 @@ function extractStyles(style) {
44
38
  textDecorationStyle
45
39
  };
46
40
  return {
47
- viewStyles: (0, _omitBy.default)(viewStyles, _isNil.default),
48
- textStyles: (0, _omitBy.default)(textStyles, _isNil.default)
41
+ viewStyles,
42
+ textStyles
49
43
  };
50
44
  }
51
45
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["utilities.ts"],"names":["extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","StyleSheet","flatten","textStyles","isNil","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;;;AAEO,SAASA,aAAT,CAAuBC,KAAvB,EAA8C;AACnD,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,UAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,QAJI;AAKJC,IAAAA,UALI;AAMJC,IAAAA,aANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,SARI;AASJC,IAAAA,kBATI;AAUJC,IAAAA,mBAVI;AAWJC,IAAAA,mBAXI;AAYJ,OAAGC;AAZC,MAaFC,wBAAWC,OAAX,CAAmBd,KAAK,IAAI,EAA5B,CAbJ;;AAeA,QAAMe,UAAqB,GAAG;AAC5Bd,IAAAA,KAD4B;AAE5BC,IAAAA,UAF4B;AAG5BC,IAAAA,UAH4B;AAI5BC,IAAAA,QAJ4B;AAK5BC,IAAAA,UAL4B;AAM5BC,IAAAA,aAN4B;AAO5BC,IAAAA,aAP4B;AAQ5BC,IAAAA,SAR4B;AAS5BC,IAAAA,kBAT4B;AAU5BC,IAAAA,mBAV4B;AAW5BC,IAAAA;AAX4B,GAA9B;AAcA,SAAO;AACLC,IAAAA,UAAU,EAAE,qBAAOA,UAAP,EAAmBI,cAAnB,CADP;AAELD,IAAAA,UAAU,EAAE,qBAAOA,UAAP,EAAmBC,cAAnB;AAFP,GAAP;AAID;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,WAAT,CACLC,UADK,EAELC,aAFK,EAGL;AACA,MAAI,CAACA,aAAL,EAAoB;AAClB;AACD;;AAED,QAAMC,eAAe,GAAGP,wBAAWC,OAAX,CAAmBI,UAAnB,CAAxB;;AAEA,OAAK,MAAM,CAACG,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeL,aAAf,CAA3B,EAA0D;AACxD,QAAIG,KAAK,IAAI,IAAb,EAAmB;AACjBF,MAAAA,eAAe,CAACC,GAAD,CAAf,GAAuBC,KAAvB;AACD;AACF;;AAED,SAAOF,eAAP;AACD","sourcesContent":["import { StyleSheet, StyleProp, TextStyle } from \"react-native\";\nimport omitBy from \"lodash/omitBy\";\nimport isNil from \"lodash/isNil\";\n\nexport function extractStyles(style: StyleProp<any>) {\n const {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n ...viewStyles\n } = StyleSheet.flatten(style || {});\n\n const textStyles: TextStyle = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n\n return {\n viewStyles: omitBy(viewStyles, isNil),\n textStyles: omitBy(textStyles, isNil),\n };\n}\n\n/**\n * Merges a style object on top of another style object. In React Native,\n * keys with undefined values in a style object will still override styles\n * that appear earlier in a sequence. This avoids that problem.\n *\n * This lets us avoid the `...(something ? { something } : {})` pattern.\n * There doesn't seem to be a better way to do this. These all seem to not\n * work (i.e. they all result in `{ color: undefined }`:\n * `const mergedStyles = [{ color: \"red\" }, { color: undefined }]`\n * `const mergedStyles = StyleSheet.compose({ color: \"red\" }, { color: undefined })`\n * `const mergedStyles = StyleSheet.flatten([{ color: \"red\" }, { color: undefined }])`\n */\nexport function applyStyles(\n baseStyles: Array<StyleProp<any>>,\n stylesToApply: StyleProp<any> | undefined\n) {\n if (!stylesToApply) {\n return;\n }\n\n const flattenedStyles = StyleSheet.flatten(baseStyles);\n\n for (const [key, value] of Object.entries(stylesToApply)) {\n if (value != null) {\n flattenedStyles[key] = value;\n }\n }\n\n return flattenedStyles;\n}\n"]}
1
+ {"version":3,"sources":["utilities.ts"],"names":["extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","StyleSheet","flatten","textStyles","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries"],"mappings":";;;;;;;;AAAA;;AAEO,SAASA,aAAT,CAAuBC,KAAvB,EAA8C;AACnD,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,UAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,QAJI;AAKJC,IAAAA,UALI;AAMJC,IAAAA,aANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,SARI;AASJC,IAAAA,kBATI;AAUJC,IAAAA,mBAVI;AAWJC,IAAAA,mBAXI;AAYJ,OAAGC;AAZC,MAaFC,wBAAWC,OAAX,CAAmBd,KAAK,IAAI,EAA5B,CAbJ;;AAeA,QAAMe,UAAqB,GAAG;AAC5Bd,IAAAA,KAD4B;AAE5BC,IAAAA,UAF4B;AAG5BC,IAAAA,UAH4B;AAI5BC,IAAAA,QAJ4B;AAK5BC,IAAAA,UAL4B;AAM5BC,IAAAA,aAN4B;AAO5BC,IAAAA,aAP4B;AAQ5BC,IAAAA,SAR4B;AAS5BC,IAAAA,kBAT4B;AAU5BC,IAAAA,mBAV4B;AAW5BC,IAAAA;AAX4B,GAA9B;AAcA,SAAO;AAAEC,IAAAA,UAAF;AAAcG,IAAAA;AAAd,GAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,WAAT,CACLC,UADK,EAELC,aAFK,EAGL;AACA,MAAI,CAACA,aAAL,EAAoB;AAClB;AACD;;AAED,QAAMC,eAAe,GAAGN,wBAAWC,OAAX,CAAmBG,UAAnB,CAAxB;;AAEA,OAAK,MAAM,CAACG,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeL,aAAf,CAA3B,EAA0D;AACxD,QAAIG,KAAK,IAAI,IAAb,EAAmB;AACjBF,MAAAA,eAAe,CAACC,GAAD,CAAf,GAAuBC,KAAvB;AACD;AACF;;AAED,SAAOF,eAAP;AACD","sourcesContent":["import { StyleSheet, StyleProp, TextStyle } from \"react-native\";\n\nexport function extractStyles(style: StyleProp<any>) {\n const {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n ...viewStyles\n } = StyleSheet.flatten(style || {});\n\n const textStyles: TextStyle = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n\n return { viewStyles, textStyles };\n}\n\n/**\n * Merges a style object on top of another style object. In React Native,\n * keys with undefined values in a style object will still override styles\n * that appear earlier in a sequence. This avoids that problem.\n *\n * This lets us avoid the `...(something ? { something } : {})` pattern.\n * There doesn't seem to be a better way to do this. These all seem to not\n * work (i.e. they all result in `{ color: undefined }`:\n * `const mergedStyles = [{ color: \"red\" }, { color: undefined }]`\n * `const mergedStyles = StyleSheet.compose({ color: \"red\" }, { color: undefined })`\n * `const mergedStyles = StyleSheet.flatten([{ color: \"red\" }, { color: undefined }])`\n */\nexport function applyStyles(\n baseStyles: Array<StyleProp<any>>,\n stylesToApply: StyleProp<any> | undefined\n) {\n if (!stylesToApply) {\n return;\n }\n\n const flattenedStyles = StyleSheet.flatten(baseStyles);\n\n for (const [key, value] of Object.entries(stylesToApply)) {\n if (value != null) {\n flattenedStyles[key] = value;\n }\n }\n\n return flattenedStyles;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressIndicator.tsx"],"names":["React","StepIndicator","withTheme","ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAqBA,MAAMC,iBAAkC,GAAG,QAerC;AAAA,MAfsC;AAC1CC,IAAAA,aAD0C;AAE1CC,IAAAA,WAF0C;AAG1CC,IAAAA,sBAAsB,GAAG,CAHiB;AAI1CC,IAAAA,sBAAsB,GAAG,SAJiB;AAK1CC,IAAAA,iBAL0C;AAM1CC,IAAAA,wBAN0C;AAO1CC,IAAAA,yBAP0C;AAQ1CC,IAAAA,8BAR0C;AAS1CC,IAAAA,0BAA0B,GAAG,EATa;AAU1CC,IAAAA,uBAAuB,GAAG,eAVgB;AAW1CC,IAAAA,yBAAyB,GAAG,SAXc;AAY1CC,IAAAA,eAAe,GAAG,OAZwB;AAa1CC,IAAAA,aAAa,GAAG,SAb0B;AAc1CC,IAAAA;AAd0C,GAetC;AACJ,QAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;AACA,sBACE,oBAAC,aAAD;AACE,IAAA,SAAS,EAAED,aADb;AAEE,IAAA,eAAe,EAAEc,eAFnB;AAGE,IAAA,YAAY,EAAE;AACZV,MAAAA,iBADY;AAEZC,MAAAA,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;AAKZW,MAAAA,uBAAuB,EAAEH,aALb;AAMZI,MAAAA,yBAAyB,EAAEL,eANf;AAOZM,MAAAA,sBAAsB,EAAEL,aAPZ;AAQZM,MAAAA,wBAAwB,EAAEP,eARd;AASZQ,MAAAA,0BAA0B,EAAEP,aAThB;AAUZQ,MAAAA,4BAA4B,EAAET,eAVlB;AAWZT,MAAAA,sBAXY;AAYZC,MAAAA,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;AAcZe,MAAAA,iCAAiC,EAAEX,yBAdvB;AAeZY,MAAAA,+BAA+B,EAAEb,uBAfrB;AAgBZH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;AAiBZJ,MAAAA,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;AAmBZF,MAAAA,0BAnBY;AAoBZe,MAAAA,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,KAAjB,CAAuBC;AApB5B;AAHhB,IADF;AA4BD,CA7CD;;AA+CA,eAAe5B,SAAS,CAACC,iBAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<Props> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"]}
1
+ {"version":3,"sources":["ProgressIndicator.js"],"names":["React","StepIndicator","withTheme","ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","createElement","stepCount","customStyles","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicator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A,sBAAsB,EAAEA,sBAAsB,IAAIG,yBAZ6D;AAa/GkB,MAAAA,iCAAiC,EAAEd,yBAb4E;AAc/Ge,MAAAA,+BAA+B,EAAEhB,uBAd8E;AAe/GH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAfuD;AAgB/GJ,MAAAA,8BAA8B,EAAEA,8BAA8B,IAAIG,yBAhB6C;AAiB/GF,MAAAA,0BAjB+G;AAkB/GkB,MAAAA,eAAe,EAAEb,KAAK,CAACc,UAAN,CAAiBC,KAAjB,CAAuBC;AAlBuE;AAA5E,GAAnC,CAAR;AAoBH,CAtBD;;AAuBA,eAAe/B,SAAS,CAACC,iBAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nconst ProgressIndicator = ({ numberOfSteps, currentStep, currentStepStrokeWidth = 3, stepStrokeCurrentColor = \"primary\", stepIndicatorSize, currentStepIndicatorSize, stepIndicatorCurrentColor, stepIndicatorLabelCurrentColor, stepIndicatorLabelFontSize = 12, stepNumberFinishedColor = \"strongInverse\", stepNumberUnfinishedColor = \"primary\", unfinishedColor = \"light\", finishedColor = \"primary\", theme, }) => {\n const currentPosition = currentStep - 1;\n return (React.createElement(StepIndicator, { stepCount: numberOfSteps, currentPosition: currentPosition, customStyles: {\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor: stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor: stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n } }));\n};\nexport default withTheme(ProgressIndicator);\n"]}
@@ -0,0 +1,88 @@
1
+ function _extends() { _extends = Object.assign || 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); }
2
+
3
+ import * as React from "react";
4
+ import { TabView, TabBar, SceneMap } from "react-native-tab-view"; // import { withTheme } from "../../theming";
5
+
6
+ import TabViewItem from "./TabViewItem";
7
+
8
+ const TabViewComponent = _ref => {
9
+ let {
10
+ Icon,
11
+ tabBarPosition,
12
+ keyboardDismissMode,
13
+ swipeEnabled,
14
+ scrollEnabled,
15
+ activeColor,
16
+ inactiveColor,
17
+ pressColor,
18
+ indicatorColor,
19
+ style,
20
+ children
21
+ } = _ref;
22
+ const [index, setIndex] = React.useState(0);
23
+ const [routes, setRoutes] = React.useState([]);
24
+ const [tabScenes, setTabScenes] = React.useState({});
25
+ React.useEffect(() => {
26
+ const newRoutes = [];
27
+ const scenes = {};
28
+ React.Children.toArray(children).filter(child => child.type === TabViewItem).forEach(child => {
29
+ var _child$props;
30
+
31
+ if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.id) {
32
+ var _child$props2, _child$props3;
33
+
34
+ newRoutes.push({
35
+ key: child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.id,
36
+ ...(child === null || child === void 0 ? void 0 : child.props)
37
+ });
38
+
39
+ scenes[child === null || child === void 0 ? void 0 : (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.id] = () => child;
40
+ }
41
+ });
42
+ setRoutes(newRoutes);
43
+ setTabScenes(scenes);
44
+ }, [children]);
45
+
46
+ const indexChangeHandler = i => setIndex(i);
47
+
48
+ const renderTabBar = props => {
49
+ console.log(props);
50
+ return /*#__PURE__*/React.createElement(TabBar, _extends({}, props, {
51
+ activeColor: activeColor,
52
+ inactiveColor: inactiveColor,
53
+ pressColor: pressColor,
54
+ scrollEnabled: scrollEnabled,
55
+ indicatorStyle: {
56
+ backgroundColor: indicatorColor
57
+ },
58
+ renderIcon: _ref2 => {
59
+ let {
60
+ route,
61
+ color
62
+ } = _ref2;
63
+ return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
64
+ name: route.icon,
65
+ color: color,
66
+ size: 36
67
+ }) : null;
68
+ },
69
+ style: style
70
+ }));
71
+ };
72
+
73
+ return /*#__PURE__*/React.createElement(TabView, {
74
+ navigationState: {
75
+ index,
76
+ routes
77
+ },
78
+ renderScene: SceneMap(tabScenes),
79
+ renderTabBar: renderTabBar,
80
+ onIndexChange: indexChangeHandler,
81
+ tabBarPosition: tabBarPosition,
82
+ keyboardDismissMode: keyboardDismissMode,
83
+ swipeEnabled: swipeEnabled
84
+ });
85
+ };
86
+
87
+ export default TabViewComponent;
88
+ //# sourceMappingURL=TabView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TabView.tsx"],"names":["React","TabView","TabBar","SceneMap","TabViewItem","TabViewComponent","Icon","tabBarPosition","keyboardDismissMode","swipeEnabled","scrollEnabled","activeColor","inactiveColor","pressColor","indicatorColor","style","children","index","setIndex","useState","routes","setRoutes","tabScenes","setTabScenes","useEffect","newRoutes","scenes","Children","toArray","filter","child","type","forEach","props","id","push","key","indexChangeHandler","i","renderTabBar","console","log","backgroundColor","route","color","icon"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SAASC,OAAT,EAAkBC,MAAlB,EAA0BC,QAA1B,QAA0C,uBAA1C,C,CAEA;;AACA,OAAOC,WAAP,MAAwB,eAAxB;;AAmBA,MAAMC,gBAAgB,GAAG,QAYL;AAA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esContent":["import * as React from \"react\";\nimport { StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport { TabView, TabBar, SceneMap } from \"react-native-tab-view\";\n\n// import { withTheme } from \"../../theming\";\nimport TabViewItem from \"./TabViewItem\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\ntype TabBarPosition = \"top\" | \"bottom\";\ntype KeyboardDismissMode = \"none\" | \"auto\" | \"on-drag\";\n\ntype TabViewProps = {\n tabBarPosition?: TabBarPosition;\n keyboardDismissMode?: KeyboardDismissMode;\n swipeEnabled?: boolean;\n scrollEnabled?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n pressColor?: string;\n indicatorColor?: string;\n style?: StyleProp<TextStyle | ViewStyle>;\n children: React.ReactNode;\n} & IconSlot;\n\nconst TabViewComponent = ({\n Icon,\n tabBarPosition,\n keyboardDismissMode,\n swipeEnabled,\n scrollEnabled,\n activeColor,\n inactiveColor,\n pressColor,\n indicatorColor,\n style,\n children,\n}: TabViewProps) => {\n const [index, setIndex] = React.useState(0);\n const [routes, setRoutes] = React.useState([]);\n const [tabScenes, setTabScenes] = React.useState({});\n\n React.useEffect(() => {\n const newRoutes: any = [];\n const scenes: any = {};\n\n React.Children.toArray(children)\n .filter((child: any) => child.type === TabViewItem)\n .forEach((child: any) => {\n if (child?.props?.id) {\n newRoutes.push({\n key: child?.props?.id,\n ...child?.props,\n });\n scenes[child?.props?.id] = () => child;\n }\n });\n\n setRoutes(newRoutes);\n setTabScenes(scenes);\n }, [children]);\n\n const indexChangeHandler = (i: any) => setIndex(i);\n\n const renderTabBar = (props: any) => {\n console.log(props);\n return (\n <TabBar\n {...props}\n activeColor={activeColor}\n inactiveColor={inactiveColor}\n pressColor={pressColor}\n scrollEnabled={scrollEnabled}\n indicatorStyle={{ backgroundColor: indicatorColor }}\n renderIcon={({ route, color }) =>\n route?.icon ? (\n <Icon name={route.icon} color={color} size={36} />\n ) : null\n }\n style={style}\n />\n );\n };\n\n return (\n <TabView\n navigationState={{ index, routes }}\n renderScene={SceneMap(tabScenes)}\n renderTabBar={renderTabBar}\n onIndexChange={indexChangeHandler}\n tabBarPosition={tabBarPosition}\n keyboardDismissMode={keyboardDismissMode}\n swipeEnabled={swipeEnabled}\n />\n );\n};\n\nexport default TabViewComponent;\n"]}
@@ -0,0 +1,19 @@
1
+ const TabViewItem = _ref => {
2
+ let {
3
+ title,
4
+ id,
5
+ icon,
6
+ children,
7
+ accessibilityLabel
8
+ } = _ref;
9
+ console.log({
10
+ title,
11
+ id,
12
+ icon,
13
+ accessibilityLabel
14
+ });
15
+ return children;
16
+ };
17
+
18
+ export default TabViewItem;
19
+ //# sourceMappingURL=TabViewItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TabViewItem.tsx"],"names":["TabViewItem","title","id","icon","children","accessibilityLabel","console","log"],"mappings":"AASA,MAAMA,WAAW,GAAG,QAMI;AAAA,MANH;AACnBC,IAAAA,KADmB;AAEnBC,IAAAA,EAFmB;AAGnBC,IAAAA,IAHmB;AAInBC,IAAAA,QAJmB;AAKnBC,IAAAA;AALmB,GAMG;AACtBC,EAAAA,OAAO,CAACC,GAAR,CAAY;AAAEN,IAAAA,KAAF;AAASC,IAAAA,EAAT;AAAaC,IAAAA,IAAb;AAAmBE,IAAAA;AAAnB,GAAZ;AACA,SAAOD,QAAP;AACD,CATD;;AAWA,eAAeJ,WAAf","sourcesContent":["import React from \"react\";\ninterface TabViewItemProps {\n title: string;\n id: string;\n icon: string;\n accessibilityLabel: string;\n children: React.ReactNode;\n}\n\nconst TabViewItem = ({\n title,\n id,\n icon,\n children,\n accessibilityLabel,\n}: TabViewItemProps) => {\n console.log({ title, id, icon, accessibilityLabel });\n return children;\n};\n\nexport default TabViewItem;\n"]}
@@ -0,0 +1,3 @@
1
+ export { default as TabView } from "./TabView";
2
+ export { default as TabViewItem } from "./TabViewItem";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"names":["default","TabView","TabViewItem"],"mappings":"AAAA,SAASA,OAAO,IAAIC,OAApB,QAAmC,WAAnC;AACA,SAASD,OAAO,IAAIE,WAApB,QAAuC,eAAvC","sourcesContent":["export { default as TabView } from \"./TabView\";\nexport { default as TabViewItem } from \"./TabViewItem\";\n"]}
@@ -27,9 +27,9 @@ export { default as Touchable } from "./components/Touchable";
27
27
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
28
28
  export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
29
29
  export { Swiper, SwiperItem } from "./components/Swiper";
30
+ export { TabView, TabViewItem } from "./components/TabView";
30
31
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
31
32
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
32
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle } from "./components/Table";
33
33
  /* Deprecated: Fix or Delete! */
34
34
 
35
35
  export { default as Button } from "./components/DeprecatedButton";