@tecsinapse/react-core 1.12.2 → 1.12.6

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 (75) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/atoms/Badge/styled.d.ts +3 -2
  3. package/dist/components/atoms/Badge/styled.js +5 -3
  4. package/dist/components/atoms/Badge/styled.js.map +1 -1
  5. package/dist/components/atoms/Button/styled.js +4 -2
  6. package/dist/components/atoms/Button/styled.js.map +1 -1
  7. package/dist/components/atoms/GroupButton/styled.js +4 -2
  8. package/dist/components/atoms/GroupButton/styled.js.map +1 -1
  9. package/dist/components/atoms/Input/styled.js +3 -1
  10. package/dist/components/atoms/Input/styled.js.map +1 -1
  11. package/dist/components/atoms/ProgressBar/styled.d.ts +15 -3
  12. package/dist/components/atoms/ProgressBar/styled.js +3 -1
  13. package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
  14. package/dist/components/atoms/Switch/Switch.js +30 -22
  15. package/dist/components/atoms/Switch/Switch.js.map +1 -1
  16. package/dist/components/atoms/Switch/animation.d.ts +1 -1
  17. package/dist/components/atoms/Switch/animation.js +24 -16
  18. package/dist/components/atoms/Switch/animation.js.map +1 -1
  19. package/dist/components/atoms/Switch/styled.d.ts +16 -2
  20. package/dist/components/atoms/Switch/styled.js +11 -5
  21. package/dist/components/atoms/Switch/styled.js.map +1 -1
  22. package/dist/components/atoms/shared/PaperAndCard.js +0 -1
  23. package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
  24. package/dist/components/molecules/DatePicker/styled.d.ts +25 -4
  25. package/dist/components/molecules/DatePicker/styled.js +7 -5
  26. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  27. package/dist/components/molecules/DateTimePicker/styled.js +4 -2
  28. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  29. package/dist/components/molecules/DateTimeSelector/styled.js +3 -1
  30. package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
  31. package/dist/components/molecules/Grid/Grid.d.ts +6 -1
  32. package/dist/components/molecules/Grid/Grid.js.map +1 -1
  33. package/dist/components/molecules/Grid/Item/Item.d.ts +6 -1
  34. package/dist/components/molecules/Grid/Item/Item.js +12 -1
  35. package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
  36. package/dist/components/molecules/Snackbar/styled.js +7 -5
  37. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  38. package/dist/components/molecules/TextArea/styled.d.ts +13 -6
  39. package/dist/components/molecules/TextArea/styled.js +8 -6
  40. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  41. package/dist/styles/definitions.js +44 -41
  42. package/dist/styles/definitions.js.map +1 -1
  43. package/dist/utils/IPhoneXHelper.d.ts +4 -0
  44. package/dist/utils/IPhoneXHelper.js +38 -0
  45. package/dist/utils/IPhoneXHelper.js.map +1 -0
  46. package/dist/utils/ResponsiveFontSize.d.ts +3 -0
  47. package/dist/utils/ResponsiveFontSize.js +57 -0
  48. package/dist/utils/ResponsiveFontSize.js.map +1 -0
  49. package/dist/utils/extractNumbersFromString.js +2 -2
  50. package/dist/utils/extractNumbersFromString.js.map +1 -1
  51. package/dist/utils/index.d.ts +2 -0
  52. package/dist/utils/index.js +33 -0
  53. package/dist/utils/index.js.map +1 -1
  54. package/package.json +2 -2
  55. package/src/components/atoms/Badge/styled.ts +5 -4
  56. package/src/components/atoms/Button/styled.ts +3 -2
  57. package/src/components/atoms/GroupButton/styled.ts +3 -2
  58. package/src/components/atoms/Input/styled.ts +2 -1
  59. package/src/components/atoms/ProgressBar/styled.ts +3 -2
  60. package/src/components/atoms/Switch/Switch.tsx +29 -32
  61. package/src/components/atoms/Switch/animation.ts +26 -16
  62. package/src/components/atoms/Switch/styled.ts +10 -6
  63. package/src/components/atoms/shared/PaperAndCard.ts +0 -1
  64. package/src/components/molecules/DatePicker/styled.ts +4 -2
  65. package/src/components/molecules/DateTimePicker/styled.ts +4 -3
  66. package/src/components/molecules/DateTimeSelector/styled.ts +2 -1
  67. package/src/components/molecules/Grid/Grid.tsx +8 -1
  68. package/src/components/molecules/Grid/Item/Item.tsx +24 -2
  69. package/src/components/molecules/Snackbar/styled.ts +6 -5
  70. package/src/components/molecules/TextArea/styled.ts +6 -12
  71. package/src/styles/definitions.ts +43 -42
  72. package/src/utils/IPhoneXHelper.ts +34 -0
  73. package/src/utils/ResponsiveFontSize.ts +52 -0
  74. package/src/utils/extractNumbersFromString.ts +2 -4
  75. package/src/utils/index.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/shared/PaperAndCard.ts"],"names":["baseStyles","theme","spacing","deca","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,aAAaA,KAAK,CAACC,OAAN,CAAcC,IAAK;AAChC,mBAAmBF,KAAK,CAACG,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBJ,KAAK,CAACK,aAAN,CAAoBC,YAAa;AACvD;AACA,CALO;;;;AAQA,MAAMC,cAAc,GAAG,CAAC;AAC7BP,EAAAA,KAD6B;AAE7BQ,EAAAA,QAAQ,GAAG;AAFkB,CAAD,KAI5BA,QAAQ,IAAI,CACV,iBAAI;AACFC,EAAAA,WAAW,EAAET,KAAK,CAACK,aAAN,CAAoBK,MAD/B;AAEFC,EAAAA,YAAY,EAAE;AAAEC,IAAAA,KAAK,EAAE,CAAT;AAAYC,IAAAA,MAAM,EAAE;AAApB,GAFZ;AAGFC,EAAAA,aAAa,EAAE,GAHb;AAIFC,EAAAA,YAAY,EAAE,GAJZ;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 padding: ${theme.spacing.deca};\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.miscellaneous.surfaceColor};\n overflow: hidden;\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: 1 },\n shadowOpacity: 0.2,\n shadowRadius: 1.4,\n elevation: 2,\n }),\n ];\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"file":"PaperAndCard.js"}
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;AACA,CAJO;;;;AAOA,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,GAHb;AAIFC,EAAAA,YAAY,EAAE,GAJZ;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 overflow: hidden;\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: 1 },\n shadowOpacity: 0.2,\n shadowRadius: 1.4,\n elevation: 2,\n }),\n ];\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"file":"PaperAndCard.js"}
@@ -1,8 +1,29 @@
1
1
  import { FC } from 'react';
2
+ import { InputContainerProps } from '../../atoms/Input';
2
3
  import { TextProps } from '../../atoms/Text';
3
- export declare const Backdrop: import("@emotion/native").StyledComponent<any, {}, {}>;
4
- export declare const ModalContent: import("@emotion/native").StyledComponent<any, {}, {
4
+ export declare const Backdrop: import("@emotion/native").StyledComponent<import("../../atoms/PressableSurface").PressableSurfaceProps & {
5
+ children?: import("react").ReactNode;
6
+ } & {
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any> | undefined;
9
+ } & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
10
+ export declare const ModalContent: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ } & {
14
+ offset: number;
15
+ } & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
5
16
  ref?: import("react").Ref<import("react-native").View> | undefined;
6
17
  }>;
