@jetbrains/ring-ui-built 7.0.124 → 8.0.0-beta.10

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 (262) 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/icon-svg.js +37 -52
  5. package/components/_helpers/legacy-table.js +3 -0
  6. package/components/_helpers/tab-link.js +1 -1
  7. package/components/_helpers/table.js +2 -2
  8. package/components/_helpers/theme.js +49 -37
  9. package/components/alert/alert-actions.js +1 -1
  10. package/components/alert/alert-heading.js +1 -1
  11. package/components/alert/alert.js +2 -2
  12. package/components/alert-service/alert-service.js +2 -2
  13. package/components/auth/auth-core.js +2 -2
  14. package/components/auth/auth.js +2 -2
  15. package/components/auth/down-notification.js +2 -2
  16. package/components/auth/iframe-flow.js +1 -1
  17. package/components/auth/storage.js +2 -2
  18. package/components/auth-dialog/auth-dialog.js +2 -2
  19. package/components/auth-dialog-service/auth-dialog-service.js +2 -2
  20. package/components/avatar/avatar-info.js +1 -1
  21. package/components/avatar/avatar-size.d.ts +0 -4
  22. package/components/avatar/avatar-size.js +0 -4
  23. package/components/avatar/avatar.js +1 -8
  24. package/components/avatar/fallback-avatar.js +3 -48
  25. package/components/avatar-stack/avatar-stack.js +5 -5
  26. package/components/banner/banner.js +2 -2
  27. package/components/button/button.d.ts +0 -4
  28. package/components/button/button.js +4 -10
  29. package/components/button-group/button-group.js +1 -1
  30. package/components/button-toolbar/button-toolbar.js +1 -1
  31. package/components/checkbox/checkbox.d.ts +1 -1
  32. package/components/checkbox/checkbox.js +1 -2
  33. package/components/clipboard/clipboard.js +2 -2
  34. package/components/collapse/collapse-content.js +35 -43
  35. package/components/collapse/collapse-context.d.ts +1 -0
  36. package/components/collapse/collapse-context.js +1 -0
  37. package/components/collapse/collapse-control.js +5 -5
  38. package/components/collapse/collapse.js +34 -25
  39. package/components/collapsible-group/collapsible-group.d.ts +5 -1
  40. package/components/collapsible-group/collapsible-group.js +80 -98
  41. package/components/components/util-stories.js +63 -1
  42. package/components/confirm/confirm.js +2 -2
  43. package/components/confirm-service/confirm-service.js +4 -4
  44. package/components/contenteditable/contenteditable.js +4 -5
  45. package/components/control-help/control-help.js +1 -1
  46. package/components/control-label/control-label.js +1 -1
  47. package/components/data-list/data-list.d.ts +4 -4
  48. package/components/data-list/data-list.js +5 -5
  49. package/components/data-list/data-list.mock.d.ts +1 -1
  50. package/components/data-list/data-list.mock.js +2 -2
  51. package/components/data-list/item.d.ts +1 -1
  52. package/components/data-list/item.js +3 -3
  53. package/components/data-list/selection.d.ts +1 -1
  54. package/components/data-list/selection.js +2 -2
  55. package/components/data-list/title.js +1 -2
  56. package/components/date-picker/date-input.js +2 -2
  57. package/components/date-picker/date-picker.js +2 -3
  58. package/components/date-picker/date-popup.js +4 -5
  59. package/components/date-picker/month-names.js +1 -1
  60. package/components/date-picker/month-slider.js +1 -1
  61. package/components/date-picker/month.d.ts +0 -2
  62. package/components/date-picker/month.js +17 -18
  63. package/components/date-picker/months.js +43 -36
  64. package/components/date-picker/use-scroll-behavior.js +45 -45
  65. package/components/date-picker/weekdays.js +1 -1
  66. package/components/date-picker/years.js +61 -55
  67. package/components/dialog/dialog.d.ts +2 -2
  68. package/components/dialog/dialog.js +5 -5
  69. package/components/dropdown/anchor.js +3 -3
  70. package/components/dropdown/dropdown.js +3 -3
  71. package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
  72. package/components/dropdown-menu/dropdown-menu.js +63 -58
  73. package/components/editable-heading/editable-heading.d.ts +1 -2
  74. package/components/editable-heading/editable-heading.js +14 -13
  75. package/components/error-bubble/error-bubble.js +1 -1
  76. package/components/error-message/error-message.js +1 -2
  77. package/components/footer/footer.js +1 -1
  78. package/components/global/compose-refs.d.ts +2 -1
  79. package/components/global/compose-refs.js +44 -8
  80. package/components/global/configuration.d.ts +0 -5
  81. package/components/global/configuration.js +2 -10
  82. package/components/global/controls-height.js +1 -1
  83. package/components/global/create-stateful-context.js +11 -11
  84. package/components/global/focus-sensor-hoc.js +1 -0
  85. package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
  86. package/components/global/focus-with-temporary-tabindex.js +23 -0
  87. package/components/global/intersection-observer-context.d.ts +46 -0
  88. package/components/global/intersection-observer-context.js +138 -0
  89. package/components/global/is-within-interactive-element.d.ts +6 -0
  90. package/components/global/is-within-interactive-element.js +11 -0
  91. package/components/global/is-within-navigable-element.d.ts +6 -0
  92. package/components/global/is-within-navigable-element.js +11 -0
  93. package/components/global/parse-css-duration.d.ts +5 -0
  94. package/components/global/parse-css-duration.js +14 -0
  95. package/components/global/rerender-hoc.d.ts +4 -2
  96. package/components/global/rerender-hoc.js +11 -24
  97. package/components/global/schedule-with-cleanup.d.ts +12 -0
  98. package/components/global/schedule-with-cleanup.js +36 -0
  99. package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
  100. package/components/{table/selection.js → global/table-selection.js} +5 -5
  101. package/components/global/theme.d.ts +4 -3
  102. package/components/global/theme.js +1 -1
  103. package/components/global/variables.interface.d.ts +0 -4
  104. package/components/header/header-icon.js +3 -3
  105. package/components/header/header.js +3 -3
  106. package/components/header/links.js +1 -1
  107. package/components/header/logo.js +1 -2
  108. package/components/header/profile.js +5 -5
  109. package/components/header/services.js +3 -3
  110. package/components/header/smart-profile.js +3 -3
  111. package/components/header/smart-services.js +3 -3
  112. package/components/heading/heading.js +1 -1
  113. package/components/i18n/i18n-context.js +4 -4
  114. package/components/icon/icon-svg.js +1 -2
  115. package/components/icon/icon.d.ts +0 -1
  116. package/components/icon/icon.js +2 -6
  117. package/components/icon/index.js +1 -2
  118. package/components/input/input.d.ts +1 -1
  119. package/components/input/input.js +3 -3
  120. package/components/internal/reorder-animation-context.js +159 -0
  121. package/components/internal/reorder-handle.js +750 -0
  122. package/components/internal/reorder-layout-context.js +141 -0
  123. package/components/internal/table-header.js +685 -0
  124. package/components/internal/virtualization.js +368 -0
  125. package/components/island/adaptive-island-hoc.js +3 -3
  126. package/components/island/content.d.ts +7 -2
  127. package/components/island/content.js +27 -18
  128. package/components/island/header.js +1 -1
  129. package/components/island/island.js +1 -1
  130. package/components/{table → legacy-table}/cell.js +1 -1
  131. package/components/{table → legacy-table}/header-cell.js +2 -3
  132. package/components/{table → legacy-table}/header.js +2 -3
  133. package/components/{table → legacy-table}/multitable.d.ts +1 -1
  134. package/components/{table → legacy-table}/row-with-focus-sensor.js +3 -3
  135. package/components/{table → legacy-table}/row.d.ts +1 -1
  136. package/components/{table → legacy-table}/row.js +5 -5
  137. package/components/legacy-table/selection-adapter.d.ts +6 -0
  138. package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
  139. package/components/{table → legacy-table}/simple-table.d.ts +2 -2
  140. package/components/{table → legacy-table}/simple-table.js +5 -5
  141. package/components/{table → legacy-table}/smart-table.d.ts +5 -5
  142. package/components/{table → legacy-table}/smart-table.js +6 -6
  143. package/components/legacy-table/table.d.ts +109 -0
  144. package/components/legacy-table/table.js +369 -0
  145. package/components/list/consts.d.ts +0 -1
  146. package/components/list/consts.js +0 -1
  147. package/components/list/list-item.js +3 -5
  148. package/components/list/list-users-groups-source.js +1 -2
  149. package/components/list/list.d.ts +0 -4
  150. package/components/list/list.js +1 -2
  151. package/components/login-dialog/login-dialog.js +3 -3
  152. package/components/login-dialog/service.js +2 -2
  153. package/components/message/message.js +1 -1
  154. package/components/pager/pager.js +3 -3
  155. package/components/popup/popup.js +1 -1
  156. package/components/popup/popup.target.d.ts +3 -2
  157. package/components/popup/popup.target.js +32 -28
  158. package/components/popup-menu/popup-menu.js +1 -1
  159. package/components/query-assist/query-assist-suggestions.js +1 -2
  160. package/components/query-assist/query-assist.d.ts +3 -1
  161. package/components/query-assist/query-assist.js +2 -2
  162. package/components/radio/radio-item.d.ts +3 -3
  163. package/components/radio/radio-item.js +33 -19
  164. package/components/radio/radio.d.ts +2 -2
  165. package/components/radio/radio.js +2 -2
  166. package/components/scrollable-section/scrollable-section.js +1 -1
  167. package/components/select/chevron-button.js +3 -3
  168. package/components/select/select-filter.js +3 -3
  169. package/components/select/select-popup.d.ts +3 -2
  170. package/components/select/select-popup.js +9 -4
  171. package/components/select/select.d.ts +6 -2
  172. package/components/select/select.js +5 -4
  173. package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
  174. package/components/selection-toolbar/selection-toolbar.js +200 -0
  175. package/components/slider/slider.js +100 -97
  176. package/components/storage/storage-local.js +2 -2
  177. package/components/storage/storage.js +2 -2
  178. package/components/style.css +1 -1
  179. package/components/tab-trap/tab-trap.d.ts +3 -3
  180. package/components/tab-trap/tab-trap.js +83 -80
  181. package/components/table/default-item-renderer.d.ts +55 -0
  182. package/components/table/default-item-renderer.js +240 -0
  183. package/components/table/internal/reorder-animation-context.d.ts +21 -0
  184. package/components/table/internal/reorder-handle.d.ts +9 -0
  185. package/components/table/internal/reorder-layout-context.d.ts +16 -0
  186. package/components/table/internal/table-header.d.ts +1 -0
  187. package/components/table/internal/virtualization.d.ts +41 -0
  188. package/components/table/item-virtualization.d.ts +37 -0
  189. package/components/table/item-virtualization.js +73 -0
  190. package/components/table/reorder-animation.d.ts +37 -0
  191. package/components/table/reorder-animation.js +18 -0
  192. package/components/table/reorder-item-layout.d.ts +32 -0
  193. package/components/table/reorder-item-layout.js +57 -0
  194. package/components/table/table-const.d.ts +10 -0
  195. package/components/table/table-const.js +13 -0
  196. package/components/table/table-primitives.d.ts +64 -0
  197. package/components/table/table-primitives.js +180 -0
  198. package/components/table/table-props.d.ts +304 -0
  199. package/components/table/table-props.js +1 -0
  200. package/components/table/table.d.ts +231 -107
  201. package/components/table/table.js +351 -346
  202. package/components/tabs/collapsible-more.js +1 -1
  203. package/components/tabs/collapsible-tab.js +1 -1
  204. package/components/tabs/collapsible-tabs.js +1 -1
  205. package/components/tabs/dumb-tabs.js +1 -1
  206. package/components/tabs/smart-tabs.js +1 -1
  207. package/components/tabs/tab-link.js +1 -1
  208. package/components/tabs/tabs.js +1 -1
  209. package/components/tag/tag.js +1 -1
  210. package/components/tags-input/tags-input.d.ts +3 -1
  211. package/components/tags-input/tags-input.js +4 -4
  212. package/components/tags-list/tags-list.js +2 -2
  213. package/components/toggle/toggle.js +1 -1
  214. package/components/tooltip/tooltip.d.ts +2 -1
  215. package/components/tooltip/tooltip.js +5 -3
  216. package/components/upload/upload.d.ts +4 -3
  217. package/components/upload/upload.js +7 -30
  218. package/components/user-agreement/service.js +3 -3
  219. package/components/user-agreement/user-agreement.js +2 -2
  220. package/components/user-card/card.js +4 -4
  221. package/components/user-card/smart-user-card-tooltip.js +3 -3
  222. package/components/user-card/tooltip.js +3 -3
  223. package/components/user-card/user-card.js +5 -5
  224. package/components/util-stories.d.ts +26 -0
  225. package/package.json +8 -9
  226. package/components/__mocks__/old-browsers-message.js +0 -3
  227. package/components/_helpers/grid.js +0 -3
  228. package/components/_helpers/sidebar.js +0 -110
  229. package/components/content-layout/content-layout.d.ts +0 -20
  230. package/components/content-layout/content-layout.js +0 -50
  231. package/components/content-layout/sidebar.d.ts +0 -26
  232. package/components/content-layout/sidebar.js +0 -5
  233. package/components/date-picker/use-intersection-observer.d.ts +0 -6
  234. package/components/date-picker/use-intersection-observer.js +0 -93
  235. package/components/expand/collapsible-group.d.ts +0 -8
  236. package/components/expand/collapsible-group.js +0 -52
  237. package/components/global/composeRefs.d.ts +0 -6
  238. package/components/global/composeRefs.js +0 -9
  239. package/components/global/use-event-callback.d.ts +0 -4
  240. package/components/global/use-event-callback.js +0 -49
  241. package/components/grid/col.d.ts +0 -16
  242. package/components/grid/col.js +0 -63
  243. package/components/grid/grid.d.ts +0 -13
  244. package/components/grid/grid.js +0 -27
  245. package/components/grid/row.d.ts +0 -21
  246. package/components/grid/row.js +0 -72
  247. package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
  248. package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
  249. package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
  250. package/components/old-browsers-message/old-browsers-message.js +0 -89
  251. package/components/old-browsers-message/white-list.d.ts +0 -2
  252. package/components/old-browsers-message/white-list.js +0 -30
  253. package/components/table/selection-adapter.d.ts +0 -6
  254. /package/components/{table → legacy-table}/cell.d.ts +0 -0
  255. /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
  256. /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
  257. /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
  258. /package/components/{table → legacy-table}/header.d.ts +0 -0
  259. /package/components/{table → legacy-table}/multitable.js +0 -0
  260. /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
  261. /package/components/{table → legacy-table}/selection-adapter.js +0 -0
  262. /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
