@tecsinapse/react-core 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
  3. package/dist/components/atoms/Avatar/helpers.js.map +1 -1
  4. package/dist/components/atoms/Avatar/index.js.map +1 -1
  5. package/dist/components/atoms/Avatar/styled.js.map +1 -1
  6. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  7. package/dist/components/atoms/Badge/index.js.map +1 -1
  8. package/dist/components/atoms/Badge/styled.js.map +1 -1
  9. package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
  10. package/dist/components/atoms/BoxContent/index.js.map +1 -1
  11. package/dist/components/atoms/BoxContent/styled.js +1 -1
  12. package/dist/components/atoms/BoxContent/styled.js.map +1 -1
  13. package/dist/components/atoms/Button/Button.js +1 -1
  14. package/dist/components/atoms/Button/Button.js.map +1 -1
  15. package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
  16. package/dist/components/atoms/Button/States/Error.js +1 -1
  17. package/dist/components/atoms/Button/States/Error.js.map +1 -1
  18. package/dist/components/atoms/Button/States/Loading.js.map +1 -1
  19. package/dist/components/atoms/Button/States/Success.js +1 -1
  20. package/dist/components/atoms/Button/States/Success.js.map +1 -1
  21. package/dist/components/atoms/Button/States/index.js.map +1 -1
  22. package/dist/components/atoms/Button/States/styled.js +1 -1
  23. package/dist/components/atoms/Button/States/styled.js.map +1 -1
  24. package/dist/components/atoms/Button/index.js +1 -1
  25. package/dist/components/atoms/Button/index.js.map +1 -1
  26. package/dist/components/atoms/Button/styled.js.map +1 -1
  27. package/dist/components/atoms/Card/Card.js +1 -1
  28. package/dist/components/atoms/Card/Card.js.map +1 -1
  29. package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
  30. package/dist/components/atoms/Card/Footer/index.js.map +1 -1
  31. package/dist/components/atoms/Card/Header/Header.js.map +1 -1
  32. package/dist/components/atoms/Card/Header/index.js.map +1 -1
  33. package/dist/components/atoms/Card/index.js.map +1 -1
  34. package/dist/components/atoms/Card/styled.js.map +1 -1
  35. package/dist/components/atoms/Checkbox/Checkbox.js +1 -1
  36. package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
  37. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  38. package/dist/components/atoms/Checkbox/styled.js +1 -1
  39. package/dist/components/atoms/Checkbox/styled.js.map +1 -1
  40. package/dist/components/atoms/Divider/Divider.js.map +1 -1
  41. package/dist/components/atoms/Divider/index.js.map +1 -1
  42. package/dist/components/atoms/Divider/styled.js.map +1 -1
  43. package/dist/components/atoms/GroupButton/GroupButton.d.ts +1 -1
  44. package/dist/components/atoms/GroupButton/GroupButton.js +1 -1
  45. package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
  46. package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  47. package/dist/components/atoms/GroupButton/index.js +1 -1
  48. package/dist/components/atoms/GroupButton/index.js.map +1 -1
  49. package/dist/components/atoms/GroupButton/styled.js +1 -1
  50. package/dist/components/atoms/GroupButton/styled.js.map +1 -1
  51. package/dist/components/atoms/Icon/Icon.js +1 -1
  52. package/dist/components/atoms/Icon/Icon.js.map +1 -1
  53. package/dist/components/atoms/Icon/helpers.js +1 -1
  54. package/dist/components/atoms/Icon/helpers.js.map +1 -1
  55. package/dist/components/atoms/Icon/index.js.map +1 -1
  56. package/dist/components/atoms/Input/Hint.js.map +1 -1
  57. package/dist/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -1
  58. package/dist/components/atoms/Input/InputContainer/InputContainer.js +1 -1
  59. package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
  60. package/dist/components/atoms/Input/InputElement/InputElement.d.ts +3 -4
  61. package/dist/components/atoms/Input/InputElement/InputElement.js +1 -1
  62. package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
  63. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +3 -4
  64. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +1 -1
  65. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
  66. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +1 -1
  67. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
  68. package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
  69. package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
  70. package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
  71. package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
  72. package/dist/components/atoms/Input/hooks/useStringMask.js +1 -1
  73. package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
  74. package/dist/components/atoms/Input/index.js +1 -1
  75. package/dist/components/atoms/Input/index.js.map +1 -1
  76. package/dist/components/atoms/Input/styled.js +1 -1
  77. package/dist/components/atoms/Input/styled.js.map +1 -1
  78. package/dist/components/atoms/Paper/Paper.js +1 -1
  79. package/dist/components/atoms/Paper/Paper.js.map +1 -1
  80. package/dist/components/atoms/Paper/index.js.map +1 -1
  81. package/dist/components/atoms/Paper/styled.js.map +1 -1
  82. package/dist/components/atoms/PressableSurface/PressableSurface.js +1 -1
  83. package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
  84. package/dist/components/atoms/PressableSurface/index.js.map +1 -1
  85. package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
  86. package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
  87. package/dist/components/atoms/ProgressBar/index.js.map +1 -1
  88. package/dist/components/atoms/ProgressBar/styled.js +1 -1
  89. package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
  90. package/dist/components/atoms/RadioButton/RadioButton.js +1 -1
  91. package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
  92. package/dist/components/atoms/RadioButton/index.js.map +1 -1
  93. package/dist/components/atoms/RadioButton/styled.js +1 -1
  94. package/dist/components/atoms/RadioButton/styled.js.map +1 -1
  95. package/dist/components/atoms/Switch/Switch.d.ts +1 -1
  96. package/dist/components/atoms/Switch/Switch.js +1 -1
  97. package/dist/components/atoms/Switch/Switch.js.map +1 -1
  98. package/dist/components/atoms/Switch/animation.js.map +1 -1
  99. package/dist/components/atoms/Switch/index.js.map +1 -1
  100. package/dist/components/atoms/Switch/styled.d.ts +2 -14
  101. package/dist/components/atoms/Switch/styled.js +1 -1
  102. package/dist/components/atoms/Switch/styled.js.map +1 -1
  103. package/dist/components/atoms/Tag/Tag.js +1 -1
  104. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  105. package/dist/components/atoms/Tag/index.js.map +1 -1
  106. package/dist/components/atoms/Tag/styled.js +1 -1
  107. package/dist/components/atoms/Tag/styled.js.map +1 -1
  108. package/dist/components/atoms/Text/Text.js +1 -1
  109. package/dist/components/atoms/Text/Text.js.map +1 -1
  110. package/dist/components/atoms/Text/functions.js.map +1 -1
  111. package/dist/components/atoms/Text/index.js.map +1 -1
  112. package/dist/components/atoms/Text/styled.js +1 -1
  113. package/dist/components/atoms/Text/styled.js.map +1 -1
  114. package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
  115. package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
  116. package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
  117. package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
  118. package/dist/components/molecules/Calendar/components/index.js +1 -1
  119. package/dist/components/molecules/Calendar/components/index.js.map +1 -1
  120. package/dist/components/molecules/Calendar/index.d.ts +1 -1
  121. package/dist/components/molecules/Calendar/index.js +1 -1
  122. package/dist/components/molecules/Calendar/index.js.map +1 -1
  123. package/dist/components/molecules/Calendar/styled.js +1 -1
  124. package/dist/components/molecules/Calendar/styled.js.map +1 -1
  125. package/dist/components/molecules/DatePicker/DatePicker.js +1 -1
  126. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  127. package/dist/components/molecules/DatePicker/index.js.map +1 -1
  128. package/dist/components/molecules/DatePicker/styled.js +1 -1
  129. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  130. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +1 -1
  131. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  132. package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
  133. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  134. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +2 -1
  135. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  136. package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
  137. package/dist/components/molecules/DateTimeSelector/index.js +1 -1
  138. package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
  139. package/dist/components/molecules/DateTimeSelector/styled.js +1 -1
  140. package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
  141. package/dist/components/molecules/Grid/functions.js +1 -1
  142. package/dist/components/molecules/Grid/functions.js.map +1 -1
  143. package/dist/components/molecules/Grid/index.d.ts +1 -1
  144. package/dist/components/molecules/Grid/index.js +3 -5
  145. package/dist/components/molecules/Grid/index.js.map +1 -1
  146. package/dist/components/molecules/HintInputContainer/HintInputContainer.js +1 -1
  147. package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  148. package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
  149. package/dist/components/molecules/HintInputContainer/styled.js.map +1 -1
  150. package/dist/components/molecules/IconTextButton/IconComponent.js +1 -1
  151. package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -1
  152. package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +1 -3
  153. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  154. package/dist/components/molecules/IconTextButton/index.js.map +1 -1
  155. package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
  156. package/dist/components/molecules/InputPassword/InputPasswordIcon.js +1 -1
  157. package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  158. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  159. package/dist/components/molecules/InputPassword/styled.js.map +1 -1
  160. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  161. package/dist/components/molecules/LabeledSwitch/index.js +1 -1
  162. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
  163. package/dist/components/molecules/Snackbar/Snackbar.js +1 -1
  164. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  165. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  166. package/dist/components/molecules/Snackbar/styled.js +1 -1
  167. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  168. package/dist/components/molecules/TextArea/TextArea.d.ts +1 -1
  169. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  170. package/dist/components/molecules/TextArea/index.js +1 -1
  171. package/dist/components/molecules/TextArea/index.js.map +1 -1
  172. package/dist/components/molecules/TextArea/styled.d.ts +2 -14
  173. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  174. package/dist/hooks/index.js.map +1 -1
  175. package/dist/hooks/useDebouncedState.js.map +1 -1
  176. package/dist/hooks/useTheme.js.map +1 -1
  177. package/dist/index.d.ts +1 -1
  178. package/dist/index.js +21 -7
  179. package/dist/index.js.map +1 -1
  180. package/dist/styles/ThemeProvider.js.map +1 -1
  181. package/dist/styles/definitions.js +1 -1
  182. package/dist/styles/definitions.js.map +1 -1
  183. package/dist/styles/light.js.map +1 -1
  184. package/dist/types/defaults.js.map +1 -1
  185. package/dist/utils/IPhoneXHelper.js +3 -3
  186. package/dist/utils/IPhoneXHelper.js.map +1 -1
  187. package/dist/utils/ResponsiveFontSize.js +6 -6
  188. package/dist/utils/ResponsiveFontSize.js.map +1 -1
  189. package/dist/utils/extractNumbersFromString.js +1 -1
  190. package/dist/utils/extractNumbersFromString.js.map +1 -1
  191. package/dist/utils/formatWithMask.js.map +1 -1
  192. package/dist/utils/index.js.map +1 -1
  193. package/dist/utils/lightenDarkenColor.js.map +1 -1
  194. package/dist/utils/masks.js.map +1 -1
  195. package/dist/utils/variantComplement.js +1 -1
  196. package/dist/utils/variantComplement.js.map +1 -1
  197. package/package.json +2 -2
  198. package/src/components/atoms/Badge/styled.ts +2 -3
  199. package/src/components/atoms/GroupButton/GroupButton.tsx +2 -5
  200. package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
  201. package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
  202. package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
  203. package/src/components/atoms/ProgressBar/ProgressBar.tsx +2 -4
  204. package/src/components/atoms/Switch/Switch.tsx +1 -1
  205. package/src/components/atoms/Switch/animation.ts +4 -6
  206. package/src/components/atoms/Switch/styled.ts +4 -6
  207. package/src/components/atoms/Tag/Tag.tsx +1 -1
  208. package/src/components/atoms/shared/PaperAndCard.ts +1 -1
  209. package/src/components/molecules/Calendar/index.ts +1 -1
  210. package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
  211. package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
  212. package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
  213. package/src/components/molecules/Grid/index.ts +1 -1
  214. package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
  215. package/src/components/molecules/IconTextButton/IconTextButton.tsx +1 -3
  216. package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
  217. package/src/components/molecules/Snackbar/styled.ts +6 -2
  218. package/src/components/molecules/TextArea/TextArea.tsx +6 -2
  219. package/src/components/molecules/TextArea/styled.ts +5 -2
  220. package/src/index.ts +12 -1
  221. package/src/utils/IPhoneXHelper.ts +27 -22
  222. package/src/utils/ResponsiveFontSize.ts +55 -36
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ViewProps } from 'react-native';
3
- import { ColorGradationType, ColorType } from '../../../types/defaults';
3
+ import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
4
4
  export interface ProgressBarProps extends ViewProps {
5
5
  segments?: number;
6
6
  valueMin?: number;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/ProgressBar/ProgressBar.tsx"],"names":["ProgressBar","segments","_segments","valueMin","valueNow","_valueNow","valueMax","color","colorTone","animate","animationParameters","rest","theme","animationValue","React","useRef","Animated","Value","current","totalProgress","Math","max","segmentWidth","items","Array","keys","segmentsRender","map","index","min","minmax","width","progressPercent","timing","toValue","duration","length","useNativeDriver","delay","direction","start","rangeAnimation","interpolate","inputRange","outputRange","borderRightWidth","backgroundColor"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;;;;;AAqBA,MAAMA,WAAuC,GAAG,CAAC;AAC/CC,EAAAA,QAAQ,EAAEC,SAAS,GAAG,CADyB;AAE/CC,EAAAA,QAAQ,GAAG,CAFoC;AAG/CC,EAAAA,QAAQ,EAAEC,SAHqC;AAI/CC,EAAAA,QAAQ,GAAG,GAJoC;AAK/CC,EAAAA,KAAK,GAAG,SALuC;AAM/CC,EAAAA,SAAS,GAAG,QANmC;AAO/CC,EAAAA,OAP+C;AAQ/CC,EAAAA,mBAR+C;AAS/C,KAAGC;AAT4C,CAAD,KAU1C;AACJ,QAAMC,KAAK,GAAG,sBAAd;AACA,QAAMC,cAAc,GAAGC,KAAK,CAACC,MAAN,CAAa,IAAIC,sBAASC,KAAb,CAAmB,CAAnB,CAAb,EAAoCC,OAA3D;AAEA,QAAMd,QAAQ,GACZ,OAAOC,SAAP,KAAqB,QAArB,GACI,qCAAyBA,SAAzB,CADJ,GAEIA,SAHN;AAKA,QAAMc,aAAa,GAAI,CAACf,QAAQ,GAAGD,QAAZ,KAAyBG,QAAQ,GAAGH,QAApC,CAAD,GAAkD,GAAxE;AACA,QAAMF,QAAQ,GAAGmB,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYnB,SAAZ,CAAjB;AACA,QAAMoB,YAAY,G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,GAAe,CAAf,GAAmBA,QAAS,GAAhC,EAAqC,GAAE4B,KAAM,GAA7C,CADJ,GAEI,CAAE,GAAEzB,QAAS,GAAb,EAAkB,GAAEyB,KAAM,GAA1B,CAHN;AAKAC,MAAAA,eAAe,GAAGnB,cAAc,CAAC6B,WAAlB,oBAAG7B,cAAc,CAAC6B,WAAf,CAA6B;AAC7CC,QAAAA,UAAU,EAAE,CAAC,CAAD,EAAI,CAAJ,CADiC;AAE7CC,QAAAA,WAAW,EAAEH;AAFgC,OAA7B,CAAlB;AAID;;AAED,WACE,oBAAC,eAAD;AACE,MAAA,GAAG,EAAEb,KADP;AAEE,MAAA,KAAK,EAAE;AACLiB,QAAAA,gBAAgB,EAAEjB,KAAK,IAAI3B,QAAQ,GAAG,CAApB,GAAwB,CAAxB,GAA4B;AADzC;AAFT,OAME,oBAAC,gBAAD;AACE,MAAA,KAAK,EAAE;AACL8B,QAAAA,KAAK,EAAEC,eADF;AAELc,QAAAA,eAAe,EAAElC,KAAK,CAACL,KAAN,CAAYA,KAAZ,EAAmBC,SAAnB,CAFZ;AAGLqC,QAAAA,gBAAgB,EAAEd,KAAK,GAAG,CAAR,IAAaA,KAAK,GAAG,GAArB,GAA2B,CAA3B,GAA+B;AAH5C;AADT,MANF,CADF;AAgBD,GAjDsB,CAAvB;AAmDA,SAAO,oBAAC,iBAAD,EAAepB,IAAf,EAAsBe,cAAtB,CAAP;AACD,CA7ED;;eA+Ee1B,W","sourcesContent":["import { useTheme } from '@emotion/react';\nimport * as React from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp\n} from '../../../types/defaults';\nimport { extractNumbersFromString } from '../../../utils';\nimport { Container, Progress, Segment } from './styled';\n\nexport interface ProgressBarProps extends ViewProps {\n /** Number of segments. Defaults to 1. Set to 1 when 0 or less */\n segments?: number;\n /** Minimum possible value (0% of the bar). Defaults to 0 */\n valueMin?: number;\n /** Maximum possible value (100% of the bar). Defaults to 100 */\n valueMax?: number;\n /** Current value */\n valueNow: number | string;\n /** Filled partition color. Defaults to 'primary' */\n color?: ColorType;\n /** Filled partition color tone. Defaults to 'medium' */\n colorTone?: ColorGradationType;\n /** Animation */\n animate: boolean;\n /** Parameters animation */\n animationParameters?: { direction: 'left' | 'right'; duration: number };\n}\n\nconst ProgressBar: React.FC<ProgressBarProps> = ({\n segments: _segments = 1,\n valueMin = 0,\n valueNow: _valueNow,\n valueMax = 100,\n color = 'primary',\n colorTone = 'medium',\n animate,\n animationParameters,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const animationValue = React.useRef(new Animated.Value(0)).current;\n\n const valueNow =\n typeof _valueNow === 'string'\n ? extractNumbersFromString(_valueNow)\n : _valueNow;\n\n const totalProgress = ((valueNow - valueMin) / (valueMax - valueMin)) * 100;\n const segments = Math.max(1, _segments);\n const segmentWidth = 100 / Math.max(segments);\n\n const items = [...Array(segments).keys()];\n\n const segmentsRender = items.map(index => {\n \n\n const max = segmentWidth * (index + 1);\n const min = segmentWidth * index;\n const minmax = (totalProgress - min) / (max - min);\n const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;\n\n let progressPercent: string | Animated.AnimatedInterpolation = `${width}%`;\n\n if (animate && animationParameters) {\n Animated.timing(animationValue, {\n toValue: 1,\n duration: animationParameters.duration / items.length,\n useNativeDriver: false,\n delay:\n animationParameters.direction === 'right'\n ? index * (animationParameters.duration / items.length)\n : (items.length - index - 1) *\n (animationParameters.duration / items.length),\n }).start();\n\n const rangeAnimation =\n animationParameters?.direction === 'right'\n ? [`${valueMin < 0 ? 0 : valueMin}%`, `${width}%`]\n : [`${valueMax}%`, `${width}%`];\n\n progressPercent = animationValue.interpolate?.({\n inputRange: [0, 1],\n outputRange: rangeAnimation,\n });\n }\n\n return (\n <Segment\n key={index}\n style={{\n borderRightWidth: index == segments - 1 ? 0 : 2,\n }}\n >\n <Progress\n style={{\n width: progressPercent,\n backgroundColor: theme.color[color][colorTone],\n borderRightWidth: width > 0 && width < 100 ? 2 : 0,\n }}\n />\n </Segment>\n );\n });\n\n return <Container {...rest}>{segmentsRender}</Container>;\n};\n\nexport default ProgressBar;\n"],"file":"ProgressBar.js"}
