@jetbrains/ring-ui 7.0.61 → 7.0.63
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/components/alert/alert.css +1 -1
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +3 -3
- package/components/alert/container.css +2 -2
- package/components/alert/container.d.ts +1 -1
- package/components/alert/container.js +1 -1
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/analytics/{analytics__custom-plugin.d.ts → analytics-custom-plugin.d.ts} +1 -1
- package/components/analytics/{analytics__custom-plugin.js → analytics-custom-plugin.js} +2 -2
- package/components/auth/{auth__core.d.ts → auth-core.d.ts} +9 -8
- package/components/auth/{auth__core.js → auth-core.js} +14 -18
- package/components/auth/auth.d.ts +2 -2
- package/components/auth/auth.js +2 -2
- package/components/auth/background-flow.d.ts +2 -2
- package/components/auth/background-flow.js +0 -1
- package/components/auth/down-notification.css +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth/iframe-flow.d.ts +3 -3
- package/components/auth/iframe-flow.js +3 -5
- package/components/auth/request-builder.d.ts +2 -1
- package/components/auth/request-builder.js +1 -2
- package/components/auth/storage.d.ts +3 -3
- package/components/auth/storage.js +4 -8
- package/components/auth/token-validator.d.ts +2 -1
- package/components/auth/token-validator.js +6 -1
- package/components/auth/window-flow.d.ts +3 -3
- package/components/auth/window-flow.js +7 -7
- package/components/auth-dialog/auth-dialog.css +2 -2
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar.css +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.figma.js +1 -1
- package/components/avatar/avatar.js +5 -7
- package/components/avatar/fallback-avatar.js +4 -8
- package/components/avatar-stack/avatar-stack.css +1 -1
- package/components/avatar-stack/avatar-stack.d.ts +3 -3
- package/components/avatar-stack/avatar-stack.figma.js +1 -1
- package/components/avatar-stack/avatar-stack.js +1 -1
- package/components/banner/banner.css +2 -2
- package/components/banner/banner.js +1 -1
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.figma.js +1 -1
- package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
- package/components/button/button.css +19 -16
- package/components/button/button.d.ts +4 -4
- package/components/button/button.figma.js +1 -1
- package/components/button/button.js +6 -6
- package/components/button-group/button-group.css +6 -6
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-set/button-set.css +2 -2
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.css +2 -2
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/caret/caret.js +23 -18
- package/components/checkbox/checkbox-group.figma.js +1 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.figma.js +1 -1
- package/components/checkbox/checkbox.js +5 -5
- package/components/clipboard/clipboard.js +2 -2
- package/components/code/code.css +1 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -3
- package/components/collapse/collapse-content.d.ts +3 -3
- package/components/collapse/collapse-control.d.ts +2 -2
- package/components/collapse/collapse.css +1 -1
- package/components/collapse/collapse.d.ts +3 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.d.ts +3 -3
- package/components/content-layout/content-layout.css +2 -2
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +2 -2
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/contenteditable/contenteditable.d.ts +1 -1
- package/components/contenteditable/contenteditable.js +2 -1
- package/components/control-help/control-help.css +1 -1
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-label/control-label.d.ts +1 -1
- package/components/data-list/data-list.css +1 -1
- package/components/data-list/data-list.d.ts +5 -5
- package/components/data-list/data-list.js +2 -2
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +20 -20
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +2 -2
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +8 -1
- package/components/data-list/title.d.ts +2 -2
- package/components/date-picker/consts.d.ts +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.css +15 -15
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-picker/date-picker.js +17 -19
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +5 -3
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +4 -5
- package/components/date-picker/formats.js +1 -0
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +2 -2
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +2 -2
- package/components/dialog/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +6 -2
- package/components/dialog/dialog.css +5 -5
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +7 -7
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/dropdown.css +1 -1
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +2 -2
- package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/components/dropdown-menu/dropdown-menu.js +1 -1
- package/components/editable-heading/editable-heading.css +6 -8
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +3 -2
- package/components/error-bubble/error-bubble-legacy.css +3 -3
- package/components/error-bubble/error-bubble.css +5 -5
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.figma.js +1 -1
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.css +1 -1
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +2 -2
- package/components/error-page/error-page.css +3 -3
- package/components/footer/footer.css +2 -2
- package/components/footer/footer.d.ts +1 -1
- package/components/footer/footer.js +1 -1
- package/components/form/form.css +3 -3
- package/components/global/compose-refs.d.ts +2 -0
- package/components/global/compose-refs.js +14 -0
- package/components/global/composeRefs.d.ts +6 -2
- package/components/global/composeRefs.js +7 -14
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +2 -4
- package/components/global/focus-sensor-hoc.d.ts +1 -1
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/fuzzy-highlight.d.ts +2 -2
- package/components/global/get-event-key.d.ts +1 -1
- package/components/global/global.css +2 -2
- package/components/global/memoize.js +1 -1
- package/components/global/rerender-hoc.d.ts +1 -1
- package/components/global/rerender-hoc.js +2 -2
- package/components/global/theme.d.ts +1 -1
- package/components/global/theme.js +2 -2
- package/components/global/url.js +3 -3
- package/components/global/use-event-callback.js +1 -1
- package/components/global/variables.css +5 -3
- package/components/global/variables_dark.css +8 -6
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +1 -1
- package/components/grid/grid.css +4 -4
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +1 -1
- package/components/group/group.css +1 -1
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +1 -1
- package/components/header/header-icon.d.ts +2 -2
- package/components/header/header.css +4 -4
- package/components/header/header.d.ts +1 -1
- package/components/header/links.d.ts +1 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/profile.d.ts +5 -5
- package/components/header/profile.js +3 -3
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +3 -3
- package/components/header/services.css +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +3 -3
- package/components/header/smart-profile.d.ts +3 -3
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.d.ts +3 -3
- package/components/header/tray.d.ts +1 -1
- package/components/heading/heading.css +2 -2
- package/components/heading/heading.d.ts +1 -1
- package/components/http/http.mock.d.ts +1 -1
- package/components/hub-source/{hub-source__user.d.ts → hub-source-user.d.ts} +3 -2
- package/components/hub-source/{hub-source__users-groups.d.ts → hub-source-users-groups.d.ts} +3 -2
- package/components/hub-source/hub-source.d.ts +2 -2
- package/components/icon/{icon__svg.d.ts → icon-svg.d.ts} +1 -1
- package/components/icon/icon.css +5 -5
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +3 -3
- package/components/input/input-legacy.css +2 -2
- package/components/input/input.css +5 -5
- package/components/input/input.d.ts +3 -3
- package/components/input/input.figma.js +1 -1
- package/components/input/input.js +8 -8
- package/components/input-size/input-size.css +1 -1
- package/components/island/adaptive-island-hoc.d.ts +1 -1
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +2 -2
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +4 -4
- package/components/island/island.css +3 -3
- package/components/island/island.d.ts +1 -1
- package/components/line/line.css +1 -1
- package/components/link/clickable-link.d.ts +12 -0
- package/components/link/clickable-link.js +25 -0
- package/components/link/clickableLink.d.ts +11 -12
- package/components/link/clickableLink.js +4 -25
- package/components/link/link.css +1 -1
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +4 -4
- package/components/list/consts.d.ts +4 -5
- package/components/list/{list__custom.d.ts → list-custom.d.ts} +1 -1
- package/components/list/{list__custom.js → list-custom.js} +1 -1
- package/components/list/{list__hint.d.ts → list-hint.d.ts} +1 -1
- package/components/list/{list__hint.js → list-hint.js} +1 -1
- package/components/list/{list__item.d.ts → list-item.d.ts} +2 -2
- package/components/list/{list__item.js → list-item.js} +6 -5
- package/components/list/{list__separator.d.ts → list-separator.d.ts} +1 -1
- package/components/list/{list__separator.js → list-separator.js} +1 -1
- package/components/list/{list__title.d.ts → list-title.d.ts} +1 -1
- package/components/list/{list__title.js → list-title.js} +1 -1
- package/components/list/{list__users-groups-source.d.ts → list-users-groups-source.d.ts} +3 -2
- package/components/list/{list__users-groups-source.js → list-users-groups-source.js} +1 -1
- package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
- package/components/list/list.css +5 -5
- package/components/list/list.d.ts +7 -7
- package/components/list/list.js +34 -28
- package/components/loader/{loader__core.js → loader-core.js} +2 -2
- package/components/loader/loader.css +1 -1
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.css +2 -2
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-screen/loader-screen.css +2 -2
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/login-dialog/login-dialog.css +2 -2
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.d.ts +1 -1
- package/components/markdown/markdown.css +3 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.css +3 -3
- package/components/message/message.d.ts +4 -4
- package/components/message/message.js +3 -3
- package/components/old-browsers-message/old-browsers-message.css +2 -2
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/pager/pager.css +1 -1
- package/components/pager/pager.d.ts +2 -2
- package/components/pager/pager.js +11 -12
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +1 -1
- package/components/permissions/{permissions__cache.js → permissions-cache.js} +4 -5
- package/components/permissions/permissions.d.ts +2 -2
- package/components/permissions/permissions.js +2 -4
- package/components/popup/popup.css +3 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +6 -5
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position-css.js +6 -10
- package/components/popup/position.js +10 -10
- package/components/popup-menu/popup-menu.d.ts +4 -4
- package/components/progress-bar/progress-bar.css +6 -8
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +1 -1
- package/components/query-assist/{query-assist__suggestions.d.ts → query-assist-suggestions.d.ts} +1 -1
- package/components/query-assist/query-assist.css +11 -11
- package/components/query-assist/query-assist.d.ts +4 -4
- package/components/query-assist/query-assist.js +11 -11
- package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
- package/components/radio/{radio__item.js → radio-item.js} +2 -2
- package/components/radio/radio.css +2 -2
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +1 -1
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/{select__filter.d.ts → select-filter.d.ts} +2 -2
- package/components/select/{select__filter.js → select-filter.js} +1 -1
- package/components/select/select-popup.css +5 -5
- package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
- package/components/select/{select__popup.js → select-popup.js} +11 -7
- package/components/select/select.css +10 -9
- package/components/select/select.d.ts +7 -6
- package/components/select/select.js +32 -27
- package/components/shortcuts/core.js +7 -7
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/sidebar/sidebar.css +1 -1
- package/components/slider/slider.css +2 -2
- package/components/slider/slider.d.ts +5 -5
- package/components/slider/slider.js +5 -5
- package/components/slider/slider.utils.d.ts +1 -1
- package/components/slider/slider.utils.js +2 -4
- package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
- package/components/storage/{storage__local.js → storage-local.js} +7 -7
- package/components/storage/storage.d.ts +1 -1
- package/components/storage/storage.js +1 -1
- package/components/tab-trap/tab-trap.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/tab-trap/tab-trap.js +2 -5
- package/components/table/cell.d.ts +1 -1
- package/components/table/disable-hover-hoc.d.ts +1 -1
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +1 -1
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +2 -2
- package/components/table/multitable.d.ts +3 -3
- package/components/table/multitable.js +1 -1
- package/components/table/row-with-focus-sensor.d.ts +3 -3
- package/components/table/row.d.ts +4 -4
- package/components/table/row.js +1 -1
- package/components/table/selection-adapter.d.ts +2 -1
- package/components/table/selection-shortcuts-hoc.d.ts +4 -3
- package/components/table/selection-shortcuts-hoc.js +1 -3
- package/components/table/selection.js +4 -8
- package/components/table/simple-table.d.ts +2 -2
- package/components/table/smart-table.d.ts +2 -2
- package/components/table/table.css +6 -6
- package/components/table/table.d.ts +7 -7
- package/components/table/table.js +3 -3
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +2 -2
- package/components/tabs/collapsible-tab.d.ts +2 -2
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +6 -8
- package/components/tabs/custom-item.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/dumb-tabs.js +3 -3
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/tab-link.d.ts +2 -2
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tabs.css +6 -6
- package/components/tag/tag.css +94 -14
- package/components/tag/tag.d.ts +13 -2
- package/components/tag/tag.js +16 -3
- package/components/tags-input/tags-input.css +3 -3
- package/components/tags-input/tags-input.d.ts +8 -8
- package/components/tags-input/tags-input.js +13 -7
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +1 -1
- package/components/text/text.css +1 -1
- package/components/text/text.d.ts +1 -1
- package/components/toggle/toggle.css +6 -3
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.css +1 -1
- package/components/tooltip/tooltip.d.ts +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/upload/upload.css +1 -1
- package/components/upload/upload.d.ts +3 -3
- package/components/upload/upload.js +2 -2
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/service.js +3 -5
- package/components/user-agreement/user-agreement.css +2 -2
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -3
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/user-card.css +1 -5
- package/package.json +12 -9
- /package/components/button/{button__classes.js → button.classes.js} +0 -0
- /package/components/dialog/{dialog__body-scroll-preventer.d.ts → dialog-body-scroll-preventer.d.ts} +0 -0
- /package/components/global/{variables.d.ts → variables.interface.d.ts} +0 -0
- /package/components/global/{variables.js → variables.interface.js} +0 -0
- /package/components/hub-source/{hub-source__user.js → hub-source-user.js} +0 -0
- /package/components/hub-source/{hub-source__users-groups.js → hub-source-users-groups.js} +0 -0
- /package/components/icon/{icon__svg.js → icon-svg.js} +0 -0
- /package/components/icon/{icon__constants.d.ts → icon.constants.d.ts} +0 -0
- /package/components/icon/{icon__constants.js → icon.constants.js} +0 -0
- /package/components/list/{list__classes.js → list.classes.js} +0 -0
- /package/components/loader/{loader__core.d.ts → loader-core.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.d.ts → old-browsers-message-stop.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.js → old-browsers-message-stop.js} +0 -0
- /package/components/permissions/{permissions__cache.d.ts → permissions-cache.d.ts} +0 -0
- /package/components/query-assist/{query-assist__suggestions.js → query-assist-suggestions.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import { IconType } from '../icon/icon';
|
|
1
|
+
import { Component, type ReactNode } from 'react';
|
|
2
|
+
import { type IconType } from '../icon/icon';
|
|
3
3
|
export interface ErrorMessageProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
icon?: string | IconType | null | undefined;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Icon from '../icon/icon';
|
|
5
|
-
import { Size } from '../icon/
|
|
5
|
+
import { Size } from '../icon/icon.constants';
|
|
6
6
|
import dataTests from '../global/data-tests';
|
|
7
7
|
import styles from './error-message.css';
|
|
8
8
|
/**
|
|
@@ -12,6 +12,6 @@ export default class ErrorMessage extends Component {
|
|
|
12
12
|
render() {
|
|
13
13
|
const { className, icon, code, message, description, children, 'data-test': dataTest } = this.props;
|
|
14
14
|
const classes = classNames(styles.errorMessage, className);
|
|
15
|
-
return (_jsxs("div", { className: classes, "data-test": dataTests('ring-error-message', dataTest), children: [icon && _jsx(Icon, { className: styles.icon, glyph: icon, size: Size.Size64, suppressSizeWarning: true }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { className: styles.title, "data-test":
|
|
15
|
+
return (_jsxs("div", { className: classes, "data-test": dataTests('ring-error-message', dataTest), children: [icon && _jsx(Icon, { className: styles.icon, glyph: icon, size: Size.Size64, suppressSizeWarning: true }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { className: styles.title, "data-test": 'ring-error-message-title', children: [code && `${code}:`, " ", message] }), description && _jsx("div", { className: styles.description, children: description }), children] })] }));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Using a pseudo-element rather than the element itself to prevent
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
width: 100%;
|
|
16
16
|
height: 100%;
|
|
17
17
|
|
|
18
|
-
content:
|
|
18
|
+
content: '';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.enabled::before {
|
|
22
22
|
opacity: 0.06;
|
|
23
|
-
background: url(
|
|
23
|
+
background: url('error-page.gif');
|
|
24
24
|
}
|
|
@@ -62,6 +62,6 @@ const Footer = memo(function Footer({ floating, className, left, center, right }
|
|
|
62
62
|
const classes = classNames(styles.footer, className, {
|
|
63
63
|
[styles.footerFloating]: floating,
|
|
64
64
|
});
|
|
65
|
-
return (_jsx("footer", { className: classes, "data-test":
|
|
65
|
+
return (_jsx("footer", { className: classes, "data-test": 'ring-footer', children: [content(left, 'left'), content(center, 'center'), content(right, 'right')] }));
|
|
66
66
|
});
|
|
67
67
|
export default Footer;
|
package/components/form/form.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Form
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
display: block;
|
|
95
95
|
clear: both;
|
|
96
96
|
|
|
97
|
-
content:
|
|
97
|
+
content: '';
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
:global(.ring-form__group_united) {
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
height: calc(var(--ring-unit) * 3);
|
|
167
167
|
|
|
168
|
-
content:
|
|
168
|
+
content: '';
|
|
169
169
|
vertical-align: middle;
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import memoizeOne from 'memoize-one';
|
|
2
|
+
function composeRefs(...refs) {
|
|
3
|
+
return (value) => refs.forEach(ref => {
|
|
4
|
+
if (typeof ref === 'function') {
|
|
5
|
+
ref(value);
|
|
6
|
+
}
|
|
7
|
+
else if (ref) {
|
|
8
|
+
ref.current = value;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export function createComposedRef() {
|
|
13
|
+
return memoizeOne((composeRefs));
|
|
14
|
+
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { createComposedRef as _createComposedRef } from './compose-refs';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use createComposedRef from './compose-refs' instead
|
|
4
|
+
*/
|
|
5
|
+
declare const createComposedRef: typeof _createComposedRef;
|
|
6
|
+
export { createComposedRef };
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ref.current = value;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
export function createComposedRef() {
|
|
13
|
-
return memoizeOne((composeRefs));
|
|
14
|
-
}
|
|
1
|
+
/* eslint-disable unicorn/filename-case */
|
|
2
|
+
import { createComposedRef as _createComposedRef } from './compose-refs';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use createComposedRef from './compose-refs' instead
|
|
5
|
+
*/
|
|
6
|
+
const createComposedRef = _createComposedRef;
|
|
7
|
+
export { createComposedRef };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name DOM
|
|
3
3
|
*/
|
|
4
|
-
import { SyntheticEvent } from 'react';
|
|
4
|
+
import { type SyntheticEvent } from 'react';
|
|
5
5
|
import type { PropertiesHyphen } from 'csstype';
|
|
6
6
|
export declare const getStyles: ((elt: Element, pseudoElt?: string | null) => CSSStyleDeclaration) & typeof getComputedStyle;
|
|
7
7
|
export declare function isMounted(node: Node | Range | null | undefined): boolean;
|
package/components/global/dom.js
CHANGED
|
@@ -10,13 +10,11 @@ export function isMounted(node) {
|
|
|
10
10
|
}
|
|
11
11
|
const rectStub = { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
12
12
|
export function getRect(node) {
|
|
13
|
-
if (node instanceof Range || (node
|
|
13
|
+
if (node instanceof Range || (node && isMounted(node))) {
|
|
14
14
|
const { top, right, bottom, left, width, height } = node.getBoundingClientRect();
|
|
15
15
|
return { top, right, bottom, left, width, height };
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
return Object.assign({}, rectStub);
|
|
19
|
-
}
|
|
17
|
+
return Object.assign({}, rectStub);
|
|
20
18
|
}
|
|
21
19
|
export function getPixelRatio() {
|
|
22
20
|
return 'devicePixelRatio' in window ? window.devicePixelRatio : 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
-
import { createComposedRef } from './
|
|
3
|
+
import { createComposedRef } from './compose-refs';
|
|
4
4
|
export default function focusSensorHOC(ComposedComponent) {
|
|
5
5
|
class FocusSensor extends Component {
|
|
6
6
|
state = {
|
|
@@ -9,7 +9,7 @@ export default function focusSensorHOC(ComposedComponent) {
|
|
|
9
9
|
componentDidMount() {
|
|
10
10
|
const { props: { autofocus, scrollOnTableFocus }, node, } = this;
|
|
11
11
|
node?.setAttribute('tabindex', '0');
|
|
12
|
-
if (node
|
|
12
|
+
if (node) {
|
|
13
13
|
node.style.outline = 'none';
|
|
14
14
|
}
|
|
15
15
|
document.addEventListener('focus', this.onFocusCapture, true);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** https://github.com/bevacqua/fuzzysearch + highlighting with Markdown */
|
|
2
|
-
|
|
2
|
+
interface Match {
|
|
3
3
|
from: number;
|
|
4
4
|
to: number;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export default function fuzzyHighlight(needle: string, haystack: string, caseSensitive?: boolean): {
|
|
7
7
|
matched: boolean;
|
|
8
8
|
matches: Match[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
1
|
+
import type * as React from 'react';
|
|
2
2
|
export default function getEventKey(nativeEvent: KeyboardEvent | React.KeyboardEvent): string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
display: block;
|
|
6
6
|
clear: both;
|
|
7
7
|
|
|
8
|
-
content:
|
|
8
|
+
content: '';
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
/* To be used at large sizes */
|
|
49
49
|
/* As close as possible to Helvetica Neue Thin (to replace Gotham) */
|
|
50
50
|
.thin-font {
|
|
51
|
-
font-family:
|
|
51
|
+
font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
52
52
|
font-size: var(--ring-font-size);
|
|
53
53
|
font-weight: 100; /* Renders Helvetica Neue UltraLight on OS X */
|
|
54
54
|
}
|
|
@@ -5,7 +5,7 @@ export default function memoize(fn) {
|
|
|
5
5
|
const key = arg ?? '__singleValue__';
|
|
6
6
|
const cache = key instanceof Object ? objectCache : primitiveCache;
|
|
7
7
|
const cached = cache.get(key);
|
|
8
|
-
if (cached
|
|
8
|
+
if (cached !== undefined) {
|
|
9
9
|
return cached;
|
|
10
10
|
}
|
|
11
11
|
const value = fn(arg);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Component, forwardRef } from 'react';
|
|
3
|
-
import { createComposedRef } from './
|
|
3
|
+
import { createComposedRef } from './compose-refs';
|
|
4
4
|
export default function rerenderHOC(ComposedComponent) {
|
|
5
5
|
class Rerenderer extends Component {
|
|
6
6
|
state = this.props.props;
|
|
7
7
|
composedRef = createComposedRef();
|
|
8
8
|
render() {
|
|
9
9
|
const ref = this.composedRef(this.props.forwardedRef);
|
|
10
|
-
return (_jsx(ComposedComponent, { ...this.state, ref: instance => ref(instance
|
|
10
|
+
return (_jsx(ComposedComponent, { ...this.state, ref: instance => ref(instance ? { ...instance, rerender: this.setState.bind(this) } : null) }));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
return forwardRef(function RerendererForwardRef(props, ref) {
|
|
@@ -59,12 +59,12 @@ export const ThemeProvider = forwardRef(function ThemeProvider({ theme = Theme.A
|
|
|
59
59
|
const id = useMemo(() => getUID('popups-with-theme-'), []);
|
|
60
60
|
const themeValue = useMemo(() => ({ theme: resolvedTheme }), [resolvedTheme]);
|
|
61
61
|
useEffect(() => {
|
|
62
|
-
if (target
|
|
62
|
+
if (target) {
|
|
63
63
|
applyTheme(resolvedTheme, target);
|
|
64
64
|
}
|
|
65
65
|
}, [resolvedTheme, target]);
|
|
66
66
|
const themeClasses = useThemeClasses(theme);
|
|
67
67
|
const parentTarget = useContext(PopupTargetContext);
|
|
68
|
-
return (_jsx(ThemeContext.Provider, { value: themeValue, children: _jsx(WrapperComponent, { ref: ref, className: target
|
|
68
|
+
return (_jsx(ThemeContext.Provider, { value: themeValue, children: _jsx(WrapperComponent, { ref: ref, className: target ? undefined : classNames(className, themeClasses), ...restProps, children: passToPopups ? (_jsx(PopupTarget, { id: id, children: popupTarget => (_jsxs(_Fragment, { children: [children, createPortal(_jsx("div", { className: themeClasses, children: popupTarget }), (parentTarget && getPopupContainer(parentTarget)) || document.body)] })) })) : (children) }) }));
|
|
69
69
|
});
|
|
70
70
|
export default Theme;
|
package/components/global/url.js
CHANGED
|
@@ -89,7 +89,7 @@ export function joinBaseURLAndPath(baseUrl, path) {
|
|
|
89
89
|
* @return {AuthResponse} object with query parameters map
|
|
90
90
|
*/
|
|
91
91
|
export function parseQueryString(queryString) {
|
|
92
|
-
if (queryString
|
|
92
|
+
if (!queryString) {
|
|
93
93
|
return {};
|
|
94
94
|
}
|
|
95
95
|
const queryParameterPairRE = /([^&;=]+)=?([^&;]*)/g;
|
|
@@ -100,7 +100,7 @@ export function parseQueryString(queryString) {
|
|
|
100
100
|
return decodeURIComponent(s.replace(/\+/g, ' '));
|
|
101
101
|
}
|
|
102
102
|
let matchedQueryPair;
|
|
103
|
-
while ((matchedQueryPair = queryParameterPairRE.exec(queryString))
|
|
103
|
+
while (queryString && (matchedQueryPair = queryParameterPairRE.exec(queryString))) {
|
|
104
104
|
urlParams[decode(matchedQueryPair[FIRST_PAIR_ELEMENT])] = decode(matchedQueryPair[SECOND_PAIR_ELEMENT]);
|
|
105
105
|
}
|
|
106
106
|
return urlParams;
|
|
@@ -122,7 +122,7 @@ export function encodeURL(url, params) {
|
|
|
122
122
|
let k;
|
|
123
123
|
let i = 0;
|
|
124
124
|
for (k in params) {
|
|
125
|
-
if (
|
|
125
|
+
if (Object.prototype.hasOwnProperty.call(params, k) && params[k] !== null && params[k] !== undefined) {
|
|
126
126
|
res +=
|
|
127
127
|
(i++ === 0 ? firstSeparator : '&') +
|
|
128
128
|
customEncodeURIComponent(k) +
|
|
@@ -6,7 +6,7 @@ export default function useEventCallback(fn) {
|
|
|
6
6
|
});
|
|
7
7
|
return useCallback((...args) => {
|
|
8
8
|
const { current } = ref;
|
|
9
|
-
if (current
|
|
9
|
+
if (current === null || current === undefined) {
|
|
10
10
|
throw new Error('callback created in useEventCallback can only be called from event handlers');
|
|
11
11
|
}
|
|
12
12
|
return current(...args);
|
|
@@ -116,10 +116,12 @@
|
|
|
116
116
|
--ring-link-hover-color: rgb(var(--ring-link-hover-components)); /* #2E55A3 */
|
|
117
117
|
--ring-error-components: 204, 54, 69;
|
|
118
118
|
--ring-error-color: rgb(var(--ring-error-components)); /* #CC3645 */
|
|
119
|
-
--ring-warning-components:
|
|
120
|
-
--ring-warning-color: rgb(var(--ring-warning-components)); /* #
|
|
119
|
+
--ring-warning-components: 182, 84, 22;
|
|
120
|
+
--ring-warning-color: rgb(var(--ring-warning-components)); /* #B65416 */ /* Prefer using warning icon + regular text color */
|
|
121
121
|
--ring-success-components: 31, 117, 54;
|
|
122
122
|
--ring-success-color: rgb(var(--ring-success-components)); /* #1F7536 */ /* Prefer using success icon + regular text color */
|
|
123
|
+
--ring-purple-text-components: 131, 77, 240;
|
|
124
|
+
--ring-purple-text-color: rgb(var(--ring-purple-text-components)); /* #834DF0 */
|
|
123
125
|
--ring-text-components: 39, 40, 46;
|
|
124
126
|
--ring-text-color: rgb(var(--ring-text-components)); /* #27282E */
|
|
125
127
|
--ring-active-text-color: var(--ring-text-color);
|
|
@@ -238,7 +240,7 @@
|
|
|
238
240
|
--ring-ease: 0.3s ease-out;
|
|
239
241
|
--ring-fast-ease: 0.15s ease-out;
|
|
240
242
|
--ring-font-family: system-ui, Arial, sans-serif;
|
|
241
|
-
--ring-font-family-monospace: Menlo,
|
|
243
|
+
--ring-font-family-monospace: Menlo, 'Bitstream Vera Sans Mono', 'Ubuntu Mono', Consolas, 'Courier New', Courier,
|
|
242
244
|
monospace;
|
|
243
245
|
--ring-font-weight-medium: 500;
|
|
244
246
|
--ring-font-weight-bold: 600;
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
--ring-main-error-color: rgb(var(--ring-main-error-components)); /* #BD5757 */
|
|
42
42
|
--ring-main-error-hover-components: 156, 78, 78;
|
|
43
43
|
--ring-main-error-hover-color: rgb(var(--ring-main-error-hover-components)); /* #9C4E4E */
|
|
44
|
-
--ring-main-warning-components: 224,
|
|
45
|
-
--ring-main-warning-color: rgb(var(--ring-main-warning-components)); /* #
|
|
44
|
+
--ring-main-warning-components: 224, 137, 87;
|
|
45
|
+
--ring-main-warning-color: rgb(var(--ring-main-warning-components)); /* #E08957 */
|
|
46
46
|
--ring-main-warning-hover-components: 199, 125, 85;
|
|
47
47
|
--ring-main-warning-hover-color: rgb(var(--ring-main-warning-hover-components)); /* #C77D55 */
|
|
48
48
|
--ring-main-purple-components: 149, 90, 224;
|
|
@@ -103,10 +103,12 @@
|
|
|
103
103
|
--ring-link-hover-color: rgb(var(--ring-link-hover-components)); /* #6B9BFA */
|
|
104
104
|
--ring-error-components: 227, 119, 116;
|
|
105
105
|
--ring-error-color: rgb(var(--ring-error-components)); /* #E37774 */
|
|
106
|
-
--ring-warning-components: 224,
|
|
107
|
-
--ring-warning-color: rgb(var(--ring-warning-components)); /* #
|
|
106
|
+
--ring-warning-components: 224, 137, 87;
|
|
107
|
+
--ring-warning-color: rgb(var(--ring-warning-components)); /* #E08957 */ /* Prefer using warning icon + regular text color */
|
|
108
108
|
--ring-success-components: 95, 173, 101;
|
|
109
109
|
--ring-success-color: rgb(var(--ring-success-components)); /* #5FAD65 */ /* Prefer using success icon + regular text color */
|
|
110
|
+
--ring-purple-text-components: 181, 137, 236;
|
|
111
|
+
--ring-purple-text-color: rgb(var(--ring-purple-text-components)); /* #B589EC */
|
|
110
112
|
--ring-text-components: 255, 255, 255;
|
|
111
113
|
--ring-text-color: rgb(var(--ring-text-components)); /* #FFFFFF */
|
|
112
114
|
--ring-active-text-components: 255, 255, 255;
|
|
@@ -175,8 +177,8 @@
|
|
|
175
177
|
--ring-warning-container-light-color: rgb(var(--ring-warning-container-light-components)); /* #352A27 */
|
|
176
178
|
--ring-highlight-container-light-components: 49, 42, 35;
|
|
177
179
|
--ring-highlight-container-light-color: rgb(var(--ring-highlight-container-light-components)); /* #312A23 */
|
|
178
|
-
--ring-grey-container-light-components:
|
|
179
|
-
--ring-grey-container-light-color: rgb(var(--ring-grey-container-light-components)); /* #
|
|
180
|
+
--ring-grey-container-light-components: 43, 45, 48;
|
|
181
|
+
--ring-grey-container-light-color: rgb(var(--ring-grey-container-light-components)); /* #2B2D30 */
|
|
180
182
|
--ring-purple-container-light-components: 43, 37, 49;
|
|
181
183
|
--ring-purple-container-light-color: rgb(var(--ring-purple-container-light-components)); /* #2B2531 */
|
|
182
184
|
--ring-highlight-fill-components: 214, 174, 88;
|
package/components/grid/col.d.ts
CHANGED
package/components/grid/col.js
CHANGED
|
@@ -28,6 +28,6 @@ export default class Col extends Component {
|
|
|
28
28
|
const classes = classNames(styles.col, className, getClassNames(restProps), {
|
|
29
29
|
[styles.reverse]: reverse,
|
|
30
30
|
});
|
|
31
|
-
return (_jsx("div", { className: classes, "data-test":
|
|
31
|
+
return (_jsx("div", { className: classes, "data-test": 'ring-grid-column', children: children }));
|
|
32
32
|
}
|
|
33
33
|
}
|
package/components/grid/grid.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
|
-
@value breakpoint-small, breakpoint-middle, breakpoint-large from
|
|
4
|
-
@value large-screen-media, middle-screen-media, small-screen-media from
|
|
3
|
+
@value breakpoint-small, breakpoint-middle, breakpoint-large from '../global/global.css';
|
|
4
|
+
@value large-screen-media, middle-screen-media, small-screen-media from '../global/global.css';
|
|
5
5
|
|
|
6
6
|
.container-fluid,
|
|
7
7
|
.container,
|
|
@@ -773,7 +773,7 @@
|
|
|
773
773
|
}
|
|
774
774
|
|
|
775
775
|
.col-lg-5 {
|
|
776
|
-
flex-basis: var(--ring-grid-width-5)
|
|
776
|
+
flex-basis: var(--ring-grid-width-5);
|
|
777
777
|
|
|
778
778
|
max-width: var(--ring-grid-width-5);
|
|
779
779
|
}
|
package/components/grid/grid.js
CHANGED
|
@@ -9,7 +9,7 @@ export class Grid extends Component {
|
|
|
9
9
|
render() {
|
|
10
10
|
const { children, className, ...restProps } = this.props;
|
|
11
11
|
const classes = classNames(styles['container-fluid'], className);
|
|
12
|
-
return (_jsx("div", { "data-test":
|
|
12
|
+
return (_jsx("div", { "data-test": 'ring-grid', ...restProps, className: classes, children: children }));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export { default as Row } from './row';
|
package/components/grid/row.d.ts
CHANGED
package/components/grid/row.js
CHANGED
|
@@ -34,6 +34,6 @@ export default class Row extends Component {
|
|
|
34
34
|
const classes = classNames(className, styles.row, getModifierClassNames(restProps), {
|
|
35
35
|
[styles.reverse]: reverse,
|
|
36
36
|
});
|
|
37
|
-
return (_jsx("div", { className: classes, "data-test":
|
|
37
|
+
return (_jsx("div", { className: classes, "data-test": 'ring-grid-row', children: children }));
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -9,6 +9,6 @@ export default class Group extends Component {
|
|
|
9
9
|
render() {
|
|
10
10
|
const { children, className, ...restProps } = this.props;
|
|
11
11
|
const classes = classNames(styles.group, className);
|
|
12
|
-
return (_jsx("span", { "data-test":
|
|
12
|
+
return (_jsx("span", { "data-test": 'ring-group', ...restProps, className: classes, children: children }));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
import { ButtonAttrs } from '../button/button';
|
|
3
|
-
import { IconType } from '../icon
|
|
2
|
+
import { type ButtonAttrs } from '../button/button';
|
|
3
|
+
import { type IconType } from '../icon';
|
|
4
4
|
export interface HeaderIconSpecificProps {
|
|
5
5
|
icon: string | IconType;
|
|
6
6
|
rotatable?: boolean | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
|
-
@value link, active from
|
|
3
|
+
@value link, active from '../link/link.css';
|
|
4
4
|
|
|
5
5
|
:root,
|
|
6
6
|
:host {
|
|
@@ -206,7 +206,7 @@ html:global(.ring-ui-theme-dark) .headerVertical {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
.anchorClassName {
|
|
209
|
-
composes: resetButton from
|
|
209
|
+
composes: resetButton from '../global/global.css';
|
|
210
210
|
|
|
211
211
|
display: flex;
|
|
212
212
|
align-items: center;
|
|
@@ -230,7 +230,7 @@ html:global(.ring-ui-theme-dark) .headerVertical {
|
|
|
230
230
|
width: var(--ring-unit);
|
|
231
231
|
height: var(--ring-unit);
|
|
232
232
|
|
|
233
|
-
content:
|
|
233
|
+
content: '';
|
|
234
234
|
|
|
235
235
|
border: 1px solid var(--ring-white-text-color);
|
|
236
236
|
border-radius: 50%;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
2
|
export default function Links({ className, ...restProps }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ComponentType, HTMLAttributes, PureComponent, ReactNode } from 'react';
|
|
1
|
+
import { type ComponentType, type HTMLAttributes, PureComponent, type ReactNode } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Size } from '../avatar/avatar';
|
|
4
|
-
import { PopupMenuAttrs } from '../popup-menu/popup-menu';
|
|
5
|
-
import { ListDataItem } from '../list/consts';
|
|
6
|
-
import { AuthUser } from '../auth/auth';
|
|
7
|
-
import { ClickableLinkProps } from '../link/
|
|
4
|
+
import { type PopupMenuAttrs } from '../popup-menu/popup-menu';
|
|
5
|
+
import { type ListDataItem } from '../list/consts';
|
|
6
|
+
import { type AuthUser } from '../auth/auth';
|
|
7
|
+
import { type ClickableLinkProps } from '../link/clickable-link';
|
|
8
8
|
export interface ProfileTranslations {
|
|
9
9
|
applyChangedUser?: string | null | undefined;
|
|
10
10
|
login?: string | null | undefined;
|
|
@@ -14,7 +14,7 @@ export default class Profile extends PureComponent {
|
|
|
14
14
|
closeOnSelect: true,
|
|
15
15
|
renderPopupItems: items => items,
|
|
16
16
|
size: Size.Size32,
|
|
17
|
-
renderGuest: ({ loading, onLogin, className, translations }) => (_jsx(I18nContext.Consumer, { children: ({ translate }) => (_jsx("div", { className: classNames(styles.profileEmpty, className), children: _jsx(Button, { primary: true, "data-test":
|
|
17
|
+
renderGuest: ({ loading, onLogin, className, translations }) => (_jsx(I18nContext.Consumer, { children: ({ translate }) => (_jsx("div", { className: classNames(styles.profileEmpty, className), children: _jsx(Button, { primary: true, "data-test": 'ring-header-login-button', disabled: loading, loader: loading, onClick: onLogin, children: translations?.login ?? translate('login') }) })) })),
|
|
18
18
|
};
|
|
19
19
|
static contextType = I18nContext;
|
|
20
20
|
static Size = Size;
|
|
@@ -30,7 +30,7 @@ export default class Profile extends PureComponent {
|
|
|
30
30
|
const avatarWrapper = classNames(styles.avatarWrapper, {
|
|
31
31
|
[styles.hasUpdates]: hasUpdates,
|
|
32
32
|
});
|
|
33
|
-
const anchor = (_jsxs("button", { type:
|
|
33
|
+
const anchor = (_jsxs("button", { type: 'button', className: styles.anchorClassName, children: [_jsx("span", { className: avatarWrapper, children: _jsx(Avatar, { url: user.profile && user.profile.avatar && user.profile.avatar.url, size: size, round: round, username: user.name }) }), showName && _jsx("span", { children: user.name })] }));
|
|
34
34
|
const items = [
|
|
35
35
|
showApplyChangedUser && {
|
|
36
36
|
rgItemType,
|
|
@@ -63,7 +63,7 @@ export default class Profile extends PureComponent {
|
|
|
63
63
|
onClick: onLogout,
|
|
64
64
|
},
|
|
65
65
|
].filter(isTruthy);
|
|
66
|
-
return (_jsx(DropdownMenu, { ...props, onShow: onShow, onHide: onHide, title: user.name, anchor: anchor, data: renderPopupItems(items), "data-test":
|
|
66
|
+
return (_jsx(DropdownMenu, { ...props, onShow: onShow, onHide: onHide, title: user.name, anchor: anchor, data: renderPopupItems(items), "data-test": 'ring-profile', className: classNames(styles.profile, className), activeClassName: activeClassName, menuProps: {
|
|
67
67
|
closeOnSelect,
|
|
68
68
|
left: -2,
|
|
69
69
|
top: -8,
|