@@ -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
  };
@@ -13,8 +13,7 @@ import '../icon/icon.js';
13
13
  import 'util-deprecate';
14
14
  import '../icon/icon.constants.js';
15
15
  import '../_helpers/icon-svg.js';
16
- import 'react-compiler-runtime';
17
- import '../global/configuration.js';
16
+ import 'react/compiler-runtime';
18
17
  import '../global/memoize.js';
19
18
  import 'react/jsx-runtime';
20
19
  import '../loader-inline/loader-inline.js';
@@ -25,6 +24,7 @@ import '@jetbrains/icons/chevron-down';
25
24
  import '@jetbrains/icons/chevron-12px-down';
26
25
  import '../link/clickable-link.js';
27
26
  import '../global/controls-height.js';
27
+ import '../global/configuration.js';
28
28
  import '../_helpers/button.classes.js';
29
29
  import '../_helpers/theme.js';
30
30
  import '../alert/alert-heading.js';
@@ -14,8 +14,7 @@ import '../icon/icon.js';
14
14
  import 'util-deprecate';
15
15
  import '../icon/icon.constants.js';
16
16
  import '../_helpers/icon-svg.js';
17
- import 'react-compiler-runtime';
18
- import '../global/configuration.js';
17
+ import 'react/compiler-runtime';
19
18
  import '../global/memoize.js';
20
19
  import 'react/jsx-runtime';
21
20
  import '../loader-inline/loader-inline.js';
@@ -26,6 +25,7 @@ import '@jetbrains/icons/chevron-down';
26
25
  import '@jetbrains/icons/chevron-12px-down';
27
26
  import '../link/clickable-link.js';
28
27
  import '../global/controls-height.js';
28
+ import '../global/configuration.js';
29
29
  import '../_helpers/button.classes.js';
30
30
  import '../_helpers/theme.js';
31
31
  import '../alert/alert-heading.js';