@jetbrains/ring-ui-built 7.0.0-beta.8 → 7.0.0

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.
Files changed (204) hide show
  1. package/components/_helpers/anchor.js +4 -4
  2. package/components/_helpers/button__classes.js +13 -13
  3. package/components/_helpers/caption.js +3 -3
  4. package/components/_helpers/card.js +23 -20
  5. package/components/_helpers/date-picker.js +2 -2
  6. package/components/_helpers/dialog__body-scroll-preventer.js +4 -4
  7. package/components/_helpers/grid.js +2 -2
  8. package/components/_helpers/header.js +2 -2
  9. package/components/_helpers/heading.js +2 -2
  10. package/components/_helpers/icon__svg.js +6 -6
  11. package/components/_helpers/input.js +14 -14
  12. package/components/_helpers/island.js +2 -2
  13. package/components/_helpers/link.js +2 -2
  14. package/components/_helpers/list.js +2 -2
  15. package/components/_helpers/query-assist__suggestions.js +7 -7
  16. package/components/_helpers/select__filter.js +3 -3
  17. package/components/_helpers/services-link.js +3 -3
  18. package/components/_helpers/sidebar.js +9 -9
  19. package/components/_helpers/tab-link.js +7 -7
  20. package/components/_helpers/table.js +2 -2
  21. package/components/_helpers/theme.js +18 -12
  22. package/components/_helpers/title.js +7 -7
  23. package/components/alert/alert.d.ts +2 -2
  24. package/components/alert/alert.js +12 -13
  25. package/components/alert/container.js +4 -4
  26. package/components/alert-service/alert-service.js +0 -1
  27. package/components/auth/auth.js +0 -1
  28. package/components/auth/auth__core.js +1 -2
  29. package/components/auth/background-flow.js +2 -2
  30. package/components/auth/down-notification.js +5 -6
  31. package/components/auth/iframe-flow.js +0 -1
  32. package/components/auth/storage.js +0 -1
  33. package/components/auth/token-validator.js +1 -1
  34. package/components/auth-dialog/auth-dialog.js +10 -11
  35. package/components/auth-dialog-service/auth-dialog-service.js +2 -3
  36. package/components/avatar/avatar.js +6 -6
  37. package/components/breadcrumbs/breadcrumbs.js +2 -2
  38. package/components/button/button.js +4 -4
  39. package/components/button/button__classes.d.ts +1 -1
  40. package/components/button-group/button-group.js +3 -4
  41. package/components/button-set/button-set.js +2 -3
  42. package/components/button-toolbar/button-toolbar.d.ts +1 -1
  43. package/components/button-toolbar/button-toolbar.js +2 -3
  44. package/components/checkbox/checkbox.js +8 -8
  45. package/components/clipboard/clipboard.js +0 -1
  46. package/components/code/code.d.ts +1 -1
  47. package/components/code/code.js +7 -7
  48. package/components/collapse/collapse-content.d.ts +1 -2
  49. package/components/collapse/collapse-content.js +25 -11
  50. package/components/collapse/collapse-control.js +0 -1
  51. package/components/confirm/confirm.d.ts +2 -2
  52. package/components/confirm/confirm.js +3 -4
  53. package/components/confirm-service/confirm-service.d.ts +1 -1
  54. package/components/confirm-service/confirm-service.js +1 -2
  55. package/components/content-layout/content-layout.js +4 -4
  56. package/components/contenteditable/contenteditable.d.ts +1 -1
  57. package/components/control-help/control-help.js +2 -2
  58. package/components/control-label/control-label.js +5 -5
  59. package/components/data-list/data-list.d.ts +2 -2
  60. package/components/data-list/data-list.js +6 -7
  61. package/components/data-list/data-list.mock.js +16 -10
  62. package/components/data-list/item.js +8 -9
  63. package/components/date-picker/date-input.js +2 -2
  64. package/components/date-picker/date-picker.d.ts +2 -1
  65. package/components/date-picker/date-picker.js +12 -12
  66. package/components/date-picker/date-popup.js +4 -5
  67. package/components/date-picker/day.js +15 -15
  68. package/components/date-picker/month-names.js +5 -5
  69. package/components/date-picker/month-slider.js +3 -3
  70. package/components/date-picker/month.js +3 -3
  71. package/components/date-picker/months.js +3 -3
  72. package/components/date-picker/weekdays.js +4 -4
  73. package/components/date-picker/years.js +5 -5
  74. package/components/dialog/dialog.d.ts +1 -0
  75. package/components/dialog/dialog.js +22 -18
  76. package/components/dropdown/dropdown.d.ts +2 -2
  77. package/components/dropdown/dropdown.js +2 -3
  78. package/components/dropdown-menu/dropdown-menu.js +0 -1
  79. package/components/editable-heading/editable-heading.js +19 -19
  80. package/components/error-bubble/error-bubble.js +5 -5
  81. package/components/error-message/error-message.js +6 -7
  82. package/components/footer/footer.js +9 -10
  83. package/components/form/form.js +2 -3
  84. package/components/global/compose.js +0 -2
  85. package/components/global/data-tests.js +0 -1
  86. package/components/global/theme.d.ts +4 -2
  87. package/components/global/theme.js +1 -2
  88. package/components/grid/col.js +5 -4
  89. package/components/grid/grid.js +5 -4
  90. package/components/grid/row.js +5 -5
  91. package/components/group/group.js +5 -3
  92. package/components/header/header-icon.js +4 -4
  93. package/components/header/header.js +3 -4
  94. package/components/header/links.js +2 -2
  95. package/components/header/logo.js +2 -2
  96. package/components/header/profile.d.ts +2 -2
  97. package/components/header/profile.js +10 -11
  98. package/components/header/services-link.js +0 -1
  99. package/components/header/services.js +7 -8
  100. package/components/header/smart-profile.js +0 -1
  101. package/components/header/smart-services.js +0 -1
  102. package/components/header/tray.js +3 -3
  103. package/components/heading/heading.js +3 -3
  104. package/components/http/http.d.ts +3 -3
  105. package/components/icon/icon.js +8 -6
  106. package/components/input/input-legacy.js +2 -3
  107. package/components/input-size/input-size.js +2 -3
  108. package/components/island/content.js +7 -7
  109. package/components/island/header.js +4 -4
  110. package/components/island/island.js +4 -5
  111. package/components/link/link.js +7 -8
  112. package/components/list/list.d.ts +1 -1
  113. package/components/list/list.js +5 -6
  114. package/components/list/list__custom.js +5 -6
  115. package/components/list/list__hint.js +2 -2
  116. package/components/list/list__item.js +22 -23
  117. package/components/list/list__link.js +5 -6
  118. package/components/list/list__separator.js +3 -3
  119. package/components/list/list__title.js +5 -5
  120. package/components/list/list__users-groups-source.js +0 -1
  121. package/components/loader/loader.js +0 -1
  122. package/components/loader/loader__core.js +5 -5
  123. package/components/loader-inline/loader-inline.js +3 -4
  124. package/components/loader-screen/loader-screen.js +4 -5
  125. package/components/login-dialog/login-dialog.js +6 -7
  126. package/components/login-dialog/service.js +1 -2
  127. package/components/markdown/markdown.d.ts +2 -2
  128. package/components/markdown/markdown.js +6 -6
  129. package/components/message/message.js +9 -10
  130. package/components/old-browsers-message/old-browsers-message.js +0 -1
  131. package/components/old-browsers-message/old-browsers-message__stop.js +0 -1
  132. package/components/old-browsers-message/white-list.js +2 -3
  133. package/components/pager/pager.js +9 -10
  134. package/components/panel/panel.js +2 -2
  135. package/components/permissions/permissions.js +0 -1
  136. package/components/permissions/permissions__cache.js +2 -3
  137. package/components/popup/popup.js +6 -7
  138. package/components/popup/position.js +2 -2
  139. package/components/popup-menu/popup-menu.js +0 -1
  140. package/components/progress-bar/progress-bar.d.ts +2 -2
  141. package/components/progress-bar/progress-bar.js +5 -5
  142. package/components/query-assist/query-assist.js +27 -28
  143. package/components/query-assist/query-assist__suggestions.js +0 -1
  144. package/components/radio/radio__item.js +5 -5
  145. package/components/scrollable-section/scrollable-section.js +6 -6
  146. package/components/select/select.d.ts +1 -1
  147. package/components/select/select.js +25 -25
  148. package/components/select/select__filter.js +0 -1
  149. package/components/select/select__popup.js +11 -12
  150. package/components/shortcuts/core.js +1 -1
  151. package/components/slider/slider.js +20 -20
  152. package/components/storage/storage.js +0 -1
  153. package/components/storage/storage__local.js +0 -1
  154. package/components/style.css +1 -1
  155. package/components/tab-trap/tab-trap.js +2 -2
  156. package/components/table/cell.js +2 -3
  157. package/components/table/header-cell.js +8 -9
  158. package/components/table/header.d.ts +2 -10
  159. package/components/table/header.js +7 -14
  160. package/components/table/row-with-focus-sensor.js +1 -1
  161. package/components/table/row.d.ts +0 -1
  162. package/components/table/row.js +12 -18
  163. package/components/table/selection.d.ts +2 -3
  164. package/components/table/simple-table.js +3 -3
  165. package/components/table/smart-table.js +1 -1
  166. package/components/table/table.d.ts +0 -1
  167. package/components/table/table.js +18 -20
  168. package/components/tabs/collapsible-more.d.ts +1 -1
  169. package/components/tabs/collapsible-more.js +6 -7
  170. package/components/tabs/collapsible-tab.js +4 -5
  171. package/components/tabs/collapsible-tabs.d.ts +2 -2
  172. package/components/tabs/collapsible-tabs.js +5 -6
  173. package/components/tabs/dumb-tabs.js +5 -6
  174. package/components/tabs/smart-tabs.js +0 -1
  175. package/components/tabs/tab-link.js +0 -1
  176. package/components/tabs/tab.js +0 -1
  177. package/components/tabs/tabs.js +0 -1
  178. package/components/tag/tag.d.ts +1 -1
  179. package/components/tag/tag.js +14 -15
  180. package/components/tags-input/tags-input.js +8 -9
  181. package/components/tags-list/tags-list.d.ts +2 -2
  182. package/components/tags-list/tags-list.js +2 -2
  183. package/components/text/text.js +7 -7
  184. package/components/toggle/toggle.d.ts +2 -2
  185. package/components/toggle/toggle.js +12 -13
  186. package/components/tooltip/tooltip.d.ts +4 -1
  187. package/components/tooltip/tooltip.js +35 -20
  188. package/components/user-agreement/service.js +1 -2
  189. package/components/user-agreement/user-agreement.js +7 -8
  190. package/components/user-card/card.js +3 -2
  191. package/components/user-card/smart-user-card-tooltip.js +5 -4
  192. package/components/user-card/tooltip.js +5 -4
  193. package/components/user-card/user-card.js +3 -2
  194. package/package.json +7 -6
  195. package/typings.d.ts +2 -4
  196. package/components/_helpers/badge.js +0 -3
  197. package/components/badge/badge.d.ts +0 -14
  198. package/components/badge/badge.js +0 -47
  199. package/components/island-legacy/content-legacy.d.ts +0 -5
  200. package/components/island-legacy/content-legacy.js +0 -23
  201. package/components/island-legacy/header-legacy.d.ts +0 -5
  202. package/components/island-legacy/header-legacy.js +0 -26
  203. package/components/island-legacy/island-legacy.d.ts +0 -7
  204. package/components/island-legacy/island-legacy.js +0 -25
