@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,126 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
@value p-margin: 10px;
|
|
4
|
+
|
|
5
|
+
.inline {
|
|
6
|
+
&,
|
|
7
|
+
& p {
|
|
8
|
+
display: inline;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.markdown {
|
|
13
|
+
composes: font from "../global/global.css";
|
|
14
|
+
|
|
15
|
+
& ol,
|
|
16
|
+
& ul {
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& p,
|
|
21
|
+
& blockquote,
|
|
22
|
+
& pre {
|
|
23
|
+
margin: 0;
|
|
24
|
+
|
|
25
|
+
&:not(:first-child) {
|
|
26
|
+
margin-top: p-margin;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
& li {
|
|
31
|
+
margin-top: p-margin;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& li {
|
|
35
|
+
& p,
|
|
36
|
+
& blockquote,
|
|
37
|
+
& pre {
|
|
38
|
+
&:not(:first-child) {
|
|
39
|
+
margin-top: 6px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
& hr {
|
|
45
|
+
margin: p-margin 0;
|
|
46
|
+
|
|
47
|
+
border: none;
|
|
48
|
+
border-bottom: 1px solid var(--ring-line-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& blockquote {
|
|
52
|
+
padding: 0 0 0 calc(2 * var(--ring-unit));
|
|
53
|
+
|
|
54
|
+
color: var(--ring-secondary-color);
|
|
55
|
+
box-shadow: inset 2px 0 0 var(--ring-line-color);
|
|
56
|
+
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
line-height: 18px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& ul {
|
|
62
|
+
padding: 0 0 0 calc(2 * var(--ring-unit));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& ol {
|
|
66
|
+
padding: 0;
|
|
67
|
+
|
|
68
|
+
list-style-position: inside;
|
|
69
|
+
font-variant-numeric: tabular-nums;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& ul {
|
|
73
|
+
list-style-type: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& pre {
|
|
77
|
+
position: relative;
|
|
78
|
+
|
|
79
|
+
padding: calc(var(--ring-unit) * 3) calc(var(--ring-unit) * 2);
|
|
80
|
+
|
|
81
|
+
white-space: pre;
|
|
82
|
+
tab-size: 2;
|
|
83
|
+
|
|
84
|
+
border-radius: var(--ring-border-radius);
|
|
85
|
+
background-color: rgba(var(--ring-tag-background-components), 0.5);
|
|
86
|
+
|
|
87
|
+
font-family: var(--ring-font-family-monospace);
|
|
88
|
+
|
|
89
|
+
&:first-child {
|
|
90
|
+
margin-top: calc(var(--ring-unit) * 4);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:last-child {
|
|
94
|
+
margin-bottom: calc(var(--ring-unit) * 4);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
& code {
|
|
99
|
+
padding: 2px 4px;
|
|
100
|
+
|
|
101
|
+
white-space: pre-wrap;
|
|
102
|
+
|
|
103
|
+
color: var(--ring-text-color);
|
|
104
|
+
|
|
105
|
+
border-radius: var(--ring-border-radius-small);
|
|
106
|
+
|
|
107
|
+
font-family: var(--ring-font-family-monospace);
|
|
108
|
+
font-size: var(--ring-font-size);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
& :not(pre) > code {
|
|
112
|
+
background-color: var(--ring-disabled-background-color);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
& pre > code {
|
|
116
|
+
display: block;
|
|
117
|
+
|
|
118
|
+
padding: 0;
|
|
119
|
+
|
|
120
|
+
white-space: inherit;
|
|
121
|
+
|
|
122
|
+
color: var(--ring-code-color);
|
|
123
|
+
|
|
124
|
+
font-size: var(--ring-font-size);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { PureComponent, ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownProps {
|
|
3
|
+
inline?: boolean | null | undefined;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string | null | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @name Markdown
|
|
9
|
+
*/
|
|
10
|
+
export default class Markdown extends PureComponent<MarkdownProps> {
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import headingStyles from '../heading/heading.css';
|
|
5
|
+
import linkStyles from '../link/link.css';
|
|
6
|
+
import styles from './markdown.css';
|
|
7
|
+
/**
|
|
8
|
+
* @name Markdown
|
|
9
|
+
*/
|
|
10
|
+
export default class Markdown extends PureComponent {
|
|
11
|
+
render() {
|
|
12
|
+
const { className, children, inline } = this.props;
|
|
13
|
+
const classes = classNames(className, headingStyles.contentWithHeadings, linkStyles.withLinks, {
|
|
14
|
+
[styles.markdown]: !inline,
|
|
15
|
+
[styles.inline]: inline
|
|
16
|
+
});
|
|
17
|
+
return (<div className={classes}>
|
|
18
|
+
{children}
|
|
19
|
+
</div>);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
Markdown.propTypes = {
|
|
23
|
+
inline: PropTypes.bool,
|
|
24
|
+
className: PropTypes.string
|
|
25
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
.container {
|
|
4
|
+
display: inline;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.message {
|
|
8
|
+
overflow: visible;
|
|
9
|
+
|
|
10
|
+
max-width: calc(var(--ring-unit) * 40);
|
|
11
|
+
|
|
12
|
+
padding: calc(var(--ring-unit) * 1.5) calc(var(--ring-unit) * 1.5) calc(var(--ring-unit) * 2) calc(var(--ring-unit) * 5);
|
|
13
|
+
|
|
14
|
+
text-align: left;
|
|
15
|
+
|
|
16
|
+
color: var(--ring-active-text-color);
|
|
17
|
+
|
|
18
|
+
background-color: var(--ring-popup-background-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.icon {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 10px;
|
|
24
|
+
left: calc(var(--ring-unit) * 1.5);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.title {
|
|
28
|
+
composes: font-lower from "../global/global.css";
|
|
29
|
+
|
|
30
|
+
margin: 0;
|
|
31
|
+
|
|
32
|
+
font-weight: normal;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.description {
|
|
36
|
+
margin: calc(var(--ring-unit) / 2) 0 0;
|
|
37
|
+
|
|
38
|
+
color: var(--ring-text-color);
|
|
39
|
+
|
|
40
|
+
font-size: var(--ring-font-size-smaller);
|
|
41
|
+
line-height: var(--ring-line-height-lowest);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.button {
|
|
45
|
+
margin-top: calc(var(--ring-unit) * 1.5);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tail {
|
|
49
|
+
position: absolute;
|
|
50
|
+
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
width: 11px;
|
|
53
|
+
height: 11px;
|
|
54
|
+
|
|
55
|
+
transform-origin: 0 0;
|
|
56
|
+
|
|
57
|
+
border: 1px solid;
|
|
58
|
+
border-color: transparent transparent var(--ring-popup-border-color) var(--ring-popup-border-color);
|
|
59
|
+
|
|
60
|
+
background-color: var(--ring-popup-background-color);
|
|
61
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { Component, ReactNode } from 'react';
|
|
2
|
+
import Popup, { PopupAttrs } from '../popup/popup';
|
|
3
|
+
import { Directions } from '../popup/popup.consts';
|
|
4
|
+
import { IconType } from '../icon/icon';
|
|
5
|
+
import { ButtonAttrs } from '../button/button';
|
|
6
|
+
import Theme from '../global/theme';
|
|
7
|
+
export interface MessageTranslations {
|
|
8
|
+
gotIt: string;
|
|
9
|
+
dismiss: string;
|
|
10
|
+
}
|
|
11
|
+
export interface MessageProps {
|
|
12
|
+
icon: string | IconType | null;
|
|
13
|
+
directions: readonly Directions[];
|
|
14
|
+
translations?: MessageTranslations | null | undefined;
|
|
15
|
+
theme: Theme;
|
|
16
|
+
title?: string | null | undefined;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
className?: string | null | undefined;
|
|
19
|
+
tailClassName?: string | null | undefined;
|
|
20
|
+
direction?: Directions | null | undefined;
|
|
21
|
+
popupProps?: Partial<PopupAttrs> | null | undefined;
|
|
22
|
+
buttonProps?: ButtonAttrs | null | undefined;
|
|
23
|
+
tailOffset?: number | null | undefined;
|
|
24
|
+
onClose?: (() => void) | undefined;
|
|
25
|
+
onDismiss?: (() => void) | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
interface MessageState {
|
|
28
|
+
direction?: Directions;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Displays a popup containing a message.
|
|
32
|
+
*/
|
|
33
|
+
export default class Message extends Component<MessageProps> {
|
|
34
|
+
static defaultProps: {
|
|
35
|
+
icon: string;
|
|
36
|
+
directions: Directions[];
|
|
37
|
+
theme: Theme;
|
|
38
|
+
};
|
|
39
|
+
state: MessageState;
|
|
40
|
+
static Directions: typeof Directions;
|
|
41
|
+
static PopupProps: {
|
|
42
|
+
Directions: typeof Directions;
|
|
43
|
+
Dimension: typeof import("../popup/popup.consts").Dimension;
|
|
44
|
+
MinWidth: typeof import("../popup/popup.consts").MinWidth;
|
|
45
|
+
MaxHeight: typeof import("../popup/popup.consts").MaxHeight;
|
|
46
|
+
};
|
|
47
|
+
private _onDirectionChange;
|
|
48
|
+
popup?: Popup | null;
|
|
49
|
+
node?: HTMLElement | null;
|
|
50
|
+
popupRef: (el: Popup | null) => void;
|
|
51
|
+
getTailOffset(): number;
|
|
52
|
+
render(): React.JSX.Element;
|
|
53
|
+
}
|
|
54
|
+
export type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import gift from '@jetbrains/icons/gift';
|
|
5
|
+
import Popup from '../popup/popup';
|
|
6
|
+
import { Directions } from '../popup/popup.consts';
|
|
7
|
+
import Icon from '../icon/icon';
|
|
8
|
+
import Button from '../button/button';
|
|
9
|
+
import { I18nContext } from '../i18n/i18n-context';
|
|
10
|
+
import Theme, { ThemeProvider, WithThemeClasses } from '../global/theme';
|
|
11
|
+
import darkStyles from '../global/variables_dark.css';
|
|
12
|
+
import styles from './message.css';
|
|
13
|
+
/**
|
|
14
|
+
* @name Message
|
|
15
|
+
*/
|
|
16
|
+
const UNIT = 8;
|
|
17
|
+
const TAIL_SIZE = 11;
|
|
18
|
+
const getTailOffsets = (offset) => ({
|
|
19
|
+
[Directions.BOTTOM_RIGHT]: { top: 0, left: offset + UNIT, transform: 'rotate(135deg)' },
|
|
20
|
+
[Directions.BOTTOM_LEFT]: {
|
|
21
|
+
top: 0,
|
|
22
|
+
right: offset - UNIT - TAIL_SIZE,
|
|
23
|
+
transform: 'rotate(135deg)'
|
|
24
|
+
},
|
|
25
|
+
[Directions.BOTTOM_CENTER]: { top: 0, left: offset + UNIT, transform: 'rotate(135deg)' },
|
|
26
|
+
[Directions.TOP_RIGHT]: { bottom: -TAIL_SIZE, left: offset - UNIT, transform: 'rotate(-45deg)' },
|
|
27
|
+
[Directions.TOP_LEFT]: {
|
|
28
|
+
bottom: -TAIL_SIZE,
|
|
29
|
+
right: offset + UNIT - TAIL_SIZE,
|
|
30
|
+
transform: 'rotate(-45deg)'
|
|
31
|
+
},
|
|
32
|
+
[Directions.TOP_CENTER]: { bottom: -TAIL_SIZE, left: offset - UNIT, transform: 'rotate(-45deg)' },
|
|
33
|
+
[Directions.RIGHT_TOP]: { bottom: offset + UNIT - TAIL_SIZE, left: 0, transform: 'rotate(45deg)' },
|
|
34
|
+
[Directions.RIGHT_BOTTOM]: { top: offset - UNIT, left: 0, transform: 'rotate(45deg)' },
|
|
35
|
+
[Directions.RIGHT_CENTER]: { top: offset - UNIT, left: 0, transform: 'rotate(45deg)' },
|
|
36
|
+
[Directions.LEFT_TOP]: {
|
|
37
|
+
bottom: offset - UNIT - TAIL_SIZE,
|
|
38
|
+
right: -TAIL_SIZE,
|
|
39
|
+
transform: 'rotate(-135deg)'
|
|
40
|
+
},
|
|
41
|
+
[Directions.LEFT_BOTTOM]: { top: offset + UNIT, right: -TAIL_SIZE, transform: 'rotate(-135deg)' },
|
|
42
|
+
[Directions.LEFT_CENTER]: { top: offset + UNIT, right: -TAIL_SIZE, transform: 'rotate(-135deg)' }
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Displays a popup containing a message.
|
|
46
|
+
*/
|
|
47
|
+
export default class Message extends Component {
|
|
48
|
+
static defaultProps = {
|
|
49
|
+
icon: gift,
|
|
50
|
+
directions: [
|
|
51
|
+
Directions.TOP_RIGHT, Directions.TOP_LEFT, Directions.TOP_CENTER,
|
|
52
|
+
Directions.BOTTOM_RIGHT, Directions.BOTTOM_LEFT, Directions.BOTTOM_CENTER,
|
|
53
|
+
Directions.RIGHT_TOP, Directions.RIGHT_BOTTOM, Directions.RIGHT_CENTER,
|
|
54
|
+
Directions.LEFT_TOP, Directions.LEFT_BOTTOM, Directions.LEFT_CENTER
|
|
55
|
+
],
|
|
56
|
+
theme: Theme.DARK
|
|
57
|
+
};
|
|
58
|
+
state = {};
|
|
59
|
+
static Directions = Directions;
|
|
60
|
+
static PopupProps = Popup.PopupProps;
|
|
61
|
+
_onDirectionChange = (direction) => this.setState({ direction });
|
|
62
|
+
popup;
|
|
63
|
+
node;
|
|
64
|
+
popupRef = (el) => {
|
|
65
|
+
this.popup = el;
|
|
66
|
+
this.node = this.popup?.node;
|
|
67
|
+
};
|
|
68
|
+
getTailOffset() {
|
|
69
|
+
const DEFAULT_OFFSET = 32;
|
|
70
|
+
const { popupProps } = this.props;
|
|
71
|
+
if (this.props.tailOffset != null) {
|
|
72
|
+
return this.props.tailOffset;
|
|
73
|
+
}
|
|
74
|
+
const anchor = popupProps?.anchorElement || this.popup?.parent;
|
|
75
|
+
if (!anchor) {
|
|
76
|
+
return DEFAULT_OFFSET;
|
|
77
|
+
}
|
|
78
|
+
const offset = Math.floor(anchor.offsetWidth / 2);
|
|
79
|
+
const isOpenedToRight = this.state.direction != null &&
|
|
80
|
+
[Directions.TOP_RIGHT, Directions.BOTTOM_RIGHT].includes(this.state.direction);
|
|
81
|
+
if (popupProps?.left && isOpenedToRight) {
|
|
82
|
+
return offset - popupProps?.left;
|
|
83
|
+
}
|
|
84
|
+
return offset;
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
const { children, className, tailClassName, title, icon, popupProps, buttonProps, onClose, onDismiss, translations, theme } = this.props;
|
|
88
|
+
const classes = classNames(styles.message, className, {
|
|
89
|
+
[darkStyles.dark]: theme === Theme.DARK
|
|
90
|
+
});
|
|
91
|
+
const tailClasses = classNames(styles.tail, tailClassName);
|
|
92
|
+
const popupDirections = this.props.direction
|
|
93
|
+
? [this.props.direction]
|
|
94
|
+
: this.props.directions;
|
|
95
|
+
const { direction } = this.state;
|
|
96
|
+
return (<I18nContext.Consumer>
|
|
97
|
+
{({ translate }) => (<WithThemeClasses theme={theme}>
|
|
98
|
+
{themeClasses => (<Popup ref={this.popupRef} hidden={false} directions={popupDirections} className={classNames(classes, themeClasses)} offset={UNIT * 2} onDirectionChange={this._onDirectionChange} {...popupProps}>
|
|
99
|
+
<ThemeProvider theme={theme} passToPopups>
|
|
100
|
+
{direction && (<div className={tailClasses} style={getTailOffsets(this.getTailOffset())[direction]}/>)}
|
|
101
|
+
|
|
102
|
+
{icon && <Icon className={styles.icon} glyph={icon}/>}
|
|
103
|
+
{title && <h1 data-test="rgMessageTitle" className={styles.title}>{title}</h1>}
|
|
104
|
+
{children && <div className={styles.description}>{children}</div>}
|
|
105
|
+
{(onClose || buttonProps) && (<Button className={styles.button} onClick={onClose} primary {...buttonProps}>{translations?.gotIt ?? translate('gotIt')}</Button>)}
|
|
106
|
+
{onDismiss && (<Button onClick={onDismiss} text>
|
|
107
|
+
{translations?.dismiss ?? translate('dismiss')}
|
|
108
|
+
</Button>)}
|
|
109
|
+
</ThemeProvider>
|
|
110
|
+
</Popup>)}
|
|
111
|
+
</WithThemeClasses>)}
|
|
112
|
+
</I18nContext.Consumer>);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
Message.propTypes = {
|
|
116
|
+
children: PropTypes.node,
|
|
117
|
+
className: PropTypes.string,
|
|
118
|
+
tailClassName: PropTypes.string,
|
|
119
|
+
title: PropTypes.string,
|
|
120
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
121
|
+
directions: PropTypes.arrayOf(PropTypes.string),
|
|
122
|
+
direction: PropTypes.string,
|
|
123
|
+
popupProps: PropTypes.object,
|
|
124
|
+
buttonProps: PropTypes.object,
|
|
125
|
+
tailOffset: PropTypes.number,
|
|
126
|
+
onClose: PropTypes.func,
|
|
127
|
+
onDismiss: PropTypes.func,
|
|
128
|
+
translations: PropTypes.object
|
|
129
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
:global(.ring-old-browsers-message) {
|
|
4
|
+
display: block;
|
|
5
|
+
|
|
6
|
+
margin-top: 15%;
|
|
7
|
+
|
|
8
|
+
text-align: center;
|
|
9
|
+
|
|
10
|
+
color: var(--ring-text-color);
|
|
11
|
+
|
|
12
|
+
font-family: -apple-system, BlinkMacSystemFont, Ubuntu, "Helvetica Neue", Arial, sans-serif;
|
|
13
|
+
font-size: var(--ring-font-size-larger);
|
|
14
|
+
line-height: calc(2.5 * var(--ring-unit));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:global(.ring-old-browsers-message_hidden) {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:global(.ring-old-browsers-message__smile) {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
user-select: none;
|
|
24
|
+
|
|
25
|
+
font-size: calc(3 * var(--ring-unit));
|
|
26
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { isBrowserInWhiteList } from './white-list';
|
|
2
|
+
/**
|
|
3
|
+
* @name Old Browsers Message
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
The list of versions which are definitely supported. "Browser is unsupported"
|
|
7
|
+
won't be displayed for those and higher versions even when a JS error occurs
|
|
8
|
+
on application start.
|
|
9
|
+
*/
|
|
10
|
+
let smileChanges = 0;
|
|
11
|
+
const MAX_SMILE_CHANGES = 50;
|
|
12
|
+
let previousWindowErrorHandler;
|
|
13
|
+
function changeSmileClickListener(event) {
|
|
14
|
+
const eyes = ['O', 'o', '-', '>', '<'];
|
|
15
|
+
const target = (event.target || event.srcElement);
|
|
16
|
+
smileChanges++;
|
|
17
|
+
function rand(min, max) {
|
|
18
|
+
return Math.round((Math.random() * (max - min))) + min;
|
|
19
|
+
}
|
|
20
|
+
function getRandomEye() {
|
|
21
|
+
return eyes[rand(0, (eyes.length - 1))];
|
|
22
|
+
}
|
|
23
|
+
function getRandomSmile() {
|
|
24
|
+
if (smileChanges >= MAX_SMILE_CHANGES) {
|
|
25
|
+
return '\\\\ (x_x) //';
|
|
26
|
+
}
|
|
27
|
+
return `{{ (${getRandomEye()}_${getRandomEye()}) }}`;
|
|
28
|
+
}
|
|
29
|
+
target.innerHTML = getRandomSmile();
|
|
30
|
+
}
|
|
31
|
+
function attachSmileClickListener(smileNode) {
|
|
32
|
+
if (smileNode.addEventListener) {
|
|
33
|
+
smileNode.addEventListener('click', changeSmileClickListener);
|
|
34
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
35
|
+
}
|
|
36
|
+
else if (smileNode.attachEvent) {
|
|
37
|
+
smileNode.attachEvent('onclick', changeSmileClickListener);
|
|
38
|
+
/* eslint-enable */
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Listens to unhandled errors and displays passed node
|
|
43
|
+
*/
|
|
44
|
+
function startOldBrowsersDetector(onOldBrowserDetected) {
|
|
45
|
+
previousWindowErrorHandler = window.onerror;
|
|
46
|
+
window.onerror = function oldBrowsersMessageShower(errorMsg, url, lineNumber) {
|
|
47
|
+
if (onOldBrowserDetected) {
|
|
48
|
+
onOldBrowserDetected();
|
|
49
|
+
}
|
|
50
|
+
if (previousWindowErrorHandler) {
|
|
51
|
+
return previousWindowErrorHandler(errorMsg, url, lineNumber);
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function stopOldBrowserDetector() {
|
|
57
|
+
window.onerror = previousWindowErrorHandler;
|
|
58
|
+
}
|
|
59
|
+
//Start javascript error detection
|
|
60
|
+
startOldBrowsersDetector(() => {
|
|
61
|
+
const oldBrowsersMessageContainer = document.getElementById('ring-old-browsers-message');
|
|
62
|
+
const browserMessage = document.getElementById('ring-old-browsers-message__browser-message');
|
|
63
|
+
const errorMessage = document.getElementById('ring-old-browsers-message__error-message');
|
|
64
|
+
const smileNode = document.getElementById('ring-old-browsers-message__smile');
|
|
65
|
+
if (browserMessage != null && errorMessage != null) {
|
|
66
|
+
if (isBrowserInWhiteList()) {
|
|
67
|
+
browserMessage.style.display = 'none';
|
|
68
|
+
errorMessage.style.display = 'block';
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
browserMessage.style.display = 'block';
|
|
72
|
+
errorMessage.style.display = 'none';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (oldBrowsersMessageContainer) {
|
|
76
|
+
oldBrowsersMessageContainer.hidden = false;
|
|
77
|
+
oldBrowsersMessageContainer.style.display = 'block';
|
|
78
|
+
}
|
|
79
|
+
if (smileNode) {
|
|
80
|
+
attachSmileClickListener(smileNode);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export { stopOldBrowserDetector as stop };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { stop as default } from './old-browsers-message';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import sniffer from '../global/sniffer';
|
|
2
|
+
const MAJOR_VERSION_INDEX = 0;
|
|
3
|
+
/**
|
|
4
|
+
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
|
5
|
+
*/
|
|
6
|
+
if (!SUPPORTED_BROWSERS) {
|
|
7
|
+
// eslint-disable-next-line no-console
|
|
8
|
+
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
|
9
|
+
}
|
|
10
|
+
const SUPPORTED = SUPPORTED_BROWSERS || [];
|
|
11
|
+
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
|
12
|
+
export const WHITE_LIST = SUPPORTED.
|
|
13
|
+
reduce((acc, item) => {
|
|
14
|
+
const [, browserName, version] = item.match(/(\S+)\s(\S+)/) ?? [];
|
|
15
|
+
if (!WHITE_LISTED_BROWSERS.includes(browserName)) {
|
|
16
|
+
return acc;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
...acc,
|
|
20
|
+
[browserName]: parseInt(version, 10)
|
|
21
|
+
};
|
|
22
|
+
}, {});
|
|
23
|
+
export function isBrowserInWhiteList() {
|
|
24
|
+
return sniffer.browser.version[MAJOR_VERSION_INDEX] >= WHITE_LIST[sniffer.browser.name];
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
.pager {
|
|
4
|
+
user-select: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.links {
|
|
8
|
+
margin-bottom: calc(var(--ring-unit) * 2);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.link {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
|
|
14
|
+
margin-right: calc(var(--ring-unit) * 2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.linkDisabled {
|
|
18
|
+
color: var(--ring-secondary-color);
|
|
19
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name Pager
|
|
3
|
+
*/
|
|
4
|
+
import React, { PureComponent, ReactNode } from 'react';
|
|
5
|
+
import { SelectItem } from '../select/select';
|
|
6
|
+
export interface PagerTranslations {
|
|
7
|
+
perPage: string;
|
|
8
|
+
firstPage: string;
|
|
9
|
+
lastPage: string;
|
|
10
|
+
nextPage: string;
|
|
11
|
+
previousPage: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PagerProps {
|
|
14
|
+
total: number;
|
|
15
|
+
currentPage: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
pageSizes: readonly number[];
|
|
18
|
+
visiblePagesLimit: number;
|
|
19
|
+
disablePageSizeSelector: boolean;
|
|
20
|
+
openTotal: boolean;
|
|
21
|
+
canLoadLastPageWithOpenTotal: boolean;
|
|
22
|
+
translations?: PagerTranslations | null | undefined;
|
|
23
|
+
loader: boolean;
|
|
24
|
+
loaderNavigation: boolean;
|
|
25
|
+
onPageSizeChange: (size: number) => void;
|
|
26
|
+
onLoadPage: (nextPage: number) => void;
|
|
27
|
+
onPageChange?: ((prevPage: number, event?: React.MouseEvent) => void) | null | undefined;
|
|
28
|
+
className?: string | null | undefined;
|
|
29
|
+
hrefFunc?: ((page: number, pageSize: number | undefined) => string) | undefined;
|
|
30
|
+
}
|
|
31
|
+
interface PagerSizeItem {
|
|
32
|
+
key: number;
|
|
33
|
+
}
|
|
34
|
+
export default class Pager extends PureComponent<PagerProps> {
|
|
35
|
+
static defaultProps: {
|
|
36
|
+
currentPage: number;
|
|
37
|
+
pageSize: number;
|
|
38
|
+
pageSizes: number[];
|
|
39
|
+
visiblePagesLimit: number;
|
|
40
|
+
disablePageSizeSelector: boolean;
|
|
41
|
+
openTotal: boolean;
|
|
42
|
+
canLoadLastPageWithOpenTotal: boolean;
|
|
43
|
+
loader: boolean;
|
|
44
|
+
loaderNavigation: boolean;
|
|
45
|
+
onPageSizeChange: () => void;
|
|
46
|
+
onLoadPage: () => void;
|
|
47
|
+
};
|
|
48
|
+
static contextType: React.Context<import("../i18n/i18n-context").I18nContextProps>;
|
|
49
|
+
context: React.ContextType<typeof Pager.contextType>;
|
|
50
|
+
getSelectOptions(): {
|
|
51
|
+
selected: SelectItem<PagerSizeItem> | undefined;
|
|
52
|
+
data: SelectItem<PagerSizeItem>[];
|
|
53
|
+
};
|
|
54
|
+
getTotalPages(): number;
|
|
55
|
+
handlePageSizeChange: (item: PagerSizeItem | null) => void;
|
|
56
|
+
handlePrevClick: () => void;
|
|
57
|
+
handleNextClick: () => void;
|
|
58
|
+
handlePageChange: (arg: number) => (event: React.MouseEvent) => void;
|
|
59
|
+
handleLoadMore: (arg: number) => () => void;
|
|
60
|
+
getButton(page: number, content: ReactNode, key?: number, active?: boolean): React.JSX.Element;
|
|
61
|
+
getClickProps(onClick: (e: React.MouseEvent) => void): {
|
|
62
|
+
onPlainLeftClick?: undefined;
|
|
63
|
+
onClick?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
onPlainLeftClick: (e: React.MouseEvent) => void;
|
|
66
|
+
onClick?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
onClick: (e: React.MouseEvent) => void;
|
|
69
|
+
onPlainLeftClick?: undefined;
|
|
70
|
+
};
|
|
71
|
+
getPageSizeSelector(): false | React.JSX.Element;
|
|
72
|
+
getPagerLinks(): React.JSX.Element;
|
|
73
|
+
generateHref(page: number): string | undefined;
|
|
74
|
+
getPagerContent(): React.JSX.Element;
|
|
75
|
+
render(): React.JSX.Element;
|
|
76
|
+
}
|
|
77
|
+
export type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
|
|
78
|
+
export {};
|