@eqtylab/equality 1.0.0 → 1.0.1

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.cjs CHANGED
@@ -2821,11 +2821,19 @@ var TabsTrigger = React15__namespace.forwardRef(({ className, ...props }, ref) =
2821
2821
  TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
2822
2822
  var TabsContent = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Content, { ref, className: cn(styles52__default.default["tabs-content"], className), ...props }));
2823
2823
  TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
2824
- var Tabs = ({ id, items, className, tabsListBackground = "transparent" }) => {
2825
- const [activeTab, setActiveTab] = React15.useState(items[0].value);
2824
+ var Tabs = ({
2825
+ id,
2826
+ items,
2827
+ className,
2828
+ tabsListBackground = "transparent",
2829
+ defaultValue,
2830
+ onValueChange
2831
+ }) => {
2832
+ const [activeTab, setActiveTab] = React15.useState(defaultValue ?? items[0].value);
2826
2833
  const isFilled = tabsListBackground === "filled";
2827
2834
  const handleValueChange = (newTab) => {
2828
2835
  setActiveTab(newTab);
2836
+ onValueChange?.(newTab);
2829
2837
  };
2830
2838
  const renderIcon = (icon) => {
2831
2839
  if (icon) {