@draftbit/core 43.2.4-aa029f.0 → 43.2.4-ab2f04.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 (70) hide show
  1. package/lib/commonjs/components/Accordion/AccordionGroup.js +1 -9
  2. package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
  3. package/lib/commonjs/components/DeprecatedFAB.js +20 -4
  4. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  5. package/lib/commonjs/index.js +0 -14
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/commonjs/mappings/Accordion.js +40 -0
  8. package/lib/commonjs/mappings/Accordion.js.map +1 -0
  9. package/lib/commonjs/mappings/AccordionGroup.js +1 -1
  10. package/lib/commonjs/mappings/AccordionGroup.js.map +1 -1
  11. package/lib/commonjs/mappings/AccordionItem.js +1 -1
  12. package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
  13. package/lib/commonjs/mappings/RadioButton.js.map +1 -1
  14. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  15. package/lib/module/components/Accordion/AccordionGroup.js +1 -9
  16. package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
  17. package/lib/module/components/Accordion/AccordionItem.js +5 -22
  18. package/lib/module/components/Elevation.js +15 -4
  19. package/lib/module/components/Elevation.js.map +1 -1
  20. package/lib/module/components/Header.js.map +1 -1
  21. package/lib/module/components/Portal/PortalConsumer.js.map +1 -1
  22. package/lib/module/index.js +0 -1
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/mappings/Accordion.js +31 -0
  25. package/lib/module/mappings/Accordion.js.map +1 -0
  26. package/lib/module/mappings/AccordionGroup.js +1 -1
  27. package/lib/module/mappings/AccordionGroup.js.map +1 -1
  28. package/lib/module/mappings/AccordionItem.js +1 -1
  29. package/lib/module/mappings/AccordionItem.js.map +1 -1
  30. package/lib/module/mappings/MapMarker.js.map +1 -1
  31. package/lib/typescript/src/index.d.ts +0 -1
  32. package/lib/typescript/src/mappings/{TabView.d.ts → Accordion.d.ts} +24 -65
  33. package/package.json +2 -4
  34. package/src/components/Accordion/AccordionGroup.js +1 -12
  35. package/src/components/Accordion/AccordionGroup.tsx +1 -15
  36. package/src/index.js +0 -1
  37. package/src/index.tsx +0 -1
  38. package/src/mappings/Accordion.js +30 -0
  39. package/src/mappings/Accordion.ts +38 -0
  40. package/src/mappings/AccordionGroup.js +1 -1
  41. package/src/mappings/AccordionGroup.ts +1 -1
  42. package/src/mappings/AccordionItem.js +1 -1
  43. package/src/mappings/AccordionItem.ts +1 -1
  44. package/lib/commonjs/components/TabView/TabView.js +0 -103
  45. package/lib/commonjs/components/TabView/TabView.js.map +0 -1
  46. package/lib/commonjs/components/TabView/TabViewItem.js +0 -27
  47. package/lib/commonjs/components/TabView/TabViewItem.js.map +0 -1
  48. package/lib/commonjs/components/TabView/index.js +0 -24
  49. package/lib/commonjs/components/TabView/index.js.map +0 -1
  50. package/lib/commonjs/mappings/TabView.js +0 -80
  51. package/lib/commonjs/mappings/TabView.js.map +0 -1
  52. package/lib/module/components/TabView/TabView.js +0 -88
  53. package/lib/module/components/TabView/TabView.js.map +0 -1
  54. package/lib/module/components/TabView/TabViewItem.js +0 -19
  55. package/lib/module/components/TabView/TabViewItem.js.map +0 -1
  56. package/lib/module/components/TabView/index.js +0 -3
  57. package/lib/module/components/TabView/index.js.map +0 -1
  58. package/lib/module/mappings/TabView.js +0 -71
  59. package/lib/module/mappings/TabView.js.map +0 -1
  60. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
  61. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
  62. package/lib/typescript/src/components/TabView/index.d.ts +0 -2
  63. package/src/components/TabView/TabView.js +0 -33
  64. package/src/components/TabView/TabView.tsx +0 -97
  65. package/src/components/TabView/TabViewItem.js +0 -5
  66. package/src/components/TabView/TabViewItem.tsx +0 -21
  67. package/src/components/TabView/index.js +0 -2
  68. package/src/components/TabView/index.ts +0 -2
  69. package/src/mappings/TabView.js +0 -73
  70. package/src/mappings/TabView.ts +0 -80
