@jetbrains/ring-ui-built 7.0.0-beta.9 → 7.0.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/components/_helpers/anchor.js +4 -4
- package/components/_helpers/button__classes.js +13 -13
- package/components/_helpers/caption.js +3 -3
- package/components/_helpers/card.js +23 -20
- package/components/_helpers/date-picker.js +2 -2
- package/components/_helpers/dialog__body-scroll-preventer.js +4 -4
- package/components/_helpers/grid.js +2 -2
- package/components/_helpers/header.js +2 -2
- package/components/_helpers/heading.js +2 -2
- package/components/_helpers/icon__svg.js +6 -6
- package/components/_helpers/input.js +14 -14
- package/components/_helpers/island.js +2 -2
- package/components/_helpers/link.js +2 -2
- package/components/_helpers/list.js +2 -2
- package/components/_helpers/query-assist__suggestions.js +7 -7
- package/components/_helpers/select__filter.js +3 -3
- package/components/_helpers/services-link.js +3 -3
- package/components/_helpers/sidebar.js +9 -9
- package/components/_helpers/tab-link.js +7 -7
- package/components/_helpers/table.js +2 -2
- package/components/_helpers/theme.js +10 -10
- package/components/_helpers/title.js +7 -7
- package/components/alert/alert.d.ts +2 -2
- package/components/alert/alert.js +12 -13
- package/components/alert/container.js +4 -4
- package/components/alert-service/alert-service.js +0 -1
- package/components/auth/auth.js +0 -1
- package/components/auth/auth__core.js +1 -2
- package/components/auth/background-flow.js +2 -2
- package/components/auth/down-notification.js +5 -6
- package/components/auth/iframe-flow.js +0 -1
- package/components/auth/storage.js +0 -1
- package/components/auth/token-validator.js +1 -1
- package/components/auth-dialog/auth-dialog.js +10 -11
- package/components/auth-dialog-service/auth-dialog-service.js +2 -3
- package/components/avatar/avatar.js +6 -6
- package/components/breadcrumbs/breadcrumbs.js +2 -2
- package/components/button/button.js +4 -4
- package/components/button/button__classes.d.ts +1 -1
- package/components/button-group/button-group.js +3 -4
- package/components/button-set/button-set.js +2 -3
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -3
- package/components/checkbox/checkbox.js +8 -8
- package/components/clipboard/clipboard.js +0 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +7 -7
- package/components/collapse/collapse-content.js +4 -5
- package/components/collapse/collapse-control.js +0 -1
- package/components/confirm/confirm.d.ts +2 -2
- package/components/confirm/confirm.js +3 -4
- package/components/confirm-service/confirm-service.d.ts +1 -1
- package/components/confirm-service/confirm-service.js +1 -2
- package/components/content-layout/content-layout.js +4 -4
- package/components/contenteditable/contenteditable.d.ts +1 -1
- package/components/control-help/control-help.js +2 -2
- package/components/control-label/control-label.js +5 -5
- package/components/data-list/data-list.d.ts +2 -2
- package/components/data-list/data-list.js +6 -7
- package/components/data-list/data-list.mock.js +16 -10
- package/components/data-list/item.js +8 -9
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.d.ts +2 -1
- package/components/date-picker/date-picker.js +12 -12
- package/components/date-picker/date-popup.js +4 -5
- package/components/date-picker/day.js +15 -15
- package/components/date-picker/month-names.js +5 -5
- package/components/date-picker/month-slider.js +3 -3
- package/components/date-picker/month.js +3 -3
- package/components/date-picker/months.js +3 -3
- package/components/date-picker/weekdays.js +4 -4
- package/components/date-picker/years.js +5 -5
- package/components/dialog/dialog.d.ts +1 -0
- package/components/dialog/dialog.js +22 -18
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +2 -3
- package/components/dropdown-menu/dropdown-menu.js +0 -1
- package/components/editable-heading/editable-heading.js +19 -19
- package/components/error-bubble/error-bubble.js +5 -5
- package/components/error-message/error-message.js +6 -7
- package/components/footer/footer.js +9 -10
- package/components/form/form.js +2 -3
- package/components/global/compose.js +0 -2
- package/components/global/data-tests.js +0 -1
- package/components/global/theme.js +1 -2
- package/components/grid/col.js +5 -4
- package/components/grid/grid.js +5 -4
- package/components/grid/row.js +5 -5
- package/components/group/group.js +5 -3
- package/components/header/header-icon.js +4 -4
- package/components/header/header.js +3 -4
- package/components/header/links.js +2 -2
- package/components/header/logo.js +2 -2
- package/components/header/profile.d.ts +2 -2
- package/components/header/profile.js +10 -11
- package/components/header/services-link.js +0 -1
- package/components/header/services.js +7 -8
- package/components/header/smart-profile.js +0 -1
- package/components/header/smart-services.js +0 -1
- package/components/header/tray.js +3 -3
- package/components/heading/heading.js +3 -3
- package/components/http/http.d.ts +3 -3
- package/components/icon/icon.js +8 -6
- package/components/input/input-legacy.js +2 -3
- package/components/input-size/input-size.js +2 -3
- package/components/island/content.js +7 -7
- package/components/island/header.js +4 -4
- package/components/island/island.js +4 -5
- package/components/link/link.js +7 -8
- package/components/list/list.d.ts +1 -1
- package/components/list/list.js +5 -6
- package/components/list/list__custom.js +5 -6
- package/components/list/list__hint.js +2 -2
- package/components/list/list__item.js +22 -23
- package/components/list/list__link.js +5 -6
- package/components/list/list__separator.js +3 -3
- package/components/list/list__title.js +5 -5
- package/components/list/list__users-groups-source.js +0 -1
- package/components/loader/loader.js +0 -1
- package/components/loader/loader__core.js +5 -5
- package/components/loader-inline/loader-inline.js +3 -4
- package/components/loader-screen/loader-screen.js +4 -5
- package/components/login-dialog/login-dialog.js +6 -7
- package/components/login-dialog/service.js +1 -2
- package/components/markdown/markdown.d.ts +2 -2
- package/components/markdown/markdown.js +6 -6
- package/components/message/message.js +9 -10
- package/components/old-browsers-message/old-browsers-message.js +0 -1
- package/components/old-browsers-message/old-browsers-message__stop.js +0 -1
- package/components/old-browsers-message/white-list.js +2 -3
- package/components/pager/pager.js +9 -10
- package/components/panel/panel.js +2 -2
- package/components/permissions/permissions.js +0 -1
- package/components/permissions/permissions__cache.js +2 -3
- package/components/popup/popup.js +6 -7
- package/components/popup/position.js +2 -2
- package/components/popup-menu/popup-menu.js +0 -1
- package/components/progress-bar/progress-bar.d.ts +2 -2
- package/components/progress-bar/progress-bar.js +5 -5
- package/components/query-assist/query-assist.js +27 -28
- package/components/query-assist/query-assist__suggestions.js +0 -1
- package/components/radio/radio__item.js +5 -5
- package/components/scrollable-section/scrollable-section.js +6 -6
- package/components/select/select.d.ts +1 -1
- package/components/select/select.js +25 -25
- package/components/select/select__filter.js +0 -1
- package/components/select/select__popup.js +11 -12
- package/components/shortcuts/core.js +2 -2
- package/components/slider/slider.js +20 -20
- package/components/storage/storage.js +0 -1
- package/components/storage/storage__local.js +0 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +2 -2
- package/components/table/cell.js +2 -3
- package/components/table/header-cell.js +8 -9
- package/components/table/header.d.ts +1 -2
- package/components/table/header.js +7 -14
- package/components/table/row-with-focus-sensor.js +0 -1
- package/components/table/row.d.ts +0 -1
- package/components/table/row.js +11 -18
- package/components/table/selection.d.ts +2 -3
- package/components/table/simple-table.js +2 -3
- package/components/table/smart-table.js +0 -1
- package/components/table/table.d.ts +0 -1
- package/components/table/table.js +17 -20
- package/components/tabs/collapsible-more.d.ts +1 -1
- package/components/tabs/collapsible-more.js +6 -7
- package/components/tabs/collapsible-tab.js +4 -5
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +5 -6
- package/components/tabs/dumb-tabs.js +5 -6
- package/components/tabs/smart-tabs.js +0 -1
- package/components/tabs/tab-link.js +0 -1
- package/components/tabs/tab.js +0 -1
- package/components/tabs/tabs.js +0 -1
- package/components/tag/tag.d.ts +1 -1
- package/components/tag/tag.js +14 -15
- package/components/tags-input/tags-input.js +8 -9
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +2 -2
- package/components/text/text.js +7 -7
- package/components/toggle/toggle.d.ts +2 -2
- package/components/toggle/toggle.js +12 -13
- package/components/tooltip/tooltip.js +12 -6
- package/components/user-agreement/service.js +1 -2
- package/components/user-agreement/user-agreement.js +7 -8
- package/components/user-card/card.js +3 -2
- package/components/user-card/smart-user-card-tooltip.js +5 -4
- package/components/user-card/tooltip.js +5 -4
- package/components/user-card/user-card.js +3 -2
- package/package.json +6 -5
- package/typings.d.ts +2 -4
- package/components/_helpers/badge.js +0 -3
- package/components/badge/badge.d.ts +0 -14
- package/components/badge/badge.js +0 -47
- package/components/island-legacy/content-legacy.d.ts +0 -5
- package/components/island-legacy/content-legacy.js +0 -23
- package/components/island-legacy/header-legacy.d.ts +0 -5
- package/components/island-legacy/header-legacy.js +0 -26
- package/components/island-legacy/island-legacy.d.ts +0 -7
- package/components/island-legacy/island-legacy.js +0 -25
@@ -20,7 +20,7 @@ import Link from '../link/link.js';
|
|
20
20
|
import { S as Size } from '../_helpers/input.js';
|
21
21
|
import { I18nContext } from '../i18n/i18n-context.js';
|
22
22
|
import DatePopup from './date-popup.js';
|
23
|
-
import {
|
23
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
24
24
|
import formats from './formats.js';
|
25
25
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
26
26
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -35,7 +35,6 @@ import 'combokeys';
|
|
35
35
|
import '../global/sniffer.js';
|
36
36
|
import 'sniffr';
|
37
37
|
import '../global/data-tests.js';
|
38
|
-
import 'core-js/modules/es.array.reduce.js';
|
39
38
|
import '../tab-trap/tab-trap.js';
|
40
39
|
import '../popup/position.js';
|
41
40
|
import 'core-js/modules/es.array.sort.js';
|
@@ -226,13 +225,13 @@ class DatePicker extends PureComponent {
|
|
226
225
|
render() {
|
227
226
|
var _this$props$disabled, _this$props$disabled2;
|
228
227
|
const anchorContent = /*#__PURE__*/jsxs("div", {
|
229
|
-
className:
|
228
|
+
className: styles.anchorContent,
|
230
229
|
children: [/*#__PURE__*/jsx(Icon, {
|
231
230
|
glyph: calendarIcon,
|
232
|
-
className:
|
231
|
+
className: styles.calendarIcon
|
233
232
|
}), this.getAnchorText(), /*#__PURE__*/jsx(Icon, {
|
234
233
|
glyph: chevronDownIcon,
|
235
|
-
className:
|
234
|
+
className: styles.chevronDownIcon
|
236
235
|
})]
|
237
236
|
});
|
238
237
|
const _this$props = this.props,
|
@@ -245,8 +244,8 @@ class DatePicker extends PureComponent {
|
|
245
244
|
translations
|
246
245
|
} = _this$props,
|
247
246
|
datePopupProps = _objectWithoutProperties(_this$props, _excluded2);
|
248
|
-
const classes = classNames(
|
249
|
-
[
|
247
|
+
const classes = classNames(styles.datePicker, className, styles["size".concat(this.props.size)], {
|
248
|
+
[styles.inline]: inline
|
250
249
|
});
|
251
250
|
return /*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2({
|
252
251
|
className: classes,
|
@@ -254,17 +253,18 @@ class DatePicker extends PureComponent {
|
|
254
253
|
"data-test": "ring-date-picker",
|
255
254
|
anchor: inline ? /*#__PURE__*/jsx(Link, {
|
256
255
|
"data-test-ring-dropdown-anchor": true,
|
257
|
-
className:
|
256
|
+
className: styles.anchor,
|
258
257
|
disabled: (_this$props$disabled = this.props.disabled) !== null && _this$props$disabled !== void 0 ? _this$props$disabled : false,
|
259
258
|
pseudo: true,
|
260
259
|
children: this.getAnchorText()
|
261
|
-
}) : /*#__PURE__*/jsx(Button, {
|
260
|
+
}) : /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
262
261
|
"data-test-ring-dropdown-anchor": true,
|
263
|
-
className:
|
262
|
+
className: styles.anchor,
|
264
263
|
text: false,
|
265
|
-
disabled: (_this$props$disabled2 = this.props.disabled) !== null && _this$props$disabled2 !== void 0 ? _this$props$disabled2 : false
|
264
|
+
disabled: (_this$props$disabled2 = this.props.disabled) !== null && _this$props$disabled2 !== void 0 ? _this$props$disabled2 : false
|
265
|
+
}, this.props.buttonAttributes), {}, {
|
266
266
|
children: anchorContent
|
267
|
-
})
|
267
|
+
}))
|
268
268
|
}, dropdownProps), {}, {
|
269
269
|
children: /*#__PURE__*/jsx(PopupComponent, {
|
270
270
|
className: popupClassName,
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { _ as _defineProperty, b as _objectSpread2, a as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
-
import 'core-js/modules/es.array.reduce.js';
|
3
2
|
import * as React from 'react';
|
4
3
|
import { Component, createElement } from 'react';
|
5
4
|
import { isAfter } from 'date-fns/isAfter';
|
@@ -13,7 +12,7 @@ import Months from './months.js';
|
|
13
12
|
import Years from './years.js';
|
14
13
|
import Weekdays from './weekdays.js';
|
15
14
|
import { parseTime } from './consts.js';
|
16
|
-
import {
|
15
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
17
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
18
17
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
19
18
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -368,11 +367,11 @@ class DatePopup extends Component {
|
|
368
367
|
});
|
369
368
|
const clearable = Boolean(this.props.onClear);
|
370
369
|
return /*#__PURE__*/jsxs("div", {
|
371
|
-
className:
|
370
|
+
className: styles.datePopup,
|
372
371
|
"data-test": "ring-date-popup",
|
373
372
|
ref: this.componentRef,
|
374
373
|
children: [/*#__PURE__*/jsxs("div", {
|
375
|
-
className:
|
374
|
+
className: styles.filterWrapper,
|
376
375
|
children: [names.map(name => {
|
377
376
|
let onClear;
|
378
377
|
if (clearable && name !== 'from' && !this.isInTimeMode()) {
|
@@ -408,7 +407,7 @@ class DatePopup extends Component {
|
|
408
407
|
}), /*#__PURE__*/jsx(Weekdays, {
|
409
408
|
locale: locale
|
410
409
|
}), /*#__PURE__*/jsxs("div", {
|
411
|
-
className:
|
410
|
+
className: styles.calendar,
|
412
411
|
children: [/*#__PURE__*/jsx(Months, _objectSpread2(_objectSpread2({}, calendarProps), {}, {
|
413
412
|
onHover: this.hoverHandler,
|
414
413
|
onSelect: this.selectHandler,
|
@@ -12,7 +12,7 @@ import { isSameDay } from 'date-fns/isSameDay';
|
|
12
12
|
import { isToday } from 'date-fns/isToday';
|
13
13
|
import { startOfDay } from 'date-fns/startOfDay';
|
14
14
|
import { getDayNumInWeek, weekdays } from './consts.js';
|
15
|
-
import {
|
15
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
17
17
|
import 'core-js/modules/es.regexp.exec.js';
|
18
18
|
import 'date-fns/add';
|
@@ -69,19 +69,19 @@ class Day extends Component {
|
|
69
69
|
// TODO make keyboard navigation actually work
|
70
70
|
jsx("button", {
|
71
71
|
type: "button",
|
72
|
-
className: classNames(
|
73
|
-
[
|
74
|
-
[
|
75
|
-
[
|
76
|
-
[
|
77
|
-
[
|
78
|
-
[
|
79
|
-
[
|
80
|
-
[
|
81
|
-
[
|
82
|
-
[
|
83
|
-
[
|
84
|
-
[
|
72
|
+
className: classNames(styles.day, styles["Day".concat(dayInWeek)], {
|
73
|
+
[styles.current]: ['date', 'from', 'to'].some(this.is),
|
74
|
+
[styles.active]: !disabled && this.is('activeDate'),
|
75
|
+
[styles.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day)),
|
76
|
+
[styles.empty]: empty,
|
77
|
+
[styles.from]: currentRange && this.isDay(currentRange[0]) && !reverse || activeRange && this.isDay(activeRange[0]),
|
78
|
+
[styles.to]: currentRange && this.isDay(currentRange[1]) || activeRange && this.isDay(activeRange[1]),
|
79
|
+
[styles.between]: this.inRange(currentRange),
|
80
|
+
[styles.activeBetween]: !disabled && this.inRange(activeRange),
|
81
|
+
[styles.first]: getDate(day) === 1,
|
82
|
+
[styles.spread]: this.inRange(spreadRange),
|
83
|
+
[styles.activeSpread]: !disabled && this.inRange(activeSpreadRange),
|
84
|
+
[styles.disabled]: disabled
|
85
85
|
}),
|
86
86
|
onClick: this.handleClick,
|
87
87
|
onMouseOver: this.handleMouseOver,
|
@@ -91,7 +91,7 @@ class Day extends Component {
|
|
91
91
|
disabled: disabled,
|
92
92
|
children: empty || /*#__PURE__*/jsx("span", {
|
93
93
|
className: classNames({
|
94
|
-
[
|
94
|
+
[styles.today]: isToday(day)
|
95
95
|
}),
|
96
96
|
children: format(day, 'd')
|
97
97
|
})
|
@@ -11,7 +11,7 @@ import { startOfYear } from 'date-fns/startOfYear';
|
|
11
11
|
import linearFunction from '../global/linear-function.js';
|
12
12
|
import MonthSlider from './month-slider.js';
|
13
13
|
import { YEAR, MIDDLE_DAY, yearScrollSpeed } from './consts.js';
|
14
|
-
import {
|
14
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
15
15
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
16
16
|
import 'date-fns/addYears';
|
17
17
|
import 'date-fns/subYears';
|
@@ -33,8 +33,8 @@ class MonthName extends PureComponent {
|
|
33
33
|
} = this.props;
|
34
34
|
return /*#__PURE__*/jsx("button", {
|
35
35
|
type: "button",
|
36
|
-
className: classNames(
|
37
|
-
[
|
36
|
+
className: classNames(styles.monthName, {
|
37
|
+
[styles.today]: isThisMonth(month)
|
38
38
|
}),
|
39
39
|
onClick: this.handleClick,
|
40
40
|
children: format(month, 'LLL', {
|
@@ -63,13 +63,13 @@ function MonthNames(props) {
|
|
63
63
|
[top, bottom] = props.currentRange.map(date => Math.floor(pxToDate.x(Number(date))));
|
64
64
|
}
|
65
65
|
return /*#__PURE__*/jsxs("div", {
|
66
|
-
className:
|
66
|
+
className: styles.monthNames,
|
67
67
|
children: [months.map(month => /*#__PURE__*/jsx(MonthName, {
|
68
68
|
month: month,
|
69
69
|
onScrollChange: props.onScrollChange,
|
70
70
|
locale: locale
|
71
71
|
}, +month)), props.currentRange && /*#__PURE__*/jsx("div", {
|
72
|
-
className:
|
72
|
+
className: styles.range,
|
73
73
|
style: {
|
74
74
|
top: top - 1,
|
75
75
|
height: bottom + 1 - (top - 1)
|
@@ -7,7 +7,7 @@ import { startOfDay } from 'date-fns/startOfDay';
|
|
7
7
|
import { subYears } from 'date-fns/subYears';
|
8
8
|
import linearFunction from '../global/linear-function.js';
|
9
9
|
import units, { yearScrollSpeed } from './consts.js';
|
10
|
-
import {
|
10
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
12
12
|
import 'core-js/modules/es.regexp.exec.js';
|
13
13
|
import 'date-fns/add';
|
@@ -49,8 +49,8 @@ class MonthSlider extends PureComponent {
|
|
49
49
|
year = addYears(year, 1);
|
50
50
|
years.push(year);
|
51
51
|
}
|
52
|
-
const classes = classNames(
|
53
|
-
[
|
52
|
+
const classes = classNames(styles.monthSlider, {
|
53
|
+
[styles.dragging]: this.state.dragging
|
54
54
|
});
|
55
55
|
return /*#__PURE__*/jsx("div", {
|
56
56
|
children: years.map(date => /*#__PURE__*/jsx("button", {
|
@@ -6,7 +6,7 @@ import { getDay } from 'date-fns/getDay';
|
|
6
6
|
import { setDay } from 'date-fns/setDay';
|
7
7
|
import Day from './day.js';
|
8
8
|
import { shiftWeekArray, getWeekStartsOn, weekdays, FIFTH_DAY, WEEK } from './consts.js';
|
9
|
-
import {
|
9
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
10
10
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
11
11
|
import { createElement } from 'react';
|
12
12
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
@@ -37,9 +37,9 @@ function Month(props) {
|
|
37
37
|
day = addDays(day, 1);
|
38
38
|
}
|
39
39
|
return /*#__PURE__*/jsxs("div", {
|
40
|
-
className:
|
40
|
+
className: styles.month,
|
41
41
|
children: [/*#__PURE__*/jsx("span", {
|
42
|
-
className:
|
42
|
+
className: styles.monthTitle,
|
43
43
|
children: format(props.month, 'LLLL', {
|
44
44
|
locale
|
45
45
|
})
|
@@ -11,7 +11,7 @@ import linearFunction from '../global/linear-function.js';
|
|
11
11
|
import useEventCallback from '../global/use-event-callback.js';
|
12
12
|
import Month from './month.js';
|
13
13
|
import MonthNames from './month-names.js';
|
14
|
-
import {
|
14
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
15
15
|
import units, { DOUBLE, HALF, WEEK, weekdays } from './consts.js';
|
16
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
17
17
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
@@ -111,13 +111,13 @@ function Months(props) {
|
|
111
111
|
};
|
112
112
|
}, [handleWheel]);
|
113
113
|
return /*#__PURE__*/jsxs("div", {
|
114
|
-
className:
|
114
|
+
className: styles.months,
|
115
115
|
ref: componentRef,
|
116
116
|
children: [/*#__PURE__*/jsx("div", {
|
117
117
|
style: {
|
118
118
|
top: Math.floor(calHeight * HALF - monthHeight(months[0]) - monthHeight(months[1]) + offset)
|
119
119
|
},
|
120
|
-
className:
|
120
|
+
className: styles.days,
|
121
121
|
children: months.map(date => /*#__PURE__*/createElement(Month, _objectSpread2(_objectSpread2({}, props), {}, {
|
122
122
|
month: date,
|
123
123
|
key: +date
|
@@ -4,7 +4,7 @@ import { format } from 'date-fns/format';
|
|
4
4
|
import { setDay } from 'date-fns/setDay';
|
5
5
|
import { startOfDay } from 'date-fns/startOfDay';
|
6
6
|
import { shiftWeekArray, getWeekStartsOn, weekdays } from './consts.js';
|
7
|
-
import {
|
7
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
9
9
|
import 'core-js/modules/es.regexp.exec.js';
|
10
10
|
import 'date-fns/add';
|
@@ -15,10 +15,10 @@ function Weekdays(props) {
|
|
15
15
|
locale
|
16
16
|
} = props;
|
17
17
|
return /*#__PURE__*/jsx("div", {
|
18
|
-
className:
|
18
|
+
className: styles.weekdays,
|
19
19
|
children: days.map(day => /*#__PURE__*/jsx("span", {
|
20
|
-
className: classNames(
|
21
|
-
[
|
20
|
+
className: classNames(styles.weekday, {
|
21
|
+
[styles.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day))
|
22
22
|
}),
|
23
23
|
children: format(day, 'EEEEEE', {
|
24
24
|
locale
|
@@ -11,7 +11,7 @@ import { setYear } from 'date-fns/setYear';
|
|
11
11
|
import { startOfYear } from 'date-fns/startOfYear';
|
12
12
|
import { subYears } from 'date-fns/subYears';
|
13
13
|
import linearFunction from '../global/linear-function.js';
|
14
|
-
import {
|
14
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
15
15
|
import units, { DOUBLE, HALF, yearDuration } from './consts.js';
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
17
17
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -86,7 +86,7 @@ class Years extends PureComponent {
|
|
86
86
|
}
|
87
87
|
const pxToDate = linearFunction(0, Number(years[0]), yearDuration / yearHeight);
|
88
88
|
return /*#__PURE__*/jsx("div", {
|
89
|
-
className:
|
89
|
+
className: styles.years,
|
90
90
|
ref: this.componentRef,
|
91
91
|
style: {
|
92
92
|
transition: this.stoppedScrolling ? 'top .2s ease-out 0s' : 'none',
|
@@ -94,9 +94,9 @@ class Years extends PureComponent {
|
|
94
94
|
},
|
95
95
|
children: years.map(item => /*#__PURE__*/jsx("button", {
|
96
96
|
type: "button",
|
97
|
-
className: classNames(
|
98
|
-
[
|
99
|
-
[
|
97
|
+
className: classNames(styles.year, {
|
98
|
+
[styles.currentYear]: isSameYear(item, date),
|
99
|
+
[styles.today]: isThisYear(item)
|
100
100
|
}),
|
101
101
|
onClick: function handleClick() {
|
102
102
|
onScrollChange(Number(setYear(scrollDate, getYear(item))));
|
@@ -20,6 +20,7 @@ export interface DialogProps extends Partial<TabTrapProps> {
|
|
20
20
|
dense?: boolean | null | undefined;
|
21
21
|
native?: boolean;
|
22
22
|
modal?: boolean;
|
23
|
+
preventBodyScroll?: boolean;
|
23
24
|
}
|
24
25
|
export default class Dialog extends PureComponent<DialogProps> {
|
25
26
|
static defaultProps: Partial<DialogProps>;
|
@@ -11,7 +11,7 @@ import Shortcuts from '../shortcuts/shortcuts.js';
|
|
11
11
|
import TabTrap from '../tab-trap/tab-trap.js';
|
12
12
|
import { Button } from '../button/button.js';
|
13
13
|
import { PopupTarget } from '../popup/popup.target.js';
|
14
|
-
import { p as preventerFactory,
|
14
|
+
import { p as preventerFactory, s as styles } from '../_helpers/dialog__body-scroll-preventer.js';
|
15
15
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
16
16
|
import '../island/adaptive-island-hoc.js';
|
17
17
|
import '../global/linear-function.js';
|
@@ -20,7 +20,6 @@ import '../island/header.js';
|
|
20
20
|
import '../island/content.js';
|
21
21
|
import 'element-resize-detector';
|
22
22
|
import '../global/schedule-raf.js';
|
23
|
-
import 'core-js/modules/es.array.reduce.js';
|
24
23
|
import '../shortcuts/core.js';
|
25
24
|
import 'core-js/modules/es.regexp.exec.js';
|
26
25
|
import 'combokeys';
|
@@ -39,7 +38,7 @@ import '../global/controls-height.js';
|
|
39
38
|
import '../_helpers/button__classes.js';
|
40
39
|
import 'scrollbar-width';
|
41
40
|
|
42
|
-
const _excluded = ["show", "showCloseButton", "onOverlayClick", "onCloseAttempt", "onEscPress", "onCloseClick", "children", "className", "contentClassName", "trapFocus", "data-test", "closeButtonInside", "portalTarget", "label", "closeButtonTitle", "dense", "shortcutOptions", "native", "modal"];
|
41
|
+
const _excluded = ["show", "showCloseButton", "onOverlayClick", "onCloseAttempt", "onEscPress", "onCloseClick", "children", "className", "contentClassName", "trapFocus", "data-test", "closeButtonInside", "portalTarget", "label", "closeButtonTitle", "dense", "shortcutOptions", "native", "modal", "preventBodyScroll"];
|
43
42
|
function noop() {}
|
44
43
|
class Dialog extends PureComponent {
|
45
44
|
constructor() {
|
@@ -118,6 +117,9 @@ class Dialog extends PureComponent {
|
|
118
117
|
}
|
119
118
|
}
|
120
119
|
toggleScrollPreventer() {
|
120
|
+
if (!this.props.preventBodyScroll) {
|
121
|
+
return;
|
122
|
+
}
|
121
123
|
if (this.props.show) {
|
122
124
|
this.scrollPreventer.prevent();
|
123
125
|
} else {
|
@@ -145,10 +147,11 @@ class Dialog extends PureComponent {
|
|
145
147
|
dense,
|
146
148
|
shortcutOptions,
|
147
149
|
native,
|
148
|
-
modal
|
150
|
+
modal,
|
151
|
+
preventBodyScroll
|
149
152
|
} = _this$props,
|
150
153
|
restProps = _objectWithoutProperties(_this$props, _excluded);
|
151
|
-
const classes = classNames(
|
154
|
+
const classes = classNames(styles.container, className);
|
152
155
|
const shortcutsMap = this.getShortcutsMap();
|
153
156
|
const content = /*#__PURE__*/jsxs(Fragment, {
|
154
157
|
children: [/*#__PURE__*/jsx(Shortcuts, {
|
@@ -158,14 +161,14 @@ class Dialog extends PureComponent {
|
|
158
161
|
}), (onOverlayClick !== noop || onCloseAttempt !== noop) && /*#__PURE__*/jsx("div", {
|
159
162
|
// click handler is duplicated in close button
|
160
163
|
role: "presentation",
|
161
|
-
className:
|
164
|
+
className: styles.clickableOverlay,
|
162
165
|
onClick: this.handleClick,
|
163
166
|
"data-test": "ring-dialog-overlay"
|
164
167
|
}), /*#__PURE__*/jsx("div", {
|
165
|
-
className:
|
168
|
+
className: styles.innerContainer,
|
166
169
|
children: /*#__PURE__*/jsxs(AdaptiveIsland, {
|
167
|
-
className: classNames(
|
168
|
-
[
|
170
|
+
className: classNames(styles.content, contentClassName, {
|
171
|
+
[styles.dense]: dense
|
169
172
|
}),
|
170
173
|
"data-test": "ring-dialog",
|
171
174
|
role: "dialog",
|
@@ -173,11 +176,11 @@ class Dialog extends PureComponent {
|
|
173
176
|
children: [children, showCloseButton && /*#__PURE__*/jsx(Button, {
|
174
177
|
icon: closeIcon,
|
175
178
|
"data-test": "ring-dialog-close-button",
|
176
|
-
className: classNames(
|
177
|
-
[
|
178
|
-
[
|
179
|
+
className: classNames(styles.closeButton, {
|
180
|
+
[styles.closeButtonOutside]: !closeButtonInside,
|
181
|
+
[styles.closeButtonInside]: closeButtonInside
|
179
182
|
}),
|
180
|
-
iconClassName:
|
183
|
+
iconClassName: styles.closeIcon,
|
181
184
|
onClick: this.onCloseClick,
|
182
185
|
title: closeButtonTitle,
|
183
186
|
"aria-label": closeButtonTitle || 'close dialog'
|
@@ -187,20 +190,20 @@ class Dialog extends PureComponent {
|
|
187
190
|
});
|
188
191
|
if (native) {
|
189
192
|
return /*#__PURE__*/jsx("dialog", {
|
190
|
-
className: classNames(
|
193
|
+
className: classNames(styles.nativeDialog, className),
|
191
194
|
ref: this.nativeDialog,
|
192
195
|
children: /*#__PURE__*/jsx(PopupTarget, {
|
193
196
|
id: this.uid,
|
194
|
-
className:
|
197
|
+
className: styles.popupTarget,
|
195
198
|
children: target => /*#__PURE__*/jsxs(Fragment, {
|
196
199
|
children: [content, target]
|
197
200
|
})
|
198
201
|
})
|
199
202
|
});
|
200
203
|
}
|
201
|
-
return show && /*#__PURE__*/createPortal(
|
204
|
+
return show && /*#__PURE__*/createPortal(/*#__PURE__*/jsx(PopupTarget, {
|
202
205
|
id: this.uid,
|
203
|
-
className:
|
206
|
+
className: styles.popupTarget,
|
204
207
|
children: target => /*#__PURE__*/jsxs(TabTrap, _objectSpread2(_objectSpread2({
|
205
208
|
trapDisabled: !trapFocus,
|
206
209
|
"data-test": joinDataTestAttributes('ring-dialog-container', dataTest),
|
@@ -226,7 +229,8 @@ _defineProperty(Dialog, "defaultProps", {
|
|
226
229
|
},
|
227
230
|
trapFocus: false,
|
228
231
|
autoFocusFirst: true,
|
229
|
-
modal: true
|
232
|
+
modal: true,
|
233
|
+
preventBodyScroll: true
|
230
234
|
});
|
231
235
|
|
232
236
|
export { Dialog as default };
|
@@ -26,8 +26,8 @@ export interface DropdownProps extends Omit<HTMLAttributes<HTMLElement>, 'childr
|
|
26
26
|
hoverMode: boolean;
|
27
27
|
hoverShowTimeOut: number;
|
28
28
|
hoverHideTimeOut: number;
|
29
|
-
onShow: (
|
30
|
-
onHide: (
|
29
|
+
onShow: () => void;
|
30
|
+
onHide: () => void;
|
31
31
|
activeClassName?: string | null | undefined;
|
32
32
|
'data-test'?: string | null | undefined;
|
33
33
|
}
|
@@ -4,9 +4,8 @@ import { Component, cloneElement } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import joinDataTestAttributes from '../global/data-tests.js';
|
6
6
|
import { isArray } from '../global/typescript-utils.js';
|
7
|
-
import {
|
7
|
+
import { s as styles, A as Anchor } from '../_helpers/anchor.js';
|
8
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
9
|
-
import 'core-js/modules/es.array.reduce.js';
|
10
9
|
import '@jetbrains/icons/chevron-10px';
|
11
10
|
import '../icon/icon.js';
|
12
11
|
import 'util-deprecate';
|
@@ -140,7 +139,7 @@ class Dropdown extends Component {
|
|
140
139
|
disabled
|
141
140
|
} = _this$props3,
|
142
141
|
restProps = _objectWithoutProperties(_this$props3, _excluded);
|
143
|
-
const classes = classNames(
|
142
|
+
const classes = classNames(styles.dropdown, className, {
|
144
143
|
[activeClassName !== null && activeClassName !== void 0 ? activeClassName : '']: activeClassName != null && show
|
145
144
|
});
|
146
145
|
let anchorElement;
|
@@ -17,7 +17,6 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
17
17
|
import 'util-deprecate';
|
18
18
|
import 'memoize-one';
|
19
19
|
import '../global/data-tests.js';
|
20
|
-
import 'core-js/modules/es.array.reduce.js';
|
21
20
|
import '../global/schedule-raf.js';
|
22
21
|
import '../global/memoize.js';
|
23
22
|
import '../global/dom.js';
|
@@ -6,7 +6,7 @@ import { useCallback, useEffect } from 'react';
|
|
6
6
|
import classNames from 'classnames';
|
7
7
|
import Heading, { Levels } from '../heading/heading.js';
|
8
8
|
import { Button } from '../button/button.js';
|
9
|
-
import { S as Size,
|
9
|
+
import { S as Size, i as inputStyles } from '../_helpers/input.js';
|
10
10
|
import getUID from '../global/get-uid.js';
|
11
11
|
import Shortcuts from '../shortcuts/shortcuts.js';
|
12
12
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
@@ -34,7 +34,7 @@ import 'combokeys';
|
|
34
34
|
import '../global/sniffer.js';
|
35
35
|
import 'sniffr';
|
36
36
|
|
37
|
-
var
|
37
|
+
var styles = {"editableHeading":"editableHeading_rui_0f5a","fullSize":"fullSize_rui_0f5a","isEditing":"isEditing_rui_0f5a","headingWrapperButton":"headingWrapperButton_rui_0f5a","disabled":"disabled_rui_0f5a","selectionMode":"selectionMode_rui_0f5a","heading":"heading_rui_0f5a","multiline":"multiline_rui_0f5a","input":"input_rui_0f5a","error":"error_rui_0f5a","textarea":"textarea_rui_0f5a","textareaNotOverflow":"textareaNotOverflow_rui_0f5a","textareaFade":"textareaFade_rui_0f5a","textareaWrapper":"textareaWrapper_rui_0f5a","button":"button_rui_0f5a","errorText":"errorText_rui_0f5a","level1":"level1_rui_0f5a","level2":"level2_rui_0f5a","level3":"level3_rui_0f5a","sizeS":"sizeS_rui_0f5a","sizeM":"sizeM_rui_0f5a","sizeL":"sizeL_rui_0f5a","sizeFULL":"sizeFULL_rui_0f5a"};
|
38
38
|
|
39
39
|
const _excluded = ["level", "className", "headingClassName", "inputClassName", "children", "isEditing", "isSavingPossible", "isSaving", "embedded", "size", "onEdit", "onSave", "onCancel", "autoFocus", "data-test", "error", "disabled", "multiline", "renderMenu", "onFocus", "onBlur", "onChange", "onScroll", "maxInputRows", "translations"];
|
40
40
|
function noop() {}
|
@@ -91,18 +91,18 @@ const EditableHeading = props => {
|
|
91
91
|
}
|
92
92
|
return map;
|
93
93
|
}, [isSaveDisabled, isCancelDisabled, onSave, onCancel]);
|
94
|
-
const classes = classNames(
|
95
|
-
[
|
96
|
-
[
|
97
|
-
[
|
98
|
-
[
|
99
|
-
[
|
100
|
-
[
|
94
|
+
const classes = classNames(styles.editableHeading, className, {
|
95
|
+
[styles.fullSize]: isEditing && size === Size.FULL,
|
96
|
+
[styles.isEditing]: isEditing,
|
97
|
+
[styles.error]: hasError,
|
98
|
+
[styles.disabled]: disabled,
|
99
|
+
[styles.multiline]: multiline,
|
100
|
+
[styles.selectionMode]: isInSelectionMode
|
101
101
|
});
|
102
|
-
const headingClasses = classNames(
|
103
|
-
const inputClasses = classNames('ring-js-shortcuts',
|
104
|
-
[
|
105
|
-
},
|
102
|
+
const headingClasses = classNames(styles.heading, headingClassName, styles["size".concat(size)]);
|
103
|
+
const inputClasses = classNames('ring-js-shortcuts', styles.input, styles.textarea, {
|
104
|
+
[styles.textareaNotOverflow]: !isOverflow
|
105
|
+
}, inputStyles["size".concat(size)], styles["level".concat(level)], inputClassName);
|
106
106
|
const stretch = useCallback(el => {
|
107
107
|
if (!el || !el.style) {
|
108
108
|
return;
|
@@ -188,7 +188,7 @@ const EditableHeading = props => {
|
|
188
188
|
onFocus: onInputFocus,
|
189
189
|
onBlur: onInputBlur
|
190
190
|
})) : /*#__PURE__*/jsxs("div", {
|
191
|
-
className: classNames(
|
191
|
+
className: classNames(styles.textareaWrapper, inputStyles["size".concat(size)]),
|
192
192
|
children: [/*#__PURE__*/jsx("textarea", _objectSpread2(_objectSpread2({
|
193
193
|
ref: textAreaRef,
|
194
194
|
className: inputClasses,
|
@@ -205,12 +205,12 @@ const EditableHeading = props => {
|
|
205
205
|
maxHeight: maxInputRows ? "".concat(maxInputRows, "lh") : ''
|
206
206
|
}
|
207
207
|
})), !isScrolledToBottom && /*#__PURE__*/jsx("div", {
|
208
|
-
className:
|
208
|
+
className: styles.textareaFade
|
209
209
|
})]
|
210
210
|
})]
|
211
211
|
}) : /*#__PURE__*/jsx("button", {
|
212
212
|
type: "button",
|
213
|
-
className:
|
213
|
+
className: styles.headingWrapperButton,
|
214
214
|
onMouseDown: onHeadingMouseDown,
|
215
215
|
children: /*#__PURE__*/jsx(Heading, {
|
216
216
|
className: headingClasses,
|
@@ -220,21 +220,21 @@ const EditableHeading = props => {
|
|
220
220
|
})
|
221
221
|
}), !isEditing && renderMenu(), isEditing && !embedded && /*#__PURE__*/jsxs(Fragment, {
|
222
222
|
children: [/*#__PURE__*/jsx(Button, {
|
223
|
-
className:
|
223
|
+
className: styles.button,
|
224
224
|
primary: true,
|
225
225
|
disabled: isSaveDisabled,
|
226
226
|
loader: isSaving,
|
227
227
|
onClick: onSave,
|
228
228
|
children: translations.save
|
229
229
|
}), /*#__PURE__*/jsx(Button, {
|
230
|
-
className:
|
230
|
+
className: styles.button,
|
231
231
|
disabled: isCancelDisabled,
|
232
232
|
onClick: onCancel,
|
233
233
|
children: translations.cancel
|
234
234
|
})]
|
235
235
|
})]
|
236
236
|
}), isEditing && error && /*#__PURE__*/jsx("div", {
|
237
|
-
className: classNames(
|
237
|
+
className: classNames(styles.errorText, inputStyles["size".concat(size)]),
|
238
238
|
children: error
|
239
239
|
})]
|
240
240
|
});
|
@@ -17,13 +17,12 @@ import 'combokeys';
|
|
17
17
|
import '../global/sniffer.js';
|
18
18
|
import 'sniffr';
|
19
19
|
import '../global/data-tests.js';
|
20
|
-
import 'core-js/modules/es.array.reduce.js';
|
21
20
|
import '../tab-trap/tab-trap.js';
|
22
21
|
import '../popup/position.js';
|
23
22
|
import 'core-js/modules/es.array.sort.js';
|
24
23
|
import '../popup/popup.target.js';
|
25
24
|
|
26
|
-
var
|
25
|
+
var styles = {"errorBubblePopup":"errorBubblePopup_rui_7233","errorBubbleWrapper":"errorBubbleWrapper_rui_7233","errorBubble":"errorBubble_rui_7233"};
|
27
26
|
|
28
27
|
const _excluded = ["children", "className"];
|
29
28
|
class ErrorBubble extends PureComponent {
|
@@ -34,12 +33,13 @@ class ErrorBubble extends PureComponent {
|
|
34
33
|
className
|
35
34
|
} = _this$props,
|
36
35
|
restProps = _objectWithoutProperties(_this$props, _excluded);
|
37
|
-
const errorBubbleClasses = classNames(
|
36
|
+
const errorBubbleClasses = classNames(styles.errorBubble, className);
|
38
37
|
return /*#__PURE__*/jsxs("div", {
|
39
|
-
className:
|
38
|
+
className: styles.errorBubbleWrapper,
|
39
|
+
"data-test": "ring-error-bubble-wrapper",
|
40
40
|
children: [Children.map(children, child => /*#__PURE__*/cloneElement(child, _objectSpread2(_objectSpread2({}, child.props), restProps))), restProps.error && /*#__PURE__*/jsx(Popup, {
|
41
41
|
trapFocus: false,
|
42
|
-
className:
|
42
|
+
className: styles.errorBubblePopup,
|
43
43
|
hidden: false,
|
44
44
|
attached: false,
|
45
45
|
directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP],
|