@draftbit/core 43.2.3-6c5db5.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 (67) hide show
  1. package/lib/commonjs/components/Accordion/AccordionGroup.js +9 -1
  2. package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
  3. package/lib/commonjs/components/DeprecatedFAB.js +4 -20
  4. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  5. package/lib/commonjs/components/TabView/TabView.js +103 -0
  6. package/lib/commonjs/components/TabView/TabView.js.map +1 -0
  7. package/lib/commonjs/components/TabView/TabViewItem.js +27 -0
  8. package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -0
  9. package/lib/commonjs/components/TabView/index.js +24 -0
  10. package/lib/commonjs/components/TabView/index.js.map +1 -0
  11. package/lib/commonjs/index.js +14 -0
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/mappings/AccordionGroup.js +1 -1
  14. package/lib/commonjs/mappings/AccordionGroup.js.map +1 -1
  15. package/lib/commonjs/mappings/AccordionItem.js +1 -1
  16. package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
  17. package/lib/commonjs/mappings/RadioButton.js.map +1 -1
  18. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  19. package/lib/commonjs/mappings/TabView.js +80 -0
  20. package/lib/commonjs/mappings/TabView.js.map +1 -0
  21. package/lib/module/components/Accordion/AccordionGroup.js +9 -1
  22. package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
  23. package/lib/module/components/ProgressIndicator.js.map +1 -1
  24. package/lib/module/components/TabView/TabView.js +88 -0
  25. package/lib/module/components/TabView/TabView.js.map +1 -0
  26. package/lib/module/components/TabView/TabViewItem.js +19 -0
  27. package/lib/module/components/TabView/TabViewItem.js.map +1 -0
  28. package/lib/module/components/TabView/index.js +3 -0
  29. package/lib/module/components/TabView/index.js.map +1 -0
  30. package/lib/module/components/Typography.js.map +1 -1
  31. package/lib/module/index.js +1 -0
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/module/mappings/AccordionGroup.js +1 -1
  34. package/lib/module/mappings/AccordionGroup.js.map +1 -1
  35. package/lib/module/mappings/AccordionItem.js +1 -1
  36. package/lib/module/mappings/AccordionItem.js.map +1 -1
  37. package/lib/module/mappings/ActionSheetCancel.js.map +1 -1
  38. package/lib/module/mappings/TabView.js +71 -0
  39. package/lib/module/mappings/TabView.js.map +1 -0
  40. package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
  41. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
  42. package/lib/typescript/src/components/TabView/index.d.ts +2 -0
  43. package/lib/typescript/src/index.d.ts +1 -0
  44. package/lib/typescript/src/mappings/{Accordion.d.ts → TabView.d.ts} +65 -24
  45. package/package.json +4 -2
  46. package/src/components/Accordion/AccordionGroup.js +12 -1
  47. package/src/components/Accordion/AccordionGroup.tsx +15 -1
  48. package/src/components/TabView/TabView.js +33 -0
  49. package/src/components/TabView/TabView.tsx +97 -0
  50. package/src/components/TabView/TabViewItem.js +5 -0
  51. package/src/components/TabView/TabViewItem.tsx +21 -0
  52. package/src/components/TabView/index.js +2 -0
  53. package/src/components/TabView/index.ts +2 -0
  54. package/src/index.js +1 -0
  55. package/src/index.tsx +1 -0
  56. package/src/mappings/AccordionGroup.js +1 -1
  57. package/src/mappings/AccordionGroup.ts +1 -1
  58. package/src/mappings/AccordionItem.js +1 -1
  59. package/src/mappings/AccordionItem.ts +1 -1
  60. package/src/mappings/TabView.js +73 -0
  61. package/src/mappings/TabView.ts +80 -0
  62. package/lib/commonjs/mappings/Accordion.js +0 -40
  63. package/lib/commonjs/mappings/Accordion.js.map +0 -1
  64. package/lib/module/mappings/Accordion.js +0 -31
  65. package/lib/module/mappings/Accordion.js.map +0 -1
  66. package/src/mappings/Accordion.js +0 -30
  67. package/src/mappings/Accordion.ts +0 -38
@@ -69,7 +69,15 @@ const AccordionGroup = _ref => {
69
69
  name: expanded ? "MaterialIcons/keyboard-arrow-up" : "MaterialIcons/keyboard-arrow-down",
70
70
  color: caretColor,
71
71
  size: 24
72
- })))), expandedInternal ? children : null);
72
+ })))), expandedInternal ? React.Children.map(children, child => {
73
+ if ( /*#__PURE__*/React.isValidElement(child) && !child.props.left && !child.props.right) {
74
+ return /*#__PURE__*/React.cloneElement(child, {
75
+ style: child.props.style
76
+ });
77
+ }
78
+
79
+ return child;
80
+ }) : null);
73
81
  };
74
82
 
