@tecsinapse/react-web-kit 1.19.0 → 1.20.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 +13 -0
- package/dist/components/atoms/Accordion/Accordion.js.map +1 -1
- package/dist/components/atoms/Accordion/animations.js.map +1 -1
- package/dist/components/atoms/Accordion/index.js.map +1 -1
- package/dist/components/atoms/Accordion/styled.js +1 -1
- package/dist/components/atoms/Accordion/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +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/Button/Button.js +1 -1
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/hooks/useMouseHover.js.map +1 -1
- package/dist/components/atoms/Button/hooks/useMousePressed.js.map +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/Dropdown/index.js.map +1 -1
- package/dist/components/atoms/Dropdown/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.d.ts +4 -3
- package/dist/components/atoms/Input/Input.js +1 -1
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.d.ts +4 -3
- package/dist/components/atoms/InputMask/InputMask.js +1 -1
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/components/atoms/InputMask/index.js.map +1 -1
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/Modal.js +1 -1
- package/dist/components/atoms/Modal/Modal.js.map +1 -1
- package/dist/components/atoms/Modal/animations.js.map +1 -1
- package/dist/components/atoms/Modal/index.js.map +1 -1
- package/dist/components/atoms/Modal/styled.js.map +1 -1
- package/dist/components/atoms/Overlay/Overlay.js.map +1 -1
- package/dist/components/atoms/Overlay/animations.js.map +1 -1
- package/dist/components/atoms/Overlay/index.js.map +1 -1
- package/dist/components/atoms/Overlay/styled.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.js.map +1 -1
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/Table/Body/TBody.js.map +1 -1
- package/dist/components/atoms/Table/Body/index.js.map +1 -1
- package/dist/components/atoms/Table/Cell/Td.js.map +1 -1
- package/dist/components/atoms/Table/Cell/index.js.map +1 -1
- package/dist/components/atoms/Table/Cell/styled.js.map +1 -1
- package/dist/components/atoms/Table/Container/TableContainer.js.map +1 -1
- package/dist/components/atoms/Table/Container/index.js.map +1 -1
- package/dist/components/atoms/Table/Container/styled.js.map +1 -1
- package/dist/components/atoms/Table/Footer/TFoot.js.map +1 -1
- package/dist/components/atoms/Table/Footer/index.js.map +1 -1
- package/dist/components/atoms/Table/Footer/styled.js.map +1 -1
- package/dist/components/atoms/Table/Header/THead.js.map +1 -1
- package/dist/components/atoms/Table/Header/Th.js.map +1 -1
- package/dist/components/atoms/Table/Header/index.js +4 -4
- package/dist/components/atoms/Table/Header/index.js.map +1 -1
- package/dist/components/atoms/Table/Header/styled.js +1 -1
- package/dist/components/atoms/Table/Header/styled.js.map +1 -1
- package/dist/components/atoms/Table/Row/Tr.js.map +1 -1
- package/dist/components/atoms/Table/Row/index.js.map +1 -1
- package/dist/components/atoms/Table/Row/styled.js.map +1 -1
- package/dist/components/atoms/Table/Table.js.map +1 -1
- package/dist/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
- package/dist/components/atoms/Table/Toolbar/index.js.map +1 -1
- package/dist/components/atoms/Table/Toolbar/styled.js.map +1 -1
- package/dist/components/atoms/Table/index.js +18 -18
- package/dist/components/atoms/Table/index.js.map +1 -1
- package/dist/components/atoms/Table/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/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/atoms/Tooltip/index.js +4 -4
- package/dist/components/atoms/Tooltip/index.js.map +1 -1
- package/dist/components/atoms/Tooltip/styled.js +3 -1
- package/dist/components/atoms/Tooltip/styled.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/index.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.js +6 -6
- package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/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/Modal.js +1 -1
- package/dist/components/molecules/DatePicker/Modal.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js.map +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/Modal.js +1 -2
- package/dist/components/molecules/DateTimePicker/Modal.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/Drawer/Drawer.js +3 -1
- package/dist/components/molecules/Drawer/Drawer.js.map +1 -1
- package/dist/components/molecules/Drawer/animations.js +1 -1
- package/dist/components/molecules/Drawer/animations.js.map +1 -1
- package/dist/components/molecules/Drawer/index.js.map +1 -1
- package/dist/components/molecules/Drawer/styled.js +2 -0
- package/dist/components/molecules/Drawer/styled.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.js +1 -1
- package/dist/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/components/molecules/Grid/Item/Item.js +1 -1
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/components/molecules/Grid/Item/functions.js +3 -3
- package/dist/components/molecules/Grid/Item/functions.js.map +1 -1
- package/dist/components/molecules/Grid/Item/index.js.map +1 -1
- package/dist/components/molecules/Grid/index.js +4 -4
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/hooks/useIconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js +1 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/components/molecules/Masonry/Masonry.js.map +1 -1
- package/dist/components/molecules/Masonry/index.js.map +1 -1
- package/dist/components/molecules/Masonry/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/index.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/index.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/index.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/styled.js +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/Menubar.js +1 -1
- package/dist/components/molecules/Menubar/Menubar.js.map +1 -1
- package/dist/components/molecules/Menubar/MostUsed/MostUsed.js +1 -1
- package/dist/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
- package/dist/components/molecules/Menubar/MostUsed/index.js.map +1 -1
- package/dist/components/molecules/Menubar/MostUsed/styled.js +1 -1
- package/dist/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js.map +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/index.js.map +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/styled.js +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/utils.d.ts +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
- package/dist/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
- package/dist/components/molecules/Menubar/animations.js +1 -1
- package/dist/components/molecules/Menubar/animations.js.map +1 -1
- package/dist/components/molecules/Menubar/index.js +4 -4
- package/dist/components/molecules/Menubar/index.js.map +1 -1
- package/dist/components/molecules/Menubar/styled.js +1 -1
- package/dist/components/molecules/Menubar/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/types.js.map +1 -1
- package/dist/components/molecules/Menubar/utils.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/components/SearchInput.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/components/index.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/index.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/styled.js +1 -1
- package/dist/components/molecules/Select/Dropdown/styled.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +1 -1
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
- package/dist/components/molecules/Select/SelectItem/index.js.map +1 -1
- package/dist/components/molecules/Select/SelectItem/styled.js +1 -1
- package/dist/components/molecules/Select/SelectItem/styled.js.map +1 -1
- package/dist/components/molecules/Select/animations.js.map +1 -1
- package/dist/components/molecules/Select/functions.js.map +1 -1
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/molecules/Select/styled.js +1 -1
- package/dist/components/molecules/Select/styled.js.map +1 -1
- 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.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.js +1 -1
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/DataGrid.d.ts +1 -1
- package/dist/components/organisms/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
- package/dist/components/organisms/DataGrid/Footer/index.js.map +1 -1
- package/dist/components/organisms/DataGrid/Footer/styled.js +1 -1
- package/dist/components/organisms/DataGrid/Footer/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/Header/Header.d.ts +1 -1
- package/dist/components/organisms/DataGrid/Header/Header.js.map +1 -1
- package/dist/components/organisms/DataGrid/Header/index.js.map +1 -1
- package/dist/components/organisms/DataGrid/Header/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/Header/utils.js +1 -1
- package/dist/components/organisms/DataGrid/Header/utils.js.map +1 -1
- package/dist/components/organisms/DataGrid/Row/Row.js.map +1 -1
- package/dist/components/organisms/DataGrid/Row/index.js.map +1 -1
- package/dist/components/organisms/DataGrid/index.js.map +1 -1
- package/dist/components/organisms/DataGrid/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/types.js.map +1 -1
- package/dist/components/organisms/DataGrid/utils.js +1 -1
- package/dist/components/organisms/DataGrid/utils.js.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useBreakpoints.js.map +1 -1
- package/dist/hooks/useClickAwayListener.js.map +1 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/index.js +96 -96
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/atoms/Input/Input.tsx +4 -5
- package/src/components/atoms/InputMask/InputMask.tsx +4 -5
- package/src/components/molecules/DatePicker/Modal.tsx +11 -5
- package/src/components/molecules/DatePicker/index.ts +1 -1
- package/src/components/molecules/DatePicker/styled.ts +3 -3
- package/src/components/molecules/DateTimePicker/Modal.tsx +1 -5
- package/src/components/molecules/DateTimePicker/styled.ts +8 -5
- package/src/components/molecules/Grid/Item/functions.ts +3 -3
- package/src/components/molecules/IconTextButton/IconTextButton.tsx +2 -3
- package/src/components/molecules/Menubar/Menubar.tsx +4 -3
- package/src/components/molecules/Menubar/SearchResultItem/utils.tsx +2 -2
- package/src/components/molecules/Select/Dropdown/Dropdown.tsx +4 -3
- package/src/components/molecules/Select/Select.tsx +10 -8
- package/src/components/organisms/DataGrid/DataGrid.tsx +16 -20
- package/src/components/organisms/DataGrid/Header/Header.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["Component","onRequestClose","children","rest","Modal"],"sources":["../../../../src/components/molecules/DateTimePicker/Modal.tsx"],"sourcesContent":["import { DateTimeSelectorProps } from '@tecsinapse/react-core';\nimport * as React from 'react';\nimport { Modal as RNModal, ModalProps } from 'react-native';\nimport { Backdrop, ModalContent } from './styled';\n\nconst Component: React.FC<DateTimeSelectorProps & ModalProps> = ({\n onRequestClose,\n children,\n ...rest\n}) => {\n return (\n <RNModal\n transparent\n hardwareAccelerated\n statusBarTranslucent\n {...rest}\n onRequestClose={onRequestClose}\n >\n <Backdrop onPress={onRequestClose} effect=\"none\">\n <ModalContent>{children}</ModalContent>\n </Backdrop>\n </RNModal>\n );\n};\n\nexport const Modal = Component;\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAuD,GAAG,CAAC;EAC/DC,cAD+D;EAE/DC,QAF+D;EAG/D,GAAGC;AAH4D,CAAD,KAI1D;EACJ,OACE,oBAAC,qBAAD;IACE,WAAW,MADb;IAEE,mBAAmB,MAFrB;IAGE,oBAAoB;EAHtB,GAIMA,IAJN;IAKE,cAAc,EAAEF;EALlB,IAOE,oBAAC,gBAAD;IAAU,OAAO,EAAEA,cAAnB;IAAmC,MAAM,EAAC;EAA1C,GACE,oBAAC,oBAAD,QAAeC,QAAf,CADF,CAPF,CADF;AAaD,CAlBD;;AAoBO,MAAME,KAAK,GAAGJ,SAAd"}
|
|
@@ -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, WebDateTimePickerProps } from './DateTimePicker';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["isWeb","Platform","OS","Backdrop","styled","PressableSurface","css","ModalContent","View","theme","borderRadius","RFValueStr","micro","deca"],"sources":["../../../../src/components/molecules/DateTimePicker/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n PressableSurface,\n RFValueStr,\n StyleProps,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\n\nconst isWeb = Platform.OS === 'web';\n\nexport const Backdrop = styled(PressableSurface)<Partial<StyleProps>>`\n ${isWeb\n ? css`\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100vh;\n `\n : css`\n justify-content: flex-end;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100%;\n `}\n`;\n\nexport const ModalContent = styled.View<Partial<StyleProps>>`\n background-color: transparent;\n ${({ theme: { borderRadius } }) => css`\n ${isWeb\n ? `\n width: ${RFValueStr('375px')};\n border-radius: ${borderRadius.micro};\n `\n : `\n border-top-left-radius: ${borderRadius.deca};\n border-top-right-radius: ${borderRadius.deca};\n `}\n `}\n overflow: hidden;\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;;;;;AAEA,MAAMA,KAAK,GAAGC,wBAAA,CAASC,EAAT,KAAgB,KAA9B;AAEO,MAAMC,QAAQ,GAAG,IAAAC,eAAA,EAAOC,2BAAP,CAA8C;AACtE,IAAIL,KAAK,GACH,IAAAM,WAAA,CAAI;AACV;AACA;AACA;AACA;AACA,OANS,GAOH,IAAAA,WAAA,CAAI;AACV;AACA;AACA;AACA,OAAQ;AACR,CAbO;;AAeA,MAAMC,YAAY,GAAGH,eAAA,CAAOI,IAA0B;AAC7D;AACA,IAAI,CAAC;EAAEC,KAAK,EAAE;IAAEC;EAAF;AAAT,CAAD,KAAiC,IAAAJ,WAAA,CAAI;AACzC,MAAMN,KAAK,GACF;AACT,eAAe,IAAAW,qBAAA,EAAW,OAAX,CAAoB;AACnC,uBAAuBD,YAAY,CAACE,KAAM;AAC1C,KAJW,GAKF;AACT,gCAAgCF,YAAY,CAACG,IAAK;AAClD,iCAAiCH,YAAY,CAACG,IAAK;AACnD,KAAM;AACN,GAAI;AACJ;AACA,CAdO"}
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
require("core-js/modules/es.array.includes.js");
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
|
|
10
12
|
var _styled = require("./styled");
|
|
@@ -17,7 +19,7 @@ var _animations = require("./animations");
|
|
|
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
24
|
const Drawer = ({
|
|
23
25
|
open,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Drawer.js","names":["Drawer","open","anchorPosition","onClose","children","style","rest","getStyles","state","stylesLeftRight","defaultStylesLeftRight","transitionLeftRight","transitionStylesLeftRight","stylesTopBottom","defaultStylesTopBottom","transitionTopBottom","transitionStylesTopBottom","includes"],"sources":["../../../../src/components/molecules/Drawer/Drawer.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyledContainerDrawer } from './styled';\nimport { Transition, TransitionStatus } from 'react-transition-group';\nimport { Overlay } from '../../atoms/Overlay';\nimport {\n transitionStylesTopBottom,\n defaultStylesTopBottom,\n defaultStylesLeftRight,\n transitionStylesLeftRight,\n} from './animations';\n\ntype AnchorPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {\n open: boolean;\n onClose: () => void;\n anchorPosition: AnchorPosition;\n}\n\nconst Drawer: FC<DrawerProps> = ({\n open,\n anchorPosition = 'right',\n onClose,\n children,\n style,\n ...rest\n}) => {\n const getStyles = (\n anchorPosition: AnchorPosition,\n state: TransitionStatus\n ) => {\n const stylesLeftRight = defaultStylesLeftRight(anchorPosition);\n const transitionLeftRight = transitionStylesLeftRight(anchorPosition);\n const stylesTopBottom = defaultStylesTopBottom(anchorPosition);\n const transitionTopBottom = transitionStylesTopBottom(anchorPosition);\n\n if (['left', 'right'].includes(anchorPosition)) {\n return {\n ...stylesLeftRight,\n ...transitionLeftRight[state],\n };\n } else {\n return {\n ...stylesTopBottom,\n ...transitionTopBottom[state],\n };\n }\n };\n\n return (\n <>\n <Overlay timeout={300} open={open} onClose={onClose} zIndex=\"drawer\" />\n <Transition in={open} timeout={300}>\n {state => (\n <StyledContainerDrawer\n style={{ ...style, ...getStyles(anchorPosition, state) }}\n anchorPosition={anchorPosition}\n onClose={onClose}\n open={open}\n {...rest}\n >\n {children}\n </StyledContainerDrawer>\n )}\n </Transition>\n </>\n );\n};\n\nexport default Drawer;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAeA,MAAMA,MAAuB,GAAG,CAAC;EAC/BC,IAD+B;EAE/BC,cAAc,GAAG,OAFc;EAG/BC,OAH+B;EAI/BC,QAJ+B;EAK/BC,KAL+B;EAM/B,GAAGC;AAN4B,CAAD,KAO1B;EACJ,MAAMC,SAAS,GAAG,CAChBL,cADgB,EAEhBM,KAFgB,KAGb;IACH,MAAMC,eAAe,GAAG,IAAAC,kCAAA,EAAuBR,cAAvB,CAAxB;IACA,MAAMS,mBAAmB,GAAG,IAAAC,qCAAA,EAA0BV,cAA1B,CAA5B;IACA,MAAMW,eAAe,GAAG,IAAAC,kCAAA,EAAuBZ,cAAvB,CAAxB;IACA,MAAMa,mBAAmB,GAAG,IAAAC,qCAAA,EAA0Bd,cAA1B,CAA5B;;IAEA,IAAI,CAAC,MAAD,EAAS,OAAT,EAAkBe,QAAlB,CAA2Bf,cAA3B,CAAJ,EAAgD;MAC9C,OAAO,EACL,GAAGO,eADE;QAEL,GAAGE,mBAAmB,CAACH,KAAD;MAFjB,CAAP;IAID,CALD,MAKO;MACL,OAAO,EACL,GAAGK,eADE;QAEL,GAAGE,mBAAmB,CAACP,KAAD;MAFjB,CAAP;IAID;EACF,CApBD;;EAsBA,OACE,4DACE,6BAAC,gBAAD;IAAS,OAAO,EAAE,GAAlB;IAAuB,IAAI,EAAEP,IAA7B;IAAmC,OAAO,EAAEE,OAA5C;IAAqD,MAAM,EAAC;EAA5D,EADF,EAEE,6BAAC,gCAAD;IAAY,EAAE,EAAEF,IAAhB;IAAsB,OAAO,EAAE;EAA/B,GACGO,KAAK,IACJ,6BAAC,6BAAD;IACE,KAAK,EAAE,EAAE,GAAGH,KAAL;MAAY,GAAGE,SAAS,CAACL,cAAD,EAAiBM,KAAjB;IAAxB,CADT;IAEE,cAAc,EAAEN,cAFlB;IAGE,OAAO,EAAEC,OAHX;IAIE,IAAI,EAAEF;EAJR,GAKMK,IALN,GAOGF,QAPH,CAFJ,CAFF,CADF;AAkBD,CAhDD;;eAkDeJ,M"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.transitionStylesTopBottom = exports.
|
|
6
|
+
exports.transitionStylesTopBottom = exports.transitionStylesLeftRight = exports.transformTopBottomOpen = exports.transformTopBottomClose = exports.transformLeftRigthOpen = exports.transformLeftRigthClose = exports.defaultStylesTopBottom = exports.defaultStylesLeftRight = void 0;
|
|
7
7
|
|
|
8
8
|
const transformLeftRigthClose = anchorPosition => anchorPosition === 'right' ? 'translateX(100%)' : 'translateX(-100%)';
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"animations.js","names":["transformLeftRigthClose","anchorPosition","transformLeftRigthOpen","transformTopBottomClose","transformTopBottomOpen","defaultStylesLeftRight","transition","transform","overflowX","overflowY","transitionStylesLeftRight","entering","entered","exiting","exited","defaultStylesTopBottom","transitionStylesTopBottom"],"sources":["../../../../src/components/molecules/Drawer/animations.ts"],"sourcesContent":["import { CSSProperties } from 'react';\n\nexport const transformLeftRigthClose = (anchorPosition: string) =>\n anchorPosition === 'right' ? 'translateX(100%)' : 'translateX(-100%)';\n\nexport const transformLeftRigthOpen = 'translateX(0)';\n\nexport const transformTopBottomClose = (anchorPosition: string) =>\n anchorPosition === 'top' ? 'translateY(-100%)' : 'translateY(100%)';\n\nexport const transformTopBottomOpen = 'translateY(0%)';\n\nexport const defaultStylesLeftRight = (\n anchorPosition: string\n): CSSProperties => {\n return {\n transition: 'transform 300ms ease-in-out',\n transform: transformLeftRigthClose(anchorPosition),\n overflowX: 'hidden',\n overflowY: 'auto',\n };\n};\n\nexport const transitionStylesLeftRight = (anchorPosition: string) => {\n return {\n entering: { transform: transformLeftRigthClose(anchorPosition) },\n entered: {\n transform: transformLeftRigthOpen,\n },\n exiting: {\n transform: transformLeftRigthOpen,\n },\n exited: { transform: transformLeftRigthClose(anchorPosition) },\n };\n};\n\nexport const defaultStylesTopBottom = (\n anchorPosition: string\n): CSSProperties => {\n return {\n transition: 'transform 300ms ease-in-out',\n transform: transformTopBottomClose(anchorPosition),\n overflowX: 'hidden',\n overflowY: 'auto',\n };\n};\nexport const transitionStylesTopBottom = (anchorPosition: string) => {\n return {\n entering: { transform: transformTopBottomClose(anchorPosition) },\n entered: {\n transform: transformTopBottomOpen,\n },\n exiting: {\n transform: transformTopBottomOpen,\n },\n exited: { transform: transformTopBottomClose(anchorPosition) },\n };\n};\n"],"mappings":";;;;;;;AAEO,MAAMA,uBAAuB,GAAIC,cAAD,IACrCA,cAAc,KAAK,OAAnB,GAA6B,kBAA7B,GAAkD,mBAD7C;;;AAGA,MAAMC,sBAAsB,GAAG,eAA/B;;;AAEA,MAAMC,uBAAuB,GAAIF,cAAD,IACrCA,cAAc,KAAK,KAAnB,GAA2B,mBAA3B,GAAiD,kBAD5C;;;AAGA,MAAMG,sBAAsB,GAAG,gBAA/B;;;AAEA,MAAMC,sBAAsB,GACjCJ,cADoC,IAElB;EAClB,OAAO;IACLK,UAAU,EAAE,6BADP;IAELC,SAAS,EAAEP,uBAAuB,CAACC,cAAD,CAF7B;IAGLO,SAAS,EAAE,QAHN;IAILC,SAAS,EAAE;EAJN,CAAP;AAMD,CATM;;;;AAWA,MAAMC,yBAAyB,GAAIT,cAAD,IAA4B;EACnE,OAAO;IACLU,QAAQ,EAAE;MAAEJ,SAAS,EAAEP,uBAAuB,CAACC,cAAD;IAApC,CADL;IAELW,OAAO,EAAE;MACPL,SAAS,EAAEL;IADJ,CAFJ;IAKLW,OAAO,EAAE;MACPN,SAAS,EAAEL;IADJ,CALJ;IAQLY,MAAM,EAAE;MAAEP,SAAS,EAAEP,uBAAuB,CAACC,cAAD;IAApC;EARH,CAAP;AAUD,CAXM;;;;AAaA,MAAMc,sBAAsB,GACjCd,cADoC,IAElB;EAClB,OAAO;IACLK,UAAU,EAAE,6BADP;IAELC,SAAS,EAAEJ,uBAAuB,CAACF,cAAD,CAF7B;IAGLO,SAAS,EAAE,QAHN;IAILC,SAAS,EAAE;EAJN,CAAP;AAMD,CATM;;;;AAUA,MAAMO,yBAAyB,GAAIf,cAAD,IAA4B;EACnE,OAAO;IACLU,QAAQ,EAAE;MAAEJ,SAAS,EAAEJ,uBAAuB,CAACF,cAAD;IAApC,CADL;IAELW,OAAO,EAAE;MACPL,SAAS,EAAEH;IADJ,CAFJ;IAKLS,OAAO,EAAE;MACPN,SAAS,EAAEH;IADJ,CALJ;IAQLU,MAAM,EAAE;MAAEP,SAAS,EAAEJ,uBAAuB,CAACF,cAAD;IAApC;EARH,CAAP;AAUD,CAXM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/Drawer/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Drawer/index.ts"],"sourcesContent":["export { default as Drawer, DrawerProps } from './Drawer';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["anchorLeft","theme","anchorPosition","css","borderRadius","centi","anchorRight","anchorTop","anchorBottom","baseStyles","includes","miscellaneous","bodyColor","zIndex","drawer","StyledContainerDrawer","styled","props"],"sources":["../../../../src/components/molecules/Drawer/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { DrawerProps } from './Drawer';\nimport { css } from '@emotion/react';\n\nconst anchorLeft = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'left' &&\n css`\n left: 0;\n top: 0;\n border-top-right-radius: ${theme.borderRadius.centi};\n border-bottom-right-radius: ${theme.borderRadius.centi};\n `\n );\n};\nconst anchorRight = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'right' &&\n css`\n right: 0;\n top: 0;\n border-top-left-radius: ${theme.borderRadius.centi};\n border-bottom-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst anchorTop = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'top' &&\n css`\n left: 0;\n right: 0;\n top: 0;\n border-bottom-right-radius: ${theme.borderRadius.centi};\n border-bottom-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst anchorBottom = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'bottom' &&\n css`\n left: 0;\n right: 0;\n bottom: 0;\n border-top-right-radius: ${theme.borderRadius.centi};\n border-top-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst baseStyles = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return css`\n height: ${['left', 'right'].includes(anchorPosition) && '100vh'};\n width: ${['top', 'bottom'].includes(anchorPosition) && '100wh'};\n position: fixed;\n overflow: hidden;\n background-color: ${theme.miscellaneous.bodyColor};\n z-index: ${theme.zIndex.drawer};\n `;\n};\n\nexport const StyledContainerDrawer = styled('div')<\n DrawerProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n ${anchorLeft(props)}\n ${anchorRight(props)}\n `\n);\n"],"mappings":";;;;;;;;;AAAA;;AAGA;;;;AAEA,MAAMA,UAAU,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAAyD;EAC1E,OACEA,cAAc,KAAK,MAAnB,IACA,IAAAC,UAAA,CAAI;AACR;AACA;AACA,iCAAiCF,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC1D,oCAAoCJ,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC7D,KAPE;AASD,CAVD;;AAWA,MAAMC,WAAW,GAAG,CAAC;EAAEL,KAAF;EAASC;AAAT,CAAD,KAAyD;EAC3E,OACEA,cAAc,KAAK,OAAnB,IACA,IAAAC,UAAA,CAAI;AACR;AACA;AACA,gCAAgCF,KAAK,CAACG,YAAN,CAAmBC,KAAM;AACzD,mCAAmCJ,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC5D,KAPE;AASD,CAVD;;AAYA,MAAME,SAAS,GAAG,CAAC;EAAEN,KAAF;EAASC;AAAT,CAAD,KAAyD;EACzE,OACEA,cAAc,KAAK,KAAnB,IACA,IAAAC,UAAA,CAAI;AACR;AACA;AACA;AACA,oCAAoCF,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC7D,mCAAmCJ,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC5D,KARE;AAUD,CAXD;;AAaA,MAAMG,YAAY,GAAG,CAAC;EAAEP,KAAF;EAASC;AAAT,CAAD,KAAyD;EAC5E,OACEA,cAAc,KAAK,QAAnB,IACA,IAAAC,UAAA,CAAI;AACR;AACA;AACA;AACA,iCAAiCF,KAAK,CAACG,YAAN,CAAmBC,KAAM;AAC1D,gCAAgCJ,KAAK,CAACG,YAAN,CAAmBC,KAAM;AACzD,KARE;AAUD,CAXD;;AAaA,MAAMI,UAAU,GAAG,CAAC;EAAER,KAAF;EAASC;AAAT,CAAD,KAAyD;EAC1E,OAAO,IAAAC,UAAA,CAAI;AACb,cAAc,CAAC,MAAD,EAAS,OAAT,EAAkBO,QAAlB,CAA2BR,cAA3B,KAA8C,OAAQ;AACpE,aAAa,CAAC,KAAD,EAAQ,QAAR,EAAkBQ,QAAlB,CAA2BR,cAA3B,KAA8C,OAAQ;AACnE;AACA;AACA,wBAAwBD,KAAK,CAACU,aAAN,CAAoBC,SAAU;AACtD,eAAeX,KAAK,CAACY,MAAN,CAAaC,MAAO;AACnC,GAPE;AAQD,CATD;;AAWO,MAAMC,qBAAqB,GAAG,IAAAC,eAAA,EAAO,KAAP,EAGnCC,KAAK,IAAI,IAAAd,UAAA,CAAI;AACf,MAAMM,UAAU,CAACQ,KAAD,CAAQ;AACxB,MAAMT,YAAY,CAACS,KAAD,CAAQ;AAC1B,MAAMV,SAAS,CAACU,KAAD,CAAQ;AACvB,MAAMjB,UAAU,CAACiB,KAAD,CAAQ;AACxB,MAAMX,WAAW,CAACW,KAAD,CAAQ;AACzB,GATqC,CAA9B"}
|
|
@@ -11,7 +11,7 @@ var _Item = require("./Item");
|
|
|
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 Grid = ({
|
|
17
17
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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 { GridItem } from './Item';\nimport { IGrid } from '@tecsinapse/react-core';\n\nexport type IGridWeb = IGrid &\n Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGridWeb): JSX.Element => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <div\n style={{\n ...style,\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\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 </div>\n );\n }\n\n return (\n <div\n style={{\n ...style,\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\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 </div>\n );\n};\n\nexport default Grid;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAMA,MAAMA,IAAI,GAAG,CAAC;EACZC,QADY;EAEZC,OAAO,GAAG,EAFE;EAGZC,MAHY;EAIZC,KAJY;EAKZC,OALY;EAMZ,GAAGC;AANS,CAAD,KAOgB;EAC3B,IAAIH,MAAJ,EAAY;IACV,MAAMI,UAAU,GAAGJ,MAAM,CAACK,IAAP,EAAnB;IACA,OACE;MACE,KAAK,EAAE,EACL,GAAGJ,KADE;QAELK,OAAO,EAAE,MAFJ;QAGLC,aAAa,EAAE,KAHV;QAILC,QAAQ,EAAE;MAJL;IADT,GAOML,IAPN,GASGM,cAAA,CAAMC,QAAN,CAAeC,GAAf,CAAmBb,QAAnB,EAA6B,CAACc,KAAD,EAAQC,KAAR,KAC5B,6BAAC,cAAD;MACE,GAAG,EAAG,SAAQA,KAAM,EADtB;MAEE,OAAO,EAAEd,OAFX;MAGE,IAAI,EAAEK,UAAU,CAACS,KAAD,CAHlB;MAIE,OAAO,EAAEX;IAJX,GAMGU,KANH,CADD,CATH,CADF;EAsBD;;EAED,OACE;IACE,KAAK,EAAE,EACL,GAAGX,KADE;MAELK,OAAO,EAAE,MAFJ;MAGLC,aAAa,EAAE,KAHV;MAILC,QAAQ,EAAE;IAJL;EADT,GAOML,IAPN,GASGM,cAAA,CAAMC,QAAN,CAAeC,GAAf,CAAmBb,QAAnB,EAA6B,CAACc,KAAD,EAAQC,KAAR,KAAkB;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,EAAE,CAAAU,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEG,KAAP,CAAab,OAAb,KAAwBA,OAHF;MAI/Bc,GAAG,EAAG,SAAQH,KAAM;IAJW,CAA1B,CAAP;EAMD,CAPA,CATH,CADF;AAoBD,CAtDD;;eAwDehB,I"}
|
|
@@ -15,7 +15,7 @@ var _functions = require("./functions");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
19
|
|
|
20
20
|
const GridItem = ({
|
|
21
21
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Item.js","names":["GridItem","children","span","_span","columns","loadingComponent","loading","spacing","_spacing","wrapper","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","justifyContent","flexBasis","style","rest","useTheme","sm","md","lg","useBreakpoints","React","Children","only","Error","getSpan","_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 {\n IGridItem,\n useTheme,\n Breakpoints,\n getGridItemColumSpan,\n getGridItemPadding,\n} from '@tecsinapse/react-core';\nimport { useBreakpoints } from '@tecsinapse/react-web-kit';\nimport { getSpan } from './functions';\n\nexport type Span = Pick<Breakpoints, 'sm'> & Partial<Omit<Breakpoints, 'sm'>>;\n\nexport interface IGridItemWeb\n extends Omit<IGridItem, 'span'>,\n Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /** At least sm should exist */\n span: number | Span;\n /** Only specify this property if the GridItem will be 'dynamic', adjusting itself to content. Use this with `wrapper` for better result. */\n flexBasis?:\n | string\n | 'content'\n | 'auto'\n | 'max-content'\n | 'min-content'\n | 'fit-content';\n}\n\nconst GridItem = ({\n children,\n span: _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}: IGridItemWeb): JSX.Element => {\n const { spacing } = useTheme();\n const { sm, md, lg } = useBreakpoints();\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 span = typeof _span === 'number' ? _span : getSpan(_span, sm, md, lg);\n\n const _style: React.CSSProperties = {\n ...style,\n alignContent,\n alignItems,\n alignSelf,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n flex,\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 <div {...rest} style={_style}>\n {clone}\n </div>\n ) : (\n clone\n );\n};\n\nexport default GridItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;AACA;;;;;;AAmBA,MAAMA,QAAQ,GAAG,CAAC;EAChBC,QADgB;EAEhBC,IAAI,EAAEC,KAFU;EAGhBC,OAAO,GAAG,EAHM;EAIhBC,gBAJgB;EAKhBC,OAAO,GAAG,KALM;EAMhBC,OAAO,EAAEC,QANO;EAOhBC,OAAO,GAAG,KAPM;EAQhBC,YARgB;EAShBC,UATgB;EAUhBC,SAVgB;EAWhBC,IAXgB;EAYhBC,aAZgB;EAahBC,QAbgB;EAchBC,UAdgB;EAehBC,cAfgB;EAgBhBC,SAhBgB;EAiBhBC,KAjBgB;EAkBhB,GAAGC;AAlBa,CAAD,KAmBgB;EAC/B,MAAM;IAAEb;EAAF,IAAc,IAAAc,mBAAA,GAApB;EACA,MAAM;IAAEC,EAAF;IAAMC,EAAN;IAAUC;EAAV,IAAiB,IAAAC,2BAAA,GAAvB;;EACA,IAAI,CAACC,cAAA,CAAMC,QAAN,CAAeC,IAAf,CAAoB3B,QAApB,CAAL,EAAoC;IAClC,MAAM,IAAI4B,KAAJ,CAAU,kDAAV,CAAN;EACD;;EACD,IAAIxB,gBAAgB,IAAIC,OAAxB,EAAiC;IAC/B,OAAOD,gBAAP;EACD;;EAED,MAAMH,IAAI,GAAG,OAAOC,KAAP,KAAiB,QAAjB,GAA4BA,KAA5B,GAAoC,IAAA2B,kBAAA,EAAQ3B,KAAR,EAAemB,EAAf,EAAmBC,EAAnB,EAAuBC,EAAvB,CAAjD;EAEA,MAAMO,MAA2B,GAAG,EAClC,GAAGZ,KAD+B;IAElCT,YAFkC;IAGlCC,UAHkC;IAIlCC,SAJkC;IAKlCE,aALkC;IAMlCC,QANkC;IAOlCC,UAPkC;IAQlCC,cARkC;IASlCJ,IATkC;IAUlCmB,SAAS,EAAE,YAVuB;IAWlCd,SAAS,EAAEA,SAAS,IAAK,GAAE,IAAAe,+BAAA,EAAqB7B,OAArB,EAA8BF,IAA9B,CAAoC,GAX7B;IAYlCgC,UAAU,EAAE,IAAAC,6BAAA,EAAmB,KAAnB,EAA0B3B,QAA1B,EAAoCD,OAApC,CAZsB;IAalC6B,aAAa,EAAE,IAAAD,6BAAA,EAAmB,QAAnB,EAA6B3B,QAA7B,EAAuCD,OAAvC,CAbmB;IAclC8B,YAAY,EAAE,IAAAF,6BAAA,EAAmB,OAAnB,EAA4B3B,QAA5B,EAAsCD,OAAtC,CAdoB;IAelC+B,WAAW,EAAE,IAAAH,6BAAA,EAAmB,MAAnB,EAA2B3B,QAA3B,EAAqCD,OAArC;EAfqB,CAApC;;EAkBA,MAAMgC,KAAK,GAAGb,cAAA,CAAMc,YAAN,CAAmBvC,QAAnB,EAA6B,EACzC,IAAGA,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEwC,KAAb,CADyC;IAEzCtB,KAAK,EAAEV,OAAO,GACVR,QADU,aACVA,QADU,uBACVA,QAAQ,CAAEwC,KAAV,CAAgBtB,KADN,GAEV,EAAE,GAAGY,MAAL;MAAa,IAAG9B,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAEwC,KAAV,CAAgBtB,KAAnB;IAAb;EAJqC,CAA7B,CAAd;;EAOA,OAAOV,OAAO,GACZ,iDAASW,IAAT;IAAe,KAAK,EAAEW;EAAtB,IACGQ,KADH,CADY,GAKZA,KALF;AAOD,CA/DD;;eAiEevC,Q"}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getSpan = void 0;
|
|
7
7
|
|
|
8
8
|
const getSpan = (value, sm, md, lg) => {
|
|
9
|
-
if (sm) return value.sm;
|
|
10
|
-
if (md) return value.md ?? value.sm;
|
|
11
|
-
if (lg) return value.lg ?? value.md ?? value.sm;
|
|
9
|
+
if (sm) return value === null || value === void 0 ? void 0 : value.sm;
|
|
10
|
+
if (md) return (value === null || value === void 0 ? void 0 : value.md) ?? (value === null || value === void 0 ? void 0 : value.sm);
|
|
11
|
+
if (lg) return (value === null || value === void 0 ? void 0 : value.lg) ?? (value === null || value === void 0 ? void 0 : value.md) ?? (value === null || value === void 0 ? void 0 : value.sm);
|
|
12
12
|
return 0;
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"functions.js","names":["getSpan","value","sm","md","lg"],"sources":["../../../../../src/components/molecules/Grid/Item/functions.ts"],"sourcesContent":["import { Span } from './Item';\n\nexport const getSpan = (\n value: Span,\n sm: boolean,\n md: boolean,\n lg: boolean\n): number => {\n if (sm) return value?.sm;\n if (md) return value?.md ?? value?.sm;\n if (lg) return value?.lg ?? value?.md ?? value?.sm;\n return 0;\n};\n"],"mappings":";;;;;;;AAEO,MAAMA,OAAO,GAAG,CACrBC,KADqB,EAErBC,EAFqB,EAGrBC,EAHqB,EAIrBC,EAJqB,KAKV;EACX,IAAIF,EAAJ,EAAQ,OAAOD,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAEC,EAAd;EACR,IAAIC,EAAJ,EAAQ,OAAO,CAAAF,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEE,EAAP,MAAaF,KAAb,aAAaA,KAAb,uBAAaA,KAAK,CAAEC,EAApB,CAAP;EACR,IAAIE,EAAJ,EAAQ,OAAO,CAAAH,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEG,EAAP,MAAaH,KAAb,aAAaA,KAAb,uBAAaA,KAAK,CAAEE,EAApB,MAA0BF,KAA1B,aAA0BA,KAA1B,uBAA0BA,KAAK,CAAEC,EAAjC,CAAP;EACR,OAAO,CAAP;AACD,CAVM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/molecules/Grid/Item/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/molecules/Grid/Item/index.ts"],"sourcesContent":["export { default as GridItem } from './Item';\nexport type { IGridItemWeb } from './Item';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "Grid", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _Grid.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "GridItem", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _Item.GridItem;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/Grid/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Grid/index.ts"],"sourcesContent":["export { GridItem } from './Item';\nexport type { IGridItemWeb } from './Item';\nexport { default as Grid } from './Grid';\nexport type { IGridWeb } from './Grid';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|
|
@@ -17,7 +17,7 @@ var _TextComponent = _interopRequireDefault(require("./TextComponent"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
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
21
|
|
|
22
22
|
const IconTextButton = ({
|
|
23
23
|
iconProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"IconTextButton.js","names":["IconTextButton","iconProps","iconPosition","textProps","label","variant","size","rest","handleHover","handlePressed","defaultFontColor","useIconTextButton"],"sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import { IconComponent, IconTextButtonProps } from '@tecsinapse/react-core';\nimport React from 'react';\nimport { WebButtonProps } from '../../atoms/Button';\nimport useIconTextButton from './hooks/useIconTextButton';\nimport { StyledIconTextButton } from './styled';\nimport TextComponent from './TextComponent';\n\nexport type WebIconTextButtonProps = IconTextButtonProps &\n Omit<WebButtonProps, 'ButtonProps'>;\n\nconst IconTextButton: React.FC<WebIconTextButtonProps> = ({\n iconProps,\n iconPosition = 'left',\n textProps,\n label,\n variant = 'filled',\n size = 'default',\n ...rest\n}): JSX.Element => {\n const { handleHover, handlePressed, defaultFontColor } =\n useIconTextButton(variant);\n\n return (\n <StyledIconTextButton\n boxed={!label}\n variant={variant}\n size={size}\n onMouseOut={() => handleHover(true)}\n onMouseOver={() => handleHover(false)}\n onPressIn={() => handlePressed(true)}\n onPressOut={() => handlePressed(false)}\n {...rest}\n >\n {iconPosition === 'left' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={defaultFontColor}\n />\n ) : (\n <></>\n )}\n <TextComponent\n label={label}\n defaultFontColor={defaultFontColor}\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={defaultFontColor}\n />\n ) : (\n <></>\n )}\n </StyledIconTextButton>\n );\n};\n\nexport default IconTextButton;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAKA,MAAMA,cAAgD,GAAG,CAAC;EACxDC,SADwD;EAExDC,YAAY,GAAG,MAFyC;EAGxDC,SAHwD;EAIxDC,KAJwD;EAKxDC,OAAO,GAAG,QAL8C;EAMxDC,IAAI,GAAG,SANiD;EAOxD,GAAGC;AAPqD,CAAD,KAQtC;EACjB,MAAM;IAAEC,WAAF;IAAeC,aAAf;IAA8BC;EAA9B,IACJ,IAAAC,0BAAA,EAAkBN,OAAlB,CADF;EAGA,OACE,6BAAC,4BAAD;IACE,KAAK,EAAE,CAACD,KADV;IAEE,OAAO,EAAEC,OAFX;IAGE,IAAI,EAAEC,IAHR;IAIE,UAAU,EAAE,MAAME,WAAW,CAAC,IAAD,CAJ/B;IAKE,WAAW,EAAE,MAAMA,WAAW,CAAC,KAAD,CALhC;IAME,SAAS,EAAE,MAAMC,aAAa,CAAC,IAAD,CANhC;IAOE,UAAU,EAAE,MAAMA,aAAa,CAAC,KAAD;EAPjC,GAQMF,IARN,GAUGL,YAAY,KAAK,MAAjB,GACC,6BAAC,wBAAD;IACE,SAAS,EAAED,SADb;IAEE,IAAI,EAAEK,IAFR;IAGE,gBAAgB,EAAEI;EAHpB,EADD,GAOC,2DAjBJ,EAmBE,6BAAC,sBAAD;IACE,KAAK,EAAEN,KADT;IAEE,gBAAgB,EAAEM,gBAFpB;IAGE,OAAO,EAAE,CAAC,CAACT,SAHb;IAIE,YAAY,EAAEC,YAJhB;IAKE,SAAS,EAAEC,SALb;IAME,IAAI,EAAEG;EANR,EAnBF,EA2BGJ,YAAY,KAAK,OAAjB,GACC,6BAAC,wBAAD;IACE,SAAS,EAAED,SADb;IAEE,IAAI,EAAEK,IAFR;IAGE,gBAAgB,EAAEI;EAHpB,EADD,GAOC,2DAlCJ,CADF;AAuCD,CAnDD;;eAqDeV,c"}
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
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 TextComponent = ({
|
|
17
17
|
textProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"TextComponent.js","names":["TextComponent","textProps","size","defaultFontColor","label","typography","fontWeight","fontColor","React","memo"],"sources":["../../../../src/components/molecules/IconTextButton/TextComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n IconPositionOptions,\n Text,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\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}) => {\n return label ? (\n <Text\n typography={textProps?.typography ?? size === 'small' ? 'sub' : 'base'}\n fontWeight={textProps?.fontWeight ?? 'bold'}\n fontColor={textProps?.fontColor ?? defaultFontColor}\n {...textProps}\n >\n {label}\n </Text>\n ) : (\n <></>\n );\n};\n\nexport default React.memo(TextComponent);\n"],"mappings":";;;;;;;AAAA;;AAOA;;;;;;AAWA,MAAMA,aAAqC,GAAG,CAAC;EAC7CC,SAD6C;EAE7CC,IAAI,GAAG,SAFsC;EAG7CC,gBAH6C;EAI7CC;AAJ6C,CAAD,KAKxC;EACJ,OAAOA,KAAK,GACV,6BAAC,eAAD;IACE,UAAU,EAAE,CAAAH,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEI,UAAX,KAAyBH,IAAI,KAAK,OAAlC,GAA4C,KAA5C,GAAoD,MADlE;IAEE,UAAU,EAAE,CAAAD,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEK,UAAX,KAAyB,MAFvC;IAGE,SAAS,EAAE,CAAAL,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEM,SAAX,KAAwBJ;EAHrC,GAIMF,SAJN,GAMGG,KANH,CADU,GAUV,2DAVF;AAYD,CAlBD;;eAoBeI,cAAA,CAAMC,IAAN,CAAWT,aAAX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useIconTextButton.js","names":["useIconTextButton","variant","hover","setHover","useState","pressed","setPressed","defaultFontColor","fontColorVC","handleHover","useCallback","value","handlePressed"],"sources":["../../../../../src/components/molecules/IconTextButton/hooks/useIconTextButton.ts"],"sourcesContent":["import { fontColorVC, VariantType } from '@tecsinapse/react-core';\nimport { useCallback, useState } from 'react';\n\nconst useIconTextButton = (variant: VariantType) => {\n const [hover, setHover] = useState<boolean>(false);\n const [pressed, setPressed] = useState<boolean>(false);\n\n const defaultFontColor = !pressed && hover ? 'light' : fontColorVC[variant];\n\n const handleHover = useCallback(\n (value: boolean) => {\n setHover(value);\n },\n [setHover]\n );\n\n const handlePressed = useCallback(\n (value: boolean) => {\n setPressed(value);\n },\n [setPressed]\n );\n\n return {\n handleHover,\n handlePressed,\n defaultFontColor,\n };\n};\n\nexport default useIconTextButton;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA,MAAMA,iBAAiB,GAAIC,OAAD,IAA0B;EAClD,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoB,IAAAC,eAAA,EAAkB,KAAlB,CAA1B;EACA,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,IAAAF,eAAA,EAAkB,KAAlB,CAA9B;EAEA,MAAMG,gBAAgB,GAAG,CAACF,OAAD,IAAYH,KAAZ,GAAoB,OAApB,GAA8BM,sBAAA,CAAYP,OAAZ,CAAvD;EAEA,MAAMQ,WAAW,GAAG,IAAAC,kBAAA,EACjBC,KAAD,IAAoB;IAClBR,QAAQ,CAACQ,KAAD,CAAR;EACD,CAHiB,EAIlB,CAACR,QAAD,CAJkB,CAApB;EAOA,MAAMS,aAAa,GAAG,IAAAF,kBAAA,EACnBC,KAAD,IAAoB;IAClBL,UAAU,CAACK,KAAD,CAAV;EACD,CAHmB,EAIpB,CAACL,UAAD,CAJoB,CAAtB;EAOA,OAAO;IACLG,WADK;IAELG,aAFK;IAGLL;EAHK,CAAP;AAKD,CAzBD;;eA2BeP,iB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/IconTextButton/index.ts"],"sourcesContent":["export {\n default as IconTextButton,\n WebIconTextButtonProps,\n} from './IconTextButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["boxedStyle","theme","spacing","centi","StyledIconTextButton","styled","Button","mili","boxed"],"sources":["../../../../src/components/molecules/IconTextButton/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { Button } from '../../atoms/Button';\n\nconst boxedStyle = ({ theme }: Partial<StyleProps>) =>\n `\n padding: ${theme?.spacing.centi};\n aspect-ratio: 1;\n `;\n\nexport const StyledIconTextButton = styled(Button)<\n Partial<StyleProps> & {\n boxed: boolean;\n }\n>`\n gap: ${({ theme }) => theme?.spacing.mili};\n ${({ boxed, theme }) => boxed && boxedStyle({ theme })};\n`;\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG,CAAC;EAAEC;AAAF,CAAD,KAChB;AACH,eAAeA,KADb,aACaA,KADb,uBACaA,KAAK,CAAEC,OAAP,CAAeC,KAAM;AACpC;AACA,GAJA;;AAMO,MAAMC,oBAAoB,GAAG,IAAAC,eAAA,EAAOC,cAAP,CAIlC;AACF,SAAS,CAAC;EAAEL;AAAF,CAAD,KAAeA,KAAf,aAAeA,KAAf,uBAAeA,KAAK,CAAEC,OAAP,CAAeK,IAAK;AAC5C,IAAI,CAAC;EAAEC,KAAF;EAASP;AAAT,CAAD,KAAsBO,KAAK,IAAIR,UAAU,CAAC;EAAEC;AAAF,CAAD,CAAY;AACzD,CAPO"}
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
19
|
|
|
20
20
|
const InputPassword = _react.default.forwardRef(({
|
|
21
21
|
rightComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"InputPassword.js","names":["InputPassword","React","forwardRef","rightComponent","rest","ref","revealed","setRevealed","useState","displayName"],"sources":["../../../../src/components/molecules/InputPassword/InputPassword.tsx"],"sourcesContent":["import { InputPasswordIcon } from '@tecsinapse/react-core';\nimport React, { FC, useState } from 'react';\nimport { Input, InputWebProps } from '../../atoms/Input';\n\nexport type InputPasswordWebProps = InputWebProps;\n\nconst InputPassword: FC<InputPasswordWebProps> = React.forwardRef(\n ({ rightComponent, ...rest }, ref) => {\n const [revealed, setRevealed] = useState(false);\n return (\n <Input\n {...rest}\n ref={ref}\n secureTextEntry={!revealed}\n rightComponent={\n <>\n <InputPasswordIcon\n onChangeState={setRevealed}\n revealed={revealed}\n effect=\"none\"\n />\n {rightComponent}\n </>\n }\n />\n );\n }\n);\n\nInputPassword.displayName = 'InputPassword';\n\nexport default InputPassword;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAIA,MAAMA,aAAwC,GAAGC,cAAA,CAAMC,UAAN,CAC/C,CAAC;EAAEC,cAAF;EAAkB,GAAGC;AAArB,CAAD,EAA8BC,GAA9B,KAAsC;EACpC,MAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,IAAAC,eAAA,EAAS,KAAT,CAAhC;EACA,OACE,6BAAC,YAAD,eACMJ,IADN;IAEE,GAAG,EAAEC,GAFP;IAGE,eAAe,EAAE,CAACC,QAHpB;IAIE,cAAc,EACZ,4DACE,6BAAC,4BAAD;MACE,aAAa,EAAEC,WADjB;MAEE,QAAQ,EAAED,QAFZ;MAGE,MAAM,EAAC;IAHT,EADF,EAMGH,cANH;EALJ,GADF;AAiBD,CApB8C,CAAjD;;AAuBAH,aAAa,CAACS,WAAd,GAA4B,eAA5B;eAEeT,a"}
|
|
@@ -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 {\n default as InputPassword,\n InputPasswordWebProps,\n} from './InputPassword';\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 LabelComponent = ({
|
|
19
19
|
label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"LabelComponent.js","names":["LabelComponent","label","labelPosition","labelProps","active","switchDisabled","rest","defaultFontColor","defaultFontWeight","fontColor","fontWeight","React","memo"],"sources":["../../../../src/components/molecules/LabeledSwitch/LabelComponent.tsx"],"sourcesContent":["import {\n FontColor,\n FontWeight,\n LabelPositionOptions,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Pressable, PressableProps } from 'react-native';\nimport { StyledLabel } from './styled';\n\nexport interface LabelComponentProps extends PressableProps {\n label: string;\n labelPosition: LabelPositionOptions;\n labelProps?: TextProps;\n active: boolean;\n switchDisabled?: boolean;\n}\n\nconst LabelComponent: FC<LabelComponentProps> = ({\n label,\n labelPosition,\n labelProps,\n active,\n switchDisabled = false,\n ...rest\n}) => {\n const defaultFontColor: keyof FontColor =\n active && !switchDisabled ? 'dark' : 'medium';\n const defaultFontWeight: keyof FontWeight =\n active && !switchDisabled ? 'bold' : 'regular';\n\n return (\n <Pressable {...rest}>\n <StyledLabel\n labelPosition={labelPosition}\n fontColor={labelProps?.fontColor ?? defaultFontColor}\n fontWeight={labelProps?.fontWeight ?? defaultFontWeight}\n {...labelProps}\n >\n {label}\n </StyledLabel>\n </Pressable>\n );\n};\n\nexport default React.memo(LabelComponent);\n"],"mappings":";;;;;;;AAMA;;AACA;;AACA;;;;;;AAUA,MAAMA,cAAuC,GAAG,CAAC;EAC/CC,KAD+C;EAE/CC,aAF+C;EAG/CC,UAH+C;EAI/CC,MAJ+C;EAK/CC,cAAc,GAAG,KAL8B;EAM/C,GAAGC;AAN4C,CAAD,KAO1C;EACJ,MAAMC,gBAAiC,GACrCH,MAAM,IAAI,CAACC,cAAX,GAA4B,MAA5B,GAAqC,QADvC;EAEA,MAAMG,iBAAmC,GACvCJ,MAAM,IAAI,CAACC,cAAX,GAA4B,MAA5B,GAAqC,SADvC;EAGA,OACE,6BAAC,yBAAD,EAAeC,IAAf,EACE,6BAAC,mBAAD;IACE,aAAa,EAAEJ,aADjB;IAEE,SAAS,EAAE,CAAAC,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEM,SAAZ,KAAyBF,gBAFtC;IAGE,UAAU,EAAE,CAAAJ,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEO,UAAZ,KAA0BF;EAHxC,GAIML,UAJN,GAMGF,KANH,CADF,CADF;AAYD,CAzBD;;eA2BeU,cAAA,CAAMC,IAAN,CAAWZ,cAAX,C"}
|
|
@@ -15,7 +15,7 @@ var _styled = require("./styled");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
19
|
|
|
20
20
|
const LabeledSwitch = ({
|
|
21
21
|
label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"LabeledSwitch.js","names":["LabeledSwitch","label","labelPosition","labelProps","pressableLabel","disabled","active","onChange","rest"],"sources":["../../../../src/components/molecules/LabeledSwitch/LabeledSwitch.tsx"],"sourcesContent":["import { LabeledSwitchProps, Switch, TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport LabelComponent from './LabelComponent';\nimport { StyledDiv } from './styled';\n\nexport type LabeledSwitchWebProps = LabeledSwitchProps & {\n labelProps?: TextProps;\n};\n\nconst LabeledSwitch: FC<LabeledSwitchWebProps> = ({\n label,\n labelPosition = 'right',\n labelProps,\n pressableLabel = false,\n disabled,\n active,\n onChange,\n ...rest\n}) => {\n return (\n <StyledDiv>\n {labelPosition === 'left' ? (\n <LabelComponent\n active={active}\n label={label}\n labelPosition={'left'}\n labelProps={labelProps}\n disabled={!pressableLabel || disabled}\n switchDisabled={disabled}\n onPress={() => onChange(!active)}\n />\n ) : (\n <></>\n )}\n <Switch\n active={active}\n disabled={disabled}\n onChange={onChange}\n {...rest}\n />\n {labelPosition === 'right' ? (\n <LabelComponent\n active={active}\n label={label}\n labelPosition={'right'}\n labelProps={labelProps}\n disabled={!pressableLabel || disabled}\n switchDisabled={disabled}\n onPress={() => onChange(!active)}\n />\n ) : (\n <></>\n )}\n </StyledDiv>\n );\n};\n\nexport default LabeledSwitch;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAMA,MAAMA,aAAwC,GAAG,CAAC;EAChDC,KADgD;EAEhDC,aAAa,GAAG,OAFgC;EAGhDC,UAHgD;EAIhDC,cAAc,GAAG,KAJ+B;EAKhDC,QALgD;EAMhDC,MANgD;EAOhDC,QAPgD;EAQhD,GAAGC;AAR6C,CAAD,KAS3C;EACJ,OACE,6BAAC,iBAAD,QACGN,aAAa,KAAK,MAAlB,GACC,6BAAC,uBAAD;IACE,MAAM,EAAEI,MADV;IAEE,KAAK,EAAEL,KAFT;IAGE,aAAa,EAAE,MAHjB;IAIE,UAAU,EAAEE,UAJd;IAKE,QAAQ,EAAE,CAACC,cAAD,IAAmBC,QAL/B;IAME,cAAc,EAAEA,QANlB;IAOE,OAAO,EAAE,MAAME,QAAQ,CAAC,CAACD,MAAF;EAPzB,EADD,GAWC,2DAZJ,EAcE,6BAAC,iBAAD;IACE,MAAM,EAAEA,MADV;IAEE,QAAQ,EAAED,QAFZ;IAGE,QAAQ,EAAEE;EAHZ,GAIMC,IAJN,EAdF,EAoBGN,aAAa,KAAK,OAAlB,GACC,6BAAC,uBAAD;IACE,MAAM,EAAEI,MADV;IAEE,KAAK,EAAEL,KAFT;IAGE,aAAa,EAAE,OAHjB;IAIE,UAAU,EAAEE,UAJd;IAKE,QAAQ,EAAE,CAACC,cAAD,IAAmBC,QAL/B;IAME,cAAc,EAAEA,QANlB;IAOE,OAAO,EAAE,MAAME,QAAQ,CAAC,CAACD,MAAF;EAPzB,EADD,GAWC,2DA/BJ,CADF;AAoCD,CA9CD;;eAgDeN,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/LabeledSwitch/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/LabeledSwitch/index.ts"],"sourcesContent":["export {\n default as LabeledSwitch,\n LabeledSwitchWebProps,\n} from './LabeledSwitch';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["StyledDiv","webStyled","StyledLabel","nativeStyled","Text","theme","labelPosition","css","spacing","centi"],"sources":["../../../../src/components/molecules/LabeledSwitch/styled.ts"],"sourcesContent":["import { css, default as nativeStyled } from '@emotion/native';\nimport { default as webStyled } from '@emotion/styled';\nimport { LabelPositionOptions, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledDiv = webStyled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledLabel = nativeStyled(Text)<\n Partial<StyleProps> & {\n labelPosition: LabelPositionOptions;\n }\n>`\n ${({ theme, labelPosition }) => {\n if (labelPosition === 'right')\n return css`\n margin-left: ${theme?.spacing.centi};\n `;\n else if (labelPosition === 'left')\n return css`\n margin-right: ${theme?.spacing.centi};\n `;\n }}\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAEO,MAAMA,SAAS,GAAG,IAAAC,eAAA,EAAU,KAAV,CAAiB;AAC1C;AACA;AACA;AACA,CAJO;;AAMA,MAAMC,WAAW,GAAG,IAAAC,eAAA,EAAaC,eAAb,CAIzB;AACF,IAAI,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAA8B;EAC9B,IAAIA,aAAa,KAAK,OAAtB,EACE,OAAO,IAAAC,WAAA,CAAI;AACjB,uBAAuBF,KADP,aACOA,KADP,uBACOA,KAAK,CAAEG,OAAP,CAAeC,KAAM;AAC5C,OAFM,CADF,KAIK,IAAIH,aAAa,KAAK,MAAtB,EACH,OAAO,IAAAC,WAAA,CAAI;AACjB,wBAAwBF,KADR,aACQA,KADR,uBACQA,KAAK,CAAEG,OAAP,CAAeC,KAAM;AAC7C,OAFM;AAGH,CAAC;AACJ,CAfO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Masonry.js","names":["Masonry","children","columns","spacingTop","spacingLeft","getColumns","columnsArray","Array","from","length","React","Children","forEach","child","index","isValidElement","push","renderColumn","column","map","item","renderColumns"],"sources":["../../../../src/components/molecules/Masonry/Masonry.tsx"],"sourcesContent":["import React from 'react';\nimport { SpacingType } from '@tecsinapse/react-core';\nimport { StyledColumnItem, StyledRowItem, StyledMasonry } from './styled';\n\nexport interface MasonryProps {\n columns: number;\n /** Spacing to the left of every block on index % column !== 0 */\n spacingLeft: SpacingType;\n /** Spacing to the top of every block on index >= column */\n spacingTop: SpacingType;\n}\n\nconst Masonry: React.FC<MasonryProps> = ({\n children,\n columns,\n spacingTop,\n spacingLeft,\n}) => {\n const getColumns = () => {\n const columnsArray: React.ReactNode[][] = Array.from(\n { length: columns },\n () => []\n );\n\n React.Children.forEach(children, (child, index) => {\n if (child && React.isValidElement(child)) {\n columnsArray[index % columns].push(child);\n }\n });\n\n return columnsArray;\n };\n\n const renderColumn = column => {\n return column.map((item, index) => (\n <StyledRowItem key={index} index={index} spacingTop={spacingTop}>\n {item}\n </StyledRowItem>\n ));\n };\n\n const renderColumns = () => {\n return getColumns().map((column, index) => (\n <StyledColumnItem key={index} index={index} spacingLeft={spacingLeft}>\n {renderColumn(column)}\n </StyledColumnItem>\n ));\n };\n\n return <StyledMasonry>{renderColumns()}</StyledMasonry>;\n};\n\nexport default Masonry;\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;AAUA,MAAMA,OAA+B,GAAG,CAAC;EACvCC,QADuC;EAEvCC,OAFuC;EAGvCC,UAHuC;EAIvCC;AAJuC,CAAD,KAKlC;EACJ,MAAMC,UAAU,GAAG,MAAM;IACvB,MAAMC,YAAiC,GAAGC,KAAK,CAACC,IAAN,CACxC;MAAEC,MAAM,EAAEP;IAAV,CADwC,EAExC,MAAM,EAFkC,CAA1C;;IAKAQ,cAAA,CAAMC,QAAN,CAAeC,OAAf,CAAuBX,QAAvB,EAAiC,CAACY,KAAD,EAAQC,KAAR,KAAkB;MACjD,IAAID,KAAK,IAAIH,cAAA,CAAMK,cAAN,CAAqBF,KAArB,CAAb,EAA0C;QACxCP,YAAY,CAACQ,KAAK,GAAGZ,OAAT,CAAZ,CAA8Bc,IAA9B,CAAmCH,KAAnC;MACD;IACF,CAJD;;IAMA,OAAOP,YAAP;EACD,CAbD;;EAeA,MAAMW,YAAY,GAAGC,MAAM,IAAI;IAC7B,OAAOA,MAAM,CAACC,GAAP,CAAW,CAACC,IAAD,EAAON,KAAP,KAChB,6BAAC,qBAAD;MAAe,GAAG,EAAEA,KAApB;MAA2B,KAAK,EAAEA,KAAlC;MAAyC,UAAU,EAAEX;IAArD,GACGiB,IADH,CADK,CAAP;EAKD,CAND;;EAQA,MAAMC,aAAa,GAAG,MAAM;IAC1B,OAAOhB,UAAU,GAAGc,GAAb,CAAiB,CAACD,MAAD,EAASJ,KAAT,KACtB,6BAAC,wBAAD;MAAkB,GAAG,EAAEA,KAAvB;MAA8B,KAAK,EAAEA,KAArC;MAA4C,WAAW,EAAEV;IAAzD,GACGa,YAAY,CAACC,MAAD,CADf,CADK,CAAP;EAKD,CAND;;EAQA,OAAO,6BAAC,qBAAD,QAAgBG,aAAa,EAA7B,CAAP;AACD,CAtCD;;eAwCerB,O"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/Masonry/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/molecules/Masonry/index.ts"],"sourcesContent":["export { default as Masonry } from './Masonry';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["StyledColumnItem","styled","theme","index","spacingLeft","spacing","StyledMasonry","StyledRowItem","spacingTop"],"sources":["../../../../src/components/molecules/Masonry/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { MasonryProps } from './Masonry';\n\nexport const StyledColumnItem = styled('div')<\n Partial<StyleProps> & { index: number } & Partial<MasonryProps>\n>`\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-content: stretch;\n flex: 1;\n width: 0;\n margin-left: ${({ theme, index, spacingLeft = 'nano' }) =>\n index > 0 ? theme.spacing[spacingLeft] : 'initial'};\n`;\n\nexport const StyledMasonry = styled('div')`\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-content: stretch;\n box-sizing: border-box;\n width: 100%;\n`;\n\nexport const StyledRowItem = styled('div')<\n Partial<StyleProps> & { index: number } & Partial<MasonryProps>\n>`\n margin-top: ${({ theme, index, spacingTop = 'nano' }) =>\n index > 0 ? theme.spacing[spacingTop] : 'initial'};\n`;\n"],"mappings":";;;;;;;AAAA;;;;AAIO,MAAMA,gBAAgB,GAAG,IAAAC,eAAA,EAAO,KAAP,CAE9B;AACF;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,CAAC;EAAEC,KAAF;EAASC,KAAT;EAAgBC,WAAW,GAAG;AAA9B,CAAD,KACbD,KAAK,GAAG,CAAR,GAAYD,KAAK,CAACG,OAAN,CAAcD,WAAd,CAAZ,GAAyC,SAAU;AACvD,CAXO;;AAaA,MAAME,aAAa,GAAG,IAAAL,eAAA,EAAO,KAAP,CAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,CAPO;;AASA,MAAMM,aAAa,GAAG,IAAAN,eAAA,EAAO,KAAP,CAE3B;AACF,gBAAgB,CAAC;EAAEC,KAAF;EAASC,KAAT;EAAgBK,UAAU,GAAG;AAA7B,CAAD,KACZL,KAAK,GAAG,CAAR,GAAYD,KAAK,CAACG,OAAN,CAAcG,UAAd,CAAZ,GAAwC,SAAU;AACtD,CALO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"MenuBlock.js","names":["MenuBlock","options","toggle","map","data","title","leftComponents","items","Component","props","rightComponents","React","memo"],"sources":["../../../../../src/components/molecules/Menubar/MenuBlock/MenuBlock.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { MenuItem } from './MenuItem';\nimport {\n StyledContainerItems,\n StyledContainerMenu,\n StyledLeftComponent,\n} from './styled';\nimport { ItemsOptions, OptionsType } from '../types';\nimport { Masonry } from '../../Masonry';\n\ninterface MenuBlockProps {\n toggle: () => void;\n options: OptionsType[];\n}\n\nconst MenuBlock: React.FC<MenuBlockProps> = ({ options, toggle }) => {\n return (\n <Masonry columns={4} spacingTop=\"kilo\" spacingLeft=\"mega\">\n {options.map(data => (\n <React.Fragment key={`${data.title}`}>\n <StyledContainerMenu>\n {data.leftComponents && (\n <StyledLeftComponent>{data.leftComponents}</StyledLeftComponent>\n )}\n <Text fontWeight=\"bold\">{data.title}</Text>\n </StyledContainerMenu>\n <StyledContainerItems>\n {data.items.map(\n ({\n title,\n Component,\n props,\n rightComponents,\n items,\n }: ItemsOptions) => (\n <MenuItem\n items={items}\n key={title}\n title={title}\n Component={Component}\n rightComponents={rightComponents}\n props={props}\n toggle={toggle}\n />\n )\n )}\n </StyledContainerItems>\n </React.Fragment>\n ))}\n </Masonry>\n );\n};\n\nexport default React.memo(MenuBlock);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAMA;;;;AAOA,MAAMA,SAAmC,GAAG,CAAC;EAAEC,OAAF;EAAWC;AAAX,CAAD,KAAyB;EACnE,OACE,6BAAC,gBAAD;IAAS,OAAO,EAAE,CAAlB;IAAqB,UAAU,EAAC,MAAhC;IAAuC,WAAW,EAAC;EAAnD,GACGD,OAAO,CAACE,GAAR,CAAYC,IAAI,IACf,6BAAC,cAAD,CAAO,QAAP;IAAgB,GAAG,EAAG,GAAEA,IAAI,CAACC,KAAM;EAAnC,GACE,6BAAC,2BAAD,QACGD,IAAI,CAACE,cAAL,IACC,6BAAC,2BAAD,QAAsBF,IAAI,CAACE,cAA3B,CAFJ,EAIE,6BAAC,eAAD;IAAM,UAAU,EAAC;EAAjB,GAAyBF,IAAI,CAACC,KAA9B,CAJF,CADF,EAOE,6BAAC,4BAAD,QACGD,IAAI,CAACG,KAAL,CAAWJ,GAAX,CACC,CAAC;IACCE,KADD;IAECG,SAFD;IAGCC,KAHD;IAICC,eAJD;IAKCH;EALD,CAAD,KAOE,6BAAC,kBAAD;IACE,KAAK,EAAEA,KADT;IAEE,GAAG,EAAEF,KAFP;IAGE,KAAK,EAAEA,KAHT;IAIE,SAAS,EAAEG,SAJb;IAKE,eAAe,EAAEE,eALnB;IAME,KAAK,EAAED,KANT;IAOE,MAAM,EAAEP;EAPV,EARH,CADH,CAPF,CADD,CADH,CADF;AAmCD,CApCD;;eAsCeS,cAAA,CAAMC,IAAN,CAAWZ,SAAX,C"}
|
|
@@ -17,7 +17,7 @@ var _styled2 = require("./styled");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
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
21
|
|
|
22
22
|
const MenuItem = ({
|
|
23
23
|
title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"MenuItem.js","names":["MenuItem","title","Component","props","rightComponents","items","toggle","open","setOpen","React","useState","noTextDecoration","textDecoration","getIconName","handleMenuAction","map","subItem"],"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.tsx"],"sourcesContent":["import React, { ElementType } from 'react';\nimport { Icon, Text } from '@tecsinapse/react-core';\nimport { SubMenuBlock } from './SubMenuBlock';\nimport { StyledRightComponent, StyledText } from '../styled';\nimport { StyledContainerItemText, StyledSubButton } from './styled';\nimport { ItemsOptions } from '../../types';\n\ninterface MenuItemProps {\n title: string;\n /** Wrapping component for element. This is used for navigation */\n Component: ElementType;\n /** Properties spread to wrapping Component */\n props: any;\n toggle: () => void;\n rightComponents?: React.ReactNode;\n items?: ItemsOptions[];\n}\n\nconst MenuItem: React.FC<MenuItemProps> = ({\n title,\n Component = 'a',\n props = {},\n rightComponents,\n items,\n toggle,\n}) => {\n const [open, setOpen] = React.useState<boolean>(false);\n\n const noTextDecoration = { textDecoration: 'none' };\n\n const getIconName = () =>\n open ? 'arrow-up-drop-circle-outline' : 'arrow-down-drop-circle-outline';\n\n const handleMenuAction = () => setOpen(!open);\n\n return (\n <>\n <StyledContainerItemText key={title}>\n <Component {...props} style={noTextDecoration} onClick={toggle}>\n <Text\n colorVariant={open ? 'primary' : 'secondary'}\n colorTone={open ? 'medium' : 'dark'}\n >\n <StyledText>{title}</StyledText>\n </Text>\n </Component>\n {rightComponents && !items && (\n <StyledRightComponent>{rightComponents}</StyledRightComponent>\n )}\n {items && (\n <StyledSubButton onClick={handleMenuAction}>\n <Icon\n name={getIconName()}\n type=\"material-community\"\n fontColor=\"orange\"\n />\n </StyledSubButton>\n )}\n </StyledContainerItemText>\n {open &&\n items?.map(subItem => (\n <SubMenuBlock key={subItem.title} data={subItem} toggle={toggle} />\n ))}\n </>\n );\n};\n\nexport default MenuItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAcA,MAAMA,QAAiC,GAAG,CAAC;EACzCC,KADyC;EAEzCC,SAAS,GAAG,GAF6B;EAGzCC,KAAK,GAAG,EAHiC;EAIzCC,eAJyC;EAKzCC,KALyC;EAMzCC;AANyC,CAAD,KAOpC;EACJ,MAAM,CAACC,IAAD,EAAOC,OAAP,IAAkBC,cAAA,CAAMC,QAAN,CAAwB,KAAxB,CAAxB;;EAEA,MAAMC,gBAAgB,GAAG;IAAEC,cAAc,EAAE;EAAlB,CAAzB;;EAEA,MAAMC,WAAW,GAAG,MAClBN,IAAI,GAAG,8BAAH,GAAoC,gCAD1C;;EAGA,MAAMO,gBAAgB,GAAG,MAAMN,OAAO,CAAC,CAACD,IAAF,CAAtC;;EAEA,OACE,4DACE,6BAAC,gCAAD;IAAyB,GAAG,EAAEN;EAA9B,GACE,6BAAC,SAAD,eAAeE,KAAf;IAAsB,KAAK,EAAEQ,gBAA7B;IAA+C,OAAO,EAAEL;EAAxD,IACE,6BAAC,eAAD;IACE,YAAY,EAAEC,IAAI,GAAG,SAAH,GAAe,WADnC;IAEE,SAAS,EAAEA,IAAI,GAAG,QAAH,GAAc;EAF/B,GAIE,6BAAC,kBAAD,QAAaN,KAAb,CAJF,CADF,CADF,EASGG,eAAe,IAAI,CAACC,KAApB,IACC,6BAAC,4BAAD,QAAuBD,eAAvB,CAVJ,EAYGC,KAAK,IACJ,6BAAC,wBAAD;IAAiB,OAAO,EAAES;EAA1B,GACE,6BAAC,eAAD;IACE,IAAI,EAAED,WAAW,EADnB;IAEE,IAAI,EAAC,oBAFP;IAGE,SAAS,EAAC;EAHZ,EADF,CAbJ,CADF,EAuBGN,IAAI,KACHF,KADG,aACHA,KADG,uBACHA,KAAK,CAAEU,GAAP,CAAWC,OAAO,IAChB,6BAAC,0BAAD;IAAc,GAAG,EAAEA,OAAO,CAACf,KAA3B;IAAkC,IAAI,EAAEe,OAAxC;IAAiD,MAAM,EAAEV;EAAzD,EADF,CADG,CAvBP,CADF;AA8BD,CA/CD;;eAiDeN,Q"}
|
|
@@ -15,7 +15,7 @@ var _styled2 = require("./styled");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
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); }
|
|
19
19
|
|
|
20
20
|
const SubMenuBlock = ({
|
|
21
21
|
data,
|