secullum-react-native-ui 4.16.2-beta.7 → 4.16.2-beta.9

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 (97) hide show
  1. package/package.json +1 -1
  2. package/lib/components/AppShell.d.ts +0 -52
  3. package/lib/components/AppShell.js +0 -82
  4. package/lib/components/Button.d.ts +0 -49
  5. package/lib/components/Button.js +0 -70
  6. package/lib/components/Card.d.ts +0 -66
  7. package/lib/components/Card.js +0 -131
  8. package/lib/components/CheckBox.d.ts +0 -36
  9. package/lib/components/CheckBox.js +0 -50
  10. package/lib/components/DatePicker.d.ts +0 -67
  11. package/lib/components/DatePicker.js +0 -106
  12. package/lib/components/DatePicker.web.d.ts +0 -64
  13. package/lib/components/DatePicker.web.js +0 -106
  14. package/lib/components/Delay.d.ts +0 -12
  15. package/lib/components/Delay.js +0 -22
  16. package/lib/components/Details.d.ts +0 -67
  17. package/lib/components/Details.js +0 -96
  18. package/lib/components/DetailsHeader.d.ts +0 -41
  19. package/lib/components/DetailsHeader.js +0 -65
  20. package/lib/components/DimensionsMonitor.d.ts +0 -21
  21. package/lib/components/DimensionsMonitor.js +0 -37
  22. package/lib/components/DropDown.d.ts +0 -52
  23. package/lib/components/DropDown.js +0 -351
  24. package/lib/components/ErrorMessage.d.ts +0 -16
  25. package/lib/components/ErrorMessage.js +0 -31
  26. package/lib/components/FilePicker.d.ts +0 -29
  27. package/lib/components/FilePicker.js +0 -46
  28. package/lib/components/Header.d.ts +0 -58
  29. package/lib/components/Header.js +0 -94
  30. package/lib/components/HeaderDesktop.d.ts +0 -59
  31. package/lib/components/HeaderDesktop.js +0 -83
  32. package/lib/components/ImageButton.d.ts +0 -14
  33. package/lib/components/ImageButton.js +0 -34
  34. package/lib/components/KeyboardAvoidingView.d.ts +0 -34
  35. package/lib/components/KeyboardAvoidingView.js +0 -106
  36. package/lib/components/Link.d.ts +0 -18
  37. package/lib/components/Link.js +0 -30
  38. package/lib/components/Loading.d.ts +0 -13
  39. package/lib/components/Loading.js +0 -45
  40. package/lib/components/Menu.d.ts +0 -42
  41. package/lib/components/Menu.js +0 -114
  42. package/lib/components/MenuDesktop.d.ts +0 -24
  43. package/lib/components/MenuDesktop.js +0 -39
  44. package/lib/components/MenuMobile.d.ts +0 -49
  45. package/lib/components/MenuMobile.js +0 -94
  46. package/lib/components/Message.d.ts +0 -37
  47. package/lib/components/Message.js +0 -52
  48. package/lib/components/Modal.d.ts +0 -18
  49. package/lib/components/Modal.js +0 -35
  50. package/lib/components/MultiSelect.d.ts +0 -51
  51. package/lib/components/MultiSelect.js +0 -377
  52. package/lib/components/NoRecordMessage.d.ts +0 -23
  53. package/lib/components/NoRecordMessage.js +0 -36
  54. package/lib/components/Question.d.ts +0 -57
  55. package/lib/components/Question.js +0 -79
  56. package/lib/components/RadioButton.d.ts +0 -43
  57. package/lib/components/RadioButton.js +0 -55
  58. package/lib/components/RadioGroup.d.ts +0 -45
  59. package/lib/components/RadioGroup.js +0 -71
  60. package/lib/components/RangeDatePicker.d.ts +0 -57
  61. package/lib/components/RangeDatePicker.js +0 -127
  62. package/lib/components/RangeDatePicker.web.d.ts +0 -61
  63. package/lib/components/RangeDatePicker.web.js +0 -120
  64. package/lib/components/Space.d.ts +0 -11
  65. package/lib/components/Space.js +0 -15
  66. package/lib/components/StatusBar.d.ts +0 -18
  67. package/lib/components/StatusBar.js +0 -33
  68. package/lib/components/Switch.d.ts +0 -34
  69. package/lib/components/Switch.js +0 -50
  70. package/lib/components/Table.d.ts +0 -30
  71. package/lib/components/Table.js +0 -79
  72. package/lib/components/Table.web.d.ts +0 -18
  73. package/lib/components/Table.web.js +0 -111
  74. package/lib/components/Text.d.ts +0 -29
  75. package/lib/components/Text.js +0 -38
  76. package/lib/components/TextBox.d.ts +0 -84
  77. package/lib/components/TextBox.js +0 -126
  78. package/lib/components/TextBoxMask.d.ts +0 -12
  79. package/lib/components/TextBoxMask.js +0 -34
  80. package/lib/components/TimePicker.d.ts +0 -63
  81. package/lib/components/TimePicker.js +0 -112
  82. package/lib/components/TimePicker.web.d.ts +0 -48
  83. package/lib/components/TimePicker.web.js +0 -88
  84. package/lib/index.d.ts +0 -40
  85. package/lib/index.js +0 -56
  86. package/lib/modules/browser.d.ts +0 -2
  87. package/lib/modules/browser.js +0 -51
  88. package/lib/modules/format.d.ts +0 -6
  89. package/lib/modules/format.js +0 -127
  90. package/lib/modules/layout.d.ts +0 -1
  91. package/lib/modules/layout.js +0 -12
  92. package/lib/modules/test.d.ts +0 -2
  93. package/lib/modules/test.js +0 -18
  94. package/lib/modules/theme.d.ts +0 -41
  95. package/lib/modules/theme.js +0 -52
  96. package/lib/modules/validation.d.ts +0 -3
  97. package/lib/modules/validation.js +0 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.16.2-beta.7",
