@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
@@ -1 +1 @@
1
- {"version":3,"file":"Wave.js","sources":["../../../../../src/components/atoms/Skeleton/Wave.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { waveAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nconst AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);\n\nexport const Wave = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const range = width ?? childrenLayout.width;\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const translateX = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [-range, range],\n });\n\n useEffect(() => {\n waveAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <AnimatedLinearGradient\n colors={[\n 'transparent',\n 'rgba(0,0,0,0.05)',\n 'rgba(0,0,0,0.1)',\n 'transparent',\n ]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n position: 'absolute',\n top: childrenLayout.y ?? 0,\n left: childrenLayout.x ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n transform: [\n {\n translateX: translateX,\n },\n ],\n }}\n />\n );\n};\n"],"names":["React"],"mappings":";;;;;AAMA,MAAM,sBAAA,GAAyB,QAAS,CAAA,uBAAA,CAAwB,cAAc,CAAA,CAAA;AAEvE,MAAM,OAAO,CAAC;AAAA,EACnB,MAAS,GAAA,IAAA;AAAA,EACT,KAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AACF,CAA2B,KAAA;AAb3B,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAcE,EAAM,MAAA,KAAA,GAAQ,wBAAS,cAAe,CAAA,KAAA,CAAA;AACtC,EAAA,MAAM,gBAAgB,MAAO,CAAA,IAAI,SAAS,KAAM,CAAA,CAAC,CAAC,CAAE,CAAA,OAAA,CAAA;AAEpD,EAAM,MAAA,UAAA,GAAa,cAAc,WAAY,CAAA;AAAA,IAC3C,UAAA,EAAY,CAAC,CAAA,EAAG,CAAC,CAAA;AAAA,IACjB,WAAa,EAAA,CAAC,CAAC,KAAA,EAAO,KAAK,CAAA;AAAA,GAC5B,CAAA,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,aAAA,CAAc,QAAQ,aAAa,CAAA,CAAA;AAAA,GACrC,EAAG,CAAC,MAAM,CAAC,CAAA,CAAA;AAEX,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,sBAAA,EAAA;AAAA,IACC,MAAQ,EAAA;AAAA,MACN,aAAA;AAAA,MACA,kBAAA;AAAA,MACA,iBAAA;AAAA,MACA,aAAA;AAAA,KACF;AAAA,IACA,KAAO,EAAA,EAAE,CAAG,EAAA,CAAA,EAAG,GAAG,CAAE,EAAA;AAAA,IACpB,GAAK,EAAA,EAAE,CAAG,EAAA,CAAA,EAAG,GAAG,CAAE,EAAA;AAAA,IAClB,KAAO,EAAA;AAAA,MACL,KAAA,EAAO,wBAAS,cAAe,CAAA,KAAA;AAAA,MAC/B,MAAA,EAAQ,0BAAU,cAAe,CAAA,MAAA;AAAA,MACjC,QAAU,EAAA,UAAA;AAAA,MACV,GAAA,EAAA,CAAK,EAAe,GAAA,cAAA,CAAA,CAAA,KAAf,IAAoB,GAAA,EAAA,GAAA,CAAA;AAAA,MACzB,IAAA,EAAA,CAAM,EAAe,GAAA,cAAA,CAAA,CAAA,KAAf,IAAoB,GAAA,EAAA,GAAA,CAAA;AAAA,MAC1B,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,QAAA;AAAA,MACV,SAAW,EAAA;AAAA,QACT;AAAA,UACE,UAAA;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,GACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Wave.js","sources":["../../../../../src/components/atoms/Skeleton/Wave.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { waveAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nconst AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);\n\nexport const Wave = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const range = width ?? childrenLayout.width;\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const translateX = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [-range, range],\n });\n\n useEffect(() => {\n waveAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <AnimatedLinearGradient\n colors={[\n 'transparent',\n 'rgba(0,0,0,0.05)',\n 'rgba(0,0,0,0.1)',\n 'transparent',\n ]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n position: 'absolute',\n top: childrenLayout.y ?? 0,\n left: childrenLayout.x ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n transform: [\n {\n translateX: translateX,\n },\n ],\n }}\n />\n );\n};\n"],"names":["React"],"mappings":";;;;;AAMA,MAAM,sBAAA,GAAyB,QAAS,CAAA,uBAAA,CAAwB,cAAc,CAAA,CAAA;AAEvE,MAAM,OAAO,CAAC;AAAA,EACnB,MAAS,GAAA,IAAA;AAAA,EACT,KAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AACF,CAA2B,KAAA;AACzB,EAAM,MAAA,KAAA,GAAQ,SAAS,cAAe,CAAA,KAAA,CAAA;AACtC,EAAA,MAAM,gBAAgB,MAAO,CAAA,IAAI,SAAS,KAAM,CAAA,CAAC,CAAC,CAAE,CAAA,OAAA,CAAA;AAEpD,EAAM,MAAA,UAAA,GAAa,cAAc,WAAY,CAAA;AAAA,IAC3C,UAAA,EAAY,CAAC,CAAA,EAAG,CAAC,CAAA;AAAA,IACjB,WAAa,EAAA,CAAC,CAAC,KAAA,EAAO,KAAK,CAAA;AAAA,GAC5B,CAAA,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,aAAA,CAAc,QAAQ,aAAa,CAAA,CAAA;AAAA,GACrC,EAAG,CAAC,MAAM,CAAC,CAAA,CAAA;AAEX,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,sBAAA,EAAA;AAAA,IACC,MAAQ,EAAA;AAAA,MACN,aAAA;AAAA,MACA,kBAAA;AAAA,MACA,iBAAA;AAAA,MACA,aAAA;AAAA,KACF;AAAA,IACA,KAAO,EAAA,EAAE,CAAG,EAAA,CAAA,EAAG,GAAG,CAAE,EAAA;AAAA,IACpB,GAAK,EAAA,EAAE,CAAG,EAAA,CAAA,EAAG,GAAG,CAAE,EAAA;AAAA,IAClB,KAAO,EAAA;AAAA,MACL,KAAA,EAAO,SAAS,cAAe,CAAA,KAAA;AAAA,MAC/B,MAAA,EAAQ,UAAU,cAAe,CAAA,MAAA;AAAA,MACjC,QAAU,EAAA,UAAA;AAAA,MACV,GAAA,EAAK,eAAe,CAAK,IAAA,CAAA;AAAA,MACzB,IAAA,EAAM,eAAe,CAAK,IAAA,CAAA;AAAA,MAC1B,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,QAAA;AAAA,MACV,SAAW,EAAA;AAAA,QACT;AAAA,UACE,UAAA;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,GACF,CAAA,CAAA;AAEJ;;;;"}
@@ -3,46 +3,13 @@ import { Dimensions, ScrollView, View } from 'react-native';
3
3
  import { extractNumbersFromString } from '@tecsinapse/react-core';
