@qoretechnologies/reqore 0.20.1 → 0.20.2
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/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/actions.d.ts +6 -0
- package/dist/src/components/Modal/actions.d.ts.map +1 -0
- package/dist/src/components/Modal/actions.js +49 -0
- package/dist/src/components/Modal/actions.js.map +1 -0
- package/dist/src/components/Modal/content.d.ts +6 -0
- package/dist/src/components/Modal/content.d.ts.map +1 -0
- package/dist/src/components/Modal/content.js +25 -0
- package/dist/src/components/Modal/content.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 +52 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +127 -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 +1 -1
- 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/actions.tsx +26 -0
- package/src/components/Modal/content.tsx +11 -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 +51 -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
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { rgba } from 'polished';
|
|
2
|
+
import React, { forwardRef, useRef } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { SIZE_TO_PX, TEXT_FROM_SIZE, TSizes } from '../../constants/sizes';
|
|
5
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
6
|
+
import { getReadableColor } from '../../helpers/colors';
|
|
7
|
+
import { useCombinedRefs } from '../../hooks/useCombinedRefs';
|
|
8
|
+
import usePopover from '../../hooks/usePopover';
|
|
9
|
+
import { IReqoreTooltip } from '../../types/global';
|
|
10
|
+
import { IReqoreIconName } from '../../types/icons';
|
|
11
|
+
import ReqoreIcon from '../Icon';
|
|
12
|
+
|
|
13
|
+
export interface IReqoreCheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
label?: string;
|
|
15
|
+
labelDetail?: any;
|
|
16
|
+
labelDetailPosition?: 'left' | 'right';
|
|
17
|
+
size?: TSizes;
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
labelPosition?: 'right' | 'left';
|
|
21
|
+
fluid?: boolean;
|
|
22
|
+
fixed?: boolean;
|
|
23
|
+
tooltip?: IReqoreTooltip;
|
|
24
|
+
asSwitch?: boolean;
|
|
25
|
+
uncheckedIcon?: IReqoreIconName;
|
|
26
|
+
checkedIcon?: IReqoreIconName;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface IReqoreCheckboxStyle extends IReqoreCheckboxProps {
|
|
30
|
+
theme: IReqoreTheme;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const StyledSwitch = styled.div<IReqoreCheckboxStyle>`
|
|
34
|
+
transition: all 0.2s ease-out;
|
|
35
|
+
position: relative;
|
|
36
|
+
|
|
37
|
+
height: ${({ size }) => SIZE_TO_PX[size] - 5}px;
|
|
38
|
+
width: ${({ size }) => SIZE_TO_PX[size] * 1.8}px;
|
|
39
|
+
|
|
40
|
+
border: 1px solid
|
|
41
|
+
${({ theme, checked }) =>
|
|
42
|
+
rgba(getReadableColor(theme, undefined, undefined), checked ? 0.6 : 0.3)};
|
|
43
|
+
border-radius: 50px;
|
|
44
|
+
|
|
45
|
+
margin-right: ${({ labelPosition }) => labelPosition === 'right' && '8px'};
|
|
46
|
+
margin-left: ${({ labelPosition }) => labelPosition === 'left' && '8px'};
|
|
47
|
+
|
|
48
|
+
background-color: ${({ theme, checked }) =>
|
|
49
|
+
checked ? rgba(getReadableColor(theme, undefined, undefined), 0.2) : 'transparent'};
|
|
50
|
+
|
|
51
|
+
&::before {
|
|
52
|
+
transition: all 0.2s ease-in-out;
|
|
53
|
+
content: '';
|
|
54
|
+
display: block;
|
|
55
|
+
position: absolute;
|
|
56
|
+
height: ${({ size }) => SIZE_TO_PX[size] - 13}px;
|
|
57
|
+
width: ${({ size }) => SIZE_TO_PX[size] - 13}px;
|
|
58
|
+
top: 50%;
|
|
59
|
+
transform: translateY(-50%);
|
|
60
|
+
left: ${({ checked, size }) =>
|
|
61
|
+
!checked ? '5px' : `${SIZE_TO_PX[size] * 1.8 - (SIZE_TO_PX[size] - 7)}px`};
|
|
62
|
+
border-radius: 100%;
|
|
63
|
+
background-color: ${({ theme, checked }) =>
|
|
64
|
+
!checked
|
|
65
|
+
? rgba(getReadableColor(theme, undefined, undefined), 0.2)
|
|
66
|
+
: getReadableColor(theme, undefined, undefined)};
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
const StyledCheckbox = styled.div<IReqoreCheckboxStyle>`
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
padding: 0px;
|
|
75
|
+
transition: all 0.2s ease-out;
|
|
76
|
+
|
|
77
|
+
height: ${({ size }) => SIZE_TO_PX[size]}px;
|
|
78
|
+
font-size: ${({ size }) => TEXT_FROM_SIZE[size]}px;
|
|
79
|
+
|
|
80
|
+
flex: ${({ fluid, fixed }) => (fixed ? '0 auto' : fluid ? '1' : '0 0 auto')};
|
|
81
|
+
|
|
82
|
+
opacity: ${({ disabled }) => disabled && 0.5};
|
|
83
|
+
pointer-events: ${({ disabled }) => disabled && 'none'};
|
|
84
|
+
|
|
85
|
+
color: ${({ theme, checked }) => getReadableColor(theme, undefined, undefined, !checked)};
|
|
86
|
+
|
|
87
|
+
&:hover {
|
|
88
|
+
color: ${({ theme }) => getReadableColor(theme, undefined, undefined, false)};
|
|
89
|
+
|
|
90
|
+
> ${StyledSwitch} {
|
|
91
|
+
border-color: ${({ theme, checked }) =>
|
|
92
|
+
rgba(getReadableColor(theme, undefined, undefined, false), checked ? 0.8 : 0.5)};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
|
|
97
|
+
const Checkbox = forwardRef(
|
|
98
|
+
(
|
|
99
|
+
{
|
|
100
|
+
label,
|
|
101
|
+
labelDetail,
|
|
102
|
+
labelDetailPosition = 'right',
|
|
103
|
+
size = 'normal',
|
|
104
|
+
checked,
|
|
105
|
+
disabled,
|
|
106
|
+
className,
|
|
107
|
+
labelPosition = 'right',
|
|
108
|
+
tooltip,
|
|
109
|
+
asSwitch,
|
|
110
|
+
uncheckedIcon = 'CheckboxBlankCircleLine',
|
|
111
|
+
checkedIcon = 'CheckboxCircleFill',
|
|
112
|
+
...rest
|
|
113
|
+
}: IReqoreCheckboxProps,
|
|
114
|
+
ref
|
|
115
|
+
) => {
|
|
116
|
+
const innerRef = useRef(null);
|
|
117
|
+
const combinedRef = useCombinedRefs(innerRef, ref);
|
|
118
|
+
|
|
119
|
+
usePopover({
|
|
120
|
+
targetElement: combinedRef.current,
|
|
121
|
+
...tooltip,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<StyledCheckbox
|
|
126
|
+
{...rest}
|
|
127
|
+
ref={combinedRef}
|
|
128
|
+
size={size}
|
|
129
|
+
disabled={disabled}
|
|
130
|
+
checked={checked}
|
|
131
|
+
className={`${className || ''} reqore-checkbox reqore-control`}
|
|
132
|
+
>
|
|
133
|
+
{label && labelPosition === 'left' ? (
|
|
134
|
+
<>
|
|
135
|
+
{labelDetailPosition === 'left' && labelDetail}
|
|
136
|
+
<span>{label}</span>
|
|
137
|
+
{labelDetailPosition === 'right' && labelDetail}
|
|
138
|
+
</>
|
|
139
|
+
) : null}
|
|
140
|
+
{asSwitch ? (
|
|
141
|
+
<StyledSwitch size={size} labelPosition={labelPosition} checked={checked} />
|
|
142
|
+
) : (
|
|
143
|
+
<ReqoreIcon
|
|
144
|
+
size={`${TEXT_FROM_SIZE[size]}px`}
|
|
145
|
+
icon={checked ? checkedIcon : uncheckedIcon}
|
|
146
|
+
margin={labelPosition}
|
|
147
|
+
/>
|
|
148
|
+
)}
|
|
149
|
+
{label && labelPosition === 'right' ? (
|
|
150
|
+
<>
|
|
151
|
+
{labelDetailPosition === 'left' && labelDetail}
|
|
152
|
+
<span>{label}</span>
|
|
153
|
+
{labelDetailPosition === 'right' && labelDetail}
|
|
154
|
+
</>
|
|
155
|
+
) : null}
|
|
156
|
+
</StyledCheckbox>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
export default Checkbox;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export interface IReqoreColumnProps
|
|
4
|
+
extends Pick<
|
|
5
|
+
React.CSSProperties,
|
|
6
|
+
'alignItems' | 'justifyContent' | 'flexFlow' | 'flex' | 'flexShrink' | 'flexGrow'
|
|
7
|
+
> {}
|
|
8
|
+
|
|
9
|
+
export const ReqoreColumn = styled.div<IReqoreColumnProps>`
|
|
10
|
+
${({
|
|
11
|
+
alignItems,
|
|
12
|
+
justifyContent,
|
|
13
|
+
flex = '1 0 auto',
|
|
14
|
+
flexFlow = 'row',
|
|
15
|
+
flexGrow,
|
|
16
|
+
flexShrink,
|
|
17
|
+
}: IReqoreColumnProps) => css`
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: ${alignItems};
|
|
20
|
+
justify-content: ${justifyContent};
|
|
21
|
+
flex-flow: ${flexFlow};
|
|
22
|
+
flex: ${flex};
|
|
23
|
+
flex-grow: ${flexGrow};
|
|
24
|
+
flex-shrink: ${flexShrink};
|
|
25
|
+
`}
|
|
26
|
+
`;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
4
|
+
|
|
5
|
+
export interface IReqoreColumnsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
children?: any;
|
|
7
|
+
minColumnWidth?: string;
|
|
8
|
+
maxColumnWidth?: string;
|
|
9
|
+
columns?: number | 'auto-fit' | 'auto-fill';
|
|
10
|
+
columnsGap?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
alignItems?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IStyledColumns extends IReqoreColumnsProps {
|
|
16
|
+
theme?: IReqoreTheme;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const StyledColumns = styled.div<IStyledColumns>`
|
|
20
|
+
display: grid;
|
|
21
|
+
${({
|
|
22
|
+
minColumnWidth = '300px',
|
|
23
|
+
maxColumnWidth = '1fr',
|
|
24
|
+
columns = 'auto-fit',
|
|
25
|
+
columnsGap,
|
|
26
|
+
alignItems = 'normal',
|
|
27
|
+
}: IStyledColumns) => css`
|
|
28
|
+
grid-template-columns: repeat(${columns}, minmax(${minColumnWidth}, ${maxColumnWidth}));
|
|
29
|
+
grid-gap: ${columnsGap};
|
|
30
|
+
align-items: ${alignItems};
|
|
31
|
+
`}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const ReqoreColumns = ({ children, className, ...rest }: IReqoreColumnsProps) => {
|
|
35
|
+
return (
|
|
36
|
+
<StyledColumns {...rest} className={classNames('reqore-columns', className)}>
|
|
37
|
+
{children}
|
|
38
|
+
</StyledColumns>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { size } from 'lodash';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { ReqoreButton, ReqoreColumn, ReqoreControlGroup, ReqoreDropdown } from '../..';
|
|
4
|
+
import { IReqoreIntent } from '../../constants/theme';
|
|
5
|
+
import { IReqoreIconName } from '../../types/icons';
|
|
6
|
+
import { ReqoreColumns } from '../Columns';
|
|
7
|
+
import { ReqoreH3 } from '../Header';
|
|
8
|
+
import ReqoreIcon from '../Icon';
|
|
9
|
+
import { IReqorePanelAction, ReqorePanel } from '../Panel';
|
|
10
|
+
import { ReqoreP } from '../Paragraph';
|
|
11
|
+
|
|
12
|
+
export interface IReqoreCommentProps {
|
|
13
|
+
icon?: IReqoreIconName;
|
|
14
|
+
image?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
children: any;
|
|
17
|
+
intent?: IReqoreIntent;
|
|
18
|
+
rounded?: boolean;
|
|
19
|
+
flat?: boolean;
|
|
20
|
+
detail?: string;
|
|
21
|
+
actions?: IReqorePanelAction[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const StyledCommentWrapper = styled.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
|
|
28
|
+
&:not(:first-child) {
|
|
29
|
+
margin-top: 10px;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
export const StyledIconWrapper = styled.div`
|
|
34
|
+
flex: 0 auto;
|
|
35
|
+
padding: 10px;
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
export const StyledInfoWrapper = styled.div`
|
|
41
|
+
flex: 1;
|
|
42
|
+
padding: 10px;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
export const StyledCommentText = styled(ReqoreP)<{ marginTop?: string }>`
|
|
47
|
+
min-height: 10px;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
padding: 0;
|
|
50
|
+
margin: 0;
|
|
51
|
+
margin-top: ${({ marginTop }: { marginTop?: string }) => marginTop};
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export const StyledCommentTitle = styled(ReqoreH3)`
|
|
55
|
+
padding: 0;
|
|
56
|
+
margin: 0;
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
export const StyledCommentDetail = styled.span`
|
|
60
|
+
opacity: 0.5;
|
|
61
|
+
font-size: 11px;
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
export const StyledCommentImage = styled.img`
|
|
65
|
+
width: 30px;
|
|
66
|
+
height: 30px;
|
|
67
|
+
border-radius: 10px;
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
export const ReqoreComment = ({
|
|
71
|
+
rounded,
|
|
72
|
+
flat,
|
|
73
|
+
intent,
|
|
74
|
+
icon,
|
|
75
|
+
children,
|
|
76
|
+
image,
|
|
77
|
+
title,
|
|
78
|
+
detail,
|
|
79
|
+
actions,
|
|
80
|
+
...rest
|
|
81
|
+
}: IReqoreCommentProps) => {
|
|
82
|
+
return (
|
|
83
|
+
<ReqorePanel rounded={rounded} flat={flat} intent={intent} className='reqore-comment' {...rest}>
|
|
84
|
+
<StyledCommentWrapper>
|
|
85
|
+
{icon || image ? (
|
|
86
|
+
<StyledIconWrapper>
|
|
87
|
+
{icon ? <ReqoreIcon icon={icon} size='30px' /> : <StyledCommentImage src={image} />}
|
|
88
|
+
</StyledIconWrapper>
|
|
89
|
+
) : null}
|
|
90
|
+
<StyledInfoWrapper>
|
|
91
|
+
<ReqoreColumns minColumnWidth='100px'>
|
|
92
|
+
<ReqoreColumn flexFlow='column' justifyContent='center'>
|
|
93
|
+
{title && <StyledCommentTitle>{title}</StyledCommentTitle>}
|
|
94
|
+
{detail && <StyledCommentDetail>{detail}</StyledCommentDetail>}
|
|
95
|
+
</ReqoreColumn>
|
|
96
|
+
{size(actions) ? (
|
|
97
|
+
<ReqoreColumn justifyContent='flex-end'>
|
|
98
|
+
<ReqoreControlGroup minimal size='small'>
|
|
99
|
+
{actions.map(({ label, actions, ...rest }) =>
|
|
100
|
+
size(actions) ? (
|
|
101
|
+
<ReqoreDropdown
|
|
102
|
+
{...rest}
|
|
103
|
+
label={label}
|
|
104
|
+
componentProps={{
|
|
105
|
+
minimal: true,
|
|
106
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
107
|
+
e.stopPropagation();
|
|
108
|
+
},
|
|
109
|
+
}}
|
|
110
|
+
items={actions}
|
|
111
|
+
/>
|
|
112
|
+
) : (
|
|
113
|
+
<ReqoreButton
|
|
114
|
+
{...rest}
|
|
115
|
+
onClick={
|
|
116
|
+
rest.onClick
|
|
117
|
+
? (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
118
|
+
e.stopPropagation();
|
|
119
|
+
rest.onClick();
|
|
120
|
+
}
|
|
121
|
+
: undefined
|
|
122
|
+
}
|
|
123
|
+
>
|
|
124
|
+
{label}
|
|
125
|
+
</ReqoreButton>
|
|
126
|
+
)
|
|
127
|
+
)}
|
|
128
|
+
</ReqoreControlGroup>
|
|
129
|
+
</ReqoreColumn>
|
|
130
|
+
) : null}
|
|
131
|
+
</ReqoreColumns>
|
|
132
|
+
<StyledCommentText marginTop={title || detail || size(actions) ? '10px' : '0px'}>
|
|
133
|
+
{children}
|
|
134
|
+
</StyledCommentText>
|
|
135
|
+
</StyledInfoWrapper>
|
|
136
|
+
</StyledCommentWrapper>
|
|
137
|
+
</ReqorePanel>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { StyledPanel } from '../Panel';
|
|
4
|
+
|
|
5
|
+
export interface IReqoreCommentFeedProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
gapSize?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const StyledCommentFeed = styled.div<{ gapSize: string }>`
|
|
10
|
+
${StyledPanel} {
|
|
11
|
+
&:not(:first-child) {
|
|
12
|
+
margin-top: ${({ gapSize }) => gapSize};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export const ReqoreCommentFeed = ({
|
|
18
|
+
gapSize = '10px',
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
...rest
|
|
22
|
+
}: IReqoreCommentFeedProps) => {
|
|
23
|
+
return (
|
|
24
|
+
<StyledCommentFeed
|
|
25
|
+
{...rest}
|
|
26
|
+
gapSize={gapSize}
|
|
27
|
+
className={classNames('reqore-comment-feed', {
|
|
28
|
+
className,
|
|
29
|
+
})}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</StyledCommentFeed>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import styled, { css } from "styled-components";
|
|
3
|
+
import { IReqoreTheme } from "../../constants/theme";
|
|
4
|
+
import ReqoreThemeProvider from "../../containers/ThemeProvider";
|
|
5
|
+
import { getReadableColor } from "../../helpers/colors";
|
|
6
|
+
|
|
7
|
+
export interface IReqoreContentWrapperProps
|
|
8
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
children?: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IReqoreContentStyle {
|
|
13
|
+
theme: IReqoreTheme;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const StyledReqoreContent = styled.div<IReqoreContentStyle>`
|
|
17
|
+
${({ theme }: IReqoreContentStyle) => css`
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
color: ${getReadableColor(theme, undefined, undefined, true)};
|
|
21
|
+
overflow: auto;
|
|
22
|
+
`}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const ReqoreContent = forwardRef(
|
|
26
|
+
({ children, className, ...rest }: IReqoreContentWrapperProps, ref: any) => (
|
|
27
|
+
<ReqoreThemeProvider>
|
|
28
|
+
<StyledReqoreContent
|
|
29
|
+
{...rest}
|
|
30
|
+
ref={ref}
|
|
31
|
+
className={`${className || ""} reqore-content`}
|
|
32
|
+
>
|
|
33
|
+
{children}
|
|
34
|
+
</StyledReqoreContent>
|
|
35
|
+
</ReqoreThemeProvider>
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export default ReqoreContent;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { IReqoreTheme } from "../../constants/theme";
|
|
4
|
+
import ReqoreThemeProvider from "../../containers/ThemeProvider";
|
|
5
|
+
|
|
6
|
+
export interface IReqoreContentWrapperProps
|
|
7
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
children?: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IReqoreContentStyle {
|
|
12
|
+
theme: IReqoreTheme;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const StyledReqoreContentWrapper = styled.div<IReqoreContentStyle>`
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-flow: column;
|
|
18
|
+
flex: 1;
|
|
19
|
+
padding: 15px;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
const ReqoreContentWrapper = forwardRef(
|
|
24
|
+
({ children, className, ...rest }: IReqoreContentWrapperProps, ref: any) => (
|
|
25
|
+
<ReqoreThemeProvider>
|
|
26
|
+
<StyledReqoreContentWrapper
|
|
27
|
+
{...rest}
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={`${className || ""} reqore-content-wrapper`}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</StyledReqoreContentWrapper>
|
|
33
|
+
</ReqoreThemeProvider>
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export default ReqoreContentWrapper;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { RADIUS_FROM_SIZE, TSizes } from '../../constants/sizes';
|
|
4
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
5
|
+
|
|
6
|
+
export interface IReqoreControlGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
stack?: boolean;
|
|
8
|
+
minimal?: boolean;
|
|
9
|
+
size?: TSizes;
|
|
10
|
+
children: any;
|
|
11
|
+
fluid?: boolean;
|
|
12
|
+
rounded?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IReqoreControlGroupStyle extends IReqoreControlGroupProps {
|
|
16
|
+
theme: IReqoreTheme;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const StyledControlGroup = styled.div<IReqoreControlGroupStyle>`
|
|
20
|
+
display: flex;
|
|
21
|
+
flex: 0 auto;
|
|
22
|
+
width: ${({ fluid }) => (fluid ? '100%' : undefined)};
|
|
23
|
+
|
|
24
|
+
> .reqore-control-wrapper .reqore-control {
|
|
25
|
+
border-radius: ${({ stack }) => (!stack ? undefined : 0)};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
> .reqore-control,
|
|
29
|
+
> .reqore-control-wrapper,
|
|
30
|
+
> * {
|
|
31
|
+
&:not(:last-child) {
|
|
32
|
+
margin-right: ${({ stack }) => (!stack ? '5px' : undefined)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
border-radius: ${({ stack }) => (!stack ? undefined : 0)};
|
|
36
|
+
|
|
37
|
+
${({ rounded, size }) =>
|
|
38
|
+
rounded &&
|
|
39
|
+
css`
|
|
40
|
+
&:first-child {
|
|
41
|
+
border-top-left-radius: ${RADIUS_FROM_SIZE[size]}px;
|
|
42
|
+
border-bottom-left-radius: ${RADIUS_FROM_SIZE[size]}px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:last-child {
|
|
46
|
+
border-top-right-radius: ${RADIUS_FROM_SIZE[size]}px;
|
|
47
|
+
border-bottom-right-radius: ${RADIUS_FROM_SIZE[size]}px;
|
|
48
|
+
}
|
|
49
|
+
`}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
const ReqoreControlGroup = ({
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
minimal,
|
|
57
|
+
size = 'normal',
|
|
58
|
+
fluid,
|
|
59
|
+
rounded = true,
|
|
60
|
+
...rest
|
|
61
|
+
}: IReqoreControlGroupProps) => (
|
|
62
|
+
<StyledControlGroup
|
|
63
|
+
{...rest}
|
|
64
|
+
size={size}
|
|
65
|
+
rounded={rounded}
|
|
66
|
+
fluid={fluid}
|
|
67
|
+
className={`${className || ''} reqore-control-group`}
|
|
68
|
+
>
|
|
69
|
+
{React.Children.map(children, (child) =>
|
|
70
|
+
child
|
|
71
|
+
? React.cloneElement(child, {
|
|
72
|
+
minimal: minimal || child.props?.minimal,
|
|
73
|
+
size,
|
|
74
|
+
fluid,
|
|
75
|
+
})
|
|
76
|
+
: null
|
|
77
|
+
)}
|
|
78
|
+
</StyledControlGroup>
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
export default ReqoreControlGroup;
|