@abdellatifui/react 3.1.95 → 3.1.96
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/nextgen.js +23 -7
- package/dist/nextgen.js.map +1 -1
- package/dist/style.css +5 -0
- package/dist/types/components/Tabs/shadcn/TabItem.d.ts.map +1 -1
- package/dist/types/components/Tabs/shadcn/main.d.ts.map +1 -1
- package/dist/types/stories/Tabs/tabs.stories.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/nextgen.js
CHANGED
|
@@ -26209,30 +26209,41 @@ const TabItem = forwardRef((props, ref) => {
|
|
|
26209
26209
|
className = "",
|
|
26210
26210
|
defaultTab,
|
|
26211
26211
|
full,
|
|
26212
|
-
theme = "minimal"
|
|
26212
|
+
theme = "minimal",
|
|
26213
|
+
onMouseEnter = () => {
|
|
26214
|
+
},
|
|
26215
|
+
onMouseLeave = () => {
|
|
26216
|
+
}
|
|
26213
26217
|
} = props;
|
|
26214
|
-
const hanldeChange = useCallback(() => {
|
|
26218
|
+
const hanldeChange = useCallback((e) => {
|
|
26215
26219
|
if (defaultTab === tab.value) {
|
|
26216
26220
|
return;
|
|
26217
26221
|
}
|
|
26218
26222
|
setDefaultTab(tab.value);
|
|
26219
|
-
onChange(tab, tab.value);
|
|
26223
|
+
onChange({ event: e, ...tab, currentTab: defaultTab, props, ref }, tab.value);
|
|
26220
26224
|
if (tab.onSelected) {
|
|
26221
|
-
tab.onSelected(tab, tab.value);
|
|
26225
|
+
tab.onSelected({ event: e, ...tab, currentTab: defaultTab, props, ref }, tab.value);
|
|
26222
26226
|
}
|
|
26223
26227
|
}, [tab.value, defaultTab, onChange, setDefaultTab, tab, props]);
|
|
26224
26228
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26225
26229
|
TabsTrigger,
|
|
26226
26230
|
{
|
|
26227
26231
|
ref,
|
|
26232
|
+
onMouseEnter: (e) => {
|
|
26233
|
+
onMouseEnter({ event: e, ...tab, currentTab: defaultTab, props, ref });
|
|
26234
|
+
},
|
|
26235
|
+
onMouseLeave: (e) => {
|
|
26236
|
+
onMouseLeave({ event: e, ...tab, currentTab: defaultTab, props, ref });
|
|
26237
|
+
},
|
|
26228
26238
|
theme,
|
|
26229
26239
|
className: cn(
|
|
26230
26240
|
vrs2({ outline: outline2, full }),
|
|
26231
|
-
className,
|
|
26232
26241
|
theme === "modern" ? "min-w-[90px] relative before:absolute before:inset-0 before:rounded before:bg-gradient-to-r before:from-blue-500/5 before:to-purple-500/5 before:opacity-0 before:transition-opacity before:duration-300 hover:before:opacity-100 data-[state=active]:before:opacity-100" : "",
|
|
26233
|
-
theme === "v2"
|
|
26242
|
+
theme === "v2" && "bg-transparent rounded-none p-2 font data-[state=active]:text-blue-500 !font-semibold",
|
|
26243
|
+
className
|
|
26234
26244
|
),
|
|
26235
26245
|
value: tab.value,
|
|
26246
|
+
"data-selected": defaultTab === tab.value ? "true" : "false",
|
|
26236
26247
|
onClick: hanldeChange,
|
|
26237
26248
|
children: theme === "modern" ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "relative z-10 transition-all duration-200 group-hover:scale-[1.01]", children: tab.label }) : tab.label
|
|
26238
26249
|
},
|
|
@@ -26328,7 +26339,12 @@ const ShadcnTabs = forwardRef((props, ref) => {
|
|
|
26328
26339
|
full,
|
|
26329
26340
|
theme,
|
|
26330
26341
|
ref: (el) => tabRefs.current[index] = el,
|
|
26331
|
-
boxSize
|
|
26342
|
+
boxSize,
|
|
26343
|
+
className: (tab == null ? void 0 : tab.className) || "",
|
|
26344
|
+
onMouseEnter: (tab == null ? void 0 : tab.onMouseEnter) || (() => {
|
|
26345
|
+
}),
|
|
26346
|
+
onMouseLeave: (tab == null ? void 0 : tab.onMouseLeave) || (() => {
|
|
26347
|
+
})
|
|
26332
26348
|
},
|
|
26333
26349
|
(tab == null ? void 0 : tab.value) || key
|
|
26334
26350
|
)),
|