@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,8 +1,8 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import Popup, { PopupAttrs } from '../popup/popup';
|
|
1
|
+
import { Component, type ReactNode } from 'react';
|
|
2
|
+
import Popup, { type PopupAttrs } from '../popup/popup';
|
|
3
3
|
import { Directions } from '../popup/popup.consts';
|
|
4
|
-
import { IconType } from '../icon/icon';
|
|
5
|
-
import { ButtonAttrs } from '../button/button';
|
|
4
|
+
import { type IconType } from '../icon/icon';
|
|
5
|
+
import { type ButtonAttrs } from '../button/button';
|
|
6
6
|
import Theme from '../global/theme';
|
|
7
7
|
export interface MessageTranslations {
|
|
8
8
|
gotIt: string;
|
|
@@ -76,7 +76,7 @@ export default class Message extends Component {
|
|
|
76
76
|
getTailOffset() {
|
|
77
77
|
const DEFAULT_OFFSET = 32;
|
|
78
78
|
const { popupProps } = this.props;
|
|
79
|
-
if (this.props.tailOffset
|
|
79
|
+
if (this.props.tailOffset) {
|
|
80
80
|
return this.props.tailOffset;
|
|
81
81
|
}
|
|
82
82
|
const anchor = popupProps?.anchorElement || this.popup?.parent;
|
|
@@ -84,7 +84,7 @@ export default class Message extends Component {
|
|
|
84
84
|
return DEFAULT_OFFSET;
|
|
85
85
|
}
|
|
86
86
|
const offset = Math.floor(anchor.offsetWidth / 2);
|
|
87
|
-
const isOpenedToRight = this.state.direction
|
|
87
|
+
const isOpenedToRight = this.state.direction && [Directions.TOP_RIGHT, Directions.BOTTOM_RIGHT].includes(this.state.direction);
|
|
88
88
|
if (popupProps?.left && isOpenedToRight) {
|
|
89
89
|
return offset - popupProps?.left;
|
|
90
90
|
}
|
|
@@ -98,6 +98,6 @@ export default class Message extends Component {
|
|
|
98
98
|
const tailClasses = classNames(styles.tail, tailClassName);
|
|
99
99
|
const popupDirections = this.props.direction ? [this.props.direction] : this.props.directions;
|
|
100
100
|
const { direction } = this.state;
|
|
101
|
-
return (_jsx(I18nContext.Consumer, { children: ({ translate }) => (_jsx(WithThemeClasses, { theme: theme, children: themeClasses => (_jsx(Popup, { ref: this.popupRef, hidden: false, directions: popupDirections, className: classNames(classes, themeClasses), offset: UNIT * 2, onDirectionChange: this._onDirectionChange, ...popupProps, children: _jsxs(ThemeProvider, { theme: theme, passToPopups: true, children: [direction && _jsx("div", { className: tailClasses, style: getTailOffsets(this.getTailOffset())[direction] }), icon && _jsx(Icon, { className: styles.icon, glyph: icon }), title && (_jsx("h1", { "data-test":
|
|
101
|
+
return (_jsx(I18nContext.Consumer, { children: ({ translate }) => (_jsx(WithThemeClasses, { theme: theme, children: themeClasses => (_jsx(Popup, { ref: this.popupRef, hidden: false, directions: popupDirections, className: classNames(classes, themeClasses), offset: UNIT * 2, onDirectionChange: this._onDirectionChange, ...popupProps, children: _jsxs(ThemeProvider, { theme: theme, passToPopups: true, children: [direction && _jsx("div", { className: tailClasses, style: getTailOffsets(this.getTailOffset())[direction] }), icon && _jsx(Icon, { className: styles.icon, glyph: icon }), title && (_jsx("h1", { "data-test": 'rgMessageTitle', className: styles.title, children: title })), children && _jsx("div", { className: styles.description, children: children }), (onClose || buttonProps) && (_jsx(Button, { className: styles.gotIt, onClick: onClose, primary: true, ...buttonProps, children: translations?.gotIt ?? translate('gotIt') })), onDismiss && (_jsx(Button, { onClick: onDismiss, inline: true, children: translations?.dismiss ?? translate('dismiss') }))] }) })) })) }));
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
:global(.ring-old-browsers-message) {
|
|
4
4
|
display: block;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
color: var(--ring-text-color);
|
|
11
11
|
|
|
12
|
-
font-family: system-ui, Ubuntu,
|
|
12
|
+
font-family: system-ui, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
|
|
13
13
|
font-size: var(--ring-font-size-larger);
|
|
14
14
|
line-height: calc(2.5 * var(--ring-unit));
|
|
15
15
|
}
|
|
@@ -62,7 +62,7 @@ startOldBrowsersDetector(() => {
|
|
|
62
62
|
const browserMessage = document.getElementById('ring-old-browsers-message__browser-message');
|
|
63
63
|
const errorMessage = document.getElementById('ring-old-browsers-message__error-message');
|
|
64
64
|
const smileNode = document.getElementById('ring-old-browsers-message__smile');
|
|
65
|
-
if (browserMessage
|
|
65
|
+
if (browserMessage && errorMessage) {
|
|
66
66
|
if (isBrowserInWhiteList()) {
|
|
67
67
|
browserMessage.style.display = 'none';
|
|
68
68
|
errorMessage.style.display = 'block';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name Pager
|
|
3
3
|
*/
|
|
4
|
-
import { PureComponent, ReactNode } from 'react';
|
|
4
|
+
import { PureComponent, type ReactNode } from 'react';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { SelectItem } from '../select/select';
|
|
6
|
+
import { type SelectItem } from '../select/select';
|
|
7
7
|
export interface PagerTranslations {
|
|
8
8
|
perPage: string;
|
|
9
9
|
firstPage: string;
|
|
@@ -46,7 +46,7 @@ export default class Pager extends PureComponent {
|
|
|
46
46
|
return Math.ceil(total / pageSize);
|
|
47
47
|
}
|
|
48
48
|
handlePageSizeChange = (item) => {
|
|
49
|
-
if (item
|
|
49
|
+
if (item) {
|
|
50
50
|
this.props.onPageSizeChange(item.key);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
@@ -82,34 +82,32 @@ export default class Pager extends PureComponent {
|
|
|
82
82
|
if (!onPageChange) {
|
|
83
83
|
return {};
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
if (hrefFunc) {
|
|
86
86
|
return { onPlainLeftClick: onClick };
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
return { onClick };
|
|
90
|
-
}
|
|
88
|
+
return { onClick };
|
|
91
89
|
}
|
|
92
90
|
getPageSizeSelector() {
|
|
93
91
|
const selectOptions = this.getSelectOptions();
|
|
94
|
-
return (!this.props.disablePageSizeSelector && (_jsx("div", { "data-test":
|
|
92
|
+
return (!this.props.disablePageSizeSelector && (_jsx("div", { "data-test": 'ring-pager-page-size-selector', className: style.pageSize, children: _jsx(Select, { data: selectOptions.data, selected: selectOptions.selected, onSelect: this.handlePageSizeChange, type: Select.Type.INLINE, disabled: this.props.loader }) })));
|
|
95
93
|
}
|
|
96
94
|
getPagerLinks() {
|
|
97
95
|
const { translate } = this.context;
|
|
98
96
|
const prevLinkAvailable = this.props.currentPage !== 1;
|
|
99
97
|
const nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotalPages();
|
|
100
|
-
const nextIcon = _jsx(Icon, { glyph: chevronRightIcon },
|
|
101
|
-
const prevIcon = _jsx(Icon, { glyph: chevronLeftIcon },
|
|
98
|
+
const nextIcon = _jsx(Icon, { glyph: chevronRightIcon }, 'icon');
|
|
99
|
+
const prevIcon = _jsx(Icon, { glyph: chevronLeftIcon }, 'icon');
|
|
102
100
|
const prevText = this.props.translations?.previousPage ?? translate('previousPage');
|
|
103
101
|
const nextText = this.props.translations?.nextPage ?? translate('nextPage');
|
|
104
|
-
const nextLinkContent = [_jsx("span", { children: nextText },
|
|
105
|
-
const prevLinkContent = [prevIcon, _jsx("span", { children: prevText },
|
|
102
|
+
const nextLinkContent = [_jsx("span", { children: nextText }, 'text'), nextIcon];
|
|
103
|
+
const prevLinkContent = [prevIcon, _jsx("span", { children: prevText }, 'text')];
|
|
106
104
|
const prevLinkHref = this.generateHref(this.props.currentPage - 1);
|
|
107
105
|
const nextLinkHref = this.generateHref(this.props.currentPage + 1);
|
|
108
106
|
const disabledLinkClasses = classNames({
|
|
109
107
|
[style.link]: true,
|
|
110
108
|
[style.linkDisabled]: true,
|
|
111
109
|
});
|
|
112
|
-
return (_jsxs("div", { className: style.links, children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? (_jsx(Link, { href: prevLinkHref, className: style.link, ...this.getClickProps(this.handlePrevClick), children: prevLinkContent })) : (_jsxs("span", { className: disabledLinkClasses, children: [prevIcon, _jsx("span", { children: prevText },
|
|
110
|
+
return (_jsxs("div", { className: style.links, children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? (_jsx(Link, { href: prevLinkHref, className: style.link, ...this.getClickProps(this.handlePrevClick), children: prevLinkContent })) : (_jsxs("span", { className: disabledLinkClasses, children: [prevIcon, _jsx("span", { children: prevText }, 'text')] })), nextLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? (_jsx(Link, { href: nextLinkHref, className: style.link, ...this.getClickProps(this.handleNextClick), children: nextLinkContent })) : (_jsxs("span", { className: disabledLinkClasses, children: [_jsx("span", { children: nextText }, 'text'), nextIcon] }))] }));
|
|
113
111
|
}
|
|
114
112
|
generateHref(page) {
|
|
115
113
|
if (this.props.hrefFunc === undefined) {
|
|
@@ -118,6 +116,7 @@ export default class Pager extends PureComponent {
|
|
|
118
116
|
const pageSize = this.props.disablePageSizeSelector ? undefined : this.props.pageSize;
|
|
119
117
|
return this.props.hrefFunc(page, pageSize);
|
|
120
118
|
}
|
|
119
|
+
// eslint-disable-next-line complexity
|
|
121
120
|
getPagerContent() {
|
|
122
121
|
const { currentPage, visiblePagesLimit } = this.props;
|
|
123
122
|
const totalPages = this.getTotalPages();
|
|
@@ -161,6 +160,6 @@ export default class Pager extends PureComponent {
|
|
|
161
160
|
if (!shouldRenderPagerContent && this.props.disablePageSizeSelector) {
|
|
162
161
|
return null;
|
|
163
162
|
}
|
|
164
|
-
return (_jsx("div", { "data-test":
|
|
163
|
+
return (_jsx("div", { "data-test": 'ring-pager', className: classes, children: shouldRenderPagerContent ? this.getPagerContent() : this.getPageSizeSelector() }));
|
|
165
164
|
}
|
|
166
165
|
}
|
|
@@ -9,6 +9,6 @@ export default class Panel extends PureComponent {
|
|
|
9
9
|
render() {
|
|
10
10
|
const { className, children, ...props } = this.props;
|
|
11
11
|
const classes = classNames(styles.panel, className);
|
|
12
|
-
return (_jsx("div", { "data-test":
|
|
12
|
+
return (_jsx("div", { "data-test": 'ring-panel', ...props, className: classes, children: children }));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -43,6 +43,7 @@ export default class PermissionCache {
|
|
|
43
43
|
if (key) {
|
|
44
44
|
_permissionCache[key] = {
|
|
45
45
|
global: permission.global,
|
|
46
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
46
47
|
projectIdSet: this.constructor._toProjectIdSet(permission.projects),
|
|
47
48
|
};
|
|
48
49
|
}
|
|
@@ -195,7 +196,7 @@ export default class PermissionCache {
|
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
else {
|
|
198
|
-
result = t
|
|
199
|
+
result = !!t && this.testPermission(t, projectId);
|
|
199
200
|
}
|
|
200
201
|
return result;
|
|
201
202
|
}
|
|
@@ -218,10 +219,8 @@ export default class PermissionCache {
|
|
|
218
219
|
}
|
|
219
220
|
if (projectId) {
|
|
220
221
|
// if projectId is specified check that the permission is given in the project
|
|
221
|
-
return cachedPermission.projectIdSet
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
return true;
|
|
222
|
+
return !!cachedPermission.projectIdSet && projectId in cachedPermission.projectIdSet;
|
|
225
223
|
}
|
|
224
|
+
return true;
|
|
226
225
|
}
|
|
227
226
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import PermissionCache, { type Permission } from './permissions-cache';
|
|
2
|
+
import type Auth from '../auth/auth-core';
|
|
3
3
|
export interface PermissionsConfig {
|
|
4
4
|
prefix?: string | null | undefined;
|
|
5
5
|
namesConverter?: ((name: string) => string) | null | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PermissionCache from './
|
|
1
|
+
import PermissionCache from './permissions-cache';
|
|
2
2
|
/**
|
|
3
3
|
* <code>
|
|
4
4
|
* const permissions = new Permissions(auth, {prefix: 'jetbrains.jetpass.', services: [auth.serviceId]})
|
|
@@ -64,9 +64,7 @@ export default class Permissions {
|
|
|
64
64
|
if (storedName.indexOf(prefix) !== 0) {
|
|
65
65
|
return storedName;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
return storedName.substr(prefix.length);
|
|
69
|
-
}
|
|
67
|
+
return storedName.substr(prefix.length);
|
|
70
68
|
};
|
|
71
69
|
}
|
|
72
70
|
static getPermissionQuery(services) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
.popup {
|
|
4
|
-
composes: font from
|
|
4
|
+
composes: font from '../global/global.css';
|
|
5
5
|
|
|
6
6
|
position: fixed;
|
|
7
7
|
z-index: var(--ring-overlay-z-index);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
top: unset;
|
|
30
30
|
left: unset;
|
|
31
31
|
|
|
32
|
-
margin: 0
|
|
32
|
+
margin: 0;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@position-try --bottom-right {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name Popup
|
|
3
3
|
*/
|
|
4
|
-
import { PureComponent, ReactNode, CSSProperties, SyntheticEvent } from 'react';
|
|
4
|
+
import { PureComponent, type ReactNode, type CSSProperties, type SyntheticEvent } from 'react';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { Listeners } from '../global/dom';
|
|
7
|
-
import { PositionStyles } from './position';
|
|
7
|
+
import { type PositionStyles } from './position';
|
|
8
8
|
import { Dimension, Directions, Display, MaxHeight, MinWidth } from './popup.consts';
|
|
9
9
|
import { PopupTargetContext, PopupTarget } from './popup.target';
|
|
10
10
|
export { PopupTargetContext, PopupTarget };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable max-lines */
|
|
2
3
|
/**
|
|
3
4
|
* @name Popup
|
|
4
5
|
*/
|
|
@@ -40,7 +41,7 @@ const stop = (event) => {
|
|
|
40
41
|
event.stopPropagation();
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
export const getPopupContainer = (target) => typeof target === 'string' ? document.querySelector(`[data-portaltarget=${target}]`) : target;
|
|
44
|
+
export const getPopupContainer = (target) => (typeof target === 'string' ? document.querySelector(`[data-portaltarget=${target}]`) : target);
|
|
44
45
|
/**
|
|
45
46
|
* @constructor
|
|
46
47
|
* @name Popup
|
|
@@ -198,7 +199,7 @@ export default class Popup extends PureComponent {
|
|
|
198
199
|
popup.style[propKey] = value.toString();
|
|
199
200
|
}
|
|
200
201
|
});
|
|
201
|
-
if (direction
|
|
202
|
+
if (direction) {
|
|
202
203
|
this._updateDirection(direction);
|
|
203
204
|
}
|
|
204
205
|
}
|
|
@@ -271,7 +272,7 @@ export default class Popup extends PureComponent {
|
|
|
271
272
|
!this._listenersEnabled ||
|
|
272
273
|
(this.props.dontCloseOnAnchorClick && evt.target instanceof Node && this._getAnchor()?.contains(evt.target)) ||
|
|
273
274
|
// ignore clicks in shadow DOM, e.g., Grammarly suggestions
|
|
274
|
-
(evt.target instanceof Element && evt.target.shadowRoot
|
|
275
|
+
(evt.target instanceof Element && evt.target.shadowRoot)) {
|
|
275
276
|
return;
|
|
276
277
|
}
|
|
277
278
|
this.props.onOutsideClick(evt);
|
|
@@ -302,11 +303,11 @@ export default class Popup extends PureComponent {
|
|
|
302
303
|
// prevent bubbling through portal
|
|
303
304
|
onClick: stop,
|
|
304
305
|
// This handler only blocks bubbling through React portal
|
|
305
|
-
role:
|
|
306
|
+
role: 'presentation', ref: this.portalRef, children: [this.shouldUseShortcuts() && _jsx(Shortcuts, { map: this.shortcutsMap, scope: this.shortcutsScope }), client !== false &&
|
|
306
307
|
(keepMounted || !hidden) &&
|
|
307
308
|
createPortal(_jsx(PopupTarget, { id: this.uid, ref: this.containerRef, onMouseOver: onMouseOver, onFocus: onMouseOver, onMouseOut: onMouseOut, onBlur: onMouseOut, onContextMenu: onContextMenu, children: _jsx("div", { "data-test": dataTests('ring-popup', dataTest), "data-test-shown": !hidden && !showing, "data-test-direction": direction, ref: this.popupRef, className: classes, style: style, onMouseDown: onMouseDown, onMouseUp: onMouseUp,
|
|
308
309
|
// mouse handlers are used to track clicking on inner elements
|
|
309
|
-
role:
|
|
310
|
+
role: 'presentation', children: this.getInternalContent() }) }), this.getContainer() || document.body)] }));
|
|
310
311
|
} }));
|
|
311
312
|
}
|
|
312
313
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
export declare const PopupTargetContext: import("react").Context<string | Element | undefined>;
|
|
3
3
|
export interface PopupTargetProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
4
|
id: string;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { getRect } from '../global/dom';
|
|
2
2
|
import { calculateMinWidth } from './position';
|
|
3
3
|
import { Directions } from './popup.consts';
|
|
4
|
-
export const supportsCSSAnchorPositioning = () =>
|
|
5
|
-
return CSS?.supports?.('anchor-name', 'none');
|
|
6
|
-
};
|
|
4
|
+
export const supportsCSSAnchorPositioning = () => CSS?.supports?.('anchor-name', 'none');
|
|
7
5
|
const getPositionArea = (direction) => {
|
|
8
6
|
switch (direction) {
|
|
9
7
|
case Directions.BOTTOM_RIGHT:
|
|
@@ -34,12 +32,10 @@ const getPositionArea = (direction) => {
|
|
|
34
32
|
return ['block-end span-inline-end', '--bottom-right'];
|
|
35
33
|
}
|
|
36
34
|
};
|
|
37
|
-
const getPositionFallbacks = (directions) =>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.join(', ');
|
|
42
|
-
};
|
|
35
|
+
const getPositionFallbacks = (directions) => directions
|
|
36
|
+
.slice(1)
|
|
37
|
+
.map(direction => getPositionArea(direction)[1])
|
|
38
|
+
.join(', ');
|
|
43
39
|
export const setCSSAnchorPositioning = ({ popup, anchor, uid, minWidth, top, left, directions, offset, }) => {
|
|
44
40
|
const anchorName = anchor.style.getPropertyValue('anchor-name') || `--anchor-${uid}`;
|
|
45
41
|
if (!anchor.style.getPropertyValue('anchor-name')) {
|
|
@@ -47,7 +43,7 @@ export const setCSSAnchorPositioning = ({ popup, anchor, uid, minWidth, top, lef
|
|
|
47
43
|
}
|
|
48
44
|
popup.style.setProperty('position-anchor', anchorName);
|
|
49
45
|
const calculatedMinWidth = calculateMinWidth(getRect(anchor).width, minWidth);
|
|
50
|
-
if (calculatedMinWidth
|
|
46
|
+
if (calculatedMinWidth) {
|
|
51
47
|
popup.style.minWidth = `${calculatedMinWidth}px`;
|
|
52
48
|
}
|
|
53
49
|
if (top) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getDocumentScrollLeft, getDocumentScrollTop, getRect, getWindowHeight, isMounted } from '../global/dom';
|
|
1
|
+
import { getDocumentScrollLeft, getDocumentScrollTop, getRect, getWindowHeight, isMounted, } from '../global/dom';
|
|
2
2
|
import { Dimension, Directions, MaxHeight, MinWidth } from './popup.consts';
|
|
3
3
|
export { Dimension, Directions, MaxHeight, MinWidth };
|
|
4
4
|
function getScrollingCoordinates(container) {
|
|
5
|
-
if (container
|
|
5
|
+
if (container) {
|
|
6
6
|
return {
|
|
7
7
|
top: container.scrollTop,
|
|
8
8
|
left: container.scrollLeft,
|
|
@@ -40,7 +40,7 @@ function getPositionStyles(popup, anchorRect, anchorLeft, anchorTop, offset) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function verticalOverflow(styles, scrollingCoordinates, attrs) {
|
|
43
|
-
const containerHeight = attrs.container
|
|
43
|
+
const containerHeight = attrs.container ? attrs.container.clientHeight : getWindowHeight();
|
|
44
44
|
const viewportMinX = scrollingCoordinates.top + attrs.sidePadding;
|
|
45
45
|
const viewportMaxX = scrollingCoordinates.top + containerHeight - attrs.sidePadding;
|
|
46
46
|
const topOverflow = Math.max(viewportMinX - styles.top, 0);
|
|
@@ -50,7 +50,7 @@ function verticalOverflow(styles, scrollingCoordinates, attrs) {
|
|
|
50
50
|
return topOverflow + bottomOverflow;
|
|
51
51
|
}
|
|
52
52
|
function horizontalOverflow(styles, scrollingCoordinates, attrs) {
|
|
53
|
-
const containerWidth = attrs.container
|
|
53
|
+
const containerWidth = attrs.container ? attrs.container.clientWidth : window.innerWidth;
|
|
54
54
|
const viewportMinY = scrollingCoordinates.left + attrs.sidePadding;
|
|
55
55
|
const viewportMaxY = scrollingCoordinates.left + containerWidth - attrs.sidePadding;
|
|
56
56
|
const leftOverflow = Math.max(viewportMinY - styles.left, 0);
|
|
@@ -77,11 +77,11 @@ const defaultcontainerRect = {
|
|
|
77
77
|
function handleTopOffScreen({ sidePadding, styles, anchorRect, maxHeight, popupScrollHeight, direction, scroll, }) {
|
|
78
78
|
const BORDER_COMPENSATION = 1;
|
|
79
79
|
const { TOP_LEFT, TOP_RIGHT, TOP_CENTER, RIGHT_TOP, LEFT_TOP } = Directions;
|
|
80
|
-
const openedToTop = direction
|
|
80
|
+
const openedToTop = direction && [TOP_LEFT, TOP_RIGHT, TOP_CENTER, RIGHT_TOP, LEFT_TOP].includes(direction);
|
|
81
81
|
if (!openedToTop) {
|
|
82
82
|
return styles;
|
|
83
83
|
}
|
|
84
|
-
const isAttachedToAnchorTop = direction
|
|
84
|
+
const isAttachedToAnchorTop = direction && [TOP_LEFT, TOP_CENTER, TOP_RIGHT].includes(direction);
|
|
85
85
|
const attachingPointY = isAttachedToAnchorTop ? anchorRect.top : anchorRect.bottom;
|
|
86
86
|
const effectiveHeight = maxHeight && typeof maxHeight === 'number' ? Math.min(popupScrollHeight, maxHeight) : popupScrollHeight;
|
|
87
87
|
const hypotheticalTop = attachingPointY - effectiveHeight;
|
|
@@ -130,7 +130,7 @@ export function calculateMinWidth(anchorWidth, minWidth) {
|
|
|
130
130
|
if (minWidth === MinWidth.TARGET || minWidth === 'target') {
|
|
131
131
|
return anchorWidth;
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
if (minWidth) {
|
|
134
134
|
return anchorWidth < minWidth ? minWidth : anchorWidth;
|
|
135
135
|
}
|
|
136
136
|
return null;
|
|
@@ -142,8 +142,8 @@ export default function position(attrs) {
|
|
|
142
142
|
left: 0,
|
|
143
143
|
};
|
|
144
144
|
let chosenDirection = null;
|
|
145
|
-
const containerRect = container
|
|
146
|
-
const defaultAnchor = container
|
|
145
|
+
const containerRect = container ? getRect(container) : defaultcontainerRect;
|
|
146
|
+
const defaultAnchor = container ? container : document.body;
|
|
147
147
|
const anchorRect = getRect(isMounted(anchor) ? anchor : defaultAnchor);
|
|
148
148
|
const scroll = getScrollingCoordinates(container);
|
|
149
149
|
const anchorLeft = anchorRect.left + scroll.left + left - containerRect.left;
|
|
@@ -195,7 +195,7 @@ export default function position(attrs) {
|
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
const newMinWidth = calculateMinWidth(anchorRect.width, minWidth);
|
|
198
|
-
if (newMinWidth
|
|
198
|
+
if (newMinWidth) {
|
|
199
199
|
styles.minWidth = newMinWidth;
|
|
200
200
|
}
|
|
201
201
|
return { styles, direction: chosenDirection };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
import Popup, { BasePopupProps } from '../popup/popup';
|
|
3
|
-
import List, { ListProps as ListPropsType } from '../list/list';
|
|
4
|
-
import { ListDataItem } from '../list/consts';
|
|
1
|
+
import { type SyntheticEvent } from 'react';
|
|
2
|
+
import Popup, { type BasePopupProps } from '../popup/popup';
|
|
3
|
+
import List, { type ListProps as ListPropsType } from '../list/list';
|
|
4
|
+
import { type ListDataItem } from '../list/consts';
|
|
5
5
|
export interface PopupMenuProps<T = unknown> extends Omit<ListPropsType<T>, 'maxHeight' | 'hidden'>, Omit<BasePopupProps, 'onMouseOut'> {
|
|
6
6
|
closeOnSelect: boolean;
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
2
|
|
|
3
3
|
:root,
|
|
4
4
|
:host {
|
|
@@ -55,15 +55,13 @@
|
|
|
55
55
|
bottom: 0;
|
|
56
56
|
left: 0;
|
|
57
57
|
|
|
58
|
-
content:
|
|
58
|
+
content: '';
|
|
59
59
|
animation: progress-bar-animation 2500ms linear infinite;
|
|
60
60
|
|
|
61
|
-
background-image: linear-gradient(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
rgba(0, 0, 0, 0)
|
|
66
|
-
);
|
|
61
|
+
background-image: linear-gradient(to right,
|
|
62
|
+
rgba(0, 0, 0, 0),
|
|
63
|
+
var(--ring-progress-bar-line-background-color),
|
|
64
|
+
rgba(0, 0, 0, 0));
|
|
67
65
|
background-repeat: no-repeat;
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, PureComponent } from 'react';
|
|
1
|
+
import { type HTMLAttributes, PureComponent } from 'react';
|
|
2
2
|
export interface ProgressBarProps extends HTMLAttributes<HTMLElement> {
|
|
3
3
|
/**
|
|
4
4
|
* A floating point number that specifies minimum completion rate for a task to be considered
|
|
@@ -37,6 +37,6 @@ export default class ProgressBar extends PureComponent {
|
|
|
37
37
|
[styles.globalMode]: global,
|
|
38
38
|
[styles.staticLineColor]: staticColor,
|
|
39
39
|
});
|
|
40
|
-
return (_jsx("div", { ...otherProps, className: classes, ref: this.progressbarWrapperRef, children: _jsx("div", { className: styles.line, ref: this.progressbarRef, role:
|
|
40
|
+
return (_jsx("div", { ...otherProps, className: classes, ref: this.progressbarWrapperRef, children: _jsx("div", { className: styles.line, ref: this.progressbarRef, role: 'progressbar', "aria-label": label, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, style: { width } }) }));
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../global/variables.css';
|
|
2
|
+
@import '../button/button.css';
|
|
3
3
|
|
|
4
4
|
.queryAssist {
|
|
5
5
|
--ring-input-icon-offset: calc(var(--ring-unit) * 2.5);
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
padding-right: var(--ring-input-padding-inline);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
[dir=
|
|
76
|
+
[dir='rtl'] & {
|
|
77
77
|
padding: 0 var(--ring-input-padding-inline) 0 0;
|
|
78
78
|
|
|
79
79
|
& .actions {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
.placeholder {
|
|
139
|
-
composes: resetButton from
|
|
139
|
+
composes: resetButton from '../global/global.css';
|
|
140
140
|
|
|
141
141
|
position: absolute;
|
|
142
142
|
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
|
|
155
155
|
color: var(--ring-disabled-color);
|
|
156
156
|
|
|
157
|
-
[dir=
|
|
157
|
+
[dir='rtl'] & {
|
|
158
158
|
padding-right: calc(var(--ring-input-padding-inline) * 3 + var(--ring-input-padding-block) * 2);
|
|
159
159
|
|
|
160
160
|
text-align: right;
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
|
|
181
181
|
line-height: inherit;
|
|
182
182
|
|
|
183
|
-
[dir=
|
|
183
|
+
[dir='rtl'] & {
|
|
184
184
|
padding: 0 var(--ring-input-padding-inline) 0 0;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
|
|
191
191
|
color: var(--ring-secondary-color);
|
|
192
192
|
|
|
193
|
-
[dir=
|
|
193
|
+
[dir='rtl'] & {
|
|
194
194
|
padding: 0 0 0 var(--ring-input-padding-inline);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
border-color: var(--ring-border-hover-color);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
[dir=
|
|
226
|
+
[dir='rtl'] & {
|
|
227
227
|
border-right: 1px solid var(--ring-borders-color);
|
|
228
228
|
border-left: 0;
|
|
229
229
|
border-radius: var(--ring-border-radius);
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
|
|
238
238
|
padding-right: 0;
|
|
239
239
|
|
|
240
|
-
[dir=
|
|
240
|
+
[dir='rtl'] & {
|
|
241
241
|
padding-right: var(--ring-input-padding-inline);
|
|
242
242
|
padding-left: 0;
|
|
243
243
|
}
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
.withoutGlass {
|
|
251
251
|
padding-left: 0;
|
|
252
252
|
|
|
253
|
-
[dir=
|
|
253
|
+
[dir='rtl'] & {
|
|
254
254
|
padding-right: calc(var(--ring-input-padding-block) * 3);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
.loaderOnTheRight {
|
|
263
263
|
padding-right: 0;
|
|
264
264
|
|
|
265
|
-
[dir=
|
|
265
|
+
[dir='rtl'] & {
|
|
266
266
|
padding-left: 0;
|
|
267
267
|
}
|
|
268
268
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Component, ComponentRef, ReactNode, SyntheticEvent } from 'react';
|
|
1
|
+
import { Component, type ComponentRef, type ReactNode, type SyntheticEvent } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import Caret, { Position } from '../caret/caret';
|
|
3
|
+
import Caret, { type Position } from '../caret/caret';
|
|
4
4
|
import PopupMenu from '../popup-menu/popup-menu';
|
|
5
5
|
import Button from '../button/button';
|
|
6
6
|
import Icon from '../icon/icon';
|
|
7
7
|
import { Size } from '../input/input';
|
|
8
|
-
import { ShortcutsMap } from '../shortcuts/core';
|
|
9
|
-
import { QueryAssistSuggestion, SuggestionItem } from './query-
|
|
8
|
+
import { type ShortcutsMap } from '../shortcuts/core';
|
|
9
|
+
import { type QueryAssistSuggestion, type SuggestionItem } from './query-assist-suggestions';
|
|
10
10
|
declare function noop(): void;
|
|
11
11
|
export interface QueryAssistTranslations {
|
|
12
12
|
searchTitle: string;
|