@@ -69,15 +69,7 @@ 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 ? 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);
72
+ })))), expandedInternal ? children : null);
81
73
  };
82
74
 
83
75
  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","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,CAACC,QAAN,CAC9BJ,YAAY,IAAI,KADc,CAAhC;;AAIA,QAAMK,iBAAiB,GAAG,MAAM;AAC9B,QAAIL,YAAY,KAAKM,SAArB,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,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"]}
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,SAAjB,GAA6BN,YAA7B,GAA4CD,QAArE;AAEA,QAAMS,aAAa,GAAGjB,SAAS,IAAIU,KAAK,CAACQ,MAAN,CAAaC,OAAhD;AACA,QAAMC,cAAc,GAAGnB,WAAW,IAAIS,KAAK,CAACQ,MAAN,CAAaC,OAAnD;AAEA,QAAME,UAAU,GAAGb,QAAQ,GAAGS,aAAH,GAAmBG,cAA9C;AAEA,sBACE,uDACE,oBAAC,sBAAD;AACE,IAAA,KAAK,EAAE,CAACf,KAAD,CADT;AAEE,IAAA,OAAO,EAAES,iBAFX;AAGE,IAAA,iBAAiB,EAAC;AAHpB,kBAKE,oBAAC,iBAAD;AAAM,IAAA,KA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E;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"]}
@@ -27,8 +27,6 @@ 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
-
32
30
  const FAB = _ref => {
33
31
  let {
34
32
  Icon,
@@ -130,7 +128,7 @@ const FAB = _ref => {
130
128
  style: [{
131
129
  elevation
132
130
  }, style]
133
- }, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
131
+ }, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
134
132
  onPress: onPress,
135
133
  accessibilityState: {
136
134
  disabled
@@ -138,7 +136,7 @@ const FAB = _ref => {
138
136
  accessibilityRole: "button",
139
137
  disabled: disabled || loading,
140
138
  style: buttonStyles
141
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
139
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
142
140
  style: styles.content
143
141
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
144
142
  style: iconStyle
@@ -181,5 +179,23 @@ const styles = _reactNative.StyleSheet.create({
181
179
 
182
180
  var _default = (0, _theming.withTheme)(FAB);
183
181
 
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
+
184
200
  exports.default = _default;
185
201
  //# sourceMappingURL=DeprecatedFAB.js.map
@@ -1 +1 @@
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;AAU5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AAE;AACPkB,IAAAA,aAAa,EAAE,KADR;AAEPxB,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GAJsB;AAS/B/B,EAAAA,IAAI,EAAE;AACJ8B,IAAAA,UAAU,EAAE,QADR;AAEJC,IAAAA,cAAc,EAAE,QAFZ;AAGJS,IAAAA,KAAK,EAAEC,gBAAOC;AAHV,GATyB;AAc/Ba,EAAAA,KAAK,EAAE;AACLC,IAAAA,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"]}
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","numberO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","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"]}
@@ -357,18 +357,6 @@ 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
- });
372
360
  Object.defineProperty(exports, "TextField", {
373
361
  enumerable: true,
374
362
  get: function () {
@@ -468,8 +456,6 @@ var _ActionSheet = require("./components/ActionSheet");
468
456
 
469
457
  var _Swiper = require("./components/Swiper");
470
458
 
471
- var _TabView = require("./components/TabView");
472
-
473
459
  var _Layout = require("./components/Layout");
474
460
 
475
461
  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;;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"]}
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"]}
@@ -0,0 +1,40 @@
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: "Accordion",
12
+ tag: "AccordionGroup",
13
+ description: "An expandable container containing components",
14
+ category: _types.COMPONENT_TYPES.container,
15
+ props: {
16
+ openColor: (0, _types.createColorProp)({
17
+ label: "Open text color"
18
+ }),
19
+ closedColor: (0, _types.createColorProp)({
20
+ label: "Closed text Color"
21
+ }),
22
+ caretColor: (0, _types.createColorProp)({
23
+ label: "Caret color"
24
+ }),
25
+ iconSize: (0, _types.createNumberProp)({
26
+ label: "Icon size",
27
+ defaultValue: 24
28
+ }),
29
+ label: (0, _types.createTextProp)({
30
+ label: "Label"
31
+ }),
32
+ expanded: (0, _types.createStaticBoolProp)({
33
+ label: "Expanded",
34
+ description: "Whether the AccordionGroup should be expanded or not"
35
+ }),
36
+ icon: (0, _types.createIconProp)()
37
+ }
38
+ };
39
+ exports.SEED_DATA = SEED_DATA;
40
+ //# sourceMappingURL=Accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Accordion.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,WADiB;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\",\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 Group",
12
12
  tag: "AccordionGroup",
13
13
  description: "An expandable container containing components",
14
- category: _types.COMPONENT_TYPES.container,
14
+ category: _types.COMPONENT_TYPES.deprecated,
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","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"]}
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"]}
@@ -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.button,
14
+ category: _types.COMPONENT_TYPES.deprecated,
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","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
+ {"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 +1 @@
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","GROUPS","basic","unselectedColor","disabled","size","min","max","step","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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
+ {"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","min","max","step","precision","selectedIcon","unselectedIcon"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,cADe;AAErBC,EAAAA,GAAG,EAAE,aAFgB;AAGrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KAHL;AAIrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CAJW;AAKrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE,2BAAe;AAClBC,MAAAA,KAAK,EAAE,OADW;AAElBC,MAAAA,WAAW,EAAE,2BAFK;AAGlBC,MAAAA,YAAY,EAAE,IAHI;AAIlBC,MAAAA,QAAQ,EAAE;AAJQ,KAAf,CADJ;AAOHC,IAAAA,KAAK,EAAE,4BAAgB;AACnBC,MAAAA,KAAK,EAAEC,cAAOC,KADK;AAEnBN,MAAAA,WAAW,EAAE,sBAFM;AAGnBC,MAAAA,YAAY,EAAE;AAHK,KAAhB,CAPJ;AAYHM,IAAAA,eAAe,EAAE,4BAAgB;AAC7BH,MAAAA,KAAK,EAAEC,cAAOC,KADe;AAE7BP,MAAAA,KAAK,EAAE,kBAFsB;AAG7BC,MAAAA,WAAW,EAAE,iCAHgB;AAI7BC,MAAAA,YAAY,EAAE;AAJe,KAAhB,CAZd;AAkBHO,IAAAA,QAAQ,EAAE,2BAAe;AACrBT,MAAAA,KAAK,EAAE,UADc;AAErBC,MAAAA,WAAW,EAAE;AAFQ,KAAf,CAlBP;AAsBHS,IAAAA,IAAI,EAAE,6BAAiB;AACnBL,MAAAA,KAAK,EAAEC,cAAOC,KADK;AAEnBP,MAAAA,KAAK,EAAE,MAFY;AAGnBC,MAAAA,WAAW,EAAE,kCAHM;AAInBC,MAAAA,YAAY,EAAE,EAJK;AAKnBS,MAAAA,GAAG,EAAE,EALc;AAMnBC,MAAAA,GAAG,EAAE,GANc;AAOnBC,MAAAA,IAAI,EAAE,CAPa;AAQnBC,MAAAA,SAAS,EAAE;AARQ,KAAjB,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 +1 @@
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"]}
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"]}
@@ -53,15 +53,7 @@ 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 ? 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);
56
+ })))), expandedInternal ? children : null);
65
57
  };
