@jetbrains/ring-ui 4.1.0-beta.4 → 4.1.2
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/CHANGELOG.md +13 -0
- package/README.md +17 -15
- package/babel.config.js +3 -2
- package/components/alert/alert.js +9 -3
- package/components/alert/alert.test.js +21 -48
- package/components/alert/container.css +1 -1
- package/components/alert/container.test.js +3 -13
- package/components/alert-service/alert-service.examples.css +18 -0
- package/components/alert-service/alert-service.examples.js +21 -0
- package/components/alert-service/alert-service.js +10 -3
- package/components/analytics/analytics__fus-plugin.js +3 -3
- package/components/analytics/analytics__ga-plugin.js +2 -2
- package/components/auth/auth.test.js +14 -7
- package/components/auth/auth__core.js +64 -33
- package/components/auth-dialog/auth-dialog.css +2 -3
- package/components/auth-dialog/auth-dialog.js +4 -1
- package/components/auth-dialog/auth-dialog.test.js +3 -19
- package/components/avatar/avatar.css +4 -1
- package/components/avatar/avatar.examples.js +3 -2
- package/components/avatar/avatar.js +34 -6
- package/components/avatar/avatar.test.js +20 -17
- package/components/avatar/fallback-avatar.js +136 -0
- package/components/avatar-editor-ng/avatar-editor-ng.css +2 -2
- package/components/avatar-editor-ng/avatar-editor-ng.js +2 -1
- package/components/avatar-editor-ng/{avatar-editor-ng.html → avatar-editor-ng__template.js} +2 -2
- package/components/badge/badge.test.js +13 -20
- package/components/button/button.css +2 -2
- package/components/button/button.js +4 -1
- package/components/button/button.test.js +32 -33
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-ng/button-ng.js +1 -1
- package/components/button-set-ng/button-set-ng.js +3 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/code/code.js +2 -5
- package/components/confirm/confirm.js +1 -0
- package/components/confirm-service/confirm-service.js +5 -5
- package/components/content-layout/content-layout.css +1 -1
- package/components/data-list/data-list.css +1 -1
- package/components/date-picker/date-input.js +5 -4
- package/components/date-picker/date-picker.css +34 -22
- package/components/date-picker/date-picker.js +16 -14
- package/components/date-picker/date-popup.js +22 -7
- package/components/date-picker/month-names.js +8 -5
- package/components/date-picker/month.js +6 -2
- package/components/date-picker/weekdays.js +10 -2
- package/components/dialog/dialog.examples.js +3 -1
- package/components/dialog/dialog.js +10 -5
- package/components/dialog/dialog.test.js +1 -1
- package/components/dialog/dialog__body-scroll-preventer.js +51 -31
- package/components/dialog-ng/dialog-ng.js +10 -10
- package/components/dialog-ng/{dialog-ng.html → dialog-ng__template.js} +2 -2
- package/components/dropdown/dropdown.examples.js +36 -1
- package/components/dropdown/dropdown.test.js +2 -2
- package/components/dropdown-menu/dropdown-menu.examples.js +47 -0
- package/components/dropdown-menu/dropdown-menu.js +117 -0
- package/components/dropdown-menu/dropdown-menu.test.js +76 -0
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/error-bubble/error-bubble.examples.js +1 -1
- package/components/error-page/error-page.css +2 -2
- package/components/footer-ng/footer-ng.js +13 -3
- package/components/form/form.css +2 -2
- package/components/form-ng/form-ng.js +3 -1
- package/components/global/global.css +1 -1
- package/components/global/theme.js +1 -1
- package/components/global/variables.css +8 -1
- package/components/grid/grid.css +10 -9
- package/components/header/header.css +1 -1
- package/components/header/header.examples.js +7 -8
- package/components/header/profile.js +10 -11
- package/components/http/http.js +1 -1
- package/components/icon/icon.css +5 -4
- package/components/input/input-legacy.css +7 -7
- package/components/island/header.js +2 -2
- package/components/island/island.css +8 -3
- package/components/island-legacy/island-legacy.css +3 -1
- package/components/list/list.js +6 -1
- package/components/list/list__custom.js +9 -3
- package/components/list/list__item.js +8 -2
- package/components/list/list__link.js +2 -1
- package/components/loader-inline/loader-inline.css +1 -1
- package/components/loader-screen/loader-screen.css +1 -1
- package/components/message/message.css +1 -1
- package/components/message/message.examples.js +8 -7
- package/components/pager/pager.js +5 -3
- package/components/permissions/permissions.js +1 -1
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.test.js +15 -13
- package/components/progress-bar/progress-bar.css +1 -1
- package/components/progress-bar/progress-bar.examples.js +3 -3
- package/components/progress-bar/progress-bar.js +5 -2
- package/components/progress-bar/progress-bar.test.js +12 -13
- package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -3
- package/components/query-assist/query-assist.css +13 -3
- package/components/query-assist/query-assist.examples.js +3 -4
- package/components/query-assist/query-assist.js +56 -12
- package/components/query-assist/query-assist.test.js +37 -5
- package/components/save-field-ng/save-field-ng.css +0 -3
- package/components/save-field-ng/save-field-ng.js +3 -1
- package/components/save-field-ng/{save-field-ng.html → save-field-ng__template.js} +2 -2
- package/components/select/select.css +12 -7
- package/components/select/select.examples.js +13 -0
- package/components/select/select.js +30 -43
- package/components/select/select.test.js +4 -5
- package/components/select/select__popup.js +1 -0
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.js +1 -1
- package/components/shortcuts-hint-ng/{shortcuts-hint-ng.html → shortcuts-hint-ng__template.js} +2 -2
- package/components/sidebar/sidebar.css +1 -0
- package/components/sidebar-ng/sidebar-ng.js +6 -2
- package/components/sidebar-ng/{sidebar-ng__button.html → sidebar-ng__button-template.js} +2 -2
- package/components/sidebar-ng/{sidebar-ng.html → sidebar-ng__template.js} +2 -2
- package/components/table/header.js +9 -1
- package/components/table/row.js +2 -1
- package/components/table/table.css +2 -1
- package/components/table-legacy/table-legacy.css +2 -2
- package/components/table-legacy/table-legacy__toolbar.css +2 -2
- package/components/table-legacy-ng/table-legacy-ng.js +38 -5
- package/components/table-legacy-ng/table-legacy-ng__pager.js +7 -1
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.js +5 -9
- package/components/tabs/tab-link.js +4 -2
- package/components/tabs/tabs.css +32 -5
- package/components/tabs-ng/tabs-ng.js +4 -2
- package/components/tabs-ng/{tabs-ng.html → tabs-ng__template.js} +6 -2
- package/components/tag/tag.css +5 -2
- package/components/tag/tag.examples.js +3 -0
- package/components/tag/tag.js +19 -16
- package/components/tags-input/tag-input.examples.js +1 -1
- package/components/tags-input/tags-input.js +5 -2
- package/components/template-ng/template-ng.js +1 -1
- package/components/tooltip/tooltip.js +7 -2
- package/components/user-agreement/user-agreement.css +1 -5
- package/components/user-agreement/user-agreement.examples.js +7 -6
- package/components/user-agreement/user-agreement.js +11 -3
- package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -90
- package/dist/_helpers/anchor.js +6 -7
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +3 -0
- package/dist/_helpers/button-set.js +3 -0
- package/dist/_helpers/button-toolbar.js +3 -0
- package/dist/_helpers/button__classes.js +16 -15
- package/dist/_helpers/card.js +6 -8
- package/dist/_helpers/checkbox.js +3 -0
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +49 -32
- package/dist/_helpers/error-message.js +3 -0
- package/dist/_helpers/footer.js +121 -0
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +3 -0
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +3 -0
- package/dist/_helpers/inject-styles.js +1 -1
- package/dist/_helpers/input.js +3 -0
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +3 -0
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-screen.js +3 -0
- package/dist/_helpers/panel.js +3 -0
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +3 -0
- package/dist/_helpers/select__filter.js +8 -10
- package/dist/_helpers/services-link.js +6 -8
- package/dist/_helpers/sidebar.js +17 -17
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/title.js +3 -3
- package/dist/alert/alert.js +20 -9
- package/dist/alert/container.js +7 -9
- package/dist/alert-service/alert-service.js +26 -13
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/analytics__custom-plugin.js +1 -1
- package/dist/analytics/analytics__fus-plugin.js +13 -11
- package/dist/analytics/analytics__ga-plugin.js +3 -3
- package/dist/analytics/analytics__plugin-utils.js +1 -1
- package/dist/analytics-ng/analytics-ng.js +94 -0
- package/dist/auth/auth.js +7 -4
- package/dist/auth/auth__core.js +106 -63
- package/dist/auth/background-flow.js +1 -2
- package/dist/auth/down-notification.js +19 -12
- package/dist/auth/iframe-flow.js +5 -2
- package/dist/auth/landing-entry.js +1 -1
- package/dist/auth/landing.js +5 -2
- package/dist/auth/request-builder.js +1 -1
- package/dist/auth/response-parser.js +3 -2
- package/dist/auth/storage.js +5 -3
- package/dist/auth/token-validator.js +6 -5
- package/dist/auth/window-flow.js +1 -1
- package/dist/auth-dialog/auth-dialog.js +9 -6
- package/dist/auth-dialog-service/auth-dialog-service.js +9 -6
- package/dist/auth-ng/auth-ng.js +203 -0
- package/dist/auth-ng/auth-ng.mock.js +33 -0
- package/dist/autofocus-ng/autofocus-ng.js +50 -0
- package/dist/avatar/avatar.js +41 -32
- package/dist/avatar/fallback-avatar.js +141 -0
- package/dist/avatar-editor-ng/avatar-editor-ng.js +164 -0
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +30 -0
- package/dist/avatar-ng/avatar-ng.js +18 -0
- package/dist/badge/badge.js +6 -8
- package/dist/badge-ng/badge-ng.js +16 -0
- package/dist/breadcrumb-ng/breadcrumb-ng.js +61 -0
- package/dist/button/button.js +16 -10
- package/dist/button-group/button-group.js +4 -4
- package/dist/button-group/caption.js +24 -5
- package/dist/button-group-ng/button-group-ng.js +38 -0
- package/dist/button-ng/button-ng.js +223 -0
- package/dist/button-set/button-set.js +3 -4
- package/dist/button-set-ng/button-set-ng.js +19 -0
- package/dist/button-toolbar/button-toolbar.js +3 -4
- package/dist/button-toolbar-ng/button-toolbar-ng.js +23 -0
- package/dist/caret/caret.js +4 -2
- package/dist/checkbox/checkbox.js +11 -13
- package/dist/checkbox-ng/checkbox-ng.js +55 -0
- package/dist/code/code.js +136 -0
- package/dist/compiler-ng/compiler-ng.js +53 -0
- package/dist/confirm/confirm.js +8 -5
- package/dist/confirm-ng/confirm-ng.js +66 -0
- package/dist/confirm-service/confirm-service.js +21 -18
- package/dist/content-layout/content-layout.js +8 -10
- package/dist/contenteditable/contenteditable.js +14 -17
- package/dist/data-list/data-list.js +12 -9
- package/dist/data-list/data-list.mock.js +2 -2
- package/dist/data-list/item.js +7 -5
- package/dist/data-list/selection.js +7 -3
- package/dist/data-list/title.js +3 -1
- package/dist/data-list-ng/data-list-ng.js +59 -0
- package/dist/date-picker/consts.js +1 -2
- package/dist/date-picker/date-input.js +17 -12
- package/dist/date-picker/date-picker.js +41 -32
- package/dist/date-picker/date-popup.js +51 -28
- package/dist/date-picker/day.js +4 -4
- package/dist/date-picker/formats.js +1 -1
- package/dist/date-picker/month-names.js +18 -11
- package/dist/date-picker/month-slider.js +4 -4
- package/dist/date-picker/month.js +13 -7
- package/dist/date-picker/months.js +3 -3
- package/dist/date-picker/weekdays.js +12 -4
- package/dist/date-picker/years.js +4 -4
- package/dist/dialog/dialog.js +21 -16
- package/dist/dialog/dialog__body-scroll-preventer.js +1 -1
- package/dist/dialog-ng/dialog-ng.js +601 -0
- package/dist/dialog-ng/dialog-ng__template.js +71 -0
- package/dist/docked-panel-ng/docked-panel-ng.js +170 -0
- package/dist/dropdown/anchor.js +2 -1
- package/dist/dropdown/dropdown.js +22 -18
- package/dist/dropdown-menu/dropdown-menu.js +175 -0
- package/dist/error-bubble/error-bubble.js +7 -9
- package/dist/error-message/error-message.js +4 -4
- package/dist/error-message-ng/error-message-ng.js +53 -0
- package/dist/footer/footer.js +6 -119
- package/dist/footer-ng/footer-ng.js +75 -0
- package/dist/form-ng/form-ng.js +169 -0
- package/dist/global/angular-component-factory.js +6 -4
- package/dist/global/compose.js +8 -2
- package/dist/global/composeRefs.js +13 -7
- package/dist/global/conic-gradient.js +13 -12
- package/dist/global/create-stateful-context.js +12 -9
- package/dist/global/data-tests.js +10 -3
- package/dist/global/dom.js +12 -5
- package/dist/global/focus-sensor-hoc.js +20 -19
- package/dist/global/fuzzy-highlight.js +10 -6
- package/dist/global/get-event-key.js +1 -1
- package/dist/global/get-uid.js +1 -1
- package/dist/global/inject-styles.js +4 -1
- package/dist/global/linear-function.js +1 -2
- package/dist/global/listeners.js +1 -1
- package/dist/global/memoize.js +3 -2
- package/dist/global/normalize-indent.js +1 -1
- package/dist/global/promise-with-timeout.js +5 -4
- package/dist/global/radial-gradient-mask.js +6 -3
- package/dist/global/react-dom-renderer.js +3 -3
- package/dist/global/rerender-hoc.js +14 -12
- package/dist/global/ring-angular-component.js +6 -2
- package/dist/global/schedule-raf.js +1 -1
- package/dist/global/sniffer.js +1 -1
- package/dist/global/supports-css.js +1 -1
- package/dist/global/theme.js +27 -26
- package/dist/global/trivial-template-tag.js +6 -2
- package/dist/global/url.js +3 -1
- package/dist/global/variables_dark.js +1 -1
- package/dist/grid/col.js +6 -8
- package/dist/grid/grid.js +5 -7
- package/dist/grid/row.js +6 -8
- package/dist/group/group.js +7 -10
- package/dist/group-ng/group-ng.js +11 -0
- package/dist/header/header.js +29 -26
- package/dist/header/logo.js +8 -9
- package/dist/header/profile.js +54 -46
- package/dist/header/services-link.js +1 -0
- package/dist/header/services.js +23 -19
- package/dist/header/smart-profile.js +29 -26
- package/dist/header/smart-services.js +12 -11
- package/dist/header/tray-icon.js +12 -12
- package/dist/header/tray.js +6 -8
- package/dist/heading/heading.js +10 -13
- package/dist/http/http.js +53 -44
- package/dist/http/http.mock.js +4 -4
- package/dist/hub-source/hub-source.js +1 -1
- package/dist/hub-source/hub-source__user.js +4 -2
- package/dist/hub-source/hub-source__users-groups.js +5 -3
- package/dist/icon/icon.js +8 -8
- package/dist/icon/icon__svg.js +81 -6
- package/dist/icon/index.js +2 -1
- package/dist/icon-ng/icon-ng.js +89 -0
- package/dist/input/input.js +11 -14
- package/dist/input-ng/input-ng.js +166 -0
- package/dist/island/adaptive-island-hoc.js +10 -9
- package/dist/island/content.js +8 -10
- package/dist/island/header.js +7 -9
- package/dist/island/island.js +6 -9
- package/dist/island-legacy/content-legacy.js +6 -8
- package/dist/island-legacy/header-legacy.js +6 -8
- package/dist/island-legacy/island-legacy.js +6 -8
- package/dist/island-ng/island-content-ng.js +56 -0
- package/dist/island-ng/island-header-ng.js +32 -0
- package/dist/island-ng/island-ng-class-fixer.js +9 -0
- package/dist/island-ng/island-ng.js +31 -0
- package/dist/link/clickableLink.js +8 -10
- package/dist/link/link.js +12 -15
- package/dist/link-ng/link-ng.js +25 -0
- package/dist/list/list.js +100 -76
- package/dist/list/list__custom.js +15 -12
- package/dist/list/list__hint.js +1 -1
- package/dist/list/list__item.js +22 -15
- package/dist/list/list__link.js +11 -12
- package/dist/list/list__separator.js +1 -1
- package/dist/list/list__title.js +1 -1
- package/dist/list/list__users-groups-source.js +13 -8
- package/dist/loader/loader.js +8 -10
- package/dist/loader/loader__core.js +9 -8
- package/dist/loader-inline/inject-styles.js +1 -1
- package/dist/loader-inline/loader-inline.js +6 -8
- package/dist/loader-inline-ng/loader-inline-ng.js +42 -0
- package/dist/loader-ng/loader-ng.js +43 -0
- package/dist/loader-screen/loader-screen.js +7 -10
- package/dist/loader-screen-ng/loader-screen-ng.js +99 -0
- package/dist/login-dialog/login-dialog.js +7 -5
- package/dist/login-dialog/service.js +9 -6
- package/dist/markdown/code.js +30 -0
- package/dist/markdown/heading.js +23 -0
- package/dist/markdown/link.js +30 -0
- package/dist/markdown/markdown.js +73 -0
- package/dist/message/message.js +7 -6
- package/dist/message-bundle-ng/message-bundle-ng.js +111 -0
- package/dist/old-browsers-message/old-browsers-message.js +0 -1
- package/dist/old-browsers-message/old-browsers-message__stop.js +0 -1
- package/dist/old-browsers-message/white-list.js +4 -5
- package/dist/pager/pager.js +20 -11
- package/dist/pager-ng/pager-ng.js +96 -0
- package/dist/panel/panel.js +7 -10
- package/dist/panel-ng/panel-ng.js +16 -0
- package/dist/permissions/permissions.js +4 -2
- package/dist/permissions/permissions__cache.js +1 -1
- package/dist/permissions-ng/permissions-ng.js +274 -0
- package/dist/place-under-ng/place-under-ng.js +157 -0
- package/dist/popup/popup.js +11 -11
- package/dist/popup/popup.target.js +4 -5
- package/dist/popup/position.js +18 -16
- package/dist/popup-menu/popup-menu.js +23 -16
- package/dist/progress-bar/progress-bar.js +14 -12
- package/dist/progress-bar-ng/progress-bar-ng.js +15 -0
- package/dist/promised-click-ng/promised-click-ng.js +126 -0
- package/dist/proxy-attrs/proxy-attrs.js +1 -1
- package/dist/query-assist/query-assist.js +156 -76
- package/dist/query-assist/query-assist__suggestions.js +5 -1
- package/dist/query-assist-ng/query-assist-ng.js +82 -0
- package/dist/radio/radio.js +9 -7
- package/dist/radio/radio__item.js +13 -18
- package/dist/radio-ng/radio-ng.js +63 -0
- package/dist/save-field-ng/save-field-ng.js +335 -0
- package/dist/save-field-ng/save-field-ng__template.js +34 -0
- package/dist/select/select.js +118 -95
- package/dist/select/select__filter.js +6 -1
- package/dist/select/select__popup.js +12 -6
- package/dist/select-ng/select-ng.js +621 -0
- package/dist/select-ng/select-ng__lazy.js +150 -0
- package/dist/select-ng/select-ng__options.js +145 -0
- package/dist/shortcuts/core.js +7 -4
- package/dist/shortcuts/shortcuts-hoc.js +8 -10
- package/dist/shortcuts/shortcuts.js +6 -6
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +120 -0
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +50 -0
- package/dist/shortcuts-ng/shortcuts-ng.js +261 -0
- package/dist/sidebar-ng/sidebar-ng.js +111 -0
- package/dist/sidebar-ng/sidebar-ng__button-template.js +20 -0
- package/dist/sidebar-ng/sidebar-ng__template.js +12 -0
- package/dist/storage/storage.js +3 -2
- package/dist/storage/storage__fallback.js +3 -2
- package/dist/storage/storage__local.js +5 -3
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +15 -13
- package/dist/table/cell.js +2 -2
- package/dist/table/disable-hover-hoc.js +4 -4
- package/dist/table/header-cell.js +10 -11
- package/dist/table/header.js +19 -12
- package/dist/table/multitable.js +33 -25
- package/dist/table/row-with-focus-sensor.js +7 -5
- package/dist/table/row.js +17 -15
- package/dist/table/selection-adapter.js +1 -1
- package/dist/table/selection-shortcuts-hoc.js +10 -8
- package/dist/table/selection.js +25 -17
- package/dist/table/smart-table.js +16 -10
- package/dist/table/table.js +38 -33
- package/dist/table-legacy-ng/table-legacy-ng.js +501 -0
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +122 -0
- package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +123 -0
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +179 -0
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +56 -0
- package/dist/table-ng/smart-table-ng.js +65 -0
- package/dist/table-ng/table-ng.js +64 -0
- package/dist/tabs/collapsible-more.js +37 -30
- package/dist/tabs/collapsible-tab.js +16 -14
- package/dist/tabs/collapsible-tabs.js +83 -80
- package/dist/tabs/custom-item.js +6 -3
- package/dist/tabs/dumb-tabs.js +19 -14
- package/dist/tabs/smart-tabs.js +13 -11
- package/dist/tabs/tab-link.js +13 -7
- package/dist/tabs/tab.js +1 -1
- package/dist/tabs/tabs.js +5 -1
- package/dist/tabs-ng/tabs-ng.js +193 -0
- package/dist/tabs-ng/tabs-ng__template.js +40 -0
- package/dist/tag/tag.js +22 -16
- package/dist/tags-input/tags-input.js +48 -36
- package/dist/tags-input-ng/tags-input-ng.js +89 -0
- package/dist/tags-list/tags-list.js +8 -9
- package/dist/template-ng/template-ng.js +70 -0
- package/dist/text/text.js +7 -9
- package/dist/theme-ng/theme-ng.js +44 -0
- package/dist/title-ng/title-ng.js +114 -0
- package/dist/toggle/toggle.js +8 -11
- package/dist/toggle-ng/toggle-ng.js +16 -0
- package/dist/tooltip/tooltip.js +16 -14
- package/dist/tooltip-ng/tooltip-ng.js +98 -0
- package/dist/user-agreement/service.js +409 -0
- package/dist/user-agreement/toolbox.eula.js +162 -0
- package/dist/user-agreement/user-agreement.js +167 -0
- package/dist/user-card/card.js +3 -0
- package/dist/user-card/smart-user-card-tooltip.js +16 -16
- package/dist/user-card/tooltip.js +9 -7
- package/dist/user-card/user-card.js +5 -2
- package/dist/user-card-ng/user-card-ng.js +59 -0
- package/package.json +83 -81
- package/webpack.config.js +14 -10
- package/components/button-set-ng/button-set-ng.html +0 -1
- package/components/footer-ng/footer-ng.html +0 -13
- package/components/form-ng/form-ng__error-bubble.html +0 -3
- package/components/table-legacy-ng/table-legacy-ng.html +0 -4
- package/components/table-legacy-ng/table-legacy-ng__column.html +0 -12
- package/components/table-legacy-ng/table-legacy-ng__header.html +0 -4
- package/components/table-legacy-ng/table-legacy-ng__pager.html +0 -7
- package/components/table-legacy-ng/table-legacy-ng__row.html +0 -12
- package/components/table-legacy-ng/table-legacy-ng__title.html +0 -9
- package/dist/_helpers/caption.js +0 -25
- package/dist/_helpers/icon__svg.js +0 -83
|
@@ -12,14 +12,12 @@ import List, {ActiveItemContext} from '../list/list';
|
|
|
12
12
|
import Input, {Size} from '../input/input';
|
|
13
13
|
import Shortcuts from '../shortcuts/shortcuts';
|
|
14
14
|
import Button from '../button/button';
|
|
15
|
-
import buttonStyles from '../button/button.css';
|
|
16
15
|
import dataTests from '../global/data-tests';
|
|
17
16
|
import getUID from '../global/get-uid';
|
|
18
17
|
import rerenderHOC from '../global/rerender-hoc';
|
|
19
18
|
import fuzzyHighlight from '../global/fuzzy-highlight';
|
|
20
|
-
import Theme
|
|
19
|
+
import Theme from '../global/theme';
|
|
21
20
|
import memoize from '../global/memoize';
|
|
22
|
-
import getEventKey from '../global/get-event-key';
|
|
23
21
|
|
|
24
22
|
import SelectPopup from './select__popup';
|
|
25
23
|
import styles from './select.css';
|
|
@@ -222,6 +220,7 @@ export default class Select extends Component {
|
|
|
222
220
|
|
|
223
221
|
static propTypes = {
|
|
224
222
|
className: PropTypes.string,
|
|
223
|
+
buttonClassName: PropTypes.string,
|
|
225
224
|
id: PropTypes.string,
|
|
226
225
|
multiple: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
227
226
|
allowAny: PropTypes.bool,
|
|
@@ -523,10 +522,6 @@ export default class Select extends Component {
|
|
|
523
522
|
return getSelectedIndex(selected, data, this.props.multiple);
|
|
524
523
|
}
|
|
525
524
|
|
|
526
|
-
popupRef = el => {
|
|
527
|
-
this._popup = el;
|
|
528
|
-
};
|
|
529
|
-
|
|
530
525
|
_getResetOption() {
|
|
531
526
|
const isOptionsSelected = this.state.selected && this.state.selected.length;
|
|
532
527
|
const hasTagsResetProp = this.props.tags && this.props.tags.reset;
|
|
@@ -743,13 +738,6 @@ export default class Select extends Component {
|
|
|
743
738
|
}
|
|
744
739
|
};
|
|
745
740
|
|
|
746
|
-
_selectButtonKeyboardHack = event => {
|
|
747
|
-
const key = getEventKey(event);
|
|
748
|
-
if (key === 'Enter' || key === ' ') {
|
|
749
|
-
this._clickHandler();
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
|
|
753
741
|
_filterChangeHandler = e => {
|
|
754
742
|
this._setFilter(e.target.value, e);
|
|
755
743
|
};
|
|
@@ -1004,6 +992,7 @@ export default class Select extends Component {
|
|
|
1004
992
|
type="button"
|
|
1005
993
|
className={styles.selectedIcon}
|
|
1006
994
|
key="selected"
|
|
995
|
+
disabled={this.props.disabled}
|
|
1007
996
|
onClick={this._clickHandler}
|
|
1008
997
|
style={{backgroundImage: `url(${selected.icon})`}}
|
|
1009
998
|
/>
|
|
@@ -1017,6 +1006,7 @@ export default class Select extends Component {
|
|
|
1017
1006
|
data-test="ring-clear-select"
|
|
1018
1007
|
className={styles.clearIcon}
|
|
1019
1008
|
key="close"
|
|
1009
|
+
disabled={this.props.disabled}
|
|
1020
1010
|
onClick={this.clear}
|
|
1021
1011
|
icon={closeIcon}
|
|
1022
1012
|
/>
|
|
@@ -1031,6 +1021,7 @@ export default class Select extends Component {
|
|
|
1031
1021
|
iconClassName={styles.chevronIcon}
|
|
1032
1022
|
icon={chevronDownIcon}
|
|
1033
1023
|
key="hide"
|
|
1024
|
+
disabled={this.props.disabled}
|
|
1034
1025
|
onClick={this._clickHandler}
|
|
1035
1026
|
/>
|
|
1036
1027
|
);
|
|
@@ -1040,10 +1031,12 @@ export default class Select extends Component {
|
|
|
1040
1031
|
}
|
|
1041
1032
|
|
|
1042
1033
|
_getAvatar() {
|
|
1043
|
-
return this.state.selected &&
|
|
1034
|
+
return this.state.selected &&
|
|
1035
|
+
(this.state.selected.avatar || this.state.selected.showGeneratedAvatar) && (
|
|
1044
1036
|
<Avatar
|
|
1045
1037
|
className={styles.avatar}
|
|
1046
1038
|
url={this.state.selected.avatar}
|
|
1039
|
+
username={this.state.selected.username}
|
|
1047
1040
|
size={AvatarSize.Size20}
|
|
1048
1041
|
/>
|
|
1049
1042
|
);
|
|
@@ -1152,33 +1145,27 @@ export default class Select extends Component {
|
|
|
1152
1145
|
scope={this.shortcutsScope}
|
|
1153
1146
|
/>
|
|
1154
1147
|
)}
|
|
1155
|
-
<
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
{this._getAvatar()}
|
|
1177
|
-
{this._selectionIsEmpty() ? this._getLabel() : this._getSelectedString()}
|
|
1178
|
-
{iconsNode}
|
|
1179
|
-
</div>
|
|
1180
|
-
)}
|
|
1181
|
-
</ThemeContext.Consumer>
|
|
1148
|
+
<div className={styles.buttonContainer}>
|
|
1149
|
+
<Button
|
|
1150
|
+
{...ariaProps}
|
|
1151
|
+
id={this.props.id}
|
|
1152
|
+
onClick={this._clickHandler}
|
|
1153
|
+
className={classNames(
|
|
1154
|
+
this.props.buttonClassName,
|
|
1155
|
+
styles.buttonValue,
|
|
1156
|
+
{
|
|
1157
|
+
[styles.buttonValueOpen]: this.state.showPopup
|
|
1158
|
+
})
|
|
1159
|
+
}
|
|
1160
|
+
disabled={this.props.disabled}
|
|
1161
|
+
style={style}
|
|
1162
|
+
data-test="ring-select__button ring-select__focus"
|
|
1163
|
+
>
|
|
1164
|
+
{this._getAvatar()}
|
|
1165
|
+
{this._selectionIsEmpty() ? this._getLabel() : this._getSelectedString()}
|
|
1166
|
+
</Button>
|
|
1167
|
+
{iconsNode}
|
|
1168
|
+
</div>
|
|
1182
1169
|
{this._renderPopup()}
|
|
1183
1170
|
</div>
|
|
1184
1171
|
);
|
|
@@ -1205,7 +1192,7 @@ export default class Select extends Component {
|
|
|
1205
1192
|
onClick={this._clickHandler}
|
|
1206
1193
|
type="button"
|
|
1207
1194
|
disabled={this.props.disabled}
|
|
1208
|
-
className={classNames(styles.value, {
|
|
1195
|
+
className={classNames(this.props.buttonClassName, styles.value, {
|
|
1209
1196
|
[styles.open]: this.state.showPopup,
|
|
1210
1197
|
[styles.label]: this._selectionIsEmpty()
|
|
1211
1198
|
})}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/* eslint-disable no-magic-numbers
|
|
1
|
+
/* eslint-disable no-magic-numbers*/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {findDOMNode} from 'react-dom';
|
|
4
3
|
import {Simulate} from 'react-dom/test-utils';
|
|
5
4
|
import {shallow, mount} from 'enzyme';
|
|
6
5
|
|
|
@@ -212,7 +211,7 @@ describe('Select', () => {
|
|
|
212
211
|
const instance = wrapper.instance();
|
|
213
212
|
instance._showPopup();
|
|
214
213
|
|
|
215
|
-
Simulate.mouseDown(
|
|
214
|
+
Simulate.mouseDown(instance._popup.list.container);
|
|
216
215
|
Simulate.blur(instance.filter);
|
|
217
216
|
sandbox.clock.tick();
|
|
218
217
|
instance._popup.props.hidden.should.be.false;
|
|
@@ -623,7 +622,7 @@ describe('Select', () => {
|
|
|
623
622
|
const instance = wrapper.instance();
|
|
624
623
|
instance._showPopup();
|
|
625
624
|
instance.filterValue('test');
|
|
626
|
-
|
|
625
|
+
instance._popup.filter.value.should.equal('test');
|
|
627
626
|
});
|
|
628
627
|
|
|
629
628
|
it('Should set target input value in input mode', () => {
|
|
@@ -642,7 +641,7 @@ describe('Select', () => {
|
|
|
642
641
|
instance._showPopup();
|
|
643
642
|
instance._hidePopup();
|
|
644
643
|
instance._showPopup();
|
|
645
|
-
|
|
644
|
+
instance._popup.filter.value.should.equal('');
|
|
646
645
|
});
|
|
647
646
|
});
|
|
648
647
|
|
|
@@ -10,7 +10,7 @@ import IconNg from '../icon-ng/icon-ng';
|
|
|
10
10
|
import InputNg from '../input-ng/input-ng';
|
|
11
11
|
import {getShortcutTitle} from '../shortcuts/shortcut-title';
|
|
12
12
|
|
|
13
|
-
import HintPopupTpl from './shortcuts-hint-
|
|
13
|
+
import HintPopupTpl from './shortcuts-hint-ng__template';
|
|
14
14
|
import './shortcuts-hint-ng.css';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -10,6 +10,10 @@ import ButtonNG from '../button-ng/button-ng';
|
|
|
10
10
|
|
|
11
11
|
import '../sidebar/sidebar.css';
|
|
12
12
|
|
|
13
|
+
import template from './sidebar-ng__template';
|
|
14
|
+
|
|
15
|
+
import buttonTemplate from './sidebar-ng__button-template';
|
|
16
|
+
|
|
13
17
|
/**
|
|
14
18
|
* @name Sidebar Ng
|
|
15
19
|
*/
|
|
@@ -66,7 +70,7 @@ function rgSidebarDirective() {
|
|
|
66
70
|
topOffset: '=?',
|
|
67
71
|
dialogIsActive: '=?'
|
|
68
72
|
},
|
|
69
|
-
template
|
|
73
|
+
template,
|
|
70
74
|
controllerAs: 'sidebar'
|
|
71
75
|
};
|
|
72
76
|
}
|
|
@@ -85,7 +89,7 @@ function rgSidebarToggleButtonDirective() {
|
|
|
85
89
|
model: '=',
|
|
86
90
|
dialogIsActive: '=?'
|
|
87
91
|
},
|
|
88
|
-
template:
|
|
92
|
+
template: buttonTemplate,
|
|
89
93
|
controllerAs: 'button'
|
|
90
94
|
};
|
|
91
95
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export default `<div
|
|
2
2
|
class="ring-sidebar"
|
|
3
3
|
rg-place-under="{{sidebar.placeUnderSibling}}"
|
|
4
4
|
place-top-offset="{{sidebar.topOffset}}"
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
>
|
|
8
8
|
<rg-dialog in-sidebar="true" active="sidebar.dialogIsActive"></rg-dialog>
|
|
9
9
|
<div class="ring-sidebar__content" ng-transclude ng-if="!sidebar.dialogIsActive"></div>
|
|
10
|
-
</div
|
|
10
|
+
</div>`;
|
|
@@ -10,7 +10,6 @@ import getUID from '../global/get-uid';
|
|
|
10
10
|
import style from './table.css';
|
|
11
11
|
import HeaderCell from './header-cell';
|
|
12
12
|
|
|
13
|
-
const waypointChild = <tr data-test="ring-table-header-row"/>;
|
|
14
13
|
|
|
15
14
|
export default class Header extends PureComponent {
|
|
16
15
|
static propTypes = {
|
|
@@ -123,6 +122,15 @@ export default class Header extends PureComponent {
|
|
|
123
122
|
|
|
124
123
|
const regularCells = this.createCells();
|
|
125
124
|
|
|
125
|
+
const waypointChild = (
|
|
126
|
+
<tr data-test="ring-table-header-row">
|
|
127
|
+
{/*Since we need to keep the exact amount of columns in each row, we need to present them even being empty*/}
|
|
128
|
+
{/*regularCells doesn't provide any other information than a list of components. Hence using array indexes as keys looks like a sane idea*/}
|
|
129
|
+
{/*eslint-disable-next-line react/no-array-index-key*/}
|
|
130
|
+
{regularCells.map((c, i) => <td key={i}/>)}
|
|
131
|
+
</tr>
|
|
132
|
+
);
|
|
133
|
+
|
|
126
134
|
return (
|
|
127
135
|
<thead id={this.id} data-test="ring-table-header" className={style.tableHead}>
|
|
128
136
|
{caption && (
|
package/components/table/row.js
CHANGED
|
@@ -214,10 +214,11 @@ export default class Row extends PureComponent {
|
|
|
214
214
|
const getDataTest = column.getDataTest || (() => column.id);
|
|
215
215
|
const value = getValue(item, column);
|
|
216
216
|
const cellClasses = classNames({[style.cellRight]: column.rightAlign}, column.className);
|
|
217
|
+
const showMetaColumn = draggable || selectable || showDisabledSelection || !!level;
|
|
217
218
|
|
|
218
219
|
return (
|
|
219
220
|
<Cell key={column.id} className={cellClasses} data-test={getDataTest(item, column)}>
|
|
220
|
-
{index === 0 && (
|
|
221
|
+
{index === 0 && (showMetaColumn) && metaColumn}
|
|
221
222
|
{value}
|
|
222
223
|
</Cell>
|
|
223
224
|
);
|
|
@@ -137,7 +137,8 @@
|
|
|
137
137
|
line-height: compensated;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
/* stylelint-disable-next-line selector-max-specificity */
|
|
141
|
+
.table:not(.disabledHover) .row:hover {
|
|
141
142
|
background-color: var(--ring-hover-background-color);
|
|
142
143
|
}
|
|
143
144
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
:global(.ring-table__title_border::after) {
|
|
78
|
-
content:
|
|
78
|
+
content: "";
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
:global(.ring-table__title_nested) {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
:global(.ring-table__column-list:not(:last-child)::after) {
|
|
242
|
-
content:
|
|
242
|
+
content: ", ";
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
:global(.ring-table__row) {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
background: inherit;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
&:global(.ring-table__toolbar-controls_fixed) {
|
|
21
21
|
position: fixed;
|
|
22
|
-
z-index: calc(var(--ring-fixed-z-index) +
|
|
22
|
+
z-index: calc(var(--ring-fixed-z-index) + 1);
|
|
23
23
|
top: 0;
|
|
24
24
|
right: 0;
|
|
25
25
|
left: 0;
|
|
@@ -26,7 +26,7 @@ angularModule.directive('rgLegacyTable', function rgLegacyTableDirective() {
|
|
|
26
26
|
return {
|
|
27
27
|
restrict: 'E',
|
|
28
28
|
transclude: true,
|
|
29
|
-
template:
|
|
29
|
+
template: '<div><table class="ring-table" ng-transclude></table></div>',
|
|
30
30
|
controllerAs: 'ctrl',
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -79,7 +79,10 @@ angularModule.directive('rgLegacyTableHeader',
|
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
81
|
restrict: 'E',
|
|
82
|
-
template:
|
|
82
|
+
template: `<thead>
|
|
83
|
+
<tr class="ring-table__header" ng-transclude></tr>
|
|
84
|
+
<tr class="ring-table__header ring-table__header_sticky" rg-place-under="{{stickToSelector}}" ng-transclude></tr>
|
|
85
|
+
</thead>`,
|
|
83
86
|
transclude: true,
|
|
84
87
|
replace: true,
|
|
85
88
|
link: function link(scope, iElement, iAttrs) {
|
|
@@ -156,7 +159,18 @@ angularModule.directive('rgLegacyTableBody', function rgLegacyTableBodyDirective
|
|
|
156
159
|
|
|
157
160
|
angularModule.directive('rgLegacyTableRow', function rgLegacyTableRowDirective() {
|
|
158
161
|
return {
|
|
159
|
-
template:
|
|
162
|
+
template: `<tr ng-click="rowCtrl.setActiveItem(rowCtrl.rowItem)"
|
|
163
|
+
ng-mouseover="rowCtrl.onMouseOver(rowCtrl.rowItem)"
|
|
164
|
+
ng-mouseout="rowCtrl.onMouseOut(rowCtrl.rowItem)"
|
|
165
|
+
class="ring-table__row" ng-class="{
|
|
166
|
+
'ring-table__row_active': rowCtrl.rowItem.active,
|
|
167
|
+
'ring-table__row_checked': rowCtrl.rowItem.checked,
|
|
168
|
+
'ring-table__row_active-checked': rowCtrl.rowItem.active && !rowCtrl.hasCheckedItems(),
|
|
169
|
+
'ring-table__row_implicit': rowCtrl.rowItem.implicit,
|
|
170
|
+
'ring-table__row_expanded': rowCtrl.rowItem.expanded,
|
|
171
|
+
'ring-table__row_unselectable': rowCtrl.rowItem.unselectable
|
|
172
|
+
}" ng-transclude>
|
|
173
|
+
</tr>`,
|
|
160
174
|
restrict: 'E',
|
|
161
175
|
transclude: true,
|
|
162
176
|
replace: true,
|
|
@@ -333,7 +347,15 @@ angularModule.directive('rgLegacyTableTitle', function rgLegacyTableTitleDirecti
|
|
|
333
347
|
transclude: true,
|
|
334
348
|
replace: true,
|
|
335
349
|
scope: true,
|
|
336
|
-
template:
|
|
350
|
+
template: `<th class="ring-table__title"
|
|
351
|
+
ng-class="{
|
|
352
|
+
'ring-table__title_border': isBorder,
|
|
353
|
+
'ring-table__title_active': isActive,
|
|
354
|
+
'ring-table__column_snuggle-right': isPullRight,
|
|
355
|
+
'ring-table__column_snuggle-left': isPullLeft,
|
|
356
|
+
'ring-table__column_align-right' : isAlignRight
|
|
357
|
+
}" ng-transclude>
|
|
358
|
+
</th>`,
|
|
337
359
|
|
|
338
360
|
link: function link(scope, iElement, iAttrs) {
|
|
339
361
|
/**
|
|
@@ -362,7 +384,18 @@ angularModule.directive('rgLegacyTableColumn', function rgLegacyTableColumnDirec
|
|
|
362
384
|
transclude: true,
|
|
363
385
|
replace: true,
|
|
364
386
|
scope: true,
|
|
365
|
-
template:
|
|
387
|
+
template: `<td class="ring-table__column"
|
|
388
|
+
ng-class="{
|
|
389
|
+
'ring-table__column_limited': isLimited,
|
|
390
|
+
'ring-table__column_unlimited': isUnlimited,
|
|
391
|
+
'ring-table__column_right': isAlignRight,
|
|
392
|
+
'ring-table__avatar': isAvatar,
|
|
393
|
+
'ring-table__column_wide': isWide,
|
|
394
|
+
'ring-table__column_gray': isGray,
|
|
395
|
+
'ring-table__column_snuggle-right': isPullRight,
|
|
396
|
+
'ring-table__column_snuggle-left': isPullLeft
|
|
397
|
+
}" ng-transclude>
|
|
398
|
+
</td>`,
|
|
366
399
|
|
|
367
400
|
link: function link(scope, iElement, iAttrs) {
|
|
368
401
|
const element = iElement[0];
|
|
@@ -7,7 +7,13 @@ const angularModule = angular.module('Ring.table-legacy.pager', [MessageBundle,
|
|
|
7
7
|
angularModule.directive('rgLegacyTablePager', function rgLegacyTablePagerDirective() {
|
|
8
8
|
return {
|
|
9
9
|
restrict: 'E',
|
|
10
|
-
template:
|
|
10
|
+
template: `<rg-pager
|
|
11
|
+
total="pagerCtrl.total"
|
|
12
|
+
current-page="pagerCtrl.getPage()"
|
|
13
|
+
page-size="pagerCtrl.top"
|
|
14
|
+
on-page-change="pagerCtrl.onPageChange"
|
|
15
|
+
disable-page-size-selector="true"
|
|
16
|
+
></rg-pager>`,
|
|
11
17
|
scope: {},
|
|
12
18
|
bindToController: {
|
|
13
19
|
skip: '=',
|
|
@@ -10,13 +10,13 @@ import {CustomItem} from './custom-item';
|
|
|
10
10
|
|
|
11
11
|
function noop() {}
|
|
12
12
|
|
|
13
|
-
const TabTitle = React.memo(({
|
|
13
|
+
const TabTitle = React.memo(function TabTitle({
|
|
14
14
|
selected,
|
|
15
15
|
child,
|
|
16
16
|
handleSelect = noop,
|
|
17
17
|
collapsed = false,
|
|
18
18
|
tabIndex
|
|
19
|
-
})
|
|
19
|
+
}) {
|
|
20
20
|
if (child == null || typeof child !== 'object' || child.type === CustomItem) {
|
|
21
21
|
return child;
|
|
22
22
|
}
|
|
@@ -199,7 +199,7 @@ export const CollapsibleTabs = ({
|
|
|
199
199
|
// Initial measure for tabs and more button sizes
|
|
200
200
|
React.useEffect(() => {
|
|
201
201
|
if (measureRef.current == null) {
|
|
202
|
-
return;
|
|
202
|
+
return undefined;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
const measureTask = fastdom.measure(() => {
|
|
@@ -220,10 +220,8 @@ export const CollapsibleTabs = ({
|
|
|
220
220
|
return width + +marginLeft.replace('px', '') + +marginRight.replace('px', '');
|
|
221
221
|
});
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
// eslint-disable-next-line no-param-reassign
|
|
226
|
-
const oldSummaryWidth = elements.sizes.tabs.reduce((acc, curr) => (acc += curr), 0);
|
|
223
|
+
const newSummaryWidth = tabsWidth.reduce((acc, curr) => (acc + curr), 0);
|
|
224
|
+
const oldSummaryWidth = elements.sizes.tabs.reduce((acc, curr) => (acc + curr), 0);
|
|
227
225
|
|
|
228
226
|
if (elements.sizes.more !== moreButtonWidth || newSummaryWidth !== oldSummaryWidth) {
|
|
229
227
|
fastdom.mutate(() =>
|
|
@@ -232,7 +230,6 @@ export const CollapsibleTabs = ({
|
|
|
232
230
|
}
|
|
233
231
|
});
|
|
234
232
|
|
|
235
|
-
// eslint-disable-next-line consistent-return
|
|
236
233
|
return () => {
|
|
237
234
|
fastdom.clear(measureTask);
|
|
238
235
|
};
|
|
@@ -244,7 +241,7 @@ export const CollapsibleTabs = ({
|
|
|
244
241
|
let resizeObserver = null;
|
|
245
242
|
|
|
246
243
|
if (measureRef.current === null) {
|
|
247
|
-
return;
|
|
244
|
+
return undefined;
|
|
248
245
|
}
|
|
249
246
|
|
|
250
247
|
resizeObserver = new ResizeObserver(entries => {
|
|
@@ -256,7 +253,6 @@ export const CollapsibleTabs = ({
|
|
|
256
253
|
|
|
257
254
|
resizeObserver.observe(measureRef.current);
|
|
258
255
|
|
|
259
|
-
// eslint-disable-next-line consistent-return
|
|
260
256
|
return () => {
|
|
261
257
|
fastdom.clear(measureTask);
|
|
262
258
|
resizeObserver.disconnect();
|
|
@@ -274,7 +270,7 @@ export const CollapsibleTabs = ({
|
|
|
274
270
|
|
|
275
271
|
return (
|
|
276
272
|
<div className={styles.autoCollapseContainer}>
|
|
277
|
-
<div className={className}>
|
|
273
|
+
<div className={classNames(className, styles.rendered)}>
|
|
278
274
|
{visibleElements}
|
|
279
275
|
<MoreButton
|
|
280
276
|
moreClassName={moreClassName}
|
|
@@ -13,11 +13,13 @@ function TabLink({isSelected, title, collapsed, ...restProps}) {
|
|
|
13
13
|
return (
|
|
14
14
|
<Link {...restProps}>
|
|
15
15
|
{() => (
|
|
16
|
-
|
|
16
|
+
<div className={styles.container}>
|
|
17
17
|
<span className={styles.visible}>{renderedTitle}</span>
|
|
18
18
|
{/* hack for preserving constant tab width*/}
|
|
19
19
|
<span className={styles.hidden}>{renderedTitle}</span>
|
|
20
|
-
|
|
20
|
+
<span className={styles.hiddenBold}>{renderedTitle}</span>
|
|
21
|
+
<span className={styles.hiddenRegular}>{renderedTitle}</span>
|
|
22
|
+
</div>
|
|
21
23
|
)}
|
|
22
24
|
</Link>
|
|
23
25
|
);
|
package/components/tabs/tabs.css
CHANGED
|
@@ -66,6 +66,11 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.title.titleLegacy {
|
|
70
|
+
display: inline-flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
.title + .title {
|
|
70
75
|
margin-left: calc(unit * 3);
|
|
71
76
|
}
|
|
@@ -112,12 +117,34 @@
|
|
|
112
117
|
text-align: center;
|
|
113
118
|
}
|
|
114
119
|
|
|
120
|
+
.container {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
}
|
|
124
|
+
|
|
115
125
|
.hidden {
|
|
126
|
+
display: flex;
|
|
127
|
+
visibility: hidden;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.hiddenBold {
|
|
131
|
+
display: flex;
|
|
116
132
|
visibility: hidden;
|
|
117
133
|
|
|
134
|
+
height: 0;
|
|
135
|
+
|
|
118
136
|
font-weight: bold;
|
|
119
137
|
}
|
|
120
138
|
|
|
139
|
+
.hiddenRegular {
|
|
140
|
+
display: flex;
|
|
141
|
+
visibility: hidden;
|
|
142
|
+
|
|
143
|
+
height: 0;
|
|
144
|
+
|
|
145
|
+
font-weight: normal;
|
|
146
|
+
}
|
|
147
|
+
|
|
121
148
|
.tabCounter {
|
|
122
149
|
padding-left: 8px;
|
|
123
150
|
|
|
@@ -142,15 +169,15 @@
|
|
|
142
169
|
max-width: 100%;
|
|
143
170
|
}
|
|
144
171
|
|
|
145
|
-
.autoCollapse.adjusted {
|
|
146
|
-
visibility: visible;
|
|
147
|
-
overflow: visible;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
172
|
.autoCollapse .title {
|
|
151
173
|
flex-shrink: 0;
|
|
152
174
|
}
|
|
153
175
|
|
|
176
|
+
.rendered.adjusted {
|
|
177
|
+
visibility: visible;
|
|
178
|
+
overflow: visible;
|
|
179
|
+
}
|
|
180
|
+
|
|
154
181
|
.measure {
|
|
155
182
|
position: absolute;
|
|
156
183
|
top: 0;
|
|
@@ -5,6 +5,8 @@ import className from 'classnames';
|
|
|
5
5
|
import styles from '../tabs/tabs.css';
|
|
6
6
|
import Theme from '../global/theme';
|
|
7
7
|
|
|
8
|
+
import template from './tabs-ng__template';
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* @name Tabs Ng
|
|
10
12
|
*/
|
|
@@ -15,7 +17,7 @@ angularModule.directive('rgTabs', function rgTabsDirective($location, $rootScope
|
|
|
15
17
|
return {
|
|
16
18
|
restrict: 'E',
|
|
17
19
|
transclude: true,
|
|
18
|
-
template
|
|
20
|
+
template,
|
|
19
21
|
replace: true,
|
|
20
22
|
|
|
21
23
|
scope: {
|
|
@@ -161,7 +163,7 @@ angularModule.directive('rgTabs', function rgTabsDirective($location, $rootScope
|
|
|
161
163
|
// I think this bug depends on the frequency of addTab calls (actually on digests)
|
|
162
164
|
// and ng-class detection of added and removed classes becomes broken.
|
|
163
165
|
// @maxim.erekhinskiy
|
|
164
|
-
$scope.tabClass = pane => className(styles.title, {
|
|
166
|
+
$scope.tabClass = pane => className(styles.title, styles.titleLegacy, {
|
|
165
167
|
[styles.selected]: pane.selected
|
|
166
168
|
});
|
|
167
169
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export default `<div
|
|
2
2
|
ng-class=":: [styles.tabs, styles[theme]]"
|
|
3
3
|
rg-shortcuts="ring-tabs"
|
|
4
4
|
shortcuts-map="keyMap"
|
|
@@ -26,9 +26,13 @@
|
|
|
26
26
|
hack for preserving constant tab width
|
|
27
27
|
--><span ng-class=":: styles.hidden">{{pane.title}}<span
|
|
28
28
|
ng-class=":: styles.tabCounter" ng-show="pane.counter !== undefined">{{ pane.counter }}</span></span>
|
|
29
|
+
<span ng-class=":: styles.hiddenBold">{{pane.title}}<span
|
|
30
|
+
ng-class=":: styles.tabCounter" ng-show="pane.counter !== undefined">{{ pane.counter }}</span></span>
|
|
31
|
+
<span ng-class=":: styles.hiddenRegular">{{pane.title}}<span
|
|
32
|
+
ng-class=":: styles.tabCounter" ng-show="pane.counter !== undefined">{{ pane.counter }}</span></span>
|
|
29
33
|
</button>
|
|
30
34
|
</div>
|
|
31
35
|
|
|
32
36
|
<div ng-transclude></div>
|
|
33
37
|
|
|
34
|
-
</div
|
|
38
|
+
</div>`;
|