@lumx/react 4.9.0-next.7 → 4.9.0-next.8

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/index.d.ts CHANGED
@@ -3858,6 +3858,10 @@ interface TabProps$1 extends HasClassName {
3858
3858
  changeToTab?: () => void;
3859
3859
  /** Tab index for roving tabindex management. */
3860
3860
  tabIndex?: number;
3861
+ /** Name of the prop used to set tab index (framework-dependent). */
3862
+ tabIndexProp?: string;
3863
+ /** Name of the prop used to attach the keypress event (framework-dependent). */
3864
+ keyPressProp?: string;
3861
3865
  /** ID applied to the tab button element (for aria-labelledby on the panel). */
3862
3866
  tabId?: string;
3863
3867
  /** ID of the associated tab panel (for aria-controls). */
@@ -3869,7 +3873,7 @@ interface TabProps$1 extends HasClassName {
3869
3873
  /** Forward ref to the underlying button element. */
3870
3874
  ref?: CommonRef;
3871
3875
  }
3872
- type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
3876
+ type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabIndexProp' | 'keyPressProp' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
3873
3877
 
3874
3878
  /**
3875
3879
  * Defines the props of the component.
@@ -3915,10 +3919,12 @@ interface TabPanelProps$1 extends HasClassName {
3915
3919
  tabId?: string;
3916
3920
  /** ID of the associated tab panel (for aria-controls). */
3917
3921
  id?: string;
3922
+ /** Name of the prop used to set tab index (framework-dependent). */
3923
+ tabIndexProp?: string;
3918
3924
  /** Forward ref to the underlying button element. */
3919
3925
  ref?: CommonRef;
3920
3926
  }
3921
- type TabPanelPropsToOverride = 'tabId';
3927
+ type TabPanelPropsToOverride = 'tabId' | 'isLazy' | 'tabIndexProp';
3922
3928
 
3923
3929
  /**
3924
3930
  * Defines the props of the component.
package/index.js CHANGED
@@ -14587,12 +14587,15 @@ const Tab$1 = props => {
14587
14587
  icon,
14588
14588
  iconProps = {},
14589
14589
  isAnyDisabled,
14590
+ isDisabled,
14590
14591
  id,
14591
14592
  isActive,
14592
14593
  label,
14593
14594
  handleFocus,
14594
14595
  handleKeyPress,
14595
14596
  tabIndex = -1,
14597
+ tabIndexProp = 'tabIndex',
14598
+ keyPressProp = 'onKeyPress',
14596
14599
  changeToTab,
14597
14600
  tabPanelId,
14598
14601
  shouldActivateOnFocus,
@@ -14631,10 +14634,10 @@ const Tab$1 = props => {
14631
14634
  'is-disabled': isAnyDisabled
14632
14635
  })),
14633
14636
  onClick: changeToCurrentTab,
14634
- onKeyPress: onKeyPress,
14637
+ [keyPressProp]: onKeyPress,
14635
14638
  onFocus: onFocus,
14636
14639
  role: "tab",
14637
- tabIndex: isActive ? 0 : tabIndex,
14640
+ [tabIndexProp]: isActive ? 0 : tabIndex,
14638
14641
  "aria-disabled": isAnyDisabled,
14639
14642
  "aria-selected": isActive,
14640
14643
  "aria-controls": tabPanelId,
@@ -14729,6 +14732,7 @@ const TabPanel$1 = props => {
14729
14732
  id,
14730
14733
  tabId,
14731
14734
  isLazy,
14735
+ tabIndexProp = 'tabIndex',
14732
14736
  ref,
14733
14737
  ...forwardedProps
14734
14738
  } = props;
@@ -14740,7 +14744,7 @@ const TabPanel$1 = props => {
14740
14744
  'is-active': isActive
14741
14745
  })),
14742
14746
  role: "tabpanel",
14743
- tabIndex: isActive ? 0 : -1,
14747
+ [tabIndexProp]: isActive ? 0 : -1,
14744
14748
  "aria-labelledby": tabId,
14745
14749
  children: (!isLazy || isActive) && children
14746
14750
  });