@draftbit/core 46.1.4-e6469c.0 → 46.2.1-327d47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
  2. package/lib/commonjs/components/CardBlock.js +15 -5
  3. package/lib/commonjs/components/CardBlock.js.map +1 -1
  4. package/lib/commonjs/components/Carousel.js +3 -1
  5. package/lib/commonjs/components/Carousel.js.map +1 -1
  6. package/lib/commonjs/components/Checkbox/Checkbox.js +2 -4
  7. package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
  8. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
  9. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  10. package/lib/commonjs/components/Checkbox/context.js +1 -1
  11. package/lib/commonjs/components/Checkbox/context.js.map +1 -1
  12. package/lib/commonjs/components/CircleImage.js +17 -3
  13. package/lib/commonjs/components/CircleImage.js.map +1 -1
  14. package/lib/commonjs/components/Config.js +3 -3
  15. package/lib/commonjs/components/Config.js.map +1 -1
  16. package/lib/commonjs/components/DatePicker/DatePicker.js +10 -11
  17. package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
  18. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  19. package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
  20. package/lib/commonjs/components/DeprecatedButton.js +4 -20
  21. package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
  22. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
  23. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  24. package/lib/commonjs/components/DeprecatedFAB.js +21 -4
  25. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  26. package/lib/commonjs/components/HeaderLarge.js.map +1 -1
  27. package/lib/commonjs/components/Picker/Picker.js +4 -5
  28. package/lib/commonjs/components/Picker/Picker.js.map +1 -1
  29. package/lib/commonjs/components/Picker/PickerComponent.android.js +135 -0
  30. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -0
  31. package/lib/commonjs/components/Picker/PickerComponent.ios.js +161 -0
  32. package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -0
  33. package/lib/commonjs/components/Picker/PickerComponent.web.js +136 -0
  34. package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -0
  35. package/lib/commonjs/components/Picker/PickerTypes.js +6 -0
  36. package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -0
  37. package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
  38. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  39. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
  40. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  41. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
  42. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  43. package/lib/commonjs/components/StepIndicator.js +1 -1
  44. package/lib/commonjs/components/StepIndicator.js.map +1 -1
  45. package/lib/commonjs/components/Stepper.js +1 -1
  46. package/lib/commonjs/components/Stepper.js.map +1 -1
  47. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  48. package/lib/commonjs/components/Text.js +38 -11
  49. package/lib/commonjs/components/Text.js.map +1 -1
  50. package/lib/commonjs/mappings/CardContainerRating.js.map +1 -1
  51. package/lib/commonjs/mappings/Checkbox.js.map +1 -1
  52. package/lib/commonjs/mappings/NumberInput.js +241 -0
  53. package/lib/commonjs/mappings/NumberInput.js.map +1 -0
  54. package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
  55. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  56. package/lib/commonjs/mappings/Text.js +33 -26
  57. package/lib/commonjs/mappings/Text.js.map +1 -1
  58. package/lib/commonjs/mappings/TextArea.js +192 -2
  59. package/lib/commonjs/mappings/TextArea.js.map +1 -1
  60. package/lib/commonjs/mappings/TextField.js +191 -2
  61. package/lib/commonjs/mappings/TextField.js.map +1 -1
  62. package/lib/commonjs/mappings/TextInput.js +180 -29
  63. package/lib/commonjs/mappings/TextInput.js.map +1 -1
  64. package/lib/commonjs/mappings/Video.js.map +1 -1
  65. package/lib/commonjs/styles/DarkTheme.js.map +1 -1
  66. package/lib/commonjs/utilities.js +1 -1
  67. package/lib/commonjs/utilities.js.map +1 -1
  68. package/lib/module/components/Carousel.js +3 -1
  69. package/lib/module/components/Carousel.js.map +1 -1
  70. package/lib/module/components/Config.js +3 -3
  71. package/lib/module/components/Config.js.map +1 -1
  72. package/lib/module/components/DatePicker/DatePicker.js +3 -3
  73. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  74. package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
  75. package/lib/module/components/Picker/Picker.js +4 -5
  76. package/lib/module/components/Picker/Picker.js.map +1 -1
  77. package/lib/module/components/Picker/PickerComponent.android.js +112 -0
  78. package/lib/module/components/Picker/PickerComponent.android.js.map +1 -0
  79. package/lib/module/components/Picker/PickerComponent.ios.js +135 -0
  80. package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -0
  81. package/lib/module/components/Picker/PickerComponent.web.js +113 -0
  82. package/lib/module/components/Picker/PickerComponent.web.js.map +1 -0
  83. package/lib/module/components/Picker/PickerTypes.js +2 -0
  84. package/lib/module/components/Picker/PickerTypes.js.map +1 -0
  85. package/lib/module/components/RadioButton/RadioButton.js +1 -1
  86. package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
  87. package/lib/module/components/RadioButton/RadioButtonRow.js +1 -1
  88. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  89. package/lib/module/components/StepIndicator.js +1 -1
  90. package/lib/module/components/StepIndicator.js.map +1 -1
  91. package/lib/module/components/Stepper.js +1 -1
  92. package/lib/module/components/Stepper.js.map +1 -1
  93. package/lib/module/components/Touchable.js +2 -16
  94. package/lib/module/components/Touchable.js.map +1 -1
  95. package/lib/module/mappings/NumberInput.js +231 -0
  96. package/lib/module/mappings/NumberInput.js.map +1 -0
  97. package/lib/module/mappings/Surface.js.map +1 -1
  98. package/lib/module/mappings/Text.js +33 -26
  99. package/lib/module/mappings/Text.js.map +1 -1
  100. package/lib/module/mappings/TextArea.js +193 -3
  101. package/lib/module/mappings/TextArea.js.map +1 -1
  102. package/lib/module/mappings/TextField.js +192 -3
  103. package/lib/module/mappings/TextField.js.map +1 -1
  104. package/lib/module/mappings/TextInput.js +180 -29
  105. package/lib/module/mappings/TextInput.js.map +1 -1
  106. package/lib/module/utilities.js +1 -1
  107. package/lib/module/utilities.js.map +1 -1
  108. package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +6 -0
  109. package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +7 -0
  110. package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +6 -0
  111. package/lib/typescript/src/components/Picker/PickerTypes.d.ts +18 -0
  112. package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
  113. package/lib/typescript/src/mappings/Text.d.ts +24 -10
  114. package/lib/typescript/src/mappings/TextArea.d.ts +12 -11
  115. package/lib/typescript/src/mappings/TextField.d.ts +4 -4
  116. package/lib/typescript/src/mappings/TextInput.d.ts +3 -254
  117. package/package.json +3 -3
  118. package/src/components/ActionSheet/ActionSheet.js +1 -1
  119. package/src/components/Carousel.js +4 -2
  120. package/src/components/Checkbox/Checkbox.js +3 -3
  121. package/src/components/Checkbox/CheckboxGroupRow.js +2 -2
  122. package/src/components/Checkbox/CheckboxRow.js +3 -3
  123. package/src/components/CircularProgress.js +29 -26
  124. package/src/components/DatePicker/DatePicker.js +1 -1
  125. package/src/components/NumberInput.js +1 -1
  126. package/src/components/Picker/Picker.js +8 -8
  127. package/src/components/Picker/Picker.tsx +8 -6
  128. package/src/components/Picker/PickerComponent.android.js +69 -0
  129. package/src/components/Picker/PickerComponent.android.tsx +116 -0
  130. package/src/components/Picker/PickerComponent.ios.js +79 -0
  131. package/src/components/Picker/PickerComponent.ios.tsx +142 -0
  132. package/src/components/Picker/PickerComponent.web.js +70 -0
  133. package/src/components/Picker/PickerComponent.web.tsx +117 -0
  134. package/src/components/Picker/PickerTypes.js +1 -0
  135. package/src/components/Picker/PickerTypes.ts +18 -0
  136. package/src/components/Portal/Portal.js +2 -2
  137. package/src/components/Portal/PortalConsumer.js +0 -1
  138. package/src/components/Portal/PortalHost.js +43 -41
  139. package/src/components/Portal/PortalManager.js +21 -18
  140. package/src/components/ProgressBar.js +9 -9
  141. package/src/components/RadioButton/RadioButton.js +3 -3
  142. package/src/components/RadioButton/RadioButtonGroup.js +1 -1
  143. package/src/components/RadioButton/RadioButtonRow.js +3 -3
  144. package/src/components/StepIndicator.js +225 -225
  145. package/src/components/Stepper.js +2 -2
  146. package/src/components/Text.js +0 -1
  147. package/src/components/TextField.js +62 -59
  148. package/src/constants.js +1 -1
  149. package/src/mappings/NumberInput.js +248 -0
  150. package/src/mappings/NumberInput.ts +267 -0
  151. package/src/mappings/Text.js +33 -26
  152. package/src/mappings/Text.ts +34 -27
  153. package/src/mappings/TextArea.js +221 -3
  154. package/src/mappings/TextArea.ts +227 -3
  155. package/src/mappings/TextField.js +220 -3
  156. package/src/mappings/TextField.ts +227 -3
  157. package/src/mappings/TextInput.js +208 -31
  158. package/src/mappings/TextInput.ts +214 -34
@@ -1 +1 @@
1
- {"version":3,"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress"],"sources":["RadioButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { useRadioButtonGroupContext } from \"./context\";\n\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nexport type RadioButtonProps = {\n selected?: boolean;\n disabled?: boolean;\n color?: string;\n value?: string | number;\n unselectedColor?: string;\n onPress?: (value?: string) => void;\n style?: StyleProp<ViewStyle>;\n size?: number;\n selectedIcon?: string;\n unselectedIcon?: string;\n} & IconSlot;\n\nconst RadioButton: React.FC<RadioButtonProps> = ({\n Icon,\n disabled = false,\n color,\n value = \"\",\n selected,\n unselectedColor,\n onPress,\n size = Config.radioButtonSize,\n selectedIcon = \"MaterialIcons/radio-button-checked\",\n unselectedIcon = \"MaterialIcons/radio-button-unchecked\",\n style,\n ...rest\n}) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={isSelected ? selectedIcon : unselectedIcon}\n color={isSelected ? color : unselectedColor}\n disabled={disabled}\n onPress={handlePress}\n size={size}\n style={style}\n {...rest}\n />\n );\n};\n\nexport default RadioButton;\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;AAiBA,MAAMA,WAAuC,GAAG,QAa1C;EAAA,IAb2C;IAC/CC,IAD+C;IAE/CC,QAAQ,GAAG,KAFoC;IAG/CC,KAH+C;IAI/CC,KAAK,GAAG,EAJuC;IAK/CC,QAL+C;IAM/CC,eAN+C;IAO/CC,OAP+C;IAQ/CC,IAAI,GAAGC,eAAA,CAAOC,eARiC;IAS/CC,YAAY,GAAG,oCATgC;IAU/CC,cAAc,GAAG,sCAV8B;IAW/CC,KAX+C;IAY/C,GAAGC;EAZ4C,CAa3C;EACJ,MAAM;IAAEV,KAAK,EAAEW,YAAT;IAAuBC;EAAvB,IAAyC,IAAAC,mCAAA,GAA/C;EAEA,MAAMC,SAAS,GAAG,IAAAC,iCAAA,EAAuBf,KAAvB,CAAlB;EACA,MAAMgB,gBAAgB,GAAG,IAAAD,iCAAA,EAAuBJ,YAAvB,CAAzB;EACA,MAAMM,UAAU,GAAGhB,QAAQ,IAAIe,gBAAgB,KAAKF,SAApD;;EAEA,MAAMI,WAAW,GAAG,MAAM;IACxBf,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGW,SAAH,CAAP;IACAF,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGE,SAAH,CAAb;EACD,CAHD;;EAKA,oBACE,oBAAC,mBAAD;IACE,IAAI,EAAEjB,IADR;IAEE,IAAI,EAAEoB,UAAU,GAAGV,YAAH,GAAkBC,cAFpC;IAGE,KAAK,EAAES,UAAU,GAAGlB,KAAH,GAAWG,eAH9B;IAIE,QAAQ,EAAEJ,QAJZ;IAKE,OAAO,EAAEoB,WALX;IAME,IAAI,EAAEd,IANR;IAOE,KAAK,EAAEK;EAPT,GAQMC,IARN,EADF;AAYD,CArCD;;eAuCed,W"}
1
+ {"version":3,"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress"],"sources":["RadioButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { useRadioButtonGroupContext } from \"./context\";\n\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nexport type RadioButtonProps = {\n selected?: boolean;\n disabled?: boolean;\n color?: string;\n value?: string | number;\n unselectedColor?: string;\n onPress?: (value?: string) => void;\n style?: StyleProp<ViewStyle>;\n size?: number;\n selectedIcon?: string;\n unselectedIcon?: string;\n} & IconSlot;\n\nconst RadioButton: React.FC<RadioButtonProps> = ({\n Icon,\n disabled = false,\n color,\n value = \"\",\n selected,\n unselectedColor,\n onPress,\n size = Config.radioButtonSize,\n selectedIcon = \"MaterialIcons/radio-button-checked\",\n unselectedIcon = \"MaterialIcons/radio-button-unchecked\",\n style,\n ...rest\n}) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={isSelected ? selectedIcon : unselectedIcon}\n color={isSelected ? color : unselectedColor}\n disabled={disabled}\n onPress={handlePress}\n size={size}\n style={style}\n {...rest}\n />\n );\n};\n\nexport default RadioButton;\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;AAiBA,MAAMA,WAAuC,GAAG,QAa1C;EAAA,IAb2C;IAC/CC,IAD+C;IAE/CC,QAAQ,GAAG,KAFoC;IAG/CC,KAH+C;IAI/CC,KAAK,GAAG,EAJuC;IAK/CC,QAL+C;IAM/CC,eAN+C;IAO/CC,OAP+C;IAQ/CC,IAAI,GAAGC,eAAA,CAAOC,eARiC;IAS/CC,YAAY,GAAG,oCATgC;IAU/CC,cAAc,GAAG,sCAV8B;IAW/CC,KAX+C;IAY/C,GAAGC;EAZ4C,CAa3C;EACJ,MAAM;IAAEV,KAAK,EAAEW,YAAT;IAAuBC;EAAvB,IAAyC,IAAAC,mCAAA,GAA/C;EAEA,MAAMC,SAAS,GAAG,IAAAC,iCAAA,EAAuBf,KAAvB,CAAlB;EACA,MAAMgB,gBAAgB,GAAG,IAAAD,iCAAA,EAAuBJ,YAAvB,CAAzB;EACA,MAAMM,UAAU,GAAGhB,QAAH,aAAGA,QAAH,cAAGA,QAAH,GAAee,gBAAgB,KAAKF,SAApD;;EAEA,MAAMI,WAAW,GAAG,MAAM;IACxBf,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGW,SAAH,CAAP;IACAF,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGE,SAAH,CAAb;EACD,CAHD;;EAKA,oBACE,oBAAC,mBAAD;IACE,IAAI,EAAEjB,IADR;IAEE,IAAI,EAAEoB,UAAU,GAAGV,YAAH,GAAkBC,cAFpC;IAGE,KAAK,EAAES,UAAU,GAAGlB,KAAH,GAAWG,eAH9B;IAIE,QAAQ,EAAEJ,QAJZ;IAKE,OAAO,EAAEoB,WALX;IAME,IAAI,EAAEd,IANR;IAOE,KAAK,EAAEK;EAPT,GAQMC,IARN,EADF;AAYD,CArCD;;eAuCed,W"}
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
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
19
 
