@oliasoft-open-source/react-ui-library 4.20.5 → 4.20.7-beta-1

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;
@@ -744,6 +744,7 @@ export declare interface IMenuProps {
744
744
  testId?: string;
745
745
  fullHeightTrigger?: boolean;
746
746
  };
747
+ active?: boolean;
747
748
  contextMenu?: boolean;
748
749
  width?: TStringOrNumber;
749
750
  disabled?: boolean;
@@ -752,7 +753,7 @@ export declare interface IMenuProps {
752
753
  loading?: boolean;
753
754
  fullHeightTrigger?: boolean;
754
755
  closeOnOptionClick?: boolean;
755
- groupOrder?: TGroupOrder | string;
756
+ groupOrder?: TGroupOrder;
756
757
  overflowContainer?: boolean;
757
758
  maxHeight?: TStringOrNumber;
758
759
  testId?: string;
@@ -867,7 +868,7 @@ export declare interface INativeSelectProps {
867
868
  tabIndex?: number;
868
869
  selectedOption?: ISelectSelectedOption;
869
870
  width?: TStringOrNumber | null;
870
- groupOrder?: string | null;
871
+ groupOrder?: TGroupOrder;
871
872
  testId?: string | undefined;
872
873
  isInTable?: boolean;
873
874
  clearable?: boolean;
@@ -942,7 +943,7 @@ export declare interface INumberInputProps {
942
943
  }, error: string | null) => void;
943
944
  allowEmpty?: boolean;
944
945
  isInTable?: boolean;
945
- groupOrder?: any;
946
+ groupOrder?: TGroupOrder;
946
947
  enableCosmeticRounding?: boolean;
947
948
  enableDisplayRounding?: boolean;
948
949
  roundDisplayValue?: (args: TStringOrNumber) => TStringOrNumber;
@@ -1614,6 +1615,7 @@ export declare interface IUnitInputProps {
1614
1615
  enableDisplayRounding?: boolean;
1615
1616
  roundDisplayValue?: (args: TStringOrNumber) => TStringOrNumber;
1616
1617
  selectOnFocus?: boolean;
1618
+ groupOrder?: TGroupOrder;
1617
1619
  }
1618
1620
 
1619
1621
  declare interface IUnitTable extends Omit<ITableProps['table'], 'rows'> {
@@ -1913,7 +1915,7 @@ declare type TUnitTableCellShape = TCellShape | IUnitTableStaticCell | IUnitTabl
1913
1915
 
1914
1916
  declare type UnitContextType = any;
1915
1917
 
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;
1918
+ 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
1919
 
1918
1920
  export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, }: IUnitTableProps) => JSX_2.Element;
