@jetbrains/ring-ui-built 7.0.125 → 8.0.0-beta.11

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 (273) hide show
  1. package/components/_helpers/anchor.js +1 -1
  2. package/components/_helpers/avatar-info.js +3 -5
  3. package/components/_helpers/caption.js +1 -1
  4. package/components/_helpers/dialog.js +3 -0
  5. package/components/_helpers/icon-svg.js +37 -52
  6. package/components/_helpers/legacy-table.js +3 -0
  7. package/components/_helpers/tab-link.js +1 -1
  8. package/components/_helpers/table.js +2 -2
  9. package/components/_helpers/theme.js +49 -37
  10. package/components/alert/alert-actions.js +1 -1
  11. package/components/alert/alert-heading.js +1 -1
  12. package/components/alert/alert.js +2 -2
  13. package/components/alert-service/alert-service.js +2 -2
  14. package/components/auth/auth-core.js +2 -2
  15. package/components/auth/auth.js +2 -2
  16. package/components/auth/down-notification.js +2 -2
  17. package/components/auth/iframe-flow.js +15 -10
  18. package/components/auth/storage.js +2 -2
  19. package/components/auth-dialog/auth-dialog.js +11 -6
  20. package/components/auth-dialog-service/auth-dialog-service.js +19 -11
  21. package/components/avatar/avatar-info.js +1 -1
  22. package/components/avatar/avatar-size.d.ts +0 -4
  23. package/components/avatar/avatar-size.js +0 -4
  24. package/components/avatar/avatar.js +1 -8
  25. package/components/avatar/fallback-avatar.js +3 -48
  26. package/components/avatar-stack/avatar-stack.js +5 -5
  27. package/components/banner/banner.js +5 -6
  28. package/components/button/button.d.ts +0 -4
  29. package/components/button/button.js +4 -10
  30. package/components/button-group/button-group.js +1 -1
  31. package/components/button-toolbar/button-toolbar.js +1 -1
  32. package/components/checkbox/checkbox.d.ts +1 -1
  33. package/components/checkbox/checkbox.js +1 -2
  34. package/components/clipboard/clipboard.js +2 -2
  35. package/components/code/code.js +1 -2
  36. package/components/collapse/collapse-content.js +35 -43
  37. package/components/collapse/collapse-context.d.ts +1 -0
  38. package/components/collapse/collapse-context.js +1 -0
  39. package/components/collapse/collapse-control.js +5 -5
  40. package/components/collapse/collapse.js +34 -25
  41. package/components/collapsible-group/collapsible-group.d.ts +5 -1
  42. package/components/collapsible-group/collapsible-group.js +80 -98
  43. package/components/components/util-stories.js +63 -1
  44. package/components/confirm/confirm.js +30 -21
  45. package/components/confirm-service/confirm-service.js +21 -13
  46. package/components/contenteditable/contenteditable.js +4 -5
  47. package/components/control-help/control-help.js +1 -1
  48. package/components/control-label/control-label.js +1 -1
  49. package/components/data-list/data-list.d.ts +4 -4
  50. package/components/data-list/data-list.js +5 -5
  51. package/components/data-list/data-list.mock.d.ts +1 -1
  52. package/components/data-list/data-list.mock.js +2 -2
  53. package/components/data-list/item.d.ts +1 -1
  54. package/components/data-list/item.js +3 -3
  55. package/components/data-list/selection.d.ts +1 -1
  56. package/components/data-list/selection.js +2 -2
  57. package/components/data-list/title.js +1 -2
  58. package/components/date-picker/date-input.js +2 -2
  59. package/components/date-picker/date-picker.js +2 -3
  60. package/components/date-picker/date-popup.js +4 -5
  61. package/components/date-picker/month-names.js +1 -1
  62. package/components/date-picker/month-slider.js +1 -1
  63. package/components/date-picker/month.d.ts +0 -2
  64. package/components/date-picker/month.js +17 -18
  65. package/components/date-picker/months.js +43 -36
  66. package/components/date-picker/use-scroll-behavior.js +45 -45
  67. package/components/date-picker/weekdays.js +1 -1
  68. package/components/date-picker/years.js +61 -55
  69. package/components/dialog/dialog-body-scroll-preventer.js +49 -2
  70. package/components/dialog/dialog-controls.d.ts +13 -0
  71. package/components/dialog/dialog-controls.js +113 -0
  72. package/components/dialog/dialog-geometry.d.ts +31 -0
  73. package/components/dialog/dialog-geometry.js +63 -0
  74. package/components/dialog/dialog.d.ts +15 -7
  75. package/components/dialog/dialog.js +185 -37
  76. package/components/dropdown/anchor.js +3 -3
  77. package/components/dropdown/dropdown.js +3 -3
  78. package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
  79. package/components/dropdown-menu/dropdown-menu.js +63 -58
  80. package/components/editable-heading/editable-heading.d.ts +1 -2
  81. package/components/editable-heading/editable-heading.js +14 -13
  82. package/components/error-bubble/error-bubble.js +1 -1
  83. package/components/error-message/error-message.js +1 -2
  84. package/components/footer/footer.js +1 -1
  85. package/components/global/compose-refs.d.ts +2 -1
  86. package/components/global/compose-refs.js +44 -8
  87. package/components/global/configuration.d.ts +0 -5
  88. package/components/global/configuration.js +2 -10
  89. package/components/global/controls-height.js +1 -1
  90. package/components/global/create-stateful-context.js +11 -11
  91. package/components/global/focus-sensor-hoc.js +1 -0
  92. package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
  93. package/components/global/focus-with-temporary-tabindex.js +23 -0
  94. package/components/global/get-viewport-size.d.ts +5 -0
  95. package/components/global/get-viewport-size.js +6 -0
  96. package/components/global/intersection-observer-context.d.ts +46 -0
  97. package/components/global/intersection-observer-context.js +138 -0
  98. package/components/global/is-within-interactive-element.d.ts +6 -0
  99. package/components/global/is-within-interactive-element.js +11 -0
  100. package/components/global/is-within-navigable-element.d.ts +6 -0
  101. package/components/global/is-within-navigable-element.js +11 -0
  102. package/components/global/parse-css-duration.d.ts +5 -0
  103. package/components/global/parse-css-duration.js +14 -0
  104. package/components/global/rerender-hoc.d.ts +4 -2
  105. package/components/global/rerender-hoc.js +11 -24
  106. package/components/global/schedule-with-cleanup.d.ts +12 -0
  107. package/components/global/schedule-with-cleanup.js +36 -0
  108. package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
  109. package/components/{table/selection.js → global/table-selection.js} +5 -5
  110. package/components/global/theme.d.ts +4 -3
  111. package/components/global/theme.js +1 -1
  112. package/components/global/variables.interface.d.ts +0 -4
  113. package/components/header/header-icon.js +3 -3
  114. package/components/header/header.js +3 -3
  115. package/components/header/links.js +1 -1
  116. package/components/header/logo.js +1 -2
  117. package/components/header/profile.js +5 -5
  118. package/components/header/services.js +3 -3
  119. package/components/header/smart-profile.js +3 -3
  120. package/components/header/smart-services.js +3 -3
  121. package/components/heading/heading.js +1 -1
  122. package/components/http/http.js +6 -23
  123. package/components/i18n/i18n-context.js +4 -4
  124. package/components/icon/icon-svg.js +1 -2
  125. package/components/icon/icon.d.ts +0 -1
  126. package/components/icon/icon.js +2 -6
  127. package/components/icon/index.js +1 -2
  128. package/components/input/input.d.ts +1 -1
  129. package/components/input/input.js +3 -3
  130. package/components/internal/reorder-animation-context.js +159 -0
  131. package/components/internal/reorder-handle.js +750 -0
  132. package/components/internal/reorder-layout-context.js +141 -0
  133. package/components/internal/table-header.js +685 -0
  134. package/components/internal/virtualization.js +368 -0
  135. package/components/island/adaptive-island-hoc.js +3 -3
  136. package/components/island/content.d.ts +7 -2
  137. package/components/island/content.js +27 -18
  138. package/components/island/header.js +4 -3
  139. package/components/island/island.js +1 -1
  140. package/components/{table → legacy-table}/cell.js +1 -1
  141. package/components/{table → legacy-table}/header-cell.js +2 -3
  142. package/components/{table → legacy-table}/header.js +2 -3
  143. package/components/{table → legacy-table}/multitable.d.ts +1 -1
  144. package/components/{table → legacy-table}/row-with-focus-sensor.js +3 -3
  145. package/components/{table → legacy-table}/row.d.ts +1 -1
  146. package/components/{table → legacy-table}/row.js +5 -5
  147. package/components/legacy-table/selection-adapter.d.ts +6 -0
  148. package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
  149. package/components/{table → legacy-table}/simple-table.d.ts +2 -2
  150. package/components/{table → legacy-table}/simple-table.js +5 -5
  151. package/components/{table → legacy-table}/smart-table.d.ts +5 -5
  152. package/components/{table → legacy-table}/smart-table.js +6 -6
  153. package/components/legacy-table/table.d.ts +109 -0
  154. package/components/legacy-table/table.js +369 -0
  155. package/components/list/consts.d.ts +0 -1
  156. package/components/list/consts.js +0 -1
  157. package/components/list/list-item.js +3 -5
  158. package/components/list/list-users-groups-source.js +1 -2
  159. package/components/list/list.d.ts +0 -4
  160. package/components/list/list.js +1 -2
  161. package/components/login-dialog/login-dialog.js +17 -12
  162. package/components/login-dialog/service.js +19 -11
  163. package/components/message/message.js +1 -1
  164. package/components/pager/pager.js +3 -3
  165. package/components/popup/popup.js +1 -1
  166. package/components/popup/popup.target.d.ts +3 -2
  167. package/components/popup/popup.target.js +32 -28
  168. package/components/popup-menu/popup-menu.js +1 -1
  169. package/components/query-assist/query-assist-suggestions.js +1 -2
  170. package/components/query-assist/query-assist.d.ts +3 -1
  171. package/components/query-assist/query-assist.js +2 -2
  172. package/components/radio/radio-item.d.ts +3 -3
  173. package/components/radio/radio-item.js +33 -19
  174. package/components/radio/radio.d.ts +2 -2
  175. package/components/radio/radio.js +2 -2
  176. package/components/scrollable-section/scrollable-section.js +1 -1
  177. package/components/select/chevron-button.js +3 -3
  178. package/components/select/select-filter.js +3 -3
  179. package/components/select/select-popup.d.ts +3 -2
  180. package/components/select/select-popup.js +9 -4
  181. package/components/select/select.d.ts +6 -2
  182. package/components/select/select.js +5 -4
  183. package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
  184. package/components/selection-toolbar/selection-toolbar.js +200 -0
  185. package/components/slider/slider.js +100 -97
  186. package/components/storage/storage-local.js +2 -2
  187. package/components/storage/storage.js +2 -2
  188. package/components/style.css +1 -1
  189. package/components/tab-trap/tab-trap.d.ts +3 -3
  190. package/components/tab-trap/tab-trap.js +83 -80
  191. package/components/table/default-item-renderer.d.ts +55 -0
  192. package/components/table/default-item-renderer.js +240 -0
  193. package/components/table/internal/reorder-animation-context.d.ts +21 -0
  194. package/components/table/internal/reorder-handle.d.ts +9 -0
  195. package/components/table/internal/reorder-layout-context.d.ts +16 -0
  196. package/components/table/internal/table-header.d.ts +1 -0
  197. package/components/table/internal/virtualization.d.ts +41 -0
  198. package/components/table/item-virtualization.d.ts +37 -0
  199. package/components/table/item-virtualization.js +73 -0
  200. package/components/table/reorder-animation.d.ts +37 -0
  201. package/components/table/reorder-animation.js +18 -0
  202. package/components/table/reorder-item-layout.d.ts +32 -0
  203. package/components/table/reorder-item-layout.js +57 -0
  204. package/components/table/table-const.d.ts +10 -0
  205. package/components/table/table-const.js +13 -0
  206. package/components/table/table-primitives.d.ts +64 -0
  207. package/components/table/table-primitives.js +180 -0
  208. package/components/table/table-props.d.ts +304 -0
  209. package/components/table/table-props.js +1 -0
  210. package/components/table/table.d.ts +231 -107
  211. package/components/table/table.js +351 -346
  212. package/components/tabs/collapsible-more.js +1 -1
  213. package/components/tabs/collapsible-tab.js +1 -1
  214. package/components/tabs/collapsible-tabs.js +1 -1
  215. package/components/tabs/dumb-tabs.js +1 -1
  216. package/components/tabs/smart-tabs.js +1 -1
  217. package/components/tabs/tab-link.js +1 -1
  218. package/components/tabs/tabs.js +1 -1
  219. package/components/tag/tag.js +1 -1
  220. package/components/tags-input/tags-input.d.ts +3 -1
  221. package/components/tags-input/tags-input.js +4 -4
  222. package/components/tags-list/tags-list.js +2 -2
  223. package/components/toggle/toggle.js +1 -1
  224. package/components/tooltip/tooltip.d.ts +2 -1
  225. package/components/tooltip/tooltip.js +5 -3
  226. package/components/upload/upload.d.ts +4 -3
  227. package/components/upload/upload.js +7 -30
  228. package/components/user-agreement/service.js +12 -4
  229. package/components/user-agreement/user-agreement.js +24 -20
  230. package/components/user-card/card.js +4 -4
  231. package/components/user-card/smart-user-card-tooltip.js +3 -3
  232. package/components/user-card/tooltip.js +3 -3
  233. package/components/user-card/user-card.js +5 -5
  234. package/components/util-stories.d.ts +26 -0
  235. package/package.json +11 -12
  236. package/components/__mocks__/old-browsers-message.js +0 -3
  237. package/components/_helpers/dialog-body-scroll-preventer.js +0 -50
  238. package/components/_helpers/grid.js +0 -3
  239. package/components/_helpers/sidebar.js +0 -110
  240. package/components/content-layout/content-layout.d.ts +0 -20
  241. package/components/content-layout/content-layout.js +0 -50
  242. package/components/content-layout/sidebar.d.ts +0 -26
  243. package/components/content-layout/sidebar.js +0 -5
  244. package/components/date-picker/use-intersection-observer.d.ts +0 -6
  245. package/components/date-picker/use-intersection-observer.js +0 -93
  246. package/components/expand/collapsible-group.d.ts +0 -8
  247. package/components/expand/collapsible-group.js +0 -52
  248. package/components/global/composeRefs.d.ts +0 -6
  249. package/components/global/composeRefs.js +0 -9
  250. package/components/global/use-event-callback.d.ts +0 -4
  251. package/components/global/use-event-callback.js +0 -49
  252. package/components/grid/col.d.ts +0 -16
  253. package/components/grid/col.js +0 -63
  254. package/components/grid/grid.d.ts +0 -13
  255. package/components/grid/grid.js +0 -27
  256. package/components/grid/row.d.ts +0 -21
  257. package/components/grid/row.js +0 -72
  258. package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
  259. package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
  260. package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
  261. package/components/old-browsers-message/old-browsers-message.js +0 -89
  262. package/components/old-browsers-message/white-list.d.ts +0 -2
  263. package/components/old-browsers-message/white-list.js +0 -30
  264. package/components/table/selection-adapter.d.ts +0 -6
  265. /package/components/{table → legacy-table}/cell.d.ts +0 -0
  266. /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
  267. /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
  268. /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
  269. /package/components/{table → legacy-table}/header.d.ts +0 -0
  270. /package/components/{table → legacy-table}/multitable.js +0 -0
  271. /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
  272. /package/components/{table → legacy-table}/selection-adapter.js +0 -0
  273. /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
