@eqtylab/equality 0.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.d.cts CHANGED
@@ -698,8 +698,10 @@ interface TabsProps {
698
698
  }[];
699
699
  className?: string;
700
700
  tabsListBackground?: 'transparent' | 'filled';
701
+ defaultValue?: string;
702
+ onValueChange?: (value: string) => void;
701
703
  }
702
- declare const Tabs: ({ id, items, className, tabsListBackground }: TabsProps) => react_jsx_runtime.JSX.Element;
704
+ declare const Tabs: ({ id, items, className, tabsListBackground, defaultValue, onValueChange, }: TabsProps) => react_jsx_runtime.JSX.Element;
703
705
 
704
706
  declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
705
707
 
package/dist/index.d.ts CHANGED
@@ -698,8 +698,10 @@ interface TabsProps {
698
698
  }[];
699
699
  className?: string;
700
700
  tabsListBackground?: 'transparent' | 'filled';
701
+ defaultValue?: string;
702
+ onValueChange?: (value: string) => void;
701
703
  }
702
- declare const Tabs: ({ id, items, className, tabsListBackground }: TabsProps) => react_jsx_runtime.JSX.Element;
704
+ declare const Tabs: ({ id, items, className, tabsListBackground, defaultValue, onValueChange, }: TabsProps) => react_jsx_runtime.JSX.Element;
703
705
 
704
706
  declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
705
707
 
package/dist/index.js CHANGED
@@ -2719,11 +2719,19 @@ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
2719
2719
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
2720
2720
  var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(styles52["tabs-content"], className), ...props }));
2721
2721
  TabsContent.displayName = TabsPrimitive.Content.displayName;
2722
- var Tabs = ({ id, items, className, tabsListBackground = "transparent" }) => {
2723
- const [activeTab, setActiveTab] = useState(items[0].value);
2722
+ var Tabs = ({
2723
+ id,
2724
+ items,
2725
+ className,
2726
+ tabsListBackground = "transparent",
2727
+ defaultValue,
2728
+ onValueChange
2729
+ }) => {
2730
+ const [activeTab, setActiveTab] = useState(defaultValue ?? items[0].value);
2724
2731
  const isFilled = tabsListBackground === "filled";
2725
2732
  const handleValueChange = (newTab) => {
2726
2733
  setActiveTab(newTab);
2734
+ onValueChange?.(newTab);
2727
2735
  };
2728
2736
  const renderIcon = (icon) => {
2729
2737
  if (icon) {