@jetbrains/ring-ui 4.1.0-beta.9 → 4.1.1
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/container.css +1 -1
- 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 +1 -1
- package/components/auth/auth.test.js +14 -7
- package/components/auth/auth__core.js +64 -33
- package/components/auth-dialog/auth-dialog.js +1 -0
- package/components/avatar/avatar.css +4 -1
- package/components/avatar/avatar.examples.js +3 -2
- package/components/avatar/avatar.js +31 -6
- 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/button/button.css +2 -2
- package/components/button/button.js +4 -1
- 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 +1 -1
- 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 +5 -2
- package/components/dialog/dialog.test.js +1 -1
- package/components/dialog/dialog__body-scroll-preventer.js +2 -2
- package/components/dialog-ng/dialog-ng.js +7 -8
- package/components/dialog-ng/{dialog-ng.html → dialog-ng__template.js} +2 -2
- package/components/dropdown/dropdown.examples.js +36 -1
- 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/island/island.css +4 -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 -5
- package/components/pager/pager.js +5 -3
- package/components/permissions/permissions.js +1 -1
- 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 -1
- 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/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/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 +4 -8
- package/components/tabs/tab-link.js +4 -2
- package/components/tabs/tabs.css +27 -0
- 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 -1
- package/components/user-agreement/user-agreement.examples.js +7 -4
- package/components/user-agreement/user-agreement.js +1 -0
- package/package.json +75 -78
- 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/_rollupPluginBabelHelpers.js +0 -127
- package/dist/_helpers/anchor.js +0 -33
- package/dist/_helpers/badge.js +0 -3
- package/dist/_helpers/button__classes.js +0 -39
- package/dist/_helpers/caption.js +0 -25
- package/dist/_helpers/card.js +0 -77
- package/dist/_helpers/date-picker.js +0 -3
- package/dist/_helpers/dialog__body-scroll-preventer.js +0 -56
- package/dist/_helpers/grid.js +0 -3
- package/dist/_helpers/header.js +0 -3
- package/dist/_helpers/icon__svg.js +0 -83
- package/dist/_helpers/inject-styles.js +0 -22
- package/dist/_helpers/island.js +0 -3
- package/dist/_helpers/list.js +0 -3
- package/dist/_helpers/query-assist__suggestions.js +0 -95
- package/dist/_helpers/select__filter.js +0 -78
- package/dist/_helpers/services-link.js +0 -42
- package/dist/_helpers/sidebar.js +0 -127
- package/dist/_helpers/table.js +0 -3
- package/dist/_helpers/tabs.js +0 -3
- package/dist/_helpers/title.js +0 -99
- package/dist/alert/alert.js +0 -254
- package/dist/alert/container.js +0 -50
- package/dist/alert-service/alert-service.js +0 -159
- package/dist/analytics/analytics.js +0 -116
- package/dist/analytics/analytics__custom-plugin.js +0 -127
- package/dist/analytics/analytics__fus-plugin.js +0 -101
- package/dist/analytics/analytics__ga-plugin.js +0 -66
- package/dist/analytics/analytics__plugin-utils.js +0 -79
- package/dist/auth/auth.js +0 -90
- package/dist/auth/auth__core.js +0 -987
- package/dist/auth/background-flow.js +0 -123
- package/dist/auth/down-notification.js +0 -111
- package/dist/auth/iframe-flow.js +0 -147
- package/dist/auth/landing-entry.js +0 -5
- package/dist/auth/landing.js +0 -84
- package/dist/auth/request-builder.js +0 -75
- package/dist/auth/response-parser.js +0 -117
- package/dist/auth/storage.js +0 -279
- package/dist/auth/token-validator.js +0 -176
- package/dist/auth/window-flow.js +0 -133
- package/dist/auth-dialog/auth-dialog.js +0 -132
- package/dist/auth-dialog-service/auth-dialog-service.js +0 -67
- package/dist/avatar/avatar-example-datauri.js +0 -26
- package/dist/avatar/avatar.js +0 -155
- package/dist/badge/badge.js +0 -52
- package/dist/button/button.js +0 -117
- package/dist/button/button__classes.js +0 -5
- package/dist/button-group/button-group.js +0 -30
- package/dist/button-group/caption.js +0 -5
- package/dist/button-set/button-set.js +0 -27
- package/dist/button-toolbar/button-toolbar.js +0 -30
- package/dist/caret/caret.js +0 -264
- package/dist/checkbox/checkbox.js +0 -110
- package/dist/confirm/confirm.js +0 -122
- package/dist/confirm-service/confirm-service.js +0 -112
- package/dist/content-layout/content-layout.js +0 -67
- package/dist/content-layout/sidebar.js +0 -6
- package/dist/contenteditable/contenteditable.js +0 -81
- package/dist/data-list/data-list.js +0 -203
- package/dist/data-list/data-list.mock.js +0 -190
- package/dist/data-list/item.js +0 -225
- package/dist/data-list/selection.js +0 -101
- package/dist/data-list/title.js +0 -16
- package/dist/date-picker/consts.js +0 -70
- package/dist/date-picker/date-input.js +0 -169
- package/dist/date-picker/date-picker.js +0 -356
- package/dist/date-picker/date-popup.js +0 -459
- package/dist/date-picker/day.js +0 -119
- package/dist/date-picker/formats.js +0 -3
- package/dist/date-picker/month-names.js +0 -92
- package/dist/date-picker/month-slider.js +0 -83
- package/dist/date-picker/month.js +0 -48
- package/dist/date-picker/months.js +0 -121
- package/dist/date-picker/weekdays.js +0 -24
- package/dist/date-picker/years.js +0 -109
- package/dist/dialog/dialog.js +0 -197
- package/dist/dialog/dialog__body-scroll-preventer.js +0 -2
- package/dist/dropdown/anchor.js +0 -16
- package/dist/dropdown/dropdown.js +0 -236
- package/dist/error-bubble/error-bubble.js +0 -59
- package/dist/error-message/error-message.js +0 -55
- package/dist/footer/footer.js +0 -127
- package/dist/global/angular-component-factory.js +0 -83
- package/dist/global/compose.js +0 -9
- package/dist/global/composeRefs.js +0 -15
- package/dist/global/conic-gradient.js +0 -37
- package/dist/global/create-stateful-context.js +0 -54
- package/dist/global/data-tests.js +0 -22
- package/dist/global/dom.js +0 -124
- package/dist/global/focus-sensor-hoc.js +0 -147
- package/dist/global/fuzzy-highlight.js +0 -67
- package/dist/global/get-event-key.js +0 -111
- package/dist/global/get-uid.js +0 -15
- package/dist/global/inject-styles.js +0 -17
- package/dist/global/linear-function.js +0 -18
- package/dist/global/listeners.js +0 -42
- package/dist/global/memoize.js +0 -18
- package/dist/global/normalize-indent.js +0 -28
- package/dist/global/promise-with-timeout.js +0 -13
- package/dist/global/radial-gradient-mask.js +0 -49
- package/dist/global/react-dom-renderer.js +0 -45
- package/dist/global/rerender-hoc.js +0 -53
- package/dist/global/ring-angular-component.js +0 -24
- package/dist/global/schedule-raf.js +0 -31
- package/dist/global/sniffer.js +0 -6
- package/dist/global/supports-css.js +0 -20
- package/dist/global/theme.js +0 -56
- package/dist/global/trivial-template-tag.js +0 -15
- package/dist/global/url.js +0 -163
- package/dist/global/variables_dark.js +0 -57
- package/dist/grid/col.js +0 -62
- package/dist/grid/grid.js +0 -35
- package/dist/grid/row.js +0 -66
- package/dist/group/group.js +0 -34
- package/dist/header/header.js +0 -144
- package/dist/header/logo.js +0 -39
- package/dist/header/profile.js +0 -212
- package/dist/header/services-link.js +0 -10
- package/dist/header/services.js +0 -135
- package/dist/header/smart-profile.js +0 -227
- package/dist/header/smart-services.js +0 -159
- package/dist/header/tray-icon.js +0 -45
- package/dist/header/tray.js +0 -33
- package/dist/heading/heading.js +0 -76
- package/dist/http/http.js +0 -216
- package/dist/http/http.mock.js +0 -65
- package/dist/hub-source/hub-source.js +0 -130
- package/dist/hub-source/hub-source__user.js +0 -28
- package/dist/hub-source/hub-source__users-groups.js +0 -62
- package/dist/icon/icon.js +0 -105
- package/dist/icon/icon__constants.js +0 -33
- package/dist/icon/icon__svg.js +0 -6
- package/dist/icon/index.js +0 -9
- package/dist/input/input.js +0 -231
- package/dist/island/adaptive-island-hoc.js +0 -48
- package/dist/island/content.js +0 -158
- package/dist/island/header.js +0 -85
- package/dist/island/island.js +0 -53
- package/dist/island-legacy/content-legacy.js +0 -28
- package/dist/island-legacy/header-legacy.js +0 -30
- package/dist/island-legacy/island-legacy.js +0 -30
- package/dist/link/clickableLink.js +0 -65
- package/dist/link/link.js +0 -118
- package/dist/list/consts.js +0 -26
- package/dist/list/list.js +0 -800
- package/dist/list/list__custom.js +0 -82
- package/dist/list/list__hint.js +0 -26
- package/dist/list/list__item.js +0 -197
- package/dist/list/list__link.js +0 -65
- package/dist/list/list__separator.js +0 -30
- package/dist/list/list__title.js +0 -39
- package/dist/list/list__users-groups-source.js +0 -124
- package/dist/loader/loader.js +0 -72
- package/dist/loader/loader__core.js +0 -272
- package/dist/loader-inline/inject-styles.js +0 -11
- package/dist/loader-inline/loader-inline.js +0 -58
- package/dist/loader-screen/loader-screen.js +0 -46
- package/dist/login-dialog/login-dialog.js +0 -184
- package/dist/login-dialog/service.js +0 -67
- package/dist/message/message.js +0 -232
- package/dist/old-browsers-message/old-browsers-message.js +0 -101
- package/dist/old-browsers-message/old-browsers-message__stop.js +0 -5
- package/dist/old-browsers-message/white-list.js +0 -34
- package/dist/pager/pager.js +0 -352
- package/dist/panel/panel.js +0 -34
- package/dist/permissions/permissions.js +0 -200
- package/dist/permissions/permissions__cache.js +0 -272
- package/dist/popup/popup.consts.js +0 -41
- package/dist/popup/popup.js +0 -389
- package/dist/popup/popup.target.js +0 -27
- package/dist/popup/position.js +0 -280
- package/dist/popup-menu/popup-menu.js +0 -108
- package/dist/progress-bar/progress-bar.js +0 -111
- package/dist/proxy-attrs/proxy-attrs.js +0 -19
- package/dist/query-assist/query-assist.js +0 -1023
- package/dist/query-assist/query-assist__suggestions.js +0 -43
- package/dist/radio/radio.js +0 -39
- package/dist/radio/radio__item.js +0 -82
- package/dist/select/select.js +0 -1335
- package/dist/select/select__filter.js +0 -49
- package/dist/select/select__popup.js +0 -541
- package/dist/shortcuts/core.js +0 -245
- package/dist/shortcuts/shortcut-title.js +0 -51
- package/dist/shortcuts/shortcuts-hoc.js +0 -43
- package/dist/shortcuts/shortcuts.js +0 -72
- package/dist/storage/storage.js +0 -55
- package/dist/storage/storage__fallback.js +0 -214
- package/dist/storage/storage__local.js +0 -150
- package/dist/style.css +0 -1
- package/dist/tab-trap/tab-trap.js +0 -178
- package/dist/table/cell.js +0 -25
- package/dist/table/disable-hover-hoc.js +0 -53
- package/dist/table/header-cell.js +0 -91
- package/dist/table/header.js +0 -189
- package/dist/table/multitable.js +0 -140
- package/dist/table/row-with-focus-sensor.js +0 -79
- package/dist/table/row.js +0 -270
- package/dist/table/selection-adapter.js +0 -14
- package/dist/table/selection-shortcuts-hoc.js +0 -212
- package/dist/table/selection.js +0 -221
- package/dist/table/smart-table.js +0 -113
- package/dist/table/table.js +0 -405
- package/dist/tabs/collapsible-more.js +0 -193
- package/dist/tabs/collapsible-tab.js +0 -90
- package/dist/tabs/collapsible-tabs.js +0 -361
- package/dist/tabs/custom-item.js +0 -13
- package/dist/tabs/dumb-tabs.js +0 -159
- package/dist/tabs/smart-tabs.js +0 -102
- package/dist/tabs/tab-link.js +0 -35
- package/dist/tabs/tab.js +0 -32
- package/dist/tabs/tabs.js +0 -65
- package/dist/tag/tag.js +0 -190
- package/dist/tags-input/tags-input.js +0 -474
- package/dist/tags-list/tags-list.js +0 -94
- package/dist/text/text.js +0 -38
- package/dist/toggle/toggle.js +0 -80
- package/dist/tooltip/tooltip.js +0 -205
- package/dist/user-card/card.js +0 -14
- package/dist/user-card/smart-user-card-tooltip.js +0 -112
- package/dist/user-card/tooltip.js +0 -91
- package/dist/user-card/user-card.js +0 -46
package/components/tag/tag.js
CHANGED
|
@@ -29,7 +29,8 @@ export default class Tag extends PureComponent {
|
|
|
29
29
|
textColor: PropTypes.string,
|
|
30
30
|
|
|
31
31
|
children: PropTypes.node,
|
|
32
|
-
className: PropTypes.string
|
|
32
|
+
className: PropTypes.string,
|
|
33
|
+
render: PropTypes.func
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
static defaultProps = {
|
|
@@ -37,7 +38,8 @@ export default class Tag extends PureComponent {
|
|
|
37
38
|
onClick: () => {},
|
|
38
39
|
readOnly: false,
|
|
39
40
|
disabled: false,
|
|
40
|
-
focused: false
|
|
41
|
+
focused: false,
|
|
42
|
+
render: props => <button type="button" {...props}/>
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
state = {
|
|
@@ -155,23 +157,24 @@ export default class Tag extends PureComponent {
|
|
|
155
157
|
this.props.className
|
|
156
158
|
);
|
|
157
159
|
|
|
158
|
-
const {backgroundColor, textColor} = this.props;
|
|
160
|
+
const {backgroundColor, textColor, render} = this.props;
|
|
159
161
|
|
|
160
162
|
return (
|
|
161
163
|
<span className={styles.container}>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
164
|
+
{render({
|
|
165
|
+
'data-test': 'ring-tag',
|
|
166
|
+
className: classes,
|
|
167
|
+
ref: this.tagRef,
|
|
168
|
+
onClick: this.props.onClick,
|
|
169
|
+
style: {backgroundColor, color: textColor},
|
|
170
|
+
children: (
|
|
171
|
+
<>
|
|
172
|
+
{this.renderAvatar()}
|
|
173
|
+
{this.renderCustomIcon()}
|
|
174
|
+
{this.renderImage()}
|
|
175
|
+
<span className={styles.content}>{this.props.children}</span>
|
|
176
|
+
</>)
|
|
177
|
+
})}
|
|
175
178
|
{this.renderRemoveIcon()}
|
|
176
179
|
</span>
|
|
177
180
|
);
|
|
@@ -116,7 +116,7 @@ export const autoOpenInADialog = () => {
|
|
|
116
116
|
return (
|
|
117
117
|
<>
|
|
118
118
|
<Button>Button</Button>
|
|
119
|
-
<Dialog show trapFocus autoFocusFirst={false}>
|
|
119
|
+
<Dialog label="Tags" show trapFocus autoFocusFirst={false}>
|
|
120
120
|
<Content>
|
|
121
121
|
<TagsInput tags={tags} dataSource={dataSource} autoOpen/>
|
|
122
122
|
</Content>
|
|
@@ -70,6 +70,11 @@ export default class TagsInput extends PureComponent {
|
|
|
70
70
|
placeholder: 'Select an option'
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
constructor(props) {
|
|
74
|
+
super(props);
|
|
75
|
+
this.ngModelStateField = TagsInput.ngModelStateField;
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
state = {
|
|
74
79
|
tags: [],
|
|
75
80
|
prevTags: null,
|
|
@@ -102,8 +107,6 @@ export default class TagsInput extends PureComponent {
|
|
|
102
107
|
this.node = node;
|
|
103
108
|
};
|
|
104
109
|
|
|
105
|
-
ngModelStateField = TagsInput.ngModelStateField;
|
|
106
|
-
|
|
107
110
|
getInputNode() {
|
|
108
111
|
if (!this.input) {
|
|
109
112
|
this.input = this.select.filter;
|
|
@@ -20,7 +20,7 @@ export default class Tooltip extends Component {
|
|
|
20
20
|
delay: PropTypes.number,
|
|
21
21
|
selfOverflowOnly: PropTypes.bool,
|
|
22
22
|
popupProps: PropTypes.object,
|
|
23
|
-
title: PropTypes.
|
|
23
|
+
title: PropTypes.node,
|
|
24
24
|
children: PropTypes.node,
|
|
25
25
|
'data-test': PropTypes.string
|
|
26
26
|
};
|
|
@@ -133,15 +133,20 @@ export default class Tooltip extends Component {
|
|
|
133
133
|
const {children, 'data-test': dataTest,
|
|
134
134
|
title, delay, selfOverflowOnly, popupProps, ...restProps} = this.props;
|
|
135
135
|
|
|
136
|
+
const ariaProps = typeof title === 'string' && !!title
|
|
137
|
+
? {'aria-label': title, role: 'tooltip'}
|
|
138
|
+
: {};
|
|
139
|
+
|
|
136
140
|
const {onNestedTooltipShow, onNestedTooltipHide} = this;
|
|
137
141
|
|
|
138
142
|
return (
|
|
139
143
|
<TooltipContext.Provider value={{onNestedTooltipShow, onNestedTooltipHide}}>
|
|
140
144
|
<span
|
|
145
|
+
{...ariaProps}
|
|
141
146
|
{...restProps}
|
|
142
147
|
ref={this.containerRef}
|
|
143
148
|
data-test={dataTests('ring-tooltip', dataTest)}
|
|
144
|
-
data-test-title={title}
|
|
149
|
+
data-test-title={typeof title === 'string' ? title : undefined}
|
|
145
150
|
>
|
|
146
151
|
{children}
|
|
147
152
|
<Popup
|
|
@@ -34,12 +34,15 @@ dialog.args = {
|
|
|
34
34
|
dialog.argTypes = {
|
|
35
35
|
onRemindLater: {}
|
|
36
36
|
};
|
|
37
|
+
dialog.parameters = {
|
|
38
|
+
actions: {argTypesRegex: '^on(?!RemindLater).*'}
|
|
39
|
+
};
|
|
37
40
|
dialog.storyName = 'dialog';
|
|
38
41
|
|
|
39
42
|
function noop() {}
|
|
40
43
|
export const service = ({
|
|
41
|
-
|
|
42
|
-
onGetUserConsent,
|
|
44
|
+
onGetUserAgreement = noop,
|
|
45
|
+
onGetUserConsent = noop,
|
|
43
46
|
onSetUserConsent = noop,
|
|
44
47
|
onAccept,
|
|
45
48
|
onDecline,
|
|
@@ -59,7 +62,7 @@ export const service = ({
|
|
|
59
62
|
|
|
60
63
|
const agreementService = new UserAgreementService({
|
|
61
64
|
getUserAgreement: () => {
|
|
62
|
-
|
|
65
|
+
onGetUserAgreement(fakeUserAgreement);
|
|
63
66
|
return fakeUserAgreement;
|
|
64
67
|
},
|
|
65
68
|
getUserConsent: () => {
|
|
@@ -93,7 +96,7 @@ export const service = ({
|
|
|
93
96
|
};
|
|
94
97
|
|
|
95
98
|
service.argTypes = {
|
|
96
|
-
|
|
99
|
+
onGetUserAgreement: {},
|
|
97
100
|
onGetUserConsent: {},
|
|
98
101
|
onSetUserConsent: {},
|
|
99
102
|
onAccept: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"test-ci": "karma start karma-ci.conf.js",
|
|
58
58
|
"test-watch": "karma start karma-watch.conf.js",
|
|
59
59
|
"prerelease-ci": "git pull",
|
|
60
|
-
"release-ci": "lerna publish --yes",
|
|
60
|
+
"release-ci": "lerna publish --no-verify-access --yes",
|
|
61
61
|
"prepublishOnly": "pinst --disable",
|
|
62
62
|
"postpublish": "pinst --enable"
|
|
63
63
|
},
|
|
@@ -67,32 +67,31 @@
|
|
|
67
67
|
},
|
|
68
68
|
"readmeFilename": "README.md",
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@babel/cli": "^7.
|
|
71
|
-
"@babel/eslint-parser": "^7.
|
|
70
|
+
"@babel/cli": "^7.16.0",
|
|
71
|
+
"@babel/eslint-parser": "^7.16.3",
|
|
72
72
|
"@jetbrains/eslint-config": "^5.3.1",
|
|
73
|
-
"@jetbrains/generator-ring-ui": "^4.
|
|
74
|
-
"@jetbrains/stylelint-config": "^
|
|
73
|
+
"@jetbrains/generator-ring-ui": "^4.1.1",
|
|
74
|
+
"@jetbrains/stylelint-config": "^3.0.2",
|
|
75
|
+
"@primer/octicons": "^16.1.1",
|
|
75
76
|
"@rollup/plugin-babel": "^5.3.0",
|
|
76
|
-
"@rollup/plugin-replace": "^
|
|
77
|
-
"@storybook/addon-a11y": "6.
|
|
78
|
-
"@storybook/addon-docs": "6.
|
|
79
|
-
"@storybook/addon-essentials": "6.
|
|
80
|
-
"@storybook/addon-storyshots": "6.2
|
|
81
|
-
"@storybook/addon-storyshots-puppeteer": "6.2
|
|
82
|
-
"@storybook/addon-storysource": "6.
|
|
83
|
-
"@storybook/addons": "6.
|
|
84
|
-
"@storybook/builder-webpack5": "6.
|
|
85
|
-
"@storybook/client-api": "6.
|
|
86
|
-
"@storybook/core": "6.
|
|
87
|
-
"@storybook/html": "6.
|
|
88
|
-
"@storybook/
|
|
89
|
-
"@storybook/
|
|
90
|
-
"@
|
|
91
|
-
"@testing-library/
|
|
92
|
-
"@testing-library/
|
|
93
|
-
"@
|
|
94
|
-
"@ungap/url-search-params": "^0.2.2",
|
|
95
|
-
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
|
|
77
|
+
"@rollup/plugin-replace": "^3.0.0",
|
|
78
|
+
"@storybook/addon-a11y": "6.3.12",
|
|
79
|
+
"@storybook/addon-docs": "6.3.12",
|
|
80
|
+
"@storybook/addon-essentials": "6.3.12",
|
|
81
|
+
"@storybook/addon-storyshots": "6.3.2",
|
|
82
|
+
"@storybook/addon-storyshots-puppeteer": "6.3.2",
|
|
83
|
+
"@storybook/addon-storysource": "6.3.12",
|
|
84
|
+
"@storybook/addons": "6.3.12",
|
|
85
|
+
"@storybook/builder-webpack5": "6.3.12",
|
|
86
|
+
"@storybook/client-api": "6.3.12",
|
|
87
|
+
"@storybook/core": "6.3.12",
|
|
88
|
+
"@storybook/html": "6.3.12",
|
|
89
|
+
"@storybook/manager-webpack5": "^6.3.12",
|
|
90
|
+
"@storybook/source-loader": "6.3.12",
|
|
91
|
+
"@storybook/theming": "6.3.12",
|
|
92
|
+
"@testing-library/react": "^12.1.2",
|
|
93
|
+
"@testing-library/user-event": "^13.5.0",
|
|
94
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.5",
|
|
96
95
|
"angular": "^1.8.2",
|
|
97
96
|
"angular-mocks": "^1.8.2",
|
|
98
97
|
"angular-route": "^1.8.2",
|
|
@@ -100,124 +99,122 @@
|
|
|
100
99
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
101
100
|
"chai": "^4.3.4",
|
|
102
101
|
"chai-as-promised": "^7.1.1",
|
|
103
|
-
"chai-dom": "^1.
|
|
102
|
+
"chai-dom": "^1.10.0",
|
|
104
103
|
"chai-enzyme": "1.0.0-beta.1",
|
|
105
104
|
"cheerio": "^0.22.0",
|
|
106
|
-
"core-js": "^3.
|
|
105
|
+
"core-js": "^3.19.1",
|
|
107
106
|
"enzyme": "^3.11.0",
|
|
108
|
-
"eslint": "^
|
|
109
|
-
"eslint-import-resolver-webpack": "^0.13.
|
|
110
|
-
"eslint-plugin-angular": "^4.0
|
|
107
|
+
"eslint": "^8.2.0",
|
|
108
|
+
"eslint-import-resolver-webpack": "^0.13.2",
|
|
109
|
+
"eslint-plugin-angular": "^4.1.0",
|
|
111
110
|
"eslint-plugin-bdd": "^2.1.1",
|
|
112
|
-
"eslint-plugin-import": "^2.
|
|
113
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
114
|
-
"eslint-plugin-react": "^7.
|
|
115
|
-
"eslint-plugin-react-hooks": "^4.2.0",
|
|
111
|
+
"eslint-plugin-import": "^2.25.3",
|
|
112
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
113
|
+
"eslint-plugin-react": "^7.27.1",
|
|
116
114
|
"events": "^3.3.0",
|
|
117
115
|
"glob": "^7.1.6",
|
|
118
|
-
"html-
|
|
119
|
-
"
|
|
120
|
-
"husky": "^6.0.0",
|
|
116
|
+
"html-webpack-plugin": "^5.5.0",
|
|
117
|
+
"husky": "^7.0.4",
|
|
121
118
|
"identity-obj-proxy": "^3.0.0",
|
|
122
|
-
"
|
|
123
|
-
"jest
|
|
124
|
-
"
|
|
119
|
+
"imports-loader": "^3.1.1",
|
|
120
|
+
"jest": "~27.3.1",
|
|
121
|
+
"jest-teamcity": "^1.10.0",
|
|
122
|
+
"karma": "^6.3.9",
|
|
125
123
|
"karma-chrome-launcher": "3.1.0",
|
|
126
124
|
"karma-mocha": "^2.0.1",
|
|
127
125
|
"karma-sourcemap-loader": "^0.3.8",
|
|
128
126
|
"karma-teamcity-reporter": "^2.0.0",
|
|
129
127
|
"karma-webpack": "^5.0.0",
|
|
130
128
|
"lerna": "^4.0.0",
|
|
131
|
-
"lint-staged": "^
|
|
129
|
+
"lint-staged": "^12.1.2",
|
|
132
130
|
"merge-options": "^3.0.4",
|
|
133
|
-
"mocha": "^
|
|
131
|
+
"mocha": "^9.1.3",
|
|
134
132
|
"pinst": "^2.1.6",
|
|
135
|
-
"
|
|
136
|
-
"puppeteer": "^9.1.1",
|
|
133
|
+
"puppeteer": "^10.4.0",
|
|
137
134
|
"raw-loader": "^4.0.2",
|
|
138
135
|
"react": "^17.0.2",
|
|
139
136
|
"react-dom": "^17.0.2",
|
|
140
137
|
"react-test-renderer": "^17.0.2",
|
|
141
|
-
"regenerator-runtime": "^0.13.
|
|
142
|
-
"rollup": "^2.
|
|
138
|
+
"regenerator-runtime": "^0.13.9",
|
|
139
|
+
"rollup": "^2.60.0",
|
|
143
140
|
"rollup-plugin-clear": "^2.0.7",
|
|
144
|
-
"rollup-plugin-node-globals": "^1.4.0",
|
|
145
141
|
"rollup-plugin-styles": "^3.14.1",
|
|
146
|
-
"sinon": "^
|
|
142
|
+
"sinon": "^12.0.1",
|
|
147
143
|
"sinon-chai": "^3.7.0",
|
|
148
144
|
"storage-mock": "^2.1.0",
|
|
149
|
-
"stylelint": "^
|
|
145
|
+
"stylelint": "^14.1.0",
|
|
150
146
|
"svg-inline-loader": "^0.8.2",
|
|
151
147
|
"teamcity-service-messages": "^0.1.11",
|
|
152
|
-
"terser-webpack-plugin": "^5.
|
|
148
|
+
"terser-webpack-plugin": "^5.2.5",
|
|
153
149
|
"wallaby-webpack": "^3.9.16",
|
|
154
|
-
"webpack": "^5.
|
|
155
|
-
"webpack-cli": "^4.
|
|
150
|
+
"webpack": "^5.64.1",
|
|
151
|
+
"webpack-cli": "^4.9.1",
|
|
156
152
|
"xmlappend": "^1.0.4",
|
|
157
|
-
"yo": "^4.
|
|
153
|
+
"yo": "^4.3.0"
|
|
158
154
|
},
|
|
159
155
|
"peerDependencies": {
|
|
160
156
|
"core-js": ">=3.0.0",
|
|
161
157
|
"react": ">=16.8.0",
|
|
162
158
|
"react-dom": ">=16.8.0",
|
|
163
|
-
"webpack": "^5.
|
|
159
|
+
"webpack": "^5.64.1"
|
|
164
160
|
},
|
|
165
161
|
"dependencies": {
|
|
166
|
-
"@babel/core": "^7.
|
|
162
|
+
"@babel/core": "^7.16.0",
|
|
167
163
|
"@jetbrains/angular-elastic": "^2.5.1",
|
|
168
|
-
"@jetbrains/babel-preset-jetbrains": "^2.
|
|
169
|
-
"@jetbrains/icons": "^3.
|
|
170
|
-
"@jetbrains/logos": "^1.4.
|
|
164
|
+
"@jetbrains/babel-preset-jetbrains": "^2.3.1",
|
|
165
|
+
"@jetbrains/icons": "^3.18.0",
|
|
166
|
+
"@jetbrains/logos": "^1.4.27",
|
|
171
167
|
"@jetbrains/postcss-require-hover": "^0.1.2",
|
|
172
|
-
"
|
|
173
|
-
"babel-loader": "^8.2.
|
|
174
|
-
"babel-plugin-transform-define": "^2.0.
|
|
168
|
+
"@ungap/url-search-params": "^0.2.2",
|
|
169
|
+
"babel-loader": "^8.2.3",
|
|
170
|
+
"babel-plugin-transform-define": "^2.0.1",
|
|
175
171
|
"browserslist": "^4.16.6",
|
|
176
172
|
"change-case": "^4.1.1",
|
|
177
173
|
"classnames": "^2.3.1",
|
|
178
174
|
"combokeys": "^3.0.1",
|
|
179
175
|
"compile-code-loader": "^1.0.0",
|
|
180
176
|
"conic-gradient": "^1.0.0",
|
|
181
|
-
"css-loader": "^5.
|
|
182
|
-
"date-fns": "^2.
|
|
177
|
+
"css-loader": "^6.5.1",
|
|
178
|
+
"date-fns": "^2.26.0",
|
|
183
179
|
"deep-equal": "^2.0.4",
|
|
184
|
-
"element-resize-detector": "^1.2.
|
|
180
|
+
"element-resize-detector": "^1.2.3",
|
|
185
181
|
"es6-error": "^4.1.1",
|
|
182
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
186
183
|
"extricate-loader": "^3.0.0",
|
|
187
184
|
"fastdom": "^1.0.10",
|
|
188
185
|
"file-loader": "^6.2.0",
|
|
189
|
-
"focus-trap": "^6.
|
|
186
|
+
"focus-trap": "^6.7.1",
|
|
190
187
|
"focus-visible": "^5.2.0",
|
|
191
188
|
"highlight.js": "^10.7.2",
|
|
192
|
-
"html-loader": "^
|
|
193
|
-
"imports-loader": "^3.0.0",
|
|
189
|
+
"html-loader": "^3.0.1",
|
|
194
190
|
"interpolate-loader": "^2.0.1",
|
|
195
|
-
"just-debounce-it": "^
|
|
196
|
-
"memoize-one": "^
|
|
197
|
-
"postcss": "^8.3.
|
|
191
|
+
"just-debounce-it": "^3.0.1",
|
|
192
|
+
"memoize-one": "^6.0.0",
|
|
193
|
+
"postcss": "^8.3.11",
|
|
198
194
|
"postcss-calc": "^8.0.0",
|
|
199
195
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
200
196
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
201
|
-
"postcss-loader": "^
|
|
197
|
+
"postcss-loader": "^6.2.0",
|
|
202
198
|
"postcss-modules-values-replace": "^3.4.0",
|
|
203
|
-
"postcss-preset-env": "^
|
|
199
|
+
"postcss-preset-env": "^7.0.1",
|
|
204
200
|
"prop-types": "^15.7.2",
|
|
205
201
|
"react-markdown": "^5.0.3",
|
|
206
|
-
"react-movable": "^
|
|
202
|
+
"react-movable": "^3.0.2",
|
|
207
203
|
"react-virtualized": "^9.22.3",
|
|
208
204
|
"react-waypoint": "^10.1.0",
|
|
209
|
-
"remark-breaks": "^
|
|
205
|
+
"remark-breaks": "^3.0.2",
|
|
210
206
|
"remark-gfm": "^1.0.0",
|
|
211
207
|
"scrollbar-width": "^3.1.1",
|
|
212
208
|
"simply-uuid": "^1.0.1",
|
|
213
209
|
"sniffr": "^1.2.0",
|
|
214
210
|
"style-inject": "^0.3.0",
|
|
215
|
-
"style-loader": "~
|
|
211
|
+
"style-loader": "~3.3.1",
|
|
212
|
+
"url-loader": "^4.1.1",
|
|
216
213
|
"util-deprecate": "^1.0.2"
|
|
217
214
|
},
|
|
218
215
|
"engines": {
|
|
219
216
|
"node": ">=7.4",
|
|
220
|
-
"npm": "
|
|
217
|
+
"npm": ">=6.0.0"
|
|
221
218
|
},
|
|
222
|
-
"gitHead": "
|
|
219
|
+
"gitHead": "735256fde0ff2c663fa1293c677bbf419c928a32"
|
|
223
220
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
+
const deprecate = require('util-deprecate');
|
|
4
|
+
|
|
3
5
|
(function checkWebpack() {
|
|
4
6
|
const webpackVersion = require('webpack').version;
|
|
5
7
|
const isObsoleteWebpack = webpackVersion.startsWith('4');
|
|
6
8
|
if (isObsoleteWebpack) {
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
+
// TODO remove in 5.0
|
|
10
|
+
deprecate(() => null, `[WARN]: RingUI is used with Webpack@"${webpackVersion}". Ring UI requires Webpack@>=5`)();
|
|
9
11
|
}
|
|
10
12
|
}());
|
|
11
13
|
|
|
@@ -30,7 +32,7 @@ function createConfig() {
|
|
|
30
32
|
loader: require.resolve('css-loader'),
|
|
31
33
|
options: {
|
|
32
34
|
modules: {
|
|
33
|
-
localIdentName: '[local]_[hash:
|
|
35
|
+
localIdentName: '[local]_[hash:4]'
|
|
34
36
|
},
|
|
35
37
|
importLoaders: 1
|
|
36
38
|
}
|
|
@@ -66,12 +68,6 @@ function createConfig() {
|
|
|
66
68
|
}
|
|
67
69
|
};
|
|
68
70
|
|
|
69
|
-
const htmlLoader = {
|
|
70
|
-
test: /-ng(\\|\/)\S*(-ng|-ng__)\S*\.html$/,
|
|
71
|
-
include: componentsPath,
|
|
72
|
-
loader: require.resolve('html-loader')
|
|
73
|
-
};
|
|
74
|
-
|
|
75
71
|
const gifLoader = {
|
|
76
72
|
test: /\.gif$/,
|
|
77
73
|
include: componentsPath,
|
|
@@ -82,7 +78,6 @@ function createConfig() {
|
|
|
82
78
|
cssLoader,
|
|
83
79
|
externalCssLoader,
|
|
84
80
|
babelLoader,
|
|
85
|
-
htmlLoader,
|
|
86
81
|
gifLoader
|
|
87
82
|
};
|
|
88
83
|
|
|
@@ -117,6 +112,15 @@ module.exports = {
|
|
|
117
112
|
},
|
|
118
113
|
get vfileLoader() {
|
|
119
114
|
throw new Error('***Ring UI embedded "vfileLoader" removed in 4.0. Please install and use own instance if you need it.***');
|
|
115
|
+
},
|
|
116
|
+
get htmlLoader() {
|
|
117
|
+
// eslint-disable-next-line no-console
|
|
118
|
+
console.warn('RingUI\'s "loaders.htmlLoader" is deprecated and will be removed soon. Please don\'t use it in your build');
|
|
119
|
+
return {
|
|
120
|
+
test: /-ng(\\|\/)\S*(-ng|-ng__)\S*\.html$/,
|
|
121
|
+
include: componentsPath,
|
|
122
|
+
loader: require.resolve('html-loader')
|
|
123
|
+
};
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
126
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="${require('../button-set/button-set.css').buttonSet}" ng-transclude></div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<footer ng-class=":: $ctrl.styles.footer" data-test="ring-footer">
|
|
2
|
-
<div ng-class=":: $ctrl.styles.columnLeft">
|
|
3
|
-
<div ng-transclude="left" ng-class=":: $ctrl.styles.columnItem"></div>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
<div ng-class=":: $ctrl.styles.columnCenter">
|
|
7
|
-
<div ng-transclude="center" ng-class=":: $ctrl.styles.columnItem"></div>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div ng-class=":: $ctrl.styles.columnRight">
|
|
11
|
-
<div ng-transclude="right" ng-class=":: $ctrl.styles.columnItem"></div>
|
|
12
|
-
</div>
|
|
13
|
-
</footer>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<td class="ring-table__column"
|
|
2
|
-
ng-class="{
|
|
3
|
-
'ring-table__column_limited': isLimited,
|
|
4
|
-
'ring-table__column_unlimited': isUnlimited,
|
|
5
|
-
'ring-table__column_right': isAlignRight,
|
|
6
|
-
'ring-table__avatar': isAvatar,
|
|
7
|
-
'ring-table__column_wide': isWide,
|
|
8
|
-
'ring-table__column_gray': isGray,
|
|
9
|
-
'ring-table__column_snuggle-right': isPullRight,
|
|
10
|
-
'ring-table__column_snuggle-left': isPullLeft
|
|
11
|
-
}" ng-transclude>
|
|
12
|
-
</td>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<tr ng-click="rowCtrl.setActiveItem(rowCtrl.rowItem)"
|
|
2
|
-
ng-mouseover="rowCtrl.onMouseOver(rowCtrl.rowItem)"
|
|
3
|
-
ng-mouseout="rowCtrl.onMouseOut(rowCtrl.rowItem)"
|
|
4
|
-
class="ring-table__row" ng-class="{
|
|
5
|
-
'ring-table__row_active': rowCtrl.rowItem.active,
|
|
6
|
-
'ring-table__row_checked': rowCtrl.rowItem.checked,
|
|
7
|
-
'ring-table__row_active-checked': rowCtrl.rowItem.active && !rowCtrl.hasCheckedItems(),
|
|
8
|
-
'ring-table__row_implicit': rowCtrl.rowItem.implicit,
|
|
9
|
-
'ring-table__row_expanded': rowCtrl.rowItem.expanded,
|
|
10
|
-
'ring-table__row_unselectable': rowCtrl.rowItem.unselectable
|
|
11
|
-
}" ng-transclude>
|
|
12
|
-
</tr>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<th class="ring-table__title"
|
|
2
|
-
ng-class="{
|
|
3
|
-
'ring-table__title_border': isBorder,
|
|
4
|
-
'ring-table__title_active': isActive,
|
|
5
|
-
'ring-table__column_snuggle-right': isPullRight,
|
|
6
|
-
'ring-table__column_snuggle-left': isPullLeft,
|
|
7
|
-
'ring-table__column_align-right' : isAlignRight
|
|
8
|
-
}" ng-transclude>
|
|
9
|
-
</th>
|