@majapisoftwares/ui 4.3.11 → 4.3.12

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.
@@ -1,9 +1,6 @@
1
- import { type ReactNode } from "react";
2
- declare function Accordion({ children, className, type, }: {
3
- children?: ReactNode;
4
- className?: string;
5
- type?: "single" | "multiple";
6
- }): import("react").JSX.Element;
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ import * as RAccordion from "@radix-ui/react-accordion";
3
+ declare function Accordion({ children, className, ...props }: ComponentProps<typeof RAccordion.Root>): import("react").JSX.Element;
7
4
  declare namespace Accordion {
8
5
  var Item: typeof AccordionItem;
9
6
  }
@@ -2,8 +2,8 @@ import { ChevronUpIcon } from "@heroicons/react/20/solid";
2
2
  import { useId } from "react";
3
3
  import * as RAccordion from "@radix-ui/react-accordion";
4
4
  import clsx from "../../utils/clsx";
5
- export default function Accordion({ children, className, type = "multiple", }) {
6
- return (<RAccordion.Root type={type} className={clsx("flex flex-col gap-2", className)} collapsible={type === "single" || undefined}>
5
+ export default function Accordion({ children, className, ...props }) {
6
+ return (<RAccordion.Root {...props} className={clsx("flex flex-col gap-2", className)} {...(props.type === "single" ? { collapsible: true } : {})}>
7
7
  {children}
8
8
  </RAccordion.Root>);
9
9
  }
package/package.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/majapisoftwares/ui.git"
6
6
  },
7
- "version": "4.3.11"
7
+ "version": "4.3.12"
8
8
  }