7
- export declare const getStyledTextComponent: (component: FC<TextProps>) => import("@emotion/native").StyledComponent<any, {}, {}>;
8
- export declare const CalendarIcon: import("@emotion/native").StyledComponent<any, {}, {}>;
18
+ export declare const getStyledTextComponent: (component: FC<TextProps>) => import("@emotion/native").StyledComponent<TextProps & {
19
+ children?: import("react").ReactNode;
20
+ } & {
21
+ theme?: import("@emotion/react").Theme | undefined;
22
+ as?: import("react").ElementType<any> | undefined;
23
+ } & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
24
+ export declare const CalendarIcon: import("@emotion/native").StyledComponent<import("../../atoms/Icon").IconProps & {
25
+ children?: import("react").ReactNode;
26
+ } & {
27
+ theme?: import("@emotion/react").Theme | undefined;
28
+ as?: import("react").ElementType<any> | undefined;
29
+ } & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
@@ -9,14 +9,16 @@ var _native = _interopRequireWildcard(require("@emotion/native"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
+ var _definitions = require("../../../styles/definitions");
13
+
14
+ var _utils = require("../../../utils");
15
+
12
16
  var _Icon = require("../../atoms/Icon");
13
17
 
14
18
  var _Input = require("../../atoms/Input");
15
19
 
16
20
  var _PressableSurface = require("../../atoms/PressableSurface");
17
21
 
18
- var _reactCore = require("@tecsinapse/react-core");
19
-
20
22
  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); }
21
23
 
22
24
  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; }
@@ -28,11 +30,11 @@ const Backdrop = (0, _native.default)(_PressableSurface.PressableSurface)`
28
30
  }) => isWeb ? (0, _native.css)`
29
31
  justify-content: center;
30
32
  align-items: center;
31
- background-color: ${(0, _reactCore.hex2rgba)(theme.miscellaneous.overlay, 0.5)};
33
+ background-color: ${(0, _definitions.hex2rgba)(theme.miscellaneous.overlay, 0.5)};
32
34
  height: 100vh;
33
35
  ` : (0, _native.css)`
34
36
  justify-content: flex-end;
35
- background-color: ${(0, _reactCore.hex2rgba)(theme.miscellaneous.overlay, 0.5)};
37
+ background-color: ${(0, _definitions.hex2rgba)(theme.miscellaneous.overlay, 0.5)};
36
38
  height: 100%;
37
39
  `}
38
40
  `;
@@ -41,7 +43,7 @@ const ModalContent = _native.default.View`
41
43
  background-color: transparent;
42
44
  padding-bottom: ${({
43
45
  offset
44
- }) => `${offset}px`};
46
+ }) => `${(0, _utils.RFValue)(offset)}px`};
45
47
  ${({
46
48
  theme: {
47
49
  borderRadius
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/DatePicker/styled.ts"],"names":["isWeb","Platform","OS","Backdrop","PressableSurface","theme","miscellaneous","overlay","ModalContent","styled","View","offset","borderRadius","micro","deca","getStyledTextComponent","component","props","typography","h5","lineHeight","CalendarIcon","Icon","spacing","centi","color","secondary","medium"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAEA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;AAEO,MAAMC,QAAQ,GAAG,qBAAOC,kCAAP,CAA8C;AACtE,IAAI,CAAC;AAAEC,EAAAA;AAAF,CAAD,KACAL,KAAK,GACD,gBAAI;AACZ;AACA;AACA,8BAA8B,yBAASK,KAAK,CAACC,aAAN,CAAoBC,OAA7B,EAAsC,GAAtC,CAA2C;AACzE;AACA,SANS,GAOD,gBAAI;AACZ;AACA,8BAA8B,yBAASF,KAAK,CAACC,aAAN,CAAoBC,OAA7B,EAAsC,GAAtC,CAA2C;AACzE;AACA,SAAU;AACV,CAdO;;AAgBA,MAAMC,YAAY,GAAGC,gBAAOC,IAEjC;AACF;AACA,oBAAoB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAiB,GAAEA,MAAO,IAAI;AAClD,IAAI,CAAC;AAAEN,EAAAA,KAAK,EAAE;AAAEO,IAAAA;AAAF;AAAT,CAAD,KAAiC,gBAAI;AACzC,MAAMZ,KAAK,GACF;AACT,uBAAuBY,YAAY,CAACC,KAAM;AAC1C,KAHW,GAIF;AACT,gCAAgCD,YAAY,CAACE,IAAK;AAClD,iCAAiCF,YAAY,CAACE,IAAK;AACnD,KAAM;AACN,GAAI;AACJ;AACA,CAhBO;;;AAkBA,MAAMC,sBAAsB,GAAIC,SAAD,IAA8B;AAClE,SAAO,qBAAOA,SAAP,EACJC,KAAD;AAAA;;AAAA,WAA+D,gBAAI;AACvE,qBADsE,gBACjDA,KAAK,CAACZ,KAD2C,iDACjD,aAAaa,UAAb,CAAwBC,EAAxB,CAA2BC,UAAW;AAC3D,QAAQ,gCAAoBH,KAApB,CAA2B;AACnC,KAHI;AAAA,GADK,CAAP;AAMD,CAPM;;;AASA,MAAMI,YAAY,GAAG,qBAAOC,UAAP,CAAkC;AAC9D,aAAa,CAAC;AAAEjB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACkB,OAAN,CAAcC,KAAM;AAChD,WAAW,CAAC;AAAEnB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACoB,KAAN,CAAYC,SAAZ,CAAsBC,MAAO;AACvD,CAHO","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { Platform } from 'react-native';\nimport { Icon } from '../../atoms/Icon';\nimport { disabledInputStyles, InputContainerProps } from '../../atoms/Input';\nimport { PressableSurface } from '../../atoms/PressableSurface';\nimport { TextProps } from '../../atoms/Text';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nconst isWeb = Platform.OS === 'web';\n\nexport const Backdrop = styled(PressableSurface)<Partial<StyleProps>>`\n ${({ theme }) =>\n isWeb\n ? css`\n justify-content: center;\n align-items: center;\n background-color: ${hex2rgba(theme.miscellaneous.overlay, 0.5)};\n height: 100vh;\n `\n : css`\n justify-content: flex-end;\n background-color: ${hex2rgba(theme.miscellaneous.overlay, 0.5)};\n height: 100%;\n `}\n`;\n\nexport const ModalContent = styled.View<\n { offset: number } & Partial<StyleProps>\n>`\n background-color: transparent;\n padding-bottom: ${({ offset }) => `${offset}px`};\n ${({ theme: { borderRadius } }) => css`\n ${isWeb\n ? `\n border-radius: ${borderRadius.micro};\n `\n : `\n border-top-left-radius: ${borderRadius.deca};\n border-top-right-radius: ${borderRadius.deca};\n `}\n `}\n overflow: hidden;\n`;\n\nexport const getStyledTextComponent = (component: FC<TextProps>) => {\n return styled(component)(\n (props: Partial<InputContainerProps> & Partial<StyleProps>) => css`\n line-height: ${props.theme?.typography.h5.lineHeight};\n ${disabledInputStyles(props)}\n `\n );\n};\n\nexport const CalendarIcon = styled(Icon)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.centi};\n color: ${({ theme }) => theme.color.secondary.medium};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"sources":["../../../../src/components/molecules/DatePicker/styled.ts"],"names":["isWeb","Platform","OS","Backdrop","PressableSurface","theme","miscellaneous","overlay","ModalContent","styled","View","offset","borderRadius","micro","deca","getStyledTextComponent","component","props","typography","h5","lineHeight","CalendarIcon","Icon","spacing","centi","color","secondary","medium"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAGA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;AAEO,MAAMC,QAAQ,GAAG,qBAAOC,kCAAP,CAA8C;AACtE,IAAI,CAAC;AAAEC,EAAAA;AAAF,CAAD,KACAL,KAAK,GACD,gBAAI;AACZ;AACA;AACA,8BAA8B,2BAASK,KAAK,CAACC,aAAN,CAAoBC,OAA7B,EAAsC,GAAtC,CAA2C;AACzE;AACA,SANS,GAOD,gBAAI;AACZ;AACA,8BAA8B,2BAASF,KAAK,CAACC,aAAN,CAAoBC,OAA7B,EAAsC,GAAtC,CAA2C;AACzE;AACA,SAAU;AACV,CAdO;;AAgBA,MAAMC,YAAY,GAAGC,gBAAOC,IAEjC;AACF;AACA,oBAAoB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAiB,GAAE,oBAAQA,MAAR,CAAgB,IAAI;AAC3D,IAAI,CAAC;AAAEN,EAAAA,KAAK,EAAE;AAAEO,IAAAA;AAAF;AAAT,CAAD,KAAiC,gBAAI;AACzC,MAAMZ,KAAK,GACF;AACT,uBAAuBY,YAAY,CAACC,KAAM;AAC1C,KAHW,GAIF;AACT,gCAAgCD,YAAY,CAACE,IAAK;AAClD,iCAAiCF,YAAY,CAACE,IAAK;AACnD,KAAM;AACN,GAAI;AACJ;AACA,CAhBO;;;AAkBA,MAAMC,sBAAsB,GAAIC,SAAD,IAA8B;AAClE,SAAO,qBAAOA,SAAP,EACJC,KAAD;AAAA;;AAAA,WAA+D,gBAAI;AACvE,qBADsE,gBACjDA,KAAK,CAACZ,KAD2C,iDACjD,aAAaa,UAAb,CAAwBC,EAAxB,CAA2BC,UAAW;AAC3D,QAAQ,gCAAoBH,KAApB,CAA2B;AACnC,KAHI;AAAA,GADK,CAAP;AAMD,CAPM;;;AASA,MAAMI,YAAY,GAAG,qBAAOC,UAAP,CAAkC;AAC9D,aAAa,CAAC;AAAEjB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACkB,OAAN,CAAcC,KAAM;AAChD,WAAW,CAAC;AAAEnB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACoB,KAAN,CAAYC,SAAZ,CAAsBC,MAAO;AACvD,CAHO","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { Platform } from 'react-native';\nimport { hex2rgba } from '../../../styles/definitions';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue } from '../../../utils';\nimport { Icon } from '../../atoms/Icon';\nimport { disabledInputStyles, InputContainerProps } from '../../atoms/Input';\nimport { PressableSurface } from '../../atoms/PressableSurface';\nimport { TextProps } from '../../atoms/Text';\n\nconst isWeb = Platform.OS === 'web';\n\nexport const Backdrop = styled(PressableSurface)<Partial<StyleProps>>`\n ${({ theme }) =>\n isWeb\n ? css`\n justify-content: center;\n align-items: center;\n background-color: ${hex2rgba(theme.miscellaneous.overlay, 0.5)};\n height: 100vh;\n `\n : css`\n justify-content: flex-end;\n background-color: ${hex2rgba(theme.miscellaneous.overlay, 0.5)};\n height: 100%;\n `}\n`;\n\nexport const ModalContent = styled.View<\n { offset: number } & Partial<StyleProps>\n>`\n background-color: transparent;\n padding-bottom: ${({ offset }) => `${RFValue(offset)}px`};\n ${({ theme: { borderRadius } }) => css`\n ${isWeb\n ? `\n border-radius: ${borderRadius.micro};\n `\n : `\n border-top-left-radius: ${borderRadius.deca};\n border-top-right-radius: ${borderRadius.deca};\n `}\n `}\n overflow: hidden;\n`;\n\nexport const getStyledTextComponent = (component: FC<TextProps>) => {\n return styled(component)(\n (props: Partial<InputContainerProps> & Partial<StyleProps>) => css`\n line-height: ${props.theme?.typography.h5.lineHeight};\n ${disabledInputStyles(props)}\n `\n );\n};\n\nexport const CalendarIcon = styled(Icon)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.centi};\n color: ${({ theme }) => theme.color.secondary.medium};\n`;\n"],"file":"styled.js"}
@@ -9,6 +9,8 @@ var _native = _interopRequireWildcard(require("@emotion/native"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
+ var _utils = require("../../../utils");
13
+
12
14
  var _PressableSurface = require("../../atoms/PressableSurface");
13
15
 
14
16
  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); }
