@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,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.TimeAgo = void 0;
|
|
7
|
+
var epoch_timeago_1 = __importDefault(require("epoch-timeago"));
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
var react_use_1 = require("react-use");
|
|
10
|
+
var time_1 = require("../../helpers/time");
|
|
11
|
+
var TimeAgo = function (_a) {
|
|
12
|
+
var time = _a.time;
|
|
13
|
+
var _b = (0, react_1.useState)(Date.now()), _lastUpdate = _b[0], _setLastUpdate = _b[1];
|
|
14
|
+
var _time = typeof time === 'number' ? time : Date.parse(time);
|
|
15
|
+
(0, react_use_1.useInterval)(function () {
|
|
16
|
+
_setLastUpdate(Date.now());
|
|
17
|
+
}, (0, time_1.getTimeAgoIntervalDelay)(_time));
|
|
18
|
+
return (0, epoch_timeago_1["default"])(_time);
|
|
19
|
+
};
|
|
20
|
+
exports.TimeAgo = TimeAgo;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/TimeAgo/index.tsx"],"names":[],"mappings":";;;;;;AAAA,gEAAoC;AACpC,+BAAiC;AACjC,uCAAwC;AACxC,2CAA6D;AAEtD,IAAM,OAAO,GAAG,UAAC,EAAmC;QAAjC,IAAI,UAAA;IACtB,IAAA,KAAgC,IAAA,gBAAQ,EAAS,IAAI,CAAC,GAAG,EAAE,CAAC,EAA3D,WAAW,QAAA,EAAE,cAAc,QAAgC,CAAC;IACnE,IAAM,KAAK,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEjE,IAAA,uBAAW,EAAC;QACV,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,CAAC,EAAE,IAAA,8BAAuB,EAAC,KAAK,CAAC,CAAC,CAAC;IAEnC,OAAO,IAAA,0BAAO,EAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AATW,QAAA,OAAO,WASlB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IReqoreTheme } from '../../constants/theme';
|
|
3
|
+
export interface IReqoreTreeProps {
|
|
4
|
+
data: Object | Array<any>;
|
|
5
|
+
mode?: 'tree' | 'copy';
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
showTypes?: boolean;
|
|
8
|
+
onItemClick?: (value: any, path?: string[]) => void;
|
|
9
|
+
withLabelCopy?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ITreeStyle {
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
theme: IReqoreTheme;
|
|
14
|
+
}
|
|
15
|
+
export declare const ReqoreTree: ({ data, mode, expanded, showTypes, onItemClick, withLabelCopy, }: IReqoreTreeProps) => JSX.Element;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tree/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQrD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAOD,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;CACrB;AAoBD,eAAO,MAAM,UAAU,qEAOpB,gBAAgB,gBAoMlB,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
41
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
|
+
if (ar || !(i in from)) {
|
|
43
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
+
ar[i] = from[i];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
|
+
};
|
|
49
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
+
};
|
|
52
|
+
exports.__esModule = true;
|
|
53
|
+
exports.ReqoreTree = void 0;
|
|
54
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
55
|
+
var lodash_1 = require("lodash");
|
|
56
|
+
var size_1 = __importDefault(require("lodash/size"));
|
|
57
|
+
var polished_1 = require("polished");
|
|
58
|
+
var react_1 = require("react");
|
|
59
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
60
|
+
var __1 = require("../..");
|
|
61
|
+
var ReqoreContext_1 = __importDefault(require("../../context/ReqoreContext"));
|
|
62
|
+
var colors_1 = require("../../helpers/colors");
|
|
63
|
+
var utils_1 = require("../../helpers/utils");
|
|
64
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
65
|
+
var ControlGroup_1 = __importDefault(require("../ControlGroup"));
|
|
66
|
+
var Tag_1 = __importDefault(require("../Tag"));
|
|
67
|
+
var StyledTreeWrapper = styled_components_1["default"].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-flow: column;\n"], ["\n display: flex;\n flex-flow: column;\n"])));
|
|
68
|
+
var StyledLabel = styled_components_1["default"].span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-block;\n line-height: 30px;\n padding: 0 10px;\n transition: all 0.2s ease-out;\n\n ", "\n"], ["\n display: inline-block;\n line-height: 30px;\n padding: 0 10px;\n transition: all 0.2s ease-out;\n\n ", "\n"])), function (_a) {
|
|
69
|
+
var interactive = _a.interactive, theme = _a.theme;
|
|
70
|
+
return interactive && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n border-radius: 5px;\n }\n "], ["\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n border-radius: 5px;\n }\n "])), (0, polished_1.rgba)((0, colors_1.changeLightness)(theme.main, 0.3), 0.2));
|
|
71
|
+
});
|
|
72
|
+
var ReqoreTree = function (_a) {
|
|
73
|
+
var data = _a.data, _b = _a.mode, mode = _b === void 0 ? 'tree' : _b, expanded = _a.expanded, showTypes = _a.showTypes, onItemClick = _a.onItemClick, withLabelCopy = _a.withLabelCopy;
|
|
74
|
+
var _c = (0, react_1.useState)(mode), _mode = _c[0], setMode = _c[1];
|
|
75
|
+
var _d = (0, react_1.useState)({}), items = _d[0], setItems = _d[1];
|
|
76
|
+
var _e = (0, react_1.useState)(expanded), allExpanded = _e[0], setAllExpanded = _e[1];
|
|
77
|
+
var _f = (0, react_1.useState)(showTypes), _showTypes = _f[0], setShowTypes = _f[1];
|
|
78
|
+
var addNotification = (0, react_1.useContext)(ReqoreContext_1["default"]).addNotification;
|
|
79
|
+
var handleCopyClick = function () {
|
|
80
|
+
setMode('copy');
|
|
81
|
+
};
|
|
82
|
+
var handleTypesClick = function () {
|
|
83
|
+
setShowTypes(!_showTypes);
|
|
84
|
+
};
|
|
85
|
+
var handleTreeClick = function () {
|
|
86
|
+
setMode('tree');
|
|
87
|
+
};
|
|
88
|
+
var handleExpandClick = function () {
|
|
89
|
+
setItems({});
|
|
90
|
+
setAllExpanded(true);
|
|
91
|
+
};
|
|
92
|
+
var handleCollapseClick = function () {
|
|
93
|
+
setItems({});
|
|
94
|
+
setAllExpanded(false);
|
|
95
|
+
};
|
|
96
|
+
var handleItemClick = function (key, currentState) {
|
|
97
|
+
var newItems = (0, lodash_1.cloneDeep)(items);
|
|
98
|
+
newItems[key] = !currentState;
|
|
99
|
+
setItems(newItems);
|
|
100
|
+
};
|
|
101
|
+
var isDeep = function () {
|
|
102
|
+
return Object.keys(data).some(function (key) { return typeof data[key] === 'object'; });
|
|
103
|
+
};
|
|
104
|
+
var renderTree = function (data, k, level, path) {
|
|
105
|
+
if (level === void 0) { level = 1; }
|
|
106
|
+
if (path === void 0) { path = []; }
|
|
107
|
+
return Object.keys(data).map(function (key, index) {
|
|
108
|
+
var dataType = (0, utils_1.getTypeFromValue)(data[key]);
|
|
109
|
+
var displayKey = key;
|
|
110
|
+
var stateKey = k ? "".concat(k, "_").concat(key) : key;
|
|
111
|
+
var isObject = typeof data[key] === 'object' && data[key] !== null;
|
|
112
|
+
var isExpandable = typeof data[key] !== 'object' ||
|
|
113
|
+
items[stateKey] ||
|
|
114
|
+
(allExpanded && items[stateKey] !== false);
|
|
115
|
+
if (isObject && (0, size_1["default"])(data[key]) === 0) {
|
|
116
|
+
isObject = false;
|
|
117
|
+
isExpandable = false;
|
|
118
|
+
}
|
|
119
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { margin: level === 1 ? '15px 0' : "15px" } }, { children: [(0, jsx_runtime_1.jsxs)(ControlGroup_1["default"], { children: [isObject ? ((0, jsx_runtime_1.jsx)(Button_1["default"], __assign({ className: 'reqore-tree-toggle', icon: isExpandable ? 'ArrowDownSFill' : 'ArrowRightSFill', active: isExpandable, intent: isExpandable ? 'info' : undefined, onClick: function () { return handleItemClick(stateKey, isExpandable); } }, { children: displayKey }))) : ((0, jsx_runtime_1.jsx)(Tag_1["default"], { label: "".concat(displayKey, ": ") })), _showTypes && (0, jsx_runtime_1.jsx)(Tag_1["default"], { label: dataType, className: 'reqore-tree-type' }), !isObject && ((0, jsx_runtime_1.jsx)(StyledLabel, __assign({ className: 'reqore-tree-label', interactive: !!onItemClick, onClick: onItemClick ? function () { return onItemClick(data[key], __spreadArray(__spreadArray([], path, true), [key], false)); } : undefined }, { children: JSON.stringify(data[key]) }))), withLabelCopy && ((0, jsx_runtime_1.jsx)(Button_1["default"], { className: 'reqore-tree-copy', icon: 'FileCopy2Fill', onClick: function () {
|
|
120
|
+
navigator.clipboard.writeText(JSON.stringify(data[key]));
|
|
121
|
+
addNotification({
|
|
122
|
+
content: 'Successfuly copied to clipboard',
|
|
123
|
+
id: Date.now().toString(),
|
|
124
|
+
type: 'success',
|
|
125
|
+
duration: 3000
|
|
126
|
+
});
|
|
127
|
+
}, minimal: true }))] }), isExpandable && isObject
|
|
128
|
+
? renderTree(data[key], stateKey, level + 1, __spreadArray(__spreadArray([], path, true), [key], false))
|
|
129
|
+
: null] }), index));
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
var renderText = function (data, tabs) {
|
|
133
|
+
if (tabs === void 0) { tabs = ''; }
|
|
134
|
+
var text = '';
|
|
135
|
+
Object.keys(data).forEach(function (key) {
|
|
136
|
+
if (typeof data[key] !== 'object' || !data[key]) {
|
|
137
|
+
text += "".concat(tabs).concat(key, ": ").concat(data[key], "\r\n");
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
text += "".concat(tabs).concat(key, ":\r\n");
|
|
141
|
+
text += renderText(data[key], "".concat(tabs, "\t"));
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return text;
|
|
145
|
+
};
|
|
146
|
+
if (!data || !Object.keys(data).length) {
|
|
147
|
+
return (0, jsx_runtime_1.jsx)("p", { children: "No data" });
|
|
148
|
+
}
|
|
149
|
+
var textData = renderText(data);
|
|
150
|
+
var lineCount = (0, utils_1.getLineCount)(textData);
|
|
151
|
+
return ((0, jsx_runtime_1.jsxs)(StyledTreeWrapper, __assign({ className: 'reqore-tree' }, { children: [(0, jsx_runtime_1.jsxs)(ControlGroup_1["default"], __assign({ stack: true }, { children: [isDeep() && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!allExpanded && ((0, jsx_runtime_1.jsx)(Button_1["default"], __assign({ className: 'reqore-tree-expand-all', icon: 'ArrowDownFill', onClick: handleExpandClick }, { children: "Expand all" }), 'expand-button')), allExpanded || (0, size_1["default"])(items) > 0 ? ((0, jsx_runtime_1.jsxs)(Button_1["default"], __assign({ className: 'reqore-tree-collapse-all', icon: 'ArrowUpFill', onClick: handleCollapseClick }, { children: [' ', "Collapse all", ' '] }), 'collapse-button')) : null] })), (0, jsx_runtime_1.jsx)(Button_1["default"], __assign({ className: 'reqore-tree-show-types', icon: 'CodeBoxFill', active: _showTypes, onClick: handleTypesClick }, { children: "Show types" })), (0, jsx_runtime_1.jsx)(Button_1["default"], __assign({ className: 'reqore-tree-as-tree', active: _mode === 'tree', onClick: handleTreeClick, icon: 'Menu2Fill' }, { children: "Tree View" })), (0, jsx_runtime_1.jsx)(Button_1["default"], __assign({ className: 'reqore-tree-as-text', onClick: handleCopyClick, active: _mode === 'copy', icon: 'ClipboardFill' }, { children: "Text View" }))] })), _mode === 'tree' && (0, jsx_runtime_1.jsx)("div", { children: renderTree(data, true) }), _mode === 'copy' && ((0, jsx_runtime_1.jsx)(__1.ReqoreTextarea, { className: 'reqore-tree-textarea', id: 'tree-content', defaultValue: textData, rows: lineCount > 20 ? 20 : lineCount }))] })));
|
|
152
|
+
};
|
|
153
|
+
exports.ReqoreTree = ReqoreTree;
|
|
154
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Tree/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,qDAA+B;AAC/B,qCAAgC;AAChC,+BAA6C;AAC7C,qEAAgD;AAChD,2BAAuC;AAEvC,8EAAwD;AACxD,+CAAuD;AACvD,6CAAqE;AACrE,qDAAqC;AACrC,iEAAiD;AACjD,+CAA+B;AAW/B,IAAM,iBAAiB,GAAG,8BAAM,CAAC,GAAG,+GAAA,4CAGnC,IAAA,CAAC;AAOF,IAAM,WAAW,GAAG,8BAAM,CAAC,IAAI,uLAAY,8GAMvC,EASC,IACJ,KAVG,UAAC,EAAkC;QAAhC,WAAW,iBAAA,EAAE,KAAK,WAAA;IACrB,OAAA,WAAW,QACX,uBAA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,KAAK,KAAK,MAAM,IAAI,CACnB,uBAAC,kBAAc,IACb,SAAS,EAAC,sBAAsB,EAChC,EAAE,EAAC,cAAc,EACjB,YAAY,EAAE,QAAQ,EACtB,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,GACrC,CACH,KACiB,CACrB,CAAC;AACJ,CAAC,CAAC;AA3MW,QAAA,UAAU,cA2MrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../src/constants/animations.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;CAGzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../src/constants/animations.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,EAAE;CACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/constants/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.Colors = void 0;
|
|
4
|
+
exports.Colors = {
|
|
5
|
+
DARK: '#222222',
|
|
6
|
+
LIGHT: '#ffffff',
|
|
7
|
+
BLUE: '#0E5A8A',
|
|
8
|
+
GREEN: '#0A6640',
|
|
9
|
+
YELLOW: '#d1a036',
|
|
10
|
+
ORANGE: '#A66321',
|
|
11
|
+
RED: '#A82A2A'
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/constants/colors.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,GAAG,EAAE,SAAS;CACf,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare type TSizes = 'tiny' | 'small' | 'normal' | 'big' | 'huge';
|
|
2
|
+
export declare type TWeights = 'soft' | 'normal' | 'heavy';
|
|
3
|
+
export declare const SIZE_TO_PX: {
|
|
4
|
+
tiny: number;
|
|
5
|
+
small: number;
|
|
6
|
+
normal: number;
|
|
7
|
+
big: number;
|
|
8
|
+
huge: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const TABS_SIZE_TO_PX: {
|
|
11
|
+
tiny: number;
|
|
12
|
+
small: number;
|
|
13
|
+
normal: number;
|
|
14
|
+
big: number;
|
|
15
|
+
huge: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const TABLE_SIZE_TO_PX: {
|
|
18
|
+
tiny: number;
|
|
19
|
+
small: number;
|
|
20
|
+
normal: number;
|
|
21
|
+
big: number;
|
|
22
|
+
huge: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const TABS_PADDING_TO_PX: {
|
|
25
|
+
tiny: number;
|
|
26
|
+
small: number;
|
|
27
|
+
normal: number;
|
|
28
|
+
big: number;
|
|
29
|
+
huge: number;
|
|
30
|
+
};
|
|
31
|
+
export declare const MARGIN_FROM_SIZE: {
|
|
32
|
+
tiny: number;
|
|
33
|
+
small: number;
|
|
34
|
+
normal: number;
|
|
35
|
+
big: number;
|
|
36
|
+
huge: number;
|
|
37
|
+
};
|
|
38
|
+
export declare const TEXT_FROM_SIZE: {
|
|
39
|
+
tiny: number;
|
|
40
|
+
small: number;
|
|
41
|
+
normal: number;
|
|
42
|
+
big: number;
|
|
43
|
+
huge: number;
|
|
44
|
+
};
|
|
45
|
+
export declare const PADDING_FROM_SIZE: {
|
|
46
|
+
tiny: number;
|
|
47
|
+
small: number;
|
|
48
|
+
normal: number;
|
|
49
|
+
big: number;
|
|
50
|
+
huge: number;
|
|
51
|
+
};
|
|
52
|
+
export declare const RADIUS_FROM_SIZE: {
|
|
53
|
+
tiny: number;
|
|
54
|
+
small: number;
|
|
55
|
+
normal: number;
|
|
56
|
+
big: number;
|
|
57
|
+
huge: number;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=sizes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizes.d.ts","sourceRoot":"","sources":["../../../src/constants/sizes.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAClE,oBAAY,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;CAM9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;CAM1B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.RADIUS_FROM_SIZE = exports.PADDING_FROM_SIZE = exports.TEXT_FROM_SIZE = exports.MARGIN_FROM_SIZE = exports.TABS_PADDING_TO_PX = exports.TABLE_SIZE_TO_PX = exports.TABS_SIZE_TO_PX = exports.SIZE_TO_PX = void 0;
|
|
4
|
+
exports.SIZE_TO_PX = {
|
|
5
|
+
tiny: 10,
|
|
6
|
+
small: 20,
|
|
7
|
+
normal: 30,
|
|
8
|
+
big: 40,
|
|
9
|
+
huge: 50
|
|
10
|
+
};
|
|
11
|
+
exports.TABS_SIZE_TO_PX = {
|
|
12
|
+
tiny: 20,
|
|
13
|
+
small: 30,
|
|
14
|
+
normal: 40,
|
|
15
|
+
big: 50,
|
|
16
|
+
huge: 60
|
|
17
|
+
};
|
|
18
|
+
exports.TABLE_SIZE_TO_PX = {
|
|
19
|
+
tiny: 20,
|
|
20
|
+
small: 30,
|
|
21
|
+
normal: 40,
|
|
22
|
+
big: 50,
|
|
23
|
+
huge: 60
|
|
24
|
+
};
|
|
25
|
+
exports.TABS_PADDING_TO_PX = {
|
|
26
|
+
tiny: 5,
|
|
27
|
+
small: 5,
|
|
28
|
+
normal: 5,
|
|
29
|
+
big: 5,
|
|
30
|
+
huge: 5
|
|
31
|
+
};
|
|
32
|
+
exports.MARGIN_FROM_SIZE = {
|
|
33
|
+
tiny: 0,
|
|
34
|
+
small: 0,
|
|
35
|
+
normal: 10,
|
|
36
|
+
big: 20,
|
|
37
|
+
huge: 30
|
|
38
|
+
};
|
|
39
|
+
exports.TEXT_FROM_SIZE = {
|
|
40
|
+
tiny: 9,
|
|
41
|
+
small: 12,
|
|
42
|
+
normal: 15,
|
|
43
|
+
big: 18,
|
|
44
|
+
huge: 21
|
|
45
|
+
};
|
|
46
|
+
exports.PADDING_FROM_SIZE = {
|
|
47
|
+
tiny: 2,
|
|
48
|
+
small: 5,
|
|
49
|
+
normal: 8,
|
|
50
|
+
big: 11,
|
|
51
|
+
huge: 14
|
|
52
|
+
};
|
|
53
|
+
exports.RADIUS_FROM_SIZE = {
|
|
54
|
+
tiny: 1,
|
|
55
|
+
small: 3,
|
|
56
|
+
normal: 5,
|
|
57
|
+
big: 7,
|
|
58
|
+
huge: 9
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=sizes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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T,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACR,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface IReqoreSidebarTheme {
|
|
2
|
+
main?: string;
|
|
3
|
+
color?: string;
|
|
4
|
+
border?: string;
|
|
5
|
+
item?: {
|
|
6
|
+
color?: string;
|
|
7
|
+
background?: string;
|
|
8
|
+
border?: string;
|
|
9
|
+
hoverColor?: string;
|
|
10
|
+
hoverBackground?: string;
|
|
11
|
+
activeColor?: string;
|
|
12
|
+
activeBackground?: string;
|
|
13
|
+
};
|
|
14
|
+
subItem?: {
|
|
15
|
+
color?: string;
|
|
16
|
+
border?: string;
|
|
17
|
+
background?: string;
|
|
18
|
+
hoverColor?: string;
|
|
19
|
+
hoverBackground?: string;
|
|
20
|
+
activeColor?: string;
|
|
21
|
+
activeBackground?: string;
|
|
22
|
+
};
|
|
23
|
+
icon?: {
|
|
24
|
+
color?: string;
|
|
25
|
+
hoverColor?: string;
|
|
26
|
+
activeColor?: string;
|
|
27
|
+
};
|
|
28
|
+
section?: {
|
|
29
|
+
background?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface IReqoreBreadcrumbsTheme {
|
|
33
|
+
main?: string;
|
|
34
|
+
item?: {
|
|
35
|
+
color?: string;
|
|
36
|
+
hoverColor?: string;
|
|
37
|
+
activeColor?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface IReqoreNavbarTheme {
|
|
41
|
+
main?: string;
|
|
42
|
+
color?: string;
|
|
43
|
+
border?: string;
|
|
44
|
+
background?: string;
|
|
45
|
+
hoverColor?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IReqoreTheme {
|
|
48
|
+
main: string;
|
|
49
|
+
text?: {
|
|
50
|
+
color?: string;
|
|
51
|
+
dim?: boolean;
|
|
52
|
+
};
|
|
53
|
+
intents: IReqoreIntents;
|
|
54
|
+
sidebar?: IReqoreSidebarTheme;
|
|
55
|
+
notifications: IReqoreIntents;
|
|
56
|
+
popover?: {
|
|
57
|
+
main: string;
|
|
58
|
+
};
|
|
59
|
+
header?: IReqoreNavbarTheme;
|
|
60
|
+
footer?: IReqoreNavbarTheme;
|
|
61
|
+
breadcrumbs?: IReqoreBreadcrumbsTheme;
|
|
62
|
+
}
|
|
63
|
+
export interface IReqoreCustomTheme {
|
|
64
|
+
main?: string;
|
|
65
|
+
text?: {
|
|
66
|
+
color?: string;
|
|
67
|
+
dim?: boolean;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface IReqoreIntents {
|
|
71
|
+
info?: string;
|
|
72
|
+
success?: string;
|
|
73
|
+
pending?: string;
|
|
74
|
+
warning?: string;
|
|
75
|
+
danger?: string;
|
|
76
|
+
muted?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare type IReqoreIntent = 'info' | 'success' | 'pending' | 'warning' | 'danger' | 'muted';
|
|
79
|
+
export declare const DEFAULT_INTENTS: IReqoreIntents;
|
|
80
|
+
export declare const DEFAULT_THEME: IReqoreTheme;
|
|
81
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/constants/theme.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,OAAO,CAAC,EAA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CAAC,EAAE,kBAAkB,CAAC;IAC5B,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5F,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAO3B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.DEFAULT_THEME = exports.DEFAULT_INTENTS = void 0;
|
|
4
|
+
exports.DEFAULT_INTENTS = {
|
|
5
|
+
info: '#0E5A8A',
|
|
6
|
+
success: '#0A6640',
|
|
7
|
+
pending: '#d1a036',
|
|
8
|
+
warning: '#A66321',
|
|
9
|
+
danger: '#A82A2A',
|
|
10
|
+
muted: '#444444'
|
|
11
|
+
};
|
|
12
|
+
exports.DEFAULT_THEME = {
|
|
13
|
+
main: '#333333',
|
|
14
|
+
text: {
|
|
15
|
+
dim: true
|
|
16
|
+
},
|
|
17
|
+
intents: exports.DEFAULT_INTENTS,
|
|
18
|
+
notifications: {}
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/constants/theme.ts"],"names":[],"mappings":";;;AAqFa,QAAA,eAAe,GAAmB;IAC7C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEW,QAAA,aAAa,GAAiB;IACzC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE;QACJ,GAAG,EAAE,IAAI;KACV;IACD,OAAO,EAAE,uBAAe;IACxB,aAAa,EAAE,EAAE;CAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
|
2
|
+
import { IPopoverOptions } from '../hooks/usePopover';
|
|
3
|
+
export interface IReqorePopoverProviderProps {
|
|
4
|
+
children: any;
|
|
5
|
+
uiScale?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IPopoverData extends IPopoverOptions {
|
|
8
|
+
id: string;
|
|
9
|
+
popperRef?: MutableRefObject<any>;
|
|
10
|
+
}
|
|
11
|
+
declare const PopoverProvider: React.FC<IReqorePopoverProviderProps>;
|
|
12
|
+
export default PopoverProvider;
|
|
13
|
+
//# sourceMappingURL=PopoverProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverProvider.d.ts","sourceRoot":"","sources":["../../../src/containers/PopoverProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,gBAAgB,EAAoC,MAAM,OAAO,CAAC;AAGlF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAkE1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
exports.__esModule = true;
|
|
26
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var react_1 = require("react");
|
|
28
|
+
var lodash_1 = require("lodash");
|
|
29
|
+
var react_2 = require("react");
|
|
30
|
+
var InternalPopover_1 = __importDefault(require("../components/InternalPopover"));
|
|
31
|
+
var PopoverContext_1 = __importDefault(require("../context/PopoverContext"));
|
|
32
|
+
var PopoverProvider = function (_a) {
|
|
33
|
+
var children = _a.children, uiScale = _a.uiScale;
|
|
34
|
+
var _b = (0, react_2.useState)([]), popovers = _b[0], setPopovers = _b[1];
|
|
35
|
+
var handleClick = (0, react_2.useCallback)(function (event) {
|
|
36
|
+
popovers.forEach(function (_a) {
|
|
37
|
+
var popperRef = _a.popperRef, closeOnAnyClick = _a.closeOnAnyClick, closeOnOutsideClick = _a.closeOnOutsideClick, id = _a.id, targetElement = _a.targetElement;
|
|
38
|
+
if (closeOnAnyClick ||
|
|
39
|
+
(closeOnOutsideClick &&
|
|
40
|
+
(popperRef === null || popperRef === void 0 ? void 0 : popperRef.current) &&
|
|
41
|
+
!popperRef.current.contains(event.target) &&
|
|
42
|
+
!(targetElement === null || targetElement === void 0 ? void 0 : targetElement.contains(event.target)))) {
|
|
43
|
+
removePopover(id);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}, [popovers]);
|
|
47
|
+
var removePopover = function (id) {
|
|
48
|
+
setPopovers(function (cur) { return __spreadArray([], cur, true).filter(function (p) { return p.id !== id; }); });
|
|
49
|
+
};
|
|
50
|
+
(0, react_2.useEffect)(function () {
|
|
51
|
+
document.addEventListener('click', handleClick);
|
|
52
|
+
return function () {
|
|
53
|
+
document.removeEventListener('click', handleClick);
|
|
54
|
+
};
|
|
55
|
+
}, [popovers]);
|
|
56
|
+
(0, react_2.useEffect)(function () {
|
|
57
|
+
if (!(0, lodash_1.size)(popovers)) {
|
|
58
|
+
document.removeEventListener('click', handleClick);
|
|
59
|
+
}
|
|
60
|
+
}, [popovers]);
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(PopoverContext_1["default"].Provider, __assign({ value: {
|
|
62
|
+
uiScale: uiScale,
|
|
63
|
+
addPopover: function (popoverData) {
|
|
64
|
+
setPopovers(function (cur) { return __spreadArray(__spreadArray([], cur, true), [popoverData], false); });
|
|
65
|
+
},
|
|
66
|
+
updatePopover: function (popoverId, popoverData) {
|
|
67
|
+
setPopovers(function (cur) {
|
|
68
|
+
return __spreadArray([], cur, true).reduce(function (newPopovers, popover) {
|
|
69
|
+
if (popover.id === popoverId) {
|
|
70
|
+
return __spreadArray(__spreadArray([], newPopovers, true), [__assign(__assign({}, popover), popoverData)], false);
|
|
71
|
+
}
|
|
72
|
+
return __spreadArray(__spreadArray([], newPopovers, true), [popover], false);
|
|
73
|
+
}, []);
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
removePopover: removePopover,
|
|
77
|
+
popovers: popovers
|
|
78
|
+
} }, { children: [popovers.map(function (popover) { return ((0, react_1.createElement)(InternalPopover_1["default"], __assign({}, popover, { key: popover.id }))); }), children] })));
|
|
79
|
+
};
|
|
80
|
+
exports["default"] = PopoverProvider;
|
|
81
|
+
//# sourceMappingURL=PopoverProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverProvider.js","sourceRoot":"","sources":["../../../src/containers/PopoverProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,+BAAkF;AAClF,kFAAoD;AACpD,6EAAuD;AAavD,IAAM,eAAe,GAA0C,UAAC,EAAqB;QAAnB,QAAQ,cAAA,EAAE,OAAO,aAAA;IAC3E,IAAA,KAA0B,IAAA,gBAAQ,EAAiB,EAAE,CAAC,EAArD,QAAQ,QAAA,EAAE,WAAW,QAAgC,CAAC;IAE7D,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,UAAC,KAAiB;QAChB,QAAQ,CAAC,OAAO,CAAC,UAAC,EAAsE;gBAApE,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAE,mBAAmB,yBAAA,EAAE,EAAE,QAAA,EAAE,aAAa,mBAAA;YACpF,IACE,eAAe;gBACf,CAAC,mBAAmB;qBAClB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAA;oBAClB,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;oBACzC,CAAC,CAA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