@tecsinapse/react-core 1.17.3 → 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 (263) hide show
  1. package/CHANGELOG.md +39 -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.d.ts +3 -0
  142. package/dist/components/molecules/Grid/functions.js +21 -0
  143. package/dist/components/molecules/Grid/functions.js.map +1 -0
  144. package/dist/components/molecules/Grid/index.d.ts +42 -2
  145. package/dist/components/molecules/Grid/index.js +4 -13
  146. package/dist/components/molecules/Grid/index.js.map +1 -1
  147. package/dist/components/molecules/HintInputContainer/HintInputContainer.js +1 -1
  148. package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  149. package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
  150. package/dist/components/molecules/HintInputContainer/styled.js.map +1 -1
  151. package/dist/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
  152. package/dist/components/molecules/IconTextButton/IconComponent.js +28 -0
  153. package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -0
  154. package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
  155. package/dist/components/molecules/IconTextButton/IconTextButton.js +4 -0
  156. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  157. package/dist/components/molecules/IconTextButton/index.d.ts +2 -0
  158. package/dist/components/molecules/IconTextButton/index.js +16 -0
  159. package/dist/components/molecules/IconTextButton/index.js.map +1 -0
  160. package/dist/components/molecules/IconTextButton/styled.d.ts +4 -0
  161. package/dist/components/molecules/{Grid/Item/index.js → IconTextButton/styled.js} +19 -5
  162. package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
  163. package/dist/components/molecules/InputPassword/InputPasswordIcon.js +1 -1
  164. package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  165. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  166. package/dist/components/molecules/InputPassword/styled.js.map +1 -1
  167. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
  168. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +4 -0
  169. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  170. package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
  171. package/dist/components/molecules/LabeledSwitch/index.js +10 -0
  172. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
  173. package/dist/components/molecules/Snackbar/Snackbar.js +1 -1
  174. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  175. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  176. package/dist/components/molecules/Snackbar/styled.js +1 -1
  177. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  178. package/dist/components/molecules/TextArea/TextArea.d.ts +1 -1
  179. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  180. package/dist/components/molecules/TextArea/index.js +1 -1
  181. package/dist/components/molecules/TextArea/index.js.map +1 -1
  182. package/dist/components/molecules/TextArea/styled.d.ts +2 -14
  183. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  184. package/dist/hooks/index.js.map +1 -1
  185. package/dist/hooks/useDebouncedState.js +1 -1
  186. package/dist/hooks/useDebouncedState.js.map +1 -1
  187. package/dist/hooks/useTheme.js.map +1 -1
  188. package/dist/index.d.ts +7 -5
  189. package/dist/index.js +58 -30
  190. package/dist/index.js.map +1 -1
  191. package/dist/styles/ThemeProvider.js.map +1 -1
  192. package/dist/styles/definitions.d.ts +2 -1
  193. package/dist/styles/definitions.js +7 -1
  194. package/dist/styles/definitions.js.map +1 -1
  195. package/dist/styles/light.js +2 -1
  196. package/dist/styles/light.js.map +1 -1
  197. package/dist/types/defaults.d.ts +8 -2
  198. package/dist/types/defaults.js.map +1 -1
  199. package/dist/utils/IPhoneXHelper.js +3 -3
  200. package/dist/utils/IPhoneXHelper.js.map +1 -1
  201. package/dist/utils/ResponsiveFontSize.js +6 -6
  202. package/dist/utils/ResponsiveFontSize.js.map +1 -1
  203. package/dist/utils/extractNumbersFromString.js +1 -1
  204. package/dist/utils/extractNumbersFromString.js.map +1 -1
  205. package/dist/utils/formatWithMask.js.map +1 -1
  206. package/dist/utils/index.d.ts +5 -4
  207. package/dist/utils/index.js +28 -19
  208. package/dist/utils/index.js.map +1 -1
  209. package/dist/utils/lightenDarkenColor.js.map +1 -1
  210. package/dist/utils/masks.js.map +1 -1
  211. package/dist/utils/variantComplement.d.ts +6 -0
  212. package/dist/utils/variantComplement.js +35 -0
  213. package/dist/utils/variantComplement.js.map +1 -0
  214. package/package.json +5 -5
  215. package/src/components/atoms/Badge/styled.ts +2 -3
  216. package/src/components/atoms/GroupButton/GroupButton.tsx +2 -5
  217. package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
  218. package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
  219. package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
  220. package/src/components/atoms/ProgressBar/ProgressBar.tsx +2 -4
  221. package/src/components/atoms/Switch/Switch.tsx +39 -19
  222. package/src/components/atoms/Switch/animation.ts +4 -6
  223. package/src/components/atoms/Switch/styled.ts +4 -6
  224. package/src/components/atoms/Tag/Tag.tsx +1 -1
  225. package/src/components/atoms/shared/PaperAndCard.ts +1 -1
  226. package/src/components/molecules/Calendar/index.ts +1 -1
  227. package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
  228. package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
  229. package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
  230. package/src/components/molecules/Grid/functions.ts +29 -0
  231. package/src/components/molecules/Grid/index.ts +66 -2
  232. package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
  233. package/src/components/molecules/IconTextButton/IconComponent.tsx +31 -0
  234. package/src/components/molecules/IconTextButton/IconTextButton.tsx +10 -0
  235. package/src/components/molecules/IconTextButton/index.ts +2 -0
  236. package/src/components/molecules/IconTextButton/styled.ts +20 -0
  237. package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +9 -0
  238. package/src/components/molecules/LabeledSwitch/index.ts +1 -0
  239. package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
  240. package/src/components/molecules/Snackbar/styled.ts +6 -2
  241. package/src/components/molecules/TextArea/TextArea.tsx +6 -2
  242. package/src/components/molecules/TextArea/styled.ts +5 -2
  243. package/src/hooks/useDebouncedState.ts +1 -1
  244. package/src/index.ts +26 -6
  245. package/src/styles/definitions.ts +8 -1
  246. package/src/styles/light.ts +2 -0
  247. package/src/types/defaults.ts +11 -1
  248. package/src/utils/IPhoneXHelper.ts +27 -22
  249. package/src/utils/ResponsiveFontSize.ts +55 -36
  250. package/src/utils/index.ts +5 -4
  251. package/src/utils/variantComplement.ts +36 -0
  252. package/dist/components/molecules/Grid/Grid.d.ts +0 -15
  253. package/dist/components/molecules/Grid/Grid.js +0 -55
  254. package/dist/components/molecules/Grid/Grid.js.map +0 -1
  255. package/dist/components/molecules/Grid/Item/Item.d.ts +0 -30
  256. package/dist/components/molecules/Grid/Item/Item.js +0 -68
  257. package/dist/components/molecules/Grid/Item/Item.js.map +0 -1
  258. package/dist/components/molecules/Grid/Item/index.d.ts +0 -1
  259. package/dist/components/molecules/Grid/Item/index.js.map +0 -1
  260. package/src/components/molecules/Grid/Grid.stories.tsx +0 -132
  261. package/src/components/molecules/Grid/Grid.tsx +0 -87
  262. package/src/components/molecules/Grid/Item/Item.tsx +0 -93
  263. package/src/components/molecules/Grid/Item/index.ts +0 -1
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _reactCore = require("@tecsinapse/react-core");
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ 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); }
13
+
14
+ const IconComponent = ({
15
+ iconProps,
16
+ size = 'default',
17
+ defaultFontColor
18
+ }) => {
19
+ return iconProps ? _react.default.createElement(_reactCore.Icon, _extends({
20
+ size: iconProps.size ?? size === 'small' ? 'deca' : 'kilo',
21
+ fontColor: iconProps.fontColor ?? defaultFontColor
22
+ }, iconProps)) : _react.default.createElement(_react.default.Fragment, null);
23
+ };
24
+
25
+ var _default = _react.default.memo(IconComponent);
26
+
27
+ exports.default = _default;
28
+ //# sourceMappingURL=IconComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconComponent.js","names":["IconComponent","iconProps","size","defaultFontColor","fontColor","React","memo"],"sources":["../../../../src/components/molecules/IconTextButton/IconComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n Icon,\n IconProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\n\ninterface IconComponentProps {\n iconProps?: IconProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n}\n\nconst IconComponent: FC<IconComponentProps> = ({\n iconProps,\n size = 'default',\n defaultFontColor,\n}) => {\n return iconProps ? (\n <Icon\n size={iconProps.size ?? size === 'small' ? 'deca' : 'kilo'}\n fontColor={iconProps.fontColor ?? defaultFontColor}\n {...iconProps}\n />\n ) : (\n <></>\n );\n};\n\nexport default React.memo(IconComponent);\n"],"mappings":";;;;;AAAA;;AAMA;;;;;;AAQA,MAAMA,aAAqC,GAAG,CAAC;EAC7CC,SAD6C;EAE7CC,IAAI,GAAG,SAFsC;EAG7CC;AAH6C,CAAD,KAIxC;EACJ,OAAOF,SAAS,GACd,6BAAC,eAAD;IACE,IAAI,EAAEA,SAAS,CAACC,IAAV,IAAkBA,IAAI,KAAK,OAA3B,GAAqC,MAArC,GAA8C,MADtD;IAEE,SAAS,EAAED,SAAS,CAACG,SAAV,IAAuBD;EAFpC,GAGMF,SAHN,EADc,GAOd,2DAPF;AASD,CAdD;;eAgBeI,cAAA,CAAMC,IAAN,CAAWN,aAAX,C"}
@@ -0,0 +1,8 @@
1
+ import { ButtonProps, IconProps, TextProps } from '@tecsinapse/react-core';
2
+ export declare type IconPositionOptions = 'left' | 'right';
3
+ export interface IconTextButtonProps extends ButtonProps {
4
+ iconProps?: IconProps;
5
+ iconPosition?: IconPositionOptions;
6
+ textProps?: TextProps;
7
+ label?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ //# sourceMappingURL=IconTextButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconTextButton.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import { ButtonProps, IconProps, TextProps } from '@tecsinapse/react-core';\n\nexport type IconPositionOptions = 'left' | 'right';\n\nexport interface IconTextButtonProps extends ButtonProps {\n iconProps?: IconProps;\n iconPosition?: IconPositionOptions;\n textProps?: TextProps;\n label?: string;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { default as IconComponent } from './IconComponent';
2
+ export { IconPositionOptions, IconTextButtonProps } from './IconTextButton';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.IconTextButtonProps = exports.IconPositionOptions = exports.IconComponent = void 0;
5
+
6
+ var _IconComponent = _interopRequireDefault(require("./IconComponent"));
7
+
8
+ exports.IconComponent = _IconComponent.default;
9
+
10
+ var _IconTextButton = require("./IconTextButton");
11
+
12
+ exports.IconPositionOptions = _IconTextButton.IconPositionOptions;
13
+ exports.IconTextButtonProps = _IconTextButton.IconTextButtonProps;
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"sourcesContent":["export { default as IconComponent } from './IconComponent';\nexport { IconPositionOptions, IconTextButtonProps } from './IconTextButton';\n"],"mappings":";;;;;AAAA;;;;AACA"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledText: import("@emotion/native").StyledComponent<any, {}, {
3
+ ref?: import("react").Ref<any> | undefined;
4
+ }>;
@@ -1,14 +1,28 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.IGridItem = exports.GridItem = void 0;
4
+ exports.StyledText = void 0;
5
5
 
6
- var _Item = _interopRequireWildcard(require("./Item"));
6
+ var _native = _interopRequireWildcard(require("@emotion/native"));
7
7
 
8
- exports.GridItem = _Item.default;
9
- exports.IGridItem = _Item.IGridItem;
8
+ var _reactCore = require("@tecsinapse/react-core");
10
9
 
11
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
11
 
13
12
  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; }