@@ -37,14 +39,14 @@ const ModalContent = _native.default.View`
37
39
  background-color: transparent;
38
40
  padding-bottom: ${({
39
41
  offset
40
- }) => `${offset}px`};
42
+ }) => `${(0, _utils.RFValue)(offset)}px`};
41
43
  ${({
42
44
  theme: {
43
45
  borderRadius
44
46
  }
45
47
  }) => (0, _native.css)`
46
48
  ${isWeb ? `
47
- width: 375px;
49
+ width: ${(0, _utils.RFValueStr)('375px')};
48
50
  border-radius: ${borderRadius.micro};
49
51
  ` : `
50
52
  border-top-left-radius: ${borderRadius.deca};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/DateTimePicker/styled.ts"],"names":["isWeb","Platform","OS","StyledPressableSurface","PressableSurface","Backdrop","ModalContent","styled","View","offset","theme","borderRadius","micro","deca","getStyledDateTimeSelector","component","spacing"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;;;AAMA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;AAEO,MAAMC,sBAAsB,GAAG,qBACpCC,kCADoC,CAEb;AACzB;AACA,CAJO;;AAMA,MAAMC,QAAQ,GAAG,qBAAOD,kCAAP,CAA8C;AACtE,IAAIJ,KAAK,GACH,gBAAI;AACV;AACA;AACA;AACA;AACA,OANS,GAOH,gBAAI;AACV;AACA;AACA;AACA,OAAQ;AACR,CAbO;;AAeA,MAAMM,YAAY,GAAGC,gBAAOC,IAEjC;AACF;AACA,oBAAoB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAiB,GAAEA,MAAO,IAAI;AAClD,IAAI,CAAC;AAAEC,EAAAA,KAAK,EAAE;AAAEC,IAAAA;AAAF;AAAT,CAAD,KAAiC,gBAAI;AACzC,MAAMX,KAAK,GACF;AACT;AACA,uBAAuBW,YAAY,CAACC,KAAM;AAC1C,KAJW,GAKF;AACT,gCAAgCD,YAAY,CAACE,IAAK;AAClD,iCAAiCF,YAAY,CAACE,IAAK;AACnD,KAAM;AACN,GAAI;AACJ;AACA,CAjBO;;;AAmBA,MAAMC,yBAAyB,GACpCC,SADuC,IAEpC;AACH,SAAO,qBAAOA,SAAP,CAAuC;AAChD,eAAe,CAAC;AAAEL,IAAAA;AAAF,GAAD,KAAeA,KAAK,CAACM,OAAN,CAAcH,IAAK;AACjD,GAFE;AAGD,CANM","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { Platform } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport {\n PressableSurface,\n PressableSurfaceProps,\n} from '../../atoms/PressableSurface';\nimport { DateTimeSelectorProps } from '../DateTimeSelector';\n\nconst isWeb = Platform.OS === 'web';\n\nexport const StyledPressableSurface = styled(\n PressableSurface\n)<PressableSurfaceProps>`\n width: 100%;\n`;\n\nexport const Backdrop = styled(PressableSurface)<Partial<StyleProps>>`\n ${isWeb\n ? css`\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100vh;\n `\n : css`\n justify-content: flex-end;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100%;\n `}\n`;\n\nexport const ModalContent = styled.View<\n { offset: number } & Partial<StyleProps>\n>`\n background-color: transparent;\n padding-bottom: ${({ offset }) => `${offset}px`};\n ${({ theme: { borderRadius } }) => css`\n ${isWeb\n ? `\n width: 375px;\n border-radius: ${borderRadius.micro};\n `\n : `\n border-top-left-radius: ${borderRadius.deca};\n border-top-right-radius: ${borderRadius.deca};\n `}\n `}\n overflow: hidden;\n`;\n\nexport const getStyledDateTimeSelector = (\n component: FC<DateTimeSelectorProps>\n) => {\n return styled(component)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.deca};\n `;\n};\n"],"file":"styled.js"}
