@oliasoft-open-source/react-ui-library 10.7.0-beta-2 → 10.7.0-beta-4
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/dist/global.css +55 -50
- package/dist/index.js +65 -42
- package/package.json +1 -1
package/dist/global.css
CHANGED
|
@@ -2628,90 +2628,90 @@ html[data-theme='dark'] {
|
|
|
2628
2628
|
height: 100%;
|
|
2629
2629
|
align-items: stretch;
|
|
2630
2630
|
}
|
|
2631
|
-
.
|
|
2631
|
+
._inputInTable_1xd1g_1 {
|
|
2632
2632
|
background-color: transparent;
|
|
2633
2633
|
border-radius: inherit !important;
|
|
2634
2634
|
height: var(--size);
|
|
2635
2635
|
min-height: 100%;
|
|
2636
2636
|
}
|
|
2637
|
-
.
|
|
2637
|
+
._inputInTable_1xd1g_1:not(:hover):not([data-error]):not([data-warning]) {
|
|
2638
2638
|
border-color: transparent;
|
|
2639
2639
|
}
|
|
2640
|
-
.
|
|
2640
|
+
._inputInTable_1xd1g_1:not(:focus) {
|
|
2641
2641
|
box-shadow: none;
|
|
2642
2642
|
}
|
|
2643
|
-
.
|
|
2643
|
+
._inputHover_1xd1g_13 {
|
|
2644
2644
|
position: relative;
|
|
2645
2645
|
border-color: var(--color-border-hover);
|
|
2646
2646
|
z-index: 2;
|
|
2647
2647
|
}
|
|
2648
|
-
.
|
|
2648
|
+
._inputFocus_1xd1g_18 {
|
|
2649
2649
|
position: relative;
|
|
2650
2650
|
outline: none !important;
|
|
2651
2651
|
border-color: var(--color-border-focus) !important;
|
|
2652
2652
|
box-shadow: var(--shadow-focus);
|
|
2653
2653
|
z-index: 3;
|
|
2654
2654
|
}
|
|
2655
|
-
.
|
|
2655
|
+
._controlFocusVisible_1xd1g_25 {
|
|
2656
2656
|
outline: none;
|
|
2657
2657
|
box-shadow: var(--shadow-focus);
|
|
2658
2658
|
}
|
|
2659
|
-
.
|
|
2660
|
-
.
|
|
2659
|
+
._inputError_1xd1g_29,
|
|
2660
|
+
._inputWarning_1xd1g_30 {
|
|
2661
2661
|
position: relative;
|
|
2662
2662
|
}
|
|
2663
|
-
.
|
|
2663
|
+
._inputError_1xd1g_29 {
|
|
2664
2664
|
z-index: 2;
|
|
2665
2665
|
border-color: var(--color-border-error);
|
|
2666
2666
|
color: var(--color-text-error) !important;
|
|
2667
2667
|
background-color: var(--color-background-error-muted);
|
|
2668
2668
|
}
|
|
2669
|
-
.
|
|
2669
|
+
._inputError_1xd1g_29:hover {
|
|
2670
2670
|
border-color: var(--color-border-error-hover) !important;
|
|
2671
2671
|
}
|
|
2672
|
-
.
|
|
2672
|
+
._inputError_1xd1g_29:focus {
|
|
2673
2673
|
position: relative;
|
|
2674
2674
|
outline: none !important;
|
|
2675
2675
|
border-color: var(--color-border-focus) !important;
|
|
2676
2676
|
box-shadow: var(--shadow-focus);
|
|
2677
2677
|
z-index: 3;
|
|
2678
2678
|
}
|
|
2679
|
-
.
|
|
2679
|
+
._inputWarning_1xd1g_30 {
|
|
2680
2680
|
z-index: 1;
|
|
2681
2681
|
border-color: var(--color-border-warning);
|
|
2682
2682
|
color: var(--color-text-warning) !important;
|
|
2683
2683
|
background-color: var(--color-background-warning-muted);
|
|
2684
2684
|
}
|
|
2685
|
-
.
|
|
2685
|
+
._inputWarning_1xd1g_30:hover {
|
|
2686
2686
|
border-color: var(--color-border-warning-hover) !important;
|
|
2687
2687
|
}
|
|
2688
|
-
.
|
|
2688
|
+
._inputWarning_1xd1g_30:focus {
|
|
2689
2689
|
position: relative;
|
|
2690
2690
|
outline: none !important;
|
|
2691
2691
|
border-color: var(--color-border-focus) !important;
|
|
2692
2692
|
box-shadow: var(--shadow-focus);
|
|
2693
2693
|
z-index: 3;
|
|
2694
2694
|
}
|
|
2695
|
-
.
|
|
2695
|
+
._inputDisabled_1xd1g_65 {
|
|
2696
2696
|
pointer-events: none;
|
|
2697
2697
|
background-color: var(--color-background-disabled);
|
|
2698
2698
|
color: var(--color-text-muted);
|
|
2699
2699
|
box-shadow: none;
|
|
2700
2700
|
}
|
|
2701
|
-
.
|
|
2701
|
+
._hideScrollbars_1xd1g_71 {
|
|
2702
2702
|
/* Firefox */
|
|
2703
2703
|
scrollbar-width: none;
|
|
2704
2704
|
/* IE 10+ */
|
|
2705
2705
|
-ms-overflow-style: none;
|
|
2706
2706
|
/* Chrome, Safari and Opera */
|
|
2707
2707
|
}
|
|
2708
|
-
.
|
|
2708
|
+
._hideScrollbars_1xd1g_71::-webkit-scrollbar {
|
|
2709
2709
|
display: none;
|
|
2710
2710
|
}
|
|
2711
|
-
.
|
|
2711
|
+
._wrapper_1xd1g_81 {
|
|
2712
2712
|
position: relative;
|
|
2713
2713
|
}
|
|
2714
|
-
.
|
|
2714
|
+
._input_1xd1g_1 {
|
|
2715
2715
|
margin: 0;
|
|
2716
2716
|
outline: 0;
|
|
2717
2717
|
text-align: left;
|
|
@@ -2731,93 +2731,93 @@ html[data-theme='dark'] {
|
|
|
2731
2731
|
position: relative;
|
|
2732
2732
|
font-variant-numeric: tabular-nums;
|
|
2733
2733
|
}
|
|
2734
|
-
.
|
|
2734
|
+
._input_1xd1g_1::placeholder {
|
|
2735
2735
|
color: var(--color-text-placeholder);
|
|
2736
2736
|
}
|
|
2737
|
-
.
|
|
2737
|
+
._input_1xd1g_1._isInTable_1xd1g_107 {
|
|
2738
2738
|
background-color: transparent;
|
|
2739
2739
|
border-radius: inherit !important;
|
|
2740
2740
|
height: var(--size);
|
|
2741
2741
|
min-height: 100%;
|
|
2742
2742
|
}
|
|
2743
|
-
.
|
|
2743
|
+
._input_1xd1g_1._isInTable_1xd1g_107:not(:hover):not([data-error]):not([data-warning]) {
|
|
2744
2744
|
border-color: transparent;
|
|
2745
2745
|
}
|
|
2746
|
-
.
|
|
2746
|
+
._input_1xd1g_1._isInTable_1xd1g_107:not(:focus) {
|
|
2747
2747
|
box-shadow: none;
|
|
2748
2748
|
}
|
|
2749
|
-
.
|
|
2749
|
+
._input_1xd1g_1:hover {
|
|
2750
2750
|
position: relative;
|
|
2751
2751
|
border-color: var(--color-border-hover);
|
|
2752
2752
|
z-index: 2;
|
|
2753
2753
|
}
|
|
2754
|
-
.
|
|
2754
|
+
._input_1xd1g_1:focus {
|
|
2755
2755
|
position: relative;
|
|
2756
2756
|
outline: none !important;
|
|
2757
2757
|
border-color: var(--color-border-focus) !important;
|
|
2758
2758
|
box-shadow: var(--shadow-focus);
|
|
2759
2759
|
z-index: 3;
|
|
2760
2760
|
}
|
|
2761
|
-
.
|
|
2761
|
+
._input_1xd1g_1._small_1xd1g_131 {
|
|
2762
2762
|
font-size: var(--font-size-sm);
|
|
2763
2763
|
height: var(--size-sm);
|
|
2764
2764
|
padding: var(--padding-input-sm);
|
|
2765
2765
|
line-height: var(--size-sm);
|
|
2766
2766
|
}
|
|
2767
|
-
.
|
|
2767
|
+
._input_1xd1g_1[data-warning] {
|
|
2768
2768
|
position: relative;
|
|
2769
2769
|
z-index: 1;
|
|
2770
2770
|
border-color: var(--color-border-warning);
|
|
2771
2771
|
color: var(--color-text-warning) !important;
|
|
2772
2772
|
background-color: var(--color-background-warning-muted);
|
|
2773
2773
|
}
|
|
2774
|
-
.
|
|
2774
|
+
._input_1xd1g_1[data-warning]:hover {
|
|
2775
2775
|
border-color: var(--color-border-warning-hover) !important;
|
|
2776
2776
|
}
|
|
2777
|
-
.
|
|
2777
|
+
._input_1xd1g_1[data-warning]:focus {
|
|
2778
2778
|
position: relative;
|
|
2779
2779
|
outline: none !important;
|
|
2780
2780
|
border-color: var(--color-border-focus) !important;
|
|
2781
2781
|
box-shadow: var(--shadow-focus);
|
|
2782
2782
|
z-index: 3;
|
|
2783
2783
|
}
|
|
2784
|
-
.
|
|
2784
|
+
._input_1xd1g_1[data-error] {
|
|
2785
2785
|
position: relative;
|
|
2786
2786
|
z-index: 2;
|
|
2787
2787
|
border-color: var(--color-border-error);
|
|
2788
2788
|
color: var(--color-text-error) !important;
|
|
2789
2789
|
background-color: var(--color-background-error-muted);
|
|
2790
2790
|
}
|
|
2791
|
-
.
|
|
2791
|
+
._input_1xd1g_1[data-error]:hover {
|
|
2792
2792
|
border-color: var(--color-border-error-hover) !important;
|
|
2793
2793
|
}
|
|
2794
|
-
.
|
|
2794
|
+
._input_1xd1g_1[data-error]:focus {
|
|
2795
2795
|
position: relative;
|
|
2796
2796
|
outline: none !important;
|
|
2797
2797
|
border-color: var(--color-border-focus) !important;
|
|
2798
2798
|
box-shadow: var(--shadow-focus);
|
|
2799
2799
|
z-index: 3;
|
|
2800
2800
|
}
|
|
2801
|
-
.
|
|
2801
|
+
._input_1xd1g_1[disabled] {
|
|
2802
2802
|
pointer-events: none;
|
|
2803
2803
|
background-color: var(--color-background-disabled);
|
|
2804
2804
|
color: var(--color-text-muted);
|
|
2805
2805
|
box-shadow: none;
|
|
2806
2806
|
}
|
|
2807
|
-
.
|
|
2807
|
+
._input_1xd1g_1._right_1xd1g_177 {
|
|
2808
2808
|
text-align: right;
|
|
2809
2809
|
}
|
|
2810
|
-
.
|
|
2811
|
-
.
|
|
2810
|
+
._groupOrderFirst_1xd1g_180 ._input_1xd1g_1,
|
|
2811
|
+
._groupOrderMiddle_1xd1g_181 ._input_1xd1g_1 {
|
|
2812
2812
|
border-top-right-radius: 0 !important;
|
|
2813
2813
|
border-bottom-right-radius: 0 !important;
|
|
2814
2814
|
}
|
|
2815
|
-
.
|
|
2816
|
-
.
|
|
2815
|
+
._groupOrderLast_1xd1g_185 ._input_1xd1g_1,
|
|
2816
|
+
._groupOrderMiddle_1xd1g_181 ._input_1xd1g_1 {
|
|
2817
2817
|
border-top-left-radius: 0 !important;
|
|
2818
2818
|
border-bottom-left-radius: 0 !important;
|
|
2819
2819
|
}
|
|
2820
|
-
.
|
|
2820
|
+
._slot_1xd1g_190 {
|
|
2821
2821
|
position: absolute;
|
|
2822
2822
|
top: 1px;
|
|
2823
2823
|
bottom: 1px;
|
|
@@ -2827,32 +2827,33 @@ html[data-theme='dark'] {
|
|
|
2827
2827
|
overflow: hidden;
|
|
2828
2828
|
pointer-events: none;
|
|
2829
2829
|
}
|
|
2830
|
-
.
|
|
2830
|
+
._slot_1xd1g_190 button {
|
|
2831
2831
|
min-height: 0;
|
|
2832
2832
|
border-radius: 0;
|
|
2833
|
+
line-height: 1;
|
|
2833
2834
|
}
|
|
2834
|
-
|
|
2835
|
+
._slot_1xd1g_190 > * {
|
|
2835
2836
|
pointer-events: auto;
|
|
2836
2837
|
}
|
|
2837
|
-
.
|
|
2838
|
+
._slotLeft_1xd1g_208 {
|
|
2838
2839
|
left: 1px;
|
|
2839
2840
|
border-top-left-radius: calc(var(--border-radius) - 1px);
|
|
2840
2841
|
border-bottom-left-radius: calc(var(--border-radius) - 1px);
|
|
2841
2842
|
}
|
|
2842
|
-
.
|
|
2843
|
+
._slotRight_1xd1g_213 {
|
|
2843
2844
|
right: 1px;
|
|
2844
2845
|
border-top-right-radius: calc(var(--border-radius) - 1px);
|
|
2845
2846
|
border-bottom-right-radius: calc(var(--border-radius) - 1px);
|
|
2846
2847
|
}
|
|
2847
|
-
.
|
|
2848
|
-
.
|
|
2848
|
+
._groupOrderFirst_1xd1g_180 ._slotRight_1xd1g_213,
|
|
2849
|
+
._groupOrderMiddle_1xd1g_181 ._slotRight_1xd1g_213 {
|
|
2849
2850
|
border-radius: 0;
|
|
2850
2851
|
}
|
|
2851
|
-
.
|
|
2852
|
-
.
|
|
2852
|
+
._groupOrderLast_1xd1g_185 ._slotLeft_1xd1g_208,
|
|
2853
|
+
._groupOrderMiddle_1xd1g_181 ._slotLeft_1xd1g_208 {
|
|
2853
2854
|
border-radius: 0;
|
|
2854
2855
|
}
|
|
2855
|
-
.
|
|
2856
|
+
._icon_1xd1g_226 {
|
|
2856
2857
|
aspect-ratio: 1;
|
|
2857
2858
|
display: flex;
|
|
2858
2859
|
align-items: center;
|
|
@@ -4484,10 +4485,14 @@ tbody ._staticCell_1vfnu_133 ._staticCellContent_1vfnu_136 {
|
|
|
4484
4485
|
display: flex;
|
|
4485
4486
|
justify-content: center;
|
|
4486
4487
|
}
|
|
4487
|
-
.
|
|
4488
|
+
._unitInput_yuqdd_1 {
|
|
4489
|
+
flex: 1 1 auto;
|
|
4490
|
+
min-width: 0;
|
|
4491
|
+
}
|
|
4492
|
+
._predefinedMenuActive_yuqdd_5 input {
|
|
4488
4493
|
color: var(--color-text-faint) !important;
|
|
4489
4494
|
}
|
|
4490
|
-
.
|
|
4495
|
+
._isInTable_yuqdd_8 {
|
|
4491
4496
|
height: 100%;
|
|
4492
4497
|
}
|
|
4493
4498
|
._container_9tr5w_1 {
|
package/dist/index.js
CHANGED
|
@@ -1019,6 +1019,7 @@ var Button = React.forwardRef(({ active = false, basic = false, colored = false,
|
|
|
1019
1019
|
"data-error": error || null,
|
|
1020
1020
|
"data-warning": warning || null,
|
|
1021
1021
|
"data-testid": testId,
|
|
1022
|
+
"data-active": active || void 0,
|
|
1022
1023
|
to: url,
|
|
1023
1024
|
tabIndex,
|
|
1024
1025
|
...domProps,
|
|
@@ -2739,26 +2740,26 @@ var useElementWidth = (enabled = true) => {
|
|
|
2739
2740
|
return [ref, width];
|
|
2740
2741
|
};
|
|
2741
2742
|
var input_module_default = {
|
|
2742
|
-
inputInTable: "
|
|
2743
|
-
inputHover: "
|
|
2744
|
-
inputFocus: "
|
|
2745
|
-
controlFocusVisible: "
|
|
2746
|
-
inputError: "
|
|
2747
|
-
inputWarning: "
|
|
2748
|
-
inputDisabled: "
|
|
2749
|
-
hideScrollbars: "
|
|
2750
|
-
wrapper: "
|
|
2751
|
-
input: "
|
|
2752
|
-
isInTable: "
|
|
2753
|
-
small: "
|
|
2754
|
-
right: "
|
|
2755
|
-
groupOrderFirst: "
|
|
2756
|
-
groupOrderMiddle: "
|
|
2757
|
-
groupOrderLast: "
|
|
2758
|
-
slot: "
|
|
2759
|
-
slotLeft: "
|
|
2760
|
-
slotRight: "
|
|
2761
|
-
icon: "
|
|
2743
|
+
inputInTable: "_inputInTable_1xd1g_1",
|
|
2744
|
+
inputHover: "_inputHover_1xd1g_13",
|
|
2745
|
+
inputFocus: "_inputFocus_1xd1g_18",
|
|
2746
|
+
controlFocusVisible: "_controlFocusVisible_1xd1g_25",
|
|
2747
|
+
inputError: "_inputError_1xd1g_29",
|
|
2748
|
+
inputWarning: "_inputWarning_1xd1g_30",
|
|
2749
|
+
inputDisabled: "_inputDisabled_1xd1g_65",
|
|
2750
|
+
hideScrollbars: "_hideScrollbars_1xd1g_71",
|
|
2751
|
+
wrapper: "_wrapper_1xd1g_81",
|
|
2752
|
+
input: "_input_1xd1g_1",
|
|
2753
|
+
isInTable: "_isInTable_1xd1g_107",
|
|
2754
|
+
small: "_small_1xd1g_131",
|
|
2755
|
+
right: "_right_1xd1g_177",
|
|
2756
|
+
groupOrderFirst: "_groupOrderFirst_1xd1g_180",
|
|
2757
|
+
groupOrderMiddle: "_groupOrderMiddle_1xd1g_181",
|
|
2758
|
+
groupOrderLast: "_groupOrderLast_1xd1g_185",
|
|
2759
|
+
slot: "_slot_1xd1g_190",
|
|
2760
|
+
slotLeft: "_slotLeft_1xd1g_208",
|
|
2761
|
+
slotRight: "_slotRight_1xd1g_213",
|
|
2762
|
+
icon: "_icon_1xd1g_226"
|
|
2762
2763
|
};
|
|
2763
2764
|
//#endregion
|
|
2764
2765
|
//#region src/components/input/input.tsx
|
|
@@ -4881,14 +4882,20 @@ var NumberInput = ({ name, placeholder = "", disabled = false, error = false, le
|
|
|
4881
4882
|
const stringName = getStringName$1(name);
|
|
4882
4883
|
const { valid, errors } = validateInputValue(displayValue);
|
|
4883
4884
|
const firstError = errors && errors.length && !disableInternalErrorValidationMessages ? errors[0] : null;
|
|
4884
|
-
|
|
4885
|
-
const nextValue = cosmeticRound(toString(value));
|
|
4886
|
-
if (toNum(displayValue) !== toNum(nextValue)) setDisplayValue(nextValue);
|
|
4887
|
-
}, [
|
|
4885
|
+
const [previousInputs, setPreviousInputs] = useState({
|
|
4888
4886
|
value,
|
|
4889
4887
|
enableCosmeticRounding,
|
|
4890
4888
|
enableDisplayRounding
|
|
4891
|
-
|
|
4889
|
+
});
|
|
4890
|
+
if (!Object.is(previousInputs.value, value) || previousInputs.enableCosmeticRounding !== enableCosmeticRounding || previousInputs.enableDisplayRounding !== enableDisplayRounding) {
|
|
4891
|
+
setPreviousInputs({
|
|
4892
|
+
value,
|
|
4893
|
+
enableCosmeticRounding,
|
|
4894
|
+
enableDisplayRounding
|
|
4895
|
+
});
|
|
4896
|
+
const nextValue = cosmeticRound(toString(value));
|
|
4897
|
+
if (toNum(displayValue) !== toNum(nextValue)) setDisplayValue(nextValue);
|
|
4898
|
+
}
|
|
4892
4899
|
useEffect(() => {
|
|
4893
4900
|
if ((disableValidationOnFocus ? true : !focus) && !valid) validationCallback(stringName, firstError);
|
|
4894
4901
|
else validationCallback(stringName, null);
|
|
@@ -5008,15 +5015,6 @@ var useRunAfterUpdate = () => {
|
|
|
5008
5015
|
return runAfterUpdate;
|
|
5009
5016
|
};
|
|
5010
5017
|
//#endregion
|
|
5011
|
-
//#region src/components/unit-input/hooks/use-previous.ts
|
|
5012
|
-
var usePrevious = (value) => {
|
|
5013
|
-
const ref = useRef(void 0);
|
|
5014
|
-
useEffect(() => {
|
|
5015
|
-
ref.current = value;
|
|
5016
|
-
}, [value]);
|
|
5017
|
-
return ref.current;
|
|
5018
|
-
};
|
|
5019
|
-
//#endregion
|
|
5020
5018
|
//#region src/helpers/get-preferred-unit.ts
|
|
5021
5019
|
/**
|
|
5022
5020
|
* Retrieves the preferred unit for a given quantity from a specified unit template or defaults to a standard unit if not found.
|
|
@@ -5186,8 +5184,9 @@ var safeRoundNumbers = (value) => {
|
|
|
5186
5184
|
return !isScientificStringNum(value) ? roundByMagnitude(value) : value;
|
|
5187
5185
|
};
|
|
5188
5186
|
var unit_input_module_default = {
|
|
5189
|
-
|
|
5190
|
-
|
|
5187
|
+
unitInput: "_unitInput_yuqdd_1",
|
|
5188
|
+
predefinedMenuActive: "_predefinedMenuActive_yuqdd_5",
|
|
5189
|
+
isInTable: "_isInTable_yuqdd_8"
|
|
5191
5190
|
};
|
|
5192
5191
|
//#endregion
|
|
5193
5192
|
//#region src/components/unit-input/unit-input.tsx
|
|
@@ -5207,7 +5206,6 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5207
5206
|
]);
|
|
5208
5207
|
const knownUnit = isKnownUnit(value, preferredUnit);
|
|
5209
5208
|
const initDisplayUnit = initUnit || preferredUnit || propUnit;
|
|
5210
|
-
const previousInitUnit = usePrevious(initDisplayUnit);
|
|
5211
5209
|
const { value: convertedValue } = safeConvertValue({
|
|
5212
5210
|
value,
|
|
5213
5211
|
toUnit: initDisplayUnit,
|
|
@@ -5282,11 +5280,23 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5282
5280
|
});
|
|
5283
5281
|
if (onSwitchUnit) onSwitchUnit(nextUnit);
|
|
5284
5282
|
};
|
|
5285
|
-
|
|
5283
|
+
const [previousInputs, setPreviousInputs] = useState({
|
|
5284
|
+
initDisplayUnit,
|
|
5285
|
+
value,
|
|
5286
|
+
error,
|
|
5287
|
+
shouldLinkAutomaticly
|
|
5288
|
+
});
|
|
5289
|
+
if (previousInputs.initDisplayUnit !== initDisplayUnit || previousInputs.value !== value || previousInputs.error !== error || previousInputs.shouldLinkAutomaticly !== shouldLinkAutomaticly) {
|
|
5290
|
+
setPreviousInputs({
|
|
5291
|
+
initDisplayUnit,
|
|
5292
|
+
value,
|
|
5293
|
+
error,
|
|
5294
|
+
shouldLinkAutomaticly
|
|
5295
|
+
});
|
|
5286
5296
|
let newValue;
|
|
5287
5297
|
let newUnit = "";
|
|
5288
5298
|
if (initDisplayUnit) {
|
|
5289
|
-
if (
|
|
5299
|
+
if (previousInputs.initDisplayUnit !== initDisplayUnit) {
|
|
5290
5300
|
const { value: resultValue } = safeConvertValue({
|
|
5291
5301
|
value,
|
|
5292
5302
|
toUnit: initDisplayUnit,
|
|
@@ -5315,6 +5325,8 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5315
5325
|
value: newValue,
|
|
5316
5326
|
unit: newUnit
|
|
5317
5327
|
});
|
|
5328
|
+
}
|
|
5329
|
+
useEffect(() => {
|
|
5318
5330
|
if (predefinedOptions && foundPredefinedMenuOption && shouldLinkAutomaticly) setPredefinedOptionsMenuState(PredefinedOptionsMenuState.PREDEFINED);
|
|
5319
5331
|
else setPredefinedOptionsMenuState(PredefinedOptionsMenuState.CUSTOM);
|
|
5320
5332
|
}, [
|
|
@@ -5396,7 +5408,8 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5396
5408
|
return placeholder;
|
|
5397
5409
|
};
|
|
5398
5410
|
return /* @__PURE__ */ jsx("div", {
|
|
5399
|
-
className: cx(predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED && unit_input_module_default.predefinedMenuActive, isInTable && unit_input_module_default.isInTable),
|
|
5411
|
+
className: cx(unit_input_module_default.unitInput, predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED && unit_input_module_default.predefinedMenuActive, isInTable && unit_input_module_default.isInTable),
|
|
5412
|
+
style: { width },
|
|
5400
5413
|
children: /* @__PURE__ */ jsx(NumberInput, {
|
|
5401
5414
|
name: stringName,
|
|
5402
5415
|
testId,
|
|
@@ -5416,7 +5429,7 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5416
5429
|
groupOrder,
|
|
5417
5430
|
disableInternalErrorValidationMessages,
|
|
5418
5431
|
small,
|
|
5419
|
-
width,
|
|
5432
|
+
width: "100%",
|
|
5420
5433
|
isInTable,
|
|
5421
5434
|
selectOnFocus,
|
|
5422
5435
|
tooltip,
|
|
@@ -5428,7 +5441,8 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5428
5441
|
trigger: "Component",
|
|
5429
5442
|
component: /* @__PURE__ */ jsx(Button, {
|
|
5430
5443
|
basic: true,
|
|
5431
|
-
colored:
|
|
5444
|
+
colored: Color.MUTED,
|
|
5445
|
+
active: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED,
|
|
5432
5446
|
icon: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED ? "link" : "unlink",
|
|
5433
5447
|
small
|
|
5434
5448
|
}),
|
|
@@ -10864,6 +10878,15 @@ var TreeTable = ({ allowParentReassignment, autoOpenActiveItems = false, canDrop
|
|
|
10864
10878
|
});
|
|
10865
10879
|
};
|
|
10866
10880
|
//#endregion
|
|
10881
|
+
//#region src/components/unit-input/hooks/use-previous.ts
|
|
10882
|
+
var usePrevious = (value) => {
|
|
10883
|
+
const ref = useRef(void 0);
|
|
10884
|
+
useEffect(() => {
|
|
10885
|
+
ref.current = value;
|
|
10886
|
+
}, [value]);
|
|
10887
|
+
return ref.current;
|
|
10888
|
+
};
|
|
10889
|
+
//#endregion
|
|
10867
10890
|
//#region src/translations/enums.ts
|
|
10868
10891
|
var ConfigKeyType = Object.freeze({
|
|
10869
10892
|
Translations: "translations",
|
package/package.json
CHANGED