@tecsinapse/react-web-kit 1.20.2 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -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/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/Button/Button.js +14 -12
- package/dist/components/atoms/Button/Button.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/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/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/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/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/styled.js +5 -6
- package/dist/components/atoms/Table/Toolbar/styled.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/Tooltip/Tooltip.js +7 -5
- package/dist/components/atoms/Tooltip/Tooltip.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/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/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/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/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 +4 -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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/styled.js +2 -2
- package/esm/components/atoms/Table/Toolbar/styled.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/Tooltip/Tooltip.js +17 -4
- package/esm/components/atoms/Tooltip/Tooltip.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/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/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/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/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 +2 -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/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/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/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/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/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/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/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/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/package.json +3 -3
|
@@ -2,6 +2,20 @@ var _excluded = ["leftComponents", "rightComponents", "searchPlaceholder", "opti
|
|
|
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 React, { useRef } from 'react';
|
|
@@ -28,23 +42,27 @@ var Menubar = function Menubar(_ref) {
|
|
|
28
42
|
searchResultsLabel = _ref$searchResultsLab === void 0 ? 'Resultados da busca' : _ref$searchResultsLab,
|
|
29
43
|
_ref$searchable = _ref.searchable,
|
|
30
44
|
searchable = _ref$searchable === void 0 ? true : _ref$searchable,
|
|
31
|
-
rest =
|
|
45
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
46
|
|
|
33
47
|
var _React$useState = React.useState(''),
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
49
|
+
search = _React$useState2[0],
|
|
50
|
+
setSearch = _React$useState2[1];
|
|
36
51
|
|
|
37
|
-
var _React$
|
|
38
|
-
|
|
39
|
-
|
|
52
|
+
var _React$useState3 = React.useState([]),
|
|
53
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
54
|
+
results = _React$useState4[0],
|
|
55
|
+
setResults = _React$useState4[1];
|
|
40
56
|
|
|
41
57
|
var _useDebouncedState = useDebouncedState('', setSearch),
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
_useDebouncedState2 = _slicedToArray(_useDebouncedState, 2),
|
|
59
|
+
input = _useDebouncedState2[0],
|
|
60
|
+
setInput = _useDebouncedState2[1];
|
|
44
61
|
|
|
45
|
-
var _React$
|
|
46
|
-
|
|
47
|
-
|
|
62
|
+
var _React$useState5 = React.useState(false),
|
|
63
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
64
|
+
open = _React$useState6[0],
|
|
65
|
+
setOpen = _React$useState6[1];
|
|
48
66
|
|
|
49
67
|
var menuRef = useRef(null);
|
|
50
68
|
useClickAwayListener(menuRef, setOpen, 'mouseup');
|
|
@@ -107,7 +125,7 @@ var Menubar = function Menubar(_ref) {
|
|
|
107
125
|
fontWeight: "bold"
|
|
108
126
|
}, searchResultsLabel)), results.map(function (result) {
|
|
109
127
|
return React.createElement(SearchResultItem, {
|
|
110
|
-
key: result.title
|
|
128
|
+
key: "".concat(result.title, "-").concat(result.category),
|
|
111
129
|
data: result,
|
|
112
130
|
searchTerm: search,
|
|
113
131
|
toggle: toggleOpen
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menubar.js","names":["React","useRef","Icon","Text","useDebouncedState","Transition","StyledIconInput","StyledMenuBar","StyledMenuButton","StyledContainerOpenMenu","StyledInput","StyledInputContainer","StyledSearchResultsContainer","StyledSearchTextContainer","MostUsed","MenuBlock","SearchResultItem","filterAndTransform","getContainerOpenMenuStyles","getInputContainerStyles","useClickAwayListener","Menubar","leftComponents","rightComponents","searchPlaceholder","options","mostUsed","mostUsedLabel","searchResultsLabel","searchable","rest","useState","search","setSearch","results","setResults","input","setInput","open","setOpen","menuRef","toggleOpen","useCallback","state","useEffect","ref","current","map","result","title","category"],"sources":["../../../../src/components/molecules/Menubar/Menubar.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, useDebouncedState } from '@tecsinapse/react-core';\nimport { Transition } from 'react-transition-group';\nimport {\n StyledIconInput,\n StyledMenuBar,\n StyledMenuButton,\n StyledContainerOpenMenu,\n StyledInput,\n StyledInputContainer,\n StyledSearchResultsContainer,\n StyledSearchTextContainer,\n} from './styled';\nimport { MostUsedType, OptionsType } from './types';\nimport { MostUsed } from './MostUsed';\nimport { MenuBlock } from './MenuBlock';\nimport { SearchResultItem } from './SearchResultItem';\nimport { filterAndTransform } from './utils';\nimport {\n getContainerOpenMenuStyles,\n getInputContainerStyles,\n} from './animations';\nimport { useClickAwayListener } from '../../../hooks';\n\nexport interface MenubarProps extends React.HTMLAttributes<HTMLDivElement> {\n options: OptionsType[];\n leftComponents?: React.ReactNode;\n rightComponents?: React.ReactNode;\n /** Limited to first 4 elements */\n mostUsed?: MostUsedType[];\n mostUsedLabel?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchResultsLabel?: string;\n}\n\nconst Menubar: React.FC<MenubarProps> = ({\n leftComponents,\n rightComponents,\n searchPlaceholder = 'O quê você deseja buscar?',\n options,\n mostUsed,\n mostUsedLabel = 'Mais acessados',\n searchResultsLabel = 'Resultados da busca',\n searchable = true,\n ...rest\n}) => {\n const [search, setSearch] = React.useState<string>('');\n const [results, setResults] = React.useState<MostUsedType[]>([]);\n const [input, setInput] = useDebouncedState<string>('', setSearch);\n const [open, setOpen] = React.useState<boolean>(false);\n const menuRef = useRef<HTMLDivElement | null>(null);\n useClickAwayListener(menuRef, setOpen, 'mouseup');\n\n const toggleOpen = React.useCallback(\n () => setOpen(state => !state),\n [setOpen]\n );\n\n React.useEffect(() => {\n if (search === '') return;\n setResults(filterAndTransform(options, search));\n }, [search]);\n\n return (\n <div ref={ref => (menuRef.current = ref)} {...rest}>\n <StyledMenuBar>\n <StyledMenuButton variant=\"filled\" color=\"primary\" onPress={toggleOpen}>\n {!open ? (\n <Icon\n size=\"deca\"\n name=\"menu\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n ) : (\n <Icon\n size=\"deca\"\n name=\"close\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n )}\n </StyledMenuButton>\n {leftComponents}\n <Transition in={open} timeout={250}>\n {state => (\n <StyledInputContainer style={getInputContainerStyles(state)}>\n {searchable && (\n <StyledInput\n placeholder={searchPlaceholder}\n leftComponent={\n <StyledIconInput>\n <Icon name=\"magnify\" type=\"material-community\" />\n </StyledIconInput>\n }\n value={input}\n onChange={setInput}\n />\n )}\n </StyledInputContainer>\n )}\n </Transition>\n {rightComponents}\n </StyledMenuBar>\n <Transition in={open} timeout={250}>\n {state => (\n <StyledContainerOpenMenu style={getContainerOpenMenuStyles(state)}>\n {!search ? (\n <>\n {mostUsed && (\n <MostUsed\n label={mostUsedLabel}\n data={mostUsed}\n toggle={toggleOpen}\n />\n )}\n <MenuBlock options={options} toggle={toggleOpen} />\n </>\n ) : (\n <StyledSearchResultsContainer>\n <StyledSearchTextContainer>\n <Text fontWeight=\"bold\">{searchResultsLabel}</Text>\n </StyledSearchTextContainer>\n {results.map(result => (\n <SearchResultItem\n key={`${result.title}-${result.category}`}\n data={result}\n searchTerm={search}\n toggle={toggleOpen}\n />\n ))}\n </StyledSearchResultsContainer>\n )}\n </StyledContainerOpenMenu>\n )}\n </Transition>\n </div>\n );\n};\n\nexport default Menubar;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Menubar.js","names":["React","useRef","Icon","Text","useDebouncedState","Transition","StyledIconInput","StyledMenuBar","StyledMenuButton","StyledContainerOpenMenu","StyledInput","StyledInputContainer","StyledSearchResultsContainer","StyledSearchTextContainer","MostUsed","MenuBlock","SearchResultItem","filterAndTransform","getContainerOpenMenuStyles","getInputContainerStyles","useClickAwayListener","Menubar","leftComponents","rightComponents","searchPlaceholder","options","mostUsed","mostUsedLabel","searchResultsLabel","searchable","rest","useState","search","setSearch","results","setResults","input","setInput","open","setOpen","menuRef","toggleOpen","useCallback","state","useEffect","ref","current","map","result","title","category"],"sources":["../../../../src/components/molecules/Menubar/Menubar.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, useDebouncedState } from '@tecsinapse/react-core';\nimport { Transition } from 'react-transition-group';\nimport {\n StyledIconInput,\n StyledMenuBar,\n StyledMenuButton,\n StyledContainerOpenMenu,\n StyledInput,\n StyledInputContainer,\n StyledSearchResultsContainer,\n StyledSearchTextContainer,\n} from './styled';\nimport { MostUsedType, OptionsType } from './types';\nimport { MostUsed } from './MostUsed';\nimport { MenuBlock } from './MenuBlock';\nimport { SearchResultItem } from './SearchResultItem';\nimport { filterAndTransform } from './utils';\nimport {\n getContainerOpenMenuStyles,\n getInputContainerStyles,\n} from './animations';\nimport { useClickAwayListener } from '../../../hooks';\n\nexport interface MenubarProps extends React.HTMLAttributes<HTMLDivElement> {\n options: OptionsType[];\n leftComponents?: React.ReactNode;\n rightComponents?: React.ReactNode;\n /** Limited to first 4 elements */\n mostUsed?: MostUsedType[];\n mostUsedLabel?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchResultsLabel?: string;\n}\n\nconst Menubar: React.FC<MenubarProps> = ({\n leftComponents,\n rightComponents,\n searchPlaceholder = 'O quê você deseja buscar?',\n options,\n mostUsed,\n mostUsedLabel = 'Mais acessados',\n searchResultsLabel = 'Resultados da busca',\n searchable = true,\n ...rest\n}) => {\n const [search, setSearch] = React.useState<string>('');\n const [results, setResults] = React.useState<MostUsedType[]>([]);\n const [input, setInput] = useDebouncedState<string>('', setSearch);\n const [open, setOpen] = React.useState<boolean>(false);\n const menuRef = useRef<HTMLDivElement | null>(null);\n useClickAwayListener(menuRef, setOpen, 'mouseup');\n\n const toggleOpen = React.useCallback(\n () => setOpen(state => !state),\n [setOpen]\n );\n\n React.useEffect(() => {\n if (search === '') return;\n setResults(filterAndTransform(options, search));\n }, [search]);\n\n return (\n <div ref={ref => (menuRef.current = ref)} {...rest}>\n <StyledMenuBar>\n <StyledMenuButton variant=\"filled\" color=\"primary\" onPress={toggleOpen}>\n {!open ? (\n <Icon\n size=\"deca\"\n name=\"menu\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n ) : (\n <Icon\n size=\"deca\"\n name=\"close\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n )}\n </StyledMenuButton>\n {leftComponents}\n <Transition in={open} timeout={250}>\n {state => (\n <StyledInputContainer style={getInputContainerStyles(state)}>\n {searchable && (\n <StyledInput\n placeholder={searchPlaceholder}\n leftComponent={\n <StyledIconInput>\n <Icon name=\"magnify\" type=\"material-community\" />\n </StyledIconInput>\n }\n value={input}\n onChange={setInput}\n />\n )}\n </StyledInputContainer>\n )}\n </Transition>\n {rightComponents}\n </StyledMenuBar>\n <Transition in={open} timeout={250}>\n {state => (\n <StyledContainerOpenMenu style={getContainerOpenMenuStyles(state)}>\n {!search ? (\n <>\n {mostUsed && (\n <MostUsed\n label={mostUsedLabel}\n data={mostUsed}\n toggle={toggleOpen}\n />\n )}\n <MenuBlock options={options} toggle={toggleOpen} />\n </>\n ) : (\n <StyledSearchResultsContainer>\n <StyledSearchTextContainer>\n <Text fontWeight=\"bold\">{searchResultsLabel}</Text>\n </StyledSearchTextContainer>\n {results.map(result => (\n <SearchResultItem\n key={`${result.title}-${result.category}`}\n data={result}\n searchTerm={search}\n toggle={toggleOpen}\n />\n ))}\n </StyledSearchResultsContainer>\n )}\n </StyledContainerOpenMenu>\n )}\n </Transition>\n </div>\n );\n};\n\nexport default Menubar;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,MAAhB,QAA8B,OAA9B;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,iBAArB,QAA8C,wBAA9C;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SACEC,eADF,EAEEC,aAFF,EAGEC,gBAHF,EAIEC,uBAJF,EAKEC,WALF,EAMEC,oBANF,EAOEC,4BAPF,EAQEC,yBARF;AAWA,SAASC,QAAT;AACA,SAASC,SAAT;AACA,SAASC,gBAAT;AACA,SAASC,kBAAT;AACA,SACEC,0BADF,EAEEC,uBAFF;AAIA,SAASC,oBAAT;;AAcA,IAAMC,OAA+B,GAAG,SAAlCA,OAAkC,OAUlC;EAAA,IATJC,cASI,QATJA,cASI;EAAA,IARJC,eAQI,QARJA,eAQI;EAAA,iCAPJC,iBAOI;EAAA,IAPJA,iBAOI,sCAPgB,2BAOhB;EAAA,IANJC,OAMI,QANJA,OAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,8BAJJC,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IAAjB,GAAyBb,kBAAzB,CADF,CADF,EAIGM,OAAO,CAACa,GAAR,CAAY,UAAAC,MAAM;MAAA,OACjB,oBAAC,gBAAD;QACE,GAAG,YAAKA,MAAM,CAACC,KAAZ,cAAqBD,MAAM,CAACE,QAA5B,CADL;QAEE,IAAI,EAAEF,MAFR;QAGE,UAAU,EAAEhB,MAHd;QAIE,MAAM,EAAES;MAJV,EADiB;IAAA,CAAlB,CAJH,CAbJ,CADI;EAAA,CADR,CAxCF,CADF;AA2ED,CAvGD;;AAyGA,eAAepB,OAAf"}
|
|
@@ -22,11 +22,11 @@ var MostUsed = function MostUsed(_ref) {
|
|
|
22
22
|
props = _ref2$props === void 0 ? {} : _ref2$props;
|
|
23
23
|
return React.createElement(Component, _extends({}, props, {
|
|
24
24
|
style: noTextDecoration,
|
|
25
|
-
key: title
|
|
25
|
+
key: "".concat(title, "-").concat(category),
|
|
26
26
|
onClick: toggle
|
|
27
27
|
}), React.createElement(StyledCard, {
|
|
28
28
|
elevated: true,
|
|
29
|
-
key: title
|
|
29
|
+
key: "".concat(title, "-").concat(category)
|
|
30
30
|
}, React.createElement(Text, {
|
|
31
31
|
fontWeight: "bold",
|
|
32
32
|
colorVariant: "primary"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MostUsed.js","names":["React","Text","StyledCard","StyledCardContainer","MostUsed","data","label","toggle","noTextDecoration","textDecoration","slice","map","title","category","Component","props","memo"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/MostUsed.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { StyledCard, StyledCardContainer } from './styled';\nimport { MostUsedType } from '../types';\n\ninterface MostUsedProps {\n data: MostUsedType[];\n label: string;\n toggle: () => void;\n}\n\nconst MostUsed: React.FC<MostUsedProps> = ({ data, label, toggle }) => {\n const noTextDecoration = { textDecoration: 'none' };\n\n return (\n <>\n <Text fontWeight=\"bold\">{label}</Text>\n <StyledCardContainer>\n {data\n .slice(0, 4)\n .map(\n ({\n title,\n category,\n Component = 'a',\n props = {},\n }: MostUsedType) => (\n <Component\n {...props}\n style={noTextDecoration}\n key={`${title}-${category}`}\n onClick={toggle}\n >\n <StyledCard elevated key={`${title}-${category}`}>\n <Text fontWeight=\"bold\" colorVariant=\"primary\">\n {title}\n </Text>\n <Text\n fontWeight=\"bold\"\n colorVariant=\"secondary\"\n typography=\"label\"\n >\n {category}\n </Text>\n </StyledCard>\n </Component>\n )\n )}\n </StyledCardContainer>\n </>\n );\n};\n\nexport default React.memo(MostUsed);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,wBAArB;AACA,SAASC,UAAT,EAAqBC,mBAArB;;AASA,IAAMC,QAAiC,GAAG,SAApCA,QAAoC,OAA6B;EAAA,IAA1BC,IAA0B,QAA1BA,IAA0B;EAAA,IAApBC,KAAoB,QAApBA,KAAoB;EAAA,IAAbC,MAAa,QAAbA,MAAa;EACrE,IAAMC,gBAAgB,GAAG;IAAEC,cAAc,EAAE;EAAlB,CAAzB;EAEA,OACE,0CACE,oBAAC,IAAD;IAAM,UAAU,EAAC;EAAjB,GAAyBH,KAAzB,CADF,EAEE,oBAAC,mBAAD,QACGD,IAAI,CACFK,KADF,CACQ,CADR,EACW,CADX,EAEEC,GAFF,CAGG;IAAA,IACEC,KADF,SACEA,KADF;IAAA,IAEEC,QAFF,SAEEA,QAFF;IAAA,4BAGEC,SAHF;IAAA,IAGEA,SAHF,gCAGc,GAHd;IAAA,wBAIEC,KAJF;IAAA,IAIEA,KAJF,4BAIU,EAJV;IAAA,OAME,oBAAC,SAAD,eACMA,KADN;MAEE,KAAK,EAAEP,gBAFT;MAGE,GAAG,
|
|
1
|
+
{"version":3,"file":"MostUsed.js","names":["React","Text","StyledCard","StyledCardContainer","MostUsed","data","label","toggle","noTextDecoration","textDecoration","slice","map","title","category","Component","props","memo"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/MostUsed.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { StyledCard, StyledCardContainer } from './styled';\nimport { MostUsedType } from '../types';\n\ninterface MostUsedProps {\n data: MostUsedType[];\n label: string;\n toggle: () => void;\n}\n\nconst MostUsed: React.FC<MostUsedProps> = ({ data, label, toggle }) => {\n const noTextDecoration = { textDecoration: 'none' };\n\n return (\n <>\n <Text fontWeight=\"bold\">{label}</Text>\n <StyledCardContainer>\n {data\n .slice(0, 4)\n .map(\n ({\n title,\n category,\n Component = 'a',\n props = {},\n }: MostUsedType) => (\n <Component\n {...props}\n style={noTextDecoration}\n key={`${title}-${category}`}\n onClick={toggle}\n >\n <StyledCard elevated key={`${title}-${category}`}>\n <Text fontWeight=\"bold\" colorVariant=\"primary\">\n {title}\n </Text>\n <Text\n fontWeight=\"bold\"\n colorVariant=\"secondary\"\n typography=\"label\"\n >\n {category}\n </Text>\n </StyledCard>\n </Component>\n )\n )}\n </StyledCardContainer>\n </>\n );\n};\n\nexport default React.memo(MostUsed);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,wBAArB;AACA,SAASC,UAAT,EAAqBC,mBAArB;;AASA,IAAMC,QAAiC,GAAG,SAApCA,QAAoC,OAA6B;EAAA,IAA1BC,IAA0B,QAA1BA,IAA0B;EAAA,IAApBC,KAAoB,QAApBA,KAAoB;EAAA,IAAbC,MAAa,QAAbA,MAAa;EACrE,IAAMC,gBAAgB,GAAG;IAAEC,cAAc,EAAE;EAAlB,CAAzB;EAEA,OACE,0CACE,oBAAC,IAAD;IAAM,UAAU,EAAC;EAAjB,GAAyBH,KAAzB,CADF,EAEE,oBAAC,mBAAD,QACGD,IAAI,CACFK,KADF,CACQ,CADR,EACW,CADX,EAEEC,GAFF,CAGG;IAAA,IACEC,KADF,SACEA,KADF;IAAA,IAEEC,QAFF,SAEEA,QAFF;IAAA,4BAGEC,SAHF;IAAA,IAGEA,SAHF,gCAGc,GAHd;IAAA,wBAIEC,KAJF;IAAA,IAIEA,KAJF,4BAIU,EAJV;IAAA,OAME,oBAAC,SAAD,eACMA,KADN;MAEE,KAAK,EAAEP,gBAFT;MAGE,GAAG,YAAKI,KAAL,cAAcC,QAAd,CAHL;MAIE,OAAO,EAAEN;IAJX,IAME,oBAAC,UAAD;MAAY,QAAQ,MAApB;MAAqB,GAAG,YAAKK,KAAL,cAAcC,QAAd;IAAxB,GACE,oBAAC,IAAD;MAAM,UAAU,EAAC,MAAjB;MAAwB,YAAY,EAAC;IAArC,GACGD,KADH,CADF,EAIE,oBAAC,IAAD;MACE,UAAU,EAAC,MADb;MAEE,YAAY,EAAC,WAFf;MAGE,UAAU,EAAC;IAHb,GAKGC,QALH,CAJF,CANF,CANF;EAAA,CAHH,CADH,CAFF,CADF;AAqCD,CAxCD;;AA0CA,eAAeb,KAAK,CAACgB,IAAN,CAAWZ,QAAX,CAAf"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
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 { default as webStyled } from '@emotion/styled';
|
|
6
6
|
import { Card } from '@tecsinapse/react-core';
|
|
7
7
|
import { default as nativeStyled } from '@emotion/native';
|
|
8
|
-
export var StyledCardContainer = webStyled('div')(_templateObject || (_templateObject =
|
|
8
|
+
export var StyledCardContainer = webStyled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n"])), function (_ref) {
|
|
9
9
|
var theme = _ref.theme;
|
|
10
10
|
return theme.spacing.mega;
|
|
11
11
|
}, function (_ref2) {
|
|
@@ -15,7 +15,7 @@ export var StyledCardContainer = webStyled('div')(_templateObject || (_templateO
|
|
|
15
15
|
var theme = _ref3.theme;
|
|
16
16
|
return theme.spacing.centi;
|
|
17
17
|
});
|
|
18
|
-
export var StyledCard = nativeStyled(Card)(_templateObject2 || (_templateObject2 =
|
|
18
|
+
export var StyledCard = nativeStyled(Card)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_ref4) {
|
|
19
19
|
var theme = _ref4.theme;
|
|
20
20
|
return theme.spacing.mili;
|
|
21
21
|
}, function (_ref5) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["default","webStyled","Card","nativeStyled","StyledCardContainer","theme","spacing","mega","kilo","centi","StyledCard","mili","deca"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/styled.ts"],"sourcesContent":["import { default as webStyled } from '@emotion/styled';\nimport { Card, StyleProps } from '@tecsinapse/react-core';\nimport { default as nativeStyled } from '@emotion/native';\n\nexport const StyledCardContainer = webStyled('div')<Partial<StyleProps>>`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ${({ theme }) => theme.spacing.mega};\n margin-bottom: ${({ theme }) => theme.spacing.kilo};\n margin-top: ${({ theme }) => theme.spacing.centi};\n`;\n\nexport const StyledCard = nativeStyled(Card)<Partial<StyleProps>>`\n padding-top: ${({ theme }) => theme.spacing.mili};\n padding-bottom: ${({ theme }) => theme.spacing.mili};\n padding-left: ${({ theme }) => theme.spacing.deca};\n padding-right: ${({ theme }) => theme.spacing.deca};\n`;\n"],"mappings":";;;;AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,iBAArC;AACA,SAASC,IAAT,QAAiC,wBAAjC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,iBAAxC;AAEA,OAAO,IAAMC,mBAAmB,GAAGH,SAAS,CAAC,KAAD,CAAZ,
|
|
1
|
+
{"version":3,"file":"styled.js","names":["default","webStyled","Card","nativeStyled","StyledCardContainer","theme","spacing","mega","kilo","centi","StyledCard","mili","deca"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/styled.ts"],"sourcesContent":["import { default as webStyled } from '@emotion/styled';\nimport { Card, StyleProps } from '@tecsinapse/react-core';\nimport { default as nativeStyled } from '@emotion/native';\n\nexport const StyledCardContainer = webStyled('div')<Partial<StyleProps>>`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ${({ theme }) => theme.spacing.mega};\n margin-bottom: ${({ theme }) => theme.spacing.kilo};\n margin-top: ${({ theme }) => theme.spacing.centi};\n`;\n\nexport const StyledCard = nativeStyled(Card)<Partial<StyleProps>>`\n padding-top: ${({ theme }) => theme.spacing.mili};\n padding-bottom: ${({ theme }) => theme.spacing.mili};\n padding-left: ${({ theme }) => theme.spacing.deca};\n padding-right: ${({ theme }) => theme.spacing.deca};\n`;\n"],"mappings":";;;;AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,iBAArC;AACA,SAASC,IAAT,QAAiC,wBAAjC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,iBAAxC;AAEA,OAAO,IAAMC,mBAAmB,GAAGH,SAAS,CAAC,KAAD,CAAZ,qNAGT;EAAA,IAAGI,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAHS,EAIX;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcE,IAA7B;AAAA,CAJW,EAKd;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcG,KAA7B;AAAA,CALc,CAAzB;AAQP,OAAO,IAAMC,UAAU,GAAGP,YAAY,CAACD,IAAD,CAAf,gLACJ;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcK,IAA7B;AAAA,CADI,EAED;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcK,IAA7B;AAAA,CAFC,EAGH;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcM,IAA7B;AAAA,CAHG,EAIF;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcM,IAA7B;AAAA,CAJE,CAAhB"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
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 { default as nativeStyled } from '@emotion/native';
|
|
7
7
|
import { hex2rgba, Text } from '@tecsinapse/react-core';
|
|
8
|
-
export var StyledSearchItemContainer = styled('div')(_templateObject || (_templateObject =
|
|
8
|
+
export var StyledSearchItemContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ", ";\n border-top: ", ";\n"])), function (_ref) {
|
|
9
9
|
var theme = _ref.theme;
|
|
10
|
-
return theme.spacing.mili
|
|
10
|
+
return "".concat(theme.spacing.mili, " 0 ").concat(theme.spacing.centi, " 0");
|
|
11
11
|
}, function (_ref2) {
|
|
12
12
|
var theme = _ref2.theme;
|
|
13
|
-
return theme.borderWidth.pico
|
|
13
|
+
return "".concat(theme.borderWidth.pico, " solid ").concat(hex2rgba(theme.miscellaneous.shadow, 0.05));
|
|
14
14
|
});
|
|
15
|
-
export var HighlightText = nativeStyled(Text)(_templateObject2 || (_templateObject2 =
|
|
15
|
+
export var HighlightText = nativeStyled(Text)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-decoration: underline;\n text-decoration-color: ", ";\n"])), function (_ref3) {
|
|
16
16
|
var theme = _ref3.theme;
|
|
17
17
|
return theme.font.color.orange;
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["styled","default","nativeStyled","hex2rgba","Text","StyledSearchItemContainer","theme","spacing","mili","centi","borderWidth","pico","miscellaneous","shadow","HighlightText","font","color","orange"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as nativeStyled } from '@emotion/native';\nimport { hex2rgba, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledSearchItemContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => `${theme.spacing.mili} 0 ${theme.spacing.centi} 0`};\n border-top: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n`;\n\nexport const HighlightText = nativeStyled(Text)<Partial<StyleProps>>`\n text-decoration: underline;\n text-decoration-color: ${({ theme }) => theme.font.color.orange};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,OAAO,IAAIC,YAApB,QAAwC,iBAAxC;AACA,SAASC,QAAT,EAA+BC,IAA/B,QAA2C,wBAA3C;AAEA,OAAO,IAAMC,yBAAyB,GAAGL,MAAM,CAAC,KAAD,CAAT,
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","default","nativeStyled","hex2rgba","Text","StyledSearchItemContainer","theme","spacing","mili","centi","borderWidth","pico","miscellaneous","shadow","HighlightText","font","color","orange"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as nativeStyled } from '@emotion/native';\nimport { hex2rgba, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledSearchItemContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => `${theme.spacing.mili} 0 ${theme.spacing.centi} 0`};\n border-top: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n`;\n\nexport const HighlightText = nativeStyled(Text)<Partial<StyleProps>>`\n text-decoration: underline;\n text-decoration-color: ${({ theme }) => theme.font.color.orange};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,OAAO,IAAIC,YAApB,QAAwC,iBAAxC;AACA,SAASC,QAAT,EAA+BC,IAA/B,QAA2C,wBAA3C;AAEA,OAAO,IAAMC,yBAAyB,GAAGL,MAAM,CAAC,KAAD,CAAT,4JAGzB;EAAA,IAAGM,KAAH,QAAGA,KAAH;EAAA,iBAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC,gBAA0CF,KAAK,CAACC,OAAN,CAAcE,KAAxD;AAAA,CAHyB,EAItB;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,iBACTA,KAAK,CAACI,WAAN,CAAkBC,IADT,oBACuBR,QAAQ,CACzCG,KAAK,CAACM,aAAN,CAAoBC,MADqB,EAEzC,IAFyC,CAD/B;AAAA,CAJsB,CAA/B;AAWP,OAAO,IAAMC,aAAa,GAAGZ,YAAY,CAACE,IAAD,CAAf,yIAEC;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,IAAN,CAAWC,KAAX,CAAiBC,MAAhC;AAAA,CAFD,CAAnB"}
|
|
@@ -23,7 +23,7 @@ var matchSpliter = function matchSpliter(str, indexes, size) {
|
|
|
23
23
|
export var stringMatcher = function stringMatcher(searchTerm, textToReplace) {
|
|
24
24
|
var s = normalize(searchTerm);
|
|
25
25
|
var tx = normalize(textToReplace);
|
|
26
|
-
var r = new RegExp("("
|
|
26
|
+
var r = new RegExp("(".concat(s, ")"), 'g');
|
|
27
27
|
return Array.from(tx.matchAll(r));
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ var highlightReplacer = function highlightReplacer(searchTerm, textToReplace, Co
|
|
|
41
41
|
var splited = matchSpliter(textToReplace, indexes, searchTerm.length);
|
|
42
42
|
return splited.map(function (value, idx) {
|
|
43
43
|
return normalize(value) === search ? React.createElement(Component, _extends({
|
|
44
|
-
key: "highlight-"
|
|
44
|
+
key: "highlight-".concat(value).concat(idx)
|
|
45
45
|
}, props), value) : React.createElement(React.Fragment, null, value);
|
|
46
46
|
});
|
|
47
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["React","normalize","str","replace","toLowerCase","matchSpliter","indexes","size","result","currentIndex","forEach","index","push","substring","length","filter","e","stringMatcher","searchTerm","textToReplace","s","tx","r","RegExp","Array","from","matchAll","highlightReplacer","Component","props","search","matches","map","match","splited","value","idx","highlight"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/utils.tsx"],"sourcesContent":["import React from 'react';\n\nconst normalize = (str: string): string => {\n return str\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, ' ')\n .toLowerCase();\n};\n\nconst matchSpliter = (\n str: string,\n indexes: number[],\n size: number\n): string[] => {\n const result: string[] = [];\n let currentIndex = 0;\n\n indexes.forEach((index: number) => {\n result.push(str.substring(currentIndex, index));\n result.push(str.substring(index, index + size));\n currentIndex = index + size;\n });\n\n result.push(str.substring(currentIndex, str.length));\n\n return result.filter(e => e);\n};\n\nexport const stringMatcher = (\n searchTerm: string,\n textToReplace: string\n): RegExpMatchArray[] => {\n const s = normalize(searchTerm);\n const tx = normalize(textToReplace);\n\n const r = new RegExp(`(${s})`, 'g');\n\n return Array.from(tx.matchAll(r));\n};\n\nconst highlightReplacer = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n const search = normalize(searchTerm);\n const matches = stringMatcher(searchTerm, textToReplace);\n\n if (matches.length <= 0) {\n return textToReplace;\n }\n\n const indexes: number[] = matches.map(match => match.index) as number[];\n const splited = matchSpliter(textToReplace, indexes, searchTerm.length);\n\n return splited.map((value, idx) => {\n return normalize(value) === search ? (\n <Component key={`highlight-${value}${idx}`} {...props}>\n {value}\n </Component>\n ) : (\n <>{value}</>\n );\n });\n};\n\nexport const highlight = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n if (textToReplace && searchTerm) {\n return highlightReplacer(searchTerm, textToReplace, Component, props);\n }\n\n return textToReplace;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAyB;EACzC,OAAOA,GAAG,CACPD,SADI,CACM,KADN,EAEJE,OAFI,CAEI,kBAFJ,EAEwB,EAFxB,EAGJA,OAHI,CAGI,wBAHJ,EAG8B,GAH9B,EAIJC,WAJI,EAAP;AAKD,CAND;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBH,GADmB,EAEnBI,OAFmB,EAGnBC,IAHmB,EAIN;EACb,IAAMC,MAAgB,GAAG,EAAzB;EACA,IAAIC,YAAY,GAAG,CAAnB;EAEAH,OAAO,CAACI,OAAR,CAAgB,UAACC,KAAD,EAAmB;IACjCH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcJ,YAAd,EAA4BE,KAA5B,CAAZ;IACAH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcF,KAAd,EAAqBA,KAAK,GAAGJ,IAA7B,CAAZ;IACAE,YAAY,GAAGE,KAAK,GAAGJ,IAAvB;EACD,CAJD;EAMAC,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcJ,YAAd,EAA4BP,GAAG,CAACY,MAAhC,CAAZ;EAEA,OAAON,MAAM,CAACO,MAAP,CAAc,UAAAC,CAAC;IAAA,OAAIA,CAAJ;EAAA,CAAf,CAAP;AACD,CAjBD;;AAmBA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAC3BC,UAD2B,EAE3BC,aAF2B,EAGJ;EACvB,IAAMC,CAAC,GAAGnB,SAAS,CAACiB,UAAD,CAAnB;EACA,IAAMG,EAAE,GAAGpB,SAAS,CAACkB,aAAD,CAApB;EAEA,IAAMG,CAAC,GAAG,IAAIC,MAAJ,
|
|
1
|
+
{"version":3,"file":"utils.js","names":["React","normalize","str","replace","toLowerCase","matchSpliter","indexes","size","result","currentIndex","forEach","index","push","substring","length","filter","e","stringMatcher","searchTerm","textToReplace","s","tx","r","RegExp","Array","from","matchAll","highlightReplacer","Component","props","search","matches","map","match","splited","value","idx","highlight"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/utils.tsx"],"sourcesContent":["import React from 'react';\n\nconst normalize = (str: string): string => {\n return str\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, ' ')\n .toLowerCase();\n};\n\nconst matchSpliter = (\n str: string,\n indexes: number[],\n size: number\n): string[] => {\n const result: string[] = [];\n let currentIndex = 0;\n\n indexes.forEach((index: number) => {\n result.push(str.substring(currentIndex, index));\n result.push(str.substring(index, index + size));\n currentIndex = index + size;\n });\n\n result.push(str.substring(currentIndex, str.length));\n\n return result.filter(e => e);\n};\n\nexport const stringMatcher = (\n searchTerm: string,\n textToReplace: string\n): RegExpMatchArray[] => {\n const s = normalize(searchTerm);\n const tx = normalize(textToReplace);\n\n const r = new RegExp(`(${s})`, 'g');\n\n return Array.from(tx.matchAll(r));\n};\n\nconst highlightReplacer = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n const search = normalize(searchTerm);\n const matches = stringMatcher(searchTerm, textToReplace);\n\n if (matches.length <= 0) {\n return textToReplace;\n }\n\n const indexes: number[] = matches.map(match => match.index) as number[];\n const splited = matchSpliter(textToReplace, indexes, searchTerm.length);\n\n return splited.map((value, idx) => {\n return normalize(value) === search ? (\n <Component key={`highlight-${value}${idx}`} {...props}>\n {value}\n </Component>\n ) : (\n <>{value}</>\n );\n });\n};\n\nexport const highlight = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n if (textToReplace && searchTerm) {\n return highlightReplacer(searchTerm, textToReplace, Component, props);\n }\n\n return textToReplace;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAyB;EACzC,OAAOA,GAAG,CACPD,SADI,CACM,KADN,EAEJE,OAFI,CAEI,kBAFJ,EAEwB,EAFxB,EAGJA,OAHI,CAGI,wBAHJ,EAG8B,GAH9B,EAIJC,WAJI,EAAP;AAKD,CAND;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBH,GADmB,EAEnBI,OAFmB,EAGnBC,IAHmB,EAIN;EACb,IAAMC,MAAgB,GAAG,EAAzB;EACA,IAAIC,YAAY,GAAG,CAAnB;EAEAH,OAAO,CAACI,OAAR,CAAgB,UAACC,KAAD,EAAmB;IACjCH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcJ,YAAd,EAA4BE,KAA5B,CAAZ;IACAH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcF,KAAd,EAAqBA,KAAK,GAAGJ,IAA7B,CAAZ;IACAE,YAAY,GAAGE,KAAK,GAAGJ,IAAvB;EACD,CAJD;EAMAC,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcJ,YAAd,EAA4BP,GAAG,CAACY,MAAhC,CAAZ;EAEA,OAAON,MAAM,CAACO,MAAP,CAAc,UAAAC,CAAC;IAAA,OAAIA,CAAJ;EAAA,CAAf,CAAP;AACD,CAjBD;;AAmBA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAC3BC,UAD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,IAAID,UAArB,EAAiC;IAC/B,OAAOS,iBAAiB,CAACT,UAAD,EAAaC,aAAb,EAA4BS,SAA5B,EAAuCC,KAAvC,CAAxB;EACD;;EAED,OAAOV,aAAP;AACD,CAXM"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
function
|
|
1
|
+
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; }
|
|
2
|
+
|
|
3
|
+
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; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
2
6
|
|
|
3
7
|
var getDefaultInputContainerStyles = {
|
|
4
8
|
transitionDuration: '250ms',
|
|
@@ -45,9 +49,9 @@ var getContainerOpenMenuTransform = {
|
|
|
45
49
|
}
|
|
46
50
|
};
|
|
47
51
|
export var getInputContainerStyles = function getInputContainerStyles(state) {
|
|
48
|
-
return
|
|
52
|
+
return _objectSpread(_objectSpread({}, getDefaultInputContainerStyles), getInputContainerTransform[state]);
|
|
49
53
|
};
|
|
50
54
|
export var getContainerOpenMenuStyles = function getContainerOpenMenuStyles(state) {
|
|
51
|
-
return
|
|
55
|
+
return _objectSpread(_objectSpread({}, getDefaultContainerOpenMenuStyles), getContainerOpenMenuTransform[state]);
|
|
52
56
|
};
|
|
53
57
|
//# sourceMappingURL=animations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.js","names":["getDefaultInputContainerStyles","transitionDuration","transitionProperty","transitionTimingFunction","getDefaultContainerOpenMenuStyles","getInputContainerTransform","entered","transform","entering","opacity","exited","exiting","getContainerOpenMenuTransform","getInputContainerStyles","state","getContainerOpenMenuStyles"],"sources":["../../../../src/components/molecules/Menubar/animations.ts"],"sourcesContent":["import { CSSProperties } from 'react';\nimport { TransitionStatus } from 'react-transition-group';\n\nconst getDefaultInputContainerStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getDefaultContainerOpenMenuStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getInputContainerTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px)',\n },\n entering: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-50px)',\n },\n exiting: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n};\n\nconst getContainerOpenMenuTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px) ',\n },\n entering: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-600px)',\n },\n exiting: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n};\n\nexport const getInputContainerStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultInputContainerStyles,\n ...getInputContainerTransform[state],\n});\n\nexport const getContainerOpenMenuStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultContainerOpenMenuStyles,\n ...getContainerOpenMenuTransform[state],\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"animations.js","names":["getDefaultInputContainerStyles","transitionDuration","transitionProperty","transitionTimingFunction","getDefaultContainerOpenMenuStyles","getInputContainerTransform","entered","transform","entering","opacity","exited","exiting","getContainerOpenMenuTransform","getInputContainerStyles","state","getContainerOpenMenuStyles"],"sources":["../../../../src/components/molecules/Menubar/animations.ts"],"sourcesContent":["import { CSSProperties } from 'react';\nimport { TransitionStatus } from 'react-transition-group';\n\nconst getDefaultInputContainerStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getDefaultContainerOpenMenuStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getInputContainerTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px)',\n },\n entering: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-50px)',\n },\n exiting: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n};\n\nconst getContainerOpenMenuTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px) ',\n },\n entering: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-600px)',\n },\n exiting: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n};\n\nexport const getInputContainerStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultInputContainerStyles,\n ...getInputContainerTransform[state],\n});\n\nexport const getContainerOpenMenuStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultContainerOpenMenuStyles,\n ...getContainerOpenMenuTransform[state],\n});\n"],"mappings":";;;;;;AAGA,IAAMA,8BAA8B,GAAG;EACrCC,kBAAkB,EAAE,OADiB;EAErCC,kBAAkB,EAAE,yBAFiB;EAGrCC,wBAAwB,EAAE;AAHW,CAAvC;AAMA,IAAMC,iCAAiC,GAAG;EACxCH,kBAAkB,EAAE,OADoB;EAExCC,kBAAkB,EAAE,yBAFoB;EAGxCC,wBAAwB,EAAE;AAHc,CAA1C;AAMA,IAAME,0BAA0B,GAAG;EACjCC,OAAO,EAAE;IACPC,SAAS,EAAE;EADJ,CADwB;EAIjCC,QAAQ,EAAE;IACRC,OAAO,EAAE,GADD;IAERF,SAAS,EAAE;EAFH,CAJuB;EAQjCG,MAAM,EAAE;IACND,OAAO,EAAE,CADH;IAENF,SAAS,EAAE;EAFL,CARyB;EAYjCI,OAAO,EAAE;IACPF,OAAO,EAAE,GADF;IAEPF,SAAS,EAAE;EAFJ;AAZwB,CAAnC;AAkBA,IAAMK,6BAA6B,GAAG;EACpCN,OAAO,EAAE;IACPC,SAAS,EAAE;EADJ,CAD2B;EAIpCC,QAAQ,EAAE;IACRC,OAAO,EAAE,IADD;IAERF,SAAS,EAAE;EAFH,CAJ0B;EAQpCG,MAAM,EAAE;IACND,OAAO,EAAE,CADH;IAENF,SAAS,EAAE;EAFL,CAR4B;EAYpCI,OAAO,EAAE;IACPF,OAAO,EAAE,IADF;IAEPF,SAAS,EAAE;EAFJ;AAZ2B,CAAtC;AAkBA,OAAO,IAAMM,uBAAuB,GAAG,SAA1BA,uBAA0B,CACrCC,KADqC;EAAA,uCAGlCd,8BAHkC,GAIlCK,0BAA0B,CAACS,KAAD,CAJQ;AAAA,CAAhC;AAOP,OAAO,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA6B,CACxCD,KADwC;EAAA,uCAGrCV,iCAHqC,GAIrCQ,6BAA6B,CAACE,KAAD,CAJQ;AAAA,CAAnC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
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 { default as webStyled } from '@emotion/styled';
|
|
6
6
|
import { default as nativeStyled } from '@emotion/native';
|
|
7
7
|
import { hex2rgba } from '@tecsinapse/react-core';
|
|
8
8
|
import { Button } from "../../atoms/Button";
|
|
9
9
|
import { Input } from "../../atoms/Input";
|
|
10
|
-
export var StyledIconInput = webStyled('div')(_templateObject || (_templateObject =
|
|
10
|
+
export var StyledIconInput = webStyled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: calc(", " + 2px);\n padding-left: ", ";\n padding-bottom: calc(", " - 2px);\n padding-right: ", ";\n"])), function (_ref) {
|
|
11
11
|
var theme = _ref.theme;
|
|
12
12
|
return theme.spacing.centi;
|
|
13
13
|
}, function (_ref2) {
|
|
@@ -20,17 +20,17 @@ export var StyledIconInput = webStyled('div')(_templateObject || (_templateObjec
|
|
|
20
20
|
var theme = _ref4.theme;
|
|
21
21
|
return theme.spacing.centi;
|
|
22
22
|
});
|
|
23
|
-
export var StyledMenuBar = webStyled('div')(_templateObject2 || (_templateObject2 =
|
|
23
|
+
export var StyledMenuBar = webStyled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n background-color: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: ", ";\n box-shadow: 0px 2px 8px ", ";\n"])), function (_ref5) {
|
|
24
24
|
var theme = _ref5.theme;
|
|
25
25
|
return theme.miscellaneous.surfaceColor;
|
|
26
26
|
}, function (_ref6) {
|
|
27
27
|
var theme = _ref6.theme;
|
|
28
|
-
return theme.spacing.deca
|
|
28
|
+
return "".concat(theme.spacing.deca, " ").concat(theme.spacing.kilo);
|
|
29
29
|
}, function (_ref7) {
|
|
30
30
|
var theme = _ref7.theme;
|
|
31
31
|
return hex2rgba(theme.miscellaneous.shadow, 0.05);
|
|
32
32
|
});
|
|
33
|
-
export var StyledMenuButton = nativeStyled(Button)(_templateObject3 || (_templateObject3 =
|
|
33
|
+
export var StyledMenuButton = nativeStyled(Button)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-top: calc(", " + 2px);\n padding-right: calc(", " + 2px);\n padding-bottom: calc(", " + 2px);\n padding-left: calc(", " + 2px);\n margin-right: ", ";\n & * {\n user-select: none;\n }\n"])), function (_ref8) {
|
|
34
34
|
var theme = _ref8.theme;
|
|
35
35
|
return theme.spacing.centi;
|
|
36
36
|
}, function (_ref9) {
|
|
@@ -46,9 +46,9 @@ export var StyledMenuButton = nativeStyled(Button)(_templateObject3 || (_templat
|
|
|
46
46
|
var theme = _ref12.theme;
|
|
47
47
|
return theme.spacing.kilo;
|
|
48
48
|
});
|
|
49
|
-
export var StyledContainerOpenMenu = webStyled('div')(_templateObject4 || (_templateObject4 =
|
|
49
|
+
export var StyledContainerOpenMenu = webStyled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-top: ", ";\n background-color: ", "; \n border-bottom-left-radius: ", "; \n border-bottom-right-radius: ", ";\n box-shadow: 0px 2px 8px ", ";\n padding-right: 8vw;\n padding-left: 8vw;\n padding-top: ", ";\n padding-bottom: ", ";\n position: absolute;\n z-index: ", ";\n width: -webkit-fill-available;\n width: -moz-available;\n"])), function (_ref13) {
|
|
50
50
|
var theme = _ref13.theme;
|
|
51
|
-
return theme.borderWidth.pico
|
|
51
|
+
return "".concat(theme.borderWidth.pico, " solid ").concat(hex2rgba(theme.miscellaneous.shadow, 0.05));
|
|
52
52
|
}, function (_ref14) {
|
|
53
53
|
var theme = _ref14.theme;
|
|
54
54
|
return theme.miscellaneous.surfaceColor;
|
|
@@ -71,10 +71,10 @@ export var StyledContainerOpenMenu = webStyled('div')(_templateObject4 || (_temp
|
|
|
71
71
|
var theme = _ref20.theme;
|
|
72
72
|
return theme.zIndex.header + 1;
|
|
73
73
|
});
|
|
74
|
-
export var StyledInput = nativeStyled(Input)(_templateObject5 || (_templateObject5 =
|
|
75
|
-
export var StyledInputContainer = webStyled('div')(_templateObject6 || (_templateObject6 =
|
|
76
|
-
export var StyledSearchResultsContainer = webStyled('div')(_templateObject7 || (_templateObject7 =
|
|
77
|
-
export var StyledSearchTextContainer = webStyled('div')(_templateObject8 || (_templateObject8 =
|
|
74
|
+
export var StyledInput = nativeStyled(Input)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
|
|
75
|
+
export var StyledInputContainer = webStyled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n"])));
|
|
76
|
+
export var StyledSearchResultsContainer = webStyled('div')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
|
|
77
|
+
export var StyledSearchTextContainer = webStyled('div')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (_ref21) {
|
|
78
78
|
var theme = _ref21.theme;
|
|
79
79
|
return theme.spacing.mili;
|
|
80
80
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["default","webStyled","nativeStyled","hex2rgba","Button","Input","StyledIconInput","theme","spacing","centi","StyledMenuBar","miscellaneous","surfaceColor","deca","kilo","shadow","StyledMenuButton","StyledContainerOpenMenu","borderWidth","pico","borderRadius","mili","mega","zIndex","header","StyledInput","StyledInputContainer","StyledSearchResultsContainer","StyledSearchTextContainer"],"sources":["../../../../src/components/molecules/Menubar/styled.ts"],"sourcesContent":["import { default as webStyled } from '@emotion/styled';\nimport { default as nativeStyled } from '@emotion/native';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { Button } from '../../atoms/Button';\nimport { Input } from '../../atoms/Input';\n\nexport const StyledIconInput = webStyled('div')<Partial<StyleProps>>`\n padding-top: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-left: ${({ theme }) => theme.spacing.centi};\n padding-bottom: calc(${({ theme }) => theme.spacing.centi} - 2px);\n padding-right: ${({ theme }) => theme.spacing.centi};\n`;\n\nexport const StyledMenuBar = webStyled('div')<Partial<StyleProps>>`\n position: relative;\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: ${({ theme }) => `${theme.spacing.deca} ${theme.spacing.kilo}`};\n box-shadow: 0px 2px 8px ${({ theme }) =>\n hex2rgba(theme.miscellaneous.shadow, 0.05)};\n`;\n\nexport const StyledMenuButton = nativeStyled(Button)<Partial<StyleProps>>`\n padding-top: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-right: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-bottom: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-left: calc(${({ theme }) => theme.spacing.centi} + 2px);\n margin-right: ${({ theme }) => theme.spacing.kilo};\n & * {\n user-select: none;\n }\n`;\n\nexport const StyledContainerOpenMenu = webStyled('div')<Partial<StyleProps>>`\n border-top: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor}; \n border-bottom-left-radius: ${({ theme }) => theme.borderRadius.mili}; \n border-bottom-right-radius: ${({ theme }) => theme.borderRadius.mili};\n box-shadow: 0px 2px 8px ${({ theme }) =>\n hex2rgba(theme.miscellaneous.shadow, 0.05)};\n padding-right: 8vw;\n padding-left: 8vw;\n padding-top: ${({ theme }) => theme.spacing.kilo};\n padding-bottom: ${({ theme }) => theme.spacing.mega};\n position: absolute;\n z-index: ${({ theme }) => theme.zIndex.header + 1};\n width: -webkit-fill-available;\n width: -moz-available;\n`;\n\nexport const StyledInput = nativeStyled(Input)<Partial<StyleProps>>`\n width: 100%;\n`;\n\nexport const StyledInputContainer = webStyled('div')`\n display: flex;\n flex: 1;\n`;\n\nexport const StyledSearchResultsContainer = webStyled('div')`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledSearchTextContainer = webStyled('div')<Partial<StyleProps>>`\n margin-bottom: ${({ theme }) => theme.spacing.mili};\n`;\n"],"mappings":";;;;AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,iBAArC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,iBAAxC;AACA,SAASC,QAAT,QAAqC,wBAArC;AACA,SAASC,MAAT;AACA,SAASC,KAAT;AAEA,OAAO,IAAMC,eAAe,GAAGL,SAAS,CAAC,KAAD,CAAZ,
|
|
1
|
+
{"version":3,"file":"styled.js","names":["default","webStyled","nativeStyled","hex2rgba","Button","Input","StyledIconInput","theme","spacing","centi","StyledMenuBar","miscellaneous","surfaceColor","deca","kilo","shadow","StyledMenuButton","StyledContainerOpenMenu","borderWidth","pico","borderRadius","mili","mega","zIndex","header","StyledInput","StyledInputContainer","StyledSearchResultsContainer","StyledSearchTextContainer"],"sources":["../../../../src/components/molecules/Menubar/styled.ts"],"sourcesContent":["import { default as webStyled } from '@emotion/styled';\nimport { default as nativeStyled } from '@emotion/native';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { Button } from '../../atoms/Button';\nimport { Input } from '../../atoms/Input';\n\nexport const StyledIconInput = webStyled('div')<Partial<StyleProps>>`\n padding-top: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-left: ${({ theme }) => theme.spacing.centi};\n padding-bottom: calc(${({ theme }) => theme.spacing.centi} - 2px);\n padding-right: ${({ theme }) => theme.spacing.centi};\n`;\n\nexport const StyledMenuBar = webStyled('div')<Partial<StyleProps>>`\n position: relative;\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: ${({ theme }) => `${theme.spacing.deca} ${theme.spacing.kilo}`};\n box-shadow: 0px 2px 8px ${({ theme }) =>\n hex2rgba(theme.miscellaneous.shadow, 0.05)};\n`;\n\nexport const StyledMenuButton = nativeStyled(Button)<Partial<StyleProps>>`\n padding-top: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-right: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-bottom: calc(${({ theme }) => theme.spacing.centi} + 2px);\n padding-left: calc(${({ theme }) => theme.spacing.centi} + 2px);\n margin-right: ${({ theme }) => theme.spacing.kilo};\n & * {\n user-select: none;\n }\n`;\n\nexport const StyledContainerOpenMenu = webStyled('div')<Partial<StyleProps>>`\n border-top: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor}; \n border-bottom-left-radius: ${({ theme }) => theme.borderRadius.mili}; \n border-bottom-right-radius: ${({ theme }) => theme.borderRadius.mili};\n box-shadow: 0px 2px 8px ${({ theme }) =>\n hex2rgba(theme.miscellaneous.shadow, 0.05)};\n padding-right: 8vw;\n padding-left: 8vw;\n padding-top: ${({ theme }) => theme.spacing.kilo};\n padding-bottom: ${({ theme }) => theme.spacing.mega};\n position: absolute;\n z-index: ${({ theme }) => theme.zIndex.header + 1};\n width: -webkit-fill-available;\n width: -moz-available;\n`;\n\nexport const StyledInput = nativeStyled(Input)<Partial<StyleProps>>`\n width: 100%;\n`;\n\nexport const StyledInputContainer = webStyled('div')`\n display: flex;\n flex: 1;\n`;\n\nexport const StyledSearchResultsContainer = webStyled('div')`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledSearchTextContainer = webStyled('div')<Partial<StyleProps>>`\n margin-bottom: ${({ theme }) => theme.spacing.mili};\n`;\n"],"mappings":";;;;AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,iBAArC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,iBAAxC;AACA,SAASC,QAAT,QAAqC,wBAArC;AACA,SAASC,MAAT;AACA,SAASC,KAAT;AAEA,OAAO,IAAMC,eAAe,GAAGL,SAAS,CAAC,KAAD,CAAZ,8LACN;EAAA,IAAGM,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,O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AAD,CAAZ,0HAAlC;AAKP,OAAO,IAAM2B,yBAAyB,GAAG3B,SAAS,CAAC,KAAD,CAAZ,oGACjB;EAAA,IAAGM,KAAH,UAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAca,IAA7B;AAAA,CADiB,CAA/B"}
|
|
@@ -13,7 +13,7 @@ export var filterAndTransform = function filterAndTransform(options, search) {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
(_item$items = item.items)
|
|
16
|
+
(_item$items = item.items) === null || _item$items === void 0 ? void 0 : _item$items.forEach(function (sub) {
|
|
17
17
|
if (sub.title.toLowerCase().startsWith(search)) {
|
|
18
18
|
normalized.push({
|
|
19
19
|
title: sub.title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["filterAndTransform","options","search","normalized","forEach","option","items","item","title","toLowerCase","startsWith","push","Component","props","category","sub"],"sources":["../../../../src/components/molecules/Menubar/utils.ts"],"sourcesContent":["import { MostUsedType, OptionsType } from './types';\n\nexport const filterAndTransform = (\n options: OptionsType[],\n search: string\n): MostUsedType[] => {\n const normalized: MostUsedType[] = [];\n options.forEach(option => {\n option.items.forEach(item => {\n if (item.title.toLowerCase().startsWith(search)) {\n normalized.push({\n title: item.title,\n Component: item.Component,\n props: item.props,\n category: option.title,\n });\n }\n item.items?.forEach(sub => {\n if (sub.title.toLowerCase().startsWith(search)) {\n normalized.push({\n title: sub.title,\n Component: sub.Component,\n props: sub.props,\n category: option.title,\n });\n }\n });\n });\n });\n\n return normalized;\n};\n"],"mappings":"AAEA,OAAO,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,OADgC,EAEhCC,MAFgC,EAGb;EACnB,IAAMC,UAA0B,GAAG,EAAnC;EACAF,OAAO,CAACG,OAAR,CAAgB,UAAAC,MAAM,EAAI;IACxBA,MAAM,CAACC,KAAP,CAAaF,OAAb,CAAqB,UAAAG,IAAI,EAAI;MAAA;;MAC3B,IAAIA,IAAI,CAACC,KAAL,CAAWC,WAAX,GAAyBC,UAAzB,CAAoCR,MAApC,CAAJ,EAAiD;QAC/CC,UAAU,CAACQ,IAAX,CAAgB;UACdH,KAAK,EAAED,IAAI,CAACC,KADE;UAEdI,SAAS,EAAEL,IAAI,CAACK,SAFF;UAGdC,KAAK,EAAEN,IAAI,CAACM,KAHE;UAIdC,QAAQ,EAAET,MAAM,CAACG;QAJH,CAAhB;MAMD;;MACD,eAAAD,IAAI,CAACD,KAAL,
|
|
1
|
+
{"version":3,"file":"utils.js","names":["filterAndTransform","options","search","normalized","forEach","option","items","item","title","toLowerCase","startsWith","push","Component","props","category","sub"],"sources":["../../../../src/components/molecules/Menubar/utils.ts"],"sourcesContent":["import { MostUsedType, OptionsType } from './types';\n\nexport const filterAndTransform = (\n options: OptionsType[],\n search: string\n): MostUsedType[] => {\n const normalized: MostUsedType[] = [];\n options.forEach(option => {\n option.items.forEach(item => {\n if (item.title.toLowerCase().startsWith(search)) {\n normalized.push({\n title: item.title,\n Component: item.Component,\n props: item.props,\n category: option.title,\n });\n }\n item.items?.forEach(sub => {\n if (sub.title.toLowerCase().startsWith(search)) {\n normalized.push({\n title: sub.title,\n Component: sub.Component,\n props: sub.props,\n category: option.title,\n });\n }\n });\n });\n });\n\n return normalized;\n};\n"],"mappings":"AAEA,OAAO,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,OADgC,EAEhCC,MAFgC,EAGb;EACnB,IAAMC,UAA0B,GAAG,EAAnC;EACAF,OAAO,CAACG,OAAR,CAAgB,UAAAC,MAAM,EAAI;IACxBA,MAAM,CAACC,KAAP,CAAaF,OAAb,CAAqB,UAAAG,IAAI,EAAI;MAAA;;MAC3B,IAAIA,IAAI,CAACC,KAAL,CAAWC,WAAX,GAAyBC,UAAzB,CAAoCR,MAApC,CAAJ,EAAiD;QAC/CC,UAAU,CAACQ,IAAX,CAAgB;UACdH,KAAK,EAAED,IAAI,CAACC,KADE;UAEdI,SAAS,EAAEL,IAAI,CAACK,SAFF;UAGdC,KAAK,EAAEN,IAAI,CAACM,KAHE;UAIdC,QAAQ,EAAET,MAAM,CAACG;QAJH,CAAhB;MAMD;;MACD,eAAAD,IAAI,CAACD,KAAL,4DAAYF,OAAZ,CAAoB,UAAAW,GAAG,EAAI;QACzB,IAAIA,GAAG,CAACP,KAAJ,CAAUC,WAAV,GAAwBC,UAAxB,CAAmCR,MAAnC,CAAJ,EAAgD;UAC9CC,UAAU,CAACQ,IAAX,CAAgB;YACdH,KAAK,EAAEO,GAAG,CAACP,KADG;YAEdI,SAAS,EAAEG,GAAG,CAACH,SAFD;YAGdC,KAAK,EAAEE,GAAG,CAACF,KAHG;YAIdC,QAAQ,EAAET,MAAM,CAACG;UAJH,CAAhB;QAMD;MACF,CATD;IAUD,CAnBD;EAoBD,CArBD;EAuBA,OAAOL,UAAP;AACD,CA7BM"}
|
|
@@ -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
|
import React from 'react';
|
|
2
14
|
import { Checkbox, Text, useDebouncedState } from '@tecsinapse/react-core';
|
|
3
15
|
import { ItemSelect } from "../SelectItem";
|
|
@@ -23,20 +35,22 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
23
35
|
searchBarPlaceholder = _ref.searchBarPlaceholder;
|
|
24
36
|
|
|
25
37
|
var _useDebouncedState = useDebouncedState('', onSearch),
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
_useDebouncedState2 = _slicedToArray(_useDebouncedState, 2),
|
|
39
|
+
searchArg = _useDebouncedState2[0],
|
|
40
|
+
setSearchArg = _useDebouncedState2[1];
|
|
28
41
|
|
|
29
42
|
var lengthOptions = React.useMemo(function () {
|
|
30
43
|
return options.length;
|
|
31
44
|
}, [options]);
|
|
32
45
|
|
|
33
|
-
var _React$useState = React.useState(type === 'multi' && (value
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
var _React$useState = React.useState(type === 'multi' && (value === null || value === void 0 ? void 0 : value.length) === lengthOptions),
|
|
47
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
48
|
+
checkedAll = _React$useState2[0],
|
|
49
|
+
setCheckedAll = _React$useState2[1];
|
|
36
50
|
|
|
37
51
|
React.useEffect(function () {
|
|
38
52
|
if (type === 'multi') {
|
|
39
|
-
lengthOptions === (value
|
|
53
|
+
lengthOptions === (value === null || value === void 0 ? void 0 : value.length) ? setCheckedAll(true) : setCheckedAll(false);
|
|
40
54
|
}
|
|
41
55
|
}, [value, type, lengthOptions]);
|
|
42
56
|
var onClickCheckAll = React.useCallback(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","names":["React","Checkbox","Text","useDebouncedState","ItemSelect","SearchBarContainer","StyledContainerCheckAll","StyledContainerDropdown","StyledContainerTextLabel","StyledSpan","OptionsContainer","PaddedContainer","SearchInput","fullWidth","width","Dropdown","options","onSearch","type","hideSearchBar","onSelect","value","keyExtractor","labelExtractor","setDropDownVisible","style","anchor","selectAllLabel","searchBarPlaceholder","searchArg","setSearchArg","lengthOptions","useMemo","length","useState","checkedAll","setCheckedAll","useEffect","onClickCheckAll","useCallback","items","map","option","aux","prev","auxArray","onChange","text","undefined","item","index"],"sources":["../../../../../src/components/molecules/Select/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { Checkbox, Text, useDebouncedState } from '@tecsinapse/react-core';\nimport { ItemSelect } from '../SelectItem';\nimport { SelectProps } from '../Select';\nimport {\n SearchBarContainer,\n StyledContainerCheckAll,\n StyledContainerDropdown,\n StyledContainerTextLabel,\n StyledSpan,\n OptionsContainer,\n PaddedContainer,\n} from './styled';\nimport { SearchInput } from './components';\n\nconst fullWidth = { width: '100%' };\n\nconst Dropdown = <Data, Type extends 'single' | 'multi'>({\n options,\n onSearch,\n type,\n hideSearchBar,\n onSelect,\n value,\n keyExtractor,\n labelExtractor,\n setDropDownVisible,\n style,\n anchor,\n selectAllLabel,\n searchBarPlaceholder,\n}: SelectProps<Data, Type> & {\n setDropDownVisible: (t: boolean) => void;\n}): JSX.Element => {\n const [searchArg, setSearchArg] = useDebouncedState<string>('', onSearch);\n const lengthOptions = React.useMemo(() => options.length, [options]);\n\n const [checkedAll, setCheckedAll] = React.useState<boolean>(\n type === 'multi' && (value as Data[])?.length === lengthOptions\n );\n\n React.useEffect(() => {\n if (type === 'multi') {\n lengthOptions === (value as Data[])?.length\n ? setCheckedAll(true)\n : setCheckedAll(false);\n }\n }, [value, type, lengthOptions]);\n\n const onClickCheckAll = React.useCallback(() => {\n const items = options.map(option => option);\n let aux;\n setCheckedAll(prev => {\n aux = !prev;\n return !prev;\n });\n type OnSelectArg = Parameters<typeof onSelect>[0];\n const auxArray: Data[] = [];\n !aux ? onSelect(auxArray as OnSelectArg) : onSelect(items as OnSelectArg);\n }, [options, setCheckedAll, onSelect]);\n\n const onChange = React.useCallback(\n text => setSearchArg(text),\n [setSearchArg]\n );\n\n return (\n <StyledContainerDropdown\n lengthOptions={lengthOptions}\n style={style}\n anchor={anchor}\n >\n {type === 'multi' && (\n <StyledContainerCheckAll\n onClick={hideSearchBar ? onClickCheckAll : undefined}\n >\n <Checkbox checked={checkedAll} onChange={onClickCheckAll} />\n {!hideSearchBar ? (\n <SearchBarContainer>\n <SearchInput\n searchArg={searchArg}\n onChange={onChange}\n fullWidth={fullWidth}\n placeholder={searchBarPlaceholder}\n />\n </SearchBarContainer>\n ) : (\n <StyledContainerTextLabel>\n <Text fontWeight=\"bold\">\n <StyledSpan>{selectAllLabel}</StyledSpan>\n </Text>\n </StyledContainerTextLabel>\n )}\n </StyledContainerCheckAll>\n )}\n {type === 'single' && !hideSearchBar && (\n <PaddedContainer>\n <SearchInput\n searchArg={searchArg}\n onChange={onChange}\n fullWidth={fullWidth}\n placeholder={searchBarPlaceholder}\n />\n </PaddedContainer>\n )}\n <OptionsContainer lengthOptions={options.length}>\n {options.map((item, index) => (\n <ItemSelect\n type={type}\n key={keyExtractor(item)}\n item={item}\n onSelect={onSelect}\n value={value}\n keyExtractor={keyExtractor}\n index={index}\n labelExtractor={labelExtractor}\n setDropDownVisible={setDropDownVisible}\n checkedAll={checkedAll}\n setCheckedAll={setCheckedAll}\n lenghtOptions={lengthOptions}\n />\n ))}\n </OptionsContainer>\n </StyledContainerDropdown>\n );\n};\n\nexport default Dropdown;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,iBAAzB,QAAkD,wBAAlD;AACA,SAASC,UAAT;AAEA,SACEC,kBADF,EAEEC,uBAFF,EAGEC,uBAHF,EAIEC,wBAJF,EAKEC,UALF,EAMEC,gBANF,EAOEC,eAPF;AASA,SAASC,WAAT;AAEA,IAAMC,SAAS,GAAG;EAAEC,KAAK,EAAE;AAAT,CAAlB;;AAEA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,OAgBE;EAAA,IAfjBC,OAeiB,QAfjBA,OAeiB;EAAA,IAdjBC,QAciB,QAdjBA,QAciB;EAAA,IAbjBC,IAaiB,QAbjBA,IAaiB;EAAA,IAZjBC,aAYiB,QAZjBA,aAYiB;EAAA,IAXjBC,QAWiB,QAXjBA,QAWiB;EAAA,IAVjBC,KAUiB,QAVjBA,KAUiB;EAAA,IATjBC,YASiB,QATjBA,YASiB;EAAA,IARjBC,cAQiB,QARjBA,cAQiB;EAAA,IAPjBC,kBAOiB,QAPjBA,kBAOiB;EAAA,IANjBC,KAMiB,QANjBA,KAMiB;EAAA,IALjBC,MAKiB,QALjBA,MAKiB;EAAA,IAJjBC,cAIiB,QAJjBA,cAIiB;EAAA,IAHjBC,oBAGiB,QAHjBA,oBAGiB;;EACjB,yBAAkCzB,iBAAiB,CAAS,EAAT,EAAac,QAAb,CAAnD;EAAA,IAAOY,SAAP;EAAA,IAAkBC,YAAlB;;EACA,IAAMC,aAAa,GAAG/B,KAAK,CAACgC,OAAN,CAAc;IAAA,OAAMhB,OAAO,CAACiB,MAAd;EAAA,CAAd,EAAoC,CAACjB,OAAD,CAApC,CAAtB;;EAEA,sBAAoChB,KAAK,CAACkC,QAAN,CAClChB,IAAI,KAAK,OAAT,IAAoB,CAACG,KAAD,
|
|
1
|
+
{"version":3,"file":"Dropdown.js","names":["React","Checkbox","Text","useDebouncedState","ItemSelect","SearchBarContainer","StyledContainerCheckAll","StyledContainerDropdown","StyledContainerTextLabel","StyledSpan","OptionsContainer","PaddedContainer","SearchInput","fullWidth","width","Dropdown","options","onSearch","type","hideSearchBar","onSelect","value","keyExtractor","labelExtractor","setDropDownVisible","style","anchor","selectAllLabel","searchBarPlaceholder","searchArg","setSearchArg","lengthOptions","useMemo","length","useState","checkedAll","setCheckedAll","useEffect","onClickCheckAll","useCallback","items","map","option","aux","prev","auxArray","onChange","text","undefined","item","index"],"sources":["../../../../../src/components/molecules/Select/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { Checkbox, Text, useDebouncedState } from '@tecsinapse/react-core';\nimport { ItemSelect } from '../SelectItem';\nimport { SelectProps } from '../Select';\nimport {\n SearchBarContainer,\n StyledContainerCheckAll,\n StyledContainerDropdown,\n StyledContainerTextLabel,\n StyledSpan,\n OptionsContainer,\n PaddedContainer,\n} from './styled';\nimport { SearchInput } from './components';\n\nconst fullWidth = { width: '100%' };\n\nconst Dropdown = <Data, Type extends 'single' | 'multi'>({\n options,\n onSearch,\n type,\n hideSearchBar,\n onSelect,\n value,\n keyExtractor,\n labelExtractor,\n setDropDownVisible,\n style,\n anchor,\n selectAllLabel,\n searchBarPlaceholder,\n}: SelectProps<Data, Type> & {\n setDropDownVisible: (t: boolean) => void;\n}): JSX.Element => {\n const [searchArg, setSearchArg] = useDebouncedState<string>('', onSearch);\n const lengthOptions = React.useMemo(() => options.length, [options]);\n\n const [checkedAll, setCheckedAll] = React.useState<boolean>(\n type === 'multi' && (value as Data[])?.length === lengthOptions\n );\n\n React.useEffect(() => {\n if (type === 'multi') {\n lengthOptions === (value as Data[])?.length\n ? setCheckedAll(true)\n : setCheckedAll(false);\n }\n }, [value, type, lengthOptions]);\n\n const onClickCheckAll = React.useCallback(() => {\n const items = options.map(option => option);\n let aux;\n setCheckedAll(prev => {\n aux = !prev;\n return !prev;\n });\n type OnSelectArg = Parameters<typeof onSelect>[0];\n const auxArray: Data[] = [];\n !aux ? onSelect(auxArray as OnSelectArg) : onSelect(items as OnSelectArg);\n }, [options, setCheckedAll, onSelect]);\n\n const onChange = React.useCallback(\n text => setSearchArg(text),\n [setSearchArg]\n );\n\n return (\n <StyledContainerDropdown\n lengthOptions={lengthOptions}\n style={style}\n anchor={anchor}\n >\n {type === 'multi' && (\n <StyledContainerCheckAll\n onClick={hideSearchBar ? onClickCheckAll : undefined}\n >\n <Checkbox checked={checkedAll} onChange={onClickCheckAll} />\n {!hideSearchBar ? (\n <SearchBarContainer>\n <SearchInput\n searchArg={searchArg}\n onChange={onChange}\n fullWidth={fullWidth}\n placeholder={searchBarPlaceholder}\n />\n </SearchBarContainer>\n ) : (\n <StyledContainerTextLabel>\n <Text fontWeight=\"bold\">\n <StyledSpan>{selectAllLabel}</StyledSpan>\n </Text>\n </StyledContainerTextLabel>\n )}\n </StyledContainerCheckAll>\n )}\n {type === 'single' && !hideSearchBar && (\n <PaddedContainer>\n <SearchInput\n searchArg={searchArg}\n onChange={onChange}\n fullWidth={fullWidth}\n placeholder={searchBarPlaceholder}\n />\n </PaddedContainer>\n )}\n <OptionsContainer lengthOptions={options.length}>\n {options.map((item, index) => (\n <ItemSelect\n type={type}\n key={keyExtractor(item)}\n item={item}\n onSelect={onSelect}\n value={value}\n keyExtractor={keyExtractor}\n index={index}\n labelExtractor={labelExtractor}\n setDropDownVisible={setDropDownVisible}\n checkedAll={checkedAll}\n setCheckedAll={setCheckedAll}\n lenghtOptions={lengthOptions}\n />\n ))}\n </OptionsContainer>\n </StyledContainerDropdown>\n );\n};\n\nexport default Dropdown;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,iBAAzB,QAAkD,wBAAlD;AACA,SAASC,UAAT;AAEA,SACEC,kBADF,EAEEC,uBAFF,EAGEC,uBAHF,EAIEC,wBAJF,EAKEC,UALF,EAMEC,gBANF,EAOEC,eAPF;AASA,SAASC,WAAT;AAEA,IAAMC,SAAS,GAAG;EAAEC,KAAK,EAAE;AAAT,CAAlB;;AAEA,IAAMC,Q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