@@ -26,7 +26,7 @@ import { ControlsHeight } from '../global/configuration.js';
26
26
  import 'util-deprecate';
27
27
  import '../icon/icon.constants.js';
28
28
  import '../_helpers/icon-svg.js';
29
- import 'react-compiler-runtime';
29
+ import 'react/compiler-runtime';
30
30
  import 'react-dom';
31
31
  import '../global/schedule-raf.js';
32
32
  import '../global/data-tests.js';
@@ -446,9 +446,10 @@ class SelectPopup extends PureComponent {
446
446
  offset,
447
447
  style,
448
448
  dir,
449
- filter
449
+ filter,
450
+ popupProps
450
451
  } = this.props;
451
- const classes = classNames(styles.popup, className);
452
+ const classes = classNames(styles.popup, className, popupProps?.className);
452
453
  return /*#__PURE__*/jsx(PopupTargetContext.Consumer, {
453
454
  children: ringPopupTarget => {
454
455
  const filterWithTags = this.getFilterWithTags();
@@ -457,6 +458,7 @@ class SelectPopup extends PureComponent {
457
458
  const bottomLine = this.getBottomLine();
458
459
  const hasContent = filterWithTags || selectAll || list || bottomLine || toolbar || topbar;
459
460
  return /*#__PURE__*/jsx(Popup, {
461
+ ...popupProps,
460
462
  trapFocus: false,
461
463
  ref: this.popupRef,
462
464
  hidden: hidden || !hasContent,
@@ -474,7 +476,10 @@ class SelectPopup extends PureComponent {
474
476
  onMouseDown: this.mouseDownHandler,
475
477
  target: this.props.ringPopupTarget,
476
478
  autoCorrectTopOverflow: false,
477
- style: style,
479
+ style: {
480
+ ...popupProps?.style,
481
+ ...style
482
+ },
478
483
  largeBorderRadius: true,
479
484
  children: /*#__PURE__*/jsxs("div", {
480
485
  dir: dir,
@@ -1,5 +1,6 @@
1
1
  import { type ButtonHTMLAttributes, Component, type ComponentType, type CSSProperties, type HTMLAttributes, type ReactNode, type Ref, type RefCallback, type SyntheticEvent } from 'react';
2
2
  import * as React from 'react';
3
+ import { type PopupAttrs } from '../popup/popup';
3
4
  import { type SelectHandlerParams } from '../list/list';
4
5
  import { Size } from '../input/input';
5
6
  import { type LabelType } from '../control-label/control-label';
@@ -99,6 +100,7 @@ export interface BaseSelectProps<T = unknown> {
99
100
  getInitial?: (() => string) | null | undefined;
100
101
  minWidth?: number | undefined;
101
102
  popupClassName?: string | null | undefined;
103
+ popupProps?: Partial<PopupAttrs> | undefined;
102
104
  popupStyle?: CSSProperties | undefined;
103
105
  top?: number | undefined;
104
106
  left?: number | undefined;
@@ -264,7 +266,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
264
266
  private _getAvatar;
265
267
  filter?: HTMLInputElement | null;
266
268
  filterRef: (el: HTMLInputElement | null) => void;
267
- composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => void>;
269
+ composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => () => void>;
268
270
  getShortcutsMap(): {
269
271
  enter: () => true | undefined;
270
272
  esc: (event: KeyboardEvent) => boolean | undefined;
@@ -282,5 +284,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
282
284
  export type SingleSelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, SingleSelectProps<T>>;
283
285
  export type MultipleSelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, MultipleSelectProps<T>>;
284
286
  export type SelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, SelectProps<T>>;
285
- export declare const RerenderableSelect: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
287
+ export declare const RerenderableSelect: ({ ref, ...props }: Omit<any, "ref"> & {
288
+ ref?: Ref<any> | undefined;
289
+ }) => React.JSX.Element;
286
290
  export {};
@@ -24,9 +24,7 @@ import SelectPopup from './select-popup.js';
24
24
  import ChevronButton from './chevron-button.js';
25
25
  import { ControlsHeight } from '../global/configuration.js';
26
26
  import { Size as Size$1 } from '../avatar/avatar-size.js';
27
- import 'react-compiler-runtime';
28
- import 'core-js/modules/es.array.includes.js';
29
- import 'util-deprecate';
27
+ import 'react/compiler-runtime';
30
28
  import '../global/url.js';
31
29
  import '../global/dom.js';
32
30
  import '../avatar/fallback-avatar.js';
@@ -35,6 +33,7 @@ import 'react-dom';
35
33
  import '../global/schedule-raf.js';
36
34
  import '../tab-trap/tab-trap.js';
37
35
  import '../popup/position.js';
36
+ import 'core-js/modules/es.array.includes.js';
38
37
  import '../popup/popup.consts.js';
39
38
  import '../popup/popup.target.js';
40
39
  import '../popup/position-css.js';
@@ -47,6 +46,7 @@ import 'react-virtualized/dist/es/List';
47
46
  import 'react-virtualized/dist/es/AutoSizer';
48
47
  import 'react-virtualized/dist/es/WindowScroller';
49
48
  import 'react-virtualized/dist/es/CellMeasurer';
49
+ import 'util-deprecate';
50
50
  import 'memoize-one';
51
51
  import '../global/create-stateful-context.js';
52
52
  import '../list/list-item.js';
@@ -102,7 +102,7 @@ const getStyle = memoize(iconsLength => ({
102
102
  }));
103
103
  const isInputMode = type => type === Type.INPUT || type === Type.INPUT_WITHOUT_CONTROLS;
104
104
  function getLowerCaseLabel(item) {
105
- if (List.isItemType(List.ListProps.Type.SEPARATOR, item) || List.isItemType(List.ListProps.Type.HINT, item) || typeof item.label !== 'string') {
105
+ if (List.isItemType(List.ListProps.Type.SEPARATOR, item) || typeof item.label !== 'string') {
106
106
  return null;
107
107
  }
108
108
  return item.label.toLowerCase();
@@ -585,6 +585,7 @@ class Select extends Component {
585
585
  maxHeight: this.props.maxHeight,
586
586
  minWidth: this.props.minWidth,
587
587
  directions: this.props.directions,
588
+ popupProps: this.props.popupProps,
588
589
  className: this.props.popupClassName,
589
590
  style: this.props.popupStyle,
590
591
  top: this.props.top,
@@ -0,0 +1,11 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ export interface SelectionToolbarProps extends ComponentPropsWithRef<'div'> {
3
+ label: ReactNode;
4
+ selectAll?: ReactNode;
5
+ closeAction: ReactNode;
6
+ compact?: boolean;
7
+ 'data-test'?: string | null;
8
+ }
9
+ export declare function SelectionToolbar({ ref, label, selectAll, closeAction, compact, className, children, 'data-test': dataTest, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...restProps }: SelectionToolbarProps): import("react").JSX.Element;
10
+ export declare function SelectionToolbarSeparator(): import("react").JSX.Element;
11
+ export default SelectionToolbar;
@@ -0,0 +1,200 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useId } from 'react';
3
+ import classNames from 'classnames';
4
+ import joinDataTestAttributes from '../global/data-tests.js';
5
+ import { a as ThemeProvider, T as Theme } from '../_helpers/theme.js';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ var styles = {"toolbar":"ring-selection-toolbar-toolbar","content":"ring-selection-toolbar-content","selectAll":"ring-selection-toolbar-selectAll","actions":"ring-selection-toolbar-actions","closeAction":"ring-selection-toolbar-closeAction","separator":"ring-selection-toolbar-separator","compact":"ring-selection-toolbar-compact","label":"ring-selection-toolbar-label"};
9
+
10
+ function SelectionToolbar(t0) {
11
+ var _ariaLabelledBy;
12
+ const $ = c(41);
13
+ if ($[0] !== "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2") {
14
+ for (let $i = 0; $i < 41; $i += 1) {
15
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
16
+ }
17
+ $[0] = "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2";
18
+ }
19
+ let ariaLabel;
20
+ let ariaLabelledBy;
21
+ let children;
22
+ let className;
23
+ let closeAction;
24
+ let compact;
25
+ let dataTest;
26
+ let label;
27
+ let ref;
28
+ let restProps;
29
+ let selectAll;
30
+ if ($[1] !== t0) {
31
+ ({
32
+ ref,
33
+ label,
34
+ selectAll,
35
+ closeAction,
36
+ compact,
37
+ className,
38
+ children,
39
+ "data-test": dataTest,
40
+ "aria-label": ariaLabel,
41
+ "aria-labelledby": ariaLabelledBy,
42
+ ...restProps
43
+ } = t0);
44
+ $[1] = t0;
45
+ $[2] = ariaLabel;
46
+ $[3] = ariaLabelledBy;
47
+ $[4] = children;
48
+ $[5] = className;
49
+ $[6] = closeAction;
50
+ $[7] = compact;
51
+ $[8] = dataTest;
52
+ $[9] = label;
53
+ $[10] = ref;
54
+ $[11] = restProps;
55
+ $[12] = selectAll;
56
+ } else {
57
+ ariaLabel = $[2];
58
+ ariaLabelledBy = $[3];
59
+ children = $[4];
60
+ className = $[5];
61
+ closeAction = $[6];
62
+ compact = $[7];
63
+ dataTest = $[8];
64
+ label = $[9];
65
+ ref = $[10];
66
+ restProps = $[11];
67
+ selectAll = $[12];
68
+ }
69
+ const labelId = useId();
70
+ const hasSelectAll = selectAll != null;
71
+ const t1 = (_ariaLabelledBy = ariaLabelledBy) !== null && _ariaLabelledBy !== void 0 ? _ariaLabelledBy : ariaLabel == null ? labelId : undefined;
72
+ let t2;
73
+ if ($[13] !== dataTest) {
74
+ t2 = joinDataTestAttributes("ring-selection-toolbar", dataTest);
75
+ $[13] = dataTest;
76
+ $[14] = t2;
77
+ } else {
78
+ t2 = $[14];
79
+ }
80
+ let t3;
81
+ if ($[15] !== className || $[16] !== compact) {
82
+ t3 = classNames(styles.toolbar, {
83
+ [styles.compact]: compact
84
+ }, className);
85
+ $[15] = className;
86
+ $[16] = compact;
87
+ $[17] = t3;
88
+ } else {
89
+ t3 = $[17];
90
+ }
91
+ let t4;
92
+ if ($[18] !== label || $[19] !== labelId) {
93
+ t4 = /*#__PURE__*/jsx("span", {
94
+ id: labelId,
95
+ className: styles.label,
96
+ children: label
97
+ });
98
+ $[18] = label;
99
+ $[19] = labelId;
100
+ $[20] = t4;
101
+ } else {
102
+ t4 = $[20];
103
+ }
104
+ let t5;
105
+ if ($[21] !== hasSelectAll || $[22] !== selectAll) {
106
+ t5 = hasSelectAll && /*#__PURE__*/jsx("span", {
107
+ className: styles.selectAll,
108
+ children: selectAll
109
+ });
110
+ $[21] = hasSelectAll;
111
+ $[22] = selectAll;
112
+ $[23] = t5;
113
+ } else {
114
+ t5 = $[23];
115
+ }
116
+ let t6;
117
+ if ($[24] !== children) {
118
+ t6 = /*#__PURE__*/jsx("div", {
119
+ className: styles.actions,
120
+ children: children
121
+ });
122
+ $[24] = children;
123
+ $[25] = t6;
124
+ } else {
125
+ t6 = $[25];
126
+ }
127
+ let t7;
128
+ if ($[26] !== t4 || $[27] !== t5 || $[28] !== t6) {
129
+ t7 = /*#__PURE__*/jsxs("div", {
130
+ className: styles.content,
131
+ children: [t4, t5, t6]
132
+ });
133
+ $[26] = t4;
134
+ $[27] = t5;
135
+ $[28] = t6;
136
+ $[29] = t7;
137
+ } else {
138
+ t7 = $[29];
139
+ }
140
+ let t8;
141
+ if ($[30] !== closeAction) {
142
+ t8 = /*#__PURE__*/jsx("div", {
143
+ className: styles.closeAction,
144
+ children: closeAction
145
+ });
146
+ $[30] = closeAction;
147
+ $[31] = t8;
148
+ } else {
149
+ t8 = $[31];
150
+ }
151
+ let t9;
152
+ if ($[32] !== ariaLabel || $[33] !== ref || $[34] !== restProps || $[35] !== t1 || $[36] !== t2 || $[37] !== t3 || $[38] !== t7 || $[39] !== t8) {
153
+ t9 = /*#__PURE__*/jsxs(ThemeProvider, {
154
+ ...restProps,
155
+ ref: ref,
156
+ theme: Theme.DARK,
157
+ role: "group",
158
+ "aria-label": ariaLabel,
159
+ "aria-labelledby": t1,
160
+ "data-test": t2,
161
+ className: t3,
162
+ children: [t7, t8]
163
+ });
164
+ $[32] = ariaLabel;
165
+ $[33] = ref;
166
+ $[34] = restProps;
167
+ $[35] = t1;
168
+ $[36] = t2;
169
+ $[37] = t3;
170
+ $[38] = t7;
171
+ $[39] = t8;
172
+ $[40] = t9;
173
+ } else {
174
+ t9 = $[40];
175
+ }
176
+ return t9;
177
+ }
178
+ function SelectionToolbarSeparator() {
179
+ const $ = c(2);
180
+ if ($[0] !== "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2") {
181
+ for (let $i = 0; $i < 2; $i += 1) {
182
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
183
+ }
184
+ $[0] = "5d985e52242f7f93511362d020a90fb0a34ed2fe8a96b99ea0fdb6bafcaccda2";
185
+ }
186
+ let t0;
187
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
188
+ t0 = /*#__PURE__*/jsx("span", {
189
+ role: "separator",
190
+ "aria-orientation": "vertical",
191
+ className: styles.separator
192
+ });
193
+ $[1] = t0;
194
+ } else {
195
+ t0 = $[1];
196
+ }
197
+ return t0;
198
+ }
199
+
200
+ export { SelectionToolbar, SelectionToolbarSeparator, SelectionToolbar as default };
@@ -1,28 +1,26 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { useRef, useState, useEffect, Fragment } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useRef, useState, useEffectEvent, useEffect, Fragment } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { isArray } from '../global/typescript-utils.js';
5
5
  import Shortcuts from '../shortcuts/shortcuts.js';
6
6
  import getUID from '../global/get-uid.js';
7
7
  import { toRange, HUNDRED, calculateMarks, toPercent, validateValue, calculateValue, adjustValues } from './slider.utils.js';
8
- import useEventCallback from '../global/use-event-callback.js';
9
8
  import { jsx, jsxs } from 'react/jsx-runtime';
10
9
  import '../shortcuts/core.js';
11
10
  import 'core-js/modules/es.array.includes.js';
12
11
  import 'combokeys';
13
12
  import '../global/sniffer.js';
14
13
  import 'sniffr';
15
- import 'util-deprecate';
16
14
 
17
15
  var styles = {"slider":"ring-slider-slider","disabled":"ring-slider-disabled","marked":"ring-slider-marked","rail":"ring-slider-rail","rounded":"ring-slider-rounded","track":"ring-slider-track","thumb":"ring-slider-thumb ring-global-resetButton","dragged":"ring-slider-dragged","tick":"ring-slider-tick","active":"ring-slider-active","markValue":"ring-slider-markValue","tag":"ring-slider-tag"};
18
16
 
19
17
  const Slider = t0 => {
20
- const $ = c(122);
21
- if ($[0] !== "8964b5418275bd38d0d46628f0c5c416a0eb127a555095f594f9e18fa28ba85a") {
22
- for (let $i = 0; $i < 122; $i += 1) {
18
+ const $ = c(124);
19
+ if ($[0] !== "df7020e348cf0691dc47b906190dfc0f4c7761c070455c6c9f1c642863a2c077") {
20
+ for (let $i = 0; $i < 124; $i += 1) {
23
21
  $[$i] = Symbol.for("react.memo_cache_sentinel");
24
22
  }
25
- $[0] = "8964b5418275bd38d0d46628f0c5c416a0eb127a555095f594f9e18fa28ba85a";
23
+ $[0] = "df7020e348cf0691dc47b906190dfc0f4c7761c070455c6c9f1c642863a2c077";
26
24
  }
27
25
  const {
28
26
  defaultValue,
@@ -273,7 +271,7 @@ const Slider = t0 => {
273
271
  } else {
274
272
  t12 = $[49];
275
273
  }
276
- const handleMouseUp = useEventCallback(t12);
274
+ const handleMouseUp = useEffectEvent(t12);
277
275
  let t13;
278
276
  if ($[50] !== draggedIndex || $[51] !== handleValueChange || $[52] !== max || $[53] !== min || $[54] !== validStep || $[55] !== validValues) {
279
277
  t13 = t14 => {
@@ -297,9 +295,8 @@ const Slider = t0 => {
297
295
  } else {
298
296
  t13 = $[56];
299
297
  }
300
- const handleMouseMove = useEventCallback(t13);
298
+ const handleMouseMove = useEffectEvent(t13);
301
299
  let t14;
302
- let t15;
303
300
  if ($[57] !== disabled || $[58] !== handleMouseMove || $[59] !== handleMouseUp || $[60] !== isDragging) {
304
301
  t14 = () => {
305
302
  if (disabled) {
@@ -319,112 +316,118 @@ const Slider = t0 => {
319
316
  window.removeEventListener("mouseup", handleMouseUp);
320
317
  };
321
318
  };
322
- t15 = [isDragging, disabled, handleMouseMove, handleMouseUp];
323
319
  $[57] = disabled;
324
320
  $[58] = handleMouseMove;
325
321
  $[59] = handleMouseUp;
326
322
  $[60] = isDragging;
327
323
  $[61] = t14;
328
- $[62] = t15;
329
324
  } else {
330
325
  t14 = $[61];
331
- t15 = $[62];
326
+ }
327
+ let t15;
328
+ if ($[62] !== disabled || $[63] !== isDragging) {
329
+ t15 = [isDragging, disabled];
330
+ $[62] = disabled;
331
+ $[63] = isDragging;
332
+ $[64] = t15;
333
+ } else {
334
+ t15 = $[64];
332
335
  }
333
336
  useEffect(t14, t15);
334
337
  const t16 = "presentation";
335
338
  const t17 = !!marks || showTag;
336
339
  let t18;
337
- if ($[63] !== className || $[64] !== disabled || $[65] !== t17) {
340
+ if ($[65] !== className || $[66] !== disabled || $[67] !== t17) {
338
341
  t18 = classNames(styles.slider, className, {
339
342
  [styles.disabled]: disabled,
340
343
  [styles.marked]: t17
341
344
  });
342
- $[63] = className;
343
- $[64] = disabled;
344
- $[65] = t17;
345
- $[66] = t18;
345
+ $[65] = className;
346
+ $[66] = disabled;
347
+ $[67] = t17;
348
+ $[68] = t18;
346
349
  } else {
347
- t18 = $[66];
350
+ t18 = $[68];
348
351
  }
349
352
  const t19 = -1;
350
353
  let t20;
351
- if ($[67] !== shortcutsMap || $[68] !== shortcutsScope) {
354
+ if ($[69] !== shortcutsMap || $[70] !== shortcutsScope) {
352
355
  t20 = /*#__PURE__*/jsx(Shortcuts, {
353
356
  map: shortcutsMap,
354
357
  scope: shortcutsScope
355
358
  });
356
- $[67] = shortcutsMap;
357
- $[68] = shortcutsScope;
358
- $[69] = t20;
359
+ $[69] = shortcutsMap;
360
+ $[70] = shortcutsScope;
361
+ $[71] = t20;
359
362
  } else {
360
- t20 = $[69];
363
+ t20 = $[71];
361
364
  }
362
365
  const t21 = !showTicks;
363
366
  let t22;
364
- if ($[70] !== disabled || $[71] !== t21) {
367
+ if ($[72] !== disabled || $[73] !== t21) {
365
368
  t22 = classNames(styles.rail, {
366
369
  [styles.rounded]: t21,
367
370
  [styles.disabled]: disabled
368
371
  });
369
- $[70] = disabled;
370
- $[71] = t21;
371
- $[72] = t22;
372
+ $[72] = disabled;
373
+ $[73] = t21;
374
+ $[74] = t22;
372
375
  } else {
373
- t22 = $[72];
376
+ t22 = $[74];
374
377
  }
375
378
  let t23;
376
- if ($[73] !== t22) {
379
+ if ($[75] !== t22) {
377
380
  t23 = /*#__PURE__*/jsx("div", {
378
381
  className: t22
379
382
  });
380
- $[73] = t22;
381
- $[74] = t23;
383
+ $[75] = t22;
384
+ $[76] = t23;
382
385
  } else {
383
- t23 = $[74];
386
+ t23 = $[76];
384
387
  }
385
388
  const t24 = `${trackStart}%`;
386
389
  const t25 = `${trackLength}%`;
387
390
  let t26;
388
- if ($[75] !== t24 || $[76] !== t25) {
391
+ if ($[77] !== t24 || $[78] !== t25) {
389
392
  t26 = {
390
393
  left: t24,
391
394
  width: t25
392
395
  };
393
- $[75] = t24;
394
- $[76] = t25;
395
- $[77] = t26;
396
+ $[77] = t24;
397
+ $[78] = t25;
398
+ $[79] = t26;
396
399
  } else {
397
- t26 = $[77];
400
+ t26 = $[79];
398
401
  }
399
402
  const t27 = !showTicks;
400
403
  let t28;
401
- if ($[78] !== disabled || $[79] !== t27) {
404
+ if ($[80] !== disabled || $[81] !== t27) {
402
405
  t28 = classNames(styles.track, {
403
406
  [styles.rounded]: t27,
404
407
  [styles.disabled]: disabled
405
408
  });
406
- $[78] = disabled;
407
- $[79] = t27;
408
- $[80] = t28;
409
+ $[80] = disabled;
410
+ $[81] = t27;
411
+ $[82] = t28;
409
412
  } else {
410
- t28 = $[80];
413
+ t28 = $[82];
411
414
  }
412
415
  let t29;
413
- if ($[81] !== t26 || $[82] !== t28) {
416
+ if ($[83] !== t26 || $[84] !== t28) {
414
417
  t29 = /*#__PURE__*/jsx("div", {
415
418
  style: t26,
416
419
  className: t28
417
420
  });
418
- $[81] = t26;
419
- $[82] = t28;
420
- $[83] = t29;
421
+ $[83] = t26;
422
+ $[84] = t28;
423
+ $[85] = t29;
421
424
  } else {
422
- t29 = $[83];
425
+ t29 = $[85];
423
426
  }
424
427
  let t30;
425
- if ($[84] !== disabled || $[85] !== draggedIndex || $[86] !== handleMouseDown || $[87] !== isDragging || $[88] !== max || $[89] !== min || $[90] !== renderTag || $[91] !== showTag || $[92] !== validValues) {
428
+ if ($[86] !== disabled || $[87] !== draggedIndex || $[88] !== handleMouseDown || $[89] !== isDragging || $[90] !== max || $[91] !== min || $[92] !== renderTag || $[93] !== showTag || $[94] !== validValues) {
426
429
  let t31;
427
- if ($[94] !== disabled || $[95] !== draggedIndex || $[96] !== handleMouseDown || $[97] !== isDragging || $[98] !== max || $[99] !== min || $[100] !== renderTag || $[101] !== showTag) {
430
+ if ($[96] !== disabled || $[97] !== draggedIndex || $[98] !== handleMouseDown || $[99] !== isDragging || $[100] !== max || $[101] !== min || $[102] !== renderTag || $[103] !== showTag) {
428
431
  t31 = (numValue, index_5) => {
429
432
  const percent = toPercent(numValue, min, max);
430
433
  return /*#__PURE__*/jsxs(Fragment, {
@@ -456,34 +459,34 @@ const Slider = t0 => {
456
459
  })]
457
460
  }, index_5);
458
461
  };
459
- $[94] = disabled;
460
- $[95] = draggedIndex;
461
- $[96] = handleMouseDown;
462
- $[97] = isDragging;
463
- $[98] = max;
464
- $[99] = min;
465
- $[100] = renderTag;
466
- $[101] = showTag;
467
- $[102] = t31;
462
+ $[96] = disabled;
463
+ $[97] = draggedIndex;
464
+ $[98] = handleMouseDown;
465
+ $[99] = isDragging;
466
+ $[100] = max;
467
+ $[101] = min;
468
+ $[102] = renderTag;
469
+ $[103] = showTag;
470
+ $[104] = t31;
468
471
  } else {
469
- t31 = $[102];
472
+ t31 = $[104];
470
473
  }
471
474
  t30 = validValues.map(t31);
472
- $[84] = disabled;
473
- $[85] = draggedIndex;
474
- $[86] = handleMouseDown;
475
- $[87] = isDragging;
476
- $[88] = max;
477
- $[89] = min;
478
- $[90] = renderTag;
479
- $[91] = showTag;
480
- $[92] = validValues;
481
- $[93] = t30;
475
+ $[86] = disabled;
476
+ $[87] = draggedIndex;
477
+ $[88] = handleMouseDown;
478
+ $[89] = isDragging;
479
+ $[90] = max;
480
+ $[91] = min;
481
+ $[92] = renderTag;
482
+ $[93] = showTag;
483
+ $[94] = validValues;
484
+ $[95] = t30;
482
485
  } else {
483
- t30 = $[93];
486
+ t30 = $[95];
484
487
  }
485
488
  let t31;
486
- if ($[103] !== disabled || $[104] !== max || $[105] !== min) {
489
+ if ($[105] !== disabled || $[106] !== max || $[107] !== min) {
487
490
  t31 = (t32, index_6) => {
488
491
  const {
489
492
  value: markValue,
@@ -500,16 +503,16 @@ const Slider = t0 => {
500
503
  children: label !== null && label !== void 0 ? label : markValue
501
504
  }, index_6);
502
505
  };
503
- $[103] = disabled;
504
- $[104] = max;
505
- $[105] = min;
506
- $[106] = t31;
506
+ $[105] = disabled;
507
+ $[106] = max;
508
+ $[107] = min;
509
+ $[108] = t31;
507
510
  } else {
508
- t31 = $[106];
511
+ t31 = $[108];
509
512
  }
510
513
  const t32 = markValues.map(t31);
511
514
  let t33;
512
- if ($[107] !== disabled || $[108] !== isRange || $[109] !== max || $[110] !== min || $[111] !== validValues) {
515
+ if ($[109] !== disabled || $[110] !== isRange || $[111] !== max || $[112] !== min || $[113] !== validValues) {
513
516
  t33 = (t34, index_7) => {
514
517
  const {
515
518
  value: tickValue
@@ -526,18 +529,18 @@ const Slider = t0 => {
526
529
  }
527
530
  }, index_7);
528
531
  };
529
- $[107] = disabled;
530
- $[108] = isRange;
531
- $[109] = max;
532
- $[110] = min;
533
- $[111] = validValues;
534
- $[112] = t33;
532
+ $[109] = disabled;
533
+ $[110] = isRange;
534
+ $[111] = max;
535
+ $[112] = min;
536
+ $[113] = validValues;
537
+ $[114] = t33;
535
538
  } else {
536
- t33 = $[112];
539
+ t33 = $[114];
537
540
  }
538
541
  const t34 = tickMarks.map(t33);
539
542
  let t35;
540
- if ($[113] !== handleMouseDown || $[114] !== t18 || $[115] !== t20 || $[116] !== t23 || $[117] !== t29 || $[118] !== t30 || $[119] !== t32 || $[120] !== t34) {
543
+ if ($[115] !== handleMouseDown || $[116] !== t18 || $[117] !== t20 || $[118] !== t23 || $[119] !== t29 || $[120] !== t30 || $[121] !== t32 || $[122] !== t34) {
541
544
  t35 = /*#__PURE__*/jsxs("div", {
542
545
  ref: ref,
543
546
  role: t16,
@@ -546,17 +549,17 @@ const Slider = t0 => {
546
549
  onMouseDown: handleMouseDown,
547
550
  children: [t20, t23, t29, t30, t32, t34]
548
551
  });
549
- $[113] = handleMouseDown;
550
- $[114] = t18;
551
- $[115] = t20;
552
- $[116] = t23;
553
- $[117] = t29;
554
- $[118] = t30;
555
- $[119] = t32;
556
- $[120] = t34;
557
- $[121] = t35;
552
+ $[115] = handleMouseDown;
553
+ $[116] = t18;
554
+ $[117] = t20;
555
+ $[118] = t23;
556
+ $[119] = t29;
557
+ $[120] = t30;
558
+ $[121] = t32;
559
+ $[122] = t34;
560
+ $[123] = t35;
558
561
  } else {
559
- t35 = $[121];
562
+ t35 = $[123];
560
563
  }
561
564
  return t35;
562
565
  };