@@ -7,11 +7,10 @@ import Link from '../link/link.js';
7
7
  import Text from '../text/text.js';
8
8
  import LoaderInline from '../loader-inline/loader-inline.js';
9
9
  import { Button } from '../button/button.js';
10
- import { m as modules_09d014b4, T as Title } from '../_helpers/title.js';
10
+ import { s as styles, T as Title } from '../_helpers/title.js';
11
11
  import { jsx, jsxs } from 'react/jsx-runtime';
12
12
  import 'classnames';
13
13
  import '../global/data-tests.js';
14
- import 'core-js/modules/es.array.reduce.js';
15
14
  import '../link/clickableLink.js';
16
15
  import '../_helpers/link.js';
17
16
  import 'util-deprecate';
@@ -126,7 +125,7 @@ class Item extends PureComponent {
126
125
  onClick: this.onShowMore,
127
126
  children: 'Show more'
128
127
  }), showMoreLessButton === moreLessButtonStates.MORE_LOADING && /*#__PURE__*/jsx(LoaderInline, {
129
- className: modules_09d014b4.showMoreLoader
128
+ className: styles.showMoreLoader
130
129
  })]
131
130
  });
132
131
  } else if (showMoreLessButton === moreLessButtonStates.LESS) {
@@ -147,8 +146,8 @@ class Item extends PureComponent {
147
146
  title: "Expand",
148
147
  onClick: onExpand,
149
148
  icon: chevronRightIcon,
150
- className: modules_09d014b4.collapseButton,
151
- iconClassName: modules_09d014b4.collapseIcon,
149
+ className: styles.collapseButton,
150
+ iconClassName: styles.collapseIcon,
152
151
  "data-test": "ring-data-list-expand"
153
152
  });