14
- //# sourceMappingURL=index.js.map
13
+
14
+ const StyledText = (0, _native.default)(_reactCore.Text)`
15
+ ${({
16
+ theme,
17
+ iconPosition,
18
+ hasIcon = false
19
+ }) => {
20
+ if (hasIcon && iconPosition === 'left') return (0, _native.css)`
21
+ margin-left: ${theme == null ? void 0 : theme.spacing.mili};
22
+ `;else if (hasIcon && iconPosition === 'right') return (0, _native.css)`
23
+ margin-right: ${theme == null ? void 0 : theme.spacing.mili};
24
+ `;
25
+ }}
26
+ `;
27
+ exports.StyledText = StyledText;
28
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.js","names":["StyledText","styled","Text","theme","iconPosition","hasIcon","css","spacing","mili"],"sources":["../../../../src/components/molecules/IconTextButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { IconPositionOptions, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledText = styled(Text)<\n Partial<StyleProps> & {\n iconPosition: IconPositionOptions;\n hasIcon?: boolean;\n }\n>`\n ${({ theme, iconPosition, hasIcon = false }) => {\n if (hasIcon && iconPosition === 'left')\n return css`\n margin-left: ${theme?.spacing.mili};\n `;\n else if (hasIcon && iconPosition === 'right')\n return css`\n margin-right: ${theme?.spacing.mili};\n `;\n }}\n`;\n"],"mappings":";;;;;AAAA;;AACA;;;;;;AAEO,MAAMA,UAAU,GAAG,IAAAC,eAAA,EAAOC,eAAP,CAKxB;AACF,IAAI,CAAC;EAAEC,KAAF;EAASC,YAAT;EAAuBC,OAAO,GAAG;AAAjC,CAAD,KAA8C;EAC9C,IAAIA,OAAO,IAAID,YAAY,KAAK,MAAhC,EACE,OAAO,IAAAE,WAAA,CAAI;AACjB,uBAAuBH,KADP,oBACOA,KAAK,CAAEI,OAAP,CAAeC,IAAK;AAC3C,OAFM,CADF,KAIK,IAAIH,OAAO,IAAID,YAAY,KAAK,OAAhC,EACH,OAAO,IAAAE,WAAA,CAAI;AACjB,wBAAwBH,KADR,oBACQA,KAAK,CAAEI,OAAP,CAAeC,IAAK;AAC5C,OAFM;AAGH,CAAC;AACJ,CAhBO"}
@@ -11,7 +11,7 @@ var _styled = require("./styled");
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 InputPasswordIcon = ({
17
17
  revealed,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/InputPassword/InputPasswordIcon.tsx"],"names":["InputPasswordIcon","revealed","onChangeState","rest","icon"],"mappings":";;;;;AAAA;;AAEA;;AACA;;;;;;AAOA,MAAMA,iBAA6C,GAAG,CAAC;AACrDC,EAAAA,QADqD;AAErDC,EAAAA,aAFqD;AAGrD,KAAGC;AAHkD,CAAD,KAIhD;AACJ,QAAMC,IAAI,GAAGH,QAAQ,GAAG,aAAH,GAAmB,iBAAxC;AACA,SACE,6BAAC,gCAAD,eACME,IADN;AAEE,IAAA,OAAO,EAAC,MAFV;AAGE,IAAA,IAAI,EAAC,OAHP;AAIE,IAAA,OAAO,EAAE,MAAMD,aAAa,CAAC,CAACD,QAAF;AAJ9B,MAME,6BAAC,UAAD;AAAM,IAAA,IAAI,EAAEG,IAAZ;AAAkB,IAAA,IAAI,EAAC,SAAvB;AAAiC,IAAA,IAAI,EAAC;AAAtC,IANF,CADF;AAUD,CAhBD;;eAkBeJ,iB","sourcesContent":["import React, { FC } from 'react';\nimport { ButtonProps } from '../../atoms/Button';\nimport { Icon } from '../../atoms/Icon';\nimport { StyledPasswordButtonIcon } from './styled';\n\ninterface InputPasswordIconProps extends ButtonProps {\n revealed: boolean;\n onChangeState: (revealed: boolean) => void;\n}\n\nconst InputPasswordIcon: FC<InputPasswordIconProps> = ({\n revealed,\n onChangeState,\n ...rest\n}) => {\n const icon = revealed ? 'eye-outline' : 'eye-off-outline';\n return (\n <StyledPasswordButtonIcon\n {...rest}\n variant=\"text\"\n size=\"small\"\n onPress={() => onChangeState(!revealed)}\n >\n <Icon name={icon} type=\"ionicon\" size=\"centi\" />\n </StyledPasswordButtonIcon>\n );\n};\n\nexport default InputPasswordIcon;\n"],"file":"InputPasswordIcon.js"}
1
+ {"version":3,"file":"InputPasswordIcon.js","names":["InputPasswordIcon","revealed","onChangeState","rest","icon"],"sources":["../../../../src/components/molecules/InputPassword/InputPasswordIcon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonProps } from '../../atoms/Button';\nimport { Icon } from '../../atoms/Icon';\nimport { StyledPasswordButtonIcon } from './styled';\n\ninterface InputPasswordIconProps extends ButtonProps {\n revealed: boolean;\n onChangeState: (revealed: boolean) => void;\n}\n\nconst InputPasswordIcon: FC<InputPasswordIconProps> = ({\n revealed,\n onChangeState,\n ...rest\n}) => {\n const icon = revealed ? 'eye-outline' : 'eye-off-outline';\n return (\n <StyledPasswordButtonIcon\n {...rest}\n variant=\"text\"\n size=\"small\"\n onPress={() => onChangeState(!revealed)}\n >\n <Icon name={icon} type=\"ionicon\" size=\"centi\" />\n </StyledPasswordButtonIcon>\n );\n};\n\nexport default InputPasswordIcon;\n"],"mappings":";;;;;AAAA;;AAEA;;AACA;;;;;;AAOA,MAAMA,iBAA6C,GAAG,CAAC;EACrDC,QADqD;EAErDC,aAFqD;EAGrD,GAAGC;AAHkD,CAAD,KAIhD;EACJ,MAAMC,IAAI,GAAGH,QAAQ,GAAG,aAAH,GAAmB,iBAAxC;EACA,OACE,6BAAC,gCAAD,eACME,IADN;IAEE,OAAO,EAAC,MAFV;IAGE,IAAI,EAAC,OAHP;IAIE,OAAO,EAAE,MAAMD,aAAa,CAAC,CAACD,QAAF;EAJ9B,IAME,6BAAC,UAAD;IAAM,IAAI,EAAEG,IAAZ;IAAkB,IAAI,EAAC,SAAvB;IAAiC,IAAI,EAAC;EAAtC,EANF,CADF;AAUD,CAhBD;;eAkBeJ,iB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/InputPassword/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as InputPasswordIcon } from './InputPasswordIcon';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/InputPassword/index.ts"],"sourcesContent":["export { default as InputPasswordIcon } from './InputPasswordIcon';\n"],"mappings":";;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/InputPassword/styled.ts"],"names":["StyledPasswordButtonIcon","Button","theme","spacing","centi"],"mappings":";;;;;AAAA;;AAEA;;;;AAEO,MAAMA,wBAAwB,GAAG,qBAAOC,cAAP,CAAoC;AAC5E,aAAa,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,KAAM;AAChD,CAFO","sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Button } from '../../atoms/Button';\n\nexport const StyledPasswordButtonIcon = styled(Button)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.centi};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledPasswordButtonIcon","styled","Button","theme","spacing","centi"],"sources":["../../../../src/components/molecules/InputPassword/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Button } from '../../atoms/Button';\n\nexport const StyledPasswordButtonIcon = styled(Button)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.centi};\n`;\n"],"mappings":";;;;;AAAA;;AAEA;;;;AAEO,MAAMA,wBAAwB,GAAG,IAAAC,eAAA,EAAOC,cAAP,CAAoC;AAC5E,aAAa,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,KAAM;AAChD,CAFO"}
@@ -0,0 +1,7 @@
1
+ import { SwitchProps } from '../../atoms/Switch';
2
+ export declare type LabelPositionOptions = 'left' | 'right';
3
+ export interface LabeledSwitchProps extends SwitchProps {
4
+ label: string;
5
+ labelPosition?: LabelPositionOptions;
6
+ pressableLabel?: boolean;
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ //# sourceMappingURL=LabeledSwitch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LabeledSwitch.js","names":[],"sources":["../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { SwitchProps } from '../../atoms/Switch';\n\nexport type LabelPositionOptions = 'left' | 'right';\n\nexport interface LabeledSwitchProps extends SwitchProps {\n label: string;\n labelPosition?: LabelPositionOptions;\n pressableLabel?: boolean;\n}\n"],"mappings":""}
@@ -0,0 +1 @@
1
+ export { LabeledSwitchProps, LabelPositionOptions } from './LabeledSwitch';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.LabeledSwitchProps = exports.LabelPositionOptions = void 0;
5
+
6
+ var _LabeledSwitch = require("./LabeledSwitch");
7
+
8
+ exports.LabeledSwitchProps = _LabeledSwitch.LabeledSwitchProps;
9
+ exports.LabelPositionOptions = _LabeledSwitch.LabelPositionOptions;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/LabeledSwitch/index.ts"],"sourcesContent":["export { LabeledSwitchProps, LabelPositionOptions } from './LabeledSwitch';\n"],"mappings":";;;;;AAAA"}
@@ -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 Snackbar = ({
19
19
  children,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"names":["Snackbar","children","open","onClose","dismissable","timeout","undefined","leftIcon","colorTone","colorVariant","rightIcon","anchor","anchorDistance","style","fadeAnim","React","useRef","Animated","Value","current","duration","fadeIn","timing","toValue","useNativeDriver","start","fadeOut","delay","useEffect","setTimeout","opacity","setValue","direction"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AA6BO,MAAMA,QAAiC,GAAG,CAAC;AAChDC,EAAAA,QADgD;AAEhDC,EAAAA,IAAI,GAAG,IAFyC;AAGhDC,EAAAA,OAHgD;AAIhDC,EAAAA,WAAW,GAAG,KAJkC;AAKhDC,EAAAA,OAAO,GAAGC,SALsC;AAMhDC,EAAAA,QANgD;AAOhDC,EAAAA,SAAS,GAAG,QAPoC;AAQhDC,EAA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ourcesContent":["import React from 'react';\nimport { Animated, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon, IconProps } from '../../atoms/Icon';\nimport {\n ContentContainer,\n DismissContainer,\n IconContainer,\n SnackbarContainer,\n StyledContainerFlexRow,\n StyledProgressBar,\n TextContainer,\n} from './styled';\n\nexport interface SnackbarProps {\n colorVariant?: ColorType;\n colorTone?: ColorGradationType;\n open: boolean;\n /** Close callback */\n onClose?: () => void;\n /** Snackbar is closable */\n dismissable?: boolean;\n /** Time in miliseconds for auto hide */\n timeout?: number;\n leftIcon?: IconProps;\n /** Properties for close icon */\n rightIcon?: Omit<IconProps, 'name' | 'type'>;\n anchor?: 'top' | 'bottom';\n /** Distance from anchorage (results in px) */\n anchorDistance?: number;\n style?: StyleProp<ViewStyle>;\n}\n\nexport const Snackbar: React.FC<SnackbarProps> = ({\n children,\n open = true,\n onClose,\n dismissable = false,\n timeout = undefined,\n leftIcon,\n colorTone = 'xlight',\n colorVariant = 'primary',\n rightIcon = { colorTone: 'medium', colorVariant: 'primary' },\n anchor = 'bottom',\n anchorDistance,\n style,\n}) => {\n const fadeAnim = React.useRef(new Animated.Value(0)).current;\n const duration = 500;\n\n const fadeIn = () => {\n Animated.timing(fadeAnim, {\n toValue: 1,\n useNativeDriver: true,\n duration,\n }).start(() => timeout && fadeOut());\n };\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n useNativeDriver: true,\n duration,\n delay: timeout ? timeout - duration : 0,\n }).start();\n };\n\n React.useEffect(() => {\n if (open) {\n fadeIn();\n }\n if (open && timeout) {\n setTimeout(() => {\n onClose?.();\n }, timeout + duration);\n }\n }, [open, timeout]);\n\n return (\n <SnackbarContainer\n colorVariant={colorVariant}\n colorTone={colorTone}\n elevated\n anchor={anchor}\n anchorDistance={anchorDistance}\n visible={open}\n style={[{ opacity: (fadeAnim as unknown) as number }, style]}\n timeout={timeout}\n >\n <StyledContainerFlexRow>\n <ContentContainer>\n {leftIcon && (\n <IconContainer>\n <Icon {...leftIcon} size=\"centi\" />\n </IconContainer>\n )}\n <TextContainer>{children}</TextContainer>\n </ContentContainer>\n {dismissable && (\n <DismissContainer\n effect=\"none\"\n onPress={() => {\n fadeOut();\n setTimeout(() => {\n fadeAnim.setValue(0);\n onClose?.();\n }, duration);\n }}\n >\n <Icon\n {...rightIcon}\n size=\"centi\"\n name=\"close\"\n type=\"material-community\"\n />\n </DismissContainer>\n )}\n </StyledContainerFlexRow>\n {timeout && open && (\n <StyledProgressBar\n valueNow={0}\n valueMax={100}\n valueMin={0}\n animate={true}\n color={colorVariant}\n colorTone=\"medium\"\n animationParameters={{ direction: 'left', duration: timeout }}\n />\n )}\n </SnackbarContainer>\n );\n};\n\nexport default Snackbar;\n"],"file":"Snackbar.js"}
1
+ {"version":3,"file":"Snackbar.js","names":["Snackbar","children","open","onClose","dismissable","timeout","undefined","leftIcon","colorTone","colorVariant","rightIcon","anchor","anchorDistance","style","fadeAnim","React","useRef","Animated","Value","current","duration","fadeIn","timing","toValue","useNativeDriver","start","fadeOut","delay","useEffect","setTimeout","opacity","setValue","direction"],"sources":["../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon, IconProps } from '../../atoms/Icon';\nimport {\n ContentContainer,\n DismissContainer,\n IconContainer,\n SnackbarContainer,\n StyledContainerFlexRow,\n StyledProgressBar,\n TextContainer,\n} from './styled';\n\nexport interface SnackbarProps {\n colorVariant?: ColorType;\n colorTone?: ColorGradationType;\n open: boolean;\n /** Close callback */\n onClose?: () => void;\n /** Snackbar is closable */\n dismissable?: boolean;\n /** Time in miliseconds for auto hide */\n timeout?: number;\n leftIcon?: IconProps;\n /** Properties for close icon */\n rightIcon?: Omit<IconProps, 'name' | 'type'>;\n anchor?: 'top' | 'bottom';\n /** Distance from anchorage (results in px) */\n anchorDistance?: number;\n style?: StyleProp<ViewStyle>;\n}\n\nexport const Snackbar: React.FC<SnackbarProps> = ({\n children,\n open = true,\n onClose,\n dismissable = false,\n timeout = undefined,\n leftIcon,\n colorTone = 'xlight',\n colorVariant = 'primary',\n rightIcon = { colorTone: 'medium', colorVariant: 'primary' },\n anchor = 'bottom',\n anchorDistance,\n style,\n}) => {\n const fadeAnim = React.useRef(new Animated.Value(0)).current;\n const duration = 500;\n\n const fadeIn = () => {\n Animated.timing(fadeAnim, {\n toValue: 1,\n useNativeDriver: true,\n duration,\n }).start(() => timeout && fadeOut());\n };\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n useNativeDriver: true,\n duration,\n delay: timeout ? timeout - duration : 0,\n }).start();\n };\n\n React.useEffect(() => {\n if (open) {\n fadeIn();\n }\n if (open && timeout) {\n setTimeout(() => {\n onClose?.();\n }, timeout + duration);\n }\n }, [open, timeout]);\n\n return (\n <SnackbarContainer\n colorVariant={colorVariant}\n colorTone={colorTone}\n elevated\n anchor={anchor}\n anchorDistance={anchorDistance}\n visible={open}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n timeout={timeout}\n >\n <StyledContainerFlexRow>\n <ContentContainer>\n {leftIcon && (\n <IconContainer>\n <Icon {...leftIcon} size=\"centi\" />\n </IconContainer>\n )}\n <TextContainer>{children}</TextContainer>\n </ContentContainer>\n {dismissable && (\n <DismissContainer\n effect=\"none\"\n onPress={() => {\n fadeOut();\n setTimeout(() => {\n fadeAnim.setValue(0);\n onClose?.();\n }, duration);\n }}\n >\n <Icon\n {...rightIcon}\n size=\"centi\"\n name=\"close\"\n type=\"material-community\"\n />\n </DismissContainer>\n )}\n </StyledContainerFlexRow>\n {timeout && open && (\n <StyledProgressBar\n valueNow={0}\n valueMax={100}\n valueMin={0}\n animate={true}\n color={colorVariant}\n colorTone=\"medium\"\n animationParameters={{ direction: 'left', duration: timeout }}\n />\n )}\n </SnackbarContainer>\n );\n};\n\nexport default Snackb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version":3,"sources":["../../../../src/components/molecules/Snackbar/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Snackbar, SnackbarProps } from './Snackbar';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Snackbar/index.ts"],"sourcesContent":["export { default as Snackbar, SnackbarProps } from './Snackbar';\n"],"mappings":";;;;;AAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.TextContainer = exports.StyledContainerFlexRow = exports.StyledProgressBar = exports.DismissContainer = exports.IconContainer = exports.ContentContainer = exports.SnackbarContainer = void 0;
4
+ exports.TextContainer = exports.StyledProgressBar = exports.StyledContainerFlexRow = exports.SnackbarContainer = exports.IconContainer = exports.DismissContainer = exports.ContentContainer = void 0;
5
5
 
6
6
  var _native = _interopRequireWildcard(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Snackbar/styled.ts"],"names":["baseStyles","theme","colorTone","colorVariant","visible","borderRadius","mili","color","zIndex","modal","anchorTop","anchor","anchorDistance","spacing","deca","anchorBottom","SnackbarContainer","Paper","props","ContentContainer","View","IconContainer","DismissContainer","PressableSurface","StyledProgressBar","ProgressBar","StyledContainerFlexRow","TextContainer"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAGA,MAAMA,UAAU,GAAG,CAAC;AAClBC,EAAAA,KADkB;AAElBC,EAAAA,SAAS,GAAG,QAFM;AAGlBC,EAAAA,YAAY,GAAG,SAHG;AAIlBC,EAAAA;AAJkB,CAAD,KAK+C,gBAAI;AACtE;AACA,mBAAmBH,KAAK,CAACI,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBL,KAAK,CAACM,KAAN,CAAYJ,YAAZ,EAA0BD,SAA1B,CAAqC;AAC3D;AACA,aAAaD,KAAK,CAACO,MAAN,CAAaC,KAAM;AAChC,aAAaL,OAAO,GAA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MkB,iBAAiB,GAAG,qBAAOC,wBAAP,CAAyC;AAC1E;AACA;AACA,CAHO;;AAKA,MAAMC,sBAAsB,GAAG,qBAAON,iBAAP,CAAkC;AACxE;AACA;AACA;AACA,aAAa,CAAC;AAAEnB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,OAAN,CAAcP,IAAK;AAC/C,CALO;;AAOA,MAAMqB,aAAa,GAAG,qBAAOP,iBAAP,CAAa;AAC1C;AACA;AACA,CAHO","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue } from '../../../utils';\nimport { Paper } from '../../atoms/Paper';\nimport { PressableSurface } from '../../atoms/PressableSurface';\nimport { ProgressBar } from '../../atoms/ProgressBar';\nimport { SnackbarProps } from './Snackbar';\n\nconst baseStyles = ({\n theme,\n colorTone = 'xlight',\n colorVariant = 'primary',\n visible,\n}: StyleProps & Partial<SnackbarProps> & { visible: boolean }) => css`\n padding: 0;\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.color[colorVariant][colorTone]};\n position: absolute;\n z-index: ${theme.zIndex.modal};\n display: ${visible ? 'flex' : 'none'};\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n`;\n\nconst anchorTop = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'top' &&\n css`\n top: ${anchorDistance ? `${RFValue(anchorDistance)}px` : theme.spacing.deca};\n `\n );\n};\n\nconst anchorBottom = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'bottom' &&\n css`\n bottom: ${anchorDistance ? `${RFValue(anchorDistance)}px` : theme.spacing.deca};\n `\n );\n};\n\nexport const SnackbarContainer = styled(Paper)<\n Partial<SnackbarProps & StyleProps> & { visible: boolean }\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n `\n);\n\nexport const ContentContainer = styled(View)`\n flex-direction: row;\n display: flex;\n align-items: center;\n flex-shrink: 1;\n`;\n\nexport const IconContainer = styled(View)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const DismissContainer = styled(PressableSurface)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-left: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledProgressBar = styled(ProgressBar)<Partial<StyleProps>>`\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n`;\n\nexport const StyledContainerFlexRow = styled(View)<Partial<StyleProps>>`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const TextContainer = styled(View)`\n display: flex;\n flex-shrink: 1;\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["baseStyles","theme","colorTone","colorVariant","visible","css","borderRadius","mili","color","zIndex","modal","anchorTop","anchor","anchorDistance","RFValue","spacing","deca","anchorBottom","SnackbarContainer","styled","Paper","props","ContentContainer","View","IconContainer","DismissContainer","PressableSurface","StyledProgressBar","ProgressBar","StyledContainerFlexRow","TextContainer"],"sources":["../../../../src/components/molecules/Snackbar/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue } from '../../../utils';\nimport { Paper } from '../../atoms/Paper';\nimport { PressableSurface } from '../../atoms/PressableSurface';\nimport { ProgressBar } from '../../atoms/ProgressBar';\nimport { SnackbarProps } from './Snackbar';\n\nconst baseStyles = ({\n theme,\n colorTone = 'xlight',\n colorVariant = 'primary',\n visible,\n}: StyleProps & Partial<SnackbarProps> & { visible: boolean }) => css`\n padding: 0;\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.color[colorVariant][colorTone]};\n position: absolute;\n z-index: ${theme.zIndex.modal};\n display: ${visible ? 'flex' : 'none'};\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n`;\n\nconst anchorTop = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'top' &&\n css`\n top: ${anchorDistance\n ? `${RFValue(anchorDistance)}px`\n : theme.spacing.deca};\n `\n );\n};\n\nconst anchorBottom = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'bottom' &&\n css`\n bottom: ${anchorDistance\n ? `${RFValue(anchorDistance)}px`\n : theme.spacing.deca};\n `\n );\n};\n\nexport const SnackbarContainer = styled(Paper)<\n Partial<SnackbarProps & StyleProps> & { visible: boolean }\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n `\n);\n\nexport const ContentContainer = styled(View)`\n flex-direction: row;\n display: flex;\n align-items: center;\n flex-shrink: 1;\n`;\n\nexport const IconContainer = styled(View)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const DismissContainer = styled(PressableSurface)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-left: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledProgressBar = styled(ProgressBar)<Partial<StyleProps>>`\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n`;\n\nexport const StyledContainerFlexRow = styled(View)<Partial<StyleProps>>`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const TextContainer = styled(View)`\n display: flex;\n flex-shrink: 1;\n`;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAGA,MAAMA,UAAU,GAAG,CAAC;EAClBC,KADkB;EAElBC,SAAS,GAAG,QAFM;EAGlBC,YAAY,GAAG,SAHG;EAIlBC;AAJkB,CAAD,KAK+C,IA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A,kBAAkB,CAAC;EAAEtB;AAAF,CAAD,KAAeA,KAAK,CAACc,OAAN,CAAcR,IAAK;AACpD,CALO;;AAOA,MAAMkB,gBAAgB,GAAG,IAAAN,eAAA,EAAOO,kCAAP,CAA8C;AAC9E;AACA;AACA;AACA,iBAAiB,CAAC;EAAEzB;AAAF,CAAD,KAAeA,KAAK,CAACc,OAAN,CAAcR,IAAK;AACnD,CALO;;AAOA,MAAMoB,iBAAiB,GAAG,IAAAR,eAAA,EAAOS,wBAAP,CAAyC;AAC1E;AACA;AACA,CAHO;;AAKA,MAAMC,sBAAsB,GAAG,IAAAV,eAAA,EAAOI,iBAAP,CAAkC;AACxE;AACA;AACA;AACA,aAAa,CAAC;EAAEtB;AAAF,CAAD,KAAeA,KAAK,CAACc,OAAN,CAAcR,IAAK;AAC/C,CALO;;AAOA,MAAMuB,aAAa,GAAG,IAAAX,eAAA,EAAOI,iBAAP,CAAa;AAC1C;AACA;AACA,CAHO"}
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { FontStackType, FontWeightType } from '../../../types/defaults';
2
+ import { FontStackType, FontWeightType } from '@tecsinapse/react-core';
3
3
  import { InputContainerProps, InputElementProps } from '../../atoms/Input';
4
4
  import { TextProps } from '../../atoms/Text';
5
5
  export interface TextAreaProps extends Omit<InputElementProps, 'style' | 'multiline' | 'value'>, InputContainerProps {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/TextArea/TextArea.tsx"],"names":["TextArea","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","TextComponent","Text","focused","children","maxLength","_maxLenght","value","_value","length","_hint","textAlign"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;AAcA,MAAMA,QAA2B,GAAG,CAAC;AACnCC,EAAAA,KADmC;AAEnCC,EAAAA,UAFmC;AAGnCC,EAAAA,iBAHmC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IAAA,WAAW,EAAEG,WAXf;AAYE,IAAA,oBAAoB,EAAEC,oBAZxB;AAaE,IAAA,mBAAmB,EAAEC,mBAbvB;AAcE,IAAA,OAAO,EAAEM,OAdX;AAeE,IAAA,QAAQ,EAAEV,QAfZ;AAgBE,IAAA,OAAO,EAAEK;AAhBX,KAkBGM,QAlBH,EAmBGC,SAAS,IACR,6BAAC,aAAD;AACE,IAAA,YAAY,EAAE,WADhB;AAEE,IAAA,SAAS,EAAE,QAFb;AAGE,IAAA,UAAU,EAAE,OAHd;AAIE,IAAA,SAAS,EAAE,SAJb;AAKE,IAAA,UAAU,EAAE,MALd;AAME,IAAA,KAAK,EAAE;AAAEM,MAAAA,SAAS,EAAE;AAAb;AANT,KAQI,GAAEF,MAAO,IAAGJ,SAAU,EAR1B,CApBJ,CADF,EAiCGL,IAAI,IAAIU,KAjCX,CADF;AAqCD,CAvED;;eAyEe3B,Q","sourcesContent":["import React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { FontStackType, FontWeightType } from '../../../types/defaults';\nimport { Hint, InputContainerProps, InputElementProps } from '../../atoms/Input';\nimport { Text, TextProps } from '../../atoms/Text';\nimport { StyledInputContainer } from './styled';\n\nexport interface TextAreaProps\n extends Omit<InputElementProps, 'style' | 'multiline' | 'value'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n maxCharCount?: number;\n value: string;\n // Omit below\n TextComponent?: FC<TextProps>;\n focused?: boolean;\n}\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n TextComponent = Text,\n focused,\n children,\n maxLength: _maxLenght,\n value: _value,\n}) => {\n let length = _value.length;\n const maxLength = _maxLenght;\n if (maxLength && length > maxLength) {\n length = maxLength;\n }\n\n const _hint = hintComponent || (\n <Hint TextComponent={TextComponent} text={hint} variant={variant} />\n );\n\n return (\n <View style={style}>\n <StyledInputContainer\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={TextComponent}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n {children}\n {maxLength && (\n <TextComponent\n colorVariant={'secondary'}\n colorTone={'medium'}\n typography={'label'}\n fontStack={'default'}\n fontWeight={'bold'}\n style={{ textAlign: 'right' }}\n >\n {`${length}/${maxLength}`}\n </TextComponent>\n )}\n </StyledInputContainer>\n {hint && _hint}\n </View>\n );\n};\n\nexport default TextArea;\n"],"file":"TextArea.js"}
1
+ {"version":3,"file":"TextArea.js","names":["TextArea","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","TextComponent","Text","focused","children","maxLength","_maxLenght","value","_value","length","_hint","textAlign"],"sources":["../../../../src/components/molecules/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { FontStackType, FontWeightType } from '@tecsinapse/react-core';\nimport {\n Hint,\n InputContainerProps,\n InputElementProps,\n} from '../../atoms/Input';\nimport { Text, TextProps } from '../../atoms/Text';\nimport { StyledInputContainer } from './styled';\n\nexport interface TextAreaProps\n extends Omit<InputElementProps, 'style' | 'multiline' | 'value'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n maxCharCount?: number;\n value: string;\n // Omit below\n TextComponent?: FC<TextProps>;\n focused?: boolean;\n}\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n TextComponent = Text,\n focused,\n children,\n maxLength: _maxLenght,\n value: _value,\n}) => {\n let length = _value.length;\n const maxLength = _maxLenght;\n if (maxLength && length > maxLength) {\n length = maxLength;\n }\n\n const _hint = hintComponent || (\n <Hint TextComponent={TextComponent} text={hint} variant={variant} />\n );\n\n return (\n <View style={style}>\n <StyledInputContainer\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={TextComponent}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n {children}\n {maxLength && (\n <TextComponent\n colorVariant={'secondary'}\n colorTone={'medium'}\n typography={'label'}\n fontStack={'default'}\n fontWeight={'bold'}\n style={{ textAlign: 'right' }}\n >\n {`${length}/${maxLength}`}\n </TextComponent>\n )}\n </StyledInputContainer>\n {hint && _hint}\n </View>\n );\n};\n\nexport default TextArea;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;;;;AAcA,MAAMA,QAA2B,GAAG,CAAC;EACnCC,KADmC;EAEnCC,UAFmC;EAGnCC,iBAHmC;EAInCC,cAJmC;EAKnCC,eALmC;EAMnCC,UANmC;EAOnCC,WAPmC;EAQnCC,aARmC;EASnCC,cATmC;EAUnCC,QAVmC;EAWnCC,KAXmC;EAYnCC,WAZmC;EAanCC,oBAbmC;EAcnCC,mBAdmC;EAenCC,OAAO,GAAG,SAfyB;EAgBnCC,aAhBmC;EAiBnCC,IAjBmC;EAkBnCC,aAAa,GAAGC,UAlBmB;EAmBnCC,OAnBmC;EAoBnCC,QApBmC;EAqBnC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3
  exports.__esModule = true;
4
- exports.TextAreaInputBase = exports.TextAreaProps = exports.TextArea = void 0;
4
+ exports.TextAreaProps = exports.TextAreaInputBase = exports.TextArea = void 0;
5
5
 
6
6
  var _TextArea = _interopRequireWildcard(require("./TextArea"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/TextArea/index.ts"],"names":[],"mappings":";;;;;AAAA;;;;;AACA","sourcesContent":["export { default as TextArea, TextAreaProps } from './TextArea';\nexport { TextAreaInputBase } from './styled';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/TextArea/index.ts"],"sourcesContent":["export { default as TextArea, TextAreaProps } from './TextArea';\nexport { TextAreaInputBase } from './styled';\n"],"mappings":";;;;;AAAA;;;;;AACA"}
@@ -1,14 +1,2 @@
1
- /// <reference types="react" />
2
- import { TextAreaProps } from './TextArea';
3
- export declare const StyledInputContainer: import("@emotion/native").StyledComponent<import("../../atoms/Input").InputContainerProps & Partial<import("../../atoms/Input").InputElementProps> & {
4
- children?: import("react").ReactNode;
5
- } & {
6
- theme?: import("@emotion/react").Theme | undefined;
7
- as?: import("react").ElementType<any> | undefined;
8
- } & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
9
- export declare const TextAreaInputBase: import("@emotion/native").StyledComponent<import("../../atoms/Input").InputElementProps & {
10
- children?: import("react").ReactNode;
11
- } & {
12
- theme?: import("@emotion/react").Theme | undefined;
13
- as?: import("react").ElementType<any> | undefined;
14
- } & Partial<TextAreaProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
1
+ export declare const StyledInputContainer: import("@emotion/native").StyledComponent<any, {}, {}>;
2
+ export declare const TextAreaInputBase: import("@emotion/native").StyledComponent<any, {}, {}>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/TextArea/styled.ts"],"names":["StyledInputContainer","InputContainer","TextAreaInputBase","InputElement","theme","numberOfLines","typography","h5","lineHeight"],"mappings":";;;;;AAAA;;AAEA;;AACA;;;;AAGO,MAAMA,oBAAoB,GAAG,qBAAOC,qBAAP,CAA4C;AAChF,gBAAgB,uBAAW,MAAX,CAAmB;AACnC,CAFO;;AAIA,MAAMC,iBAAiB,GAAG,qBAAOC,mBAAP,CAE/B;AACF,gBAAgB,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KACX,GAAE,oBAAQ,qCAAyBD,KAAK,CAACE,UAAN,CAAiBC,EAAjB,CAAoBC,UAA7C,KAA4DH,aAAa,IAAI,CAA7E,CAAR,CAAyF,IAAI;AACpG;AACA;AACA,YAAY,uBAAW,KAAX,CAAkB;AAC9B,CARO","sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { extractNumbersFromString, RFValue, RFValueStr } from '../../../utils';\nimport { InputContainer, InputElement } from '../../atoms/Input';\nimport { TextAreaProps } from './TextArea';\n\nexport const StyledInputContainer = styled(InputContainer)<Partial<StyleProps>>`\n min-height: ${RFValueStr('50px')};\n`;\n\nexport const TextAreaInputBase = styled(InputElement)<\n Partial<TextAreaProps> & Partial<StyleProps>\n>`\n max-height: ${({ theme, numberOfLines }) =>\n `${RFValue(extractNumbersFromString(theme.typography.h5.lineHeight) * (numberOfLines || 1))}px`};\n width: 100%;\n padding: 0;\n margin: ${RFValueStr('3px')} 0;\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledInputContainer","styled","InputContainer","RFValueStr","TextAreaInputBase","InputElement","theme","numberOfLines","RFValue","extractNumbersFromString","typography","h5","lineHeight"],"sources":["../../../../src/components/molecules/TextArea/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { extractNumbersFromString, RFValue, RFValueStr } from '../../../utils';\nimport { InputContainer, InputElement } from '../../atoms/Input';\nimport { TextAreaProps } from './TextArea';\n\nexport const StyledInputContainer = styled(InputContainer)<Partial<StyleProps>>`\n min-height: ${RFValueStr('50px')};\n`;\n\nexport const TextAreaInputBase = styled(InputElement)<\n Partial<TextAreaProps> & Partial<StyleProps>\n>`\n max-height: ${({ theme, numberOfLines }) =>\n `${RFValue(\n extractNumbersFromString(theme.typography.h5.lineHeight) *\n (numberOfLines || 1)\n )}px`};\n width: 100%;\n padding: 0;\n margin: ${RFValueStr('3px')} 0;\n`;\n"],"mappings":";;;;;AAAA;;AAEA;;AACA;;;;AAGO,MAAMA,oBAAoB,GAAG,IAAAC,eAAA,EAAOC,qBAAP,CAA4C;AAChF,gBAAgB,IAAAC,iBAAA,EAAW,MAAX,CAAmB;AACnC,CAFO;;AAIA,MAAMC,iBAAiB,GAAG,IAAAH,eAAA,EAAOI,mBAAP,CAE/B;AACF,gBAAgB,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KACX,GAAE,IAAAC,cAAA,EACD,IAAAC,+BAAA,EAAyBH,KAAK,CAACI,UAAN,CAAiBC,EAAjB,CAAoBC,UAA7C,KACGL,aAAa,IAAI,CADpB,CADC,CAGD,IAAI;AACV;AACA;AACA,YAAY,IAAAJ,iBAAA,EAAW,KAAX,CAAkB;AAC9B,CAXO"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;;;AAAA;;;;AACA","sourcesContent":["export { useDebouncedState } from './useDebouncedState';\nexport { useTheme } from './useTheme';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/hooks/index.ts"],"sourcesContent":["export { useDebouncedState } from './useDebouncedState';\nexport { useTheme } from './useTheme';\n"],"mappings":";;;;;AAAA;;;;AACA"}
@@ -11,7 +11,7 @@ function useDebouncedState(initialState, timeoutCallback, timeoutMs = 166) {
11
11
  (0, _react.useEffect)(() => {
12
12
  if (timeoutId.current) clearTimeout(timeoutId.current);
13
13
  if (timeoutCallback) timeoutId.current = setTimeout(() => timeoutCallback(state), timeoutMs);
14
- }, [state, timeoutCallback]);
14
+ }, [state]);
15
15
  return [state, setState];
16
16
  }
17
17
  //# sourceMappingURL=useDebouncedState.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useDebouncedState.ts"],"names":["useDebouncedState","initialState","timeoutCallback","timeoutMs","timeoutId","state","setState","current","clearTimeout","setTimeout"],"mappings":";;;;;AAAA;;AAOO,SAASA,iBAAT,CACLC,YADK,EAELC,eAFK,EAGLC,SAAS,GAAG,GAHP,EAI6B;AAClC,QAAMC,SAAS,GAAG,oBAAlB;AAEA,QAAM,CAACC,KAAD,EAAQC,QAAR,IAAoB,qBAAYL,YAAZ,CAA1B;AAEA,wBAAU,MAAM;AACd,QAAIG,SAAS,CAACG,OAAd,EAAuBC,YAAY,CAACJ,SAAS,CAACG,OAAX,CAAZ;AACvB,QAAIL,eAAJ,EACEE,SAAS,CAACG,OAAV,GAAoBE,UAAU,CAAC,MAAMP,eAAe,CAACG,KAAD,CAAtB,EAA+BF,SAA/B,CAA9B;AACH,GAJD,EAIG,CAACE,KAAD,EAAQH,eAAR,CAJH;AAMA,SAAO,CAACG,KAAD,EAAQC,QAAR,CAAP;AACD","sourcesContent":["import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';\n\n/**\n * @param initialState\n * @param timeoutCallback callback to be called after bouncing ends. Should be memoized.\n * @param timeoutMs\n */\nexport function useDebouncedState<S>(\n initialState: S | (() => S),\n timeoutCallback?: (state: S) => void,\n timeoutMs = 166\n): [S, Dispatch<SetStateAction<S>>] {\n const timeoutId = useRef<number>();\n\n const [state, setState] = useState<S>(initialState);\n\n useEffect(() => {\n if (timeoutId.current) clearTimeout(timeoutId.current);\n if (timeoutCallback)\n timeoutId.current = setTimeout(() => timeoutCallback(state), timeoutMs);\n }, [state, timeoutCallback]);\n\n return [state, setState];\n}\n"],"file":"useDebouncedState.js"}
1
+ {"version":3,"file":"useDebouncedState.js","names":["useDebouncedState","initialState","timeoutCallback","timeoutMs","timeoutId","useRef","state","setState","useState","useEffect","current","clearTimeout","setTimeout"],"sources":["../../src/hooks/useDebouncedState.ts"],"sourcesContent":["import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';\n\n/**\n * @param initialState\n * @param timeoutCallback callback to be called after bouncing ends. Should be memoized.\n * @param timeoutMs\n */\nexport function useDebouncedState<S>(\n initialState: S | (() => S),\n timeoutCallback?: (state: S) => void,\n timeoutMs = 166\n): [S, Dispatch<SetStateAction<S>>] {\n const timeoutId = useRef<number>();\n\n const [state, setState] = useState<S>(initialState);\n\n useEffect(() => {\n if (timeoutId.current) clearTimeout(timeoutId.current);\n if (timeoutCallback)\n timeoutId.current = setTimeout(() => timeoutCallback(state), timeoutMs);\n }, [state]);\n\n return [state, setState];\n}\n"],"mappings":";;;;;AAAA;;AAOO,SAASA,iBAAT,CACLC,YADK,EAELC,eAFK,EAGLC,SAAS,GAAG,GAHP,EAI6B;EAClC,MAAMC,SAAS,GAAG,IAAAC,aAAA,GAAlB;EAEA,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoB,IAAAC,eAAA,EAAYP,YAAZ,CAA1B;EAEA,IAAAQ,gBAAA,EAAU,MAAM;IACd,IAAIL,SAAS,CAACM,OAAd,EAAuBC,YAAY,CAACP,SAAS,CAACM,OAAX,CAAZ;IACvB,IAAIR,eAAJ,EACEE,SAAS,CAACM,OAAV,GAAoBE,UAAU,CAAC,MAAMV,eAAe,CAACI,KAAD,CAAtB,EAA+BH,SAA/B,CAA9B;EACH,CAJD,EAIG,CAACG,KAAD,CAJH;EAMA,OAAO,CAACA,KAAD,EAAQC,QAAR,CAAP;AACD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useTheme.ts"],"names":["useTheme"],"mappings":";;;;;AAAA;;AAGO,MAAMA,QAAQ,GAAG,MAAiB,sBAAlC","sourcesContent":["import { useTheme as useEmotionTheme } from '@emotion/react';\nimport { ThemeProp } from '../types/defaults';\n\nexport const useTheme = (): ThemeProp => useEmotionTheme() as ThemeProp;\n"],"file":"useTheme.js"}
1
+ {"version":3,"file":"useTheme.js","names":["useTheme","useEmotionTheme"],"sources":["../../src/hooks/useTheme.ts"],"sourcesContent":["import { useTheme as useEmotionTheme } from '@emotion/react';\nimport { ThemeProp } from '../types/defaults';\n\nexport const useTheme = (): ThemeProp => useEmotionTheme() as ThemeProp;\n"],"mappings":";;;;;AAAA;;AAGO,MAAMA,QAAQ,GAAG,MAAiB,IAAAC,eAAA,GAAlC"}
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { Checkbox, CheckboxProps } from './components/atoms/Checkbox';
9
9
  export { Divider, DividerProps } from './components/atoms/Divider';
10
10
  export { GroupButton, GroupButtonOption, GroupButtonOptionProps, GroupButtonProps, GroupButtonValue, } from './components/atoms/GroupButton';
11
11
  export { Icon, IconProps } from './components/atoms/Icon';
12
- export { Hint, InputContainer, InputContainerProps, InputElement, InputElementProps, InputMaskElement, InputMaskElementProps, InputVariantType, PressableInputContainer, PressableInputContainerProps, StyledBorderKeeper, useInputFocus, useNumberMask, useStringMask, disabledInputStyles, } from './components/atoms/Input';
12
+ export { disabledInputStyles, Hint, InputContainer, InputContainerProps, InputElement, InputElementProps, InputMaskElement, InputMaskElementProps, InputVariantType, PressableInputContainer, PressableInputContainerProps, StyledBorderKeeper, useInputFocus, useNumberMask, useStringMask, } from './components/atoms/Input';
13
13
  export { Paper, PaperProps } from './components/atoms/Paper';
14
14
  export { PressableSurface, PressableSurfaceProps, } from './components/atoms/PressableSurface';
15
15
  export { ProgressBar, ProgressBarProps } from './components/atoms/ProgressBar';
@@ -21,14 +21,16 @@ export { Calendar, CalendarProps, DateRange, SelectionType, Value, } from './com
21
21
  export { DatePicker, DatePickerProps } from './components/molecules/DatePicker';
22
22
  export { DateTimePicker, DateTimePickerProps, } from './components/molecules/DateTimePicker';
23
23
  export { DateTimeSelector, DateTimeSelectorMode, DateTimeSelectorProps, } from './components/molecules/DateTimeSelector';
24
+ export { GridSpacing, IGridItem, getGridItemPadding, getGridItemColumSpan, IGrid, FlexAlignBase, FlexAlignType, FlexPositioning, FlexSpacing, PaddingPosition, } from './components/molecules/Grid';
25
+ export { HintInputContainer, HintInputContainerProps, } from './components/molecules/HintInputContainer';
26
+ export { IconComponent, IconPositionOptions, IconTextButtonProps, } from './components/molecules/IconTextButton';
24
27
  export { InputPasswordIcon } from './components/molecules/InputPassword';
28
+ export { LabeledSwitchProps, LabelPositionOptions, } from './components/molecules/LabeledSwitch';
25
29
  export { Snackbar, SnackbarProps } from './components/molecules/Snackbar';
26
- export { HintInputContainer, HintInputContainerProps, } from './components/molecules/HintInputContainer';
27
- export { TextArea, TextAreaProps, TextAreaInputBase, } from './components/molecules/TextArea';
28
- export { GridItem, Grid, IGridItem, IGrid } from './components/molecules/Grid';
30
+ export { TextArea, TextAreaInputBase, TextAreaProps, } from './components/molecules/TextArea';
31
+ export * from './hooks';
29
32
  export * from './styles/definitions';
30
33
  export * from './styles/light';
31
34
  export { default as ThemeProvider } from './styles/ThemeProvider';
32
35
  export * from './types/defaults';
33
36
  export * from './utils';
34
- export * from './hooks';