@tecsinapse/react-native-kit 1.22.7 → 1.22.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/atoms/Avatar/Avatar.js +3 -21
- package/dist/cjs/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/atoms/Badge/Badge.js +9 -43
- package/dist/cjs/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js +14 -43
- package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/cjs/components/atoms/BottomNavigator/Item.js +13 -43
- package/dist/cjs/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/cjs/components/atoms/Button/Button.js +9 -42
- package/dist/cjs/components/atoms/Button/Button.js.map +1 -1
- package/dist/cjs/components/atoms/Button/States/Error.js +5 -23
- package/dist/cjs/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/cjs/components/atoms/Button/States/Loading.js +3 -21
- package/dist/cjs/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/cjs/components/atoms/Button/States/Success.js +3 -21
- package/dist/cjs/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js +3 -21
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/cjs/components/atoms/Header/Header.js +18 -48
- package/dist/cjs/components/atoms/Header/Header.js.map +1 -1
- package/dist/cjs/components/atoms/Input/Input.js +32 -84
- package/dist/cjs/components/atoms/Input/Input.js.map +1 -1
- package/dist/cjs/components/atoms/InputMask/InputMask.js +29 -83
- package/dist/cjs/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/ModalGroupManager.js +5 -33
- package/dist/cjs/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js +67 -86
- package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/useLazyModalManager.js +1 -1
- package/dist/cjs/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/cjs/components/atoms/Modal/useModalManager.js +1 -1
- package/dist/cjs/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/cjs/components/atoms/Skeleton/Pulse.js +4 -5
- package/dist/cjs/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/cjs/components/atoms/Skeleton/Skeleton.js +13 -47
- package/dist/cjs/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/cjs/components/atoms/Skeleton/Wave.js +5 -6
- package/dist/cjs/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js +11 -43
- package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/cjs/components/atoms/Tag/Tag.js +5 -33
- package/dist/cjs/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/atoms/Text/Text.js +4 -31
- package/dist/cjs/components/atoms/Text/Text.js.map +1 -1
- package/dist/cjs/components/atoms/Text/styled.js +3 -3
- package/dist/cjs/components/atoms/Text/styled.js.map +1 -1
- package/dist/cjs/components/atoms/TextArea/TextArea.js +29 -83
- package/dist/cjs/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/cjs/components/molecules/Calendar/Calendar.js +8 -40
- package/dist/cjs/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +15 -48
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +12 -43
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js +8 -40
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/cjs/components/molecules/Grid/Grid.js +20 -55
- package/dist/cjs/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/cjs/components/molecules/Grid/Item/Item.js +28 -75
- package/dist/cjs/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js +13 -47
- package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/TextComponent.js +7 -23
- package/dist/cjs/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/cjs/components/molecules/IconTextButton/styled.js +3 -3
- package/dist/cjs/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/cjs/components/molecules/InputPassword/InputPassword.js +4 -35
- package/dist/cjs/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js +15 -47
- package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -49
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/cjs/components/molecules/LabeledSwitch/styled.js +2 -2
- package/dist/cjs/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/cjs/components/molecules/Select/Modal.js +25 -71
- package/dist/cjs/components/molecules/Select/Modal.js.map +1 -1
- package/dist/cjs/components/molecules/Select/Select.js +37 -91
- package/dist/cjs/components/molecules/Select/Select.js.map +1 -1
- package/dist/cjs/components/molecules/Select/styled.js +3 -6
- package/dist/cjs/components/molecules/Select/styled.js.map +1 -1
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +10 -41
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/components/atoms/Avatar/Avatar.js +3 -21
- package/dist/esm/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/atoms/Badge/Badge.js +9 -43
- package/dist/esm/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js +14 -43
- package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/esm/components/atoms/BottomNavigator/Item.js +13 -43
- package/dist/esm/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.js +9 -42
- package/dist/esm/components/atoms/Button/Button.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Error.js +6 -24
- package/dist/esm/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Loading.js +3 -21
- package/dist/esm/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/esm/components/atoms/Button/States/Success.js +3 -21
- package/dist/esm/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js +3 -21
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/esm/components/atoms/Header/Header.js +18 -48
- package/dist/esm/components/atoms/Header/Header.js.map +1 -1
- package/dist/esm/components/atoms/Input/Input.js +32 -84
- package/dist/esm/components/atoms/Input/Input.js.map +1 -1
- package/dist/esm/components/atoms/InputMask/InputMask.js +29 -83
- package/dist/esm/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/esm/components/atoms/Modal/ModalGroupManager.js +5 -33
- package/dist/esm/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js +67 -86
- package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/esm/components/atoms/Modal/useLazyModalManager.js +1 -1
- package/dist/esm/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/esm/components/atoms/Modal/useModalManager.js +1 -1
- package/dist/esm/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/esm/components/atoms/Skeleton/Pulse.js +4 -5
- package/dist/esm/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/esm/components/atoms/Skeleton/Skeleton.js +13 -47
- package/dist/esm/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/esm/components/atoms/Skeleton/Wave.js +5 -6
- package/dist/esm/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js +11 -43
- package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/esm/components/atoms/Tag/Tag.js +5 -33
- package/dist/esm/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/esm/components/atoms/Text/Text.js +4 -31
- package/dist/esm/components/atoms/Text/Text.js.map +1 -1
- package/dist/esm/components/atoms/Text/styled.js +3 -3
- package/dist/esm/components/atoms/Text/styled.js.map +1 -1
- package/dist/esm/components/atoms/TextArea/TextArea.js +29 -83
- package/dist/esm/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/molecules/Calendar/Calendar.js +8 -40
- package/dist/esm/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +15 -48
- package/dist/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +12 -43
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +8 -40
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/esm/components/molecules/Grid/Grid.js +20 -55
- package/dist/esm/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/esm/components/molecules/Grid/Item/Item.js +28 -75
- package/dist/esm/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +13 -47
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/TextComponent.js +7 -23
- package/dist/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/esm/components/molecules/IconTextButton/styled.js +3 -3
- package/dist/esm/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/esm/components/molecules/InputPassword/InputPassword.js +4 -35
- package/dist/esm/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +15 -47
- package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +14 -49
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/esm/components/molecules/LabeledSwitch/styled.js +2 -2
- package/dist/esm/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/esm/components/molecules/Select/Modal.js +25 -71
- package/dist/esm/components/molecules/Select/Modal.js.map +1 -1
- package/dist/esm/components/molecules/Select/Select.js +38 -92
- package/dist/esm/components/molecules/Select/Select.js.map +1 -1
- package/dist/esm/components/molecules/Select/styled.js +3 -6
- package/dist/esm/components/molecules/Select/styled.js.map +1 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +10 -41
- package/dist/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,53 +2,23 @@ import * as React from 'react';
|
|
|
2
2
|
import { Icon } from '@tecsinapse/react-core';
|
|
3
3
|
import { TabContent, CustomTabContent } from './styled.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
|
-
function Item(_a) {
|
|
34
|
-
var _b = _a, {
|
|
35
|
-
_selected,
|
|
36
|
-
icon,
|
|
37
|
-
children
|
|
38
|
-
} = _b, rest = __objRest(_b, [
|
|
39
|
-
"_selected",
|
|
40
|
-
"icon",
|
|
41
|
-
"children"
|
|
42
|
-
]);
|
|
5
|
+
function Item({
|
|
6
|
+
_selected,
|
|
7
|
+
icon,
|
|
8
|
+
children,
|
|
9
|
+
...rest
|
|
10
|
+
}) {
|
|
43
11
|
const styledButtonStyle = _selected ? void 0 : { backgroundColor: "transparent" };
|
|
44
12
|
const iconColorVariant = _selected ? "primary" : "secondary";
|
|
45
13
|
if (icon) {
|
|
46
|
-
return /* @__PURE__ */ React.createElement(TabContent,
|
|
47
|
-
style: styledButtonStyle
|
|
48
|
-
|
|
14
|
+
return /* @__PURE__ */ React.createElement(TabContent, {
|
|
15
|
+
style: styledButtonStyle,
|
|
16
|
+
...rest
|
|
17
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
49
18
|
colorVariant: iconColorVariant,
|
|
50
|
-
size: "centi"
|
|
51
|
-
|
|
19
|
+
size: "centi",
|
|
20
|
+
...icon
|
|
21
|
+
}));
|
|
52
22
|
} else {
|
|
53
23
|
return /* @__PURE__ */ React.createElement(CustomTabContent, null, children);
|
|
54
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sources":["../../../../../src/components/atoms/BottomNavigator/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Icon, IconProps } from '@tecsinapse/react-core';\nimport { TabContent, CustomTabContent } from './styled';\nimport { ViewProps } from 'react-native';\nimport { TextNativeProps } from '../Text';\n\ntype ValueType = string | number | symbol;\n\nexport interface BottomNavigatorItemProps<T extends ValueType>\n extends Omit<ViewProps, 'children'> {\n _selected?: boolean;\n value: T;\n icon: IconProps;\n label?: string;\n labelProps?: TextNativeProps;\n labelElement?: React.ReactNode | React.ReactNode[];\n children: React.ReactNode | React.ReactNode[];\n}\n\ntype ItemPropsWithIcon<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'children'\n>;\n\ntype ItemPropsWithChildren<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'icon' | 'label' | 'labelElement' | 'labelProps'\n>;\n\nfunction Item<T extends ValueType>(props: ItemPropsWithChildren<T>);\nfunction Item<T extends ValueType>(props: ItemPropsWithIcon<T>);\nfunction Item<T extends ValueType>({\n _selected,\n icon,\n children,\n ...rest\n}: Partial<BottomNavigatorItemProps<T>>): JSX.Element {\n const styledButtonStyle = _selected\n ? undefined\n : { backgroundColor: 'transparent' };\n\n const iconColorVariant = _selected ? 'primary' : 'secondary';\n\n if (icon) {\n return (\n <TabContent style={styledButtonStyle} {...rest}>\n <Icon colorVariant={iconColorVariant} size={'centi'} {...icon} />\n </TabContent>\n );\n } else {\n return <CustomTabContent>{children}</CustomTabContent>;\n }\n}\n\nexport default Item;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Item.js","sources":["../../../../../src/components/atoms/BottomNavigator/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Icon, IconProps } from '@tecsinapse/react-core';\nimport { TabContent, CustomTabContent } from './styled';\nimport { ViewProps } from 'react-native';\nimport { TextNativeProps } from '../Text';\n\ntype ValueType = string | number | symbol;\n\nexport interface BottomNavigatorItemProps<T extends ValueType>\n extends Omit<ViewProps, 'children'> {\n _selected?: boolean;\n value: T;\n icon: IconProps;\n label?: string;\n labelProps?: TextNativeProps;\n labelElement?: React.ReactNode | React.ReactNode[];\n children: React.ReactNode | React.ReactNode[];\n}\n\ntype ItemPropsWithIcon<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'children'\n>;\n\ntype ItemPropsWithChildren<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'icon' | 'label' | 'labelElement' | 'labelProps'\n>;\n\nfunction Item<T extends ValueType>(props: ItemPropsWithChildren<T>);\nfunction Item<T extends ValueType>(props: ItemPropsWithIcon<T>);\nfunction Item<T extends ValueType>({\n _selected,\n icon,\n children,\n ...rest\n}: Partial<BottomNavigatorItemProps<T>>): JSX.Element {\n const styledButtonStyle = _selected\n ? undefined\n : { backgroundColor: 'transparent' };\n\n const iconColorVariant = _selected ? 'primary' : 'secondary';\n\n if (icon) {\n return (\n <TabContent style={styledButtonStyle} {...rest}>\n <Icon colorVariant={iconColorVariant} size={'centi'} {...icon} />\n </TabContent>\n );\n } else {\n return <CustomTabContent>{children}</CustomTabContent>;\n }\n}\n\nexport default Item;\n"],"names":[],"mappings":";;;;AA+BA,SAAS,IAA0B,CAAA;AAAA,EACjC,SAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAsD,EAAA;AACpD,EAAA,MAAM,iBAAoB,GAAA,SAAA,GACtB,KACA,CAAA,GAAA,EAAE,iBAAiB,aAAc,EAAA,CAAA;AAErC,EAAM,MAAA,gBAAA,GAAmB,YAAY,SAAY,GAAA,WAAA,CAAA;AAEjD,EAAA,IAAI,IAAM,EAAA;AACR,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,MAAW,KAAO,EAAA,iBAAA;AAAA,MAAoB,GAAG,IAAA;AAAA,KAAA,kBACvC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAK,YAAc,EAAA,gBAAA;AAAA,MAAkB,IAAM,EAAA,OAAA;AAAA,MAAU,GAAG,IAAA;AAAA,KAAM,CACjE,CAAA,CAAA;AAAA,GAEG,MAAA;AACL,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,wBAAkB,QAAS,CAAA,CAAA;AAAA,GACrC;AACF;;;;"}
|
|
@@ -2,55 +2,22 @@ import { Button as Button$1 } from '@tecsinapse/react-core';
|
|
|
2
2
|
import React__default, { useCallback } from 'react';
|
|
3
3
|
import { Keyboard } from 'react-native';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
const Button = (_a) => {
|
|
37
|
-
var _b = _a, {
|
|
38
|
-
autoDismissKeyboard = true,
|
|
39
|
-
onPress
|
|
40
|
-
} = _b, others = __objRest(_b, [
|
|
41
|
-
"autoDismissKeyboard",
|
|
42
|
-
"onPress"
|
|
43
|
-
]);
|
|
5
|
+
const Button = ({
|
|
6
|
+
autoDismissKeyboard = true,
|
|
7
|
+
onPress,
|
|
8
|
+
...others
|
|
9
|
+
}) => {
|
|
44
10
|
const handleOnPress = useCallback(
|
|
45
11
|
(event) => {
|
|
46
12
|
autoDismissKeyboard && Keyboard.dismiss();
|
|
47
|
-
onPress
|
|
13
|
+
onPress?.(event);
|
|
48
14
|
},
|
|
49
15
|
[onPress]
|
|
50
16
|
);
|
|
51
|
-
return /* @__PURE__ */ React__default.createElement(Button$1,
|
|
17
|
+
return /* @__PURE__ */ React__default.createElement(Button$1, {
|
|
18
|
+
...others,
|
|
52
19
|
onPress: handleOnPress
|
|
53
|
-
})
|
|
20
|
+
});
|
|
54
21
|
};
|
|
55
22
|
|
|
56
23
|
export { Button };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { Button as ButtonCore, ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC, useCallback } from 'react';\nimport { Keyboard } from 'react-native';\n\nexport type ButtonNativeProps = ButtonProps & {\n autoDismissKeyboard?: boolean;\n};\n\nexport const Button: FC<ButtonNativeProps> = ({\n autoDismissKeyboard = true,\n onPress,\n ...others\n}) => {\n const handleOnPress = useCallback(\n event => {\n autoDismissKeyboard && Keyboard.dismiss();\n onPress?.(event);\n },\n [onPress]\n );\n\n return <ButtonCore {...others} onPress={handleOnPress} />;\n};\n"],"names":["React","ButtonCore"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { Button as ButtonCore, ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC, useCallback } from 'react';\nimport { Keyboard } from 'react-native';\n\nexport type ButtonNativeProps = ButtonProps & {\n autoDismissKeyboard?: boolean;\n};\n\nexport const Button: FC<ButtonNativeProps> = ({\n autoDismissKeyboard = true,\n onPress,\n ...others\n}) => {\n const handleOnPress = useCallback(\n event => {\n autoDismissKeyboard && Keyboard.dismiss();\n onPress?.(event);\n },\n [onPress]\n );\n\n return <ButtonCore {...others} onPress={handleOnPress} />;\n};\n"],"names":["React","ButtonCore"],"mappings":";;;;AAQO,MAAM,SAAgC,CAAC;AAAA,EAC5C,mBAAsB,GAAA,IAAA;AAAA,EACtB,OAAA;AAAA,EACG,GAAA,MAAA;AACL,CAAM,KAAA;AACJ,EAAA,MAAM,aAAgB,GAAA,WAAA;AAAA,IACpB,CAAS,KAAA,KAAA;AACP,MAAA,mBAAA,IAAuB,SAAS,OAAQ,EAAA,CAAA;AACxC,MAAA,OAAA,GAAU,KAAK,CAAA,CAAA;AAAA,KACjB;AAAA,IACA,CAAC,OAAO,CAAA;AAAA,GACV,CAAA;AAEA,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,QAAA,EAAA;AAAA,IAAY,GAAG,MAAA;AAAA,IAAQ,OAAS,EAAA,aAAA;AAAA,GAAe,CAAA,CAAA;AACzD;;;;"}
|
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
import { Error } from '@tecsinapse/react-core';
|
|
1
|
+
import { Error as Error$1 } from '@tecsinapse/react-core';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import Text from '../../Text/Text.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
const Error2 = (props) => {
|
|
25
|
-
return /* @__PURE__ */ React__default.createElement(Error, __spreadProps(__spreadValues({}, props), {
|
|
5
|
+
const Error = (props) => {
|
|
6
|
+
return /* @__PURE__ */ React__default.createElement(Error$1, {
|
|
7
|
+
...props,
|
|
26
8
|
textComponent: Text
|
|
27
|
-
})
|
|
9
|
+
});
|
|
28
10
|
};
|
|
29
11
|
|
|
30
|
-
export {
|
|
12
|
+
export { Error as default };
|
|
31
13
|
//# sourceMappingURL=Error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","sources":["../../../../../../src/components/atoms/Button/States/Error.tsx"],"sourcesContent":["import { ButtonStateProps, Error as CoreError } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Error: FC<ButtonStateProps> = props => {\n return <CoreError {...props} textComponent={Text} />;\n};\n\nexport default Error;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Error.js","sources":["../../../../../../src/components/atoms/Button/States/Error.tsx"],"sourcesContent":["import { ButtonStateProps, Error as CoreError } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Error: FC<ButtonStateProps> = props => {\n return <CoreError {...props} textComponent={Text} />;\n};\n\nexport default Error;\n"],"names":["React","CoreError"],"mappings":";;;;AAIA,MAAM,QAA8B,CAAS,KAAA,KAAA;AAC3C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,OAAA,EAAA;AAAA,IAAW,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AACpD;;;;"}
|
|
@@ -2,29 +2,11 @@ import { Loading as Loading$1 } from '@tecsinapse/react-core';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import Text from '../../Text/Text.js';
|
|
4
4
|
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __defProps = Object.defineProperties;
|
|
7
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
5
|
const Loading = (props) => {
|
|
25
|
-
return /* @__PURE__ */ React__default.createElement(Loading$1,
|
|
6
|
+
return /* @__PURE__ */ React__default.createElement(Loading$1, {
|
|
7
|
+
...props,
|
|
26
8
|
textComponent: Text
|
|
27
|
-
})
|
|
9
|
+
});
|
|
28
10
|
};
|
|
29
11
|
|
|
30
12
|
export { Loading as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loading.js","sources":["../../../../../../src/components/atoms/Button/States/Loading.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Loading as CoreLoading,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Loading: FC<ButtonStateProps> = props => {\n return <CoreLoading {...props} textComponent={Text} />;\n};\n\nexport default Loading;\n"],"names":["React","CoreLoading"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Loading.js","sources":["../../../../../../src/components/atoms/Button/States/Loading.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Loading as CoreLoading,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Loading: FC<ButtonStateProps> = props => {\n return <CoreLoading {...props} textComponent={Text} />;\n};\n\nexport default Loading;\n"],"names":["React","CoreLoading"],"mappings":";;;;AAOA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,SAAA,EAAA;AAAA,IAAa,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AACtD;;;;"}
|
|
@@ -2,29 +2,11 @@ import { Success as Success$1 } from '@tecsinapse/react-core';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import Text from '../../Text/Text.js';
|
|
4
4
|
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __defProps = Object.defineProperties;
|
|
7
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
5
|
const Success = (props) => {
|
|
25
|
-
return /* @__PURE__ */ React__default.createElement(Success$1,
|
|
6
|
+
return /* @__PURE__ */ React__default.createElement(Success$1, {
|
|
7
|
+
...props,
|
|
26
8
|
textComponent: Text
|
|
27
|
-
})
|
|
9
|
+
});
|
|
28
10
|
};
|
|
29
11
|
|
|
30
12
|
export { Success as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Success.js","sources":["../../../../../../src/components/atoms/Button/States/Success.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Success as CoreSuccess,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Success: FC<ButtonStateProps> = props => {\n return <CoreSuccess {...props} textComponent={Text} />;\n};\n\nexport default Success;\n"],"names":["React","CoreSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Success.js","sources":["../../../../../../src/components/atoms/Button/States/Success.tsx"],"sourcesContent":["import {\n ButtonStateProps,\n Success as CoreSuccess,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../Text';\n\nconst Success: FC<ButtonStateProps> = props => {\n return <CoreSuccess {...props} textComponent={Text} />;\n};\n\nexport default Success;\n"],"names":["React","CoreSuccess"],"mappings":";;;;AAOA,MAAM,UAAgC,CAAS,KAAA,KAAA;AAC7C,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,SAAA,EAAA;AAAA,IAAa,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AACtD;;;;"}
|
|
@@ -2,29 +2,11 @@ import { GroupButtonOption as GroupButtonOption$1 } from '@tecsinapse/react-core
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __defProps = Object.defineProperties;
|
|
7
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
5
|
const GroupButtonOption = (props) => {
|
|
25
|
-
return /* @__PURE__ */ React__default.createElement(GroupButtonOption$1,
|
|
6
|
+
return /* @__PURE__ */ React__default.createElement(GroupButtonOption$1, {
|
|
7
|
+
...props,
|
|
26
8
|
TextComponent: Text
|
|
27
|
-
})
|
|
9
|
+
});
|
|
28
10
|
};
|
|
29
11
|
|
|
30
12
|
export { GroupButtonOption as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupButtonOption.js","sources":["../../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"sourcesContent":["import {\n GroupButtonOption as CoreGroupButtonOption,\n GroupButtonOptionProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Text } from '../Text';\n\nconst GroupButtonOption = (props: GroupButtonOptionProps): JSX.Element => {\n return <CoreGroupButtonOption {...props} TextComponent={Text} />;\n};\n\nexport default GroupButtonOption;\n"],"names":["React","CoreGroupButtonOption"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupButtonOption.js","sources":["../../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"sourcesContent":["import {\n GroupButtonOption as CoreGroupButtonOption,\n GroupButtonOptionProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Text } from '../Text';\n\nconst GroupButtonOption = (props: GroupButtonOptionProps): JSX.Element => {\n return <CoreGroupButtonOption {...props} TextComponent={Text} />;\n};\n\nexport default GroupButtonOption;\n"],"names":["React","CoreGroupButtonOption"],"mappings":";;;;AAOM,MAAA,iBAAA,GAAoB,CAAC,KAA+C,KAAA;AACxE,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAAC,mBAAA,EAAA;AAAA,IAAuB,GAAG,KAAA;AAAA,IAAO,aAAe,EAAA,IAAA;AAAA,GAAM,CAAA,CAAA;AAChE;;;;"}
|
|
@@ -3,58 +3,28 @@ import { Icon } from '@tecsinapse/react-core';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import Badge from '../Badge/Badge.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
const Header = (_a) => {
|
|
38
|
-
var _b = _a, {
|
|
39
|
-
rightButton,
|
|
40
|
-
leftButton,
|
|
41
|
-
children
|
|
42
|
-
} = _b, rest = __objRest(_b, [
|
|
43
|
-
"rightButton",
|
|
44
|
-
"leftButton",
|
|
45
|
-
"children"
|
|
46
|
-
]);
|
|
47
|
-
const ButtonBase = () => /* @__PURE__ */ React.createElement(FloatingButton, __spreadProps(__spreadValues({}, rightButton), {
|
|
48
|
-
variant: (rightButton == null ? void 0 : rightButton.variant) || "filled",
|
|
49
|
-
color: (rightButton == null ? void 0 : rightButton.color) || "primary",
|
|
50
|
-
size: (rightButton == null ? void 0 : rightButton.size) || "small"
|
|
51
|
-
}), (rightButton == null ? void 0 : rightButton.icon) && /* @__PURE__ */ React.createElement(Icon, __spreadValues({}, rightButton == null ? void 0 : rightButton.icon)));
|
|
52
|
-
return /* @__PURE__ */ React.createElement(StyledView, __spreadValues({}, rest), leftButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, (leftButton == null ? void 0 : leftButton.valueBagde) ? /* @__PURE__ */ React.createElement(Badge, {
|
|
6
|
+
const Header = ({
|
|
7
|
+
rightButton,
|
|
8
|
+
leftButton,
|
|
9
|
+
children,
|
|
10
|
+
...rest
|
|
11
|
+
}) => {
|
|
12
|
+
const ButtonBase = () => /* @__PURE__ */ React.createElement(FloatingButton, {
|
|
13
|
+
...rightButton,
|
|
14
|
+
variant: rightButton?.variant || "filled",
|
|
15
|
+
color: rightButton?.color || "primary",
|
|
16
|
+
size: rightButton?.size || "small"
|
|
17
|
+
}, rightButton?.icon && /* @__PURE__ */ React.createElement(Icon, {
|
|
18
|
+
...rightButton?.icon
|
|
19
|
+
}));
|
|
20
|
+
return /* @__PURE__ */ React.createElement(StyledView, {
|
|
21
|
+
...rest
|
|
22
|
+
}, leftButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, leftButton?.valueBagde ? /* @__PURE__ */ React.createElement(Badge, {
|
|
53
23
|
value: leftButton.valueBagde,
|
|
54
24
|
color: "error"
|
|
55
25
|
}, /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(Dummy, {
|
|
56
26
|
disabled: true
|
|
57
|
-
}), children, rightButton ? /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
27
|
+
}), children, rightButton ? /* @__PURE__ */ React.createElement(React.Fragment, null, rightButton?.valueBagde ? /* @__PURE__ */ React.createElement(Badge, {
|
|
58
28
|
value: rightButton.valueBagde,
|
|
59
29
|
color: "error"
|
|
60
30
|
}, /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(ButtonBase, null)) : /* @__PURE__ */ React.createElement(Dummy, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../../../src/components/atoms/Header/Header.tsx"],"sourcesContent":["import { ViewProps } from 'react-native';\nimport { StyledView, FloatingButton, Dummy } from './styled';\nimport { ButtonProps, Icon, IconProps } from '@tecsinapse/react-core';\nimport * as React from 'react';\nimport Badge from '../Badge/Badge';\nimport { FC } from 'react';\n\ntype Attachable = ButtonProps & {\n icon: IconProps;\n valueBagde?: number;\n};\n\nexport interface HeaderProps extends ViewProps {\n rightButton?: Attachable;\n leftButton?: Attachable;\n}\n\nconst Header: React.FC<HeaderProps> = ({\n rightButton,\n leftButton,\n children,\n ...rest\n}) => {\n const ButtonBase: FC = () => (\n <FloatingButton\n {...rightButton}\n variant={rightButton?.variant || 'filled'}\n color={rightButton?.color || 'primary'}\n size={rightButton?.size || 'small'}\n >\n {rightButton?.icon && <Icon {...rightButton?.icon} />}\n </FloatingButton>\n );\n\n return (\n <StyledView {...rest}>\n {leftButton ? (\n <>\n {leftButton?.valueBagde ? (\n <Badge value={leftButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n {children}\n {rightButton ? (\n <>\n {rightButton?.valueBagde ? (\n <Badge value={rightButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n </StyledView>\n );\n};\n\nexport default Header;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../../../src/components/atoms/Header/Header.tsx"],"sourcesContent":["import { ViewProps } from 'react-native';\nimport { StyledView, FloatingButton, Dummy } from './styled';\nimport { ButtonProps, Icon, IconProps } from '@tecsinapse/react-core';\nimport * as React from 'react';\nimport Badge from '../Badge/Badge';\nimport { FC } from 'react';\n\ntype Attachable = ButtonProps & {\n icon: IconProps;\n valueBagde?: number;\n};\n\nexport interface HeaderProps extends ViewProps {\n rightButton?: Attachable;\n leftButton?: Attachable;\n}\n\nconst Header: React.FC<HeaderProps> = ({\n rightButton,\n leftButton,\n children,\n ...rest\n}) => {\n const ButtonBase: FC = () => (\n <FloatingButton\n {...rightButton}\n variant={rightButton?.variant || 'filled'}\n color={rightButton?.color || 'primary'}\n size={rightButton?.size || 'small'}\n >\n {rightButton?.icon && <Icon {...rightButton?.icon} />}\n </FloatingButton>\n );\n\n return (\n <StyledView {...rest}>\n {leftButton ? (\n <>\n {leftButton?.valueBagde ? (\n <Badge value={leftButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n {children}\n {rightButton ? (\n <>\n {rightButton?.valueBagde ? (\n <Badge value={rightButton.valueBagde} color={'error'}>\n <ButtonBase />\n </Badge>\n ) : (\n <ButtonBase />\n )}\n </>\n ) : (\n <Dummy disabled />\n )}\n </StyledView>\n );\n};\n\nexport default Header;\n"],"names":[],"mappings":";;;;;AAiBA,MAAM,SAAgC,CAAC;AAAA,EACrC,WAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA;AAAA,EACG,GAAA,IAAA;AACL,CAAM,KAAA;AACJ,EAAM,MAAA,UAAA,GAAiB,sBACpB,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACE,GAAG,WAAA;AAAA,IACJ,OAAA,EAAS,aAAa,OAAW,IAAA,QAAA;AAAA,IACjC,KAAA,EAAO,aAAa,KAAS,IAAA,SAAA;AAAA,IAC7B,IAAA,EAAM,aAAa,IAAQ,IAAA,OAAA;AAAA,GAE1B,EAAA,WAAA,EAAa,wBAAS,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,WAAa,EAAA,IAAA;AAAA,GAAM,CACrD,CAAA,CAAA;AAGF,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IAAY,GAAG,IAAA;AAAA,GAAA,EACb,UACC,mBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACG,UAAY,EAAA,UAAA,mBACV,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,OAAO,UAAW,CAAA,UAAA;AAAA,IAAY,KAAO,EAAA,OAAA;AAAA,GAC1C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAW,CACd,CAAA,uCAEC,UAAW,EAAA,IAAA,CAEhB,oBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,QAAQ,EAAA,IAAA;AAAA,GAAC,GAEjB,QACA,EAAA,WAAA,mBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,WAAA,EAAa,6BACX,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,OAAO,WAAY,CAAA,UAAA;AAAA,IAAY,KAAO,EAAA,OAAA;AAAA,GAC3C,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAW,CACd,CAAA,uCAEC,UAAW,EAAA,IAAA,CAEhB,oBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAM,QAAQ,EAAA,IAAA;AAAA,GAAC,CAEpB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -4,86 +4,32 @@ import { View } from 'react-native';
|
|
|
4
4
|
import Text from '../Text/Text.js';
|
|
5
5
|
import { StyledNativeInput } from './styled.js';
|
|
6
6
|
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __defProps = Object.defineProperties;
|
|
9
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
-
var __spreadValues = (a, b) => {
|
|
15
|
-
for (var prop in b || (b = {}))
|
|
16
|
-
if (__hasOwnProp.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
if (__getOwnPropSymbols)
|
|
19
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
-
if (__propIsEnum.call(b, prop))
|
|
21
|
-
__defNormalProp(a, prop, b[prop]);
|
|
22
|
-
}
|
|
23
|
-
return a;
|
|
24
|
-
};
|
|
25
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
-
var __objRest = (source, exclude) => {
|
|
27
|
-
var target = {};
|
|
28
|
-
for (var prop in source)
|
|
29
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
-
target[prop] = source[prop];
|
|
31
|
-
if (source != null && __getOwnPropSymbols)
|
|
32
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
-
target[prop] = source[prop];
|
|
35
|
-
}
|
|
36
|
-
return target;
|
|
37
|
-
};
|
|
38
7
|
const Input = React__default.forwardRef(
|
|
39
|
-
(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"label",
|
|
65
|
-
"labelColor",
|
|
66
|
-
"labelColorVariant",
|
|
67
|
-
"labelColorTone",
|
|
68
|
-
"labelTypography",
|
|
69
|
-
"labelStack",
|
|
70
|
-
"labelWeight",
|
|
71
|
-
"leftComponent",
|
|
72
|
-
"rightComponent",
|
|
73
|
-
"disabled",
|
|
74
|
-
"borderColor",
|
|
75
|
-
"borderColorGradation",
|
|
76
|
-
"inputFontStack",
|
|
77
|
-
"inputFontWeight",
|
|
78
|
-
"inputContainerStyle",
|
|
79
|
-
"variant",
|
|
80
|
-
"hintComponent",
|
|
81
|
-
"hint",
|
|
82
|
-
"onFocus",
|
|
83
|
-
"onBlur",
|
|
84
|
-
"value",
|
|
85
|
-
"placeholder"
|
|
86
|
-
]);
|
|
8
|
+
({
|
|
9
|
+
label,
|
|
10
|
+
labelColor,
|
|
11
|
+
labelColorVariant,
|
|
12
|
+
labelColorTone,
|
|
13
|
+
labelTypography,
|
|
14
|
+
labelStack,
|
|
15
|
+
labelWeight,
|
|
16
|
+
leftComponent,
|
|
17
|
+
rightComponent,
|
|
18
|
+
disabled,
|
|
19
|
+
borderColor,
|
|
20
|
+
borderColorGradation,
|
|
21
|
+
inputFontStack = "default",
|
|
22
|
+
inputFontWeight = "bold",
|
|
23
|
+
inputContainerStyle,
|
|
24
|
+
variant = "default",
|
|
25
|
+
hintComponent,
|
|
26
|
+
hint,
|
|
27
|
+
onFocus,
|
|
28
|
+
onBlur,
|
|
29
|
+
value,
|
|
30
|
+
placeholder,
|
|
31
|
+
...rest
|
|
32
|
+
}, ref) => {
|
|
87
33
|
const _hint = hintComponent || /* @__PURE__ */ React__default.createElement(Hint, {
|
|
88
34
|
TextComponent: Text,
|
|
89
35
|
text: hint,
|
|
@@ -94,9 +40,10 @@ const Input = React__default.forwardRef(
|
|
|
94
40
|
onBlur,
|
|
95
41
|
!disabled
|
|
96
42
|
);
|
|
97
|
-
const internalStyle =
|
|
98
|
-
minHeight: RFValue(50)
|
|
99
|
-
|
|
43
|
+
const internalStyle = {
|
|
44
|
+
minHeight: RFValue(50),
|
|
45
|
+
...{ inputContainerStyle }
|
|
46
|
+
};
|
|
100
47
|
const onlyLabel = label && !placeholder;
|
|
101
48
|
return /* @__PURE__ */ React__default.createElement(View, null, /* @__PURE__ */ React__default.createElement(InputContainer, {
|
|
102
49
|
label: value ? label : void 0,
|
|
@@ -115,7 +62,8 @@ const Input = React__default.forwardRef(
|
|
|
115
62
|
focused,
|
|
116
63
|
disabled,
|
|
117
64
|
variant
|
|
118
|
-
}, /* @__PURE__ */ React__default.createElement(StyledNativeInput,
|
|
65
|
+
}, /* @__PURE__ */ React__default.createElement(StyledNativeInput, {
|
|
66
|
+
...rest,
|
|
119
67
|
placeholder: onlyLabel ? label : placeholder,
|
|
120
68
|
value,
|
|
121
69
|
ref,
|
|
@@ -124,7 +72,7 @@ const Input = React__default.forwardRef(
|
|
|
124
72
|
disabled,
|
|
125
73
|
onFocus: handleFocus,
|
|
126
74
|
onBlur: handleBlur
|
|
127
|
-
}))
|
|
75
|
+
})), hint && _hint);
|
|
128
76
|
}
|
|
129
77
|
);
|
|
130
78
|
Input.displayName = "Input";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../../src/components/atoms/Input/Input.tsx"],"sourcesContent":["import {\n FontStackType,\n FontWeightType,\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n RFValue,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { StyleProp, TextInput, View, ViewStyle } from 'react-native';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport interface InputNativeProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst Input = React.forwardRef<TextInput, InputNativeProps>(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const internalStyle: StyleProp<ViewStyle> = {\n minHeight: RFValue(50),\n ...{ inputContainerStyle },\n };\n const onlyLabel = label && !placeholder;\n\n return (\n <View>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={internalStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../../src/components/atoms/Input/Input.tsx"],"sourcesContent":["import {\n FontStackType,\n FontWeightType,\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n RFValue,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { StyleProp, TextInput, View, ViewStyle } from 'react-native';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport interface InputNativeProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst Input = React.forwardRef<TextInput, InputNativeProps>(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const internalStyle: StyleProp<ViewStyle> = {\n minHeight: RFValue(50),\n ...{ inputContainerStyle },\n };\n const onlyLabel = label && !placeholder;\n\n return (\n <View>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={internalStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["React"],"mappings":";;;;;;AAsBA,MAAM,QAAQA,cAAM,CAAA,UAAA;AAAA,EAClB,CACE;AAAA,IACE,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,cAAiB,GAAA,SAAA;AAAA,IACjB,eAAkB,GAAA,MAAA;AAAA,IAClB,mBAAA;AAAA,IACA,OAAU,GAAA,SAAA;AAAA,IACV,aAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACG,GAAA,IAAA;AAAA,KAEL,GACG,KAAA;AACH,IAAM,MAAA,KAAA,GAAQ,iCACXA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAK,aAAe,EAAA,IAAA;AAAA,MAAM,IAAM,EAAA,IAAA;AAAA,MAAM,OAAA;AAAA,KAAkB,CAAA,CAAA;AAE3D,IAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,MAC3C,OAAA;AAAA,MACA,MAAA;AAAA,MACA,CAAC,QAAA;AAAA,KACH,CAAA;AAEA,IAAA,MAAM,aAAsC,GAAA;AAAA,MAC1C,SAAA,EAAW,QAAQ,EAAE,CAAA;AAAA,MACrB,GAAG,EAAE,mBAAoB,EAAA;AAAA,KAC3B,CAAA;AACA,IAAM,MAAA,SAAA,GAAY,SAAS,CAAC,WAAA,CAAA;AAE5B,IACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,4BACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,MACC,KAAA,EAAO,QAAQ,KAAQ,GAAA,KAAA,CAAA;AAAA,MACvB,UAAA;AAAA,MACA,iBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAgB,EAAA,IAAA;AAAA,MAChB,aAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,oBAAA;AAAA,MACA,mBAAqB,EAAA,aAAA;AAAA,MACrB,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KAAA,kBAECA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,WAAA,EAAa,YAAY,KAAQ,GAAA,WAAA;AAAA,MACjC,KAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAW,EAAA,cAAA;AAAA,MACX,UAAY,EAAA,eAAA;AAAA,MACZ,QAAA;AAAA,MACA,OAAS,EAAA,WAAA;AAAA,MACT,MAAQ,EAAA,UAAA;AAAA,KACV,CACF,CACC,EAAA,IAAA,IAAQ,KACX,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,KAAA,CAAM,WAAc,GAAA,OAAA;;;;"}
|