@jetbrains/ring-ui-built 7.0.114 → 7.0.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_helpers/heading.js +2 -2
- package/components/_helpers/theme.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/collapsible-group/collapsible-group.d.ts +16 -0
- package/components/collapsible-group/collapsible-group.js +381 -0
- package/components/date-picker/date-picker.js +24 -12
- package/components/date-picker/date-popup.js +3 -3
- package/components/date-picker/months.js +1 -0
- package/components/date-picker/use-scroll-behavior.js +1 -0
- package/components/date-picker/years.js +1 -0
- package/components/dropdown-menu/dropdown-menu.js +6 -6
- package/components/editable-heading/editable-heading.js +120 -107
- package/components/expand/collapsible-group.d.ts +8 -16
- package/components/expand/collapsible-group.js +33 -363
- package/components/global/theme.js +1 -1
- package/components/global/use-event-callback.d.ts +3 -0
- package/components/global/use-event-callback.js +8 -3
- package/components/header/header.js +1 -1
- package/components/heading/heading.js +3 -3
- package/components/markdown/markdown.js +2 -2
- package/components/message/message.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/popup/popup.js +1 -1
- package/components/radio/radio-item.js +2 -2
- package/components/slider/slider.js +1 -0
- package/components/style.css +1 -1
- package/components/tooltip/tooltip.js +1 -1
- package/components/user-agreement/service.js +6 -6
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useEffect } from 'react';
|
|
3
|
+
import { useLayoutEffect, useEffect } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import Heading, { Levels } from '../heading/heading.js';
|
|
6
6
|
import { Button } from '../button/button.js';
|
|
@@ -39,12 +39,12 @@ var styles = {"editableHeading":"ring-editable-heading-editableHeading","fullSiz
|
|
|
39
39
|
function noop() {}
|
|
40
40
|
// eslint-disable-next-line complexity
|
|
41
41
|
const EditableHeading = props => {
|
|
42
|
-
const $ = c(
|
|
43
|
-
if ($[0] !== "
|
|
44
|
-
for (let $i = 0; $i <
|
|
42
|
+
const $ = c(134);
|
|
43
|
+
if ($[0] !== "07354b4b5f4ebcba544bc9d3e840d7068d1f2b93d046629ed3331f3bf1ebf45b") {
|
|
44
|
+
for (let $i = 0; $i < 134; $i += 1) {
|
|
45
45
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
46
46
|
}
|
|
47
|
-
$[0] = "
|
|
47
|
+
$[0] = "07354b4b5f4ebcba544bc9d3e840d7068d1f2b93d046629ed3331f3bf1ebf45b";
|
|
48
48
|
}
|
|
49
49
|
let children;
|
|
50
50
|
let className;
|
|
@@ -275,12 +275,16 @@ const EditableHeading = props => {
|
|
|
275
275
|
t21 = $[56];
|
|
276
276
|
}
|
|
277
277
|
const inputClasses = t21;
|
|
278
|
-
const stretch = _temp2;
|
|
279
278
|
let t22;
|
|
280
279
|
if ($[57] !== multiline) {
|
|
281
|
-
t22 =
|
|
282
|
-
if (multiline &&
|
|
283
|
-
|
|
280
|
+
t22 = el => {
|
|
281
|
+
if (multiline && el && el.scrollHeight >= el.clientHeight) {
|
|
282
|
+
el.style.height = "0";
|
|
283
|
+
const {
|
|
284
|
+
paddingTop,
|
|
285
|
+
paddingBottom
|
|
286
|
+
} = window.getComputedStyle(el);
|
|
287
|
+
el.style.height = `${el.scrollHeight - parseFloat(paddingTop) - parseFloat(paddingBottom)}px`;
|
|
284
288
|
}
|
|
285
289
|
};
|
|
286
290
|
$[57] = multiline;
|
|
@@ -291,10 +295,10 @@ const EditableHeading = props => {
|
|
|
291
295
|
const checkValue = t22;
|
|
292
296
|
let t23;
|
|
293
297
|
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
294
|
-
t23 =
|
|
295
|
-
const scrollHeight =
|
|
296
|
-
const clientHeight =
|
|
297
|
-
const scrollTop =
|
|
298
|
+
t23 = el_0 => {
|
|
299
|
+
const scrollHeight = el_0.scrollHeight || 0;
|
|
300
|
+
const clientHeight = el_0.clientHeight || 0;
|
|
301
|
+
const scrollTop = el_0.scrollTop || 0;
|
|
298
302
|
setIsScrolledToBottom(scrollHeight - clientHeight <= scrollTop);
|
|
299
303
|
setIsOverflow(scrollHeight > clientHeight);
|
|
300
304
|
};
|
|
@@ -400,8 +404,28 @@ const EditableHeading = props => {
|
|
|
400
404
|
const onInputBlur = t30;
|
|
401
405
|
let t31;
|
|
402
406
|
let t32;
|
|
403
|
-
if ($[78] !==
|
|
407
|
+
if ($[78] !== checkValue || $[79] !== isEditing || $[80] !== multiline) {
|
|
404
408
|
t31 = () => {
|
|
409
|
+
if (multiline && isEditing && textAreaRef.current) {
|
|
410
|
+
checkValue(textAreaRef.current);
|
|
411
|
+
checkOverflow(textAreaRef.current);
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
t32 = [checkOverflow, checkValue, isEditing, multiline];
|
|
415
|
+
$[78] = checkValue;
|
|
416
|
+
$[79] = isEditing;
|
|
417
|
+
$[80] = multiline;
|
|
418
|
+
$[81] = t31;
|
|
419
|
+
$[82] = t32;
|
|
420
|
+
} else {
|
|
421
|
+
t31 = $[81];
|
|
422
|
+
t32 = $[82];
|
|
423
|
+
}
|
|
424
|
+
useLayoutEffect(t31, t32);
|
|
425
|
+
let t33;
|
|
426
|
+
let t34;
|
|
427
|
+
if ($[83] !== onMouseMove || $[84] !== onMouseUp) {
|
|
428
|
+
t33 = () => {
|
|
405
429
|
window.addEventListener("mousemove", onMouseMove);
|
|
406
430
|
window.addEventListener("mouseup", onMouseUp);
|
|
407
431
|
return () => {
|
|
@@ -409,19 +433,19 @@ const EditableHeading = props => {
|
|
|
409
433
|
window.removeEventListener("mouseup", onMouseUp);
|
|
410
434
|
};
|
|
411
435
|
};
|
|
412
|
-
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
436
|
+
t34 = [onMouseMove, onMouseUp];
|
|
437
|
+
$[83] = onMouseMove;
|
|
438
|
+
$[84] = onMouseUp;
|
|
439
|
+
$[85] = t33;
|
|
440
|
+
$[86] = t34;
|
|
417
441
|
} else {
|
|
418
|
-
|
|
419
|
-
|
|
442
|
+
t33 = $[85];
|
|
443
|
+
t34 = $[86];
|
|
420
444
|
}
|
|
421
|
-
useEffect(
|
|
422
|
-
let
|
|
423
|
-
if ($[
|
|
424
|
-
|
|
445
|
+
useEffect(t33, t34);
|
|
446
|
+
let t35;
|
|
447
|
+
if ($[87] !== autoFocus || $[88] !== children || $[89] !== dataTest || $[90] !== disabled || $[91] !== headingClasses || $[92] !== inputClasses || $[93] !== isEditing || $[94] !== isSaving || $[95] !== isScrolledToBottom || $[96] !== isShortcutsDisabled || $[97] !== level || $[98] !== maxInputRows || $[99] !== multiline || $[100] !== onChange || $[101] !== onInputBlur || $[102] !== onInputChange || $[103] !== onInputFocus || $[104] !== onInputScroll || $[105] !== restProps || $[106] !== shortcutsMap || $[107] !== shortcutsScope || $[108] !== size) {
|
|
448
|
+
t35 = !disabled && isEditing ? /*#__PURE__*/jsxs(Fragment, {
|
|
425
449
|
children: [/*#__PURE__*/jsx(Shortcuts, {
|
|
426
450
|
map: shortcutsMap,
|
|
427
451
|
scope: shortcutsScope,
|
|
@@ -468,44 +492,44 @@ const EditableHeading = props => {
|
|
|
468
492
|
children: children
|
|
469
493
|
})
|
|
470
494
|
});
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
495
|
+
$[87] = autoFocus;
|
|
496
|
+
$[88] = children;
|
|
497
|
+
$[89] = dataTest;
|
|
498
|
+
$[90] = disabled;
|
|
499
|
+
$[91] = headingClasses;
|
|
500
|
+
$[92] = inputClasses;
|
|
501
|
+
$[93] = isEditing;
|
|
502
|
+
$[94] = isSaving;
|
|
503
|
+
$[95] = isScrolledToBottom;
|
|
504
|
+
$[96] = isShortcutsDisabled;
|
|
505
|
+
$[97] = level;
|
|
506
|
+
$[98] = maxInputRows;
|
|
507
|
+
$[99] = multiline;
|
|
508
|
+
$[100] = onChange;
|
|
509
|
+
$[101] = onInputBlur;
|
|
510
|
+
$[102] = onInputChange;
|
|
511
|
+
$[103] = onInputFocus;
|
|
512
|
+
$[104] = onInputScroll;
|
|
513
|
+
$[105] = restProps;
|
|
514
|
+
$[106] = shortcutsMap;
|
|
515
|
+
$[107] = shortcutsScope;
|
|
516
|
+
$[108] = size;
|
|
517
|
+
$[109] = t35;
|
|
494
518
|
} else {
|
|
495
|
-
|
|
519
|
+
t35 = $[109];
|
|
496
520
|
}
|
|
497
|
-
let
|
|
498
|
-
if ($[
|
|
499
|
-
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
521
|
+
let t36;
|
|
522
|
+
if ($[110] !== isEditing || $[111] !== renderMenu) {
|
|
523
|
+
t36 = !isEditing && renderMenu();
|
|
524
|
+
$[110] = isEditing;
|
|
525
|
+
$[111] = renderMenu;
|
|
526
|
+
$[112] = t36;
|
|
503
527
|
} else {
|
|
504
|
-
|
|
528
|
+
t36 = $[112];
|
|
505
529
|
}
|
|
506
|
-
let
|
|
507
|
-
if ($[
|
|
508
|
-
|
|
530
|
+
let t37;
|
|
531
|
+
if ($[113] !== embedded || $[114] !== isCancelDisabled || $[115] !== isEditing || $[116] !== isSaveDisabled || $[117] !== isSaving || $[118] !== onCancel || $[119] !== onSave || $[120] !== translations) {
|
|
532
|
+
t37 = isEditing && !embedded && /*#__PURE__*/jsxs(Fragment, {
|
|
509
533
|
children: [/*#__PURE__*/jsx(Button, {
|
|
510
534
|
className: styles.button,
|
|
511
535
|
primary: true,
|
|
@@ -520,72 +544,61 @@ const EditableHeading = props => {
|
|
|
520
544
|
children: translations.cancel
|
|
521
545
|
})]
|
|
522
546
|
});
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
547
|
+
$[113] = embedded;
|
|
548
|
+
$[114] = isCancelDisabled;
|
|
549
|
+
$[115] = isEditing;
|
|
550
|
+
$[116] = isSaveDisabled;
|
|
551
|
+
$[117] = isSaving;
|
|
552
|
+
$[118] = onCancel;
|
|
553
|
+
$[119] = onSave;
|
|
554
|
+
$[120] = translations;
|
|
555
|
+
$[121] = t37;
|
|
532
556
|
} else {
|
|
533
|
-
|
|
557
|
+
t37 = $[121];
|
|
534
558
|
}
|
|
535
|
-
let
|
|
536
|
-
if ($[
|
|
537
|
-
|
|
559
|
+
let t38;
|
|
560
|
+
if ($[122] !== classes || $[123] !== t35 || $[124] !== t36 || $[125] !== t37) {
|
|
561
|
+
t38 = /*#__PURE__*/jsxs("div", {
|
|
538
562
|
className: classes,
|
|
539
|
-
children: [
|
|
563
|
+
children: [t35, t36, t37]
|
|
540
564
|
});
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
565
|
+
$[122] = classes;
|
|
566
|
+
$[123] = t35;
|
|
567
|
+
$[124] = t36;
|
|
568
|
+
$[125] = t37;
|
|
569
|
+
$[126] = t38;
|
|
546
570
|
} else {
|
|
547
|
-
|
|
571
|
+
t38 = $[126];
|
|
548
572
|
}
|
|
549
|
-
let
|
|
550
|
-
if ($[
|
|
551
|
-
|
|
573
|
+
let t39;
|
|
574
|
+
if ($[127] !== error || $[128] !== isEditing || $[129] !== size) {
|
|
575
|
+
t39 = isEditing && error && /*#__PURE__*/jsx("div", {
|
|
552
576
|
className: classNames(styles.errorText, size !== Size.AUTO && inputStyles[`size${size}`]),
|
|
553
577
|
children: error
|
|
554
578
|
});
|
|
555
|
-
$[
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
579
|
+
$[127] = error;
|
|
580
|
+
$[128] = isEditing;
|
|
581
|
+
$[129] = size;
|
|
582
|
+
$[130] = t39;
|
|
559
583
|
} else {
|
|
560
|
-
|
|
584
|
+
t39 = $[130];
|
|
561
585
|
}
|
|
562
|
-
let
|
|
563
|
-
if ($[
|
|
564
|
-
|
|
565
|
-
children: [
|
|
586
|
+
let t40;
|
|
587
|
+
if ($[131] !== t38 || $[132] !== t39) {
|
|
588
|
+
t40 = /*#__PURE__*/jsxs(Fragment, {
|
|
589
|
+
children: [t38, t39]
|
|
566
590
|
});
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
591
|
+
$[131] = t38;
|
|
592
|
+
$[132] = t39;
|
|
593
|
+
$[133] = t40;
|
|
570
594
|
} else {
|
|
571
|
-
|
|
595
|
+
t40 = $[133];
|
|
572
596
|
}
|
|
573
|
-
return
|
|
597
|
+
return t40;
|
|
574
598
|
};
|
|
575
599
|
var editableHeading = /*#__PURE__*/React.memo(EditableHeading);
|
|
576
600
|
function _temp() {
|
|
577
601
|
return null;
|
|
578
602
|
}
|
|
579
|
-
function _temp2(el) {
|
|
580
|
-
if (!el || !el.style) {
|
|
581
|
-
return;
|
|
582
|
-
}
|
|
583
|
-
el.style.height = "0";
|
|
584
|
-
const {
|
|
585
|
-
paddingTop,
|
|
586
|
-
paddingBottom
|
|
587
|
-
} = window.getComputedStyle(el);
|
|
588
|
-
el.style.height = `${el.scrollHeight - parseFloat(paddingTop) - parseFloat(paddingBottom)}px`;
|
|
589
|
-
}
|
|
590
603
|
|
|
591
604
|
export { EditableHeading, Levels, Size, editableHeading as default };
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
expanded?: boolean | null | undefined;
|
|
10
|
-
onChange?: (expanded: boolean) => void;
|
|
11
|
-
disableAnimation?: boolean;
|
|
12
|
-
interactive?: boolean;
|
|
13
|
-
'data-test'?: string | null | undefined;
|
|
14
|
-
}
|
|
15
|
-
declare const CollapsibleGroup: React.ForwardRefExoticComponent<CollapsibleGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export default CollapsibleGroup;
|
|
1
|
+
import { type CollapsibleGroupProps } from '../collapsible-group/collapsible-group';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
|
|
4
|
+
* Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
|
|
5
|
+
*/
|
|
6
|
+
declare const DeprecatedCollapsibleGroup: import("react").ForwardRefExoticComponent<CollapsibleGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { CollapsibleGroupProps };
|
|
8
|
+
export default DeprecatedCollapsibleGroup;
|