@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
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React, { Component, cloneElement } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import joinDataTestAttributes from '../global/data-tests.js';
|
|
6
|
-
import { m as modules_d9414203, A as Anchor } from '../_helpers/anchor.js';
|
|
7
|
-
export { A as Anchor } from '../_helpers/anchor.js';
|
|
8
|
-
import '@jetbrains/icons/chevron-10px';
|
|
9
|
-
import '../icon/icon.js';
|
|
10
|
-
import 'util-deprecate';
|
|
11
|
-
import '../icon/icon__constants.js';
|
|
12
|
-
import '../_helpers/icon__svg.js';
|
|
13
|
-
import '../global/memoize.js';
|
|
14
|
-
import '../button/button.js';
|
|
15
|
-
import 'focus-visible';
|
|
16
|
-
import '../global/theme.js';
|
|
17
|
-
import '../link/clickableLink.js';
|
|
18
|
-
import '../_helpers/button__classes.js';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @name Dropdown
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
class Dropdown extends Component {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
|
|
28
|
-
_defineProperty(this, "state", {
|
|
29
|
-
show: this.props.initShown,
|
|
30
|
-
pinned: false
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
_defineProperty(this, "onClick", () => {
|
|
34
|
-
const {
|
|
35
|
-
show,
|
|
36
|
-
pinned
|
|
37
|
-
} = this.state;
|
|
38
|
-
let nextPinned = pinned;
|
|
39
|
-
|
|
40
|
-
if (this.props.hoverMode) {
|
|
41
|
-
if (!pinned) {
|
|
42
|
-
nextPinned = true;
|
|
43
|
-
|
|
44
|
-
if (show) {
|
|
45
|
-
this.setState({
|
|
46
|
-
pinned: true
|
|
47
|
-
});
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
nextPinned = false;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
this._toggle(!show, nextPinned);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
_defineProperty(this, "onChildCloseAttempt", () => {
|
|
59
|
-
let nextPinned = this.state.pinned;
|
|
60
|
-
|
|
61
|
-
if (this.props.hoverMode) {
|
|
62
|
-
nextPinned = false;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
this._toggle(false, nextPinned);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
_defineProperty(this, "onMouseEnter", event => {
|
|
69
|
-
this._clearTimer();
|
|
70
|
-
|
|
71
|
-
this.props.onMouseEnter(event);
|
|
72
|
-
this.hoverTimer = setTimeout(() => {
|
|
73
|
-
if (!this.state.show) {
|
|
74
|
-
this._toggle(true);
|
|
75
|
-
}
|
|
76
|
-
}, this.props.hoverShowTimeOut);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
_defineProperty(this, "onMouseLeave", event => {
|
|
80
|
-
this.props.onMouseLeave(event);
|
|
81
|
-
|
|
82
|
-
if (this.state.pinned) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
this._clearTimer();
|
|
87
|
-
|
|
88
|
-
this.hoverTimer = setTimeout(() => {
|
|
89
|
-
if (this.state.show) {
|
|
90
|
-
this._toggle(false);
|
|
91
|
-
}
|
|
92
|
-
}, this.props.hoverHideTimeOut);
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
_defineProperty(this, "handlePopupInteraction", () => {
|
|
96
|
-
this.setState(_ref => {
|
|
97
|
-
let {
|
|
98
|
-
pinned
|
|
99
|
-
} = _ref;
|
|
100
|
-
return pinned ? null : {
|
|
101
|
-
pinned: true
|
|
102
|
-
};
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
toggle() {
|
|
108
|
-
let show = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.state.show;
|
|
109
|
-
|
|
110
|
-
this._toggle(show);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
_toggle(show) {
|
|
114
|
-
let pinned = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state.pinned;
|
|
115
|
-
this.setState({
|
|
116
|
-
show,
|
|
117
|
-
pinned
|
|
118
|
-
}, () => show ? this.props.onShow() : this.props.onHide());
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
_clearTimer() {
|
|
122
|
-
if (this.hoverTimer) {
|
|
123
|
-
clearTimeout(this.hoverTimer);
|
|
124
|
-
this.hoverTimer = null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
render() {
|
|
129
|
-
const {
|
|
130
|
-
show,
|
|
131
|
-
pinned
|
|
132
|
-
} = this.state;
|
|
133
|
-
|
|
134
|
-
const _this$props = this.props,
|
|
135
|
-
{
|
|
136
|
-
initShown,
|
|
137
|
-
onShow,
|
|
138
|
-
onHide,
|
|
139
|
-
hoverShowTimeOut,
|
|
140
|
-
hoverHideTimeOut,
|
|
141
|
-
children,
|
|
142
|
-
anchor,
|
|
143
|
-
className,
|
|
144
|
-
activeClassName,
|
|
145
|
-
hoverMode,
|
|
146
|
-
clickMode,
|
|
147
|
-
'data-test': dataTest
|
|
148
|
-
} = _this$props,
|
|
149
|
-
restProps = _objectWithoutProperties(_this$props, ["initShown", "onShow", "onHide", "hoverShowTimeOut", "hoverHideTimeOut", "children", "anchor", "className", "activeClassName", "hoverMode", "clickMode", "data-test"]);
|
|
150
|
-
|
|
151
|
-
const classes = classNames(modules_d9414203.dropdown, className, {
|
|
152
|
-
[activeClassName]: activeClassName != null && show
|
|
153
|
-
});
|
|
154
|
-
let anchorElement;
|
|
155
|
-
const active = hoverMode ? pinned : show;
|
|
156
|
-
|
|
157
|
-
switch (typeof anchor) {
|
|
158
|
-
case 'string':
|
|
159
|
-
anchorElement = /*#__PURE__*/React.createElement(Anchor, {
|
|
160
|
-
active: active
|
|
161
|
-
}, anchor);
|
|
162
|
-
break;
|
|
163
|
-
|
|
164
|
-
case 'function':
|
|
165
|
-
anchorElement = anchor({
|
|
166
|
-
active: show,
|
|
167
|
-
pinned
|
|
168
|
-
});
|
|
169
|
-
break;
|
|
170
|
-
|
|
171
|
-
default:
|
|
172
|
-
if (typeof anchor.type === 'string' || Array.isArray(anchor)) {
|
|
173
|
-
anchorElement = anchor;
|
|
174
|
-
} else {
|
|
175
|
-
anchorElement = /*#__PURE__*/cloneElement(anchor, {
|
|
176
|
-
active
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const childProps = {
|
|
183
|
-
hidden: !show,
|
|
184
|
-
onCloseAttempt: this.onChildCloseAttempt,
|
|
185
|
-
onMouseDown: hoverMode ? this.handlePopupInteraction : undefined,
|
|
186
|
-
onContextMenu: hoverMode ? this.handlePopupInteraction : undefined,
|
|
187
|
-
dontCloseOnAnchorClick: true
|
|
188
|
-
};
|
|
189
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
190
|
-
"data-test": joinDataTestAttributes('ring-dropdown', dataTest)
|
|
191
|
-
}, restProps, {
|
|
192
|
-
onClick: clickMode ? this.onClick : undefined // anchorElement should be a `button` or an `a`
|
|
193
|
-
,
|
|
194
|
-
role: "presentation",
|
|
195
|
-
onMouseEnter: hoverMode ? this.onMouseEnter : undefined,
|
|
196
|
-
onMouseLeave: hoverMode ? this.onMouseLeave : undefined,
|
|
197
|
-
className: classes
|
|
198
|
-
}), anchorElement, typeof children === 'function' ? children(childProps) : /*#__PURE__*/cloneElement(children, childProps));
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
_defineProperty(Dropdown, "propTypes", {
|
|
204
|
-
/**
|
|
205
|
-
* Can be string, React element, or a function accepting an object with {active, pinned} properties and returning a React element
|
|
206
|
-
* React element should render some interactive HTML element like `button` or `a`
|
|
207
|
-
*/
|
|
208
|
-
anchor: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
209
|
-
children: PropTypes.oneOfType([PropTypes.element, PropTypes.func]).isRequired,
|
|
210
|
-
initShown: PropTypes.bool,
|
|
211
|
-
className: PropTypes.string,
|
|
212
|
-
activeClassName: PropTypes.string,
|
|
213
|
-
clickMode: PropTypes.bool,
|
|
214
|
-
hoverMode: PropTypes.bool,
|
|
215
|
-
hoverShowTimeOut: PropTypes.number,
|
|
216
|
-
hoverHideTimeOut: PropTypes.number,
|
|
217
|
-
onShow: PropTypes.func,
|
|
218
|
-
onHide: PropTypes.func,
|
|
219
|
-
onMouseEnter: PropTypes.func,
|
|
220
|
-
onMouseLeave: PropTypes.func,
|
|
221
|
-
'data-test': PropTypes.string
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
_defineProperty(Dropdown, "defaultProps", {
|
|
225
|
-
initShown: false,
|
|
226
|
-
clickMode: true,
|
|
227
|
-
hoverMode: false,
|
|
228
|
-
hoverShowTimeOut: 300,
|
|
229
|
-
hoverHideTimeOut: 600,
|
|
230
|
-
onShow: () => {},
|
|
231
|
-
onHide: () => {},
|
|
232
|
-
onMouseEnter: () => {},
|
|
233
|
-
onMouseLeave: () => {}
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
export default Dropdown;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React, { PureComponent, Children, cloneElement } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import Popup from '../popup/popup.js';
|
|
6
|
-
import { Directions } from '../popup/popup.consts.js';
|
|
7
|
-
import 'react-dom';
|
|
8
|
-
import '../global/get-uid.js';
|
|
9
|
-
import '../global/schedule-raf.js';
|
|
10
|
-
import '../global/dom.js';
|
|
11
|
-
import '../shortcuts/shortcuts.js';
|
|
12
|
-
import '../shortcuts/core.js';
|
|
13
|
-
import 'combokeys';
|
|
14
|
-
import '../global/sniffer.js';
|
|
15
|
-
import 'sniffr';
|
|
16
|
-
import '../global/data-tests.js';
|
|
17
|
-
import '../tab-trap/tab-trap.js';
|
|
18
|
-
import '../popup/position.js';
|
|
19
|
-
import '../popup/popup.target.js';
|
|
20
|
-
|
|
21
|
-
var modules_ee284100 = {"unit":"8px","errorBubblePopup":"errorBubble_errorBubblePopup__23d4f97d","errorBubbleWrapper":"errorBubble_errorBubbleWrapper__23d4f97d","errorBubble":"errorBubble_errorBubble__23d4f97d"};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @name Error Bubble
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
class ErrorBubble extends PureComponent {
|
|
28
|
-
render() {
|
|
29
|
-
const _this$props = this.props,
|
|
30
|
-
{
|
|
31
|
-
children,
|
|
32
|
-
className
|
|
33
|
-
} = _this$props,
|
|
34
|
-
restProps = _objectWithoutProperties(_this$props, ["children", "className"]);
|
|
35
|
-
|
|
36
|
-
const errorBubbleClasses = classNames(modules_ee284100.errorBubble, className);
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: modules_ee284100.errorBubbleWrapper
|
|
39
|
-
}, Children.map(children, child => /*#__PURE__*/cloneElement(child, restProps)), restProps.error && /*#__PURE__*/React.createElement(Popup, {
|
|
40
|
-
trapFocus: false,
|
|
41
|
-
className: modules_ee284100.errorBubblePopup,
|
|
42
|
-
hidden: false,
|
|
43
|
-
attached: false,
|
|
44
|
-
directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP]
|
|
45
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: errorBubbleClasses,
|
|
47
|
-
"data-test": "ring-error-bubble"
|
|
48
|
-
}, restProps.error)));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
_defineProperty(ErrorBubble, "propTypes", {
|
|
54
|
-
error: PropTypes.string,
|
|
55
|
-
className: PropTypes.string,
|
|
56
|
-
children: PropTypes.node
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
export default ErrorBubble;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React, { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import Icon from '../icon/icon.js';
|
|
6
|
-
import { Size } from '../icon/icon__constants.js';
|
|
7
|
-
import 'util-deprecate';
|
|
8
|
-
import '../_helpers/icon__svg.js';
|
|
9
|
-
import '../global/memoize.js';
|
|
10
|
-
|
|
11
|
-
var modules_2c5e8509 = {"errorMessage":"errorMessage_errorMessage__dedf193e","title":"errorMessage_title__dedf193e","description":"errorMessage_description__dedf193e","content":"errorMessage_content__dedf193e","icon":"errorMessage_icon__dedf193e"};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @name Error Message
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
class ErrorMessage extends Component {
|
|
18
|
-
render() {
|
|
19
|
-
const {
|
|
20
|
-
className,
|
|
21
|
-
icon,
|
|
22
|
-
code,
|
|
23
|
-
message,
|
|
24
|
-
description,
|
|
25
|
-
children
|
|
26
|
-
} = this.props;
|
|
27
|
-
const classes = classNames(modules_2c5e8509.errorMessage, className);
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: classes
|
|
30
|
-
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
31
|
-
className: modules_2c5e8509.icon,
|
|
32
|
-
glyph: icon,
|
|
33
|
-
size: Size.Size64,
|
|
34
|
-
suppressSizeWarning: true
|
|
35
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
className: modules_2c5e8509.content
|
|
37
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: modules_2c5e8509.title
|
|
39
|
-
}, code && `${code}:`, " ", message), description && /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
className: modules_2c5e8509.description
|
|
41
|
-
}, description), children));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
_defineProperty(ErrorMessage, "propTypes", {
|
|
47
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
48
|
-
code: PropTypes.string,
|
|
49
|
-
message: PropTypes.string,
|
|
50
|
-
description: PropTypes.string,
|
|
51
|
-
children: PropTypes.node,
|
|
52
|
-
className: PropTypes.string
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export default ErrorMessage;
|
package/dist/footer/footer.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import React, { memo, isValidElement } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import Link from '../link/link.js';
|
|
5
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
6
|
-
import 'focus-visible';
|
|
7
|
-
import '../global/memoize.js';
|
|
8
|
-
import '../global/data-tests.js';
|
|
9
|
-
import '../link/clickableLink.js';
|
|
10
|
-
|
|
11
|
-
var modules_7385b3fd = {"unit":"8px","footer-height":"64px","footer":"footer_footer__468241e7 global_font__0f8f4370","footerFloating":"footer_footerFloating__468241e7 footer_footer__468241e7 global_font__0f8f4370","column":"footer_column__468241e7","columnItem":"footer_columnItem__468241e7","columnLeft":"footer_columnLeft__468241e7 footer_column__468241e7","columnCenter":"footer_columnCenter__468241e7 footer_column__468241e7","line":"footer_line__468241e7","columnRight":"footer_columnRight__468241e7 footer_column__468241e7","lineCenter":"footer_lineCenter__468241e7"};
|
|
12
|
-
|
|
13
|
-
const FooterColumn = /*#__PURE__*/memo(function FooterColumn(_ref) {
|
|
14
|
-
let {
|
|
15
|
-
position,
|
|
16
|
-
children
|
|
17
|
-
} = _ref;
|
|
18
|
-
const classes = classNames({
|
|
19
|
-
[modules_7385b3fd.columnLeft]: position === 'left',
|
|
20
|
-
[modules_7385b3fd.columnCenter]: position === 'center',
|
|
21
|
-
[modules_7385b3fd.columnRight]: position === 'right'
|
|
22
|
-
});
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: classes
|
|
25
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
26
|
-
className: modules_7385b3fd.columnItem
|
|
27
|
-
}, children));
|
|
28
|
-
});
|
|
29
|
-
FooterColumn.propTypes = {
|
|
30
|
-
position: PropTypes.string,
|
|
31
|
-
children: PropTypes.node
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Return copyright string
|
|
35
|
-
* @param year {int}
|
|
36
|
-
* @returns {string}
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
function copyright(year) {
|
|
40
|
-
const currentYear = new Date().getUTCFullYear();
|
|
41
|
-
const ndash = '–';
|
|
42
|
-
let ret = 'Copyright © ';
|
|
43
|
-
|
|
44
|
-
if (year >= currentYear) {
|
|
45
|
-
ret += year;
|
|
46
|
-
} else {
|
|
47
|
-
ret += year + ndash + currentYear;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return ret;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @constructor
|
|
54
|
-
* @extends {ReactComponent}
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
const FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
|
|
58
|
-
const items = Array.isArray(props.item) ? props.item : [props.item];
|
|
59
|
-
|
|
60
|
-
function renderItem(item) {
|
|
61
|
-
if ( /*#__PURE__*/isValidElement(item)) {
|
|
62
|
-
return item;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const element = (item.copyright ? copyright(item.copyright) : '') + (item.label || item);
|
|
66
|
-
|
|
67
|
-
if (item.url) {
|
|
68
|
-
return /*#__PURE__*/React.createElement(Link, {
|
|
69
|
-
href: item.url,
|
|
70
|
-
target: item.target,
|
|
71
|
-
key: item.url + item.title,
|
|
72
|
-
title: item.title
|
|
73
|
-
}, element);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return element;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
80
|
-
className: modules_7385b3fd.line
|
|
81
|
-
}, items.map(renderItem));
|
|
82
|
-
});
|
|
83
|
-
FooterLine.propTypes = {
|
|
84
|
-
item: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string])
|
|
85
|
-
};
|
|
86
|
-
const Footer = /*#__PURE__*/memo(function Footer(_ref2) {
|
|
87
|
-
let {
|
|
88
|
-
floating,
|
|
89
|
-
className,
|
|
90
|
-
left,
|
|
91
|
-
center,
|
|
92
|
-
right
|
|
93
|
-
} = _ref2;
|
|
94
|
-
|
|
95
|
-
function content(elements, position) {
|
|
96
|
-
if (!elements) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return /*#__PURE__*/React.createElement(FooterColumn, {
|
|
101
|
-
key: position,
|
|
102
|
-
position: position
|
|
103
|
-
}, elements.map((item, idx) => /*#__PURE__*/React.createElement(FooterLine // eslint-disable-next-line react/no-array-index-key
|
|
104
|
-
, {
|
|
105
|
-
key: idx,
|
|
106
|
-
item: item
|
|
107
|
-
})));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const classes = classNames(modules_7385b3fd.footer, className, {
|
|
111
|
-
[modules_7385b3fd.footerFloating]: floating
|
|
112
|
-
});
|
|
113
|
-
return /*#__PURE__*/React.createElement("footer", {
|
|
114
|
-
className: classes,
|
|
115
|
-
"data-test": "ring-footer"
|
|
116
|
-
}, [content(left, 'left'), content(center, 'center'), content(right, 'right')]);
|
|
117
|
-
});
|
|
118
|
-
Footer.propTypes = {
|
|
119
|
-
className: PropTypes.string,
|
|
120
|
-
floating: PropTypes.bool,
|
|
121
|
-
left: PropTypes.array,
|
|
122
|
-
center: PropTypes.array,
|
|
123
|
-
right: PropTypes.array
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export default Footer;
|
|
127
|
-
export { copyright };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import angular from 'angular';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { unmountComponentAtNode, render } from 'react-dom';
|
|
5
|
-
import RingAngularComponent from './ring-angular-component.js';
|
|
6
|
-
import Renderer from './react-dom-renderer.js';
|
|
7
|
-
import 'prop-types';
|
|
8
|
-
|
|
9
|
-
function getAngularComponentName(name) {
|
|
10
|
-
return `rg${name}`;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function createAngularComponent(Component) {
|
|
14
|
-
var _class, _temp;
|
|
15
|
-
|
|
16
|
-
const propKeys = Object.keys(Component.propTypes);
|
|
17
|
-
const bindings = {};
|
|
18
|
-
propKeys.forEach(key => {
|
|
19
|
-
bindings[key] = '<';
|
|
20
|
-
});
|
|
21
|
-
return _temp = _class = class AngularComponent extends RingAngularComponent {
|
|
22
|
-
$postLink() {
|
|
23
|
-
const {
|
|
24
|
-
$transclude
|
|
25
|
-
} = this.$inject;
|
|
26
|
-
$transclude(clone => {
|
|
27
|
-
this.innerNodes = Array.from(clone);
|
|
28
|
-
this.render();
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
$onChanges() {
|
|
33
|
-
if (!this.innerNodes) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
this.render();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
$onDestroy() {
|
|
41
|
-
unmountComponentAtNode(this.$inject.$element[0]);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
render() {
|
|
45
|
-
var _this = this;
|
|
46
|
-
|
|
47
|
-
const {
|
|
48
|
-
$scope,
|
|
49
|
-
$element: {
|
|
50
|
-
0: container
|
|
51
|
-
}
|
|
52
|
-
} = this.$inject;
|
|
53
|
-
const props = {};
|
|
54
|
-
propKeys.forEach(key => {
|
|
55
|
-
if (this[key] !== undefined) {
|
|
56
|
-
if (typeof this[key] === 'function') {
|
|
57
|
-
props[key] = function () {
|
|
58
|
-
const ret = _this[key](...arguments);
|
|
59
|
-
|
|
60
|
-
$scope.$applyAsync();
|
|
61
|
-
return ret;
|
|
62
|
-
};
|
|
63
|
-
} else {
|
|
64
|
-
props[key] = this[key];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
const hasInnerContent = this.innerNodes && this.innerNodes.length;
|
|
69
|
-
render( /*#__PURE__*/React.createElement(Component, props, hasInnerContent ? /*#__PURE__*/React.createElement(Renderer, {
|
|
70
|
-
nodes: this.innerNodes
|
|
71
|
-
}) : null), container);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
}, _defineProperty(_class, "$inject", ['$scope', '$element', '$transclude']), _defineProperty(_class, "bindings", bindings), _defineProperty(_class, "transclude", true), _temp;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function angularComponentFactory(Component, name) {
|
|
78
|
-
const angularModuleName = `Ring.${name[0].toLowerCase() + name.slice(1)}`;
|
|
79
|
-
return angular.module(angularModuleName, []).component(getAngularComponentName(name), createAngularComponent(Component));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export default angularComponentFactory;
|
|
83
|
-
export { createAngularComponent };
|
package/dist/global/compose.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const compose = function () {
|
|
2
|
-
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3
|
-
funcs[_key] = arguments[_key];
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
return funcs.reduce((acc, func) => arg => acc(func(arg)), arg => arg);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default compose;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var composeRefs = (function () {
|
|
2
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3
|
-
refs[_key] = arguments[_key];
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
return value => refs.forEach(ref => {
|
|
7
|
-
if (typeof ref === 'function') {
|
|
8
|
-
ref(value);
|
|
9
|
-
} else if (ref != null) {
|
|
10
|
-
ref.current = value;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export default composeRefs;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { c as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'conic-gradient';
|
|
3
|
-
import memoize from './memoize.js';
|
|
4
|
-
import supportsCss from './supports-css.js';
|
|
5
|
-
|
|
6
|
-
const conicGradient = memoize(_ref => {
|
|
7
|
-
let {
|
|
8
|
-
stops,
|
|
9
|
-
size
|
|
10
|
-
} = _ref;
|
|
11
|
-
return supportsCss('background-image: conic-gradient(white, black)') ? `conic-gradient(${stops})` : new ConicGradient({
|
|
12
|
-
stops,
|
|
13
|
-
size
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
var conicGradient$1 = (stops => conicGradient(stops).toString());
|
|
17
|
-
const conicGradientWithMask = (mask, stops, size) => {
|
|
18
|
-
const gradient = conicGradient({
|
|
19
|
-
stops,
|
|
20
|
-
size
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
if (!mask.supports && gradient instanceof ConicGradient) {
|
|
24
|
-
Object.defineProperty(gradient, 'svg', {
|
|
25
|
-
value: gradient.svg.replace('<image ', `
|
|
26
|
-
${mask.svgDefs}
|
|
27
|
-
<image mask="url(#${mask.maskId})" `)
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return _objectSpread2(_objectSpread2({}, mask.css), {}, {
|
|
32
|
-
'background-image': gradient.toString()
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default conicGradient$1;
|
|
37
|
-
export { conicGradientWithMask };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { memo, createContext, useState, useContext, useEffect } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
function createStatefulContext(initialValue) {
|
|
5
|
-
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
6
|
-
const ValueContext = /*#__PURE__*/createContext(initialValue);
|
|
7
|
-
const UpdateContext = /*#__PURE__*/createContext(() => {});
|
|
8
|
-
|
|
9
|
-
function Provider(_ref) {
|
|
10
|
-
let {
|
|
11
|
-
children
|
|
12
|
-
} = _ref;
|
|
13
|
-
const [value, update] = useState(initialValue);
|
|
14
|
-
return /*#__PURE__*/React.createElement(ValueContext.Provider, {
|
|
15
|
-
value: value
|
|
16
|
-
}, /*#__PURE__*/React.createElement(UpdateContext.Provider, {
|
|
17
|
-
value: update
|
|
18
|
-
}, children));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
Provider.propTypes = {
|
|
22
|
-
children: PropTypes.node
|
|
23
|
-
};
|
|
24
|
-
Provider.displayName = `${name}Provider`;
|
|
25
|
-
|
|
26
|
-
function useUpdate(value, skipUpdate) {
|
|
27
|
-
const update = useContext(UpdateContext);
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (!skipUpdate) {
|
|
30
|
-
update(value);
|
|
31
|
-
}
|
|
32
|
-
}, [update, value, skipUpdate]);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function Updater(_ref2) {
|
|
36
|
-
let {
|
|
37
|
-
value,
|
|
38
|
-
skipUpdate
|
|
39
|
-
} = _ref2;
|
|
40
|
-
useUpdate(value, skipUpdate);
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
Updater.displayName = `${name}Updater`;
|
|
45
|
-
return {
|
|
46
|
-
ValueContext,
|
|
47
|
-
UpdateContext,
|
|
48
|
-
Provider,
|
|
49
|
-
useUpdate,
|
|
50
|
-
Updater: /*#__PURE__*/memo(Updater)
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export default createStatefulContext;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function expandMap(attrsMap) {
|
|
2
|
-
return Object.entries(attrsMap).reduce((result, _ref) => {
|
|
3
|
-
let [key, value] = _ref;
|
|
4
|
-
return value ? [...result, key] : result;
|
|
5
|
-
}, []);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function joinDataTestAttributes() {
|
|
9
|
-
for (var _len = arguments.length, attrs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10
|
-
attrs[_key] = arguments[_key];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return attrs.filter(attr => !!attr).reduce((result, attr) => {
|
|
14
|
-
if (typeof attr === 'object') {
|
|
15
|
-
return [...result, ...expandMap(attr)];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return [...result, attr];
|
|
19
|
-
}, []).join(' ');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default joinDataTestAttributes;
|