20
- function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
20
  const {
23
21
  Provider
24
22
  } = _context.radioButtonGroupContext;
@@ -63,11 +61,25 @@ const RadioButtonGroup = _ref => {
63
61
  });
64
62
  }
65
63
 
66
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
64
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
67
65
  style: [{
68
66
  minHeight: 40
69
- }, style]
70
- }, rest), /*#__PURE__*/React.createElement(Provider, {
67
+ }, style],
68
+ ...rest
69
+ }, /*#__PURE__*/React.createElement(Provider, {
70
+ value: {
71
+ value: internalValue,
72
+ onValueChange: handleValueChange,
73
+ direction
74
+ }
75
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
76
+ style: _containerStyle
77
+ }, children)));
78
+ };
79
+
80
+ var _default = RadioButtonGroup;
81
+ exports.default = _default;
82
+ //# sourceMappingURL=RadioButtonGroup.js.mapt.createElement(Provider, {
71
83
  value: {
72
84
  value: internalValue,
73
85
  onValueChange: handleValueChange,
@@ -1 +1 @@
1
- {"version":3,"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","getValueForRadioButton","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"sources":["RadioButtonGroup.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nexport interface RadioButtonGroupProps {\n direction?: Direction;\n style?: StyleProp<ViewStyle>;\n value: string | number;\n onValueChange?: (value: string) => void;\n defaultValue?: string | number;\n theme: Theme;\n children: React.ReactNode;\n}\n\nconst { Provider } = radioButtonGroupContext;\n\nconst RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({\n direction = Direction.Vertical,\n value = \"\",\n onValueChange,\n defaultValue,\n style,\n children,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n\n setInternalValue(realValue);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n\n const handleValueChange = (newValue: string | number) => {\n const realNewValue = getValueForRadioButton(newValue);\n\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\n };\n\n const _containerStyle: StyleProp<ViewStyle> = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n\n return (\n <View style={[{ minHeight: 40 }, style]} {...rest}>\n <Provider\n value={{\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n }}\n >\n <View style={_containerStyle}>{children}</View>\n </Provider>\n </View>\n );\n};\n\nexport default RadioButtonGroup;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAWA,MAAM;EAAEA;AAAF,IAAeC,gCAArB;;AAEA,MAAMC,gBAAiD,GAAG,QAQpD;EAAA,IARqD;IACzDC,SAAS,GAAGC,kBAAA,CAAUC,QADmC;IAEzDC,KAAK,GAAG,EAFiD;IAGzDC,aAHyD;IAIzDC,YAJyD;IAKzDC,KALyD;IAMzDC,QANyD;IAOzD,GAAGC;EAPsD,CAQrD;EACJ,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAe,EAAf,CAA1C;EAEAD,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIV,KAAK,IAAI,IAAb,EAAmB;MACjB,MAAMW,SAAS,GAAG,IAAAC,iCAAA,EAAuBZ,KAAvB,CAAlB;MAEAO,gBAAgB,CAACI,SAAD,CAAhB;IACD;EACF,CAND,EAMG,CAACX,KAAD,CANH;EAQAQ,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIR,YAAY,IAAI,IAApB,EAA0B;MACxB,MAAMW,gBAAgB,GAAG,IAAAD,iCAAA,EAAuBV,YAAvB,CAAzB;MAEAK,gBAAgB,CAACM,gBAAD,CAAhB;IACD;EACF,CAND,EAMG,CAACX,YAAD,CANH;;EAQA,MAAMY,iBAAiB,GAAIC,QAAD,IAA+B;IACvD,MAAMC,YAAY,GAAG,IAAAJ,iCAAA,EAAuBG,QAAvB,CAArB;IAEAR,gBAAgB,CAACS,YAAD,CAAhB;IACAf,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGe,YAAH,CAAb;EACD,CALD;;EAOA,MAAMC,eAAqC,GAAG,CAC5C;IACEC,aAAa,EAAErB,SAAS,KAAKC,kBAAA,CAAUqB,UAAxB,GAAqC,KAArC,GAA6C;EAD9D,CAD4C,CAA9C;;EAMA,IAAItB,SAAS,KAAKC,kBAAA,CAAUC,QAA5B,EAAsC;IACpCkB,eAAe,CAACG,IAAhB,CAAqB;MACnBC,UAAU,EAAE;IADO,CAArB;EAGD;;EAED,oBACE,oBAAC,iBAAD;IAAM,KAAK,EAAE,CAAC;MAAEC,SAAS,EAAE;IAAb,CAAD,EAAoBnB,KAApB;EAAb,GAA6CE,IAA7C,gBACE,oBAAC,QAAD;IACE,KAAK,EAAE;MACLL,KAAK,EAAEM,aADF;MAELL,aAAa,EAAEa,iBAFV;MAGLjB;IAHK;EADT,gBAOE,oBAAC,iBAAD;IAAM,KAAK,EAAEoB;EAAb,GAA+Bb,QAA/B,CAPF,CADF,CADF;AAaD,CA3DD;;eA6DeR,gB"}
1
+ {"version":3,"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","getValueForRadioButton","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","createElement","View","minHeight"],"sources":["RadioButtonGroup.js"],"sourcesContent":["import * as React from \"react\";\nimport { View } from \"react-native\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nconst { Provider } = radioButtonGroupContext;\nconst RadioButtonGroup = ({ direction = Direction.Vertical, value = \"\", onValueChange, defaultValue, style, children, ...rest }) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n setInternalValue(realValue);\n }\n }, [value]);\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n const handleValueChange = (newValue) => {\n const realNewValue = getValueForRadioButton(newValue);\n setInternalValue(realNewValue);\n onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realNewValue);\n };\n const _containerStyle = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },\n React.createElement(Provider, { value: {\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n } },\n React.createElement(View, { style: _containerStyle }, children))));\n};\nexport default RadioButtonGroup;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AACA,MAAM;EAAEA;AAAF,IAAeC,gCAArB;;AACA,MAAMC,gBAAgB,GAAG,QAA2G;EAAA,IAA1G;IAAEC,SAAS,GAAGC,kBAAA,CAAUC,QAAxB;IAAkCC,KAAK,GAAG,EAA1C;IAA8CC,aAA9C;IAA6DC,YAA7D;IAA2EC,KAA3E;IAAkFC,QAAlF;IAA4F,GAAGC;EAA/F,CAA0G;EAChI,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAe,EAAf,CAA1C;EACAD,KAAK,CAACE,SAAN,CAAgB,MAAM;IAClB,IAAIV,KAAK,IAAI,IAAb,EAAmB;MACf,MAAMW,SAAS,GAAG,IAAAC,iCAAA,EAAuBZ,KAAvB,CAAlB;MACAO,gBAAgB,CAACI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;;eAqCeR,gB"}
@@ -79,7 +79,7 @@ const RadioButtonRow = _ref => {
79
79
  } = (0, _context.useRadioButtonGroupContext)();
80
80
  const realValue = (0, _utilities.getValueForRadioButton)(value);
81
81
  const realContextValue = (0, _utilities.getValueForRadioButton)(contextValue);
82
- const isSelected = selected ?? realContextValue === realValue;
82
+ const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
83
83
 
84
84
  const handlePress = () => {
85
85
  onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
@@ -1 +1 @@
1
- {"version":3,"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","RadioButtonRow","Icon","label","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress","textStyles","viewStyles","extractStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"sources":["RadioButtonRow.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, getValueForRadioButton } from \"../../utilities\";\n\nexport enum Direction {\n Row = \"row\",\n RowReverse = \"row-reverse\",\n}\n\nexport interface RadioButtonRowProps extends Omit<RadioButtonProps, \"onPress\"> {\n label: string | React.ReactNode;\n value: string | number; // A string (or number that will be parsed String(number)) that this radio button row represents when selected\n color?: string;\n unselectedColor?: string;\n labelContainerStyle: StyleProp<ViewStyle>;\n radioButtonStyle?: StyleProp<ViewStyle>;\n labelStyle?: StyleProp<TextStyle>;\n onPress?: (value: string) => void;\n direction?: Direction;\n}\n\nconst getRadioButtonAlignment = (\n parentDirection: GroupDirection | undefined,\n direction: Direction\n) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n } else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n } else {\n return \"flex-end\";\n }\n};\n\nconst renderLabel = (\n value: string | React.ReactNode,\n labelStyle: StyleProp<TextStyle>,\n textStyle: StyleProp<TextStyle>\n) => {\n if (typeof value === \"string\") {\n return <Text style={[labelStyle, textStyle]}>{value}</Text>;\n } else {\n return <>{value}</>;\n }\n};\n\nconst RadioButtonRow: React.FC<RadioButtonRowProps & IconSlot> = ({\n Icon,\n label,\n value = \"\",\n color,\n unselectedColor,\n onPress,\n labelContainerStyle,\n labelStyle,\n radioButtonStyle,\n direction = Direction.Row,\n selected,\n disabled,\n style,\n ...rest\n}) => {\n const {\n value: contextValue,\n onValueChange,\n direction: parentDirection,\n } = useRadioButtonGroupContext();\n\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Touchable\n onPress={handlePress}\n style={[styles.mainParent, { flexDirection: direction }, viewStyles]}\n disabled={disabled}\n {...rest}\n >\n <View\n style={[\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ]}\n >\n {renderLabel(label, labelStyle, textStyles)}\n </View>\n <View\n style={{\n flex: 1,\n alignItems: getRadioButtonAlignment(parentDirection, direction),\n }}\n >\n <RadioButton\n Icon={Icon}\n selected={isSelected}\n value={realValue}\n color={color}\n unselectedColor={unselectedColor}\n style={radioButtonStyle}\n />\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n mainParent: {\n alignItems: \"center\",\n justifyContent: \"space-around\",\n paddingStart: 20,\n minHeight: 50,\n paddingEnd: 20,\n display: \"flex\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n label: {\n flex: 3,\n },\n});\n\nexport default RadioButtonRow;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AACA;;AACA;;AAGA;;AACA;;;;;;;;;;IAEYA,S;;;WAAAA,S;EAAAA,S;EAAAA,S;GAAAA,S,yBAAAA,S;;AAiBZ,MAAMC,uBAAuB,GAAG,CAC9BC,eAD8B,EAE9BC,SAF8B,KAG3B;EACH,IAAID,eAAe,KAAKE,kBAAA,CAAeC,UAAvC,EAAmD;IACjD,OAAOF,SAAS,KAAKH,SAAS,CAACM,GAAxB,GAA8B,YAA9B,GAA6C,UAApD;EACD,CAFD,MAEO,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAA5B,EAAwC;IAC7C,OAAO,YAAP;EACD,CAFM,MAEA;IACL,OAAO,UAAP;EACD;AACF,CAXD;;AAaA,MAAMC,WAAW,GAAG,CAClBC,KADkB,EAElBC,UAFkB,EAGlBC,SAHkB,KAIf;EACH,IAAI,OAAOF,KAAP,KAAiB,QAArB,EAA+B;IAC7B,oBAAO,oBAAC,aAAD;MAAM,KAAK,EAAE,CAACC,UAAD,EAAaC,SAAb;IAAb,GAAuCF,KAAvC,CAAP;EACD,CAFD,MAEO;IACL,oBAAO,0CAAGA,KAAH,CAAP;EACD;AACF,CAVD;;AAYA,MAAMG,cAAwD,GAAG,QAe3D;EAAA,IAf4D;IAChEC,IADgE;IAEhEC,KAFgE;IAGhEL,KAAK,GAAG,EAHwD;IAIhEM,KAJgE;IAKhEC,eALgE;IAMhEC,OANgE;IAOhEC,mBAPgE;IAQhER,UARgE;IAShES,gBATgE;IAUhEhB,SAAS,GAAGH,SAAS,CAACM,GAV0C;IAWhEc,QAXgE;IAYhEC,QAZgE;IAahEC,KAbgE;IAch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,EAAEH,SAHT;IAIE,KAAK,EAAEZ,KAJT;IAKE,eAAe,EAAEC,eALnB;IAME,KAAK,EAAEG;EANT,EANF,CAjBF,CADF;AAmCD,CApED;;AAsEA,MAAMgB,MAAM,GAAGK,uBAAA,CAAWC,MAAX,CAAkB;EAC/BL,UAAU,EAAE;IACVE,UAAU,EAAE,QADF;IAEVI,cAAc,EAAE,cAFN;IAGVC,YAAY,EAAE,EAHJ;IAIVC,SAAS,EAAE,EAJD;IAKVC,UAAU,EAAE,EALF;IAMVC,OAAO,EAAE,MANC;IAOV,GAAGC,qBAAA,CAASC,MAAT,CAAgB;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SADL;QAEHC,UAAU,EAAE;MAFT;IADY,CAAhB;EAPO,CADmB;EAe/BrC,KAAK,EAAE;IACLyB,IAAI,EAAE;EADD;AAfwB,CAAlB,CAAf;;eAoBe3B,c"}
1
+ {"version":3,"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","RadioButtonRow","Icon","label","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress","textStyles","viewStyles","extractStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"sources":["RadioButtonRow.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, getValueForRadioButton } from \"../../utilities\";\n\nexport enum Direction {\n Row = \"row\",\n RowReverse = \"row-reverse\",\n}\n\nexport interface RadioButtonRowProps extends Omit<RadioButtonProps, \"onPress\"> {\n label: string | React.ReactNode;\n value: string | number; // A string (or number that will be parsed String(number)) that this radio button row represents when selected\n color?: string;\n unselectedColor?: string;\n labelContainerStyle: StyleProp<ViewStyle>;\n radioButtonStyle?: StyleProp<ViewStyle>;\n labelStyle?: StyleProp<TextStyle>;\n onPress?: (value: string) => void;\n direction?: Direction;\n}\n\nconst getRadioButtonAlignment = (\n parentDirection: GroupDirection | undefined,\n direction: Direction\n) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n } else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n } else {\n return \"flex-end\";\n }\n};\n\nconst renderLabel = (\n value: string | React.ReactNode,\n labelStyle: StyleProp<TextStyle>,\n textStyle: StyleProp<TextStyle>\n) => {\n if (typeof value === \"string\") {\n return <Text style={[labelStyle, textStyle]}>{value}</Text>;\n } else {\n return <>{value}</>;\n }\n};\n\nconst RadioButtonRow: React.FC<RadioButtonRowProps & IconSlot> = ({\n Icon,\n label,\n value = \"\",\n color,\n unselectedColor,\n onPress,\n labelContainerStyle,\n labelStyle,\n radioButtonStyle,\n direction = Direction.Row,\n selected,\n disabled,\n style,\n ...rest\n}) => {\n const {\n value: contextValue,\n onValueChange,\n direction: parentDirection,\n } = useRadioButtonGroupContext();\n\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Touchable\n onPress={handlePress}\n style={[styles.mainParent, { flexDirection: direction }, viewStyles]}\n disabled={disabled}\n {...rest}\n >\n <View\n style={[\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ]}\n >\n {renderLabel(label, labelStyle, textStyles)}\n </View>\n <View\n style={{\n flex: 1,\n alignItems: getRadioButtonAlignment(parentDirection, direction),\n }}\n >\n <RadioButton\n Icon={Icon}\n selected={isSelected}\n value={realValue}\n color={color}\n unselectedColor={unselectedColor}\n style={radioButtonStyle}\n />\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n mainParent: {\n alignItems: \"center\",\n justifyContent: \"space-around\",\n paddingStart: 20,\n minHeight: 50,\n paddingEnd: 20,\n display: \"flex\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n label: {\n flex: 3,\n },\n});\n\nexport default RadioButtonRow;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AACA;;AACA;;AAGA;;AACA;;;;;;;;;;IAEYA,S;;;WAAAA,S;EAAAA,S;EAAAA,S;GAAAA,S,yBAAAA,S;;AAiBZ,MAAMC,uBAAuB,GAAG,CAC9BC,eAD8B,EAE9BC,SAF8B,KAG3B;EACH,IAAID,eAAe,KAAKE,kBAAA,CAAeC,UAAvC,EAAmD;IACjD,OAAOF,SAAS,KAAKH,SAAS,CAACM,GAAxB,GAA8B,YAA9B,GAA6C,UAApD;EACD,CAFD,MAEO,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAA5B,EAAwC;IAC7C,OAAO,YAAP;EACD,CAFM,MAEA;IACL,OAAO,UAAP;EACD;AACF,CAXD;;AAaA,MAAMC,WAAW,GAAG,CAClBC,KADkB,EAElBC,UAFkB,EAGlBC,SAHkB,KAIf;EACH,IAAI,OAAOF,KAAP,KAAiB,QAArB,EAA+B;IAC7B,oBAAO,oBAAC,aAAD;MAAM,KAAK,EAAE,CAACC,UAAD,EAAaC,SAAb;IAAb,GAAuCF,KAAvC,CAAP;EACD,CAFD,MAEO;IACL,oBAAO,0CAAGA,KAAH,CAAP;EACD;AACF,CAVD;;AAYA,MAAMG,cAAwD,GAAG,QAe3D;EAAA,IAf4D;IAChEC,IAD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EAAQJ,UAAR,EAAoBsB,UAApB,CATd,CANF,eAiBE,oBAAC,iBAAD;IACE,KAAK,EAAE;MACLO,IAAI,EAAE,CADD;MAELD,UAAU,EAAErC,uBAAuB,CAACC,eAAD,EAAkBC,SAAlB;IAF9B;EADT,gBAME,oBAAC,oBAAD;IACE,IAAI,EAAEU,IADR;IAEE,QAAQ,EAAEiB,UAFZ;IAGE,KAAK,EAAEH,SAHT;IAIE,KAAK,EAAEZ,KAJT;IAKE,eAAe,EAAEC,eALnB;IAME,KAAK,EAAEG;EANT,EANF,CAjBF,CADF;AAmCD,CApED;;AAsEA,MAAMgB,MAAM,GAAGK,uBAAA,CAAWC,MAAX,CAAkB;EAC/BL,UAAU,EAAE;IACVE,UAAU,EAAE,QADF;IAEVI,cAAc,EAAE,cAFN;IAGVC,YAAY,EAAE,EAHJ;IAIVC,SAAS,EAAE,EAJD;IAKVC,UAAU,EAAE,EALF;IAMVC,OAAO,EAAE,MANC;IAOV,GAAGC,qBAAA,CAASC,MAAT,CAAgB;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SADL;QAEHC,UAAU,EAAE;MAFT;IADY,CAAhB;EAPO,CADmB;EAe/BrC,KAAK,EAAE;IACLyB,IAAI,EAAE;EADD;AAfwB,CAAlB,CAAf;;eAoBe3B,c"}
@@ -256,7 +256,7 @@ class StepIndicator extends _react.Component {
256
256
  stepStatus: this.getStepStatus(position)
257
257
  }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
258
258
  style: indicatorLabelStyle
259
- }, `${position + 1}`));
259
+ }, "".concat(position + 1)));
260
260
  });