75
83
  const styles = _reactNative.StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"sources":["AccordionGroup.tsx"],"names":["AccordionGroup","Icon","openColor","closedColor","caretColor","icon","iconSize","style","label","children","expanded","expandedProp","theme","setExpanded","React","useState","handlePressAction","undefined","expandedInternal","expandedColor","colors","primary","collapsedColor","labelColor","styles","row","item","content","color","StyleSheet","create","flexDirection","alignItems","fontSize","margin","flex","justifyContent","marginLeft"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;AACA;;;;;;;;AAiBA,MAAMA,cAAc,GAAG,QAYV;AAAA,MAZW;AACtBC,IAAAA,IADsB;AAEtBC,IAAAA,SAFsB;AAGtBC,IAAAA,WAHsB;AAItBC,IAAAA,UAJsB;AAKtBC,IAAAA,IALsB;AAMtBC,IAAAA,QAAQ,GAAG,EANW;AAOtBC,IAAAA,KAPsB;AAQtBC,IAAAA,KARsB;AAStBC,IAAAA,QATsB;AAUtBC,IAAAA,QAAQ,EAAEC,YAVY;AAWtBC,IAAAA;AAXsB,GAYX;AACX,QAAM,CAACF,QAAD,EAAWG,WAAX,IAA0BC,KAAK,CAACC,QAAN,CAC9BJ,YAAY,IAAI,KADc,CAAhC;;AAIA,QAAMK,iBAAiB,GAAG,MAAM;AAC9B,QAAIL,YAAY,KAAKM,SAArB,EAAgC;AAC9BJ,MAAAA,WAAW,CAAC,CAACH,QAAF,CAAX;AACD;AACF,GAJD;;AAMA,QAAMQ,gBAAgB,GAAGP,YAAY,KAAKM,S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AAM,GAAGK,wBAAWC,MAAX,CAAkB;AAC/BL,EAAAA,GAAG,EAAE;AACHM,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE;AAFT,GAD0B;AAK/BxB,EAAAA,KAAK,EAAE;AACLyB,IAAAA,QAAQ,EAAE;AADL,GALwB;AAQ/BP,EAAAA,IAAI,EAAE;AACJQ,IAAAA,MAAM,EAAE;AADJ,GARyB;AAW/BP,EAAAA,OAAO,EAAE;AACPQ,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT,GAXsB;AAe/B/B,EAAAA,IAAI,EAAE;AACJgC,IAAAA,UAAU,EAAE;AADR;AAfyB,CAAlB,CAAf;;eAoBe,wBAAUrC,cAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n TextStyle,\n Pressable,\n} from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n openColor: string;\n closedColor: string;\n caretColor: string;\n icon?: string;\n iconSize: number;\n style?: StyleProp<TextStyle>;\n children: React.ReactNode;\n label: string;\n expanded?: boolean;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionGroup = ({\n Icon,\n openColor,\n closedColor,\n caretColor,\n icon,\n iconSize = 24,\n style,\n label,\n children,\n expanded: expandedProp,\n theme,\n}: Props) => {\n const [expanded, setExpanded] = React.useState<boolean>(\n expandedProp || false\n );\n\n const handlePressAction = () => {\n if (expandedProp === undefined) {\n setExpanded(!expanded);\n }\n };\n\n const expandedInternal = expandedProp !== undefined ? expandedProp : expanded;\n\n const expandedColor = openColor || theme.colors.primary;\n const collapsedColor = closedColor || theme.colors.primary;\n\n const labelColor = expanded ? expandedColor : collapsedColor;\n\n return (\n <>\n <Pressable\n style={[style]}\n onPress={handlePressAction}\n accessibilityRole=\"button\"\n >\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={iconSize}\n color={labelColor}\n style={styles.icon}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text\n selectable={false}\n style={[\n styles.label,\n {\n color: labelColor,\n },\n style,\n ]}\n >\n {label}\n </Text>\n </View>\n <View style={[styles.item]}>\n <Icon\n name={\n expanded\n ? \"MaterialIcons/keyboard-arrow-up\"\n : \"MaterialIcons/keyboard-arrow-down\"\n }\n color={caretColor}\n size={24}\n />\n </View>\n </View>\n </Pressable>\n {expandedInternal ? children : null}\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n label: {\n fontSize: 16,\n },\n item: {\n margin: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n icon: {\n marginLeft: 8,\n },\n});\n\nexport default withTheme(AccordionGroup);\n"]}
