@jetbrains/ring-ui 6.0.6-beta.0 → 6.0.6
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/README.md +1 -1
- package/components/alert/alert.css +146 -0
- package/components/alert/alert.d.ts +113 -0
- package/components/alert/alert.js +186 -0
- package/components/alert/container.css +26 -0
- package/components/alert/container.d.ts +15 -0
- package/components/alert/container.js +30 -0
- package/components/alert-service/alert-service.d.ts +36 -0
- package/components/alert-service/alert-service.js +108 -0
- package/components/alert-service/alert-service.stories.css +17 -0
- package/components/analytics/analytics.d.ts +18 -0
- package/components/analytics/analytics.js +18 -0
- package/components/analytics/analytics__custom-plugin.d.ts +28 -0
- package/components/analytics/analytics__custom-plugin.js +58 -0
- package/components/auth/auth.d.ts +3 -0
- package/components/auth/auth.js +42 -0
- package/components/auth/auth__core.d.ts +236 -0
- package/components/auth/auth__core.js +834 -0
- package/components/auth/background-flow.d.ts +31 -0
- package/components/auth/background-flow.js +97 -0
- package/components/auth/down-notification.css +15 -0
- package/components/auth/down-notification.d.ts +15 -0
- package/components/auth/down-notification.js +52 -0
- package/components/auth/iframe-flow.d.ts +20 -0
- package/components/auth/iframe-flow.js +81 -0
- package/components/auth/request-builder.d.ts +48 -0
- package/components/auth/request-builder.js +64 -0
- package/components/auth/response-parser.d.ts +70 -0
- package/components/auth/response-parser.js +99 -0
- package/components/auth/storage.d.ts +112 -0
- package/components/auth/storage.js +224 -0
- package/components/auth/token-validator.d.ts +93 -0
- package/components/auth/token-validator.js +169 -0
- package/components/auth/window-flow.d.ts +26 -0
- package/components/auth/window-flow.js +102 -0
- package/components/auth-dialog/auth-dialog.css +54 -0
- package/components/auth-dialog/auth-dialog.d.ts +60 -0
- package/components/auth-dialog/auth-dialog.js +93 -0
- package/components/auth-dialog-service/auth-dialog-service.d.ts +6 -0
- package/components/auth-dialog-service/auth-dialog-service.js +26 -0
- package/components/avatar/avatar-example-datauri.d.ts +1 -0
- package/components/avatar/avatar-example-datauri.js +24 -0
- package/components/avatar/avatar.css +27 -0
- package/components/avatar/avatar.d.ts +52 -0
- package/components/avatar/avatar.js +98 -0
- package/components/avatar/fallback-avatar.d.ts +17 -0
- package/components/avatar/fallback-avatar.js +113 -0
- package/components/badge/badge.css +42 -0
- package/components/badge/badge.d.ts +24 -0
- package/components/badge/badge.js +35 -0
- package/components/button/button.css +397 -0
- package/components/button/button.d.ts +67 -0
- package/components/button/button.js +70 -0
- package/components/button/button__classes.d.ts +2 -0
- package/components/button/button__classes.js +18 -0
- package/components/button-group/button-group.css +236 -0
- package/components/button-group/button-group.d.ts +18 -0
- package/components/button-group/button-group.js +21 -0
- package/components/button-group/caption.d.ts +8 -0
- package/components/button-group/caption.js +14 -0
- package/components/button-set/button-set.css +21 -0
- package/components/button-set/button-set.d.ts +16 -0
- package/components/button-set/button-set.js +22 -0
- package/components/button-toolbar/button-toolbar.css +25 -0
- package/components/button-toolbar/button-toolbar.d.ts +16 -0
- package/components/button-toolbar/button-toolbar.js +20 -0
- package/components/caret/caret.d.ts +66 -0
- package/components/caret/caret.js +216 -0
- package/components/checkbox/checkbox.css +146 -0
- package/components/checkbox/checkbox.d.ts +45 -0
- package/components/checkbox/checkbox.js +72 -0
- package/components/clipboard/clipboard-fallback.d.ts +2 -0
- package/components/clipboard/clipboard-fallback.js +44 -0
- package/components/clipboard/clipboard.d.ts +5 -0
- package/components/clipboard/clipboard.js +41 -0
- package/components/code/code.css +29 -0
- package/components/code/code.d.ts +44 -0
- package/components/code/code.js +94 -0
- package/components/code/highlight.css +112 -0
- package/components/collapse/collapse-content.d.ts +11 -0
- package/components/collapse/collapse-content.js +72 -0
- package/components/collapse/collapse-context.d.ts +10 -0
- package/components/collapse/collapse-context.js +10 -0
- package/components/collapse/collapse-control.d.ts +11 -0
- package/components/collapse/collapse-control.js +22 -0
- package/components/collapse/collapse.css +40 -0
- package/components/collapse/collapse.d.ts +12 -0
- package/components/collapse/collapse.js +26 -0
- package/components/collapse/collapse.stories.css +25 -0
- package/components/collapse/consts.d.ts +4 -0
- package/components/collapse/consts.js +4 -0
- package/components/collapse/utils.d.ts +1 -0
- package/components/collapse/utils.js +1 -0
- package/components/confirm/confirm.css +7 -0
- package/components/confirm/confirm.d.ts +48 -0
- package/components/confirm/confirm.js +59 -0
- package/components/confirm-service/confirm-service.d.ts +21 -0
- package/components/confirm-service/confirm-service.js +52 -0
- package/components/content-layout/content-layout.css +108 -0
- package/components/content-layout/content-layout.d.ts +26 -0
- package/components/content-layout/content-layout.js +45 -0
- package/components/content-layout/sidebar.d.ts +31 -0
- package/components/content-layout/sidebar.js +76 -0
- package/components/contenteditable/contenteditable.d.ts +47 -0
- package/components/contenteditable/contenteditable.js +47 -0
- package/components/control-label/control-label.css +23 -0
- package/components/control-label/control-label.d.ts +11 -0
- package/components/control-label/control-label.js +22 -0
- package/components/data-list/data-list.css +97 -0
- package/components/data-list/data-list.d.ts +85 -0
- package/components/data-list/data-list.js +119 -0
- package/components/data-list/data-list.mock.d.ts +16 -0
- package/components/data-list/data-list.mock.js +207 -0
- package/components/data-list/item.d.ts +50 -0
- package/components/data-list/item.js +114 -0
- package/components/data-list/selection.d.ts +16 -0
- package/components/data-list/selection.js +81 -0
- package/components/data-list/title.d.ts +26 -0
- package/components/data-list/title.js +65 -0
- package/components/date-picker/consts.d.ts +98 -0
- package/components/date-picker/consts.js +44 -0
- package/components/date-picker/date-input.d.ts +47 -0
- package/components/date-picker/date-input.js +91 -0
- package/components/date-picker/date-picker.css +602 -0
- package/components/date-picker/date-picker.d.ts +77 -0
- package/components/date-picker/date-picker.js +218 -0
- package/components/date-picker/date-popup.d.ts +55 -0
- package/components/date-picker/date-popup.js +347 -0
- package/components/date-picker/day.d.ts +30 -0
- package/components/date-picker/day.js +88 -0
- package/components/date-picker/formats.d.ts +2 -0
- package/components/date-picker/formats.js +1 -0
- package/components/date-picker/month-names.d.ts +13 -0
- package/components/date-picker/month-names.js +62 -0
- package/components/date-picker/month-slider.d.ts +29 -0
- package/components/date-picker/month-slider.js +56 -0
- package/components/date-picker/month.d.ts +14 -0
- package/components/date-picker/month.js +33 -0
- package/components/date-picker/months.d.ts +11 -0
- package/components/date-picker/months.js +101 -0
- package/components/date-picker/weekdays.d.ts +13 -0
- package/components/date-picker/weekdays.js +24 -0
- package/components/date-picker/years.d.ts +25 -0
- package/components/date-picker/years.js +87 -0
- package/components/dialog/dialog.css +137 -0
- package/components/dialog/dialog.d.ts +64 -0
- package/components/dialog/dialog.js +128 -0
- package/components/dialog/dialog__body-scroll-preventer.d.ts +9 -0
- package/components/dialog/dialog__body-scroll-preventer.js +43 -0
- package/components/dropdown/anchor.d.ts +11 -0
- package/components/dropdown/anchor.js +16 -0
- package/components/dropdown/dropdown.css +18 -0
- package/components/dropdown/dropdown.d.ts +87 -0
- package/components/dropdown/dropdown.js +159 -0
- package/components/dropdown-menu/dropdown-menu.d.ts +36 -0
- package/components/dropdown-menu/dropdown-menu.js +56 -0
- package/components/editable-heading/editable-heading.css +198 -0
- package/components/editable-heading/editable-heading.d.ts +32 -0
- package/components/editable-heading/editable-heading.js +141 -0
- package/components/error-bubble/error-bubble-legacy.css +77 -0
- package/components/error-bubble/error-bubble.css +54 -0
- package/components/error-bubble/error-bubble.d.ts +18 -0
- package/components/error-bubble/error-bubble.js +28 -0
- package/components/error-message/error-message.css +37 -0
- package/components/error-message/error-message.d.ts +27 -0
- package/components/error-message/error-message.js +37 -0
- package/components/error-page/error-page.css +24 -0
- package/components/error-page/error-page.gif +0 -0
- package/components/footer/footer.css +83 -0
- package/components/footer/footer.d.ts +28 -0
- package/components/footer/footer.js +97 -0
- package/components/form/form.css +266 -0
- package/components/form/form.stories.js +138 -0
- package/components/global/compose.d.ts +7 -0
- package/components/global/compose.js +4 -0
- package/components/global/composeRefs.d.ts +3 -0
- package/components/global/composeRefs.js +8 -0
- package/components/global/controls-height.d.ts +9 -0
- package/components/global/controls-height.js +16 -0
- package/components/global/create-stateful-context.d.ts +27 -0
- package/components/global/create-stateful-context.js +38 -0
- package/components/global/data-tests.d.ts +3 -0
- package/components/global/data-tests.js +17 -0
- package/components/global/dom.d.ts +37 -0
- package/components/global/dom.js +83 -0
- package/components/global/focus-sensor-hoc.d.ts +19 -0
- package/components/global/focus-sensor-hoc.js +102 -0
- package/components/global/fuzzy-highlight.d.ts +11 -0
- package/components/global/fuzzy-highlight.js +58 -0
- package/components/global/get-event-key.d.ts +2 -0
- package/components/global/get-event-key.js +100 -0
- package/components/global/get-uid.d.ts +1 -0
- package/components/global/get-uid.js +16 -0
- package/components/global/global.css +101 -0
- package/components/global/inject-styles.d.ts +3 -0
- package/components/global/inject-styles.js +12 -0
- package/components/global/linear-function.d.ts +6 -0
- package/components/global/linear-function.js +13 -0
- package/components/global/listeners.d.ts +8 -0
- package/components/global/listeners.js +27 -0
- package/components/global/memoize.d.ts +1 -0
- package/components/global/memoize.js +15 -0
- package/components/global/normalize-indent.d.ts +1 -0
- package/components/global/normalize-indent.js +30 -0
- package/components/global/promise-with-timeout.d.ts +5 -0
- package/components/global/promise-with-timeout.js +11 -0
- package/components/global/prop-types.d.ts +4 -0
- package/components/global/prop-types.js +4 -0
- package/components/global/react-dom-renderer.d.ts +16 -0
- package/components/global/react-dom-renderer.js +25 -0
- package/components/global/react-render-adapter.d.ts +1 -0
- package/components/global/react-render-adapter.js +3 -0
- package/components/global/rerender-hoc.d.ts +10 -0
- package/components/global/rerender-hoc.js +14 -0
- package/components/global/schedule-raf.d.ts +1 -0
- package/components/global/schedule-raf.js +27 -0
- package/components/global/sniffer.d.ts +3 -0
- package/components/global/sniffer.js +4 -0
- package/components/global/theme.d.ts +21 -0
- package/components/global/theme.js +70 -0
- package/components/global/trivial-template-tag.d.ts +1 -0
- package/components/global/trivial-template-tag.js +9 -0
- package/components/global/typescript-utils.d.ts +2 -0
- package/components/global/typescript-utils.js +2 -0
- package/components/global/url.d.ts +57 -0
- package/components/global/url.js +136 -0
- package/components/global/use-event-callback.d.ts +1 -0
- package/components/global/use-event-callback.js +14 -0
- package/components/global/variables.css +179 -0
- package/components/global/variables.d.ts +89 -0
- package/components/global/variables.js +1 -0
- package/components/global/variables_dark.css +132 -0
- package/components/grid/col.d.ts +31 -0
- package/components/grid/col.js +49 -0
- package/components/grid/grid.css +915 -0
- package/components/grid/grid.d.ts +14 -0
- package/components/grid/grid.js +22 -0
- package/components/grid/row.d.ts +40 -0
- package/components/grid/row.js +51 -0
- package/components/group/group.css +7 -0
- package/components/group/group.d.ts +12 -0
- package/components/group/group.js +20 -0
- package/components/header/header.css +169 -0
- package/components/header/header.d.ts +34 -0
- package/components/header/header.js +46 -0
- package/components/header/logo.d.ts +14 -0
- package/components/header/logo.js +22 -0
- package/components/header/profile.d.ts +75 -0
- package/components/header/profile.js +119 -0
- package/components/header/services-link.d.ts +25 -0
- package/components/header/services-link.js +26 -0
- package/components/header/services.css +97 -0
- package/components/header/services.d.ts +33 -0
- package/components/header/services.js +62 -0
- package/components/header/smart-profile.d.ts +36 -0
- package/components/header/smart-profile.js +86 -0
- package/components/header/smart-services.d.ts +26 -0
- package/components/header/smart-services.js +49 -0
- package/components/header/tray-icon.d.ts +32 -0
- package/components/header/tray-icon.js +20 -0
- package/components/header/tray.d.ts +9 -0
- package/components/header/tray.js +18 -0
- package/components/heading/heading.css +68 -0
- package/components/heading/heading.d.ts +25 -0
- package/components/heading/heading.js +52 -0
- package/components/http/http.d.ts +61 -0
- package/components/http/http.js +192 -0
- package/components/http/http.mock.d.ts +20 -0
- package/components/http/http.mock.js +52 -0
- package/components/hub-source/hub-source.d.ts +44 -0
- package/components/hub-source/hub-source.js +107 -0
- package/components/hub-source/hub-source__user.d.ts +4 -0
- package/components/hub-source/hub-source__user.js +20 -0
- package/components/hub-source/hub-source__users-groups.d.ts +24 -0
- package/components/hub-source/hub-source__users-groups.js +53 -0
- package/components/i18n/README.md +46 -0
- package/components/i18n/i18n-context.d.ts +13 -0
- package/components/i18n/i18n-context.js +14 -0
- package/components/i18n/i18n.d.ts +59 -0
- package/components/i18n/i18n.js +26 -0
- package/components/i18n/messages.json +53 -0
- package/components/icon/icon.css +100 -0
- package/components/icon/icon.d.ts +43 -0
- package/components/icon/icon.js +69 -0
- package/components/icon/icon__constants.d.ts +30 -0
- package/components/icon/icon__constants.js +32 -0
- package/components/icon/icon__svg.d.ts +15 -0
- package/components/icon/icon__svg.js +58 -0
- package/components/icon/index.d.ts +2 -0
- package/components/icon/index.js +2 -0
- package/components/input/input-legacy.css +123 -0
- package/components/input/input.css +194 -0
- package/components/input/input.d.ts +77 -0
- package/components/input/input.js +165 -0
- package/components/input-size/input-size.css +82 -0
- package/components/input-size/input-size.stories.js +73 -0
- package/components/island/adaptive-island-hoc.d.ts +61 -0
- package/components/island/adaptive-island-hoc.js +28 -0
- package/components/island/content.d.ts +43 -0
- package/components/island/content.js +100 -0
- package/components/island/header.d.ts +8 -0
- package/components/island/header.js +78 -0
- package/components/island/island.css +131 -0
- package/components/island/island.d.ts +78 -0
- package/components/island/island.js +31 -0
- package/components/island-legacy/content-legacy.d.ts +10 -0
- package/components/island-legacy/content-legacy.js +17 -0
- package/components/island-legacy/header-legacy.d.ts +10 -0
- package/components/island-legacy/header-legacy.js +19 -0
- package/components/island-legacy/island-legacy.css +98 -0
- package/components/island-legacy/island-legacy.d.ts +12 -0
- package/components/island-legacy/island-legacy.js +19 -0
- package/components/line/line.css +14 -0
- package/components/link/clickableLink.d.ts +20 -0
- package/components/link/clickableLink.js +33 -0
- package/components/link/link.css +64 -0
- package/components/link/link.d.ts +138 -0
- package/components/link/link.js +44 -0
- package/components/list/consts.d.ts +77 -0
- package/components/list/consts.js +25 -0
- package/components/list/list.css +298 -0
- package/components/list/list.d.ts +205 -0
- package/components/list/list.js +590 -0
- package/components/list/list.stories.css +3 -0
- package/components/list/list__custom.d.ts +6 -0
- package/components/list/list__custom.js +52 -0
- package/components/list/list__hint.d.ts +15 -0
- package/components/list/list__hint.js +16 -0
- package/components/list/list__item.d.ts +8 -0
- package/components/list/list__item.js +130 -0
- package/components/list/list__link.d.ts +9 -0
- package/components/list/list__link.js +43 -0
- package/components/list/list__separator.d.ts +5 -0
- package/components/list/list__separator.js +21 -0
- package/components/list/list__title.d.ts +5 -0
- package/components/list/list__title.js +28 -0
- package/components/list/list__users-groups-source.d.ts +27 -0
- package/components/list/list__users-groups-source.js +74 -0
- package/components/loader/loader.css +27 -0
- package/components/loader/loader.d.ts +28 -0
- package/components/loader/loader.js +44 -0
- package/components/loader/loader__core.d.ts +75 -0
- package/components/loader/loader__core.js +219 -0
- package/components/loader-inline/loader-inline.css +73 -0
- package/components/loader-inline/loader-inline.d.ts +18 -0
- package/components/loader-inline/loader-inline.js +27 -0
- package/components/loader-screen/loader-screen.css +29 -0
- package/components/loader-screen/loader-screen.d.ts +17 -0
- package/components/loader-screen/loader-screen.js +25 -0
- package/components/login-dialog/login-dialog.css +23 -0
- package/components/login-dialog/login-dialog.d.ts +47 -0
- package/components/login-dialog/login-dialog.js +84 -0
- package/components/login-dialog/service.d.ts +2 -0
- package/components/login-dialog/service.js +24 -0
- package/components/markdown/markdown.css +126 -0
- package/components/markdown/markdown.d.ts +12 -0
- package/components/markdown/markdown.js +25 -0
- package/components/message/message.css +61 -0
- package/components/message/message.d.ts +55 -0
- package/components/message/message.js +129 -0
- package/components/old-browsers-message/old-browsers-message.css +26 -0
- package/components/old-browsers-message/old-browsers-message.d.ts +2 -0
- package/components/old-browsers-message/old-browsers-message.js +83 -0
- package/components/old-browsers-message/old-browsers-message__stop.d.ts +1 -0
- package/components/old-browsers-message/old-browsers-message__stop.js +2 -0
- package/components/old-browsers-message/white-list.d.ts +2 -0
- package/components/old-browsers-message/white-list.js +25 -0
- package/components/pager/pager.css +19 -0
- package/components/pager/pager.d.ts +78 -0
- package/components/pager/pager.js +223 -0
- package/components/palette/palette.css +216 -0
- package/components/panel/panel.css +20 -0
- package/components/panel/panel.d.ts +12 -0
- package/components/panel/panel.js +20 -0
- package/components/permissions/permissions.d.ts +111 -0
- package/components/permissions/permissions.js +177 -0
- package/components/permissions/permissions__cache.d.ts +93 -0
- package/components/permissions/permissions__cache.js +228 -0
- package/components/popup/popup.consts.d.ts +37 -0
- package/components/popup/popup.consts.js +45 -0
- package/components/popup/popup.css +34 -0
- package/components/popup/popup.d.ts +147 -0
- package/components/popup/popup.js +312 -0
- package/components/popup/popup.target.d.ts +7 -0
- package/components/popup/popup.target.js +15 -0
- package/components/popup/position.d.ts +30 -0
- package/components/popup/position.js +202 -0
- package/components/popup-menu/popup-menu.d.ts +80 -0
- package/components/popup-menu/popup-menu.js +41 -0
- package/components/progress-bar/progress-bar.css +82 -0
- package/components/progress-bar/progress-bar.d.ts +64 -0
- package/components/progress-bar/progress-bar.js +76 -0
- package/components/query-assist/query-assist.css +275 -0
- package/components/query-assist/query-assist.d.ts +306 -0
- package/components/query-assist/query-assist.js +847 -0
- package/components/query-assist/query-assist__suggestions.d.ts +29 -0
- package/components/query-assist/query-assist__suggestions.js +60 -0
- package/components/radio/radio.css +122 -0
- package/components/radio/radio.d.ts +18 -0
- package/components/radio/radio.js +27 -0
- package/components/radio/radio__item.d.ts +28 -0
- package/components/radio/radio__item.js +41 -0
- package/components/select/select-popup.css +103 -0
- package/components/select/select.css +235 -0
- package/components/select/select.d.ts +276 -0
- package/components/select/select.js +957 -0
- package/components/select/select__filter.d.ts +19 -0
- package/components/select/select__filter.js +49 -0
- package/components/select/select__popup.d.ts +166 -0
- package/components/select/select__popup.js +408 -0
- package/components/shortcuts/core.d.ts +74 -0
- package/components/shortcuts/core.js +191 -0
- package/components/shortcuts/shortcut-title.d.ts +1 -0
- package/components/shortcuts/shortcut-title.js +50 -0
- package/components/shortcuts/shortcuts-hoc.d.ts +65 -0
- package/components/shortcuts/shortcuts-hoc.js +19 -0
- package/components/shortcuts/shortcuts.d.ts +28 -0
- package/components/shortcuts/shortcuts.js +50 -0
- package/components/sidebar/sidebar.css +157 -0
- package/components/storage/storage.d.ts +18 -0
- package/components/storage/storage.js +22 -0
- package/components/storage/storage__fallback.d.ts +79 -0
- package/components/storage/storage__fallback.js +181 -0
- package/components/storage/storage__local.d.ts +38 -0
- package/components/storage/storage__local.js +119 -0
- package/components/tab-trap/tab-trap.css +6 -0
- package/components/tab-trap/tab-trap.d.ts +43 -0
- package/components/tab-trap/tab-trap.js +125 -0
- package/components/table/cell.d.ts +13 -0
- package/components/table/cell.js +16 -0
- package/components/table/disable-hover-hoc.d.ts +64 -0
- package/components/table/disable-hover-hoc.js +32 -0
- package/components/table/header-cell.d.ts +43 -0
- package/components/table/header-cell.js +56 -0
- package/components/table/header.d.ts +56 -0
- package/components/table/header.js +67 -0
- package/components/table/multitable.d.ts +25 -0
- package/components/table/multitable.js +81 -0
- package/components/table/row-with-focus-sensor.d.ts +18 -0
- package/components/table/row-with-focus-sensor.js +25 -0
- package/components/table/row.d.ts +59 -0
- package/components/table/row.js +154 -0
- package/components/table/selection-adapter.d.ts +5 -0
- package/components/table/selection-adapter.js +10 -0
- package/components/table/selection-shortcuts-hoc.d.ts +17 -0
- package/components/table/selection-shortcuts-hoc.js +146 -0
- package/components/table/selection.d.ts +47 -0
- package/components/table/selection.js +150 -0
- package/components/table/smart-table.d.ts +64 -0
- package/components/table/smart-table.js +40 -0
- package/components/table/table.css +259 -0
- package/components/table/table.d.ts +159 -0
- package/components/table/table.examples2.json +19 -0
- package/components/table/table.js +231 -0
- package/components/table/table.stories.json +45 -0
- package/components/table-legacy/table-legacy.css +346 -0
- package/components/table-legacy/table-legacy__toolbar.css +25 -0
- package/components/tabs/collapsible-more.d.ts +29 -0
- package/components/tabs/collapsible-more.js +97 -0
- package/components/tabs/collapsible-tab.d.ts +16 -0
- package/components/tabs/collapsible-tab.js +34 -0
- package/components/tabs/collapsible-tabs.d.ts +43 -0
- package/components/tabs/collapsible-tabs.js +196 -0
- package/components/tabs/custom-item.d.ts +9 -0
- package/components/tabs/custom-item.js +5 -0
- package/components/tabs/dumb-tabs.d.ts +35 -0
- package/components/tabs/dumb-tabs.js +56 -0
- package/components/tabs/smart-tabs.d.ts +20 -0
- package/components/tabs/smart-tabs.js +25 -0
- package/components/tabs/tab-link.d.ts +18 -0
- package/components/tabs/tab-link.js +24 -0
- package/components/tabs/tab.d.ts +27 -0
- package/components/tabs/tab.js +19 -0
- package/components/tabs/tabs.css +223 -0
- package/components/tabs/tabs.d.ts +7 -0
- package/components/tabs/tabs.js +7 -0
- package/components/tag/tag.css +184 -0
- package/components/tag/tag.d.ts +64 -0
- package/components/tag/tag.js +130 -0
- package/components/tags-input/tags-input.css +100 -0
- package/components/tags-input/tags-input.d.ts +138 -0
- package/components/tags-input/tags-input.js +275 -0
- package/components/tags-list/tags-list.d.ts +46 -0
- package/components/tags-list/tags-list.js +45 -0
- package/components/text/text.css +21 -0
- package/components/text/text.d.ts +23 -0
- package/components/text/text.js +31 -0
- package/components/toggle/toggle.css +198 -0
- package/components/toggle/toggle.d.ts +39 -0
- package/components/toggle/toggle.js +46 -0
- package/components/tooltip/tooltip.css +17 -0
- package/components/tooltip/tooltip.d.ts +65 -0
- package/components/tooltip/tooltip.js +126 -0
- package/components/user-agreement/service.d.ts +69 -0
- package/components/user-agreement/service.js +242 -0
- package/components/user-agreement/toolbox.eula.d.ts +2 -0
- package/components/user-agreement/toolbox.eula.js +160 -0
- package/components/user-agreement/user-agreement.css +29 -0
- package/components/user-agreement/user-agreement.d.ts +60 -0
- package/components/user-agreement/user-agreement.js +80 -0
- package/components/user-card/card.d.ts +70 -0
- package/components/user-card/card.js +89 -0
- package/components/user-card/smart-user-card-tooltip.d.ts +20 -0
- package/components/user-card/smart-user-card-tooltip.js +47 -0
- package/components/user-card/tooltip.d.ts +36 -0
- package/components/user-card/tooltip.js +43 -0
- package/components/user-card/user-card.css +123 -0
- package/components/user-card/user-card.d.ts +11 -0
- package/components/user-card/user-card.js +11 -0
- package/package.json +61 -61
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
@import "./table-legacy__toolbar.css";
|
|
2
|
+
|
|
3
|
+
:global(.ring-table) {
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
border-spacing: 0;
|
|
7
|
+
|
|
8
|
+
border-collapse: collapse;
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
|
|
11
|
+
font-size: var(--ring-font-size);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:global(.ring-table__header) {
|
|
15
|
+
display: table-row;
|
|
16
|
+
|
|
17
|
+
background-color: var(--ring-sidebar-background-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:global(.ring-table__header-checkbox) {
|
|
21
|
+
position: relative;
|
|
22
|
+
top: 1px;
|
|
23
|
+
left: -2px;
|
|
24
|
+
|
|
25
|
+
display: inline-block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:global(.ring-table__title) {
|
|
29
|
+
position: relative;
|
|
30
|
+
|
|
31
|
+
display: table-cell;
|
|
32
|
+
|
|
33
|
+
padding: 0 var(--ring-unit);
|
|
34
|
+
|
|
35
|
+
text-align: left;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
|
|
38
|
+
color: var(--ring-text-color);
|
|
39
|
+
border-top: 1px solid var(--ring-sidebar-background-color);
|
|
40
|
+
border-bottom: 1px solid var(--ring-line-color);
|
|
41
|
+
|
|
42
|
+
font-size: var(--ring-font-size-smaller);
|
|
43
|
+
font-weight: normal;
|
|
44
|
+
line-height: 23px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:global(.ring-table__title.ring-table__title_active) {
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:global(.ring-table__title:first-child) {
|
|
52
|
+
padding-left: calc(var(--ring-unit) * 4);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Have to emulate right border because of Fx weird bug —
|
|
56
|
+
* https://jetpass.myjetbrains.com/youtrack/issue/JPS-1634
|
|
57
|
+
* Removing border-collapse: collapse from .ring-table helps too,
|
|
58
|
+
* but to implement nested items markup without it is next to impossible.
|
|
59
|
+
**/
|
|
60
|
+
:global(.ring-table__title::after) {
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: -1px;
|
|
63
|
+
right: 0;
|
|
64
|
+
bottom: 0;
|
|
65
|
+
|
|
66
|
+
display: block;
|
|
67
|
+
|
|
68
|
+
width: 1px;
|
|
69
|
+
|
|
70
|
+
content: normal;
|
|
71
|
+
|
|
72
|
+
background-color: var(--ring-sidebar-background-color);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:global(.ring-table__title_border::after) {
|
|
76
|
+
content: "";
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:global(.ring-table__title_nested) {
|
|
80
|
+
padding-left: calc(var(--ring-unit) * 5);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* fix header checkbox position in nested table */
|
|
84
|
+
:global(.ring-table__title_nested.ring-table__header-checkbox) {
|
|
85
|
+
left: -26px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:global(.ring-table__toggle) {
|
|
89
|
+
position: relative;
|
|
90
|
+
top: 9px;
|
|
91
|
+
|
|
92
|
+
display: inline-block;
|
|
93
|
+
|
|
94
|
+
width: 12px;
|
|
95
|
+
height: 9px;
|
|
96
|
+
|
|
97
|
+
margin-left: calc(var(--ring-unit) * 2);
|
|
98
|
+
padding-bottom: 21px;
|
|
99
|
+
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
|
|
102
|
+
color: var(--ring-line-color);
|
|
103
|
+
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:global(.ring-table__toggle:hover) {
|
|
108
|
+
color: var(--ring-text-color);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:global(.ring-table__toggle-icon) {
|
|
112
|
+
float: right;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:global(.ring-table__toggle-icon:hover) {
|
|
116
|
+
color: var(--ring-link-hover-color);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:global(.ring-table__column-inline-avatar) {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
|
|
122
|
+
vertical-align: middle;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:global(.ring-table__column-inline-avatar-img) {
|
|
126
|
+
margin: -6px 8px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:global(.ring-table__column_selector) {
|
|
130
|
+
min-width: calc(3 * var(--ring-unit));
|
|
131
|
+
padding: 0 !important;
|
|
132
|
+
|
|
133
|
+
text-align: center;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:global(.ring-table__selector) {
|
|
137
|
+
display: inline-block;
|
|
138
|
+
|
|
139
|
+
margin: 0 0 0 calc(var(--ring-unit) / 2);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:global(.ring-table__column) {
|
|
143
|
+
display: table-cell;
|
|
144
|
+
|
|
145
|
+
padding: calc(var(--ring-unit) - 2px) var(--ring-unit);
|
|
146
|
+
|
|
147
|
+
vertical-align: middle;
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
|
|
150
|
+
border-collapse: collapse;
|
|
151
|
+
border-width: 1px;
|
|
152
|
+
border-color: var(--ring-line-color);
|
|
153
|
+
border-top-style: solid;
|
|
154
|
+
border-bottom-style: solid;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Avoid vertical gaps in the middle of the table */
|
|
158
|
+
:global(.ring-table__column:last-child) {
|
|
159
|
+
width: 100%;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:global(.ring-table__column:first-child) {
|
|
163
|
+
padding-left: calc(4 * var(--ring-unit));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:global(.ring-table__column.ring-table__column_gap) {
|
|
167
|
+
border-bottom-color: transparent !important;
|
|
168
|
+
background-color: var(--ring-line-color);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Combined class is required here for specificity */
|
|
172
|
+
:global(.ring-table__column.ring-table__column_toggle) {
|
|
173
|
+
width: calc(var(--ring-unit) * 2);
|
|
174
|
+
padding: 0;
|
|
175
|
+
|
|
176
|
+
text-align: right;
|
|
177
|
+
|
|
178
|
+
vertical-align: top;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:global(.ring-table__column_right) {
|
|
182
|
+
text-align: right;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:global(.ring-table__column_gray) {
|
|
186
|
+
color: var(--ring-secondary-color);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:global(.ring-table__column_snuggle-right) {
|
|
190
|
+
padding-right: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:global(.ring-table__column_snuggle-left) {
|
|
194
|
+
padding-left: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:global(.ring-table__column_align-right) {
|
|
198
|
+
text-align: right;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:global(.ring-table__column_gap) {
|
|
202
|
+
padding-left: calc(var(--ring-unit) * 2) !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:global(.ring-table__column-title) {
|
|
206
|
+
font-weight: bold;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:global(.ring-table__column_wide) {
|
|
210
|
+
min-width: calc(10 * var(--ring-unit));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:global(.ring-table__column_limited) {
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
|
|
216
|
+
max-width: calc(50 * var(--ring-unit));
|
|
217
|
+
|
|
218
|
+
white-space: nowrap;
|
|
219
|
+
text-overflow: ellipsis;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:global(.ring-table__column_unlimited) {
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
|
|
225
|
+
width: 100%;
|
|
226
|
+
max-width: 1px;
|
|
227
|
+
|
|
228
|
+
white-space: nowrap;
|
|
229
|
+
text-overflow: ellipsis;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:global(.ring-table__column_narrow) {
|
|
233
|
+
min-width: calc(3 * var(--ring-unit));
|
|
234
|
+
padding: 0 !important;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:global(.ring-table__column-list:not(:last-child)::after) {
|
|
238
|
+
content: ", ";
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:global(.ring-table__row) {
|
|
242
|
+
display: table-row;
|
|
243
|
+
|
|
244
|
+
width: 100%;
|
|
245
|
+
height: calc(5 * var(--ring-unit));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
:global(.ring-table__row .ring-table__row_ghost) {
|
|
249
|
+
background-color: var(--ring-content-background-color);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
:global(.ring-table__row .ring-table__row_implicit) {
|
|
253
|
+
opacity: 0.5;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
:global(.ring-table__row:hover) {
|
|
257
|
+
background-color: var(--ring-sidebar-background-color);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
:global(.ring-table__row:hover .ring-table__column_gap) {
|
|
261
|
+
background-color: var(--ring-line-color);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
:global(.ring-table__row .ring-table__row_unselectable:hover) {
|
|
265
|
+
background-color: initial;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:global(.ring-table__row .ring-table__row_checked) {
|
|
269
|
+
background-color: var(--ring-selected-background-color);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:global(.ring-table__row .ring-table__row_active-checked) {
|
|
273
|
+
background-color: var(--ring-selected-background-color);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:global(.ring-table__row .ring-table__row_active.ring-table__column) {
|
|
277
|
+
border-color: var(--ring-main-color);
|
|
278
|
+
border-top-style: double; /* Using double to override border-top-color because of border collapsed */
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
:global(.ring-table__row .ring-table__row_active.ring-table__column_gap) {
|
|
282
|
+
border-color: var(--ring-line-color);
|
|
283
|
+
border-top-style: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
:global(.ring-table__row .ring-table__row_active.sidebar__btn) {
|
|
287
|
+
visibility: visible;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
:global(.ring-table__group) {
|
|
291
|
+
display: table-row-group;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
:global(.ring-table__description) {
|
|
295
|
+
margin-left: var(--ring-unit);
|
|
296
|
+
|
|
297
|
+
color: var(--ring-secondary-color);
|
|
298
|
+
|
|
299
|
+
font-size: var(--ring-font-size-smaller);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
:global(.ring-table__avatar) {
|
|
303
|
+
width: calc(3 * var(--ring-unit));
|
|
304
|
+
height: calc(3 * var(--ring-unit) + 3px); /* If avatar is missing */
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
:global(.ring-table__avatar-img) {
|
|
308
|
+
width: calc(3 * var(--ring-unit));
|
|
309
|
+
height: calc(3 * var(--ring-unit));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
:global(.ring-table__header_sticky) {
|
|
313
|
+
position: fixed;
|
|
314
|
+
|
|
315
|
+
/* Set z-index to avoid overlaying icons in rows and fixed header */
|
|
316
|
+
|
|
317
|
+
z-index: var(--ring-fixed-z-index);
|
|
318
|
+
top: 0;
|
|
319
|
+
|
|
320
|
+
display: none;
|
|
321
|
+
|
|
322
|
+
width: auto;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
:global(.table__pager) {
|
|
326
|
+
padding: calc(4 * var(--ring-unit)) calc(4 * var(--ring-unit));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
:global(.table__pager-links) {
|
|
330
|
+
margin-bottom: calc(2 * var(--ring-unit));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
:global(.table__pager-link) {
|
|
334
|
+
display: inline-block;
|
|
335
|
+
|
|
336
|
+
margin-right: calc(4 * var(--ring-unit));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
:global(.table__pager-link_disabled) {
|
|
340
|
+
color: var(--ring-secondary-color);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
:global(.table__pager-select) {
|
|
344
|
+
display: inline-block;
|
|
345
|
+
float: right;
|
|
346
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:global(.ring-table__toolbar) {
|
|
2
|
+
background: inherit;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:global(.ring-table__toolbar-controls) {
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
display: block;
|
|
9
|
+
|
|
10
|
+
min-height: calc(var(--ring-unit) * 3);
|
|
11
|
+
|
|
12
|
+
padding: calc(var(--ring-unit) * 2) calc(var(--ring-unit) * 4);
|
|
13
|
+
|
|
14
|
+
white-space: initial;
|
|
15
|
+
|
|
16
|
+
background: inherit;
|
|
17
|
+
|
|
18
|
+
&:global(.ring-table__toolbar-controls_fixed) {
|
|
19
|
+
position: fixed;
|
|
20
|
+
z-index: calc(var(--ring-fixed-z-index) + 1);
|
|
21
|
+
top: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { LinkProps } from '../link/link';
|
|
4
|
+
import { TabProps } from './tab';
|
|
5
|
+
export interface FakeMoreButtonProps {
|
|
6
|
+
hasActiveChildren: boolean;
|
|
7
|
+
moreClassName?: string | null | undefined;
|
|
8
|
+
moreActiveClassName?: string | null | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare const AnchorLink: {
|
|
11
|
+
({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }: Omit<LinkProps, 'children'> & FakeMoreButtonProps): React.JSX.Element;
|
|
12
|
+
propTypes: {
|
|
13
|
+
hasActiveChildren: PropTypes.Requireable<boolean>;
|
|
14
|
+
moreClassName: PropTypes.Requireable<string>;
|
|
15
|
+
moreActiveClassName: PropTypes.Requireable<string>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export interface MoreButtonProps {
|
|
19
|
+
items: ReactElement<TabProps>[];
|
|
20
|
+
selected?: string | undefined;
|
|
21
|
+
onSelect: (key: string) => () => void;
|
|
22
|
+
moreClassName?: string | null | undefined;
|
|
23
|
+
moreActiveClassName?: string | null | undefined;
|
|
24
|
+
morePopupClassName?: string | null | undefined;
|
|
25
|
+
morePopupItemClassName?: string | undefined;
|
|
26
|
+
morePopupBeforeEnd: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare const MoreButton: React.MemoExoticComponent<({ items, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupItemClassName, morePopupBeforeEnd }: MoreButtonProps) => React.JSX.Element | null>;
|
|
29
|
+
export declare const FakeMoreButton: React.MemoExoticComponent<({ moreClassName, moreActiveClassName, hasActiveChildren }: FakeMoreButtonProps) => React.JSX.Element>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import chevronDownIcon from '@jetbrains/icons/chevron-10px';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { Directions } from '../popup/popup.consts';
|
|
6
|
+
import PopupMenu, { ListProps } from '../popup-menu/popup-menu';
|
|
7
|
+
import Dropdown from '../dropdown/dropdown';
|
|
8
|
+
import Link from '../link/link';
|
|
9
|
+
import Icon from '../icon/icon';
|
|
10
|
+
import styles from './tabs.css';
|
|
11
|
+
import getTabTitles from './collapsible-tab';
|
|
12
|
+
import { CustomItem } from './custom-item';
|
|
13
|
+
export const AnchorLink = ({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }) => {
|
|
14
|
+
const classnames = classNames(styles.title, hasActiveChildren && styles.selected, hasActiveChildren && moreActiveClassName, moreClassName);
|
|
15
|
+
return (<Link title={'More'} className={classnames} {...restProps}>
|
|
16
|
+
{'More'}
|
|
17
|
+
<Icon glyph={chevronDownIcon} className={styles.chevron}/></Link>);
|
|
18
|
+
};
|
|
19
|
+
AnchorLink.propTypes = {
|
|
20
|
+
hasActiveChildren: PropTypes.bool,
|
|
21
|
+
moreClassName: PropTypes.string,
|
|
22
|
+
moreActiveClassName: PropTypes.string
|
|
23
|
+
};
|
|
24
|
+
const morePopupDirections = [
|
|
25
|
+
Directions.BOTTOM_CENTER,
|
|
26
|
+
Directions.BOTTOM_LEFT,
|
|
27
|
+
Directions.BOTTOM_RIGHT
|
|
28
|
+
];
|
|
29
|
+
export const MoreButton = React.memo(({ items, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupItemClassName, morePopupBeforeEnd }) => {
|
|
30
|
+
const onSelectHandler = React.useCallback((listItem) => {
|
|
31
|
+
if (listItem.disabled === true || listItem.custom === true) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const cb = onSelect(String(listItem.key));
|
|
35
|
+
cb();
|
|
36
|
+
}, [onSelect]);
|
|
37
|
+
const hasActiveChild = React.useMemo(() => items.some(item => item.props.alwaysHidden && item.props.id === selected), [items, selected]);
|
|
38
|
+
const data = React.useMemo(() => {
|
|
39
|
+
const popupItems = getTabTitles({
|
|
40
|
+
items,
|
|
41
|
+
selected,
|
|
42
|
+
collapsed: true
|
|
43
|
+
}).map(tab => {
|
|
44
|
+
const disabled = tab.props.disabled === true;
|
|
45
|
+
const custom = tab.props.child.type === CustomItem;
|
|
46
|
+
return ({
|
|
47
|
+
template: tab,
|
|
48
|
+
key: tab.key,
|
|
49
|
+
rgItemType: ListProps.Type.CUSTOM,
|
|
50
|
+
className: morePopupItemClassName,
|
|
51
|
+
disabled,
|
|
52
|
+
custom
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
if (morePopupBeforeEnd) {
|
|
56
|
+
popupItems.push({
|
|
57
|
+
template: morePopupBeforeEnd,
|
|
58
|
+
key: 'before-end-content',
|
|
59
|
+
className: styles.morePopupBeforeEnd,
|
|
60
|
+
rgItemType: ListProps.Type.CUSTOM
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return popupItems;
|
|
64
|
+
}, [items, morePopupBeforeEnd, morePopupItemClassName, selected]);
|
|
65
|
+
const popupAnchor = React.useMemo(() => (<AnchorLink moreClassName={moreClassName} moreActiveClassName={moreActiveClassName} hasActiveChildren={hasActiveChild}/>), [hasActiveChild, moreActiveClassName, moreClassName]);
|
|
66
|
+
const popup = React.useMemo(() => (<PopupMenu directions={morePopupDirections} className={morePopupClassName} onSelect={onSelectHandler} data={data}/>), [data, morePopupClassName, onSelectHandler]);
|
|
67
|
+
if (items.length === 0) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return (<div className={classNames(styles.title, moreClassName, hasActiveChild && moreActiveClassName)}>
|
|
71
|
+
<Dropdown hoverMode anchor={popupAnchor}>
|
|
72
|
+
{popup}
|
|
73
|
+
</Dropdown>
|
|
74
|
+
</div>);
|
|
75
|
+
});
|
|
76
|
+
MoreButton.propTypes = {
|
|
77
|
+
children: PropTypes.node,
|
|
78
|
+
items: PropTypes.array,
|
|
79
|
+
selected: PropTypes.string,
|
|
80
|
+
onSelect: PropTypes.func,
|
|
81
|
+
toMeasure: PropTypes.bool,
|
|
82
|
+
moreClassName: PropTypes.string,
|
|
83
|
+
moreActiveClassName: PropTypes.string,
|
|
84
|
+
morePopupClassName: PropTypes.string,
|
|
85
|
+
morePopupItemClassName: PropTypes.string,
|
|
86
|
+
morePopupBeforeEnd: PropTypes.element
|
|
87
|
+
};
|
|
88
|
+
MoreButton.displayName = 'MoreButton';
|
|
89
|
+
export const FakeMoreButton = React.memo(({ moreClassName, moreActiveClassName, hasActiveChildren }) => (<div className={classNames(styles.moreButton, styles.title)}>
|
|
90
|
+
<AnchorLink moreClassName={moreClassName} moreActiveClassName={moreActiveClassName} hasActiveChildren={hasActiveChildren} tabIndex={-1} disabled/>
|
|
91
|
+
</div>));
|
|
92
|
+
FakeMoreButton.propTypes = {
|
|
93
|
+
moreClassName: PropTypes.string,
|
|
94
|
+
moreActiveClassName: PropTypes.string,
|
|
95
|
+
hasActiveChildren: PropTypes.bool
|
|
96
|
+
};
|
|
97
|
+
FakeMoreButton.displayName = 'FakeMoreButton';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { TabProps } from './tab';
|
|
3
|
+
export interface TabTitleProps {
|
|
4
|
+
selected: boolean;
|
|
5
|
+
child: ReactElement<TabProps> | null;
|
|
6
|
+
handleSelect?: ((e: React.MouseEvent<HTMLAnchorElement>) => void) | undefined;
|
|
7
|
+
collapsed?: boolean | undefined;
|
|
8
|
+
tabIndex?: number | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface TabTitlesParams extends Omit<Partial<TabTitleProps>, 'selected'> {
|
|
11
|
+
items: ReactElement<TabProps>[];
|
|
12
|
+
selected?: string | undefined;
|
|
13
|
+
onSelect?: ((key: string) => ((e: React.MouseEvent<HTMLAnchorElement>) => void) | undefined) | undefined;
|
|
14
|
+
}
|
|
15
|
+
declare const getTabTitles: ({ items, selected, collapsed, onSelect, ...props }: TabTitlesParams) => React.JSX.Element[];
|
|
16
|
+
export default getTabTitles;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import styles from './tabs.css';
|
|
5
|
+
import TabLink from './tab-link';
|
|
6
|
+
import { CustomItem } from './custom-item';
|
|
7
|
+
function noop() { }
|
|
8
|
+
const TabTitle = React.memo(function TabTitle({ selected, child, handleSelect = noop, collapsed = false, tabIndex }) {
|
|
9
|
+
if (child == null || typeof child !== 'object' || child.type === CustomItem) {
|
|
10
|
+
return child;
|
|
11
|
+
}
|
|
12
|
+
const { title, titleProps, disabled, href, className, activeClassName, collapsedClassName, collapsedActiveClassName } = child.props;
|
|
13
|
+
const titleClasses = classNames(styles.title, className, {
|
|
14
|
+
[styles.selected]: selected,
|
|
15
|
+
[styles.collapsed]: collapsed,
|
|
16
|
+
[activeClassName ?? '']: selected,
|
|
17
|
+
[collapsedClassName ?? '']: collapsed,
|
|
18
|
+
[collapsedActiveClassName ?? '']: collapsed && selected
|
|
19
|
+
});
|
|
20
|
+
return (<TabLink title={title} isSelected={selected} active href={href} className={titleClasses} disabled={disabled} onPlainLeftClick={handleSelect} tabIndex={tabIndex} collapsed={collapsed} {...titleProps}/>);
|
|
21
|
+
});
|
|
22
|
+
TabTitle.propTypes = {
|
|
23
|
+
child: PropTypes.element,
|
|
24
|
+
handleSelect: PropTypes.func,
|
|
25
|
+
selected: PropTypes.bool,
|
|
26
|
+
collapsed: PropTypes.bool,
|
|
27
|
+
tabIndex: PropTypes.number
|
|
28
|
+
};
|
|
29
|
+
const getTabTitles = ({ items, selected = '0', collapsed, onSelect = () => undefined, ...props }) => items.map((tab, index) => {
|
|
30
|
+
const key = tab.props.id || String(index);
|
|
31
|
+
const isSelected = selected === key;
|
|
32
|
+
return (<TabTitle key={key} handleSelect={onSelect(key)} selected={isSelected} child={tab} collapsed={collapsed} {...props}/>);
|
|
33
|
+
});
|
|
34
|
+
export default getTabTitles;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { TabProps } from './tab';
|
|
4
|
+
export interface CollapsibleTabsProps {
|
|
5
|
+
children: ReactElement<TabProps>[];
|
|
6
|
+
selected?: string | undefined;
|
|
7
|
+
onSelect: (key: string) => () => void;
|
|
8
|
+
moreClassName?: string | null | undefined;
|
|
9
|
+
moreActiveClassName?: string | null | undefined;
|
|
10
|
+
morePopupClassName?: string | null | undefined;
|
|
11
|
+
morePopupItemClassName?: string | undefined;
|
|
12
|
+
initialVisibleItems?: number | null | undefined;
|
|
13
|
+
morePopupBeforeEnd?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const CollapsibleTabs: {
|
|
16
|
+
({ children, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupBeforeEnd, morePopupItemClassName, initialVisibleItems }: CollapsibleTabsProps): React.JSX.Element;
|
|
17
|
+
propTypes: {
|
|
18
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
19
|
+
selected: PropTypes.Requireable<string>;
|
|
20
|
+
onSelect: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
moreClassName: PropTypes.Requireable<string>;
|
|
22
|
+
moreActiveClassName: PropTypes.Requireable<string>;
|
|
23
|
+
morePopupClassName: PropTypes.Requireable<string>;
|
|
24
|
+
morePopupItemClassName: PropTypes.Requireable<string>;
|
|
25
|
+
initialVisibleItems: PropTypes.Requireable<number>;
|
|
26
|
+
morePopupBeforeEnd: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
declare const _default: React.MemoExoticComponent<{
|
|
30
|
+
({ children, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupBeforeEnd, morePopupItemClassName, initialVisibleItems }: CollapsibleTabsProps): React.JSX.Element;
|
|
31
|
+
propTypes: {
|
|
32
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
33
|
+
selected: PropTypes.Requireable<string>;
|
|
34
|
+
onSelect: PropTypes.Validator<(...args: any[]) => any>;
|
|
35
|
+
moreClassName: PropTypes.Requireable<string>;
|
|
36
|
+
moreActiveClassName: PropTypes.Requireable<string>;
|
|
37
|
+
morePopupClassName: PropTypes.Requireable<string>;
|
|
38
|
+
morePopupItemClassName: PropTypes.Requireable<string>;
|
|
39
|
+
initialVisibleItems: PropTypes.Requireable<number>;
|
|
40
|
+
morePopupBeforeEnd: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
export default _default;
|