154
153
  } else {
@@ -156,8 +155,8 @@ class Item extends PureComponent {
156
155
  title: "Collapse",
157
156
  onClick: onCollapse,
158
157
  icon: chevronDownIcon,
159
- className: modules_09d014b4.collapseButton,
160
- iconClassName: modules_09d014b4.collapseIcon,
158
+ className: styles.collapseButton,
159
+ iconClassName: styles.collapseIcon,
161
160
  "data-test": "ring-data-list-collapse"
162
161
  });
163
162
  }
@@ -176,9 +175,9 @@ class Item extends PureComponent {
176
175
  onSelect: this.onSelect,
177
176
  offset: offset
178
177
  }), !itemIsEmpty ? /*#__PURE__*/jsxs("ul", {
179
- className: modules_09d014b4.itemContent,
178
+ className: styles.itemContent,
180
179
  children: [items.map(model => this.renderItem(model, parentShift)), showMoreLessButton !== moreLessButtonStates.UNUSED ? /*#__PURE__*/jsx("li", {
181
- className: modules_09d014b4.showMore,
180
+ className: styles.showMore,
182
181
  children: moreLessButton
183
182
  }) : null]
184
183
  }) : null]
@@ -7,7 +7,7 @@ import classNames from 'classnames';
7
7
  import { I as Input } from '../_helpers/input.js';
