@tecsinapse/react-web-kit 1.20.1 → 1.21.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 +30 -0
- package/babel.config.esm.js +0 -1
- package/babel.config.js +1 -6
- package/dist/components/atoms/Accordion/Accordion.js +10 -8
- package/dist/components/atoms/Accordion/Accordion.js.map +1 -1
- package/dist/components/atoms/Accordion/animations.js +2 -2
- package/dist/components/atoms/Accordion/animations.js.map +1 -1
- package/dist/components/atoms/Accordion/index.d.ts +2 -1
- package/dist/components/atoms/Accordion/index.js +2 -10
- package/dist/components/atoms/Accordion/index.js.map +1 -1
- package/dist/components/atoms/Accordion/styled.js +33 -37
- package/dist/components/atoms/Accordion/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +7 -6
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +2 -1
- package/dist/components/atoms/Badge/index.js +2 -10
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +14 -12
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/index.d.ts +2 -1
- package/dist/components/atoms/Button/index.js +3 -12
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/Button/styled.js +14 -16
- package/dist/components/atoms/Button/styled.js.map +1 -1
- package/dist/components/atoms/Dropdown/index.js +6 -5
- package/dist/components/atoms/Dropdown/index.js.map +1 -1
- package/dist/components/atoms/Dropdown/styled.js +30 -21
- package/dist/components/atoms/Dropdown/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.js +26 -24
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +2 -1
- package/dist/components/atoms/Input/index.js +2 -10
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +5 -5
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.js +26 -24
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/components/atoms/InputMask/index.d.ts +2 -1
- package/dist/components/atoms/InputMask/index.js +2 -10
- package/dist/components/atoms/InputMask/index.js.map +1 -1
- package/dist/components/atoms/InputMask/styled.js +5 -5
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/Modal.js +8 -7
- package/dist/components/atoms/Modal/Modal.js.map +1 -1
- package/dist/components/atoms/Modal/animations.js +1 -1
- package/dist/components/atoms/Modal/animations.js.map +1 -1
- package/dist/components/atoms/Modal/index.d.ts +2 -1
- package/dist/components/atoms/Modal/index.js +2 -10
- package/dist/components/atoms/Modal/index.js.map +1 -1
- package/dist/components/atoms/Modal/styled.js +30 -24
- package/dist/components/atoms/Modal/styled.js.map +1 -1
- package/dist/components/atoms/Overlay/Overlay.js +8 -7
- package/dist/components/atoms/Overlay/Overlay.js.map +1 -1
- package/dist/components/atoms/Overlay/animations.js +1 -1
- package/dist/components/atoms/Overlay/animations.js.map +1 -1
- package/dist/components/atoms/Overlay/styled.js +21 -20
- package/dist/components/atoms/Overlay/styled.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +11 -9
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.d.ts +2 -1
- package/dist/components/atoms/Skeleton/index.js +2 -10
- package/dist/components/atoms/Skeleton/index.js.map +1 -1
- package/dist/components/atoms/Skeleton/styled.js +42 -66
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/Table/Body/TBody.js +5 -4
- package/dist/components/atoms/Table/Body/TBody.js.map +1 -1
- package/dist/components/atoms/Table/Cell/Td.js +5 -4
- package/dist/components/atoms/Table/Cell/Td.js.map +1 -1
- package/dist/components/atoms/Table/Cell/styled.js +34 -20
- package/dist/components/atoms/Table/Cell/styled.js.map +1 -1
- package/dist/components/atoms/Table/Container/TableContainer.js +5 -4
- package/dist/components/atoms/Table/Container/TableContainer.js.map +1 -1
- package/dist/components/atoms/Table/Container/styled.js +25 -15
- package/dist/components/atoms/Table/Container/styled.js.map +1 -1
- package/dist/components/atoms/Table/Footer/TFoot.js +5 -4
- package/dist/components/atoms/Table/Footer/TFoot.js.map +1 -1
- package/dist/components/atoms/Table/Footer/styled.js +5 -6
- package/dist/components/atoms/Table/Footer/styled.js.map +1 -1
- package/dist/components/atoms/Table/Header/THead.js +5 -4
- package/dist/components/atoms/Table/Header/THead.js.map +1 -1
- package/dist/components/atoms/Table/Header/Th.js +5 -4
- package/dist/components/atoms/Table/Header/Th.js.map +1 -1
- package/dist/components/atoms/Table/Header/styled.js +41 -38
- package/dist/components/atoms/Table/Header/styled.js.map +1 -1
- package/dist/components/atoms/Table/Row/Tr.js +5 -4
- package/dist/components/atoms/Table/Row/Tr.js.map +1 -1
- package/dist/components/atoms/Table/Row/styled.js +15 -9
- package/dist/components/atoms/Table/Row/styled.js.map +1 -1
- package/dist/components/atoms/Table/Table.js +5 -4
- package/dist/components/atoms/Table/Table.js.map +1 -1
- package/dist/components/atoms/Table/Toolbar/TableToolbar.js +7 -6
- package/dist/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
- package/dist/components/atoms/Table/Toolbar/index.d.ts +2 -1
- package/dist/components/atoms/Table/Toolbar/index.js +2 -10
- package/dist/components/atoms/Table/Toolbar/index.js.map +1 -1
- package/dist/components/atoms/Table/Toolbar/styled.js +5 -6
- package/dist/components/atoms/Table/Toolbar/styled.js.map +1 -1
- package/dist/components/atoms/Table/index.d.ts +2 -1
- package/dist/components/atoms/Table/index.js +0 -6
- package/dist/components/atoms/Table/index.js.map +1 -1
- package/dist/components/atoms/Table/styled.js +10 -7
- package/dist/components/atoms/Table/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +6 -5
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.d.ts +2 -1
- package/dist/components/atoms/Tag/index.js +2 -10
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.js +7 -5
- package/dist/components/atoms/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/atoms/Tooltip/index.d.ts +2 -1
- package/dist/components/atoms/Tooltip/index.js +2 -10
- package/dist/components/atoms/Tooltip/index.js.map +1 -1
- package/dist/components/atoms/Tooltip/styled.js +41 -122
- package/dist/components/atoms/Tooltip/styled.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +7 -6
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +16 -18
- package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +5 -4
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.d.ts +2 -1
- package/dist/components/molecules/Breadcrumbs/index.js +2 -16
- package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/styled.js +25 -18
- package/dist/components/molecules/Breadcrumbs/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +6 -5
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/Modal.js +6 -5
- package/dist/components/molecules/DatePicker/Modal.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.d.ts +2 -1
- package/dist/components/molecules/DatePicker/index.js +0 -6
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +20 -30
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +3 -2
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/Modal.js +6 -5
- package/dist/components/molecules/DateTimePicker/Modal.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
- package/dist/components/molecules/DateTimePicker/index.js +0 -6
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/styled.js +15 -29
- package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/dist/components/molecules/Drawer/Drawer.js +10 -10
- package/dist/components/molecules/Drawer/Drawer.js.map +1 -1
- package/dist/components/molecules/Drawer/index.d.ts +2 -1
- package/dist/components/molecules/Drawer/index.js +2 -10
- package/dist/components/molecules/Drawer/index.js.map +1 -1
- package/dist/components/molecules/Drawer/styled.js +35 -63
- package/dist/components/molecules/Drawer/styled.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.js +15 -11
- package/dist/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/components/molecules/Grid/Item/Item.js +22 -21
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/components/molecules/Grid/Item/functions.js +5 -2
- package/dist/components/molecules/Grid/Item/functions.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +10 -9
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js +12 -9
- package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/index.d.ts +2 -1
- package/dist/components/molecules/IconTextButton/index.js +2 -10
- package/dist/components/molecules/IconTextButton/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/styled.js +25 -18
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +5 -4
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.d.ts +2 -1
- package/dist/components/molecules/InputPassword/index.js +2 -10
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js +13 -10
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +11 -10
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/index.d.ts +2 -1
- package/dist/components/molecules/LabeledSwitch/index.js +2 -10
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/styled.js +12 -17
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/components/molecules/Masonry/Masonry.js +8 -6
- package/dist/components/molecules/Masonry/Masonry.js.map +1 -1
- package/dist/components/molecules/Masonry/styled.js +21 -28
- package/dist/components/molecules/Masonry/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -20
- package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +10 -8
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +5 -4
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +21 -15
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +21 -19
- package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/MenuBlock/styled.js +34 -33
- package/dist/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/Menubar.js +14 -12
- package/dist/components/molecules/Menubar/Menubar.js.map +1 -1
- package/dist/components/molecules/Menubar/MostUsed/MostUsed.js +29 -25
- package/dist/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
- package/dist/components/molecules/Menubar/MostUsed/styled.js +41 -27
- package/dist/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +6 -5
- package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js.map +1 -1
- package/dist/components/molecules/Menubar/SearchResultItem/styled.js +21 -16
- package/dist/components/molecules/Menubar/SearchResultItem/styled.js.map +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/index.d.ts +1 -1
- package/dist/components/molecules/Menubar/index.js +1 -24
- package/dist/components/molecules/Menubar/index.js.map +1 -1
- package/dist/components/molecules/Menubar/styled.js +117 -96
- package/dist/components/molecules/Menubar/styled.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/Dropdown.js +16 -15
- package/dist/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/components/SearchInput.js +7 -6
- package/dist/components/molecules/Select/Dropdown/components/SearchInput.js.map +1 -1
- package/dist/components/molecules/Select/Dropdown/styled.js +111 -107
- package/dist/components/molecules/Select/Dropdown/styled.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +20 -18
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/SelectItem/SelectItem.js +13 -12
- package/dist/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
- package/dist/components/molecules/Select/SelectItem/styled.js +38 -39
- package/dist/components/molecules/Select/SelectItem/styled.js.map +1 -1
- package/dist/components/molecules/Select/index.d.ts +2 -1
- package/dist/components/molecules/Select/index.js +2 -10
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/molecules/Select/styled.js +6 -11
- package/dist/components/molecules/Select/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +9 -8
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.d.ts +2 -1
- package/dist/components/molecules/Snackbar/index.js +2 -10
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +6 -7
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.js +27 -26
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/index.d.ts +2 -1
- package/dist/components/molecules/TextArea/index.js +2 -10
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.js +17 -11
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/DataGrid.js +34 -32
- package/dist/components/organisms/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/organisms/DataGrid/Footer/Footer.js +17 -15
- package/dist/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
- package/dist/components/organisms/DataGrid/Footer/styled.js +75 -74
- package/dist/components/organisms/DataGrid/Footer/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/Header/Header.js +37 -32
- package/dist/components/organisms/DataGrid/Header/Header.js.map +1 -1
- package/dist/components/organisms/DataGrid/Header/styled.js +10 -8
- package/dist/components/organisms/DataGrid/Header/styled.js.map +1 -1
- package/dist/components/organisms/DataGrid/Row/Row.js +18 -14
- package/dist/components/organisms/DataGrid/Row/Row.js.map +1 -1
- package/dist/components/organisms/DataGrid/index.d.ts +2 -1
- package/dist/components/organisms/DataGrid/index.js +3 -12
- package/dist/components/organisms/DataGrid/index.js.map +1 -1
- package/dist/components/organisms/DataGrid/styled.js +10 -8
- package/dist/components/organisms/DataGrid/styled.js.map +1 -1
- package/dist/hooks/useClickAwayListener.js +3 -1
- package/dist/hooks/useClickAwayListener.js.map +1 -1
- package/dist/index.d.ts +42 -21
- package/dist/index.js +3 -194
- package/dist/index.js.map +1 -1
- package/esm/components/atoms/Accordion/Accordion.js +30 -10
- package/esm/components/atoms/Accordion/Accordion.js.map +1 -1
- package/esm/components/atoms/Accordion/animations.js +2 -2
- package/esm/components/atoms/Accordion/animations.js.map +1 -1
- package/esm/components/atoms/Accordion/index.d.ts +2 -1
- package/esm/components/atoms/Accordion/index.js +1 -1
- package/esm/components/atoms/Accordion/index.js.map +1 -1
- package/esm/components/atoms/Accordion/styled.js +7 -7
- package/esm/components/atoms/Accordion/styled.js.map +1 -1
- package/esm/components/atoms/Badge/Badge.js +3 -1
- package/esm/components/atoms/Badge/Badge.js.map +1 -1
- package/esm/components/atoms/Badge/index.d.ts +2 -1
- package/esm/components/atoms/Badge/index.js +1 -1
- package/esm/components/atoms/Badge/index.js.map +1 -1
- package/esm/components/atoms/Button/Button.js +3 -1
- package/esm/components/atoms/Button/Button.js.map +1 -1
- package/esm/components/atoms/Button/hooks/useMouseHover.js +17 -4
- package/esm/components/atoms/Button/hooks/useMouseHover.js.map +1 -1
- package/esm/components/atoms/Button/hooks/useMousePressed.js +17 -4
- package/esm/components/atoms/Button/hooks/useMousePressed.js.map +1 -1
- package/esm/components/atoms/Button/index.d.ts +2 -1
- package/esm/components/atoms/Button/index.js +1 -1
- package/esm/components/atoms/Button/index.js.map +1 -1
- package/esm/components/atoms/Button/styled.js +3 -3
- package/esm/components/atoms/Button/styled.js.map +1 -1
- package/esm/components/atoms/Dropdown/index.js +6 -2
- package/esm/components/atoms/Dropdown/index.js.map +1 -1
- package/esm/components/atoms/Dropdown/styled.js +2 -2
- package/esm/components/atoms/Dropdown/styled.js.map +1 -1
- package/esm/components/atoms/Input/Input.js +3 -1
- package/esm/components/atoms/Input/Input.js.map +1 -1
- package/esm/components/atoms/Input/index.d.ts +2 -1
- package/esm/components/atoms/Input/index.js +1 -1
- package/esm/components/atoms/Input/index.js.map +1 -1
- package/esm/components/atoms/Input/styled.js +2 -2
- package/esm/components/atoms/Input/styled.js.map +1 -1
- package/esm/components/atoms/InputMask/InputMask.js +3 -1
- package/esm/components/atoms/InputMask/InputMask.js.map +1 -1
- package/esm/components/atoms/InputMask/index.d.ts +2 -1
- package/esm/components/atoms/InputMask/index.js +1 -1
- package/esm/components/atoms/InputMask/index.js.map +1 -1
- package/esm/components/atoms/InputMask/styled.js +2 -2
- package/esm/components/atoms/InputMask/styled.js.map +1 -1
- package/esm/components/atoms/Modal/Modal.js +10 -2
- package/esm/components/atoms/Modal/Modal.js.map +1 -1
- package/esm/components/atoms/Modal/index.d.ts +2 -1
- package/esm/components/atoms/Modal/index.js +1 -1
- package/esm/components/atoms/Modal/index.js.map +1 -1
- package/esm/components/atoms/Modal/styled.js +2 -2
- package/esm/components/atoms/Modal/styled.js.map +1 -1
- package/esm/components/atoms/Overlay/Overlay.js +6 -2
- package/esm/components/atoms/Overlay/Overlay.js.map +1 -1
- package/esm/components/atoms/Overlay/styled.js +2 -2
- package/esm/components/atoms/Overlay/styled.js.map +1 -1
- package/esm/components/atoms/Skeleton/Skeleton.js +3 -1
- package/esm/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/esm/components/atoms/Skeleton/index.d.ts +2 -1
- package/esm/components/atoms/Skeleton/index.js +1 -1
- package/esm/components/atoms/Skeleton/index.js.map +1 -1
- package/esm/components/atoms/Skeleton/styled.js +8 -8
- package/esm/components/atoms/Skeleton/styled.js.map +1 -1
- package/esm/components/atoms/Table/Body/TBody.js +3 -1
- package/esm/components/atoms/Table/Body/TBody.js.map +1 -1
- package/esm/components/atoms/Table/Cell/Td.js +3 -1
- package/esm/components/atoms/Table/Cell/Td.js.map +1 -1
- package/esm/components/atoms/Table/Cell/styled.js +2 -2
- package/esm/components/atoms/Table/Cell/styled.js.map +1 -1
- package/esm/components/atoms/Table/Container/TableContainer.js +3 -1
- package/esm/components/atoms/Table/Container/TableContainer.js.map +1 -1
- package/esm/components/atoms/Table/Container/styled.js +3 -3
- package/esm/components/atoms/Table/Container/styled.js.map +1 -1
- package/esm/components/atoms/Table/Footer/TFoot.js +3 -1
- package/esm/components/atoms/Table/Footer/TFoot.js.map +1 -1
- package/esm/components/atoms/Table/Footer/styled.js +2 -2
- package/esm/components/atoms/Table/Footer/styled.js.map +1 -1
- package/esm/components/atoms/Table/Header/THead.js +3 -1
- package/esm/components/atoms/Table/Header/THead.js.map +1 -1
- package/esm/components/atoms/Table/Header/Th.js +3 -1
- package/esm/components/atoms/Table/Header/Th.js.map +1 -1
- package/esm/components/atoms/Table/Header/styled.js +5 -5
- package/esm/components/atoms/Table/Header/styled.js.map +1 -1
- package/esm/components/atoms/Table/Row/Tr.js +3 -1
- package/esm/components/atoms/Table/Row/Tr.js.map +1 -1
- package/esm/components/atoms/Table/Row/styled.js +2 -2
- package/esm/components/atoms/Table/Row/styled.js.map +1 -1
- package/esm/components/atoms/Table/Table.js +3 -1
- package/esm/components/atoms/Table/Table.js.map +1 -1
- package/esm/components/atoms/Table/Toolbar/TableToolbar.js +3 -1
- package/esm/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
- package/esm/components/atoms/Table/Toolbar/index.d.ts +2 -1
- package/esm/components/atoms/Table/Toolbar/index.js +1 -1
- package/esm/components/atoms/Table/Toolbar/index.js.map +1 -1
- package/esm/components/atoms/Table/Toolbar/styled.js +2 -2
- package/esm/components/atoms/Table/Toolbar/styled.js.map +1 -1
- package/esm/components/atoms/Table/index.d.ts +2 -1
- package/esm/components/atoms/Table/index.js +1 -1
- package/esm/components/atoms/Table/index.js.map +1 -1
- package/esm/components/atoms/Table/styled.js +3 -3
- package/esm/components/atoms/Table/styled.js.map +1 -1
- package/esm/components/atoms/Tag/Tag.js +3 -1
- package/esm/components/atoms/Tag/Tag.js.map +1 -1
- package/esm/components/atoms/Tag/index.d.ts +2 -1
- package/esm/components/atoms/Tag/index.js +1 -1
- package/esm/components/atoms/Tag/index.js.map +1 -1
- package/esm/components/atoms/Tooltip/Tooltip.js +17 -4
- package/esm/components/atoms/Tooltip/Tooltip.js.map +1 -1
- package/esm/components/atoms/Tooltip/index.d.ts +2 -1
- package/esm/components/atoms/Tooltip/index.js +1 -1
- package/esm/components/atoms/Tooltip/index.js.map +1 -1
- package/esm/components/atoms/Tooltip/styled.js +15 -15
- package/esm/components/atoms/Tooltip/styled.js.map +1 -1
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +3 -3
- package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
- package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +3 -1
- package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/esm/components/molecules/Breadcrumbs/index.d.ts +2 -1
- package/esm/components/molecules/Breadcrumbs/index.js +1 -1
- package/esm/components/molecules/Breadcrumbs/index.js.map +1 -1
- package/esm/components/molecules/Breadcrumbs/styled.js +3 -3
- package/esm/components/molecules/Breadcrumbs/styled.js.map +1 -1
- package/esm/components/molecules/DatePicker/DatePicker.js +18 -3
- package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/esm/components/molecules/DatePicker/Modal.js +3 -1
- package/esm/components/molecules/DatePicker/Modal.js.map +1 -1
- package/esm/components/molecules/DatePicker/index.d.ts +2 -1
- package/esm/components/molecules/DatePicker/index.js +1 -1
- package/esm/components/molecules/DatePicker/index.js.map +1 -1
- package/esm/components/molecules/DatePicker/styled.js +5 -5
- package/esm/components/molecules/DatePicker/styled.js.map +1 -1
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js +15 -2
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/esm/components/molecules/DateTimePicker/Modal.js +3 -1
- package/esm/components/molecules/DateTimePicker/Modal.js.map +1 -1
- package/esm/components/molecules/DateTimePicker/index.d.ts +2 -1
- package/esm/components/molecules/DateTimePicker/index.js +1 -1
- package/esm/components/molecules/DateTimePicker/index.js.map +1 -1
- package/esm/components/molecules/DateTimePicker/styled.js +4 -4
- package/esm/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/esm/components/molecules/Drawer/Drawer.js +12 -4
- package/esm/components/molecules/Drawer/Drawer.js.map +1 -1
- package/esm/components/molecules/Drawer/index.d.ts +2 -1
- package/esm/components/molecules/Drawer/index.js +1 -1
- package/esm/components/molecules/Drawer/index.js.map +1 -1
- package/esm/components/molecules/Drawer/styled.js +7 -7
- package/esm/components/molecules/Drawer/styled.js.map +1 -1
- package/esm/components/molecules/Grid/Grid.js +15 -7
- package/esm/components/molecules/Grid/Grid.js.map +1 -1
- package/esm/components/molecules/Grid/Item/Item.js +13 -5
- package/esm/components/molecules/Grid/Item/Item.js.map +1 -1
- package/esm/components/molecules/Grid/Item/functions.js +3 -2
- package/esm/components/molecules/Grid/Item/functions.js.map +1 -1
- package/esm/components/molecules/IconTextButton/IconTextButton.js +3 -1
- package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/esm/components/molecules/IconTextButton/TextComponent.js +3 -3
- package/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js +19 -5
- package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js.map +1 -1
- package/esm/components/molecules/IconTextButton/index.d.ts +2 -1
- package/esm/components/molecules/IconTextButton/index.js +1 -1
- package/esm/components/molecules/IconTextButton/index.js.map +1 -1
- package/esm/components/molecules/IconTextButton/styled.js +4 -4
- package/esm/components/molecules/IconTextButton/styled.js.map +1 -1
- package/esm/components/molecules/InputPassword/InputPassword.js +18 -3
- package/esm/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/esm/components/molecules/InputPassword/index.d.ts +2 -1
- package/esm/components/molecules/InputPassword/index.js +1 -1
- package/esm/components/molecules/InputPassword/index.js.map +1 -1
- package/esm/components/molecules/LabeledSwitch/LabelComponent.js +5 -3
- package/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +3 -1
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/esm/components/molecules/LabeledSwitch/index.d.ts +2 -1
- package/esm/components/molecules/LabeledSwitch/index.js +1 -1
- package/esm/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/esm/components/molecules/LabeledSwitch/styled.js +4 -4
- package/esm/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/esm/components/molecules/Masonry/styled.js +4 -4
- package/esm/components/molecules/Masonry/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +1 -1
- package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +16 -3
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +4 -4
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +3 -3
- package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/MenuBlock/styled.js +7 -7
- package/esm/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/Menubar.js +30 -12
- package/esm/components/molecules/Menubar/Menubar.js.map +1 -1
- package/esm/components/molecules/Menubar/MostUsed/MostUsed.js +2 -2
- package/esm/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
- package/esm/components/molecules/Menubar/MostUsed/styled.js +3 -3
- package/esm/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/SearchResultItem/styled.js +5 -5
- package/esm/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
- package/esm/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
- package/esm/components/molecules/Menubar/animations.js +7 -3
- package/esm/components/molecules/Menubar/animations.js.map +1 -1
- package/esm/components/molecules/Menubar/index.d.ts +1 -1
- package/esm/components/molecules/Menubar/index.js +0 -1
- package/esm/components/molecules/Menubar/index.js.map +1 -1
- package/esm/components/molecules/Menubar/styled.js +11 -11
- package/esm/components/molecules/Menubar/styled.js.map +1 -1
- package/esm/components/molecules/Menubar/utils.js +1 -1
- package/esm/components/molecules/Menubar/utils.js.map +1 -1
- package/esm/components/molecules/Select/Dropdown/Dropdown.js +20 -6
- package/esm/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
- package/esm/components/molecules/Select/Dropdown/styled.js +13 -13
- package/esm/components/molecules/Select/Dropdown/styled.js.map +1 -1
- package/esm/components/molecules/Select/Select.js +25 -4
- package/esm/components/molecules/Select/Select.js.map +1 -1
- package/esm/components/molecules/Select/SelectItem/SelectItem.js +28 -6
- package/esm/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
- package/esm/components/molecules/Select/SelectItem/styled.js +6 -6
- package/esm/components/molecules/Select/SelectItem/styled.js.map +1 -1
- package/esm/components/molecules/Select/index.d.ts +2 -1
- package/esm/components/molecules/Select/index.js +1 -1
- package/esm/components/molecules/Select/index.js.map +1 -1
- package/esm/components/molecules/Select/styled.js +3 -3
- package/esm/components/molecules/Select/styled.js.map +1 -1
- package/esm/components/molecules/Snackbar/Snackbar.js +3 -1
- package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/esm/components/molecules/Snackbar/index.d.ts +2 -1
- package/esm/components/molecules/Snackbar/index.js +1 -1
- package/esm/components/molecules/Snackbar/index.js.map +1 -1
- package/esm/components/molecules/Snackbar/styled.js +3 -3
- package/esm/components/molecules/Snackbar/styled.js.map +1 -1
- package/esm/components/molecules/TextArea/TextArea.js +3 -1
- package/esm/components/molecules/TextArea/TextArea.js.map +1 -1
- package/esm/components/molecules/TextArea/index.d.ts +2 -1
- package/esm/components/molecules/TextArea/index.js +1 -1
- package/esm/components/molecules/TextArea/index.js.map +1 -1
- package/esm/components/molecules/TextArea/styled.js +3 -3
- package/esm/components/molecules/TextArea/styled.js.map +1 -1
- package/esm/components/organisms/DataGrid/DataGrid.js +27 -13
- package/esm/components/organisms/DataGrid/DataGrid.js.map +1 -1
- package/esm/components/organisms/DataGrid/Footer/Footer.js +20 -8
- package/esm/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
- package/esm/components/organisms/DataGrid/Footer/styled.js +12 -12
- package/esm/components/organisms/DataGrid/Footer/styled.js.map +1 -1
- package/esm/components/organisms/DataGrid/Header/Header.js +21 -8
- package/esm/components/organisms/DataGrid/Header/Header.js.map +1 -1
- package/esm/components/organisms/DataGrid/Header/styled.js +2 -2
- package/esm/components/organisms/DataGrid/Header/styled.js.map +1 -1
- package/esm/components/organisms/DataGrid/Row/Row.js +1 -1
- package/esm/components/organisms/DataGrid/Row/Row.js.map +1 -1
- package/esm/components/organisms/DataGrid/index.d.ts +2 -1
- package/esm/components/organisms/DataGrid/index.js +1 -1
- package/esm/components/organisms/DataGrid/index.js.map +1 -1
- package/esm/components/organisms/DataGrid/styled.js +2 -2
- package/esm/components/organisms/DataGrid/styled.js.map +1 -1
- package/esm/components/organisms/DataGrid/utils.js +14 -1
- package/esm/components/organisms/DataGrid/utils.js.map +1 -1
- package/esm/hooks/useClickAwayListener.js +2 -5
- package/esm/hooks/useClickAwayListener.js.map +1 -1
- package/esm/hooks/useWindowSize.js +15 -2
- package/esm/hooks/useWindowSize.js.map +1 -1
- package/esm/index.d.ts +42 -21
- package/esm/index.js +21 -21
- package/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/atoms/Accordion/index.ts +2 -1
- package/src/components/atoms/Badge/index.ts +2 -1
- package/src/components/atoms/Button/index.ts +2 -1
- package/src/components/atoms/Input/index.ts +2 -1
- package/src/components/atoms/InputMask/index.ts +2 -1
- package/src/components/atoms/Modal/index.ts +2 -1
- package/src/components/atoms/Skeleton/index.ts +2 -1
- package/src/components/atoms/Table/Toolbar/index.ts +2 -1
- package/src/components/atoms/Table/index.ts +2 -1
- package/src/components/atoms/Tag/index.ts +2 -1
- package/src/components/atoms/Tooltip/index.ts +2 -1
- package/src/components/molecules/Breadcrumbs/index.ts +2 -5
- package/src/components/molecules/DatePicker/index.ts +2 -1
- package/src/components/molecules/DateTimePicker/index.ts +2 -1
- package/src/components/molecules/Drawer/index.ts +2 -1
- package/src/components/molecules/Grid/Item/functions.ts +1 -0
- package/src/components/molecules/IconTextButton/index.ts +2 -4
- package/src/components/molecules/InputPassword/index.ts +2 -4
- package/src/components/molecules/LabeledSwitch/index.ts +2 -4
- package/src/components/molecules/Menubar/index.ts +1 -1
- package/src/components/molecules/Select/index.ts +2 -1
- package/src/components/molecules/Snackbar/index.ts +2 -1
- package/src/components/molecules/TextArea/index.ts +2 -1
- package/src/components/organisms/DataGrid/index.ts +2 -1
- package/src/index.ts +42 -48
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Breadcrumbs
|
|
1
|
+
export { default as Breadcrumbs } from "./Breadcrumbs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Breadcrumbs"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Breadcrumbs"],"sources":["../../../../src/components/molecules/Breadcrumbs/index.ts"],"sourcesContent":["export { default as Breadcrumbs } from './Breadcrumbs';\nexport type { BreadcrumbsProps, BreadcrumbType } from './Breadcrumbs';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAApB"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import { hex2rgba } from '@tecsinapse/react-core';
|
|
7
|
-
export var StyledContainerBreadcrumbs = styled('div')(_templateObject || (_templateObject =
|
|
7
|
+
export var StyledContainerBreadcrumbs = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: ", ";\n border-radius: ", ";\n box-shadow: 0px 2px 8px\n ", ";\n"])), function (_ref) {
|
|
8
8
|
var theme = _ref.theme;
|
|
9
9
|
return theme.miscellaneous.surfaceColor;
|
|
10
10
|
}, function (_ref2) {
|
|
11
11
|
var theme = _ref2.theme;
|
|
12
|
-
return theme.spacing.mili
|
|
12
|
+
return "".concat(theme.spacing.mili, " ").concat(theme.spacing.deca);
|
|
13
13
|
}, function (_ref3) {
|
|
14
14
|
var theme = _ref3.theme;
|
|
15
15
|
return theme.borderRadius.mili;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["styled","hex2rgba","StyledContainerBreadcrumbs","theme","miscellaneous","surfaceColor","spacing","mili","deca","borderRadius","shadow"],"sources":["../../../../src/components/molecules/Breadcrumbs/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerBreadcrumbs = styled('div')<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0px 2px 8px\n ${({ theme }) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,OAAO,IAAMC,0BAA0B,GAAGF,MAAM,CAAC,KAAD,CAAT,
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","hex2rgba","StyledContainerBreadcrumbs","theme","miscellaneous","surfaceColor","spacing","mili","deca","borderRadius","shadow"],"sources":["../../../../src/components/molecules/Breadcrumbs/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerBreadcrumbs = styled('div')<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0px 2px 8px\n ${({ theme }) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,OAAO,IAAMC,0BAA0B,GAAGF,MAAM,CAAC,KAAD,CAAT,6PACjB;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,aAAN,CAAoBC,YAAnC;AAAA,CADiB,EAK1B;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,iBAAkBA,KAAK,CAACG,OAAN,CAAcC,IAAhC,cAAwCJ,KAAK,CAACG,OAAN,CAAcE,IAAtD;AAAA,CAL0B,EAMpB;EAAA,IAAGL,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACM,YAAN,CAAmBF,IAA9C;AAAA,CANoB,EAQjC;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAAeF,QAAQ,CAACE,KAAK,CAACC,aAAN,CAAoBM,MAArB,EAA6B,IAA7B,CAAvB;AAAA,CARiC,CAAhC"}
|
|
@@ -2,6 +2,20 @@ var _excluded = ["value", "type"];
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
+
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
+
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
|
|
17
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
+
|
|
5
19
|
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
20
|
|
|
7
21
|
import { Calendar, DatePicker as DatePickerCore } from '@tecsinapse/react-core';
|
|
@@ -10,11 +24,12 @@ import { Dropdown } from "../../atoms/Dropdown";
|
|
|
10
24
|
export var DatePicker = function DatePicker(_ref) {
|
|
11
25
|
var value = _ref.value,
|
|
12
26
|
type = _ref.type,
|
|
13
|
-
rest =
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
28
|
|
|
15
29
|
var _useState = useState(false),
|
|
16
|
-
|
|
17
|
-
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
visible = _useState2[0],
|
|
32
|
+
setVisible = _useState2[1];
|
|
18
33
|
|
|
19
34
|
var show = useCallback(function () {
|
|
20
35
|
return setVisible(true);
|
|
@@ -1 +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":"
|
|
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;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"}
|
|
@@ -2,6 +2,8 @@ var _excluded = ["onRequestClose", "children"];
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
5
7
|
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
8
|
|
|
7
9
|
import { PressableSurface } from '@tecsinapse/react-core';
|
|
@@ -12,7 +14,7 @@ import { Backdrop, ModalContent } from "./styled";
|
|
|
12
14
|
var Component = function Component(_ref) {
|
|
13
15
|
var onRequestClose = _ref.onRequestClose,
|
|
14
16
|
children = _ref.children,
|
|
15
|
-
modalProps =
|
|
17
|
+
modalProps = _objectWithoutProperties(_ref, _excluded);
|
|
16
18
|
|
|
17
19
|
return React.createElement(RNModal, _extends({
|
|
18
20
|
transparent: true,
|
|
@@ -1 +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":"
|
|
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"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { DatePicker
|
|
1
|
+
export { DatePicker } from './DatePicker';
|
|
2
|
+
export type { WebDatePickerProps } from './DatePicker';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DatePicker
|
|
1
|
+
export { DatePicker } from "./DatePicker";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DatePicker"
|
|
1
|
+
{"version":3,"file":"index.js","names":["DatePicker"],"sources":["../../../../src/components/molecules/DatePicker/index.ts"],"sourcesContent":["export { DatePicker } from './DatePicker';\nexport type { WebDatePickerProps } from './DatePicker';\n"],"mappings":"AAAA,SAASA,UAAT"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
4
|
|
|
5
5
|
import styled, { css } from '@emotion/native';
|
|
6
6
|
import { hex2rgba, PressableSurface } from '@tecsinapse/react-core';
|
|
7
7
|
import { Platform } from "react-native-web";
|
|
8
8
|
var isWeb = Platform.OS === 'web';
|
|
9
|
-
export var Backdrop = styled(PressableSurface)(_templateObject || (_templateObject =
|
|
9
|
+
export var Backdrop = styled(PressableSurface)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
|
|
10
10
|
var theme = _ref.theme;
|
|
11
|
-
return isWeb ? css(_templateObject2 || (_templateObject2 =
|
|
11
|
+
return isWeb ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n justify-content: center;\n align-items: center;\n background-color: ", ";\n height: 100vh;\n "])), hex2rgba(theme.miscellaneous.overlay, 0.5)) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n justify-content: flex-end;\n background-color: ", ";\n height: 100%;\n "])), hex2rgba(theme.miscellaneous.overlay, 0.5));
|
|
12
12
|
});
|
|
13
|
-
export var ModalContent = styled.View(_templateObject4 || (_templateObject4 =
|
|
13
|
+
export var ModalContent = styled.View(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: transparent;\n ", "\n overflow: hidden;\n"])), function (_ref2) {
|
|
14
14
|
var borderRadius = _ref2.theme.borderRadius;
|
|
15
|
-
return css(_templateObject5 || (_templateObject5 =
|
|
15
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n "])), isWeb ? "\n border-radius: ".concat(borderRadius.micro, ";\n ") : "\n border-top-left-radius: ".concat(borderRadius.deca, ";\n border-top-right-radius: ").concat(borderRadius.deca, ";\n "));
|
|
16
16
|
});
|
|
17
17
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +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,
|
|
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,gFACjB;EAAA,IAAGK,KAAH,QAAGA,KAAH;EAAA,OACAH,KAAK,GACDJ,GADC,mNAIqBC,QAAQ,CAACM,KAAK,CAACC,aAAN,CAAoBC,OAArB,EAA8B,GAA9B,CAJ7B,IAODT,GAPC,oLASqBC,QAAQ,CAACM,KAAK,CAACC,aAAN,CAAoBC,OAArB,EAA8B,GAA9B,CAT7B,CADL;AAAA,CADiB,CAAd;AAgBP,OAAO,IAAMC,YAAY,GAAGX,MAAM,CAACY,IAAV,yIAErB;EAAA,IAAYC,YAAZ,SAAGL,KAAH,CAAYK,YAAZ;EAAA,OAAiCZ,GAAjC,sFACEI,KAAK,oCAEYQ,YAAY,CAACC,KAFzB,yDAKqBD,YAAY,CAACE,IALlC,+CAMsBF,YAAY,CAACE,IANnC,YADP;AAAA,CAFqB,CAAlB"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
1
13
|
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
14
|
|
|
3
15
|
import { DateTimePicker as DateTimePickerCore } from '@tecsinapse/react-core';
|
|
@@ -7,8 +19,9 @@ export var DateTimePicker = function DateTimePicker(_ref) {
|
|
|
7
19
|
var rest = _extends({}, _ref);
|
|
8
20
|
|
|
9
21
|
var _useState = useState(false),
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
visible = _useState2[0],
|
|
24
|
+
setVisible = _useState2[1];
|
|
12
25
|
|
|
13
26
|
var show = useCallback(function () {
|
|
14
27
|
return setVisible(true);
|
|
@@ -1 +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":"
|
|
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;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"}
|
|
@@ -2,6 +2,8 @@ var _excluded = ["onRequestClose", "children"];
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
5
7
|
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
8
|
|
|
7
9
|
import * as React from 'react';
|
|
@@ -11,7 +13,7 @@ import { Backdrop, ModalContent } from "./styled";
|
|
|
11
13
|
var Component = function Component(_ref) {
|
|
12
14
|
var onRequestClose = _ref.onRequestClose,
|
|
13
15
|
children = _ref.children,
|
|
14
|
-
rest =
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
17
|
|
|
16
18
|
return React.createElement(RNModal, _extends({
|
|
17
19
|
transparent: true,
|
|
@@ -1 +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":"
|
|
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"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { DateTimePicker
|
|
1
|
+
export { DateTimePicker } from './DateTimePicker';
|
|
2
|
+
export type { WebDateTimePickerProps } from './DateTimePicker';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DateTimePicker
|
|
1
|
+
export { DateTimePicker } from "./DateTimePicker";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DateTimePicker"
|
|
1
|
+
{"version":3,"file":"index.js","names":["DateTimePicker"],"sources":["../../../../src/components/molecules/DateTimePicker/index.ts"],"sourcesContent":["export { DateTimePicker } from './DateTimePicker';\nexport type { WebDateTimePickerProps } from './DateTimePicker';\n"],"mappings":"AAAA,SAASA,cAAT"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
4
|
|
|
5
5
|
import styled, { css } from '@emotion/native';
|
|
6
6
|
import { PressableSurface, RFValueStr } from '@tecsinapse/react-core';
|
|
7
7
|
import { Platform } from "react-native-web";
|
|
8
8
|
var isWeb = Platform.OS === 'web';
|
|
9
|
-
export var Backdrop = styled(PressableSurface)(_templateObject || (_templateObject =
|
|
10
|
-
export var ModalContent = styled.View(_templateObject4 || (_templateObject4 =
|
|
9
|
+
export var Backdrop = styled(PressableSurface)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), isWeb ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n height: 100vh;\n "]))) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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 = _taggedTemplateLiteral(["\n background-color: transparent;\n ", "\n overflow: hidden;\n"])), function (_ref) {
|
|
11
11
|
var borderRadius = _ref.theme.borderRadius;
|
|
12
|
-
return css(_templateObject5 || (_templateObject5 =
|
|
12
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n "])), isWeb ? "\n width: ".concat(RFValueStr('375px'), ";\n border-radius: ").concat(borderRadius.micro, ";\n ") : "\n border-top-left-radius: ".concat(borderRadius.deca, ";\n border-top-right-radius: ").concat(borderRadius.deca, ";\n "));
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +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,
|
|
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,gFACjBG,KAAK,GACHJ,GADG,yNAOHA,GAPG,yLADY,CAAd;AAeP,OAAO,IAAMO,YAAY,GAAGR,MAAM,CAACS,IAAV,yIAErB;EAAA,IAAYC,YAAZ,QAAGC,KAAH,CAAYD,YAAZ;EAAA,OAAiCT,GAAjC,sFACEI,KAAK,4BAEIF,UAAU,CAAC,OAAD,CAFd,qCAGYO,YAAY,CAACE,KAHzB,yDAMqBF,YAAY,CAACG,IANlC,+CAOsBH,YAAY,CAACG,IAPnC,YADP;AAAA,CAFqB,CAAlB"}
|
|
@@ -2,6 +2,14 @@ var _excluded = ["open", "anchorPosition", "onClose", "children", "style"];
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
|
|
9
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
|
|
5
13
|
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
14
|
|
|
7
15
|
import React from 'react';
|
|
@@ -17,7 +25,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
17
25
|
onClose = _ref.onClose,
|
|
18
26
|
children = _ref.children,
|
|
19
27
|
style = _ref.style,
|
|
20
|
-
rest =
|
|
28
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
29
|
|
|
22
30
|
var getStyles = function getStyles(anchorPosition, state) {
|
|
23
31
|
var stylesLeftRight = defaultStylesLeftRight(anchorPosition);
|
|
@@ -26,9 +34,9 @@ var Drawer = function Drawer(_ref) {
|
|
|
26
34
|
var transitionTopBottom = transitionStylesTopBottom(anchorPosition);
|
|
27
35
|
|
|
28
36
|
if (['left', 'right'].includes(anchorPosition)) {
|
|
29
|
-
return
|
|
37
|
+
return _objectSpread(_objectSpread({}, stylesLeftRight), transitionLeftRight[state]);
|
|
30
38
|
} else {
|
|
31
|
-
return
|
|
39
|
+
return _objectSpread(_objectSpread({}, stylesTopBottom), transitionTopBottom[state]);
|
|
32
40
|
}
|
|
33
41
|
};
|
|
34
42
|
|
|
@@ -42,7 +50,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
42
50
|
timeout: 300
|
|
43
51
|
}, function (state) {
|
|
44
52
|
return React.createElement(StyledContainerDrawer, _extends({
|
|
45
|
-
style:
|
|
53
|
+
style: _objectSpread(_objectSpread({}, style), getStyles(anchorPosition, state)),
|
|
46
54
|
anchorPosition: anchorPosition,
|
|
47
55
|
onClose: onClose,
|
|
48
56
|
open: open
|
|
@@ -1 +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":"
|
|
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,uCACKO,eADL,GAEKC,mBAAmB,CAACF,KAAD,CAFxB;IAID,CALD,MAKO;MACL,uCACKG,eADL,GAEKC,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,kCAAOH,KAAP,GAAiBE,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"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Drawer
|
|
1
|
+
export { default as Drawer } from './Drawer';
|
|
2
|
+
export type { DrawerProps } from './Drawer';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Drawer
|
|
1
|
+
export { default as Drawer } from "./Drawer";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Drawer"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Drawer"],"sources":["../../../../src/components/molecules/Drawer/index.ts"],"sourcesContent":["export { default as Drawer } from './Drawer';\nexport type { DrawerProps } from './Drawer';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,MAApB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import { css } from '@emotion/react';
|
|
@@ -8,34 +8,34 @@ import { css } from '@emotion/react';
|
|
|
8
8
|
var anchorLeft = function anchorLeft(_ref) {
|
|
9
9
|
var theme = _ref.theme,
|
|
10
10
|
anchorPosition = _ref.anchorPosition;
|
|
11
|
-
return anchorPosition === 'left' && css(_templateObject || (_templateObject =
|
|
11
|
+
return anchorPosition === 'left' && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n left: 0;\n top: 0;\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n "])), theme.borderRadius.centi, theme.borderRadius.centi);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
var anchorRight = function anchorRight(_ref2) {
|
|
15
15
|
var theme = _ref2.theme,
|
|
16
16
|
anchorPosition = _ref2.anchorPosition;
|
|
17
|
-
return anchorPosition === 'right' && css(_templateObject2 || (_templateObject2 =
|
|
17
|
+
return anchorPosition === 'right' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n right: 0;\n top: 0;\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n "])), theme.borderRadius.centi, theme.borderRadius.centi);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
var anchorTop = function anchorTop(_ref3) {
|
|
21
21
|
var theme = _ref3.theme,
|
|
22
22
|
anchorPosition = _ref3.anchorPosition;
|
|
23
|
-
return anchorPosition === 'top' && css(_templateObject3 || (_templateObject3 =
|
|
23
|
+
return anchorPosition === 'top' && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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
24
|
};
|
|
25
25
|
|
|
26
26
|
var anchorBottom = function anchorBottom(_ref4) {
|
|
27
27
|
var theme = _ref4.theme,
|
|
28
28
|
anchorPosition = _ref4.anchorPosition;
|
|
29
|
-
return anchorPosition === 'bottom' && css(_templateObject4 || (_templateObject4 =
|
|
29
|
+
return anchorPosition === 'bottom' && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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
30
|
};
|
|
31
31
|
|
|
32
32
|
var baseStyles = function baseStyles(_ref5) {
|
|
33
33
|
var theme = _ref5.theme,
|
|
34
34
|
anchorPosition = _ref5.anchorPosition;
|
|
35
|
-
return css(_templateObject5 || (_templateObject5 =
|
|
35
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\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
36
|
};
|
|
37
37
|
|
|
38
38
|
export var StyledContainerDrawer = styled('div')(function (props) {
|
|
39
|
-
return css(_templateObject6 || (_templateObject6 =
|
|
39
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n ", "\n ", "\n "])), baseStyles(props), anchorBottom(props), anchorTop(props), anchorLeft(props), anchorRight(props));
|
|
40
40
|
});
|
|
41
41
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +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
|
|
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,0LAI6BE,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,2LAI4BE,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,+MAKgCE,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,4MAK6BE,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,+MACY,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,8HACDS,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"}
|
|
@@ -2,6 +2,14 @@ var _excluded = ["children", "columns", "layout", "style", "spacing"];
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
|
|
9
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
|
|
5
13
|
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
14
|
|
|
7
15
|
import React from 'react';
|
|
@@ -14,19 +22,19 @@ var Grid = function Grid(_ref) {
|
|
|
14
22
|
layout = _ref.layout,
|
|
15
23
|
style = _ref.style,
|
|
16
24
|
spacing = _ref.spacing,
|
|
17
|
-
rest =
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
18
26
|
|
|
19
27
|
if (layout) {
|
|
20
28
|
var flatLayout = layout.flat();
|
|
21
29
|
return React.createElement("div", _extends({
|
|
22
|
-
style:
|
|
30
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
23
31
|
display: 'flex',
|
|
24
32
|
flexDirection: 'row',
|
|
25
33
|
flexWrap: 'wrap'
|
|
26
34
|
})
|
|
27
35
|
}, rest), React.Children.map(children, function (child, index) {
|
|
28
36
|
return React.createElement(GridItem, {
|
|
29
|
-
key: "child-"
|
|
37
|
+
key: "child-".concat(index),
|
|
30
38
|
columns: columns,
|
|
31
39
|
span: flatLayout[index],
|
|
32
40
|
spacing: spacing
|
|
@@ -35,7 +43,7 @@ var Grid = function Grid(_ref) {
|
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
return React.createElement("div", _extends({
|
|
38
|
-
style:
|
|
46
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
39
47
|
display: 'flex',
|
|
40
48
|
flexDirection: 'row',
|
|
41
49
|
flexWrap: 'wrap'
|
|
@@ -43,10 +51,10 @@ var Grid = function Grid(_ref) {
|
|
|
43
51
|
}, rest), React.Children.map(children, function (child, index) {
|
|
44
52
|
var _child$props$spacing;
|
|
45
53
|
|
|
46
|
-
return React.cloneElement(child,
|
|
54
|
+
return React.cloneElement(child, _objectSpread(_objectSpread({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
|
47
55
|
columns: columns,
|
|
48
|
-
spacing: (_child$props$spacing = child
|
|
49
|
-
key: "child-"
|
|
56
|
+
spacing: (_child$props$spacing = child === null || child === void 0 ? void 0 : child.props.spacing) !== null && _child$props$spacing !== void 0 ? _child$props$spacing : spacing,
|
|
57
|
+
key: "child-".concat(index)
|
|
50
58
|
}));
|
|
51
59
|
}));
|
|
52
60
|
};
|
|
@@ -1 +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":"
|
|
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,kCACAJ,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,kBAAWA,KAAX,CADL;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,kCACAV,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,kCACFA,KADE,aACFA,KADE,uBACFA,KAAK,CAAEG,KADL;MAELf,OAAO,EAAPA,OAFK;MAGLG,OAAO,0BAAES,KAAF,aAAEA,KAAF,uBAAEA,KAAK,CAAEG,KAAP,CAAaZ,OAAf,uEAA0BA,OAH5B;MAILa,GAAG,kBAAWH,KAAX;IAJE,GAAP;EAMD,CAPA,CATH,CADF;AAoBD,CAtDD;;AAwDA,eAAef,IAAf"}
|