@tecsinapse/react-native-kit 1.22.7 → 1.22.8

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 (165) hide show
  1. package/dist/cjs/components/atoms/Avatar/Avatar.js +3 -21
  2. package/dist/cjs/components/atoms/Avatar/Avatar.js.map +1 -1
  3. package/dist/cjs/components/atoms/Badge/Badge.js +9 -43
  4. package/dist/cjs/components/atoms/Badge/Badge.js.map +1 -1
  5. package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js +14 -43
  6. package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
  7. package/dist/cjs/components/atoms/BottomNavigator/Item.js +13 -43
  8. package/dist/cjs/components/atoms/BottomNavigator/Item.js.map +1 -1
  9. package/dist/cjs/components/atoms/Button/Button.js +9 -42
  10. package/dist/cjs/components/atoms/Button/Button.js.map +1 -1
  11. package/dist/cjs/components/atoms/Button/States/Error.js +5 -23
  12. package/dist/cjs/components/atoms/Button/States/Error.js.map +1 -1
  13. package/dist/cjs/components/atoms/Button/States/Loading.js +3 -21
  14. package/dist/cjs/components/atoms/Button/States/Loading.js.map +1 -1
  15. package/dist/cjs/components/atoms/Button/States/Success.js +3 -21
  16. package/dist/cjs/components/atoms/Button/States/Success.js.map +1 -1
  17. package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js +3 -21
  18. package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  19. package/dist/cjs/components/atoms/Header/Header.js +18 -48
  20. package/dist/cjs/components/atoms/Header/Header.js.map +1 -1
  21. package/dist/cjs/components/atoms/Input/Input.js +32 -84
  22. package/dist/cjs/components/atoms/Input/Input.js.map +1 -1
  23. package/dist/cjs/components/atoms/InputMask/InputMask.js +29 -83
  24. package/dist/cjs/components/atoms/InputMask/InputMask.js.map +1 -1
  25. package/dist/cjs/components/atoms/Modal/ModalGroupManager.js +5 -33
  26. package/dist/cjs/components/atoms/Modal/ModalGroupManager.js.map +1 -1
  27. package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js +67 -86
  28. package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
  29. package/dist/cjs/components/atoms/Modal/useLazyModalManager.js +1 -1
  30. package/dist/cjs/components/atoms/Modal/useLazyModalManager.js.map +1 -1
  31. package/dist/cjs/components/atoms/Modal/useModalManager.js +1 -1
  32. package/dist/cjs/components/atoms/Modal/useModalManager.js.map +1 -1
  33. package/dist/cjs/components/atoms/Skeleton/Pulse.js +4 -5
  34. package/dist/cjs/components/atoms/Skeleton/Pulse.js.map +1 -1
  35. package/dist/cjs/components/atoms/Skeleton/Skeleton.js +13 -47
  36. package/dist/cjs/components/atoms/Skeleton/Skeleton.js.map +1 -1
  37. package/dist/cjs/components/atoms/Skeleton/Wave.js +5 -6
  38. package/dist/cjs/components/atoms/Skeleton/Wave.js.map +1 -1
  39. package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js +11 -43
  40. package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
  41. package/dist/cjs/components/atoms/Tag/Tag.js +5 -33
  42. package/dist/cjs/components/atoms/Tag/Tag.js.map +1 -1
  43. package/dist/cjs/components/atoms/Text/Text.js +4 -31
  44. package/dist/cjs/components/atoms/Text/Text.js.map +1 -1
  45. package/dist/cjs/components/atoms/Text/styled.js +3 -3
  46. package/dist/cjs/components/atoms/Text/styled.js.map +1 -1
  47. package/dist/cjs/components/atoms/TextArea/TextArea.js +29 -83
  48. package/dist/cjs/components/atoms/TextArea/TextArea.js.map +1 -1
  49. package/dist/cjs/components/molecules/Calendar/Calendar.js +8 -40
  50. package/dist/cjs/components/molecules/Calendar/Calendar.js.map +1 -1
  51. package/dist/cjs/components/molecules/DatePicker/DatePicker.js +15 -48
  52. package/dist/cjs/components/molecules/DatePicker/DatePicker.js.map +1 -1
  53. package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +12 -43
  54. package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  55. package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js +8 -40
  56. package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  57. package/dist/cjs/components/molecules/Grid/Grid.js +20 -55
  58. package/dist/cjs/components/molecules/Grid/Grid.js.map +1 -1
  59. package/dist/cjs/components/molecules/Grid/Item/Item.js +28 -75
  60. package/dist/cjs/components/molecules/Grid/Item/Item.js.map +1 -1
  61. package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js +13 -47
  62. package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  63. package/dist/cjs/components/molecules/IconTextButton/TextComponent.js +7 -23
  64. package/dist/cjs/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  65. package/dist/cjs/components/molecules/IconTextButton/styled.js +3 -3
  66. package/dist/cjs/components/molecules/IconTextButton/styled.js.map +1 -1
  67. package/dist/cjs/components/molecules/InputPassword/InputPassword.js +4 -35
  68. package/dist/cjs/components/molecules/InputPassword/InputPassword.js.map +1 -1
  69. package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js +15 -47
  70. package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  71. package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -49
  72. package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  73. package/dist/cjs/components/molecules/LabeledSwitch/styled.js +2 -2
  74. package/dist/cjs/components/molecules/LabeledSwitch/styled.js.map +1 -1
  75. package/dist/cjs/components/molecules/Select/Modal.js +25 -71
  76. package/dist/cjs/components/molecules/Select/Modal.js.map +1 -1
  77. package/dist/cjs/components/molecules/Select/Select.js +37 -91
  78. package/dist/cjs/components/molecules/Select/Select.js.map +1 -1
  79. package/dist/cjs/components/molecules/Select/styled.js +3 -6
  80. package/dist/cjs/components/molecules/Select/styled.js.map +1 -1
  81. package/dist/cjs/components/molecules/Snackbar/Snackbar.js +10 -41
  82. package/dist/cjs/components/molecules/Snackbar/Snackbar.js.map +1 -1
  83. package/dist/esm/components/atoms/Avatar/Avatar.js +3 -21
  84. package/dist/esm/components/atoms/Avatar/Avatar.js.map +1 -1
  85. package/dist/esm/components/atoms/Badge/Badge.js +9 -43
  86. package/dist/esm/components/atoms/Badge/Badge.js.map +1 -1
  87. package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js +14 -43
  88. package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
  89. package/dist/esm/components/atoms/BottomNavigator/Item.js +13 -43
  90. package/dist/esm/components/atoms/BottomNavigator/Item.js.map +1 -1
  91. package/dist/esm/components/atoms/Button/Button.js +9 -42
  92. package/dist/esm/components/atoms/Button/Button.js.map +1 -1
  93. package/dist/esm/components/atoms/Button/States/Error.js +6 -24
  94. package/dist/esm/components/atoms/Button/States/Error.js.map +1 -1
  95. package/dist/esm/components/atoms/Button/States/Loading.js +3 -21
  96. package/dist/esm/components/atoms/Button/States/Loading.js.map +1 -1
  97. package/dist/esm/components/atoms/Button/States/Success.js +3 -21
  98. package/dist/esm/components/atoms/Button/States/Success.js.map +1 -1
  99. package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js +3 -21
  100. package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  101. package/dist/esm/components/atoms/Header/Header.js +18 -48
  102. package/dist/esm/components/atoms/Header/Header.js.map +1 -1
  103. package/dist/esm/components/atoms/Input/Input.js +32 -84
  104. package/dist/esm/components/atoms/Input/Input.js.map +1 -1
  105. package/dist/esm/components/atoms/InputMask/InputMask.js +29 -83
  106. package/dist/esm/components/atoms/InputMask/InputMask.js.map +1 -1
  107. package/dist/esm/components/atoms/Modal/ModalGroupManager.js +5 -33
  108. package/dist/esm/components/atoms/Modal/ModalGroupManager.js.map +1 -1
  109. package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js +67 -86
  110. package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
  111. package/dist/esm/components/atoms/Modal/useLazyModalManager.js +1 -1
  112. package/dist/esm/components/atoms/Modal/useLazyModalManager.js.map +1 -1
  113. package/dist/esm/components/atoms/Modal/useModalManager.js +1 -1
  114. package/dist/esm/components/atoms/Modal/useModalManager.js.map +1 -1
  115. package/dist/esm/components/atoms/Skeleton/Pulse.js +4 -5
  116. package/dist/esm/components/atoms/Skeleton/Pulse.js.map +1 -1
  117. package/dist/esm/components/atoms/Skeleton/Skeleton.js +13 -47
  118. package/dist/esm/components/atoms/Skeleton/Skeleton.js.map +1 -1
  119. package/dist/esm/components/atoms/Skeleton/Wave.js +5 -6
  120. package/dist/esm/components/atoms/Skeleton/Wave.js.map +1 -1
  121. package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js +11 -43
  122. package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
  123. package/dist/esm/components/atoms/Tag/Tag.js +5 -33
  124. package/dist/esm/components/atoms/Tag/Tag.js.map +1 -1
  125. package/dist/esm/components/atoms/Text/Text.js +4 -31
  126. package/dist/esm/components/atoms/Text/Text.js.map +1 -1
  127. package/dist/esm/components/atoms/Text/styled.js +3 -3
  128. package/dist/esm/components/atoms/Text/styled.js.map +1 -1
  129. package/dist/esm/components/atoms/TextArea/TextArea.js +29 -83
  130. package/dist/esm/components/atoms/TextArea/TextArea.js.map +1 -1
  131. package/dist/esm/components/molecules/Calendar/Calendar.js +8 -40
  132. package/dist/esm/components/molecules/Calendar/Calendar.js.map +1 -1
  133. package/dist/esm/components/molecules/DatePicker/DatePicker.js +15 -48
  134. package/dist/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
  135. package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +12 -43
  136. package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  137. package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +8 -40
  138. package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  139. package/dist/esm/components/molecules/Grid/Grid.js +20 -55
  140. package/dist/esm/components/molecules/Grid/Grid.js.map +1 -1
  141. package/dist/esm/components/molecules/Grid/Item/Item.js +28 -75
  142. package/dist/esm/components/molecules/Grid/Item/Item.js.map +1 -1
  143. package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +13 -47
  144. package/dist/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  145. package/dist/esm/components/molecules/IconTextButton/TextComponent.js +7 -23
  146. package/dist/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  147. package/dist/esm/components/molecules/IconTextButton/styled.js +3 -3
  148. package/dist/esm/components/molecules/IconTextButton/styled.js.map +1 -1
  149. package/dist/esm/components/molecules/InputPassword/InputPassword.js +4 -35
  150. package/dist/esm/components/molecules/InputPassword/InputPassword.js.map +1 -1
  151. package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +15 -47
  152. package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  153. package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -49
  154. package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  155. package/dist/esm/components/molecules/LabeledSwitch/styled.js +2 -2
  156. package/dist/esm/components/molecules/LabeledSwitch/styled.js.map +1 -1
  157. package/dist/esm/components/molecules/Select/Modal.js +25 -71
  158. package/dist/esm/components/molecules/Select/Modal.js.map +1 -1
  159. package/dist/esm/components/molecules/Select/Select.js +38 -92
  160. package/dist/esm/components/molecules/Select/Select.js.map +1 -1
  161. package/dist/esm/components/molecules/Select/styled.js +3 -6
  162. package/dist/esm/components/molecules/Select/styled.js.map +1 -1
  163. package/dist/esm/components/molecules/Snackbar/Snackbar.js +10 -41
  164. package/dist/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
  165. package/package.json +3 -3
