@oliasoft-open-source/react-ui-library 4.19.5 → 4.19.6-beta-2

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
@@ -43,7 +43,7 @@ export declare enum BreadcrumbLinkType {
43
43
  CUSTOM = "custom"
44
44
  }
45
45
 
46
- export declare const Button: ({ active, basic, colored, disabled, ignoreDisabledContext, groupOrder, icon, label, loading, name, pill, round, small, styles, width, title, type, onClick, error, warning, testId, tooltip, inverted, component: Component, url, }: IButtonProps) => JSX_2.Element;
46
+ export declare const Button: ({ active, basic, colored, disabled, ignoreDisabledContext, groupOrder, icon, label, loading, name, pill, round, small, styles, width, title, type, onClick, error, warning, testId, tooltip, inverted, component: Component, url, tabIndex, }: IButtonProps) => JSX_2.Element;
47
47
 
48
48
  export declare const ButtonGroup: (props: IButtonGroupProps) => JSX_2.Element;
49
49
 
@@ -227,6 +227,7 @@ export declare interface IButtonProps {
227
227
  inverted?: boolean;
228
228
  component?: default_2.ElementType;
229
229
  url?: string;
230
+ tabIndex?: number;
230
231
  }
231
232
 
232
233
  export declare interface ICardProps {
@@ -766,6 +767,7 @@ export declare interface IMenuProps {
766
767
  warning?: any;
767
768
  title?: string;
768
769
  selected?: boolean;
770
+ tabIndex?: number;
769
771
  }
770
772
 
771
773
  export declare interface IMenuSection {
package/dist/index.js CHANGED
@@ -4101,7 +4101,8 @@ const Button$1 = ({
4101
4101
  inverted: inverted2 = false,
4102
4102
  // *Deprecated*
4103
4103
  component: Component2 = "button",
4104
- url
4104
+ url,
4105
+ tabIndex
4105
4106
  }) => {
4106
4107
  const disabledContext = useContext(DisabledContext);
4107
4108
  const color2 = (() => {
@@ -4162,6 +4163,7 @@ const Button$1 = ({
4162
4163
  "data-warning": warning2 || null,
4163
4164
  "data-testid": testId,
4164
4165
  to: url,
4166
+ tabIndex,
4165
4167
  children: [
4166
4168
  icon2 && /* @__PURE__ */ jsx("span", { className: buttonStyles.icon, children: /* @__PURE__ */ jsx(Icon, { icon: icon2 }) }),
4167
4169
  loading && /* @__PURE__ */ jsx("span", { className: buttonStyles.icon, children: /* @__PURE__ */ jsx(
@@ -4569,7 +4571,8 @@ const Button = ({
4569
4571
  loading,
4570
4572
  error: error2,
4571
4573
  warning: warning2,
4572
- active: active2
4574
+ active: active2,
4575
+ tabIndex
4573
4576
  }) => {
4574
4577
  const disabledContext = useContext(DisabledContext);
4575
4578
  const buttonLabel2 = trigger2 === TriggerType.BUTTON ? label2 : trigger2 === TriggerType.DROP_DOWN_BUTTON ? /* @__PURE__ */ jsxs("span", { className: styles$M.middleAlignedInline, children: [
@@ -4598,7 +4601,8 @@ const Button = ({
4598
4601
  disabled: disabled2,
4599
4602
  error: error2,
4600
4603
  warning: warning2,
4601
- active: active2
4604
+ active: active2,
4605
+ tabIndex
4602
4606
  }
4603
4607
  )
4604
4608
  }
@@ -4692,6 +4696,7 @@ const Trigger$1 = React__default.forwardRef(
4692
4696
  tooltip: tooltip2,
4693
4697
  testId,
4694
4698
  selected: selected2,
4699
+ tabIndex,
4695
4700
  ...restProps
4696
4701
  }, ref) => {
4697
4702
  const triggerElement = trigger2 === TriggerType.BUTTON || trigger2 === TriggerType.DROP_DOWN_BUTTON ? /* @__PURE__ */ jsx(
@@ -4707,7 +4712,8 @@ const Trigger$1 = React__default.forwardRef(
4707
4712
  loading,
4708
4713
  error: error2,
4709
4714
  warning: warning2,
4710
- active: isOpen2
4715
+ active: isOpen2,
4716
+ tabIndex
4711
4717
  }
4712
4718
  ) : trigger2 === TriggerType.TEXT ? /* @__PURE__ */ jsx(
4713
4719
  Text$1,
@@ -4873,7 +4879,8 @@ const DropDownMenu = ({
4873
4879
  tooltip: tooltip2,
4874
4880
  error: error2,
4875
4881
  warning: warning2,
4876
- selected: selected2
4882
+ selected: selected2,
4883
+ tabIndex
4877
4884
  }) => {
4878
4885
  const disabledContext = useContext(DisabledContext);
4879
4886
  const {
@@ -4943,7 +4950,8 @@ const DropDownMenu = ({
4943
4950
  error: error2,
4944
4951
  warning: warning2,
4945
4952
  testId,
4946
- selected: selected2
4953
+ selected: selected2,
4954
+ tabIndex
4947
4955
  }
4948
4956
  ),
4949
4957
  isOpen2 && renderLayer(
@@ -9084,7 +9092,7 @@ const Input$1 = forwardRef(
9084
9092
  },
9085
9093
  onPaste = () => {
9086
9094
  },
9087
- selectOnFocus = false,
9095
+ selectOnFocus = true,
9088
9096
  name: name2 = void 0,
9089
9097
  type = "text",
9090
9098
  tabIndex = 0,
@@ -9116,7 +9124,7 @@ const Input$1 = forwardRef(
9116
9124
  const handleFocus = (e2) => {
9117
9125
  onFocus(e2);
9118
9126
  if (selectOnFocus) {
9119
- e2.target.select();
9127
+ setTimeout(() => e2.target.select(), 50);
9120
9128
  }
9121
9129
  };
9122
9130
  return /* @__PURE__ */ jsx("div", { style: { width: width2 }, className: order2, children: /* @__PURE__ */ jsx(
@@ -51460,7 +51468,7 @@ const NumberInput = ({
51460
51468
  },
51461
51469
  onBlur = () => {
51462
51470
  },
51463
- selectOnFocus = false,
51471
+ selectOnFocus,
51464
51472
  tabIndex = 0,
51465
51473
  testId,
51466
51474
  tooltip: tooltip2 = null,
@@ -51545,11 +51553,7 @@ const NumberInput = ({
51545
51553
  useEffect(() => {
51546
51554
  if (inputRef && (inputRef == null ? void 0 : inputRef.current) && enableDisplayRounding && focus2) {
51547
51555
  const textInput = inputRef.current;
51548
- if (textInput) {
51549
- if (selectOnFocus) {
51550
- textInput.select();
51551
- return;
51552
- }
51556
+ if (textInput && !selectOnFocus) {
51553
51557
  setTimeout(() => {
51554
51558
  const { length: length2 } = safeToString(displayValue);
51555
51559
  textInput.setSelectionRange(length2, length2);
@@ -66431,7 +66435,7 @@ const UnitInput = ({
66431
66435
  enableCosmeticRounding = true,
66432
66436
  enableDisplayRounding = false,
66433
66437
  roundDisplayValue,
66434
- selectOnFocus = false
66438
+ selectOnFocus
66435
66439
  }) => {
66436
66440
  const context2 = useUnitContext();
66437
66441
  const runAfterUpdate = useRunAfterUpdate();
@@ -66706,6 +66710,7 @@ const UnitInput = ({
66706
66710
  groupOrder: "last",
66707
66711
  disabled: disabledUnit,
66708
66712
  testId: testId && `${testId}-menu`,
66713
+ tabIndex: -1,
66709
66714
  menu: {
66710
66715
  label: displayUnitLabel,
66711
66716
  trigger: "DropDownButton",
@@ -66799,7 +66804,6 @@ const convertVisibleRows = ({
66799
66804
  enableCosmeticRounding,
66800
66805
  enableDisplayRounding,
66801
66806
  roundDisplayValue,
66802
- selectOnFocus: true,
66803
66807
  onChange: (evt) => {
66804
66808
  const { value: value2 } = evt.target;
66805
66809
  const storageUnit2 = storageUnits[unitKey];