66
58
 
67
59
  const styles = StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"sources":["AccordionGroup.tsx"],"names":["React","View","StyleSheet","Pressable","Text","withTheme","AccordionGroup","Icon","openColor","closedColor","caretColor","icon","iconSize","style","label","children","expanded","expandedProp","theme","setExpanded","useState","handlePressAction","undefined","expandedInternal","expandedColor","colors","primary","collapsedColor","labelColor","styles","row","item","content","color","Children","map","child","isValidElement","props","left","right","cloneElement","create","flexDirection","alignItems","fontSize","margin","flex","justifyContent","marginLeft"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,UAFF,EAKEC,SALF,QAMO,cANP;AAOA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,SAAT,QAA0B,eAA1B;;AAiBA,MAAMC,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,IAA0BnB,KAAK,CAACoB,QAAN,CAC9BH,YAAY,IAAI,KADc,CAAhC;;AAIA,QAAMI,iBAAiB,GAAG,MAAM;AAC9B,QAAIJ,YAAY,KAAKK,S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AE;AAPR,IADF,CAvBF,CALF,CADF,EA0CGa,gBAAgB,GACbvB,KAAK,CAACkC,QAAN,CAAeC,GAAf,CAAmBpB,QAAnB,EAA8BqB,KAAD,IAAW;AACtC,QACE,cAAApC,KAAK,CAACqC,cAAN,CAAqBD,KAArB,KACA,CAACA,KAAK,CAACE,KAAN,CAAYC,IADb,IAEA,CAACH,KAAK,CAACE,KAAN,CAAYE,KAHf,EAIE;AACA,0BAAOxC,KAAK,CAACyC,YAAN,CAAmBL,KAAnB,EAA0B;AAC/BvB,QAAAA,KAAK,EAAEuB,KAAK,CAACE,KAAN,CAAYzB;AADY,OAA1B,CAAP;AAGD;;AAED,WAAOuB,KAAP;AACD,GAZD,CADa,GAcb,IAxDN,CADF;AA4DD,CA1FD;;AA4FA,MAAMP,MAAM,GAAG3B,UAAU,CAACwC,MAAX,CAAkB;AAC/BZ,EAAAA,GAAG,EAAE;AACHa,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE;AAFT,GAD0B;AAK/B9B,EAAAA,KAAK,EAAE;AACL+B,IAAAA,QAAQ,EAAE;AADL,GALwB;AAQ/Bd,EAAAA,IAAI,EAAE;AACJe,IAAAA,MAAM,EAAE;AADJ,GARyB;AAW/Bd,EAAAA,OAAO,EAAE;AACPe,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT,GAXsB;AAe/BrC,EAAAA,IAAI,EAAE;AACJsC,IAAAA,UAAU,EAAE;AADR;AAfyB,CAAlB,CAAf;AAoBA,eAAe5C,SAAS,CAACC,cAAD,CAAxB","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"]}
1
+ {"version":3,"sources":["AccordionGroup.tsx"],"names":["React","View","StyleSheet","Pressable","Text","withTheme","AccordionGroup","Icon","openColor","closedColor","caretColor","icon","iconSize","style","label","children","expanded","expandedProp","theme","setExpanded","useState","handlePressAction","undefined","expandedInternal","expandedColor","colors","primary","collapsedColor","labelColor","styles","row","item","content","color","create","flexDirection","alignItems","fontSize","margin","flex","justifyContent","marginLeft"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,UAFF,EAKEC,SALF,QAMO,cANP;AAOA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,SAAT,QAA0B,eAA1B;;AAiBA,MAAMC,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,IAA0BnB,KAAK,CAACoB,QAAN,CAC9BH,YAAY,IAAI,KADc,CAAhC;;AAIA,QAAMI,iBAAiB,GAAG,MAAM;AAC9B,QAAIJ,YAAY,KAAKK,SAArB,EAAgC;AAC9BH,MAAAA,WAAW,CAAC,CAACH,QAAF,CAAX;AACD;AACF,GAJD;;AAMA,QAAMO,gBAAgB,GAAGN,YAAY,KAAKK,SAAjB,GAA6BL,YAA7B,GAA4CD,QAArE;AAEA,QAAMQ,aAAa,GAAGhB,SAAS,IAAIU,KAAK,CAACO,MAAN,CAAaC,OAAhD;AACA,QAAMC,cAAc,GAAGlB,WAAW,IAAIS,KAAK,CAACO,MAAN,CAAaC,OAAnD;AAEA,QAAME,UAAU,GAAGZ,QAAQ,GAAGQ,aAAH,GAAmBG,cAA9C;AAEA,sBACE,uDACE,oBA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AW/BN,EAAAA,OAAO,EAAE;AACPO,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT,GAXsB;AAe/B7B,EAAAA,IAAI,EAAE;AACJ8B,IAAAA,UAAU,EAAE;AADR;AAfyB,CAAlB,CAAf;AAoBA,eAAepC,SAAS,CAACC,cAAD,CAAxB","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,3 +1,5 @@
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
+
1
3
  import * as React from "react";
2
4
  import { Pressable, StyleSheet, View } from "react-native";
3
5
  import Text from "../Text";
@@ -18,10 +20,9 @@ const AccordionItem = _ref => {
18
20
  textStyles,
19
21
  viewStyles
20
22
  } = extractStyles(style);
21
- return /*#__PURE__*/React.createElement(Pressable, {
22
- style: [styles.container, viewStyles],
23
- ...rest
24
- }, /*#__PURE__*/React.createElement(View, {
23
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
24
+ style: [styles.container, viewStyles]
25
+ }, rest), /*#__PURE__*/React.createElement(View, {
25
26
  style: styles.row
26
27
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
27
28
  name: icon,
@@ -54,22 +55,4 @@ const styles = StyleSheet.create({
54
55
  }
55
56
  });
56
57
  export default withTheme(AccordionItem);
57
- //# sourceMappingURL=AccordionItem.js.map container: {
58
- padding: 8
59
- },
60
- row: {
61
- flexDirection: "row",
62
- alignItems: "center",
63
- paddingLeft: 8
64
- },
65
- item: {
66
- marginVertical: 6,
67
- paddingLeft: 8
68
- },
69
- content: {
70
- flex: 1,
71
- justifyContent: "center"
72
- }
73
- });
74
- export default withTheme(AccordionItem);
75
58
  //# sourceMappingURL=AccordionItem.js.map
@@ -1,11 +1,9 @@
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
1
  import * as React from "react";
4
2
  import { Animated, StyleSheet, View } from "react-native";
5
3
  import shadow from "../styles/shadow";
6
4
  import { withTheme } from "../theming";
7
-
8
5
  /* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
6
+
9
7
  const Elevation = _ref => {
10
8
  let {
11
9
  style,
@@ -21,11 +19,24 @@ const Elevation = _ref => {
21
19
  colors
22
20
  } = theme;
23
21
  const borderRadius = radius;
24
- return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
22
+ return /*#__PURE__*/React.createElement(Animated.View, { ...rest,
25
23
  style: [{
26
24
  borderRadius,
27
25
  backgroundColor: colors.surface
28
26
  }, elevation ? shadow(elevation) : null, style]
27
+ }, /*#__PURE__*/React.createElement(View, {
28
+ style: {
29
+ overflow: "hidden",
30
+ borderRadius
31
+ }
32
+ }, children));
33
+ };
34
+
35
+ export default withTheme(Elevation);
36
+ //# sourceMappingURL=Elevation.js.map style: [{
37
+ borderRadius,
38
+ backgroundColor: colors.surface
39
+ }, elevation ? shadow(elevation) : null, style]
29
40
  }), /*#__PURE__*/React.createElement(View, {
30
41
  style: {
31
42
  overflow: "hidden",
@@ -1 +1 @@
1
- {"version":3,"sources":["Elevation.tsx"],"names":["React","Animated","StyleSheet","View","shadow","withTheme","Elevation","style","theme","children","rest","elevation","borderRadius","radius","flatten","colors","backgroundColor","surface","overflow"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,UAFF,EAMEC,IANF,QAOO,cAPP;AAQA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAQA;AACA,MAAMC,SAA0B,GAAG,QAAyC;AAAA,MAAxC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,QAAhB;AAA0B,OAAGC;AAA7B,GAAwC;AAC1E,QAAM;AAAEC,IAAAA,SAAS,GAAG,CAAd;AAAiBC,IAAAA,YAAY,EAAEC;AAA/B,MACJX,UAAU,CAACY,OAAX,CAAmBP,KAAnB,KAA6B,EAD/B;AAEA,QAAM;AAAEQ,IAAAA;AAAF,MAAaP,KAAnB;AACA,QAAMI,YAAY,GAAGC,MAArB;AAEA,sBACE,oBAAC,QAAD,CAAU,IAAV,eACMH,IADN;AAEE,IAAA,KAAK,EAAE,CACL;AACEE,MAAAA,YADF;AAEEI,MAAAA,eAAe,EAAED,MAAM,CAACE;AAF1B,KADK,EAKLN,SAAS,GAAGP,MAAM,CAACO,SAAD,CAAT,GAAuB,IAL3B,EAMLJ,KANK;AAFT,mBAWE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE;AAAEW,MAAAA,QAAQ,EAAE,QAAZ;AAAsBN,MAAAA;AAAtB;AAAb,KAAoDH,QAApD,CAXF,CADF;AAeD,CArBD;;AAuBA,eAAeJ,SAAS,CAACC,SAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n View,\n} from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation: React.FC<Props> = ({ style, theme, children, ...rest }) => {\n const { elevation = 4, borderRadius: radius } =\n StyleSheet.flatten(style) || {};\n const { colors } = theme;\n const borderRadius = radius;\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n borderRadius,\n backgroundColor: colors.surface,\n },\n elevation ? shadow(elevation) : null,\n style,\n ]}\n >\n <View style={{ overflow: \"hidden\", borderRadius }}>{children}</View>\n </Animated.View>\n );\n};\n\nexport default withTheme(Elevation);\n"]}
1
+ {"version":3,"sources":["Elevation.js"],"names":["React","Animated","StyleSheet","View","shadow","withTheme","Elevation","style","theme","children","rest","elevation","borderRadius","radius","flatten","colors","createElement","backgroundColor","surface","overflow"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAAmBC,UAAnB,EAA+BC,IAA/B,QAA4C,cAA5C;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA;;AACA,MAAMC,SAAS,GAAG,QAAyC;AAAA,MAAxC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,QAAhB;AAA0B,OAAGC;AAA7B,GAAwC;AACvD,QAAM;AAAEC,IAAAA,SAAS,GAAG,CAAd;AAAiBC,IAAAA,YAAY,EAAEC;AAA/B,MAA0CX,UAAU,CAACY,OAAX,CAAmBP,KAAnB,KAA6B,EAA7E;AACA,QAAM;AAAEQ,IAAAA;AAAF,MAAaP,KAAnB;AACA,QAAMI,YAAY,GAAGC,MAArB;AACA,sBAAQb,KAAK,CAACgB,aAAN,CAAoBf,QAAQ,CAACE,IAA7B,EAAmC,EAAE,GAAGO,IAAL;AAAWH,IAAAA,KAAK,EAAE,CACrD;AACIK,MAAAA,YADJ;AAEIK,MAAAA,eAAe,EAAEF,MAAM,CAACG;AAF5B,KADqD,EAKrDP,SAAS,GAAGP,MAAM,CAACO,SAAD,CAAT,GAAuB,IALqB,EAMrDJ,KANqD;AAAlB,GAAnC,eAQJP,KAAK,CAACgB,aAAN,CAAoBb,IAApB,EAA0B;AAAEI,IAAAA,KAAK,EAAE;AAAEY,MAAAA,QAAQ,EAAE,QAAZ;AAAsBP,MAAAA;AAAtB;AAAT,GAA1B,EAA2EH,QAA3E,CARI,CAAR;AASH,CAbD;;AAcA,eAAeJ,SAAS,CAACC,SAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { Animated, StyleSheet, View, } from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation = ({ style, theme, children, ...rest }) => {\n const { elevation = 4, borderRadius: radius } = StyleSheet.flatten(style) || {};\n const { colors } = theme;\n const borderRadius = radius;\n return (React.createElement(Animated.View, { ...rest, style: [\n {\n borderRadius,\n backgroundColor: colors.surface,\n },\n elevation ? shadow(elevation) : null,\n style,\n ] },\n React.createElement(View, { style: { overflow: \"hidden\", borderRadius } }, children)));\n};\nexport default withTheme(Elevation);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Header.js"],"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","createElement","styles","container","topContainer","color","flex","numberOfLines","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","name","size","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,UAArB,QAAwC,cAAxC;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AACA,MAAMC,MAAM,GAAG,QAAqI;AAAA,MAApI;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,cAAR;AAAwBC,IAAAA,UAAxB;AAAoCC,IAAAA,KAApC;AAA2CC,IAAAA,UAA3C;AAAuDC,IAAAA,gBAAvD;AAAyEC,IAAAA,IAAzE;AAA+EC,IAAAA,OAA/E;AAAwFC,IAAAA,KAAxF;AAA+FC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AA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CX,IAAAA,KAAK,EAAEN,MAAM,CAACa;AAAzD,GAA1B,CARJ,CADQ,CARhB,CADI,eAmBJhC,KAAK,CAACqB,aAAN,CAAoBhB,OAApB,EAA6B;AAAEY,IAAAA,KAAK,EAAE;AAAEoB,MAAAA,SAAS,EAAEvB,gBAAgB,IAAI;AAAjC;AAAT,GAA7B,CAnBI,CAAR;AAoBH,CArBD;;AAsBA,MAAMQ,MAAM,GAAGnB,UAAU,CAACmC,MAAX,CAAkB;AAC7Bf,EAAAA,SAAS,EAAE;AACPK,IAAAA,SAAS,EAAE;AADJ,GADkB;AAI7BJ,EAAAA,YAAY,EAAE;AACVe,IAAAA,aAAa,EAAE,KADL;AAEVC,IAAAA,cAAc,EAAE,eAFN;AAGVC,IAAAA,UAAU,EAAE;AAHF,GAJe;AAS7BX,EAAAA,eAAe,EAAE;AACbS,IAAAA,aAAa,EAAE,KADF;AAEbC,IAAAA,cAAc,EAAE,QAFH;AAGbC,IAAAA,UAAU,EAAE;AAHC;AATY,CAAlB,CAAf;AAeA,eAAerC,SAAS,CAACI,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, Text, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\nconst Header = ({ Icon, titleTypeStyle, titleColor, title, buttonText, dividerTopMargin, icon, onPress, style, theme: { colors, typography }, }) => {\n return (React.createElement(View, { style: [styles.container, style] },\n React.createElement(View, { style: styles.topContainer },\n React.createElement(Text, { style: [\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ], numberOfLines: 1 }, title),\n onPress && (React.createElement(Touchable, { style: { alignSelf: \"center\", marginLeft: 12 }, onPress: onPress },\n React.createElement(View, { style: styles.buttonContainer },\n React.createElement(Text, { style: [\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ], numberOfLines: 1 }, buttonText),\n React.createElement(Icon, { name: icon, size: Config.headerIconSize, color: colors.light }))))),\n React.createElement(Divider, { style: { marginTop: dividerTopMargin || 16 } })));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\nexport default withTheme(Header);\n"]}
1
+ {"version":3,"sources":["Header.tsx"],"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","styles","container","topContainer","color","flex","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,IAFF,EAGEC,UAHF,QAOO,cAPP;AAQA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAiBA,MAAMC,MAAuB,GAAG,QAW1B;AAAA,MAX2B;AAC/BC,IAAAA,IAD+B;AAE/BC,IAAAA,cAF+B;AAG/BC,IAAAA,UAH+B;AAI/BC,IAAAA,KAJ+B;AAK/BC,IAAAA,UAL+B;AAM/BC,IAAAA,gBAN+B;AAO/BC,IAAAA,IAP+B;AAQ/BC,IAAAA,OAR+B;AAS/BC,IAAAA,KAT+B;AAU/BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAVwB,GAW3B;AACJ,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmBL,KAAnB;AAAb,kBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEI,MAAM,CAACE;AAApB,kBACE,oBA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FD;AAGfC,IAAAA,UAAU,EAAE;AAHG;AATc,CAAlB,CAAf;AAgBA,eAAejC,SAAS,CAACI,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor: string;\n title: string;\n buttonText: string;\n dividerTopMargin?: number;\n icon: string;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst Header: React.FC<Props> = ({\n Icon,\n titleTypeStyle,\n titleColor,\n title,\n buttonText,\n dividerTopMargin,\n icon,\n onPress,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <View style={[styles.container, style]}>\n <View style={styles.topContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {onPress && (\n <Touchable\n style={{ alignSelf: \"center\", marginLeft: 12 }}\n onPress={onPress}\n >\n <View style={styles.buttonContainer}>\n <Text\n style={[\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ]}\n numberOfLines={1}\n >\n {buttonText}\n </Text>\n <Icon\n name={icon}\n size={Config.headerIconSize}\n color={colors.light}\n />\n </View>\n </Touchable>\n )}\n </View>\n <Divider style={{ marginTop: dividerTopMargin || 16 }} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\n\nexport default withTheme(Header);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["PortalConsumer.tsx"],"names":["React","PortalConsumer","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAQA,eAAe,MAAMC,cAAN,SAA6BD,KAAK,CAACE,SAAnC,CAAoD;AAAA;AAAA;;AAAA;AAAA;;AAC1C,QAAjBC,iBAAiB,GAAG;AACxB,SAAKC,YAAL,GADwB,CAGxB;;AACA,UAAMC,OAAO,CAACC,OAAR,EAAN;AAEA,SAAKC,GAAL,GAAW,KAAKC,KAAL,CAAWC,OAAX,CAAmBC,KAAnB,CAAyB,KAAKF,KAAL,CAAWG,QAApC,CAAX;AACD;;AAEDC,EAAAA,kBAAkB,GAAG;AACnB,SAAKR,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBI,MAAnB,CAA0B,KAAKN,GAA/B,EAAoC,KAAKC,KAAL,CAAWG,QAA/C;AACD;;AAEDG,EAAAA,oBAAoB,GAAG;AACrB,SAAKV,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBM,OAAnB,CAA2B,KAAKR,GAAhC;AACD;;AAIOH,EAAAA,YAAY,GAAG;AACrB,QAAI,CAAC,KAAKI,KAAL,CAAWC,OAAhB,EAAyB;AACvB,YAAM,IAAIO,KAAJ,CACJ,+GACE,iGADF,GAEE,qEAHE,CAAN;AAKD;AACF;;AAEDC,EAAAA,MAAM,GAAG;AACP,WAAO,IAAP;AACD;;AApCgE","sourcesContent":["import * as React from \"react\";\nimport { PortalMethods } from \"./PortalHost\";\n\ntype Props = {\n manager: PortalMethods;\n children: React.ReactNode;\n};\n\nexport default class PortalConsumer extends React.Component<Props> {\n async componentDidMount() {\n this.checkManager();\n\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n\n this.key = this.props.manager.mount(this.props.children);\n }\n\n componentDidUpdate() {\n this.checkManager();\n\n this.props.manager.update(this.key, this.props.children);\n }\n\n componentWillUnmount() {\n this.checkManager();\n\n this.props.manager.unmount(this.key);\n }\n\n private key: any;\n\n private checkManager() {\n if (!this.props.manager) {\n throw new Error(\n \"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\"\n );\n }\n }\n\n render() {\n return null;\n }\n}\n"]}
1
+ {"version":3,"sources":["PortalConsumer.js"],"names":["React","PortalConsumer","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,eAAe,MAAMC,cAAN,SAA6BD,KAAK,CAACE,SAAnC,CAA6C;AAAA;AAAA;;AAAA;AAAA;;AACjC,QAAjBC,iBAAiB,GAAG;AACtB,SAAKC,YAAL,GADsB,CAEtB;;AACA,UAAMC,OAAO,CAACC,OAAR,EAAN;AACA,SAAKC,GAAL,GAAW,KAAKC,KAAL,CAAWC,OAAX,CAAmBC,KAAnB,CAAyB,KAAKF,KAAL,CAAWG,QAApC,CAAX;AACH;;AACDC,EAAAA,kBAAkB,GAAG;AACjB,SAAKR,YAAL;AACA,SAAKI,KAAL,CAAWC,OAAX,CAAmBI,MAAnB,CAA0B,KAAKN,GAA/B,EAAoC,KAAKC,KAAL,CAAWG,QAA/C;AACH;;AACDG,EAAAA,oBAAoB,GAAG;AACnB,SAAKV,YAAL;AACA,SAAKI,KAAL,CAAWC,OAAX,CAAmBM,OAAnB,CAA2B,KAAKR,GAAhC;AACH;;AAEDH,EAAAA,YAAY,GAAG;AACX,QAAI,CAAC,KAAKI,KAAL,CAAWC,OAAhB,EAAyB;AACrB,YAAM,IAAIO,KAAJ,CAAU,+GACZ,iGADY,GAEZ,qEAFE,CAAN;AAGH;AACJ;;AACDC,EAAAA,MAAM,GAAG;AACL,WAAO,IAAP;AACH;;AAzBuD","sourcesContent":["import * as React from \"react\";\nexport default class PortalConsumer extends React.Component {\n async componentDidMount() {\n this.checkManager();\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n this.key = this.props.manager.mount(this.props.children);\n }\n componentDidUpdate() {\n this.checkManager();\n this.props.manager.update(this.key, this.props.children);\n }\n componentWillUnmount() {\n this.checkManager();\n this.props.manager.unmount(this.key);\n }\n key;\n checkManager() {\n if (!this.props.manager) {\n throw new Error(\"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\");\n }\n }\n render() {\n return null;\n }\n}\n"]}
@@ -27,7 +27,6 @@ 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";
31
30
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
32
31
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
33
32
  /* Deprecated: Fix or Delete! */