@tecsinapse/react-core 1.12.4 → 1.12.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) 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 +3 -4
  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/Snackbar/styled.js +7 -5
  32. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  33. package/dist/components/molecules/TextArea/styled.d.ts +13 -6
  34. package/dist/components/molecules/TextArea/styled.js +8 -6
  35. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  36. package/dist/styles/definitions.js +45 -42
  37. package/dist/styles/definitions.js.map +1 -1
  38. package/dist/utils/IPhoneXHelper.d.ts +4 -0
  39. package/dist/utils/IPhoneXHelper.js +38 -0
  40. package/dist/utils/IPhoneXHelper.js.map +1 -0
  41. package/dist/utils/ResponsiveFontSize.d.ts +3 -0
  42. package/dist/utils/ResponsiveFontSize.js +57 -0
  43. package/dist/utils/ResponsiveFontSize.js.map +1 -0
  44. package/dist/utils/extractNumbersFromString.js +1 -1
  45. package/dist/utils/extractNumbersFromString.js.map +1 -1
  46. package/dist/utils/index.d.ts +2 -0
  47. package/dist/utils/index.js +33 -0
  48. package/dist/utils/index.js.map +1 -1
  49. package/package.json +2 -2
  50. package/src/components/atoms/Badge/styled.ts +5 -4
  51. package/src/components/atoms/Button/styled.ts +3 -2
  52. package/src/components/atoms/GroupButton/styled.ts +3 -2
  53. package/src/components/atoms/Input/styled.ts +2 -1
  54. package/src/components/atoms/ProgressBar/styled.ts +3 -2
  55. package/src/components/atoms/Switch/Switch.tsx +29 -32
  56. package/src/components/atoms/Switch/animation.ts +26 -16
  57. package/src/components/atoms/Switch/styled.ts +10 -6
  58. package/src/components/atoms/shared/PaperAndCard.ts +4 -5
  59. package/src/components/molecules/DatePicker/styled.ts +4 -2
  60. package/src/components/molecules/DateTimePicker/styled.ts +4 -3
  61. package/src/components/molecules/DateTimeSelector/styled.ts +2 -1
  62. package/src/components/molecules/Snackbar/styled.ts +6 -5
  63. package/src/components/molecules/TextArea/styled.ts +6 -12
  64. package/src/styles/definitions.ts +44 -43
  65. package/src/utils/IPhoneXHelper.ts +34 -0
  66. package/src/utils/ResponsiveFontSize.ts +52 -0
  67. package/src/utils/extractNumbersFromString.ts +1 -4
  68. package/src/utils/index.ts +2 -0
@@ -12,7 +12,6 @@ const baseStyles = ({
12
12
  }) => (0, _native.css)`
13
13
  border-radius: ${theme.borderRadius.mili};
14
14
  background-color: ${theme.miscellaneous.surfaceColor};
15
- overflow: hidden;
16
15
  `;
17
16
 
18
17
  exports.baseStyles = baseStyles;
@@ -24,10 +23,10 @@ const elevatedStyles = ({
24
23
  shadowColor: theme.miscellaneous.shadow,
25
24
  shadowOffset: {
26
25
  width: 0,
27
- height: 1
26
+ height: 2
28
27
  },
29
- shadowOpacity: 0.2,
30
- shadowRadius: 1.4,
28
+ shadowOpacity: 0.05,
29
+ shadowRadius: 5,
31
30
  elevation: 2
32
31
  })];