8
8
  import { ControlsHeight } from '../global/controls-height.js';
9
9
  import { I18nContext } from '../i18n/i18n-context.js';
10
- import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
10
+ import { s as styles } from '../_helpers/date-picker.js';
11
11
  import { jsx } from 'react/jsx-runtime';
12
12
  import '@jetbrains/icons/close-12px';
13
13
  import '../button/button.js';
@@ -121,7 +121,7 @@ class DateInput extends React.PureComponent {
121
121
  return ((_translations$selectN = translations === null || translations === void 0 ? void 0 : translations.selectName) !== null && _translations$selectN !== void 0 ? _translations$selectN : translate('selectName')).replace('%name%', name).replace('{{name}}', name);
122
122
  }
123
123
  })();
124
- const classes = classNames(modules_0c7b7d96.filter, modules_0c7b7d96["".concat(name, "Input")], divider && modules_0c7b7d96["".concat(name, "InputWithDivider")], 'ring-js-shortcuts');
124
+ const classes = classNames(styles.filter, styles["".concat(name, "Input")], divider && styles["".concat(name, "InputWithDivider")], 'ring-js-shortcuts');
125
125
  return /*#__PURE__*/jsx(Input, {
126
126
  autoComplete: "off",
127
127
  borderless: true,
@@ -1,4 +1,4 @@
1
- import { PureComponent } from 'react';
1
+ import { PureComponent, ButtonHTMLAttributes } from 'react';
2
2
  import * as React from 'react';
3
3
  import type { Locale } from 'date-fns';
4
4
  import Popup from '../popup/popup';
@@ -28,6 +28,7 @@ export type DatePickerProps = Omit<DatePopupProps, 'translations' | 'parseDateIn
28
28
  disabled?: boolean | null | undefined;
29
29
  parseDateInput: (input: string | null | undefined) => Date | null;
30
30
  size?: Size;
31
+ buttonAttributes?: Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'>;
31
32
  };
32
33
  /**
33
34
  * @name Date Picker
@@ -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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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: modules_0c7b7d96.anchorContent,
228
+ className: styles.anchorContent,
230
229
  children: [/*#__PURE__*/jsx(Icon, {
231
230
  glyph: calendarIcon,
232
- className: modules_0c7b7d96.calendarIcon
231
+ className: styles.calendarIcon
233
232
  }), this.getAnchorText(), /*#__PURE__*/jsx(Icon, {
234
233
  glyph: chevronDownIcon,
235
- className: modules_0c7b7d96.chevronDownIcon
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(modules_0c7b7d96.datePicker, className, modules_0c7b7d96["size".concat(this.props.size)], {
249
- [modules_0c7b7d96.inline]: inline
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: modules_0c7b7d96.anchor,
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: modules_0c7b7d96.anchor,
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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: modules_0c7b7d96.datePopup,
370
+ className: styles.datePopup,
372
371
  "data-test": "ring-date-popup",
373
372
  ref: this.componentRef,
374
373
  children: [/*#__PURE__*/jsxs("div", {
375
- className: modules_0c7b7d96.filterWrapper,
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: modules_0c7b7d96.calendar,
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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(modules_0c7b7d96.day, modules_0c7b7d96["Day".concat(dayInWeek)], {
73
- [modules_0c7b7d96.current]: ['date', 'from', 'to'].some(this.is),
74
- [modules_0c7b7d96.active]: !disabled && this.is('activeDate'),
75
- [modules_0c7b7d96.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day)),
76
- [modules_0c7b7d96.empty]: empty,
77
- [modules_0c7b7d96.from]: currentRange && this.isDay(currentRange[0]) && !reverse || activeRange && this.isDay(activeRange[0]),
78
- [modules_0c7b7d96.to]: currentRange && this.isDay(currentRange[1]) || activeRange && this.isDay(activeRange[1]),
79
- [modules_0c7b7d96.between]: this.inRange(currentRange),
80
- [modules_0c7b7d96.activeBetween]: !disabled && this.inRange(activeRange),
81
- [modules_0c7b7d96.first]: getDate(day) === 1,
82
- [modules_0c7b7d96.spread]: this.inRange(spreadRange),
83
- [modules_0c7b7d96.activeSpread]: !disabled && this.inRange(activeSpreadRange),
84
- [modules_0c7b7d96.disabled]: disabled
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
- [modules_0c7b7d96.today]: isToday(day)
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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(modules_0c7b7d96.monthName, {
37
- [modules_0c7b7d96.today]: isThisMonth(month)
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: modules_0c7b7d96.monthNames,
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: modules_0c7b7d96.range,
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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(modules_0c7b7d96.monthSlider, {
53
- [modules_0c7b7d96.dragging]: this.state.dragging
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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: modules_0c7b7d96.month,
40
+ className: styles.month,
41
41
  children: [/*#__PURE__*/jsx("span", {
42
- className: modules_0c7b7d96.monthTitle,
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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: modules_0c7b7d96.months,
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: modules_0c7b7d96.days,
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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: modules_0c7b7d96.weekdays,
18
+ className: styles.weekdays,
19
19
  children: days.map(day => /*#__PURE__*/jsx("span", {
20
- className: classNames(modules_0c7b7d96.weekday, {
21
- [modules_0c7b7d96.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day))
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 { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
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: modules_0c7b7d96.years,
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(modules_0c7b7d96.year, {
98
- [modules_0c7b7d96.currentYear]: isSameYear(item, date),
99
- [modules_0c7b7d96.today]: isThisYear(item)
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, m as modules_5e9b8c03 } from '../_helpers/dialog__body-scroll-preventer.js';
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(modules_5e9b8c03.container, className);
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: modules_5e9b8c03.clickableOverlay,
164
+ className: styles.clickableOverlay,
162
165
  onClick: this.handleClick,
163
166
  "data-test": "ring-dialog-overlay"
164
167
  }), /*#__PURE__*/jsx("div", {
165
- className: modules_5e9b8c03.innerContainer,
168
+ className: styles.innerContainer,
166
169
  children: /*#__PURE__*/jsxs(AdaptiveIsland, {
167
- className: classNames(modules_5e9b8c03.content, contentClassName, {
168
- [modules_5e9b8c03.dense]: dense
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(modules_5e9b8c03.closeButton, {
177
- [modules_5e9b8c03.closeButtonOutside]: !closeButtonInside,
178
- [modules_5e9b8c03.closeButtonInside]: closeButtonInside
179
+ className: classNames(styles.closeButton, {
180
+ [styles.closeButtonOutside]: !closeButtonInside,
181
+ [styles.closeButtonInside]: closeButtonInside
179
182
  }),
180
- iconClassName: modules_5e9b8c03.closeIcon,
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(modules_5e9b8c03.nativeDialog, className),
193
+ className: classNames(styles.nativeDialog, className),
191
194
  ref: this.nativeDialog,
192
195
  children: /*#__PURE__*/jsx(PopupTarget, {
193
196
  id: this.uid,
194
- className: modules_5e9b8c03.popupTarget,
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( /*#__PURE__*/jsx(PopupTarget, {
204
+ return show && /*#__PURE__*/createPortal(/*#__PURE__*/jsx(PopupTarget, {
202
205
  id: this.uid,
203
- className: modules_5e9b8c03.popupTarget,
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: (() => void);
30
- onHide: (() => void);
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 { m as modules_d9414203, A as Anchor } from '../_helpers/anchor.js';
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(modules_d9414203.dropdown, className, {
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';