@qoretechnologies/reqore 0.20.1 → 0.20.4
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/__tests__/modal.test.tsx +3 -8
- package/__tests__/panel.test.tsx +3 -3
- package/dist/src/components/Breadcrumbs/index.d.ts +33 -0
- package/dist/src/components/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/src/components/Breadcrumbs/index.js +167 -0
- package/dist/src/components/Breadcrumbs/index.js.map +1 -0
- package/dist/src/components/Breadcrumbs/item.d.ts +14 -0
- package/dist/src/components/Breadcrumbs/item.d.ts.map +1 -0
- package/dist/src/components/Breadcrumbs/item.js +84 -0
- package/dist/src/components/Breadcrumbs/item.js.map +1 -0
- package/dist/src/components/Button/index.d.ts +33 -0
- package/dist/src/components/Button/index.d.ts.map +1 -0
- package/dist/src/components/Button/index.js +154 -0
- package/dist/src/components/Button/index.js.map +1 -0
- package/dist/src/components/Checkbox/index.d.ts +26 -0
- package/dist/src/components/Checkbox/index.d.ts.map +1 -0
- package/dist/src/components/Checkbox/index.js +108 -0
- package/dist/src/components/Checkbox/index.js.map +1 -0
- package/dist/src/components/Columns/column.d.ts +5 -0
- package/dist/src/components/Columns/column.d.ts.map +1 -0
- package/dist/src/components/Columns/column.js +37 -0
- package/dist/src/components/Columns/column.js.map +1 -0
- package/dist/src/components/Columns/index.d.ts +17 -0
- package/dist/src/components/Columns/index.d.ts.map +1 -0
- package/dist/src/components/Columns/index.js +69 -0
- package/dist/src/components/Columns/index.js.map +1 -0
- package/dist/src/components/Comment/index.d.ts +24 -0
- package/dist/src/components/Comment/index.d.ts.map +1 -0
- package/dist/src/components/Comment/index.js +71 -0
- package/dist/src/components/Comment/index.js.map +1 -0
- package/dist/src/components/CommentFeed/index.d.ts +7 -0
- package/dist/src/components/CommentFeed/index.d.ts.map +1 -0
- package/dist/src/components/CommentFeed/index.js +49 -0
- package/dist/src/components/CommentFeed/index.js.map +1 -0
- package/dist/src/components/Content/index.d.ts +11 -0
- package/dist/src/components/Content/index.d.ts.map +1 -0
- package/dist/src/components/Content/index.js +70 -0
- package/dist/src/components/Content/index.js.map +1 -0
- package/dist/src/components/Content/wrapper.d.ts +11 -0
- package/dist/src/components/Content/wrapper.d.ts.map +1 -0
- package/dist/src/components/Content/wrapper.js +43 -0
- package/dist/src/components/Content/wrapper.js.map +1 -0
- package/dist/src/components/ControlGroup/index.d.ts +17 -0
- package/dist/src/components/ControlGroup/index.d.ts.map +1 -0
- package/dist/src/components/ControlGroup/index.js +90 -0
- package/dist/src/components/ControlGroup/index.js.map +1 -0
- package/dist/src/components/Drawer/index.d.ts +36 -0
- package/dist/src/components/Drawer/index.d.ts.map +1 -0
- package/dist/src/components/Drawer/index.js +251 -0
- package/dist/src/components/Drawer/index.js.map +1 -0
- package/dist/src/components/Dropdown/index.d.ts +24 -0
- package/dist/src/components/Dropdown/index.d.ts.map +1 -0
- package/dist/src/components/Dropdown/index.js +38 -0
- package/dist/src/components/Dropdown/index.js.map +1 -0
- package/dist/src/components/Dropdown/item.d.ts +10 -0
- package/dist/src/components/Dropdown/item.d.ts.map +1 -0
- package/dist/src/components/Dropdown/item.js +35 -0
- package/dist/src/components/Dropdown/item.js.map +1 -0
- package/dist/src/components/Dropdown/list.d.ts +14 -0
- package/dist/src/components/Dropdown/list.d.ts.map +1 -0
- package/dist/src/components/Dropdown/list.js +47 -0
- package/dist/src/components/Dropdown/list.js.map +1 -0
- package/dist/src/components/Header/index.d.ts +13 -0
- package/dist/src/components/Header/index.d.ts.map +1 -0
- package/dist/src/components/Header/index.js +44 -0
- package/dist/src/components/Header/index.js.map +1 -0
- package/dist/src/components/Icon/index.d.ts +16 -0
- package/dist/src/components/Icon/index.d.ts.map +1 -0
- package/dist/src/components/Icon/index.js +81 -0
- package/dist/src/components/Icon/index.js.map +1 -0
- package/dist/src/components/Input/index.d.ts +33 -0
- package/dist/src/components/Input/index.d.ts.map +1 -0
- package/dist/src/components/Input/index.js +115 -0
- package/dist/src/components/Input/index.js.map +1 -0
- package/dist/src/components/InputClearButton/index.d.ts +10 -0
- package/dist/src/components/InputClearButton/index.d.ts.map +1 -0
- package/dist/src/components/InputClearButton/index.js +49 -0
- package/dist/src/components/InputClearButton/index.js.map +1 -0
- package/dist/src/components/InternalPopover/index.d.ts +7 -0
- package/dist/src/components/InternalPopover/index.d.ts.map +1 -0
- package/dist/src/components/InternalPopover/index.js +132 -0
- package/dist/src/components/InternalPopover/index.js.map +1 -0
- package/dist/src/components/Layout/content.d.ts +8 -0
- package/dist/src/components/Layout/content.d.ts.map +1 -0
- package/dist/src/components/Layout/content.js +41 -0
- package/dist/src/components/Layout/content.js.map +1 -0
- package/dist/src/components/Layout/index.d.ts +8 -0
- package/dist/src/components/Layout/index.d.ts.map +1 -0
- package/dist/src/components/Layout/index.js +69 -0
- package/dist/src/components/Layout/index.js.map +1 -0
- package/dist/src/components/Menu/divider.d.ts +7 -0
- package/dist/src/components/Menu/divider.d.ts.map +1 -0
- package/dist/src/components/Menu/divider.js +49 -0
- package/dist/src/components/Menu/divider.js.map +1 -0
- package/dist/src/components/Menu/index.d.ts +17 -0
- package/dist/src/components/Menu/index.d.ts.map +1 -0
- package/dist/src/components/Menu/index.js +89 -0
- package/dist/src/components/Menu/index.js.map +1 -0
- package/dist/src/components/Menu/item.d.ts +31 -0
- package/dist/src/components/Menu/item.d.ts.map +1 -0
- package/dist/src/components/Menu/item.js +121 -0
- package/dist/src/components/Menu/item.js.map +1 -0
- package/dist/src/components/Message/index.d.ts +25 -0
- package/dist/src/components/Message/index.d.ts.map +1 -0
- package/dist/src/components/Message/index.js +54 -0
- package/dist/src/components/Message/index.js.map +1 -0
- package/dist/src/components/Modal/index.d.ts +14 -0
- package/dist/src/components/Modal/index.d.ts.map +1 -0
- package/dist/src/components/Modal/index.js +33 -0
- package/dist/src/components/Modal/index.js.map +1 -0
- package/dist/src/components/Navbar/divider.d.ts +9 -0
- package/dist/src/components/Navbar/divider.d.ts.map +1 -0
- package/dist/src/components/Navbar/divider.js +47 -0
- package/dist/src/components/Navbar/divider.js.map +1 -0
- package/dist/src/components/Navbar/group.d.ts +15 -0
- package/dist/src/components/Navbar/group.d.ts.map +1 -0
- package/dist/src/components/Navbar/group.js +75 -0
- package/dist/src/components/Navbar/group.js.map +1 -0
- package/dist/src/components/Navbar/index.d.ts +16 -0
- package/dist/src/components/Navbar/index.d.ts.map +1 -0
- package/dist/src/components/Navbar/index.js +86 -0
- package/dist/src/components/Navbar/index.js.map +1 -0
- package/dist/src/components/Navbar/item.d.ts +16 -0
- package/dist/src/components/Navbar/item.d.ts.map +1 -0
- package/dist/src/components/Navbar/item.js +81 -0
- package/dist/src/components/Navbar/item.js.map +1 -0
- package/dist/src/components/Notifications/index.d.ts +12 -0
- package/dist/src/components/Notifications/index.d.ts.map +1 -0
- package/dist/src/components/Notifications/index.js +60 -0
- package/dist/src/components/Notifications/index.js.map +1 -0
- package/dist/src/components/Notifications/notification.d.ts +43 -0
- package/dist/src/components/Notifications/notification.d.ts.map +1 -0
- package/dist/src/components/Notifications/notification.js +140 -0
- package/dist/src/components/Notifications/notification.js.map +1 -0
- package/dist/src/components/Panel/index.d.ts +49 -0
- package/dist/src/components/Panel/index.d.ts.map +1 -0
- package/dist/src/components/Panel/index.js +172 -0
- package/dist/src/components/Panel/index.js.map +1 -0
- package/dist/src/components/Panel/panel.screenshot.d.ts +3 -0
- package/dist/src/components/Panel/panel.screenshot.d.ts.map +1 -0
- package/dist/src/components/Panel/panel.screenshot.js +30 -0
- package/dist/src/components/Panel/panel.screenshot.js.map +1 -0
- package/dist/src/components/Paragraph/index.d.ts +8 -0
- package/dist/src/components/Paragraph/index.d.ts.map +1 -0
- package/dist/src/components/Paragraph/index.js +64 -0
- package/dist/src/components/Paragraph/index.js.map +1 -0
- package/dist/src/components/Popover/index.d.ts +16 -0
- package/dist/src/components/Popover/index.d.ts.map +1 -0
- package/dist/src/components/Popover/index.js +55 -0
- package/dist/src/components/Popover/index.js.map +1 -0
- package/dist/src/components/RadioGroup/index.d.ts +17 -0
- package/dist/src/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/src/components/RadioGroup/index.js +48 -0
- package/dist/src/components/RadioGroup/index.js.map +1 -0
- package/dist/src/components/Sidebar/index.d.ts +60 -0
- package/dist/src/components/Sidebar/index.d.ts.map +1 -0
- package/dist/src/components/Sidebar/index.js +265 -0
- package/dist/src/components/Sidebar/index.js.map +1 -0
- package/dist/src/components/Sidebar/item.d.ts +36 -0
- package/dist/src/components/Sidebar/item.d.ts.map +1 -0
- package/dist/src/components/Sidebar/item.js +106 -0
- package/dist/src/components/Sidebar/item.js.map +1 -0
- package/dist/src/components/Table/body.d.ts +10 -0
- package/dist/src/components/Table/body.d.ts.map +1 -0
- package/dist/src/components/Table/body.js +44 -0
- package/dist/src/components/Table/body.js.map +1 -0
- package/dist/src/components/Table/header.d.ts +29 -0
- package/dist/src/components/Table/header.d.ts.map +1 -0
- package/dist/src/components/Table/header.js +106 -0
- package/dist/src/components/Table/header.js.map +1 -0
- package/dist/src/components/Table/headerCell.d.ts +18 -0
- package/dist/src/components/Table/headerCell.d.ts.map +1 -0
- package/dist/src/components/Table/headerCell.js +92 -0
- package/dist/src/components/Table/headerCell.js.map +1 -0
- package/dist/src/components/Table/helpers.d.ts +8 -0
- package/dist/src/components/Table/helpers.d.ts.map +1 -0
- package/dist/src/components/Table/helpers.js +41 -0
- package/dist/src/components/Table/helpers.js.map +1 -0
- package/dist/src/components/Table/index.d.ts +75 -0
- package/dist/src/components/Table/index.d.ts.map +1 -0
- package/dist/src/components/Table/index.js +165 -0
- package/dist/src/components/Table/index.js.map +1 -0
- package/dist/src/components/Table/row.d.ts +58 -0
- package/dist/src/components/Table/row.d.ts.map +1 -0
- package/dist/src/components/Table/row.js +204 -0
- package/dist/src/components/Table/row.js.map +1 -0
- package/dist/src/components/Tabs/content.d.ts +8 -0
- package/dist/src/components/Tabs/content.d.ts.map +1 -0
- package/dist/src/components/Tabs/content.js +41 -0
- package/dist/src/components/Tabs/content.js.map +1 -0
- package/dist/src/components/Tabs/index.d.ts +39 -0
- package/dist/src/components/Tabs/index.d.ts.map +1 -0
- package/dist/src/components/Tabs/index.js +83 -0
- package/dist/src/components/Tabs/index.js.map +1 -0
- package/dist/src/components/Tabs/item.d.ts +23 -0
- package/dist/src/components/Tabs/item.d.ts.map +1 -0
- package/dist/src/components/Tabs/item.js +71 -0
- package/dist/src/components/Tabs/item.js.map +1 -0
- package/dist/src/components/Tabs/list.d.ts +17 -0
- package/dist/src/components/Tabs/list.d.ts.map +1 -0
- package/dist/src/components/Tabs/list.js +189 -0
- package/dist/src/components/Tabs/list.js.map +1 -0
- package/dist/src/components/Tag/group.d.ts +10 -0
- package/dist/src/components/Tag/group.d.ts.map +1 -0
- package/dist/src/components/Tag/group.js +50 -0
- package/dist/src/components/Tag/group.js.map +1 -0
- package/dist/src/components/Tag/index.d.ts +36 -0
- package/dist/src/components/Tag/index.d.ts.map +1 -0
- package/dist/src/components/Tag/index.js +136 -0
- package/dist/src/components/Tag/index.js.map +1 -0
- package/dist/src/components/Textarea/index.d.ts +26 -0
- package/dist/src/components/Textarea/index.d.ts.map +1 -0
- package/dist/src/components/Textarea/index.js +85 -0
- package/dist/src/components/Textarea/index.js.map +1 -0
- package/dist/src/components/TimeAgo/index.d.ts +4 -0
- package/dist/src/components/TimeAgo/index.d.ts.map +1 -0
- package/dist/src/components/TimeAgo/index.js +21 -0
- package/dist/src/components/TimeAgo/index.js.map +1 -0
- package/dist/src/components/Tree/index.d.ts +16 -0
- package/dist/src/components/Tree/index.d.ts.map +1 -0
- package/dist/src/components/Tree/index.js +155 -0
- package/dist/src/components/Tree/index.js.map +1 -0
- package/dist/src/constants/animations.d.ts +5 -0
- package/dist/src/constants/animations.d.ts.map +1 -0
- package/dist/src/constants/animations.js +8 -0
- package/dist/src/constants/animations.js.map +1 -0
- package/dist/src/constants/colors.d.ts +10 -0
- package/dist/src/constants/colors.d.ts.map +1 -0
- package/dist/src/constants/colors.js +13 -0
- package/dist/src/constants/colors.js.map +1 -0
- package/dist/src/constants/sizes.d.ts +59 -0
- package/dist/src/constants/sizes.d.ts.map +1 -0
- package/dist/src/constants/sizes.js +60 -0
- package/dist/src/constants/sizes.js.map +1 -0
- package/dist/src/constants/theme.d.ts +81 -0
- package/dist/src/constants/theme.d.ts.map +1 -0
- package/dist/src/constants/theme.js +20 -0
- package/dist/src/constants/theme.js.map +1 -0
- package/dist/src/containers/PopoverProvider.d.ts +13 -0
- package/dist/src/containers/PopoverProvider.d.ts.map +1 -0
- package/dist/src/containers/PopoverProvider.js +81 -0
- package/dist/src/containers/PopoverProvider.js.map +1 -0
- package/dist/src/containers/ReqoreProvider.d.ts +40 -0
- package/dist/src/containers/ReqoreProvider.d.ts.map +1 -0
- package/dist/src/containers/ReqoreProvider.js +125 -0
- package/dist/src/containers/ReqoreProvider.js.map +1 -0
- package/dist/src/containers/ThemeProvider.d.ts +8 -0
- package/dist/src/containers/ThemeProvider.d.ts.map +1 -0
- package/dist/src/containers/ThemeProvider.js +27 -0
- package/dist/src/containers/ThemeProvider.js.map +1 -0
- package/dist/src/containers/UIProvider.d.ts +13 -0
- package/dist/src/containers/UIProvider.d.ts.map +1 -0
- package/dist/src/containers/UIProvider.js +43 -0
- package/dist/src/containers/UIProvider.js.map +1 -0
- package/dist/src/context/PopoverContext.d.ts +11 -0
- package/dist/src/context/PopoverContext.d.ts.map +1 -0
- package/dist/src/context/PopoverContext.js +5 -0
- package/dist/src/context/PopoverContext.js.map +1 -0
- package/dist/src/context/ReqoreContext.d.ts +15 -0
- package/dist/src/context/ReqoreContext.d.ts.map +1 -0
- package/dist/src/context/ReqoreContext.js +10 -0
- package/dist/src/context/ReqoreContext.js.map +1 -0
- package/dist/src/context/ThemeContext.d.ts +5 -0
- package/dist/src/context/ThemeContext.d.ts.map +1 -0
- package/dist/src/context/ThemeContext.js +6 -0
- package/dist/src/context/ThemeContext.js.map +1 -0
- package/dist/src/helpers/animations.d.ts +2 -0
- package/dist/src/helpers/animations.d.ts.map +1 -0
- package/dist/src/helpers/animations.js +11 -0
- package/dist/src/helpers/animations.js.map +1 -0
- package/dist/src/helpers/colors.d.ts +14 -0
- package/dist/src/helpers/colors.d.ts.map +1 -0
- package/dist/src/helpers/colors.js +108 -0
- package/dist/src/helpers/colors.js.map +1 -0
- package/dist/src/helpers/sidebar.d.ts +4 -0
- package/dist/src/helpers/sidebar.d.ts.map +1 -0
- package/dist/src/helpers/sidebar.js +90 -0
- package/dist/src/helpers/sidebar.js.map +1 -0
- package/dist/src/helpers/time.d.ts +8 -0
- package/dist/src/helpers/time.d.ts.map +1 -0
- package/dist/src/helpers/time.js +25 -0
- package/dist/src/helpers/time.js.map +1 -0
- package/dist/src/helpers/utils.d.ts +5 -0
- package/dist/src/helpers/utils.d.ts.map +1 -0
- package/dist/src/helpers/utils.js +103 -0
- package/dist/src/helpers/utils.js.map +1 -0
- package/dist/src/hooks/useCombinedRefs.d.ts +3 -0
- package/dist/src/hooks/useCombinedRefs.d.ts.map +1 -0
- package/dist/src/hooks/useCombinedRefs.js +29 -0
- package/dist/src/hooks/useCombinedRefs.js.map +1 -0
- package/dist/src/hooks/useLatestZIndex.d.ts +3 -0
- package/dist/src/hooks/useLatestZIndex.d.ts.map +1 -0
- package/dist/src/hooks/useLatestZIndex.js +11 -0
- package/dist/src/hooks/useLatestZIndex.js.map +1 -0
- package/dist/src/hooks/useOutsideClick.d.ts +4 -0
- package/dist/src/hooks/useOutsideClick.d.ts.map +1 -0
- package/dist/src/hooks/useOutsideClick.js +19 -0
- package/dist/src/hooks/useOutsideClick.js.map +1 -0
- package/dist/src/hooks/usePopover.d.ts +19 -0
- package/dist/src/hooks/usePopover.d.ts.map +1 -0
- package/dist/src/hooks/usePopover.js +86 -0
- package/dist/src/hooks/usePopover.js.map +1 -0
- package/dist/src/hooks/useShareForwardedRef.d.ts +3 -0
- package/dist/src/hooks/useShareForwardedRef.d.ts.map +1 -0
- package/dist/src/hooks/useShareForwardedRef.js +25 -0
- package/dist/src/hooks/useShareForwardedRef.js.map +1 -0
- package/dist/src/hooks/useTheme.d.ts +3 -0
- package/dist/src/hooks/useTheme.d.ts.map +1 -0
- package/dist/src/hooks/useTheme.js +21 -0
- package/dist/src/hooks/useTheme.js.map +1 -0
- package/dist/src/hooks/useTooltip.d.ts +3 -0
- package/dist/src/hooks/useTooltip.d.ts.map +1 -0
- package/dist/src/hooks/useTooltip.js +24 -0
- package/dist/src/hooks/useTooltip.js.map +1 -0
- package/dist/src/icons.json +2295 -0
- package/dist/src/index.d.ts +50 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +122 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/mock/breadcrumbs.d.ts +5 -0
- package/dist/src/mock/breadcrumbs.d.ts.map +1 -0
- package/dist/src/mock/breadcrumbs.js +94 -0
- package/dist/src/mock/breadcrumbs.js.map +1 -0
- package/dist/src/mock/icons.d.ts +5 -0
- package/dist/src/mock/icons.d.ts.map +1 -0
- package/dist/src/mock/icons.js +34 -0
- package/dist/src/mock/icons.js.map +1 -0
- package/dist/src/mock/menu.d.ts +3 -0
- package/dist/src/mock/menu.d.ts.map +1 -0
- package/dist/src/mock/menu.js +97 -0
- package/dist/src/mock/menu.js.map +1 -0
- package/dist/src/mock/object.json +317 -0
- package/dist/src/mock/tableData.d.ts +8 -0
- package/dist/src/mock/tableData.d.ts.map +1 -0
- package/dist/src/mock/tableData.js +53 -0
- package/dist/src/mock/tableData.js.map +1 -0
- package/dist/src/stories/Breadcrumbs/Breadcrumbs.stories.d.ts +10 -0
- package/dist/src/stories/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/dist/src/stories/Breadcrumbs/Breadcrumbs.stories.js +72 -0
- package/dist/src/stories/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
- package/dist/src/stories/Button/Button.stories.d.ts +12 -0
- package/dist/src/stories/Button/Button.stories.d.ts.map +1 -0
- package/dist/src/stories/Button/Button.stories.js +57 -0
- package/dist/src/stories/Button/Button.stories.js.map +1 -0
- package/dist/src/stories/Checkbox/Checkbox.stories.d.ts +7 -0
- package/dist/src/stories/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/dist/src/stories/Checkbox/Checkbox.stories.js +29 -0
- package/dist/src/stories/Checkbox/Checkbox.stories.js.map +1 -0
- package/dist/src/stories/Columns/Columns.stories.d.ts +10 -0
- package/dist/src/stories/Columns/Columns.stories.d.ts.map +1 -0
- package/dist/src/stories/Columns/Columns.stories.js +49 -0
- package/dist/src/stories/Columns/Columns.stories.js.map +1 -0
- package/dist/src/stories/Comment/Comment.stories.d.ts +7 -0
- package/dist/src/stories/Comment/Comment.stories.d.ts.map +1 -0
- package/dist/src/stories/Comment/Comment.stories.js +43 -0
- package/dist/src/stories/Comment/Comment.stories.js.map +1 -0
- package/dist/src/stories/ControlGroup/ControlGroup.stories.d.ts +8 -0
- package/dist/src/stories/ControlGroup/ControlGroup.stories.d.ts.map +1 -0
- package/dist/src/stories/ControlGroup/ControlGroup.stories.js +44 -0
- package/dist/src/stories/ControlGroup/ControlGroup.stories.js.map +1 -0
- package/dist/src/stories/Drawer/Drawer.stories.d.ts +8 -0
- package/dist/src/stories/Drawer/Drawer.stories.d.ts.map +1 -0
- package/dist/src/stories/Drawer/Drawer.stories.js +97 -0
- package/dist/src/stories/Drawer/Drawer.stories.js.map +1 -0
- package/dist/src/stories/Dropdown/Dropdown.stories.d.ts +8 -0
- package/dist/src/stories/Dropdown/Dropdown.stories.d.ts.map +1 -0
- package/dist/src/stories/Dropdown/Dropdown.stories.js +141 -0
- package/dist/src/stories/Dropdown/Dropdown.stories.js.map +1 -0
- package/dist/src/stories/Icon/Icon.stories.d.ts +6 -0
- package/dist/src/stories/Icon/Icon.stories.d.ts.map +1 -0
- package/dist/src/stories/Icon/Icon.stories.js +13 -0
- package/dist/src/stories/Icon/Icon.stories.js.map +1 -0
- package/dist/src/stories/Input/Input.stories.d.ts +6 -0
- package/dist/src/stories/Input/Input.stories.d.ts.map +1 -0
- package/dist/src/stories/Input/Input.stories.js +38 -0
- package/dist/src/stories/Input/Input.stories.js.map +1 -0
- package/dist/src/stories/Menu/Menu.stories.d.ts +6 -0
- package/dist/src/stories/Menu/Menu.stories.d.ts.map +1 -0
- package/dist/src/stories/Menu/Menu.stories.js +48 -0
- package/dist/src/stories/Menu/Menu.stories.js.map +1 -0
- package/dist/src/stories/Message/Message.stories.d.ts +8 -0
- package/dist/src/stories/Message/Message.stories.d.ts.map +1 -0
- package/dist/src/stories/Message/Message.stories.js +50 -0
- package/dist/src/stories/Message/Message.stories.js.map +1 -0
- package/dist/src/stories/Modal/Modal.stories.d.ts +7 -0
- package/dist/src/stories/Modal/Modal.stories.d.ts.map +1 -0
- package/dist/src/stories/Modal/Modal.stories.js +77 -0
- package/dist/src/stories/Modal/Modal.stories.js.map +1 -0
- package/dist/src/stories/Navbar/Navbar.stories.d.ts +6 -0
- package/dist/src/stories/Navbar/Navbar.stories.d.ts.map +1 -0
- package/dist/src/stories/Navbar/Navbar.stories.js +33 -0
- package/dist/src/stories/Navbar/Navbar.stories.js.map +1 -0
- package/dist/src/stories/Notifications/Interactive.stories.d.ts +9 -0
- package/dist/src/stories/Notifications/Interactive.stories.d.ts.map +1 -0
- package/dist/src/stories/Notifications/Interactive.stories.js +100 -0
- package/dist/src/stories/Notifications/Interactive.stories.js.map +1 -0
- package/dist/src/stories/Notifications/Notification.stories.d.ts +9 -0
- package/dist/src/stories/Notifications/Notification.stories.d.ts.map +1 -0
- package/dist/src/stories/Notifications/Notification.stories.js +96 -0
- package/dist/src/stories/Notifications/Notification.stories.js.map +1 -0
- package/dist/src/stories/Notifications/Notifications.stories.d.ts +10 -0
- package/dist/src/stories/Notifications/Notifications.stories.d.ts.map +1 -0
- package/dist/src/stories/Notifications/Notifications.stories.js +63 -0
- package/dist/src/stories/Notifications/Notifications.stories.js.map +1 -0
- package/dist/src/stories/Panel/Panel.stories.d.ts +9 -0
- package/dist/src/stories/Panel/Panel.stories.d.ts.map +1 -0
- package/dist/src/stories/Panel/Panel.stories.js +79 -0
- package/dist/src/stories/Panel/Panel.stories.js.map +1 -0
- package/dist/src/stories/Popover/Popover.stories.d.ts +6 -0
- package/dist/src/stories/Popover/Popover.stories.d.ts.map +1 -0
- package/dist/src/stories/Popover/Popover.stories.js +46 -0
- package/dist/src/stories/Popover/Popover.stories.js.map +1 -0
- package/dist/src/stories/RadioGroup/RadioGroup.stories.d.ts +7 -0
- package/dist/src/stories/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
- package/dist/src/stories/RadioGroup/RadioGroup.stories.js +54 -0
- package/dist/src/stories/RadioGroup/RadioGroup.stories.js.map +1 -0
- package/dist/src/stories/Sidebar/Sidebar.stories.d.ts +6 -0
- package/dist/src/stories/Sidebar/Sidebar.stories.d.ts.map +1 -0
- package/dist/src/stories/Sidebar/Sidebar.stories.js +65 -0
- package/dist/src/stories/Sidebar/Sidebar.stories.js.map +1 -0
- package/dist/src/stories/Table/Table.stories.d.ts +10 -0
- package/dist/src/stories/Table/Table.stories.d.ts.map +1 -0
- package/dist/src/stories/Table/Table.stories.js +157 -0
- package/dist/src/stories/Table/Table.stories.js.map +1 -0
- package/dist/src/stories/Tabs/Tabs.stories.d.ts +12 -0
- package/dist/src/stories/Tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/src/stories/Tabs/Tabs.stories.js +127 -0
- package/dist/src/stories/Tabs/Tabs.stories.js.map +1 -0
- package/dist/src/stories/Tag/Tag.stories.d.ts +8 -0
- package/dist/src/stories/Tag/Tag.stories.d.ts.map +1 -0
- package/dist/src/stories/Tag/Tag.stories.js +79 -0
- package/dist/src/stories/Tag/Tag.stories.js.map +1 -0
- package/dist/src/stories/TextArea/TextArea.stories.d.ts +8 -0
- package/dist/src/stories/TextArea/TextArea.stories.d.ts.map +1 -0
- package/dist/src/stories/TextArea/TextArea.stories.js +65 -0
- package/dist/src/stories/TextArea/TextArea.stories.js.map +1 -0
- package/dist/src/stories/Tree/Tree.stories.d.ts +7 -0
- package/dist/src/stories/Tree/Tree.stories.d.ts.map +1 -0
- package/dist/src/stories/Tree/Tree.stories.js +52 -0
- package/dist/src/stories/Tree/Tree.stories.js.map +1 -0
- package/dist/src/stories/Wrapper.d.ts +4 -0
- package/dist/src/stories/Wrapper.d.ts.map +1 -0
- package/dist/src/stories/Wrapper.js +38 -0
- package/dist/src/stories/Wrapper.js.map +1 -0
- package/dist/src/stories/utils/args.d.ts +61 -0
- package/dist/src/stories/utils/args.d.ts.map +1 -0
- package/dist/src/stories/utils/args.js +120 -0
- package/dist/src/stories/utils/args.js.map +1 -0
- package/dist/src/stories/utils.d.ts +11 -0
- package/dist/src/stories/utils.d.ts.map +1 -0
- package/dist/src/stories/utils.js +17 -0
- package/dist/src/stories/utils.js.map +1 -0
- package/dist/src/styles.d.ts +5 -0
- package/dist/src/styles.d.ts.map +1 -0
- package/dist/src/styles.js +16 -0
- package/dist/src/styles.js.map +1 -0
- package/dist/src/types/global.d.ts +9 -0
- package/dist/src/types/global.d.ts.map +1 -0
- package/dist/src/types/global.js +3 -0
- package/dist/src/types/global.js.map +1 -0
- package/dist/src/types/icons.d.ts +2 -0
- package/dist/src/types/icons.d.ts.map +1 -0
- package/dist/src/types/icons.js +3 -0
- package/dist/src/types/icons.js.map +1 -0
- package/dist/src/types/icons____.d.ts +2 -0
- package/dist/src/types/icons____.d.ts.map +1 -0
- package/dist/src/types/icons____.js +5 -0
- package/dist/src/types/icons____.js.map +1 -0
- package/dist/tests.json +1 -1
- package/package.json +2 -2
- package/src/components/Breadcrumbs/index.tsx +286 -0
- package/src/components/Breadcrumbs/item.tsx +162 -0
- package/src/components/Button/index.tsx +270 -0
- package/src/components/Checkbox/index.tsx +161 -0
- package/src/components/Columns/column.tsx +26 -0
- package/src/components/Columns/index.tsx +40 -0
- package/src/components/Comment/index.tsx +139 -0
- package/src/components/CommentFeed/index.tsx +34 -0
- package/src/components/Content/index.tsx +39 -0
- package/src/components/Content/wrapper.tsx +37 -0
- package/src/components/ControlGroup/index.tsx +81 -0
- package/src/components/Drawer/index.tsx +387 -0
- package/src/components/Dropdown/index.tsx +81 -0
- package/src/components/Dropdown/item.tsx +20 -0
- package/src/components/Dropdown/list.tsx +76 -0
- package/src/components/Header/index.tsx +38 -0
- package/src/components/Icon/index.tsx +83 -0
- package/src/components/Input/index.tsx +185 -0
- package/src/components/InputClearButton/index.tsx +34 -0
- package/src/components/InternalPopover/index.tsx +185 -0
- package/src/components/Layout/content.tsx +31 -0
- package/src/components/Layout/index.tsx +55 -0
- package/src/components/Menu/divider.tsx +36 -0
- package/src/components/Menu/index.tsx +64 -0
- package/src/components/Menu/item.tsx +219 -0
- package/src/components/Message/index.tsx +136 -0
- package/src/components/Modal/index.tsx +26 -0
- package/src/components/Navbar/divider.tsx +51 -0
- package/src/components/Navbar/group.tsx +57 -0
- package/src/components/Navbar/index.tsx +81 -0
- package/src/components/Navbar/item.tsx +75 -0
- package/src/components/Notifications/index.tsx +56 -0
- package/src/components/Notifications/notification.tsx +288 -0
- package/src/components/Panel/__screenshots__/linux/panel-SomePanel.png +0 -0
- package/src/components/Panel/index.tsx +333 -0
- package/src/components/Panel/panel.screenshot.tsx +29 -0
- package/src/components/Paragraph/index.tsx +25 -0
- package/src/components/Popover/index.tsx +65 -0
- package/src/components/RadioGroup/index.tsx +52 -0
- package/src/components/Sidebar/index.tsx +526 -0
- package/src/components/Sidebar/item.tsx +269 -0
- package/src/components/Table/body.tsx +46 -0
- package/src/components/Table/header.tsx +173 -0
- package/src/components/Table/headerCell.tsx +117 -0
- package/src/components/Table/helpers.ts +19 -0
- package/src/components/Table/index.tsx +265 -0
- package/src/components/Table/row.tsx +355 -0
- package/src/components/Tabs/content.tsx +23 -0
- package/src/components/Tabs/index.tsx +117 -0
- package/src/components/Tabs/item.tsx +151 -0
- package/src/components/Tabs/list.tsx +281 -0
- package/src/components/Tag/group.tsx +32 -0
- package/src/components/Tag/index.tsx +237 -0
- package/src/components/Textarea/index.tsx +121 -0
- package/src/components/TimeAgo/index.tsx +15 -0
- package/src/components/Tree/index.tsx +255 -0
- package/src/constants/animations.ts +4 -0
- package/src/constants/colors.ts +9 -0
- package/src/constants/sizes.ts +66 -0
- package/src/constants/theme.ts +102 -0
- package/src/containers/PopoverProvider.tsx +85 -0
- package/src/containers/ReqoreProvider.tsx +194 -0
- package/src/containers/ThemeProvider.tsx +22 -0
- package/src/containers/UIProvider.tsx +54 -0
- package/src/context/PopoverContext.tsx +10 -0
- package/src/context/ReqoreContext.tsx +20 -0
- package/src/context/ThemeContext.tsx +4 -0
- package/src/helpers/animations.ts +13 -0
- package/src/helpers/colors.ts +127 -0
- package/src/helpers/sidebar.ts +105 -0
- package/src/helpers/time.ts +21 -0
- package/src/helpers/utils.ts +75 -0
- package/src/hooks/useCombinedRefs.ts +19 -0
- package/src/hooks/useLatestZIndex.ts +11 -0
- package/src/hooks/useOutsideClick.ts +29 -0
- package/src/hooks/usePopover.tsx +118 -0
- package/src/hooks/useShareForwardedRef.ts +23 -0
- package/src/hooks/useTheme.ts +20 -0
- package/src/hooks/useTooltip.ts +15 -0
- package/src/icons.json +2295 -0
- package/src/index.tsx +49 -0
- package/src/mock/breadcrumbs.ts +93 -0
- package/src/mock/icons.ts +32 -0
- package/src/mock/menu.ts +95 -0
- package/src/mock/object.json +317 -0
- package/src/mock/styleMock.js +1 -0
- package/src/mock/tableData.ts +40 -0
- package/src/stories/Breadcrumbs/Breadcrumbs.stories.tsx +38 -0
- package/src/stories/Button/Button.stories.tsx +69 -0
- package/src/stories/Checkbox/Checkbox.stories.tsx +26 -0
- package/src/stories/Columns/Columns.stories.tsx +71 -0
- package/src/stories/Comment/Comment.stories.tsx +127 -0
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +43 -0
- package/src/stories/Drawer/Drawer.stories.tsx +181 -0
- package/src/stories/Dropdown/Dropdown.stories.tsx +160 -0
- package/src/stories/Icon/Icon.stories.tsx +35 -0
- package/src/stories/Input/Input.stories.tsx +77 -0
- package/src/stories/Menu/Menu.stories.tsx +94 -0
- package/src/stories/Message/Message.stories.tsx +52 -0
- package/src/stories/Modal/Modal.stories.tsx +148 -0
- package/src/stories/Navbar/Navbar.stories.tsx +109 -0
- package/src/stories/Notifications/Interactive.stories.tsx +105 -0
- package/src/stories/Notifications/Notification.stories.tsx +200 -0
- package/src/stories/Notifications/Notifications.stories.tsx +65 -0
- package/src/stories/Panel/Panel.stories.tsx +107 -0
- package/src/stories/Popover/Popover.stories.tsx +54 -0
- package/src/stories/RadioGroup/RadioGroup.stories.tsx +51 -0
- package/src/stories/Sidebar/Sidebar.stories.tsx +78 -0
- package/src/stories/Table/Table.stories.tsx +151 -0
- package/src/stories/Tabs/Tabs.stories.tsx +233 -0
- package/src/stories/Tag/Tag.stories.tsx +72 -0
- package/src/stories/TextArea/TextArea.stories.tsx +74 -0
- package/src/stories/Tree/Tree.stories.tsx +43 -0
- package/src/stories/Wrapper.tsx +13 -0
- package/src/stories/utils/args.ts +138 -0
- package/src/stories/utils.ts +17 -0
- package/src/styles.ts +38 -0
- package/src/types/global.ts +9 -0
- package/src/types/icons.ts +2272 -0
- package/src/types/icons____.ts +5 -0
- package/tests.json +1 -1
- package/tsconfig.prod.json +26 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Placement } from '@popperjs/core';
|
|
2
|
+
import { darken, rgba } from 'polished';
|
|
3
|
+
import React, { forwardRef, useRef } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { RADIUS_FROM_SIZE, SIZE_TO_PX, TEXT_FROM_SIZE, TSizes } from '../../constants/sizes';
|
|
6
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
7
|
+
import { changeLightness, getReadableColor } from '../../helpers/colors';
|
|
8
|
+
import { useCombinedRefs } from '../../hooks/useCombinedRefs';
|
|
9
|
+
import usePopover from '../../hooks/usePopover';
|
|
10
|
+
import { IReqoreIconName } from '../../types/icons';
|
|
11
|
+
import ReqoreIcon from '../Icon';
|
|
12
|
+
import ReqoreInputClearButton from '../InputClearButton';
|
|
13
|
+
|
|
14
|
+
export interface IReqoreInputProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
15
|
+
autoFocus?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
tooltipPlacement?: Placement;
|
|
19
|
+
width?: number;
|
|
20
|
+
size?: TSizes;
|
|
21
|
+
minimal?: boolean;
|
|
22
|
+
fluid?: boolean;
|
|
23
|
+
fixed?: boolean;
|
|
24
|
+
value?: string | number;
|
|
25
|
+
onClearClick?: () => void;
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
icon?: IReqoreIconName;
|
|
28
|
+
flat?: boolean;
|
|
29
|
+
rounded?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface IReqoreInputStyle extends IReqoreInputProps {
|
|
33
|
+
theme: IReqoreTheme;
|
|
34
|
+
_size?: TSizes;
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
hasIcon?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const StyledInputWrapper = styled.div<IReqoreInputStyle>`
|
|
40
|
+
height: ${({ _size }) => SIZE_TO_PX[_size]}px;
|
|
41
|
+
width: ${({ width }) => (width ? `${width}px` : 'auto')};
|
|
42
|
+
flex: ${({ fluid, fixed }) => (fixed ? '0 auto' : fluid ? '1' : '0 0 auto')};
|
|
43
|
+
font-size: ${({ _size }) => TEXT_FROM_SIZE[_size]}px;
|
|
44
|
+
position: relative;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
border-radius: ${({ minimal, rounded, _size }) =>
|
|
47
|
+
minimal || !rounded ? 0 : RADIUS_FROM_SIZE[_size]}px;
|
|
48
|
+
border: ${({ minimal, theme, flat }) =>
|
|
49
|
+
!minimal && !flat ? `1px solid ${rgba(getReadableColor(theme), 0.2)}` : 0};
|
|
50
|
+
border-bottom: ${({ minimal, theme, flat }) =>
|
|
51
|
+
minimal && !flat ? `0.5px solid ${rgba(getReadableColor(theme), 0.2)}` : undefined};
|
|
52
|
+
|
|
53
|
+
transition: all 0.2s ease-out;
|
|
54
|
+
|
|
55
|
+
&:active,
|
|
56
|
+
&:focus,
|
|
57
|
+
&:hover {
|
|
58
|
+
outline: none;
|
|
59
|
+
border-color: ${({ theme }) => rgba(getReadableColor(theme), 0.3)};
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
const StyledIconWrapper = styled.div<IReqoreInputStyle>`
|
|
64
|
+
position: absolute;
|
|
65
|
+
height: ${({ _size }) => SIZE_TO_PX[_size]}px;
|
|
66
|
+
width: ${({ _size }) => SIZE_TO_PX[_size]}px;
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
align-items: center;
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
export const StyledInput = styled.input<IReqoreInputStyle>`
|
|
73
|
+
height: 100%;
|
|
74
|
+
width: 100%;
|
|
75
|
+
flex: 1;
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: 0 7px;
|
|
78
|
+
padding-right: ${({ clearable, _size }) => (clearable ? SIZE_TO_PX[_size] : 7)}px;
|
|
79
|
+
padding-left: ${({ hasIcon, _size }) => (hasIcon ? SIZE_TO_PX[_size] : 7)}px;
|
|
80
|
+
font-size: ${({ _size }) => TEXT_FROM_SIZE[_size]}px;
|
|
81
|
+
border: none;
|
|
82
|
+
|
|
83
|
+
background-color: ${({ theme, minimal }: IReqoreInputStyle) =>
|
|
84
|
+
minimal ? 'transparent' : darken(0.01, theme.main)};
|
|
85
|
+
color: ${({ theme }: IReqoreInputStyle) => getReadableColor(theme)};
|
|
86
|
+
|
|
87
|
+
transition: all 0.2s ease-out;
|
|
88
|
+
|
|
89
|
+
&:active,
|
|
90
|
+
&:focus,
|
|
91
|
+
&:hover {
|
|
92
|
+
outline: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:active,
|
|
96
|
+
&:focus {
|
|
97
|
+
background-color: ${({ theme, minimal }: IReqoreInputStyle) =>
|
|
98
|
+
minimal ? 'transparent' : changeLightness(darken(0.01, theme.main), 0.01)};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&::placeholder {
|
|
102
|
+
transition: all 0.2s ease-out;
|
|
103
|
+
color: ${({ theme }) => rgba(getReadableColor(theme), 0.3)};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:focus {
|
|
107
|
+
&::placeholder {
|
|
108
|
+
color: ${({ theme }) => rgba(getReadableColor(theme), 0.5)};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:disabled {
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
opacity: 0.3;
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
|
|
118
|
+
const ReqoreInput = forwardRef(
|
|
119
|
+
(
|
|
120
|
+
{
|
|
121
|
+
tooltip,
|
|
122
|
+
tooltipPlacement,
|
|
123
|
+
width,
|
|
124
|
+
size = 'normal',
|
|
125
|
+
fluid,
|
|
126
|
+
fixed,
|
|
127
|
+
className,
|
|
128
|
+
onClearClick,
|
|
129
|
+
icon,
|
|
130
|
+
flat,
|
|
131
|
+
rounded = true,
|
|
132
|
+
minimal,
|
|
133
|
+
children,
|
|
134
|
+
...rest
|
|
135
|
+
}: IReqoreInputProps,
|
|
136
|
+
ref
|
|
137
|
+
) => {
|
|
138
|
+
const innerRef = useRef(null);
|
|
139
|
+
const combinedRef = useCombinedRefs(innerRef, ref);
|
|
140
|
+
|
|
141
|
+
usePopover({
|
|
142
|
+
targetElement: combinedRef.current,
|
|
143
|
+
content: tooltip,
|
|
144
|
+
handler: 'hover',
|
|
145
|
+
placement: tooltipPlacement,
|
|
146
|
+
show: !!tooltip,
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<StyledInputWrapper
|
|
151
|
+
className='reqore-control-wrapper'
|
|
152
|
+
fluid={fluid}
|
|
153
|
+
fixed={fixed}
|
|
154
|
+
width={width}
|
|
155
|
+
flat={flat}
|
|
156
|
+
rounded={rounded}
|
|
157
|
+
minimal={minimal}
|
|
158
|
+
_size={size}
|
|
159
|
+
ref={combinedRef}
|
|
160
|
+
>
|
|
161
|
+
{icon && (
|
|
162
|
+
<StyledIconWrapper _size={size}>
|
|
163
|
+
<ReqoreIcon size={`${TEXT_FROM_SIZE[size]}px`} icon={icon} />
|
|
164
|
+
</StyledIconWrapper>
|
|
165
|
+
)}
|
|
166
|
+
<StyledInput
|
|
167
|
+
{...rest}
|
|
168
|
+
_size={size}
|
|
169
|
+
minimal={minimal}
|
|
170
|
+
hasIcon={!!icon}
|
|
171
|
+
clearable={!rest?.disabled && !!(onClearClick && rest?.onChange)}
|
|
172
|
+
className={`${className || ''} reqore-control reqore-input`}
|
|
173
|
+
/>
|
|
174
|
+
<ReqoreInputClearButton
|
|
175
|
+
enabled={!rest?.disabled && !!(onClearClick && rest?.onChange)}
|
|
176
|
+
onClick={onClearClick}
|
|
177
|
+
size={size}
|
|
178
|
+
show={rest?.value && rest.value !== '' ? true : false}
|
|
179
|
+
/>
|
|
180
|
+
</StyledInputWrapper>
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
export default ReqoreInput;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import ReqoreButton, { IReqoreButtonProps } from '../Button';
|
|
3
|
+
|
|
4
|
+
export interface IReqoreInputClearButtonProps extends IReqoreButtonProps {
|
|
5
|
+
show: boolean;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const StyledInputClearButton = styled(ReqoreButton)<{ show?: boolean }>`
|
|
10
|
+
position: absolute;
|
|
11
|
+
right: ${({ show }) => (show ? 0 : -40)}px;
|
|
12
|
+
top: 0;
|
|
13
|
+
opacity: ${({ show }) => (show ? 0.2 : 0)};
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
const ReqoreInputClearButton = ({
|
|
17
|
+
show,
|
|
18
|
+
enabled,
|
|
19
|
+
size = 'normal',
|
|
20
|
+
...rest
|
|
21
|
+
}: IReqoreInputClearButtonProps) =>
|
|
22
|
+
enabled ? (
|
|
23
|
+
<StyledInputClearButton
|
|
24
|
+
{...rest}
|
|
25
|
+
className='reqore-clear-input-button'
|
|
26
|
+
icon='CloseLine'
|
|
27
|
+
minimal
|
|
28
|
+
tabIndex={show ? 1 : -1}
|
|
29
|
+
size={size}
|
|
30
|
+
show={show}
|
|
31
|
+
/>
|
|
32
|
+
) : null;
|
|
33
|
+
|
|
34
|
+
export default ReqoreInputClearButton;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { isString } from 'lodash';
|
|
2
|
+
import React, { MutableRefObject, useContext, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { usePopper } from 'react-popper';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
6
|
+
import { IPopoverData } from '../../containers/PopoverProvider';
|
|
7
|
+
import ReqoreThemeProvider from '../../containers/ThemeProvider';
|
|
8
|
+
import PopoverContext from '../../context/PopoverContext';
|
|
9
|
+
import { fadeIn } from '../../helpers/animations';
|
|
10
|
+
import { getReadableColor } from '../../helpers/colors';
|
|
11
|
+
|
|
12
|
+
const StyledPopoverArrow = styled.div<{ theme: IReqoreTheme }>`
|
|
13
|
+
width: 10px;
|
|
14
|
+
height: 10px;
|
|
15
|
+
position: absolute;
|
|
16
|
+
z-index: -1;
|
|
17
|
+
|
|
18
|
+
&:before {
|
|
19
|
+
content: '';
|
|
20
|
+
display: block;
|
|
21
|
+
width: 10px;
|
|
22
|
+
height: 10px;
|
|
23
|
+
position: absolute;
|
|
24
|
+
z-index: -1;
|
|
25
|
+
transform: rotate(45deg);
|
|
26
|
+
${({ theme }) => css`
|
|
27
|
+
background-color: ${theme.popover?.main || theme.main};
|
|
28
|
+
box-shadow: rgba(31, 26, 34, 0.6) 0px 0px 4px;
|
|
29
|
+
`}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const StyledPopoverWrapper = styled.div<{ theme: IReqoreTheme }>`
|
|
34
|
+
animation: 0.2s ${fadeIn} ease-out;
|
|
35
|
+
|
|
36
|
+
${({ theme }) => {
|
|
37
|
+
const defaultColor: string = theme.popover?.main || theme.main;
|
|
38
|
+
|
|
39
|
+
return css`
|
|
40
|
+
z-index: 999999;
|
|
41
|
+
background-color: ${defaultColor};
|
|
42
|
+
color: ${getReadableColor(theme, undefined, undefined, false, defaultColor)};
|
|
43
|
+
border-radius: 3.5px;
|
|
44
|
+
box-shadow: rgba(31, 26, 34, 0.6) 0px 0px 4px;
|
|
45
|
+
`;
|
|
46
|
+
}}
|
|
47
|
+
|
|
48
|
+
&[data-popper-placement^='top'] > ${StyledPopoverArrow} {
|
|
49
|
+
bottom: -5px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&[data-popper-placement^='bottom'] > ${StyledPopoverArrow} {
|
|
53
|
+
top: -5px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&[data-popper-placement^='left'] > ${StyledPopoverArrow} {
|
|
57
|
+
right: -5px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&[data-popper-placement^='right'] > ${StyledPopoverArrow} {
|
|
61
|
+
left: -5px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&[data-popper-reference-hidden='true'] {
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
const StyledPopoverContent = styled.div<{ isString?: boolean }>`
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
padding: ${({ isString }) => (isString ? '8px' : '0px')};
|
|
74
|
+
z-index: 20;
|
|
75
|
+
position: relative;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
background-color: ${({ theme }) => theme.popover?.main || theme.main};
|
|
78
|
+
border-radius: 3.5px;
|
|
79
|
+
|
|
80
|
+
.reqore-popover-text {
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
export interface IReqoreInternalPopoverProps extends IPopoverData {}
|
|
86
|
+
|
|
87
|
+
const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
88
|
+
targetElement,
|
|
89
|
+
content,
|
|
90
|
+
id,
|
|
91
|
+
placement,
|
|
92
|
+
noArrow,
|
|
93
|
+
useTargetWidth,
|
|
94
|
+
}) => {
|
|
95
|
+
const { removePopover, updatePopover, uiScale } = useContext(PopoverContext);
|
|
96
|
+
const [popperElement, setPopperElement] = useState(null);
|
|
97
|
+
const [arrowElement, setArrowElement] = useState(null);
|
|
98
|
+
const popperRef: MutableRefObject<any> = useRef(null);
|
|
99
|
+
const { styles, attributes } = usePopper(targetElement, popperElement, {
|
|
100
|
+
placement,
|
|
101
|
+
modifiers: [
|
|
102
|
+
{
|
|
103
|
+
name: 'offset',
|
|
104
|
+
options: {
|
|
105
|
+
offset: [0, noArrow ? -1 : 10],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'arrow',
|
|
110
|
+
options: {
|
|
111
|
+
element: arrowElement,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'hide',
|
|
116
|
+
enabled: true,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (popperRef.current) {
|
|
123
|
+
updatePopover?.(id, { popperRef });
|
|
124
|
+
}
|
|
125
|
+
}, [popperRef]);
|
|
126
|
+
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
if (attributes?.popper?.['data-popper-reference-hidden']) {
|
|
129
|
+
removePopover?.(id);
|
|
130
|
+
}
|
|
131
|
+
}, [attributes?.popper]);
|
|
132
|
+
|
|
133
|
+
/* Getting the x and y values from the transform property of the popper element. */
|
|
134
|
+
const translateValues = styles.popper.transform
|
|
135
|
+
?.replace('translate3d(', '')
|
|
136
|
+
.replace('translate(', '')
|
|
137
|
+
.replace(')', '')
|
|
138
|
+
.split(',')
|
|
139
|
+
.map((axis) => {
|
|
140
|
+
if (uiScale || uiScale === 0) {
|
|
141
|
+
return parseInt(axis, 10) < 0 ? parseInt(axis, 10) * uiScale : parseInt(axis, 10) / uiScale;
|
|
142
|
+
}
|
|
143
|
+
return parseInt(axis, 10);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<ReqoreThemeProvider>
|
|
148
|
+
<StyledPopoverWrapper
|
|
149
|
+
className='reqore-popover-content'
|
|
150
|
+
ref={(el) => {
|
|
151
|
+
setPopperElement(el);
|
|
152
|
+
popperRef.current = el;
|
|
153
|
+
}}
|
|
154
|
+
style={{
|
|
155
|
+
...styles.popper,
|
|
156
|
+
transform: `translate(${translateValues?.[0] || 0}px, ${translateValues?.[1] || 0}px)`,
|
|
157
|
+
width: useTargetWidth && (targetElement?.getBoundingClientRect()?.width || undefined),
|
|
158
|
+
}}
|
|
159
|
+
{...attributes.popper}
|
|
160
|
+
>
|
|
161
|
+
{!noArrow && (
|
|
162
|
+
<StyledPopoverArrow ref={setArrowElement} style={styles.arrow} data-popper-arrow />
|
|
163
|
+
)}
|
|
164
|
+
<StyledPopoverContent isString={isString(content)}>
|
|
165
|
+
{isString(content) ? (
|
|
166
|
+
<span className='reqore-popover-text'>{content}</span>
|
|
167
|
+
) : (
|
|
168
|
+
<>
|
|
169
|
+
{React.Children.map(content, (child) =>
|
|
170
|
+
child
|
|
171
|
+
? React.cloneElement(child, {
|
|
172
|
+
_insidePopover: true,
|
|
173
|
+
_popoverId: id,
|
|
174
|
+
})
|
|
175
|
+
: null
|
|
176
|
+
)}
|
|
177
|
+
</>
|
|
178
|
+
)}
|
|
179
|
+
</StyledPopoverContent>
|
|
180
|
+
</StyledPopoverWrapper>
|
|
181
|
+
</ReqoreThemeProvider>
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export default InternalPopover;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
|
|
4
|
+
export interface IReqoreLayoutContentProps
|
|
5
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
children?: any;
|
|
7
|
+
withSidebar?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const StyledReqoreLayoutContent = styled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100%;
|
|
13
|
+
flex: 1;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
flex-flow: column;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
const ReqoreLayoutWrapper = ({
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
...rest
|
|
22
|
+
}: IReqoreLayoutContentProps) => (
|
|
23
|
+
<StyledReqoreLayoutContent
|
|
24
|
+
{...rest}
|
|
25
|
+
className={`${className || ""} reqore-layout-content`}
|
|
26
|
+
>
|
|
27
|
+
{children}
|
|
28
|
+
</StyledReqoreLayoutContent>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export default ReqoreLayoutWrapper;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
4
|
+
import ReqoreThemeProvider from '../../containers/ThemeProvider';
|
|
5
|
+
import { changeLightness, getReadableColor } from '../../helpers/colors';
|
|
6
|
+
|
|
7
|
+
export interface IReqoreLayoutWrapperProps
|
|
8
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
children?: any;
|
|
10
|
+
withSidebar?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const StyledReqoreLayoutWrapper = styled.div<{
|
|
14
|
+
withSidebar: boolean;
|
|
15
|
+
theme: IReqoreTheme;
|
|
16
|
+
}>`
|
|
17
|
+
display: flex;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
|
|
23
|
+
* {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
a {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${({ withSidebar, theme }) => css`
|
|
32
|
+
flex-flow: ${withSidebar ? 'row' : 'column'};
|
|
33
|
+
background-color: ${changeLightness(theme.main, 0.02)};
|
|
34
|
+
color: ${getReadableColor(theme, undefined, undefined, true)};
|
|
35
|
+
`}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const ReqoreLayoutWrapper = ({
|
|
39
|
+
withSidebar,
|
|
40
|
+
children,
|
|
41
|
+
className,
|
|
42
|
+
...rest
|
|
43
|
+
}: IReqoreLayoutWrapperProps) => (
|
|
44
|
+
<ReqoreThemeProvider>
|
|
45
|
+
<StyledReqoreLayoutWrapper
|
|
46
|
+
{...rest}
|
|
47
|
+
className={`${className || ''} reqore-layout-wrapper`}
|
|
48
|
+
withSidebar={withSidebar}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</StyledReqoreLayoutWrapper>
|
|
52
|
+
</ReqoreThemeProvider>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
export default ReqoreLayoutWrapper;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
4
|
+
import { getReadableColor } from '../../helpers/colors';
|
|
5
|
+
|
|
6
|
+
export interface IReqoreMenuDividerProps
|
|
7
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const StyledMenuDivider = styled.div<{ theme: IReqoreTheme }>`
|
|
12
|
+
width: 100%;
|
|
13
|
+
padding: 8px 0;
|
|
14
|
+
background-color: ${({ theme }) => theme.main};
|
|
15
|
+
font-size: 11px;
|
|
16
|
+
text-transform: uppercase;
|
|
17
|
+
text-align: center;
|
|
18
|
+
letter-spacing: 2px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
|
|
21
|
+
color: ${({ theme }) => getReadableColor(theme, undefined, undefined)};
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const ReqoreMenuDivider = forwardRef(
|
|
25
|
+
({ label, className, ...rest }: IReqoreMenuDividerProps, ref: any) => (
|
|
26
|
+
<StyledMenuDivider
|
|
27
|
+
{...rest}
|
|
28
|
+
className={`${className || ''} reqore-menu-divider`}
|
|
29
|
+
ref={ref}
|
|
30
|
+
>
|
|
31
|
+
{label}
|
|
32
|
+
</StyledMenuDivider>
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export default ReqoreMenuDivider;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { IReqoreCustomTheme, IReqoreIntent, IReqoreTheme } from '../../constants/theme';
|
|
4
|
+
import ReqoreThemeProvider from '../../containers/ThemeProvider';
|
|
5
|
+
import { changeLightness } from '../../helpers/colors';
|
|
6
|
+
import { useReqoreTheme } from '../../hooks/useTheme';
|
|
7
|
+
import { IReqoreComponent } from '../../types/global';
|
|
8
|
+
|
|
9
|
+
export interface IReqoreMenuProps extends IReqoreComponent, React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
children: any;
|
|
11
|
+
position?: 'left' | 'right';
|
|
12
|
+
width?: string;
|
|
13
|
+
maxHeight?: string;
|
|
14
|
+
customTheme?: IReqoreCustomTheme;
|
|
15
|
+
intent?: IReqoreIntent;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IReqoreMenuStyle extends IReqoreMenuProps {
|
|
19
|
+
theme: IReqoreTheme;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const StyledReqoreMenu = styled.div<IReqoreMenuStyle>`
|
|
23
|
+
width: ${({ width }) => width || '160px'};
|
|
24
|
+
padding: 5px;
|
|
25
|
+
max-height: ${({ maxHeight }) => maxHeight || undefined};
|
|
26
|
+
overflow-y: auto;
|
|
27
|
+
overflow-x: hidden;
|
|
28
|
+
|
|
29
|
+
background-color: ${({ theme }) => theme.main};
|
|
30
|
+
|
|
31
|
+
${({ theme, position }) =>
|
|
32
|
+
position &&
|
|
33
|
+
css`
|
|
34
|
+
border-${position === 'left' ? 'right' : 'left'}: 1px solid ${changeLightness(
|
|
35
|
+
theme.main,
|
|
36
|
+
0.05
|
|
37
|
+
)};
|
|
38
|
+
padding-${position === 'left' ? 'right' : 'left'}: 10px;
|
|
39
|
+
`}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const ReqoreMenu: React.FC<IReqoreMenuProps> = forwardRef(
|
|
43
|
+
({ children, position, _insidePopover, _popoverId, customTheme, intent, ...rest }, ref: any) => {
|
|
44
|
+
const theme = useReqoreTheme('main', customTheme, intent);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<ReqoreThemeProvider theme={theme}>
|
|
48
|
+
<StyledReqoreMenu {...rest} position={position} ref={ref} theme={theme}>
|
|
49
|
+
{React.Children.map(children, (child) =>
|
|
50
|
+
child
|
|
51
|
+
? // @ts-ignore
|
|
52
|
+
React.cloneElement(child, {
|
|
53
|
+
_insidePopover,
|
|
54
|
+
_popoverId,
|
|
55
|
+
})
|
|
56
|
+
: null
|
|
57
|
+
)}
|
|
58
|
+
</StyledReqoreMenu>
|
|
59
|
+
</ReqoreThemeProvider>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export default ReqoreMenu;
|