@@ -2,53 +2,23 @@ import * as React from 'react';
2
2
  import { Icon } from '@tecsinapse/react-core';
3
3
  import { TabContent, CustomTabContent } from './styled.js';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
- var __objRest = (source, exclude) => {
22
- var target = {};
23
- for (var prop in source)
24
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
- target[prop] = source[prop];
26
- if (source != null && __getOwnPropSymbols)
27
- for (var prop of __getOwnPropSymbols(source)) {
28
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
- target[prop] = source[prop];
30
- }
31
- return target;
32
- };
33
- function Item(_a) {
34
- var _b = _a, {
35
- _selected,
36
- icon,
37
- children
38
- } = _b, rest = __objRest(_b, [
39
- "_selected",
40
- "icon",
41
- "children"
42
- ]);
5
+ function Item({
6
+ _selected,
7
+ icon,
8
+ children,
9
+ ...rest
10
+ }) {
43
11
  const styledButtonStyle = _selected ? void 0 : { backgroundColor: "transparent" };
44
12
  const iconColorVariant = _selected ? "primary" : "secondary";
45
13
  if (icon) {
46
- return /* @__PURE__ */ React.createElement(TabContent, __spreadValues({
47
- style: styledButtonStyle
48
- }, rest), /* @__PURE__ */ React.createElement(Icon, __spreadValues({
14
+ return /* @__PURE__ */ React.createElement(TabContent, {
15
+ style: styledButtonStyle,
16
+ ...rest
17
+ }, /* @__PURE__ */ React.createElement(Icon, {
49
18
  colorVariant: iconColorVariant,
50
- size: "centi"
51
- }, icon)));
19
+ size: "centi",
20
+ ...icon
21
+ }));
52
22
  } else {
53
23
  return /* @__PURE__ */ React.createElement(CustomTabContent, null, children);
54
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Item.js","sources":["../../../../../src/components/atoms/BottomNavigator/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Icon, IconProps } from '@tecsinapse/react-core';\nimport { TabContent, CustomTabContent } from './styled';\nimport { ViewProps } from 'react-native';\nimport { TextNativeProps } from '../Text';\n\ntype ValueType = string | number | symbol;\n\nexport interface BottomNavigatorItemProps<T extends ValueType>\n extends Omit<ViewProps, 'children'> {\n _selected?: boolean;\n value: T;\n icon: IconProps;\n label?: string;\n labelProps?: TextNativeProps;\n labelElement?: React.ReactNode | React.ReactNode[];\n children: React.ReactNode | React.ReactNode[];\n}\n\ntype ItemPropsWithIcon<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'children'\n>;\n\ntype ItemPropsWithChildren<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'icon' | 'label' | 'labelElement' | 'labelProps'\n>;\n\nfunction Item<T extends ValueType>(props: ItemPropsWithChildren<T>);\nfunction Item<T extends ValueType>(props: ItemPropsWithIcon<T>);\nfunction Item<T extends ValueType>({\n _selected,\n icon,\n children,\n ...rest\n}: Partial<BottomNavigatorItemProps<T>>): JSX.Element {\n const styledButtonStyle = _selected\n ? undefined\n : { backgroundColor: 'transparent' };\n\n const iconColorVariant = _selected ? 'primary' : 'secondary';\n\n if (icon) {\n return (\n <TabContent style={styledButtonStyle} {...rest}>\n <Icon colorVariant={iconColorVariant} size={'centi'} {...icon} />\n </TabContent>\n );\n } else {\n return <CustomTabContent>{children}</CustomTabContent>;\n }\n}\n\nexport default Item;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAS,KAA0B,EAKmB,EAAA;AALnB,EACjC,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,SAAA;AAAA,IACA,IAAA;AAAA,IACA,QAAA;AAAA,GAlCF,GA+BmC,EAI9B,EAAA,IAAA,GAAA,SAAA,CAJ8B,EAI9B,EAAA;AAAA,IAHH,WAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,iBAAoB,GAAA,SAAA,GACtB,KACA,CAAA,GAAA,EAAE,iBAAiB,aAAc,EAAA,CAAA;AAErC,EAAM,MAAA,gBAAA,GAAmB,YAAY,SAAY,GAAA,WAAA,CAAA;AAEjD,EAAA,IAAI,IAAM,EAAA;AACR,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,cAAA,CAAA;AAAA,MAAW,KAAO,EAAA,iBAAA;AAAA,KAAA,EAAuB,uBACvC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA;AAAA,MAAK,YAAc,EAAA,gBAAA;AAAA,MAAkB,IAAM,EAAA,OAAA;AAAA,KAAA,EAAa,KAAM,CACjE,CAAA,CAAA;AAAA,GAEG,MAAA;AACL,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,wBAAkB,QAAS,CAAA,CAAA;AAAA,GACrC;AACF;;;;"}
1
+ {"version":3,"file":"Item.js","sources":["../../../../../src/components/atoms/BottomNavigator/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Icon, IconProps } from '@tecsinapse/react-core';\nimport { TabContent, CustomTabContent } from './styled';\nimport { ViewProps } from 'react-native';\nimport { TextNativeProps } from '../Text';\n\ntype ValueType = string | number | symbol;\n\nexport interface BottomNavigatorItemProps<T extends ValueType>\n extends Omit<ViewProps, 'children'> {\n _selected?: boolean;\n value: T;\n icon: IconProps;\n label?: string;\n labelProps?: TextNativeProps;\n labelElement?: React.ReactNode | React.ReactNode[];\n children: React.ReactNode | React.ReactNode[];\n}\n\ntype ItemPropsWithIcon<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'children'\n>;\n\ntype ItemPropsWithChildren<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'icon' | 'label' | 'labelElement' | 'labelProps'\n>;\n\nfunction Item<T extends ValueType>(props: ItemPropsWithChildren<T>);\nfunction Item<T extends ValueType>(props: ItemPropsWithIcon<T>);\nfunction Item<T extends ValueType>({\n _selected,\n icon,\n children,\n ...rest\n}: Partial<BottomNavigatorItemProps<T>>): JSX.Element {\n const styledButtonStyle = _selected\n ? undefined\n : { backgroundColor: 'transparent' };\n\n const iconColorVariant = _selected ? 'primary' : 'secondary';\n\n if (icon) {\n return (\n <TabContent style={styledButtonStyle} {...rest}>\n <Icon colorVariant={iconColorVariant} size={'centi'} {...icon} />\n </TabContent>\n );\n } else {\n return <CustomTabContent>{children}</CustomTabContent>;\n }\n}\n\nexport default Item;\n"],"names":[],"mappings":";;;;AA+BA,SAAS,IAA0B,CAAA;AAAA,EACjC,SAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAsD,EAAA;AACpD,EAAA,MAAM,iBAAoB,GAAA,SAAA,GACtB,KACA,CAAA,GAAA,EAAE,iBAAiB,aAAc,EAAA,CAAA;AAErC,EAAM,MAAA,gBAAA,GAAmB,YAAY,SAAY,GAAA,WAAA,CAAA;AAEjD,EAAA,IAAI,IAAM,EAAA;AACR,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,MAAW,KAAO,EAAA,iBAAA;AAAA,MAAoB,GAAG,IAAA;AAAA,KAAA,kBACvC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAK,YAAc,EAAA,gBAAA;AAAA,MAAkB,IAAM,EAAA,OAAA;AAAA,MAAU,GAAG,IAAA;AAAA,KAAM,CACjE,CAAA,CAAA;AAAA,GAEG,MAAA;AACL,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,wBAAkB,QAAS,CAAA,CAAA;AAAA,GACrC;AACF;;;;"}
@@ -2,55 +2,22 @@ import { Button as Button$1 } from '@tecsinapse/react-core';
2
2
  import React__default, { useCallback } from 'react';
3
3
  import { Keyboard } from 'react-native';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __objRest = (source, exclude) => {
25
- var target = {};
26
- for (var prop in source)
27
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
- target[prop] = source[prop];
29
- if (source != null && __getOwnPropSymbols)
30
- for (var prop of __getOwnPropSymbols(source)) {
31
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
- target[prop] = source[prop];
33
- }
34
- return target;
35
- };
36
- const Button = (_a) => {
37
- var _b = _a, {
38
- autoDismissKeyboard = true,
39
- onPress
40
- } = _b, others = __objRest(_b, [
41
- "autoDismissKeyboard",
42
- "onPress"
43
- ]);
5
+ const Button = ({
6
+ autoDismissKeyboard = true,
7
+ onPress,
8
+ ...others
9
+ }) => {
44
10
  const handleOnPress = useCallback(
45
11
  (event) => {
46
12
  autoDismissKeyboard && Keyboard.dismiss();
47
- onPress == null ? void 0 : onPress(event);
13
+ onPress?.(event);
48
14
  },
49
15
  [onPress]
50
16
  );
51
- return /* @__PURE__ */ React__default.createElement(Button$1, __spreadProps(__spreadValues({}, others), {
17
+ return /* @__PURE__ */ React__default.createElement(Button$1, {
18
+ ...others,
52
19
  onPress: handleOnPress
53
- }));
20
+ });
54
21
  };
55
22
 
56
23
  export { Button };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { Button as ButtonCore, ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC, useCallback } from 'react';\nimport { Keyboard } from 'react-native';\n\nexport type ButtonNativeProps = ButtonProps & {\n autoDismissKeyboard?: boolean;\n};\n\nexport const Button: FC<ButtonNativeProps> = ({\n autoDismissKeyboard = true,\n onPress,\n ...others\n}) => {\n const handleOnPress = useCallback(\n event => {\n autoDismissKeyboard && Keyboard.dismiss();\n onPress?.(event);\n },\n [onPress]\n );\n\n return <ButtonCore {...others} onPress={handleOnPress} />;\n};\n"],"names":["React","ButtonCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQa,MAAA,MAAA,GAAgC,CAAC,EAIxC,KAAA;AAJwC,EAC5C,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAsB,mBAAA,GAAA,IAAA;AAAA,IACtB,OAAA;AAAA,GAVF,GAQ8C,EAGzC,EAAA,MAAA,GAAA,SAAA,CAHyC,EAGzC,EAAA;AAAA,IAFH,qBAAA;AAAA,IACA,SAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,aAAgB,GAAA,WAAA;AAAA,IACpB,CAAS,KAAA,KAAA;AACP,MAAA,mBAAA,IAAuB,SAAS,OAAQ,EAAA,CAAA;AACxC,MAAU,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,KAAA,CAAA,CAAA;AAAA,KACZ;AAAA,IACA,CAAC,OAAO,CAAA;AAAA,GACV,CAAA;AAEA,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAACC,2CAAe,MAAf,CAAA,EAAA;AAAA,IAAuB,OAAS,EAAA,aAAA;AAAA,GAAe,CAAA,CAAA,CAAA;AACzD;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { Button as ButtonCore, ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC, useCallback } from 'react';\nimport { Keyboard } from 'react-native';\n\nexport type ButtonNativeProps = ButtonProps & {\n autoDismissKeyboard?: boolean;\n};\n\nexport const Button: FC<ButtonNativeProps> = ({\n autoDismissKeyboard = true,\n onPress,\n ...others\n}) => {\n const handleOnPress = useCallback(\n event => {\n autoDismissKeyboard && Keyboard.dismiss();\n onPress?.(event);\n },\n [onPress]\n );\n\n return <ButtonCore {...others} onPress={handleOnPress} />;\n};\n"],"names":["React","ButtonCore"],"mappings":";;;;AAQO,MAAM,SAAgC,CAAC;AAAA,EAC5C,mBAAsB,GAAA,IAAA;AAAA,EACtB,OAAA;AAAA,EACG,GAAA,MAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,aAAgB,GAAA,WAAA;AAAA,IACpB,CAAS,KAAA,KAAA;AACP,MAAA,mBAAA,IAAuB,SAAS,OAAQ,EAAA,CAAA;AACxC,MAAA,OAAA,GAAU,KAAK,CAAA,CAAA;AAAA,KACjB;AAAA,IACA,CAAC,OAAO,CAAA;AAAA,GACV,CAAA;AAEA,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,QAAA,EAAA;AAAA,IAAY,GAAG,MAAA;AAAA,IAAQ,OAAS,EAAA,aAAA;AAAA,GAAe,CAAA,CAAA;AACzD;;;;"}
@@ -1,31 +1,13 @@
1
- import { Error } from '@tecsinapse/react-core';
1
+ import { Error as Error$1 } from '@tecsinapse/react-core';
2
2
  import React__default from 'react';
3
3
  import Text from '../../Text/Text.js';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- const Error2 = (props) => {
25
- return /* @__PURE__ */ React__default.createElement(Error, __spreadProps(__spreadValues({}, props), {
5
+ const Error = (props) => {
6
+ return /* @__PURE__ */ React__default.createElement(Error$1, {
7
+ ...props,
26
8
  textComponent: Text
27
- }));
9
+ });
28
10
  };
29
11
 
30
- export { Error2 as default };
12
+ export { Error as default };
31
13
  //# sourceMappingURL=Error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Error.js","sources":["../../../../../../src/components/atoms/Button/States/Error.tsx"],"sourcesContent":["import { ButtonStateProps, Error as CoreError } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Error: FC<ButtonStateProps> = props => {\n return <CoreError {...props} textComponent={Text} />;\n};\n\nexport default Error;\n"],"names":["Error","React","CoreError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAMA,SAA8B,CAAS,KAAA,KAAA;AAC3C,EAAO,uBAAAC,cAAA,CAAA,aAAA,CAACC,wCAAc,KAAd,CAAA,EAAA;AAAA,IAAqB,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA,CAAA;AACpD;;;;"}
1
+ {"version":3,"file":"Error.js","sources":["../../../../../../src/components/atoms/Button/States/Error.tsx"],"sourcesContent":["import { ButtonStateProps, Error as CoreError } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Error: FC<ButtonStateProps> = props => {\n return <CoreError {...props} textComponent={Text} />;\n};\n\nexport default Error;\n"],"names":["React","CoreError"],"mappings":";;;;AAIA,MAAM,QAA8B,CAAS,KAAA,KAAA;AAC3C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,OAAA,EAAA;AAAA,IAAW,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AACpD;;;;"}
@@ -2,29 +2,11 @@ import { Loading as Loading$1 } from '@tecsinapse/react-core';
2
2
  import React__default from 'react';
3
3
  import Text from '../../Text/Text.js';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
5
  const Loading = (props) => {
25
- return /* @__PURE__ */ React__default.createElement(Loading$1, __spreadProps(__spreadValues({}, props), {
6
+ return /* @__PURE__ */ React__default.createElement(Loading$1, {
7
+ ...props,
26
8
  textComponent: Text
27
- }));
9
+ });
28
10
  };
29
11
 
30
12
  export { Loading as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Loading.js","sources":["../../../../../../src/components/atoms/Button/States/Loading.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Loading as CoreLoading,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Loading: FC<ButtonStateProps> = props => {\n return <CoreLoading {...props} textComponent={Text} />;\n};\n\nexport default Loading;\n"],"names":["React","CoreLoading"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAACC,4CAAgB,KAAhB,CAAA,EAAA;AAAA,IAAuB,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA,CAAA;AACtD;;;;"}
1
+ {"version":3,"file":"Loading.js","sources":["../../../../../../src/components/atoms/Button/States/Loading.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Loading as CoreLoading,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Loading: FC<ButtonStateProps> = props => {\n return <CoreLoading {...props} textComponent={Text} />;\n};\n\nexport default Loading;\n"],"names":["React","CoreLoading"],"mappings":";;;;AAOA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,SAAA,EAAA;AAAA,IAAa,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AACtD;;;;"}
@@ -2,29 +2,11 @@ import { Success as Success$1 } from '@tecsinapse/react-core';
2
2
  import React__default from 'react';
3
3
  import Text from '../../Text/Text.js';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
5
  const Success = (props) => {
25
- return /* @__PURE__ */ React__default.createElement(Success$1, __spreadProps(__spreadValues({}, props), {
6
+ return /* @__PURE__ */ React__default.createElement(Success$1, {
7
+ ...props,
26
8
  textComponent: Text
27
- }));
9
+ });
28
10
  };
29
11
 
30
12
  export { Success as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Success.js","sources":["../../../../../../src/components/atoms/Button/States/Success.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Success as CoreSuccess,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Success: FC<ButtonStateProps> = props => {\n return <CoreSuccess {...props} textComponent={Text} />;\n};\n\nexport default Success;\n"],"names":["React","CoreSuccess"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAACC,4CAAgB,KAAhB,CAAA,EAAA;AAAA,IAAuB,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA,CAAA;AACtD;;;;"}
1
+ {"version":3,"file":"Success.js","sources":["../../../../../../src/components/atoms/Button/States/Success.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Success as CoreSuccess,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Success: FC<ButtonStateProps> = props => {\n return <CoreSuccess {...props} textComponent={Text} />;\n};\n\nexport default Success;\n"],"names":["React","CoreSuccess"],"mappings":";;;;AAOA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,SAAA,EAAA;AAAA,IAAa,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AACtD;;;;"}
@@ -2,29 +2,11 @@ import { GroupButtonOption as GroupButtonOption$1 } from '@tecsinapse/react-core
2
2
  import React__default from 'react';
3
3
  import Text from '../Text/Text.js';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
5
  const GroupButtonOption = (props) => {
25
- return /* @__PURE__ */ React__default.createElement(GroupButtonOption$1, __spreadProps(__spreadValues({}, props), {
6
+ return /* @__PURE__ */ React__default.createElement(GroupButtonOption$1, {
7
+ ...props,
26
8
  TextComponent: Text
27
- }));
9
+ });
28
10
  };
29
11
 
30
12
  export { GroupButtonOption as default };
@@ -1 +1 @@
1
- {"version":3,"file":"GroupButtonOption.js","sources":["../../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"sourcesContent":["import {\n GroupButtonOption as CoreGroupButtonOption,\n GroupButtonOptionProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Text } from '../Text';\n\nconst GroupButtonOption = (props: GroupButtonOptionProps): JSX.Element => {\n return <CoreGroupButtonOption {...props} TextComponent={Text} />;\n};\n\nexport default GroupButtonOption;\n"],"names":["React","CoreGroupButtonOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOM,MAAA,iBAAA,GAAoB,CAAC,KAA+C,KAAA;AACxE,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAACC,sDAA0B,KAA1B,CAAA,EAAA;AAAA,IAAiC,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA,CAAA;AAChE;;;;"}
1
+ {"version":3,"file":"GroupButtonOption.js","sources":["../../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"sourcesContent":["import {\n GroupButtonOption as CoreGroupButtonOption,\n GroupButtonOptionProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Text } from '../Text';\n\nconst GroupButtonOption = (props: GroupButtonOptionProps): JSX.Element => {\n return <CoreGroupButtonOption {...props} TextComponent={Text} />;\n};\n\nexport default GroupButtonOption;\n"],"names":["React","CoreGroupButtonOption"],"mappings":";;;;AAOM,MAAA,iBAAA,GAAoB,CAAC,KAA+C,KAAA;AACxE,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,mBAAA,EAAA;AAAA,IAAuB,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AAChE;;;;"}
@@ -3,58 +3,28 @@ import { Icon } from '@tecsinapse/react-core';
3
3
  import * as React from 'react';
4
4
  import Badge from '../Badge/Badge.js';
5
5
 
6
- var __defProp = Object.defineProperty;
7
- var __defProps = Object.defineProperties;
8
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
- const Header = (_a) => {
38
- var _b = _a, {
39
- rightButton,
40
- leftButton,
41
- children
42
- } = _b, rest = __objRest(_b, [
43
- "rightButton",
44
- "leftButton",
45
- "children"
46
- ]);
47
- const ButtonBase = () => /* @__PURE__ */ React.createElement(FloatingButton, __spreadProps(__spreadValues({}, rightButton), {
48
- variant: (rightButton == null ? void 0 : rightButton.variant) || "filled",
49
- color: (rightButton == null ? void 0 : rightButton.color) || "primary",
50
- size: (rightButton == null ? void 0 : rightButton.size) || "small"
51
- }), (rightButton == null ? void 0 : rightButton.icon) && /* @__PURE__ */ React.createElement(Icon, __spreadValues({}, rightButton == null ? void 0 : rightButton.icon)));
52
- return /* @__PURE__ */ React.createElement(StyledView, __spreadValues({}, rest), leftButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, (leftButton == null ? void 0 : leftButton.valueBagde) ? /* @__PURE__ */ React.createElement(Badge, {
6
+ const Header = ({
7
+ rightButton,
8
+ leftButton,
9
+ children,
10
+ ...rest
11
+ }) => {
12
+ const ButtonBase = () => /* @__PURE__ */ React.createElement(FloatingButton, {
13
+ ...rightButton,
14
+ variant: rightButton?.variant || "filled",
15
+ color: rightButton?.color || "primary",
16
+ size: rightButton?.size || "small"
17
+ }, rightButton?.icon && /* @__PURE__ */ React.createElement(Icon, {
18
+ ...rightButton?.icon
19
+ }));
20
+ return /* @__PURE__ */ React.createElement(StyledView, {
21
+ ...rest
22
+ }, leftButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, leftButton?.valueBagde ? /* @__PURE__ */ React.createElement(Badge, {
53
23
  value: leftButton.valueBagde,
54
24
  color: "error"
55
25
  }, /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(Dummy, {
56
26
  disabled: true
57
- }), children, rightButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, (rightButton == null ? void 0 : rightButton.valueBagde) ? /* @__PURE__ */ React.createElement(Badge, {
27
+ }), children, rightButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, rightButton?.valueBagde ? /* @__PURE__ */ React.createElement(Badge, {
58
28
  value: rightButton.valueBagde,
59
29
  color: "error"
60
30
  }, /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(Dummy, {
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":["../../../../../src/components/atoms/Header/Header.tsx"],"sourcesContent":["import { ViewProps } from 'react-native';\nimport { StyledView, FloatingButton, Dummy } from './styled';\nimport { ButtonProps, Icon, IconProps } from '@tecsinapse/react-core';\nimport * as React from 'react';\nimport Badge from '../Badge/Badge';\nimport { FC } from 'react';\n\ntype Attachable = ButtonProps & {\n icon: IconProps;\n valueBagde?: number;\n};\n\nexport interface HeaderProps extends ViewProps {\n rightButton?: Attachable;\n leftButton?: Attachable;\n}\n\nconst Header: React.FC<HeaderProps> = ({\n rightButton,\n leftButton,\n children,\n ...rest\n}) => {\n const ButtonBase: FC = () => (\n <FloatingButton\n {...rightButton}\n variant={rightButton?.variant || 'filled'}\n color={rightButton?.color || 'primary'}\n size={rightButton?.size || 'small'}\n >\n {rightButton?.icon && <Icon {...rightButton?.icon} />}\n </FloatingButton>\n );\n\n return (\n <StyledView {...rest}>\n {leftButton ? (\n <>\n {leftButton?.valueBagde ? (\n <Badge value={leftButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n {children}\n {rightButton ? (\n <>\n {rightButton?.valueBagde ? (\n <Badge value={rightButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n </StyledView>\n );\n};\n\nexport default Header;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBM,MAAA,MAAA,GAAgC,CAAC,EAKjC,KAAA;AALiC,EACrC,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,WAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,GApBF,GAiBuC,EAIlC,EAAA,IAAA,GAAA,SAAA,CAJkC,EAIlC,EAAA;AAAA,IAHH,aAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,UAAiB,GAAA,sBACpB,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EACK,WADL,CAAA,EAAA;AAAA,IAEC,OAAA,EAAA,CAAS,2CAAa,OAAW,KAAA,QAAA;AAAA,IACjC,KAAA,EAAA,CAAO,2CAAa,KAAS,KAAA,SAAA;AAAA,IAC7B,IAAA,EAAA,CAAM,2CAAa,IAAQ,KAAA,OAAA;AAAA,GAAA,CAAA,EAAA,CAE1B,2CAAa,IAAQ,qBAAA,KAAA,CAAA,aAAA,CAAC,IAAS,EAAA,cAAA,CAAA,EAAA,EAAA,WAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,WAAA,CAAa,KAAM,CACrD,CAAA,CAAA;AAGF,EAAA,2CACG,UAAe,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,EACb,6BAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,CAAA,UAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAY,8BACV,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,OAAO,UAAW,CAAA,UAAA;AAAA,IAAY,KAAO,EAAA,OAAA;AAAA,GAC1C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAW,CACd,CAAA,uCAEC,UAAW,EAAA,IAAA,CAEhB,oBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,QAAQ,EAAA,IAAA;AAAA,GAAC,GAEjB,QACA,EAAA,WAAA,mBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,CAAA,WAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,WAAA,CAAa,8BACX,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,OAAO,WAAY,CAAA,UAAA;AAAA,IAAY,KAAO,EAAA,OAAA;AAAA,GAC3C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAW,CACd,CAAA,uCAEC,UAAW,EAAA,IAAA,CAEhB,oBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,QAAQ,EAAA,IAAA;AAAA,GAAC,CAEpB,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Header.js","sources":["../../../../../src/components/atoms/Header/Header.tsx"],"sourcesContent":["import { ViewProps } from 'react-native';\nimport { StyledView, FloatingButton, Dummy } from './styled';\nimport { ButtonProps, Icon, IconProps } from '@tecsinapse/react-core';\nimport * as React from 'react';\nimport Badge from '../Badge/Badge';\nimport { FC } from 'react';\n\ntype Attachable = ButtonProps & {\n icon: IconProps;\n valueBagde?: number;\n};\n\nexport interface HeaderProps extends ViewProps {\n rightButton?: Attachable;\n leftButton?: Attachable;\n}\n\nconst Header: React.FC<HeaderProps> = ({\n rightButton,\n leftButton,\n children,\n ...rest\n}) => {\n const ButtonBase: FC = () => (\n <FloatingButton\n {...rightButton}\n variant={rightButton?.variant || 'filled'}\n color={rightButton?.color || 'primary'}\n size={rightButton?.size || 'small'}\n >\n {rightButton?.icon && <Icon {...rightButton?.icon} />}\n </FloatingButton>\n );\n\n return (\n <StyledView {...rest}>\n {leftButton ? (\n <>\n {leftButton?.valueBagde ? (\n <Badge value={leftButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n {children}\n {rightButton ? (\n <>\n {rightButton?.valueBagde ? (\n <Badge value={rightButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n </StyledView>\n );\n};\n\nexport default Header;\n"],"names":[],"mappings":";;;;;AAiBA,MAAM,SAAgC,CAAC;AAAA,EACrC,WAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAM,MAAA,UAAA,GAAiB,sBACpB,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACE,GAAG,WAAA;AAAA,IACJ,OAAA,EAAS,aAAa,OAAW,IAAA,QAAA;AAAA,IACjC,KAAA,EAAO,aAAa,KAAS,IAAA,SAAA;AAAA,IAC7B,IAAA,EAAM,aAAa,IAAQ,IAAA,OAAA;AAAA,GAE1B,EAAA,WAAA,EAAa,wBAAS,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,WAAa,EAAA,IAAA;AAAA,GAAM,CACrD,CAAA,CAAA;AAGF,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IAAY,GAAG,IAAA;AAAA,GAAA,EACb,UACC,mBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACG,UAAY,EAAA,UAAA,mBACV,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,OAAO,UAAW,CAAA,UAAA;AAAA,IAAY,KAAO,EAAA,OAAA;AAAA,GAC1C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAW,CACd,CAAA,uCAEC,UAAW,EAAA,IAAA,CAEhB,oBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,QAAQ,EAAA,IAAA;AAAA,GAAC,GAEjB,QACA,EAAA,WAAA,mBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,WAAA,EAAa,6BACX,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,OAAO,WAAY,CAAA,UAAA;AAAA,IAAY,KAAO,EAAA,OAAA;AAAA,GAC3C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAW,CACd,CAAA,uCAEC,UAAW,EAAA,IAAA,CAEhB,oBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,QAAQ,EAAA,IAAA;AAAA,GAAC,CAEpB,CAAA,CAAA;AAEJ;;;;"}
@@ -4,86 +4,32 @@ import { View } from 'react-native';
4
4
  import Text from '../Text/Text.js';
5
5
  import { StyledNativeInput } from './styled.js';
6
6
 
7
- var __defProp = Object.defineProperty;
8
- var __defProps = Object.defineProperties;
9
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
10
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
- var __hasOwnProp = Object.prototype.hasOwnProperty;
12
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
- var __spreadValues = (a, b) => {
15
- for (var prop in b || (b = {}))
16
- if (__hasOwnProp.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- if (__getOwnPropSymbols)
19
- for (var prop of __getOwnPropSymbols(b)) {
20
- if (__propIsEnum.call(b, prop))
21
- __defNormalProp(a, prop, b[prop]);
22
- }
23
- return a;
24
- };
25
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
- var __objRest = (source, exclude) => {
27
- var target = {};
28
- for (var prop in source)
29
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
- target[prop] = source[prop];
31
- if (source != null && __getOwnPropSymbols)
32
- for (var prop of __getOwnPropSymbols(source)) {
33
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
- target[prop] = source[prop];
35
- }
36
- return target;
37
- };
38
7
  const Input = React__default.forwardRef(
39
- (_a, ref) => {
40
- var _b = _a, {
41
- label,
42
- labelColor,
43
- labelColorVariant,
44
- labelColorTone,
45
- labelTypography,
46
- labelStack,
47
- labelWeight,
48
- leftComponent,
49
- rightComponent,
50
- disabled,
51
- borderColor,
52
- borderColorGradation,
53
- inputFontStack = "default",
54
- inputFontWeight = "bold",
55
- inputContainerStyle,
56
- variant = "default",
57
- hintComponent,
58
- hint,
59
- onFocus,
60
- onBlur,
61
- value,
62
- placeholder
63
- } = _b, rest = __objRest(_b, [
64
- "label",
65
- "labelColor",
66
- "labelColorVariant",
67
- "labelColorTone",
68
- "labelTypography",
69
- "labelStack",
70
- "labelWeight",
71
- "leftComponent",
72
- "rightComponent",
73
- "disabled",
74
- "borderColor",
75
- "borderColorGradation",
76
- "inputFontStack",
77
- "inputFontWeight",
78
- "inputContainerStyle",
79
- "variant",
80
- "hintComponent",
81
- "hint",
82
- "onFocus",
83
- "onBlur",
84
- "value",
85
- "placeholder"
86
- ]);
8
+ ({
9
+ label,
10
+ labelColor,
11
+ labelColorVariant,
12
+ labelColorTone,
13
+ labelTypography,
14
+ labelStack,
15
+ labelWeight,
16
+ leftComponent,
17
+ rightComponent,
18
+ disabled,
19
+ borderColor,
20
+ borderColorGradation,
21
+ inputFontStack = "default",
22
+ inputFontWeight = "bold",
23
+ inputContainerStyle,
24
+ variant = "default",
25
+ hintComponent,
26
+ hint,
27
+ onFocus,
28
+ onBlur,
29
+ value,
30
+ placeholder,
31
+ ...rest
32
+ }, ref) => {
87
33
  const _hint = hintComponent || /* @__PURE__ */ React__default.createElement(Hint, {
88
34
  TextComponent: Text,
89
35
  text: hint,
@@ -94,9 +40,10 @@ const Input = React__default.forwardRef(
94
40
  onBlur,
95
41
  !disabled
96
42
  );
97
- const internalStyle = __spreadValues({
98
- minHeight: RFValue(50)
99
- }, { inputContainerStyle });
43
+ const internalStyle = {
44
+ minHeight: RFValue(50),
45
+ ...{ inputContainerStyle }
46
+ };
100
47
  const onlyLabel = label && !placeholder;
101
48
  return /* @__PURE__ */ React__default.createElement(View, null, /* @__PURE__ */ React__default.createElement(InputContainer, {
102
49
  label: value ? label : void 0,
@@ -115,7 +62,8 @@ const Input = React__default.forwardRef(
115
62
  focused,
116
63
  disabled,
117
64
  variant
118
- }, /* @__PURE__ */ React__default.createElement(StyledNativeInput, __spreadProps(__spreadValues({}, rest), {
65
+ }, /* @__PURE__ */ React__default.createElement(StyledNativeInput, {
66
+ ...rest,
119
67
  placeholder: onlyLabel ? label : placeholder,
120
68
  value,
121
69
  ref,
@@ -124,7 +72,7 @@ const Input = React__default.forwardRef(
124
72
  disabled,
125
73
  onFocus: handleFocus,
126
74
  onBlur: handleBlur
127
- }))), hint && _hint);
75
+ })), hint && _hint);
128
76
  }
129
77
  );
130
78
  Input.displayName = "Input";
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":["../../../../../src/components/atoms/Input/Input.tsx"],"sourcesContent":["import {\n FontStackType,\n FontWeightType,\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n RFValue,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { StyleProp, TextInput, View, ViewStyle } from 'react-native';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport interface InputNativeProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst Input = React.forwardRef<TextInput, InputNativeProps>(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const internalStyle: StyleProp<ViewStyle> = {\n minHeight: RFValue(50),\n ...{ inputContainerStyle },\n };\n const onlyLabel = label && !placeholder;\n\n return (\n <View>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={internalStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,QAAQA,cAAM,CAAA,UAAA;AAAA,EAClB,CACE,IAyBA,GACG,KAAA;AA1BH,IACE,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,MAAA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,iBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,MACA,oBAAA;AAAA,MACA,cAAiB,GAAA,SAAA;AAAA,MACjB,eAAkB,GAAA,MAAA;AAAA,MAClB,mBAAA;AAAA,MACA,OAAU,GAAA,SAAA;AAAA,MACV,aAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,KA9CN,GAwBI,EAuBK,EAAA,IAAA,GAAA,SAAA,CAvBL,EAuBK,EAAA;AAAA,MAtBH,OAAA;AAAA,MACA,YAAA;AAAA,MACA,mBAAA;AAAA,MACA,gBAAA;AAAA,MACA,iBAAA;AAAA,MACA,YAAA;AAAA,MACA,aAAA;AAAA,MACA,eAAA;AAAA,MACA,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,aAAA;AAAA,MACA,sBAAA;AAAA,MACA,gBAAA;AAAA,MACA,iBAAA;AAAA,MACA,qBAAA;AAAA,MACA,SAAA;AAAA,MACA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,MACA,aAAA;AAAA,KAAA,CAAA,CAAA;AAKF,IAAM,MAAA,KAAA,GAAQ,iCACXA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAK,aAAe,EAAA,IAAA;AAAA,MAAM,IAAM,EAAA,IAAA;AAAA,MAAM,OAAA;AAAA,KAAkB,CAAA,CAAA;AAE3D,IAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,MAC3C,OAAA;AAAA,MACA,MAAA;AAAA,MACA,CAAC,QAAA;AAAA,KACH,CAAA;AAEA,IAAA,MAAM,aAAsC,GAAA,cAAA,CAAA;AAAA,MAC1C,SAAA,EAAW,QAAQ,EAAE,CAAA;AAAA,KAAA,EAClB,EAAE,mBAAoB,EAAA,CAAA,CAAA;AAE3B,IAAM,MAAA,SAAA,GAAY,SAAS,CAAC,WAAA,CAAA;AAE5B,IACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,4BACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,MACC,KAAA,EAAO,QAAQ,KAAQ,GAAA,KAAA,CAAA;AAAA,MACvB,UAAA;AAAA,MACA,iBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAgB,EAAA,IAAA;AAAA,MAChB,aAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,oBAAA;AAAA,MACA,mBAAqB,EAAA,aAAA;AAAA,MACrB,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KAEA,kBAAAA,cAAA,CAAA,aAAA,CAAC,oDACK,IADL,CAAA,EAAA;AAAA,MAEC,WAAA,EAAa,YAAY,KAAQ,GAAA,WAAA;AAAA,MACjC,KAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAW,EAAA,cAAA;AAAA,MACX,UAAY,EAAA,eAAA;AAAA,MACZ,QAAA;AAAA,MACA,OAAS,EAAA,WAAA;AAAA,MACT,MAAQ,EAAA,UAAA;AAAA,KACV,CAAA,CACF,CACC,EAAA,IAAA,IAAQ,KACX,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,KAAA,CAAM,WAAc,GAAA,OAAA;;;;"}
1
+ {"version":3,"file":"Input.js","sources":["../../../../../src/components/atoms/Input/Input.tsx"],"sourcesContent":["import {\n FontStackType,\n FontWeightType,\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n RFValue,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { StyleProp, TextInput, View, ViewStyle } from 'react-native';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport interface InputNativeProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst Input = React.forwardRef<TextInput, InputNativeProps>(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const internalStyle: StyleProp<ViewStyle> = {\n minHeight: RFValue(50),\n ...{ inputContainerStyle },\n };\n const onlyLabel = label && !placeholder;\n\n return (\n <View>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={internalStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["React"],"mappings":";;;;;;AAsBA,MAAM,QAAQA,cAAM,CAAA,UAAA;AAAA,EAClB,CACE;AAAA,IACE,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,cAAiB,GAAA,SAAA;AAAA,IACjB,eAAkB,GAAA,MAAA;AAAA,IAClB,mBAAA;AAAA,IACA,OAAU,GAAA,SAAA;AAAA,IACV,aAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACG,GAAA,IAAA;AAAA,KAEL,GACG,KAAA;AACH,IAAM,MAAA,KAAA,GAAQ,iCACXA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAK,aAAe,EAAA,IAAA;AAAA,MAAM,IAAM,EAAA,IAAA;AAAA,MAAM,OAAA;AAAA,KAAkB,CAAA,CAAA;AAE3D,IAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,MAC3C,OAAA;AAAA,MACA,MAAA;AAAA,MACA,CAAC,QAAA;AAAA,KACH,CAAA;AAEA,IAAA,MAAM,aAAsC,GAAA;AAAA,MAC1C,SAAA,EAAW,QAAQ,EAAE,CAAA;AAAA,MACrB,GAAG,EAAE,mBAAoB,EAAA;AAAA,KAC3B,CAAA;AACA,IAAM,MAAA,SAAA,GAAY,SAAS,CAAC,WAAA,CAAA;AAE5B,IACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,4BACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,MACC,KAAA,EAAO,QAAQ,KAAQ,GAAA,KAAA,CAAA;AAAA,MACvB,UAAA;AAAA,MACA,iBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAgB,EAAA,IAAA;AAAA,MAChB,aAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,oBAAA;AAAA,MACA,mBAAqB,EAAA,aAAA;AAAA,MACrB,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KAAA,kBAECA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,WAAA,EAAa,YAAY,KAAQ,GAAA,WAAA;AAAA,MACjC,KAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAW,EAAA,cAAA;AAAA,MACX,UAAY,EAAA,eAAA;AAAA,MACZ,QAAA;AAAA,MACA,OAAS,EAAA,WAAA;AAAA,MACT,MAAQ,EAAA,UAAA;AAAA,KACV,CACF,CACC,EAAA,IAAA,IAAQ,KACX,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,KAAA,CAAM,WAAc,GAAA,OAAA;;;;"}