@oliasoft-open-source/react-ui-library 4.19.7 → 4.20.0-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/README.md +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +20 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -376,6 +376,7 @@ The `Button` component is a versatile interface element that supports various st
|
|
|
376
376
|
| `testId` | A test identifier for the button. | None (optional) |
|
|
377
377
|
| `tooltip` | Tooltip content. Can be text or a ReactNode. | None (optional) |
|
|
378
378
|
| `inverted` | Deprecated. | `false` |
|
|
379
|
+
| `tabIndex` | The tab index of the button. | None (optional) |
|
|
379
380
|
|
|
380
381
|
### Usage Example
|
|
381
382
|
|
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 =
|
|
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(), 0);
|
|
9120
9128
|
}
|
|
9121
9129
|
};
|
|
9122
9130
|
return /* @__PURE__ */ jsx("div", { style: { width: width2 }, className: order2, children: /* @__PURE__ */ jsx(
|
|
@@ -51473,7 +51481,7 @@ const NumberInput = ({
|
|
|
51473
51481
|
},
|
|
51474
51482
|
onBlur = () => {
|
|
51475
51483
|
},
|
|
51476
|
-
selectOnFocus
|
|
51484
|
+
selectOnFocus,
|
|
51477
51485
|
tabIndex = 0,
|
|
51478
51486
|
testId,
|
|
51479
51487
|
tooltip: tooltip2 = null,
|
|
@@ -51558,11 +51566,7 @@ const NumberInput = ({
|
|
|
51558
51566
|
useEffect(() => {
|
|
51559
51567
|
if (inputRef && (inputRef == null ? void 0 : inputRef.current) && enableDisplayRounding && focus2) {
|
|
51560
51568
|
const textInput = inputRef.current;
|
|
51561
|
-
if (textInput) {
|
|
51562
|
-
if (selectOnFocus) {
|
|
51563
|
-
textInput.select();
|
|
51564
|
-
return;
|
|
51565
|
-
}
|
|
51569
|
+
if (textInput && !selectOnFocus) {
|
|
51566
51570
|
setTimeout(() => {
|
|
51567
51571
|
const { length: length2 } = safeToString(displayValue);
|
|
51568
51572
|
textInput.setSelectionRange(length2, length2);
|
|
@@ -66444,7 +66448,7 @@ const UnitInput = ({
|
|
|
66444
66448
|
enableCosmeticRounding = true,
|
|
66445
66449
|
enableDisplayRounding = false,
|
|
66446
66450
|
roundDisplayValue,
|
|
66447
|
-
selectOnFocus
|
|
66451
|
+
selectOnFocus
|
|
66448
66452
|
}) => {
|
|
66449
66453
|
const context2 = useUnitContext();
|
|
66450
66454
|
const runAfterUpdate = useRunAfterUpdate();
|
|
@@ -66719,6 +66723,7 @@ const UnitInput = ({
|
|
|
66719
66723
|
groupOrder: "last",
|
|
66720
66724
|
disabled: disabledUnit,
|
|
66721
66725
|
testId: testId && `${testId}-menu`,
|
|
66726
|
+
tabIndex: -1,
|
|
66722
66727
|
menu: {
|
|
66723
66728
|
label: displayUnitLabel,
|
|
66724
66729
|
trigger: "DropDownButton",
|