@tecsinapse/react-core 2.2.1-beta.0 → 3.0.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/README.md +33 -7
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js +2 -2
- package/dist/cjs/components/atoms/ProgressBar/ProgressBar.js +2 -4
- package/dist/cjs/components/atoms/ProgressBar/styled.js +2 -2
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +1 -14
- package/dist/cjs/components/molecules/Snackbar/styled.js +0 -6
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js +1 -1
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js +2 -4
- package/dist/esm/components/atoms/ProgressBar/styled.js +2 -2
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +2 -15
- package/dist/esm/components/molecules/Snackbar/styled.js +1 -6
- package/dist/types/components/atoms/Avatar/Avatar.d.ts +2 -12
- package/dist/types/components/atoms/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/types/components/atoms/Avatar/index.d.ts +1 -1
- package/dist/types/components/atoms/Avatar/styled.d.ts +1 -1
- package/dist/types/components/atoms/Avatar/types.d.ts +12 -0
- package/dist/types/components/atoms/Card/Card.d.ts +1 -1
- package/dist/types/components/atoms/Card/Card.stories.d.ts +0 -1
- package/dist/types/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -1
- package/dist/types/components/atoms/GroupButton/GroupButton.d.ts +0 -1
- package/dist/types/components/atoms/GroupButton/GroupButton.stories.d.ts +0 -1
- package/dist/types/components/atoms/Icon/AntDesign.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Entypo.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Evil.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Feather.d.ts +0 -1
- package/dist/types/components/atoms/Icon/FontAwesome.d.ts +0 -1
- package/dist/types/components/atoms/Icon/FontAwesomeFive.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Fontisto.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Foundation.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Ionicon.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Material.d.ts +0 -1
- package/dist/types/components/atoms/Icon/MaterialCommunity.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Octicon.d.ts +0 -1
- package/dist/types/components/atoms/Icon/SimpleLine.d.ts +0 -1
- package/dist/types/components/atoms/Icon/Zocial.d.ts +0 -1
- package/dist/types/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -0
- package/dist/types/components/atoms/Paper/Paper.stories.d.ts +0 -1
- package/dist/types/components/atoms/ProgressBar/ProgressBar.d.ts +1 -7
- package/dist/types/components/atoms/ProgressBar/ProgressBar.stories.d.ts +1 -2
- package/dist/types/components/atoms/ProgressBar/styled.d.ts +4 -3
- package/dist/types/components/atoms/RadioButton/RadioButton.stories.d.ts +0 -1
- package/dist/types/components/atoms/Text/Text.d.ts +1 -0
- package/dist/types/components/molecules/Snackbar/styled.d.ts +0 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# TecSinapse Design System
|
|
4
4
|
|
|
5
|
-
[](https://github.com/tecsinapse/design-system/) [](./LICENSE.md) [](CODE_OF_CONDUCT.md)](https://github.com/tecsinapse/design-system/) [](./LICENSE.md) [](CODE_OF_CONDUCT.md)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
[TecSinapse Design System](https://tecsinapse.github.io/design-system) is the hybrid implementation of the [TecSinapse](https://www.tecsinapse.com.br/) Design System.
|
|
@@ -23,11 +23,12 @@ Here are a few helpful links for getting started:
|
|
|
23
23
|
|
|
24
24
|
## Packages
|
|
25
25
|
|
|
26
|
-
| Package | Content | Version
|
|
27
|
-
|
|
28
|
-
| **[@tecsinapse/react-core](./packages/react-core)** | the core hybrid React component library | [](https://badge.fury.io/js/%40tecsinapse%2Freact-core)
|
|
29
|
-
| **[@tecsinapse/react-web-kit](./packages/react-web-kit)** | the React component library focused on web | [](https://badge.fury.io/js/%40tecsinapse%2Freact-web-kit)
|
|
26
|
+
| Package | Content | Version |
|
|
27
|
+
|-----------------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
|
28
|
+
| **[@tecsinapse/react-core](./packages/react-core)** | the core hybrid React component library | [](https://badge.fury.io/js/%40tecsinapse%2Freact-core) |
|
|
29
|
+
| **[@tecsinapse/react-web-kit](./packages/react-web-kit)** | the React component library focused on web | [](https://badge.fury.io/js/%40tecsinapse%2Freact-web-kit) |
|
|
30
30
|
| **[@tecsinapse/react-native-kit](./packages/react-native-kit)** | the React native component library focused on mobile | [](https://badge.fury.io/js/%40tecsinapse%2Freact-native-kit) |
|
|
31
|
+
| **[@tecsinapse/react-charts](./packages/react-charts)** | Charts for React based on SVG | [](https://badge.fury.io/js/%40tecsinapse%2Freact-charts) |
|
|
31
32
|
|
|
32
33
|
## Code of conduct
|
|
33
34
|
|
|
@@ -35,11 +36,36 @@ We want to foster an inclusive and friendly community around our Open Source eff
|
|
|
35
36
|
|
|
36
37
|
If you feel another member of the community violated our code or you are experiencing problems participating in our community because of another individual's behavior, please get in touch with our maintainers.
|
|
37
38
|
|
|
39
|
+
## How to make local changes available for other projects?
|
|
40
|
+
|
|
41
|
+
At times, it may be necessary to test changes directly in a product, and not in the design system, and for this to work in a less laborious way, we can follow the steps below:
|
|
42
|
+
|
|
43
|
+
3 terminal tabs should open:
|
|
44
|
+
- In one run the JS code watch:
|
|
45
|
+
```
|
|
46
|
+
yarn build:watch
|
|
47
|
+
```
|
|
48
|
+
- In another run the watch of the TS code watch
|
|
49
|
+
```
|
|
50
|
+
yarn build:declarations:watch
|
|
51
|
+
```
|
|
52
|
+
- On another run yalc push (this script updates linked local projects)
|
|
53
|
+
```
|
|
54
|
+
yarn yalc:push
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
With that, all changes will be in yalc locally.
|
|
58
|
+
|
|
59
|
+
To access in your application, see this [example](https://github.com/tecsinapse/vendas-web-poc-playground#tools) in topic "**Yalc link Design System:**"
|
|
60
|
+
|
|
61
|
+
|
|
38
62
|
### Maintainers
|
|
39
63
|
|
|
64
|
+
- [Beatriz Silva](mailto:beatriz.silva@tecsinapse.com.br)
|
|
40
65
|
- [Denner Vidal](mailto:denner.vidal@tecsinapse.com.br)
|
|
41
|
-
- [
|
|
42
|
-
- [
|
|
66
|
+
- [Gabriel Sanches](mailto:gabriel.sanches@tecsinapse.com.br)
|
|
67
|
+
- [Lucas Ramos](mailto:lucas.ramos@tecsinapse.com.br)
|
|
68
|
+
- [Nilson Antonio](mailto:nilson.antonio@tecsinapse.com.br)
|
|
43
69
|
- [Ryan Correa](mailto:ryan.correa@tecsinapse.com.br)
|
|
44
70
|
|
|
45
71
|
## Contributing
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var styled = require('../styled.js');
|
|
5
|
-
var
|
|
5
|
+
var useTheme = require('../../../../hooks/useTheme.js');
|
|
6
6
|
|
|
7
7
|
const InputElement = React.forwardRef(
|
|
8
8
|
({
|
|
@@ -13,7 +13,7 @@ const InputElement = React.forwardRef(
|
|
|
13
13
|
placeholderTextColor,
|
|
14
14
|
...rest
|
|
15
15
|
}, ref) => {
|
|
16
|
-
const theme =
|
|
16
|
+
const theme = useTheme.useTheme();
|
|
17
17
|
const _placeholderColor = placeholderTextColor || theme.font?.color?.dark;
|
|
18
18
|
return /* @__PURE__ */ React.createElement(
|
|
19
19
|
styled.StyledInputElement,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var react = require('@emotion/react');
|
|
5
|
-
var reactNative = require('react-native');
|
|
6
5
|
var extractNumbersFromString = require('../../../utils/extractNumbersFromString.js');
|
|
7
6
|
require('../Text/styled.js');
|
|
8
7
|
require('../Input/styled.js');
|
|
@@ -10,6 +9,7 @@ require('currency.js');
|
|
|
10
9
|
require('../Input/InputElement/InputElement.js');
|
|
11
10
|
require('../Input/InputMaskElement/InputMaskElement.js');
|
|
12
11
|
require('../Input/PressableInputContainer/styled.js');
|
|
12
|
+
require('react-native');
|
|
13
13
|
var styled = require('./styled.js');
|
|
14
14
|
|
|
15
15
|
const ProgressBar = ({
|
|
@@ -19,11 +19,9 @@ const ProgressBar = ({
|
|
|
19
19
|
valueMax = 100,
|
|
20
20
|
color = "primary",
|
|
21
21
|
colorTone = "medium",
|
|
22
|
-
animationParameters,
|
|
23
22
|
...rest
|
|
24
23
|
}) => {
|
|
25
24
|
const theme = react.useTheme();
|
|
26
|
-
React.useRef(new reactNative.Animated.Value(0)).current;
|
|
27
25
|
const valueNow = typeof _valueNow === "string" ? extractNumbersFromString.extractNumbersFromString(_valueNow) : _valueNow;
|
|
28
26
|
const totalProgress = (valueNow - valueMin) / (valueMax - valueMin) * 100;
|
|
29
27
|
const segments = Math.max(1, _segments);
|
|
@@ -34,7 +32,7 @@ const ProgressBar = ({
|
|
|
34
32
|
const min = segmentWidth * index;
|
|
35
33
|
const minmax = (totalProgress - min) / (max - min);
|
|
36
34
|
const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;
|
|
37
|
-
|
|
35
|
+
const progressPercent = `${width}%`;
|
|
38
36
|
return /* @__PURE__ */ React.createElement(
|
|
39
37
|
styled.Segment,
|
|
40
38
|
{
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styled = require('@emotion/native');
|
|
4
|
-
var reactNative = require('react-native');
|
|
5
4
|
require('react');
|
|
6
5
|
require('../Text/styled.js');
|
|
7
6
|
require('../Input/styled.js');
|
|
@@ -9,6 +8,7 @@ require('currency.js');
|
|
|
9
8
|
require('../Input/InputElement/InputElement.js');
|
|
10
9
|
require('../Input/InputMaskElement/InputMaskElement.js');
|
|
11
10
|
require('../Input/PressableInputContainer/styled.js');
|
|
11
|
+
require('react-native');
|
|
12
12
|
var ResponsiveFontSize = require('../../../utils/ResponsiveFontSize.js');
|
|
13
13
|
|
|
14
14
|
const Container = styled.View`
|
|
@@ -25,7 +25,7 @@ const Segment = styled.View`
|
|
|
25
25
|
border-right-width: ${ResponsiveFontSize.RFValueStr("2px")};
|
|
26
26
|
border-color: ${({ theme }) => theme.color.secondary.xlight};
|
|
27
27
|
`;
|
|
28
|
-
const Progress = styled
|
|
28
|
+
const Progress = styled.View`
|
|
29
29
|
height: 100%;
|
|
30
30
|
border-color: ${({ theme }) => theme.color.secondary.xlight};
|
|
31
31
|
`;
|
|
@@ -22,7 +22,6 @@ const Snackbar = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
const fadeAnim = React.useRef(new reactNative.Animated.Value(0)).current;
|
|
24
24
|
const timeoutRef = React.useRef();
|
|
25
|
-
const showProgressBar = false;
|
|
26
25
|
const fadeIn = () => {
|
|
27
26
|
reactNative.Animated.timing(fadeAnim, {
|
|
28
27
|
toValue: 1,
|
|
@@ -80,19 +79,7 @@ const Snackbar = ({
|
|
|
80
79
|
name: "close",
|
|
81
80
|
type: "material-community"
|
|
82
81
|
}
|
|
83
|
-
)))
|
|
84
|
-
timeout && showProgressBar && open && /* @__PURE__ */ React.createElement(
|
|
85
|
-
styled.StyledProgressBar,
|
|
86
|
-
{
|
|
87
|
-
valueNow: 0,
|
|
88
|
-
valueMax: 100,
|
|
89
|
-
valueMin: 0,
|
|
90
|
-
animate: true,
|
|
91
|
-
color: colorVariant,
|
|
92
|
-
colorTone: "medium",
|
|
93
|
-
animationParameters: { direction: "left", duration: timeout }
|
|
94
|
-
}
|
|
95
|
-
)
|
|
82
|
+
)))
|
|
96
83
|
);
|
|
97
84
|
};
|
|
98
85
|
|
|
@@ -12,7 +12,6 @@ require('../../atoms/Input/PressableInputContainer/styled.js');
|
|
|
12
12
|
var ResponsiveFontSize = require('../../../utils/ResponsiveFontSize.js');
|
|
13
13
|
var Paper = require('../../atoms/Paper/Paper.js');
|
|
14
14
|
var PressableSurface = require('../../atoms/PressableSurface/PressableSurface.js');
|
|
15
|
-
var ProgressBar = require('../../atoms/ProgressBar/ProgressBar.js');
|
|
16
15
|
|
|
17
16
|
const baseStyles = ({
|
|
18
17
|
theme,
|
|
@@ -73,10 +72,6 @@ const DismissContainer = styled(PressableSurface)`
|
|
|
73
72
|
align-items: center;
|
|
74
73
|
margin-left: ${({ theme }) => theme.spacing.mili};
|
|
75
74
|
`;
|
|
76
|
-
const StyledProgressBar = styled(ProgressBar)`
|
|
77
|
-
border-top-left-radius: 0;
|
|
78
|
-
border-top-right-radius: 0;
|
|
79
|
-
`;
|
|
80
75
|
const StyledContainerFlexRow = styled(reactNative.View)`
|
|
81
76
|
display: flex;
|
|
82
77
|
flex-direction: row;
|
|
@@ -93,5 +88,4 @@ exports.DismissContainer = DismissContainer;
|
|
|
93
88
|
exports.IconContainer = IconContainer;
|
|
94
89
|
exports.SnackbarContainer = SnackbarContainer;
|
|
95
90
|
exports.StyledContainerFlexRow = StyledContainerFlexRow;
|
|
96
|
-
exports.StyledProgressBar = StyledProgressBar;
|
|
97
91
|
exports.TextContainer = TextContainer;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { useTheme } from '@emotion/react';
|
|
3
|
-
import { Animated } from 'react-native';
|
|
4
3
|
import { extractNumbersFromString } from '../../../utils/extractNumbersFromString.js';
|
|
5
4
|
import '../Text/styled.js';
|
|
6
5
|
import '../Input/styled.js';
|
|
@@ -8,6 +7,7 @@ import 'currency.js';
|
|
|
8
7
|
import '../Input/InputElement/InputElement.js';
|
|
9
8
|
import '../Input/InputMaskElement/InputMaskElement.js';
|
|
10
9
|
import '../Input/PressableInputContainer/styled.js';
|
|
10
|
+
import 'react-native';
|
|
11
11
|
import { Segment, Progress, Container } from './styled.js';
|
|
12
12
|
|
|
13
13
|
const ProgressBar = ({
|
|
@@ -17,11 +17,9 @@ const ProgressBar = ({
|
|
|
17
17
|
valueMax = 100,
|
|
18
18
|
color = "primary",
|
|
19
19
|
colorTone = "medium",
|
|
20
|
-
animationParameters,
|
|
21
20
|
...rest
|
|
22
21
|
}) => {
|
|
23
22
|
const theme = useTheme();
|
|
24
|
-
React__default.useRef(new Animated.Value(0)).current;
|
|
25
23
|
const valueNow = typeof _valueNow === "string" ? extractNumbersFromString(_valueNow) : _valueNow;
|
|
26
24
|
const totalProgress = (valueNow - valueMin) / (valueMax - valueMin) * 100;
|
|
27
25
|
const segments = Math.max(1, _segments);
|
|
@@ -32,7 +30,7 @@ const ProgressBar = ({
|
|
|
32
30
|
const min = segmentWidth * index;
|
|
33
31
|
const minmax = (totalProgress - min) / (max - min);
|
|
34
32
|
const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;
|
|
35
|
-
|
|
33
|
+
const progressPercent = `${width}%`;
|
|
36
34
|
return /* @__PURE__ */ React__default.createElement(
|
|
37
35
|
Segment,
|
|
38
36
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
2
|
import 'react';
|
|
4
3
|
import '../Text/styled.js';
|
|
5
4
|
import '../Input/styled.js';
|
|
@@ -7,6 +6,7 @@ import 'currency.js';
|
|
|
7
6
|
import '../Input/InputElement/InputElement.js';
|
|
8
7
|
import '../Input/InputMaskElement/InputMaskElement.js';
|
|
9
8
|
import '../Input/PressableInputContainer/styled.js';
|
|
9
|
+
import 'react-native';
|
|
10
10
|
import { RFValueStr } from '../../../utils/ResponsiveFontSize.js';
|
|
11
11
|
|
|
12
12
|
const Container = styled.View`
|
|
@@ -23,7 +23,7 @@ const Segment = styled.View`
|
|
|
23
23
|
border-right-width: ${RFValueStr("2px")};
|
|
24
24
|
border-color: ${({ theme }) => theme.color.secondary.xlight};
|
|
25
25
|
`;
|
|
26
|
-
const Progress = styled
|
|
26
|
+
const Progress = styled.View`
|
|
27
27
|
height: 100%;
|
|
28
28
|
border-color: ${({ theme }) => theme.color.secondary.xlight};
|
|
29
29
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { Animated } from 'react-native';
|
|
3
3
|
import Icon from '../../atoms/Icon/Icon.js';
|
|
4
|
-
import { SnackbarContainer, StyledContainerFlexRow, ContentContainer, IconContainer, TextContainer, DismissContainer
|
|
4
|
+
import { SnackbarContainer, StyledContainerFlexRow, ContentContainer, IconContainer, TextContainer, DismissContainer } from './styled.js';
|
|
5
5
|
|
|
6
6
|
const FADE_DURATION = 500;
|
|
7
7
|
const Snackbar = ({
|
|
@@ -20,7 +20,6 @@ const Snackbar = ({
|
|
|
20
20
|
}) => {
|
|
21
21
|
const fadeAnim = React__default.useRef(new Animated.Value(0)).current;
|
|
22
22
|
const timeoutRef = React__default.useRef();
|
|
23
|
-
const showProgressBar = false;
|
|
24
23
|
const fadeIn = () => {
|
|
25
24
|
Animated.timing(fadeAnim, {
|
|
26
25
|
toValue: 1,
|
|
@@ -78,19 +77,7 @@ const Snackbar = ({
|
|
|
78
77
|
name: "close",
|
|
79
78
|
type: "material-community"
|
|
80
79
|
}
|
|
81
|
-
)))
|
|
82
|
-
timeout && showProgressBar && open && /* @__PURE__ */ React__default.createElement(
|
|
83
|
-
StyledProgressBar,
|
|
84
|
-
{
|
|
85
|
-
valueNow: 0,
|
|
86
|
-
valueMax: 100,
|
|
87
|
-
valueMin: 0,
|
|
88
|
-
animate: true,
|
|
89
|
-
color: colorVariant,
|
|
90
|
-
colorTone: "medium",
|
|
91
|
-
animationParameters: { direction: "left", duration: timeout }
|
|
92
|
-
}
|
|
93
|
-
)
|
|
80
|
+
)))
|
|
94
81
|
);
|
|
95
82
|
};
|
|
96
83
|
|
|
@@ -10,7 +10,6 @@ import '../../atoms/Input/PressableInputContainer/styled.js';
|
|
|
10
10
|
import { RFValue } from '../../../utils/ResponsiveFontSize.js';
|
|
11
11
|
import Paper from '../../atoms/Paper/Paper.js';
|
|
12
12
|
import PressableSurface from '../../atoms/PressableSurface/PressableSurface.js';
|
|
13
|
-
import ProgressBar from '../../atoms/ProgressBar/ProgressBar.js';
|
|
14
13
|
|
|
15
14
|
const baseStyles = ({
|
|
16
15
|
theme,
|
|
@@ -71,10 +70,6 @@ const DismissContainer = styled(PressableSurface)`
|
|
|
71
70
|
align-items: center;
|
|
72
71
|
margin-left: ${({ theme }) => theme.spacing.mili};
|
|
73
72
|
`;
|
|
74
|
-
const StyledProgressBar = styled(ProgressBar)`
|
|
75
|
-
border-top-left-radius: 0;
|
|
76
|
-
border-top-right-radius: 0;
|
|
77
|
-
`;
|
|
78
73
|
const StyledContainerFlexRow = styled(View)`
|
|
79
74
|
display: flex;
|
|
80
75
|
flex-direction: row;
|
|
@@ -86,4 +81,4 @@ const TextContainer = styled(View)`
|
|
|
86
81
|
flex-shrink: 1;
|
|
87
82
|
`;
|
|
88
83
|
|
|
89
|
-
export { ContentContainer, DismissContainer, IconContainer, SnackbarContainer, StyledContainerFlexRow,
|
|
84
|
+
export { ContentContainer, DismissContainer, IconContainer, SnackbarContainer, StyledContainerFlexRow, TextContainer };
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import { IconSize } from '../../../types/defaults';
|
|
4
|
-
import { TextProps } from '../Text';
|
|
5
|
-
export type SizeAvatar = Omit<IconSize, 'centi' | 'deca'>;
|
|
6
|
-
export interface AvatarProps {
|
|
7
|
-
source?: ImageSourcePropType;
|
|
8
|
-
name: string;
|
|
9
|
-
onPress?: () => void;
|
|
10
|
-
size?: keyof SizeAvatar;
|
|
11
|
-
TextComponent?: FC<TextProps>;
|
|
12
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarProps } from './types';
|
|
13
3
|
declare const Avatar: React.FC<AvatarProps>;
|
|
14
4
|
export default Avatar;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Avatar } from './Avatar';
|
|
2
|
-
export type { AvatarProps } from './
|
|
2
|
+
export type { AvatarProps } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Image, View } from 'react-native';
|
|
3
3
|
import { TextProps } from '../Text';
|
|
4
|
-
import { AvatarProps } from './
|
|
4
|
+
import { AvatarProps } from './types';
|
|
5
5
|
export declare const ContainerButtonAvatar: import("@emotion/native").StyledComponent<import("../PressableSurface").PressableSurfaceProps & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IconSize } from '../../../types/defaults';
|
|
2
|
+
import { ImageSourcePropType } from 'react-native';
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
import { TextProps } from '../Text';
|
|
5
|
+
export type SizeAvatar = Omit<IconSize, 'centi' | 'deca'>;
|
|
6
|
+
export interface AvatarProps {
|
|
7
|
+
source?: ImageSourcePropType;
|
|
8
|
+
name: string;
|
|
9
|
+
onPress?: () => void;
|
|
10
|
+
size?: keyof SizeAvatar;
|
|
11
|
+
TextComponent?: FC<TextProps>;
|
|
12
|
+
}
|
|
@@ -24,6 +24,7 @@ export interface InputContainerProps {
|
|
|
24
24
|
variant?: InputVariantType;
|
|
25
25
|
hint?: string;
|
|
26
26
|
hintComponent?: JSX.Element;
|
|
27
|
+
testID?: string;
|
|
27
28
|
}
|
|
28
29
|
declare const InputContainer: FC<InputContainerProps & Partial<InputElementProps>>;
|
|
29
30
|
export default InputContainer;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ViewProps } from 'react-native';
|
|
3
2
|
import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
|
|
4
3
|
export interface ProgressBarProps extends ViewProps {
|
|
@@ -8,11 +7,6 @@ export interface ProgressBarProps extends ViewProps {
|
|
|
8
7
|
valueNow: number | string;
|
|
9
8
|
color?: ColorType;
|
|
10
9
|
colorTone?: ColorGradationType;
|
|
11
|
-
animate?: boolean;
|
|
12
|
-
animationParameters?: {
|
|
13
|
-
direction: 'left' | 'right';
|
|
14
|
-
duration: number;
|
|
15
|
-
};
|
|
16
10
|
}
|
|
17
|
-
declare const ProgressBar: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone,
|
|
11
|
+
declare const ProgressBar: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone, ...rest }: ProgressBarProps) => JSX.Element;
|
|
18
12
|
export default ProgressBar;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ProgressBarProps } from './index';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone,
|
|
4
|
+
component: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone, ...rest }: ProgressBarProps) => JSX.Element;
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
7
|
export declare const Base: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ProgressBarProps>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
2
|
export declare const Container: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
4
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -12,7 +11,9 @@ export declare const Segment: import("@emotion/native").StyledComponent<import("
|
|
|
12
11
|
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
13
12
|
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
14
13
|
}>;
|
|
15
|
-
export declare const Progress: import("@emotion/native").StyledComponent<
|
|
14
|
+
export declare const Progress: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
16
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
17
16
|
as?: import("react").ElementType<any> | undefined;
|
|
18
|
-
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
17
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
18
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
19
|
+
}>;
|
|
@@ -23,10 +23,6 @@ export declare const DismissContainer: import("@emotion/native").StyledComponent
|
|
|
23
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
24
|
as?: import("react").ElementType<any> | undefined;
|
|
25
25
|
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
26
|
-
export declare const StyledProgressBar: import("@emotion/native").StyledComponent<import("../../atoms/ProgressBar").ProgressBarProps & {
|
|
27
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
-
as?: import("react").ElementType<any> | undefined;
|
|
29
|
-
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
30
26
|
export declare const StyledContainerFlexRow: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
31
27
|
theme?: import("@emotion/react").Theme | undefined;
|
|
32
28
|
as?: import("react").ElementType<any> | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-core",
|
|
3
3
|
"description": "TecSinapse hybrid React components",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"
|
|
14
|
-
"build:es": "
|
|
13
|
+
"dev": "rollup --watch",
|
|
14
|
+
"build:es": "rollup --config",
|
|
15
15
|
"build:declaration": "tsc --project tsconfig.build.json",
|
|
16
16
|
"build:declaration:watch": "tsc --project tsconfig.build.json --watch",
|
|
17
17
|
"yalc:push": "yalc push --changed",
|
|
18
18
|
"yalc:show": "yalc installations show $npm_package_name"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@emotion/native": "~11.
|
|
22
|
-
"@emotion/react": "~11.
|
|
21
|
+
"@emotion/native": "~11.11.0",
|
|
22
|
+
"@emotion/react": "~11.11.0",
|
|
23
23
|
"currency.js": "~2.0.4",
|
|
24
24
|
"date-fns": "~2.30.0"
|
|
25
25
|
},
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"react-native": "^0.71.0",
|
|
38
38
|
"react-native-vector-icons": "^9.2.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "59db148f23b2b94e8db779e035b43e58a0104fed"
|
|
41
41
|
}
|