@tecsinapse/react-web-kit 1.20.0 → 1.20.1
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 +11 -0
- package/babel.config.esm.js +45 -0
- package/dist/components/molecules/Grid/Item/functions.js +3 -3
- package/dist/components/molecules/Grid/Item/functions.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/esm/components/atoms/Accordion/Accordion.d.ts +9 -0
- package/esm/components/atoms/Accordion/Accordion.js +87 -0
- package/esm/components/atoms/Accordion/Accordion.js.map +1 -0
- package/esm/components/atoms/Accordion/animations.d.ts +41 -0
- package/esm/components/atoms/Accordion/animations.js +52 -0
- package/esm/components/atoms/Accordion/animations.js.map +1 -0
- package/esm/components/atoms/Accordion/index.d.ts +1 -0
- package/esm/components/atoms/Accordion/index.js +2 -0
- package/esm/components/atoms/Accordion/index.js.map +1 -0
- package/esm/components/atoms/Accordion/styled.d.ts +8 -0
- package/esm/components/atoms/Accordion/styled.js +25 -0
- package/esm/components/atoms/Accordion/styled.js.map +1 -0
- package/esm/components/atoms/Badge/Badge.d.ts +8 -0
- package/esm/components/atoms/Badge/Badge.js +27 -0
- package/esm/components/atoms/Badge/Badge.js.map +1 -0
- package/esm/components/atoms/Badge/index.d.ts +1 -0
- package/esm/components/atoms/Badge/index.js +2 -0
- package/esm/components/atoms/Badge/index.js.map +1 -0
- package/esm/components/atoms/Button/Button.d.ts +10 -0
- package/esm/components/atoms/Button/Button.js +51 -0
- package/esm/components/atoms/Button/Button.js.map +1 -0
- package/esm/components/atoms/Button/hooks/useMouseHover.d.ts +5 -0
- package/esm/components/atoms/Button/hooks/useMouseHover.js +25 -0
- package/esm/components/atoms/Button/hooks/useMouseHover.js.map +1 -0
- package/esm/components/atoms/Button/hooks/useMousePressed.d.ts +5 -0
- package/esm/components/atoms/Button/hooks/useMousePressed.js +25 -0
- package/esm/components/atoms/Button/hooks/useMousePressed.js.map +1 -0
- package/esm/components/atoms/Button/index.d.ts +2 -0
- package/esm/components/atoms/Button/index.js +3 -0
- package/esm/components/atoms/Button/index.js.map +1 -0
- package/esm/components/atoms/Button/styled.d.ts +4 -0
- package/esm/components/atoms/Button/styled.js +27 -0
- package/esm/components/atoms/Button/styled.js.map +1 -0
- package/esm/components/atoms/Dropdown/index.d.ts +9 -0
- package/esm/components/atoms/Dropdown/index.js +27 -0
- package/esm/components/atoms/Dropdown/index.js.map +1 -0
- package/esm/components/atoms/Dropdown/styled.d.ts +2 -0
- package/esm/components/atoms/Dropdown/styled.js +23 -0
- package/esm/components/atoms/Dropdown/styled.js.map +1 -0
- package/esm/components/atoms/Input/Input.d.ts +7 -0
- package/esm/components/atoms/Input/Input.js +76 -0
- package/esm/components/atoms/Input/Input.js.map +1 -0
- package/esm/components/atoms/Input/index.d.ts +1 -0
- package/esm/components/atoms/Input/index.js +2 -0
- package/esm/components/atoms/Input/index.js.map +1 -0
- package/esm/components/atoms/Input/styled.d.ts +4 -0
- package/esm/components/atoms/Input/styled.js +8 -0
- package/esm/components/atoms/Input/styled.js.map +1 -0
- package/esm/components/atoms/InputMask/InputMask.d.ts +7 -0
- package/esm/components/atoms/InputMask/InputMask.js +76 -0
- package/esm/components/atoms/InputMask/InputMask.js.map +1 -0
- package/esm/components/atoms/InputMask/index.d.ts +1 -0
- package/esm/components/atoms/InputMask/index.js +2 -0
- package/esm/components/atoms/InputMask/index.js.map +1 -0
- package/esm/components/atoms/InputMask/styled.d.ts +4 -0
- package/esm/components/atoms/InputMask/styled.js +8 -0
- package/esm/components/atoms/InputMask/styled.js.map +1 -0
- package/esm/components/atoms/Modal/Modal.d.ts +7 -0
- package/esm/components/atoms/Modal/Modal.js +35 -0
- package/esm/components/atoms/Modal/Modal.js.map +1 -0
- package/esm/components/atoms/Modal/animations.d.ts +23 -0
- package/esm/components/atoms/Modal/animations.js +24 -0
- package/esm/components/atoms/Modal/animations.js.map +1 -0
- package/esm/components/atoms/Modal/index.d.ts +1 -0
- package/esm/components/atoms/Modal/index.js +2 -0
- package/esm/components/atoms/Modal/index.js.map +1 -0
- package/esm/components/atoms/Modal/styled.d.ts +2 -0
- package/esm/components/atoms/Modal/styled.js +23 -0
- package/esm/components/atoms/Modal/styled.js.map +1 -0
- package/esm/components/atoms/Overlay/Overlay.d.ts +10 -0
- package/esm/components/atoms/Overlay/Overlay.js +30 -0
- package/esm/components/atoms/Overlay/Overlay.js.map +1 -0
- package/esm/components/atoms/Overlay/animations.d.ts +23 -0
- package/esm/components/atoms/Overlay/animations.js +24 -0
- package/esm/components/atoms/Overlay/animations.js.map +1 -0
- package/esm/components/atoms/Overlay/index.d.ts +1 -0
- package/esm/components/atoms/Overlay/index.js +2 -0
- package/esm/components/atoms/Overlay/index.js.map +1 -0
- package/esm/components/atoms/Overlay/styled.d.ts +2 -0
- package/esm/components/atoms/Overlay/styled.js +18 -0
- package/esm/components/atoms/Overlay/styled.js.map +1 -0
- package/esm/components/atoms/Skeleton/Skeleton.d.ts +11 -0
- package/esm/components/atoms/Skeleton/Skeleton.js +41 -0
- package/esm/components/atoms/Skeleton/Skeleton.js.map +1 -0
- package/esm/components/atoms/Skeleton/index.d.ts +1 -0
- package/esm/components/atoms/Skeleton/index.js +2 -0
- package/esm/components/atoms/Skeleton/index.js.map +1 -0
- package/esm/components/atoms/Skeleton/styled.d.ts +5 -0
- package/esm/components/atoms/Skeleton/styled.js +35 -0
- package/esm/components/atoms/Skeleton/styled.js.map +1 -0
- package/esm/components/atoms/Table/Body/TBody.d.ts +3 -0
- package/esm/components/atoms/Table/Body/TBody.js +13 -0
- package/esm/components/atoms/Table/Body/TBody.js.map +1 -0
- package/esm/components/atoms/Table/Body/index.d.ts +1 -0
- package/esm/components/atoms/Table/Body/index.js +2 -0
- package/esm/components/atoms/Table/Body/index.js.map +1 -0
- package/esm/components/atoms/Table/Cell/Td.d.ts +3 -0
- package/esm/components/atoms/Table/Cell/Td.js +16 -0
- package/esm/components/atoms/Table/Cell/Td.js.map +1 -0
- package/esm/components/atoms/Table/Cell/index.d.ts +1 -0
- package/esm/components/atoms/Table/Cell/index.js +2 -0
- package/esm/components/atoms/Table/Cell/index.js.map +1 -0
- package/esm/components/atoms/Table/Cell/styled.d.ts +2 -0
- package/esm/components/atoms/Table/Cell/styled.js +25 -0
- package/esm/components/atoms/Table/Cell/styled.js.map +1 -0
- package/esm/components/atoms/Table/Container/TableContainer.d.ts +3 -0
- package/esm/components/atoms/Table/Container/TableContainer.js +16 -0
- package/esm/components/atoms/Table/Container/TableContainer.js.map +1 -0
- package/esm/components/atoms/Table/Container/index.d.ts +1 -0
- package/esm/components/atoms/Table/Container/index.js +2 -0
- package/esm/components/atoms/Table/Container/index.js.map +1 -0
- package/esm/components/atoms/Table/Container/styled.d.ts +2 -0
- package/esm/components/atoms/Table/Container/styled.js +20 -0
- package/esm/components/atoms/Table/Container/styled.js.map +1 -0
- package/esm/components/atoms/Table/Footer/TFoot.d.ts +3 -0
- package/esm/components/atoms/Table/Footer/TFoot.js +14 -0
- package/esm/components/atoms/Table/Footer/TFoot.js.map +1 -0
- package/esm/components/atoms/Table/Footer/index.d.ts +1 -0
- package/esm/components/atoms/Table/Footer/index.js +2 -0
- package/esm/components/atoms/Table/Footer/index.js.map +1 -0
- package/esm/components/atoms/Table/Footer/styled.d.ts +5 -0
- package/esm/components/atoms/Table/Footer/styled.js +7 -0
- package/esm/components/atoms/Table/Footer/styled.js.map +1 -0
- package/esm/components/atoms/Table/Header/THead.d.ts +3 -0
- package/esm/components/atoms/Table/Header/THead.js +19 -0
- package/esm/components/atoms/Table/Header/THead.js.map +1 -0
- package/esm/components/atoms/Table/Header/Th.d.ts +3 -0
- package/esm/components/atoms/Table/Header/Th.js +14 -0
- package/esm/components/atoms/Table/Header/Th.js.map +1 -0
- package/esm/components/atoms/Table/Header/index.d.ts +2 -0
- package/esm/components/atoms/Table/Header/index.js +3 -0
- package/esm/components/atoms/Table/Header/index.js.map +1 -0
- package/esm/components/atoms/Table/Header/styled.d.ts +4 -0
- package/esm/components/atoms/Table/Header/styled.js +30 -0
- package/esm/components/atoms/Table/Header/styled.js.map +1 -0
- package/esm/components/atoms/Table/Row/Tr.d.ts +3 -0
- package/esm/components/atoms/Table/Row/Tr.js +14 -0
- package/esm/components/atoms/Table/Row/Tr.js.map +1 -0
- package/esm/components/atoms/Table/Row/index.d.ts +1 -0
- package/esm/components/atoms/Table/Row/index.js +2 -0
- package/esm/components/atoms/Table/Row/index.js.map +1 -0
- package/esm/components/atoms/Table/Row/styled.d.ts +2 -0
- package/esm/components/atoms/Table/Row/styled.js +14 -0
- package/esm/components/atoms/Table/Row/styled.js.map +1 -0
- package/esm/components/atoms/Table/Table.d.ts +3 -0
- package/esm/components/atoms/Table/Table.js +14 -0
- package/esm/components/atoms/Table/Table.js.map +1 -0
- package/esm/components/atoms/Table/Toolbar/TableToolbar.d.ts +8 -0
- package/esm/components/atoms/Table/Toolbar/TableToolbar.js +22 -0
- package/esm/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -0
- package/esm/components/atoms/Table/Toolbar/index.d.ts +1 -0
- package/esm/components/atoms/Table/Toolbar/index.js +2 -0
- package/esm/components/atoms/Table/Toolbar/index.js.map +1 -0
- package/esm/components/atoms/Table/Toolbar/styled.d.ts +5 -0
- package/esm/components/atoms/Table/Toolbar/styled.js +7 -0
- package/esm/components/atoms/Table/Toolbar/styled.js.map +1 -0
- package/esm/components/atoms/Table/index.d.ts +8 -0
- package/esm/components/atoms/Table/index.js +9 -0
- package/esm/components/atoms/Table/index.js.map +1 -0
- package/esm/components/atoms/Table/styled.d.ts +2 -0
- package/esm/components/atoms/Table/styled.js +10 -0
- package/esm/components/atoms/Table/styled.js.map +1 -0
- package/esm/components/atoms/Tag/Tag.d.ts +8 -0
- package/esm/components/atoms/Tag/Tag.js +37 -0
- package/esm/components/atoms/Tag/Tag.js.map +1 -0
- package/esm/components/atoms/Tag/index.d.ts +1 -0
- package/esm/components/atoms/Tag/index.js +2 -0
- package/esm/components/atoms/Tag/index.js.map +1 -0
- package/esm/components/atoms/Tooltip/Tooltip.d.ts +13 -0
- package/esm/components/atoms/Tooltip/Tooltip.js +41 -0
- package/esm/components/atoms/Tooltip/Tooltip.js.map +1 -0
- package/esm/components/atoms/Tooltip/index.d.ts +1 -0
- package/esm/components/atoms/Tooltip/index.js +2 -0
- package/esm/components/atoms/Tooltip/index.js.map +1 -0
- package/esm/components/atoms/Tooltip/styled.d.ts +9 -0
- package/esm/components/atoms/Tooltip/styled.js +73 -0
- package/esm/components/atoms/Tooltip/styled.js.map +1 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts +9 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +29 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js.map +1 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/index.d.ts +2 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/index.js +3 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/index.js.map +1 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.d.ts +3 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +14 -0
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -0
- package/esm/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +29 -0
- package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/esm/components/molecules/Breadcrumbs/index.d.ts +1 -0
- package/esm/components/molecules/Breadcrumbs/index.js +2 -0
- package/esm/components/molecules/Breadcrumbs/index.js.map +1 -0
- package/esm/components/molecules/Breadcrumbs/styled.d.ts +2 -0
- package/esm/components/molecules/Breadcrumbs/styled.js +20 -0
- package/esm/components/molecules/Breadcrumbs/styled.js.map +1 -0
- package/esm/components/molecules/DatePicker/DatePicker.d.ts +3 -0
- package/esm/components/molecules/DatePicker/DatePicker.js +63 -0
- package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
- package/esm/components/molecules/DatePicker/Modal.d.ts +3 -0
- package/esm/components/molecules/DatePicker/Modal.js +30 -0
- package/esm/components/molecules/DatePicker/Modal.js.map +1 -0
- package/esm/components/molecules/DatePicker/index.d.ts +1 -0
- package/esm/components/molecules/DatePicker/index.js +2 -0
- package/esm/components/molecules/DatePicker/index.js.map +1 -0
- package/esm/components/molecules/DatePicker/styled.d.ts +7 -0
- package/esm/components/molecules/DatePicker/styled.js +17 -0
- package/esm/components/molecules/DatePicker/styled.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +4 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js +30 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/Modal.d.ts +2 -0
- package/esm/components/molecules/DateTimePicker/Modal.js +29 -0
- package/esm/components/molecules/DateTimePicker/Modal.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/index.d.ts +1 -0
- package/esm/components/molecules/DateTimePicker/index.js +2 -0
- package/esm/components/molecules/DateTimePicker/index.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/styled.d.ts +7 -0
- package/esm/components/molecules/DateTimePicker/styled.js +14 -0
- package/esm/components/molecules/DateTimePicker/styled.js.map +1 -0
- package/esm/components/molecules/Drawer/Drawer.d.ts +9 -0
- package/esm/components/molecules/Drawer/Drawer.js +54 -0
- package/esm/components/molecules/Drawer/Drawer.js.map +1 -0
- package/esm/components/molecules/Drawer/animations.d.ts +35 -0
- package/esm/components/molecules/Drawer/animations.js +57 -0
- package/esm/components/molecules/Drawer/animations.js.map +1 -0
- package/esm/components/molecules/Drawer/index.d.ts +1 -0
- package/esm/components/molecules/Drawer/index.js +2 -0
- package/esm/components/molecules/Drawer/index.js.map +1 -0
- package/esm/components/molecules/Drawer/styled.d.ts +2 -0
- package/esm/components/molecules/Drawer/styled.js +41 -0
- package/esm/components/molecules/Drawer/styled.js.map +1 -0
- package/esm/components/molecules/Grid/Grid.d.ts +5 -0
- package/esm/components/molecules/Grid/Grid.js +55 -0
- package/esm/components/molecules/Grid/Grid.js.map +1 -0
- package/esm/components/molecules/Grid/Item/Item.d.ts +9 -0
- package/esm/components/molecules/Grid/Item/Item.js +79 -0
- package/esm/components/molecules/Grid/Item/Item.js.map +1 -0
- package/esm/components/molecules/Grid/Item/functions.d.ts +2 -0
- package/esm/components/molecules/Grid/Item/functions.js +9 -0
- package/esm/components/molecules/Grid/Item/functions.js.map +1 -0
- package/esm/components/molecules/Grid/Item/index.d.ts +2 -0
- package/esm/components/molecules/Grid/Item/index.js +2 -0
- package/esm/components/molecules/Grid/Item/index.js.map +1 -0
- package/esm/components/molecules/Grid/index.d.ts +4 -0
- package/esm/components/molecules/Grid/index.js +3 -0
- package/esm/components/molecules/Grid/index.js.map +1 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +6 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js +65 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/esm/components/molecules/IconTextButton/TextComponent.d.ts +12 -0
- package/esm/components/molecules/IconTextButton/TextComponent.js +22 -0
- package/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -0
- package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.d.ts +6 -0
- package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js +28 -0
- package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js.map +1 -0
- package/esm/components/molecules/IconTextButton/index.d.ts +1 -0
- package/esm/components/molecules/IconTextButton/index.js +2 -0
- package/esm/components/molecules/IconTextButton/index.js.map +1 -0
- package/esm/components/molecules/IconTextButton/styled.d.ts +1 -0
- package/esm/components/molecules/IconTextButton/styled.js +23 -0
- package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
- package/esm/components/molecules/InputPassword/InputPassword.d.ts +5 -0
- package/esm/components/molecules/InputPassword/InputPassword.js +30 -0
- package/esm/components/molecules/InputPassword/InputPassword.js.map +1 -0
- package/esm/components/molecules/InputPassword/index.d.ts +1 -0
- package/esm/components/molecules/InputPassword/index.js +2 -0
- package/esm/components/molecules/InputPassword/index.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/LabelComponent.d.ts +12 -0
- package/esm/components/molecules/LabeledSwitch/LabelComponent.js +32 -0
- package/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +52 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/esm/components/molecules/LabeledSwitch/index.js +2 -0
- package/esm/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/styled.d.ts +8 -0
- package/esm/components/molecules/LabeledSwitch/styled.js +14 -0
- package/esm/components/molecules/LabeledSwitch/styled.js.map +1 -0
- package/esm/components/molecules/Masonry/Masonry.d.ts +9 -0
- package/esm/components/molecules/Masonry/Masonry.js +48 -0
- package/esm/components/molecules/Masonry/Masonry.js.map +1 -0
- package/esm/components/molecules/Masonry/index.d.ts +1 -0
- package/esm/components/molecules/Masonry/index.js +2 -0
- package/esm/components/molecules/Masonry/index.js.map +1 -0
- package/esm/components/molecules/Masonry/styled.d.ts +7 -0
- package/esm/components/molecules/Masonry/styled.js +21 -0
- package/esm/components/molecules/Masonry/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.d.ts +8 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +39 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.d.ts +12 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +59 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.d.ts +8 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +29 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/index.d.ts +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/index.js +2 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/index.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.d.ts +3 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +17 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/index.d.ts +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/index.js +2 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/index.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.d.ts +3 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +17 -0
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/index.d.ts +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/index.js +2 -0
- package/esm/components/molecules/Menubar/MenuBlock/index.js.map +1 -0
- package/esm/components/molecules/Menubar/MenuBlock/styled.d.ts +6 -0
- package/esm/components/molecules/Menubar/MenuBlock/styled.js +27 -0
- package/esm/components/molecules/Menubar/MenuBlock/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/Menubar.d.ts +14 -0
- package/esm/components/molecules/Menubar/Menubar.js +120 -0
- package/esm/components/molecules/Menubar/Menubar.js.map +1 -0
- package/esm/components/molecules/Menubar/MostUsed/MostUsed.d.ts +9 -0
- package/esm/components/molecules/Menubar/MostUsed/MostUsed.js +42 -0
- package/esm/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -0
- package/esm/components/molecules/Menubar/MostUsed/index.d.ts +1 -0
- package/esm/components/molecules/Menubar/MostUsed/index.js +2 -0
- package/esm/components/molecules/Menubar/MostUsed/index.js.map +1 -0
- package/esm/components/molecules/Menubar/MostUsed/styled.d.ts +5 -0
- package/esm/components/molecules/Menubar/MostUsed/styled.js +31 -0
- package/esm/components/molecules/Menubar/MostUsed/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/SearchResultItem/SearchResultItem.d.ts +9 -0
- package/esm/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +39 -0
- package/esm/components/molecules/Menubar/SearchResultItem/SearchResultItem.js.map +1 -0
- package/esm/components/molecules/Menubar/SearchResultItem/index.d.ts +1 -0
- package/esm/components/molecules/Menubar/SearchResultItem/index.js +2 -0
- package/esm/components/molecules/Menubar/SearchResultItem/index.js.map +1 -0
- package/esm/components/molecules/Menubar/SearchResultItem/styled.d.ts +5 -0
- package/esm/components/molecules/Menubar/SearchResultItem/styled.js +19 -0
- package/esm/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/SearchResultItem/utils.d.ts +3 -0
- package/esm/components/molecules/Menubar/SearchResultItem/utils.js +56 -0
- package/esm/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -0
- package/esm/components/molecules/Menubar/animations.d.ts +4 -0
- package/esm/components/molecules/Menubar/animations.js +53 -0
- package/esm/components/molecules/Menubar/animations.js.map +1 -0
- package/esm/components/molecules/Menubar/index.d.ts +3 -0
- package/esm/components/molecules/Menubar/index.js +4 -0
- package/esm/components/molecules/Menubar/index.js.map +1 -0
- package/esm/components/molecules/Menubar/styled.d.ts +15 -0
- package/esm/components/molecules/Menubar/styled.js +81 -0
- package/esm/components/molecules/Menubar/styled.js.map +1 -0
- package/esm/components/molecules/Menubar/types.d.ts +19 -0
- package/esm/components/molecules/Menubar/types.js +2 -0
- package/esm/components/molecules/Menubar/types.js.map +1 -0
- package/esm/components/molecules/Menubar/utils.d.ts +2 -0
- package/esm/components/molecules/Menubar/utils.js +30 -0
- package/esm/components/molecules/Menubar/utils.js.map +1 -0
- package/esm/components/molecules/Select/Dropdown/Dropdown.d.ts +5 -0
- package/esm/components/molecules/Select/Dropdown/Dropdown.js +99 -0
- package/esm/components/molecules/Select/Dropdown/Dropdown.js.map +1 -0
- package/esm/components/molecules/Select/Dropdown/components/SearchInput.d.ts +8 -0
- package/esm/components/molecules/Select/Dropdown/components/SearchInput.js +28 -0
- package/esm/components/molecules/Select/Dropdown/components/SearchInput.js.map +1 -0
- package/esm/components/molecules/Select/Dropdown/components/index.d.ts +1 -0
- package/esm/components/molecules/Select/Dropdown/components/index.js +2 -0
- package/esm/components/molecules/Select/Dropdown/components/index.js.map +1 -0
- package/esm/components/molecules/Select/Dropdown/index.d.ts +1 -0
- package/esm/components/molecules/Select/Dropdown/index.js +2 -0
- package/esm/components/molecules/Select/Dropdown/index.js.map +1 -0
- package/esm/components/molecules/Select/Dropdown/styled.d.ts +14 -0
- package/esm/components/molecules/Select/Dropdown/styled.js +81 -0
- package/esm/components/molecules/Select/Dropdown/styled.js.map +1 -0
- package/esm/components/molecules/Select/Select.d.ts +21 -0
- package/esm/components/molecules/Select/Select.js +89 -0
- package/esm/components/molecules/Select/Select.js.map +1 -0
- package/esm/components/molecules/Select/SelectItem/SelectItem.d.ts +16 -0
- package/esm/components/molecules/Select/SelectItem/SelectItem.js +79 -0
- package/esm/components/molecules/Select/SelectItem/SelectItem.js.map +1 -0
- package/esm/components/molecules/Select/SelectItem/index.d.ts +1 -0
- package/esm/components/molecules/Select/SelectItem/index.js +2 -0
- package/esm/components/molecules/Select/SelectItem/index.js.map +1 -0
- package/esm/components/molecules/Select/SelectItem/styled.d.ts +4 -0
- package/esm/components/molecules/Select/SelectItem/styled.js +28 -0
- package/esm/components/molecules/Select/SelectItem/styled.js.map +1 -0
- package/esm/components/molecules/Select/animations.d.ts +51 -0
- package/esm/components/molecules/Select/animations.js +52 -0
- package/esm/components/molecules/Select/animations.js.map +1 -0
- package/esm/components/molecules/Select/functions.d.ts +1 -0
- package/esm/components/molecules/Select/functions.js +16 -0
- package/esm/components/molecules/Select/functions.js.map +1 -0
- package/esm/components/molecules/Select/index.d.ts +1 -0
- package/esm/components/molecules/Select/index.js +2 -0
- package/esm/components/molecules/Select/index.js.map +1 -0
- package/esm/components/molecules/Select/styled.d.ts +4 -0
- package/esm/components/molecules/Select/styled.js +18 -0
- package/esm/components/molecules/Select/styled.js.map +1 -0
- package/esm/components/molecules/Snackbar/Snackbar.d.ts +8 -0
- package/esm/components/molecules/Snackbar/Snackbar.js +25 -0
- package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
- package/esm/components/molecules/Snackbar/index.d.ts +1 -0
- package/esm/components/molecules/Snackbar/index.js +2 -0
- package/esm/components/molecules/Snackbar/index.js.map +1 -0
- package/esm/components/molecules/Snackbar/styled.d.ts +4 -0
- package/esm/components/molecules/Snackbar/styled.js +25 -0
- package/esm/components/molecules/Snackbar/styled.js.map +1 -0
- package/esm/components/molecules/TextArea/TextArea.d.ts +5 -0
- package/esm/components/molecules/TextArea/TextArea.js +82 -0
- package/esm/components/molecules/TextArea/TextArea.js.map +1 -0
- package/esm/components/molecules/TextArea/index.d.ts +1 -0
- package/esm/components/molecules/TextArea/index.js +2 -0
- package/esm/components/molecules/TextArea/index.js.map +1 -0
- package/esm/components/molecules/TextArea/styled.d.ts +4 -0
- package/esm/components/molecules/TextArea/styled.js +18 -0
- package/esm/components/molecules/TextArea/styled.js.map +1 -0
- package/esm/components/organisms/DataGrid/DataGrid.d.ts +29 -0
- package/esm/components/organisms/DataGrid/DataGrid.js +130 -0
- package/esm/components/organisms/DataGrid/DataGrid.js.map +1 -0
- package/esm/components/organisms/DataGrid/Footer/Footer.d.ts +16 -0
- package/esm/components/organisms/DataGrid/Footer/Footer.js +116 -0
- package/esm/components/organisms/DataGrid/Footer/Footer.js.map +1 -0
- package/esm/components/organisms/DataGrid/Footer/index.d.ts +1 -0
- package/esm/components/organisms/DataGrid/Footer/index.js +2 -0
- package/esm/components/organisms/DataGrid/Footer/index.js.map +1 -0
- package/esm/components/organisms/DataGrid/Footer/styled.d.ts +38 -0
- package/esm/components/organisms/DataGrid/Footer/styled.js +57 -0
- package/esm/components/organisms/DataGrid/Footer/styled.js.map +1 -0
- package/esm/components/organisms/DataGrid/Header/Header.d.ts +12 -0
- package/esm/components/organisms/DataGrid/Header/Header.js +80 -0
- package/esm/components/organisms/DataGrid/Header/Header.js.map +1 -0
- package/esm/components/organisms/DataGrid/Header/index.d.ts +1 -0
- package/esm/components/organisms/DataGrid/Header/index.js +2 -0
- package/esm/components/organisms/DataGrid/Header/index.js.map +1 -0
- package/esm/components/organisms/DataGrid/Header/styled.d.ts +1 -0
- package/esm/components/organisms/DataGrid/Header/styled.js +11 -0
- package/esm/components/organisms/DataGrid/Header/styled.js.map +1 -0
- package/esm/components/organisms/DataGrid/Header/utils.d.ts +8 -0
- package/esm/components/organisms/DataGrid/Header/utils.js +27 -0
- package/esm/components/organisms/DataGrid/Header/utils.js.map +1 -0
- package/esm/components/organisms/DataGrid/Row/Row.d.ts +10 -0
- package/esm/components/organisms/DataGrid/Row/Row.js +30 -0
- package/esm/components/organisms/DataGrid/Row/Row.js.map +1 -0
- package/esm/components/organisms/DataGrid/Row/index.d.ts +1 -0
- package/esm/components/organisms/DataGrid/Row/index.js +2 -0
- package/esm/components/organisms/DataGrid/Row/index.js.map +1 -0
- package/esm/components/organisms/DataGrid/index.d.ts +2 -0
- package/esm/components/organisms/DataGrid/index.js +3 -0
- package/esm/components/organisms/DataGrid/index.js.map +1 -0
- package/esm/components/organisms/DataGrid/styled.d.ts +1 -0
- package/esm/components/organisms/DataGrid/styled.js +11 -0
- package/esm/components/organisms/DataGrid/styled.js.map +1 -0
- package/esm/components/organisms/DataGrid/types.d.ts +8 -0
- package/esm/components/organisms/DataGrid/types.js +2 -0
- package/esm/components/organisms/DataGrid/types.js.map +1 -0
- package/esm/components/organisms/DataGrid/utils.d.ts +2 -0
- package/esm/components/organisms/DataGrid/utils.js +9 -0
- package/esm/components/organisms/DataGrid/utils.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.js +4 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/useBreakpoints.d.ts +6 -0
- package/esm/hooks/useBreakpoints.js +16 -0
- package/esm/hooks/useBreakpoints.js.map +1 -0
- package/esm/hooks/useClickAwayListener.d.ts +2 -0
- package/esm/hooks/useClickAwayListener.js +20 -0
- package/esm/hooks/useClickAwayListener.js.map +1 -0
- package/esm/hooks/useWindowSize.d.ts +6 -0
- package/esm/hooks/useWindowSize.js +26 -0
- package/esm/hooks/useWindowSize.js.map +1 -0
- package/esm/index.d.ts +24 -0
- package/esm/index.js +25 -0
- package/esm/index.js.map +1 -0
- package/package.json +9 -4
- package/src/components/molecules/Grid/Item/functions.ts +3 -3
- package/src/index.ts +1 -0
- package/tsconfig.build.esm.json +10 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var _excluded = ["value", "type"];
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import { Calendar, DatePicker as DatePickerCore } from '@tecsinapse/react-core';
|
|
8
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
9
|
+
import { Dropdown } from "../../atoms/Dropdown";
|
|
10
|
+
export var DatePicker = function DatePicker(_ref) {
|
|
11
|
+
var value = _ref.value,
|
|
12
|
+
type = _ref.type,
|
|
13
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
|
+
|
|
15
|
+
var _useState = useState(false),
|
|
16
|
+
visible = _useState[0],
|
|
17
|
+
setVisible = _useState[1];
|
|
18
|
+
|
|
19
|
+
var show = useCallback(function () {
|
|
20
|
+
return setVisible(true);
|
|
21
|
+
}, []);
|
|
22
|
+
var close = useCallback(function () {
|
|
23
|
+
return setVisible(false);
|
|
24
|
+
}, []);
|
|
25
|
+
var getYear = useMemo(function () {
|
|
26
|
+
if (value) {
|
|
27
|
+
if (type === 'range') {
|
|
28
|
+
if (value.lowest !== undefined) return new Date(value.lowest).getFullYear();
|
|
29
|
+
} else {
|
|
30
|
+
return new Date(value).getFullYear();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return undefined;
|
|
35
|
+
}, [value]);
|
|
36
|
+
var getMonth = useMemo(function () {
|
|
37
|
+
if (value) {
|
|
38
|
+
if (type === 'range') {
|
|
39
|
+
if (value.lowest !== undefined) return new Date(value.lowest).getMonth();
|
|
40
|
+
} else {
|
|
41
|
+
return new Date(value).getMonth();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return undefined;
|
|
46
|
+
}, [value]);
|
|
47
|
+
return React.createElement(DatePickerCore, _extends({}, rest, {
|
|
48
|
+
CalendarComponent: Calendar,
|
|
49
|
+
value: value,
|
|
50
|
+
type: type,
|
|
51
|
+
year: getYear,
|
|
52
|
+
month: getMonth,
|
|
53
|
+
requestShowCalendar: show,
|
|
54
|
+
requestCloseCalendar: close,
|
|
55
|
+
renderCalendar: function renderCalendar(calendar) {
|
|
56
|
+
return React.createElement(Dropdown, {
|
|
57
|
+
visible: visible,
|
|
58
|
+
setVisible: setVisible
|
|
59
|
+
}, calendar);
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","names":["Calendar","DatePicker","DatePickerCore","React","useCallback","useMemo","useState","Dropdown","value","type","rest","visible","setVisible","show","close","getYear","lowest","undefined","Date","getFullYear","getMonth","calendar"],"sources":["../../../../src/components/molecules/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n Calendar,\n DatePicker as DatePickerCore,\n DatePickerProps,\n DateRange,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { Dropdown } from '../../atoms/Dropdown';\n\nexport type WebDatePickerProps<T extends SelectionType> = Omit<\n DatePickerProps<T>,\n | 'CalendarComponent'\n | 'renderCalendar'\n | 'requestCloseCalendar'\n | 'requestShowCalendar'\n>;\n\nexport const DatePicker = <T extends SelectionType>({\n value,\n type,\n ...rest\n}: WebDatePickerProps<T>): JSX.Element => {\n const [visible, setVisible] = useState(false);\n const show = useCallback(() => setVisible(true), []);\n const close = useCallback(() => setVisible(false), []);\n\n const getYear = useMemo(() => {\n if (value) {\n if (type === 'range') {\n if ((value as DateRange).lowest !== undefined)\n return new Date((value as DateRange).lowest).getFullYear();\n } else {\n return new Date(value as Date).getFullYear();\n }\n }\n return undefined;\n }, [value]);\n\n const getMonth = useMemo(() => {\n if (value) {\n if (type === 'range') {\n if ((value as DateRange).lowest !== undefined)\n return new Date((value as DateRange).lowest).getMonth();\n } else {\n return new Date(value as Date).getMonth();\n }\n }\n return undefined;\n }, [value]);\n\n return (\n <DatePickerCore\n {...rest}\n CalendarComponent={Calendar}\n value={value}\n type={type}\n year={getYear}\n month={getMonth}\n requestShowCalendar={show}\n requestCloseCalendar={close}\n renderCalendar={calendar => (\n <Dropdown visible={visible} setVisible={setVisible}>\n {calendar}\n </Dropdown>\n )}\n />\n );\n};\n"],"mappings":";;;;;;AAAA,SACEA,QADF,EAEEC,UAAU,IAAIC,cAFhB,QAMO,wBANP;AAOA,OAAOC,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,EAAsCC,QAAtC,QAAsD,OAAtD;AACA,SAASC,QAAT;AAUA,OAAO,IAAMN,UAAU,GAAG,SAAbA,UAAa,OAIgB;EAAA,IAHxCO,KAGwC,QAHxCA,KAGwC;EAAA,IAFxCC,IAEwC,QAFxCA,IAEwC;EAAA,IADrCC,IACqC;;EACxC,gBAA8BJ,QAAQ,CAAC,KAAD,CAAtC;EAAA,IAAOK,OAAP;EAAA,IAAgBC,UAAhB;;EACA,IAAMC,IAAI,GAAGT,WAAW,CAAC;IAAA,OAAMQ,UAAU,CAAC,IAAD,CAAhB;EAAA,CAAD,EAAyB,EAAzB,CAAxB;EACA,IAAME,KAAK,GAAGV,WAAW,CAAC;IAAA,OAAMQ,UAAU,CAAC,KAAD,CAAhB;EAAA,CAAD,EAA0B,EAA1B,CAAzB;EAEA,IAAMG,OAAO,GAAGV,OAAO,CAAC,YAAM;IAC5B,IAAIG,KAAJ,EAAW;MACT,IAAIC,IAAI,KAAK,OAAb,EAAsB;QACpB,IAAKD,KAAD,CAAqBQ,MAArB,KAAgCC,SAApC,EACE,OAAO,IAAIC,IAAJ,CAAUV,KAAD,CAAqBQ,MAA9B,EAAsCG,WAAtC,EAAP;MACH,CAHD,MAGO;QACL,OAAO,IAAID,IAAJ,CAASV,KAAT,EAAwBW,WAAxB,EAAP;MACD;IACF;;IACD,OAAOF,SAAP;EACD,CAVsB,EAUpB,CAACT,KAAD,CAVoB,CAAvB;EAYA,IAAMY,QAAQ,GAAGf,OAAO,CAAC,YAAM;IAC7B,IAAIG,KAAJ,EAAW;MACT,IAAIC,IAAI,KAAK,OAAb,EAAsB;QACpB,IAAKD,KAAD,CAAqBQ,MAArB,KAAgCC,SAApC,EACE,OAAO,IAAIC,IAAJ,CAAUV,KAAD,CAAqBQ,MAA9B,EAAsCI,QAAtC,EAAP;MACH,CAHD,MAGO;QACL,OAAO,IAAIF,IAAJ,CAASV,KAAT,EAAwBY,QAAxB,EAAP;MACD;IACF;;IACD,OAAOH,SAAP;EACD,CAVuB,EAUrB,CAACT,KAAD,CAVqB,CAAxB;EAYA,OACE,oBAAC,cAAD,eACME,IADN;IAEE,iBAAiB,EAAEV,QAFrB;IAGE,KAAK,EAAEQ,KAHT;IAIE,IAAI,EAAEC,IAJR;IAKE,IAAI,EAAEM,OALR;IAME,KAAK,EAAEK,QANT;IAOE,mBAAmB,EAAEP,IAPvB;IAQE,oBAAoB,EAAEC,KARxB;IASE,cAAc,EAAE,wBAAAO,QAAQ;MAAA,OACtB,oBAAC,QAAD;QAAU,OAAO,EAAEV,OAAnB;QAA4B,UAAU,EAAEC;MAAxC,GACGS,QADH,CADsB;IAAA;EAT1B,GADF;AAiBD,CAlDM"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var _excluded = ["onRequestClose", "children"];
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import { PressableSurface } from '@tecsinapse/react-core';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { Modal as RNModal } from "react-native-web";
|
|
10
|
+
import { Backdrop, ModalContent } from "./styled";
|
|
11
|
+
|
|
12
|
+
var Component = function Component(_ref) {
|
|
13
|
+
var onRequestClose = _ref.onRequestClose,
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
modalProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
|
+
|
|
17
|
+
return React.createElement(RNModal, _extends({
|
|
18
|
+
transparent: true,
|
|
19
|
+
hardwareAccelerated: true,
|
|
20
|
+
statusBarTranslucent: true
|
|
21
|
+
}, modalProps, {
|
|
22
|
+
onRequestClose: onRequestClose
|
|
23
|
+
}), React.createElement(Backdrop, {
|
|
24
|
+
onPress: onRequestClose,
|
|
25
|
+
effect: "none"
|
|
26
|
+
}, React.createElement(PressableSurface, null, React.createElement(ModalContent, null, children))));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export var Modal = Component;
|
|
30
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["PressableSurface","React","Modal","RNModal","Backdrop","ModalContent","Component","onRequestClose","children","modalProps"],"sources":["../../../../src/components/molecules/DatePicker/Modal.tsx"],"sourcesContent":["import {\n CalendarProps,\n PressableSurface,\n SelectionType,\n} 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 = <T extends SelectionType>({\n onRequestClose,\n children,\n ...modalProps\n}: CalendarProps<T> & ModalProps & { children: JSX.Element }): JSX.Element => {\n return (\n <RNModal\n transparent\n hardwareAccelerated\n statusBarTranslucent\n {...modalProps}\n onRequestClose={onRequestClose}\n >\n <Backdrop onPress={onRequestClose} effect=\"none\">\n <PressableSurface>\n <ModalContent>{children}</ModalContent>\n </PressableSurface>\n </Backdrop>\n </RNModal>\n );\n};\n\nexport const Modal = Component;\n"],"mappings":";;;;;;AAAA,SAEEA,gBAFF,QAIO,wBAJP;AAKA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,KAAK,IAAIC,OAAlB;AACA,SAASC,QAAT,EAAmBC,YAAnB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,OAI4D;EAAA,IAH5EC,cAG4E,QAH5EA,cAG4E;EAAA,IAF5EC,QAE4E,QAF5EA,QAE4E;EAAA,IADzEC,UACyE;;EAC5E,OACE,oBAAC,OAAD;IACE,WAAW,MADb;IAEE,mBAAmB,MAFrB;IAGE,oBAAoB;EAHtB,GAIMA,UAJN;IAKE,cAAc,EAAEF;EALlB,IAOE,oBAAC,QAAD;IAAU,OAAO,EAAEA,cAAnB;IAAmC,MAAM,EAAC;EAA1C,GACE,oBAAC,gBAAD,QACE,oBAAC,YAAD,QAAeC,QAAf,CADF,CADF,CAPF,CADF;AAeD,CApBD;;AAsBA,OAAO,IAAMN,KAAK,GAAGI,SAAd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DatePicker, WebDatePickerProps } from './DatePicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["DatePicker","WebDatePickerProps"],"sources":["../../../../src/components/molecules/DatePicker/index.ts"],"sourcesContent":["export { DatePicker, WebDatePickerProps } from './DatePicker';\n"],"mappings":"AAAA,SAASA,UAAT,EAAqBC,kBAArB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Backdrop: import("@emotion/native").StyledComponent<any, {}, {
|
|
3
|
+
ref?: import("react").Ref<any> | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const ModalContent: import("@emotion/native").StyledComponent<any, {}, {
|
|
6
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
+
|
|
5
|
+
import styled, { css } from '@emotion/native';
|
|
6
|
+
import { hex2rgba, PressableSurface } from '@tecsinapse/react-core';
|
|
7
|
+
import { Platform } from "react-native-web";
|
|
8
|
+
var isWeb = Platform.OS === 'web';
|
|
9
|
+
export var Backdrop = styled(PressableSurface)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
10
|
+
var theme = _ref.theme;
|
|
11
|
+
return isWeb ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n justify-content: center;\n align-items: center;\n background-color: ", ";\n height: 100vh;\n "])), hex2rgba(theme.miscellaneous.overlay, 0.5)) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n justify-content: flex-end;\n background-color: ", ";\n height: 100%;\n "])), hex2rgba(theme.miscellaneous.overlay, 0.5));
|
|
12
|
+
});
|
|
13
|
+
export var ModalContent = styled.View(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n background-color: transparent;\n ", "\n overflow: hidden;\n"])), function (_ref2) {
|
|
14
|
+
var borderRadius = _ref2.theme.borderRadius;
|
|
15
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n ", "\n "])), isWeb ? "\n border-radius: " + borderRadius.micro + ";\n " : "\n border-top-left-radius: " + borderRadius.deca + ";\n border-top-right-radius: " + borderRadius.deca + ";\n ");
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","hex2rgba","PressableSurface","Platform","isWeb","OS","Backdrop","theme","miscellaneous","overlay","ModalContent","View","borderRadius","micro","deca"],"sources":["../../../../src/components/molecules/DatePicker/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { hex2rgba, PressableSurface, StyleProps } from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\n\nconst isWeb = Platform.OS === 'web';\n\nexport const Backdrop = styled(PressableSurface)<Partial<StyleProps>>`\n ${({ theme }) =>\n isWeb\n ? css`\n justify-content: center;\n align-items: center;\n background-color: ${hex2rgba(theme.miscellaneous.overlay, 0.5)};\n height: 100vh;\n `\n : css`\n justify-content: flex-end;\n background-color: ${hex2rgba(theme.miscellaneous.overlay, 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 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,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SAASC,QAAT,EAAmBC,gBAAnB,QAAuD,wBAAvD;AACA,SAASC,QAAT;AAEA,IAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAT,KAAgB,KAA9B;AAEA,OAAO,IAAMC,QAAQ,GAAGP,MAAM,CAACG,gBAAD,CAAT,qFACjB;EAAA,IAAGK,KAAH,QAAGA,KAAH;EAAA,OACAH,KAAK,GACDJ,GADC,wNAIqBC,QAAQ,CAACM,KAAK,CAACC,aAAN,CAAoBC,OAArB,EAA8B,GAA9B,CAJ7B,IAODT,GAPC,yLASqBC,QAAQ,CAACM,KAAK,CAACC,aAAN,CAAoBC,OAArB,EAA8B,GAA9B,CAT7B,CADL;AAAA,CADiB,CAAd;AAgBP,OAAO,IAAMC,YAAY,GAAGX,MAAM,CAACY,IAAV,8IAErB;EAAA,IAAYC,YAAZ,SAAGL,KAAH,CAAYK,YAAZ;EAAA,OAAiCZ,GAAjC,2FACEI,KAAK,+BAEYQ,YAAY,CAACC,KAFzB,oDAKqBD,YAAY,CAACE,IALlC,0CAMsBF,YAAY,CAACE,IANnC,YADP;AAAA,CAFqB,CAAlB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DateTimePickerProps } from '@tecsinapse/react-core';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export declare type WebDateTimePickerProps = Omit<DateTimePickerProps, 'renderSelector' | 'requestShowSelector' | 'requestCloseSelector'>;
|
|
4
|
+
export declare const DateTimePicker: FC<WebDateTimePickerProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import { DateTimePicker as DateTimePickerCore } from '@tecsinapse/react-core';
|
|
4
|
+
import React, { useCallback, useState } from 'react';
|
|
5
|
+
import { Dropdown } from "../../atoms/Dropdown";
|
|
6
|
+
export var DateTimePicker = function DateTimePicker(_ref) {
|
|
7
|
+
var rest = _extends({}, _ref);
|
|
8
|
+
|
|
9
|
+
var _useState = useState(false),
|
|
10
|
+
visible = _useState[0],
|
|
11
|
+
setVisible = _useState[1];
|
|
12
|
+
|
|
13
|
+
var show = useCallback(function () {
|
|
14
|
+
return setVisible(true);
|
|
15
|
+
}, []);
|
|
16
|
+
var close = useCallback(function () {
|
|
17
|
+
return setVisible(false);
|
|
18
|
+
}, []);
|
|
19
|
+
return React.createElement(DateTimePickerCore, _extends({}, rest, {
|
|
20
|
+
requestShowSelector: show,
|
|
21
|
+
requestCloseSelector: close,
|
|
22
|
+
renderSelector: function renderSelector(selector) {
|
|
23
|
+
return React.createElement(Dropdown, {
|
|
24
|
+
visible: visible,
|
|
25
|
+
setVisible: setVisible
|
|
26
|
+
}, selector);
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=DateTimePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.js","names":["DateTimePicker","DateTimePickerCore","React","useCallback","useState","Dropdown","rest","visible","setVisible","show","close","selector"],"sources":["../../../../src/components/molecules/DateTimePicker/DateTimePicker.tsx"],"sourcesContent":["import {\n DateTimePicker as DateTimePickerCore,\n DateTimePickerProps,\n} from '@tecsinapse/react-core';\nimport React, { FC, useCallback, useState } from 'react';\nimport { Dropdown } from '../../atoms/Dropdown';\n\nexport type WebDateTimePickerProps = Omit<\n DateTimePickerProps,\n 'renderSelector' | 'requestShowSelector' | 'requestCloseSelector'\n>;\n\nexport const DateTimePicker: FC<WebDateTimePickerProps> = ({ ...rest }) => {\n const [visible, setVisible] = useState<boolean>(false);\n\n const show = useCallback(() => setVisible(true), []);\n const close = useCallback(() => setVisible(false), []);\n\n return (\n <DateTimePickerCore\n {...rest}\n requestShowSelector={show}\n requestCloseSelector={close}\n renderSelector={selector => (\n <Dropdown visible={visible} setVisible={setVisible}>\n {selector}\n </Dropdown>\n )}\n />\n );\n};\n"],"mappings":";;AAAA,SACEA,cAAc,IAAIC,kBADpB,QAGO,wBAHP;AAIA,OAAOC,KAAP,IAAoBC,WAApB,EAAiCC,QAAjC,QAAiD,OAAjD;AACA,SAASC,QAAT;AAOA,OAAO,IAAML,cAA0C,GAAG,SAA7CA,cAA6C,OAAiB;EAAA,IAAXM,IAAW;;EACzE,gBAA8BF,QAAQ,CAAU,KAAV,CAAtC;EAAA,IAAOG,OAAP;EAAA,IAAgBC,UAAhB;;EAEA,IAAMC,IAAI,GAAGN,WAAW,CAAC;IAAA,OAAMK,UAAU,CAAC,IAAD,CAAhB;EAAA,CAAD,EAAyB,EAAzB,CAAxB;EACA,IAAME,KAAK,GAAGP,WAAW,CAAC;IAAA,OAAMK,UAAU,CAAC,KAAD,CAAhB;EAAA,CAAD,EAA0B,EAA1B,CAAzB;EAEA,OACE,oBAAC,kBAAD,eACMF,IADN;IAEE,mBAAmB,EAAEG,IAFvB;IAGE,oBAAoB,EAAEC,KAHxB;IAIE,cAAc,EAAE,wBAAAC,QAAQ;MAAA,OACtB,oBAAC,QAAD;QAAU,OAAO,EAAEJ,OAAnB;QAA4B,UAAU,EAAEC;MAAxC,GACGG,QADH,CADsB;IAAA;EAJ1B,GADF;AAYD,CAlBM"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var _excluded = ["onRequestClose", "children"];
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Modal as RNModal } from "react-native-web";
|
|
9
|
+
import { Backdrop, ModalContent } from "./styled";
|
|
10
|
+
|
|
11
|
+
var Component = function Component(_ref) {
|
|
12
|
+
var onRequestClose = _ref.onRequestClose,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
|
+
|
|
16
|
+
return React.createElement(RNModal, _extends({
|
|
17
|
+
transparent: true,
|
|
18
|
+
hardwareAccelerated: true,
|
|
19
|
+
statusBarTranslucent: true
|
|
20
|
+
}, rest, {
|
|
21
|
+
onRequestClose: onRequestClose
|
|
22
|
+
}), React.createElement(Backdrop, {
|
|
23
|
+
onPress: onRequestClose,
|
|
24
|
+
effect: "none"
|
|
25
|
+
}, React.createElement(ModalContent, null, children)));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export var Modal = Component;
|
|
29
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["React","Modal","RNModal","Backdrop","ModalContent","Component","onRequestClose","children","rest"],"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,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,KAAK,IAAIC,OAAlB;AACA,SAASC,QAAT,EAAmBC,YAAnB;;AAEA,IAAMC,SAAuD,GAAG,SAA1DA,SAA0D,OAI1D;EAAA,IAHJC,cAGI,QAHJA,cAGI;EAAA,IAFJC,QAEI,QAFJA,QAEI;EAAA,IADDC,IACC;;EACJ,OACE,oBAAC,OAAD;IACE,WAAW,MADb;IAEE,mBAAmB,MAFrB;IAGE,oBAAoB;EAHtB,GAIMA,IAJN;IAKE,cAAc,EAAEF;EALlB,IAOE,oBAAC,QAAD;IAAU,OAAO,EAAEA,cAAnB;IAAmC,MAAM,EAAC;EAA1C,GACE,oBAAC,YAAD,QAAeC,QAAf,CADF,CAPF,CADF;AAaD,CAlBD;;AAoBA,OAAO,IAAMN,KAAK,GAAGI,SAAd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DateTimePicker, WebDateTimePickerProps } from './DateTimePicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["DateTimePicker","WebDateTimePickerProps"],"sources":["../../../../src/components/molecules/DateTimePicker/index.ts"],"sourcesContent":["export { DateTimePicker, WebDateTimePickerProps } from './DateTimePicker';\n"],"mappings":"AAAA,SAASA,cAAT,EAAyBC,sBAAzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Backdrop: import("@emotion/native").StyledComponent<any, {}, {
|
|
3
|
+
ref?: import("react").Ref<any> | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const ModalContent: import("@emotion/native").StyledComponent<any, {}, {
|
|
6
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
+
|
|
5
|
+
import styled, { css } from '@emotion/native';
|
|
6
|
+
import { PressableSurface, RFValueStr } from '@tecsinapse/react-core';
|
|
7
|
+
import { Platform } from "react-native-web";
|
|
8
|
+
var isWeb = Platform.OS === 'web';
|
|
9
|
+
export var Backdrop = styled(PressableSurface)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), isWeb ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100vh;\n "]))) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n justify-content: flex-end;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100%;\n "]))));
|
|
10
|
+
export var ModalContent = styled.View(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n background-color: transparent;\n ", "\n overflow: hidden;\n"])), function (_ref) {
|
|
11
|
+
var borderRadius = _ref.theme.borderRadius;
|
|
12
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n ", "\n "])), isWeb ? "\n width: " + RFValueStr('375px') + ";\n border-radius: " + borderRadius.micro + ";\n " : "\n border-top-left-radius: " + borderRadius.deca + ";\n border-top-right-radius: " + borderRadius.deca + ";\n ");
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","PressableSurface","RFValueStr","Platform","isWeb","OS","Backdrop","ModalContent","View","borderRadius","theme","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,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SACEC,gBADF,EAEEC,UAFF,QAIO,wBAJP;AAKA,SAASC,QAAT;AAEA,IAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAT,KAAgB,KAA9B;AAEA,OAAO,IAAMC,QAAQ,GAAGP,MAAM,CAACE,gBAAD,CAAT,qFACjBG,KAAK,GACHJ,GADG,8NAOHA,GAPG,8LADY,CAAd;AAeP,OAAO,IAAMO,YAAY,GAAGR,MAAM,CAACS,IAAV,8IAErB;EAAA,IAAYC,YAAZ,QAAGC,KAAH,CAAYD,YAAZ;EAAA,OAAiCT,GAAjC,2FACEI,KAAK,uBAEIF,UAAU,CAAC,OAAD,CAFd,gCAGYO,YAAY,CAACE,KAHzB,oDAMqBF,YAAY,CAACG,IANlC,0CAOsBH,YAAY,CAACG,IAPnC,YADP;AAAA,CAFqB,CAAlB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
declare type AnchorPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
3
|
+
export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
anchorPosition: AnchorPosition;
|
|
7
|
+
}
|
|
8
|
+
declare const Drawer: FC<DrawerProps>;
|
|
9
|
+
export default Drawer;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var _excluded = ["open", "anchorPosition", "onClose", "children", "style"];
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { StyledContainerDrawer } from "./styled";
|
|
9
|
+
import { Transition } from 'react-transition-group';
|
|
10
|
+
import { Overlay } from "../../atoms/Overlay";
|
|
11
|
+
import { transitionStylesTopBottom, defaultStylesTopBottom, defaultStylesLeftRight, transitionStylesLeftRight } from "./animations";
|
|
12
|
+
|
|
13
|
+
var Drawer = function Drawer(_ref) {
|
|
14
|
+
var open = _ref.open,
|
|
15
|
+
_ref$anchorPosition = _ref.anchorPosition,
|
|
16
|
+
anchorPosition = _ref$anchorPosition === void 0 ? 'right' : _ref$anchorPosition,
|
|
17
|
+
onClose = _ref.onClose,
|
|
18
|
+
children = _ref.children,
|
|
19
|
+
style = _ref.style,
|
|
20
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21
|
+
|
|
22
|
+
var getStyles = function getStyles(anchorPosition, state) {
|
|
23
|
+
var stylesLeftRight = defaultStylesLeftRight(anchorPosition);
|
|
24
|
+
var transitionLeftRight = transitionStylesLeftRight(anchorPosition);
|
|
25
|
+
var stylesTopBottom = defaultStylesTopBottom(anchorPosition);
|
|
26
|
+
var transitionTopBottom = transitionStylesTopBottom(anchorPosition);
|
|
27
|
+
|
|
28
|
+
if (['left', 'right'].includes(anchorPosition)) {
|
|
29
|
+
return _extends({}, stylesLeftRight, transitionLeftRight[state]);
|
|
30
|
+
} else {
|
|
31
|
+
return _extends({}, stylesTopBottom, transitionTopBottom[state]);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return React.createElement(React.Fragment, null, React.createElement(Overlay, {
|
|
36
|
+
timeout: 300,
|
|
37
|
+
open: open,
|
|
38
|
+
onClose: onClose,
|
|
39
|
+
zIndex: "drawer"
|
|
40
|
+
}), React.createElement(Transition, {
|
|
41
|
+
"in": open,
|
|
42
|
+
timeout: 300
|
|
43
|
+
}, function (state) {
|
|
44
|
+
return React.createElement(StyledContainerDrawer, _extends({
|
|
45
|
+
style: _extends({}, style, getStyles(anchorPosition, state)),
|
|
46
|
+
anchorPosition: anchorPosition,
|
|
47
|
+
onClose: onClose,
|
|
48
|
+
open: open
|
|
49
|
+
}, rest), children);
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default Drawer;
|
|
54
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.js","names":["React","StyledContainerDrawer","Transition","Overlay","transitionStylesTopBottom","defaultStylesTopBottom","defaultStylesLeftRight","transitionStylesLeftRight","Drawer","open","anchorPosition","onClose","children","style","rest","getStyles","state","stylesLeftRight","transitionLeftRight","stylesTopBottom","transitionTopBottom","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,OAAOA,KAAP,MAA0B,OAA1B;AACA,SAASC,qBAAT;AACA,SAASC,UAAT,QAA6C,wBAA7C;AACA,SAASC,OAAT;AACA,SACEC,yBADF,EAEEC,sBAFF,EAGEC,sBAHF,EAIEC,yBAJF;;AAeA,IAAMC,MAAuB,GAAG,SAA1BA,MAA0B,OAO1B;EAAA,IANJC,IAMI,QANJA,IAMI;EAAA,+BALJC,cAKI;EAAA,IALJA,cAKI,oCALa,OAKb;EAAA,IAJJC,OAII,QAJJA,OAII;EAAA,IAHJC,QAGI,QAHJA,QAGI;EAAA,IAFJC,KAEI,QAFJA,KAEI;EAAA,IADDC,IACC;;EACJ,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAChBL,cADgB,EAEhBM,KAFgB,EAGb;IACH,IAAMC,eAAe,GAAGX,sBAAsB,CAACI,cAAD,CAA9C;IACA,IAAMQ,mBAAmB,GAAGX,yBAAyB,CAACG,cAAD,CAArD;IACA,IAAMS,eAAe,GAAGd,sBAAsB,CAACK,cAAD,CAA9C;IACA,IAAMU,mBAAmB,GAAGhB,yBAAyB,CAACM,cAAD,CAArD;;IAEA,IAAI,CAAC,MAAD,EAAS,OAAT,EAAkBW,QAAlB,CAA2BX,cAA3B,CAAJ,EAAgD;MAC9C,oBACKO,eADL,EAEKC,mBAAmB,CAACF,KAAD,CAFxB;IAID,CALD,MAKO;MACL,oBACKG,eADL,EAEKC,mBAAmB,CAACJ,KAAD,CAFxB;IAID;EACF,CApBD;;EAsBA,OACE,0CACE,oBAAC,OAAD;IAAS,OAAO,EAAE,GAAlB;IAAuB,IAAI,EAAEP,IAA7B;IAAmC,OAAO,EAAEE,OAA5C;IAAqD,MAAM,EAAC;EAA5D,EADF,EAEE,oBAAC,UAAD;IAAY,MAAIF,IAAhB;IAAsB,OAAO,EAAE;EAA/B,GACG,UAAAO,KAAK;IAAA,OACJ,oBAAC,qBAAD;MACE,KAAK,eAAOH,KAAP,EAAiBE,SAAS,CAACL,cAAD,EAAiBM,KAAjB,CAA1B,CADP;MAEE,cAAc,EAAEN,cAFlB;MAGE,OAAO,EAAEC,OAHX;MAIE,IAAI,EAAEF;IAJR,GAKMK,IALN,GAOGF,QAPH,CADI;EAAA,CADR,CAFF,CADF;AAkBD,CAhDD;;AAkDA,eAAeJ,MAAf"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare const transformLeftRigthClose: (anchorPosition: string) => "translateX(100%)" | "translateX(-100%)";
|
|
3
|
+
export declare const transformLeftRigthOpen = "translateX(0)";
|
|
4
|
+
export declare const transformTopBottomClose: (anchorPosition: string) => "translateY(-100%)" | "translateY(100%)";
|
|
5
|
+
export declare const transformTopBottomOpen = "translateY(0%)";
|
|
6
|
+
export declare const defaultStylesLeftRight: (anchorPosition: string) => CSSProperties;
|
|
7
|
+
export declare const transitionStylesLeftRight: (anchorPosition: string) => {
|
|
8
|
+
entering: {
|
|
9
|
+
transform: string;
|
|
10
|
+
};
|
|
11
|
+
entered: {
|
|
12
|
+
transform: string;
|
|
13
|
+
};
|
|
14
|
+
exiting: {
|
|
15
|
+
transform: string;
|
|
16
|
+
};
|
|
17
|
+
exited: {
|
|
18
|
+
transform: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const defaultStylesTopBottom: (anchorPosition: string) => CSSProperties;
|
|
22
|
+
export declare const transitionStylesTopBottom: (anchorPosition: string) => {
|
|
23
|
+
entering: {
|
|
24
|
+
transform: string;
|
|
25
|
+
};
|
|
26
|
+
entered: {
|
|
27
|
+
transform: string;
|
|
28
|
+
};
|
|
29
|
+
exiting: {
|
|
30
|
+
transform: string;
|
|
31
|
+
};
|
|
32
|
+
exited: {
|
|
33
|
+
transform: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export var transformLeftRigthClose = function transformLeftRigthClose(anchorPosition) {
|
|
2
|
+
return anchorPosition === 'right' ? 'translateX(100%)' : 'translateX(-100%)';
|
|
3
|
+
};
|
|
4
|
+
export var transformLeftRigthOpen = 'translateX(0)';
|
|
5
|
+
export var transformTopBottomClose = function transformTopBottomClose(anchorPosition) {
|
|
6
|
+
return anchorPosition === 'top' ? 'translateY(-100%)' : 'translateY(100%)';
|
|
7
|
+
};
|
|
8
|
+
export var transformTopBottomOpen = 'translateY(0%)';
|
|
9
|
+
export var defaultStylesLeftRight = function defaultStylesLeftRight(anchorPosition) {
|
|
10
|
+
return {
|
|
11
|
+
transition: 'transform 300ms ease-in-out',
|
|
12
|
+
transform: transformLeftRigthClose(anchorPosition),
|
|
13
|
+
overflowX: 'hidden',
|
|
14
|
+
overflowY: 'auto'
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export var transitionStylesLeftRight = function transitionStylesLeftRight(anchorPosition) {
|
|
18
|
+
return {
|
|
19
|
+
entering: {
|
|
20
|
+
transform: transformLeftRigthClose(anchorPosition)
|
|
21
|
+
},
|
|
22
|
+
entered: {
|
|
23
|
+
transform: transformLeftRigthOpen
|
|
24
|
+
},
|
|
25
|
+
exiting: {
|
|
26
|
+
transform: transformLeftRigthOpen
|
|
27
|
+
},
|
|
28
|
+
exited: {
|
|
29
|
+
transform: transformLeftRigthClose(anchorPosition)
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export var defaultStylesTopBottom = function defaultStylesTopBottom(anchorPosition) {
|
|
34
|
+
return {
|
|
35
|
+
transition: 'transform 300ms ease-in-out',
|
|
36
|
+
transform: transformTopBottomClose(anchorPosition),
|
|
37
|
+
overflowX: 'hidden',
|
|
38
|
+
overflowY: 'auto'
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export var transitionStylesTopBottom = function transitionStylesTopBottom(anchorPosition) {
|
|
42
|
+
return {
|
|
43
|
+
entering: {
|
|
44
|
+
transform: transformTopBottomClose(anchorPosition)
|
|
45
|
+
},
|
|
46
|
+
entered: {
|
|
47
|
+
transform: transformTopBottomOpen
|
|
48
|
+
},
|
|
49
|
+
exiting: {
|
|
50
|
+
transform: transformTopBottomOpen
|
|
51
|
+
},
|
|
52
|
+
exited: {
|
|
53
|
+
transform: transformTopBottomClose(anchorPosition)
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=animations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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":"AAEA,OAAO,IAAMA,uBAAuB,GAAG,SAA1BA,uBAA0B,CAACC,cAAD;EAAA,OACrCA,cAAc,KAAK,OAAnB,GAA6B,kBAA7B,GAAkD,mBADb;AAAA,CAAhC;AAGP,OAAO,IAAMC,sBAAsB,GAAG,eAA/B;AAEP,OAAO,IAAMC,uBAAuB,GAAG,SAA1BA,uBAA0B,CAACF,cAAD;EAAA,OACrCA,cAAc,KAAK,KAAnB,GAA2B,mBAA3B,GAAiD,kBADZ;AAAA,CAAhC;AAGP,OAAO,IAAMG,sBAAsB,GAAG,gBAA/B;AAEP,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAyB,CACpCJ,cADoC,EAElB;EAClB,OAAO;IACLK,UAAU,EAAE,6BADP;IAELC,SAAS,EAAEP,uBAAuB,CAACC,cAAD,CAF7B;IAGLO,SAAS,EAAE,QAHN;IAILC,SAAS,EAAE;EAJN,CAAP;AAMD,CATM;AAWP,OAAO,IAAMC,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACT,cAAD,EAA4B;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;AAaP,OAAO,IAAMc,sBAAsB,GAAG,SAAzBA,sBAAyB,CACpCd,cADoC,EAElB;EAClB,OAAO;IACLK,UAAU,EAAE,6BADP;IAELC,SAAS,EAAEJ,uBAAuB,CAACF,cAAD,CAF7B;IAGLO,SAAS,EAAE,QAHN;IAILC,SAAS,EAAE;EAJN,CAAP;AAMD,CATM;AAUP,OAAO,IAAMO,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACf,cAAD,EAA4B;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Drawer, DrawerProps } from './Drawer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Drawer","DrawerProps"],"sources":["../../../../src/components/molecules/Drawer/index.ts"],"sourcesContent":["export { default as Drawer, DrawerProps } from './Drawer';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,MAApB,EAA4BC,WAA5B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
+
|
|
5
|
+
import styled from '@emotion/styled';
|
|
6
|
+
import { css } from '@emotion/react';
|
|
7
|
+
|
|
8
|
+
var anchorLeft = function anchorLeft(_ref) {
|
|
9
|
+
var theme = _ref.theme,
|
|
10
|
+
anchorPosition = _ref.anchorPosition;
|
|
11
|
+
return anchorPosition === 'left' && css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n left: 0;\n top: 0;\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n "])), theme.borderRadius.centi, theme.borderRadius.centi);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var anchorRight = function anchorRight(_ref2) {
|
|
15
|
+
var theme = _ref2.theme,
|
|
16
|
+
anchorPosition = _ref2.anchorPosition;
|
|
17
|
+
return anchorPosition === 'right' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n right: 0;\n top: 0;\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n "])), theme.borderRadius.centi, theme.borderRadius.centi);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var anchorTop = function anchorTop(_ref3) {
|
|
21
|
+
var theme = _ref3.theme,
|
|
22
|
+
anchorPosition = _ref3.anchorPosition;
|
|
23
|
+
return anchorPosition === 'top' && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n left: 0;\n right: 0;\n top: 0;\n border-bottom-right-radius: ", ";\n border-bottom-left-radius: ", ";\n "])), theme.borderRadius.centi, theme.borderRadius.centi);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var anchorBottom = function anchorBottom(_ref4) {
|
|
27
|
+
var theme = _ref4.theme,
|
|
28
|
+
anchorPosition = _ref4.anchorPosition;
|
|
29
|
+
return anchorPosition === 'bottom' && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n left: 0;\n right: 0;\n bottom: 0;\n border-top-right-radius: ", ";\n border-top-left-radius: ", ";\n "])), theme.borderRadius.centi, theme.borderRadius.centi);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var baseStyles = function baseStyles(_ref5) {
|
|
33
|
+
var theme = _ref5.theme,
|
|
34
|
+
anchorPosition = _ref5.anchorPosition;
|
|
35
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n height: ", ";\n width: ", ";\n position: fixed;\n overflow: hidden;\n background-color: ", ";\n z-index: ", ";\n "])), ['left', 'right'].includes(anchorPosition) && '100vh', ['top', 'bottom'].includes(anchorPosition) && '100wh', theme.miscellaneous.bodyColor, theme.zIndex.drawer);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export var StyledContainerDrawer = styled('div')(function (props) {
|
|
39
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n ", "\n ", "\n "])), baseStyles(props), anchorBottom(props), anchorTop(props), anchorLeft(props), anchorRight(props));
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","anchorLeft","theme","anchorPosition","borderRadius","centi","anchorRight","anchorTop","anchorBottom","baseStyles","includes","miscellaneous","bodyColor","zIndex","drawer","StyledContainerDrawer","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,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,SAASC,GAAT,QAAoB,gBAApB;;AAEA,IAAMC,UAAU,GAAG,SAAbA,UAAa,OAAyD;EAAA,IAAtDC,KAAsD,QAAtDA,KAAsD;EAAA,IAA/CC,cAA+C,QAA/CA,cAA+C;EAC1E,OACEA,cAAc,KAAK,MAAnB,IACAH,GADA,+LAI6BE,KAAK,CAACE,YAAN,CAAmBC,KAJhD,EAKgCH,KAAK,CAACE,YAAN,CAAmBC,KALnD,CADF;AASD,CAVD;;AAWA,IAAMC,WAAW,GAAG,SAAdA,WAAc,QAAyD;EAAA,IAAtDJ,KAAsD,SAAtDA,KAAsD;EAAA,IAA/CC,cAA+C,SAA/CA,cAA+C;EAC3E,OACEA,cAAc,KAAK,OAAnB,IACAH,GADA,gMAI4BE,KAAK,CAACE,YAAN,CAAmBC,KAJ/C,EAK+BH,KAAK,CAACE,YAAN,CAAmBC,KALlD,CADF;AASD,CAVD;;AAYA,IAAME,SAAS,GAAG,SAAZA,SAAY,QAAyD;EAAA,IAAtDL,KAAsD,SAAtDA,KAAsD;EAAA,IAA/CC,cAA+C,SAA/CA,cAA+C;EACzE,OACEA,cAAc,KAAK,KAAnB,IACAH,GADA,oNAKgCE,KAAK,CAACE,YAAN,CAAmBC,KALnD,EAM+BH,KAAK,CAACE,YAAN,CAAmBC,KANlD,CADF;AAUD,CAXD;;AAaA,IAAMG,YAAY,GAAG,SAAfA,YAAe,QAAyD;EAAA,IAAtDN,KAAsD,SAAtDA,KAAsD;EAAA,IAA/CC,cAA+C,SAA/CA,cAA+C;EAC5E,OACEA,cAAc,KAAK,QAAnB,IACAH,GADA,iNAK6BE,KAAK,CAACE,YAAN,CAAmBC,KALhD,EAM4BH,KAAK,CAACE,YAAN,CAAmBC,KAN/C,CADF;AAUD,CAXD;;AAaA,IAAMI,UAAU,GAAG,SAAbA,UAAa,QAAyD;EAAA,IAAtDP,KAAsD,SAAtDA,KAAsD;EAAA,IAA/CC,cAA+C,SAA/CA,cAA+C;EAC1E,OAAOH,GAAP,oNACY,CAAC,MAAD,EAAS,OAAT,EAAkBU,QAAlB,CAA2BP,cAA3B,KAA8C,OAD1D,EAEW,CAAC,KAAD,EAAQ,QAAR,EAAkBO,QAAlB,CAA2BP,cAA3B,KAA8C,OAFzD,EAKsBD,KAAK,CAACS,aAAN,CAAoBC,SAL1C,EAMaV,KAAK,CAACW,MAAN,CAAaC,MAN1B;AAQD,CATD;;AAWA,OAAO,IAAMC,qBAAqB,GAAGhB,MAAM,CAAC,KAAD,CAAN,CAGnC,UAAAiB,KAAK;EAAA,OAAIhB,GAAJ,mIACDS,UAAU,CAACO,KAAD,CADT,EAEDR,YAAY,CAACQ,KAAD,CAFX,EAGDT,SAAS,CAACS,KAAD,CAHR,EAIDf,UAAU,CAACe,KAAD,CAJT,EAKDV,WAAW,CAACU,KAAD,CALV;AAAA,CAH8B,CAA9B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IGrid } from '@tecsinapse/react-core';
|
|
3
|
+
export declare type IGridWeb = IGrid & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
4
|
+
declare const Grid: ({ children, columns, layout, style, spacing, ...rest }: IGridWeb) => JSX.Element;
|
|
5
|
+
export default Grid;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var _excluded = ["children", "columns", "layout", "style", "spacing"];
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { GridItem } from "./Item";
|
|
9
|
+
|
|
10
|
+
var Grid = function Grid(_ref) {
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
_ref$columns = _ref.columns,
|
|
13
|
+
columns = _ref$columns === void 0 ? 12 : _ref$columns,
|
|
14
|
+
layout = _ref.layout,
|
|
15
|
+
style = _ref.style,
|
|
16
|
+
spacing = _ref.spacing,
|
|
17
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
18
|
+
|
|
19
|
+
if (layout) {
|
|
20
|
+
var flatLayout = layout.flat();
|
|
21
|
+
return React.createElement("div", _extends({
|
|
22
|
+
style: _extends({}, style, {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
flexWrap: 'wrap'
|
|
26
|
+
})
|
|
27
|
+
}, rest), React.Children.map(children, function (child, index) {
|
|
28
|
+
return React.createElement(GridItem, {
|
|
29
|
+
key: "child-" + index,
|
|
30
|
+
columns: columns,
|
|
31
|
+
span: flatLayout[index],
|
|
32
|
+
spacing: spacing
|
|
33
|
+
}, child);
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return React.createElement("div", _extends({
|
|
38
|
+
style: _extends({}, style, {
|
|
39
|
+
display: 'flex',
|
|
40
|
+
flexDirection: 'row',
|
|
41
|
+
flexWrap: 'wrap'
|
|
42
|
+
})
|
|
43
|
+
}, rest), React.Children.map(children, function (child, index) {
|
|
44
|
+
var _child$props$spacing;
|
|
45
|
+
|
|
46
|
+
return React.cloneElement(child, _extends({}, child == null ? void 0 : child.props, {
|
|
47
|
+
columns: columns,
|
|
48
|
+
spacing: (_child$props$spacing = child == null ? void 0 : child.props.spacing) != null ? _child$props$spacing : spacing,
|
|
49
|
+
key: "child-" + index
|
|
50
|
+
}));
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default Grid;
|
|
55
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","names":["React","GridItem","Grid","children","columns","layout","style","spacing","rest","flatLayout","flat","display","flexDirection","flexWrap","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT;;AAMA,IAAMC,IAAI,GAAG,SAAPA,IAAO,OAOgB;EAAA,IAN3BC,QAM2B,QAN3BA,QAM2B;EAAA,wBAL3BC,OAK2B;EAAA,IAL3BA,OAK2B,6BALjB,EAKiB;EAAA,IAJ3BC,MAI2B,QAJ3BA,MAI2B;EAAA,IAH3BC,KAG2B,QAH3BA,KAG2B;EAAA,IAF3BC,OAE2B,QAF3BA,OAE2B;EAAA,IADxBC,IACwB;;EAC3B,IAAIH,MAAJ,EAAY;IACV,IAAMI,UAAU,GAAGJ,MAAM,CAACK,IAAP,EAAnB;IACA,OACE;MACE,KAAK,eACAJ,KADA;QAEHK,OAAO,EAAE,MAFN;QAGHC,aAAa,EAAE,KAHZ;QAIHC,QAAQ,EAAE;MAJP;IADP,GAOML,IAPN,GASGR,KAAK,CAACc,QAAN,CAAeC,GAAf,CAAmBZ,QAAnB,EAA6B,UAACa,KAAD,EAAQC,KAAR;MAAA,OAC5B,oBAAC,QAAD;QACE,GAAG,aAAWA,KADhB;QAEE,OAAO,EAAEb,OAFX;QAGE,IAAI,EAAEK,UAAU,CAACQ,KAAD,CAHlB;QAIE,OAAO,EAAEV;MAJX,GAMGS,KANH,CAD4B;IAAA,CAA7B,CATH,CADF;EAsBD;;EAED,OACE;IACE,KAAK,eACAV,KADA;MAEHK,OAAO,EAAE,MAFN;MAGHC,aAAa,EAAE,KAHZ;MAIHC,QAAQ,EAAE;IAJP;EADP,GAOML,IAPN,GASGR,KAAK,CAACc,QAAN,CAAeC,GAAf,CAAmBZ,QAAnB,EAA6B,UAACa,KAAD,EAAQC,KAAR,EAAkB;IAAA;;IAC9C,OAAOjB,KAAK,CAACkB,YAAN,CAAmBF,KAAnB,eACFA,KADE,oBACFA,KAAK,CAAEG,KADL;MAELf,OAAO,EAAPA,OAFK;MAGLG,OAAO,0BAAES,KAAF,oBAAEA,KAAK,CAAEG,KAAP,CAAaZ,OAAf,mCAA0BA,OAH5B;MAILa,GAAG,aAAWH;IAJT,GAAP;EAMD,CAPA,CATH,CADF;AAoBD,CAtDD;;AAwDA,eAAef,IAAf"}
|