@qoretechnologies/reqore 0.20.0 → 0.20.3
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/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/ISSUE_TEMPLATE/new-component.md +20 -0
- package/.github/ISSUE_TEMPLATE/visual-bug-report.md +38 -0
- package/dist/components/Breadcrumbs/index.d.ts +33 -0
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/index.js +167 -0
- package/dist/components/Breadcrumbs/index.js.map +1 -0
- package/dist/components/Breadcrumbs/item.d.ts +14 -0
- package/dist/components/Breadcrumbs/item.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/item.js +84 -0
- package/dist/components/Breadcrumbs/item.js.map +1 -0
- package/dist/components/Button/index.d.ts +33 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +154 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +26 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +108 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Columns/column.d.ts +5 -0
- package/dist/components/Columns/column.d.ts.map +1 -0
- package/dist/components/Columns/column.js +37 -0
- package/dist/components/Columns/column.js.map +1 -0
- package/dist/components/Columns/index.d.ts +17 -0
- package/dist/components/Columns/index.d.ts.map +1 -0
- package/dist/components/Columns/index.js +69 -0
- package/dist/components/Columns/index.js.map +1 -0
- package/dist/components/Comment/index.d.ts +24 -0
- package/dist/components/Comment/index.d.ts.map +1 -0
- package/dist/components/Comment/index.js +71 -0
- package/dist/components/Comment/index.js.map +1 -0
- package/dist/components/CommentFeed/index.d.ts +7 -0
- package/dist/components/CommentFeed/index.d.ts.map +1 -0
- package/dist/components/CommentFeed/index.js +49 -0
- package/dist/components/CommentFeed/index.js.map +1 -0
- package/dist/components/Content/index.d.ts +11 -0
- package/dist/components/Content/index.d.ts.map +1 -0
- package/dist/components/Content/index.js +70 -0
- package/dist/components/Content/index.js.map +1 -0
- package/dist/components/Content/wrapper.d.ts +11 -0
- package/dist/components/Content/wrapper.d.ts.map +1 -0
- package/dist/components/Content/wrapper.js +43 -0
- package/dist/components/Content/wrapper.js.map +1 -0
- package/dist/components/ControlGroup/index.d.ts +17 -0
- package/dist/components/ControlGroup/index.d.ts.map +1 -0
- package/dist/components/ControlGroup/index.js +90 -0
- package/dist/components/ControlGroup/index.js.map +1 -0
- package/dist/components/Drawer/index.d.ts +36 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/Drawer/index.js +251 -0
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/Dropdown/index.d.ts +24 -0
- package/dist/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/Dropdown/index.js +38 -0
- package/dist/components/Dropdown/index.js.map +1 -0
- package/dist/components/Dropdown/item.d.ts +10 -0
- package/dist/components/Dropdown/item.d.ts.map +1 -0
- package/dist/components/Dropdown/item.js +35 -0
- package/dist/components/Dropdown/item.js.map +1 -0
- package/dist/components/Dropdown/list.d.ts +14 -0
- package/dist/components/Dropdown/list.d.ts.map +1 -0
- package/dist/components/Dropdown/list.js +47 -0
- package/dist/components/Dropdown/list.js.map +1 -0
- package/dist/components/Header/index.d.ts +13 -0
- package/dist/components/Header/index.d.ts.map +1 -0
- package/dist/components/Header/index.js +44 -0
- package/dist/components/Header/index.js.map +1 -0
- package/dist/components/Icon/index.d.ts +16 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +81 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Input/index.d.ts +33 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +115 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/InputClearButton/index.d.ts +10 -0
- package/dist/components/InputClearButton/index.d.ts.map +1 -0
- package/dist/components/InputClearButton/index.js +49 -0
- package/dist/components/InputClearButton/index.js.map +1 -0
- package/dist/components/InternalPopover/index.d.ts +7 -0
- package/dist/components/InternalPopover/index.d.ts.map +1 -0
- package/dist/components/InternalPopover/index.js +132 -0
- package/dist/components/InternalPopover/index.js.map +1 -0
- package/dist/components/Layout/content.d.ts +8 -0
- package/dist/components/Layout/content.d.ts.map +1 -0
- package/dist/components/Layout/content.js +41 -0
- package/dist/components/Layout/content.js.map +1 -0
- package/dist/components/Layout/index.d.ts +8 -0
- package/dist/components/Layout/index.d.ts.map +1 -0
- package/dist/components/Layout/index.js +69 -0
- package/dist/components/Layout/index.js.map +1 -0
- package/dist/components/Menu/divider.d.ts +7 -0
- package/dist/components/Menu/divider.d.ts.map +1 -0
- package/dist/components/Menu/divider.js +49 -0
- package/dist/components/Menu/divider.js.map +1 -0
- package/dist/components/Menu/index.d.ts +17 -0
- package/dist/components/Menu/index.d.ts.map +1 -0
- package/dist/components/Menu/index.js +89 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/Menu/item.d.ts +31 -0
- package/dist/components/Menu/item.d.ts.map +1 -0
- package/dist/components/Menu/item.js +121 -0
- package/dist/components/Menu/item.js.map +1 -0
- package/dist/components/Message/index.d.ts +25 -0
- package/dist/components/Message/index.d.ts.map +1 -0
- package/dist/components/Message/index.js +54 -0
- package/dist/components/Message/index.js.map +1 -0
- package/dist/components/Modal/actions.d.ts +6 -0
- package/dist/components/Modal/actions.d.ts.map +1 -0
- package/dist/components/Modal/actions.js +49 -0
- package/dist/components/Modal/actions.js.map +1 -0
- package/dist/components/Modal/content.d.ts +6 -0
- package/dist/components/Modal/content.d.ts.map +1 -0
- package/dist/components/Modal/content.js +25 -0
- package/dist/components/Modal/content.js.map +1 -0
- package/dist/components/Modal/index.d.ts +14 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +33 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Navbar/divider.d.ts +9 -0
- package/dist/components/Navbar/divider.d.ts.map +1 -0
- package/dist/components/Navbar/divider.js +47 -0
- package/dist/components/Navbar/divider.js.map +1 -0
- package/dist/components/Navbar/group.d.ts +15 -0
- package/dist/components/Navbar/group.d.ts.map +1 -0
- package/dist/components/Navbar/group.js +75 -0
- package/dist/components/Navbar/group.js.map +1 -0
- package/dist/components/Navbar/index.d.ts +16 -0
- package/dist/components/Navbar/index.d.ts.map +1 -0
- package/dist/components/Navbar/index.js +86 -0
- package/dist/components/Navbar/index.js.map +1 -0
- package/dist/components/Navbar/item.d.ts +16 -0
- package/dist/components/Navbar/item.d.ts.map +1 -0
- package/dist/components/Navbar/item.js +81 -0
- package/dist/components/Navbar/item.js.map +1 -0
- package/dist/components/Notifications/index.d.ts +12 -0
- package/dist/components/Notifications/index.d.ts.map +1 -0
- package/dist/components/Notifications/index.js +60 -0
- package/dist/components/Notifications/index.js.map +1 -0
- package/dist/components/Notifications/notification.d.ts +43 -0
- package/dist/components/Notifications/notification.d.ts.map +1 -0
- package/dist/components/Notifications/notification.js +140 -0
- package/dist/components/Notifications/notification.js.map +1 -0
- package/dist/components/Panel/index.d.ts +49 -0
- package/dist/components/Panel/index.d.ts.map +1 -0
- package/dist/components/Panel/index.js +172 -0
- package/dist/components/Panel/index.js.map +1 -0
- package/dist/components/Panel/panel.screenshot.d.ts +3 -0
- package/dist/components/Panel/panel.screenshot.d.ts.map +1 -0
- package/dist/components/Panel/panel.screenshot.js +30 -0
- package/dist/components/Panel/panel.screenshot.js.map +1 -0
- package/dist/components/Paragraph/index.d.ts +8 -0
- package/dist/components/Paragraph/index.d.ts.map +1 -0
- package/dist/components/Paragraph/index.js +64 -0
- package/dist/components/Paragraph/index.js.map +1 -0
- package/dist/components/Popover/index.d.ts +16 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +55 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/RadioGroup/index.d.ts +17 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.js +48 -0
- package/dist/components/RadioGroup/index.js.map +1 -0
- package/dist/components/Sidebar/index.d.ts +60 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +265 -0
- package/dist/components/Sidebar/index.js.map +1 -0
- package/dist/components/Sidebar/item.d.ts +36 -0
- package/dist/components/Sidebar/item.d.ts.map +1 -0
- package/dist/components/Sidebar/item.js +106 -0
- package/dist/components/Sidebar/item.js.map +1 -0
- package/dist/components/Table/body.d.ts +10 -0
- package/dist/components/Table/body.d.ts.map +1 -0
- package/dist/components/Table/body.js +44 -0
- package/dist/components/Table/body.js.map +1 -0
- package/dist/components/Table/header.d.ts +29 -0
- package/dist/components/Table/header.d.ts.map +1 -0
- package/dist/components/Table/header.js +106 -0
- package/dist/components/Table/header.js.map +1 -0
- package/dist/components/Table/headerCell.d.ts +18 -0
- package/dist/components/Table/headerCell.d.ts.map +1 -0
- package/dist/components/Table/headerCell.js +92 -0
- package/dist/components/Table/headerCell.js.map +1 -0
- package/dist/components/Table/helpers.d.ts +8 -0
- package/dist/components/Table/helpers.d.ts.map +1 -0
- package/dist/components/Table/helpers.js +41 -0
- package/dist/components/Table/helpers.js.map +1 -0
- package/dist/components/Table/index.d.ts +75 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +165 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Table/row.d.ts +58 -0
- package/dist/components/Table/row.d.ts.map +1 -0
- package/dist/components/Table/row.js +204 -0
- package/dist/components/Table/row.js.map +1 -0
- package/dist/components/Tabs/content.d.ts +8 -0
- package/dist/components/Tabs/content.d.ts.map +1 -0
- package/dist/components/Tabs/content.js +41 -0
- package/dist/components/Tabs/content.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +39 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +83 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tabs/item.d.ts +23 -0
- package/dist/components/Tabs/item.d.ts.map +1 -0
- package/dist/components/Tabs/item.js +71 -0
- package/dist/components/Tabs/item.js.map +1 -0
- package/dist/components/Tabs/list.d.ts +17 -0
- package/dist/components/Tabs/list.d.ts.map +1 -0
- package/dist/components/Tabs/list.js +189 -0
- package/dist/components/Tabs/list.js.map +1 -0
- package/dist/components/Tag/group.d.ts +10 -0
- package/dist/components/Tag/group.d.ts.map +1 -0
- package/dist/components/Tag/group.js +50 -0
- package/dist/components/Tag/group.js.map +1 -0
- package/dist/components/Tag/index.d.ts +36 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Tag/index.js +136 -0
- package/dist/components/Tag/index.js.map +1 -0
- package/dist/components/Textarea/index.d.ts +26 -0
- package/dist/components/Textarea/index.d.ts.map +1 -0
- package/dist/components/Textarea/index.js +85 -0
- package/dist/components/Textarea/index.js.map +1 -0
- package/dist/components/TimeAgo/index.d.ts +4 -0
- package/dist/components/TimeAgo/index.d.ts.map +1 -0
- package/dist/components/TimeAgo/index.js +21 -0
- package/dist/components/TimeAgo/index.js.map +1 -0
- package/dist/components/Tree/index.d.ts +16 -0
- package/dist/components/Tree/index.d.ts.map +1 -0
- package/dist/components/Tree/index.js +155 -0
- package/dist/components/Tree/index.js.map +1 -0
- package/dist/constants/animations.d.ts +5 -0
- package/dist/constants/animations.d.ts.map +1 -0
- package/dist/constants/animations.js +8 -0
- package/dist/constants/animations.js.map +1 -0
- package/dist/constants/colors.d.ts +10 -0
- package/dist/constants/colors.d.ts.map +1 -0
- package/dist/constants/colors.js +13 -0
- package/dist/constants/colors.js.map +1 -0
- package/dist/constants/sizes.d.ts +59 -0
- package/dist/constants/sizes.d.ts.map +1 -0
- package/dist/constants/sizes.js +60 -0
- package/dist/constants/sizes.js.map +1 -0
- package/dist/constants/theme.d.ts +81 -0
- package/dist/constants/theme.d.ts.map +1 -0
- package/dist/constants/theme.js +20 -0
- package/dist/constants/theme.js.map +1 -0
- package/dist/containers/PopoverProvider.d.ts +13 -0
- package/dist/containers/PopoverProvider.d.ts.map +1 -0
- package/dist/containers/PopoverProvider.js +81 -0
- package/dist/containers/PopoverProvider.js.map +1 -0
- package/dist/containers/ReqoreProvider.d.ts +40 -0
- package/dist/containers/ReqoreProvider.d.ts.map +1 -0
- package/dist/containers/ReqoreProvider.js +125 -0
- package/dist/containers/ReqoreProvider.js.map +1 -0
- package/dist/containers/ThemeProvider.d.ts +8 -0
- package/dist/containers/ThemeProvider.d.ts.map +1 -0
- package/dist/containers/ThemeProvider.js +27 -0
- package/dist/containers/ThemeProvider.js.map +1 -0
- package/dist/containers/UIProvider.d.ts +13 -0
- package/dist/containers/UIProvider.d.ts.map +1 -0
- package/dist/containers/UIProvider.js +43 -0
- package/dist/containers/UIProvider.js.map +1 -0
- package/dist/context/PopoverContext.d.ts +11 -0
- package/dist/context/PopoverContext.d.ts.map +1 -0
- package/dist/context/PopoverContext.js +5 -0
- package/dist/context/PopoverContext.js.map +1 -0
- package/dist/context/ReqoreContext.d.ts +15 -0
- package/dist/context/ReqoreContext.d.ts.map +1 -0
- package/dist/context/ReqoreContext.js +10 -0
- package/dist/context/ReqoreContext.js.map +1 -0
- package/dist/context/ThemeContext.d.ts +5 -0
- package/dist/context/ThemeContext.d.ts.map +1 -0
- package/dist/context/ThemeContext.js +6 -0
- package/dist/context/ThemeContext.js.map +1 -0
- package/dist/helpers/animations.d.ts +2 -0
- package/dist/helpers/animations.d.ts.map +1 -0
- package/dist/helpers/animations.js +11 -0
- package/dist/helpers/animations.js.map +1 -0
- package/dist/helpers/colors.d.ts +14 -0
- package/dist/helpers/colors.d.ts.map +1 -0
- package/dist/helpers/colors.js +108 -0
- package/dist/helpers/colors.js.map +1 -0
- package/dist/helpers/sidebar.d.ts +4 -0
- package/dist/helpers/sidebar.d.ts.map +1 -0
- package/dist/helpers/sidebar.js +90 -0
- package/dist/helpers/sidebar.js.map +1 -0
- package/dist/helpers/time.d.ts +8 -0
- package/dist/helpers/time.d.ts.map +1 -0
- package/dist/helpers/time.js +25 -0
- package/dist/helpers/time.js.map +1 -0
- package/dist/helpers/utils.d.ts +5 -0
- package/dist/helpers/utils.d.ts.map +1 -0
- package/dist/helpers/utils.js +103 -0
- package/dist/helpers/utils.js.map +1 -0
- package/dist/hooks/useCombinedRefs.d.ts +3 -0
- package/dist/hooks/useCombinedRefs.d.ts.map +1 -0
- package/dist/hooks/useCombinedRefs.js +29 -0
- package/dist/hooks/useCombinedRefs.js.map +1 -0
- package/dist/hooks/useLatestZIndex.d.ts +3 -0
- package/dist/hooks/useLatestZIndex.d.ts.map +1 -0
- package/dist/hooks/useLatestZIndex.js +11 -0
- package/dist/hooks/useLatestZIndex.js.map +1 -0
- package/dist/hooks/useOutsideClick.d.ts +4 -0
- package/dist/hooks/useOutsideClick.d.ts.map +1 -0
- package/dist/hooks/useOutsideClick.js +19 -0
- package/dist/hooks/useOutsideClick.js.map +1 -0
- package/dist/hooks/usePopover.d.ts +19 -0
- package/dist/hooks/usePopover.d.ts.map +1 -0
- package/dist/hooks/usePopover.js +86 -0
- package/dist/hooks/usePopover.js.map +1 -0
- package/dist/hooks/useShareForwardedRef.d.ts +3 -0
- package/dist/hooks/useShareForwardedRef.d.ts.map +1 -0
- package/dist/hooks/useShareForwardedRef.js +25 -0
- package/dist/hooks/useShareForwardedRef.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +3 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/hooks/useTheme.js +21 -0
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/hooks/useTooltip.d.ts +3 -0
- package/dist/hooks/useTooltip.d.ts.map +1 -0
- package/dist/hooks/useTooltip.js +24 -0
- package/dist/hooks/useTooltip.js.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.d.ts +5 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +16 -0
- package/dist/styles.js.map +1 -0
- package/dist/types/global.d.ts +9 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/global.js +3 -0
- package/dist/types/global.js.map +1 -0
- package/dist/types/icons.d.ts +2 -0
- package/dist/types/icons.d.ts.map +1 -0
- package/dist/types/icons.js +3 -0
- package/dist/types/icons.js.map +1 -0
- package/dist/types/icons____.d.ts +2 -0
- package/dist/types/icons____.d.ts.map +1 -0
- package/dist/types/icons____.js +5 -0
- package/dist/types/icons____.js.map +1 -0
- 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
- package/dist/tests.json +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
exports.__esModule = true;
|
|
23
|
+
exports.isActiveMulti = exports.isActive = exports.transformMenu = void 0;
|
|
24
|
+
var lodash_1 = require("lodash");
|
|
25
|
+
var transformMenu = function (menu, bookmarks, customItems) {
|
|
26
|
+
var newMenu = __assign({}, menu);
|
|
27
|
+
var _qorusCustomElements;
|
|
28
|
+
var _qorusBookmarks;
|
|
29
|
+
if ((0, lodash_1.size)(bookmarks)) {
|
|
30
|
+
_qorusBookmarks = {
|
|
31
|
+
title: "Bookmarks",
|
|
32
|
+
items: []
|
|
33
|
+
};
|
|
34
|
+
newMenu = (0, lodash_1.reduce)(newMenu, function (cur, menuSection, name) {
|
|
35
|
+
var _a;
|
|
36
|
+
var newSection = __assign({}, menuSection);
|
|
37
|
+
newSection.items = __spreadArray([], newSection.items, true).map(function (newSectionItem) {
|
|
38
|
+
var copySectionItem = __assign({}, newSectionItem);
|
|
39
|
+
if (copySectionItem.submenu) {
|
|
40
|
+
copySectionItem.submenu = copySectionItem.submenu.filter(function (submenuItem) {
|
|
41
|
+
var isItemInSubmenu = bookmarks.find(function (favoriteItem) { return favoriteItem === submenuItem.id; });
|
|
42
|
+
if (isItemInSubmenu) {
|
|
43
|
+
_qorusBookmarks.items.push(submenuItem);
|
|
44
|
+
}
|
|
45
|
+
return !isItemInSubmenu;
|
|
46
|
+
});
|
|
47
|
+
if ((0, lodash_1.size)(copySectionItem.submenu)) {
|
|
48
|
+
return copySectionItem;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
if (!bookmarks.find(function (favoriteItem) { return favoriteItem === copySectionItem.id; })) {
|
|
56
|
+
return copySectionItem;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
_qorusBookmarks.items.push(copySectionItem);
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
.filter(function (newSectionItem) { return newSectionItem; });
|
|
65
|
+
return __assign(__assign({}, cur), (_a = {}, _a[name] = newSection, _a));
|
|
66
|
+
}, {});
|
|
67
|
+
newMenu = __assign({ _qorusBookmarks: _qorusBookmarks }, newMenu);
|
|
68
|
+
}
|
|
69
|
+
if ((0, lodash_1.size)(customItems)) {
|
|
70
|
+
_qorusCustomElements = {
|
|
71
|
+
items: customItems
|
|
72
|
+
};
|
|
73
|
+
newMenu = __assign({ _qorusCustomElements: _qorusCustomElements }, newMenu);
|
|
74
|
+
}
|
|
75
|
+
return newMenu;
|
|
76
|
+
};
|
|
77
|
+
exports.transformMenu = transformMenu;
|
|
78
|
+
var isActive = function (to, currentPath, exact) { return (exact ? currentPath === to : currentPath.startsWith(to)); };
|
|
79
|
+
exports.isActive = isActive;
|
|
80
|
+
var isActiveMulti = function (to, currentPath, exact) {
|
|
81
|
+
var active = false;
|
|
82
|
+
to.forEach(function (path) {
|
|
83
|
+
if ((0, exports.isActive)(path, currentPath, exact)) {
|
|
84
|
+
active = true;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return active;
|
|
88
|
+
};
|
|
89
|
+
exports.isActiveMulti = isActiveMulti;
|
|
90
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../src/helpers/sidebar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAsC;AAM/B,IAAM,aAAa,GAAa,UACrC,IAAwB,EACxB,SAAmB,EACnB,WAAuC;IAEvC,IAAI,OAAO,gBAA4B,IAAI,CAAE,CAAC;IAC9C,IAAI,oBAAoB,CAAC;IACzB,IAAI,eAAe,CAAC;IAEpB,IAAI,IAAA,aAAI,EAAC,SAAS,CAAC,EAAE;QACnB,eAAe,GAAG;YAChB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,EAAE;SACV,CAAC;QAEF,OAAO,GAAG,IAAA,eAAM,EACd,OAAO,EACP,UAAC,GAAG,EAAE,WAAW,EAAE,IAAY;;YAC7B,IAAI,UAAU,gBAAQ,WAAW,CAAE,CAAC;YAEpC,UAAU,CAAC,KAAK,GAAG,kBAAI,UAAU,CAAC,KAAK,QACpC,GAAG,CAAC,UAAC,cAAc;gBAClB,IAAM,eAAe,gBAAQ,cAAc,CAAE,CAAC;gBAE9C,IAAI,eAAe,CAAC,OAAO,EAAE;oBAC3B,eAAe,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CACtD,UAAC,WAAW;wBACV,IAAM,eAAe,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,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAzD,CAAyD,CAAC;AAJ3D,QAAA,QAAQ,YAImD;AAEjE,IAAM,aAAa,GAAa,UACrC,EAAY,EACZ,WAAmB,EACnB,KAAe;IAEf,IAAI,MAAM,GAAY,KAAK,CAAC;IAE5B,EAAE,CAAC,OAAO,CAAC,UAAC,IAAY;QACtB,IAAI,IAAA,gBAAQ,EAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE;YACtC,MAAM,GAAG,IAAI,CAAC;SACf;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAdW,QAAA,aAAa,iBAcxB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* If the time is larger than one day, update once a day. If the time is larger than one hour,
|
|
3
|
+
update once an hour. Otherwise update every 5 seconds.
|
|
4
|
+
* @param {number} time - the time in milliseconds since the epoch
|
|
5
|
+
* @returns The interval ID.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getTimeAgoIntervalDelay: (time: number) => number;
|
|
8
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/helpers/time.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,SAAU,MAAM,KAAG,MActD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.getTimeAgoIntervalDelay = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* If the time is larger than one day, update once a day. If the time is larger than one hour,
|
|
6
|
+
update once an hour. Otherwise update every 5 seconds.
|
|
7
|
+
* @param {number} time - the time in milliseconds since the epoch
|
|
8
|
+
* @returns The interval ID.
|
|
9
|
+
*/
|
|
10
|
+
var getTimeAgoIntervalDelay = function (time) {
|
|
11
|
+
// If the time is larger than one day
|
|
12
|
+
if (Date.now() - time > 60000 * 60 * 24) {
|
|
13
|
+
// update once a day
|
|
14
|
+
return 60000 * 60 * 24;
|
|
15
|
+
}
|
|
16
|
+
// If the time is larger than one hour
|
|
17
|
+
if (Date.now() - time > 60000 * 60) {
|
|
18
|
+
// update once an hour
|
|
19
|
+
return 60000 * 60;
|
|
20
|
+
}
|
|
21
|
+
// Otherwise update every 5 seconds
|
|
22
|
+
return 5000;
|
|
23
|
+
};
|
|
24
|
+
exports.getTimeAgoIntervalDelay = getTimeAgoIntervalDelay;
|
|
25
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../src/helpers/time.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACI,IAAM,uBAAuB,GAAG,UAAC,IAAY;IAClD,qCAAqC;IACrC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,EAAE;QACvC,oBAAoB;QACpB,OAAO,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC;KACxB;IACD,sCAAsC;IACtC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE,EAAE;QAClC,sBAAsB;QACtB,OAAO,KAAK,GAAG,EAAE,CAAC;KACnB;IAED,mCAAmC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAdW,QAAA,uBAAuB,2BAclC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
2
|
+
export declare const getTypeFromValue: Function;
|
|
3
|
+
export declare const getLineCount: (value: string) => number;
|
|
4
|
+
export declare const calculateStringSizeInPixels: (value: string, fontSize: number) => number;
|
|
5
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,KAAK,OAAc,MAAM,qBAAgD,CAAC;AAEvF,eAAO,MAAM,gBAAgB,EAAE,QA8B9B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,MAM5C,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAAW,MAAM,YAAiB,MAAM,KAAG,MAqBlF,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.__esModule = true;
|
|
39
|
+
exports.calculateStringSizeInPixels = exports.getLineCount = exports.getTypeFromValue = exports.sleep = void 0;
|
|
40
|
+
var lodash_1 = require("lodash");
|
|
41
|
+
var sleep = function (ms) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
42
|
+
switch (_a.label) {
|
|
43
|
+
case 0: return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, ms); })];
|
|
44
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
45
|
+
}
|
|
46
|
+
}); }); };
|
|
47
|
+
exports.sleep = sleep;
|
|
48
|
+
var getTypeFromValue = function (item) {
|
|
49
|
+
if ((0, lodash_1.isBoolean)(item)) {
|
|
50
|
+
return 'boolean';
|
|
51
|
+
}
|
|
52
|
+
if ((0, lodash_1.isString)(item)) {
|
|
53
|
+
return 'string';
|
|
54
|
+
}
|
|
55
|
+
if ((0, lodash_1.isNumber)(item)) {
|
|
56
|
+
return 'number';
|
|
57
|
+
}
|
|
58
|
+
if ((0, lodash_1.isArray)(item)) {
|
|
59
|
+
return 'array';
|
|
60
|
+
}
|
|
61
|
+
if ((0, lodash_1.isObject)(item)) {
|
|
62
|
+
return 'object';
|
|
63
|
+
}
|
|
64
|
+
if ((0, lodash_1.isFunction)(item)) {
|
|
65
|
+
return 'function';
|
|
66
|
+
}
|
|
67
|
+
if ((0, lodash_1.isNull)(item) || (0, lodash_1.isUndefined)(item)) {
|
|
68
|
+
return 'null';
|
|
69
|
+
}
|
|
70
|
+
return 'null';
|
|
71
|
+
};
|
|
72
|
+
exports.getTypeFromValue = getTypeFromValue;
|
|
73
|
+
var getLineCount = function (value) {
|
|
74
|
+
try {
|
|
75
|
+
return value.match(/[^\n]*\n[^\n]*/gi).length;
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
exports.getLineCount = getLineCount;
|
|
82
|
+
var calculateStringSizeInPixels = function (value, fontSize) {
|
|
83
|
+
if (value === void 0) { value = ''; }
|
|
84
|
+
var widths = [
|
|
85
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
86
|
+
0.2796875, 0.2765625, 0.3546875, 0.5546875, 0.5546875, 0.8890625, 0.665625, 0.190625, 0.3328125,
|
|
87
|
+
0.3328125, 0.3890625, 0.5828125, 0.2765625, 0.3328125, 0.2765625, 0.3015625, 0.5546875,
|
|
88
|
+
0.5546875, 0.5546875, 0.5546875, 0.5546875, 0.5546875, 0.5546875, 0.5546875, 0.5546875,
|
|
89
|
+
0.5546875, 0.2765625, 0.2765625, 0.584375, 0.5828125, 0.584375, 0.5546875, 1.0140625, 0.665625,
|
|
90
|
+
0.665625, 0.721875, 0.721875, 0.665625, 0.609375, 0.7765625, 0.721875, 0.2765625, 0.5, 0.665625,
|
|
91
|
+
0.5546875, 0.8328125, 0.721875, 0.7765625, 0.665625, 0.7765625, 0.721875, 0.665625, 0.609375,
|
|
92
|
+
0.721875, 0.665625, 0.94375, 0.665625, 0.665625, 0.609375, 0.2765625, 0.3546875, 0.2765625,
|
|
93
|
+
0.4765625, 0.5546875, 0.3328125, 0.5546875, 0.5546875, 0.5, 0.5546875, 0.5546875, 0.2765625,
|
|
94
|
+
0.5546875, 0.5546875, 0.221875, 0.240625, 0.5, 0.221875, 0.8328125, 0.5546875, 0.5546875,
|
|
95
|
+
0.5546875, 0.5546875, 0.3328125, 0.5, 0.2765625, 0.5546875, 0.5, 0.721875, 0.5, 0.5, 0.5,
|
|
96
|
+
0.3546875, 0.259375, 0.353125, 0.5890625,
|
|
97
|
+
];
|
|
98
|
+
var avg = 0.5279276315789471;
|
|
99
|
+
/* It's calculating the width of a string in pixels. */
|
|
100
|
+
return (Array.from(value).reduce(function (acc, cur) { var _a; return acc + ((_a = widths[cur.charCodeAt(0)]) !== null && _a !== void 0 ? _a : avg); }, 0) * fontSize);
|
|
101
|
+
};
|
|
102
|
+
exports.calculateStringSizeInPixels = calculateStringSizeInPixels;
|
|
103
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCASgB;AAET,IAAM,KAAK,GAAG,UAAO,EAAU;;gBAAK,qBAAM,IAAI,OAAO,CAAC,UAAC,CAAC,IAAK,OAAA,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,EAAjB,CAAiB,CAAC,EAAA;gBAA3C,sBAAA,SAA2C,E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,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACxF,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS;KACzC,CAAC;IACF,IAAM,GAAG,GAAG,kBAAkB,CAAC;IAE/B,uDAAuD;IACvD,OAAO,CACL,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,YAAK,OAAA,GAAG,GAAG,CAAC,MAAA,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,mCAAI,GAAG,CAAC,CAAA,EAAA,EAAE,CAAC,CAAC,GAAG,QAAQ,CAC/F,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,2BAA2B,+BAqBtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCombinedRefs.d.ts","sourceRoot":"","sources":["../../src/hooks/useCombinedRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,eAAe,CAAC,GAAG,IAAI,OAAA,qCAgBtC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.useCombinedRefs = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
function useCombinedRefs() {
|
|
9
|
+
var refs = [];
|
|
10
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
11
|
+
refs[_i] = arguments[_i];
|
|
12
|
+
}
|
|
13
|
+
var targetRef = react_1["default"].useRef();
|
|
14
|
+
react_1["default"].useEffect(function () {
|
|
15
|
+
refs.forEach(function (ref) {
|
|
16
|
+
if (!ref)
|
|
17
|
+
return;
|
|
18
|
+
if (typeof ref === 'function') {
|
|
19
|
+
ref(targetRef.current);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
ref.current = targetRef.current;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}, [refs]);
|
|
26
|
+
return targetRef;
|
|
27
|
+
}
|
|
28
|
+
exports.useCombinedRefs = useCombinedRefs;
|
|
29
|
+
//# sourceMappingURL=useCombinedRefs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCombinedRefs.js","sourceRoot":"","sources":["../../src/hooks/useCombinedRefs.ts"],"names":[],"mappings":";;;;;;AAAA,gDAA0B;AAE1B,SAAgB,eAAe;IAAC,cAAO;SAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;QAAP,yBAAO;;IACrC,IAAM,SAAS,GAAG,kBAAK,CAAC,MAAM,EAAE,CAAC;IAEjC,kBAAK,CAAC,SAAS,CAAC;QACd,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG;YACf,IAAI,CAAC,GAAG;gBAAE,OAAO;YAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;gBAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;aACxB;iBAAM;gBACL,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,SAAS,CAAC;AACnB,CAAC;AAhBD,0CAgBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLatestZIndex.d.ts","sourceRoot":"","sources":["../../src/hooks/useLatestZIndex.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,eAAe,QAAO,MAK3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var __1 = require("..");
|
|
5
|
+
var useLatestZIndex = function () {
|
|
6
|
+
var getAndIncreaseZIndex = (0, react_1.useContext)(__1.ReqoreContext).getAndIncreaseZIndex;
|
|
7
|
+
var zIndex = (0, react_1.useMemo)(function () { return getAndIncreaseZIndex(); }, []);
|
|
8
|
+
return zIndex;
|
|
9
|
+
};
|
|
10
|
+
exports["default"] = useLatestZIndex;
|
|
11
|
+
//# sourceMappingURL=useLatestZIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLatestZIndex.js","sourceRoot":"","sources":["../../src/hooks/useLatestZIndex.ts"],"names":[],"mappings":";;AAAA,+BAA4C;AAC5C,wBAAmC;AAEnC,IAAM,eAAe,GAAG;IACd,IAAA,oBAAoB,GAAK,IAAA,kBAAU,EAAC,iBAAa,CAAC,qBAA9B,CAA+B;IAC3D,IAAM,MAAM,GAAG,IAAA,eAAO,EAAC,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,EAAE,EAAE,CAAC,CAAC;IAEzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,qBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOutsideClick.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideClick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,OAAO,CAAC;AAEjE,QAAA,MAAM,eAAe,mBACH,iBAAiB,GAAG,CAAC,gBACvB,OAAO,aACV,MAAM,IAAI,KACpB,IAoBF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var useOutsideClick = function (targetElement, checkTarget, callback) {
|
|
5
|
+
var handleClick = (0, react_1.useCallback)(function (event) {
|
|
6
|
+
if (!checkTarget ||
|
|
7
|
+
((targetElement === null || targetElement === void 0 ? void 0 : targetElement.current) && !targetElement.current.contains(event.target))) {
|
|
8
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
9
|
+
}
|
|
10
|
+
}, [checkTarget, targetElement, callback]);
|
|
11
|
+
(0, react_1.useEffect)(function () {
|
|
12
|
+
window.addEventListener('click', handleClick);
|
|
13
|
+
return function () {
|
|
14
|
+
window.removeEventListener('click', handleClick);
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports["default"] = useOutsideClick;
|
|
19
|
+
//# sourceMappingURL=useOutsideClick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOutsideClick.js","sourceRoot":"","sources":["../../src/hooks/useOutsideClick.ts"],"names":[],"mappings":";;AAAA,+BAAiE;AAEjE,IAAM,eAAe,GAAG,UACtB,aAAqC,EACrC,WAAqB,EACrB,QAAqB;IAErB,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,UAAC,KAAU;QACT,IACE,CAAC,WAAW;YACZ,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,KAAI,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EACzE;YACA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,EAAI,CAAC;SACd;IACH,CAAC,EACD,CAAC,WAAW,EAAE,aAAa,EAAE,QAAQ,CAAC,CACvC,CAAC;IAEF,IAAA,iBAAS,EAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAE9C,OAAO;YACL,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnD,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,qBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Placement } from '@popperjs/core';
|
|
3
|
+
export interface IPopover {
|
|
4
|
+
content?: JSX.Element | string | undefined;
|
|
5
|
+
handler?: 'hover' | 'click' | 'focus' | 'hoverStay';
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
show?: boolean;
|
|
8
|
+
openOnMount?: boolean;
|
|
9
|
+
noArrow?: boolean;
|
|
10
|
+
useTargetWidth?: boolean;
|
|
11
|
+
closeOnOutsideClick?: boolean;
|
|
12
|
+
closeOnAnyClick?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface IPopoverOptions extends IPopover {
|
|
15
|
+
targetElement?: HTMLElement;
|
|
16
|
+
}
|
|
17
|
+
declare const usePopover: ({ targetElement, content, handler, placement, show, noArrow, useTargetWidth, closeOnOutsideClick, openOnMount, }: IPopoverOptions) => string;
|
|
18
|
+
export default usePopover;
|
|
19
|
+
//# sourceMappingURL=usePopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoB3C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU,qHAUb,eAAe,WAqEjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
var react_1 = require("react");
|
|
7
|
+
var react_use_1 = require("react-use");
|
|
8
|
+
var shortid_1 = __importDefault(require("shortid"));
|
|
9
|
+
var PopoverContext_1 = __importDefault(require("../context/PopoverContext"));
|
|
10
|
+
var startEvents = {
|
|
11
|
+
hover: 'mouseenter',
|
|
12
|
+
hoverStay: 'mouseenter',
|
|
13
|
+
click: 'click',
|
|
14
|
+
focus: 'focusin'
|
|
15
|
+
};
|
|
16
|
+
var endEvents = {
|
|
17
|
+
hover: 'mouseleave',
|
|
18
|
+
hoverStay: null,
|
|
19
|
+
click: null,
|
|
20
|
+
focus: null
|
|
21
|
+
};
|
|
22
|
+
var usePopover = function (_a) {
|
|
23
|
+
var targetElement = _a.targetElement, content = _a.content, _b = _a.handler, handler = _b === void 0 ? 'hover' : _b, placement = _a.placement, _c = _a.show, show = _c === void 0 ? true : _c, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth, _d = _a.closeOnOutsideClick, closeOnOutsideClick = _d === void 0 ? true : _d, _e = _a.openOnMount, openOnMount = _e === void 0 ? false : _e;
|
|
24
|
+
var _f = (0, react_1.useContext)(PopoverContext_1["default"]), addPopover = _f.addPopover, removePopover = _f.removePopover, updatePopover = _f.updatePopover, popovers = _f.popovers;
|
|
25
|
+
var current = (0, react_1.useRef)(shortid_1["default"].generate()).current;
|
|
26
|
+
var startEvent = startEvents[handler];
|
|
27
|
+
var endEvent = endEvents[handler];
|
|
28
|
+
var _addPopover = function () {
|
|
29
|
+
if (popovers === null || popovers === void 0 ? void 0 : popovers.find(function (p) { return p.id === current; })) {
|
|
30
|
+
removePopover === null || removePopover === void 0 ? void 0 : removePopover(current);
|
|
31
|
+
}
|
|
32
|
+
else if (show) {
|
|
33
|
+
addPopover === null || addPopover === void 0 ? void 0 : addPopover({
|
|
34
|
+
id: current,
|
|
35
|
+
content: content,
|
|
36
|
+
targetElement: targetElement,
|
|
37
|
+
placement: placement,
|
|
38
|
+
noArrow: noArrow,
|
|
39
|
+
useTargetWidth: useTargetWidth,
|
|
40
|
+
closeOnOutsideClick: closeOnOutsideClick,
|
|
41
|
+
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay'
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var _removePopover = function () {
|
|
46
|
+
removePopover === null || removePopover === void 0 ? void 0 : removePopover(current);
|
|
47
|
+
};
|
|
48
|
+
(0, react_use_1.useUpdateEffect)(function () {
|
|
49
|
+
if (show) {
|
|
50
|
+
updatePopover === null || updatePopover === void 0 ? void 0 : updatePopover(current, {
|
|
51
|
+
id: current,
|
|
52
|
+
content: content,
|
|
53
|
+
targetElement: targetElement,
|
|
54
|
+
placement: placement,
|
|
55
|
+
noArrow: noArrow,
|
|
56
|
+
useTargetWidth: useTargetWidth,
|
|
57
|
+
closeOnOutsideClick: closeOnOutsideClick,
|
|
58
|
+
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay'
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}, [content]);
|
|
62
|
+
(0, react_1.useEffect)(function () {
|
|
63
|
+
if (openOnMount && targetElement) {
|
|
64
|
+
_addPopover();
|
|
65
|
+
}
|
|
66
|
+
}, [targetElement]);
|
|
67
|
+
(0, react_1.useEffect)(function () {
|
|
68
|
+
if (targetElement && content) {
|
|
69
|
+
targetElement.addEventListener(startEvent, _addPopover);
|
|
70
|
+
if (endEvent) {
|
|
71
|
+
targetElement.addEventListener(endEvent, _removePopover);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return function () {
|
|
75
|
+
if (targetElement && content) {
|
|
76
|
+
targetElement.removeEventListener(startEvent, _addPopover);
|
|
77
|
+
if (endEvent) {
|
|
78
|
+
targetElement.removeEventListener(endEvent, _removePopover);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
return current;
|
|
84
|
+
};
|
|
85
|
+
exports["default"] = usePopover;
|
|
86
|
+
//# sourceMappingURL=usePopover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";;;;;AACA,+BAAwE;AACxE,uCAA4C;AAC5C,oDAA8B;AAC9B,6EAAuD;AAEvD,IAAM,WAAW,GAAG;IAClB,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,IAAM,SAAS,GAAG;IAChB,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;CACZ,CAAC;AAkBF,IAAM,UAAU,GAAG,UAAC,EAUF;QAThB,aAAa,mBAAA,EACb,OAAO,aAAA,EACP,eAAiB,EAAjB,OAAO,mBAAG,OAAO,KAAA,EACjB,SAAS,eAAA,EACT,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,OAAO,aAAA,EACP,cAAc,oBAAA,EACd,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,EAC1B,mBAAmB,EAAnB,WAAW,mBAAG,KAAK,KAAA;IAEb,IAAA,KAAyD,IAAA,kBAAU,EAAC,2BAAc,CAAC,EAAjF,UAAU,gBAAA,EAAE,aAAa,mBAAA,EAAE,aAAa,mBAAA,EAAE,QAAQ,cAA+B,CAAC;IAClF,IAAA,OAAO,GAA+B,IAAA,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AW,IAAI,aAAa,EAAE;YAChC,WAAW,EAAE,CAAC;SACf;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,IAAA,iBAAS,EAAC;QACR,IAAI,aAAa,IAAI,OAAO,EAAE;YAC5B,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;YAExD,IAAI,QAAQ,EAAE;gBACZ,aAAa,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;aAC1D;SACF;QAED,OAAO;YACL,IAAI,aAAa,IAAI,OAAO,EAAE;gBAC5B,aAAa,CAAC,mBAAmB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;gBAC3D,IAAI,QAAQ,EAAE;oBACZ,aAAa,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;iBAC7D;aACF;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,qBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareForwardedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useShareForwardedRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,OAAO,CAAC;AAE/C,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,uCAoBnE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
function useShareForwardedRef(forwardedRef) {
|
|
5
|
+
// final ref that will share value with forward ref. this is the one we will attach to components
|
|
6
|
+
var innerRef = (0, react_1.useRef)(null);
|
|
7
|
+
(0, react_1.useEffect)(function () {
|
|
8
|
+
// after every render - try to share current ref value with forwarded ref
|
|
9
|
+
if (!forwardedRef) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (typeof forwardedRef === "function") {
|
|
13
|
+
forwardedRef(innerRef.current);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
// by default forwardedRef.current is readonly. Let's ignore it
|
|
19
|
+
forwardedRef.current = innerRef.current;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return innerRef;
|
|
23
|
+
}
|
|
24
|
+
exports["default"] = useShareForwardedRef;
|
|
25
|
+
//# sourceMappingURL=useShareForwardedRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareForwardedRef.js","sourceRoot":"","sources":["../../src/hooks/useShareForwardedRef.ts"],"names":[],"mappings":";;AAAA,+BAA+C;AAE/C,SAAwB,oBAAoB,CAAI,YAAoB;IAClE,iGAAiG;IACjG,IAAM,QAAQ,GAAG,IAAA,cAAM,EAAI,IAAI,CAAC,CAAC;IAEjC,IAAA,iBAAS,EAAC;QACR,yEAAyE;QACzE,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO;SACR;QACD,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE;YACtC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC/B,OAAO;SACR;aAAM;YACL,aAAa;YACb,+DAA+D;YAC/D,YAAY,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;SACzC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC;AApBD,0CAoBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIjE,eAAO,MAAM,cAAc,YAChB,MAAM,gBACF,QAAQ,YAAY,CAAC,WACzB,aAAa,iBAUvB,CAAC"}
|
|
@@ -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.useReqoreTheme = void 0;
|
|
7
|
+
var lodash_1 = require("lodash");
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
var ThemeContext_1 = __importDefault(require("../context/ThemeContext"));
|
|
10
|
+
var colors_1 = require("../helpers/colors");
|
|
11
|
+
var useReqoreTheme = function (element, customTheme, intent) {
|
|
12
|
+
if (customTheme === void 0) { customTheme = {}; }
|
|
13
|
+
var theme = (0, react_1.useContext)(ThemeContext_1["default"]);
|
|
14
|
+
var _customTheme = (0, lodash_1.cloneDeep)(customTheme);
|
|
15
|
+
if (element === 'main' && intent) {
|
|
16
|
+
_customTheme.main = theme.intents[intent];
|
|
17
|
+
}
|
|
18
|
+
return (0, colors_1.mergeThemes)(element, theme, _customTheme);
|
|
19
|
+
};
|
|
20
|
+
exports.useReqoreTheme = useReqoreTheme;
|
|
21
|
+
//# sourceMappingURL=useTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAmC;AACnC,+BAAmC;AAEnC,yEAAmD;AACnD,4CAAgD;AAEzC,IAAM,cAAc,GAAG,UAC5B,OAAe,EACf,WAAuC,EACvC,MAAsB;IADtB,4BAAA,EAAA,gBAAuC;IAGvC,IAAM,KAAK,GAAiB,IAAA,kBAAU,EAAe,yBAAY,CAAC,CAAC;IACnE,IAAI,YAAY,GAA0B,IAAA,kBAAS,EAAC,WAAW,CAAC,CAAC;IAEjE,IAAI,OAAO,KAAK,MAAM,IAAI,MAAM,EAAE;QAChC,YAAY,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;KAC3C;IAED,OAAO,IAAA,oBAAW,EAAC,OAAO,EAAE,KAAK,EAAE,YAAY,CAAiB,CAAC;AACnE,CAAC,CAAC;AAbW,QAAA,cAAc,kBAazB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/hooks/useTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,eAAO,MAAM,UAAU,kBACN,WAAW,GAAG,SAAS,YAC5B,MAAM,GAAG,cAAc,KAChC,IAQF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
exports.__esModule = true;
|
|
17
|
+
exports.useTooltip = void 0;
|
|
18
|
+
var usePopover_1 = __importDefault(require("./usePopover"));
|
|
19
|
+
var useTooltip = function (targetElement, tooltip) {
|
|
20
|
+
var popoverData = typeof tooltip === 'string' ? { content: tooltip } : tooltip;
|
|
21
|
+
(0, usePopover_1["default"])(__assign(__assign({}, popoverData), { targetElement: targetElement, show: !!(popoverData === null || popoverData === void 0 ? void 0 : popoverData.content) }));
|
|
22
|
+
};
|
|
23
|
+
exports.useTooltip = useTooltip;
|
|
24
|
+
//# sourceMappingURL=useTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTooltip.js","sourceRoot":"","sources":["../../src/hooks/useTooltip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,4DAAsC;AAE/B,IAAM,UAAU,GAAG,UACxB,aAAsC,EACtC,OAAiC;IAEjC,IAAM,WAAW,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAEjF,IAAA,uBAAU,wBACL,WAAW,KACd,aAAa,eAAA,EACb,IAAI,EAAE,CAAC,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAA,IAC5B,CAAC;AACL,CAAC,CAAC;AAXW,QAAA,UAAU,cAWrB"}
|