@tecsinapse/react-native-kit 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/components/atoms/Avatar/Avatar.js +3 -1
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/index.js +9 -4
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +10 -7
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.js +15 -5
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js +12 -9
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/Item.js +10 -7
- package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/index.js +21 -7
- package/dist/components/atoms/BottomNavigator/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/styled.js +63 -44
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +10 -7
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +3 -1
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js +3 -1
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +3 -1
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js +21 -8
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/index.js +33 -9
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +3 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.js +9 -4
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/Header/Header.js +18 -15
- package/dist/components/atoms/Header/Header.js.map +1 -1
- package/dist/components/atoms/Header/index.js +15 -5
- package/dist/components/atoms/Header/index.js.map +1 -1
- package/dist/components/atoms/Header/styled.js +16 -16
- package/dist/components/atoms/Header/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.js +30 -26
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.js +15 -5
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +13 -8
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.js +31 -27
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/components/atoms/InputMask/index.js +15 -5
- package/dist/components/atoms/InputMask/index.js.map +1 -1
- package/dist/components/atoms/InputMask/styled.js +14 -11
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ModalGroupManager.js +8 -5
- package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js +87 -72
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/components/atoms/Modal/index.js +45 -8
- package/dist/components/atoms/Modal/index.js.map +1 -1
- package/dist/components/atoms/Modal/ui/BaseModalView.js +15 -12
- package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
- package/dist/components/atoms/Modal/ui/styled.js +18 -20
- package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ui/types.js +3 -1
- package/dist/components/atoms/Modal/useLazyModalManager.js +4 -2
- package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalManager.js +4 -2
- package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js +3 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -1
- package/dist/components/atoms/Skeleton/Pulse.js +16 -11
- package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +13 -10
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/Wave.js +17 -12
- package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/components/atoms/Skeleton/animation.js +3 -1
- package/dist/components/atoms/Skeleton/animation.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.js +15 -5
- package/dist/components/atoms/Skeleton/index.js.map +1 -1
- package/dist/components/atoms/Skeleton/styled.js +25 -15
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/Skeleton/types.js +3 -1
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js +11 -8
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/index.js +15 -5
- package/dist/components/atoms/SnappingSlider/index.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +8 -5
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.js +15 -5
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +8 -5
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/index.js +15 -5
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +16 -12
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +30 -27
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/atoms/TextArea/index.js +15 -5
- package/dist/components/atoms/TextArea/index.js.map +1 -1
- package/dist/components/atoms/TextArea/styled.js +3 -1
- package/dist/components/atoms/TextArea/styled.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +9 -6
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/index.js +9 -4
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +16 -12
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js +15 -5
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +13 -6
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +14 -10
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.js +15 -5
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +9 -6
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js +9 -4
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.js +19 -13
- package/dist/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/components/molecules/Grid/Item/Item.js +28 -25
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/components/molecules/Grid/Item/index.js +15 -5
- package/dist/components/molecules/Grid/Item/index.js.map +1 -1
- package/dist/components/molecules/Grid/index.js +15 -6
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +13 -10
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js +17 -12
- package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/index.js +15 -5
- package/dist/components/molecules/IconTextButton/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/styled.js +31 -29
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +8 -5
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js +15 -5
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js +16 -11
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -11
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/index.js +15 -5
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/styled.js +15 -18
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/components/molecules/Select/Modal.js +43 -36
- package/dist/components/molecules/Select/Modal.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +36 -33
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/index.js +15 -5
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/molecules/Select/styled.js +77 -84
- package/dist/components/molecules/Select/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +12 -9
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.js +15 -5
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +18 -9
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/index.js +321 -79
- package/dist/index.js.map +1 -1
- package/dist/utils/date.js +3 -1
- package/dist/utils/date.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.Pulse = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactNative = require("react-native");
|
|
@@ -13,24 +15,27 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
17
|
|
|
16
|
-
const Pulse =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const Pulse = _ref => {
|
|
19
|
+
var _childrenLayout$x, _childrenLayout$y;
|
|
20
|
+
|
|
21
|
+
let {
|
|
22
|
+
active = true,
|
|
23
|
+
width,
|
|
24
|
+
height,
|
|
25
|
+
childrenLayout
|
|
26
|
+
} = _ref;
|
|
22
27
|
const animatedValue = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
23
28
|
(0, _react.useEffect)(() => {
|
|
24
29
|
(0, _animation.pulseAnimation)(active, animatedValue);
|
|
25
30
|
}, [active]);
|
|
26
31
|
return _react.default.createElement(_reactNative.Animated.View, {
|
|
27
32
|
style: {
|
|
28
|
-
width: width
|
|
29
|
-
height: height
|
|
33
|
+
width: width !== null && width !== void 0 ? width : childrenLayout.width,
|
|
34
|
+
height: height !== null && height !== void 0 ? height : childrenLayout.height,
|
|
30
35
|
backgroundColor: 'rgba(0,0,0,0.05)',
|
|
31
36
|
position: 'absolute',
|
|
32
|
-
top: childrenLayout.x
|
|
33
|
-
left: childrenLayout.y
|
|
37
|
+
top: (_childrenLayout$x = childrenLayout.x) !== null && _childrenLayout$x !== void 0 ? _childrenLayout$x : 0,
|
|
38
|
+
left: (_childrenLayout$y = childrenLayout.y) !== null && _childrenLayout$y !== void 0 ? _childrenLayout$y : 0,
|
|
34
39
|
zIndex: 2,
|
|
35
40
|
overflow: 'hidden',
|
|
36
41
|
opacity: animatedValue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pulse.js","names":["Pulse","active","width","height","childrenLayout","animatedValue","useRef","Animated","Value","current","useEffect","pulseAnimation","backgroundColor","position","top","x","left","y","zIndex","overflow","opacity"],"sources":["../../../../src/components/atoms/Skeleton/Pulse.tsx"],"sourcesContent":["import { Animated } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\nimport { pulseAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nexport const Pulse = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n pulseAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <Animated.View\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n backgroundColor: 'rgba(0,0,0,0.05)',\n position: 'absolute',\n top: childrenLayout.x ?? 0,\n left: childrenLayout.y ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n opacity: animatedValue,\n }}\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pulse.js","names":["Pulse","active","width","height","childrenLayout","animatedValue","useRef","Animated","Value","current","useEffect","pulseAnimation","backgroundColor","position","top","x","left","y","zIndex","overflow","opacity"],"sources":["../../../../src/components/atoms/Skeleton/Pulse.tsx"],"sourcesContent":["import { Animated } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\nimport { pulseAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nexport const Pulse = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n pulseAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <Animated.View\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n backgroundColor: 'rgba(0,0,0,0.05)',\n position: 'absolute',\n top: childrenLayout.x ?? 0,\n left: childrenLayout.y ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n opacity: animatedValue,\n }}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGO,MAAMA,KAAK,GAAG,QAKM;EAAA;;EAAA,IALL;IACpBC,MAAM,GAAG,IADW;IAEpBC,KAFoB;IAGpBC,MAHoB;IAIpBC;EAJoB,CAKK;EACzB,MAAMC,aAAa,GAAG,IAAAC,aAAA,EAAO,IAAIC,qBAAA,CAASC,KAAb,CAAmB,CAAnB,CAAP,EAA8BC,OAApD;EAEA,IAAAC,gBAAA,EAAU,MAAM;IACd,IAAAC,yBAAA,EAAeV,MAAf,EAAuBI,aAAvB;EACD,CAFD,EAEG,CAACJ,MAAD,CAFH;EAIA,OACE,6BAAC,qBAAD,CAAU,IAAV;IACE,KAAK,EAAE;MACLC,KAAK,EAAEA,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWE,cAAc,CAACF,KAD1B;MAELC,MAAM,EAAEA,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAYC,cAAc,CAACD,MAF5B;MAGLS,eAAe,EAAE,kBAHZ;MAILC,QAAQ,EAAE,UAJL;MAKLC,GAAG,uBAAEV,cAAc,CAACW,CAAjB,iEAAsB,CALpB;MAMLC,IAAI,uBAAEZ,cAAc,CAACa,CAAjB,iEAAsB,CANrB;MAOLC,MAAM,EAAE,CAPH;MAQLC,QAAQ,EAAE,QARL;MASLC,OAAO,EAAEf;IATJ;EADT,EADF;AAeD,CA3BM"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -19,15 +21,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
21
|
|
|
20
22
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
23
|
|
|
22
|
-
const Skeleton =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
const Skeleton = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
children,
|
|
27
|
+
width,
|
|
28
|
+
height,
|
|
29
|
+
radius,
|
|
30
|
+
active = true,
|
|
31
|
+
animation = 'wave',
|
|
32
|
+
...rest
|
|
33
|
+
} = _ref;
|
|
31
34
|
const [childrenLayout, setChildrenLayout] = (0, _react.useState)({
|
|
32
35
|
width: 0,
|
|
33
36
|
height: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","names":["Skeleton","children","width","height","radius","active","animation","rest","childrenLayout","setChildrenLayout","useState","y","x","Error","getChildrenLayout","event","nativeEvent","layout","opacity"],"sources":["../../../../src/components/atoms/Skeleton/Skeleton.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { BorderRadiusType } from '@tecsinapse/react-core';\nimport { LayoutChangeEvent, View, ViewProps } from 'react-native';\nimport { Wrapper } from './styled';\nimport { Wave } from './Wave';\nimport { Pulse } from './Pulse';\nimport { ChildrenLayout } from './types';\n\nexport interface SkeletonProps extends ViewProps {\n width?: number;\n height?: number;\n radius?: BorderRadiusType;\n active?: boolean;\n animation?: 'wave' | 'pulse';\n}\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n children,\n width,\n height,\n radius,\n active = true,\n animation = 'wave',\n ...rest\n}) => {\n const [childrenLayout, setChildrenLayout] = useState<ChildrenLayout>({\n width: 0,\n height: 0,\n y: 0,\n x: 0,\n });\n\n if (!width && !height && !children) {\n throw new Error(\n '[Skeleton] You should provide children or specify width and height'\n );\n }\n\n const getChildrenLayout = (event: LayoutChangeEvent) => {\n setChildrenLayout(event.nativeEvent.layout);\n };\n\n return (\n <Wrapper width={width} height={height} radius={radius} {...rest}>\n {active && animation === 'wave' ? (\n <Wave\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n\n {active && animation === 'pulse' ? (\n <Pulse\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n <View\n onLayout={event => getChildrenLayout(event)}\n style={{ opacity: active ? 0 : 1 }}\n pointerEvents={active ? 'none' : 'auto'}\n >\n {children}\n </View>\n </Wrapper>\n );\n};\n\nexport default Skeleton;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.js","names":["Skeleton","children","width","height","radius","active","animation","rest","childrenLayout","setChildrenLayout","useState","y","x","Error","getChildrenLayout","event","nativeEvent","layout","opacity"],"sources":["../../../../src/components/atoms/Skeleton/Skeleton.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { BorderRadiusType } from '@tecsinapse/react-core';\nimport { LayoutChangeEvent, View, ViewProps } from 'react-native';\nimport { Wrapper } from './styled';\nimport { Wave } from './Wave';\nimport { Pulse } from './Pulse';\nimport { ChildrenLayout } from './types';\n\nexport interface SkeletonProps extends ViewProps {\n width?: number;\n height?: number;\n radius?: BorderRadiusType;\n active?: boolean;\n animation?: 'wave' | 'pulse';\n}\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n children,\n width,\n height,\n radius,\n active = true,\n animation = 'wave',\n ...rest\n}) => {\n const [childrenLayout, setChildrenLayout] = useState<ChildrenLayout>({\n width: 0,\n height: 0,\n y: 0,\n x: 0,\n });\n\n if (!width && !height && !children) {\n throw new Error(\n '[Skeleton] You should provide children or specify width and height'\n );\n }\n\n const getChildrenLayout = (event: LayoutChangeEvent) => {\n setChildrenLayout(event.nativeEvent.layout);\n };\n\n return (\n <Wrapper width={width} height={height} radius={radius} {...rest}>\n {active && animation === 'wave' ? (\n <Wave\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n\n {active && animation === 'pulse' ? (\n <Pulse\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n <View\n onLayout={event => getChildrenLayout(event)}\n style={{ opacity: active ? 0 : 1 }}\n pointerEvents={active ? 'none' : 'auto'}\n >\n {children}\n </View>\n </Wrapper>\n );\n};\n\nexport default Skeleton;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAWA,MAAMA,QAAiC,GAAG,QAQpC;EAAA,IARqC;IACzCC,QADyC;IAEzCC,KAFyC;IAGzCC,MAHyC;IAIzCC,MAJyC;IAKzCC,MAAM,GAAG,IALgC;IAMzCC,SAAS,GAAG,MAN6B;IAOzC,GAAGC;EAPsC,CAQrC;EACJ,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsC,IAAAC,eAAA,EAAyB;IACnER,KAAK,EAAE,CAD4D;IAEnEC,MAAM,EAAE,CAF2D;IAGnEQ,CAAC,EAAE,CAHgE;IAInEC,CAAC,EAAE;EAJgE,CAAzB,CAA5C;;EAOA,IAAI,CAACV,KAAD,IAAU,CAACC,MAAX,IAAqB,CAACF,QAA1B,EAAoC;IAClC,MAAM,IAAIY,KAAJ,CACJ,oEADI,CAAN;EAGD;;EAED,MAAMC,iBAAiB,GAAIC,KAAD,IAA8B;IACtDN,iBAAiB,CAACM,KAAK,CAACC,WAAN,CAAkBC,MAAnB,CAAjB;EACD,CAFD;;EAIA,OACE,6BAAC,eAAD;IAAS,KAAK,EAAEf,KAAhB;IAAuB,MAAM,EAAEC,MAA/B;IAAuC,MAAM,EAAEC;EAA/C,GAA2DG,IAA3D,GACGF,MAAM,IAAIC,SAAS,KAAK,MAAxB,GACC,6BAAC,UAAD;IACE,MAAM,EAAED,MADV;IAEE,KAAK,EAAEH,KAFT;IAGE,MAAM,EAAEC,MAHV;IAIE,cAAc,EAAEK;EAJlB,EADD,GAQC,2DATJ,EAYGH,MAAM,IAAIC,SAAS,KAAK,OAAxB,GACC,6BAAC,YAAD;IACE,MAAM,EAAED,MADV;IAEE,KAAK,EAAEH,KAFT;IAGE,MAAM,EAAEC,MAHV;IAIE,cAAc,EAAEK;EAJlB,EADD,GAQC,2DApBJ,EAsBE,6BAAC,iBAAD;IACE,QAAQ,EAAEO,KAAK,IAAID,iBAAiB,CAACC,KAAD,CADtC;IAEE,KAAK,EAAE;MAAEG,OAAO,EAAEb,MAAM,GAAG,CAAH,GAAO;IAAxB,CAFT;IAGE,aAAa,EAAEA,MAAM,GAAG,MAAH,GAAY;EAHnC,GAKGJ,QALH,CAtBF,CADF;AAgCD,CA1DD;;eA4DeD,Q"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.Wave = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -19,13 +21,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
21
|
|
|
20
22
|
const AnimatedLinearGradient = _reactNative.Animated.createAnimatedComponent(_reactNativeLinearGradient.default);
|
|
21
23
|
|
|
22
|
-
const Wave =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const Wave = _ref => {
|
|
25
|
+
var _childrenLayout$y, _childrenLayout$x;
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
active = true,
|
|
29
|
+
width,
|
|
30
|
+
height,
|
|
31
|
+
childrenLayout
|
|
32
|
+
} = _ref;
|
|
33
|
+
const range = width !== null && width !== void 0 ? width : childrenLayout.width;
|
|
29
34
|
const animatedValue = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
30
35
|
const translateX = animatedValue.interpolate({
|
|
31
36
|
inputRange: [0, 1],
|
|
@@ -45,11 +50,11 @@ const Wave = ({
|
|
|
45
50
|
y: 0
|
|
46
51
|
},
|
|
47
52
|
style: {
|
|
48
|
-
width: width
|
|
49
|
-
height: height
|
|
53
|
+
width: width !== null && width !== void 0 ? width : childrenLayout.width,
|
|
54
|
+
height: height !== null && height !== void 0 ? height : childrenLayout.height,
|
|
50
55
|
position: 'absolute',
|
|
51
|
-
top: childrenLayout.y
|
|
52
|
-
left: childrenLayout.x
|
|
56
|
+
top: (_childrenLayout$y = childrenLayout.y) !== null && _childrenLayout$y !== void 0 ? _childrenLayout$y : 0,
|
|
57
|
+
left: (_childrenLayout$x = childrenLayout.x) !== null && _childrenLayout$x !== void 0 ? _childrenLayout$x : 0,
|
|
53
58
|
zIndex: 2,
|
|
54
59
|
overflow: 'hidden',
|
|
55
60
|
transform: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wave.js","names":["AnimatedLinearGradient","Animated","createAnimatedComponent","LinearGradient","Wave","active","width","height","childrenLayout","range","animatedValue","useRef","Value","current","translateX","interpolate","inputRange","outputRange","useEffect","waveAnimation","x","y","position","top","left","zIndex","overflow","transform"],"sources":["../../../../src/components/atoms/Skeleton/Wave.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { waveAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nconst AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);\n\nexport const Wave = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const range = width ?? childrenLayout.width;\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const translateX = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [-range, range],\n });\n\n useEffect(() => {\n waveAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <AnimatedLinearGradient\n colors={[\n 'transparent',\n 'rgba(0,0,0,0.05)',\n 'rgba(0,0,0,0.1)',\n 'transparent',\n ]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n position: 'absolute',\n top: childrenLayout.y ?? 0,\n left: childrenLayout.x ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n transform: [\n {\n translateX: translateX,\n },\n ],\n }}\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Wave.js","names":["AnimatedLinearGradient","Animated","createAnimatedComponent","LinearGradient","Wave","active","width","height","childrenLayout","range","animatedValue","useRef","Value","current","translateX","interpolate","inputRange","outputRange","useEffect","waveAnimation","x","y","position","top","left","zIndex","overflow","transform"],"sources":["../../../../src/components/atoms/Skeleton/Wave.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { waveAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nconst AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);\n\nexport const Wave = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const range = width ?? childrenLayout.width;\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const translateX = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [-range, range],\n });\n\n useEffect(() => {\n waveAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <AnimatedLinearGradient\n colors={[\n 'transparent',\n 'rgba(0,0,0,0.05)',\n 'rgba(0,0,0,0.1)',\n 'transparent',\n ]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n position: 'absolute',\n top: childrenLayout.y ?? 0,\n left: childrenLayout.x ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n transform: [\n {\n translateX: translateX,\n },\n ],\n }}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAGA,MAAMA,sBAAsB,GAAGC,qBAAA,CAASC,uBAAT,CAAiCC,kCAAjC,CAA/B;;AAEO,MAAMC,IAAI,GAAG,QAKO;EAAA;;EAAA,IALN;IACnBC,MAAM,GAAG,IADU;IAEnBC,KAFmB;IAGnBC,MAHmB;IAInBC;EAJmB,CAKM;EACzB,MAAMC,KAAK,GAAGH,KAAH,aAAGA,KAAH,cAAGA,KAAH,GAAYE,cAAc,CAACF,KAAtC;EACA,MAAMI,aAAa,GAAG,IAAAC,aAAA,EAAO,IAAIV,qBAAA,CAASW,KAAb,CAAmB,CAAnB,CAAP,EAA8BC,OAApD;EAEA,MAAMC,UAAU,GAAGJ,aAAa,CAACK,WAAd,CAA0B;IAC3CC,UAAU,EAAE,CAAC,CAAD,EAAI,CAAJ,CAD+B;IAE3CC,WAAW,EAAE,CAAC,CAACR,KAAF,EAASA,KAAT;EAF8B,CAA1B,CAAnB;EAKA,IAAAS,gBAAA,EAAU,MAAM;IACd,IAAAC,wBAAA,EAAcd,MAAd,EAAsBK,aAAtB;EACD,CAFD,EAEG,CAACL,MAAD,CAFH;EAIA,OACE,6BAAC,sBAAD;IACE,MAAM,EAAE,CACN,aADM,EAEN,kBAFM,EAGN,iBAHM,EAIN,aAJM,CADV;IAOE,KAAK,EAAE;MAAEe,CAAC,EAAE,CAAL;MAAQC,CAAC,EAAE;IAAX,CAPT;IAQE,GAAG,EAAE;MAAED,CAAC,EAAE,CAAL;MAAQC,CAAC,EAAE;IAAX,CARP;IASE,KAAK,EAAE;MACLf,KAAK,EAAEA,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWE,cAAc,CAACF,KAD1B;MAELC,MAAM,EAAEA,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAYC,cAAc,CAACD,MAF5B;MAGLe,QAAQ,EAAE,UAHL;MAILC,GAAG,uBAAEf,cAAc,CAACa,CAAjB,iEAAsB,CAJpB;MAKLG,IAAI,uBAAEhB,cAAc,CAACY,CAAjB,iEAAsB,CALrB;MAMLK,MAAM,EAAE,CANH;MAOLC,QAAQ,EAAE,QAPL;MAQLC,SAAS,EAAE,CACT;QACEb,UAAU,EAAEA;MADd,CADS;IARN;EATT,EADF;AA0BD,CA5CM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.js","names":["waveAnimation","active","animatedValue","Animated","loop","timing","toValue","duration","easing","Easing","inOut","linear","useNativeDriver","start","pulseAnimation","sequence"],"sources":["../../../../src/components/atoms/Skeleton/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nexport const waveAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 1600,\n easing: Easing.inOut(Easing.linear),\n useNativeDriver: true,\n })\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n\nexport const pulseAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 800,\n useNativeDriver: true,\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: 800,\n useNativeDriver: true,\n }),\n ])\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"animation.js","names":["waveAnimation","active","animatedValue","Animated","loop","timing","toValue","duration","easing","Easing","inOut","linear","useNativeDriver","start","pulseAnimation","sequence"],"sources":["../../../../src/components/atoms/Skeleton/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nexport const waveAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 1600,\n easing: Easing.inOut(Easing.linear),\n useNativeDriver: true,\n })\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n\nexport const pulseAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 800,\n useNativeDriver: true,\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: 800,\n useNativeDriver: true,\n }),\n ])\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,aAAa,GAAG,CAC3BC,MAD2B,EAE3BC,aAF2B,KAGlB;EACT,IAAID,MAAJ,EAAY;IACVE,qBAAA,CAASC,IAAT,CACED,qBAAA,CAASE,MAAT,CAAgBH,aAAhB,EAA+B;MAC7BI,OAAO,EAAE,CADoB;MAE7BC,QAAQ,EAAE,IAFmB;MAG7BC,MAAM,EAAEC,mBAAA,CAAOC,KAAP,CAAaD,mBAAA,CAAOE,MAApB,CAHqB;MAI7BC,eAAe,EAAE;IAJY,CAA/B,CADF,EAOEC,KAPF;;IAQA;EACD;;EACDV,qBAAA,CAASE,MAAT,CAAgBH,aAAhB,EAA+B;IAC7BI,OAAO,EAAE,CADoB;IAE7BM,eAAe,EAAE;EAFY,CAA/B,EAGGC,KAHH;AAID,CAnBM;;;;AAqBA,MAAMC,cAAc,GAAG,CAC5Bb,MAD4B,EAE5BC,aAF4B,KAGnB;EACT,IAAID,MAAJ,EAAY;IACVE,qBAAA,CAASC,IAAT,CACED,qBAAA,CAASY,QAAT,CAAkB,CAChBZ,qBAAA,CAASE,MAAT,CAAgBH,aAAhB,EAA+B;MAC7BI,OAAO,EAAE,CADoB;MAE7BC,QAAQ,EAAE,GAFmB;MAG7BK,eAAe,EAAE;IAHY,CAA/B,CADgB,EAMhBT,qBAAA,CAASE,MAAT,CAAgBH,aAAhB,EAA+B;MAC7BI,OAAO,EAAE,CADoB;MAE7BC,QAAQ,EAAE,GAFmB;MAG7BK,eAAe,EAAE;IAHY,CAA/B,CANgB,CAAlB,CADF,EAaEC,KAbF;;IAcA;EACD;;EACDV,qBAAA,CAASE,MAAT,CAAgBH,aAAhB,EAA+B;IAC7BI,OAAO,EAAE,CADoB;IAE7BM,eAAe,EAAE;EAFY,CAA/B,EAGGC,KAHH;AAID,CAzBM"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Skeleton", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Skeleton.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "SkeletonProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Skeleton.SkeletonProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _Skeleton = _interopRequireWildcard(require("./Skeleton"));
|
|
7
20
|
|
|
8
|
-
exports.Skeleton = _Skeleton.default;
|
|
9
|
-
exports.SkeletonProps = _Skeleton.SkeletonProps;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Skeleton/index.ts"],"sourcesContent":["export { default as Skeleton, SkeletonProps } from './Skeleton';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Skeleton/index.ts"],"sourcesContent":["export { default as Skeleton, SkeletonProps } from './Skeleton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.Wrapper = void 0;
|
|
5
7
|
|
|
6
8
|
var _native = _interopRequireDefault(require("@emotion/native"));
|
|
7
9
|
|
|
8
10
|
var _reactCore = require("@tecsinapse/react-core");
|
|
9
11
|
|
|
12
|
+
var _templateObject;
|
|
13
|
+
|
|
10
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
width
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
+
|
|
18
|
+
const Wrapper = _native.default.View(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n overflow: hidden;\n position: relative;\n"])), _ref => {
|
|
19
|
+
let {
|
|
20
|
+
width
|
|
21
|
+
} = _ref;
|
|
22
|
+
return width ? "".concat((0, _reactCore.RFValueStr)("".concat(width, "px"))) : '100%';
|
|
23
|
+
}, _ref2 => {
|
|
24
|
+
let {
|
|
25
|
+
height
|
|
26
|
+
} = _ref2;
|
|
27
|
+
return height ? "".concat((0, _reactCore.RFValueStr)("".concat(height, "px"))) : 'auto';
|
|
28
|
+
}, _ref3 => {
|
|
29
|
+
let {
|
|
30
|
+
theme,
|
|
31
|
+
radius
|
|
32
|
+
} = _ref3;
|
|
33
|
+
return radius ? theme.borderRadius[radius] : 0;
|
|
34
|
+
});
|
|
35
|
+
|
|
26
36
|
exports.Wrapper = Wrapper;
|
|
27
37
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["Wrapper","styled","View","width","RFValueStr","height","theme","radius","borderRadius"],"sources":["../../../../src/components/atoms/Skeleton/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { RFValueStr, StyleProps } from '@tecsinapse/react-core';\nimport { SkeletonProps } from './Skeleton';\n\nexport const Wrapper = styled.View<Partial<StyleProps & SkeletonProps>>`\n width: ${({ width }) => (width ? `${RFValueStr(`${width}px`)}` : '100%')};\n height: ${({ height }) => (height ? `${RFValueStr(`${height}px`)}` : 'auto')};\n border-radius: ${({ theme, radius }: StyleProps & Partial<SkeletonProps>) =>\n radius ? theme.borderRadius[radius] : 0};\n overflow: hidden;\n position: relative;\n`;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["Wrapper","styled","View","width","RFValueStr","height","theme","radius","borderRadius"],"sources":["../../../../src/components/atoms/Skeleton/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { RFValueStr, StyleProps } from '@tecsinapse/react-core';\nimport { SkeletonProps } from './Skeleton';\n\nexport const Wrapper = styled.View<Partial<StyleProps & SkeletonProps>>`\n width: ${({ width }) => (width ? `${RFValueStr(`${width}px`)}` : '100%')};\n height: ${({ height }) => (height ? `${RFValueStr(`${height}px`)}` : 'auto')};\n border-radius: ${({ theme, radius }: StyleProps & Partial<SkeletonProps>) =>\n radius ? theme.borderRadius[radius] : 0};\n overflow: hidden;\n position: relative;\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAGO,MAAMA,OAAO,GAAGC,eAAA,CAAOC,IAAV,6KACT;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAAgBA,KAAK,aAAM,IAAAC,qBAAA,YAAcD,KAAd,QAAN,IAAmC,MAAxD;AAAA,CADS,EAER;EAAA,IAAC;IAAEE;EAAF,CAAD;EAAA,OAAiBA,MAAM,aAAM,IAAAD,qBAAA,YAAcC,MAAd,QAAN,IAAoC,MAA3D;AAAA,CAFQ,EAGD;EAAA,IAAC;IAAEC,KAAF;IAASC;EAAT,CAAD;EAAA,OACfA,MAAM,GAAGD,KAAK,CAACE,YAAN,CAAmBD,MAAnB,CAAH,GAAgC,CADvB;AAAA,CAHC,CAAb"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -17,13 +19,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
19
|
|
|
18
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
21
|
|
|
20
|
-
const SnappingSlider =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const SnappingSlider = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
children,
|
|
25
|
+
showAmount,
|
|
26
|
+
scrollAmount,
|
|
27
|
+
spacing,
|
|
28
|
+
...rest
|
|
29
|
+
} = _ref;
|
|
27
30
|
const theme = (0, _react2.useTheme)();
|
|
28
31
|
const childCount = React.Children.count(children);
|
|
29
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnappingSlider.js","names":["SnappingSlider","children","showAmount","scrollAmount","spacing","rest","theme","useTheme","childCount","React","Children","count","screenWidth","Dimensions","get","width","totalSlideWidth","Math","round","horizontalPadding","extractNumbersFromString","snapToOffsets","Array","ceil","keys","map","index","offset","padCompensation","sign","child","isFirst","isLast","paddingHorizontal","paddingLeft","paddingRight"],"sources":["../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SnappingSlider.js","names":["SnappingSlider","children","showAmount","scrollAmount","spacing","rest","theme","useTheme","childCount","React","Children","count","screenWidth","Dimensions","get","width","totalSlideWidth","Math","round","horizontalPadding","extractNumbersFromString","snapToOffsets","Array","ceil","keys","map","index","offset","padCompensation","sign","child","isFirst","isLast","paddingHorizontal","paddingLeft","paddingRight"],"sources":["../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAKA;;;;;;;;AAuBA,MAAMA,cAA6C,GAAG,QAMhD;EAAA,IANiD;IACrDC,QADqD;IAErDC,UAFqD;IAGrDC,YAHqD;IAIrDC,OAJqD;IAKrD,GAAGC;EALkD,CAMjD;EACJ,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,UAAU,GAAGC,KAAK,CAACC,QAAN,CAAeC,KAAf,CAAqBV,QAArB,CAAnB;;EACA,MAAMW,WAAW,GAAGC,uBAAA,CAAWC,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;EACA,MAAMC,eAAe,GAAGC,IAAI,CAACC,KAAL,CAAWN,WAAW,GAAGV,UAAzB,CAAxB;EACA,MAAMiB,iBAAiB,GAAGf,OAAO,GAC7B,IAAAgB,mCAAA,EAAyBd,KAAK,CAACF,OAAN,CAAcA,OAAd,CAAzB,IAAmD,CADtB,GAE7B,CAFJ;EAIA,MAAMiB,aAAa,GAAG,CACpB,GAAGC,KAAK,CAACL,IAAI,CAACM,IAAL,CAAUf,UAAU,GAAGL,YAAvB,CAAD,CAAL,CAA4CqB,IAA5C,EADiB,EAEpBC,GAFoB,CAEhBC,KAAK,IAAI;IACb,MAAMC,MAAM,GAAGX,eAAe,GAAGb,YAAlB,GAAiCuB,KAAhD;IACA,MAAME,eAAe,GAAGT,iBAAiB,GAAGF,IAAI,CAACY,IAAL,CAAUH,KAAV,CAA5C;IACA,OAAOC,MAAM,GAAGC,eAAhB;EACD,CANqB,CAAtB;EAQA,OACE,oBAAC,uBAAD;IACE,UAAU,MADZ;IAEE,aAAa,EAAEP,aAFjB;IAGE,WAAW,MAHb;IAIE,SAAS,MAJX;IAKE,8BAA8B,EAAE;EALlC,GAMMhB,IANN,GAQGI,KAAK,CAACC,QAAN,CAAee,GAAf,CAAmBxB,QAAnB,EAA6B,CAAC6B,KAAD,EAAQJ,KAAR,KAAkB;IAC9C,MAAMK,OAAO,GAAGL,KAAK,KAAK,CAA1B;IACA,MAAMM,MAAM,GAAGN,KAAK,KAAKlB,UAAU,GAAG,CAAtC;IAEA,OACE,oBAAC,iBAAD;MACE,KAAK,EAAE;QACLO,KAAK,EAAEC,eADF;QAELiB,iBAAiB,EAAEd,iBAFd;QAGLe,WAAW,EAAEH,OAAO,GAAG,CAAH,GAAOZ,iBAHtB;QAILgB,YAAY,EAAEH,MAAM,GAAG,CAAH,GAAOb;MAJtB;IADT,GAQGW,KARH,CADF;EAYD,CAhBA,CARH,CADF;AA4BD,CApDD;;eAsDe9B,c"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "SnappingSlider", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _SnappingSlider.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "SnappingSliderProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _SnappingSlider.SnappingSliderProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _SnappingSlider = _interopRequireWildcard(require("./SnappingSlider"));
|
|
7
20
|
|
|
8
|
-
exports.SnappingSlider = _SnappingSlider.default;
|
|
9
|
-
exports.SnappingSliderProps = _SnappingSlider.SnappingSliderProps;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/SnappingSlider/index.ts"],"sourcesContent":["export {\n default as SnappingSlider,\n SnappingSliderProps,\n} from './SnappingSlider';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/SnappingSlider/index.ts"],"sourcesContent":["export {\n default as SnappingSlider,\n SnappingSliderProps,\n} from './SnappingSlider';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -13,10 +15,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
15
|
|
|
14
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
17
|
|
|
16
|
-
const Tag =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const Tag = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
value,
|
|
21
|
+
...rest
|
|
22
|
+
} = _ref;
|
|
20
23
|
return _react.default.createElement(_reactCore.Tag, _extends({
|
|
21
24
|
value: _react.default.createElement(_Text.Text, {
|
|
22
25
|
colorVariant: "secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","names":["Tag","value","rest","variant"],"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["Tag","value","rest","variant"],"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;;;;;AAMA,MAAMA,GAAuB,GAAG,QAAqC;EAAA,IAApC;IAAEC,KAAF;IAAS,GAAGC;EAAZ,CAAoC;EACnE,OACE,6BAAC,cAAD;IACE,KAAK,EACH,6BAAC,UAAD;MACE,YAAY,EAAC,WADf;MAEE,SAAS,EAAC,MAFZ;MAGE,SAAS,EAAC,SAHZ;MAIE,UAAU,EAAC,MAJb;MAKE,UAAU,EAAEA,IAAI,CAACC,OAAL,KAAiB,OAAjB,GAA2B,KAA3B,GAAmC;IALjD,GAOGF,KAPH;EAFJ,GAYMC,IAZN,EADF;AAgBD,CAjBD;;eAmBeF,G"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Tag", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Tag.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "TagProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Tag.TagProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _Tag = _interopRequireWildcard(require("./Tag"));
|
|
7
20
|
|
|
8
|
-
exports.Tag = _Tag.default;
|
|
9
|
-
exports.TagProps = _Tag.TagProps;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Tag/index.ts"],"sourcesContent":["export { default as Tag, TagProps } from './Tag';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Tag/index.ts"],"sourcesContent":["export { default as Tag, TagProps } from './Tag';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -9,10 +11,11 @@ var _styled = require("./styled");
|
|
|
9
11
|
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
|
|
12
|
-
const Text =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const Text = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
18
|
+
} = _ref;
|
|
16
19
|
return _react.default.createElement(_styled.StyledNativeText, rest, children);
|
|
17
20
|
};
|
|
18
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":["Text","children","rest"],"sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.js","names":["Text","children","rest"],"sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"mappings":";;;;;;;AACA;;AACA;;;;AAIA,MAAMA,IAAyB,GAAG,QAAwC;EAAA,IAAvC;IAAEC,QAAF;IAAY,GAAGC;EAAf,CAAuC;EACxE,OAAO,6BAAC,wBAAD,EAAsBA,IAAtB,EAA6BD,QAA7B,CAAP;AACD,CAFD;;eAIeD,I"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Text", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Text.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "TextNativeProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Text.TextNativeProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _Text = _interopRequireWildcard(require("./Text"));
|
|
7
20
|
|
|
8
|
-
exports.Text = _Text.default;
|
|
9
|
-
exports.TextNativeProps = _Text.TextNativeProps;
|
|
10
|
-
|
|
11
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
22
|
|
|
13
23
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Text/index.ts"],"sourcesContent":["export { default as Text, TextNativeProps } from './Text';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Text/index.ts"],"sourcesContent":["export { default as Text, TextNativeProps } from './Text';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.fontStyles = exports.StyledNativeText = void 0;
|
|
5
7
|
|
|
6
8
|
var _native = _interopRequireWildcard(require("@emotion/native"));
|
|
@@ -9,21 +11,23 @@ var _reactCore = require("@tecsinapse/react-core");
|
|
|
9
11
|
|
|
10
12
|
var _reactNative = require("react-native");
|
|
11
13
|
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
12
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); }
|
|
13
17
|
|
|
14
18
|
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; }
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
22
|
+
const fontStyles = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
theme,
|
|
25
|
+
fontStack = 'default',
|
|
26
|
+
fontWeight = 'regular'
|
|
27
|
+
} = _ref;
|
|
28
|
+
const fontFamily = (theme === null || theme === void 0 ? void 0 : theme.font.stack[fontStack]) || '';
|
|
29
|
+
const fontStyle = theme === null || theme === void 0 ? void 0 : theme.font.files[fontWeight];
|
|
30
|
+
return (0, _native.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n font-family: ", ";\n "])), _reactNative.Platform.OS === 'android' ? 'font-weight: normal;' : undefined, fontStyle === null || fontStyle === void 0 ? void 0 : fontStyle.replace('{0}', fontFamily));
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
exports.fontStyles = fontStyles;
|