@tecsinapse/react-core 1.17.3 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/helpers.js.map +1 -1
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Avatar/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Badge/styled.js.map +1 -1
- package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/components/atoms/BoxContent/index.js.map +1 -1
- package/dist/components/atoms/BoxContent/styled.js +1 -1
- package/dist/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +1 -1
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +1 -1
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +1 -1
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/States/styled.js +1 -1
- package/dist/components/atoms/Button/States/styled.js.map +1 -1
- package/dist/components/atoms/Button/index.js +1 -1
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/Button/styled.js.map +1 -1
- package/dist/components/atoms/Card/Card.js +1 -1
- package/dist/components/atoms/Card/Card.js.map +1 -1
- package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
- package/dist/components/atoms/Card/Footer/index.js.map +1 -1
- package/dist/components/atoms/Card/Header/Header.js.map +1 -1
- package/dist/components/atoms/Card/Header/index.js.map +1 -1
- package/dist/components/atoms/Card/index.js.map +1 -1
- package/dist/components/atoms/Card/styled.js.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/styled.js +1 -1
- package/dist/components/atoms/Checkbox/styled.js.map +1 -1
- package/dist/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/components/atoms/Divider/index.js.map +1 -1
- package/dist/components/atoms/Divider/styled.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.d.ts +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.js +1 -1
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/styled.js +1 -1
- package/dist/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.js +1 -1
- package/dist/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/components/atoms/Icon/helpers.js +1 -1
- package/dist/components/atoms/Icon/helpers.js.map +1 -1
- package/dist/components/atoms/Icon/index.js.map +1 -1
- package/dist/components/atoms/Input/Hint.js.map +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.d.ts +3 -4
- package/dist/components/atoms/Input/InputElement/InputElement.js +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +3 -4
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/components/atoms/Input/index.js +1 -1
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +1 -1
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.js +1 -1
- package/dist/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/components/atoms/Paper/index.js.map +1 -1
- package/dist/components/atoms/Paper/styled.js.map +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/components/atoms/PressableSurface/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/atoms/ProgressBar/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/styled.js +1 -1
- package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/components/atoms/RadioButton/styled.js +1 -1
- package/dist/components/atoms/RadioButton/styled.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts +1 -1
- package/dist/components/atoms/Switch/Switch.js +1 -1
- package/dist/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/components/atoms/Switch/animation.js.map +1 -1
- package/dist/components/atoms/Switch/index.js.map +1 -1
- package/dist/components/atoms/Switch/styled.d.ts +2 -14
- package/dist/components/atoms/Switch/styled.js +1 -1
- package/dist/components/atoms/Switch/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +1 -1
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Tag/styled.js +1 -1
- package/dist/components/atoms/Tag/styled.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +1 -1
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/functions.js.map +1 -1
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +1 -1
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
- package/dist/components/molecules/Calendar/components/index.js +1 -1
- package/dist/components/molecules/Calendar/components/index.js.map +1 -1
- package/dist/components/molecules/Calendar/index.d.ts +1 -1
- package/dist/components/molecules/Calendar/index.js +1 -1
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/Calendar/styled.js +1 -1
- package/dist/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +1 -1
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +2 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/dist/components/molecules/Grid/functions.d.ts +3 -0
- package/dist/components/molecules/Grid/functions.js +21 -0
- package/dist/components/molecules/Grid/functions.js.map +1 -0
- package/dist/components/molecules/Grid/index.d.ts +42 -2
- package/dist/components/molecules/Grid/index.js +4 -13
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/styled.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
- package/dist/components/molecules/IconTextButton/IconComponent.js +28 -0
- package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js +4 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/dist/components/molecules/IconTextButton/index.d.ts +2 -0
- package/dist/components/molecules/IconTextButton/index.js +16 -0
- package/dist/components/molecules/IconTextButton/index.js.map +1 -0
- package/dist/components/molecules/IconTextButton/styled.d.ts +4 -0
- package/dist/components/molecules/{Grid/Item/index.js → IconTextButton/styled.js} +19 -5
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js +1 -1
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/InputPassword/styled.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +4 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/dist/components/molecules/LabeledSwitch/index.js +10 -0
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/dist/components/molecules/Snackbar/Snackbar.js +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +1 -1
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.d.ts +1 -1
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/index.js +1 -1
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.d.ts +2 -14
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useDebouncedState.js +1 -1
- package/dist/hooks/useDebouncedState.js.map +1 -1
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +58 -30
- package/dist/index.js.map +1 -1
- package/dist/styles/ThemeProvider.js.map +1 -1
- package/dist/styles/definitions.d.ts +2 -1
- package/dist/styles/definitions.js +7 -1
- package/dist/styles/definitions.js.map +1 -1
- package/dist/styles/light.js +2 -1
- package/dist/styles/light.js.map +1 -1
- package/dist/types/defaults.d.ts +8 -2
- package/dist/types/defaults.js.map +1 -1
- package/dist/utils/IPhoneXHelper.js +3 -3
- package/dist/utils/IPhoneXHelper.js.map +1 -1
- package/dist/utils/ResponsiveFontSize.js +6 -6
- package/dist/utils/ResponsiveFontSize.js.map +1 -1
- package/dist/utils/extractNumbersFromString.js +1 -1
- package/dist/utils/extractNumbersFromString.js.map +1 -1
- package/dist/utils/formatWithMask.js.map +1 -1
- package/dist/utils/index.d.ts +5 -4
- package/dist/utils/index.js +28 -19
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lightenDarkenColor.js.map +1 -1
- package/dist/utils/masks.js.map +1 -1
- package/dist/utils/variantComplement.d.ts +6 -0
- package/dist/utils/variantComplement.js +35 -0
- package/dist/utils/variantComplement.js.map +1 -0
- package/package.json +5 -5
- package/src/components/atoms/Badge/styled.ts +2 -3
- package/src/components/atoms/GroupButton/GroupButton.tsx +2 -5
- package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
- package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
- package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
- package/src/components/atoms/ProgressBar/ProgressBar.tsx +2 -4
- package/src/components/atoms/Switch/Switch.tsx +39 -19
- package/src/components/atoms/Switch/animation.ts +4 -6
- package/src/components/atoms/Switch/styled.ts +4 -6
- package/src/components/atoms/Tag/Tag.tsx +1 -1
- package/src/components/atoms/shared/PaperAndCard.ts +1 -1
- package/src/components/molecules/Calendar/index.ts +1 -1
- package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
- package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
- package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
- package/src/components/molecules/Grid/functions.ts +29 -0
- package/src/components/molecules/Grid/index.ts +66 -2
- package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
- package/src/components/molecules/IconTextButton/IconComponent.tsx +31 -0
- package/src/components/molecules/IconTextButton/IconTextButton.tsx +10 -0
- package/src/components/molecules/IconTextButton/index.ts +2 -0
- package/src/components/molecules/IconTextButton/styled.ts +20 -0
- package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +9 -0
- package/src/components/molecules/LabeledSwitch/index.ts +1 -0
- package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
- package/src/components/molecules/Snackbar/styled.ts +6 -2
- package/src/components/molecules/TextArea/TextArea.tsx +6 -2
- package/src/components/molecules/TextArea/styled.ts +5 -2
- package/src/hooks/useDebouncedState.ts +1 -1
- package/src/index.ts +26 -6
- package/src/styles/definitions.ts +8 -1
- package/src/styles/light.ts +2 -0
- package/src/types/defaults.ts +11 -1
- package/src/utils/IPhoneXHelper.ts +27 -22
- package/src/utils/ResponsiveFontSize.ts +55 -36
- package/src/utils/index.ts +5 -4
- package/src/utils/variantComplement.ts +36 -0
- package/dist/components/molecules/Grid/Grid.d.ts +0 -15
- package/dist/components/molecules/Grid/Grid.js +0 -55
- package/dist/components/molecules/Grid/Grid.js.map +0 -1
- package/dist/components/molecules/Grid/Item/Item.d.ts +0 -30
- package/dist/components/molecules/Grid/Item/Item.js +0 -68
- package/dist/components/molecules/Grid/Item/Item.js.map +0 -1
- package/dist/components/molecules/Grid/Item/index.d.ts +0 -1
- package/dist/components/molecules/Grid/Item/index.js.map +0 -1
- package/src/components/molecules/Grid/Grid.stories.tsx +0 -132
- package/src/components/molecules/Grid/Grid.tsx +0 -87
- package/src/components/molecules/Grid/Item/Item.tsx +0 -93
- package/src/components/molecules/Grid/Item/index.ts +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _reactCore = require("@tecsinapse/react-core");
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
|
|
14
|
+
const IconComponent = ({
|
|
15
|
+
iconProps,
|
|
16
|
+
size = 'default',
|
|
17
|
+
defaultFontColor
|
|
18
|
+
}) => {
|
|
19
|
+
return iconProps ? _react.default.createElement(_reactCore.Icon, _extends({
|
|
20
|
+
size: iconProps.size ?? size === 'small' ? 'deca' : 'kilo',
|
|
21
|
+
fontColor: iconProps.fontColor ?? defaultFontColor
|
|
22
|
+
}, iconProps)) : _react.default.createElement(_react.default.Fragment, null);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var _default = _react.default.memo(IconComponent);
|
|
26
|
+
|
|
27
|
+
exports.default = _default;
|
|
28
|
+
//# sourceMappingURL=IconComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconComponent.js","names":["IconComponent","iconProps","size","defaultFontColor","fontColor","React","memo"],"sources":["../../../../src/components/molecules/IconTextButton/IconComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n Icon,\n IconProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\n\ninterface IconComponentProps {\n iconProps?: IconProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n}\n\nconst IconComponent: FC<IconComponentProps> = ({\n iconProps,\n size = 'default',\n defaultFontColor,\n}) => {\n return iconProps ? (\n <Icon\n size={iconProps.size ?? size === 'small' ? 'deca' : 'kilo'}\n fontColor={iconProps.fontColor ?? defaultFontColor}\n {...iconProps}\n />\n ) : (\n <></>\n );\n};\n\nexport default React.memo(IconComponent);\n"],"mappings":";;;;;AAAA;;AAMA;;;;;;AAQA,MAAMA,aAAqC,GAAG,CAAC;EAC7CC,SAD6C;EAE7CC,IAAI,GAAG,SAFsC;EAG7CC;AAH6C,CAAD,KAIxC;EACJ,OAAOF,SAAS,GACd,6BAAC,eAAD;IACE,IAAI,EAAEA,SAAS,CAACC,IAAV,IAAkBA,IAAI,KAAK,OAA3B,GAAqC,MAArC,GAA8C,MADtD;IAEE,SAAS,EAAED,SAAS,CAACG,SAAV,IAAuBD;EAFpC,GAGMF,SAHN,EADc,GAOd,2DAPF;AASD,CAdD;;eAgBeI,cAAA,CAAMC,IAAN,CAAWN,aAAX,C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonProps, IconProps, TextProps } from '@tecsinapse/react-core';
|
|
2
|
+
export declare type IconPositionOptions = 'left' | 'right';
|
|
3
|
+
export interface IconTextButtonProps extends ButtonProps {
|
|
4
|
+
iconProps?: IconProps;
|
|
5
|
+
iconPosition?: IconPositionOptions;
|
|
6
|
+
textProps?: TextProps;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTextButton.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import { ButtonProps, IconProps, TextProps } from '@tecsinapse/react-core';\n\nexport type IconPositionOptions = 'left' | 'right';\n\nexport interface IconTextButtonProps extends ButtonProps {\n iconProps?: IconProps;\n iconPosition?: IconPositionOptions;\n textProps?: TextProps;\n label?: string;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.IconTextButtonProps = exports.IconPositionOptions = exports.IconComponent = void 0;
|
|
5
|
+
|
|
6
|
+
var _IconComponent = _interopRequireDefault(require("./IconComponent"));
|
|
7
|
+
|
|
8
|
+
exports.IconComponent = _IconComponent.default;
|
|
9
|
+
|
|
10
|
+
var _IconTextButton = require("./IconTextButton");
|
|
11
|
+
|
|
12
|
+
exports.IconPositionOptions = _IconTextButton.IconPositionOptions;
|
|
13
|
+
exports.IconTextButtonProps = _IconTextButton.IconTextButtonProps;
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"sourcesContent":["export { default as IconComponent } from './IconComponent';\nexport { IconPositionOptions, IconTextButtonProps } from './IconTextButton';\n"],"mappings":";;;;;AAAA;;;;AACA"}
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.StyledText = void 0;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _native = _interopRequireWildcard(require("@emotion/native"));
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
exports.IGridItem = _Item.IGridItem;
|
|
8
|
+
var _reactCore = require("@tecsinapse/react-core");
|
|
10
9
|
|
|
11
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
11
|
|
|
13
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
const StyledText = (0, _native.default)(_reactCore.Text)`
|
|
15
|
+
${({
|
|
16
|
+
theme,
|
|
17
|
+
iconPosition,
|
|
18
|
+
hasIcon = false
|
|
19
|
+
}) => {
|
|
20
|
+
if (hasIcon && iconPosition === 'left') return (0, _native.css)`
|
|
21
|
+
margin-left: ${theme == null ? void 0 : theme.spacing.mili};
|
|
22
|
+
`;else if (hasIcon && iconPosition === 'right') return (0, _native.css)`
|
|
23
|
+
margin-right: ${theme == null ? void 0 : theme.spacing.mili};
|
|
24
|
+
`;
|
|
25
|
+
}}
|
|
26
|
+
`;
|
|
27
|
+
exports.StyledText = StyledText;
|
|
28
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["StyledText","styled","Text","theme","iconPosition","hasIcon","css","spacing","mili"],"sources":["../../../../src/components/molecules/IconTextButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { IconPositionOptions, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledText = styled(Text)<\n Partial<StyleProps> & {\n iconPosition: IconPositionOptions;\n hasIcon?: boolean;\n }\n>`\n ${({ theme, iconPosition, hasIcon = false }) => {\n if (hasIcon && iconPosition === 'left')\n return css`\n margin-left: ${theme?.spacing.mili};\n `;\n else if (hasIcon && iconPosition === 'right')\n return css`\n margin-right: ${theme?.spacing.mili};\n `;\n }}\n`;\n"],"mappings":";;;;;AAAA;;AACA;;;;;;AAEO,MAAMA,UAAU,GAAG,IAAAC,eAAA,EAAOC,eAAP,CAKxB;AACF,IAAI,CAAC;EAAEC,KAAF;EAASC,YAAT;EAAuBC,OAAO,GAAG;AAAjC,CAAD,KAA8C;EAC9C,IAAIA,OAAO,IAAID,YAAY,KAAK,MAAhC,EACE,OAAO,IAAAE,WAAA,CAAI;AACjB,uBAAuBH,KADP,oBACOA,KAAK,CAAEI,OAAP,CAAeC,IAAK;AAC3C,OAFM,CADF,KAIK,IAAIH,OAAO,IAAID,YAAY,KAAK,OAAhC,EACH,OAAO,IAAAE,WAAA,CAAI;AACjB,wBAAwBH,KADR,oBACQA,KAAK,CAAEI,OAAP,CAAeC,IAAK;AAC5C,OAFM;AAGH,CAAC;AACJ,CAhBO"}
|
|
@@ -11,7 +11,7 @@ var _styled = require("./styled");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
function _extends() { _extends = Object.assign
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
15
|
|
|
16
16
|
const InputPasswordIcon = ({
|
|
17
17
|
revealed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"InputPasswordIcon.js","names":["InputPasswordIcon","revealed","onChangeState","rest","icon"],"sources":["../../../../src/components/molecules/InputPassword/InputPasswordIcon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonProps } from '../../atoms/Button';\nimport { Icon } from '../../atoms/Icon';\nimport { StyledPasswordButtonIcon } from './styled';\n\ninterface InputPasswordIconProps extends ButtonProps {\n revealed: boolean;\n onChangeState: (revealed: boolean) => void;\n}\n\nconst InputPasswordIcon: FC<InputPasswordIconProps> = ({\n revealed,\n onChangeState,\n ...rest\n}) => {\n const icon = revealed ? 'eye-outline' : 'eye-off-outline';\n return (\n <StyledPasswordButtonIcon\n {...rest}\n variant=\"text\"\n size=\"small\"\n onPress={() => onChangeState(!revealed)}\n >\n <Icon name={icon} type=\"ionicon\" size=\"centi\" />\n </StyledPasswordButtonIcon>\n );\n};\n\nexport default InputPasswordIcon;\n"],"mappings":";;;;;AAAA;;AAEA;;AACA;;;;;;AAOA,MAAMA,iBAA6C,GAAG,CAAC;EACrDC,QADqD;EAErDC,aAFqD;EAGrD,GAAGC;AAHkD,CAAD,KAIhD;EACJ,MAAMC,IAAI,GAAGH,QAAQ,GAAG,aAAH,GAAmB,iBAAxC;EACA,OACE,6BAAC,gCAAD,eACME,IADN;IAEE,OAAO,EAAC,MAFV;IAGE,IAAI,EAAC,OAHP;IAIE,OAAO,EAAE,MAAMD,aAAa,CAAC,CAACD,QAAF;EAJ9B,IAME,6BAAC,UAAD;IAAM,IAAI,EAAEG,IAAZ;IAAkB,IAAI,EAAC,SAAvB;IAAiC,IAAI,EAAC;EAAtC,EANF,CADF;AAUD,CAhBD;;eAkBeJ,iB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/InputPassword/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/InputPassword/index.ts"],"sourcesContent":["export { default as InputPasswordIcon } from './InputPasswordIcon';\n"],"mappings":";;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["StyledPasswordButtonIcon","styled","Button","theme","spacing","centi"],"sources":["../../../../src/components/molecules/InputPassword/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Button } from '../../atoms/Button';\n\nexport const StyledPasswordButtonIcon = styled(Button)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.centi};\n`;\n"],"mappings":";;;;;AAAA;;AAEA;;;;AAEO,MAAMA,wBAAwB,GAAG,IAAAC,eAAA,EAAOC,cAAP,CAAoC;AAC5E,aAAa,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,KAAM;AAChD,CAFO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabeledSwitch.js","names":[],"sources":["../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { SwitchProps } from '../../atoms/Switch';\n\nexport type LabelPositionOptions = 'left' | 'right';\n\nexport interface LabeledSwitchProps extends SwitchProps {\n label: string;\n labelPosition?: LabelPositionOptions;\n pressableLabel?: boolean;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LabeledSwitchProps, LabelPositionOptions } from './LabeledSwitch';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.LabeledSwitchProps = exports.LabelPositionOptions = void 0;
|
|
5
|
+
|
|
6
|
+
var _LabeledSwitch = require("./LabeledSwitch");
|
|
7
|
+
|
|
8
|
+
exports.LabeledSwitchProps = _LabeledSwitch.LabeledSwitchProps;
|
|
9
|
+
exports.LabelPositionOptions = _LabeledSwitch.LabelPositionOptions;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/LabeledSwitch/index.ts"],"sourcesContent":["export { LabeledSwitchProps, LabelPositionOptions } from './LabeledSwitch';\n"],"mappings":";;;;;AAAA"}
|
|
@@ -13,7 +13,7 @@ var _styled = require("./styled");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
const Snackbar = ({
|
|
19
19
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Snackbar.js","names":["Snackbar","children","open","onClose","dismissable","timeout","undefined","leftIcon","colorTone","colorVariant","rightIcon","anchor","anchorDistance","style","fadeAnim","React","useRef","Animated","Value","current","duration","fadeIn","timing","toValue","useNativeDriver","start","fadeOut","delay","useEffect","setTimeout","opacity","setValue","direction"],"sources":["../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon, IconProps } from '../../atoms/Icon';\nimport {\n ContentContainer,\n DismissContainer,\n IconContainer,\n SnackbarContainer,\n StyledContainerFlexRow,\n StyledProgressBar,\n TextContainer,\n} from './styled';\n\nexport interface SnackbarProps {\n colorVariant?: ColorType;\n colorTone?: ColorGradationType;\n open: boolean;\n /** Close callback */\n onClose?: () => void;\n /** Snackbar is closable */\n dismissable?: boolean;\n /** Time in miliseconds for auto hide */\n timeout?: number;\n leftIcon?: IconProps;\n /** Properties for close icon */\n rightIcon?: Omit<IconProps, 'name' | 'type'>;\n anchor?: 'top' | 'bottom';\n /** Distance from anchorage (results in px) */\n anchorDistance?: number;\n style?: StyleProp<ViewStyle>;\n}\n\nexport const Snackbar: React.FC<SnackbarProps> = ({\n children,\n open = true,\n onClose,\n dismissable = false,\n timeout = undefined,\n leftIcon,\n colorTone = 'xlight',\n colorVariant = 'primary',\n rightIcon = { colorTone: 'medium', colorVariant: 'primary' },\n anchor = 'bottom',\n anchorDistance,\n style,\n}) => {\n const fadeAnim = React.useRef(new Animated.Value(0)).current;\n const duration = 500;\n\n const fadeIn = () => {\n Animated.timing(fadeAnim, {\n toValue: 1,\n useNativeDriver: true,\n duration,\n }).start(() => timeout && fadeOut());\n };\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n useNativeDriver: true,\n duration,\n delay: timeout ? timeout - duration : 0,\n }).start();\n };\n\n React.useEffect(() => {\n if (open) {\n fadeIn();\n }\n if (open && timeout) {\n setTimeout(() => {\n onClose?.();\n }, timeout + duration);\n }\n }, [open, timeout]);\n\n return (\n <SnackbarContainer\n colorVariant={colorVariant}\n colorTone={colorTone}\n elevated\n anchor={anchor}\n anchorDistance={anchorDistance}\n visible={open}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n timeout={timeout}\n >\n <StyledContainerFlexRow>\n <ContentContainer>\n {leftIcon && (\n <IconContainer>\n <Icon {...leftIcon} size=\"centi\" />\n </IconContainer>\n )}\n <TextContainer>{children}</TextContainer>\n </ContentContainer>\n {dismissable && (\n <DismissContainer\n effect=\"none\"\n onPress={() => {\n fadeOut();\n setTimeout(() => {\n fadeAnim.setValue(0);\n onClose?.();\n }, duration);\n }}\n >\n <Icon\n {...rightIcon}\n size=\"centi\"\n name=\"close\"\n type=\"material-community\"\n />\n </DismissContainer>\n )}\n </StyledContainerFlexRow>\n {timeout && open && (\n <StyledProgressBar\n valueNow={0}\n valueMax={100}\n valueMin={0}\n animate={true}\n color={colorVariant}\n colorTone=\"medium\"\n animationParameters={{ direction: 'left', duration: timeout }}\n />\n )}\n </SnackbarContainer>\n );\n};\n\nexport default Snackbar;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AA6BO,MAAMA,QAAiC,GAAG,CAAC;EAChDC,QADgD;EAEhDC,IAAI,GAAG,IAFyC;EAGhDC,OAHgD;EAIhDC,WAAW,GAAG,KAJkC;EAKhDC,OAAO,GAAGC,SALsC;EAMhDC,QANgD;EAOhDC,SAAS,GAAG,QAPoC;EAQhDC,YAAY,GAAG,SARiC;EAShDC,SAAS,GAAG;IAAEF,SAAS,EAAE,QAAb;IAAuBC,YAAY,EAAE;EAArC,CAToC;EAUhDE,MAAM,GAAG,QAVuC;EAWhDC,cAXgD;EAYhDC;AAZgD,CAAD,KAa3C;EACJ,MAAMC,QAAQ,GAAGC,cAAA,CAAMC,MAAN,CAAa,IAAIC,qBAAA,CAASC,KAAb,CAAmB,CAAnB,CAAb,EAAoCC,OAArD;;EACA,MAAMC,QAAQ,GAAG,GAAjB;;EAEA,MAAMC,MAAM,GAAG,MAAM;IACnBJ,qBAAA,CAASK,MAAT,CAAgBR,QAAhB,EAA0B;MACxBS,OAAO,EAAE,CADe;MAExBC,eAAe,EAAE,IAFO;MAGxBJ;IAHwB,CAA1B,EAIGK,KAJH,CAIS,MAAMpB,OAAO,IAAIqB,OAAO,EAJjC;EAKD,CAND;;EAQA,MAAMA,OAAO,GAAG,MAAM;IACpBT,qBAAA,CAASK,MAAT,CAAgBR,QAAhB,EAA0B;MACxBS,OAAO,EAAE,CADe;MAExBC,eAAe,EAAE,IAFO;MAGxBJ,QAHwB;MAIxBO,KAAK,EAAEtB,OAAO,GAAGA,OAAO,GAAGe,QAAb,GAAwB;IAJd,CAA1B,EAKGK,KALH;EAMD,CAPD;;EASAV,cAAA,CAAMa,SAAN,CAAgB,MAAM;IACpB,IAAI1B,IAAJ,EAAU;MACRmB,MAAM;IACP;;IACD,IAAInB,IAAI,IAAIG,OAAZ,EAAqB;MACnBwB,UAAU,CAAC,MAAM;QACf1B,OAAO,QAAP,YAAAA,OAAO;MACR,CAFS,EAEPE,OAAO,GAAGe,QAFH,CAAV;IAGD;EACF,CATD,EASG,CAAClB,IAAD,EAAOG,OAAP,CATH;;EAWA,OACE,6BAAC,yBAAD;IACE,YAAY,EAAEI,YADhB;IAEE,SAAS,EAAED,SAFb;IAGE,QAAQ,MAHV;IAIE,MAAM,EAAEG,MAJV;IAKE,cAAc,EAAEC,cALlB;IAME,OAAO,EAAEV,IANX;IAOE,KAAK,EAAE,CAAC;MAAE4B,OAAO,EAAEhB;IAAX,CAAD,EAA6CD,KAA7C,CAPT;IAQE,OAAO,EAAER;EARX,GAUE,6BAAC,8BAAD,QACE,6BAAC,wBAAD,QACGE,QAAQ,IACP,6BAAC,qBAAD,QACE,6BAAC,UAAD,eAAUA,QAAV;IAAoB,IAAI,EAAC;EAAzB,GADF,CAFJ,EAME,6BAAC,qBAAD,QAAgBN,QAAhB,CANF,CADF,EASGG,WAAW,IACV,6BAAC,wBAAD;IACE,MAAM,EAAC,MADT;IAEE,OAAO,EAAE,MAAM;MACbsB,OAAO;MACPG,UAAU,CAAC,MAAM;QACff,QAAQ,CAACiB,QAAT,CAAkB,CAAlB;QACA5B,OAAO,QAAP,YAAAA,OAAO;MACR,CAHS,EAGPiB,QAHO,CAAV;IAID;EARH,GAUE,6BAAC,UAAD,eACMV,SADN;IAEE,IAAI,EAAC,OAFP;IAGE,IAAI,EAAC,OAHP;IAIE,IAAI,EAAC;EAJP,GAVF,CAVJ,CAVF,EAuCGL,OAAO,IAAIH,IAAX,IACC,6BAAC,yBAAD;IACE,QAAQ,EAAE,CADZ;IAEE,QAAQ,EAAE,GAFZ;IAGE,QAAQ,EAAE,CAHZ;IAIE,OAAO,EAAE,IAJX;IAKE,KAAK,EAAEO,YALT;IAME,SAAS,EAAC,QANZ;IAOE,mBAAmB,EAAE;MAAEuB,SAAS,EAAE,MAAb;MAAqBZ,QAAQ,EAAEf;IAA/B;EAPvB,EAxCJ,CADF;AAqDD,CAlGM;;;eAoGQL,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/Snackbar/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Snackbar/index.ts"],"sourcesContent":["export { default as Snackbar, SnackbarProps } from './Snackbar';\n"],"mappings":";;;;;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.TextContainer = exports.
|
|
4
|
+
exports.TextContainer = exports.StyledProgressBar = exports.StyledContainerFlexRow = exports.SnackbarContainer = exports.IconContainer = exports.DismissContainer = exports.ContentContainer = void 0;
|
|
5
5
|
|
|
6
6
|
var _native = _interopRequireWildcard(require("@emotion/native"));
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["baseStyles","theme","colorTone","colorVariant","visible","css","borderRadius","mili","color","zIndex","modal","anchorTop","anchor","anchorDistance","RFValue","spacing","deca","anchorBottom","SnackbarContainer","styled","Paper","props","ContentContainer","View","IconContainer","DismissContainer","PressableSurface","StyledProgressBar","ProgressBar","StyledContainerFlexRow","TextContainer"],"sources":["../../../../src/components/molecules/Snackbar/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue } from '../../../utils';\nimport { Paper } from '../../atoms/Paper';\nimport { PressableSurface } from '../../atoms/PressableSurface';\nimport { ProgressBar } from '../../atoms/ProgressBar';\nimport { SnackbarProps } from './Snackbar';\n\nconst baseStyles = ({\n theme,\n colorTone = 'xlight',\n colorVariant = 'primary',\n visible,\n}: StyleProps & Partial<SnackbarProps> & { visible: boolean }) => css`\n padding: 0;\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.color[colorVariant][colorTone]};\n position: absolute;\n z-index: ${theme.zIndex.modal};\n display: ${visible ? 'flex' : 'none'};\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n`;\n\nconst anchorTop = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'top' &&\n css`\n top: ${anchorDistance\n ? `${RFValue(anchorDistance)}px`\n : theme.spacing.deca};\n `\n );\n};\n\nconst anchorBottom = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'bottom' &&\n css`\n bottom: ${anchorDistance\n ? `${RFValue(anchorDistance)}px`\n : theme.spacing.deca};\n `\n );\n};\n\nexport const SnackbarContainer = styled(Paper)<\n Partial<SnackbarProps & StyleProps> & { visible: boolean }\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n `\n);\n\nexport const ContentContainer = styled(View)`\n flex-direction: row;\n display: flex;\n align-items: center;\n flex-shrink: 1;\n`;\n\nexport const IconContainer = styled(View)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const DismissContainer = styled(PressableSurface)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-left: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledProgressBar = styled(ProgressBar)<Partial<StyleProps>>`\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n`;\n\nexport const StyledContainerFlexRow = styled(View)<Partial<StyleProps>>`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const TextContainer = styled(View)`\n display: flex;\n flex-shrink: 1;\n`;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAGA,MAAMA,UAAU,GAAG,CAAC;EAClBC,KADkB;EAElBC,SAAS,GAAG,QAFM;EAGlBC,YAAY,GAAG,SAHG;EAIlBC;AAJkB,CAAD,KAK+C,IAAAC,WAAA,CAAI;AACtE;AACA,mBAAmBJ,KAAK,CAACK,YAAN,CAAmBC,IAAK;AAC3C,sBAAsBN,KAAK,CAACO,KAAN,CAAYL,YAAZ,EAA0BD,SAA1B,CAAqC;AAC3D;AACA,aAAaD,KAAK,CAACQ,MAAN,CAAaC,KAAM;AAChC,aAAaN,OAAO,GAAG,MAAH,GAAY,MAAO;AACvC;AACA;AACA;AACA,CAfA;;AAiBA,MAAMO,SAAS,GAAG,CAAC;EACjBV,KADiB;EAEjBW,MAFiB;EAGjBC;AAHiB,CAAD,KAIyB;EACzC,OACED,MAAM,KAAK,KAAX,IACA,IAAAP,WAAA,CAAI;AACR,aAAaQ,cAAc,GAChB,GAAE,IAAAC,cAAA,EAAQD,cAAR,CAAwB,IADV,GAEjBZ,KAAK,CAACc,OAAN,CAAcC,IAAK;AAC7B,KANE;AAQD,CAbD;;AAeA,MAAMC,YAAY,GAAG,CAAC;EACpBhB,KADoB;EAEpBW,MAFoB;EAGpBC;AAHoB,CAAD,KAIsB;EACzC,OACED,MAAM,KAAK,QAAX,IACA,IAAAP,WAAA,CAAI;AACR,gBAAgBQ,cAAc,GACnB,GAAE,IAAAC,cAAA,EAAQD,cAAR,CAAwB,IADP,GAEpBZ,KAAK,CAACc,OAAN,CAAcC,IAAK;AAC7B,KANE;AAQD,CAbD;;AAeO,MAAME,iBAAiB,GAAG,IAAAC,eAAA,EAAOC,YAAP,EAG/BC,KAAK,IAAI,IAAAhB,WAAA,CAAI;AACf,MAAML,UAAU,CAACqB,KAAD,CAAQ;AACxB,MAAMJ,YAAY,CAACI,KAAD,CAAQ;AAC1B,MAAMV,SAAS,CAACU,KAAD,CAAQ;AACvB,GAPiC,CAA1B;;AAUA,MAAMC,gBAAgB,GAAG,IAAAH,eAAA,EAAOI,iBAAP,CAAa;AAC7C;AACA;AACA;AACA;AACA,CALO;;AAOA,MAAMC,aAAa,GAAG,IAAAL,eAAA,EAAOI,iBAAP,CAAkC;AAC/D;AACA;AACA;AACA,kBAAkB,CAAC;EAAEtB;AAAF,CAAD,KAAeA,KAAK,CAACc,OAAN,CAAcR,IAAK;AACpD,CALO;;AAOA,MAAMkB,gBAAgB,GAAG,IAAAN,eAAA,EAAOO,kCAAP,CAA8C;AAC9E;AACA;AACA;AACA,iBAAiB,CAAC;EAAEzB;AAAF,CAAD,KAAeA,KAAK,CAACc,OAAN,CAAcR,IAAK;AACnD,CALO;;AAOA,MAAMoB,iBAAiB,GAAG,IAAAR,eAAA,EAAOS,wBAAP,CAAyC;AAC1E;AACA;AACA,CAHO;;AAKA,MAAMC,sBAAsB,GAAG,IAAAV,eAAA,EAAOI,iBAAP,CAAkC;AACxE;AACA;AACA;AACA,aAAa,CAAC;EAAEtB;AAAF,CAAD,KAAeA,KAAK,CAACc,OAAN,CAAcR,IAAK;AAC/C,CALO;;AAOA,MAAMuB,aAAa,GAAG,IAAAX,eAAA,EAAOI,iBAAP,CAAa;AAC1C;AACA;AACA,CAHO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { FontStackType, FontWeightType } from '
|
|
2
|
+
import { FontStackType, FontWeightType } from '@tecsinapse/react-core';
|
|
3
3
|
import { InputContainerProps, InputElementProps } from '../../atoms/Input';
|
|
4
4
|
import { TextProps } from '../../atoms/Text';
|
|
5
5
|
export interface TextAreaProps extends Omit<InputElementProps, 'style' | 'multiline' | 'value'>, InputContainerProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"TextArea.js","names":["TextArea","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","TextComponent","Text","focused","children","maxLength","_maxLenght","value","_value","length","_hint","textAlign"],"sources":["../../../../src/components/molecules/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { FontStackType, FontWeightType } from '@tecsinapse/react-core';\nimport {\n Hint,\n InputContainerProps,\n InputElementProps,\n} from '../../atoms/Input';\nimport { Text, TextProps } from '../../atoms/Text';\nimport { StyledInputContainer } from './styled';\n\nexport interface TextAreaProps\n extends Omit<InputElementProps, 'style' | 'multiline' | 'value'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n maxCharCount?: number;\n value: string;\n // Omit below\n TextComponent?: FC<TextProps>;\n focused?: boolean;\n}\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n TextComponent = Text,\n focused,\n children,\n maxLength: _maxLenght,\n value: _value,\n}) => {\n let length = _value.length;\n const maxLength = _maxLenght;\n if (maxLength && length > maxLength) {\n length = maxLength;\n }\n\n const _hint = hintComponent || (\n <Hint TextComponent={TextComponent} text={hint} variant={variant} />\n );\n\n return (\n <View style={style}>\n <StyledInputContainer\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={TextComponent}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n {children}\n {maxLength && (\n <TextComponent\n colorVariant={'secondary'}\n colorTone={'medium'}\n typography={'label'}\n fontStack={'default'}\n fontWeight={'bold'}\n style={{ textAlign: 'right' }}\n >\n {`${length}/${maxLength}`}\n </TextComponent>\n )}\n </StyledInputContainer>\n {hint && _hint}\n </View>\n );\n};\n\nexport default TextArea;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;;;;AAcA,MAAMA,QAA2B,GAAG,CAAC;EACnCC,KADmC;EAEnCC,UAFmC;EAGnCC,iBAHmC;EAInCC,cAJmC;EAKnCC,eALmC;EAMnCC,UANmC;EAOnCC,WAPmC;EAQnCC,aARmC;EASnCC,cATmC;EAUnCC,QAVmC;EAWnCC,KAXmC;EAYnCC,WAZmC;EAanCC,oBAbmC;EAcnCC,mBAdmC;EAenCC,OAAO,GAAG,SAfyB;EAgBnCC,aAhBmC;EAiBnCC,IAjBmC;EAkBnCC,aAAa,GAAGC,UAlBmB;EAmBnCC,OAnBmC;EAoBnCC,QApBmC;EAqBnCC,SAAS,EAAEC,UArBwB;EAsBnCC,KAAK,EAAEC;AAtB4B,CAAD,KAuB9B;EACJ,IAAIC,MAAM,GAAGD,MAAM,CAACC,MAApB;EACA,MAAMJ,SAAS,GAAGC,UAAlB;;EACA,IAAID,SAAS,IAAII,MAAM,GAAGJ,SAA1B,EAAqC;IACnCI,MAAM,GAAGJ,SAAT;EACD;;EAED,MAAMK,KAAK,GAAGX,aAAa,IACzB,6BAAC,WAAD;IAAM,aAAa,EAAEE,aAArB;IAAoC,IAAI,EAAED,IAA1C;IAAgD,OAAO,EAAEF;EAAzD,EADF;;EAIA,OACE,6BAAC,iBAAD;IAAM,KAAK,EAAEJ;EAAb,GACE,6BAAC,4BAAD;IACE,KAAK,EAAEV,KADT;IAEE,UAAU,EAAEC,UAFd;IAGE,iBAAiB,EAAEC,iBAHrB;IAIE,cAAc,EAAEC,cAJlB;IAKE,eAAe,EAAEC,eALnB;IAME,UAAU,EAAEC,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,cAAc,EAAEW,aARlB;IASE,aAAa,EAAEV,aATjB;IAUE,cAAc,EAAEC,cAVlB;IAWE,WAAW,EAAEG,WAXf;IAYE,oBAAoB,EAAEC,oBAZxB;IAaE,mBAAmB,EAAEC,mBAbvB;IAcE,OAAO,EAAEM,OAdX;IAeE,QAAQ,EAAEV,QAfZ;IAgBE,OAAO,EAAEK;EAhBX,GAkBGM,QAlBH,EAmBGC,SAAS,IACR,6BAAC,aAAD;IACE,YAAY,EAAE,WADhB;IAEE,SAAS,EAAE,QAFb;IAGE,UAAU,EAAE,OAHd;IAIE,SAAS,EAAE,SAJb;IAKE,UAAU,EAAE,MALd;IAME,KAAK,EAAE;MAAEM,SAAS,EAAE;IAAb;EANT,GAQI,GAAEF,MAAO,IAAGJ,SAAU,EAR1B,CApBJ,CADF,EAiCGL,IAAI,IAAIU,KAjCX,CADF;AAqCD,CAvED;;eAyEe3B,Q"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.TextAreaProps = exports.TextAreaInputBase = exports.TextArea = void 0;
|
|
5
5
|
|
|
6
6
|
var _TextArea = _interopRequireWildcard(require("./TextArea"));
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/TextArea/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/TextArea/index.ts"],"sourcesContent":["export { default as TextArea, TextAreaProps } from './TextArea';\nexport { TextAreaInputBase } from './styled';\n"],"mappings":";;;;;AAAA;;;;;AACA"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
export declare const StyledInputContainer: import("@emotion/native").StyledComponent<import("../../atoms/Input").InputContainerProps & Partial<import("../../atoms/Input").InputElementProps> & {
|
|
4
|
-
children?: import("react").ReactNode;
|
|
5
|
-
} & {
|
|
6
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
-
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
9
|
-
export declare const TextAreaInputBase: import("@emotion/native").StyledComponent<import("../../atoms/Input").InputElementProps & {
|
|
10
|
-
children?: import("react").ReactNode;
|
|
11
|
-
} & {
|
|
12
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
-
as?: import("react").ElementType<any> | undefined;
|
|
14
|
-
} & Partial<TextAreaProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
1
|
+
export declare const StyledInputContainer: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
2
|
+
export declare const TextAreaInputBase: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["StyledInputContainer","styled","InputContainer","RFValueStr","TextAreaInputBase","InputElement","theme","numberOfLines","RFValue","extractNumbersFromString","typography","h5","lineHeight"],"sources":["../../../../src/components/molecules/TextArea/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { extractNumbersFromString, RFValue, RFValueStr } from '../../../utils';\nimport { InputContainer, InputElement } from '../../atoms/Input';\nimport { TextAreaProps } from './TextArea';\n\nexport const StyledInputContainer = styled(InputContainer)<Partial<StyleProps>>`\n min-height: ${RFValueStr('50px')};\n`;\n\nexport const TextAreaInputBase = styled(InputElement)<\n Partial<TextAreaProps> & Partial<StyleProps>\n>`\n max-height: ${({ theme, numberOfLines }) =>\n `${RFValue(\n extractNumbersFromString(theme.typography.h5.lineHeight) *\n (numberOfLines || 1)\n )}px`};\n width: 100%;\n padding: 0;\n margin: ${RFValueStr('3px')} 0;\n`;\n"],"mappings":";;;;;AAAA;;AAEA;;AACA;;;;AAGO,MAAMA,oBAAoB,GAAG,IAAAC,eAAA,EAAOC,qBAAP,CAA4C;AAChF,gBAAgB,IAAAC,iBAAA,EAAW,MAAX,CAAmB;AACnC,CAFO;;AAIA,MAAMC,iBAAiB,GAAG,IAAAH,eAAA,EAAOI,mBAAP,CAE/B;AACF,gBAAgB,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KACX,GAAE,IAAAC,cAAA,EACD,IAAAC,+BAAA,EAAyBH,KAAK,CAACI,UAAN,CAAiBC,EAAjB,CAAoBC,UAA7C,KACGL,aAAa,IAAI,CADpB,CADC,CAGD,IAAI;AACV;AACA;AACA,YAAY,IAAAJ,iBAAA,EAAW,KAAX,CAAkB;AAC9B,CAXO"}
|
package/dist/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/hooks/index.ts"],"sourcesContent":["export { useDebouncedState } from './useDebouncedState';\nexport { useTheme } from './useTheme';\n"],"mappings":";;;;;AAAA;;;;AACA"}
|
|
@@ -11,7 +11,7 @@ function useDebouncedState(initialState, timeoutCallback, timeoutMs = 166) {
|
|
|
11
11
|
(0, _react.useEffect)(() => {
|
|
12
12
|
if (timeoutId.current) clearTimeout(timeoutId.current);
|
|
13
13
|
if (timeoutCallback) timeoutId.current = setTimeout(() => timeoutCallback(state), timeoutMs);
|
|
14
|
-
}, [state
|
|
14
|
+
}, [state]);
|
|
15
15
|
return [state, setState];
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=useDebouncedState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useDebouncedState.js","names":["useDebouncedState","initialState","timeoutCallback","timeoutMs","timeoutId","useRef","state","setState","useState","useEffect","current","clearTimeout","setTimeout"],"sources":["../../src/hooks/useDebouncedState.ts"],"sourcesContent":["import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';\n\n/**\n * @param initialState\n * @param timeoutCallback callback to be called after bouncing ends. Should be memoized.\n * @param timeoutMs\n */\nexport function useDebouncedState<S>(\n initialState: S | (() => S),\n timeoutCallback?: (state: S) => void,\n timeoutMs = 166\n): [S, Dispatch<SetStateAction<S>>] {\n const timeoutId = useRef<number>();\n\n const [state, setState] = useState<S>(initialState);\n\n useEffect(() => {\n if (timeoutId.current) clearTimeout(timeoutId.current);\n if (timeoutCallback)\n timeoutId.current = setTimeout(() => timeoutCallback(state), timeoutMs);\n }, [state]);\n\n return [state, setState];\n}\n"],"mappings":";;;;;AAAA;;AAOO,SAASA,iBAAT,CACLC,YADK,EAELC,eAFK,EAGLC,SAAS,GAAG,GAHP,EAI6B;EAClC,MAAMC,SAAS,GAAG,IAAAC,aAAA,GAAlB;EAEA,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoB,IAAAC,eAAA,EAAYP,YAAZ,CAA1B;EAEA,IAAAQ,gBAAA,EAAU,MAAM;IACd,IAAIL,SAAS,CAACM,OAAd,EAAuBC,YAAY,CAACP,SAAS,CAACM,OAAX,CAAZ;IACvB,IAAIR,eAAJ,EACEE,SAAS,CAACM,OAAV,GAAoBE,UAAU,CAAC,MAAMV,eAAe,CAACI,KAAD,CAAtB,EAA+BH,SAA/B,CAA9B;EACH,CAJD,EAIG,CAACG,KAAD,CAJH;EAMA,OAAO,CAACA,KAAD,EAAQC,QAAR,CAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useTheme.js","names":["useTheme","useEmotionTheme"],"sources":["../../src/hooks/useTheme.ts"],"sourcesContent":["import { useTheme as useEmotionTheme } from '@emotion/react';\nimport { ThemeProp } from '../types/defaults';\n\nexport const useTheme = (): ThemeProp => useEmotionTheme() as ThemeProp;\n"],"mappings":";;;;;AAAA;;AAGO,MAAMA,QAAQ,GAAG,MAAiB,IAAAC,eAAA,GAAlC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { Checkbox, CheckboxProps } from './components/atoms/Checkbox';
|
|
|
9
9
|
export { Divider, DividerProps } from './components/atoms/Divider';
|
|
10
10
|
export { GroupButton, GroupButtonOption, GroupButtonOptionProps, GroupButtonProps, GroupButtonValue, } from './components/atoms/GroupButton';
|
|
11
11
|
export { Icon, IconProps } from './components/atoms/Icon';
|
|
12
|
-
export { Hint, InputContainer, InputContainerProps, InputElement, InputElementProps, InputMaskElement, InputMaskElementProps, InputVariantType, PressableInputContainer, PressableInputContainerProps, StyledBorderKeeper, useInputFocus, useNumberMask, useStringMask,
|
|
12
|
+
export { disabledInputStyles, Hint, InputContainer, InputContainerProps, InputElement, InputElementProps, InputMaskElement, InputMaskElementProps, InputVariantType, PressableInputContainer, PressableInputContainerProps, StyledBorderKeeper, useInputFocus, useNumberMask, useStringMask, } from './components/atoms/Input';
|
|
13
13
|
export { Paper, PaperProps } from './components/atoms/Paper';
|
|
14
14
|
export { PressableSurface, PressableSurfaceProps, } from './components/atoms/PressableSurface';
|
|
15
15
|
export { ProgressBar, ProgressBarProps } from './components/atoms/ProgressBar';
|
|
@@ -21,14 +21,16 @@ export { Calendar, CalendarProps, DateRange, SelectionType, Value, } from './com
|
|
|
21
21
|
export { DatePicker, DatePickerProps } from './components/molecules/DatePicker';
|
|
22
22
|
export { DateTimePicker, DateTimePickerProps, } from './components/molecules/DateTimePicker';
|
|
23
23
|
export { DateTimeSelector, DateTimeSelectorMode, DateTimeSelectorProps, } from './components/molecules/DateTimeSelector';
|
|
24
|
+
export { GridSpacing, IGridItem, getGridItemPadding, getGridItemColumSpan, IGrid, FlexAlignBase, FlexAlignType, FlexPositioning, FlexSpacing, PaddingPosition, } from './components/molecules/Grid';
|
|
25
|
+
export { HintInputContainer, HintInputContainerProps, } from './components/molecules/HintInputContainer';
|
|
26
|
+
export { IconComponent, IconPositionOptions, IconTextButtonProps, } from './components/molecules/IconTextButton';
|
|
24
27
|
export { InputPasswordIcon } from './components/molecules/InputPassword';
|
|
28
|
+
export { LabeledSwitchProps, LabelPositionOptions, } from './components/molecules/LabeledSwitch';
|
|
25
29
|
export { Snackbar, SnackbarProps } from './components/molecules/Snackbar';
|
|
26
|
-
export {
|
|
27
|
-
export
|
|
28
|
-
export { GridItem, Grid, IGridItem, IGrid } from './components/molecules/Grid';
|
|
30
|
+
export { TextArea, TextAreaInputBase, TextAreaProps, } from './components/molecules/TextArea';
|
|
31
|
+
export * from './hooks';
|
|
29
32
|
export * from './styles/definitions';
|
|
30
33
|
export * from './styles/light';
|
|
31
34
|
export { default as ThemeProvider } from './styles/ThemeProvider';
|
|
32
35
|
export * from './types/defaults';
|
|
33
36
|
export * from './utils';
|
|
34
|
-
export * from './hooks';
|