@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,26 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Link from '../link/link';
|
|
4
|
+
import styles from './services.css';
|
|
5
|
+
export default class ServicesLink extends PureComponent {
|
|
6
|
+
static propTypes = {
|
|
7
|
+
isActive: PropTypes.bool,
|
|
8
|
+
service: PropTypes.shape({
|
|
9
|
+
applicationName: PropTypes.string,
|
|
10
|
+
iconUrl: PropTypes.string,
|
|
11
|
+
homeUrl: PropTypes.string,
|
|
12
|
+
name: PropTypes.string
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
render() {
|
|
16
|
+
const { service, ...props } = this.props;
|
|
17
|
+
return (<Link target="_self" href={service.homeUrl} {...props}>
|
|
18
|
+
{service.iconUrl
|
|
19
|
+
? [
|
|
20
|
+
<span key="icon" className={styles.itemLogo} style={{ backgroundImage: `url(${service.iconUrl})` }}/>,
|
|
21
|
+
<div key="text">{service.name}</div>
|
|
22
|
+
]
|
|
23
|
+
: service.name}
|
|
24
|
+
</Link>);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
.services {
|
|
4
|
+
max-width: calc(calc(var(--ring-unit) * 50) + 2px);
|
|
5
|
+
padding: calc(var(--ring-unit) * 4) calc(var(--ring-unit) * 4) calc(var(--ring-unit) * 3);
|
|
6
|
+
|
|
7
|
+
background-color: var(--ring-navigation-background-color);
|
|
8
|
+
|
|
9
|
+
line-height: 10px; /* Eliminate gap between clickable blocks rows */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.active {
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.item {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
overflow-x: hidden;
|
|
19
|
+
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
width: calc(var(--ring-unit) * 14);
|
|
22
|
+
height: calc(var(--ring-unit) * 14);
|
|
23
|
+
|
|
24
|
+
text-align: center;
|
|
25
|
+
text-overflow: ellipsis;
|
|
26
|
+
|
|
27
|
+
color: var(--ring-active-text-color);
|
|
28
|
+
|
|
29
|
+
line-height: initial;
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
height: calc(var(--ring-unit) * 14);
|
|
33
|
+
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:not(:hover),
|
|
38
|
+
&:visited:not(:hover) {
|
|
39
|
+
color: var(--ring-active-text-color);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.itemLogo {
|
|
44
|
+
display: inline-block;
|
|
45
|
+
|
|
46
|
+
width: calc(var(--ring-unit) * 6);
|
|
47
|
+
height: calc(var(--ring-unit) * 6);
|
|
48
|
+
margin: calc(var(--ring-unit) * 2) 0 calc(var(--ring-unit) + 1px);
|
|
49
|
+
|
|
50
|
+
background-repeat: no-repeat;
|
|
51
|
+
background-size: contain;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.activeItem {
|
|
55
|
+
composes: item;
|
|
56
|
+
composes: active;
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
color: var(--ring-active-text-color);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.line {
|
|
64
|
+
height: 1px;
|
|
65
|
+
margin: calc(var(--ring-unit) * 4) 0 calc(var(--ring-unit) * 2);
|
|
66
|
+
|
|
67
|
+
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.itemStacked {
|
|
71
|
+
display: inline-block;
|
|
72
|
+
|
|
73
|
+
width: 100%;
|
|
74
|
+
margin-bottom: calc(var(--ring-unit) * 2);
|
|
75
|
+
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
|
|
78
|
+
line-height: calc(var(--ring-unit) * 2);
|
|
79
|
+
|
|
80
|
+
&,
|
|
81
|
+
&:visited {
|
|
82
|
+
color: var(--ring-secondary-color);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:last-child {
|
|
86
|
+
margin-bottom: calc(var(--ring-unit) * -3);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.activeItemStacked {
|
|
91
|
+
composes: itemStacked;
|
|
92
|
+
composes: active;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
color: var(--ring-secondary-color);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { HTMLAttributes, PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Theme from '../global/theme';
|
|
4
|
+
import ServicesLink, { Service } from './services-link';
|
|
5
|
+
export interface ServicesProps extends HTMLAttributes<HTMLElement> {
|
|
6
|
+
theme: Theme;
|
|
7
|
+
clientId?: string | null | undefined;
|
|
8
|
+
initShown?: boolean | undefined;
|
|
9
|
+
loading?: boolean | null | undefined;
|
|
10
|
+
services?: Service[] | null | undefined;
|
|
11
|
+
}
|
|
12
|
+
export default class Services extends PureComponent<ServicesProps> {
|
|
13
|
+
static sort: (a: Service, b: Service) => number;
|
|
14
|
+
static propTypes: {
|
|
15
|
+
className: PropTypes.Requireable<string>;
|
|
16
|
+
clientId: PropTypes.Requireable<string>;
|
|
17
|
+
initShown: PropTypes.Requireable<boolean>;
|
|
18
|
+
loading: PropTypes.Requireable<boolean>;
|
|
19
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
services: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
21
|
+
applicationName: PropTypes.Requireable<string>;
|
|
22
|
+
iconUrl: PropTypes.Requireable<string>;
|
|
23
|
+
homeUrl: PropTypes.Requireable<string>;
|
|
24
|
+
name: PropTypes.Requireable<string>;
|
|
25
|
+
}> | null | undefined)[]>;
|
|
26
|
+
};
|
|
27
|
+
static defaultProps: {
|
|
28
|
+
theme: Theme;
|
|
29
|
+
};
|
|
30
|
+
static Link: typeof ServicesLink;
|
|
31
|
+
serviceIsActive: (service: Service) => boolean;
|
|
32
|
+
render(): React.JSX.Element;
|
|
33
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import servicesIcon from '@jetbrains/icons/services-20px';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import Dropdown from '../dropdown/dropdown';
|
|
6
|
+
import Popup from '../popup/popup';
|
|
7
|
+
import Theme from '../global/theme';
|
|
8
|
+
import darkStyles from '../global/variables_dark.css';
|
|
9
|
+
import TrayIcon from './tray-icon';
|
|
10
|
+
import ServicesLink from './services-link';
|
|
11
|
+
import styles from './services.css';
|
|
12
|
+
const makeAnchor = (loading) => {
|
|
13
|
+
const Anchor = ({ active }) => (<TrayIcon loader={loading} active={active} icon={servicesIcon} aria-label="Services"/>);
|
|
14
|
+
Anchor.propTypes = {
|
|
15
|
+
active: PropTypes.bool
|
|
16
|
+
};
|
|
17
|
+
return Anchor;
|
|
18
|
+
};
|
|
19
|
+
export default class Services extends PureComponent {
|
|
20
|
+
static sort = (a, b) => {
|
|
21
|
+
const aApplicationName = a.applicationName || '';
|
|
22
|
+
const bApplicationName = b.applicationName || '';
|
|
23
|
+
return aApplicationName.localeCompare(bApplicationName) ||
|
|
24
|
+
a.name.localeCompare(b.name);
|
|
25
|
+
};
|
|
26
|
+
static propTypes = {
|
|
27
|
+
className: PropTypes.string,
|
|
28
|
+
clientId: PropTypes.string,
|
|
29
|
+
initShown: PropTypes.bool,
|
|
30
|
+
loading: PropTypes.bool,
|
|
31
|
+
onClick: PropTypes.func,
|
|
32
|
+
services: PropTypes.arrayOf(ServicesLink.propTypes.service)
|
|
33
|
+
};
|
|
34
|
+
static defaultProps = {
|
|
35
|
+
theme: Theme.DARK
|
|
36
|
+
};
|
|
37
|
+
static Link = ServicesLink;
|
|
38
|
+
serviceIsActive = (service) => service.id === this.props.clientId;
|
|
39
|
+
render() {
|
|
40
|
+
const { clientId, loading, services, initShown, theme, ...props } = this.props;
|
|
41
|
+
if (!services) {
|
|
42
|
+
return (<TrayIcon {...props} loader={loading} active={loading} icon={servicesIcon} aria-label="Services"/>);
|
|
43
|
+
}
|
|
44
|
+
const sortedServices = [...services].sort(Services.sort);
|
|
45
|
+
const servicesWithIcons = sortedServices.filter(service => service.iconUrl && service.homeUrl);
|
|
46
|
+
const servicesWithOutIcons = sortedServices.filter(service => !service.iconUrl && service.homeUrl);
|
|
47
|
+
const separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
|
|
48
|
+
return (<Dropdown {...props} anchor={makeAnchor(loading)} initShown={initShown}>
|
|
49
|
+
<Popup className={classNames(styles.services, { [darkStyles.dark]: theme === Theme.DARK })} top={-3}>
|
|
50
|
+
{servicesWithIcons.map(service => {
|
|
51
|
+
const isActive = this.serviceIsActive(service);
|
|
52
|
+
return (<Services.Link active={isActive} className={isActive ? styles.activeItem : styles.item} key={service.id} service={service}/>);
|
|
53
|
+
})}
|
|
54
|
+
{separatorIsRequired && (<div className={styles.line} key="separator"/>)}
|
|
55
|
+
{servicesWithOutIcons.map(service => {
|
|
56
|
+
const isActive = this.serviceIsActive(service);
|
|
57
|
+
return (<Services.Link active={isActive} className={isActive ? styles.activeItemStacked : styles.itemStacked} key={service.id} service={service}/>);
|
|
58
|
+
})}
|
|
59
|
+
</Popup>
|
|
60
|
+
</Dropdown>);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Auth, { AuthUser } from '../auth/auth';
|
|
4
|
+
import { Size } from '../avatar/avatar';
|
|
5
|
+
import { ProfileAttrs } from './profile';
|
|
6
|
+
export interface SmartProfileProps extends ProfileAttrs {
|
|
7
|
+
auth: Auth;
|
|
8
|
+
}
|
|
9
|
+
interface SmartProfileState {
|
|
10
|
+
user: AuthUser | null | undefined | void;
|
|
11
|
+
size: Size;
|
|
12
|
+
isLogoutPostponed: boolean;
|
|
13
|
+
isUserChangePostponed: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export default class SmartProfile extends PureComponent<SmartProfileProps, SmartProfileState> {
|
|
17
|
+
static propTypes: {
|
|
18
|
+
auth: PropTypes.Validator<Auth>;
|
|
19
|
+
className: PropTypes.Requireable<string>;
|
|
20
|
+
translations: PropTypes.Requireable<object>;
|
|
21
|
+
profileUrl: PropTypes.Requireable<string>;
|
|
22
|
+
size: PropTypes.Requireable<number>;
|
|
23
|
+
round: PropTypes.Requireable<boolean>;
|
|
24
|
+
};
|
|
25
|
+
state: SmartProfileState;
|
|
26
|
+
componentDidMount(): void;
|
|
27
|
+
static Size: typeof Size;
|
|
28
|
+
login: () => Promise<void>;
|
|
29
|
+
logout: () => Promise<void>;
|
|
30
|
+
switchUser: () => Promise<void>;
|
|
31
|
+
onRevertPostponement: () => void;
|
|
32
|
+
requestUser(): Promise<void>;
|
|
33
|
+
checkUserCertificateMismatch(user: AuthUser): void;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Auth, { USER_CHANGED_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGE_POSTPONED_EVENT } from '../auth/auth';
|
|
4
|
+
import alertService from '../alert-service/alert-service';
|
|
5
|
+
import Profile from './profile';
|
|
6
|
+
const CERTIFICATE_MISMATCH_HEADER = 'x-client-certificate-token-mismatch';
|
|
7
|
+
export default class SmartProfile extends PureComponent {
|
|
8
|
+
static propTypes = {
|
|
9
|
+
auth: PropTypes.instanceOf(Auth).isRequired,
|
|
10
|
+
className: PropTypes.string,
|
|
11
|
+
translations: PropTypes.object,
|
|
12
|
+
profileUrl: PropTypes.string,
|
|
13
|
+
size: Profile.propTypes.size,
|
|
14
|
+
round: Profile.propTypes.round
|
|
15
|
+
};
|
|
16
|
+
state = {
|
|
17
|
+
user: null,
|
|
18
|
+
size: Profile.defaultProps.size,
|
|
19
|
+
isLogoutPostponed: false,
|
|
20
|
+
isUserChangePostponed: false
|
|
21
|
+
};
|
|
22
|
+
componentDidMount() {
|
|
23
|
+
this.requestUser();
|
|
24
|
+
}
|
|
25
|
+
static Size = Profile.Size;
|
|
26
|
+
login = async () => {
|
|
27
|
+
this.setState({ loading: true });
|
|
28
|
+
try {
|
|
29
|
+
await this.props.auth.login();
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
// do nothing
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
this.setState({ loading: false });
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
logout = () => this.props.auth.logout();
|
|
39
|
+
switchUser = () => this.props.auth.switchUser();
|
|
40
|
+
onRevertPostponement = () => {
|
|
41
|
+
if (this.state.isLogoutPostponed) {
|
|
42
|
+
this.props.auth.login();
|
|
43
|
+
}
|
|
44
|
+
if (this.state.isUserChangePostponed) {
|
|
45
|
+
this.props.auth.updateUser();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
async requestUser() {
|
|
49
|
+
try {
|
|
50
|
+
const { auth } = this.props;
|
|
51
|
+
const user = await auth.requestUser();
|
|
52
|
+
this.checkUserCertificateMismatch(user);
|
|
53
|
+
this.setState({ user });
|
|
54
|
+
auth.addListener(USER_CHANGED_EVENT, newUser => {
|
|
55
|
+
this.setState({
|
|
56
|
+
user: newUser,
|
|
57
|
+
isLogoutPostponed: false,
|
|
58
|
+
isUserChangePostponed: false
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
auth.addListener(LOGOUT_POSTPONED_EVENT, () => {
|
|
62
|
+
this.setState({ isLogoutPostponed: true });
|
|
63
|
+
});
|
|
64
|
+
auth.addListener(USER_CHANGE_POSTPONED_EVENT, () => {
|
|
65
|
+
this.setState({ isUserChangePostponed: true });
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
// noop
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
checkUserCertificateMismatch(user) {
|
|
73
|
+
const { auth, translations } = this.props;
|
|
74
|
+
const userMeta = auth.http.getMetaForResponse(user);
|
|
75
|
+
if (userMeta?.headers?.has(CERTIFICATE_MISMATCH_HEADER)) {
|
|
76
|
+
const message = translations?.certificateMismatch || `You are authenticated as ${user.login || user.name}. To authenticate with the client certificate for your account, log out, then click the "Log in with certificate" option on the login page.`;
|
|
77
|
+
alertService.warning(message, 0);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
const { user, loading, isLogoutPostponed, isUserChangePostponed } = this.state;
|
|
82
|
+
const { auth, profileUrl, ...props } = this.props;
|
|
83
|
+
const url = profileUrl || (user ? `${auth.config.serverUri}users/${user.id}` : '');
|
|
84
|
+
return (<Profile onLogin={this.login} onLogout={this.logout} onSwitchUser={this.switchUser} loading={loading} user={user} profileUrl={url} showApplyChangedUser={isUserChangePostponed} showLogIn={isLogoutPostponed} showLogOut={!isLogoutPostponed} showSwitchUser={auth._canShowDialogs() && !isLogoutPostponed && !isUserChangePostponed} onRevertPostponement={this.onRevertPostponement} {...props}/>);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { Component, HTMLAttributes } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Auth from '../auth/auth';
|
|
4
|
+
import HTTP from '../http/http';
|
|
5
|
+
import { Service } from './services-link';
|
|
6
|
+
export interface SmartServicesProps extends HTMLAttributes<HTMLElement> {
|
|
7
|
+
auth: Auth;
|
|
8
|
+
}
|
|
9
|
+
export default class SmartServices extends Component<SmartServicesProps> {
|
|
10
|
+
static propTypes: {
|
|
11
|
+
auth: PropTypes.Validator<Auth>;
|
|
12
|
+
};
|
|
13
|
+
state: {
|
|
14
|
+
visible: boolean;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
services: null;
|
|
17
|
+
};
|
|
18
|
+
componentDidMount(): void;
|
|
19
|
+
static allFields: string;
|
|
20
|
+
static countFields: string;
|
|
21
|
+
http?: HTTP;
|
|
22
|
+
stopLoading: () => void;
|
|
23
|
+
getServicesContent: () => void;
|
|
24
|
+
getServices(fields: string): Promise<Service[]> | undefined;
|
|
25
|
+
render(): React.JSX.Element | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Auth from '../auth/auth';
|
|
4
|
+
import HTTP from '../http/http';
|
|
5
|
+
import Services from './services';
|
|
6
|
+
function noop() { }
|
|
7
|
+
export default class SmartServices extends Component {
|
|
8
|
+
static propTypes = {
|
|
9
|
+
auth: PropTypes.instanceOf(Auth).isRequired
|
|
10
|
+
};
|
|
11
|
+
state = {
|
|
12
|
+
visible: true,
|
|
13
|
+
loading: false,
|
|
14
|
+
services: null
|
|
15
|
+
};
|
|
16
|
+
componentDidMount() {
|
|
17
|
+
const { auth } = this.props;
|
|
18
|
+
this.http = new HTTP(auth, auth.getAPIPath());
|
|
19
|
+
this.getServices(SmartServices.countFields)?.then(services => {
|
|
20
|
+
if (!services.length) {
|
|
21
|
+
this.setState({ visible: false });
|
|
22
|
+
}
|
|
23
|
+
}).catch(noop);
|
|
24
|
+
}
|
|
25
|
+
static allFields = 'id,name,applicationName,homeUrl,iconUrl';
|
|
26
|
+
static countFields = 'key';
|
|
27
|
+
http;
|
|
28
|
+
stopLoading = () => {
|
|
29
|
+
this.setState({ loading: false });
|
|
30
|
+
};
|
|
31
|
+
getServicesContent = () => {
|
|
32
|
+
this.setState({ loading: true });
|
|
33
|
+
this.getServices(SmartServices.allFields)?.then(services => {
|
|
34
|
+
this.setState({ services });
|
|
35
|
+
this.stopLoading();
|
|
36
|
+
}).catch(this.stopLoading);
|
|
37
|
+
};
|
|
38
|
+
getServices(fields) {
|
|
39
|
+
return this.http?.get(`services/header?fields=${fields}`);
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const { services, visible, loading } = this.state;
|
|
43
|
+
const { auth, ...props } = this.props;
|
|
44
|
+
if (!visible) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return (<Services {...props} clientId={auth.config.clientId} initShown loading={loading} onClick={this.getServicesContent} services={services}/>);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ButtonAttrs } from '../button/button';
|
|
4
|
+
import { IconType } from '../icon/icon';
|
|
5
|
+
export interface TrayIconSpecificProps {
|
|
6
|
+
icon: string | IconType;
|
|
7
|
+
rotatable?: boolean | null | undefined;
|
|
8
|
+
}
|
|
9
|
+
export default class TrayIcon extends Component<ButtonAttrs & TrayIconSpecificProps> {
|
|
10
|
+
static propTypes: {
|
|
11
|
+
icon: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactComponentLike | null | undefined>>>;
|
|
12
|
+
rotatable: PropTypes.Requireable<boolean>;
|
|
13
|
+
active: PropTypes.Requireable<boolean>;
|
|
14
|
+
danger: PropTypes.Requireable<boolean>;
|
|
15
|
+
delayed: PropTypes.Requireable<boolean>;
|
|
16
|
+
loader: PropTypes.Requireable<boolean>;
|
|
17
|
+
primary: PropTypes.Requireable<boolean>;
|
|
18
|
+
short: PropTypes.Requireable<boolean>;
|
|
19
|
+
text: PropTypes.Requireable<boolean>;
|
|
20
|
+
inline: PropTypes.Requireable<boolean>;
|
|
21
|
+
dropdown: PropTypes.Requireable<boolean>;
|
|
22
|
+
href: PropTypes.Requireable<string>;
|
|
23
|
+
target: PropTypes.Requireable<string>;
|
|
24
|
+
iconSize: PropTypes.Requireable<number>;
|
|
25
|
+
iconClassName: PropTypes.Requireable<string>;
|
|
26
|
+
iconSuppressSizeWarning: PropTypes.Requireable<boolean>;
|
|
27
|
+
className: PropTypes.Requireable<string>;
|
|
28
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
};
|
|
31
|
+
render(): React.JSX.Element;
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import Button from '../button/button';
|
|
5
|
+
import styles from './header.css';
|
|
6
|
+
export default class TrayIcon extends Component {
|
|
7
|
+
static propTypes = {
|
|
8
|
+
...Button.propTypes,
|
|
9
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]).isRequired,
|
|
10
|
+
rotatable: PropTypes.bool
|
|
11
|
+
};
|
|
12
|
+
render() {
|
|
13
|
+
const { className, rotatable: rotatable, ...restProps } = this.props;
|
|
14
|
+
const classes = classNames(styles.icon, className, {
|
|
15
|
+
[styles.rotatable]: rotatable,
|
|
16
|
+
[styles.rotated]: rotatable && restProps.active
|
|
17
|
+
});
|
|
18
|
+
return (<Button {...restProps} className={classes}/>);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Component, HTMLAttributes } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
export default class Tray extends Component<HTMLAttributes<HTMLElement>> {
|
|
4
|
+
static propTypes: {
|
|
5
|
+
className: PropTypes.Requireable<string>;
|
|
6
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
7
|
+
};
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { Children, Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styles from './header.css';
|
|
5
|
+
const wrapChild = (child) => child && (<div className={styles.trayItem}>{child}</div>);
|
|
6
|
+
export default class Tray extends Component {
|
|
7
|
+
static propTypes = {
|
|
8
|
+
className: PropTypes.string,
|
|
9
|
+
children: PropTypes.node
|
|
10
|
+
};
|
|
11
|
+
render() {
|
|
12
|
+
const { children, className, ...restProps } = this.props;
|
|
13
|
+
const classes = classNames(styles.tray, className);
|
|
14
|
+
return (<div {...restProps} className={classes}>
|
|
15
|
+
{Children.map(children, wrapChild)}
|
|
16
|
+
</div>);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@import "../global/variables.css";
|
|
2
|
+
|
|
3
|
+
.contentWithHeadings {
|
|
4
|
+
& h1,
|
|
5
|
+
&:is(h1),
|
|
6
|
+
& h2,
|
|
7
|
+
&:is(h2),
|
|
8
|
+
& h3,
|
|
9
|
+
&:is(h3),
|
|
10
|
+
& h4,
|
|
11
|
+
&:is(h4) {
|
|
12
|
+
margin-top: var(--ring-line-height);
|
|
13
|
+
|
|
14
|
+
&:first-child {
|
|
15
|
+
margin-top: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
& :is(h1, h2),
|
|
21
|
+
&:is(h1, h2) {
|
|
22
|
+
margin-bottom: 8px;
|
|
23
|
+
|
|
24
|
+
color: var(--ring-heading-color);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& h1,
|
|
28
|
+
&:is(h1) {
|
|
29
|
+
font-size: 24px;
|
|
30
|
+
line-height: 28px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& h2,
|
|
34
|
+
&:is(h2) {
|
|
35
|
+
font-size: 20px;
|
|
36
|
+
line-height: 24px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
& h3,
|
|
40
|
+
&:is(h3) {
|
|
41
|
+
margin-bottom: 0;
|
|
42
|
+
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
line-height: 22px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& h4,
|
|
48
|
+
&:is(h4) {
|
|
49
|
+
margin-bottom: 1px;
|
|
50
|
+
|
|
51
|
+
letter-spacing: 1px;
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
font-weight: normal;
|
|
56
|
+
line-height: 18px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.heading {
|
|
61
|
+
composes: font from "../global/global.css";
|
|
62
|
+
composes: contentWithHeadings;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.caps {
|
|
66
|
+
letter-spacing: 2px;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @name Heading
|
|
4
|
+
*/
|
|
5
|
+
export declare enum Levels {
|
|
6
|
+
H1 = 1,
|
|
7
|
+
H2 = 2,
|
|
8
|
+
H3 = 3,
|
|
9
|
+
H4 = 4
|
|
10
|
+
}
|
|
11
|
+
export interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
12
|
+
level?: Levels | undefined;
|
|
13
|
+
}
|
|
14
|
+
declare const Heading: React.ComponentType<HeadingProps> & {
|
|
15
|
+
Levels: typeof Levels;
|
|
16
|
+
};
|
|
17
|
+
export default Heading;
|
|
18
|
+
export interface H1Props extends HTMLAttributes<HTMLHeadingElement> {
|
|
19
|
+
caps?: boolean | null | undefined;
|
|
20
|
+
}
|
|
21
|
+
declare const H1: React.ComponentType<H1Props>;
|
|
22
|
+
declare const H2: React.ComponentType<React.HTMLAttributes<HTMLHeadingElement>>;
|
|
23
|
+
declare const H3: React.ComponentType<React.HTMLAttributes<HTMLHeadingElement>>;
|
|
24
|
+
declare const H4: React.ComponentType<React.HTMLAttributes<HTMLHeadingElement>>;
|
|
25
|
+
export { H1, H2, H3, H4 };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import deprecate from 'util-deprecate';
|
|
5
|
+
import styles from './heading.css';
|
|
6
|
+
/**
|
|
7
|
+
* @name Heading
|
|
8
|
+
*/
|
|
9
|
+
export var Levels;
|
|
10
|
+
(function (Levels) {
|
|
11
|
+
Levels[Levels["H1"] = 1] = "H1";
|
|
12
|
+
Levels[Levels["H2"] = 2] = "H2";
|
|
13
|
+
Levels[Levels["H3"] = 3] = "H3";
|
|
14
|
+
Levels[Levels["H4"] = 4] = "H4";
|
|
15
|
+
})(Levels || (Levels = {}));
|
|
16
|
+
const fallbackHeading = deprecate(() => 'h3', 'Headings of level 5 and higher are replaced with h3');
|
|
17
|
+
const HeadingMemo = memo(function Heading({ children, className, level = Levels.H1, ...restProps }) {
|
|
18
|
+
const classes = classNames(styles.heading, className);
|
|
19
|
+
const Tag = level <= Levels.H4 ? `h${level}` : fallbackHeading();
|
|
20
|
+
return (<Tag {...restProps} className={classes}>
|
|
21
|
+
{children}
|
|
22
|
+
</Tag>);
|
|
23
|
+
});
|
|
24
|
+
const Heading = HeadingMemo;
|
|
25
|
+
Heading.propTypes = {
|
|
26
|
+
children: PropTypes.node,
|
|
27
|
+
className: PropTypes.string,
|
|
28
|
+
level: PropTypes.oneOf([Levels.H1, Levels.H2, Levels.H3, Levels.H4])
|
|
29
|
+
};
|
|
30
|
+
Heading.Levels = Levels;
|
|
31
|
+
export default Heading;
|
|
32
|
+
function makeHeading(level, useCaps) {
|
|
33
|
+
const H = memo(({ className, caps, ...restProps }) => {
|
|
34
|
+
const classes = classNames(className, {
|
|
35
|
+
[styles.caps]: useCaps && caps
|
|
36
|
+
});
|
|
37
|
+
return (<Heading {...restProps} level={level} className={classes}/>);
|
|
38
|
+
});
|
|
39
|
+
H.displayName = `H${level}`;
|
|
40
|
+
H.propTypes = {
|
|
41
|
+
children: PropTypes.node,
|
|
42
|
+
className: PropTypes.string,
|
|
43
|
+
// use only for short h1 headers, no longer than three words
|
|
44
|
+
caps: PropTypes.bool
|
|
45
|
+
};
|
|
46
|
+
return H;
|
|
47
|
+
}
|
|
48
|
+
const H1 = makeHeading(Levels.H1, true);
|
|
49
|
+
const H2 = makeHeading(Levels.H2);
|
|
50
|
+
const H3 = makeHeading(Levels.H3);
|
|
51
|
+
const H4 = makeHeading(Levels.H4);
|
|
52
|
+
export { H1, H2, H3, H4 };
|