1
+ {"version":3,"sources":["../../../../src/components/molecules/DateTimePicker/styled.ts"],"names":["isWeb","Platform","OS","StyledPressableSurface","PressableSurface","Backdrop","ModalContent","styled","View","offset","theme","borderRadius","micro","deca","getStyledDateTimeSelector","component","spacing"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;;;;;AAMA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;AAEO,MAAMC,sBAAsB,GAAG,qBACpCC,kCADoC,CAEb;AACzB;AACA,CAJO;;AAMA,MAAMC,QAAQ,GAAG,qBAAOD,kCAAP,CAA8C;AACtE,IAAIJ,KAAK,GACH,gBAAI;AACV;AACA;AACA;AACA;AACA,OANS,GAOH,gBAAI;AACV;AACA;AACA;AACA,OAAQ;AACR,CAbO;;AAeA,MAAMM,YAAY,GAAGC,gBAAOC,IAEjC;AACF;AACA,oBAAoB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAiB,GAAE,oBAAQA,MAAR,CAAgB,IAAI;AAC3D,IAAI,CAAC;AAAEC,EAAAA,KAAK,EAAE;AAAEC,IAAAA;AAAF;AAAT,CAAD,KAAiC,gBAAI;AACzC,MAAMX,KAAK,GACF;AACT,eAAe,uBAAW,OAAX,CAAoB;AACnC,uBAAuBW,YAAY,CAACC,KAAM;AAC1C,KAJW,GAKF;AACT,gCAAgCD,YAAY,CAACE,IAAK;AAClD,iCAAiCF,YAAY,CAACE,IAAK;AACnD,KAAM;AACN,GAAI;AACJ;AACA,CAjBO;;;AAmBA,MAAMC,yBAAyB,GACpCC,SADuC,IAEpC;AACH,SAAO,qBAAOA,SAAP,CAAuC;AAChD,eAAe,CAAC;AAAEL,IAAAA;AAAF,GAAD,KAAeA,KAAK,CAACM,OAAN,CAAcH,IAAK;AACjD,GAFE;AAGD,CANM","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { Platform } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue, RFValueStr } from '../../../utils';\nimport {\n PressableSurface,\n PressableSurfaceProps\n} from '../../atoms/PressableSurface';\nimport { DateTimeSelectorProps } from '../DateTimeSelector';\n\nconst isWeb = Platform.OS === 'web';\n\nexport const StyledPressableSurface = styled(\n PressableSurface\n)<PressableSurfaceProps>`\n width: 100%;\n`;\n\nexport const Backdrop = styled(PressableSurface)<Partial<StyleProps>>`\n ${isWeb\n ? css`\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100vh;\n `\n : css`\n justify-content: flex-end;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100%;\n `}\n`;\n\nexport const ModalContent = styled.View<\n { offset: number } & Partial<StyleProps>\n>`\n background-color: transparent;\n padding-bottom: ${({ offset }) => `${RFValue(offset)}px`};\n ${({ theme: { borderRadius } }) => css`\n ${isWeb\n ? `\n width: ${RFValueStr('375px')};\n border-radius: ${borderRadius.micro};\n `\n : `\n border-top-left-radius: ${borderRadius.deca};\n border-top-right-radius: ${borderRadius.deca};\n `}\n `}\n overflow: hidden;\n`;\n\nexport const getStyledDateTimeSelector = (\n component: FC<DateTimeSelectorProps>\n) => {\n return styled(component)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.deca};\n `;\n};\n"],"file":"styled.js"}
@@ -7,6 +7,8 @@ exports.BackButton = exports.Header = exports.Control = exports.SelectorContaine
7
7
 
8
8
  var _native = _interopRequireDefault(require("@emotion/native"));
9
9
 
10
+ var _utils = require("../../../utils");
11
+
10
12
  var _PressableSurface = require("../../atoms/PressableSurface");
11
13
 
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -27,7 +29,7 @@ const Content = _native.default.View`
27
29
  `;
28
30
  exports.Content = Content;
29
31
  const SelectorRoot = _native.default.View`
30
- border-width: 1px;
32
+ border-width: ${(0, _utils.RFValueStr)('1px')};
31
33
  border-color: ${({
32
34
  theme
33
35
  }) => theme.color.secondary.xlight};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/DateTimeSelector/styled.ts"],"names":["Root","styled","View","theme","miscellaneous","surfaceColor","Content","spacing","deca","SelectorRoot","color","secondary","xlight","borderRadius","mili","SelectorValue","SelectorContainer","isFirst","isLast","Control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AAAElB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcO,IAAK;AACvD,uBAAuB,CAAC;AAAEX,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcO,IAAK;AACzD,CALO;;AAOA,MAAMQ,MAAM,GAAGrB,gBAAOC,IAAK;AAClC;AACA;AACA;AACA;AACA,CALO;;AAOA,MAAMqB,UAAU,GAAG,qBAAOH,kCAAP,CAA8C;AACxE,mBAAmB,CAAC;AAAEjB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,YAAN,CAAmBC,IAAK;AAC1D,aAAa,CAAC;AAAEX,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcc,KAAM;AAChD;AACA;AACA;AACA,CANO","sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { PressableSurface } from '../../atoms/PressableSurface';\n\nexport const Root = styled.View<Partial<StyleProps>>`\n position: relative;\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const Content = styled.View<Partial<StyleProps>>`\n flex-direction: row;\n justify-content: space-between;\n margin-vertical: ${({ theme }) => theme.spacing.deca};\n`;\n\nexport const SelectorRoot = styled.View<Partial<StyleProps>>`\n border-width: 1px;\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n`;\n\nexport const SelectorValue = styled.View`\n align-items: center;\n`;\n\nexport const SelectorContainer = styled.View<\n Partial<StyleProps> & { isFirst?: boolean; isLast?: boolean }\n>`\n margin-right: ${({ theme, isFirst }) => (isFirst ? theme.spacing.deca : 0)};\n margin-left: ${({ theme, isLast }) => (isLast ? theme.spacing.deca : 0)};\n flex: 1;\n`;\n\nexport const Control = styled(PressableSurface)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n padding: ${({ theme }) => theme.spacing.micro};\n margin-vertical: ${({ theme }) => theme.spacing.mili};\n margin-horizontal: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const Header = styled.View`\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n`;\n\nexport const BackButton = styled(PressableSurface)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n padding: ${({ theme }) => theme.spacing.micro};\n position: absolute;\n aspect-ratio: 1;\n left: 0;\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"sources":["../../../../src/components/molecules/DateTimeSelector/styled.ts"],"names":["Root","styled","View","theme","miscellaneous","surfaceColor","Content","spacing","deca","SelectorRoot","color","secondary","xlight","borderRadius","mili","SelectorValue","SelectorContainer","isFirst","isLast","Control","PressableSurface","micro","Header","BackButton"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;AAEO,MAAMA,IAAI,GAAGC,gBAAOC,IAA0B;AACrD;AACA,sBAAsB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,aAAN,CAAoBC,YAAa;AACtE,CAHO;;AAKA,MAAMC,OAAO,GAAGL,gBAAOC,IAA0B;AACxD;AACA;AACA,qBAAqB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcC,IAAK;AACvD,CAJO;;AAMA,MAAMC,YAAY,GAAGR,gBAAOC,IAA0B;AAC7D,kBAAkB,uBAAW,KAAX,CAAkB;AACpC,kBAAkB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACO,KAAN,CAAYC,SAAZ,CAAsBC,MAAO;AAC9D,mBAAmB,CAAC;AAAET,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,YAAN,CAAmBC,IAAK;AAC1D,CAJO;;AAMA,MAAMC,aAAa,GAAGd,gBAAOC,IAAK;AACzC;AACA,CAFO;;AAIA,MAAMc,iBAAiB,GAAGf,gBAAOC,IAEtC;AACF,kBAAkB,CAAC;AAAEC,EAAAA,KAAF;AAASc,EAAAA;AAAT,CAAD,KAAyBA,OAAO,GAAGd,KAAK,CAACI,OAAN,CAAcC,IAAjB,GAAwB,CAAG;AAC7E,iBAAiB,CAAC;AAAEL,EAAAA,KAAF;AAASe,EAAAA;AAAT,CAAD,KAAwBA,MAAM,GAAGf,KAAK,CAACI,OAAN,CAAcC,IAAjB,GAAwB,CAAG;AAC1E;AACA,CANO;;AAQA,MAAMW,OAAO,GAAG,qBAAOC,kCAAP,CAA8C;AACrE,mBAAmB,CAAC;AAAEjB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,YAAN,CAAmBC,IAAK;AAC1D,aAAa,CAAC;AAAEX,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcc,KAAM;AAChD,qBAAqB,CAAC;AAAElB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcO,IAAK;AACvD,uBAAuB,CAAC;AAAEX,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcO,IAAK;AACzD,CALO;;AAOA,MAAMQ,MAAM,GAAGrB,gBAAOC,IAAK;AAClC;AACA;AACA;AACA;AACA,CALO;;AAOA,MAAMqB,UAAU,GAAG,qBAAOH,kCAAP,CAA8C;AACxE,mBAAmB,CAAC;AAAEjB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,YAAN,CAAmBC,IAAK;AAC1D,aAAa,CAAC;AAAEX,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,OAAN,CAAcc,KAAM;AAChD;AACA;AACA;AACA,CANO","sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\nimport { PressableSurface } from '../../atoms/PressableSurface';\n\nexport const Root = styled.View<Partial<StyleProps>>`\n position: relative;\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const Content = styled.View<Partial<StyleProps>>`\n flex-direction: row;\n justify-content: space-between;\n margin-vertical: ${({ theme }) => theme.spacing.deca};\n`;\n\nexport const SelectorRoot = styled.View<Partial<StyleProps>>`\n border-width: ${RFValueStr('1px')};\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n`;\n\nexport const SelectorValue = styled.View`\n align-items: center;\n`;\n\nexport const SelectorContainer = styled.View<\n Partial<StyleProps> & { isFirst?: boolean; isLast?: boolean }\n>`\n margin-right: ${({ theme, isFirst }) => (isFirst ? theme.spacing.deca : 0)};\n margin-left: ${({ theme, isLast }) => (isLast ? theme.spacing.deca : 0)};\n flex: 1;\n`;\n\nexport const Control = styled(PressableSurface)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n padding: ${({ theme }) => theme.spacing.micro};\n margin-vertical: ${({ theme }) => theme.spacing.mili};\n margin-horizontal: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const Header = styled.View`\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n`;\n\nexport const BackButton = styled(PressableSurface)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n padding: ${({ theme }) => theme.spacing.micro};\n position: absolute;\n aspect-ratio: 1;\n left: 0;\n`;\n"],"file":"styled.js"}
@@ -4,7 +4,12 @@ export interface IGrid extends ViewProps {
4
4
  children: JSX.Element[];
5
5
  layout?: number[][];
6
6
  columns?: number;
7
- spacing?: SpacingType;
7
+ spacing?: SpacingType | {
8
+ top?: SpacingType;
9
+ right?: SpacingType;
10
+ bottom?: SpacingType;
11
+ left?: SpacingType;
12
+ };
8
13
  }
9
14
  declare const Grid: ({ children, columns, layout, style, spacing, ...rest }: IGrid) => JSX.Element;
10
15
  export default Grid;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Grid/Grid.tsx"],"names":["Grid","children","columns","layout","style","spacing","rest","flatLayout","flat","display","flexDirection","flexWrap","React","Children","map","child","index","cloneElement","props"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAmBA,MAAMA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DD;;eA0DeL,I","sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { GridItem } from './Item';\nimport { SpacingType } from '@tecsinapse/react-core';\n\nexport interface IGrid extends ViewProps {\n children: JSX.Element[];\n /** Layout should represent the multiplier of columns to fill the rows properly.\n * Example:\n * const layout = [\n * [6, 6], // Two elements on row\n * [4, 4, 4], // Three elements on row\n * [12], // One element on row\n * ];\n * */\n layout?: number[][];\n /** Number of grid columns to be considered (not the number of elements per row) */\n columns?: number;\n spacing?: SpacingType;\n}\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGrid) => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => (\n <GridItem\n columns={columns}\n span={flatLayout[index]}\n spacing={spacing}\n >\n {child}\n </GridItem>\n ))}\n </View>\n );\n }\n\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, child => {\n return React.cloneElement(child, {\n ...child?.props,\n columns,\n spacing: child?.props.spacing ?? spacing,\n });\n })}\n </View>\n );\n};\n\nexport default Grid;\n"],"file":"Grid.js"}
1
+ {"version":3,"sources":["../../../../src/components/molecules/Grid/Grid.tsx"],"names":["Grid","children","columns","layout","style","spacing","rest","flatLayout","flat","display","flexDirection","flexWrap","React","Children","map","child","index","cloneElement","props"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AA0BA,MAAMA,IAAI,GAAG,CAAC;AACZC,EAAAA,QADY;AAEZC,EAAAA,OAAO,GAAG,EAFE;AAGZC,EAAAA,MAHY;AAIZC,EAAAA,KAJY;AAKZC,EAAAA,OALY;AAMZ,KAAGC;AANS,CAAD,KAOA;AACX,MAAIH,MAAJ,EAAY;AACV,UAAMI,UAAU,GAAGJ,MAAM,CAACK,IAAP,EAAnB;AACA,WACE,6BAAC,iBAAD;AACE,MAAA,KAAK,EAAE,CACLJ,KADK,EAEL;AACEK,QAAAA,OAAO,EAAE,MADX;AAEEC,QAAAA,aAAa,EAAE,KAFjB;AAGEC,QAAAA,QAAQ,EAAE;AAHZ,OAFK;AADT,OASML,IATN,GAWGM,eAAMC,QAAN,CAAeC,GAAf,CAAmBb,QAAnB,EAA6B,CAACc,KAAD,EAAQC,KAAR,KAC5B,6BAAC,cAAD;AACE,MAAA,OAAO,EAAEd,OADX;AAEE,MAAA,IAAI,EAAEK,UAAU,CAACS,KAAD,CAFlB;AAGE,MAAA,OAAO,EAAEX;AAHX,OAKGU,KALH,CADD,CAXH,CADF;AAuBD;;AAED,SACE,6BAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACLX,KADK,EAEL;AACEK,MAAAA,OAAO,EAAE,MADX;AAEEC,MAAAA,aAAa,EAAE,KAFjB;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAFK;AADT,KASML,IATN,GAWGM,eAAMC,QAAN,CAAeC,GAAf,CAAmBb,QAAnB,EAA6Bc,KAAK,IAAI;AACrC,WAAOH,eAAMK,YAAN,CAAmBF,KAAnB,EAA0B,EAC/B,IAAGA,KAAH,aAAGA,KAAH,uBAAGA,KAAK,CAAEG,KAAV,CAD+B;AAE/BhB,MAAAA,OAF+B;AAG/BG,MAAAA,OAAO,EAAE,CAAAU,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEG,KAAP,CAAab,OAAb,KAAwBA;AAHF,KAA1B,CAAP;AAKD,GANA,CAXH,CADF;AAqBD,CAxDD;;eA0DeL,I","sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { GridItem } from './Item';\nimport { SpacingType } from '@tecsinapse/react-core';\n\nexport interface IGrid extends ViewProps {\n children: JSX.Element[];\n /** Layout should represent the multiplier of columns to fill the rows properly.\n * Example:\n * const layout = [\n * [6, 6], // Two elements on row\n * [4, 4, 4], // Three elements on row\n * [12], // One element on row\n * ];\n * */\n layout?: number[][];\n /** Number of grid columns to be considered (not the number of elements per row) */\n columns?: number;\n spacing?:\n | SpacingType\n | {\n top?: SpacingType;\n right?: SpacingType;\n bottom?: SpacingType;\n left?: SpacingType;\n };\n}\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGrid) => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => (\n <GridItem\n columns={columns}\n span={flatLayout[index]}\n spacing={spacing}\n >\n {child}\n </GridItem>\n ))}\n </View>\n );\n }\n\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, child => {\n return React.cloneElement(child, {\n ...child?.props,\n columns,\n spacing: child?.props.spacing ?? spacing,\n });\n })}\n </View>\n );\n};\n\nexport default Grid;\n"],"file":"Grid.js"}
@@ -18,7 +18,12 @@ export interface IGridItem {
18
18
  flexGrow?: number;
19
19
  flexShrink?: number;
20
20
  justifyContent?: FlexPositioning | FlexSpacing | 'space-evenly';
21
- spacing?: SpacingType;
21
+ spacing?: SpacingType | {
22
+ top?: SpacingType;
23
+ right?: SpacingType;
24
+ bottom?: SpacingType;
25
+ left?: SpacingType;
26
+ };
22
27
  wrapper?: boolean;
23
28
  }
24
29
  declare const GridItem: ({ children, span, columns, loadingComponent, loading, spacing: _spacing, wrapper, ...rest }: IGridItem) => JSX.Element;
@@ -35,10 +35,21 @@ const GridItem = ({
35
35
  return loadingComponent;
36
36
  }
37
37
 
38
+ const getPadding = pos => {
39
+ if (_spacing) {
40
+ if (typeof _spacing === 'string') return (0, _reactCore.extractNumbersFromString)(spacing[_spacing]);else if (typeof _spacing === 'object' && _spacing[pos]) {
41
+ return (0, _reactCore.extractNumbersFromString)(spacing[_spacing[pos]]);
42
+ } else return undefined;
43
+ } else return undefined;
44
+ };
45
+
38
46
  const style = { ...rest,
39
47
  boxSizing: 'border-box',
40
48
  flexBasis: `${100 / (columns / span)}%`,
41
- padding: _spacing ? (0, _reactCore.extractNumbersFromString)(spacing[_spacing]) : undefined
49
+ paddingTop: getPadding('top'),
50
+ paddingBottom: getPadding('bottom'),
51
+ paddingRight: getPadding('right'),
52
+ paddingLeft: getPadding('left')
42
53
  };
43
54
 
44
55
  const clone = _react.default.cloneElement(children, { ...(children === null || children === void 0 ? void 0 : children.props),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/molecules/Grid/Item/Item.tsx"],"names":["GridItem","children","span","columns","loadingComponent","loading","spacing","_spacing","wrapper","rest","React","Children","only","Error","style","boxSizing","flexBasis","padding","undefined","clone","cloneElement","props"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;;;AA+BA,MAAMA,QAAQ,GAAG,CAAC;AAChBC,EAAAA,QADgB;AAEhBC,EAAAA,IAFgB;AAGhBC,EAAAA,OAAO,GAAG,EAHM;AAIhBC,EAAAA,gBAJgB;AAKhBC,EAAAA,OAAO,GAAG,KALM;AAMhBC,EAAAA,OAAO,EAAEC,QANO;AAOhBC,EAAAA,OAAO,GAAG,KAPM;AAQhB,KAAGC;AARa,CAAD,KASA;AACf,QAAM;AAAEH,IAAAA;AAAF,MAAc,0BAApB;;AACA,MAAI,CAACI,eAAMC,QAAN,CAAeC,IAAf,CAAoBX,QAApB,CAAL,EAAoC;AAClC,UAAM,IAAIY,KAAJ,CAAU,kDAAV,CAAN;AACD;;AACD,MAAIT,gBAAgB,IAAIC,OAAxB,EAAiC;AAC/B,WAAOD,gBAAP;AACD;;AAED,QAAMU,KAAK,GAAG,EACZ,GAAGL,IADS;AAEZM,IAAAA,SAAS,EAAE,YAFC;AAGZC,IAAAA,SAAS,EAAG,GAAE,OAAOb,OAAO,GAAGD,IAAjB,CAAuB,GAHzB;AAIZe,IAAAA,OAAO,EAAEV,QAAQ,GAAG,yCAAyBD,OAAO,CAACC,QAAD,CAAhC,CAAH,GAAiDW;AAJtD,GAAd;;AAOA,QAAMC,KAAK,GAAGT,eAAMU,YAAN,CAAmBnB,QAAnB,EAA6B,EACzC,IAAGA,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEoB,KAAb,CADyC;AAEzCP,IAAAA,KAAK,EAAEN,OAAO,GACVP,QADU,aACVA,QADU,uBACVA,QAAQ,CAAEoB,KAAV,CAAgBP,KADN,GAEV,EAAE,GAAGA,KAAL;AAAY,UAAGb,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEoB,KAAV,CAAgBP,KAAnB;AAAZ;AAJqC,GAA7B,CAAd;;AAOA,SAAON,OAAO,GAAG,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEM;AAAb,KAAqBK,KAArB,CAAH,GAAwCA,KAAtD;AACD,CAjCD;;eAmCenB,Q","sourcesContent":["import React from 'react';\nimport {\n extractNumbersFromString,\n SpacingType,\n useTheme,\n} from '@tecsinapse/react-core';\nimport { View } from 'react-native';\n\ntype FlexPositioning = 'flex-start' | 'flex-end' | 'center';\ntype FlexAlignBase = FlexPositioning | 'stretch';\ntype FlexAlignType = FlexAlignBase | 'baseline';\ntype FlexSpacing = 'space-between' | 'space-around';\n\nexport interface IGridItem {\n children: React.ReactElement;\n /** Number of columns to fill */\n span: number;\n /** You don't have to give this property since is inherited from Grid */\n columns?: number;\n loading?: boolean;\n /** If your GridItem has a loading state, specify the component here (Skeleton) */\n loadingComponent?: React.ReactElement;\n /** Flex properties below */\n alignContent?: FlexAlignBase | FlexSpacing;\n alignItems?: FlexAlignType;\n alignSelf?: 'auto' | FlexAlignType;\n flex?: number;\n flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';\n flexGrow?: number;\n flexShrink?: number;\n justifyContent?: FlexPositioning | FlexSpacing | 'space-evenly';\n /** You don't have to give this property since is inherited from Grid */\n spacing?: SpacingType;\n /** Used to wrap children in a View when its style extrapolates the dimensions*/\n wrapper?: boolean;\n}\n\nconst GridItem = ({\n children,\n span,\n columns = 12,\n loadingComponent,\n loading = false,\n spacing: _spacing,\n wrapper = false,\n ...rest\n}: IGridItem) => {\n const { spacing } = useTheme();\n if (!React.Children.only(children)) {\n throw new Error('The number of children in GridItem should be one');\n }\n if (loadingComponent && loading) {\n return loadingComponent;\n }\n\n const style = {\n ...rest,\n boxSizing: 'border-box',\n flexBasis: `${100 / (columns / span)}%`,\n padding: _spacing ? extractNumbersFromString(spacing[_spacing]) : undefined,\n };\n\n const clone = React.cloneElement(children, {\n ...children?.props,\n style: wrapper\n ? children?.props.style\n : { ...style, ...children?.props.style },\n });\n\n return wrapper ? <View style={style}>{clone}</View> : clone;\n};\n\nexport default GridItem;\n"],"file":"Item.js"}
1
+ {"version":3,"sources":["../../../../../src/components/molecules/Grid/Item/Item.tsx"],"names":["GridItem","children","span","columns","loadingComponent","loading","spacing","_spacing","wrapper","rest","React","Children","only","Error","getPadding","pos","undefined","style","boxSizing","flexBasis","paddingTop","paddingBottom","paddingRight","paddingLeft","clone","cloneElement","props"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;;;AAwCA,MAAMA,QAAQ,GAAG,CAAC;AAChBC,EAAAA,QADgB;AAEhBC,EAAAA,IAFgB;AAGhBC,EAAAA,OAAO,GAAG,EAHM;AAIhBC,EAAAA,gBAJgB;AAKhBC,EAAAA,OAAO,GAAG,KALM;AAMhBC,EAAAA,OAAO,EAAEC,QANO;AAOhBC,EAAAA,OAAO,GAAG,KAPM;AAQhB,KAAGC;AARa,CAAD,KASA;AACf,QAAM;AAAEH,IAAAA;AAAF,MAAc,0BAApB;;AACA,MAAI,CAACI,eAAMC,QAAN,CAAeC,IAAf,CAAoBX,QAApB,CAAL,EAAoC;AAClC,UAAM,IAAIY,KAAJ,CAAU,kDAAV,CAAN;AACD;;AACD,MAAIT,gBAAgB,IAAIC,OAAxB,EAAiC;A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GAAwCA,KAAtD;AACD,CA9CD;;eAgDexB,Q","sourcesContent":["import React from 'react';\nimport {\n extractNumbersFromString,\n SpacingType,\n useTheme,\n} from '@tecsinapse/react-core';\nimport { View } from 'react-native';\n\ntype FlexPositioning = 'flex-start' | 'flex-end' | 'center';\ntype FlexAlignBase = FlexPositioning | 'stretch';\ntype FlexAlignType = FlexAlignBase | 'baseline';\ntype FlexSpacing = 'space-between' | 'space-around';\n\ntype PaddingPosition = 'top' | 'right' | 'bottom' | 'left';\n\nexport interface IGridItem {\n children: React.ReactElement;\n /** Number of columns to fill */\n span: number;\n /** You don't have to give this property since is inherited from Grid */\n columns?: number;\n loading?: boolean;\n /** If your GridItem has a loading state, specify the component here (Skeleton) */\n loadingComponent?: React.ReactElement;\n /** Flex properties below */\n alignContent?: FlexAlignBase | FlexSpacing;\n alignItems?: FlexAlignType;\n alignSelf?: 'auto' | FlexAlignType;\n flex?: number;\n flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';\n flexGrow?: number;\n flexShrink?: number;\n justifyContent?: FlexPositioning | FlexSpacing | 'space-evenly';\n /** You don't have to give this property since is inherited from Grid */\n spacing?:\n | SpacingType\n | {\n top?: SpacingType;\n right?: SpacingType;\n bottom?: SpacingType;\n left?: SpacingType;\n };\n /** Used to wrap children in a View when its style extrapolates the dimensions*/\n wrapper?: boolean;\n}\n\nconst GridItem = ({\n children,\n span,\n columns = 12,\n loadingComponent,\n loading = false,\n spacing: _spacing,\n wrapper = false,\n ...rest\n}: IGridItem) => {\n const { spacing } = useTheme();\n if (!React.Children.only(children)) {\n throw new Error('The number of children in GridItem should be one');\n }\n if (loadingComponent && loading) {\n return loadingComponent;\n }\n\n const getPadding = (pos: PaddingPosition) => {\n if (_spacing) {\n if (typeof _spacing === 'string')\n return extractNumbersFromString(spacing[_spacing]);\n else if (typeof _spacing === 'object' && _spacing[pos]) {\n return extractNumbersFromString(spacing[_spacing[pos]!]);\n } else return undefined;\n } else return undefined;\n };\n\n const style = {\n ...rest,\n boxSizing: 'border-box',\n flexBasis: `${100 / (columns / span)}%`,\n paddingTop: getPadding('top'),\n paddingBottom: getPadding('bottom'),\n paddingRight: getPadding('right'),\n paddingLeft: getPadding('left'),\n };\n\n const clone = React.cloneElement(children, {\n ...children?.props,\n style: wrapper\n ? children?.props.style\n : { ...style, ...children?.props.style },\n });\n\n return wrapper ? <View style={style}>{clone}</View> : clone;\n};\n\nexport default GridItem;\n"],"file":"Item.js"}
@@ -5,16 +5,18 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.TextContainer = exports.StyledContainerFlexRow = exports.StyledProgressBar = exports.DismissContainer = exports.IconContainer = exports.ContentContainer = exports.SnackbarContainer = void 0;
7
7
 
8
- var _reactNative = require("react-native");
9
-
10
8
  var _native = _interopRequireWildcard(require("@emotion/native"));
11
9
 
12
- var _ProgressBar = require("../../atoms/ProgressBar");
10
+ var _reactNative = require("react-native");
11
+
12
+ var _utils = require("../../../utils");
13
13
 
14
14
  var _Paper = require("../../atoms/Paper");
15
15
 
16
16
  var _PressableSurface = require("../../atoms/PressableSurface");
17
17
 
18
+ var _ProgressBar = require("../../atoms/ProgressBar");
19
+
18
20
  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); }
19
21
 
20
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; }
@@ -42,7 +44,7 @@ const anchorTop = ({
42
44
  anchorDistance
43
45
  }) => {
44
46
  return anchor === 'top' && (0, _native.css)`
45
- top: ${anchorDistance ? `${anchorDistance}px` : theme.spacing.deca};
47
+ top: ${anchorDistance ? `${(0, _utils.RFValue)(anchorDistance)}px` : theme.spacing.deca};
46
48
  `;
47
49
  };
48
50
 
@@ -52,7 +54,7 @@ const anchorBottom = ({
52
54
  anchorDistance
53
55
  }) => {
54
56
  return anchor === 'bottom' && (0, _native.css)`
55
- bottom: ${anchorDistance ? `${anchorDistance}px` : theme.spacing.deca};
57
+ bottom: ${anchorDistance ? `${(0, _utils.RFValue)(anchorDistance)}px` : theme.spacing.deca};
56
58
  `;
57
59
  };
58
60
 
@@ -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;;AAGA;;AACA;;AACA;;;;;;AAEA,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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AAP,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 { View } from 'react-native';\nimport styled, { css } from '@emotion/native';\nimport { SnackbarProps } from './Snackbar';\nimport { StyleProps } from '../../../types/defaults';\nimport { ProgressBar } from '../../atoms/ProgressBar';\nimport { Paper } from '../../atoms/Paper';\nimport { PressableSurface } from '../../atoms/PressableSurface';\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 ? `${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 ? `${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,"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,GAAG,MAAH,GAAY,MAAO;AACvC;AACA;AACA;AACA,CAfA;;AAiBA,MAAMM,SAAS,GAAG,CAAC;AACjBT,EAAAA,KAD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AON,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,7 +1,14 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledInputContainer: import("@emotion/native").StyledComponent<any, {}, {
3
- ref?: import("react").Ref<any> | undefined;
4
- }>;
5
- export declare const TextAreaInputBase: import("@emotion/native").StyledComponent<any, {}, {
6
- ref?: import("react").Ref<any> | undefined;
7
- }>;
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>, {}, {}>;
@@ -7,22 +7,24 @@ exports.TextAreaInputBase = exports.StyledInputContainer = void 0;
7
7
 
8
8
  var _native = _interopRequireDefault(require("@emotion/native"));
9
9
 
10
- var _reactCore = require("@tecsinapse/react-core");
10
+ var _utils = require("../../../utils");
11
+
12
+ var _Input = require("../../atoms/Input");
11
13
 
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
- const StyledInputContainer = (0, _native.default)(_reactCore.InputContainer)`
15
- min-height: 50px;
16
+ const StyledInputContainer = (0, _native.default)(_Input.InputContainer)`
17
+ min-height: ${(0, _utils.RFValueStr)('50px')};
16
18
  `;
17
19
  exports.StyledInputContainer = StyledInputContainer;
18
- const TextAreaInputBase = (0, _native.default)(_reactCore.InputElement)`
20
+ const TextAreaInputBase = (0, _native.default)(_Input.InputElement)`
19
21
  max-height: ${({
20
22
  theme,
21
23
  numberOfLines
22
- }) => `${(0, _reactCore.extractNumbersFromString)(theme.typography.h5.lineHeight) * (numberOfLines || 1)}px`};
24
+ }) => `${(0, _utils.RFValue)((0, _utils.extractNumbersFromString)(theme.typography.h5.lineHeight) * (numberOfLines || 1))}px`};
23
25
  width: 100%;