1919
1921
 
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,
@@ -4674,6 +4674,7 @@ const TriggerTooltip = ({
4674
4674
  };
4675
4675
  const Trigger$1 = React__default.forwardRef(
4676
4676
  ({
4677
+ active: active2,
4677
4678
  isDisabled,
4678
4679
  badgeTitle,
4679
4680
  badgeDot,
@@ -4712,7 +4713,7 @@ const Trigger$1 = React__default.forwardRef(
4712
4713
  loading,
4713
4714
  error: error2,
4714
4715
  warning: warning2,
4715
- active: isOpen2,
4716
+ active: isOpen2 || active2,
4716
4717
  tabIndex
4717
4718
  }
4718
4719
  ) : trigger2 === TriggerType.TEXT ? /* @__PURE__ */ jsx(
@@ -4880,7 +4881,8 @@ const DropDownMenu = ({
4880
4881
  error: error2,
4881
4882
  warning: warning2,
4882
4883
  selected: selected2,
4883
- tabIndex
4884
+ tabIndex,
4885
+ active: active2
4884
4886
  }) => {
4885
4887
  const disabledContext = useContext(DisabledContext);
4886
4888
  const {
@@ -4946,6 +4948,7 @@ const DropDownMenu = ({
4946
4948
  component: component2,
4947
4949
  groupOrder,
4948
4950
  isOpen: isOpen2,
4951
+ active: active2,
4949
4952
  tooltip: tooltip2,
4950
4953
  error: error2,
4951
4954
  warning: warning2,
@@ -9110,9 +9113,9 @@ const Input$1 = forwardRef(
9110
9113
  const order2 = (() => {
9111
9114
  if (groupOrder) {
9112
9115
  switch (groupOrder) {
9113
- case "first":
9116
+ case GroupOrder.FIRST:
9114
9117
  return styles$A.groupOrderFirst;
9115
- case "last":
9118
+ case GroupOrder.LAST:
9116
9119
  return styles$A.groupOrderLast;
9117
9120
  default:
9118
9121
  return styles$A.groupOrderMiddle;
@@ -9489,7 +9492,7 @@ const styles$v = {
9489
9492
  };
9490
9493
  const InputGroupAddon = ({
9491
9494
  children,
9492
- groupOrder = null,
9495
+ groupOrder,
9493
9496
  small: small2 = false
9494
9497
  }) => {
9495
9498
  const order2 = (() => {
@@ -15384,7 +15387,7 @@ const NativeSelect = ({
15384
15387
  tabIndex = 0,
15385
15388
  selectedOption,
15386
15389
  width: width2 = null,
15387
- groupOrder = null,
15390
+ groupOrder,
15388
15391
  testId,
15389
15392
  isInTable: isInTable2 = false,
15390
15393
  clearable,
@@ -66461,7 +66464,8 @@ const UnitInput = ({
66461
66464
  enableCosmeticRounding = true,
66462
66465
  enableDisplayRounding = false,
66463
66466
  roundDisplayValue,
66464
- selectOnFocus
66467
+ selectOnFocus,
66468
+ groupOrder
66465
66469
  }) => {
66466
66470
  const context2 = useUnitContext();
66467
66471
  const runAfterUpdate = useRunAfterUpdate();
@@ -66675,6 +66679,8 @@ const UnitInput = ({
66675
66679
  }
66676
66680
  return placeholder22;
66677
66681
  };
66682
+ const inputGroupOrder = !predefinedOptions && (!groupOrder || groupOrder === GroupOrder.FIRST) ? GroupOrder.FIRST : GroupOrder.MIDDLE;
66683
+ const unitGroupOrder = !groupOrder || groupOrder === GroupOrder.LAST ? GroupOrder.LAST : GroupOrder.MIDDLE;
66678
66684
  return /* @__PURE__ */ jsx(
66679
66685
  "div",
66680
66686
  {
@@ -66722,18 +66728,18 @@ const UnitInput = ({
66722
66728
  enableCosmeticRounding,
66723
66729
  enableDisplayRounding,
66724
66730
  roundDisplayValue,
66725
- groupOrder: predefinedOptions ? "middle" : "first",
66731
+ groupOrder: inputGroupOrder,
66726
66732
  disableInternalErrorValidationMessages,
66727
66733
  small: small2,
66728
66734
  selectOnFocus
66729
66735
  },
66730
66736
  stringName
66731
66737
  ) }),
66732
- displayUnitLabel && (noConvert || !knownUnit ? /* @__PURE__ */ jsx(InputGroupAddon, { groupOrder: "last", children: displayUnitLabel }) : /* @__PURE__ */ jsx(
66738
+ displayUnitLabel && (noConvert || !knownUnit ? /* @__PURE__ */ jsx(InputGroupAddon, { groupOrder: unitGroupOrder, children: displayUnitLabel }) : /* @__PURE__ */ jsx(
66733
66739
  Menu,
66734
66740
  {
66741
+ groupOrder: unitGroupOrder,
66735
66742
  maxHeight: 380,
66736
- groupOrder: "last",
66737
66743
  disabled: disabledUnit,
66738
66744
  testId: testId && `${testId}-menu`,
66739
66745
  tabIndex: -1,