@stackshift-ui/accordion 1.0.0-beta.5 → 1.0.0-beta.7
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/accordion.d.ts +19 -0
- package/dist/accordion.js +2 -0
- package/dist/accordion.mjs +2 -0
- package/dist/chunk-3EYN2AKU.mjs +1 -0
- package/dist/chunk-LGYH3GBF.mjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.js +47 -0
- package/dist/setupTests.mjs +47 -0
- package/package.json +4 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace Accordion {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare namespace AccordionItem {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace AccordionTrigger {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare namespace AccordionContent {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var y=Object.create;var s=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var I=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},d=(o,e,t,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P(e))!x.call(o,a)&&a!==t&&s(o,a,{get:()=>e[a],enumerable:!(c=N(e,a))||c.enumerable});return o};var R=(o,e,t)=>(t=o!=null?y(b(o)):{},d(e||!o||!o.__esModule?s(t,"default",{value:o,enumerable:!0}):t,o)),h=o=>d(s({},"__esModule",{value:!0}),o);var T={};I(T,{Accordion:()=>u,AccordionContent:()=>C,AccordionItem:()=>v,AccordionTrigger:()=>g});module.exports=h(T);var i=R(require("@radix-ui/react-accordion")),m=require("lucide-react"),n=require("@stackshift-ui/system"),r=require("react/jsx-runtime"),p="Accordion",l="AccordionItem";var f="AccordionTrigger",A="AccordionContent";function u({...o}){let{[p]:e=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(e,{as:i.Root,"data-slot":"accordion",...o})}u.displayName=p;function v({className:o,...e}){let{[l]:t=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(t,{as:i.Item,"data-slot":"accordion-item",className:(0,n.cn)("border-b last:border-b-0",o),...e})}v.displayName=l;function g({className:o,children:e,...t}){let{[f]:c=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(i.Header,{className:"flex",children:(0,r.jsxs)(c,{as:i.Trigger,"data-slot":"accordion-trigger",className:(0,n.cn)("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",o),...t,children:[e,(0,r.jsx)(m.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}g.displayName=f;function C({className:o,children:e,...t}){let{[A]:c=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(c,{as:i.Content,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...t,children:(0,r.jsx)("div",{className:(0,n.cn)("pt-0 pb-4",o),children:e})})}C.displayName=A;0&&(module.exports={Accordion,AccordionContent,AccordionItem,AccordionTrigger});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"@radix-ui/react-accordion";import{ChevronDownIcon as f}from"lucide-react";import{cn as s,DefaultComponent as r,useStackShiftUIComponents as c}from"@stackshift-ui/system";import{jsx as n,jsxs as C}from"react/jsx-runtime";var d="Accordion",m="AccordionItem";var p="AccordionTrigger",l="AccordionContent";function A({...e}){let{[d]:t=r}=c();return n(t,{as:o.Root,"data-slot":"accordion",...e})}A.displayName=d;function u({className:e,...t}){let{[m]:i=r}=c();return n(i,{as:o.Item,"data-slot":"accordion-item",className:s("border-b last:border-b-0",e),...t})}u.displayName=m;function v({className:e,children:t,...i}){let{[p]:a=r}=c();return n(o.Header,{className:"flex",children:C(a,{as:o.Trigger,"data-slot":"accordion-trigger",className:s("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...i,children:[t,n(f,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}v.displayName=p;function g({className:e,children:t,...i}){let{[l]:a=r}=c();return n(a,{as:o.Content,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...i,children:n("div",{className:s("pt-0 pb-4",e),children:t})})}g.displayName=l;export{A as a,u as b,v as c,g as d};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./accordion";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var y=Object.create;var s=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var I=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},d=(o,e,t,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P(e))!x.call(o,a)&&a!==t&&s(o,a,{get:()=>e[a],enumerable:!(c=N(e,a))||c.enumerable});return o};var R=(o,e,t)=>(t=o!=null?y(b(o)):{},d(e||!o||!o.__esModule?s(t,"default",{value:o,enumerable:!0}):t,o)),h=o=>d(s({},"__esModule",{value:!0}),o);var T={};I(T,{Accordion:()=>u,AccordionContent:()=>C,AccordionItem:()=>v,AccordionTrigger:()=>g});module.exports=h(T);var i=R(require("@radix-ui/react-accordion")),m=require("lucide-react"),n=require("@stackshift-ui/system"),r=require("react/jsx-runtime"),p="Accordion",l="AccordionItem";var f="AccordionTrigger",A="AccordionContent";function u({...o}){let{[p]:e=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(e,{as:i.Root,"data-slot":"accordion",...o})}u.displayName=p;function v({className:o,...e}){let{[l]:t=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(t,{as:i.Item,"data-slot":"accordion-item",className:(0,n.cn)("border-b last:border-b-0",o),...e})}v.displayName=l;function g({className:o,children:e,...t}){let{[f]:c=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(i.Header,{className:"flex",children:(0,r.jsxs)(c,{as:i.Trigger,"data-slot":"accordion-trigger",className:(0,n.cn)("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",o),...t,children:[e,(0,r.jsx)(m.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}g.displayName=f;function C({className:o,children:e,...t}){let{[A]:c=n.DefaultComponent}=(0,n.useStackShiftUIComponents)();return(0,r.jsx)(c,{as:i.Content,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...t,children:(0,r.jsx)("div",{className:(0,n.cn)("pt-0 pb-4",o),children:e})})}C.displayName=A;0&&(module.exports={Accordion,AccordionContent,AccordionItem,AccordionTrigger});
|
package/dist/index.mjs
ADDED