@vellira-ui/react-native 2.115.2 → 2.115.3
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.js +22 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5965,6 +5965,28 @@ const TabsTrigger = ({ value, children, asChild = false, icon, badge, descriptio
|
|
|
5965
5965
|
segmentedActiveBorderColor: palette.segmented.active.border,
|
|
5966
5966
|
style
|
|
5967
5967
|
});
|
|
5968
|
+
if (mode === "navigation" && child && typeof child.type === "string") {
|
|
5969
|
+
const domChild = child;
|
|
5970
|
+
const composedDisabled = isDisabled || Boolean(domChild.props.disabled);
|
|
5971
|
+
return cloneElement(domChild, {
|
|
5972
|
+
...domChild.type === "button" ? { disabled: composedDisabled } : {},
|
|
5973
|
+
"aria-current": isActive ? "page" : void 0,
|
|
5974
|
+
"aria-disabled": composedDisabled || void 0,
|
|
5975
|
+
"data-state": isActive ? "active" : "inactive",
|
|
5976
|
+
tabIndex: composedDisabled ? -1 : domChild.props.tabIndex,
|
|
5977
|
+
onClick: (event) => {
|
|
5978
|
+
domChild.props.onClick?.(event);
|
|
5979
|
+
if (event.defaultPrevented) return;
|
|
5980
|
+
if (composedDisabled) {
|
|
5981
|
+
event.preventDefault();
|
|
5982
|
+
return;
|
|
5983
|
+
}
|
|
5984
|
+
if (!isActive) setValue(value);
|
|
5985
|
+
},
|
|
5986
|
+
style: domChild.props.style,
|
|
5987
|
+
children: content
|
|
5988
|
+
});
|
|
5989
|
+
}
|
|
5968
5990
|
if (child) return cloneElement(child, {
|
|
5969
5991
|
accessibilityRole: mode === "tabs" ? "tab" : void 0,
|
|
5970
5992
|
accessibilityState: mode === "tabs" ? {
|