@oliasoft-open-source/react-ui-library 4.20.4 → 4.20.6

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/index.d.ts CHANGED
@@ -207,7 +207,7 @@ export declare interface IButtonProps {
207
207
  colored?: boolean | string;
208
208
  disabled?: boolean;
209
209
  ignoreDisabledContext?: boolean;
210
- groupOrder?: string | null;
210
+ groupOrder?: TGroupOrder;
211
211
  icon?: ReactNode | string;
212
212
  label?: ReactNode | string | null;
213
213
  loading?: boolean;
@@ -511,7 +511,7 @@ declare interface IInputCell extends TCommonCell {
511
511
 
512
512
  export declare interface IInputGroupAddonProps {
513
513
  children: ReactNode;
514
- groupOrder?: TGroupOrder | string | null;
514
+ groupOrder?: TGroupOrder;
515
515
  small?: boolean;
516
516
  }
517
517
 
@@ -539,7 +539,7 @@ export declare interface IInputProps {
539
539
  value?: TStringNumberNull;
540
540
  disabled?: boolean;
541
541
  right?: boolean;
542
- groupOrder?: string;
542
+ groupOrder?: TGroupOrder;
543
543
  maxTooltipWidth?: TStringOrNumber;
544
544
  width?: TStringOrNumber;
545
545
  testId?: string;
@@ -752,7 +752,7 @@ export declare interface IMenuProps {
752
752
  loading?: boolean;
753
753
  fullHeightTrigger?: boolean;
754
754
  closeOnOptionClick?: boolean;
755
- groupOrder?: TGroupOrder | string;
755
+ groupOrder?: TGroupOrder;
756
756
  overflowContainer?: boolean;
757
757
  maxHeight?: TStringOrNumber;
758
758
  testId?: string;
@@ -867,7 +867,7 @@ export declare interface INativeSelectProps {
867
867
  tabIndex?: number;
868
868
  selectedOption?: ISelectSelectedOption;
869
869
  width?: TStringOrNumber | null;
870
- groupOrder?: string | null;
870
+ groupOrder?: TGroupOrder;
871
871
  testId?: string | undefined;
872
872
  isInTable?: boolean;
873
873
  clearable?: boolean;
@@ -942,7 +942,7 @@ export declare interface INumberInputProps {
942
942
  }, error: string | null) => void;
943
943
  allowEmpty?: boolean;
944
944
  isInTable?: boolean;
945
- groupOrder?: any;
945
+ groupOrder?: TGroupOrder;
946
946
  enableCosmeticRounding?: boolean;
947
947
  enableDisplayRounding?: boolean;
948
948
  roundDisplayValue?: (args: TStringOrNumber) => TStringOrNumber;
@@ -1614,6 +1614,7 @@ export declare interface IUnitInputProps {
1614
1614
  enableDisplayRounding?: boolean;
1615
1615
  roundDisplayValue?: (args: TStringOrNumber) => TStringOrNumber;
1616
1616
  selectOnFocus?: boolean;
1617
+ groupOrder?: TGroupOrder;
1617
1618
  }
1618
1619
 
1619
1620
  declare interface IUnitTable extends Omit<ITableProps['table'], 'rows'> {
@@ -1913,7 +1914,7 @@ declare type TUnitTableCellShape = TCellShape | IUnitTableStaticCell | IUnitTabl
1913
1914
 
1914
1915
  declare type UnitContextType = any;
1915
1916
 
1916
- export declare const UnitInput: ({ name, placeholder, disabled, disabledUnit, error, left, small, width, value, unitkey, initUnit, noConversion, onChange, onClick, onFocus, onSwitchUnit, unitTemplate, testId, warning, predefinedOptions, initialPredefinedOption, shouldLinkAutomaticly, selectedPredefinedOptionKey, validationCallback, disabledValidation, allowEmpty, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, roundDisplayValue, selectOnFocus, }: IUnitInputProps) => JSX_2.Element;
1917
+ export declare const UnitInput: ({ name, placeholder, disabled, disabledUnit, error, left, small, width, value, unitkey, initUnit, noConversion, onChange, onClick, onFocus, onSwitchUnit, unitTemplate, testId, warning, predefinedOptions, initialPredefinedOption, shouldLinkAutomaticly, selectedPredefinedOptionKey, validationCallback, disabledValidation, allowEmpty, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, roundDisplayValue, selectOnFocus, groupOrder, }: IUnitInputProps) => JSX_2.Element;
1917
1918
 
1918
1919
  export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, }: IUnitTableProps) => JSX_2.Element;
1919
1920
 
package/dist/index.js CHANGED
@@ -4079,7 +4079,7 @@ const Button$1 = ({
4079
4079
  colored: colored2 = false,
4080
4080
  disabled: disabled2 = false,
4081
4081
  ignoreDisabledContext = false,
4082
- groupOrder = null,
4082
+ groupOrder,
4083
4083
  icon: icon2 = null,
4084
4084
  label: label2 = "",
4085
4085
  loading = false,
@@ -9110,9 +9110,9 @@ const Input$1 = forwardRef(
9110
9110
  const order2 = (() => {
9111
9111
  if (groupOrder) {
9112
9112
  switch (groupOrder) {
9113
- case "first":
9113
+ case GroupOrder.FIRST:
9114
9114
  return styles$A.groupOrderFirst;
9115
- case "last":
9115
+ case GroupOrder.LAST:
9116
9116
  return styles$A.groupOrderLast;
9117
9117
  default:
9118
9118
  return styles$A.groupOrderMiddle;
@@ -9489,7 +9489,7 @@ const styles$v = {
9489
9489
  };
9490
9490
  const InputGroupAddon = ({
9491
9491
  children,
9492
- groupOrder = null,
9492
+ groupOrder,
9493
9493
  small: small2 = false
9494
9494
  }) => {
9495
9495
  const order2 = (() => {
@@ -15384,7 +15384,7 @@ const NativeSelect = ({
15384
15384
  tabIndex = 0,
15385
15385
  selectedOption,
15386
15386
  width: width2 = null,
15387
- groupOrder = null,
15387
+ groupOrder,
15388
15388
  testId,
15389
15389
  isInTable: isInTable2 = false,
15390
15390
  clearable,
@@ -66461,7 +66461,8 @@ const UnitInput = ({
66461
66461
  enableCosmeticRounding = true,
66462
66462
  enableDisplayRounding = false,
66463
66463
  roundDisplayValue,
66464
- selectOnFocus
66464
+ selectOnFocus,
66465
+ groupOrder
66465
66466
  }) => {
66466
66467
  const context2 = useUnitContext();
66467
66468
  const runAfterUpdate = useRunAfterUpdate();
@@ -66675,6 +66676,8 @@ const UnitInput = ({
66675
66676
  }
66676
66677
  return placeholder22;
66677
66678
  };
66679
+ const inputGroupOrder = !predefinedOptions && (!groupOrder || groupOrder === GroupOrder.FIRST) ? GroupOrder.FIRST : GroupOrder.MIDDLE;
66680
+ const unitGroupOrder = !groupOrder || groupOrder === GroupOrder.LAST ? GroupOrder.LAST : GroupOrder.MIDDLE;
66678
66681
  return /* @__PURE__ */ jsx(
66679
66682
  "div",
66680
66683
  {
@@ -66722,18 +66725,18 @@ const UnitInput = ({
66722
66725
  enableCosmeticRounding,
66723
66726
  enableDisplayRounding,
66724
66727
  roundDisplayValue,
66725
- groupOrder: predefinedOptions ? "middle" : "first",
66728
+ groupOrder: inputGroupOrder,
66726
66729
  disableInternalErrorValidationMessages,
66727
66730
  small: small2,
66728
66731
  selectOnFocus
66729
66732
  },
66730
66733
  stringName
66731
66734
  ) }),
66732
- displayUnitLabel && (noConvert || !knownUnit ? /* @__PURE__ */ jsx(InputGroupAddon, { groupOrder: "last", children: displayUnitLabel }) : /* @__PURE__ */ jsx(
66735
+ displayUnitLabel && (noConvert || !knownUnit ? /* @__PURE__ */ jsx(InputGroupAddon, { groupOrder: unitGroupOrder, children: displayUnitLabel }) : /* @__PURE__ */ jsx(
66733
66736
  Menu,
66734
66737
  {
66738
+ groupOrder: unitGroupOrder,
66735
66739
  maxHeight: 380,
66736
- groupOrder: "last",
66737
66740
  disabled: disabledUnit,
66738
66741
  testId: testId && `${testId}-menu`,
66739
66742
  tabIndex: -1,