261
261
 
262
262
  _defineProperty(this, "getStepStatus", stepPosition => {
@@ -1 +1 @@
1
- {"version":3,"names":["STEP_STATUS","CURRENT","FINISHED","UNFINISHED","StepIndicator","Component","constructor","props","stepCount","direction","progressBarBackgroundStyle","backgroundColor","state","customStyles","separatorUnFinishedColor","position","left","width","separatorStrokeWidth","top","height","bottom","separatorStrokeUnfinishedWidth","right","event","setState","progressBarSize","nativeEvent","layout","onCurrentPositionChanged","currentPosition","progressBarStyle","separatorFinishedColor","separatorStrokeFinishedWidth","progressAnim","steps","push","stepPressed","styles","stepContainer","flexDirection","renderStep","stepIndicatorContainer","currentStepIndicatorSize","labels","renderLabel","labelViews","map","label","index","selectedStepLabelStyle","color","currentStepLabelColor","labelColor","stepLabelItem","stepStatus","getStepStatus","stepLabel","fontSize","labelSize","fontFamily","labelFontFamily","stepLabelsContainer","paddingHorizontal","paddingVertical","alignItems","labelAlign","renderStepIndicator","stepStyle","indicatorLabelStyle","stepIndicatorCurrentColor","borderWidth","currentStepStrokeWidth","borderColor","stepStrokeCurrentColor","sizeAnim","borderRadius","borderRadiusAnim","currentStepIndicatorLabelFontSize","stepIndicatorLabelCurrentColor","stepIndicatorFinishedColor","stepStrokeWidth","stepStrokeFinishedColor","stepIndicatorSize","stepIndicatorLabelFontSize","stepIndicatorLabelFinishedColor","stepIndicatorUnFinishedColor","stepStrokeUnFinishedColor","overflow","stepIndicatorLabelUnFinishedColor","step","stepPosition","animateToPosition","setValue","Animated","sequence","timing","toValue","duration","parallel","start","defaultStyles","Object","assign","Value","onPress","render","container","flex","renderProgressBarBackground","renderProgressBar","renderStepLabels","componentDidUpdate","prevProps","StyleSheet","create","justifyContent","zIndex","textAlign","fontWeight","defaultProps"],"sources":["StepIndicator.tsx"],"sourcesContent":["// @ts-nocheck\nimport React, { Component } from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n Animated,\n TouchableWithoutFeedback,\n} from \"react-native\";\n\nconst STEP_STATUS = {\n CURRENT: \"current\",\n FINISHED: \"finished\",\n UNFINISHED: \"unfinished\",\n};\n\ninterface CustomStyles {\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n separatorStrokeWidth?: number;\n separatorStrokeUnfinishedWidth?: number;\n separatorStrokeFinishedWidth?: number;\n currentStepStrokeWidth: number;\n stepStrokeWidth?: number;\n stepStrokeCurrentColor?: string;\n stepStrokeFinishedColor: string;\n stepStrokeUnFinishedColor: string;\n separatorFinishedColor: string;\n separatorUnFinishedColor: string;\n stepIndicatorFinishedColor: string;\n stepIndicatorUnFinishedColor: string;\n stepIndicatorCurrentColor: string;\n stepIndicatorLabelFontSize: number;\n currentStepIndicatorLabelFontSize?: number;\n stepIndicatorLabelCurrentColor: string;\n stepIndicatorLabelFinishedColor: string;\n stepIndicatorLabelUnFinishedColor: string;\n labelColor?: string;\n labelSize?: number;\n labelAlign?: string;\n currentStepLabelColor?: string;\n labelFontFamily?: string;\n}\n\ntype Props = {\n stepCount: number;\n currentPosition: number;\n customStyles: CustomStyles;\n};\n\ntype State = {\n width: number;\n height: number;\n progressBarSize: number;\n customStyles: CustomStyles;\n};\n\nexport default class StepIndicator extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n\n const defaultStyles = {\n stepIndicatorSize: 30,\n currentStepIndicatorSize: 40,\n separatorStrokeWidth: 3,\n separatorStrokeUnfinishedWidth: 0,\n separatorStrokeFinishedWidth: 0,\n currentStepStrokeWidth: 5,\n stepStrokeWidth: 0,\n stepStrokeCurrentColor: \"#4aae4f\",\n stepStrokeFinishedColor: \"#4aae4f\",\n stepStrokeUnFinishedColor: \"#4aae4f\",\n separatorFinishedColor: \"#4aae4f\",\n separatorUnFinishedColor: \"#a4d4a5\",\n stepIndicatorFinishedColor: \"#4aae4f\",\n stepIndicatorUnFinishedColor: \"#a4d4a5\",\n stepIndicatorCurrentColor: \"#ffffff\",\n stepIndicatorLabelFontSize: 15,\n currentStepIndicatorLabelFontSize: 15,\n stepIndicatorLabelCurrentColor: \"#000000\",\n stepIndicatorLabelFinishedColor: \"#ffffff\",\n stepIndicatorLabelUnFinishedColor: \"rgba(255,255,255,0.5)\",\n labelColor: \"#000000\",\n labelSize: 13,\n labelAlign: \"center\",\n currentStepLabelColor: \"#4aae4f\",\n };\n\n const customStyles = Object.assign(defaultStyles, props.customStyles);\n\n this.state = {\n width: 0,\n height: 1,\n progressBarSize: -2,\n customStyles,\n };\n\n this.progressAnim = new Animated.Value(0);\n this.sizeAnim = new Animated.Value(\n this.state.customStyles.stepIndicatorSize\n );\n this.borderRadiusAnim = new Animated.Value(\n this.state.customStyles.stepIndicatorSize / 2\n );\n }\n\n stepPressed(position) {\n if (this.props.onPress) {\n this.props.onPress(position);\n }\n }\n\n render() {\n const { labels, direction } = this.props;\n return (\n <View\n style={[\n styles.container,\n direction === \"vertical\"\n ? { flexDirection: \"row\", flex: 1 }\n : { flexDirection: \"column\" },\n ]}\n >\n {this.state.width !== 0 && this.renderProgressBarBackground()}\n {this.state.width !== 0 && this.renderProgressBar()}\n {this.renderStepIndicator()}\n {labels && this.renderStepLabels()}\n </View>\n );\n }\n\n componentDidUpdate(prevProps) {\n // if (prevProps.customStyles !== this.props.customStyles) {\n // this.setState((state) => ({\n // customStyles: Object.assign(\n // state.customStyles,\n // this.props.customStyles\n // ),\n // }));\n // }\n\n if (prevProps.currentPosition !== this.props.currentPosition) {\n this.onCurrentPositionChanged(this.props.currentPosition);\n }\n }\n\n renderProgressBarBackground = () => {\n const { stepCount, direction } = this.props;\n let progressBarBackgroundStyle;\n if (direction === \"vertical\") {\n progressBarBackgroundStyle = {\n backgroundColor: this.state.customStyles.separatorUnFinishedColor,\n position: \"absolute\",\n left:\n (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,\n top: this.state.height / (2 * stepCount),\n bottom: this.state.height / (2 * stepCount),\n width:\n this.state.customStyles.separatorStrokeUnfinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeUnfinishedWidth,\n };\n } else {\n progressBarBackgroundStyle = {\n backgroundColor: this.state.customStyles.separatorUnFinishedColor,\n position: \"absolute\",\n top:\n (this.state.height - this.state.customStyles.separatorStrokeWidth) /\n 2,\n left: this.state.width / (2 * stepCount),\n right: this.state.width / (2 * stepCount),\n height:\n this.state.customStyles.separatorStrokeUnfinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeUnfinishedWidth,\n };\n }\n return (\n <View\n onLayout={(event) => {\n if (direction === \"vertical\") {\n this.setState(\n { progressBarSize: event.nativeEvent.layout.height },\n () => {\n this.onCurrentPositionChanged(this.props.currentPosition);\n }\n );\n } else {\n this.setState(\n { progressBarSize: event.nativeEvent.layout.width },\n () => {\n this.onCurrentPositionChanged(this.props.currentPosition);\n }\n );\n }\n }}\n style={progressBarBackgroundStyle}\n />\n );\n };\n\n renderProgressBar = () => {\n const { stepCount, direction } = this.props;\n let progressBarStyle;\n if (direction === \"vertical\") {\n progressBarStyle = {\n backgroundColor: this.state.customStyles.separatorFinishedColor,\n position: \"absolute\",\n left:\n (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,\n top: this.state.height / (2 * stepCount),\n bottom: this.state.height / (2 * stepCount),\n width:\n this.state.customStyles.separatorStrokeFinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeFinishedWidth,\n height: this.progressAnim,\n };\n } else {\n progressBarStyle = {\n backgroundColor: this.state.customStyles.separatorFinishedColor,\n position: \"absolute\",\n top:\n (this.state.height - this.state.customStyles.separatorStrokeWidth) /\n 2,\n left: this.state.width / (2 * stepCount),\n right: this.state.width / (2 * stepCount),\n height:\n this.state.customStyles.separatorStrokeFinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeFinishedWidth,\n width: this.progressAnim,\n };\n }\n return <Animated.View style={progressBarStyle} />;\n };\n\n renderStepIndicator = () => {\n let steps = [];\n const { stepCount, direction } = this.props;\n for (let position = 0; position < stepCount; position++) {\n steps.push(\n <TouchableWithoutFeedback\n key={position}\n onPress={() => this.stepPressed(position)}\n >\n <View\n style={[\n styles.stepContainer,\n direction === \"vertical\"\n ? { flexDirection: \"column\" }\n : { flexDirection: \"row\" },\n ]}\n >\n {this.renderStep(position)}\n </View>\n </TouchableWithoutFeedback>\n );\n }\n return (\n <View\n onLayout={(event) =>\n this.setState({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n })\n }\n style={[\n styles.stepIndicatorContainer,\n direction === \"vertical\"\n ? {\n flexDirection: \"column\",\n width: this.state.customStyles.currentStepIndicatorSize,\n }\n : {\n flexDirection: \"row\",\n height: this.state.customStyles.currentStepIndicatorSize,\n },\n ]}\n >\n {steps}\n </View>\n );\n };\n\n renderStepLabels = () => {\n const { labels, direction, currentPosition, renderLabel } = this.props;\n var labelViews = labels.map((label, index) => {\n const selectedStepLabelStyle =\n index === currentPosition\n ? { color: this.state.customStyles.currentStepLabelColor }\n : { color: this.state.customStyles.labelColor };\n return (\n <TouchableWithoutFeedback\n style={styles.stepLabelItem}\n key={index}\n onPress={() => this.stepPressed(index)}\n >\n <View style={styles.stepLabelItem}>\n {renderLabel ? (\n renderLabel({\n position: index,\n stepStatus: this.getStepStatus(index),\n label,\n currentPosition,\n })\n ) : (\n <Text\n style={[\n styles.stepLabel,\n selectedStepLabelStyle,\n {\n fontSize: this.state.customStyles.labelSize,\n fontFamily: this.state.customStyles.labelFontFamily,\n },\n ]}\n >\n {label}\n </Text>\n )}\n </View>\n </TouchableWithoutFeedback>\n );\n });\n\n return (\n <View\n style={[\n styles.stepLabelsContainer,\n direction === \"vertical\"\n ? { flexDirection: \"column\", paddingHorizontal: 4 }\n : { flexDirection: \"row\", paddingVertical: 4 },\n { alignItems: this.state.customStyles.labelAlign },\n ]}\n >\n {labelViews}\n </View>\n );\n };\n\n renderStep = (position) => {\n const { renderStepIndicator } = this.props;\n let stepStyle;\n let indicatorLabelStyle;\n\n switch (this.getStepStatus(position)) {\n case STEP_STATUS.CURRENT: {\n stepStyle = {\n backgroundColor: this.state.customStyles.stepIndicatorCurrentColor,\n borderWidth: this.state.customStyles.currentStepStrokeWidth,\n borderColor: this.state.customStyles.stepStrokeCurrentColor,\n height: this.sizeAnim,\n width: this.sizeAnim,\n borderRadius: this.borderRadiusAnim,\n };\n indicatorLabelStyle = {\n fontSize: this.state.customStyles.currentStepIndicatorLabelFontSize,\n color: this.state.customStyles.stepIndicatorLabelCurrentColor,\n };\n\n break;\n }\n case STEP_STATUS.FINISHED: {\n stepStyle = {\n backgroundColor: this.state.customStyles.stepIndicatorFinishedColor,\n borderWidth: this.state.customStyles.stepStrokeWidth,\n borderColor: this.state.customStyles.stepStrokeFinishedColor,\n height: this.state.customStyles.stepIndicatorSize,\n width: this.state.customStyles.stepIndicatorSize,\n borderRadius: this.state.customStyles.stepIndicatorSize / 2,\n };\n indicatorLabelStyle = {\n fontSize: this.state.customStyles.stepIndicatorLabelFontSize,\n color: this.state.customStyles.stepIndicatorLabelFinishedColor,\n };\n break;\n }\n\n case STEP_STATUS.UNFINISHED: {\n stepStyle = {\n backgroundColor: this.state.customStyles.stepIndicatorUnFinishedColor,\n borderWidth: this.state.customStyles.stepStrokeWidth,\n borderColor: this.state.customStyles.stepStrokeUnFinishedColor,\n height: this.state.customStyles.stepIndicatorSize,\n width: this.state.customStyles.stepIndicatorSize,\n borderRadius: this.state.customStyles.stepIndicatorSize / 2,\n };\n indicatorLabelStyle = {\n overflow: \"hidden\",\n fontSize: this.state.customStyles.stepIndicatorLabelFontSize,\n color: this.state.customStyles.stepIndicatorLabelUnFinishedColor,\n };\n break;\n }\n default:\n }\n\n return (\n <Animated.View key={\"step-indicator\"} style={[styles.step, stepStyle]}>\n {renderStepIndicator ? (\n renderStepIndicator({\n position,\n stepStatus: this.getStepStatus(position),\n })\n ) : (\n <Text style={indicatorLabelStyle}>{`${position + 1}`}</Text>\n )}\n </Animated.View>\n );\n };\n\n getStepStatus = (stepPosition) => {\n const { currentPosition } = this.props;\n if (stepPosition === currentPosition) {\n return STEP_STATUS.CURRENT;\n } else if (stepPosition < currentPosition) {\n return STEP_STATUS.FINISHED;\n } else {\n return STEP_STATUS.UNFINISHED;\n }\n };\n\n onCurrentPositionChanged = (position) => {\n let { stepCount } = this.props;\n if (position > stepCount - 1) {\n position = stepCount - 1;\n }\n const animateToPosition =\n (this.state.progressBarSize / (stepCount - 1)) * position;\n this.sizeAnim.setValue(this.state.customStyles.stepIndicatorSize);\n this.borderRadiusAnim.setValue(\n this.state.customStyles.stepIndicatorSize / 2\n );\n Animated.sequence([\n Animated.timing(this.progressAnim, {\n toValue: animateToPosition,\n duration: 200,\n }),\n Animated.parallel([\n Animated.timing(this.sizeAnim, {\n toValue: this.state.customStyles.currentStepIndicatorSize,\n duration: 100,\n }),\n Animated.timing(this.borderRadiusAnim, {\n toValue: this.state.customStyles.currentStepIndicatorSize / 2,\n duration: 100,\n }),\n ]),\n ]).start();\n };\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"transparent\",\n },\n stepIndicatorContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-around\",\n backgroundColor: \"transparent\",\n },\n stepLabelsContainer: {\n justifyContent: \"space-around\",\n },\n step: {\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 2,\n },\n stepContainer: {\n flex: 1,\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n stepLabel: {\n fontSize: 12,\n textAlign: \"center\",\n fontWeight: \"500\",\n },\n stepLabelItem: {\n flex: 1,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n});\n\nStepIndicator.defaultProps = {\n currentPosition: 0,\n stepCount: 5,\n customStyles: {},\n direction: \"horizontal\",\n};\n"],"mappings":";;;;;;;AACA;;AACA;;;;;;;;AAQA,MAAMA,WAAW,GAAG;EAClBC,OAAO,EAAE,SADS;EAElBC,QAAQ,EAAE,UAFQ;EAGlBC,UAAU,EAAE;AAHM,CAApB;;AA+Ce,MAAMC,aAAN,SAA4BC,gBAA5B,CAAoD;EACjEC,WAAW,CAACC,KAAD,EAAe;IACxB,MAAMA,KAAN;;IADwB,qDAwFI,MAAM;MAClC,MAAM;QAAEC,SAAF;QAAaC;MAAb,IAA2B,KAAKF,KAAtC;MACA,IAAIG,0BAAJ;;MACA,IAAID,SAAS,KAAK,UAAlB,EAA8B;QAC5BC,0B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,CAAf;;AAoCAhH,aAAa,CAACoH,YAAd,GAA6B;EAC3B1F,eAAe,EAAE,CADU;EAE3BtB,SAAS,EAAE,CAFgB;EAG3BK,YAAY,EAAE,EAHa;EAI3BJ,SAAS,EAAE;AAJgB,CAA7B"}
1
+ {"version":3,"names":["STEP_STATUS","CURRENT","FINISHED","UNFINISHED","StepIndicator","Component","constructor","props","stepCount","direction","progressBarBackgroundStyle","backgroundColor","state","customStyles","separatorUnFinishedColor","position","left","width","separatorStrokeWidth","top","height","bottom","separatorStrokeUnfinishedWidth","right","event","setState","progressBarSize","nativeEvent","layout","onCurrentPositionChanged","currentPosition","progressBarStyle","separatorFinishedColor","separatorStrokeFinishedWidth","progressAnim","steps","push","stepPressed","styles","stepContainer","flexDirection","renderStep","stepIndicatorContainer","currentStepIndicatorSize","labels","renderLabel","labelViews","map","label","index","selectedStepLabelStyle","color","currentStepLabelColor","labelColor","stepLabelItem","stepStatus","getStepStatus","stepLabel","fontSize","labelSize","fontFamily","labelFontFamily","stepLabelsContainer","paddingHorizontal","paddingVertical","alignItems","labelAlign","renderStepIndicator","stepStyle","indicatorLabelStyle","stepIndicatorCurrentColor","borderWidth","currentStepStrokeWidth","borderColor","stepStrokeCurrentColor","sizeAnim","borderRadius","borderRadiusAnim","currentStepIndicatorLabelFontSize","stepIndicatorLabelCurrentColor","stepIndicatorFinishedColor","stepStrokeWidth","stepStrokeFinishedColor","stepIndicatorSize","stepIndicatorLabelFontSize","stepIndicatorLabelFinishedColor","stepIndicatorUnFinishedColor","stepStrokeUnFinishedColor","overflow","stepIndicatorLabelUnFinishedColor","step","stepPosition","animateToPosition","setValue","Animated","sequence","timing","toValue","duration","parallel","start","defaultStyles","Object","assign","Value","onPress","render","container","flex","renderProgressBarBackground","renderProgressBar","renderStepLabels","componentDidUpdate","prevProps","StyleSheet","create","justifyContent","zIndex","textAlign","fontWeight","defaultProps"],"sources":["StepIndicator.tsx"],"sourcesContent":["// @ts-nocheck\nimport React, { Component } from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n Animated,\n TouchableWithoutFeedback,\n} from \"react-native\";\n\nconst STEP_STATUS = {\n CURRENT: \"current\",\n FINISHED: \"finished\",\n UNFINISHED: \"unfinished\",\n};\n\ninterface CustomStyles {\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n separatorStrokeWidth?: number;\n separatorStrokeUnfinishedWidth?: number;\n separatorStrokeFinishedWidth?: number;\n currentStepStrokeWidth: number;\n stepStrokeWidth?: number;\n stepStrokeCurrentColor?: string;\n stepStrokeFinishedColor: string;\n stepStrokeUnFinishedColor: string;\n separatorFinishedColor: string;\n separatorUnFinishedColor: string;\n stepIndicatorFinishedColor: string;\n stepIndicatorUnFinishedColor: string;\n stepIndicatorCurrentColor: string;\n stepIndicatorLabelFontSize: number;\n currentStepIndicatorLabelFontSize?: number;\n stepIndicatorLabelCurrentColor: string;\n stepIndicatorLabelFinishedColor: string;\n stepIndicatorLabelUnFinishedColor: string;\n labelColor?: string;\n labelSize?: number;\n labelAlign?: string;\n currentStepLabelColor?: string;\n labelFontFamily?: string;\n}\n\ntype Props = {\n stepCount: number;\n currentPosition: number;\n customStyles: CustomStyles;\n};\n\ntype State = {\n width: number;\n height: number;\n progressBarSize: number;\n customStyles: CustomStyles;\n};\n\nexport default class StepIndicator extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n\n const defaultStyles = {\n stepIndicatorSize: 30,\n currentStepIndicatorSize: 40,\n separatorStrokeWidth: 3,\n separatorStrokeUnfinishedWidth: 0,\n separatorStrokeFinishedWidth: 0,\n currentStepStrokeWidth: 5,\n stepStrokeWidth: 0,\n stepStrokeCurrentColor: \"#4aae4f\",\n stepStrokeFinishedColor: \"#4aae4f\",\n stepStrokeUnFinishedColor: \"#4aae4f\",\n separatorFinishedColor: \"#4aae4f\",\n separatorUnFinishedColor: \"#a4d4a5\",\n stepIndicatorFinishedColor: \"#4aae4f\",\n stepIndicatorUnFinishedColor: \"#a4d4a5\",\n stepIndicatorCurrentColor: \"#ffffff\",\n stepIndicatorLabelFontSize: 15,\n currentStepIndicatorLabelFontSize: 15,\n stepIndicatorLabelCurrentColor: \"#000000\",\n stepIndicatorLabelFinishedColor: \"#ffffff\",\n stepIndicatorLabelUnFinishedColor: \"rgba(255,255,255,0.5)\",\n labelColor: \"#000000\",\n labelSize: 13,\n labelAlign: \"center\",\n currentStepLabelColor: \"#4aae4f\",\n };\n\n const customStyles = Object.assign(defaultStyles, props.customStyles);\n\n this.state = {\n width: 0,\n height: 1,\n progressBarSize: -2,\n customStyles,\n };\n\n this.progressAnim = new Animated.Value(0);\n this.sizeAnim = new Animated.Value(\n this.state.customStyles.stepIndicatorSize\n );\n this.borderRadiusAnim = new Animated.Value(\n this.state.customStyles.stepIndicatorSize / 2\n );\n }\n\n stepPressed(position) {\n if (this.props.onPress) {\n this.props.onPress(position);\n }\n }\n\n render() {\n const { labels, direction } = this.props;\n return (\n <View\n style={[\n styles.container,\n direction === \"vertical\"\n ? { flexDirection: \"row\", flex: 1 }\n : { flexDirection: \"column\" },\n ]}\n >\n {this.state.width !== 0 && this.renderProgressBarBackground()}\n {this.state.width !== 0 && this.renderProgressBar()}\n {this.renderStepIndicator()}\n {labels && this.renderStepLabels()}\n </View>\n );\n }\n\n componentDidUpdate(prevProps) {\n // if (prevProps.customStyles !== this.props.customStyles) {\n // this.setState((state) => ({\n // customStyles: Object.assign(\n // state.customStyles,\n // this.props.customStyles\n // ),\n // }));\n // }\n\n if (prevProps.currentPosition !== this.props.currentPosition) {\n this.onCurrentPositionChanged(this.props.currentPosition);\n }\n }\n\n renderProgressBarBackground = () => {\n const { stepCount, direction } = this.props;\n let progressBarBackgroundStyle;\n if (direction === \"vertical\") {\n progressBarBackgroundStyle = {\n backgroundColor: this.state.customStyles.separatorUnFinishedColor,\n position: \"absolute\",\n left:\n (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,\n top: this.state.height / (2 * stepCount),\n bottom: this.state.height / (2 * stepCount),\n width:\n this.state.customStyles.separatorStrokeUnfinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeUnfinishedWidth,\n };\n } else {\n progressBarBackgroundStyle = {\n backgroundColor: this.state.customStyles.separatorUnFinishedColor,\n position: \"absolute\",\n top:\n (this.state.height - this.state.customStyles.separatorStrokeWidth) /\n 2,\n left: this.state.width / (2 * stepCount),\n right: this.state.width / (2 * stepCount),\n height:\n this.state.customStyles.separatorStrokeUnfinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeUnfinishedWidth,\n };\n }\n return (\n <View\n onLayout={(event) => {\n if (direction === \"vertical\") {\n this.setState(\n { progressBarSize: event.nativeEvent.layout.height },\n () => {\n this.onCurrentPositionChanged(this.props.currentPosition);\n }\n );\n } else {\n this.setState(\n { progressBarSize: event.nativeEvent.layout.width },\n () => {\n this.onCurrentPositionChanged(this.props.currentPosition);\n }\n );\n }\n }}\n style={progressBarBackgroundStyle}\n />\n );\n };\n\n renderProgressBar = () => {\n const { stepCount, direction } = this.props;\n let progressBarStyle;\n if (direction === \"vertical\") {\n progressBarStyle = {\n backgroundColor: this.state.customStyles.separatorFinishedColor,\n position: \"absolute\",\n left:\n (this.state.width - this.state.customStyles.separatorStrokeWidth) / 2,\n top: this.state.height / (2 * stepCount),\n bottom: this.state.height / (2 * stepCount),\n width:\n this.state.customStyles.separatorStrokeFinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeFinishedWidth,\n height: this.progressAnim,\n };\n } else {\n progressBarStyle = {\n backgroundColor: this.state.customStyles.separatorFinishedColor,\n position: \"absolute\",\n top:\n (this.state.height - this.state.customStyles.separatorStrokeWidth) /\n 2,\n left: this.state.width / (2 * stepCount),\n right: this.state.width / (2 * stepCount),\n height:\n this.state.customStyles.separatorStrokeFinishedWidth === 0\n ? this.state.customStyles.separatorStrokeWidth\n : this.state.customStyles.separatorStrokeFinishedWidth,\n width: this.progressAnim,\n };\n }\n return <Animated.View style={progressBarStyle} />;\n };\n\n renderStepIndicator = () => {\n let steps = [];\n const { stepCount, direction } = this.props;\n for (let position = 0; position < stepCount; position++) {\n steps.push(\n <TouchableWithoutFeedback\n key={position}\n onPress={() => this.stepPressed(position)}\n >\n <View\n style={[\n styles.stepContainer,\n direction === \"vertical\"\n ? { flexDirection: \"column\" }\n : { flexDirection: \"row\" },\n ]}\n >\n {this.renderStep(position)}\n </View>\n </TouchableWithoutFeedback>\n );\n }\n return (\n <View\n onLayout={(event) =>\n this.setState({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n })\n }\n style={[\n styles.stepIndicatorContainer,\n direction === \"vertical\"\n ? {\n flexDirection: \"column\",\n width: this.state.customStyles.currentStepIndicatorSize,\n }\n : {\n flexDirection: \"row\",\n height: this.state.customStyles.currentStepIndicatorSize,\n },\n ]}\n >\n {steps}\n </View>\n );\n };\n\n renderStepLabels = () => {\n const { labels, direction, currentPosition, renderLabel } = this.props;\n var labelViews = labels.map((label, index) => {\n const selectedStepLabelStyle =\n index === currentPosition\n ? { color: this.state.customStyles.currentStepLabelColor }\n : { color: this.state.customStyles.labelColor };\n return (\n <TouchableWithoutFeedback\n style={styles.stepLabelItem}\n key={index}\n onPress={() => this.stepPressed(index)}\n >\n <View style={styles.stepLabelItem}>\n {renderLabel ? (\n renderLabel({\n position: index,\n stepStatus: this.getStepStatus(index),\n label,\n currentPosition,\n })\n ) : (\n <Text\n style={[\n styles.stepLabel,\n selectedStepLabelStyle,\n {\n fontSize: this.state.customStyles.labelSize,\n fontFamily: this.state.customStyles.labelFontFamily,\n },\n ]}\n >\n {label}\n </Text>\n )}\n </View>\n </TouchableWithoutFeedback>\n );\n });\n\n return (\n <View\n style={[\n styles.stepLabelsContainer,\n direction === \"vertical\"\n ? { flexDirection: \"column\", paddingHorizontal: 4 }\n : { flexDirection: \"row\", paddingVertical: 4 },\n { alignItems: this.state.customStyles.labelAlign },\n ]}\n >\n {labelViews}\n </View>\n );\n };\n\n renderStep = (position) => {\n const { renderStepIndicator } = this.props;\n let stepStyle;\n let indicatorLabelStyle;\n\n switch (this.getStepStatus(position)) {\n case STEP_STATUS.CURRENT: {\n stepStyle = {\n backgroundColor: this.state.customStyles.stepIndicatorCurrentColor,\n borderWidth: this.state.customStyles.currentStepStrokeWidth,\n borderColor: this.state.customStyles.stepStrokeCurrentColor,\n height: this.sizeAnim,\n width: this.sizeAnim,\n borderRadius: this.borderRadiusAnim,\n };\n indicatorLabelStyle = {\n fontSize: this.state.customStyles.currentStepIndicatorLabelFontSize,\n color: this.state.customStyles.stepIndicatorLabelCurrentColor,\n };\n\n break;\n }\n case STEP_STATUS.FINISHED: {\n stepStyle = {\n backgroundColor: this.state.customStyles.stepIndicatorFinishedColor,\n borderWidth: this.state.customStyles.stepStrokeWidth,\n borderColor: this.state.customStyles.stepStrokeFinishedColor,\n height: this.state.customStyles.stepIndicatorSize,\n width: this.state.customStyles.stepIndicatorSize,\n borderRadius: this.state.customStyles.stepIndicatorSize / 2,\n };\n indicatorLabelStyle = {\n fontSize: this.state.customStyles.stepIndicatorLabelFontSize,\n color: this.state.customStyles.stepIndicatorLabelFinishedColor,\n };\n break;\n }\n\n case STEP_STATUS.UNFINISHED: {\n stepStyle = {\n backgroundColor: this.state.customStyles.stepIndicatorUnFinishedColor,\n borderWidth: this.state.customStyles.stepStrokeWidth,\n borderColor: this.state.customStyles.stepStrokeUnFinishedColor,\n height: this.state.customStyles.stepIndicatorSize,\n width: this.state.customStyles.stepIndicatorSize,\n borderRadius: this.state.customStyles.stepIndicatorSize / 2,\n };\n indicatorLabelStyle = {\n overflow: \"hidden\",\n fontSize: this.state.customStyles.stepIndicatorLabelFontSize,\n color: this.state.customStyles.stepIndicatorLabelUnFinishedColor,\n };\n break;\n }\n default:\n }\n\n return (\n <Animated.View key={\"step-indicator\"} style={[styles.step, stepStyle]}>\n {renderStepIndicator ? (\n renderStepIndicator({\n position,\n stepStatus: this.getStepStatus(position),\n })\n ) : (\n <Text style={indicatorLabelStyle}>{`${position + 1}`}</Text>\n )}\n </Animated.View>\n );\n };\n\n getStepStatus = (stepPosition) => {\n const { currentPosition } = this.props;\n if (stepPosition === currentPosition) {\n return STEP_STATUS.CURRENT;\n } else if (stepPosition < currentPosition) {\n return STEP_STATUS.FINISHED;\n } else {\n return STEP_STATUS.UNFINISHED;\n }\n };\n\n onCurrentPositionChanged = (position) => {\n let { stepCount } = this.props;\n if (position > stepCount - 1) {\n position = stepCount - 1;\n }\n const animateToPosition =\n (this.state.progressBarSize / (stepCount - 1)) * position;\n this.sizeAnim.setValue(this.state.customStyles.stepIndicatorSize);\n this.borderRadiusAnim.setValue(\n this.state.customStyles.stepIndicatorSize / 2\n );\n Animated.sequence([\n Animated.timing(this.progressAnim, {\n toValue: animateToPosition,\n duration: 200,\n }),\n Animated.parallel([\n Animated.timing(this.sizeAnim, {\n toValue: this.state.customStyles.currentStepIndicatorSize,\n duration: 100,\n }),\n Animated.timing(this.borderRadiusAnim, {\n toValue: this.state.customStyles.currentStepIndicatorSize / 2,\n duration: 100,\n }),\n ]),\n ]).start();\n };\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"transparent\",\n },\n stepIndicatorContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-around\",\n backgroundColor: \"transparent\",\n },\n stepLabelsContainer: {\n justifyContent: \"space-around\",\n },\n step: {\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 2,\n },\n stepContainer: {\n flex: 1,\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n stepLabel: {\n fontSize: 12,\n textAlign: \"center\",\n fontWeight: \"500\",\n },\n stepLabelItem: {\n flex: 1,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n});\n\nStepIndicator.defaultProps = {\n currentPosition: 0,\n stepCount: 5,\n customStyles: {},\n direction: \"horizontal\",\n};\n"],"mappings":";;;;;;;AACA;;AACA;;;;;;;;AAQA,MA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EAAE;IACbqE,IAAI,EAAE,CADO;IAEbpE,aAAa,EAAE,KAFF;IAGbyB,UAAU,EAAE,QAHC;IAIbmD,cAAc,EAAE;EAJH,CAlBgB;EAwB/B3D,SAAS,EAAE;IACTC,QAAQ,EAAE,EADD;IAET4D,SAAS,EAAE,QAFF;IAGTC,UAAU,EAAE;EAHH,CAxBoB;EA6B/BjE,aAAa,EAAE;IACbsD,IAAI,EAAE,CADO;IAEb3C,UAAU,EAAE,QAFC;IAGbmD,cAAc,EAAE;EAHH;AA7BgB,CAAlB,CAAf;;AAoCAhH,aAAa,CAACoH,YAAd,GAA6B;EAC3B1F,eAAe,EAAE,CADU;EAE3BtB,SAAS,EAAE,CAFgB;EAG3BK,YAAY,EAAE,EAHa;EAI3BJ,SAAS,EAAE;AAJgB,CAA7B"}
@@ -38,7 +38,7 @@ const Stepper = _ref => {
38
38
  },
39
39
  Icon
40
40
  } = _ref;
41
- const [value, setValue] = (0, _react.useState)(defaultValue ?? 0);
41
+ const [value, setValue] = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0);
42
42
 