24
26
  padding: 0;
25
- margin: 3px 0;
27
+ margin: ${(0, _utils.RFValueStr)('3px')} 0;
26
28
  `;
27
29
  exports.TextAreaInputBase = TextAreaInputBase;
28
30
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/TextArea/styled.ts"],"names":["StyledInputContainer","InputContainer","TextAreaInputBase","InputElement","theme","numberOfLines","typography","h5","lineHeight"],"mappings":";;;;;;;AAAA;;AACA;;;;AAQO,MAAMA,oBAAoB,GAAG,qBAAOC,yBAAP,CAA4C;AAChF;AACA,CAFO;;AAIA,MAAMC,iBAAiB,GAAG,qBAAOC,uBAAP,CAE/B;AACF,gBAAgB,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KACX,GACC,yCAAyBD,KAAK,CAACE,UAAN,CAAiBC,EAAjB,CAAoBC,UAA7C,KACCH,aAAa,IAAI,CADlB,CAED,IAAI;AACT;AACA;AACA;AACA,CAXO","sourcesContent":["import styled from '@emotion/native';\nimport {\n extractNumbersFromString,\n InputContainer,\n InputElement,\n StyleProps,\n} from '@tecsinapse/react-core';\nimport { TextAreaProps } from './TextArea';\n\nexport const StyledInputContainer = styled(InputContainer)<Partial<StyleProps>>`\n min-height: 50px;\n`;\n\nexport const TextAreaInputBase = styled(InputElement)<\n Partial<TextAreaProps> & Partial<StyleProps>\n>`\n max-height: ${({ theme, numberOfLines }) =>\n `${\n extractNumbersFromString(theme.typography.h5.lineHeight) *\n (numberOfLines || 1)\n }px`};\n width: 100%;\n padding: 0;\n margin: 3px 0;\n`;\n"],"file":"styled.js"}
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"}
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.zIndex = exports.fontColor = exports.fontFiles = exports.fontWeight = exports.fontStack = exports.typography = exports.borderWidth = exports.borderRadius = exports.iconSize = exports.spacing = exports.miscellaneous = exports.hex2rgba = exports.statusColor = void 0;
7
+
8
+ var _utils = require("../utils");
9
+
7
10
  const statusColor = {
8
11
  error: {
9
12
  xlight: '#fdf3f2',
@@ -50,74 +53,74 @@ const miscellaneous = {
50
53
  };
51
54
  exports.miscellaneous = miscellaneous;
52
55
  const spacing = {
53
- nano: '2px',
54
- micro: '4px',
55
- mili: '8px',
56
- centi: '12px',
57
- deca: '16px',
58
- kilo: '24px',
59
- mega: '32px',
60
- giga: '40px',
61
- tera: '48px',
62
- peta: '56px',
63
- hexa: '64px'
56
+ nano: (0, _utils.RFValueStr)('2px'),
57
+ micro: (0, _utils.RFValueStr)('4px'),
58
+ mili: (0, _utils.RFValueStr)('8px'),
59
+ centi: (0, _utils.RFValueStr)('12px'),
60
+ deca: (0, _utils.RFValueStr)('16px'),
61
+ kilo: (0, _utils.RFValueStr)('24px'),
62
+ mega: (0, _utils.RFValueStr)('32px'),
63
+ giga: (0, _utils.RFValueStr)('40px'),
64
+ tera: (0, _utils.RFValueStr)('48px'),
65
+ peta: (0, _utils.RFValueStr)('56px'),
66
+ hexa: (0, _utils.RFValueStr)('64px')
64
67
  };
65
68
  exports.spacing = spacing;
66
69
  const iconSize = {
67
- micro: '12px',
68
- mili: '14px',
69
- centi: '16px',
70
- deca: '18px',
71
- kilo: '24px',
72
- mega: '32px'
70
+ micro: (0, _utils.RFValueStr)('12px'),
71
+ mili: (0, _utils.RFValueStr)('14px'),
72
+ centi: (0, _utils.RFValueStr)('16px'),
73
+ deca: (0, _utils.RFValueStr)('18px'),
74
+ kilo: (0, _utils.RFValueStr)('24px'),
75
+ mega: (0, _utils.RFValueStr)('32px')
73
76
  };
74
77
  exports.iconSize = iconSize;
75
78
  const borderRadius = {
76
- nano: '2px',
77
- micro: '4px',
78
- mili: '8px',
79
- centi: '16px',
80
- deca: '24px',
81
- pill: '999999px'
79
+ nano: (0, _utils.RFValueStr)('2px'),
80
+ micro: (0, _utils.RFValueStr)('4px'),
81
+ mili: (0, _utils.RFValueStr)('8px'),
82
+ centi: (0, _utils.RFValueStr)('16px'),
83
+ deca: (0, _utils.RFValueStr)('24px'),
84
+ pill: (0, _utils.RFValueStr)('999999px')
82
85
  };
83
86
  exports.borderRadius = borderRadius;
84
87
  const borderWidth = {
85
- pico: '1px',
86
- nano: '2px'
88
+ pico: (0, _utils.RFValueStr)('1px'),
89
+ nano: (0, _utils.RFValueStr)('2px')
87
90
  };
88
91
  exports.borderWidth = borderWidth;
89
92
  const typography = {
90
93
  h5: {
91
- fontSize: '16px',
92
- lineHeight: '24px'
94
+ fontSize: (0, _utils.RFValueStr)('16px'),
95
+ lineHeight: (0, _utils.RFValueStr)('24px')
93
96
  },
94
97
  h4: {
95
- fontSize: '18px',
96
- lineHeight: '27px'
98
+ fontSize: (0, _utils.RFValueStr)('18px'),
99
+ lineHeight: (0, _utils.RFValueStr)('27px')
97
100
  },
98
101
  h3: {
99
- fontSize: '20px',
100
- lineHeight: '32px'
102
+ fontSize: (0, _utils.RFValueStr)('20px'),
103
+ lineHeight: (0, _utils.RFValueStr)('32px')
101
104
  },
102
105
  h2: {
103
- fontSize: '26px',
104
- lineHeight: '38px'
106
+ fontSize: (0, _utils.RFValueStr)('26px'),
107
+ lineHeight: (0, _utils.RFValueStr)('38px')
105
108
  },
106
109
  h1: {
107
- fontSize: '32px',
108
- lineHeight: '42px'
110
+ fontSize: (0, _utils.RFValueStr)('32px'),
111
+ lineHeight: (0, _utils.RFValueStr)('42px')
109
112
  },
110
113
  base: {
111
- fontSize: '14px',
112
- lineHeight: '21px'
114
+ fontSize: (0, _utils.RFValueStr)('14px'),
115
+ lineHeight: (0, _utils.RFValueStr)('21px')
113
116
  },
114
117
  sub: {
115
- fontSize: '12px',
116
- lineHeight: '18px'
118
+ fontSize: (0, _utils.RFValueStr)('12px'),
119
+ lineHeight: (0, _utils.RFValueStr)('18px')
117
120
  },
118
121
  label: {
119
- fontSize: '10px',
120
- lineHeight: '12px'
122
+ fontSize: (0, _utils.RFValueStr)('10px'),
123
+ lineHeight: (0, _utils.RFValueStr)('12px')
121
124
  }
122
125
  };
123
126
  exports.typography = typography;