1
+ {"version":3,"sources":["AccordionGroup.tsx"],"names":["AccordionGroup","Icon","openColor","closedColor","caretColor","icon","iconSize","style","label","children","expanded","expandedProp","theme","setExpanded","React","useState","handlePressAction","undefined","expandedInternal","expandedColor","colors","primary","collapsedColor","labelColor","styles","row","item","content","color","Children","map","child","isValidElement","props","left","right","cloneElement","StyleSheet","create","flexDirection","alignItems","fontSize","margin","flex","justifyContent","marginLeft"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;AACA;;;;;;;;AAiBA,MAAMA,cAAc,GAAG,QAYV;AAAA,MAZW;AACtBC,IAAAA,IADsB;AAEtBC,IAAAA,SAFsB;AAGtBC,IAAAA,WAHsB;AAItBC,IAAAA,UAJsB;AAKtBC,IAAAA,IALsB;AAMtBC,IAAAA,QAAQ,GAAG,EANW;AAOtBC,IAAAA,KAPsB;AAQtBC,IAAAA,KARsB;AAStBC,IAAAA,QATsB;AAUtBC,IAAAA,QAAQ,EAAEC,YAVY;AAWtBC,IAAAA;AAXsB,GAYX;AACX,QAAM,CAACF,QAAD,EAAWG,WAAX,IAA0BC,KAAK,CAAC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,IAAD;AACE,IAAA,IAAI,EACFhB,QAAQ,GACJ,iCADI,GAEJ,mCAJR;AAME,IAAA,KAAK,EAAEN,UANT;AAOE,IAAA,IAAI,EAAE;AAPR,IADF,CAvBF,CALF,CADF,EA0CGc,gBAAgB,GACbJ,KAAK,CAACe,QAAN,CAAeC,GAAf,CAAmBrB,QAAnB,EAA8BsB,KAAD,IAAW;AACtC,QACE,cAAAjB,KAAK,CAACkB,cAAN,CAAqBD,KAArB,KACA,CAACA,KAAK,CAACE,KAAN,CAAYC,IADb,IAEA,CAACH,KAAK,CAACE,KAAN,CAAYE,KAHf,EAIE;AACA,0BAAOrB,KAAK,CAACsB,YAAN,CAAmBL,KAAnB,EAA0B;AAC/BxB,QAAAA,KAAK,EAAEwB,KAAK,CAACE,KAAN,CAAY1B;AADY,OAA1B,CAAP;AAGD;;AAED,WAAOwB,KAAP;AACD,GAZD,CADa,GAcb,IAxDN,CADF;AA4DD,CA1FD;;AA4FA,MAAMP,MAAM,GAAGa,wBAAWC,MAAX,CAAkB;AAC/Bb,EAAAA,GAAG,EAAE;AACHc,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE;AAFT,GAD0B;AAK/BhC,EAAAA,KAAK,EAAE;AACLiC,IAAAA,QAAQ,EAAE;AADL,GALwB;AAQ/Bf,EAAAA,IAAI,EAAE;AACJgB,IAAAA,MAAM,EAAE;AADJ,GARyB;AAW/Bf,EAAAA,OAAO,EAAE;AACPgB,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT,GAXsB;AAe/BvC,EAAAA,IAAI,EAAE;AACJwC,IAAAA,UAAU,EAAE;AADR;AAfyB,CAAlB,CAAf;;eAoBe,wBAAU7C,cAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n TextStyle,\n Pressable,\n} from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n openColor: string;\n closedColor: string;\n caretColor: string;\n icon?: string;\n iconSize: number;\n style?: StyleProp<TextStyle>;\n children: React.ReactNode;\n label: string;\n expanded?: boolean;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionGroup = ({\n Icon,\n openColor,\n closedColor,\n caretColor,\n icon,\n iconSize = 24,\n style,\n label,\n children,\n expanded: expandedProp,\n theme,\n}: Props) => {\n const [expanded, setExpanded] = React.useState<boolean>(\n expandedProp || false\n );\n\n const handlePressAction = () => {\n if (expandedProp === undefined) {\n setExpanded(!expanded);\n }\n };\n\n const expandedInternal = expandedProp !== undefined ? expandedProp : expanded;\n\n const expandedColor = openColor || theme.colors.primary;\n const collapsedColor = closedColor || theme.colors.primary;\n\n const labelColor = expanded ? expandedColor : collapsedColor;\n\n return (\n <>\n <Pressable\n style={[style]}\n onPress={handlePressAction}\n accessibilityRole=\"button\"\n >\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={iconSize}\n color={labelColor}\n style={styles.icon}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text\n selectable={false}\n style={[\n styles.label,\n {\n color: labelColor,\n },\n style,\n ]}\n >\n {label}\n </Text>\n </View>\n <View style={[styles.item]}>\n <Icon\n name={\n expanded\n ? \"MaterialIcons/keyboard-arrow-up\"\n : \"MaterialIcons/keyboard-arrow-down\"\n }\n color={caretColor}\n size={24}\n />\n </View>\n </View>\n </Pressable>\n {expandedInternal\n ? React.Children.map(children, (child) => {\n if (\n React.isValidElement(child) &&\n !child.props.left &&\n !child.props.right\n ) {\n return React.cloneElement(child, {\n style: child.props.style,\n });\n }\n\n return child;\n })\n : null}\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n label: {\n fontSize: 16,\n },\n item: {\n margin: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n icon: {\n marginLeft: 8,\n },\n});\n\nexport default withTheme(AccordionGroup);\n"]}
@@ -27,6 +27,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
27
 
28
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
+ 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); }
31
+
30
32
  const FAB = _ref => {
31
33
  let {
32
34
  Icon,
@@ -128,7 +130,7 @@ const FAB = _ref => {
128
130
  style: [{
129
131
  elevation
130
132
  }, style]
131
- }, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
133
+ }, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
132
134
  onPress: onPress,
133
135
  accessibilityState: {
134
136
  disabled
@@ -136,7 +138,7 @@ const FAB = _ref => {
136
138
  accessibilityRole: "button",
137
139
  disabled: disabled || loading,
138
140
  style: buttonStyles
139
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
141
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
140
142
  style: styles.content
141
143
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
142
144
  style: iconStyle
@@ -179,23 +181,5 @@ const styles = _reactNative.StyleSheet.create({
179
181
 
180
182
  var _default = (0, _theming.withTheme)(FAB);
181
183
 
182
- exports.default = _default;
183
- //# sourceMappingURL=DeprecatedFAB.js.map },
184
- icon: {
185
- alignItems: "center",
186
- justifyContent: "center",
187
- width: _Config.default.buttonIconSize
188
- },
189
- fixed: {
190
- left: 0,
191
- right: 0,
192
- bottom: 0,
193
- height: 64,
194
- borderRadius: 0
195
- }
196
- });
197
-
198
- var _default = (0, _theming.withTheme)(FAB);
199
-
200
184
  exports.default = _default;
201
185
  //# sourceMappingURL=DeprecatedFAB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DeprecatedFAB.js"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","React","createElement","Elevation","Touchable","accessibilityState","accessibilityRole","View","name","size","ActivityIndicator","Text","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAuM;AAAA,MAAtM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEC,IAAAA,KAAK,EAAEC,aAAxE;AAAuFC,IAAAA,KAAvF;AAA8FC,IAAAA,OAA9F;AAAuGC,IAAAA,SAAS,GAAG,CAAnH;AAAsHC,IAAAA,KAAtH;AAA6HC,IAAAA,KAAK,EAAE;A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,EAAE,CAAC4B,SAAD,EAAYvB,UAAU,CAACoB,MAAvB;AAA3B,GAA1B,EAAuF5B,KAAvF,CAAJ,GAAqG,IAJ9G,CADJ,CADI,CAAR;AAOH,CAnFD;;AAoFA,MAAM2B,MAAM,GAAGP,wBAAWsC,MAAX,CAAkB;AAC7B9B,EAAAA,MAAM,EAAE;AACJ+B,IAAAA,WAAW,EAAE;AADT,GADqB;AAI7B7B,EAAAA,OAAO,EAAE;AACL8B,IAAAA,aAAa,EAAE,KADV;AAELpC,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GAJoB;AAS7B/B,EAAAA,IAAI,EAAE;AACF8B,IAAAA,UAAU,EAAE,QADV;AAEFC,IAAAA,cAAc,EAAE,QAFd;AAGFS,IAAAA,KAAK,EAAEC,gBAAOC;AAHZ,GATuB;AAc7ByB,EAAAA,KAAK,EAAE;AACHC,IAAAA,IAAI,EAAE,CADH;AAEHC,IAAAA,KAAK,EAAE,CAFJ;AAGHC,IAAAA,MAAM,EAAE,CAHL;AAIH1B,IAAAA,MAAM,EAAE,EAJL;AAKHf,IAAAA,YAAY,EAAE;AALX;AAdsB,CAAlB,CAAf;;eAsBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\n"]}
1
+ {"version":3,"sources":["DeprecatedFAB.tsx"],"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAuDA,MAAMA,GAAoB,GAAG,QAavB;AAAA,MAbwB;AAC5BC,IAAAA,IAD4B;AAE5BC,IAAAA,IAF4B;AAG5BC,IAAAA,QAAQ,GAAG,KAHiB;AAI5BC,IAAAA,IAAI,GAAG,OAJqB;AAK5BC,IAAAA,OAAO,GAAG,KALkB;AAM5BC,IAAAA,KAAK,EAAEC,aANqB;AAO5BC,IAAAA,KAP4B;AAQ5BC,IAAAA,OAR4B;AAS5BC,IAAAA,SAAS,GAAG,CATgB;AAU5BC,IAAAA,KAV4B;AAW5BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAXqB;AAY5B,OAAGC;AAZyB,GAaxB;AACJ,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;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A,IAAI,EAAE,CADD;AAELC,IAAAA,KAAK,EAAE,CAFF;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILd,IAAAA,MAAM,EAAE,EAJH;AAKLf,IAAAA,YAAY,EAAE;AALT;AAdwB,CAAlB,CAAf;;eAuBe,wBAAU/B,GAAV,C","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A floating action button represents the primary action in an application.\n *\n * <div class=\"screenshots\">\n * <img src=\"screenshots/fab-1.png\" />\n * <img src=\"screenshots/fab-2.png\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { StyleSheet } from 'react-native';\n * import { FAB } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <FAB\n * style={styles.fab}\n * type=\"outline\"\n * icon=\"add\"\n * onPress={() => console.log('Pressed')}\n * />\n * );\n *\n * const styles = StyleSheet.create({\n * fab: {\n * position: 'absolute',\n * margin: 16,\n * right: 0,\n * bottom: 0,\n * },\n * })\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"extended\" | \"outline\" | \"fixed\" | \"standard\";\n loading?: boolean;\n icon?: string;\n color?: string;\n label?: string;\n onPress: () => void;\n elevation?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst FAB: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n color: colorOverride,\n label,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle: StyleProp<ViewStyle> = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n const buttonStyles: StyleProp<ViewStyle>[] = [styles.button, buttonStyle];\n\n const contentStyle: StyleProp<ViewStyle>[] = [styles.content];\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n };\n\n const iconStyle: StyleProp<ViewStyle>[] = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n\n textStyle.margin = 16;\n }\n\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n\n return (\n <Elevation style={[{ elevation }, style]}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={buttonStyles}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n {label ? (\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {label}\n </Text>\n ) : null}\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\n\nexport default withTheme(FAB);\n"]}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var React = _interopRequireWildcard(require("react"));
9
+
10
+ var _reactNativeTabView = require("react-native-tab-view");
11
+
12
+ var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+
20
+ 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); }
21
+
22
+ const TabViewComponent = _ref => {
23
+ let {
24
+ Icon,
25
+ tabBarPosition,
26
+ keyboardDismissMode,
27
+ swipeEnabled,
28
+ scrollEnabled,
29
+ activeColor,
30
+ inactiveColor,
31
+ pressColor,
32
+ indicatorColor,
33
+ style,
34
+ children
35
+ } = _ref;
36
+ const [index, setIndex] = React.useState(0);
37
+ const [routes, setRoutes] = React.useState([]);
38
+ const [tabScenes, setTabScenes] = React.useState({});
39
+ React.useEffect(() => {
40
+ const newRoutes = [];
41
+ const scenes = {};
42
+ React.Children.toArray(children).filter(child => child.type === _TabViewItem.default).forEach(child => {
43
+ var _child$props;
44
+
45
+ if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.id) {
46
+ var _child$props2, _child$props3;
47
+
48
+ newRoutes.push({
49
+ key: child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.id,
50
+ ...(child === null || child === void 0 ? void 0 : child.props)
51
+ });
52
+
53
+ scenes[child === null || child === void 0 ? void 0 : (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.id] = () => child;
54
+ }
55
+ });
56
+ setRoutes(newRoutes);
57
+ setTabScenes(scenes);
58
+ }, [children]);
59
+
60
+ const indexChangeHandler = i => setIndex(i);
61
+
62
+ const renderTabBar = props => {
63
+ console.log(props);
64
+ return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
65
+ activeColor: activeColor,
66
+ inactiveColor: inactiveColor,
67
+ pressColor: pressColor,
68
+ scrollEnabled: scrollEnabled,
69
+ indicatorStyle: {
70
+ backgroundColor: indicatorColor
71
+ },
72
+ renderIcon: _ref2 => {
73
+ let {
74
+ route,
75
+ color
76
+ } = _ref2;
77
+ return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
78
+ name: route.icon,
79
+ color: color,
80
+ size: 36
81
+ }) : null;
82
+ },
83
+ style: style
84
+ }));
85
+ };
86
+
87
+ return /*#__PURE__*/React.createElement(_reactNativeTabView.TabView, {
88
+ navigationState: {
89
+ index,
90
+ routes
91
+ },
92
+ renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
93
+ renderTabBar: renderTabBar,
94
+ onIndexChange: indexChangeHandler,
95
+ tabBarPosition: tabBarPosition,
96
+ keyboardDismissMode: keyboardDismissMode,
97
+ swipeEnabled: swipeEnabled
98
+ });
99
+ };
100
+
101
+ var _default = TabViewComponent;
102
+ exports.default = _default;
103
+ //# sourceMappingURL=TabView.js.map
@@ -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,aA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,CAAD,CAA/C;;AAEA,QAAMC,YAAY,GAAIN,KAAD,IAAgB;AACnCO,IAAAA,OAAO,CAACC,GAAR,CAAYR,KAAZ;AACA,wBACE,oBAAC,0BAAD,eACMA,KADN;AAEE,MAAA,WAAW,EAAExB,WAFf;AAGE,MAAA,aAAa,EAAEC,aAHjB;AAIE,MAAA,UAAU,EAAEC,UAJd;AAKE,MAAA,aAAa,EAAEH,aALjB;AAME,MAAA,cAAc,EAAE;AAAEkC,QAAAA,eAAe,EAAE9B;AAAnB,OANlB;AAOE,MAAA,UAAU,EAAE;AAAA,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,6 +357,18 @@ Object.defineProperty(exports, "SwitchRow", {
357
357
  return _Switch.SwitchRow;
358
358
  }
359
359
  });