43
43
  const isValidValue = valueArg => valueArg >= min && valueArg <= max;
44
44
 
@@ -1 +1 @@
1
- {"version":3,"names":["Stepper","min","Infinity","max","value","valueProp","defaultValue","style","typeStyle","iconSize","iconColor","onChange","theme","colors","typography","Icon","setValue","useState","isValidValue","valueArg","handlePlusOrMinus","type","newValue","useEffect","isNumber","flexDirection","opacity","body1","textAlign","alignSelf","color","medium","marginHorizontal","withTheme"],"sources":["Stepper.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from \"react\";\nimport { View, Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport { isNumber } from \"lodash\";\n\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport IconButton from \"./IconButton\";\n\ntype Props = {\n min: number;\n max: number;\n value?: number;\n defaultValue?: number;\n style?: StyleProp<ViewStyle>;\n typeStyle?: StyleProp<TextStyle>;\n iconSize: number;\n iconColor?: string;\n onChange?: (value: number) => void;\n theme: Theme;\n} & IconSlot;\n\nconst Stepper: FC<Props> = ({\n min = -Infinity,\n max = Infinity,\n value: valueProp,\n defaultValue,\n style,\n typeStyle,\n iconSize = 24,\n iconColor,\n onChange,\n theme: { colors, typography },\n Icon,\n}) => {\n const [value, setValue] = useState(defaultValue ?? 0);\n\n const isValidValue = (valueArg: number) => valueArg >= min && valueArg <= max;\n\n const handlePlusOrMinus = (type: \"plus\" | \"minus\") => {\n const newValue = type === \"plus\" ? value + 1 : value - 1;\n\n if (isValidValue(newValue)) {\n setValue(newValue);\n onChange?.(newValue);\n }\n };\n\n useEffect(() => {\n if (\n valueProp != null &&\n isNumber(valueProp) &&\n valueProp !== value &&\n isValidValue(valueProp)\n ) {\n setValue(valueProp);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueProp]);\n\n return (\n <View style={[{ flexDirection: \"row\" }, style]}>\n <IconButton\n Icon={Icon}\n icon=\"MaterialIcons/remove\"\n onPress={() => handlePlusOrMinus(\"minus\")}\n size={iconSize}\n color={iconColor}\n disabled={value === min}\n style={{ opacity: value === min ? 0.5 : 1 }}\n />\n\n <Text\n style={[\n typography.body1,\n {\n textAlign: \"center\",\n alignSelf: \"center\",\n color: colors.medium,\n marginHorizontal: 8,\n },\n typeStyle,\n ]}\n >\n {value}\n </Text>\n\n <IconButton\n Icon={Icon}\n icon=\"MaterialIcons/add\"\n onPress={() => handlePlusOrMinus(\"plus\")}\n size={iconSize}\n color={iconColor}\n disabled={value === max}\n style={{ opacity: value === max ? 0.5 : 1 }}\n />\n </View>\n );\n};\n\nexport default withTheme(Stepper);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAGA;;;;;;;;AAeA,MAAMA,OAAkB,GAAG,QAYrB;EAAA,IAZsB;IAC1BC,GAAG,GAAG,CAACC,QADmB;IAE1BC,GAAG,GAAGD,Q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AAK,EAAEC,SALT;IAME,QAAQ,EAAEN,KAAK,KAAKH,GANtB;IAOE,KAAK,EAAE;MAAEyB,OAAO,EAAEtB,KAAK,KAAKH,GAAV,GAAgB,GAAhB,GAAsB;IAAjC;EAPT,EADF,eAWE,6BAAC,iBAAD;IACE,KAAK,EAAE,CACLa,UAAU,CAACa,KADN,EAEL;MACEC,SAAS,EAAE,QADb;MAEEC,SAAS,EAAE,QAFb;MAGEC,KAAK,EAAEjB,MAAM,CAACkB,MAHhB;MAIEC,gBAAgB,EAAE;IAJpB,CAFK,EAQLxB,SARK;EADT,GAYGJ,KAZH,CAXF,eA0BE,6BAAC,mBAAD;IACE,IAAI,EAAEW,IADR;IAEE,IAAI,EAAC,mBAFP;IAGE,OAAO,EAAE,MAAMK,iBAAiB,CAAC,MAAD,CAHlC;IAIE,IAAI,EAAEX,QAJR;IAKE,KAAK,EAAEC,SALT;IAME,QAAQ,EAAEN,KAAK,KAAKD,GANtB;IAOE,KAAK,EAAE;MAAEuB,OAAO,EAAEtB,KAAK,KAAKD,GAAV,GAAgB,GAAhB,GAAsB;IAAjC;EAPT,EA1BF,CADF;AAsCD,CA5ED;;eA8Ee,IAAA8B,kBAAA,EAAUjC,OAAV,C"}
1
+ {"version":3,"names":["Stepper","min","Infinity","max","value","valueProp","defaultValue","style","typeStyle","iconSize","iconColor","onChange","theme","colors","typography","Icon","setValue","useState","isValidValue","valueArg","handlePlusOrMinus","type","newValue","useEffect","isNumber","flexDirection","opacity","body1","textAlign","alignSelf","color","medium","marginHorizontal","withTheme"],"sources":["Stepper.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from \"react\";\nimport { View, Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport { isNumber } from \"lodash\";\n\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport IconButton from \"./IconButton\";\n\ntype Props = {\n min: number;\n max: number;\n value?: number;\n defaultValue?: number;\n style?: StyleProp<ViewStyle>;\n typeStyle?: StyleProp<TextStyle>;\n iconSize: number;\n iconColor?: string;\n onChange?: (value: number) => void;\n theme: Theme;\n} & IconSlot;\n\nconst Stepper: FC<Props> = ({\n min = -Infinity,\n max = Infinity,\n value: valueProp,\n defaultValue,\n style,\n typeStyle,\n iconSize = 24,\n iconColor,\n onChange,\n theme: { colors, typography },\n Icon,\n}) => {\n const [value, setValue] = useState(defaultValue ?? 0);\n\n const isValidValue = (valueArg: number) => valueArg >= min && valueArg <= max;\n\n const handlePlusOrMinus = (type: \"plus\" | \"minus\") => {\n const newValue = type === \"plus\" ? value + 1 : value - 1;\n\n if (isValidValue(newValue)) {\n setValue(newValue);\n onChange?.(newValue);\n }\n };\n\n useEffect(() => {\n if (\n valueProp != null &&\n isNumber(valueProp) &&\n valueProp !== value &&\n isValidValue(valueProp)\n ) {\n setValue(valueProp);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueProp]);\n\n return (\n <View style={[{ flexDirection: \"row\" }, style]}>\n <IconButton\n Icon={Icon}\n icon=\"MaterialIcons/remove\"\n onPress={() => handlePlusOrMinus(\"minus\")}\n size={iconSize}\n color={iconColor}\n disabled={value === min}\n style={{ opacity: value === min ? 0.5 : 1 }}\n />\n\n <Text\n style={[\n typography.body1,\n {\n textAlign: \"center\",\n alignSelf: \"center\",\n color: colors.medium,\n marginHorizontal: 8,\n },\n typeStyle,\n ]}\n >\n {value}\n </Text>\n\n <IconButton\n Icon={Icon}\n icon=\"MaterialIcons/add\"\n onPress={() => handlePlusOrMinus(\"plus\")}\n size={iconSize}\n color={iconColor}\n disabled={value === max}\n style={{ opacity: value === max ? 0.5 : 1 }}\n />\n </View>\n );\n};\n\nexport default withTheme(Stepper);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAGA;;;;;;;;AAeA,MAAMA,OAAkB,GAAG,QAYrB;EAAA,IAZsB;IAC1BC,GAAG,GAAG,CAACC,QADmB;IAE1BC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,CAHlC;IAIE,IAAI,EAAEX,QAJR;IAKE,KAAK,EAAEC,SALT;IAME,QAAQ,EAAEN,KAAK,KAAKH,GANtB;IAOE,KAAK,EAAE;MAAEyB,OAAO,EAAEtB,KAAK,KAAKH,GAAV,GAAgB,GAAhB,GAAsB;IAAjC;EAPT,EADF,eAWE,6BAAC,iBAAD;IACE,KAAK,EAAE,CACLa,UAAU,CAACa,KADN,EAEL;MACEC,SAAS,EAAE,QADb;MAEEC,SAAS,EAAE,QAFb;MAGEC,KAAK,EAAEjB,MAAM,CAACkB,MAHhB;MAIEC,gBAAgB,EAAE;IAJpB,CAFK,EAQLxB,SARK;EADT,GAYGJ,KAZH,CAXF,eA0BE,6BAAC,mBAAD;IACE,IAAI,EAAEW,IADR;IAEE,IAAI,EAAC,mBAFP;IAGE,OAAO,EAAE,MAAMK,iBAAiB,CAAC,MAAD,CAHlC;IAIE,IAAI,EAAEX,QAJR;IAKE,KAAK,EAAEC,SALT;IAME,QAAQ,EAAEN,KAAK,KAAKD,GANtB;IAOE,KAAK,EAAE;MAAEuB,OAAO,EAAEtB,KAAK,KAAKD,GAAV,GAAgB,GAAhB,GAAsB;IAAjC;EAPT,EA1BF,CADF;AAsCD,CA5ED;;eA8Ee,IAAA8B,kBAAA,EAAUjC,OAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style"],"sources":["SwiperItem.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleSheet, StyleProp, ViewStyle } from \"react-native\";\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n },\n});\n\nexport interface SwiperProps {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst SwiperItem = ({ children, style }: SwiperProps) => (\n <View style={[styles.wrapper, style]}>{children}</View>\n);\n\nexport default SwiperItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,OAAO,EAAE;IACPC,IAAI,EAAE;EADC;AADsB,CAAlB,CAAf;;AAWA,MAAMC,UAAU,GAAG;EAAA,IAAC;IAAEC,QAAF;IAAYC;EAAZ,CAAD;EAAA,oBACjB,6BAAC,iBAAD;IAAM,KAAK,EAAE,CAACP,MAAM,CAACG,OAAR,EAAiBI,KAAjB;EAAb,GAAuCD,QAAvC,CADiB;AAAA,CAAnB;;eAIeD,U"}
1
+ {"version":3,"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style","React","createElement","View"],"sources":["SwiperItem.js"],"sourcesContent":["import React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n },\n});\nconst SwiperItem = ({ children, style }) => (React.createElement(View, { style: [styles.wrapper, style] }, children));\nexport default SwiperItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,OAAO,EAAE;IACLC,IAAI,EAAE;EADD;AADoB,CAAlB,CAAf;;AAKA,MAAMC,UAAU,GAAG;EAAA,IAAC;IAAEC,QAAF;IAAYC;EAAZ,CAAD;EAAA,oBAA0BC,cAAA,CAAMC,aAAN,CAAoBC,iBAApB,EAA0B;IAAEH,KAAK,EAAE,CAACP,MAAM,CAACG,OAAR,EAAiBI,KAAjB;EAAT,CAA1B,EAA8DD,QAA9D,CAA1B;AAAA,CAAnB;;eACeD,U"}
@@ -15,17 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  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; }
17
17
 
18
- function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
19
-
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
-
22
18
  class Text extends React.Component {
23
- constructor() {
24
- super(...arguments);
25
-
26
- _defineProperty(this, "_root", void 0);
27
- }
28
-
29
19
  setNativeProps(args) {
30
20
  return this._root && this._root.setNativeProps(args);
31
21
  }
@@ -36,7 +26,44 @@ class Text extends React.Component {
36
26
  ...rest
37
27
  } = this.props;
38
28
  const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
39
- return /*#__PURE__*/React.createElement(_reactNative.Text, _extends({}, rest, {
29
+ return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
30
+ ref: c => {
31
+ this._root = c;
32
+ },
33
+ style: [{
34
+ textAlign: "left",
35
+ writingDirection
36
+ }, style]
37
+ });
38
+ }
39
+
40
+ }
41
+
42
+ const BaseLink = _ref => {
43
+ let {
44
+ style,
45
+ theme,
46
+ title,
47
+ ...props
48
+ } = _ref;
49
+ return /*#__PURE__*/React.createElement(Text, {
50
+ hitSlop: 8,
51
+ style: [{
52
+ color: theme.colors.primary
53
+ }, style],
54
+ theme: theme,
55
+ ...props
56
+ }, title);
57
+ };
58
+
59
+ exports.BaseLink = BaseLink;
60
+ const Link = (0, _theming.withTheme)(BaseLink);
61
+ exports.Link = Link;
62
+
63
+ var _default = (0, _theming.withTheme)(Text);
64
+
65
+ exports.default = _default;
66
+ //# sourceMappingURL=Text.js.map.Text, _extends({}, rest, {
40
67
  ref: c => {
41
68
  this._root = c;
42
69
  },
@@ -1 +1 @@
1
- {"version":3,"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","Link","withTheme"],"sources":["Text.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager, TextProps } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n theme: Theme;\n} & TextProps;\n\nclass Text extends React.Component<Props> {\n _root: any;\n\n setNativeProps(args: TextProps) {\n return this._root && this._root.setNativeProps(args);\n }\n\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n\n return (\n <NativeText\n {...rest}\n ref={(c) => {\n this._root = c;\n }}\n style={[\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ]}\n />\n );\n }\n}\n\nexport const BaseLink = ({\n style,\n theme,\n title,\n ...props\n}: any): JSX.Element => {\n return (\n <Text\n hitSlop={8}\n style={[{ color: theme.colors.primary }, style]}\n theme={theme}\n {...props}\n >\n {title}\n </Text>\n );\n};\n\nconst Link: any = withTheme(BaseLink);\nexport { Link };\n\nexport default withTheme(Text);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAA0C;EAAA;IAAA;;IAAA;EAAA;;EAGxCC,cAAc,CAACC,IAAD,EAAkB;IAC9B,OAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;EACD;;EAEDE,MAAM,GAAG;IACP,MAAM;MAAEC,KAAF;MAAS,GAAGC;IAAZ,IAAqB,KAAKC,KAAhC;IACA,MAAMC,gBAAgB,GAAGC,wBAAA,CAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;IAEA,oBACE,oBAAC,iBAAD,eACMJ,IADN;MAEE,GAAG,EAAGK,CAAD,IAAO;QACV,KAAKR,KAAL,GAAaQ,CAAb;MACD,CAJH;MAKE,KAAK,EAAE,CACL;QACEC,SAAS,EAAE,MADb;QAEEJ;MAFF,CADK,EAKLH,KALK;IALT,GADF;EAeD;;AA1BuC;;AA6BnC,MAAMQ,QAAQ,GAAG,QAKA;EAAA,IALC;IACvBR,KADuB;IAEvBS,KAFuB;IAGvBC,KAHuB;IAIvB,GAAGR;EAJoB,CAKD;EACtB,oBACE,oBAAC,IAAD;IACE,OAAO,EAAE,CADX;IAEE,KAAK,EAAE,CAAC;MAAES,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC;IAAtB,CAAD,EAAkCb,KAAlC,CAFT;IAGE,KAAK,EAAES;EAHT,GAIMP,KAJN,GAMGQ,KANH,CADF;AAUD,CAhBM;;;AAkBP,MAAMI,IAAS,GAAG,IAAAC,kBAAA,EAAUP,QAAV,CAAlB;;;eAGe,IAAAO,kBAAA,EAAUtB,IAAV,C"}
1
+ {"version":3,"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","createElement","NativeText","ref","c","textAlign","BaseLink","theme","title","hitSlop","color","colors","primary","Link","withTheme"],"sources":["Text.js"],"sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager } from \"react-native\";\nimport { withTheme } from \"../theming\";\nclass Text extends React.Component {\n setNativeProps(args) {\n return this._root && this._root.setNativeProps(args);\n }\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n return (React.createElement(NativeText, { ...rest, ref: (c) => {\n this._root = c;\n }, style: [\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ] }));\n }\n}\nexport const BaseLink = ({ style, theme, title, ...props }) => {\n return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary }, style], theme: theme, ...props }, title));\n};\nconst Link = withTheme(BaseLink);\nexport { Link };\nexport default withTheme(Text);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAAmC;EAC/BC,cAAc,CAACC,IAAD,EAAO;IACjB,OAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;EACH;;EACDE,MAAM,GAAG;IACL,MAAM;MAAEC,KAAF;MAAS,GAAGC;IAAZ,IAAqB,KAAKC,KAAhC;IACA,MAAMC,gBAAgB,GAAGC,wBAAA,CAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;IACA,oBAAQX,KAAK,CAACY,aAAN,CAAoBC,iBAApB,EAAgC,EAAE,GAAGN,IAAL;MAAWO,GAAG,EAAGC,CAAD,IAAO;QACvD,KAAKX,KAAL,GAAaW,CAAb;MACH,CAFmC;MAEjCT,KAAK,EAAE,CACN;QACIU,SAAS,EAAE,MADf;QAEIP;MAFJ,CADM,EAKNH,KALM;IAF0B,CAAhC,CAAR;EASH;;AAhB8B;;AAkB5B,MAAMW,QAAQ,GAAG,QAAuC;EAAA,IAAtC;IAAEX,KAAF;IAASY,KAAT;IAAgBC,KAAhB;IAAuB,GAAGX;EAA1B,CAAsC;EAC3D,oBAAQR,KAAK,CAACY,aAAN,CAAoBb,IAApB,EAA0B;IAAEqB,OAAO,EAAE,CAAX;IAAcd,KAAK,EAAE,CAAC;MAAEe,KAAK,EAAEH,KAAK,CAACI,MAAN,CAAaC;IAAtB,CAAD,EAAkCjB,KAAlC,CAArB;IAA+DY,KAAK,EAAEA,KAAtE;IAA6E,GAAGV;EAAhF,CAA1B,EAAmHW,KAAnH,CAAR;AACH,CAFM;;;AAGP,MAAMK,IAAI,GAAG,IAAAC,kBAAA,EAAUR,QAAV,CAAb;;;eAEe,IAAAQ,kBAAA,EAAU1B,IAAV,C"}
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA_PROPS","image","group","GROUPS","data","label","description","formType","FORM_TYPES","propType","PROP_TYPES","ASSET","defaultValue","editable","required","title","string","STRING","leftDescription","rightDescription","icon","basic","aspectRatio","NUMBER","rating","number","min","max","step","precision","elevation","createElevationType","SEED_DATA","name","tag","category","COMPONENT_TYPES","card","preview_image_url","supports_list_render","props","numColumns","uncategorized","layout"],"sources":["CardContainerRating.ts"],"sourcesContent":["import {\n GROUPS,\n FORM_TYPES,\n PROP_TYPES,\n COMPONENT_TYPES,\n createElevationType,\n} from \"@draftbit/types\";\n\nconst SEED_DATA_PROPS = {\n image: {\n group: GROUPS.data,\n label: \"Image\",\n description: \"Image\",\n formType: FORM_TYPES.image,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n title: {\n group: GROUPS.data,\n label: \"Title\",\n description: \"Text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Beautiful West Coast Villa\",\n editable: true,\n required: false,\n },\n leftDescription: {\n group: GROUPS.data,\n label: \"Left description\",\n description: \"Text to display on the left\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"San Diego\",\n editable: true,\n required: false,\n },\n rightDescription: {\n group: GROUPS.data,\n label: \"Right description\",\n description: \"Text to display on the right\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"$100\",\n editable: true,\n required: false,\n },\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Icon to display on the top right\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n aspectRatio: {\n group: GROUPS.basic,\n label: \"Aspect ratio\",\n description: \"Aspect ratio of the image\",\n formType: FORM_TYPES.aspectRatio,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 1.5,\n editable: true,\n required: false,\n },\n rating: {\n group: GROUPS.data,\n label: \"Rating\",\n description: \"Number of stars to show. A number 0-5.\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 5,\n min: 0,\n max: 5,\n step: 1,\n precision: 0,\n editable: true,\n required: false,\n },\n elevation: createElevationType(2),\n};\n\nexport const SEED_DATA = [\n {\n name: \"Medium Card (Rating)\",\n tag: \"CardContainerRating\",\n description:\n \"An elevated card with a title and description, that takes up half of its container.\",\n category: COMPONENT_TYPES.card,\n preview_image_url: \"{CLOUDINARY_URL}/Card_ContainerRating_2col.png\",\n supports_list_render: true,\n props: {\n ...SEED_DATA_PROPS,\n numColumns: {\n label: \"Number of Columns\",\n description: \"Numbre of columns\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 2,\n editable: false,\n required: false,\n },\n },\n layout: {},\n },\n {\n name: \"Large Card (Rating)\",\n tag: \"CardContainerRating\",\n description:\n \"An elevated card with a title and description, that takes up its full container.\",\n category: COMPONENT_TYPES.card,\n preview_image_url: \"{CLOUDINARY_URL}/Card_ContainerRating_3col.png\",\n supports_list_render: true,\n props: {\n ...SEED_DATA_PROPS,\n numColumns: {\n label: \"Number of Columns\",\n description: \"Numbre of columns\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 3,\n editable: false,\n required: false,\n },\n },\n layout: {},\n },\n];\n"],"mappings":";;;;;;;AAAA;;AAQA,MAAMA,eAAe,GAAG;EACtBC,KAAK,EAAE;IACLC,KAAK,EAAEC,aAAA,CAAOC,IADT;IAELC,KAAK,EAAE,OAFF;IAGLC,WAAW,EAAE,OAHR;IAILC,QAAQ,EAAEC,iBAAA,CAAWP,KAJhB;IAKLQ,QAAQ,EAAEC,iBAAA,CAAWC,KALhB;IAMLC,YAAY,EAAE,IANT;IAOLC,QAAQ,EAAE,IAPL;IAQLC,QAAQ,EAAE;EARL,CADe;EAWtBC,KAAK,EAAE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,qBAFP;EAGE5B,WAAW,EACT,kFAJJ;EAKE6B,QAAQ,EAAEC,sBAAA,CAAgBC,IAL5B;EAMEC,iBAAiB,EAAE,gDANrB;EAOEC,oBAAoB,EAAE,IAPxB;EAQEC,KAAK,EAAE,EACL,GAAGxC,eADE;IAELyC,UAAU,EAAE;MACVpC,KAAK,EAAE,mBADG;MAEVC,WAAW,EAAE,mBAFH;MAGVJ,KAAK,EAAEC,aAAA,CAAOuC,aAHJ;MAIVnC,QAAQ,EAAEC,iBAAA,CAAWiB,MAJX;MAKVhB,QAAQ,EAAEC,iBAAA,CAAWa,MALX;MAMVX,YAAY,EAAE,CANJ;MAOVC,QAAQ,EAAE,KAPA;MAQVC,QAAQ,EAAE;IARA;EAFP,CART;EAqBE6B,MAAM,EAAE;AArBV,CAxBuB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA_PROPS","image","group","GROUPS","data","label","description","formType","FORM_TYPES","propType","PROP_TYPES","ASSET","defaultValue","editable","required","title","string","STRING","leftDescription","rightDescription","icon","basic","aspectRatio","NUMBER","rating","number","min","max","step","precision","elevation","createElevationType","SEED_DATA","name","tag","category","COMPONENT_TYPES","card","preview_image_url","supports_list_render","props","numColumns","uncategorized","layout"],"sources":["CardContainerRating.js"],"sourcesContent":["import { GROUPS, FORM_TYPES, PROP_TYPES, COMPONENT_TYPES, createElevationType, } from \"@draftbit/types\";\nconst SEED_DATA_PROPS = {\n image: {\n group: GROUPS.data,\n label: \"Image\",\n description: \"Image\",\n formType: FORM_TYPES.image,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n title: {\n group: GROUPS.data,\n label: \"Title\",\n description: \"Text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Beautiful West Coast Villa\",\n editable: true,\n required: false,\n },\n leftDescription: {\n group: GROUPS.data,\n label: \"Left description\",\n description: \"Text to display on the left\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"San Diego\",\n editable: true,\n required: false,\n },\n rightDescription: {\n group: GROUPS.data,\n label: \"Right description\",\n description: \"Text to display on the right\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"$100\",\n editable: true,\n required: false,\n },\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Icon to display on the top right\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n aspectRatio: {\n group: GROUPS.basic,\n label: \"Aspect ratio\",\n description: \"Aspect ratio of the image\",\n formType: FORM_TYPES.aspectRatio,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 1.5,\n editable: true,\n required: false,\n },\n rating: {\n group: GROUPS.data,\n label: \"Rating\",\n description: \"Number of stars to show. A number 0-5.\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 5,\n min: 0,\n max: 5,\n step: 1,\n precision: 0,\n editable: true,\n required: false,\n },\n elevation: createElevationType(2),\n};\nexport const SEED_DATA = [\n {\n name: \"Medium Card (Rating)\",\n tag: \"CardContainerRating\",\n description: \"An elevated card with a title and description, that takes up half of its container.\",\n category: COMPONENT_TYPES.card,\n preview_image_url: \"{CLOUDINARY_URL}/Card_ContainerRating_2col.png\",\n supports_list_render: true,\n props: {\n ...SEED_DATA_PROPS,\n numColumns: {\n label: \"Number of Columns\",\n description: \"Numbre of columns\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 2,\n editable: false,\n required: false,\n },\n },\n layout: {},\n },\n {\n name: \"Large Card (Rating)\",\n tag: \"CardContainerRating\",\n description: \"An elevated card with a title and description, that takes up its full container.\",\n category: COMPONENT_TYPES.card,\n preview_image_url: \"{CLOUDINARY_URL}/Card_ContainerRating_3col.png\",\n supports_list_render: true,\n props: {\n ...SEED_DATA_PROPS,\n numColumns: {\n label: \"Number of Columns\",\n description: \"Numbre of columns\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 3,\n editable: false,\n required: false,\n },\n },\n layout: {},\n },\n];\n"],"mappings":";;;;;;;AAAA;;AACA,MAAMA,eAAe,GAAG;EACpBC,KAAK,EAAE;IACHC,KAAK,EAAEC,aAAA,CAAOC,IADX;IAEHC,KAAK,EAAE,OAFJ;IAGHC,WAAW,EAAE,OAHV;IAIHC,QAAQ,EAAEC,iBAAA,CAAWP,KAJlB;IAKHQ,QAAQ,EAAEC,iBAAA,CAAWC,KALlB;IAMHC,YAAY,EAAE,IANX;IAOHC,QAAQ,EAAE,IAPP;IAQHC,QAAQ,EAAE;EARP,CADa;EAWpBC,KAAK,EAAE;IACHb,KAAK,EAAEC,aAAA,CAAOC,IADX;IAEHC,KAAK,EAAE,OAFJ;IAGHC,WAAW,EAAE,iBAHV;IAIHC,QAAQ,EAAEC,iBAAA,CAAWQ,MAJlB;IAKHP,QAAQ,EAAEC,iBAAA,CAAWO,MALlB;IAMHL,YAAY,EAAE,4BANX;IAOHC,QAAQ,EAAE,IAPP;IAQHC,QAAQ,EAAE;EARP,CAXa;EAqBpBI,eAAe,EAAE;IACbhB,KAAK,EAAEC,aAAA,CAAOC,IADD;IAEbC,KAAK,EAAE,kBAFM;IAGbC,WAAW,EAAE,6BAHA;IAIbC,QAAQ,EAAEC,iBAAA,CAAWQ,MAJR;IAKbP,QAAQ,EAAEC,iBAAA,CAAWO,MALR;IAMbL,YAAY,EAAE,WAND;IAObC,QAAQ,EAAE,IAPG;IAQbC,QAAQ,EAAE;EARG,CArBG;EA+BpBK,gBAAgB,EAAE;IACdjB,KAAK,EAAEC,aAAA,CAAOC,IADA;IAEdC,KAAK,EAAE,mBAFO;IAGdC,WAAW,EAAE,8BAHC;IAIdC,QAAQ,EAAEC,iBAAA,CAAWQ,MAJP;IAKdP,QAAQ,EAAEC,iBAAA,CAAWO,MALP;IAMdL,YAAY,EAAE,MANA;IAO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IC,iBAAiB,EAAE,gDALvB;EAMIC,oBAAoB,EAAE,IAN1B;EAOIC,KAAK,EAAE,EACH,GAAGxC,eADA;IAEHyC,UAAU,EAAE;MACRpC,KAAK,EAAE,mBADC;MAERC,WAAW,EAAE,mBAFL;MAGRJ,KAAK,EAAEC,aAAA,CAAOuC,aAHN;MAIRnC,QAAQ,EAAEC,iBAAA,CAAWiB,MAJb;MAKRhB,QAAQ,EAAEC,iBAAA,CAAWa,MALb;MAMRX,YAAY,EAAE,CANN;MAORC,QAAQ,EAAE,KAPF;MAQRC,QAAQ,EAAE;IARF;EAFT,CAPX;EAoBI6B,MAAM,EAAE;AApBZ,CADqB,EAuBrB;EACIV,IAAI,EAAE,qBADV;EAEIC,GAAG,EAAE,qBAFT;EAGI5B,WAAW,EAAE,kFAHjB;EAII6B,QAAQ,EAAEC,sBAAA,CAAgBC,IAJ9B;EAKIC,iBAAiB,EAAE,gDALvB;EAMIC,oBAAoB,EAAE,IAN1B;EAOIC,KAAK,EAAE,EACH,GAAGxC,eADA;IAEHyC,UAAU,EAAE;MACRpC,KAAK,EAAE,mBADC;MAERC,WAAW,EAAE,mBAFL;MAGRJ,KAAK,EAAEC,aAAA,CAAOuC,aAHN;MAIRnC,QAAQ,EAAEC,iBAAA,CAAWiB,MAJb;MAKRhB,QAAQ,EAAEC,iBAAA,CAAWa,MALb;MAMRX,YAAY,EAAE,CANN;MAORC,QAAQ,EAAE,KAPF;MAQRC,QAAQ,EAAE;IARF;EAFT,CAPX;EAoBI6B,MAAM,EAAE;AApBZ,CAvBqB,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","OnCheck","OnUncheck","props","fieldName","createFieldNameProp","defaultValue","valuePropName","handlerPropName","color","createColorProp","group","GROUPS","basic","label","description","uncheckedColor","disabled","createBoolProp","size","createStaticNumberProp","checkedIcon","createIconProp","uncheckedIcon"],"sources":["Checkbox.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createBoolProp,\n createIconProp,\n createStaticNumberProp,\n createColorProp,\n createFieldNameProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Checkbox\",\n tag: \"Checkbox\",\n category: COMPONENT_TYPES.input,\n triggers: [Triggers.OnPress, Triggers.OnCheck, Triggers.OnUncheck],\n props: {\n fieldName: createFieldNameProp({\n defaultValue: \"checkboxValue\",\n valuePropName: \"status\",\n handlerPropName: \"onPress\",\n }),\n color: createColorProp({\n group: GROUPS.basic,\n label: \"Color\",\n description: \"Color for the button (used when the checkbox is checked)\",\n defaultValue: null,\n }),\n uncheckedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Color for the button when the checkbox is unchecked\",\n defaultValue: null,\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether the checkbox is disabled\",\n }),\n size: createStaticNumberProp({\n label: \"Size\",\n description: \"Specifies the size of the icon\",\n defaultValue: null,\n }),\n checkedIcon: createIconProp({\n label: \"Checked Icon\",\n description: 'Icon to show when the checkbox status is \"checked\"',\n defaultValue: null,\n }),\n uncheckedIcon: createIconProp({\n label: \"Unchecked Icon\",\n description: 'Icon to show when the checkbox status is \"unchecked\"',\n defaultValue: null,\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAWO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,UADiB;EAEvBC,GAAG,EAAE,UAFkB;EAGvBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHH;EAIvBC,QAAQ,EAAE,CAACC,eAAA,CAASC,OAAV,EAAmBD,eAAA,CAASE,OAA5B,EAAqCF,eAAA,CAASG,SAA9C,CAJa;EAKvBC,KAAK,EAAE;IACLC,SAAS,EAAE,IAAAC,0BAAA,EAAoB;MAC7BC,YAAY,EAAE,eADe;MAE7BC,aAAa,EAAE,QAFc;MAG7BC,eAAe,EAAE;IAHY,CAApB,CADN;IAMLC,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACrBC,KAAK,EAAEC,aAAA,CAAOC,KADO;MAErBC,KAAK,EAAE,OAFc;MAGrBC,WAAW,EAAE,0DAHQ;MAIrBT,YAAY,EAAE;IAJO,CAAhB,CANF;IAYLU,cAAc,EAAE,IAAAN,sBAAA,EAAgB;MAC9BC,KAAK,EAAEC,aAAA,CAAOC,KADgB;MAE9BC,KAAK,EAAE,kBAFuB;MAG9BC,WAAW,EAAE,qDAHiB;MAI9BT,YAAY,EAAE;IAJgB,CAAhB,CAZX;IAkBLW,QAAQ,EAAE,IAAAC,qBAAA,EAAe;MACvBJ,KAAK,EAAE,UADgB;MAEvBC,WAAW,EAAE;IAFU,CAAf,CAlBL;IAsBLI,IAAI,EAAE,IAAAC,6BAAA,EAAuB;MAC3BN,KAAK,EAAE,MADoB;MAE3BC,WAAW,EAAE,gCAFc;MAG3BT,YAAY,EAAE;IAHa,CAAvB,CAtBD;IA2BLe,WAAW,EAAE,IAAAC,qBAAA,EAAe;MAC1BR,KAAK,EAAE,cADmB;MAE1BC,WAAW,EAAE,oDAFa;MAG1BT,YAAY,EAAE;IAHY,CAAf,CA3BR;IAgCLiB,aAAa,EAAE,IAAAD,qBAAA,EAAe;MAC5BR,KAAK,EAAE,gBADqB;MAE5BC,WAAW,EAAE,sDAFe;MAG5BT,YAAY,EAAE;IAHc,CAAf;EAhCV;AALgB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","input","triggers","Triggers","OnPress","OnCheck","OnUncheck","props","fieldName","createFieldNameProp","defaultValue","valuePropName","handlerPropName","color","createColorProp","group","GROUPS","basic","label","description","uncheckedColor","disabled","createBoolProp","size","createStaticNumberProp","checkedIcon","createIconProp","uncheckedIcon"],"sources":["Checkbox.js"],"sourcesContent":["import { COMPONENT_TYPES, createBoolProp, createIconProp, createStaticNumberProp, createColorProp, createFieldNameProp, GROUPS, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Checkbox\",\n tag: \"Checkbox\",\n category: COMPONENT_TYPES.input,\n triggers: [Triggers.OnPress, Triggers.OnCheck, Triggers.OnUncheck],\n props: {\n fieldName: createFieldNameProp({\n defaultValue: \"checkboxValue\",\n valuePropName: \"status\",\n handlerPropName: \"onPress\",\n }),\n color: createColorProp({\n group: GROUPS.basic,\n label: \"Color\",\n description: \"Color for the button (used when the checkbox is checked)\",\n defaultValue: null,\n }),\n uncheckedColor: createColorProp({\n group: GROUPS.basic,\n label: \"Unselected Color\",\n description: \"Color for the button when the checkbox is unchecked\",\n defaultValue: null,\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether the checkbox is disabled\",\n }),\n size: createStaticNumberProp({\n label: \"Size\",\n description: \"Specifies the size of the icon\",\n defaultValue: null,\n }),\n checkedIcon: createIconProp({\n label: \"Checked Icon\",\n description: 'Icon to show when the checkbox status is \"checked\"',\n defaultValue: null,\n }),\n uncheckedIcon: createIconProp({\n label: \"Unchecked Icon\",\n description: 'Icon to show when the checkbox status is \"unchecked\"',\n defaultValue: null,\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;EACrBC,IAAI,EAAE,UADe;EAErBC,GAAG,EAAE,UAFgB;EAGrBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAHL;EAIrBC,QAAQ,EAAE,CAACC,eAAA,CAASC,OAAV,EAAmBD,eAAA,CAASE,OAA5B,EAAqCF,eAAA,CAASG,SAA9C,CAJW;EAKrBC,KAAK,EAAE;IACHC,SAAS,EAAE,IAAAC,0BAAA,EAAoB;MAC3BC,YAAY,EAAE,eADa;MAE3BC,aAAa,EAAE,QAFY;MAG3BC,eAAe,EAAE;IAHU,CAApB,CADR;IAMHC,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACnBC,KAAK,EAAEC,aAAA,CAAOC,KADK;MAEnBC,KAAK,EAAE,OAFY;MAGnBC,WAAW,EAAE,0DAHM;MAInBT,YAAY,EAAE;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