@jetbrains/ring-ui-built 7.0.62 → 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/_helpers/card.js +4 -3
- package/components/_helpers/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +4 -4
- package/components/_helpers/input.js +8 -8
- package/components/_helpers/{select__filter.js → select-filter.js} +1 -1
- package/components/_helpers/services-link.js +3 -3
- package/components/_helpers/theme.js +2 -2
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +9 -8
- package/components/alert/container.d.ts +1 -1
- package/components/alert/container.js +2 -2
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +4 -4
- 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} +18 -22
- package/components/auth/auth.d.ts +2 -2
- package/components/auth/auth.js +8 -8
- package/components/auth/background-flow.d.ts +2 -2
- package/components/auth/background-flow.js +1 -3
- package/components/auth/down-notification.js +6 -6
- package/components/auth/iframe-flow.d.ts +3 -3
- package/components/auth/iframe-flow.js +9 -11
- 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 +9 -11
- package/components/auth/token-validator.d.ts +2 -1
- package/components/auth/token-validator.js +12 -3
- package/components/auth/window-flow.d.ts +3 -3
- package/components/auth/window-flow.js +5 -7
- package/components/auth-dialog/auth-dialog.js +9 -9
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +5 -5
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.figma.js +1 -2
- package/components/avatar/avatar.js +16 -17
- package/components/avatar/fallback-avatar.js +17 -18
- package/components/avatar-stack/avatar-stack.d.ts +3 -3
- package/components/avatar-stack/avatar-stack.figma.js +1 -2
- package/components/avatar-stack/avatar-stack.js +12 -12
- package/components/banner/banner.js +4 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.figma.js +1 -2
- package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
- package/components/button/button.classes.js +2 -0
- package/components/button/button.d.ts +4 -4
- package/components/button/button.figma.js +1 -2
- package/components/button/button.js +9 -9
- 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.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/caret/caret.js +24 -17
- package/components/checkbox/checkbox-group.figma.js +1 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.figma.js +1 -2
- package/components/checkbox/checkbox.js +8 -8
- package/components/clipboard/clipboard.js +8 -8
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +3 -3
- package/components/collapse/collapse-content.d.ts +3 -3
- package/components/collapse/collapse-control.d.ts +2 -2
- package/components/collapse/collapse.d.ts +3 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +8 -8
- package/components/confirm-service/confirm-service.d.ts +3 -3
- package/components/confirm-service/confirm-service.js +5 -5
- 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.d.ts +1 -1
- package/components/control-label/control-label.d.ts +1 -1
- package/components/data-list/data-list.d.ts +5 -5
- package/components/data-list/data-list.js +8 -8
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +24 -24
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +9 -9
- 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/data-list/title.js +3 -3
- 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 +7 -7
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-picker/date-picker.js +27 -22
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -8
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +4 -4
- 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} +1 -1
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +15 -15
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +4 -4
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +6 -6
- package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/components/dropdown-menu/dropdown-menu.js +11 -11
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +8 -7
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.figma.js +1 -2
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +3 -3
- package/components/footer/footer.d.ts +1 -1
- package/components/footer/footer.js +2 -2
- package/components/global/compose-refs.d.ts +2 -0
- package/components/global/compose-refs.js +19 -0
- package/components/global/composeRefs.d.ts +6 -2
- package/components/global/composeRefs.js +6 -16
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +2 -3
- 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/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/url.js +3 -3
- package/components/global/use-event-callback.js +1 -1
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +1 -1
- 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.d.ts +1 -1
- package/components/group/group.js +1 -1
- package/components/header/header-icon.d.ts +2 -2
- package/components/header/header-icon.js +4 -4
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +17 -17
- package/components/header/links.d.ts +1 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +2 -2
- package/components/header/profile.d.ts +5 -5
- package/components/header/profile.js +14 -14
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +7 -7
- package/components/header/smart-profile.d.ts +3 -3
- package/components/header/smart-profile.js +25 -25
- package/components/header/smart-services.d.ts +3 -3
- package/components/header/smart-services.js +4 -4
- package/components/header/tray.d.ts +1 -1
- 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__svg.js → icon-svg.js} +1 -1
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +3 -3
- package/components/icon/index.js +2 -2
- package/components/input/input.d.ts +3 -3
- package/components/input/input.figma.js +1 -2
- package/components/input/input.js +5 -5
- 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.d.ts +1 -1
- package/components/link/clickable-link.d.ts +12 -0
- package/components/link/clickable-link.js +51 -0
- package/components/link/clickableLink.d.ts +11 -12
- package/components/link/clickableLink.js +5 -50
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +3 -3
- 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} +10 -9
- 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} +3 -3
- 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} +11 -11
- package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
- package/components/list/list.d.ts +7 -7
- package/components/list/list.js +36 -35
- package/components/loader/{loader__core.js → loader-core.js} +3 -2
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +9 -9
- package/components/login-dialog/service.d.ts +1 -1
- package/components/login-dialog/service.js +6 -6
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.d.ts +4 -4
- package/components/message/message.js +7 -7
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/pager/pager.d.ts +2 -2
- package/components/pager/pager.js +28 -27
- 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 -4
- package/components/permissions/permissions.d.ts +2 -2
- package/components/permissions/permissions.js +2 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +4 -4
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position-css.js +2 -4
- package/components/popup/position.js +10 -9
- package/components/popup-menu/popup-menu.d.ts +4 -4
- package/components/popup-menu/popup-menu.js +10 -10
- 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__suggestions.js → query-assist-suggestions.js} +11 -11
- package/components/query-assist/query-assist.d.ts +4 -4
- package/components/query-assist/query-assist.js +30 -30
- package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
- package/components/radio/{radio__item.js → radio-item.js} +3 -3
- 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} +12 -12
- package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
- package/components/select/{select__popup.js → select-popup.js} +21 -19
- package/components/select/select.d.ts +6 -6
- package/components/select/select.js +44 -42
- package/components/shortcuts/core.js +4 -4
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/slider/slider.d.ts +5 -5
- package/components/slider/slider.js +7 -6
- package/components/slider/slider.utils.d.ts +1 -1
- package/components/slider/slider.utils.js +2 -3
- package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
- package/components/storage/{storage__local.js → storage-local.js} +11 -11
- package/components/storage/storage.d.ts +1 -1
- package/components/storage/storage.js +5 -5
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/tab-trap/tab-trap.js +1 -1
- 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 +3 -3
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +7 -7
- 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-with-focus-sensor.js +5 -5
- package/components/table/row.d.ts +4 -4
- package/components/table/row.js +5 -5
- 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 -2
- package/components/table/selection.js +5 -6
- package/components/table/simple-table.d.ts +2 -2
- package/components/table/simple-table.js +6 -6
- package/components/table/smart-table.d.ts +2 -2
- package/components/table/smart-table.js +6 -6
- package/components/table/table.d.ts +7 -7
- package/components/table/table.js +11 -11
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +12 -12
- package/components/tabs/collapsible-tab.d.ts +2 -2
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +18 -18
- package/components/tabs/custom-item.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/dumb-tabs.js +14 -14
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +11 -11
- package/components/tabs/tab-link.d.ts +2 -2
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tabs.js +11 -11
- package/components/tag/tag.d.ts +2 -2
- package/components/tag/tag.js +7 -7
- package/components/tags-input/tags-input.d.ts +8 -8
- package/components/tags-input/tags-input.js +26 -20
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +5 -5
- package/components/text/text.d.ts +1 -1
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +2 -2
- package/components/tooltip/tooltip.d.ts +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/upload/upload.d.ts +3 -3
- package/components/upload/upload.js +7 -7
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/service.js +10 -11
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +10 -10
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -4
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +4 -4
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/tooltip.js +4 -4
- package/components/user-card/user-card.js +4 -4
- package/package.json +1 -1
- package/components/button/button__classes.js +0 -2
- /package/components/_helpers/{button__classes.js → button.classes.js} +0 -0
- /package/components/_helpers/{icon__svg.js → icon-svg.js} +0 -0
- /package/components/_helpers/{query-assist__suggestions.js → query-assist-suggestions.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__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
|
@@ -36,23 +36,23 @@ import '../button/button.js';
|
|
|
36
36
|
import '@jetbrains/icons/chevron-down';
|
|
37
37
|
import '@jetbrains/icons/chevron-12px-down';
|
|
38
38
|
import '../icon/icon.js';
|
|
39
|
-
import '../icon/
|
|
40
|
-
import '../_helpers/
|
|
39
|
+
import '../icon/icon.constants.js';
|
|
40
|
+
import '../_helpers/icon-svg.js';
|
|
41
41
|
import 'core-js/modules/es.string.replace.js';
|
|
42
42
|
import '../global/memoize.js';
|
|
43
|
-
import '../link/
|
|
44
|
-
import '../_helpers/
|
|
43
|
+
import '../link/clickable-link.js';
|
|
44
|
+
import '../_helpers/button.classes.js';
|
|
45
45
|
import '../popup/popup.target.js';
|
|
46
46
|
import '../popup/popup.js';
|
|
47
47
|
import '../popup/position.js';
|
|
48
48
|
import 'core-js/modules/es.array.sort.js';
|
|
49
49
|
import '../popup/popup.consts.js';
|
|
50
50
|
import '../popup/position-css.js';
|
|
51
|
-
import '../_helpers/
|
|
51
|
+
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
52
52
|
import 'scrollbar-width';
|
|
53
53
|
import '../loader-screen/loader-screen.js';
|
|
54
54
|
import '../loader/loader.js';
|
|
55
|
-
import '../loader/
|
|
55
|
+
import '../loader/loader-core.js';
|
|
56
56
|
import './background-flow.js';
|
|
57
57
|
import '../global/url.js';
|
|
58
58
|
import '../_helpers/link.js';
|
|
@@ -79,9 +79,7 @@ class IFrameFlow {
|
|
|
79
79
|
* Initiates authorization in window
|
|
80
80
|
*/
|
|
81
81
|
async _load() {
|
|
82
|
-
const authRequest = await this._requestBuilder.prepareAuthRequest(
|
|
83
|
-
// eslint-disable-next-line camelcase
|
|
84
|
-
{
|
|
82
|
+
const authRequest = await this._requestBuilder.prepareAuthRequest({
|
|
85
83
|
request_credentials: 'required',
|
|
86
84
|
auth_mode: 'bypass_to_login'
|
|
87
85
|
}, {
|
|
@@ -89,7 +87,7 @@ class IFrameFlow {
|
|
|
89
87
|
});
|
|
90
88
|
const renderFallbackLink = () => jsx(Link, {
|
|
91
89
|
href: authRequest.url,
|
|
92
|
-
target:
|
|
90
|
+
target: '_self',
|
|
93
91
|
children: this._translations.nothingHappensLink
|
|
94
92
|
});
|
|
95
93
|
return new Promise((resolve, reject) => {
|
|
@@ -136,7 +134,7 @@ class IFrameFlow {
|
|
|
136
134
|
this._reset();
|
|
137
135
|
}
|
|
138
136
|
authorize() {
|
|
139
|
-
if (this._promise
|
|
137
|
+
if (this._promise && this._loginWindow && !this._loginWindow.closed) {
|
|
140
138
|
return this._promise;
|
|
141
139
|
}
|
|
142
140
|
this._promise = this._load();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import uuid from 'simply-uuid';
|
|
2
|
-
import
|
|
2
|
+
import type { AuthState } from './storage';
|
|
3
|
+
import type AuthStorage from './storage';
|
|
3
4
|
export interface AuthRequestBuilderConfig {
|
|
4
5
|
authorization: string;
|
|
5
6
|
redirectUri?: string | null | undefined;
|
|
@@ -33,9 +33,9 @@ class AuthRequestBuilder {
|
|
|
33
33
|
* @return {Promise.<string>} promise that is resolved to authURL
|
|
34
34
|
*/
|
|
35
35
|
async prepareAuthRequest(extraParams, extraState) {
|
|
36
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
36
37
|
const stateId = AuthRequestBuilder._uuid();
|
|
37
38
|
const scopes = this.config.scopes.map(scope => encodeURIComponent(scope));
|
|
38
|
-
/* eslint-disable camelcase */
|
|
39
39
|
const request = Object.assign({
|
|
40
40
|
response_type: 'token',
|
|
41
41
|
state: stateId,
|
|
@@ -44,7 +44,6 @@ class AuthRequestBuilder {
|
|
|
44
44
|
client_id: this.config.clientId,
|
|
45
45
|
scope: scopes.join(' ')
|
|
46
46
|
}, extraParams || {});
|
|
47
|
-
/* eslint-enable camelcase */
|
|
48
47
|
const authURL = encodeURL(this.config.authorization, request);
|
|
49
48
|
const state = Object.assign({
|
|
50
49
|
restoreLocation: window.location.href,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StorageClass, StorageInterface } from '../storage/storage';
|
|
2
|
-
import { AuthUser } from './
|
|
3
|
-
import { AuthResponse } from './response-parser';
|
|
1
|
+
import { type StorageClass, type StorageInterface } from '../storage/storage';
|
|
2
|
+
import { type AuthUser } from './auth-core';
|
|
3
|
+
import { type AuthResponse } from './response-parser';
|
|
4
4
|
export interface StoredToken {
|
|
5
5
|
accessToken: string;
|
|
6
6
|
scopes?: string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'core-js/modules/es.array.sort.js';
|
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
|
-
import LocalStorage from '../storage/
|
|
4
|
+
import LocalStorage from '../storage/storage-local.js';
|
|
5
5
|
import '../alert-service/alert-service.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import 'react-dom/client';
|
|
@@ -15,8 +15,8 @@ import '@jetbrains/icons/warning';
|
|
|
15
15
|
import '@jetbrains/icons/close';
|
|
16
16
|
import '../icon/icon.js';
|
|
17
17
|
import 'util-deprecate';
|
|
18
|
-
import '../icon/
|
|
19
|
-
import '../_helpers/
|
|
18
|
+
import '../icon/icon.constants.js';
|
|
19
|
+
import '../_helpers/icon-svg.js';
|
|
20
20
|
import 'core-js/modules/es.regexp.exec.js';
|
|
21
21
|
import 'core-js/modules/es.string.replace.js';
|
|
22
22
|
import '../global/memoize.js';
|
|
@@ -26,10 +26,10 @@ import '../global/dom.js';
|
|
|
26
26
|
import '../button/button.js';
|
|
27
27
|
import '@jetbrains/icons/chevron-down';
|
|
28
28
|
import '@jetbrains/icons/chevron-12px-down';
|
|
29
|
-
import '../link/
|
|
29
|
+
import '../link/clickable-link.js';
|
|
30
30
|
import '../global/controls-height.js';
|
|
31
31
|
import '../global/configuration.js';
|
|
32
|
-
import '../_helpers/
|
|
32
|
+
import '../_helpers/button.classes.js';
|
|
33
33
|
import '../_helpers/theme.js';
|
|
34
34
|
import 'react-dom';
|
|
35
35
|
import '../popup/popup.target.js';
|
|
@@ -146,9 +146,8 @@ class AuthStorage {
|
|
|
146
146
|
if (!dontCleanAndRetryOnFail) {
|
|
147
147
|
await this.cleanStates();
|
|
148
148
|
return this.saveState(id, state, true);
|
|
149
|
-
} else {
|
|
150
|
-
throw e;
|
|
151
149
|
}
|
|
150
|
+
throw e;
|
|
152
151
|
}
|
|
153
152
|
return undefined;
|
|
154
153
|
}
|
|
@@ -160,7 +159,7 @@ class AuthStorage {
|
|
|
160
159
|
async cleanStates(removeStateId) {
|
|
161
160
|
const now = Date.now();
|
|
162
161
|
const removalResult = await this._stateStorage.each((key, value) => {
|
|
163
|
-
if (value
|
|
162
|
+
if (value === null || value === undefined) {
|
|
164
163
|
return undefined;
|
|
165
164
|
}
|
|
166
165
|
// Remove requested state
|
|
@@ -184,7 +183,7 @@ class AuthStorage {
|
|
|
184
183
|
}
|
|
185
184
|
return undefined;
|
|
186
185
|
});
|
|
187
|
-
const currentStates = removalResult.filter(state => state
|
|
186
|
+
const currentStates = removalResult.filter(state => state !== null && state !== undefined);
|
|
188
187
|
let stateStorageSize = currentStates.reduce((overallSize, state) => state.size + overallSize, 0);
|
|
189
188
|
if (stateStorageSize > this.stateQuota) {
|
|
190
189
|
currentStates.sort((a, b) => a.created - b.created);
|
|
@@ -248,9 +247,8 @@ class AuthStorage {
|
|
|
248
247
|
if (user && user.id) {
|
|
249
248
|
setTimeout(loadAndCache, UPDATE_USER_TIMEOUT);
|
|
250
249
|
return user;
|
|
251
|
-
} else {
|
|
252
|
-
return loadAndCache();
|
|
253
250
|
}
|
|
251
|
+
return loadAndCache();
|
|
254
252
|
}
|
|
255
253
|
/**
|
|
256
254
|
* Remove cached user if any
|
|
@@ -43,14 +43,22 @@ class TokenValidator {
|
|
|
43
43
|
* @mockReturnValue {Promise.<string>}
|
|
44
44
|
*/
|
|
45
45
|
validateTokenLocally() {
|
|
46
|
-
return this._getValidatedToken([
|
|
46
|
+
return this._getValidatedToken([
|
|
47
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
48
|
+
TokenValidator._validateExistence,
|
|
49
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
50
|
+
TokenValidator._validateExpiration, this._validateScopes.bind(this)]);
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* Check token validity against all conditions.
|
|
50
54
|
* @mockReturnValue {Promise.<string>}
|
|
51
55
|
*/
|
|
52
56
|
validateToken() {
|
|
53
|
-
return this._getValidatedToken([
|
|
57
|
+
return this._getValidatedToken([
|
|
58
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
59
|
+
TokenValidator._validateExistence,
|
|
60
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
61
|
+
TokenValidator._validateExpiration, this._validateScopes.bind(this), this._validateAgainstUser.bind(this)]);
|
|
54
62
|
}
|
|
55
63
|
/**
|
|
56
64
|
* Check if there is a token
|
|
@@ -76,6 +84,7 @@ class TokenValidator {
|
|
|
76
84
|
} = _ref;
|
|
77
85
|
const REFRESH_BEFORE_RATIO = 6;
|
|
78
86
|
const refreshBefore = lifeTime ? Math.ceil(lifeTime / REFRESH_BEFORE_RATIO) : TokenValidator.DEFAULT_REFRESH_BEFORE;
|
|
87
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
79
88
|
if (expires && expires < TokenValidator._epoch() + refreshBefore) {
|
|
80
89
|
throw new TokenValidator.TokenValidationError('Token expired');
|
|
81
90
|
}
|
|
@@ -149,7 +158,7 @@ class TokenValidator {
|
|
|
149
158
|
*/
|
|
150
159
|
async _getValidatedToken(validators) {
|
|
151
160
|
const storedToken = await this._storage.getToken();
|
|
152
|
-
if (storedToken
|
|
161
|
+
if (storedToken === null || storedToken === undefined) {
|
|
153
162
|
throw new TokenValidator.TokenValidationError('Token not found');
|
|
154
163
|
}
|
|
155
164
|
for (let i = 0; i < validators.length; i++) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LoginFlow } from './
|
|
2
|
-
import AuthRequestBuilder from './request-builder';
|
|
3
|
-
import AuthStorage from './storage';
|
|
1
|
+
import { type LoginFlow } from './auth-core';
|
|
2
|
+
import type AuthRequestBuilder from './request-builder';
|
|
3
|
+
import type AuthStorage from './storage';
|
|
4
4
|
export default class WindowFlow implements LoginFlow {
|
|
5
5
|
private _timeoutId;
|
|
6
6
|
private _requestBuilder;
|
|
@@ -48,9 +48,7 @@ class WindowFlow {
|
|
|
48
48
|
* Initiates authorization in window
|
|
49
49
|
*/
|
|
50
50
|
async _load() {
|
|
51
|
-
const authRequest = await this._requestBuilder.prepareAuthRequest(
|
|
52
|
-
// eslint-disable-next-line camelcase
|
|
53
|
-
{
|
|
51
|
+
const authRequest = await this._requestBuilder.prepareAuthRequest({
|
|
54
52
|
request_credentials: 'required',
|
|
55
53
|
auth_mode: 'bypass_to_login'
|
|
56
54
|
}, {
|
|
@@ -84,16 +82,16 @@ class WindowFlow {
|
|
|
84
82
|
reject(new AuthResponseParser.AuthError(state));
|
|
85
83
|
}
|
|
86
84
|
});
|
|
87
|
-
if (this._loginWindow
|
|
85
|
+
if (this._loginWindow === null || this._loginWindow === undefined || this._loginWindow && this._loginWindow.closed) {
|
|
88
86
|
this._loginWindow = this._openWindow(authRequest.url);
|
|
89
|
-
} else {
|
|
87
|
+
} else if (this._loginWindow) {
|
|
90
88
|
this._loginWindow.location.href = authRequest.url;
|
|
91
89
|
}
|
|
92
90
|
this.checkIsClosed();
|
|
93
91
|
});
|
|
94
92
|
}
|
|
95
93
|
stop() {
|
|
96
|
-
if (this._loginWindow
|
|
94
|
+
if (this._loginWindow !== null && this._loginWindow !== undefined) {
|
|
97
95
|
this._loginWindow.close();
|
|
98
96
|
}
|
|
99
97
|
if (this.reject) {
|
|
@@ -102,7 +100,7 @@ class WindowFlow {
|
|
|
102
100
|
this._reset();
|
|
103
101
|
}
|
|
104
102
|
authorize() {
|
|
105
|
-
if (this._promise
|
|
103
|
+
if (this._promise && this._loginWindow && !this._loginWindow.closed) {
|
|
106
104
|
this._loginWindow.focus();
|
|
107
105
|
return this._promise;
|
|
108
106
|
}
|
|
@@ -34,18 +34,18 @@ import '../popup/position.js';
|
|
|
34
34
|
import 'core-js/modules/es.array.sort.js';
|
|
35
35
|
import '../popup/popup.consts.js';
|
|
36
36
|
import '../popup/position-css.js';
|
|
37
|
-
import '../_helpers/
|
|
37
|
+
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
38
38
|
import 'scrollbar-width';
|
|
39
39
|
import '@jetbrains/icons/chevron-down';
|
|
40
40
|
import '@jetbrains/icons/chevron-12px-down';
|
|
41
41
|
import 'util-deprecate';
|
|
42
42
|
import '../icon/icon.js';
|
|
43
|
-
import '../icon/
|
|
44
|
-
import '../_helpers/
|
|
43
|
+
import '../icon/icon.constants.js';
|
|
44
|
+
import '../_helpers/icon-svg.js';
|
|
45
45
|
import '../global/memoize.js';
|
|
46
|
-
import '../link/
|
|
46
|
+
import '../link/clickable-link.js';
|
|
47
47
|
import '../global/controls-height.js';
|
|
48
|
-
import '../_helpers/
|
|
48
|
+
import '../_helpers/button.classes.js';
|
|
49
49
|
import '../_helpers/heading.js';
|
|
50
50
|
|
|
51
51
|
var styles = {"dialog":"ring-auth-dialog-dialog","content":"ring-auth-dialog-content ring-global-font","button":"ring-auth-dialog-button","firstButton":"ring-auth-dialog-firstButton ring-auth-dialog-button","title":"ring-auth-dialog-title","logo":"ring-auth-dialog-logo","error":"ring-auth-dialog-error"};
|
|
@@ -108,7 +108,7 @@ class AuthDialog extends Component {
|
|
|
108
108
|
const title = (this.props.title || defaultTitle).replace('%serviceName%', serviceName !== null && serviceName !== void 0 ? serviceName : '').replace('{{serviceName}}', serviceName !== null && serviceName !== void 0 ? serviceName : '');
|
|
109
109
|
return jsx(Dialog, {
|
|
110
110
|
label: title,
|
|
111
|
-
"data-test":
|
|
111
|
+
"data-test": 'ring-auth-dialog',
|
|
112
112
|
className: className,
|
|
113
113
|
contentClassName: classNames(className, styles.dialog),
|
|
114
114
|
onEscPress: this.onEscPress,
|
|
@@ -130,19 +130,19 @@ class AuthDialog extends Component {
|
|
|
130
130
|
}), jsx(Button, {
|
|
131
131
|
primary: true,
|
|
132
132
|
className: styles.firstButton,
|
|
133
|
-
"data-test":
|
|
133
|
+
"data-test": 'auth-dialog-confirm-button',
|
|
134
134
|
onClick: onConfirm,
|
|
135
135
|
children: confirmLabel
|
|
136
136
|
}), onTryAgain && jsx(Button, {
|
|
137
137
|
className: styles.button,
|
|
138
|
-
"data-test":
|
|
138
|
+
"data-test": 'auth-dialog-retry-button',
|
|
139
139
|
onClick: () => this.onRetryPress(),
|
|
140
140
|
loader: retrying,
|
|
141
141
|
disabled: retrying,
|
|
142
142
|
children: tryAgainLabel
|
|
143
143
|
}), jsx(Button, {
|
|
144
144
|
className: styles.button,
|
|
145
|
-
"data-test":
|
|
145
|
+
"data-test": 'auth-dialog-cancel-button',
|
|
146
146
|
onClick: onCancel,
|
|
147
147
|
children: cancelLabel
|
|
148
148
|
})]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AuthDialog, { AuthDialogProps } from '../auth-dialog/auth-dialog';
|
|
1
|
+
import AuthDialog, { type AuthDialogProps } from '../auth-dialog/auth-dialog';
|
|
2
2
|
export declare const reactRoot: import("react-dom/client").Root;
|
|
3
3
|
type AuthDialogAttributes = React.JSX.LibraryManagedAttributes<typeof AuthDialog, AuthDialogProps>;
|
|
4
4
|
export default function showAuthDialog(props?: AuthDialogAttributes): () => void;
|
|
@@ -34,18 +34,18 @@ import '../button/button.js';
|
|
|
34
34
|
import '@jetbrains/icons/chevron-down';
|
|
35
35
|
import '@jetbrains/icons/chevron-12px-down';
|
|
36
36
|
import '../icon/icon.js';
|
|
37
|
-
import '../icon/
|
|
38
|
-
import '../_helpers/
|
|
37
|
+
import '../icon/icon.constants.js';
|
|
38
|
+
import '../_helpers/icon-svg.js';
|
|
39
39
|
import '../global/memoize.js';
|
|
40
|
-
import '../link/
|
|
41
|
-
import '../_helpers/
|
|
40
|
+
import '../link/clickable-link.js';
|
|
41
|
+
import '../_helpers/button.classes.js';
|
|
42
42
|
import '../popup/popup.target.js';
|
|
43
43
|
import '../popup/popup.js';
|
|
44
44
|
import '../popup/position.js';
|
|
45
45
|
import 'core-js/modules/es.array.sort.js';
|
|
46
46
|
import '../popup/popup.consts.js';
|
|
47
47
|
import '../popup/position-css.js';
|
|
48
|
-
import '../_helpers/
|
|
48
|
+
import '../_helpers/dialog-body-scroll-preventer.js';
|
|
49
49
|
import 'scrollbar-width';
|
|
50
50
|
import '../heading/heading.js';
|
|
51
51
|
import '../_helpers/heading.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, ImgHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { PureComponent, type ImgHTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import { Size } from './avatar-size';
|
|
3
3
|
export { Size };
|
|
4
4
|
export interface AvatarProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import figma from '@figma/code-connect';
|
|
2
3
|
|
|
3
4
|
var _templateObject;
|
|
4
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-522
|
|
5
|
-
const figma = require('figma');
|
|
6
5
|
const instance = figma.selectedInstance;
|
|
7
6
|
const round = instance.getBoolean('Round');
|
|
8
7
|
const size = parseInt(instance.getString('Size'), 10);
|
|
@@ -67,16 +67,16 @@ class Avatar extends PureComponent {
|
|
|
67
67
|
});
|
|
68
68
|
if (!url || this.state.errorUrl === url) {
|
|
69
69
|
return jsxs("span", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
70
|
-
"data-test":
|
|
70
|
+
"data-test": 'avatar',
|
|
71
71
|
className: classNames(classes, {
|
|
72
|
-
[styles.empty]: username
|
|
72
|
+
[styles.empty]: (username === null || username === undefined) && (info === null || info === undefined)
|
|
73
73
|
}),
|
|
74
74
|
style: styleObj,
|
|
75
|
-
children: [username
|
|
75
|
+
children: [username && jsx(FallbackAvatar, {
|
|
76
76
|
size: size,
|
|
77
77
|
round: round,
|
|
78
78
|
username: username
|
|
79
|
-
}), info
|
|
79
|
+
}), info && jsx(AvatarInfo, {
|
|
80
80
|
size: size,
|
|
81
81
|
children: info
|
|
82
82
|
})]
|
|
@@ -106,28 +106,27 @@ class Avatar extends PureComponent {
|
|
|
106
106
|
className: classNames(classes, styles.avatarShadow),
|
|
107
107
|
style: styleObj,
|
|
108
108
|
src: src,
|
|
109
|
-
alt:
|
|
109
|
+
alt: 'User avatar'
|
|
110
110
|
})), jsx("img", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
111
|
-
"data-test":
|
|
111
|
+
"data-test": 'avatar',
|
|
112
112
|
onError: this.handleError,
|
|
113
113
|
onLoad: this.handleSuccess,
|
|
114
114
|
className: classNames(styles.subavatar),
|
|
115
115
|
style: styleObjGroup,
|
|
116
116
|
src: subavatarSrc,
|
|
117
|
-
alt:
|
|
117
|
+
alt: 'Subavatar'
|
|
118
118
|
}))]
|
|
119
119
|
});
|
|
120
|
-
} else {
|
|
121
|
-
return jsx("img", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
122
|
-
"data-test": "avatar",
|
|
123
|
-
onError: this.handleError,
|
|
124
|
-
onLoad: this.handleSuccess,
|
|
125
|
-
className: classNames(classes, styles.avatarShadow),
|
|
126
|
-
style: styleObj,
|
|
127
|
-
src: src,
|
|
128
|
-
alt: "User avatar"
|
|
129
|
-
}));
|
|
130
120
|
}
|
|
121
|
+
return jsx("img", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
122
|
+
"data-test": 'avatar',
|
|
123
|
+
onError: this.handleError,
|
|
124
|
+
onLoad: this.handleSuccess,
|
|
125
|
+
className: classNames(classes, styles.avatarShadow),
|
|
126
|
+
style: styleObj,
|
|
127
|
+
src: src,
|
|
128
|
+
alt: 'User avatar'
|
|
129
|
+
}));
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
_defineProperty(Avatar, "defaultProps", {
|
|
@@ -228,15 +228,14 @@ function extractLetters(name) {
|
|
|
228
228
|
const names = name.split(/[\s._]+/).filter(Boolean).map(word => Array.from(word));
|
|
229
229
|
if (names.length >= 2) {
|
|
230
230
|
return names[0][0].toUpperCase() + names[1][0].toUpperCase();
|
|
231
|
-
}
|
|
231
|
+
}
|
|
232
|
+
if (names.length === 1) {
|
|
232
233
|
if (names[0].length >= 2) {
|
|
233
234
|
return names[0].slice(0, 2).join('').toUpperCase();
|
|
234
|
-
} else {
|
|
235
|
-
return "".concat(names[0][0].toUpperCase(), "X");
|
|
236
235
|
}
|
|
237
|
-
|
|
238
|
-
return 'XX';
|
|
236
|
+
return "".concat(names[0][0].toUpperCase(), "X");
|
|
239
237
|
}
|
|
238
|
+
return 'XX';
|
|
240
239
|
}
|
|
241
240
|
// https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0#gistcomment-2775538
|
|
242
241
|
const BASE = 32;
|
|
@@ -261,27 +260,27 @@ function FallbackAvatar(_ref) {
|
|
|
261
260
|
const gradientId = useMemo(() => getUID('gradient-'), []);
|
|
262
261
|
return jsxs("svg", {
|
|
263
262
|
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
264
|
-
xmlns:
|
|
263
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
265
264
|
children: [jsx("defs", {
|
|
266
265
|
children: jsxs("linearGradient", {
|
|
267
266
|
id: gradientId,
|
|
268
|
-
x1:
|
|
269
|
-
y1:
|
|
270
|
-
x2:
|
|
271
|
-
y2:
|
|
267
|
+
x1: '1',
|
|
268
|
+
y1: '1',
|
|
269
|
+
x2: '0',
|
|
270
|
+
y2: '0',
|
|
272
271
|
children: [jsx("stop", {
|
|
273
272
|
stopColor: fromColor,
|
|
274
|
-
offset:
|
|
273
|
+
offset: '0'
|
|
275
274
|
}), jsx("stop", {
|
|
276
275
|
stopColor: toColor,
|
|
277
|
-
offset:
|
|
276
|
+
offset: '0.8'
|
|
278
277
|
})]
|
|
279
278
|
})
|
|
280
279
|
}), jsxs("g", {
|
|
281
280
|
children: [jsx("rect", {
|
|
282
281
|
fill: "url(#".concat(gradientId, ")"),
|
|
283
|
-
x:
|
|
284
|
-
y:
|
|
282
|
+
x: '0',
|
|
283
|
+
y: '0',
|
|
285
284
|
width: size,
|
|
286
285
|
height: size,
|
|
287
286
|
rx: radius,
|
|
@@ -291,17 +290,17 @@ function FallbackAvatar(_ref) {
|
|
|
291
290
|
y: sizes.text.y,
|
|
292
291
|
fontFamily: "var(--ring-font-family, 'Arial, Helvetica, sans-serif')",
|
|
293
292
|
fontSize: sizes.fontSize,
|
|
294
|
-
fontWeight:
|
|
293
|
+
fontWeight: '600',
|
|
295
294
|
letterSpacing: sizes.letterSpacing,
|
|
296
|
-
fill:
|
|
295
|
+
fill: '#FFFFFF',
|
|
297
296
|
dominantBaseline: sizes.dominantBaseline,
|
|
298
297
|
textAnchor: sizes.textAnchor,
|
|
299
|
-
cursor:
|
|
298
|
+
cursor: 'default',
|
|
300
299
|
children: jsx("tspan", {
|
|
301
300
|
children: extractLetters(username)
|
|
302
301
|
})
|
|
303
302
|
}), underscore && jsx("rect", {
|
|
304
|
-
fill:
|
|
303
|
+
fill: '#FFFFFF',
|
|
305
304
|
x: underscore.x,
|
|
306
305
|
y: underscore.y,
|
|
307
306
|
width: underscore.width,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { ListDataItem } from '../list/consts';
|
|
3
|
-
import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu';
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type ListDataItem } from '../list/consts';
|
|
3
|
+
import { type DropdownMenuProps } from '../dropdown-menu/dropdown-menu';
|
|
4
4
|
import { Size } from '../avatar/avatar';
|
|
5
5
|
declare module 'csstype' {
|
|
6
6
|
interface Properties {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'core-js/modules/es.regexp.exec.js';
|
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
|
+
import figma from '@figma/code-connect';
|
|
4
5
|
|
|
5
6
|
var _sizeString$match, _templateObject;
|
|
6
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-752
|
|
7
|
-
const figma = require('figma');
|
|
8
7
|
const instance = figma.selectedInstance;
|
|
9
8
|
const sizeString = instance.getString('Size');
|
|
10
9
|
const [sizeSubstring] = (_sizeString$match = sizeString.match(/\d+/)) !== null && _sizeString$match !== void 0 ? _sizeString$match : [];
|
|
@@ -28,29 +28,29 @@ import 'combokeys';
|
|
|
28
28
|
import '../global/sniffer.js';
|
|
29
29
|
import 'sniffr';
|
|
30
30
|
import '../global/create-stateful-context.js';
|
|
31
|
-
import '../list/
|
|
31
|
+
import '../list/list-item.js';
|
|
32
32
|
import '../checkbox/checkbox.js';
|
|
33
33
|
import '@jetbrains/icons/checkmark-12px';
|
|
34
34
|
import '@jetbrains/icons/remove-12px';
|
|
35
35
|
import '../icon/icon.js';
|
|
36
|
-
import '../icon/
|
|
37
|
-
import '../_helpers/
|
|
36
|
+
import '../icon/icon.constants.js';
|
|
37
|
+
import '../_helpers/icon-svg.js';
|
|
38
38
|
import 'core-js/modules/es.string.replace.js';
|
|
39
|
-
import '../global/
|
|
39
|
+
import '../global/compose-refs.js';
|
|
40
40
|
import '../control-help/control-help.js';
|
|
41
41
|
import '../link/link.js';
|
|
42
|
-
import '../link/
|
|
42
|
+
import '../link/clickable-link.js';
|
|
43
43
|
import '../_helpers/link.js';
|
|
44
44
|
import '../_helpers/list.js';
|
|
45
45
|
import '../list/consts.js';
|
|
46
|
-
import '../list/
|
|
46
|
+
import '../list/list.classes.js';
|
|
47
47
|
import '../global/url.js';
|
|
48
48
|
import '../avatar/fallback-avatar.js';
|
|
49
|
-
import '../list/
|
|
49
|
+
import '../list/list-custom.js';
|
|
50
50
|
import '../global/get-event-key.js';
|
|
51
|
-
import '../list/
|
|
52
|
-
import '../list/
|
|
53
|
-
import '../list/
|
|
51
|
+
import '../list/list-title.js';
|
|
52
|
+
import '../list/list-separator.js';
|
|
53
|
+
import '../list/list-hint.js';
|
|
54
54
|
import '../dropdown/dropdown.js';
|
|
55
55
|
import '../global/typescript-utils.js';
|
|
56
56
|
import '../_helpers/anchor.js';
|
|
@@ -59,7 +59,7 @@ import '@jetbrains/icons/chevron-down';
|
|
|
59
59
|
import '@jetbrains/icons/chevron-12px-down';
|
|
60
60
|
import '../global/controls-height.js';
|
|
61
61
|
import '../global/configuration.js';
|
|
62
|
-
import '../_helpers/
|
|
62
|
+
import '../_helpers/button.classes.js';
|
|
63
63
|
import '../popup-menu/popup-menu.js';
|
|
64
64
|
import '../popup/popup.js';
|
|
65
65
|
import 'react-dom';
|
|
@@ -110,7 +110,7 @@ function AvatarStack(_ref) {
|
|
|
110
110
|
fontSize: fontSizes[size]
|
|
111
111
|
},
|
|
112
112
|
anchor: jsx("button", {
|
|
113
|
-
type:
|
|
113
|
+
type: 'button',
|
|
114
114
|
className: styles.extraButton,
|
|
115
115
|
children: jsx(Avatar, {
|
|
116
116
|
size: size,
|
|
@@ -12,14 +12,14 @@ import Link from '../link/link.js';
|
|
|
12
12
|
import Tooltip from '../tooltip/tooltip.js';
|
|
13
13
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
14
14
|
import 'util-deprecate';
|
|
15
|
-
import '../icon/
|
|
16
|
-
import '../_helpers/
|
|
15
|
+
import '../icon/icon.constants.js';
|
|
16
|
+
import '../_helpers/icon-svg.js';
|
|
17
17
|
import 'core-js/modules/es.regexp.exec.js';
|
|
18
18
|
import 'core-js/modules/es.string.replace.js';
|
|
19
19
|
import '../global/memoize.js';
|
|
20
20
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
21
21
|
import '../global/data-tests.js';
|
|
22
|
-
import '../link/
|
|
22
|
+
import '../link/clickable-link.js';
|
|
23
23
|
import '../_helpers/link.js';
|
|
24
24
|
import '../popup/popup.js';
|
|
25
25
|
import 'react-dom';
|
|
@@ -95,7 +95,7 @@ function Banner(props) {
|
|
|
95
95
|
className: styles.closeButton,
|
|
96
96
|
pseudo: true,
|
|
97
97
|
onClick: onClose,
|
|
98
|
-
"aria-label":
|
|
98
|
+
"aria-label": 'Close',
|
|
99
99
|
children: jsx(Icon, {
|
|
100
100
|
glyph: closeIcon
|
|
101
101
|
})
|