@oliasoft-open-source/react-ui-library 10.7.0-beta-3 → 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 +54 -50
- package/dist/index.js +62 -41
- 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,33 +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
2833
|
line-height: 1;
|
|
2834
2834
|
}
|
|
2835
|
-
|
|
2835
|
+
._slot_1xd1g_190 > * {
|
|
2836
2836
|
pointer-events: auto;
|
|
2837
2837
|
}
|
|
2838
|
-
.
|
|
2838
|
+
._slotLeft_1xd1g_208 {
|
|
2839
2839
|
left: 1px;
|
|
2840
2840
|
border-top-left-radius: calc(var(--border-radius) - 1px);
|
|
2841
2841
|
border-bottom-left-radius: calc(var(--border-radius) - 1px);
|
|
2842
2842
|
}
|
|
2843
|
-
.
|
|
2843
|
+
._slotRight_1xd1g_213 {
|
|
2844
2844
|
right: 1px;
|
|
2845
2845
|
border-top-right-radius: calc(var(--border-radius) - 1px);
|
|
2846
2846
|
border-bottom-right-radius: calc(var(--border-radius) - 1px);
|
|
2847
2847
|
}
|
|
2848
|
-
.
|
|
2849
|
-
.
|
|
2848
|
+
._groupOrderFirst_1xd1g_180 ._slotRight_1xd1g_213,
|
|
2849
|
+
._groupOrderMiddle_1xd1g_181 ._slotRight_1xd1g_213 {
|
|
2850
2850
|
border-radius: 0;
|
|
2851
2851
|
}
|
|
2852
|
-
.
|
|
2853
|
-
.
|
|
2852
|
+
._groupOrderLast_1xd1g_185 ._slotLeft_1xd1g_208,
|
|
2853
|
+
._groupOrderMiddle_1xd1g_181 ._slotLeft_1xd1g_208 {
|
|
2854
2854
|
border-radius: 0;
|
|
2855
2855
|
}
|
|
2856
|
-
.
|
|
2856
|
+
._icon_1xd1g_226 {
|
|
2857
2857
|
aspect-ratio: 1;
|
|
2858
2858
|
display: flex;
|
|
2859
2859
|
align-items: center;
|
|
@@ -4485,10 +4485,14 @@ tbody ._staticCell_1vfnu_133 ._staticCellContent_1vfnu_136 {
|
|
|
4485
4485
|
display: flex;
|
|
4486
4486
|
justify-content: center;
|
|
4487
4487
|
}
|
|
4488
|
-
.
|
|
4488
|
+
._unitInput_yuqdd_1 {
|
|
4489
|
+
flex: 1 1 auto;
|
|
4490
|
+
min-width: 0;
|
|
4491
|
+
}
|
|
4492
|
+
._predefinedMenuActive_yuqdd_5 input {
|
|
4489
4493
|
color: var(--color-text-faint) !important;
|
|
4490
4494
|
}
|
|
4491
|
-
.
|
|
4495
|
+
._isInTable_yuqdd_8 {
|
|
4492
4496
|
height: 100%;
|
|
4493
4497
|
}
|
|
4494
4498
|
._container_9tr5w_1 {
|
package/dist/index.js
CHANGED
|
@@ -2740,26 +2740,26 @@ var useElementWidth = (enabled = true) => {
|
|
|
2740
2740
|
return [ref, width];
|
|
2741
2741
|
};
|
|
2742
2742
|
var input_module_default = {
|
|
2743
|
-
inputInTable: "
|
|
2744
|
-
inputHover: "
|
|
2745
|
-
inputFocus: "
|
|
2746
|
-
controlFocusVisible: "
|
|
2747
|
-
inputError: "
|
|
2748
|
-
inputWarning: "
|
|
2749
|
-
inputDisabled: "
|
|
2750
|
-
hideScrollbars: "
|
|
2751
|
-
wrapper: "
|
|
2752
|
-
input: "
|
|
2753
|
-
isInTable: "
|
|
2754
|
-
small: "
|
|
2755
|
-
right: "
|
|
2756
|
-
groupOrderFirst: "
|
|
2757
|
-
groupOrderMiddle: "
|
|
2758
|
-
groupOrderLast: "
|
|
2759
|
-
slot: "
|
|
2760
|
-
slotLeft: "
|
|
2761
|
-
slotRight: "
|
|
2762
|
-
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"
|
|
2763
2763
|
};
|
|
2764
2764
|
//#endregion
|
|
2765
2765
|
//#region src/components/input/input.tsx
|
|
@@ -4882,14 +4882,20 @@ var NumberInput = ({ name, placeholder = "", disabled = false, error = false, le
|
|
|
4882
4882
|
const stringName = getStringName$1(name);
|
|
4883
4883
|
const { valid, errors } = validateInputValue(displayValue);
|
|
4884
4884
|
const firstError = errors && errors.length && !disableInternalErrorValidationMessages ? errors[0] : null;
|
|
4885
|
-
|
|
4886
|
-
const nextValue = cosmeticRound(toString(value));
|
|
4887
|
-
if (toNum(displayValue) !== toNum(nextValue)) setDisplayValue(nextValue);
|
|
4888
|
-
}, [
|
|
4885
|
+
const [previousInputs, setPreviousInputs] = useState({
|
|
4889
4886
|
value,
|
|
4890
4887
|
enableCosmeticRounding,
|
|
4891
4888
|
enableDisplayRounding
|
|
4892
|
-
|
|
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
|
+
}
|
|
4893
4899
|
useEffect(() => {
|
|
4894
4900
|
if ((disableValidationOnFocus ? true : !focus) && !valid) validationCallback(stringName, firstError);
|
|
4895
4901
|
else validationCallback(stringName, null);
|
|
@@ -5009,15 +5015,6 @@ var useRunAfterUpdate = () => {
|
|
|
5009
5015
|
return runAfterUpdate;
|
|
5010
5016
|
};
|
|
5011
5017
|
//#endregion
|
|
5012
|
-
//#region src/components/unit-input/hooks/use-previous.ts
|
|
5013
|
-
var usePrevious = (value) => {
|
|
5014
|
-
const ref = useRef(void 0);
|
|
5015
|
-
useEffect(() => {
|
|
5016
|
-
ref.current = value;
|
|
5017
|
-
}, [value]);
|
|
5018
|
-
return ref.current;
|
|
5019
|
-
};
|
|
5020
|
-
//#endregion
|
|
5021
5018
|
//#region src/helpers/get-preferred-unit.ts
|
|
5022
5019
|
/**
|
|
5023
5020
|
* Retrieves the preferred unit for a given quantity from a specified unit template or defaults to a standard unit if not found.
|
|
@@ -5187,8 +5184,9 @@ var safeRoundNumbers = (value) => {
|
|
|
5187
5184
|
return !isScientificStringNum(value) ? roundByMagnitude(value) : value;
|
|
5188
5185
|
};
|
|
5189
5186
|
var unit_input_module_default = {
|
|
5190
|
-
|
|
5191
|
-
|
|
5187
|
+
unitInput: "_unitInput_yuqdd_1",
|
|
5188
|
+
predefinedMenuActive: "_predefinedMenuActive_yuqdd_5",
|
|
5189
|
+
isInTable: "_isInTable_yuqdd_8"
|
|
5192
5190
|
};
|
|
5193
5191
|
//#endregion
|
|
5194
5192
|
//#region src/components/unit-input/unit-input.tsx
|
|
@@ -5208,7 +5206,6 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5208
5206
|
]);
|
|
5209
5207
|
const knownUnit = isKnownUnit(value, preferredUnit);
|
|
5210
5208
|
const initDisplayUnit = initUnit || preferredUnit || propUnit;
|
|
5211
|
-
const previousInitUnit = usePrevious(initDisplayUnit);
|
|
5212
5209
|
const { value: convertedValue } = safeConvertValue({
|
|
5213
5210
|
value,
|
|
5214
5211
|
toUnit: initDisplayUnit,
|
|
@@ -5283,11 +5280,23 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5283
5280
|
});
|
|
5284
5281
|
if (onSwitchUnit) onSwitchUnit(nextUnit);
|
|
5285
5282
|
};
|
|
5286
|
-
|
|
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
|
+
});
|
|
5287
5296
|
let newValue;
|
|
5288
5297
|
let newUnit = "";
|
|
5289
5298
|
if (initDisplayUnit) {
|
|
5290
|
-
if (
|
|
5299
|
+
if (previousInputs.initDisplayUnit !== initDisplayUnit) {
|
|
5291
5300
|
const { value: resultValue } = safeConvertValue({
|
|
5292
5301
|
value,
|
|
5293
5302
|
toUnit: initDisplayUnit,
|
|
@@ -5316,6 +5325,8 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5316
5325
|
value: newValue,
|
|
5317
5326
|
unit: newUnit
|
|
5318
5327
|
});
|
|
5328
|
+
}
|
|
5329
|
+
useEffect(() => {
|
|
5319
5330
|
if (predefinedOptions && foundPredefinedMenuOption && shouldLinkAutomaticly) setPredefinedOptionsMenuState(PredefinedOptionsMenuState.PREDEFINED);
|
|
5320
5331
|
else setPredefinedOptionsMenuState(PredefinedOptionsMenuState.CUSTOM);
|
|
5321
5332
|
}, [
|
|
@@ -5397,7 +5408,8 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5397
5408
|
return placeholder;
|
|
5398
5409
|
};
|
|
5399
5410
|
return /* @__PURE__ */ jsx("div", {
|
|
5400
|
-
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 },
|
|
5401
5413
|
children: /* @__PURE__ */ jsx(NumberInput, {
|
|
5402
5414
|
name: stringName,
|
|
5403
5415
|
testId,
|
|
@@ -5417,7 +5429,7 @@ var UnitInput = ({ name, placeholder = "", disabled = false, disabledUnit = fals
|
|
|
5417
5429
|
groupOrder,
|
|
5418
5430
|
disableInternalErrorValidationMessages,
|
|
5419
5431
|
small,
|
|
5420
|
-
width,
|
|
5432
|
+
width: "100%",
|
|
5421
5433
|
isInTable,
|
|
5422
5434
|
selectOnFocus,
|
|
5423
5435
|
tooltip,
|
|
@@ -10866,6 +10878,15 @@ var TreeTable = ({ allowParentReassignment, autoOpenActiveItems = false, canDrop
|
|
|
10866
10878
|
});
|
|
10867
10879
|
};
|
|
10868
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
|
|
10869
10890
|
//#region src/translations/enums.ts
|
|
10870
10891
|
var ConfigKeyType = Object.freeze({
|
|
10871
10892
|
Translations: "translations",
|
package/package.json
CHANGED