4
4
  import { useTheme } from '@emotion/react';
5
5
 
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __objRest = (source, exclude) => {
23
- var target = {};
24
- for (var prop in source)
25
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
- target[prop] = source[prop];
27
- if (source != null && __getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(source)) {
29
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
- target[prop] = source[prop];
31
- }
32
- return target;
33
- };
34
- const SnappingSlider = (_a) => {
35
- var _b = _a, {
36
- children,
37
- showAmount,
38
- scrollAmount,
39
- spacing
40
- } = _b, rest = __objRest(_b, [
41
- "children",
42
- "showAmount",
43
- "scrollAmount",
44
- "spacing"
45
- ]);
6
+ const SnappingSlider = ({
7
+ children,
8
+ showAmount,
9
+ scrollAmount,
10
+ spacing,
11
+ ...rest
12
+ }) => {
46
13
  const theme = useTheme();
47
14
  const childCount = React.Children.count(children);
48
15
  const screenWidth = Dimensions.get("window").width;
@@ -55,13 +22,14 @@ const SnappingSlider = (_a) => {
55
22
  const padCompensation = horizontalPadding * Math.sign(index);
56
23
  return offset + padCompensation;
57
24
  });
58
- return /* @__PURE__ */ React.createElement(ScrollView, __spreadValues({
25
+ return /* @__PURE__ */ React.createElement(ScrollView, {
59
26
  horizontal: true,
60
27
  snapToOffsets,
61
28
  snapToStart: true,
62
29
  snapToEnd: true,
63
- showsHorizontalScrollIndicator: false
64
- }, rest), React.Children.map(children, (child, index) => {
30
+ showsHorizontalScrollIndicator: false,
31
+ ...rest
32
+ }, React.Children.map(children, (child, index) => {
65
33
  const isFirst = index === 0;
66
34
  const isLast = index === childCount - 1;
67
35
  return /* @__PURE__ */ React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"file":"SnappingSlider.js","sources":["../../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAA,cAAA,GAAgD,CAAC,EAMjD,KAAA;AANiD,EACrD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,GAlCF,GA8BuD,EAKlD,EAAA,IAAA,GAAA,SAAA,CALkD,EAKlD,EAAA;AAAA,IAJH,UAAA;AAAA,IACA,YAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,EAAA,MAAM,WAAc,GAAA,UAAA,CAAW,GAAI,CAAA,QAAQ,CAAE,CAAA,KAAA,CAAA;AAC7C,EAAA,MAAM,eAAkB,GAAA,IAAA,CAAK,KAAM,CAAA,WAAA,GAAc,UAAU,CAAA,CAAA;AAC3D,EAAA,MAAM,oBAAoB,OACtB,GAAA,wBAAA,CAAyB,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CACnD,GAAA,CAAA,CAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA;AAAA,IACpB,GAAG,MAAM,IAAK,CAAA,IAAA,CAAK,aAAa,YAAY,CAAC,EAAE,IAAK,EAAA;AAAA,GACtD,CAAE,IAAI,CAAS,KAAA,KAAA;AACb,IAAM,MAAA,MAAA,GAAS,kBAAkB,YAAe,GAAA,KAAA,CAAA;AAChD,IAAA,MAAM,eAAkB,GAAA,iBAAA,GAAoB,IAAK,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAC3D,IAAA,OAAO,MAAS,GAAA,eAAA,CAAA;AAAA,GACjB,CAAA,CAAA;AAED,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,cAAA,CAAA;AAAA,IACC,UAAU,EAAA,IAAA;AAAA,IACV,aAAA;AAAA,IACA,WAAW,EAAA,IAAA;AAAA,IACX,SAAS,EAAA,IAAA;AAAA,IACT,8BAAgC,EAAA,KAAA;AAAA,GAAA,EAC5B,OAEH,KAAM,CAAA,QAAA,CAAS,IAAI,QAAU,EAAA,CAAC,OAAO,KAAU,KAAA;AAC9C,IAAA,MAAM,UAAU,KAAU,KAAA,CAAA,CAAA;AAC1B,IAAM,MAAA,MAAA,GAAS,UAAU,UAAa,GAAA,CAAA,CAAA;AAEtC,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,eAAA;AAAA,QACP,iBAAmB,EAAA,iBAAA;AAAA,QACnB,WAAA,EAAa,UAAU,CAAI,GAAA,iBAAA;AAAA,QAC3B,YAAA,EAAc,SAAS,CAAI,GAAA,iBAAA;AAAA,OAC7B;AAAA,KAAA,EAEC,KACH,CAAA,CAAA;AAAA,GAEH,CACH,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SnappingSlider.js","sources":["../../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"names":[],"mappings":";;;;;AA8BA,MAAM,iBAAgD,CAAC;AAAA,EACrD,QAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,EAAA,MAAM,WAAc,GAAA,UAAA,CAAW,GAAI,CAAA,QAAQ,CAAE,CAAA,KAAA,CAAA;AAC7C,EAAA,MAAM,eAAkB,GAAA,IAAA,CAAK,KAAM,CAAA,WAAA,GAAc,UAAU,CAAA,CAAA;AAC3D,EAAA,MAAM,oBAAoB,OACtB,GAAA,wBAAA,CAAyB,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CACnD,GAAA,CAAA,CAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA;AAAA,IACpB,GAAG,MAAM,IAAK,CAAA,IAAA,CAAK,aAAa,YAAY,CAAC,EAAE,IAAK,EAAA;AAAA,GACtD,CAAE,IAAI,CAAS,KAAA,KAAA;AACb,IAAM,MAAA,MAAA,GAAS,kBAAkB,YAAe,GAAA,KAAA,CAAA;AAChD,IAAA,MAAM,eAAkB,GAAA,iBAAA,GAAoB,IAAK,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAC3D,IAAA,OAAO,MAAS,GAAA,eAAA,CAAA;AAAA,GACjB,CAAA,CAAA;AAED,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IACC,UAAU,EAAA,IAAA;AAAA,IACV,aAAA;AAAA,IACA,WAAW,EAAA,IAAA;AAAA,IACX,SAAS,EAAA,IAAA;AAAA,IACT,8BAAgC,EAAA,KAAA;AAAA,IAC/B,GAAG,IAAA;AAAA,GAAA,EAEH,MAAM,QAAS,CAAA,GAAA,CAAI,QAAU,EAAA,CAAC,OAAO,KAAU,KAAA;AAC9C,IAAA,MAAM,UAAU,KAAU,KAAA,CAAA,CAAA;AAC1B,IAAM,MAAA,MAAA,GAAS,UAAU,UAAa,GAAA,CAAA,CAAA;AAEtC,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,eAAA;AAAA,QACP,iBAAmB,EAAA,iBAAA;AAAA,QACnB,WAAA,EAAa,UAAU,CAAI,GAAA,iBAAA;AAAA,QAC3B,YAAA,EAAc,SAAS,CAAI,GAAA,iBAAA;AAAA,OAC7B;AAAA,KAAA,EAEC,KACH,CAAA,CAAA;AAAA,GAEH,CACH,CAAA,CAAA;AAEJ;;;;"}
@@ -2,45 +2,17 @@ import React__default from 'react';
2
2
  import { Tag as Tag$1 } from '@tecsinapse/react-core';
3
3
  import Text from '../Text/Text.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
- const Tag = (_a) => {
34
- var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
35
- return /* @__PURE__ */ React__default.createElement(Tag$1, __spreadValues({
5
+ const Tag = ({ value, ...rest }) => {
6
+ return /* @__PURE__ */ React__default.createElement(Tag$1, {
36
7
  value: /* @__PURE__ */ React__default.createElement(Text, {
37
8
  colorVariant: "secondary",
38
9
  colorTone: "dark",
39
10
  fontStack: "default",
40
11
  fontWeight: "bold",
41
12
  typography: rest.variant === "small" ? "sub" : "base"
42
- }, value)
43
- }, rest));
13
+ }, value),
14
+ ...rest
15
+ });
44
16
  };
45
17
 
46
18
  export { Tag as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAA,GAAA,GAA0B,CAAC,EAAoC,KAAA;AAApC,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAXnC,KAAA,EAAA,GAWiC,EAAY,EAAA,IAAA,GAAA,SAAA,CAAZ,IAAY,CAAV,OAAA,CAAA,CAAA,CAAA;AACjC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA,cAAA,CAAA;AAAA,IACC,uBACGD,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,GAAA,EAEE,IACN,CAAA,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;AAWA,MAAM,GAA0B,GAAA,CAAC,EAAE,KAAA,EAAA,GAAU,MAAwB,KAAA;AACnE,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA;AAAA,IACC,uBACGD,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,IAED,GAAG,IAAA;AAAA,GACN,CAAA,CAAA;AAEJ;;;;"}
@@ -1,37 +1,10 @@
1
1
  import React__default from 'react';
2
2
  import { StyledNativeText } from './styled.js';
3
3
 
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- const Text = (_a) => {
33
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
34
- return /* @__PURE__ */ React__default.createElement(StyledNativeText, __spreadValues({}, rest), children);
4
+ const Text = ({ children, ...rest }) => {
5
+ return /* @__PURE__ */ React__default.createElement(StyledNativeText, {
6
+ ...rest
7
+ }, children);
35
8
  };
36
9
 
37
10
  export { Text as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAA,IAAA,GAA4B,CAAC,EAAuC,KAAA;AAAvC,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EANrC,QAAA,EAAA,GAMmC,EAAe,EAAA,IAAA,GAAA,SAAA,CAAf,IAAe,CAAb,UAAA,CAAA,CAAA,CAAA;AACnC,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAAC,gBAAqB,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,EAAO,QAAS,CAAA,CAAA;AAC/C;;;;"}
1
+ {"version":3,"file":"Text.js","sources":["../../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"names":["React"],"mappings":";;;AAMA,MAAM,IAA4B,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,MAAwB,KAAA;AACxE,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IAAkB,GAAG,IAAA;AAAA,GAAA,EAAO,QAAS,CAAA,CAAA;AAC/C;;;;"}
@@ -7,11 +7,11 @@ const fontStyles = ({
7
7
  fontStack = "default",
8
8
  fontWeight = "regular"
9
9
  }) => {
10
- const fontFamily = (theme == null ? void 0 : theme.font.stack[fontStack]) || "";
11
- const fontStyle = theme == null ? void 0 : theme.font.files[fontWeight];
10
+ const fontFamily = theme?.font.stack[fontStack] || "";
11
+ const fontStyle = theme?.font.files[fontWeight];
12
12
  return css`
13
13
  ${Platform.OS === "android" ? "font-weight: normal;" : void 0}
14
- font-family: ${fontStyle == null ? void 0 : fontStyle.replace("{0}", fontFamily)};
14
+ font-family: ${fontStyle?.replace("{0}", fontFamily)};
15
15
  `;
16
16
  };
17
17
  const StyledNativeText = styled(Text)(fontStyles);
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAeO,MAAM,aAAa,CAAC;AAAA,EACzB,KAAA;AAAA,EACA,SAAY,GAAA,SAAA;AAAA,EACZ,UAAa,GAAA,SAAA;AACf,CAA2C,KAAA;AACzC,EAAA,MAAM,UAAa,GAAA,CAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAO,IAAK,CAAA,KAAA,CAAM,SAAc,CAAA,KAAA,EAAA,CAAA;AACnD,EAAM,MAAA,SAAA,GAAY,KAAO,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,IAAA,CAAK,KAAM,CAAA,UAAA,CAAA,CAAA;AACpC,EAAO,OAAA,GAAA,CAAA;AAAA,IACH,EAAA,QAAA,CAAS,EAAO,KAAA,SAAA,GAAY,sBAAyB,GAAA,KAAA,CAAA,CAAA;AAAA,iBACxC,EAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAW,QAAQ,KAAO,EAAA,UAAA,CAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAE7C,EAAA;AAEO,MAAM,gBAAmB,GAAA,MAAA,CAAO,IAAI,CAAA,CAEzC,UAAU;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAeO,MAAM,aAAa,CAAC;AAAA,EACzB,KAAA;AAAA,EACA,SAAY,GAAA,SAAA;AAAA,EACZ,UAAa,GAAA,SAAA;AACf,CAA2C,KAAA;AACzC,EAAA,MAAM,UAAa,GAAA,KAAA,EAAO,IAAK,CAAA,KAAA,CAAM,SAAc,CAAA,IAAA,EAAA,CAAA;AACnD,EAAM,MAAA,SAAA,GAAY,KAAO,EAAA,IAAA,CAAK,KAAM,CAAA,UAAA,CAAA,CAAA;AACpC,EAAO,OAAA,GAAA,CAAA;AAAA,IACH,EAAA,QAAA,CAAS,EAAO,KAAA,SAAA,GAAY,sBAAyB,GAAA,KAAA,CAAA,CAAA;AAAA,iBACxC,EAAA,SAAA,EAAW,OAAQ,CAAA,KAAA,EAAO,UAAU,CAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAEvD,EAAA;AAEO,MAAM,gBAAmB,GAAA,MAAA,CAAO,IAAI,CAAA,CAEzC,UAAU;;;;"}
@@ -3,87 +3,32 @@ import { useInputFocus, TextArea as TextArea$1 } from '@tecsinapse/react-core';
3
3
  import Text from '../Text/Text.js';
4
4
  import { StyledNativeInput } from './styled.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 TextArea = (_a) => {
38
- var _b = _a, {
39
- label,
40
- labelColor,
41
- labelColorVariant,
42
- labelColorTone,
43
- labelTypography,
44
- labelStack,
45
- labelWeight,
46
- leftComponent,
47
- rightComponent,
48
- disabled,
49
- style,
50
- borderColor,
51
- borderColorGradation,
52
- inputFontStack = "default",
53
- inputFontWeight = "bold",
54
- inputContainerStyle,
55
- variant = "default",
56
- hintComponent,
57
- hint,
58
- onFocus,
59
- onBlur,
60
- value,
61
- maxLength
62
- } = _b, rest = __objRest(_b, [
63
- "label",
64
- "labelColor",
65
- "labelColorVariant",
66
- "labelColorTone",
67
- "labelTypography",
68
- "labelStack",
69
- "labelWeight",
70
- "leftComponent",
71
- "rightComponent",
72
- "disabled",
73
- "style",
74
- "borderColor",
75
- "borderColorGradation",
76
- "inputFontStack",
77
- "inputFontWeight",
78
- "inputContainerStyle",
79
- "variant",
80
- "hintComponent",
81
- "hint",
82
- "onFocus",
83
- "onBlur",
84
- "value",
85
- "maxLength"
86
- ]);
6
+ const TextArea = ({
7
+ label,
8
+ labelColor,
9
+ labelColorVariant,
10
+ labelColorTone,
11
+ labelTypography,
12
+ labelStack,
13
+ labelWeight,
14
+ leftComponent,
15
+ rightComponent,
16
+ disabled,
17
+ style,
18
+ borderColor,
19
+ borderColorGradation,
20
+ inputFontStack = "default",
21
+ inputFontWeight = "bold",
22
+ inputContainerStyle,
23
+ variant = "default",
24
+ hintComponent,
25
+ hint,
26
+ onFocus,
27
+ onBlur,
28
+ value,
29
+ maxLength,
30
+ ...rest
31
+ }) => {
87
32
  const { focused, handleBlur, handleFocus } = useInputFocus(
88
33
  onFocus,
89
34
  onBlur,
@@ -112,7 +57,8 @@ const TextArea = (_a) => {
112
57
  style,
113
58
  TextComponent: Text,
114
59
  maxLength
115
- }, /* @__PURE__ */ React__default.createElement(StyledNativeInput, __spreadProps(__spreadValues({}, rest), {
60
+ }, /* @__PURE__ */ React__default.createElement(StyledNativeInput, {
61
+ ...rest,
116
62
  fontStack: inputFontStack,
117
63
  fontWeight: inputFontWeight,
118
64
  disabled,
@@ -122,7 +68,7 @@ const TextArea = (_a) => {
122
68
  multiline: true,
123
69
  value,
124
70
  maxLength
125
- })));
71
+ }));
126
72
  };
127
73
 
128
74
  export { TextArea as default };
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\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 maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\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={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledNativeInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"names":["React","TACore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAA,QAAA,GAA8B,CAAC,EAyB/B,KAAA;AAzB+B,EACnC,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,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,KAAA;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,SAAA;AAAA,GAlCF,GAWqC,EAwBhC,EAAA,IAAA,GAAA,SAAA,CAxBgC,EAwBhC,EAAA;AAAA,IAvBH,OAAA;AAAA,IACA,YAAA;AAAA,IACA,mBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA,eAAA;AAAA,IACA,gBAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA;AAAA,IACA,sBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,qBAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,IAC3C,OAAA;AAAA,IACA,MAAA;AAAA,IACA,CAAC,QAAA;AAAA,GACH,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,UAAA,EAAA;AAAA,IACC,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAgB,EAAA,IAAA;AAAA,IAChB,aAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,mBAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAe,EAAA,IAAA;AAAA,IACf,SAAA;AAAA,GAEA,kBAAAD,cAAA,CAAA,aAAA,CAAC,oDACK,IADL,CAAA,EAAA;AAAA,IAEC,SAAW,EAAA,cAAA;AAAA,IACX,UAAY,EAAA,eAAA;AAAA,IACZ,QAAA;AAAA,IACA,OAAS,EAAA,WAAA;AAAA,IACT,MAAQ,EAAA,UAAA;AAAA,IACR,iBAAmB,EAAA,KAAA;AAAA,IACnB,SAAS,EAAA,IAAA;AAAA,IACT,KAAA;AAAA,IACA,SAAA;AAAA,GAAA,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\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 maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\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={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledNativeInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"names":["React","TACore"],"mappings":";;;;;AAWA,MAAM,WAA8B,CAAC;AAAA,EACnC,KAAA;AAAA,EACA,UAAA;AAAA,EACA,iBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,oBAAA;AAAA,EACA,cAAiB,GAAA,SAAA;AAAA,EACjB,eAAkB,GAAA,MAAA;AAAA,EAClB,mBAAA;AAAA,EACA,OAAU,GAAA,SAAA;AAAA,EACV,aAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,IAC3C,OAAA;AAAA,IACA,MAAA;AAAA,IACA,CAAC,QAAA;AAAA,GACH,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,UAAA,EAAA;AAAA,IACC,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAgB,EAAA,IAAA;AAAA,IAChB,aAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,mBAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAe,EAAA,IAAA;AAAA,IACf,SAAA;AAAA,GAAA,kBAECD,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,SAAW,EAAA,cAAA;AAAA,IACX,UAAY,EAAA,eAAA;AAAA,IACZ,QAAA;AAAA,IACA,OAAS,EAAA,WAAA;AAAA,IACT,MAAQ,EAAA,UAAA;AAAA,IACR,iBAAmB,EAAA,KAAA;AAAA,IACnB,SAAS,EAAA,IAAA;AAAA,IACT,KAAA;AAAA,IACA,SAAA;AAAA,GACF,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -3,47 +3,15 @@ import React__default from 'react';
3
3
  import { getLocale } from '../../../utils/date.js';
4
4
  import Text from '../../atoms/Text/Text.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 Calendar = (_a) => {
38
- var _b = _a, {
39
- locale
40
- } = _b, rest = __objRest(_b, [
41
- "locale"
42
- ]);
43
- return /* @__PURE__ */ React__default.createElement(Calendar$1, __spreadProps(__spreadValues({}, rest), {
6
+ const Calendar = ({
7
+ locale,
8
+ ...rest
9
+ }) => {
10
+ return /* @__PURE__ */ React__default.createElement(Calendar$1, {
11
+ ...rest,
44
12
  TextComponent: Text,
45
- locale: locale != null ? locale : getLocale()
46
- }));
13
+ locale: locale ?? getLocale()
14
+ });
47
15
  };
48
16
 
49
17
  export { Calendar };
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sources":["../../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as CalendarCore,\n CalendarProps,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { Text } from '../../atoms/Text';\n\nexport const Calendar = <T extends SelectionType>({\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element => {\n return (\n <CalendarCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","CalendarCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAA,QAAA,GAAW,CAA0B,EAGb,KAAA;AAHa,EAChD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,MAAA;AAAA,GAVF,GASkD,EAE7C,EAAA,IAAA,GAAA,SAAA,CAF6C,EAE7C,EAAA;AAAA,IADH,QAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAACC,6CACK,IADL,CAAA,EAAA;AAAA,IAEC,aAAe,EAAA,IAAA;AAAA,IACf,MAAA,EAAQ,0BAAU,SAAU,EAAA;AAAA,GAC9B,CAAA,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Calendar.js","sources":["../../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as CalendarCore,\n CalendarProps,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { Text } from '../../atoms/Text';\n\nexport const Calendar = <T extends SelectionType>({\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element => {\n return (\n <CalendarCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","CalendarCore"],"mappings":";;;;;AASO,MAAM,WAAW,CAA0B;AAAA,EAChD,MAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAqC,KAAA;AACnC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,UAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,aAAe,EAAA,IAAA;AAAA,IACf,MAAA,EAAQ,UAAU,SAAU,EAAA;AAAA,GAC9B,CAAA,CAAA;AAEJ;;;;"}
@@ -9,67 +9,34 @@ import Text from '../../atoms/Text/Text.js';
9
9
  import { Calendar } from '../Calendar/Calendar.js';
10
10
  import { CalendarBoxContent } from './styled.js';
11
11
 
12
- var __defProp = Object.defineProperty;
13
- var __defProps = Object.defineProperties;
14
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
15
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
16
- var __hasOwnProp = Object.prototype.hasOwnProperty;
17
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
18
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19
- var __spreadValues = (a, b) => {
20
- for (var prop in b || (b = {}))
21
- if (__hasOwnProp.call(b, prop))
22
- __defNormalProp(a, prop, b[prop]);
23
- if (__getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(b)) {
25
- if (__propIsEnum.call(b, prop))
26
- __defNormalProp(a, prop, b[prop]);
27
- }
28
- return a;
29
- };
30
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
31
- var __objRest = (source, exclude) => {
32
- var target = {};
33
- for (var prop in source)
34
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
35
- target[prop] = source[prop];
36
- if (source != null && __getOwnPropSymbols)
37
- for (var prop of __getOwnPropSymbols(source)) {
38
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
39
- target[prop] = source[prop];
40
- }
41
- return target;
42
- };
43
- const DatePicker = (_a) => {
44
- var _b = _a, {
45
- locale,
46
- onChange
47
- } = _b, rest = __objRest(_b, [
48
- "locale",
49
- "onChange"
50
- ]);
12
+ const DatePicker = ({
13
+ locale,
14
+ onChange,
15
+ ...rest
16
+ }) => {
51
17
  const modal = useLazyModalManager();
52
18
  const handleChange = (value) => {
53
- onChange == null ? void 0 : onChange(value);
19
+ onChange?.(value);
54
20
  modal.requestUpdate();
55
21
  };
56
- return /* @__PURE__ */ React__default.createElement(DatePicker$1, __spreadProps(__spreadValues({}, rest), {
22
+ return /* @__PURE__ */ React__default.createElement(DatePicker$1, {
23
+ ...rest,
57
24
  TextComponent: Text,
58
25
  CalendarComponent: Calendar,
59
- locale: locale != null ? locale : getLocale(),
26
+ locale: locale ?? getLocale(),
60
27
  onChange: handleChange,
61
28
  requestShowCalendar: () => modal.show(),
62
29
  requestCloseCalendar: () => modal.close(),
63
30
  renderCalendar: (calendar, blur) => modal.sync(/* @__PURE__ */ React__default.createElement(NativeModal, {
64
31
  onClose: blur
65
32
  }, calendar))
66
- }));
33
+ });
67
34
  };
68
- const NativeModal = (_c) => {
69
- var _d = _c, { children } = _d, others = __objRest(_d, ["children"]);
70
- return /* @__PURE__ */ React__default.createElement(ModalView, __spreadValues({
71
- BoxComponent: CalendarBoxContent
72
- }, others), children);
35
+ const NativeModal = ({ children, ...others }) => {
36
+ return /* @__PURE__ */ React__default.createElement(ModalView, {
37
+ BoxComponent: CalendarBoxContent,
38
+ ...others
39
+ }, children);
73
40
  };
74
41
 
75
42
  export { DatePicker };
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/molecules/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as DatePickerCore,\n DatePickerProps,\n SelectionType,\n Value,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { Calendar } from '../Calendar';\nimport { CalendarBoxContent } from './styled';\n\nexport type NativeDatePickerProps<T extends SelectionType> = Omit<\n DatePickerProps<T>,\n | 'CalendarComponent'\n | 'renderCalendar'\n | 'requestCloseCalendar'\n | 'requestShowCalendar'\n>;\n\nexport const DatePicker = <T extends SelectionType>({\n locale,\n onChange,\n ...rest\n}: NativeDatePickerProps<T>): JSX.Element => {\n const modal = useLazyModalManager();\n\n const handleChange = (value?: Value<T>) => {\n onChange?.(value);\n modal.requestUpdate();\n };\n\n return (\n <DatePickerCore\n {...rest}\n TextComponent={Text}\n CalendarComponent={Calendar}\n locale={locale ?? getLocale()}\n onChange={handleChange}\n requestShowCalendar={() => modal.show()}\n requestCloseCalendar={() => modal.close()}\n renderCalendar={(calendar, blur) =>\n modal.sync(<NativeModal onClose={blur}>{calendar}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return (\n <ModalView BoxComponent={CalendarBoxContent} {...others}>\n {children}\n </ModalView>\n );\n};\n"],"names":["React","DatePickerCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBa,MAAA,UAAA,GAAa,CAA0B,EAIP,KAAA;AAJO,EAClD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,MAAA;AAAA,IACA,QAAA;AAAA,GAvBF,GAqBoD,EAG/C,EAAA,IAAA,GAAA,SAAA,CAH+C,EAG/C,EAAA;AAAA,IAFH,QAAA;AAAA,IACA,UAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,mBAAoB,EAAA,CAAA;AAElC,EAAM,MAAA,YAAA,GAAe,CAAC,KAAqB,KAAA;AACzC,IAAW,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AACX,IAAA,KAAA,CAAM,aAAc,EAAA,CAAA;AAAA,GACtB,CAAA;AAEA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAACC,+CACK,IADL,CAAA,EAAA;AAAA,IAEC,aAAe,EAAA,IAAA;AAAA,IACf,iBAAmB,EAAA,QAAA;AAAA,IACnB,MAAA,EAAQ,0BAAU,SAAU,EAAA;AAAA,IAC5B,QAAU,EAAA,YAAA;AAAA,IACV,mBAAA,EAAqB,MAAM,KAAA,CAAM,IAAK,EAAA;AAAA,IACtC,oBAAA,EAAsB,MAAM,KAAA,CAAM,KAAM,EAAA;AAAA,IACxC,gBAAgB,CAAC,QAAA,EAAU,IACzB,KAAA,KAAA,CAAM,qBAAMD,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,MAAY,OAAS,EAAA,IAAA;AAAA,KAAA,EAAO,QAAS,CAAc,CAAA;AAAA,GAEnE,CAAA,CAAA,CAAA;AAEJ,EAAA;AAEA,MAAM,WAAA,GAA8B,CAAC,EAA4B,KAAA;AAA5B,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAjDvC,QAAA,EAAA,GAiDqC,EAAe,EAAA,MAAA,GAAA,SAAA,CAAf,IAAe,CAAb,UAAA,CAAA,CAAA,CAAA;AACrC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA,cAAA,CAAA;AAAA,IAAU,YAAc,EAAA,kBAAA;AAAA,GAAA,EAAwB,SAC9C,QACH,CAAA,CAAA;AAEJ,CAAA;;;;"}
1
+ {"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/molecules/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as DatePickerCore,\n DatePickerProps,\n SelectionType,\n Value,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { Calendar } from '../Calendar';\nimport { CalendarBoxContent } from './styled';\n\nexport type NativeDatePickerProps<T extends SelectionType> = Omit<\n DatePickerProps<T>,\n | 'CalendarComponent'\n | 'renderCalendar'\n | 'requestCloseCalendar'\n | 'requestShowCalendar'\n>;\n\nexport const DatePicker = <T extends SelectionType>({\n locale,\n onChange,\n ...rest\n}: NativeDatePickerProps<T>): JSX.Element => {\n const modal = useLazyModalManager();\n\n const handleChange = (value?: Value<T>) => {\n onChange?.(value);\n modal.requestUpdate();\n };\n\n return (\n <DatePickerCore\n {...rest}\n TextComponent={Text}\n CalendarComponent={Calendar}\n locale={locale ?? getLocale()}\n onChange={handleChange}\n requestShowCalendar={() => modal.show()}\n requestCloseCalendar={() => modal.close()}\n renderCalendar={(calendar, blur) =>\n modal.sync(<NativeModal onClose={blur}>{calendar}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return (\n <ModalView BoxComponent={CalendarBoxContent} {...others}>\n {children}\n </ModalView>\n );\n};\n"],"names":["React","DatePickerCore"],"mappings":";;;;;;;;;;;AAqBO,MAAM,aAAa,CAA0B;AAAA,EAClD,MAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAA6C,KAAA;AAC3C,EAAA,MAAM,QAAQ,mBAAoB,EAAA,CAAA;AAElC,EAAM,MAAA,YAAA,GAAe,CAAC,KAAqB,KAAA;AACzC,IAAA,QAAA,GAAW,KAAK,CAAA,CAAA;AAChB,IAAA,KAAA,CAAM,aAAc,EAAA,CAAA;AAAA,GACtB,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,YAAA,EAAA;AAAA,IACE,GAAG,IAAA;AAAA,IACJ,aAAe,EAAA,IAAA;AAAA,IACf,iBAAmB,EAAA,QAAA;AAAA,IACnB,MAAA,EAAQ,UAAU,SAAU,EAAA;AAAA,IAC5B,QAAU,EAAA,YAAA;AAAA,IACV,mBAAA,EAAqB,MAAM,KAAA,CAAM,IAAK,EAAA;AAAA,IACtC,oBAAA,EAAsB,MAAM,KAAA,CAAM,KAAM,EAAA;AAAA,IACxC,gBAAgB,CAAC,QAAA,EAAU,IACzB,KAAA,KAAA,CAAM,qBAAMD,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,MAAY,OAAS,EAAA,IAAA;AAAA,KAAA,EAAO,QAAS,CAAc,CAAA;AAAA,GAEnE,CAAA,CAAA;AAEJ,EAAA;AAEA,MAAM,WAA8B,GAAA,CAAC,EAAE,QAAA,EAAA,GAAa,QAAa,KAAA;AAC/D,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA;AAAA,IAAU,YAAc,EAAA,kBAAA;AAAA,IAAqB,GAAG,MAAA;AAAA,GAAA,EAC9C,QACH,CAAA,CAAA;AAEJ,CAAA;;;;"}