33
32
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/shared/PaperAndCard.ts"],"names":["baseStyles","theme","borderRadius","mili","miscellaneous","surfaceColor","elevatedStyles","elevated","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"mappings":";;;;;;;AAAA;;AAIO,MAAMA,UAAU,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAgC,gBAAI;AAC9D,mBAAmBA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBF,KAAK,CAACG,aAAN,CAAoBC,YAAa;AACvD;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
+ {"version":3,"sources":["../../../../src/components/atoms/shared/PaperAndCard.ts"],"names":["baseStyles","theme","borderRadius","mili","miscellaneous","surfaceColor","elevatedStyles","elevated","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"mappings":";;;;;;;AAAA;;AAIO,MAAMA,UAAU,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAgC,gBAAI;AAC9D,mBAAmBA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBF,KAAK,CAACG,aAAN,CAAoBC,YAAa;AACvD,CAHO;;;;AAMA,MAAMC,cAAc,GAAG,CAAC;AAC7BL,EAAAA,KAD6B;AAE7BM,EAAAA,QAAQ,GAAG;AAFkB,CAAD,KAI5BA,QAAQ,IAAI,CACV,iBAAI;AACFC,EAAAA,WAAW,EAAEP,KAAK,CAACG,aAAN,CAAoBK,MAD/B;AAEFC,EAAAA,YAAY,EAAE;AAAEC,IAAAA,KAAK,EAAE,CAAT;AAAYC,IAAAA,MAAM,EAAE;AAApB,GAFZ;AAGFC,EAAAA,aAAa,EAAE,IAHb;AAIFC,EAAAA,YAAY,EAAE,CAJZ;AAKFC,EAAAA,SAAS,EAAE;AALT,CAAJ,CADU,CAJP","sourcesContent":["import { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const baseStyles = ({ theme }: StyleProps): any => css`\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.miscellaneous.surfaceColor};\n`;\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const elevatedStyles = ({\n theme,\n elevated = false,\n}: { elevated?: boolean } & StyleProps): any =>\n elevated && [\n css({\n shadowColor: theme.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.05,\n shadowRadius: 5,\n elevation: 2\n }),\n ];\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"file":"PaperAndCard.js"}
@@ -1,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,K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'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","PressableSurface","micro","Header","BackButton"],"mappings":";;;;;;;AAAA;;AAEA;;;;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;AACA,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 { 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"}
@@ -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,GAAG,MAAH,GAAY,MAAO;AACvC;AACA;AACA;AACA,CAfA;;AAiBA,MAAMM,SAAS,GAAG,CAAC;AACjBT,EAAAA,KADiB;AAEjBU,EAAAA,MAFiB;AAGjBC,EAAAA;AAHiB,CAAD,KAIyB;AACzC,SACED,MAAM,KAAK,KAAX,IACA,gBAAI;AACR,aAAaC,cAAc,GAAI,GAAEA,cAAe,IAArB,GAA2BX,KAAK,CAACY,OAAN,CAAcC,IAAK;AACzE,KAJE;AAMD,CAXD;;AAaA,MAAMC,YAAY,GAAG,CAAC;AACpBd,EAAAA,KADoB;AAEpBU,EAAAA,MAFoB;AAGpBC,EAAAA;AAHoB,CAAD,KAIsB;AACzC,SACED,MAAM,KAAK,QAAX,IACA,gBAAI;AACR,gBAAgBC,cAAc,GAAI,GAAEA,cAAe,IAArB,GAA2BX,KAAK,CAACY,OAAN,CAAcC,IAAK;AAC5E,KAJE;AAMD,CAXD;;AAaO,MAAME,iBAAiB,GAAG,qBAAOC,YAAP,EAG/BC,KAAK,IAAI,gBAAI;AACf,MAAMlB,UAAU,CAACkB,KAAD,CAAQ;AACxB,MAAMH,YAAY,CAACG,KAAD,CAAQ;AAC1B,MAAMR,SAAS,CAACQ,KAAD,CAAQ;AACvB,GAPiC,CAA1B;;AAUA,MAAMC,gBAAgB,GAAG,qBAAOC,iBAAP,CAAa;AAC7C;AACA;AACA;AACA;AACA,CALO;;AAOA,MAAMC,aAAa,GAAG,qBAAOD,iBAAP,CAAkC;AAC/D;AACA;AACA;AACA,kBAAkB,CAAC;AAAEnB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,OAAN,CAAcP,IAAK;AACpD,CALO;;AAOA,MAAMgB,gBAAgB,GAAG,qBAAOC,kCAAP,CAA8C;AAC9E;AACA;AACA;AACA,iBAAiB,CAAC;AAAEtB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,OAAN,CAAcP,IAAK;AACnD,CALO;;AAOA,MAAMkB,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 { 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":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AAMC,gBAAgB,GAAG,qBAAOC,iBAAP,CAAa;AAC7C;AACA;AACA;AACA;AACA,CALO;;AAOA,MAAMC,aAAa,GAAG,qBAAOD,iBAAP,CAAkC;AAC/D;AACA;AACA;AACA,kBAAkB,CAAC;AAAEnB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,OAAN,CAAcP,IAAK;AACpD,CALO;;AAOA,MAAMgB,gBAAgB,GAAG,qBAAOC,kCAAP,CAA8C;AAC9E;AACA;AACA;AACA,iBAAiB,CAAC;AAAEtB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,OAAN,CAAcP,IAAK;AACnD,CALO;;AAOA,MAAMkB,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,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',
@@ -43,81 +46,81 @@ const hex2rgba = (hex, alpha = 1) => {
43
46
 
44
47
  exports.hex2rgba = hex2rgba;
45
48
  const miscellaneous = {
46
- shadow: '#85807a',
49
+ shadow: '#000000',
47
50
  overlay: '#282625',
48
51
  bodyColor: '#f8f7f7',
49
52
  surfaceColor: '#ffffff'
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;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/styles/definitions.ts"],"names":["statusColor","error","xlight","light","medium","dark","xdark","warning","success","info","hex2rgba","hex","alpha","r","g","b","match","map","x","parseInt","miscellaneous","shadow","overlay","bodyColor","surfaceColor","spacing","nano","micro","mili","centi","deca","kilo","mega","giga","tera","peta","hexa","iconSize","borderRadius","pill","borderWidth","pico","typography","h5","fontSize","lineHeight","h4","h3","h2","h1","base","sub","label","fontStack","default","mono","fontWeight","regular","bold","black","fontFiles","fontColor","orange","zIndex","absolute","select","input","popover","tooltip","header","backdrop","drawer","sidebar","modal"],"mappings":";;;;;;AAaO,MAAMA,WAAW,GAAG;AACzBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,SADH;AAELC,IAAAA,KAAK,EAAE,SAFF;AAGLC,IAAAA,MAAM,EAAE,SAHH;AAILC,IAAAA,IAAI,EAAE,SAJD;AAKLC,IAAAA,KAAK,EAAE;AALF,GADkB;AAQzBC,EAAAA,OAAO,EAAE;AACPL,IAAAA,MAAM,EAAE,SADD;AAEPC,IAAAA,KAAK,EAAE,SAFA;AAGPC,IAAAA,MAAM,EAAE,SAHD;AAIPC,IAAAA,IAAI,EAAE,SAJC;AAKPC,IAAAA,KAAK,EAAE;AALA,GARgB;AAezBE,EAAAA,OAAO,EAAE;AACPN,IAAAA,MAAM,EAAE,SADD;AAEPC,IAAAA,KAAK,EAAE,SAFA;AAGPC,IAAAA,MAAM,EAAE,SAHD;AAIPC,IAAAA,IAAI,EAAE,SAJC;AAKPC,IAAAA,KAAK,EAAE;AALA,GAfgB;AAsBzBG,EAAAA,IAAI,EAAE;AACJP,IAAAA,MAAM,EAAE,SADJ;AAEJC,IAAAA,KAAK,EAAE,SAFH;AAGJC,IAAAA,MAAM,EAAE,SAHJ;AAIJC,IAAAA,IAAI,EAAE,SAJF;AAKJC,IAAAA,KAAK,EAAE;AALH;AAtBmB,CAApB;;;AA+BA,MAAMI,QAAyC,GAAG,CAACC,GAAD,EAAMC,KAAK,GAAG,CAAd,KAAoB;AAC3E,QAAM,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,IAAYJ,GAAG,CAACK,KAAJ,CAAU,OAAV,EAAmBC,GAAnB,CAA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,IAAI,EAAE,UAF6B;AAGnCD,EAAAA,OAAO,EAAE;AAH0B,CAA9B;;AAMA,MAAMI,SAAoB,GAAG;AAClC1D,EAAAA,KAAK,EAAE,MAD2B;AAElCC,EAAAA,MAAM,EAAE,SAF0B;AAGlCC,EAAAA,IAAI,EAAE,SAH4B;AAIlCyD,EAAAA,MAAM,EAAE;AAJ0B,CAA7B;;AAOA,MAAMC,MAAc,GAAG;AAC5BT,EAAAA,OAAO,EAAE,CADmB;AAE5BU,EAAAA,QAAQ,EAAE,CAFkB;AAG5BC,EAAAA,MAAM,EAAE,EAHoB;AAI5BC,EAAAA,KAAK,EAAE,EAJqB;AAK5BC,EAAAA,OAAO,EAAE,EALmB;AAM5BC,EAAAA,OAAO,EAAE,EANmB;AAO5BC,EAAAA,MAAM,EAAE,GAPoB;AAQ5BC,EAAAA,QAAQ,EAAE,GARkB;AAS5BC,EAAAA,MAAM,EAAE,GAToB;AAU5BC,EAAAA,OAAO,EAAE,GAVmB;AAW5BC,EAAAA,KAAK,EAAE;AAXqB,CAAvB","sourcesContent":["import {\n BorderRadius,\n BorderWidth,\n FontColor,\n FontStack,\n FontWeight,\n IconSize,\n Miscellaneous,\n Spacing,\n TypographyVariation,\n ZIndex,\n} from '../types/defaults';\n\nexport const statusColor = {\n error: {\n xlight: '#fdf3f2',\n light: '#ee9891',\n medium: '#e04638',\n dark: '#9b2318',\n xdark: '#58240e',\n },\n warning: {\n xlight: '#fffcf0',\n light: '#ffe380',\n medium: '#ffc700',\n dark: '#cc9f00',\n xdark: '#665000',\n },\n success: {\n xlight: '#f3fcf8',\n light: '#99e6c9',\n medium: '#2db783',\n dark: '#238f67',\n xdark: '#14523b',\n },\n info: {\n xlight: '#f0f8fe',\n light: '#85c7fa',\n medium: '#239bf6',\n dark: '#0873c4',\n xdark: '#043962',\n },\n};\n\nexport const hex2rgba: (hex, alpha?: number) => string = (hex, alpha = 1) => {\n const [r, g, b] = hex.match(/\\w\\w/g).map(x => parseInt(x, 16));\n return `rgba(${r},${g},${b},${alpha})`;\n};\n\nexport const miscellaneous: Miscellaneous = {\n shadow: '#85807a', // rgba(133, 128, 122, 0.08)\n overlay: '#282625', // rgba(40, 38, 37, 0.5)\n bodyColor: '#f8f7f7',\n surfaceColor: '#ffffff', //input, group button, cards\n};\n\nexport const spacing: Spacing = {\n nano: '2px',\n micro: '4px',\n mili: '8px',\n centi: '12px',\n deca: '16px',\n kilo: '24px',\n mega: '32px',\n giga: '40px',\n tera: '48px',\n peta: '56px',\n hexa: '64px',\n};\n\nexport const iconSize: IconSize = {\n micro: '12px',\n mili: '14px',\n centi: '16px', // '1rem'\n deca: '18px', // '1.5rem'\n kilo: '24px', // '1.6rem'\n mega: '32px', // '2rem'\n};\n\nexport const borderRadius: BorderRadius = {\n nano: '2px',\n micro: '4px',\n mili: '8px',\n centi: '16px',\n deca: '24px',\n pill: '999999px', // also circle\n};\n\nexport const borderWidth: BorderWidth = {\n pico: '1px',\n nano: '2px',\n};\n\nexport const typography: TypographyVariation = {\n h5: {\n fontSize: '16px', // '1rem'\n lineHeight: '24px', // '1.5rem'\n },\n h4: {\n fontSize: '18px', // '1.125rem'\n lineHeight: '27px', // '1.688rem'\n },\n h3: {\n fontSize: '20px', // '1.25rem'\n lineHeight: '32px', // '2rem'\n },\n h2: {\n fontSize: '26px', // '1.625rem'\n lineHeight: '38px', // '2.375rem'\n },\n h1: {\n fontSize: '32px', // '2rem'\n lineHeight: '42px', // '2.625rem'\n },\n base: {\n fontSize: '14px', // '0.875rem'\n lineHeight: '21px', // '1.313rem'\n },\n sub: {\n fontSize: '12px', // '0.75rem'\n lineHeight: '18px', // '1.125rem'\n },\n label: {\n fontSize: '10px',\n lineHeight: '12px',\n },\n};\n\nexport const fontStack: FontStack = {\n default: 'Lato',\n mono: 'Consolas, monaco, monospace',\n};\n\nexport const fontWeight: FontWeight = {\n regular: '400',\n bold: '700',\n black: '900',\n};\n\nexport const fontFiles: FontWeight = {\n black: '{0}-Black',\n bold: '{0}-Bold',\n regular: '{0}-Regular',\n};\n\nexport const fontColor: FontColor = {\n light: '#fff',\n medium: '#85807a',\n dark: '#353231', // default\n orange: '#f89907',\n};\n\nexport const zIndex: ZIndex = {\n default: 0,\n absolute: 1,\n select: 20,\n input: 20,\n popover: 30,\n tooltip: 40,\n header: 600,\n backdrop: 700,\n drawer: 700,\n sidebar: 800,\n modal: 1000,\n};\n\nexport type IconType =\n | 'material'\n | 'material-community'\n | 'simple-line-icon'\n | 'zocial'\n | 'font-awesome'\n | 'octicon'\n | 'ionicon'\n | 'foundation'\n | 'evilicon'\n | 'entypo'\n | 'antdesign'\n | 'font-awesome-5'\n | string;\n"],"file":"definitions.js"}
1
+ {"version":3,"sources":["../../src/styles/definitions.ts"],"names":["statusColor","error","xlight","light","medium","dark","xdark","warning","success","info","hex2rgba","hex","alpha","r","g","b","match","map","x","parseInt","miscellaneous","shadow","overlay","bodyColor","surfaceColor","spacing","nano","micro","mili","centi","deca","kilo","mega","giga","tera","peta","hexa","iconSize","borderRadius","pill","borderWidth","pico","typography","h5","fontSize","lineHeight","h4","h3","h2","h1","base","sub","label","fontStack","default","mono","fontWeight","regular","bold","black","fontFiles","fontColor","orange","zIndex","absolute","select","input","popover","tooltip","header","backdrop","drawer","sidebar","modal"],"mappings":";;;;;;;AAYA;;AAEO,MAAMA,WAAW,GAAG;AACzBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,SADH;AAELC,IAAAA,KAAK,EAAE,SAFF;AAGLC,IAAAA,MAAM,EAAE,SAHH;AAILC,IAAAA,IAAI,EAAE,SAJD;AAKLC,IAAAA,KAAK,EAAE;AALF,GADkB;AAQzBC,EAAAA,OAAO,EAAE;AACPL,IAAAA,MAAM,EAAE,SADD;AAEPC,IAAAA,KAAK,EAAE,SAFA;AAGPC,IAAAA,MAAM,EAAE,SAHD;AAIPC,IAAAA,IAAI,EAAE,SAJC;AAKPC,IAAAA,KAAK,EAAE;AALA,GARgB;AAezBE,EAAAA,OAAO,EA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CC,EAAAA,MAAM,EAAE,SAF0B;AAGlCC,EAAAA,IAAI,EAAE,SAH4B;AAIlCyD,EAAAA,MAAM,EAAE;AAJ0B,CAA7B;;AAOA,MAAMC,MAAc,GAAG;AAC5BT,EAAAA,OAAO,EAAE,CADmB;AAE5BU,EAAAA,QAAQ,EAAE,CAFkB;AAG5BC,EAAAA,MAAM,EAAE,EAHoB;AAI5BC,EAAAA,KAAK,EAAE,EAJqB;AAK5BC,EAAAA,OAAO,EAAE,EALmB;AAM5BC,EAAAA,OAAO,EAAE,EANmB;AAO5BC,EAAAA,MAAM,EAAE,GAPoB;AAQ5BC,EAAAA,QAAQ,EAAE,GARkB;AAS5BC,EAAAA,MAAM,EAAE,GAToB;AAU5BC,EAAAA,OAAO,EAAE,GAVmB;AAW5BC,EAAAA,KAAK,EAAE;AAXqB,CAAvB","sourcesContent":["import {\n BorderRadius,\n BorderWidth,\n FontColor,\n FontStack,\n FontWeight,\n IconSize,\n Miscellaneous,\n Spacing,\n TypographyVariation,\n ZIndex\n} from '../types/defaults';\nimport { RFValueStr } from '../utils';\n\nexport const statusColor = {\n error: {\n xlight: '#fdf3f2',\n light: '#ee9891',\n medium: '#e04638',\n dark: '#9b2318',\n xdark: '#58240e',\n },\n warning: {\n xlight: '#fffcf0',\n light: '#ffe380',\n medium: '#ffc700',\n dark: '#cc9f00',\n xdark: '#665000',\n },\n success: {\n xlight: '#f3fcf8',\n light: '#99e6c9',\n medium: '#2db783',\n dark: '#238f67',\n xdark: '#14523b',\n },\n info: {\n xlight: '#f0f8fe',\n light: '#85c7fa',\n medium: '#239bf6',\n dark: '#0873c4',\n xdark: '#043962',\n },\n};\n\nexport const hex2rgba: (hex, alpha?: number) => string = (hex, alpha = 1) => {\n const [r, g, b] = hex.match(/\\w\\w/g).map(x => parseInt(x, 16));\n return `rgba(${r},${g},${b},${alpha})`;\n};\n\nexport const miscellaneous: Miscellaneous = {\n shadow: '#000000', // black\n overlay: '#282625', // rgba(40, 38, 37, 0.5)\n bodyColor: '#f8f7f7',\n surfaceColor: '#ffffff', //input, group button, cards\n};\n\nexport const spacing: Spacing = {\n nano: RFValueStr('2px'),\n micro: RFValueStr('4px'),\n mili: RFValueStr('8px'),\n centi: RFValueStr('12px'),\n deca: RFValueStr('16px'),\n kilo: RFValueStr('24px'),\n mega: RFValueStr('32px'),\n giga: RFValueStr('40px'),\n tera: RFValueStr('48px'),\n peta: RFValueStr('56px'),\n hexa: RFValueStr('64px'),\n};\n\nexport const iconSize: IconSize = {\n micro: RFValueStr('12px'),\n mili: RFValueStr('14px'),\n centi: RFValueStr('16px'), // '1rem'\n deca: RFValueStr('18px'), // '1.5rem'\n kilo: RFValueStr('24px'), // '1.6rem'\n mega: RFValueStr('32px'), // '2rem'\n};\n\nexport const borderRadius: BorderRadius = {\n nano: RFValueStr('2px'),\n micro: RFValueStr('4px'),\n mili: RFValueStr('8px'),\n centi: RFValueStr('16px'),\n deca: RFValueStr('24px'),\n pill: RFValueStr('999999px'), // also circle\n};\n\nexport const borderWidth: BorderWidth = {\n pico: RFValueStr('1px'),\n nano: RFValueStr('2px'),\n};\n\nexport const typography: TypographyVariation = {\n h5: {\n fontSize: RFValueStr('16px'), // '1rem'\n lineHeight: RFValueStr('24px'), // '1.5rem'\n },\n h4: {\n fontSize: RFValueStr('18px'), // '1.125rem'\n lineHeight: RFValueStr('27px'), // '1.688rem'\n },\n h3: {\n fontSize: RFValueStr('20px'), // '1.25rem'\n lineHeight: RFValueStr('32px'), // '2rem'\n },\n h2: {\n fontSize: RFValueStr('26px'), // '1.625rem'\n lineHeight: RFValueStr('38px'), // '2.375rem'\n },\n h1: {\n fontSize: RFValueStr('32px'), // '2rem'\n lineHeight: RFValueStr('42px'), // '2.625rem'\n },\n base: {\n fontSize: RFValueStr('14px'), // '0.875rem'\n lineHeight: RFValueStr('21px'), // '1.313rem'\n },\n sub: {\n fontSize: RFValueStr('12px'), // '0.75rem'\n lineHeight: RFValueStr('18px'), // '1.125rem'\n },\n label: {\n fontSize: RFValueStr('10px'),\n lineHeight: RFValueStr('12px'),\n },\n};\n\nexport const fontStack: FontStack = {\n default: 'Lato',\n mono: 'Consolas, monaco, monospace',\n};\n\nexport const fontWeight: FontWeight = {\n regular: '400',\n bold: '700',\n black: '900',\n};\n\nexport const fontFiles: FontWeight = {\n black: '{0}-Black',\n bold: '{0}-Bold',\n regular: '{0}-Regular',\n};\n\nexport const fontColor: FontColor = {\n light: '#fff',\n medium: '#85807a',\n dark: '#353231', // default\n orange: '#f89907',\n};\n\nexport const zIndex: ZIndex = {\n default: 0,\n absolute: 1,\n select: 20,\n input: 20,\n popover: 30,\n tooltip: 40,\n header: 600,\n backdrop: 700,\n drawer: 700,\n sidebar: 800,\n modal: 1000,\n};\n\nexport type IconType =\n | 'material'\n | 'material-community'\n | 'simple-line-icon'\n | 'zocial'\n | 'font-awesome'\n | 'octicon'\n | 'ionicon'\n | 'foundation'\n | 'evilicon'\n | 'entypo'\n | 'antdesign'\n | 'font-awesome-5'\n | string;\n"],"file":"definitions.js"}
@@ -0,0 +1,4 @@
1
+ export declare function isIphoneX(): boolean;
2
+ export declare function ifIphoneX(iphoneXStyle: any, regularStyle: any): any;
3
+ export declare function getStatusBarHeight(safe: any): any;
4
+ export declare function getBottomSpace(): 0 | 34;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isIphoneX = isIphoneX;
7
+ exports.ifIphoneX = ifIphoneX;
8
+ exports.getStatusBarHeight = getStatusBarHeight;
9
+ exports.getBottomSpace = getBottomSpace;
10
+
11
+ var _reactNative = require("react-native");
12
+
13
+ function isIphoneX() {
14
+ const dimen = _reactNative.Dimensions.get('window');
15
+
16
+ return _reactNative.Platform.OS === 'ios' && !_reactNative.Platform.isPad && !_reactNative.Platform.isTVOS && (dimen.height === 780 || dimen.width === 780 || dimen.height === 812 || dimen.width === 812 || dimen.height === 844 || dimen.width === 844 || dimen.height === 896 || dimen.width === 896 || dimen.height === 926 || dimen.width === 926);
17
+ }
18
+
19
+ function ifIphoneX(iphoneXStyle, regularStyle) {
20
+ if (isIphoneX()) {
21
+ return iphoneXStyle;
22
+ }
23
+
24
+ return regularStyle;
25
+ }
26
+
27
+ function getStatusBarHeight(safe) {
28
+ return _reactNative.Platform.select({
29
+ ios: ifIphoneX(safe ? 44 : 30, 20),
30
+ android: _reactNative.StatusBar.currentHeight,
31
+ default: 0
32
+ });
33
+ }
34
+
35
+ function getBottomSpace() {
36
+ return isIphoneX() ? 34 : 0;
37
+ }
38
+ //# sourceMappingURL=IPhoneXHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/IPhoneXHelper.ts"],"names":["isIphoneX","dimen","Dimensions","get","Platform","OS","isPad","isTVOS","height","width","ifIphoneX","iphoneXStyle","regularStyle","getStatusBarHeight","safe","select","ios","android","StatusBar","currentHeight","default","getBottomSpace"],"mappings":";;;;;;;;;;AAAA;;AAEO,SAASA,SAAT,GAAqB;AACxB,QAAMC,KAAK,GAAGC,wBAAWC,GAAX,CAAe,QAAf,CAAd;;AACA,SACIC,sBAASC,EAAT,KAAgB,KAAhB,IACA,CAACD,sBAASE,KADV,IAEA,CAACF,sBAASG,MAFV,KAGEN,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAAzC,IACKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAD7C,IAEKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAF7C,IAGKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAH7C,IAIKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAP9C,CADJ;AAUH;;AAEM,SAASC,SAAT,CAAmBC,YAAnB,EAAiCC,YAAjC,EAA+C;AAClD,MAAIZ,SAAS,EAAb,EAAiB;AACb,WAAOW,YAAP;AACH;;AACD,SAAOC,YAAP;AACH;;AAEM,SAASC,kBAAT,CAA4BC,IAA5B,EAAkC;AACrC,SAAOV,sBAASW,MAAT,CAAgB;AACnBC,IAAAA,GAAG,EAAEN,SAAS,CAACI,IAAI,GAAG,EAAH,GAAQ,EAAb,EAAiB,EAAjB,CADK;AAEnBG,IAAAA,OAAO,EAAEC,uBAAUC,aAFA;AAGnBC,IAAAA,OAAO,EAAE;AAHU,GAAhB,CAAP;AAKH;;AAEM,SAASC,cAAT,GAA0B;AAC7B,SAAOrB,SAAS,KAAK,EAAL,GAAU,CAA1B;AACH","sourcesContent":["import { Dimensions, Platform, StatusBar } from 'react-native';\n\nexport function isIphoneX() {\n const dimen = Dimensions.get('window');\n return (\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n !Platform.isTVOS &&\n ((dimen.height === 780 || dimen.width === 780)\n || (dimen.height === 812 || dimen.width === 812)\n || (dimen.height === 844 || dimen.width === 844)\n || (dimen.height === 896 || dimen.width === 896)\n || (dimen.height === 926 || dimen.width === 926))\n );\n}\n\nexport function ifIphoneX(iphoneXStyle, regularStyle) {\n if (isIphoneX()) {\n return iphoneXStyle;\n }\n return regularStyle;\n}\n\nexport function getStatusBarHeight(safe) {\n return Platform.select({\n ios: ifIphoneX(safe ? 44 : 30, 20),\n android: StatusBar.currentHeight,\n default: 0\n });\n}\n\nexport function getBottomSpace() {\n return isIphoneX() ? 34 : 0;\n}"],"file":"IPhoneXHelper.js"}
@@ -0,0 +1,3 @@
1
+ export declare const RFPercentage: (percent: number) => number;
2
+ export declare const RFValue: (fontSize: number, standardScreenHeight?: number) => number;
3
+ export declare const RFValueStr: (fontSize: string, standardScreenHeight?: number | undefined) => string;