3
+ "version": "4.16.2-beta.9",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -1,52 +0,0 @@
1
- import * as React from 'react';
2
- import { HeaderButton } from './Header';
3
- import { GreetingMessage } from './HeaderDesktop';
4
- import { MenuProperties } from './Menu';
5
- import { MenuMobile } from './MenuMobile';
6
- import { StyleSheet, StyleProp, TextStyle } from 'react-native';
7
- export declare type AppShellProperties = MenuProperties & {
8
- logoHeader: () => React.ReactNode;
9
- logoMenu: () => React.ReactNode;
10
- title?: string;
11
- greeting?: GreetingMessage;
12
- screenTitle: string;
13
- renderUserData?: () => React.ReactNode;
14
- rightButton?: HeaderButton;
15
- headerStyle?: StyleProp<TextStyle>;
16
- alwaysDesktop?: boolean;
17
- children?: React.ReactNode;
18
- };
19
- export declare class AppShell extends React.Component<AppShellProperties> {
20
- menu: MenuMobile | null;
21
- getMobileStyles: () => StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
22
- container: {
23
- flex: number;
24
- padding: number;
25
- height: number;
26
- overflow: "auto";
27
- };
28
- logoText: {
29
- color: string;
30
- fontFamily: string;
31
- fontSize: number;
32
- marginLeft: number;
33
- display: "flex";
34
- alignItems: "center";
35
- };
36
- }>;
37
- getDesktopStyles: () => StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
38
- container: {
39
- flexDirection: "row";
40
- flex: number;
41
- };
42
- content: {
43
- flex: number;
44
- padding: number;
45
- height: number;
46
- overflow: "auto";
47
- };
48
- }>;
49
- renderMobile: () => JSX.Element;
50
- renderDesktop: () => JSX.Element;
51
- render(): JSX.Element;
52
- }
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppShell = void 0;
4
- const React = require("react");
5
- const DimensionsMonitor_1 = require("./DimensionsMonitor");
6
- const Header_1 = require("./Header");
7
- const HeaderDesktop_1 = require("./HeaderDesktop");
8
- const MenuMobile_1 = require("./MenuMobile");
9
- const MenuDesktop_1 = require("./MenuDesktop");
10
- const theme_1 = require("../modules/theme");
11
- const react_native_1 = require("react-native");
12
- class AppShell extends React.Component {
13
- constructor() {
14
- super(...arguments);
15
- this.menu = null;
16
- this.getMobileStyles = () => {
17
- const theme = (0, theme_1.getTheme)();
18
- const styles = react_native_1.StyleSheet.create({
19
- container: {
20
- flex: 1,
21
- padding: 16,
22
- height: react_native_1.Dimensions.get('window').height - HeaderDesktop_1.HeaderDesktop.height,
23
- // @ts-ignore: O react-native não tem auto, mas o react-native-web aceita
24
- overflow: 'auto'
25
- },
26
- logoText: {
27
- color: theme.textColor1,
28
- fontFamily: theme.fontFamily3,
29
- fontSize: 22,
30
- marginLeft: 10,
31
- display: 'flex',
32
- alignItems: 'center'
33
- }
34
- });
35
- return styles;
36
- };
37
- this.getDesktopStyles = () => {
38
- const styles = react_native_1.StyleSheet.create({
39
- container: {
40
- flexDirection: 'row',
41
- flex: 1
42
- },
43
- content: {
44
- flex: 1,
45
- padding: 16,
46
- height: react_native_1.Dimensions.get('window').height - HeaderDesktop_1.HeaderDesktop.height,
47
- // @ts-ignore: O react-native não tem auto, mas o react-native-web aceita
48
- overflow: 'auto'
49
- }
50
- });
51
- return styles;
52
- };
53
- this.renderMobile = () => {
54
- const { title, logoMenu, screenTitle, renderUserData, menu, onMenuPress, isCurrentMenuPath, children, rightButton } = this.props;
55
- const styles = this.getMobileStyles();
56
- return (React.createElement(MenuMobile_1.MenuMobile, { ref: ref => (this.menu = ref), menu: menu, onMenuPress: onMenuPress, isCurrentMenuPath: isCurrentMenuPath, renderLogo: () => (React.createElement(React.Fragment, null,
57
- logoMenu(),
58
- title && React.createElement(react_native_1.Text, { style: styles.logoText }, title))), renderUserData: renderUserData },
59
- React.createElement(Header_1.Header, { title: screenTitle, leftButton: {
60
- nativeID: 'menu-hamburguer',
61
- icon: 'bars',
62
- onPress: () => this.menu.open()
63
- }, rightButton: rightButton }),
64
- React.createElement(react_native_1.View, { style: styles.container }, children)));
65
- };
66
- this.renderDesktop = () => {
67
- const { title, logoHeader, greeting, menu, onMenuPress, isCurrentMenuPath, children, rightButton, renderUserData, headerStyle } = this.props;
68
- const styles = this.getDesktopStyles();
69
- return (React.createElement(React.Fragment, null,
70
- React.createElement(HeaderDesktop_1.HeaderDesktop, { title: title, logo: logoHeader, greeting: greeting, rightButton: rightButton, headerStyle: headerStyle }),
71
- React.createElement(react_native_1.View, { style: styles.container },
72
- React.createElement(MenuDesktop_1.MenuDesktop, { menu: menu, headerHeight: HeaderDesktop_1.HeaderDesktop.height, onMenuPress: onMenuPress, isCurrentMenuPath: isCurrentMenuPath, renderUserData: renderUserData }),
73
- React.createElement(react_native_1.View, { nativeID: "app-shell-desktop-content", style: styles.content }, children))));
74
- };
75
- }
76
- render() {
77
- return (React.createElement(DimensionsMonitor_1.DimensionsMonitor, null, ({ isDesktop }) => isDesktop || this.props.alwaysDesktop
78
- ? this.renderDesktop()
79
- : this.renderMobile()));
80
- }
81
- }
82
- exports.AppShell = AppShell;
@@ -1,49 +0,0 @@
1
- import * as React from 'react';
2
- import { StyleProp, ViewStyle, TextStyle } from 'react-native';
3
- export interface ButtonProperties {
4
- text: string;
5
- primary?: boolean;
6
- style?: StyleProp<ViewStyle>;
7
- textStyle?: StyleProp<TextStyle>;
8
- onPress: () => void;
9
- disabled?: boolean;
10
- disabledBackgroundColor?: string;
11
- disabledLabelColor?: string;
12
- nativeID?: string;
13
- }
14
- export declare class Button extends React.Component<ButtonProperties> {
15
- static defaultProps: {
16
- primary: boolean;
17
- };
18
- getStyles: () => {
19
- touchable: {
20
- backgroundColor: string;
21
- borderColor: string;
22
- borderWidth: number;
23
- borderRadius: number;
24
- height: number;
25
- alignItems: "center";
26
- justifyContent: "center";
27
- };
28
- touchablePrimary: {
29
- backgroundColor: string;
30
- borderWidth: number;
31
- };
32
- text: {
33
- fontFamily: string;
34
- fontSize: number;
35
- paddingHorizontal: number;
36
- color: string;
37
- };
38
- textPrimary: {
39
- color: string;
40
- };
41
- disabled: {
42
- backgroundColor: string;
43
- };
44
- textDisabled: {
45
- color: string;
46
- };
47
- };
48
- render(): JSX.Element;
49
- }
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Button = void 0;
4
- const React = require("react");
5
- const theme_1 = require("../modules/theme");
6
- const test_1 = require("../modules/test");
7
- const react_native_1 = require("react-native");
8
- const layout_1 = require("../modules/layout");
9
- class Button extends React.Component {
10
- constructor() {
11
- super(...arguments);
12
- this.getStyles = () => {
13
- const { disabledBackgroundColor, disabledLabelColor } = this.props;
14
- const theme = (0, theme_1.getTheme)();
15
- const styles = react_native_1.StyleSheet.create({
16
- touchable: {
17
- backgroundColor: theme.backgroundColor1,
18
- borderColor: theme.borderColor1,
19
- borderWidth: 1,
20
- borderRadius: 3,
21
- height: (0, layout_1.isTablet)() ? 45 : 40,
22
- alignItems: 'center',
23
- justifyContent: 'center'
24
- },
25
- touchablePrimary: {
26
- backgroundColor: theme.backgroundColor3,
27
- borderWidth: 0
28
- },
29
- text: {
30
- fontFamily: theme.fontFamily1,
31
- fontSize: (0, layout_1.isTablet)() ? 18 : 13,
32
- paddingHorizontal: 11,
33
- color: theme.textColor1
34
- },
35
- textPrimary: {
36
- color: theme.textColor4
37
- },
38
- disabled: {
39
- backgroundColor: disabledBackgroundColor != null
40
- ? disabledBackgroundColor
41
- : theme.backgroundColor2
42
- },
43
- textDisabled: {
44
- color: disabledLabelColor != null ? disabledLabelColor : 'silver'
45
- }
46
- });
47
- return styles;
48
- };
49
- }
50
- render() {
51
- const { text, primary, style, textStyle, onPress, disabled, nativeID } = this.props;
52
- const styles = this.getStyles();
53
- return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.7, style: [
54
- styles.touchable,
55
- primary && styles.touchablePrimary,
56
- style,
57
- disabled && styles.disabled
58
- ], onPress: onPress, disabled: disabled, testID: (0, test_1.getTestID)(nativeID) },
59
- React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
60
- styles.text,
61
- primary && styles.textPrimary,
62
- textStyle,
63
- disabled && styles.textDisabled
64
- ] }, text)));
65
- }
66
- }
67
- exports.Button = Button;
68
- Button.defaultProps = {
69
- primary: true
70
- };
@@ -1,66 +0,0 @@
1
- import * as React from 'react';
2
- import { StyleProp, TextStyle, ViewProps, ViewStyle } from 'react-native';
3
- export interface CardHeaderProperties {
4
- title: string;
5
- titleStyle?: StyleProp<TextStyle>;
6
- containerStyle?: StyleProp<TextStyle>;
7
- nativeID?: string;
8
- numberOfLines?: number;
9
- onHelpPress?: () => void;
10
- children?: React.ReactNode;
11
- }
12
- export declare class CardHeader extends React.Component<CardHeaderProperties> {
13
- getStyles: () => {
14
- container: {
15
- padding: number;
16
- };
17
- title: {
18
- color: string;
19
- fontFamily: string;
20
- fontSize: number;
21
- marginRight: number;
22
- };
23
- help: {
24
- position: "absolute";
25
- right: number;
26
- top: number;
27
- };
28
- helpIcon: {
29
- fontSize: number;
30
- color: string;
31
- };
32
- };
33
- render(): JSX.Element;
34
- }
35
- export declare class CardFooter extends React.Component<ViewProps> {
36
- render(): JSX.Element;
37
- }
38
- export declare class CardSection extends React.Component<ViewProps> {
39
- render(): JSX.Element;
40
- }
41
- export declare class CardModal extends React.Component<ViewProps> {
42
- render(): JSX.Element;
43
- }
44
- export interface CardProperties extends ViewProps {
45
- children: React.ReactNode;
46
- style?: StyleProp<ViewStyle>;
47
- }
48
- export declare class Card extends React.Component<CardProperties> {
49
- static Header: typeof CardHeader;
50
- static Section: typeof CardSection;
51
- static Footer: typeof CardFooter;
52
- static Modal: typeof CardModal;
53
- getStyles: () => {
54
- container: {
55
- borderRadius: number;
56
- backgroundColor: string;
57
- shadowOpacity: number;
58
- shadowRadius: number;
59
- };
60
- cardChild: {
61
- borderTopColor: string;
62
- borderTopWidth: number;
63
- };
64
- };
65
- render(): JSX.Element;
66
- }
@@ -1,131 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Card = exports.CardModal = exports.CardSection = exports.CardFooter = exports.CardHeader = void 0;
15
- const React = require("react");
16
- const react_native_elevated_view_1 = require("react-native-elevated-view");
17
- const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
18
- const theme_1 = require("../modules/theme");
19
- const layout_1 = require("../modules/layout");
20
- const test_1 = require("../modules/test");
21
- const react_native_1 = require("react-native");
22
- class CardHeader extends React.Component {
23
- constructor() {
24
- super(...arguments);
25
- this.getStyles = () => {
26
- const theme = (0, theme_1.getTheme)();
27
- const styles = react_native_1.StyleSheet.create({
28
- container: {
29
- padding: 16
30
- },
31
- title: {
32
- color: theme.textColor1,
33
- fontFamily: theme.fontFamily1,
34
- fontSize: (0, layout_1.isTablet)() ? 22 : 18,
35
- marginRight: 10
36
- },
37
- help: {
38
- position: 'absolute',
39
- right: 5,
40
- top: 5
41
- },
42
- helpIcon: {
43
- fontSize: (0, layout_1.isTablet)() ? 24 : 20,
44
- color: '#6d819c'
45
- }
46
- });
47
- return styles;
48
- };
49
- }
50
- render() {
51
- const { title, titleStyle, onHelpPress, nativeID, containerStyle, numberOfLines } = this.props;
52
- const styles = this.getStyles();
53
- return (React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, containerStyle] },
54
- React.createElement(react_native_1.Text, { testID: (0, test_1.getTestID)(nativeID), style: [styles.title, titleStyle], numberOfLines: numberOfLines }, title),
55
- onHelpPress && (React.createElement(react_native_1.TouchableOpacity, { onPress: onHelpPress, style: styles.help },
56
- React.createElement(FontAwesome_1.default, { name: "question-circle", style: styles.helpIcon })))));
57
- }
58
- }
59
- exports.CardHeader = CardHeader;
60
- class CardFooter extends React.Component {
61
- render() {
62
- const _a = this.props, { children, nativeID } = _a, otherProps = __rest(_a, ["children", "nativeID"]);
63
- return (React.createElement(react_native_1.View, Object.assign({ nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), style: [cardFooterStyles.container] }, otherProps), children));
64
- }
65
- }
66
- exports.CardFooter = CardFooter;
67
- class CardSection extends React.Component {
68
- render() {
69
- const _a = this.props, { children, style, nativeID } = _a, otherProps = __rest(_a, ["children", "style", "nativeID"]);
70
- return (React.createElement(react_native_1.View, Object.assign({ nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), style: [cardSectionStyles.container, style] }, otherProps), children));
71
- }
72
- }
73
- exports.CardSection = CardSection;
74
- class CardModal extends React.Component {
75
- render() {
76
- const _a = this.props, { children, style } = _a, otherProps = __rest(_a, ["children", "style"]);
77
- return (React.createElement(react_native_1.TouchableOpacity, Object.assign({ activeOpacity: 1, style: [{ padding: 16 }, style] }, otherProps), children));
78
- }
79
- }
80
- exports.CardModal = CardModal;
81
- class Card extends React.Component {
82
- constructor() {
83
- super(...arguments);
84
- this.getStyles = () => {
85
- const theme = (0, theme_1.getTheme)();
86
- const styles = react_native_1.StyleSheet.create({
87
- container: {
88
- borderRadius: 3,
89
- backgroundColor: theme.backgroundColor1,
90
- shadowOpacity: 0.15,
91
- shadowRadius: 5
92
- },
93
- cardChild: {
94
- borderTopColor: theme.borderColor1,
95
- borderTopWidth: 1
96
- }
97
- });
98
- return styles;
99
- };
100
- }
101
- render() {
102
- const _a = this.props, { children, style } = _a, otherProps = __rest(_a, ["children", "style"]);
103
- const styles = this.getStyles();
104
- const childrenMapped = React.Children.map(children, (child, index) => {
105
- if (index === 0 || !child) {
106
- return child;
107
- }
108
- return (React.createElement(React.Fragment, null,
109
- React.createElement(react_native_1.View, { style: styles.cardChild }),
110
- child));
111
- });
112
- return react_native_1.Platform.OS == 'web' ? (React.createElement(react_native_1.View, Object.assign({ style: [styles.container, style] }, otherProps), childrenMapped)) : (React.createElement(react_native_elevated_view_1.default, Object.assign({ elevation: 5,
113
- // @ts-ignore : The component uses a different version of typing
114
- style: [styles.container, style] }, otherProps), childrenMapped));
115
- }
116
- }
117
- exports.Card = Card;
118
- Card.Header = CardHeader;
119
- Card.Section = CardSection;
120
- Card.Footer = CardFooter;
121
- Card.Modal = CardModal;
122
- const cardSectionStyles = react_native_1.StyleSheet.create({
123
- container: {
124
- padding: 16
125
- }
126
- });
127
- const cardFooterStyles = react_native_1.StyleSheet.create({
128
- container: {
129
- padding: 16
130
- }
131
- });
@@ -1,36 +0,0 @@
1
- import * as React from 'react';
2
- import { StyleProp, TextStyle, ViewStyle } from 'react-native';
3
- interface Props {
4
- label?: string;
5
- value: boolean;
6
- onChange?: (value: boolean) => void;
7
- disabled?: boolean;
8
- style?: StyleProp<ViewStyle>;
9
- renderLabel?: () => React.ReactNode;
10
- labelStyle?: StyleProp<TextStyle>;
11
- iconStyle?: StyleProp<TextStyle>;
12
- nativeID?: string;
13
- }
14
- export declare class CheckBox extends React.Component<Props> {
15
- getStyles: () => {
16
- container: {
17
- flexDirection: "row";
18
- alignItems: "center";
19
- };
20
- icon: {
21
- color: string;
22
- width: number;
23
- fontSize: number;
24
- height: number;
25
- lineHeight: number;
26
- };
27
- label: {
28
- color: string;
29
- fontFamily: string;
30
- fontSize: number;
31
- flexShrink: number;
32
- };
33
- };
34
- render(): JSX.Element;
35
- }
36
- export {};
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheckBox = void 0;
4
- const React = require("react");
5
- const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
6
- const layout_1 = require("../modules/layout");
7
- const theme_1 = require("../modules/theme");
8
- const test_1 = require("../modules/test");
9
- const react_native_1 = require("react-native");
10
- class CheckBox extends React.Component {
11
- constructor() {
12
- super(...arguments);
13
- this.getStyles = () => {
14
- const theme = (0, theme_1.getTheme)();
15
- const { disabled } = this.props;
16
- const iconSize = (0, layout_1.isTablet)() ? 24 : 20;
17
- return react_native_1.StyleSheet.create({
18
- container: {
19
- flexDirection: 'row',
20
- alignItems: 'center'
21
- },
22
- icon: {
23
- color: disabled ? theme.disabledColor : theme.textColor1,
24
- width: (0, layout_1.isTablet)() ? 28 : 24,
25
- fontSize: iconSize,
26
- height: iconSize,
27
- lineHeight: iconSize
28
- },
29
- label: {
30
- color: disabled ? theme.disabledColor : theme.textColor1,
31
- fontFamily: theme.fontFamily3,
32
- fontSize: (0, layout_1.isTablet)() ? 15 : 12,
33
- flexShrink: 1
34
- }
35
- });
36
- };
37
- }
38
- render() {
39
- const { label, value, onChange, disabled, style, labelStyle, iconStyle, renderLabel, nativeID } = this.props;
40
- const styles = this.getStyles();
41
- return (React.createElement(react_native_1.TouchableOpacity, { style: [styles.container, style], disabled: disabled, onPress: () => {
42
- if (onChange) {
43
- onChange(!value);
44
- }
45
- } },
46
- React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), name: value ? 'check-square-o' : 'square-o', style: [styles.icon, iconStyle] }),
47
- React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, renderLabel ? renderLabel() : label)));
48
- }
49
- }
50
- exports.CheckBox = CheckBox;
@@ -1,67 +0,0 @@
1
- import * as React from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- export interface DatePickerProperties {
4
- label: string;
5
- value?: Date;
6
- clearable?: boolean;
7
- onChange: (value?: Date) => void;
8
- onCancel?: () => void;
9
- style?: StyleProp<ViewStyle>;
10
- nativeID?: string;
11
- disabled?: boolean;
12
- }
13
- export interface DatePickerState {
14
- showModal: boolean;
15
- isDarkModeEnabled: boolean;
16
- }
17
- export declare class DatePicker extends React.Component<DatePickerProperties, DatePickerState> {
18
- static defaultProps: {
19
- clearable: boolean;
20
- };
21
- state: DatePickerState;
22
- appearanceSubscription: any;
23
- componentDidMount(): void;
24
- componentWillUnmount(): void;
25
- handlePress: () => void;
26
- handleConfirm: (value: Date) => void;
27
- handleCancel: () => void;
28
- handleClear: () => void;
29
- getStyles: () => {
30
- container: {
31
- paddingLeft: number;
32
- paddingRight: number;
33
- paddingVertical: number;
34
- borderWidth: number;
35
- borderColor: string;
36
- borderRadius: number;
37
- flexDirection: "row";
38
- alignItems: "center";
39
- };
40
- label: {
41
- color: string;
42
- fontFamily: string;
43
- fontSize: number;
44
- lineHeight: number;
45
- };
46
- value: {
47
- color: string;
48
- fontFamily: string;
49
- fontSize: number;
50
- lineHeight: number;
51
- minHeight: number;
52
- };
53
- calendarIcon: {
54
- marginLeft: string;
55
- color: string;
56
- fontSize: number;
57
- };
58
- clearIcon: {
59
- borderWidth: number;
60
- marginLeft: string;
61
- };
62
- readonly: {
63
- backgroundColor: string;
64
- };
65
- };
66
- render(): JSX.Element;
67
- }