360
+ Object.defineProperty(exports, "TabView", {
361
+ enumerable: true,
362
+ get: function () {
363
+ return _TabView.TabView;
364
+ }
365
+ });
366
+ Object.defineProperty(exports, "TabViewItem", {
367
+ enumerable: true,
368
+ get: function () {
369
+ return _TabView.TabViewItem;
370
+ }
371
+ });
360
372
  Object.defineProperty(exports, "TextField", {
361
373
  enumerable: true,
362
374
  get: function () {
@@ -456,6 +468,8 @@ var _ActionSheet = require("./components/ActionSheet");
456
468
 
457
469
  var _Swiper = require("./components/Swiper");
458
470
 
471
+ var _TabView = require("./components/TabView");
472
+
459
473
  var _Layout = require("./components/Layout");
460
474
 
461
475
  var _index = require("./components/RadioButton/index");
@@ -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;;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\";\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"]}
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"]}
@@ -11,7 +11,7 @@ const SEED_DATA = {
11
11
  name: "Accordion Group",
12
12
  tag: "AccordionGroup",
13
13
  description: "An expandable container containing components",
14
- category: _types.COMPONENT_TYPES.deprecated,
14
+ category: _types.COMPONENT_TYPES.container,
15
15
  props: {
16
16
  openColor: (0, _types.createColorProp)({
17
17
  label: "Open text color"
@@ -1 +1 @@
1
- {"version":3,"sources":["AccordionGroup.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","deprecated","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,iBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,UAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,4BAAgB;AACzBC,MAAAA,KAAK,EAAE;AADkB,KAAhB,CADN;AAILC,IAAAA,WAAW,EAAE,4BAAgB;AAC3BD,MAAAA,KAAK,EAAE;AADoB,KAAhB,CAJR;AAOLE,IAAAA,UAAU,EAAE,4BAAgB;AAC1BF,MAAAA,KAAK,EAAE;AADmB,KAAhB,CAPP;AAULG,IAAAA,QAAQ,EAAE,6BAAiB;AACzBH,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAjB,CAVL;AAcLJ,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE;AADa,KAAf,CAdF;AAiBLK,IAAAA,QAAQ,EAAE,iCAAqB;AAC7BL,MAAAA,KAAK,EAAE,UADsB;AAE7BN,MAAAA,WAAW,EAAE;AAFgB,KAArB,CAjBL;AAqBLY,IAAAA,IAAI,EAAE;AArBD;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion Group\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.deprecated,\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
1
+ {"version":3,"sources":["AccordionGroup.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","container","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,iBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,SAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,4BAAgB;AACzBC,MAAAA,KAAK,EAAE;AADkB,KAAhB,CADN;AAILC,IAAAA,WAAW,EAAE,4BAAgB;AAC3BD,MAAAA,KAAK,EAAE;AADoB,KAAhB,CAJR;AAOLE,IAAAA,UAAU,EAAE,4BAAgB;AAC1BF,MAAAA,KAAK,EAAE;AADmB,KAAhB,CAPP;AAULG,IAAAA,QAAQ,EAAE,6BAAiB;AACzBH,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAjB,CAVL;AAcLJ,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE;AADa,KAAf,CAdF;AAiBLK,IAAAA,QAAQ,EAAE,iCAAqB;AAC7BL,MAAAA,KAAK,EAAE,UADsB;AAE7BN,MAAAA,WAAW,EAAE;AAFgB,KAArB,CAjBL;AAqBLY,IAAAA,IAAI,EAAE;AArBD;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion Group\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.container,\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
@@ -11,7 +11,7 @@ const SEED_DATA = {
11
11
  name: "Accordion Item",
12
12
  tag: "AccordionItem",
13
13
  description: "Item to be used in Accordion",
14
- category: _types.COMPONENT_TYPES.deprecated,
14
+ category: _types.COMPONENT_TYPES.button,
15
15
  props: {
16
16
  icon: (0, _types.createIconProp)(),
17
17
  label: (0, _types.createTextProp)({
@@ -1 +1 @@
1
- {"version":3,"sources":["AccordionItem.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","deprecated","props","icon","label","iconColor"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,gBADiB;AAEvBC,EAAAA,GAAG,EAAE,eAFkB;AAGvBC,EAAAA,WAAW,EAAE,8BAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,UAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,4BADD;AAELC,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE;AADa,KAAf,CAFF;AAKLC,IAAAA,SAAS,EAAE,4BAAgB;AACzBD,MAAAA,KAAK,EAAE;AADkB,KAAhB;AALN;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createIconProp,\n createTextProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion Item\",\n tag: \"AccordionItem\",\n description: \"Item to be used in Accordion\",\n category: COMPONENT_TYPES.deprecated,\n props: {\n icon: createIconProp(),\n label: createTextProp({\n label: \"Item label\",\n }),\n iconColor: createColorProp({\n label: \"Icon color\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["AccordionItem.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","props","icon","label","iconColor"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,gBADiB;AAEvBC,EAAAA,GAAG,EAAE,eAFkB;AAGvBC,EAAAA,WAAW,EAAE,8BAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,4BADD;AAELC,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE;AADa,KAAf,CAFF;AAKLC,IAAAA,SAAS,EAAE,4BAAgB;AACzBD,MAAAA,KAAK,EAAE;AADkB,KAAhB;AALN;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createIconProp,\n createTextProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion Item\",\n tag: \"AccordionItem\",\n description: \"Item to be used in Accordion\",\n category: COMPONENT_TYPES.button,\n props: {\n icon: createIconProp(),\n label: createTextProp({\n label: \"Item label\",\n }),\n iconColor: createColorProp({\n label: \"Icon color\",\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButton.js"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","props","value","label","description","defaultValue","required","color","group","GROUPS","basic","unselectedColor","disabled","size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CAtBH;AAgCHC,IAAAA,YAAY,EAAE,2BAAe;AACzBf,MAAAA,KAAK,EAAE,eADkB;AAEzBC,MAAAA,WAAW,EAAE,gDAFY;AAGzBC,MAAAA,YAAY,EAAE;AAHW,KAAf,CAhCX;AAqCHc,IAAAA,cAAc,EAAE,2BAAe;AAC3BhB,MAAAA,KAAK,EAAE,iBADoB;AAE3BC,MAAAA,WAAW,EAAE,kDAFc;AAG3BC,MAAAA,YAAY,EAAE;AAHa,KAAf;AArCb;AALc,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createIconProp, createTextProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button\",\n tag: \"RadioButton\",\n category: COMPONENT_TYPES.input,\n triggers: [Triggers.OnPress],\n props: {\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether radio button is disabled\",\n }),\n size: createNumberProp({\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Specifies the size of the button\",\n defaultValue: 24,\n min: 16,\n max: 128,\n step: 1,\n precision: 0,\n }),\n selectedIcon: createIconProp({\n label: \"Selected Icon\",\n description: \"Icon to show when the radio button is selected\",\n defaultValue: \"MaterialIcons/radio-button-checked\",\n }),\n unselectedIcon: createIconProp({\n label: \"Unselected Icon\",\n description: \"Icon to show when the radio button is unselected\",\n defaultValue: \"MaterialIcons/radio-button-unchecked\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["RadioButton.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","props","value","label","description","defaultValue","required","color","group","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C,MAAAA,SAAS,EAAE;AARU,KAAjB,CAtBD;AAgCLC,IAAAA,YAAY,EAAE,2BAAe;AAC3Bf,MAAAA,KAAK,EAAE,eADoB;AAE3BC,MAAAA,WAAW,EAAE,gDAFc;AAG3BC,MAAAA,YAAY,EAAE;AAHa,KAAf,CAhCT;AAqCLc,IAAAA,cAAc,EAAE,2BAAe;AAC7BhB,MAAAA,KAAK,EAAE,iBADsB;AAE7BC,MAAAA,WAAW,EAAE,kDAFgB;AAG7BC,MAAAA,YAAY,EAAE;AAHe,KAAf;AArCX;AALgB,CAAlB","sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n createBoolProp,\n createColorProp,\n createNumberProp,\n createIconProp,\n createTextProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button\",\n tag: \"RadioButton\",\n category: COMPONENT_TYPES.input,\n triggers: [Triggers.OnPress],\n props: {\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether radio button is disabled\",\n }),\n size: createNumberProp({\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Specifies the size of the button\",\n defaultValue: 24,\n min: 16,\n max: 128,\n step: 1,\n precision: 0,\n }),\n selectedIcon: createIconProp({\n label: \"Selected Icon\",\n description: \"Icon to show when the radio button is selected\",\n defaultValue: \"MaterialIcons/radio-button-checked\",\n }),\n unselectedIcon: createIconProp({\n label: \"Unselected Icon\",\n description: \"Icon to show when the radio button is unselected\",\n defaultValue: \"MaterialIcons/radio-button-unchecked\",\n }),\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioButtonRow.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","description","required","defaultValue","direction","options","value","color","group","GROUPS","basic","unselectedColor"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,kBADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE,qCAFO;AAGpBC,MAAAA,QAAQ,EAAE,IAHU;AAIpBC,MAAAA,YAAY,EAAE;AAJM,KAAf,CADF;AAOLC,IAAAA,SAAS,EAAE,+BAAmB;AAC5BJ,MAAAA,KAAK,EAAE,WADqB;AAE5BC,MAAAA,WAAW,EACT,8DAH0B;AAI5BI,MAAAA,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;AAJmB,KAAnB,CAPN;AAaLC,IAAAA,KAAK,EAAE,2BAAe;AACpBN,MAAAA,KAAK,EAAE,OADa;AAEpBC,MAAAA,WAAW,EAAE,2BAFO;AAGpBE,MAAAA,YAAY,EAAE,IAHM;AAIpBD,MAAAA,QAAQ,EAAE;AAJU,KAAf,CAbF;AAmBLK,IAAAA,KAAK,EAAE,4BAAgB;AACrBC,MAAAA,KAAK,EAAEC,cAAOC,KADO;AAErBT,MAAAA,WAAW,EAAE,sBAFQ;AAGrBE,MAAAA,YAAY,EAAE;AAHO,KAAhB,CAnBF;AAwBLQ,IAAAA,eAAe,EAAE,4BAAgB;AAC/BH,MAAAA,KAAK,EAAEC,cAAOC,KADiB;AAE/BV,MAAAA,KAAK,EAAE,kBAFwB;AAG/BC,MAAAA,WAAW,EAAE,iCAHkB;AAI/BE,MAAAA,YAAY,EAAE;AAJiB,KAAhB;AAxBZ;AALgB,CAAlB","sourcesContent":["import {\n createTextProp,\n createTextEnumProp,\n COMPONENT_TYPES,\n createColorProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description:\n \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["RadioButtonRow.js"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","props","label","description","required","defaultValue","direction","options","value","color","group","GROUPS","basic","unselectedColor"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,kBADe;AAErBC,EAAAA,GAAG,EAAE,gBAFgB;AAGrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHL;AAIrBC,EAAAA,MAAM,EAAE,EAJa;AAKrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE,2BAAe;AAClBA,MAAAA,KAAK,EAAE,OADW;AAElBC,MAAAA,WAAW,EAAE,qCAFK;AAGlBC,MAAAA,QAAQ,EAAE,IAHQ;AAIlBC,MAAAA,YAAY,EAAE;AAJI,KAAf,CADJ;AAOHC,IAAAA,SAAS,EAAE,+BAAmB;AAC1BJ,MAAAA,KAAK,EAAE,WADmB;AAE1BC,MAAAA,WAAW,EAAE,8DAFa;AAG1BI,MAAAA,OAAO,EAAE,CAAC,KAAD,EAAQ,aAAR;AAHiB,KAAnB,CAPR;AAYHC,IAAAA,KAAK,EAAE,2BAAe;AAClBN,MAAAA,KAAK,EAAE,OADW;AAElBC,MAAAA,WAAW,EAAE,2BAFK;AAGlBE,MAAAA,YAAY,EAAE,IAHI;AAIlBD,MAAAA,QAAQ,EAAE;AAJQ,KAAf,CAZJ;AAkBHK,IAAAA,KAAK,EAAE,4BAAgB;AACnBC,MAAAA,KAAK,EAAEC,cAAOC,KADK;AAEnBT,MAAAA,WAAW,EAAE,sBAFM;AAGnBE,MAAAA,YAAY,EAAE;AAHK,KAAhB,CAlBJ;AAuBHQ,IAAAA,eAAe,EAAE,4BAAgB;AAC7BH,MAAAA,KAAK,EAAEC,cAAOC,KADe;AAE7BV,MAAAA,KAAK,EAAE,kBAFsB;AAG7BC,MAAAA,WAAW,EAAE,iCAHgB;AAI7BE,MAAAA,YAAY,EAAE;AAJe,KAAhB;AAvBd;AALc,CAAlB","sourcesContent":["import { createTextProp, createTextEnumProp, COMPONENT_TYPES, createColorProp, GROUPS, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Radio Button Row\",\n tag: \"RadioButtonRow\",\n category: COMPONENT_TYPES.input,\n layout: {},\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the radio button\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createTextEnumProp({\n label: \"Direction\",\n description: \"Whether the checkbox will appear on the left or on the right\",\n options: [\"row\", \"row-reverse\"],\n }),\n value: createTextProp({\n label: \"Value\",\n description: \"Value of the radio button\",\n defaultValue: null,\n required: true,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n description: \"Color for the button\",\n defaultValue: \"primary\",\n }),\n unselectedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Unselected Color for the button\",\n defaultValue: \"primary\",\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,gB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YPES,\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"]}
@@ -53,7 +53,15 @@ const AccordionGroup = _ref => {
53
53
  name: expanded ? "MaterialIcons/keyboard-arrow-up" : "MaterialIcons/keyboard-arrow-down",
54
54
  color: caretColor,
55
55
  size: 24
56
- })))), expandedInternal ? children : null);
56
+ })))), expandedInternal ? React.Children.map(children, child => {
57
+ if ( /*#__PURE__*/React.isValidElement(child) && !child.props.left && !child.props.right) {
58
+ return /*#__PURE__*/React.cloneElement(child, {
59
+ style: child.props.style
60
+ });
61
+ }
62
+
63
+ return child;
64
+ }) : null);
57
65
  };
58
66
 
59
67
  const styles = StyleSheet.create({