1
+ {"version":3,"file":"ProgressBar.js","names":["ProgressBar","segments","_segments","valueMin","valueNow","_valueNow","valueMax","color","colorTone","animate","animationParameters","rest","theme","useTheme","animationValue","React","useRef","Animated","Value","current","extractNumbersFromString","totalProgress","Math","max","segmentWidth","items","Array","keys","segmentsRender","map","index","min","minmax","width","progressPercent","timing","toValue","duration","length","useNativeDriver","delay","direction","start","rangeAnimation","interpolate","inputRange","outputRange","borderRightWidth","backgroundColor"],"sources":["../../../../src/components/atoms/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport * as React from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { extractNumbersFromString } from '../../../utils';\nimport { Container, Progress, Segment } from './styled';\n\nexport interface ProgressBarProps extends ViewProps {\n /** Number of segments. Defaults to 1. Set to 1 when 0 or less */\n segments?: number;\n /** Minimum possible value (0% of the bar). Defaults to 0 */\n valueMin?: number;\n /** Maximum possible value (100% of the bar). Defaults to 100 */\n valueMax?: number;\n /** Current value */\n valueNow: number | string;\n /** Filled partition color. Defaults to 'primary' */\n color?: ColorType;\n /** Filled partition color tone. Defaults to 'medium' */\n colorTone?: ColorGradationType;\n /** Animation */\n animate: boolean;\n /** Parameters animation */\n animationParameters?: { direction: 'left' | 'right'; duration: number };\n}\n\nconst ProgressBar: React.FC<ProgressBarProps> = ({\n segments: _segments = 1,\n valueMin = 0,\n valueNow: _valueNow,\n valueMax = 100,\n color = 'primary',\n colorTone = 'medium',\n animate,\n animationParameters,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const animationValue = React.useRef(new Animated.Value(0)).current;\n\n const valueNow =\n typeof _valueNow === 'string'\n ? extractNumbersFromString(_valueNow)\n : _valueNow;\n\n const totalProgress = ((valueNow - valueMin) / (valueMax - valueMin)) * 100;\n const segments = Math.max(1, _segments);\n const segmentWidth = 100 / Math.max(segments);\n\n const items = [...Array(segments).keys()];\n\n const segmentsRender = items.map(index => {\n const max = segmentWidth * (index + 1);\n const min = segmentWidth * index;\n const minmax = (totalProgress - min) / (max - min);\n const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;\n\n let progressPercent: string | Animated.AnimatedInterpolation = `${width}%`;\n\n if (animate && animationParameters) {\n Animated.timing(animationValue, {\n toValue: 1,\n duration: animationParameters.duration / items.length,\n useNativeDriver: false,\n delay:\n animationParameters.direction === 'right'\n ? index * (animationParameters.duration / items.length)\n : (items.length - index - 1) *\n (animationParameters.duration / items.length),\n }).start();\n\n const rangeAnimation =\n animationParameters?.direction === 'right'\n ? [`${valueMin < 0 ? 0 : valueMin}%`, `${width}%`]\n : [`${valueMax}%`, `${width}%`];\n\n progressPercent = animationValue.interpolate?.({\n inputRange: [0, 1],\n outputRange: rangeAnimation,\n });\n }\n\n return (\n <Segment\n key={index}\n style={{\n borderRightWidth: index == segments - 1 ? 0 : 2,\n }}\n >\n <Progress\n style={{\n width: progressPercent,\n backgroundColor: theme.color[color][colorTone],\n borderRightWidth: width > 0 && width < 100 ? 2 : 0,\n }}\n />\n </Segment>\n );\n });\n\n return <Container {...rest}>{segmentsRender}</Container>;\n};\n\nexport default ProgressBar;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;;;;;AAqBA,MAAMA,WAAuC,GAAG,CAAC;EAC/CC,QAAQ,EAAEC,SAAS,GAAG,CADyB;EAE/CC,QAAQ,GAAG,CAFoC;EAG/CC,QAAQ,EAAEC,SAHqC;EAI/CC,QAAQ,GAAG,GAJoC;EAK/CC,KAAK,GAAG,SALuC;EAM/CC,SAAS,GAAG,QANmC;EAO/CC,OAP+C;EAQ/CC,mBAR+C;EAS/C,GAAGC;AAT4C,CAAD,KAU1C;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AAf,EAAsBiB,cAAtB,CAAP;AACD,CA3ED;;eA6Ee5B,W"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/ProgressBar/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as ProgressBar, ProgressBarProps } from './ProgressBar';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/ProgressBar/index.ts"],"sourcesContent":["export { default as ProgressBar, ProgressBarProps } from './ProgressBar';\n"],"mappings":";;;;;AAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.Progress = exports.Segment = exports.Container = void 0;
4
+ exports.Segment = exports.Progress = exports.Container = void 0;
5
5
 
6
6
  var _native = _interopRequireDefault(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/ProgressBar/styled.ts"],"names":["Container","styled","View","theme","spacing","mili","Segment","color","secondary","light","xlight","Progress","Animated"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;AAEO,MAAMA,SAAS,GAAGC,gBAAOC,IAA0B;AAC1D;AACA,YAAY,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AAC9C,mBAAmB,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AACrD;AACA;AACA;AACA,CAPO;;AASA,MAAMC,OAAO,GAAGL,gBAAOC,IAA0B;AACxD;AACA,sBAAsB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBC,KAAM;AACjE,wBAAwB,uBAAW,KAAX,CAAkB;AAC1C,kBAAkB,CAAC;AAAEN,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBE,MAAO;AAC9D,CALO;;AAOA,MAAMC,QAAQ,GAAG,qBAAOC,sBAASV,IAAhB,CAA2C;AACnE;AACA,kBAAkB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBE,MAAO;AAC9D,CAHO","sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\n\nexport const Container = styled.View<Partial<StyleProps>>`\n display: flex;\n height: ${({ theme }) => theme.spacing.mili};\n border-radius: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n flex-direction: row;\n overflow: hidden;\n`;\n\nexport const Segment = styled.View<Partial<StyleProps>>`\n flex: 1;\n background-color: ${({ theme }) => theme.color.secondary.light};\n border-right-width: ${RFValueStr('2px')};\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n\nexport const Progress = styled(Animated.View)<Partial<StyleProps>>`\n height: 100%;\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["Container","styled","View","theme","spacing","mili","Segment","color","secondary","light","RFValueStr","xlight","Progress","Animated"],"sources":["../../../../src/components/atoms/ProgressBar/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\n\nexport const Container = styled.View<Partial<StyleProps>>`\n display: flex;\n height: ${({ theme }) => theme.spacing.mili};\n border-radius: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n flex-direction: row;\n overflow: hidden;\n`;\n\nexport const Segment = styled.View<Partial<StyleProps>>`\n flex: 1;\n background-color: ${({ theme }) => theme.color.secondary.light};\n border-right-width: ${RFValueStr('2px')};\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n\nexport const Progress = styled(Animated.View)<Partial<StyleProps>>`\n height: 100%;\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;AAEO,MAAMA,SAAS,GAAGC,eAAA,CAAOC,IAA0B;AAC1D;AACA,YAAY,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AAC9C,mBAAmB,CAAC;EAAEF;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AACrD;AACA;AACA;AACA,CAPO;;AASA,MAAMC,OAAO,GAAGL,eAAA,CAAOC,IAA0B;AACxD;AACA,sBAAsB,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBC,KAAM;AACjE,wBAAwB,IAAAC,iBAAA,EAAW,KAAX,CAAkB;AAC1C,kBAAkB,CAAC;EAAEP;AAAF,CAAD,KAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBG,MAAO;AAC9D,CALO;;AAOA,MAAMC,QAAQ,GAAG,IAAAX,eAAA,EAAOY,qBAAA,CAASX,IAAhB,CAA2C;AACnE;AACA,kBAAkB,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBG,MAAO;AAC9D,CAHO"}
@@ -13,7 +13,7 @@ var _styled = require("./styled");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  const RadioButton = ({
19
19
  children,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"names":["RadioButton","children","onChange","checked","labelPosition","disabled","color","colorTone","rest","handleChange"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AAkBA,MAAMA,WAAiC,GAAG,CAAC;AACzCC,EAAAA,QADyC;AAEzCC,EAAAA,QAFyC;AAGzCC,EAAAA,OAHyC;AAIzCC,EAAAA,aAAa,GAAG,OAJyB;AAKzCC,EAAAA,QAAQ,GAAG,KAL8B;AAMzCC,EAAAA,KAAK,GAAG,SANiC;AAOzCC,EAAAA,SAAS,GAAG,QAP6B;AAQzC,KAAGC;AARsC,CAAD,KASvB;AACjB,QAAMC,YAAY,GAAG,MAAM;AACzBP,IAAAA,QAAQ,IAAIA,QAAQ,CAAC,CAACC,OAAF,CAApB;AACD,GAFD;;AAIA,SACE,6BAAC,sBAAD,eACMK,IADN;AAEE,IAAA,QAAQ,EAAEH,QAFZ;AAGE,IAAA,OAAO,EAAEI,YAHX;AAIE,IAAA,iBAAiB,EAAC;AAJpB,MAME,6BAAC,kBAAD,QACGL,aAAa,KAAK,MAAlB,IAA4BH,QAD/B,EAEGE,OAAO,IACN,6BAAC,sBAAD,QACE,6BAAC,mBAAD,QACE,6BAAC,kBAAD,QACE,6BAAC,UAAD;AACE,IAAA,IAAI,EAAC,QADP;AAEE,IAAA,YAAY,EAAEG,KAFhB;AAGE,IAAA,SAAS,EAAEC,SAHb;AAIE,IAAA,IAAI,EAAC,oBAJP;AAKE,IAAA,IAAI,EAAC;AALP,IADF,CADF,CADF,CAHJ,EAiBG,CAACJ,OAAD,IACC,6BAAC,sBAAD,QACE,6BAAC,mBAAD,QACE,6BAAC,kBAAD,QACE,6BAAC,UAAD;AACE,IAAA,IAAI,EAAC,QADP;AAEE,IAAA,SAAS,EAAC,OAFZ;AAGE,IAAA,IAAI,EAAC,oBAHP;AAIE,IAAA,IAAI,EAAC;AAJP,IADF,CADF,CADF,CAlBJ,EA+BGC,aAAa,KAAK,OAAlB,IAA6BH,QA/BhC,CANF,CADF;AA0CD,CAxDD;;eA0DeD,W","sourcesContent":["import React, { FC } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon } from '../Icon';\nimport { IconViewStyled, IconWrapper, ScaledView, ViewStyled } from './styled';\n\nexport interface RadioButtonProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButton: FC<RadioButtonProps> = ({\n children,\n onChange,\n checked,\n labelPosition = 'right',\n disabled = false,\n color = 'primary',\n colorTone = 'medium',\n ...rest\n}): JSX.Element => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"radio\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n colorVariant={color}\n colorTone={colorTone}\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default RadioButton;\n"],"file":"RadioButton.js"}
1
+ {"version":3,"file":"RadioButton.js","names":["RadioButton","children","onChange","checked","labelPosition","disabled","color","colorTone","rest","handleChange"],"sources":["../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon } from '../Icon';\nimport { IconViewStyled, IconWrapper, ScaledView, ViewStyled } from './styled';\n\nexport interface RadioButtonProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButton: FC<RadioButtonProps> = ({\n children,\n onChange,\n checked,\n labelPosition = 'right',\n disabled = false,\n color = 'primary',\n colorTone = 'medium',\n ...rest\n}): JSX.Element => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"radio\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n colorVariant={color}\n colorTone={colorTone}\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default RadioButton;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AAkBA,MAAMA,WAAiC,GAAG,CAAC;EACzCC,QADyC;EAEzCC,QAFyC;EAGzCC,OAHyC;EAIzCC,aAAa,GAAG,OAJyB;EAKzCC,QAAQ,GAAG,KAL8B;EAMzCC,KAAK,GAAG,SANiC;EAOzCC,SAAS,GAAG,QAP6B;EAQzC,GAAGC;AARsC,CAAD,KASvB;EACjB,MAAMC,YAAY,GAAG,MAAM;IACzBP,QAAQ,IAAIA,QAAQ,CAAC,CAACC,OAAF,CAApB;EACD,CAFD;;EAIA,OACE,6BAAC,sBAAD,eACMK,IADN;IAEE,QAAQ,EAAEH,QAFZ;IAGE,OAAO,EAAEI,YAHX;IAIE,iBAAiB,EAAC;EAJpB,IAME,6BAAC,kBAAD,QACGL,aAAa,KAAK,MAAlB,IAA4BH,QAD/B,EAEGE,OAAO,IACN,6BAAC,sBAAD,QACE,6BAAC,mBAAD,QACE,6BAAC,kBAAD,QACE,6BAAC,UAAD;IACE,IAAI,EAAC,QADP;IAEE,YAAY,EAAEG,KAFhB;IAGE,SAAS,EAAEC,SAHb;IAIE,IAAI,EAAC,oBAJP;IAKE,IAAI,EAAC;EALP,EADF,CADF,CADF,CAHJ,EAiBG,CAACJ,OAAD,IACC,6BAAC,sBAAD,QACE,6BAAC,mBAAD,QACE,6BAAC,kBAAD,QACE,6BAAC,UAAD;IACE,IAAI,EAAC,QADP;IAEE,SAAS,EAAC,OAFZ;IAGE,IAAI,EAAC,oBAHP;IAIE,IAAI,EAAC;EAJP,EADF,CADF,CADF,CAlBJ,EA+BGC,aAAa,KAAK,OAAlB,IAA6BH,QA/BhC,CANF,CADF;AA0CD,CAxDD;;eA0DeD,W"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/RadioButton/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as RadioButton, RadioButtonProps } from './RadioButton';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/RadioButton/index.ts"],"sourcesContent":["export { default as RadioButton, RadioButtonProps } from './RadioButton';\n"],"mappings":";;;;;AAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.ViewStyled = exports.IconViewStyled = exports.ScaledView = exports.IconWrapper = void 0;
4
+ exports.ViewStyled = exports.ScaledView = exports.IconWrapper = exports.IconViewStyled = void 0;
5
5
 
6
6
  var _native = _interopRequireDefault(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/RadioButton/styled.ts"],"names":["IconWrapper","View","theme","borderRadius","pill","color","colorTone","borderWidth","nano","miscellaneous","surfaceColor","ScaledView","IconViewStyled","spacing","mili","ViewStyled"],"mappings":";;;;;AAAA;;AACA;;;;AAIO,MAAMA,WAAW,GAAG,qBAAOC,iBAAP,CAAqD;AAChF,mBAAmB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AACtE,kBAAkB,CAAC;AACfF,EAAAA,KADe;AAEfG,EAAAA,KAAK,GAAG,SAFO;AAGfC,EAAAA,SAAS,GAAG;AAHG,CAAD,KAIqBJ,KAAK,CAACG,KAAN,CAAYA,KAAZ,EAAmBC,SAAnB,CAA8B;AACrE,kBAAkB,CAAC;AAAEJ,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACK,WAAN,CAAkBC,IAAK;AACpE,sBAAsB,CAAC;AAAEN,EAAAA;AAAF,CAAD,KAClBA,KAAK,CAACO,aAAN,CAAoBC,YAAa;AACrC,CAVO;;AAYA,MAAMC,UAAU,GAAG,qBAAOV,iBAAP,CAAa;AACvC;AACA,CAFO;;AAIA,MAAMW,cAAc,GAAG,qBAAOX,iBAAP,CAAkC;AAChE,aAAa,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACW,OAAN,CAAcC,IAAK;AAC3D,CAFO;;AAIA,MAAMC,UAAU,GAAG,qBAAOd,iBAAP,CAAa;AACvC;AACA;AACA,CAHO","sourcesContent":["import styled from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RadioButtonProps } from './RadioButton';\n\nexport const IconWrapper = styled(View)<Partial<RadioButtonProps & StyleProps>>`\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.pill};\n border-color: ${({\n theme,\n color = 'primary',\n colorTone = 'medium',\n }: StyleProps & RadioButtonProps) => theme.color[color][colorTone]};\n border-width: ${({ theme }: StyleProps) => theme.borderWidth.nano};\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n`;\n\nexport const ScaledView = styled(View)`\n transform: scale(0.8);\n`;\n\nexport const IconViewStyled = styled(View)<Partial<StyleProps>>`\n padding: ${({ theme }: StyleProps) => theme.spacing.mili};\n`;\n\nexport const ViewStyled = styled(View)`\n align-items: center;\n flex-direction: row;\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["IconWrapper","styled","View","theme","borderRadius","pill","color","colorTone","borderWidth","nano","miscellaneous","surfaceColor","ScaledView","IconViewStyled","spacing","mili","ViewStyled"],"sources":["../../../../src/components/atoms/RadioButton/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RadioButtonProps } from './RadioButton';\n\nexport const IconWrapper = styled(View)<Partial<RadioButtonProps & StyleProps>>`\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.pill};\n border-color: ${({\n theme,\n color = 'primary',\n colorTone = 'medium',\n }: StyleProps & RadioButtonProps) => theme.color[color][colorTone]};\n border-width: ${({ theme }: StyleProps) => theme.borderWidth.nano};\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n`;\n\nexport const ScaledView = styled(View)`\n transform: scale(0.8);\n`;\n\nexport const IconViewStyled = styled(View)<Partial<StyleProps>>`\n padding: ${({ theme }: StyleProps) => theme.spacing.mili};\n`;\n\nexport const ViewStyled = styled(View)`\n align-items: center;\n flex-direction: row;\n`;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAIO,MAAMA,WAAW,GAAG,IAAAC,eAAA,EAAOC,iBAAP,CAAqD;AAChF,mBAAmB,CAAC;EAAEC;AAAF,CAAD,KAA2BA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AACtE,kBAAkB,CAAC;EACfF,KADe;EAEfG,KAAK,GAAG,SAFO;EAGfC,SAAS,GAAG;AAHG,CAAD,KAIqBJ,KAAK,CAACG,KAAN,CAAYA,KAAZ,EAAmBC,SAAnB,CAA8B;AACrE,kBAAkB,CAAC;EAAEJ;AAAF,CAAD,KAA2BA,KAAK,CAACK,WAAN,CAAkBC,IAAK;AACpE,sBAAsB,CAAC;EAAEN;AAAF,CAAD,KAClBA,KAAK,CAACO,aAAN,CAAoBC,YAAa;AACrC,CAVO;;AAYA,MAAMC,UAAU,GAAG,IAAAX,eAAA,EAAOC,iBAAP,CAAa;AACvC;AACA,CAFO;;AAIA,MAAMW,cAAc,GAAG,IAAAZ,eAAA,EAAOC,iBAAP,CAAkC;AAChE,aAAa,CAAC;EAAEC;AAAF,CAAD,KAA2BA,KAAK,CAACW,OAAN,CAAcC,IAAK;AAC3D,CAFO;;AAIA,MAAMC,UAAU,GAAG,IAAAf,eAAA,EAAOC,iBAAP,CAAa;AACvC;AACA;AACA,CAHO"}
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- import { ColorGradationType, ColorType } from '../../../types/defaults';
3
+ import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
4
4
  export interface SwitchProps {
5
5
  onChange: (active: boolean) => void;
6
6
  active: boolean;
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
23
 
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
25
 
26
26
  const Switch = ({
27
27
  onChange,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"names":["Switch","onChange","activeColor","activeColorTone","inactiveColor","inactiveColorTone","active","dotStyle","disabled","rest","theme","width","React","useRef","transitionValue","Animated","Value","current","animatedColor","calculateTranslate","spacing","micro","SWITCH_PIN_WIDTH","getBackgroundColor","color","interpolateColor","interpolate","inputRange","outputRange","translate","handleChange","handleSwitchLayout","lce","nativeEvent","layout","backgroundColor","transform","translateX"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAWA;;AAKA;;AACA;;AACA;;;;;;;;AAcA,MAAMA,MAAuB,GAAG,CAAC;AAC/BC,EAAAA,QAD+B;AAE/BC,EAAAA,WAAW,GAAG,SAFiB;AAG/BC,EAAAA,eAAe,GAAG,QAHa;AAI/BC,EAAAA,aAAa,GAAG,WAJe;AAK/BC,EAAAA,iBAAiB,GAAG,OALW;AAM/BC,EAAAA,MAN+B;AAO/BC,EAAAA,QAP+B;AAQ/BC,EAAAA,QAAQ,GAAG,KARoB;AAS/B,KAAGC;AAT4B,CAAD,KAUb;AACjB,QAAMC,KAAK,GAAG,sBAAd;;AAEA,QAAMC,KAAK,GAAGC,gB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CAAC,CAACK,MAAF,CAAR;AACD,GAFoB,EAElB,CAACA,MAAD,EAASL,QAAT,CAFkB,CAArB;;AAIA,QAAM8B,kBAAkB,GAAIC,GAAD,IAA4B;AACrDrB,IAAAA,KAAK,CAACM,OAAN,GAAgBe,GAAG,CAACC,WAAJ,CAAgBC,MAAhB,CAAuBvB,KAAvC;AACA,UAAMkB,SAAS,GAAGV,kBAAkB,EAApC;AACA,qCAAiBb,MAAjB,EAAyBuB,SAAzB,EAAoCf,eAApC,EAAqDI,aAArD;AACD,GAJD;;AAMA,SACE,8BAAC,kCAAD,eACMT,IADN;AAEE,IAAA,OAAO,EAAEqB,YAFX;AAGE,IAAA,MAAM,EAAC,MAHT;AAIE,IAAA,QAAQ,EAAEtB;AAJZ,MAME,8BAAC,2BAAD;AACE,IAAA,QAAQ,EAAEuB,kBADZ;AAEE,IAAA,KAAK,EAAE;AAAEI,MAAAA,eAAe,EAAEV;AAAnB;AAFT,KAIE,8BAAC,oBAAD;AACE,IAAA,KAAK,EAAE,CAAClB,QAAD,EAAW;AAAE6B,MAAAA,SAAS,EAAE,CAAC;AAAEC,QAAAA,UAAU,EAAEvB;AAAd,OAAD;AAAb,KAAX;AADT,IAJF,CANF,CADF;AAiBD,CA1ED;;eA4Eed,M","sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC, useCallback, useEffect } from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '../../../types/defaults';\nimport {\n extractNumbersFromString,\n lightenDarkenColor,\n RFValueStr,\n} from '../../../utils';\nimport { PressableSurface } from '../PressableSurface';\nimport { transitionSwitch } from './animation';\nimport { StyledSwitch, StyledSwitchContent, SWITCH_PIN_WIDTH } from './styled';\n\nexport interface SwitchProps {\n onChange: (active: boolean) => void;\n active: boolean;\n activeColor?: ColorType;\n activeColorTone?: ColorGradationType;\n inactiveColor?: ColorType;\n inactiveColorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n dotStyle?: StyleProp<ViewStyle>;\n disabled?: boolean;\n}\n\nconst Switch: FC<SwitchProps> = ({\n onChange,\n activeColor = 'primary',\n activeColorTone = 'medium',\n inactiveColor = 'secondary',\n inactiveColorTone = 'light',\n active,\n dotStyle,\n disabled = false,\n ...rest\n}): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n\n const width = React.useRef(0);\n const transitionValue = React.useRef(new Animated.Value(0)).current;\n const animatedColor = React.useRef(new Animated.Value(0)).current;\n\n const calculateTranslate = () => {\n if (width.current > 0) {\n return (\n width.current -\n extractNumbersFromString(theme.spacing.micro) * 2 -\n extractNumbersFromString(RFValueStr(SWITCH_PIN_WIDTH))\n );\n }\n return 0;\n };\n\n const getBackgroundColor = (color: string) => {\n return disabled\n ? lightenDarkenColor(theme.color[inactiveColor][inactiveColorTone], 20)\n : color;\n };\n\n const interpolateColor = animatedColor.interpolate({\n inputRange: [0, 1],\n outputRange: [\n getBackgroundColor(theme.color[inactiveColor][inactiveColorTone]),\n getBackgroundColor(theme.color[activeColor][activeColorTone]),\n ],\n });\n\n useEffect(() => {\n const translate = calculateTranslate();\n transitionSwitch(active, translate, transitionValue, animatedColor);\n }, [active]);\n\n const handleChange = useCallback(() => {\n onChange(!active);\n }, [active, onChange]);\n\n const handleSwitchLayout = (lce: LayoutChangeEvent) => {\n width.current = lce.nativeEvent.layout.width;\n const translate = calculateTranslate();\n transitionSwitch(active, translate, transitionValue, animatedColor);\n };\n\n return (\n <PressableSurface\n {...rest}\n onPress={handleChange}\n effect=\"none\"\n disabled={disabled}\n >\n <StyledSwitchContent\n onLayout={handleSwitchLayout}\n style={{ backgroundColor: interpolateColor }}\n >\n <StyledSwitch\n style={[dotStyle, { transform: [{ translateX: transitionValue }] }]}\n />\n </StyledSwitchContent>\n </PressableSurface>\n );\n};\n\nexport default Switch;\n"],"file":"Switch.js"}
1
+ {"version":3,"file":"Switch.js","names":["Switch","onChange","activeColor","activeColorTone","inactiveColor","inactiveColorTone","active","dotStyle","disabled","rest","theme","useTheme","width","React","useRef","transitionValue","Animated","Value","current","animatedColor","calculateTranslate","extractNumbersFromString","spacing","micro","RFValueStr","SWITCH_PIN_WIDTH","getBackgroundColor","color","lightenDarkenColor","interpolateColor","interpolate","inputRange","outputRange","useEffect","translate","transitionSwitch","handleChange","useCallback","handleSwitchLayout","lce","nativeEvent","layout","backgroundColor","transform","translateX"],"sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC, useCallback, useEffect } from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport {\n extractNumbersFromString,\n lightenDarkenColor,\n RFValueStr,\n} from '../../../utils';\nimport { PressableSurface } from '../PressableSurface';\nimport { transitionSwitch } from './animation';\nimport { StyledSwitch, StyledSwitchContent, SWITCH_PIN_WIDTH } from './styled';\n\nexport interface SwitchProps {\n onChange: (active: boolean) => void;\n active: boolean;\n activeColor?: ColorType;\n activeColorTone?: ColorGradationType;\n inactiveColor?: ColorType;\n inactiveColorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n dotStyle?: StyleProp<ViewStyle>;\n disabled?: boolean;\n}\n\nconst Switch: FC<SwitchProps> = ({\n onChange,\n activeColor = 'primary',\n activeColorTone = 'medium',\n inactiveColor = 'secondary',\n inactiveColorTone = 'light',\n active,\n dotStyle,\n disabled = false,\n ...rest\n}): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n\n const width = React.useRef(0);\n const transitionValue = React.useRef(new Animated.Value(0)).current;\n const animatedColor = React.useRef(new Animated.Value(0)).current;\n\n const calculateTranslate = () => {\n if (width.current > 0) {\n return (\n width.current -\n extractNumbersFromString(theme.spacing.micro) * 2 -\n extractNumbersFromString(RFValueStr(SWITCH_PIN_WIDTH))\n );\n }\n return 0;\n };\n\n const getBackgroundColor = (color: string) => {\n return disabled\n ? lightenDarkenColor(theme.color[inactiveColor][inactiveColorTone], 20)\n : color;\n };\n\n const interpolateColor = animatedColor.interpolate({\n inputRange: [0, 1],\n outputRange: [\n getBackgroundColor(theme.color[inactiveColor][inactiveColorTone]),\n getBackgroundColor(theme.color[activeColor][activeColorTone]),\n ],\n });\n\n useEffect(() => {\n const translate = calculateTranslate();\n transitionSwitch(active, translate, transitionValue, animatedColor);\n }, [active]);\n\n const handleChange = useCallback(() => {\n onChange(!active);\n }, [active, onChange]);\n\n const handleSwitchLayout = (lce: LayoutChangeEvent) => {\n width.current = lce.nativeEvent.layout.width;\n const translate = calculateTranslate();\n transitionSwitch(active, translate, transitionValue, animatedColor);\n };\n\n return (\n <PressableSurface\n {...rest}\n onPress={handleChange}\n effect=\"none\"\n disabled={disabled}\n >\n <StyledSwitchContent\n onLayout={handleSwitchLayout}\n style={{ backgroundColor: interpolateColor }}\n >\n <StyledSwitch\n style={[dotStyle, { transform: [{ translateX: transitionValue }] }]}\n />\n </StyledSwitchContent>\n </PressableSurface>\n );\n};\n\nexport default Switch;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAWA;;AAKA;;AACA;;AACA;;;;;;;;AAcA,MAAMA,MAAuB,GAAG,CAAC;EAC/BC,QAD+B;EAE/BC,WAAW,GAAG,SAFiB;EAG/BC,eAAe,GAAG,QAHa;EAI/BC,aAAa,GAAG,WAJe;EAK/BC,iBAAiB,GAAG,OALW;EAM/BC,MAN+B;EAO/BC,QAP+B;EAQ/BC,QAAQ,GAAG,KARoB;EAS/B,GAAGC;AAT4B,CAAD,KAUb;EACjB,MAAMC,KAAK,GAAG,IAAAC,eAAA,GAAd;;EAEA,MAAMC,KAAK,GAAGC,eAAA,CAAMC,MAAN,CAAa,CAAb,CAAd;;EACA,MAAMC,eAAe,GAAGF,eAAA,CAAMC,MAAN,CAAa,IAAIE,qBAAA,CAASC,KAAb,CAAmB,CAAnB,CAAb,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CAFoB,EAElB,CAACA,MAAD,EAASL,QAAT,CAFkB,CAArB;;EAIA,MAAMqC,kBAAkB,GAAIC,GAAD,IAA4B;IACrD3B,KAAK,CAACM,OAAN,GAAgBqB,GAAG,CAACC,WAAJ,CAAgBC,MAAhB,CAAuB7B,KAAvC;IACA,MAAMsB,SAAS,GAAGd,kBAAkB,EAApC;IACA,IAAAe,2BAAA,EAAiB7B,MAAjB,EAAyB4B,SAAzB,EAAoCnB,eAApC,EAAqDI,aAArD;EACD,CAJD;;EAMA,OACE,8BAAC,kCAAD,eACMV,IADN;IAEE,OAAO,EAAE2B,YAFX;IAGE,MAAM,EAAC,MAHT;IAIE,QAAQ,EAAE5B;EAJZ,IAME,8BAAC,2BAAD;IACE,QAAQ,EAAE8B,kBADZ;IAEE,KAAK,EAAE;MAAEI,eAAe,EAAEb;IAAnB;EAFT,GAIE,8BAAC,oBAAD;IACE,KAAK,EAAE,CAACtB,QAAD,EAAW;MAAEoC,SAAS,EAAE,CAAC;QAAEC,UAAU,EAAE7B;MAAd,CAAD;IAAb,CAAX;EADT,EAJF,CANF,CADF;AAiBD,CA1ED;;eA4Eef,M"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Switch/animation.ts"],"names":["ANIMATION_SPEED","transitionSwitch","active","translate","transitionValue","animatedColor","Animated","timing","toValue","duration","easing","Easing","out","ease","useNativeDriver","start"],"mappings":";;;;;AAAA;;AAEA,MAAMA,eAAe,GAAG,GAAxB;;AAEO,MAAMC,gBAAgB,GAAG,CAC9BC,MAD8B,EAE9BC,SAF8B,EAG9BC,eAH8B,EAI9BC,aAJ8B,KAKrB;AAET,MAAIF,SAAS,IAAI,CAAjB,EAAoB;;AAEpB,MAAID,MAAJ,EAAY;AACVI,0BAASC,MAAT,CAAgBH,eAAhB,EAAiC;AAC/BI,MAAAA,OAAO,EAAEL,SADsB;AAE/BM,MAAAA,QAAQ,EAAET,eAFqB;AAG/BU,MAAAA,MAAM,EAAEC,oBAAOC,GAAP,CAAWD,oBAAOE,IAAlB,CAHuB;AAI/BC,MAAAA,eAAe,EAAE;AAJc,KAAjC,EAKGC,KALH;;AAMAT,0BAASC,MAAT,CAAgBF,aAAhB,EAA+B;AAC7BG,MAAAA,OAAO,EAAE,CADoB;AAE7BC,MAAAA,QAAQ,EAAET,eAFmB;AAG7Bc,MAAAA,eAAe,EAAE;AAHY,KAA/B,EAIGC,KAJH;;AAKA;AACD;;AAEDT,wBAASC,MAAT,CAAgBH,eAAhB,EAAiC;AAC/BI,IAAAA,OAAO,EAAE,CADsB;AAE/BC,IAAAA,QAAQ,EAAET,eAFqB;AAG/BU,IAAAA,MAAM,EAAEC,oBAAOC,GAAP,CAAWD,oBAAOE,IAAlB,CAHuB;AAI/BC,IAAAA,eAAe,EAAE;AAJc,GAAjC,EAKGC,KALH;;AAMAT,wBAASC,MAAT,CAAgBF,aAAhB,EAA+B;AAC7BG,IAAAA,OAAO,EAAE,CADoB;AAE7BC,IAAAA,QAAQ,EAAET,eAFmB;AAG7Bc,IAAAA,eAAe,EAAE;AAHY,GAA/B,EAIGC,KAJH;AAMD,CApCM","sourcesContent":["import { Animated, Easing } from 'react-native';\n\nconst ANIMATION_SPEED = 140\n\nexport const transitionSwitch = (\n active: boolean,\n translate: number,\n transitionValue: Animated.Value,\n animatedColor: Animated.Value\n): void => {\n\n if (translate <= 0) return\n \n if (active) {\n Animated.timing(transitionValue, {\n toValue: translate,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 1,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n return\n } \n\n Animated.timing(transitionValue, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n\n};\n"],"file":"animation.js"}
1
+ {"version":3,"file":"animation.js","names":["ANIMATION_SPEED","transitionSwitch","active","translate","transitionValue","animatedColor","Animated","timing","toValue","duration","easing","Easing","out","ease","useNativeDriver","start"],"sources":["../../../../src/components/atoms/Switch/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nconst ANIMATION_SPEED = 140;\n\nexport const transitionSwitch = (\n active: boolean,\n translate: number,\n transitionValue: Animated.Value,\n animatedColor: Animated.Value\n): void => {\n if (translate <= 0) return;\n\n if (active) {\n Animated.timing(transitionValue, {\n toValue: translate,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 1,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n return;\n }\n\n Animated.timing(transitionValue, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n};\n"],"mappings":";;;;;AAAA;;AAEA,MAAMA,eAAe,GAAG,GAAxB;;AAEO,MAAMC,gBAAgB,GAAG,CAC9BC,MAD8B,EAE9BC,SAF8B,EAG9BC,eAH8B,EAI9BC,aAJ8B,KAKrB;EACT,IAAIF,SAAS,IAAI,CAAjB,EAAoB;;EAEpB,IAAID,MAAJ,EAAY;IACVI,qBAAA,CAASC,MAAT,CAAgBH,eAAhB,EAAiC;MAC/BI,OAAO,EAAEL,SADsB;MAE/BM,QAAQ,EAAET,eAFqB;MAG/BU,MAAM,EAAEC,mBAAA,CAAOC,GAAP,CAAWD,mBAAA,CAAOE,IAAlB,CAHuB;MAI/BC,eAAe,EAAE;IAJc,CAAjC,EAKGC,KALH;;IAMAT,qBAAA,CAASC,MAAT,CAAgBF,aAAhB,EAA+B;MAC7BG,OAAO,EAAE,CADoB;MAE7BC,QAAQ,EAAET,eAFmB;MAG7Bc,eAAe,EAAE;IAHY,CAA/B,EAIGC,KAJH;;IAKA;EACD;;EAEDT,qBAAA,CAASC,MAAT,CAAgBH,eAAhB,EAAiC;IAC/BI,OAAO,EAAE,CADsB;IAE/BC,QAAQ,EAAET,eAFqB;IAG/BU,MAAM,EAAEC,mBAAA,CAAOC,GAAP,CAAWD,mBAAA,CAAOE,IAAlB,CAHuB;IAI/BC,eAAe,EAAE;EAJc,CAAjC,EAKGC,KALH;;EAMAT,qBAAA,CAASC,MAAT,CAAgBF,aAAhB,EAA+B;IAC7BG,OAAO,EAAE,CADoB;IAE7BC,QAAQ,EAAET,eAFmB;IAG7Bc,eAAe,EAAE;EAHY,CAA/B,EAIGC,KAJH;AAKD,CAlCM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Switch/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Switch, SwitchProps } from './Switch';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Switch/index.ts"],"sourcesContent":["export { default as Switch, SwitchProps } from './Switch';\n"],"mappings":";;;;;AAAA"}
@@ -1,16 +1,4 @@
1
- /// <reference types="react" />
2
- import { Animated } from 'react-native';
3
1
  export declare const SWITCH_BODY_WIDTH = "40px";
4
2
  export declare const SWITCH_PIN_WIDTH = "16px";
5
- export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
6
- children?: import("react").ReactNode;
7
- } & {
8
- theme?: import("@emotion/react").Theme | undefined;
9
- as?: import("react").ElementType<any> | undefined;
10
- } & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
11
- export declare const StyledSwitch: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
12
- children?: import("react").ReactNode;
13
- } & {
14
- theme?: import("@emotion/react").Theme | undefined;
15
- as?: import("react").ElementType<any> | undefined;
16
- } & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
3
+ export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<any, {}, {}>;
4
+ export declare const StyledSwitch: import("@emotion/native").StyledComponent<any, {}, {}>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.StyledSwitch = exports.StyledSwitchContent = exports.SWITCH_PIN_WIDTH = exports.SWITCH_BODY_WIDTH = void 0;
4
+ exports.StyledSwitchContent = exports.StyledSwitch = exports.SWITCH_PIN_WIDTH = exports.SWITCH_BODY_WIDTH = void 0;
5
5
 
6
6
  var _native = _interopRequireDefault(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Switch/styled.ts"],"names":["SWITCH_BODY_WIDTH","SWITCH_PIN_WIDTH","StyledSwitchContent","Animated","View","theme","borderRadius","pill","spacing","micro","StyledSwitch","miscellaneous","surfaceColor"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;AAEO,MAAMA,iBAAiB,GAAG,MAA1B;;AACA,MAAMC,gBAAgB,GAAG,MAAzB;;AAEA,MAAMC,mBAAmB,GAAG,qBAAOC,sBAASC,IAAhB,CAEjC;AACF,mBAAmB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC1D,eAAe,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACG,OAAN,CAAcC,KAAM;AAClD;AACA,WAAW,uBAAWT,iBAAX,CAA8B;AACzC,YAAY,uBAAW,MAAX,CAAmB;AAC/B,CARO;;AAUA,MAAMU,YAAY,GAAG,qBAAOP,sBAASC,IAAhB,CAA2C;AACvE,mBAAmB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC1D,sBAAsB,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACM,aAAN,CAAoBC,YAAa;AACtE,WAAW,uBAAWX,gBAAX,CAA6B;AACxC,YAAY,uBAAW,MAAX,CAAmB;AAC/B,CALO","sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\n\nexport const SWITCH_BODY_WIDTH = '40px'\nexport const SWITCH_PIN_WIDTH = '16px'\n\nexport const StyledSwitchContent = styled(Animated.View)<\n Partial<StyleProps>\n>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n padding: 0 ${({ theme }) => theme.spacing.micro};\n justify-content: center;\n width: ${RFValueStr(SWITCH_BODY_WIDTH)};\n height: ${RFValueStr('22px')};\n`;\n\nexport const StyledSwitch = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n width: ${RFValueStr(SWITCH_PIN_WIDTH)};\n height: ${RFValueStr('16px')};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["SWITCH_BODY_WIDTH","SWITCH_PIN_WIDTH","StyledSwitchContent","styled","Animated","View","theme","borderRadius","pill","spacing","micro","RFValueStr","StyledSwitch","miscellaneous","surfaceColor"],"sources":["../../../../src/components/atoms/Switch/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { RFValueStr } from '../../../utils';\n\nexport const SWITCH_BODY_WIDTH = '40px';\nexport const SWITCH_PIN_WIDTH = '16px';\n\nexport const StyledSwitchContent = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n padding: 0 ${({ theme }) => theme.spacing.micro};\n justify-content: center;\n width: ${RFValueStr(SWITCH_BODY_WIDTH)};\n height: ${RFValueStr('22px')};\n`;\n\nexport const StyledSwitch = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n width: ${RFValueStr(SWITCH_PIN_WIDTH)};\n height: ${RFValueStr('16px')};\n`;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;AAEO,MAAMA,iBAAiB,GAAG,MAA1B;;AACA,MAAMC,gBAAgB,GAAG,MAAzB;;AAEA,MAAMC,mBAAmB,GAAG,IAAAC,eAAA,EAAOC,qBAAA,CAASC,IAAhB,CAA2C;AAC9E,mBAAmB,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC1D,eAAe,CAAC;EAAEF;AAAF,CAAD,KAAeA,KAAK,CAACG,OAAN,CAAcC,KAAM;AAClD;AACA,WAAW,IAAAC,iBAAA,EAAWX,iBAAX,CAA8B;AACzC,YAAY,IAAAW,iBAAA,EAAW,MAAX,CAAmB;AAC/B,CANO;;AAQA,MAAMC,YAAY,GAAG,IAAAT,eAAA,EAAOC,qBAAA,CAASC,IAAhB,CAA2C;AACvE,mBAAmB,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC1D,sBAAsB,CAAC;EAAEF;AAAF,CAAD,KAAeA,KAAK,CAACO,aAAN,CAAoBC,YAAa;AACtE,WAAW,IAAAH,iBAAA,EAAWV,gBAAX,CAA6B;AACxC,YAAY,IAAAU,iBAAA,EAAW,MAAX,CAAmB;AAC/B,CALO"}
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  const Tag = ({
21
21
  value,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"names":["Tag","value","icon","variant","dismiss","canDismiss","onDismiss","style","rest","setDismiss","fadeAnim","React","useRef","Animated","Value","current","duration","fadeOut","timing","toValue","useNativeDriver","start","handleDismiss","setTimeout","opacity","size","colorVariant"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAUA,MAAMA,GAAuB,GAAG,CAAC;AAC/BC,EAAAA,KAD+B;AAE/BC,EAAAA,IAF+B;AAG/BC,EAAAA,OAAO,GAAG,OAHqB;AAI/BC,EAAAA,OAAO,EAAEC,UAAU,GAAG,KAJS;AAK/BC,EAAAA,SAL+B;AAM/BC,EAAAA,KAN+B;AAO/B,KAAGC;AAP4B,CAAD,KAQb;AACjB,QAAM,CAACJ,OAAD,EAAUK,UAAV,IAAwB,qBAAS,KAAT,CAA9B;;AACA,QAAMC,QAAQ,GAAGC,eAAMC,MAAN,CAAa,IAAIC,sBAASC,KAAb,CAAmB,CAAnB,CAAb,EAAoCC,OAArD;;AACA,QAAMC,QAAQ,GAAG,GAAjB;;AAEA,QAAMC,OAAO,GAAG,MAAM;AACpBJ,0BAASK,MAAT,CAAgBR,QAAhB,EAA0B;AACxBS,MAAAA,OAAO,EAAE,CADe;AAExBH,MAAAA,QAFwB;AAGxBI,MAAAA,eAAe,EAAE;AAHO,KAA1B,EAIGC,KAJH;AAKD,GAND;;AAQA,QAAMC,aAAa,GAAG,wBAAY,MAAM;AACtChB,IAAAA,SAAS,QAAT,YAAAA,SAAS;AACTW,IAAAA,OAAO;AACPM,IAAAA,UAAU,CAAC,MAAMd,UAAU,CAAC,IAAD,CAAjB,EAAyBO,QAAzB,CAAV;AACD,GAJqB,EAInB,CAACV,SAAD,CAJmB,CAAtB;AAMA,SACE,6BAAC,0BAAD,eACME,IADN;AAEE,IAAA,OAAO,EAAEL,OAFX;AAGE,IAAA,KAAK,EAAE,CAAC;AAAEqB,MAAAA,OAAO,EAAGd;AAAZ,KAAD,EAA+CH,KAA/C,CAHT;AAIE,IAAA,OAAO,EAAE,CAACH;AAJZ,MAMGF,IAAI,IACH,6BAAC,sBAAD;AACE,IAAA,IAAI,EAAEA,IAAI,CAACuB,IAAL,IAAa,OADrB;AAEE,IAAA,YAAY,EAAEvB,IAAI,CAACwB,YAAL,IAAqB;AAFrC,KAGMxB,IAHN,EAPJ,EAaGD,KAbH,EAcGI,UAAU,IACT,6BAAC,kCAAD;AAAkB,IAAA,OAAO,EAAEiB;AAA3B,KACE,6BAAC,uBAAD;AACE,IAAA,IAAI,EAAC,eADP;AAEE,IAAA,IAAI,EAAC,SAFP;AAGE,IAAA,IAAI,EAAC,OAHP;AAIE,IAAA,SAAS,EAAC;AAJZ,IADF,CAfJ,CADF;AA2BD,CAtDD;;eAwDetB,G","sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n {...rest}\n variant={variant}\n style={[{ opacity: (fadeAnim as unknown) as number }, style]}\n visible={!dismiss}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"file":"Tag.js"}
1
+ {"version":3,"file":"Tag.js","names":["Tag","value","icon","variant","dismiss","canDismiss","onDismiss","style","rest","setDismiss","useState","fadeAnim","React","useRef","Animated","Value","current","duration","fadeOut","timing","toValue","useNativeDriver","start","handleDismiss","useCallback","setTimeout","opacity","size","colorVariant"],"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n {...rest}\n variant={variant}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n visible={!dismiss}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAUA,MAAMA,GAAuB,GAAG,CAAC;EAC/BC,KAD+B;EAE/BC,IAF+B;EAG/BC,OAAO,GAAG,OAHqB;EAI/BC,OAAO,EAAEC,UAAU,GAAG,KAJS;EAK/BC,SAL+B;EAM/BC,KAN+B;EAO/B,GAAGC;AAP4B,CAAD,KAQb;EACjB,MAAM,CAACJ,OAAD,EAAUK,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;;EACA,MAAMC,QAAQ,GAAGC,cAAA,CAAMC,MAAN,CAAa,IAAIC,qBAAA,CAASC,KAAb,CAAmB,CAAnB,CAAb,EAAoCC,OAArD;;EACA,MAAMC,QAAQ,GAAG,GAAjB;;EAEA,MAAMC,OAAO,GAAG,MAAM;IACpBJ,qBAAA,CAASK,MAAT,CAAgBR,QAAhB,EAA0B;MACxBS,OAAO,EAAE,CADe;MAExBH,QAFwB;MAGxBI,eAAe,EAAE;IAHO,CAA1B,EAIGC,KAJH;EAKD,CAND;;EAQA,MAAMC,aAAa,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACtClB,SAAS,QAAT,YAAAA,SAAS;IACTY,OAAO;IACPO,UAAU,CAAC,MAAMhB,UAAU,CAAC,IAAD,CAAjB,EAAyBQ,QAAzB,CAAV;EACD,CAJqB,EAInB,CAACX,SAAD,CAJmB,CAAtB;EAMA,OACE,6BAAC,0BAAD,eACME,IADN;IAEE,OAAO,EAAEL,OAFX;IAGE,KAAK,EAAE,CAAC;MAAEuB,OAAO,EAAEf;IAAX,CAAD,EAA6CJ,KAA7C,CAHT;IAIE,OAAO,EAAE,CAACH;EAJZ,IAMGF,IAAI,IACH,6BAAC,sBAAD;IACE,IAAI,EAAEA,IAAI,CAACyB,IAAL,IAAa,OADrB;IAEE,YAAY,EAAEzB,IAAI,CAAC0B,YAAL,IAAqB;EAFrC,GAGM1B,IAHN,EAPJ,EAaGD,KAbH,EAcGI,UAAU,IACT,6BAAC,kCAAD;IAAkB,OAAO,EAAEkB;EAA3B,GACE,6BAAC,uBAAD;IACE,IAAI,EAAC,eADP;IAEE,IAAI,EAAC,SAFP;IAGE,IAAI,EAAC,OAHP;IAIE,SAAS,EAAC;EAJZ,EADF,CAfJ,CADF;AA2BD,CAtDD;;eAwDevB,G"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Tag/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Tag, TagProps } from './Tag';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Tag/index.ts"],"sourcesContent":["export { default as Tag, TagProps } from './Tag';\n"],"mappings":";;;;;AAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.StyledCloseIcon = exports.StyledLeftIcon = exports.StyledTagContainer = void 0;
4
+ exports.StyledTagContainer = exports.StyledLeftIcon = exports.StyledCloseIcon = void 0;
5
5
 
6
6
  var _native = _interopRequireWildcard(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Tag/styled.ts"],"names":["smallVariant","theme","variant","borderRadius","micro","spacing","nano","mili","defaultVariant","centi","StyledTagContainerBase","Animated","View","miscellaneous","bodyColor","visible","StyledTagContainer","props","StyledLeftIcon","Icon","StyledCloseIcon"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;;;AAGA,MAAMA,YAAY,GAAG,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KACnBA,OAAO,KAAK,OAAZ,IACA,gBAAI;AACN,qBAAqBD,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC9C,eAAeH,KAAK,CAACI,OAAN,CAAcC,IAAK,IAAGL,KAAK,CAACI,OAAN,CAAcE,IAAK;AACxD,GALA;;AAOA,MAAMC,cAAc,GAAG,CAAC;AAAEP,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KACrBA,OAAO,KAAK,SAAZ,IACA,gBAAI;AACN,qBAAqBD,KAAK,CAACE,YAAN,CAAmBI,IAAK;AAC7C,eAAeN,KAAK,CAACI,OAAN,CAAcD,KAAM,IAAGH,KAAK,CAACI,OAAN,CAAcI,KAAM;AAC1D,GALA;;AAOA,MAAMC,sBAAsB,GAAG,qBAAOC,sBAASC,IAAhB,CAE7B;AACF,sBAAsB,CAAC;AAAEX,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,aAAN,CAAoBC,SAAU;AACnE;AACA;AACA;AACA;AACA,aAAa,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAkBA,OAAO,GAAG,MAAH,GAAY,MAAQ;AAC1D,CATA;AAWO,MAAMC,kBAAkB,GAAG,qBAAON,sBAAP,EAChCO,KAAK,IAAI,gBAAI;AACf,MAAMjB,YAAY,CAACiB,KAAD,CAAQ;AAC1B,MAAMT,cAAc,CAACS,KAAD,CAAQ;AAC5B,GAJkC,CAA3B;;AAOA,MAAMC,cAAc,GAAG,qBAAOC,UAAP,CAA8C;AAC5E,kBAAkB,CAAC;AAAElB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcD,KAAM;AACrD,CAFO;;AAIA,MAAMgB,eAAe,GAAG,qBAAOD,UAAP,CAA8C;AAC7E,iBAAiB,CAAC;AAAElB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcC,IAAK;AACnD,CAFO","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-left: ${({ theme }) => theme.spacing.nano};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["smallVariant","theme","variant","css","borderRadius","micro","spacing","nano","mili","defaultVariant","centi","StyledTagContainerBase","styled","Animated","View","miscellaneous","bodyColor","visible","StyledTagContainer","props","StyledLeftIcon","Icon","StyledCloseIcon"],"sources":["../../../../src/components/atoms/Tag/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-left: ${({ theme }) => theme.spacing.nano};\n`;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;;;;;AAGA,MAAMA,YAAY,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KACnBA,OAAO,KAAK,OAAZ,IACA,IAAAC,WAAA,CAAI;AACN,qBAAqBF,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC9C,eAAeJ,KAAK,CAACK,OAAN,CAAcC,IAAK,IAAGN,KAAK,CAACK,OAAN,CAAcE,IAAK;AACxD,GALA;;AAOA,MAAMC,cAAc,GAAG,CAAC;EAAER,KAAF;EAASC;AAAT,CAAD,KACrBA,OAAO,KAAK,SAAZ,IACA,IAAAC,WAAA,CAAI;AACN,qBAAqBF,KAAK,CAACG,YAAN,CAAmBI,IAAK;AAC7C,eAAeP,KAAK,CAACK,OAAN,CAAcD,KAAM,IAAGJ,KAAK,CAACK,OAAN,CAAcI,KAAM;AAC1D,GALA;;AAOA,MAAMC,sBAAsB,GAAG,IAAAC,eAAA,EAAOC,qBAAA,CAASC,IAAhB,CAE7B;AACF,sBAAsB,CAAC;EAAEb;AAAF,CAAD,KAAeA,KAAK,CAACc,aAAN,CAAoBC,SAAU;AACnE;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAF,CAAD,KAAkBA,OAAO,GAAG,MAAH,GAAY,MAAQ;AAC1D,CATA;AAWO,MAAMC,kBAAkB,GAAG,IAAAN,eAAA,EAAOD,sBAAP,EAChCQ,KAAK,IAAI,IAAAhB,WAAA,CAAI;AACf,MAAMH,YAAY,CAACmB,KAAD,CAAQ;AAC1B,MAAMV,cAAc,CAACU,KAAD,CAAQ;AAC5B,GAJkC,CAA3B;;AAOA,MAAMC,cAAc,GAAG,IAAAR,eAAA,EAAOS,UAAP,CAA8C;AAC5E,kBAAkB,CAAC;EAAEpB;AAAF,CAAD,KAAeA,KAAK,CAACK,OAAN,CAAcD,KAAM;AACrD,CAFO;;AAIA,MAAMiB,eAAe,GAAG,IAAAV,eAAA,EAAOS,UAAP,CAA8C;AAC7E,iBAAiB,CAAC;EAAEpB;AAAF,CAAD,KAAeA,KAAK,CAACK,OAAN,CAAcC,IAAK;AACnD,CAFO"}
@@ -11,7 +11,7 @@ var _functions = require("./functions");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
15
 
16
16
  const Text = ({
17
17
  children,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Text/Text.tsx"],"names":["Text","children","style","fontColor","colorTone","colorVariant","fontWeight","typography","numberOfLines","ellipsizeMode","textTransform","capitalFirst","rest"],"mappings":";;;;;AAAA;;AAUA;;AACA;;;;;;AAwBA,MAAMA,IAAmB,GAAG,CAAC;AAC3BC,EAAAA,QAD2B;AAE3BC,EAAAA,KAF2B;AAG3BC,EAAAA,SAAS,GAAG,MAHe;AAI3BC,EAAAA,SAAS,GAAG,QAJe;AAK3BC,EAAAA,YAL2B;AAM3BC,EAAAA,UAAU,GAAG,SANc;AAO3BC,EAAAA,UAAU,GAAG,MAPc;AAQ3BC,EAAAA,aAR2B;AAS3BC,EAAAA,aAT2B;AAU3BC,EAAAA,aAAa,GAAG,MAVW;AAW3BC,EAAAA,YAAY,GAAG,KAXY;AAY3B,KAAGC;AAZwB,CAAD,KAaT;AACjB,SACE,6BAAC,yBAAD,eACMA,IADN;AAEE,IAAA,KAAK,EAAEV,KAFT;AAGE,IAAA,SAAS,EAAEC,SAHb;AAIE,IAAA,SAAS,EAAEC,SAJb;AAKE,IAAA,YAAY,EAAEC,YALhB;AAME,IAAA,UAAU,EAAEC,UANd;AAOE,IAAA,UAAU,EAAEC,UAPd;AAQE,IAAA,aAAa,EAAEC,aARjB;AASE,IAAA,aAAa,EAAEC,aATjB;AAUE,IAAA,aAAa,EAAEC;AAVjB,MAYG,yBAAST,QAAT,EAAmBU,YAAnB,CAZH,CADF;AAgBD,CA9BD;;eAgCeX,I","sourcesContent":["import React, { FC } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { StyledColoredText } from './styled';\nimport { getLabel } from './functions';\n\nexport interface TextProps {\n /** Font theme text color */\n fontColor?: FontColorType;\n /** Font theme weight */\n fontWeight?: FontWeightType;\n /** Font theme sizes */\n typography?: TypographyVariationType;\n /** Font theme stack */\n fontStack?: FontStackType;\n /** Palette theme colors. You can specify this prop to override theme fontColor */\n colorVariant?: ColorType;\n /** Palette theme colors gradation */\n colorTone?: ColorGradationType;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';\n capitalFirst?: boolean;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n}\n\n/** NOTE: When using colors, be careful to not override fontColor by using colorVariant and colorTone, referent to theme colors and not text colors. */\nconst Text: FC<TextProps> = ({\n children,\n style,\n fontColor = 'dark',\n colorTone = 'medium',\n colorVariant,\n fontWeight = 'regular',\n typography = 'base',\n numberOfLines,\n ellipsizeMode,\n textTransform = 'none',\n capitalFirst = false,\n ...rest\n}): JSX.Element => {\n return (\n <StyledColoredText\n {...rest}\n style={style}\n fontColor={fontColor}\n colorTone={colorTone}\n colorVariant={colorVariant}\n fontWeight={fontWeight}\n typography={typography}\n numberOfLines={numberOfLines}\n ellipsizeMode={ellipsizeMode}\n textTransform={textTransform}\n >\n {getLabel(children, capitalFirst)}\n </StyledColoredText>\n );\n};\n\nexport default Text;\n"],"file":"Text.js"}
1
+ {"version":3,"file":"Text.js","names":["Text","children","style","fontColor","colorTone","colorVariant","fontWeight","typography","numberOfLines","ellipsizeMode","textTransform","capitalFirst","rest","getLabel"],"sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { StyledColoredText } from './styled';\nimport { getLabel } from './functions';\n\nexport interface TextProps {\n /** Font theme text color */\n fontColor?: FontColorType;\n /** Font theme weight */\n fontWeight?: FontWeightType;\n /** Font theme sizes */\n typography?: TypographyVariationType;\n /** Font theme stack */\n fontStack?: FontStackType;\n /** Palette theme colors. You can specify this prop to override theme fontColor */\n colorVariant?: ColorType;\n /** Palette theme colors gradation */\n colorTone?: ColorGradationType;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';\n capitalFirst?: boolean;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n}\n\n/** NOTE: When using colors, be careful to not override fontColor by using colorVariant and colorTone, referent to theme colors and not text colors. */\nconst Text: FC<TextProps> = ({\n children,\n style,\n fontColor = 'dark',\n colorTone = 'medium',\n colorVariant,\n fontWeight = 'regular',\n typography = 'base',\n numberOfLines,\n ellipsizeMode,\n textTransform = 'none',\n capitalFirst = false,\n ...rest\n}): JSX.Element => {\n return (\n <StyledColoredText\n {...rest}\n style={style}\n fontColor={fontColor}\n colorTone={colorTone}\n colorVariant={colorVariant}\n fontWeight={fontWeight}\n typography={typography}\n numberOfLines={numberOfLines}\n ellipsizeMode={ellipsizeMode}\n textTransform={textTransform}\n >\n {getLabel(children, capitalFirst)}\n </StyledColoredText>\n );\n};\n\nexport default Text;\n"],"mappings":";;;;;AAAA;;AAUA;;AACA;;;;;;AAwBA,MAAMA,IAAmB,GAAG,CAAC;EAC3BC,QAD2B;EAE3BC,KAF2B;EAG3BC,SAAS,GAAG,MAHe;EAI3BC,SAAS,GAAG,QAJe;EAK3BC,YAL2B;EAM3BC,UAAU,GAAG,SANc;EAO3BC,UAAU,GAAG,MAPc;EAQ3BC,aAR2B;EAS3BC,aAT2B;EAU3BC,aAAa,GAAG,MAVW;EAW3BC,YAAY,GAAG,KAXY;EAY3B,GAAGC;AAZwB,CAAD,KAaT;EACjB,OACE,6BAAC,yBAAD,eACMA,IADN;IAEE,KAAK,EAAEV,KAFT;IAGE,SAAS,EAAEC,SAHb;IAIE,SAAS,EAAEC,SAJb;IAKE,YAAY,EAAEC,YALhB;IAME,UAAU,EAAEC,UANd;IAOE,UAAU,EAAEC,UAPd;IAQE,aAAa,EAAEC,aARjB;IASE,aAAa,EAAEC,aATjB;IAUE,aAAa,EAAEC;EAVjB,IAYG,IAAAG,mBAAA,EAASZ,QAAT,EAAmBU,YAAnB,CAZH,CADF;AAgBD,CA9BD;;eAgCeX,I"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Text/functions.ts"],"names":["getFirstCapitalCharacter","value","charAt","toUpperCase","concat","slice","getLabel","children","capitalFirst"],"mappings":";;;;;AAAO,MAAMA,wBAAwB,GAAIC,KAAD,IACtCA,KAAK,CAACC,MAAN,CAAa,CAAb,EAAgBC,WAAhB,GAA8BC,MAA9B,CAAqCH,KAAK,CAACI,KAAN,CAAY,CAAZ,CAArC,CADK;;;;AAIA,MAAMC,QAAQ,GAAG,CAACC,QAAD,EAAWC,YAAX,KACtB,OAAOD,QAAP,KAAoB,QAApB,IAAgCC,YAAhC,GACIR,wBAAwB,CAACO,QAAD,CAD5B,GAEIA,QAHC","sourcesContent":["export const getFirstCapitalCharacter = (value: string): string =>\n value.charAt(0).toUpperCase().concat(value.slice(1));\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getLabel = (children, capitalFirst: boolean) =>\n typeof children === 'string' && capitalFirst\n ? getFirstCapitalCharacter(children)\n : children;\n"],"file":"functions.js"}
1
+ {"version":3,"file":"functions.js","names":["getFirstCapitalCharacter","value","charAt","toUpperCase","concat","slice","getLabel","children","capitalFirst"],"sources":["../../../../src/components/atoms/Text/functions.ts"],"sourcesContent":["export const getFirstCapitalCharacter = (value: string): string =>\n value.charAt(0).toUpperCase().concat(value.slice(1));\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getLabel = (children, capitalFirst: boolean) =>\n typeof children === 'string' && capitalFirst\n ? getFirstCapitalCharacter(children)\n : children;\n"],"mappings":";;;;;AAAO,MAAMA,wBAAwB,GAAIC,KAAD,IACtCA,KAAK,CAACC,MAAN,CAAa,CAAb,EAAgBC,WAAhB,GAA8BC,MAA9B,CAAqCH,KAAK,CAACI,KAAN,CAAY,CAAZ,CAArC,CADK;;;;AAIA,MAAMC,QAAQ,GAAG,CAACC,QAAD,EAAWC,YAAX,KACtB,OAAOD,QAAP,KAAoB,QAApB,IAAgCC,YAAhC,GACIR,wBAAwB,CAACO,QAAD,CAD5B,GAEIA,QAHC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Text/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Text, TextProps } from './Text';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Text/index.ts"],"sourcesContent":["export { default as Text, TextProps } from './Text';\n"],"mappings":";;;;;AAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.StyledColoredText = exports.StyledText = void 0;
4
+ exports.StyledText = exports.StyledColoredText = void 0;
5
5
 
6
6
  var _native = _interopRequireWildcard(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Text/styled.ts"],"names":["StyledText","RNText","theme","fontColor","font","color","fontWeight","weight","typography","fontSize","lineHeight","fontStack","stack","textTransform","colorStyles","colorVariant","colorTone","StyledColoredText"],"mappings":";;;;;AAAA;;AAEA;;;;;;AAEO,MAAMA,UAAU,GAAG,qBAAOC,iBAAP,CAAgD;AAC1E,WAAW,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA,SAAS,GAAG;AAArB,CAAD,KAAmCD,KAAK,CAACE,IAAN,CAAWC,KAAX,CAAiBF,SAAjB,CAA4B;AAC1E,iBAAiB,CAAC;AAAED,EAAAA,KAAF;AAASI,EAAAA,UAAU,GAAG;AAAtB,CAAD,KACbJ,KAAK,CAACE,IAAN,CAAWG,MAAX,CAAkBD,UAAlB,CAA8B;AAClC,eAAe,CAAC;AAAEJ,EAAAA,KAAF;AAASM,EAAAA,UAAU,GAAG;AAAtB,CAAD,KACXN,KAAK,CAACM,UAAN,CAAiBA,UAAjB,EAA6BC,QAAS;AAC1C,iBAAiB,CAAC;AAAEP,EAAAA,KAAF;AAASM,EAAAA,UAAU,GAAG;AAAtB,CAAD,KACbN,KAAK,CAACM,UAAN,CAAiBA,UAAjB,EAA6BE,UAAW;AAC5C,iBAAiB,CAAC;AAAER,EAAAA,KAAF;AAASS,EAAAA,SAAS,GAAG;AAArB,CAAD,KACZ,IAAGT,KAAK,CAACE,IAAN,CAAWQ,KAAX,CAAiBD,SAAjB,CAA4B,GAAG;AACvC,oBAAoB,CAAC;AAAEE,EAAAA,aAAa,GAAG;AAAlB,CAAD,KAAiC,GAAEA,aAAc,EAAE;AACvE,CAXO;;;AAaP,MAAMC,WAAW,GAAG,CAAC;AACnBC,EAAAA,YADmB;AAEnBC,EAAAA,SAFmB;AAGnBd,EAAAA;AAHmB,CAAD,KAKlBa,YAAY,IACZC,SADA,IAEA,gBAAI;AACN,aAAad,KAAK,CAACG,KAAN,CAAYU,YAAZ,EAA0BC,SAA1B,CAAqC;AAClD,GATA;;AAWO,MAAMC,iBAAiB,GAAG,qBAAOjB,UAAP,EAE/Bc,WAF+B,CAA1B","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { StyleProps, TextProps } from '@tecsinapse/react-core';\nimport { Text as RNText } from 'react-native';\n\nexport const StyledText = styled(RNText)<TextProps & Partial<StyleProps>>`\n color: ${({ theme, fontColor = 'dark' }) => theme.font.color[fontColor]};\n font-weight: ${({ theme, fontWeight = 'regular' }) =>\n theme.font.weight[fontWeight]};\n font-size: ${({ theme, typography = 'base' }) =>\n theme.typography[typography].fontSize};\n line-height: ${({ theme, typography = 'base' }) =>\n theme.typography[typography].lineHeight};\n font-family: ${({ theme, fontStack = 'default' }) =>\n `'${theme.font.stack[fontStack]}'`};\n text-transform: ${({ textTransform = 'none' }) => `${textTransform}`};\n`;\n\nconst colorStyles = ({\n colorVariant,\n colorTone,\n theme,\n}: TextProps & StyleProps) =>\n colorVariant &&\n colorTone &&\n css`\n color: ${theme.color[colorVariant][colorTone]};\n `;\n\nexport const StyledColoredText = styled(StyledText)<\n TextProps & Partial<StyleProps>\n>(colorStyles);\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledText","styled","RNText","theme","fontColor","font","color","fontWeight","weight","typography","fontSize","lineHeight","fontStack","stack","textTransform","colorStyles","colorVariant","colorTone","css","StyledColoredText"],"sources":["../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { StyleProps, TextProps } from '@tecsinapse/react-core';\nimport { Text as RNText } from 'react-native';\n\nexport const StyledText = styled(RNText)<TextProps & Partial<StyleProps>>`\n color: ${({ theme, fontColor = 'dark' }) => theme.font.color[fontColor]};\n font-weight: ${({ theme, fontWeight = 'regular' }) =>\n theme.font.weight[fontWeight]};\n font-size: ${({ theme, typography = 'base' }) =>\n theme.typography[typography].fontSize};\n line-height: ${({ theme, typography = 'base' }) =>\n theme.typography[typography].lineHeight};\n font-family: ${({ theme, fontStack = 'default' }) =>\n `'${theme.font.stack[fontStack]}'`};\n text-transform: ${({ textTransform = 'none' }) => `${textTransform}`};\n`;\n\nconst colorStyles = ({\n colorVariant,\n colorTone,\n theme,\n}: TextProps & StyleProps) =>\n colorVariant &&\n colorTone &&\n css`\n color: ${theme.color[colorVariant][colorTone]};\n `;\n\nexport const StyledColoredText = styled(StyledText)<\n TextProps & Partial<StyleProps>\n>(colorStyles);\n"],"mappings":";;;;;AAAA;;AAEA;;;;;;AAEO,MAAMA,UAAU,GAAG,IAAAC,eAAA,EAAOC,iBAAP,CAAgD;AAC1E,WAAW,CAAC;EAAEC,KAAF;EAASC,SAAS,GAAG;AAArB,CAAD,KAAmCD,KAAK,CAACE,IAAN,CAAWC,KAAX,CAAiBF,SAAjB,CAA4B;AAC1E,iBAAiB,CAAC;EAAED,KAAF;EAASI,UAAU,GAAG;AAAtB,CAAD,KACbJ,KAAK,CAACE,IAAN,CAAWG,MAAX,CAAkBD,UAAlB,CAA8B;AAClC,eAAe,CAAC;EAAEJ,KAAF;EAASM,UAAU,GAAG;AAAtB,CAAD,KACXN,KAAK,CAACM,UAAN,CAAiBA,UAAjB,EAA6BC,QAAS;AAC1C,iBAAiB,CAAC;EAAEP,KAAF;EAASM,UAAU,GAAG;AAAtB,CAAD,KACbN,KAAK,CAACM,UAAN,CAAiBA,UAAjB,EAA6BE,UAAW;AAC5C,iBAAiB,CAAC;EAAER,KAAF;EAASS,SAAS,GAAG;AAArB,CAAD,KACZ,IAAGT,KAAK,CAACE,IAAN,CAAWQ,KAAX,CAAiBD,SAAjB,CAA4B,GAAG;AACvC,oBAAoB,CAAC;EAAEE,aAAa,GAAG;AAAlB,CAAD,KAAiC,GAAEA,aAAc,EAAE;AACvE,CAXO;;;AAaP,MAAMC,WAAW,GAAG,CAAC;EACnBC,YADmB;EAEnBC,SAFmB;EAGnBd;AAHmB,CAAD,KAKlBa,YAAY,IACZC,SADA,IAEA,IAAAC,WAAA,CAAI;AACN,aAAaf,KAAK,CAACG,KAAN,CAAYU,YAAZ,EAA0BC,SAA1B,CAAqC;AAClD,GATA;;AAWO,MAAME,iBAAiB,GAAG,IAAAlB,eAAA,EAAOD,UAAP,EAE/Be,WAF+B,CAA1B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/shared/PaperAndCard.ts"],"names":["baseStyles","theme","borderRadius","mili","miscellaneous","surfaceColor","elevatedStyles","elevated","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"mappings":";;;;;AAAA;;AAIO,MAAMA,UAAU,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAgC,gBAAI;AAC9D,mBAAmBA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBF,KAAK,CAACG,aAAN,CAAoBC,YAAa;AACvD,CAHO;;;;AAMA,MAAMC,cAAc,GAAG,CAAC;AAC7BL,EAAAA,KAD6B;AAE7BM,EAAAA,QAAQ,GAAG;AAFkB,CAAD,KAI5BA,QAAQ,IAAI,CACV,iBAAI;AACFC,EAAAA,WAAW,EAAEP,KAAK,CAACG,aAAN,CAAoBK,MAD/B;AAEFC,EAAAA,YAAY,EAAE;AAAEC,IAAAA,KAAK,EAAE,CAAT;AAAYC,IAAAA,MAAM,EAAE;AAApB,GAFZ;AAGFC,EAAAA,aAAa,EAAE,IAHb;AAIFC,EAAAA,YAAY,EAAE,CAJZ;AAKFC,EAAAA,SAAS,EAAE;AALT,CAAJ,CADU,CAJP","sourcesContent":["import { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const baseStyles = ({ theme }: StyleProps): any => css`\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.miscellaneous.surfaceColor};\n`;\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const elevatedStyles = ({\n theme,\n elevated = false,\n}: { elevated?: boolean } & StyleProps): any =>\n elevated && [\n css({\n shadowColor: theme.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.05,\n shadowRadius: 5,\n elevation: 2\n }),\n ];\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"file":"PaperAndCard.js"}
1
+ {"version":3,"file":"PaperAndCard.js","names":["baseStyles","theme","css","borderRadius","mili","miscellaneous","surfaceColor","elevatedStyles","elevated","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"sources":["../../../../src/components/atoms/shared/PaperAndCard.ts"],"sourcesContent":["import { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const baseStyles = ({ theme }: StyleProps): any => css`\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.miscellaneous.surfaceColor};\n`;\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const elevatedStyles = ({\n theme,\n elevated = false,\n}: { elevated?: boolean } & StyleProps): any =>\n elevated && [\n css({\n shadowColor: theme.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.05,\n shadowRadius: 5,\n elevation: 2,\n }),\n ];\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"mappings":";;;;;AAAA;;AAIO,MAAMA,UAAU,GAAG,CAAC;EAAEC;AAAF,CAAD,KAAgC,IAAAC,WAAA,CAAI;AAC9D,mBAAmBD,KAAK,CAACE,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBH,KAAK,CAACI,aAAN,CAAoBC,YAAa;AACvD,CAHO;;;;AAMA,MAAMC,cAAc,GAAG,CAAC;EAC7BN,KAD6B;EAE7BO,QAAQ,GAAG;AAFkB,CAAD,KAI5BA,QAAQ,IAAI,CACV,IAAAN,WAAA,EAAI;EACFO,WAAW,EAAER,KAAK,CAACI,aAAN,CAAoBK,MAD/B;EAEFC,YAAY,EAAE;IAAEC,KAAK,EAAE,CAAT;IAAYC,MAAM,EAAE;EAApB,CAFZ;EAGFC,aAAa,EAAE,IAHb;EAIFC,YAAY,EAAE,CAJZ;EAKFC,SAAS,EAAE;AALT,CAAJ,CADU,CAJP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Calendar/Calendar.tsx"],"names":["now","Date","date","hours","minutes","seconds","milliseconds","dayOfWeekFromWeekStart","dayOfWeek","weekStartsOn","Calendar","TextComponent","Text","year","_year","month","_month","value","type","onChange","locale","rest","_referenceDate","React","useMemo","getFullYear","referenceDate","setReferenceDate","useState","startingWeekDay","getDay","options","weeksInMonth","Capitalized","calendar","Array","keys","map","week","weekDayIndex","days","handlePressNext","useCallback","months","handlePressPrev","index"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAMA;;;;;;AAoBA,MAAMA,GAAG,GAAG,kBAAI,IAAIC,IAAJ,EAAJ,EAAgB;AAC1BC,EAAAA,IAAI,EAAE,CADoB;AAE1BC,EAAAA,KAAK,EAAE,CAFmB;AAG1BC,EAAAA,OAAO,EAAE,CAHiB;AAI1BC,EAAAA,OAAO,EAAE,CAJiB;AAK1BC,EAAAA,YAAY,EAAE;AALY,CAAhB,CAAZ;;AAQA,SAASC,sBAAT,CAAgCC,SAAhC,EAAmDC,YAAnD,EAAyE;AACvE,SAAOD,SAAS,KAAK,CAAd,GAAkB,CAAlB,GAAsBA,SAAS,GAAGC,YAAzC;AACD;;AAED,SAASC,QAAT,CAA2C;AACzCC,EAAAA,aAAa,GAAGC,UADyB;AAEzCC,EAAAA,IAAI,EAAEC,KAFmC;AAGzCC,EAAAA,KAAK,EAAEC,MAHkC;AAIzCC,EAAAA,KAJyC;AAKzCC,EAAAA,IALyC;AAMzCC,EAAAA,QANyC;AAOzCC,EAAAA,MAPyC;AAQzC,KAAGC;AARsC,CAA3C,EASkC;AAChC,QAAMC,cAAc,GAAGC,KAAK,CAACC,OAAN,CACrB,MACEV,KAAK,IAAIE,MAAT,GACI,IAAIf,IAAJ,CAASa,KAAT,EAAgBE,MAAhB,EAAwB,CAAxB,EAA2B,CAA3B,EAA8B,CAA9B,EAAiC,CAAjC,EAAoC,CAApC,CADJ,GAEIA,MAAM,GACN,IAAIf,IAAJ,CAASD,GAAG,CAACyB,WAAJ,EAAT,EAA4BT,MAA5B,EAAoC,CAApC,EAAuC,CAAvC,EAA0C,CAA1C,EAA6C,CAA7C,EAAgD,CAAhD,CADM,GAENhB,GANe,EAOrB,C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E,IAAA,SAAS,EAAE;AALb,IADF,CAjBF,CADF,EA4BE,oBAAC,eAAD,QACE,oBAAC,oBAAD;AACE,IAAA,MAAM,EAAErB,MADV;AAEE,IAAA,QAAQ,EAAEc,QAFZ;AAGE,IAAA,WAAW,EAAED;AAHf,IADF,EAMGC,QAAQ,CAACG,GAAT,CAAa,CAACC,IAAD,EAAOO,KAAP,KACZ,oBAAC,qBAAD;AACE,IAAA,IAAI,EAAEP,IADR;AAEE,IAAA,IAAI,EAAEpB,IAFR;AAGE,IAAA,KAAK,EAAED,KAHT;AAIE,IAAA,GAAG,EAAG,QAAO4B,KAAM,EAJrB;AAKE,IAAA,QAAQ,EAAE1B,QALZ;AAME,IAAA,aAAa,EAAER,aANjB;AAOE,IAAA,aAAa,EAAEe;AAPjB,IADD,CANH,CA5BF,CADF;AAiDD;;eAEchB,Q","sourcesContent":["import { add, format, getWeeksInMonth, set } from 'date-fns';\nimport * as React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { Icon } from '../../atoms/Icon';\nimport { Text, TextProps } from '../../atoms/Text';\nimport {\n Content,\n Control,\n getCapitalizedTextComponent,\n TitleContainer,\n} from './styled';\nimport { Weekdays, MonthWeek } from './components';\n\nexport type SelectionType = 'range' | 'day';\n\nexport type DateRange = { lowest: Date; highest?: Date };\n\nexport type Value<T extends SelectionType> = T extends 'range'\n ? DateRange\n : Date;\n\nexport interface CalendarProps<T extends SelectionType> extends ViewProps {\n TextComponent?: React.FC<TextProps>;\n year?: number;\n month?: number;\n onChange?: (value?: Value<T>) => void | never;\n type?: T;\n value?: Value<T>;\n locale?: Locale;\n}\n\nconst now = set(new Date(), {\n date: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n milliseconds: 0,\n});\n\nfunction dayOfWeekFromWeekStart(dayOfWeek: number, weekStartsOn: number) {\n return dayOfWeek === 0 ? 0 : dayOfWeek - weekStartsOn;\n}\n\nfunction Calendar<T extends SelectionType>({\n TextComponent = Text,\n year: _year,\n month: _month,\n value,\n type,\n onChange,\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element {\n const _referenceDate = React.useMemo(\n () =>\n _year && _month\n ? new Date(_year, _month, 1, 0, 0, 0, 0)\n : _month\n ? new Date(now.getFullYear(), _month, 1, 0, 0, 0, 0)\n : now,\n [_year, _month]\n );\n\n const [referenceDate, setReferenceDate] = React.useState(_referenceDate);\n\n const startingWeekDay = React.useMemo(\n () =>\n dayOfWeekFromWeekStart(\n referenceDate.getDay(),\n locale?.options?.weekStartsOn ?? 0\n ),\n [referenceDate, locale]\n );\n\n const weeksInMonth = React.useMemo(\n () =>\n getWeeksInMonth(referenceDate, {\n weekStartsOn: locale?.options?.weekStartsOn ?? 0,\n }),\n [referenceDate, locale]\n );\n\n const Capitalized = React.useMemo(\n () => getCapitalizedTextComponent(TextComponent),\n [TextComponent]\n );\n\n const calendar = React.useMemo(\n () =>\n [...Array(weeksInMonth).keys()].map(week =>\n [...Array(7).keys()].map(weekDayIndex =>\n add(referenceDate, {\n days: 6 * week + week + weekDayIndex - startingWeekDay,\n })\n )\n ),\n [weeksInMonth, startingWeekDay, referenceDate]\n );\n\n const handlePressNext = React.useCallback(() => {\n setReferenceDate(add(referenceDate, { months: 1 }));\n }, [referenceDate, setReferenceDate]);\n\n const handlePressPrev = React.useCallback(() => {\n setReferenceDate(add(referenceDate, { months: -1 }));\n }, [referenceDate, setReferenceDate]);\n\n return (\n <View {...rest}>\n <TitleContainer>\n <Control onPress={handlePressPrev} align={'start'} isLeft>\n <Icon\n name={'chevron-left'}\n type={'material-community'}\n size={'kilo'}\n colorVariant={'secondary'}\n colorTone={'medium'}\n />\n </Control>\n <Capitalized\n colorVariant={'secondary'}\n colorTone={'xdark'}\n fontWeight={'bold'}\n >\n {format(referenceDate, 'MMMM yyyy', { locale })}\n </Capitalized>\n <Control onPress={handlePressNext} align={'end'} isRright>\n <Icon\n name={'chevron-right'}\n type={'material-community'}\n size={'kilo'}\n colorVariant={'secondary'}\n colorTone={'medium'}\n />\n </Control>\n </TitleContainer>\n <Content>\n <Weekdays\n locale={locale}\n calendar={calendar}\n Capitalized={Capitalized}\n />\n {calendar.map((week, index) => (\n <MonthWeek\n week={week}\n type={type}\n value={value}\n key={`week-${index}`}\n onChange={onChange}\n TextComponent={TextComponent}\n referenceDate={referenceDate}\n />\n ))}\n </Content>\n </View>\n );\n}\n\nexport default Calendar;\n"],"file":"Calendar.js"}
1
+ {"version":3,"file":"Calendar.js","names":["now","set","Date","date","hours","minutes","seconds","milliseconds","dayOfWeekFromWeekStart","dayOfWeek","weekStartsOn","Calendar","TextComponent","Text","year","_year","month","_month","value","type","onChange","locale","rest","_referenceDate","React","useMemo","getFullYear","referenceDate","setReferenceDate","useState","startingWeekDay","getDay","options","weeksInMonth","getWeeksInMonth","Capitalized","getCapitalizedTextComponent","calendar","Array","keys","map","week","weekDayIndex","add","days","handlePressNext","useCallback","months","handlePressPrev","format","index"],"sources":["../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import { add, format, getWeeksInMonth, set } from 'date-fns';\nimport * as React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { Icon } from '../../atoms/Icon';\nimport { Text, TextProps } from '../../atoms/Text';\nimport {\n Content,\n Control,\n getCapitalizedTextComponent,\n TitleContainer,\n} from './styled';\nimport { Weekdays, MonthWeek } from './components';\n\nexport type SelectionType = 'range' | 'day';\n\nexport type DateRange = { lowest: Date; highest?: Date };\n\nexport type Value<T extends SelectionType> = T extends 'range'\n ? DateRange\n : Date;\n\nexport interface CalendarProps<T extends SelectionType> extends ViewProps {\n TextComponent?: React.FC<TextProps>;\n year?: number;\n month?: number;\n onChange?: (value?: Value<T>) => void | never;\n type?: T;\n value?: Value<T>;\n locale?: Locale;\n}\n\nconst now = set(new Date(), {\n date: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n milliseconds: 0,\n});\n\nfunction dayOfWeekFromWeekStart(dayOfWeek: number, weekStartsOn: number) {\n return dayOfWeek === 0 ? 0 : dayOfWeek - weekStartsOn;\n}\n\nfunction Calendar<T extends SelectionType>({\n TextComponent = Text,\n year: _year,\n month: _month,\n value,\n type,\n onChange,\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element {\n const _referenceDate = React.useMemo(\n () =>\n _year && _month\n ? new Date(_year, _month, 1, 0, 0, 0, 0)\n : _month\n ? new Date(now.getFullYear(), _month, 1, 0, 0, 0, 0)\n : now,\n [_year, _month]\n );\n\n const [referenceDate, setReferenceDate] = React.useState(_referenceDate);\n\n const startingWeekDay = React.useMemo(\n () =>\n dayOfWeekFromWeekStart(\n referenceDate.getDay(),\n locale?.options?.weekStartsOn ?? 0\n ),\n [referenceDate, locale]\n );\n\n const weeksInMonth = React.useMemo(\n () =>\n getWeeksInMonth(referenceDate, {\n weekStartsOn: locale?.options?.weekStartsOn ?? 0,\n }),\n [referenceDate, locale]\n );\n\n const Capitalized = React.useMemo(\n () => getCapitalizedTextComponent(TextComponent),\n [TextComponent]\n );\n\n const calendar = React.useMemo(\n () =>\n [...Array(weeksInMonth).keys()].map(week =>\n [...Array(7).keys()].map(weekDayIndex =>\n add(referenceDate, {\n days: 6 * week + week + weekDayIndex - startingWeekDay,\n })\n )\n ),\n [weeksInMonth, startingWeekDay, referenceDate]\n );\n\n const handlePressNext = React.useCallback(() => {\n setReferenceDate(add(referenceDate, { months: 1 }));\n }, [referenceDate, setReferenceDate]);\n\n const handlePressPrev = React.useCallback(() => {\n setReferenceDate(add(referenceDate, { months: -1 }));\n }, [referenceDate, setReferenceDate]);\n\n return (\n <View {...rest}>\n <TitleContainer>\n <Control onPress={handlePressPrev} align={'start'} isLeft>\n <Icon\n name={'chevron-left'}\n type={'material-community'}\n size={'kilo'}\n colorVariant={'secondary'}\n colorTone={'medium'}\n />\n </Control>\n <Capitalized\n colorVariant={'secondary'}\n colorTone={'xdark'}\n fontWeight={'bold'}\n >\n {format(referenceDate, 'MMMM yyyy', { locale })}\n </Capitalized>\n <Control onPress={handlePressNext} align={'end'} isRright>\n <Icon\n name={'chevron-right'}\n type={'material-community'}\n size={'kilo'}\n colorVariant={'secondary'}\n colorTone={'medium'}\n />\n </Control>\n </TitleContainer>\n <Content>\n <Weekdays\n locale={locale}\n calendar={calendar}\n Capitalized={Capitalized}\n />\n {calendar.map((week, index) => (\n <MonthWeek\n week={week}\n type={type}\n value={value}\n key={`week-${index}`}\n onChange={onChange}\n TextComponent={TextComponent}\n referenceDate={referenceDate}\n />\n ))}\n </Content>\n </View>\n );\n}\n\nexport default Calendar;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAMA;;;;;;AAoBA,MAAMA,GAAG,GAAG,IAAAC,YAAA,EAAI,IAAIC,IAAJ,EAAJ,EAAgB;EAC1BC,IAAI,EAAE,CADoB;EAE1BC,KAAK,EAAE,CAFmB;EAG1BC,OAAO,EAAE,CAHiB;EAI1BC,OAAO,EAAE,CAJiB;EAK1BC,YAAY,EAAE;AALY,CAAhB,CAAZ;;AAQA,SAASC,sBAAT,CAAgCC,SAAhC,EAAmDC,YAAnD,EAAyE;EACvE,OAAOD,SAAS,KAAK,CAAd,GAAkB,CAAlB,GAAsBA,SAAS,GAAGC,YAAzC;AACD;;AAED,SAASC,QAAT,CAA2C;EACzCC,aAAa,GAAGC,UADyB;EAEzCC,IAAI,EAAEC,KAFmC;EAGzCC,KAAK,EAAEC,MAHkC;EAIzCC,KAJyC;EAKzCC,IALyC;EAMzCC,QANyC;EAOzCC,MAPyC;EAQzC,GAAGC;AARsC,CAA3C,EASkC;EAChC,MAAMC,cAAc,GAAGC,KAAK,CAACC,OAAN,CACrB,MACEV,KAAK,IAAIE,MAAT,GACI,IAAIf,IAAJ,CAASa,KAAT,EAAgBE,MAAhB,EAAwB,CAAxB,EAA2B,CAA3B,EAA8B,CAA9B,EAAiC,CAAjC,EAAoC,CAApC,CADJ,GAEIA,MAAM,GACN,IAAIf,IAAJ,CAASF,GAAG,CAAC0B,WAAJ,EAAT,EAA4BT,MAA5B,EAAoC,CAApC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AJhB;IAKE,SAAS,EAAE;EALb,EADF,CAjBF,CADF,EA4BE,oBAAC,eAAD,QACE,oBAAC,oBAAD;IACE,MAAM,EAAExB,MADV;IAEE,QAAQ,EAAEgB,QAFZ;IAGE,WAAW,EAAEF;EAHf,EADF,EAMGE,QAAQ,CAACG,GAAT,CAAa,CAACC,IAAD,EAAOS,KAAP,KACZ,oBAAC,qBAAD;IACE,IAAI,EAAET,IADR;IAEE,IAAI,EAAEtB,IAFR;IAGE,KAAK,EAAED,KAHT;IAIE,GAAG,EAAG,QAAOgC,KAAM,EAJrB;IAKE,QAAQ,EAAE9B,QALZ;IAME,aAAa,EAAER,aANjB;IAOE,aAAa,EAAEe;EAPjB,EADD,CANH,CA5BF,CADF;AAiDD;;eAEchB,Q"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/molecules/Calendar/components/MonthWeek.tsx"],"names":["MonthWeek","week","referenceDate","type","value","TextComponent","onChange","checkIfIsBetween","React","useCallback","date","_value","lowest","highest","checkIfIsSelected","handlePressCell","newValue","undefined","map","index","isSelected","isBetween","isRangeStart","isRangeEnd","colorTone","getMonth","getDate","memo"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAcA,MAAMA,SAAS,GAAG,CAA0B;AAC1CC,EAAAA,IAD0C;AAE1CC,EAAAA,aAF0C;AAG1CC,EAAAA,IAH0C;AAI1CC,EAAAA,KAJ0C;AAK1CC,EAAAA,aAL0C;AAM1CC,EAAAA;AAN0C,CAA1B,KAOG;AACnB,QAAMC,gBAAgB,GAAGC,eAAMC,WAAN,CACvB,CAACC,IAAD,EAAaC,MAAb,KAAmC;AACjC,QAAIR,IAAI,KAAK,OAAT,IAAoB,CAACQ,MAAzB,EAAiC,OAAO,KAAP,CAAjC,KACK;AACH,YAAM;AAAEC,QAAAA,MAAF;AAAUC,QAAAA;AAAV,UAAsBF,MAA5B;AACA,UAAI,CAACE,OAAL,EAAc,OAAO,KAAP;AACd,aAAO,yBAAQD,MAAR,EAAgBF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CAVF,CADF;AAkBD,GAvCA,CADH,CADF;AA4CD,CAxHD;;eA0HelB,eAAMmB,IAAN,CAAW3B,SAAX,C","sourcesContent":["import React from 'react';\nimport { compareAsc as compare, isSameDay } from 'date-fns';\nimport { Cell, Selected, Week } from '../styled';\nimport { Value, DateRange, SelectionType } from '../Calendar';\nimport { TextProps } from '@tecsinapse/react-core';\n\ninterface IMonthWeek<T extends SelectionType> {\n TextComponent: React.FC<TextProps>;\n /** any as workaround for TS type mismatching */\n onChange?: (value?: any) => void | never;\n type?: T;\n value?: Value<T>;\n week: Date[];\n referenceDate: Date;\n}\n\nconst MonthWeek = <T extends SelectionType>({\n week,\n referenceDate,\n type,\n value,\n TextComponent,\n onChange,\n}: IMonthWeek<T>) => {\n const checkIfIsBetween = React.useCallback(\n (date: Date, _value?: Value<T>) => {\n if (type !== 'range' || !_value) return false;\n else {\n const { lowest, highest } = _value as DateRange;\n if (!highest) return false;\n return compare(lowest, date) <= 0 && compare(highest, date) >= 0;\n }\n },\n [type]\n );\n\n const checkIfIsSelected = React.useCallback(\n (date: Date, _value?: Value<T>) => {\n if (!_value) return false;\n else if (type === 'range' && _value) {\n const { lowest, highest } = _value as DateRange;\n return (\n isSameDay(lowest, date) ||\n (highest ? isSameDay(highest, date) : false)\n );\n } else {\n return isSameDay(_value as Date, date);\n }\n },\n [type]\n );\n\n const handlePressCell = React.useCallback(\n (date: Date, _value?: Value<T>) => () => {\n if (type === 'day') {\n onChange?.(date as never);\n } else if (!_value) {\n onChange?.({ lowest: date } as never);\n } else {\n let newValue;\n const { lowest, highest } = _value as DateRange;\n\n if (!highest) {\n if (compare(date, lowest) === -1) {\n newValue = { lowest: date, highest: undefined };\n } else if (compare(date, lowest) === 0) {\n newValue = undefined;\n } else {\n newValue = { lowest: lowest, highest: date };\n }\n } else {\n if (compare(date, lowest) === -1) {\n newValue = { lowest: date, highest: undefined };\n } else if (compare(date, lowest) === 0) {\n newValue = undefined;\n } else {\n if (compare(date, highest) === -1) {\n newValue = { lowest: lowest, highest: date };\n } else if (compare(date, highest) === 0) {\n newValue = { lowest: lowest, highest: undefined };\n } else {\n newValue = { lowest: lowest, highest: date };\n }\n }\n }\n\n onChange?.(newValue as never);\n }\n },\n [onChange, type]\n );\n\n return (\n <Week>\n {week.map((date, index) => {\n const isSelected = checkIfIsSelected(date, value);\n const isBetween = checkIfIsBetween(date, value);\n\n let isRangeStart, isRangeEnd;\n\n if (type === 'range' && value) {\n const { lowest, highest } = value as DateRange;\n isRangeStart = highest && isSameDay(lowest, date);\n isRangeEnd = !!highest && isSameDay(highest, date);\n } else {\n isRangeStart = false;\n isRangeEnd = false;\n }\n\n const colorTone = isSelected\n ? 'xlight'\n : date.getMonth() === referenceDate.getMonth()\n ? 'xdark'\n : 'light';\n\n return (\n <Cell\n key={date.getDate()}\n selected={isSelected}\n highlighted={isBetween}\n isLineEnd={index === 6}\n isLineStart={index === 0}\n isRangeStart={isRangeStart}\n isRangeEnd={isRangeEnd}\n onPress={handlePressCell(date, value)}\n >\n <Selected selected={isSelected} pointerEvents={'none'}>\n <TextComponent colorVariant={'secondary'} colorTone={colorTone}>\n {date.getDate()}\n </TextComponent>\n </Selected>\n </Cell>\n );\n })}\n </Week>\n );\n};\n\nexport default React.memo(MonthWeek);\n"],"file":"MonthWeek.js"}
1
+ {"version":3,"file":"MonthWeek.js","names":["MonthWeek","week","referenceDate","type","value","TextComponent","onChange","checkIfIsBetween","React","useCallback","date","_value","lowest","highest","compare","checkIfIsSelected","isSameDay","handlePressCell","newValue","undefined","map","index","isSelected","isBetween","isRangeStart","isRangeEnd","colorTone","getMonth","getDate","memo"],"sources":["../../../../../src/components/molecules/Calendar/components/MonthWeek.tsx"],"sourcesContent":["import React from 'react';\nimport { compareAsc as compare, isSameDay } from 'date-fns';\nimport { Cell, Selected, Week } from '../styled';\nimport { Value, DateRange, SelectionType } from '../Calendar';\nimport { TextProps } from '@tecsinapse/react-core';\n\ninterface IMonthWeek<T extends SelectionType> {\n TextComponent: React.FC<TextProps>;\n /** any as workaround for TS type mismatching */\n onChange?: (value?: any) => void | never;\n type?: T;\n value?: Value<T>;\n week: Date[];\n referenceDate: Date;\n}\n\nconst MonthWeek = <T extends SelectionType>({\n week,\n referenceDate,\n type,\n value,\n TextComponent,\n onChange,\n}: IMonthWeek<T>) => {\n const checkIfIsBetween = React.useCallback(\n (date: Date, _value?: Value<T>) => {\n if (type !== 'range' || !_value) return false;\n else {\n const { lowest, highest } = _value as DateRange;\n if (!highest) return false;\n return compare(lowest, date) <= 0 && compare(highest, date) >= 0;\n }\n },\n [type]\n );\n\n const checkIfIsSelected = React.useCallback(\n (date: Date, _value?: Value<T>) => {\n if (!_value) return false;\n else if (type === 'range' && _value) {\n const { lowest, highest } = _value as DateRange;\n return (\n isSameDay(lowest, date) ||\n (highest ? isSameDay(highest, date) : false)\n );\n } else {\n return isSameDay(_value as Date, date);\n }\n },\n [type]\n );\n\n const handlePressCell = React.useCallback(\n (date: Date, _value?: Value<T>) => () => {\n if (type === 'day') {\n onChange?.(date as never);\n } else if (!_value) {\n onChange?.({ lowest: date } as never);\n } else {\n let newValue;\n const { lowest, highest } = _value as DateRange;\n\n if (!highest) {\n if (compare(date, lowest) === -1) {\n newValue = { lowest: date, highest: undefined };\n } else if (compare(date, lowest) === 0) {\n newValue = undefined;\n } else {\n newValue = { lowest: lowest, highest: date };\n }\n } else {\n if (compare(date, lowest) === -1) {\n newValue = { lowest: date, highest: undefined };\n } else if (compare(date, lowest) === 0) {\n newValue = undefined;\n } else {\n if (compare(date, highest) === -1) {\n newValue = { lowest: lowest, highest: date };\n } else if (compare(date, highest) === 0) {\n newValue = { lowest: lowest, highest: undefined };\n } else {\n newValue = { lowest: lowest, highest: date };\n }\n }\n }\n\n onChange?.(newValue as never);\n }\n },\n [onChange, type]\n );\n\n return (\n <Week>\n {week.map((date, index) => {\n const isSelected = checkIfIsSelected(date, value);\n const isBetween = checkIfIsBetween(date, value);\n\n let isRangeStart, isRangeEnd;\n\n if (type === 'range' && value) {\n const { lowest, highest } = value as DateRange;\n isRangeStart = highest && isSameDay(lowest, date);\n isRangeEnd = !!highest && isSameDay(highest, date);\n } else {\n isRangeStart = false;\n isRangeEnd = false;\n }\n\n const colorTone = isSelected\n ? 'xlight'\n : date.getMonth() === referenceDate.getMonth()\n ? 'xdark'\n : 'light';\n\n return (\n <Cell\n key={date.getDate()}\n selected={isSelected}\n highlighted={isBetween}\n isLineEnd={index === 6}\n isLineStart={index === 0}\n isRangeStart={isRangeStart}\n isRangeEnd={isRangeEnd}\n onPress={handlePressCell(date, value)}\n >\n <Selected selected={isSelected} pointerEvents={'none'}>\n <TextComponent colorVariant={'secondary'} colorTone={colorTone}>\n {date.getDate()}\n </TextComponent>\n </Selected>\n </Cell>\n );\n })}\n </Week>\n );\n};\n\nexport default React.memo(MonthWeek);\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAcA,MAAMA,SAAS,GAAG,CAA0B;EAC1CC,IAD0C;EAE1CC,aAF0C;EAG1CC,IAH0C;EAI1CC,KAJ0C;EAK1CC,aAL0C;EAM1CC;AAN0C,CAA1B,KAOG;EACnB,MAAMC,gBAAgB,GAAGC,cAAA,CAAMC,WAAN,CACvB,CAACC,IAAD,EAAaC,MAAb,KAAmC;IACjC,IAAIR,IAAI,KAAK,OAAT,IAAoB,CAACQ,MAAzB,EAAiC,OAAO,KAAP,CAAjC,KACK;MACH,MAAM;QAAEC,MAAF;QAAUC;MAAV,IAAsBF,MAA5B;MACA,IAAI,CAACE,OAAL,EAAc,OAAO,KAAP;MACd,OAAO,IAAAC,mBAAA,EAAQF,MAAR,EAAgBF,IAAhB,KAAyB,CAAzB,IAA8B,IAAAI,mBAAA,EAAQD,OAAR,EAAiBH,IAAjB,KAA0B,CAA/D;IACD;EACF,CARsB,EASvB,CAACP,IAAD,CATuB,CAAzB;;EAYA,MAAMY,iBAAiB,GAAGP,cAAA,CAAMC,WAAN,CACxB,CAACC,IAAD,EAAaC,MAAb,KAAmC;IACjC,IAAI,C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AoB,YAAY,GAAGX,OAAO,IAAI,IAAAG,kBAAA,EAAUJ,MAAV,EAAkBF,IAAlB,CAA1B;MACAe,UAAU,GAAG,CAAC,CAACZ,OAAF,IAAa,IAAAG,kBAAA,EAAUH,OAAV,EAAmBH,IAAnB,CAA1B;IACD,CAJD,MAIO;MACLc,YAAY,GAAG,KAAf;MACAC,UAAU,GAAG,KAAb;IACD;;IAED,MAAMC,SAAS,GAAGJ,UAAU,GACxB,QADwB,GAExBZ,IAAI,CAACiB,QAAL,OAAoBzB,aAAa,CAACyB,QAAd,EAApB,GACA,OADA,GAEA,OAJJ;IAMA,OACE,6BAAC,YAAD;MACE,GAAG,EAAEjB,IAAI,CAACkB,OAAL,EADP;MAEE,QAAQ,EAAEN,UAFZ;MAGE,WAAW,EAAEC,SAHf;MAIE,SAAS,EAAEF,KAAK,KAAK,CAJvB;MAKE,WAAW,EAAEA,KAAK,KAAK,CALzB;MAME,YAAY,EAAEG,YANhB;MAOE,UAAU,EAAEC,UAPd;MAQE,OAAO,EAAER,eAAe,CAACP,IAAD,EAAON,KAAP;IAR1B,GAUE,6BAAC,gBAAD;MAAU,QAAQ,EAAEkB,UAApB;MAAgC,aAAa,EAAE;IAA/C,GACE,6BAAC,aAAD;MAAe,YAAY,EAAE,WAA7B;MAA0C,SAAS,EAAEI;IAArD,GACGhB,IAAI,CAACkB,OAAL,EADH,CADF,CAVF,CADF;EAkBD,CAvCA,CADH,CADF;AA4CD,CAxHD;;eA0HepB,cAAA,CAAMqB,IAAN,CAAW7B,SAAX,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/molecules/Calendar/components/Weekdays.tsx"],"names":["Weekdays","calendar","locale","Capitalized","map","date","getDate","slice","React","memo"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAQA,MAAMA,QAAQ,GAAG,CAAC;AAAEC,EAAAA,QAAF;AAAYC,EAAAA,MAAZ;AAAoBC,EAAAA;AAApB,CAAD,KAAkD;AACjE,SACE,6BAAC,YAAD,QACGF,QAAQ,CAAC,CAAD,CAAR,CAAYG,GAAZ,CAAgBC,IAAI,IACnB,6BAAC,YAAD;AACE,IAAA,GAAG,EAAEA,IAAI,CAACC,OAAL,EADP;AAEE,IAAA,QAAQ,EAAE,KAFZ;AAGE,IAAA,WAAW,EAAE,KAHf;AAIE,IAAA,SAAS,EAAE,KAJb;AAKE,IAAA,WAAW,EAAE,KALf;AAME,IAAA,YAAY,EAAE,KANhB;AAOE,IAAA,UAAU,EAAE,KAPd;AAQE,IAAA,aAAa,EAAE;AARjB,KAUE,6BAAC,WAAD;AAAa,IAAA,YAAY,EAAE,WAA3B;AAAwC,IAAA,SAAS,EAAE;AAAnD,KACG,qBAAOD,IAAP,EAAa,KAAb,EAAoB;AAAEH,IAAAA;AAAF,GAApB,EAAgCK,KAAhC,CAAsC,CAAtC,EAAyC,CAAzC,CADH,CAVF,CADD,CADH,CADF;AAoBD,CArBD;;eAuBeC,eAAMC,IAAN,CAAWT,QAAX,C","sourcesContent":["import React from 'react';\nimport { Cell, Week } from '../styled';\nimport { format } from 'date-fns';\n\ninterface IWeekdays {\n calendar: Date[][];\n locale?: Locale;\n Capitalized: React.ElementType;\n}\n\nconst Weekdays = ({ calendar, locale, Capitalized }: IWeekdays) => {\n return (\n <Week>\n {calendar[0].map(date => (\n <Cell\n key={date.getDate()}\n selected={false}\n highlighted={false}\n isLineEnd={false}\n isLineStart={false}\n isRangeStart={false}\n isRangeEnd={false}\n pointerEvents={'none'}\n >\n <Capitalized colorVariant={'secondary'} colorTone={'medium'}>\n {format(date, 'EEE', { locale }).slice(0, 3)}\n </Capitalized>\n </Cell>\n ))}\n </Week>\n );\n};\n\nexport default React.memo(Weekdays);\n"],"file":"Weekdays.js"}
1
+ {"version":3,"file":"Weekdays.js","names":["Weekdays","calendar","locale","Capitalized","map","date","getDate","format","slice","React","memo"],"sources":["../../../../../src/components/molecules/Calendar/components/Weekdays.tsx"],"sourcesContent":["import React from 'react';\nimport { Cell, Week } from '../styled';\nimport { format } from 'date-fns';\n\ninterface IWeekdays {\n calendar: Date[][];\n locale?: Locale;\n Capitalized: React.ElementType;\n}\n\nconst Weekdays = ({ calendar, locale, Capitalized }: IWeekdays) => {\n return (\n <Week>\n {calendar[0].map(date => (\n <Cell\n key={date.getDate()}\n selected={false}\n highlighted={false}\n isLineEnd={false}\n isLineStart={false}\n isRangeStart={false}\n isRangeEnd={false}\n pointerEvents={'none'}\n >\n <Capitalized colorVariant={'secondary'} colorTone={'medium'}>\n {format(date, 'EEE', { locale }).slice(0, 3)}\n </Capitalized>\n </Cell>\n ))}\n </Week>\n );\n};\n\nexport default React.memo(Weekdays);\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAQA,MAAMA,QAAQ,GAAG,CAAC;EAAEC,QAAF;EAAYC,MAAZ;EAAoBC;AAApB,CAAD,KAAkD;EACjE,OACE,6BAAC,YAAD,QACGF,QAAQ,CAAC,CAAD,CAAR,CAAYG,GAAZ,CAAgBC,IAAI,IACnB,6BAAC,YAAD;IACE,GAAG,EAAEA,IAAI,CAACC,OAAL,EADP;IAEE,QAAQ,EAAE,KAFZ;IAGE,WAAW,EAAE,KAHf;IAIE,SAAS,EAAE,KAJb;IAKE,WAAW,EAAE,KALf;IAME,YAAY,EAAE,KANhB;IAOE,UAAU,EAAE,KAPd;IAQE,aAAa,EAAE;EARjB,GAUE,6BAAC,WAAD;IAAa,YAAY,EAAE,WAA3B;IAAwC,SAAS,EAAE;EAAnD,GACG,IAAAC,eAAA,EAAOF,IAAP,EAAa,KAAb,EAAoB;IAAEH;EAAF,CAApB,EAAgCM,KAAhC,CAAsC,CAAtC,EAAyC,CAAzC,CADH,CAVF,CADD,CADH,CADF;AAoBD,CArBD;;eAuBeC,cAAA,CAAMC,IAAN,CAAWV,QAAX,C"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.MonthWeek = exports.Weekdays = void 0;
4
+ exports.Weekdays = exports.MonthWeek = void 0;
5
5
 
6
6
  var _Weekdays = _interopRequireDefault(require("./Weekdays"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/molecules/Calendar/components/index.ts"],"names":[],"mappings":";;;;;AAAA;;;;AACA","sourcesContent":["export { default as Weekdays } from './Weekdays';\nexport { default as MonthWeek } from './MonthWeek';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/molecules/Calendar/components/index.ts"],"sourcesContent":["export { default as Weekdays } from './Weekdays';\nexport { default as MonthWeek } from './MonthWeek';\n"],"mappings":";;;;;AAAA;;;;AACA"}
@@ -1 +1 @@
1
- export { default as Calendar, CalendarProps, SelectionType, DateRange, Value } from './Calendar';
1
+ export { default as Calendar, CalendarProps, SelectionType, DateRange, Value, } from './Calendar';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.Value = exports.DateRange = exports.SelectionType = exports.CalendarProps = exports.Calendar = void 0;
4
+ exports.Value = exports.SelectionType = exports.DateRange = exports.CalendarProps = exports.Calendar = void 0;
5
5
 
6
6
  var _Calendar = _interopRequireWildcard(require("./Calendar"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Calendar/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export {\n default as Calendar,\n CalendarProps,\n SelectionType,\n DateRange,\n Value\n} from './Calendar';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Calendar/index.ts"],"sourcesContent":["export {\n default as Calendar,\n CalendarProps,\n SelectionType,\n DateRange,\n Value,\n} from './Calendar';\n"],"mappings":";;;;;AAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.Cell = exports.Selected = exports.Week = exports.Content = exports.getCapitalizedTextComponent = exports.Control = exports.TitleContainer = void 0;
4
+ exports.getCapitalizedTextComponent = exports.Week = exports.TitleContainer = exports.Selected = exports.Control = exports.Content = exports.Cell = void 0;
5
5
 
6
6
  var _native = _interopRequireWildcard(require("@emotion/native"));
7
7