@tecsinapse/react-native-kit 1.18.6 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/components/atoms/Avatar/Avatar.js +4 -2
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/index.js +9 -4
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +11 -8
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.js +15 -5
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js +13 -10
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/Item.js +11 -8
- package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/index.js +21 -7
- package/dist/components/atoms/BottomNavigator/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/styled.js +64 -45
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.d.ts +2 -2
- package/dist/components/atoms/Button/Button.js +11 -8
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +4 -2
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js +4 -2
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +4 -2
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js +21 -8
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/index.js +33 -9
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +4 -2
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.js +9 -4
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/Header/Header.js +19 -16
- package/dist/components/atoms/Header/Header.js.map +1 -1
- package/dist/components/atoms/Header/index.js +15 -5
- package/dist/components/atoms/Header/index.js.map +1 -1
- package/dist/components/atoms/Header/styled.js +17 -17
- package/dist/components/atoms/Header/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.d.ts +3 -2
- package/dist/components/atoms/Input/Input.js +31 -28
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.js +15 -5
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +13 -8
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.js +32 -28
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/components/atoms/InputMask/index.js +15 -5
- package/dist/components/atoms/InputMask/index.js.map +1 -1
- package/dist/components/atoms/InputMask/styled.js +14 -11
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ModalGroupManager.js +10 -7
- package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/components/atoms/Modal/ModalLifecycleHandler.d.ts +2 -2
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js +31 -25
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/components/atoms/Modal/index.js +45 -8
- package/dist/components/atoms/Modal/index.js.map +1 -1
- package/dist/components/atoms/Modal/ui/BaseModalView.d.ts +2 -2
- package/dist/components/atoms/Modal/ui/BaseModalView.js +19 -16
- package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
- package/dist/components/atoms/Modal/ui/styled.js +19 -21
- package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ui/types.d.ts +1 -1
- package/dist/components/atoms/Modal/ui/types.js +3 -1
- package/dist/components/atoms/Modal/ui/types.js.map +1 -1
- package/dist/components/atoms/Modal/useLazyModalManager.d.ts +2 -2
- package/dist/components/atoms/Modal/useLazyModalManager.js +4 -2
- package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalManager.d.ts +2 -2
- package/dist/components/atoms/Modal/useModalManager.js +4 -2
- package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js +3 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -1
- package/dist/components/atoms/Skeleton/Pulse.js +16 -11
- package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +14 -11
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/Wave.js +17 -12
- package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/components/atoms/Skeleton/animation.js +4 -2
- package/dist/components/atoms/Skeleton/animation.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.js +15 -5
- package/dist/components/atoms/Skeleton/index.js.map +1 -1
- package/dist/components/atoms/Skeleton/styled.js +25 -15
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/Skeleton/types.js +3 -1
- package/dist/components/atoms/Skeleton/types.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js +12 -9
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/index.js +15 -5
- package/dist/components/atoms/SnappingSlider/index.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +9 -6
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.js +15 -5
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +8 -5
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/index.js +15 -5
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +17 -13
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +31 -28
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/atoms/TextArea/index.js +15 -5
- package/dist/components/atoms/TextArea/index.js.map +1 -1
- package/dist/components/atoms/TextArea/styled.js +3 -1
- package/dist/components/atoms/TextArea/styled.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +10 -7
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/index.js +9 -4
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +17 -13
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js +15 -5
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +13 -6
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +15 -11
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.js +15 -5
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +10 -7
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js +9 -4
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.d.ts +5 -0
- package/dist/components/molecules/Grid/Grid.js +63 -0
- package/dist/components/molecules/Grid/Grid.js.map +1 -0
- package/dist/components/molecules/Grid/Item/Item.d.ts +7 -0
- package/dist/components/molecules/Grid/Item/Item.js +81 -0
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -0
- package/dist/components/molecules/Grid/Item/index.d.ts +1 -0
- package/dist/components/molecules/Grid/Item/index.js +24 -0
- package/dist/components/molecules/Grid/Item/index.js.map +1 -0
- package/dist/components/molecules/Grid/index.d.ts +2 -0
- package/dist/components/molecules/Grid/index.js +24 -0
- package/dist/components/molecules/Grid/index.js.map +1 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +6 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js +53 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/dist/components/molecules/IconTextButton/TextComponent.d.ts +12 -0
- package/dist/components/molecules/IconTextButton/TextComponent.js +39 -0
- package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -0
- package/dist/components/molecules/IconTextButton/index.d.ts +1 -0
- package/dist/components/molecules/IconTextButton/index.js +24 -0
- package/dist/components/molecules/IconTextButton/index.js.map +1 -0
- package/dist/components/molecules/IconTextButton/styled.d.ts +2 -0
- package/dist/components/molecules/IconTextButton/styled.js +48 -0
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
- package/dist/components/molecules/InputPassword/InputPassword.d.ts +3 -2
- package/dist/components/molecules/InputPassword/InputPassword.js +9 -6
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js +15 -5
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.d.ts +13 -0
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js +41 -0
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +8 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +56 -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 +24 -0
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/dist/components/molecules/LabeledSwitch/styled.d.ts +9 -0
- package/dist/components/molecules/LabeledSwitch/styled.js +32 -0
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -0
- package/dist/components/molecules/Select/Modal.d.ts +1 -1
- package/dist/components/molecules/Select/Modal.js +45 -39
- package/dist/components/molecules/Select/Modal.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +39 -36
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/index.js +15 -5
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/molecules/Select/styled.js +78 -85
- package/dist/components/molecules/Select/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +14 -11
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.js +15 -5
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +18 -9
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/index.d.ts +17 -14
- package/dist/index.js +379 -116
- package/dist/index.js.map +1 -1
- package/dist/utils/date.js +3 -1
- package/dist/utils/date.js.map +1 -1
- package/package.json +5 -5
- package/src/components/atoms/BottomNavigator/BottomNavigator.tsx +3 -6
- package/src/components/atoms/Button/Button.tsx +19 -13
- package/src/components/atoms/Button/index.ts +1 -1
- package/src/components/atoms/Input/Input.tsx +8 -6
- package/src/components/atoms/Input/styled.ts +1 -3
- package/src/components/atoms/Modal/ModalGroupManager.tsx +22 -17
- package/src/components/atoms/Modal/ModalLifecycleHandler.ts +139 -126
- package/src/components/atoms/Modal/index.ts +7 -7
- package/src/components/atoms/Modal/ui/BaseModalView.tsx +150 -127
- package/src/components/atoms/Modal/ui/styled.ts +17 -17
- package/src/components/atoms/Modal/ui/types.ts +9 -8
- package/src/components/atoms/Modal/useLazyModalManager.ts +32 -31
- package/src/components/atoms/Modal/useModalManager.ts +28 -26
- package/src/components/atoms/Modal/useModalRemoteControl.ts +16 -18
- package/src/components/molecules/Calendar/Calendar.tsx +5 -1
- package/src/components/molecules/DatePicker/DatePicker.tsx +26 -17
- package/src/components/molecules/DatePicker/styled.ts +4 -4
- package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +18 -16
- package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +4 -1
- package/src/components/molecules/Grid/Grid.tsx +68 -0
- package/src/components/molecules/Grid/Item/Item.tsx +77 -0
- package/src/components/molecules/Grid/Item/index.ts +1 -0
- package/src/components/molecules/Grid/index.ts +2 -0
- package/src/components/molecules/IconTextButton/IconTextButton.tsx +55 -0
- package/src/components/molecules/IconTextButton/TextComponent.tsx +43 -0
- package/src/components/molecules/IconTextButton/index.ts +4 -0
- package/src/components/molecules/IconTextButton/styled.ts +35 -0
- package/src/components/molecules/InputPassword/InputPassword.tsx +3 -2
- package/src/components/molecules/LabeledSwitch/LabelComponent.tsx +46 -0
- package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +59 -0
- package/src/components/molecules/LabeledSwitch/index.ts +4 -0
- package/src/components/molecules/LabeledSwitch/styled.ts +27 -0
- package/src/components/molecules/Select/Modal.tsx +88 -66
- package/src/components/molecules/Select/Select.tsx +1 -1
- package/src/index.ts +38 -29
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.DateTimePicker = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactCore = require("@tecsinapse/react-core");
|
|
@@ -17,17 +19,18 @@ var _DateTimeSelector = require("../DateTimeSelector");
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
23
|
|
|
22
|
-
const DateTimePicker =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const DateTimePicker = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
locale,
|
|
27
|
+
...rest
|
|
28
|
+
} = _ref;
|
|
26
29
|
const modal = (0, _Modal.useLazyModalManager)();
|
|
27
30
|
return _react.default.createElement(_reactCore.DateTimePicker, _extends({}, rest, {
|
|
28
31
|
TextComponent: _Text.Text,
|
|
29
32
|
DateTimeSelectorComponent: _DateTimeSelector.DateTimeSelector,
|
|
30
|
-
locale: locale
|
|
33
|
+
locale: locale !== null && locale !== void 0 ? locale : (0, _date.getLocale)(),
|
|
31
34
|
requestShowSelector: () => modal.show(),
|
|
32
35
|
requestCloseSelector: () => modal.close(),
|
|
33
36
|
renderSelector: (selector, blur) => modal.sync(_react.default.createElement(NativeModal, {
|
|
@@ -38,10 +41,11 @@ const DateTimePicker = ({
|
|
|
38
41
|
|
|
39
42
|
exports.DateTimePicker = DateTimePicker;
|
|
40
43
|
|
|
41
|
-
const NativeModal =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
const NativeModal = _ref2 => {
|
|
45
|
+
let {
|
|
46
|
+
children,
|
|
47
|
+
...others
|
|
48
|
+
} = _ref2;
|
|
45
49
|
return _react.default.createElement(_Modal.ModalView, others, children);
|
|
46
50
|
};
|
|
47
51
|
//# sourceMappingURL=DateTimePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"DateTimePicker.js","names":["DateTimePicker","locale","rest","modal","useLazyModalManager","Text","DateTimeSelector","getLocale","show","close","selector","blur","sync","NativeModal","children","others"],"sources":["../../../../src/components/molecules/DateTimePicker/DateTimePicker.tsx"],"sourcesContent":["import {\n DateTimePicker as DateTimePickerCore,\n DateTimePickerProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { DateTimeSelector } from '../DateTimeSelector';\n\nexport type NativeDateTimePickerProps = Omit<\n DateTimePickerProps,\n | 'DateTimeSelectorComponent'\n | 'renderSelector'\n | 'requestCloseSelector'\n | 'requestShowSelector'\n>;\n\nexport const DateTimePicker: FC<NativeDateTimePickerProps> = ({\n locale,\n ...rest\n}) => {\n const modal = useLazyModalManager();\n\n return (\n <DateTimePickerCore\n {...rest}\n TextComponent={Text}\n DateTimeSelectorComponent={DateTimeSelector}\n locale={locale ?? getLocale()}\n requestShowSelector={() => modal.show()}\n requestCloseSelector={() => modal.close()}\n renderSelector={(selector, blur) =>\n modal.sync(<NativeModal onClose={blur}>{selector}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return <ModalView {...others}>{children}</ModalView>;\n};\n"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;AACA;;;;;;AAUO,MAAMA,cAA6C,GAAG,QAGvD;EAAA,IAHwD;IAC5DC,MAD4D;IAE5D,GAAGC;EAFyD,CAGxD;EACJ,MAAMC,KAAK,GAAG,IAAAC,0BAAA,GAAd;EAEA,OACE,6BAAC,yBAAD,eACMF,IADN;IAEE,aAAa,EAAEG,UAFjB;IAGE,yBAAyB,EAAEC,kCAH7B;IAIE,MAAM,EAAEL,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAY,IAAAM,eAAA,GAJpB;IAKE,mBAAmB,EAAE,MAAMJ,KAAK,CAACK,IAAN,EAL7B;IAME,oBAAoB,EAAE,MAAML,KAAK,CAACM,KAAN,EAN9B;IAOE,cAAc,EAAE,CAACC,QAAD,EAAWC,IAAX,KACdR,KAAK,CAACS,IAAN,CAAW,6BAAC,WAAD;MAAa,OAAO,EAAED;IAAtB,GAA6BD,QAA7B,CAAX;EARJ,GADF;AAaD,CAnBM;;;;AAqBP,MAAMG,WAA2B,GAAG,SAA6B;EAAA,IAA5B;IAAEC,QAAF;IAAY,GAAGC;EAAf,CAA4B;EAC/D,OAAO,6BAAC,gBAAD,EAAeA,MAAf,EAAwBD,QAAxB,CAAP;AACD,CAFD"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DateTimePicker", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _DateTimePicker.DateTimePicker;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "NativeDateTimePickerProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _DateTimePicker.NativeDateTimePickerProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
5
18
|
|
|
6
19
|
var _DateTimePicker = require("./DateTimePicker");
|
|
7
|
-
|
|
8
|
-
exports.DateTimePicker = _DateTimePicker.DateTimePicker;
|
|
9
|
-
exports.NativeDateTimePickerProps = _DateTimePicker.NativeDateTimePickerProps;
|
|
10
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/DateTimePicker/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/DateTimePicker/index.ts"],"sourcesContent":["export { DateTimePicker, NativeDateTimePickerProps } from './DateTimePicker';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.DateTimeSelector = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactCore = require("@tecsinapse/react-core");
|
|
@@ -13,15 +15,16 @@ var _date = require("../../../utils/date");
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
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
19
|
|
|
18
|
-
const DateTimeSelector =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const DateTimeSelector = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
locale,
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
22
25
|
return _react.default.createElement(_reactCore.DateTimeSelector, _extends({}, rest, {
|
|
23
26
|
TextComponent: _Text.Text,
|
|
24
|
-
locale: locale
|
|
27
|
+
locale: locale !== null && locale !== void 0 ? locale : (0, _date.getLocale)()
|
|
25
28
|
}));
|
|
26
29
|
};
|
|
27
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"DateTimeSelector.js","names":["DateTimeSelector","locale","rest","Text","getLocale"],"sources":["../../../../src/components/molecules/DateTimeSelector/DateTimeSelector.tsx"],"sourcesContent":["import {\n DateTimeSelector as DateTimeSelectorCore,\n DateTimeSelectorProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Text } from '../../atoms/Text';\nimport { getLocale } from '../../../utils/date';\n\nexport const DateTimeSelector: FC<DateTimeSelectorProps> = ({\n locale,\n ...rest\n}) => {\n return (\n <DateTimeSelectorCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;;;;;AAEO,MAAMA,gBAA2C,GAAG,QAGrD;EAAA,IAHsD;IAC1DC,MAD0D;IAE1D,GAAGC;EAFuD,CAGtD;EACJ,OACE,6BAAC,2BAAD,eACMA,IADN;IAEE,aAAa,EAAEC,UAFjB;IAGE,MAAM,EAAEF,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAY,IAAAG,eAAA;EAHpB,GADF;AAOD,CAXM"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DateTimeSelector", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _DateTimeSelector.DateTimeSelector;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
5
12
|
|
|
6
13
|
var _DateTimeSelector = require("./DateTimeSelector");
|
|
7
|
-
|
|
8
|
-
exports.DateTimeSelector = _DateTimeSelector.DateTimeSelector;
|
|
9
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/DateTimeSelector/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/DateTimeSelector/index.ts"],"sourcesContent":["export { DateTimeSelector } from './DateTimeSelector';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ViewProps } from 'react-native';
|
|
2
|
+
import { IGrid } from '@tecsinapse/react-core';
|
|
3
|
+
export declare type IGridNative = IGrid & ViewProps;
|
|
4
|
+
declare const Grid: ({ children, columns, layout, style, spacing, ...rest }: IGridNative) => JSX.Element;
|
|
5
|
+
export default Grid;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _Item = require("./Item");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
const Grid = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
children,
|
|
21
|
+
columns = 12,
|
|
22
|
+
layout,
|
|
23
|
+
style,
|
|
24
|
+
spacing,
|
|
25
|
+
...rest
|
|
26
|
+
} = _ref;
|
|
27
|
+
|
|
28
|
+
if (layout) {
|
|
29
|
+
const flatLayout = layout.flat();
|
|
30
|
+
return _react.default.createElement(_reactNative.View, _extends({
|
|
31
|
+
style: [style, {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
flexWrap: 'wrap'
|
|
35
|
+
}]
|
|
36
|
+
}, rest), _react.default.Children.map(children, (child, index) => _react.default.createElement(_Item.GridItem, {
|
|
37
|
+
key: "child-".concat(index),
|
|
38
|
+
columns: columns,
|
|
39
|
+
span: flatLayout[index],
|
|
40
|
+
spacing: spacing
|
|
41
|
+
}, child)));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return _react.default.createElement(_reactNative.View, _extends({
|
|
45
|
+
style: [style, {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
flexWrap: 'wrap'
|
|
49
|
+
}]
|
|
50
|
+
}, rest), _react.default.Children.map(children, (child, index) => {
|
|
51
|
+
var _child$props$spacing;
|
|
52
|
+
|
|
53
|
+
return _react.default.cloneElement(child, { ...(child === null || child === void 0 ? void 0 : child.props),
|
|
54
|
+
columns,
|
|
55
|
+
spacing: (_child$props$spacing = child === null || child === void 0 ? void 0 : child.props.spacing) !== null && _child$props$spacing !== void 0 ? _child$props$spacing : spacing,
|
|
56
|
+
key: "child-".concat(index)
|
|
57
|
+
});
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var _default = Grid;
|
|
62
|
+
exports.default = _default;
|
|
63
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","names":["Grid","children","columns","layout","style","spacing","rest","flatLayout","flat","display","flexDirection","flexWrap","React","Children","map","child","index","cloneElement","props","key"],"sources":["../../../../src/components/molecules/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { GridItem } from './Item';\nimport { IGrid } from '@tecsinapse/react-core';\n\nexport type IGridNative = IGrid & ViewProps;\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGridNative): JSX.Element => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => (\n <GridItem\n key={`child-${index}`}\n columns={columns}\n span={flatLayout[index]}\n spacing={spacing}\n >\n {child}\n </GridItem>\n ))}\n </View>\n );\n }\n\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n return React.cloneElement(child, {\n ...child?.props,\n columns,\n spacing: child?.props.spacing ?? spacing,\n key: `child-${index}`,\n });\n })}\n </View>\n );\n};\n\nexport default Grid;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAKA,MAAMA,IAAI,GAAG,QAOmB;EAAA,IAPlB;IACZC,QADY;IAEZC,OAAO,GAAG,EAFE;IAGZC,MAHY;IAIZC,KAJY;IAKZC,OALY;IAMZ,GAAGC;EANS,CAOkB;;EAC9B,IAAIH,MAAJ,EAAY;IACV,MAAMI,UAAU,GAAGJ,MAAM,CAACK,IAAP,EAAnB;IACA,OACE,6BAAC,iBAAD;MACE,KAAK,EAAE,CACLJ,KADK,EAEL;QACEK,OAAO,EAAE,MADX;QAEEC,aAAa,EAAE,KAFjB;QAGEC,QAAQ,EAAE;MAHZ,CAFK;IADT,GASML,IATN,GAWGM,cAAA,CAAMC,QAAN,CAAeC,GAAf,CAAmBb,QAAnB,EAA6B,CAACc,KAAD,EAAQC,KAAR,KAC5B,6BAAC,cAAD;MACE,GAAG,kBAAWA,KAAX,CADL;MAEE,OAAO,EAAEd,OAFX;MAGE,IAAI,EAAEK,UAAU,CAACS,KAAD,CAHlB;MAIE,OAAO,EAAEX;IAJX,GAMGU,KANH,CADD,CAXH,CADF;EAwBD;;EAED,OACE,6BAAC,iBAAD;IACE,KAAK,EAAE,CACLX,KADK,EAEL;MACEK,OAAO,EAAE,MADX;MAEEC,aAAa,EAAE,KAFjB;MAGEC,QAAQ,EAAE;IAHZ,CAFK;EADT,GASML,IATN,GAWGM,cAAA,CAAMC,QAAN,CAAeC,GAAf,CAAmBb,QAAnB,EAA6B,CAACc,KAAD,EAAQC,KAAR,KAAkB;IAAA;;IAC9C,OAAOJ,cAAA,CAAMK,YAAN,CAAmBF,KAAnB,EAA0B,EAC/B,IAAGA,KAAH,aAAGA,KAAH,uBAAGA,KAAK,CAAEG,KAAV,CAD+B;MAE/BhB,OAF+B;MAG/BG,OAAO,0BAAEU,KAAF,aAAEA,KAAF,uBAAEA,KAAK,CAAEG,KAAP,CAAab,OAAf,uEAA0BA,OAHF;MAI/Bc,GAAG,kBAAWH,KAAX;IAJ4B,CAA1B,CAAP;EAMD,CAPA,CAXH,CADF;AAsBD,CA1DD;;eA4DehB,I"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ViewProps } from 'react-native';
|
|
2
|
+
import { IGridItem } from '@tecsinapse/react-core';
|
|
3
|
+
export declare type IGridItemNative = IGridItem & ViewProps & {
|
|
4
|
+
flexBasis?: string | 'auto';
|
|
5
|
+
};
|
|
6
|
+
declare const GridItem: ({ children, span, columns, loadingComponent, loading, spacing: _spacing, wrapper, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, justifyContent, flexBasis, style, ...rest }: IGridItemNative) => JSX.Element;
|
|
7
|
+
export default GridItem;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _reactCore = require("@tecsinapse/react-core");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
const GridItem = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
children,
|
|
21
|
+
span,
|
|
22
|
+
columns = 12,
|
|
23
|
+
loadingComponent,
|
|
24
|
+
loading = false,
|
|
25
|
+
spacing: _spacing,
|
|
26
|
+
wrapper = false,
|
|
27
|
+
alignContent,
|
|
28
|
+
alignItems,
|
|
29
|
+
alignSelf,
|
|
30
|
+
flex,
|
|
31
|
+
flexDirection,
|
|
32
|
+
flexGrow,
|
|
33
|
+
flexShrink,
|
|
34
|
+
justifyContent,
|
|
35
|
+
flexBasis,
|
|
36
|
+
style,
|
|
37
|
+
...rest
|
|
38
|
+
} = _ref;
|
|
39
|
+
const {
|
|
40
|
+
spacing
|
|
41
|
+
} = (0, _reactCore.useTheme)();
|
|
42
|
+
|
|
43
|
+
if (!_react.default.Children.only(children)) {
|
|
44
|
+
throw new Error('The number of children in GridItem should be one');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (loadingComponent && loading) {
|
|
48
|
+
return loadingComponent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const _style = {
|
|
52
|
+
alignContent,
|
|
53
|
+
alignItems,
|
|
54
|
+
alignSelf,
|
|
55
|
+
flex,
|
|
56
|
+
flexDirection,
|
|
57
|
+
flexGrow,
|
|
58
|
+
flexShrink,
|
|
59
|
+
justifyContent,
|
|
60
|
+
boxSizing: 'border-box',
|
|
61
|
+
flexBasis: flexBasis !== null && flexBasis !== void 0 ? flexBasis : "".concat((0, _reactCore.getGridItemColumSpan)(columns, span), "%"),
|
|
62
|
+
paddingTop: (0, _reactCore.getGridItemPadding)('top', _spacing, spacing),
|
|
63
|
+
paddingBottom: (0, _reactCore.getGridItemPadding)('bottom', _spacing, spacing),
|
|
64
|
+
paddingRight: (0, _reactCore.getGridItemPadding)('right', _spacing, spacing),
|
|
65
|
+
paddingLeft: (0, _reactCore.getGridItemPadding)('left', _spacing, spacing)
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const clone = _react.default.cloneElement(children, { ...(children === null || children === void 0 ? void 0 : children.props),
|
|
69
|
+
style: wrapper ? children === null || children === void 0 ? void 0 : children.props.style : { ..._style,
|
|
70
|
+
...(children === null || children === void 0 ? void 0 : children.props.style)
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return wrapper ? _react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
75
|
+
style: [style, _style]
|
|
76
|
+
}), clone) : clone;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var _default = GridItem;
|
|
80
|
+
exports.default = _default;
|
|
81
|
+
//# sourceMappingURL=Item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.js","names":["GridItem","children","span","columns","loadingComponent","loading","spacing","_spacing","wrapper","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","justifyContent","flexBasis","style","rest","useTheme","React","Children","only","Error","_style","boxSizing","getGridItemColumSpan","paddingTop","getGridItemPadding","paddingBottom","paddingRight","paddingLeft","clone","cloneElement","props"],"sources":["../../../../../src/components/molecules/Grid/Item/Item.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport {\n IGridItem,\n useTheme,\n getGridItemColumSpan,\n getGridItemPadding,\n} from '@tecsinapse/react-core';\n\nexport type IGridItemNative = IGridItem &\n ViewProps & {\n /** Only specify this property if the GridItem will be 'dynamic', adjusting itself to content. Use this with `wrapper` for better result. */\n flexBasis?: string | 'auto';\n };\n\nconst GridItem = ({\n children,\n span,\n columns = 12,\n loadingComponent,\n loading = false,\n spacing: _spacing,\n wrapper = false,\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n flexBasis,\n style,\n ...rest\n}: IGridItemNative): JSX.Element => {\n const { spacing } = useTheme();\n if (!React.Children.only(children)) {\n throw new Error('The number of children in GridItem should be one');\n }\n if (loadingComponent && loading) {\n return loadingComponent;\n }\n\n const _style = {\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n boxSizing: 'border-box',\n flexBasis: flexBasis ?? `${getGridItemColumSpan(columns, span)}%`,\n paddingTop: getGridItemPadding('top', _spacing, spacing),\n paddingBottom: getGridItemPadding('bottom', _spacing, spacing),\n paddingRight: getGridItemPadding('right', _spacing, spacing),\n paddingLeft: getGridItemPadding('left', _spacing, spacing),\n };\n\n const clone = React.cloneElement(children, {\n ...children?.props,\n style: wrapper\n ? children?.props.style\n : { ..._style, ...children?.props.style },\n });\n\n return wrapper ? (\n <View {...rest} style={[style, _style]}>\n {clone}\n </View>\n ) : (\n clone\n );\n};\n\nexport default GridItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAaA,MAAMA,QAAQ,GAAG,QAmBmB;EAAA,IAnBlB;IAChBC,QADgB;IAEhBC,IAFgB;IAGhBC,OAAO,GAAG,EAHM;IAIhBC,gBAJgB;IAKhBC,OAAO,GAAG,KALM;IAMhBC,OAAO,EAAEC,QANO;IAOhBC,OAAO,GAAG,KAPM;IAQhBC,YARgB;IAShBC,UATgB;IAUhBC,SAVgB;IAWhBC,IAXgB;IAYhBC,aAZgB;IAahBC,QAbgB;IAchBC,UAdgB;IAehBC,cAfgB;IAgBhBC,SAhBgB;IAiBhBC,KAjBgB;IAkBhB,GAAGC;EAlBa,CAmBkB;EAClC,MAAM;IAAEb;EAAF,IAAc,IAAAc,mBAAA,GAApB;;EACA,IAAI,CAACC,cAAA,CAAMC,QAAN,CAAeC,IAAf,CAAoBtB,QAApB,CAAL,EAAoC;IAClC,MAAM,IAAIuB,KAAJ,CAAU,kDAAV,CAAN;EACD;;EACD,IAAIpB,gBAAgB,IAAIC,OAAxB,EAAiC;IAC/B,OAAOD,gBAAP;EACD;;EAED,MAAMqB,MAAM,GAAG;IACbhB,YADa;IAEbC,UAFa;IAGbC,SAHa;IAIbC,IAJa;IAKbC,aALa;IAMbC,QANa;IAObC,UAPa;IAQbC,cARa;IASbU,SAAS,EAAE,YATE;IAUbT,SAAS,EAAEA,SAAF,aAAEA,SAAF,cAAEA,SAAF,aAAkB,IAAAU,+BAAA,EAAqBxB,OAArB,EAA8BD,IAA9B,CAAlB,MAVI;IAWb0B,UAAU,EAAE,IAAAC,6BAAA,EAAmB,KAAnB,EAA0BtB,QAA1B,EAAoCD,OAApC,CAXC;IAYbwB,aAAa,EAAE,IAAAD,6BAAA,EAAmB,QAAnB,EAA6BtB,QAA7B,EAAuCD,OAAvC,CAZF;IAabyB,YAAY,EAAE,IAAAF,6BAAA,EAAmB,OAAnB,EAA4BtB,QAA5B,EAAsCD,OAAtC,CAbD;IAcb0B,WAAW,EAAE,IAAAH,6BAAA,EAAmB,MAAnB,EAA2BtB,QAA3B,EAAqCD,OAArC;EAdA,CAAf;;EAiBA,MAAM2B,KAAK,GAAGZ,cAAA,CAAMa,YAAN,CAAmBjC,QAAnB,EAA6B,EACzC,IAAGA,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEkC,KAAb,CADyC;IAEzCjB,KAAK,EAAEV,OAAO,GACVP,QADU,aACVA,QADU,uBACVA,QAAQ,CAAEkC,KAAV,CAAgBjB,KADN,GAEV,EAAE,GAAGO,MAAL;MAAa,IAAGxB,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEkC,KAAV,CAAgBjB,KAAnB;IAAb;EAJqC,CAA7B,CAAd;;EAOA,OAAOV,OAAO,GACZ,6BAAC,iBAAD,eAAUW,IAAV;IAAgB,KAAK,EAAE,CAACD,KAAD,EAAQO,MAAR;EAAvB,IACGQ,KADH,CADY,GAKZA,KALF;AAOD,CA3DD;;eA6DejC,Q"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GridItem, IGridItemNative } from './Item';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "GridItem", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Item.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "IGridItemNative", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Item.IGridItemNative;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _Item = _interopRequireWildcard(require("./Item"));
|
|
20
|
+
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/molecules/Grid/Item/index.ts"],"sourcesContent":["export { default as GridItem, IGridItemNative } from './Item';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Grid", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Grid.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "GridItem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Item.GridItem;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _Item = require("./Item");
|
|
20
|
+
|
|
21
|
+
var _Grid = _interopRequireDefault(require("./Grid"));
|
|
22
|
+
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Grid/index.ts"],"sourcesContent":["export { GridItem } from './Item';\nexport { default as Grid } from './Grid';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconTextButtonProps } from '@tecsinapse/react-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonNativeProps } from '../../atoms/Button';
|
|
4
|
+
export declare type NativeIconTextButtonProps = IconTextButtonProps & Omit<ButtonNativeProps, 'ButtonProps'>;
|
|
5
|
+
declare const IconTextButton: React.FC<NativeIconTextButtonProps>;
|
|
6
|
+
export default IconTextButton;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _reactCore = require("@tecsinapse/react-core");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _styled = require("./styled");
|
|
13
|
+
|
|
14
|
+
var _TextComponent = _interopRequireDefault(require("./TextComponent"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
const IconTextButton = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
iconProps,
|
|
23
|
+
iconPosition = 'left',
|
|
24
|
+
textProps,
|
|
25
|
+
label,
|
|
26
|
+
variant = 'filled',
|
|
27
|
+
size = 'default',
|
|
28
|
+
...rest
|
|
29
|
+
} = _ref;
|
|
30
|
+
return _react.default.createElement(_styled.StyledIconTextButton, _extends({
|
|
31
|
+
boxed: !label,
|
|
32
|
+
variant: variant
|
|
33
|
+
}, rest), iconPosition === 'left' ? _react.default.createElement(_reactCore.IconComponent, {
|
|
34
|
+
iconProps: iconProps,
|
|
35
|
+
size: size,
|
|
36
|
+
defaultFontColor: _reactCore.fontColorVC[variant]
|
|
37
|
+
}) : _react.default.createElement(_react.default.Fragment, null), _react.default.createElement(_TextComponent.default, {
|
|
38
|
+
label: label,
|
|
39
|
+
defaultFontColor: _reactCore.fontColorVC[variant],
|
|
40
|
+
hasIcon: !!iconProps,
|
|
41
|
+
iconPosition: iconPosition,
|
|
42
|
+
textProps: textProps,
|
|
43
|
+
size: size
|
|
44
|
+
}), iconPosition === 'right' ? _react.default.createElement(_reactCore.IconComponent, {
|
|
45
|
+
iconProps: iconProps,
|
|
46
|
+
size: size,
|
|
47
|
+
defaultFontColor: _reactCore.fontColorVC[variant]
|
|
48
|
+
}) : _react.default.createElement(_react.default.Fragment, null));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var _default = IconTextButton;
|
|
52
|
+
exports.default = _default;
|
|
53
|
+
//# sourceMappingURL=IconTextButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTextButton.js","names":["IconTextButton","iconProps","iconPosition","textProps","label","variant","size","rest","fontColorVC"],"sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import {\n fontColorVC,\n IconComponent,\n IconTextButtonProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { ButtonNativeProps } from '../../atoms/Button';\nimport { StyledIconTextButton } from './styled';\nimport TextComponent from './TextComponent';\n\nexport type NativeIconTextButtonProps = IconTextButtonProps &\n Omit<ButtonNativeProps, 'ButtonProps'>;\n\nconst IconTextButton: React.FC<NativeIconTextButtonProps> = ({\n iconProps,\n iconPosition = 'left',\n textProps,\n label,\n variant = 'filled',\n size = 'default',\n ...rest\n}) => {\n return (\n <StyledIconTextButton boxed={!label} variant={variant} {...rest}>\n {iconPosition === 'left' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n <TextComponent\n label={label}\n defaultFontColor={fontColorVC[variant]}\n hasIcon={!!iconProps}\n iconPosition={iconPosition}\n textProps={textProps}\n size={size}\n />\n {iconPosition === 'right' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n </StyledIconTextButton>\n );\n};\n\nexport default IconTextButton;\n"],"mappings":";;;;;;;AAAA;;AAKA;;AAEA;;AACA;;;;;;AAKA,MAAMA,cAAmD,GAAG,QAQtD;EAAA,IARuD;IAC3DC,SAD2D;IAE3DC,YAAY,GAAG,MAF4C;IAG3DC,SAH2D;IAI3DC,KAJ2D;IAK3DC,OAAO,GAAG,QALiD;IAM3DC,IAAI,GAAG,SANoD;IAO3D,GAAGC;EAPwD,CAQvD;EACJ,OACE,6BAAC,4BAAD;IAAsB,KAAK,EAAE,CAACH,KAA9B;IAAqC,OAAO,EAAEC;EAA9C,GAA2DE,IAA3D,GACGL,YAAY,KAAK,MAAjB,GACC,6BAAC,wBAAD;IACE,SAAS,EAAED,SADb;IAEE,IAAI,EAAEK,IAFR;IAGE,gBAAgB,EAAEE,sBAAA,CAAYH,OAAZ;EAHpB,EADD,GAOC,2DARJ,EAUE,6BAAC,sBAAD;IACE,KAAK,EAAED,KADT;IAEE,gBAAgB,EAAEI,sBAAA,CAAYH,OAAZ,CAFpB;IAGE,OAAO,EAAE,CAAC,CAACJ,SAHb;IAIE,YAAY,EAAEC,YAJhB;IAKE,SAAS,EAAEC,SALb;IAME,IAAI,EAAEG;EANR,EAVF,EAkBGJ,YAAY,KAAK,OAAjB,GACC,6BAAC,wBAAD;IACE,SAAS,EAAED,SADb;IAEE,IAAI,EAAEK,IAFR;IAGE,gBAAgB,EAAEE,sBAAA,CAAYH,OAAZ;EAHpB,EADD,GAOC,2DAzBJ,CADF;AA8BD,CAvCD;;eAyCeL,c"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonSizeType, FontColor, IconPositionOptions, TextProps } from '@tecsinapse/react-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface TextComponentProps {
|
|
4
|
+
textProps?: TextProps;
|
|
5
|
+
size?: ButtonSizeType;
|
|
6
|
+
defaultFontColor: keyof FontColor;
|
|
7
|
+
label?: string;
|
|
8
|
+
iconPosition?: IconPositionOptions;
|
|
9
|
+
hasIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: React.NamedExoticComponent<TextComponentProps>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _styled = require("./styled");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
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
|
+
|
|
16
|
+
const TextComponent = _ref => {
|
|
17
|
+
var _textProps$typography, _textProps$fontWeight, _textProps$fontColor;
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
textProps,
|
|
21
|
+
size = 'default',
|
|
22
|
+
defaultFontColor,
|
|
23
|
+
label,
|
|
24
|
+
iconPosition = 'left',
|
|
25
|
+
hasIcon = false
|
|
26
|
+
} = _ref;
|
|
27
|
+
return label ? _react.default.createElement(_styled.StyledText, _extends({
|
|
28
|
+
typography: ((_textProps$typography = textProps === null || textProps === void 0 ? void 0 : textProps.typography) !== null && _textProps$typography !== void 0 ? _textProps$typography : size === 'small') ? 'sub' : 'base',
|
|
29
|
+
fontWeight: (_textProps$fontWeight = textProps === null || textProps === void 0 ? void 0 : textProps.fontWeight) !== null && _textProps$fontWeight !== void 0 ? _textProps$fontWeight : 'bold',
|
|
30
|
+
fontColor: (_textProps$fontColor = textProps === null || textProps === void 0 ? void 0 : textProps.fontColor) !== null && _textProps$fontColor !== void 0 ? _textProps$fontColor : defaultFontColor,
|
|
31
|
+
iconPosition: iconPosition,
|
|
32
|
+
hasIcon: hasIcon
|
|
33
|
+
}, textProps), label) : _react.default.createElement(_react.default.Fragment, null);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = _react.default.memo(TextComponent);
|
|
37
|
+
|
|
38
|
+
exports.default = _default;
|
|
39
|
+
//# sourceMappingURL=TextComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextComponent.js","names":["TextComponent","textProps","size","defaultFontColor","label","iconPosition","hasIcon","typography","fontWeight","fontColor","React","memo"],"sources":["../../../../src/components/molecules/IconTextButton/TextComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n IconPositionOptions,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledText } from './styled';\n\ninterface TextComponentProps {\n textProps?: TextProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n label?: string;\n iconPosition?: IconPositionOptions;\n hasIcon?: boolean;\n}\n\nconst TextComponent: FC<TextComponentProps> = ({\n textProps,\n size = 'default',\n defaultFontColor,\n label,\n iconPosition = 'left',\n hasIcon = false,\n}) => {\n return label ? (\n <StyledText\n typography={textProps?.typography ?? size === 'small' ? 'sub' : 'base'}\n fontWeight={textProps?.fontWeight ?? 'bold'}\n fontColor={textProps?.fontColor ?? defaultFontColor}\n iconPosition={iconPosition}\n hasIcon={hasIcon}\n {...textProps}\n >\n {label}\n </StyledText>\n ) : (\n <></>\n );\n};\n\nexport default React.memo(TextComponent);\n"],"mappings":";;;;;;;AAMA;;AACA;;;;;;AAWA,MAAMA,aAAqC,GAAG,QAOxC;EAAA;;EAAA,IAPyC;IAC7CC,SAD6C;IAE7CC,IAAI,GAAG,SAFsC;IAG7CC,gBAH6C;IAI7CC,KAJ6C;IAK7CC,YAAY,GAAG,MAL8B;IAM7CC,OAAO,GAAG;EANmC,CAOzC;EACJ,OAAOF,KAAK,GACV,6BAAC,kBAAD;IACE,UAAU,EAAE,0BAAAH,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEM,UAAX,yEAAyBL,IAAI,KAAK,OAAlC,IAA4C,KAA5C,GAAoD,MADlE;IAEE,UAAU,2BAAED,SAAF,aAAEA,SAAF,uBAAEA,SAAS,CAAEO,UAAb,yEAA2B,MAFvC;IAGE,SAAS,0BAAEP,SAAF,aAAEA,SAAF,uBAAEA,SAAS,CAAEQ,SAAb,uEAA0BN,gBAHrC;IAIE,YAAY,EAAEE,YAJhB;IAKE,OAAO,EAAEC;EALX,GAMML,SANN,GAQGG,KARH,CADU,GAYV,2DAZF;AAcD,CAtBD;;eAwBeM,cAAA,CAAMC,IAAN,CAAWX,aAAX,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconTextButton, NativeIconTextButtonProps, } from './IconTextButton';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "IconTextButton", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _IconTextButton.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "NativeIconTextButtonProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _IconTextButton.NativeIconTextButtonProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _IconTextButton = _interopRequireWildcard(require("./IconTextButton"));
|
|
20
|
+
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"sourcesContent":["export {\n default as IconTextButton,\n NativeIconTextButtonProps,\n} from './IconTextButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledText = exports.StyledIconTextButton = void 0;
|
|
7
|
+
|
|
8
|
+
var _native = _interopRequireWildcard(require("@emotion/native"));
|
|
9
|
+
|
|
10
|
+
var _Button = require("../../atoms/Button");
|
|
11
|
+
|
|
12
|
+
var _Text = require("../../atoms/Text");
|
|
13
|
+
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
22
|
+
const boxedStyle = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
theme
|
|
25
|
+
} = _ref;
|
|
26
|
+
return "\n padding: ".concat(theme === null || theme === void 0 ? void 0 : theme.spacing.centi, ";\n aspect-ratio: 1;\n ");
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const StyledIconTextButton = (0, _native.default)(_Button.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n"])), _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
boxed,
|
|
32
|
+
theme
|
|
33
|
+
} = _ref2;
|
|
34
|
+
return boxed && boxedStyle({
|
|
35
|
+
theme
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
exports.StyledIconTextButton = StyledIconTextButton;
|
|
39
|
+
const StyledText = (0, _native.default)(_Text.Text)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), _ref3 => {
|
|
40
|
+
let {
|
|
41
|
+
theme,
|
|
42
|
+
iconPosition,
|
|
43
|
+
hasIcon = false
|
|
44
|
+
} = _ref3;
|
|
45
|
+
if (hasIcon && iconPosition === 'left') return (0, _native.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.spacing.mili);else if (hasIcon && iconPosition === 'right') return (0, _native.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-right: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.spacing.mili);
|
|
46
|
+
});
|
|
47
|
+
exports.StyledText = StyledText;
|
|
48
|
+
//# sourceMappingURL=styled.js.map
|