Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-accordion

Package Overview
Dependencies
Maintainers
5
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-accordion - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

dist/index.js

@@ -1,2 +0,2 @@

function e(e,r,t){Object.defineProperty(e,r,{get:t,enumerable:!0})}var r,t=require("@radix-ui/react-id").useId,n=require("@radix-ui/react-collapsible"),o=n.Root,a=n.Button,c=n.Content,i=require("@radix-ui/react-primitive").Primitive,d=require("@radix-ui/react-use-controllable-state").useControllableState,u=require("@radix-ui/primitive").composeEventHandlers,l=require("@radix-ui/react-compose-refs").useComposedRefs,s=require("@radix-ui/react-context").createContext,f=(r=require("react"))&&r.__esModule?r.default:r,p={};function m(){return(m=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}const b=["Home","End","ArrowDown","ArrowUp"],A=f.forwardRef(((e,r)=>{if("single"===e.type)return f.createElement(w,m({},e,{ref:r}));if("multiple"===e.type)return f.createElement(y,m({},e,{ref:r}));throw new Error("Missing prop `type` expected on `Accordion`")}));exports.Accordion=A,A.displayName="Accordion";const[x,v]=s("Accordion"),w=f.forwardRef(((e,r)=>{const{value:t,defaultValue:n,onValueChange:o=(()=>{}),...a}=e,[c,i]=d({prop:t,defaultProp:n,onChange:o});return f.createElement(x,{value:c?[c]:[],onItemOpen:i,onItemClose:()=>i(void 0)},f.createElement(R,m({},a,{ref:r})))})),y=f.forwardRef(((e,r)=>{const{value:t,defaultValue:n,onValueChange:o=(()=>{}),...a}=e,[c=[],i]=d({prop:t,defaultProp:n,onChange:o}),u=f.useCallback((e=>i(((r=[])=>[...r,e]))),[i]),l=f.useCallback((e=>i(((r=[])=>r.filter((r=>r!==e))))),[i]);return f.createElement(x,{value:c,onItemOpen:u,onItemClose:l},f.createElement(R,m({},a,{ref:r})))})),[E,I]=s("Accordion"),R=f.forwardRef(((e,r)=>{const{disabled:t,...n}=e,o=f.useRef(new Set),a=f.useRef(null),c=l(a,r),d=u(e.onKeyDown,(e=>{const r=e.target;if(!(b.includes(e.key)&&(t=r,t instanceof HTMLButtonElement)))return;var t;const n=[...o.current].filter((e=>!e?.disabled)),a=n.length,c=n.indexOf(r);if(-1===c)return;e.preventDefault();let i=c;switch(e.key){case"Home":i=0;break;case"End":i=a-1;break;case"ArrowDown":i=c+1;break;case"ArrowUp":i=c-1,i<0&&(i=a-1)}n[i%a]?.focus?.()}));return f.createElement(E,{disabled:t,buttonNodesRef:o},f.createElement(i,m({},n,{ref:c,onKeyDown:t?void 0:d})))})),[h,g]=s("AccordionItem"),C=f.forwardRef(((e,r)=>{const{value:n,...a}=e,c=I("AccordionItem"),i=v("AccordionItem"),d=t(),u=n&&i.value.includes(n)||!1,l=!0===c.disabled||e.disabled;return f.createElement(h,{open:u,disabled:l,buttonId:d},f.createElement(o,m({"data-state":u?"open":"closed"},a,{ref:r,disabled:l,open:u,onOpenChange:e=>{e?i.onItemOpen(n):i.onItemClose(n)}})))}));exports.AccordionItem=C,C.displayName="AccordionItem";const P="h3",H=f.forwardRef(((e,r)=>{const{as:t=P,...n}=e,o=g(O);return f.createElement(i,m({"data-state":(a=o.open,a?"open":"closed"),"data-disabled":o.disabled?"":void 0},n,{as:t,ref:r}));var a}));exports.AccordionHeader=H,H.displayName="AccordionHeader";const O="AccordionButton",q=f.forwardRef(((e,r)=>{const{buttonNodesRef:t}=I(O),n=g(O),o=f.useRef(null),c=l(o,r);return f.useEffect((()=>{const e=t.current,r=o.current;if(r)return e.add(r),()=>{e.delete(r)}}),[t]),f.createElement(a,m({"aria-disabled":n.open||void 0,id:n.buttonId},e,{ref:c}))}));exports.AccordionButton=q,q.displayName=O;const k=f.forwardRef(((e,r)=>{const t=g("AccordionPanel");return f.createElement(c,m({role:"region","aria-labelledby":t.buttonId},e,{style:{"--radix-accordion-panel-height":"var(--radix-collapsible-content-height)",...e.style},ref:r}))}));exports.AccordionPanel=k,k.displayName="AccordionPanel";const B=A;exports.Root=B;const N=C;exports.Item=N;const D=H;exports.Header=D;const V=q;exports.Button=V;const j=k;exports.Panel=j,e(p,"Panel",(function(){return j})),e(p,"Button",(function(){return V})),e(p,"Header",(function(){return D})),e(p,"Item",(function(){return N})),e(p,"Root",(function(){return B})),e(p,"AccordionPanel",(function(){return k})),e(p,"AccordionButton",(function(){return q})),e(p,"AccordionHeader",(function(){return H})),e(p,"AccordionItem",(function(){return C})),e(p,"Accordion",(function(){return A}));
function e(e){return e&&e.__esModule?e.default:e}function r(e,r,t){Object.defineProperty(e,r,{get:t,enumerable:!0})}var t=require("@radix-ui/react-id").useId,n=require("@radix-ui/react-collapsible"),o=n.Root,a=n.Button,i=n.Content,c=require("@radix-ui/react-primitive").Primitive,u=require("@radix-ui/react-use-controllable-state").useControllableState,l=require("@radix-ui/primitive").composeEventHandlers,s=require("@radix-ui/react-compose-refs").useComposedRefs,d=require("@radix-ui/react-context").createContext,f=e(require("react")),b=e(require("@babel/runtime-corejs3/core-js-stable/object/define-property")),p=e(require("@babel/runtime-corejs3/core-js-stable/object/define-properties")),m=e(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors")),v=e(require("@babel/runtime-corejs3/core-js-stable/instance/for-each")),j=e(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor")),A=e(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols")),h=e(require("@babel/runtime-corejs3/core-js-stable/object/keys")),y=e(require("@babel/runtime-corejs3/core-js-stable/instance/index-of")),q=e(require("@babel/runtime-corejs3/core-js-stable/instance/includes")),x=e(require("@babel/runtime-corejs3/core-js-stable/set")),w=e(require("@babel/runtime-corejs3/core-js-stable/instance/filter")),g=e(require("@babel/runtime-corejs3/core-js-stable/instance/concat")),E=e(require("@babel/runtime-corejs3/helpers/extends")),I=e(require("@babel/runtime-corejs3/helpers/slicedToArray")),C=e(require("@babel/runtime-corejs3/helpers/objectWithoutProperties")),R=e(require("@babel/runtime-corejs3/helpers/toConsumableArray")),P=e(require("@babel/runtime-corejs3/helpers/defineProperty")),H={};function k(e,r){var t=h(e);if(A){var n=A(e);r&&(n=w(n).call(n,(function(r){return j(e,r).enumerable}))),t.push.apply(t,n)}return t}function V(e){for(var r=1;r<arguments.length;r++){var t,n=null!=arguments[r]?arguments[r]:{};if(r%2)v(t=k(Object(n),!0)).call(t,(function(r){P(e,r,n[r])}));else if(m)p(e,m(n));else{var o;v(o=k(Object(n))).call(o,(function(r){b(e,r,j(n,r))}))}}return e}var B=["Home","End","ArrowDown","ArrowUp"],N=f.forwardRef((function(e,r){if("single"===e.type)return f.createElement(T,E({},e,{ref:r}));if("multiple"===e.type)return f.createElement(U,E({},e,{ref:r}));throw new Error("Missing prop `type` expected on `".concat("Accordion","`"))}));exports.Accordion=N,N.displayName="Accordion";var O=d("Accordion"),D=I(O,2),M=D[0],K=D[1],T=f.forwardRef((function(e,r){var t=e.value,n=e.defaultValue,o=e.onValueChange,a=void 0===o?function(){}:o,i=C(e,["value","defaultValue","onValueChange"]),c=u({prop:t,defaultProp:n,onChange:a}),l=I(c,2),s=l[0],d=l[1];return f.createElement(M,{value:s?[s]:[],onItemOpen:d,onItemClose:function(){return d(void 0)}},f.createElement(z,E({},i,{ref:r})))})),U=f.forwardRef((function(e,r){var t=e.value,n=e.defaultValue,o=e.onValueChange,a=void 0===o?function(){}:o,i=C(e,["value","defaultValue","onValueChange"]),c=u({prop:t,defaultProp:n,onChange:a}),l=I(c,2),s=l[0],d=void 0===s?[]:s,b=l[1],p=f.useCallback((function(e){return b((function(){var r,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return g(r=[]).call(r,R(t),[e])}))}),[b]),m=f.useCallback((function(e){return b((function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return w(r).call(r,(function(r){return r!==e}))}))}),[b]);return f.createElement(M,{value:d,onItemOpen:p,onItemClose:m},f.createElement(z,E({},i,{ref:r})))})),_=d("Accordion"),L=I(_,2),S=L[0],W=L[1],z=f.forwardRef((function(e,r){var t=e.disabled,n=C(e,["disabled"]),o=f.useRef(new x),a=f.useRef(null),i=s(a,r),u=l(e.onKeyDown,(function(e){var r,t,n=e.target;if(q(B).call(B,e.key)&&n instanceof HTMLButtonElement){var a=w(r=R(o.current)).call(r,(function(e){return!(null!=e&&e.disabled)})),i=a.length,c=y(a).call(a,n);if(-1!==c){e.preventDefault();var u=c;switch(e.key){case"Home":u=0;break;case"End":u=i-1;break;case"ArrowDown":u=c+1;break;case"ArrowUp":(u=c-1)<0&&(u=i-1)}null===(t=a[u%i])||void 0===t||t.focus()}}}));return f.createElement(S,{disabled:t,buttonNodesRef:o},f.createElement(c,E({},n,{ref:i,onKeyDown:t?void 0:u})))})),F=d("AccordionItem"),G=I(F,2),J=G[0],Q=G[1],X=f.forwardRef((function(e,r){var n,a=e.value,i=C(e,["value"]),c=W("AccordionItem"),u=K("AccordionItem"),l=t(),s=a&&q(n=u.value).call(n,a)||!1,d=!0===c.disabled||e.disabled;return f.createElement(J,{open:s,disabled:d,buttonId:l},f.createElement(o,E({"data-state":s?"open":"closed"},i,{ref:r,disabled:d,open:s,onOpenChange:function(e){e?u.onItemOpen(a):u.onItemClose(a)}})))}));exports.AccordionItem=X,X.displayName="AccordionItem";var Y=f.forwardRef((function(e,r){var t,n=e.as,o=void 0===n?"h3":n,a=C(e,["as"]),i=Q(Z);return f.createElement(c,E({"data-state":(t=i.open,t?"open":"closed"),"data-disabled":i.disabled?"":void 0},a,{as:o,ref:r}))}));exports.AccordionHeader=Y,Y.displayName="AccordionHeader";var Z="AccordionButton",$=f.forwardRef((function(e,r){var t=W(Z).buttonNodesRef,n=Q(Z),o=f.useRef(null),i=s(o,r);return f.useEffect((function(){var e=t.current,r=o.current;if(r)return e.add(r),function(){e.delete(r)}}),[t]),f.createElement(a,E({"aria-disabled":n.open||void 0,id:n.buttonId},e,{ref:i}))}));exports.AccordionButton=$,$.displayName=Z;var ee=f.forwardRef((function(e,r){var t=Q("AccordionPanel");return f.createElement(i,E({role:"region","aria-labelledby":t.buttonId},e,{style:V({"--radix-accordion-panel-height":"var(--radix-collapsible-content-height)"},e.style),ref:r}))}));exports.AccordionPanel=ee,ee.displayName="AccordionPanel";var re=N;exports.Root=re;var te=X;exports.Item=te;var ne=Y;exports.Header=ne;var oe=$;exports.Button=oe;var ae=ee;exports.Panel=ae,r(H,"Panel",(function(){return ae})),r(H,"Button",(function(){return oe})),r(H,"Header",(function(){return ne})),r(H,"Item",(function(){return te})),r(H,"Root",(function(){return re})),r(H,"AccordionPanel",(function(){return ee})),r(H,"AccordionButton",(function(){return $})),r(H,"AccordionHeader",(function(){return Y})),r(H,"AccordionItem",(function(){return X})),r(H,"Accordion",(function(){return N}));
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

function e(e,o,r){Object.defineProperty(e,o,{get:r,enumerable:!0})}import{useId as o}from"@radix-ui/react-id";import{Root as r,Button as t,Content as n}from"@radix-ui/react-collapsible";import{Primitive as c}from"@radix-ui/react-primitive";import{useControllableState as a}from"@radix-ui/react-use-controllable-state";import{composeEventHandlers as i}from"@radix-ui/primitive";import{useComposedRefs as d}from"@radix-ui/react-compose-refs";import{createContext as l}from"@radix-ui/react-context";import u from"react";var s={};function f(){return(f=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}const p=["Home","End","ArrowDown","ArrowUp"];export const Accordion=u.forwardRef(((e,o)=>{if("single"===e.type)return u.createElement(b,f({},e,{ref:o}));if("multiple"===e.type)return u.createElement(x,f({},e,{ref:o}));throw new Error("Missing prop `type` expected on `Accordion`")}));Accordion.displayName="Accordion";const[m,A]=l("Accordion"),b=u.forwardRef(((e,o)=>{const{value:r,defaultValue:t,onValueChange:n=(()=>{}),...c}=e,[i,d]=a({prop:r,defaultProp:t,onChange:n});return u.createElement(m,{value:i?[i]:[],onItemOpen:d,onItemClose:()=>d(void 0)},u.createElement(v,f({},c,{ref:o})))})),x=u.forwardRef(((e,o)=>{const{value:r,defaultValue:t,onValueChange:n=(()=>{}),...c}=e,[i=[],d]=a({prop:r,defaultProp:t,onChange:n}),l=u.useCallback((e=>d(((o=[])=>[...o,e]))),[d]),s=u.useCallback((e=>d(((o=[])=>o.filter((o=>o!==e))))),[d]);return u.createElement(m,{value:i,onItemOpen:l,onItemClose:s},u.createElement(v,f({},c,{ref:o})))})),[w,I]=l("Accordion"),v=u.forwardRef(((e,o)=>{const{disabled:r,...t}=e,n=u.useRef(new Set),a=u.useRef(null),l=d(a,o),s=i(e.onKeyDown,(e=>{const o=e.target;if(!(p.includes(e.key)&&(r=o,r instanceof HTMLButtonElement)))return;var r;const t=[...n.current].filter((e=>!e?.disabled)),c=t.length,a=t.indexOf(o);if(-1===a)return;e.preventDefault();let i=a;switch(e.key){case"Home":i=0;break;case"End":i=c-1;break;case"ArrowDown":i=a+1;break;case"ArrowUp":i=a-1,i<0&&(i=c-1)}t[i%c]?.focus?.()}));return u.createElement(w,{disabled:r,buttonNodesRef:n},u.createElement(c,f({},t,{ref:l,onKeyDown:r?void 0:s})))})),[y,E]=l("AccordionItem");export const AccordionItem=u.forwardRef(((e,t)=>{const{value:n,...c}=e,a=I("AccordionItem"),i=A("AccordionItem"),d=o(),l=n&&i.value.includes(n)||!1,s=!0===a.disabled||e.disabled;return u.createElement(y,{open:l,disabled:s,buttonId:d},u.createElement(r,f({"data-state":l?"open":"closed"},c,{ref:t,disabled:s,open:l,onOpenChange:e=>{e?i.onItemOpen(n):i.onItemClose(n)}})))}));AccordionItem.displayName="AccordionItem";const R="h3";export const AccordionHeader=u.forwardRef(((e,o)=>{const{as:r=R,...t}=e,n=E(h);return u.createElement(c,f({"data-state":(a=n.open,a?"open":"closed"),"data-disabled":n.disabled?"":void 0},t,{as:r,ref:o}));var a}));AccordionHeader.displayName="AccordionHeader";const h="AccordionButton";export const AccordionButton=u.forwardRef(((e,o)=>{const{buttonNodesRef:r}=I(h),n=E(h),c=u.useRef(null),a=d(c,o);return u.useEffect((()=>{const e=r.current,o=c.current;if(o)return e.add(o),()=>{e.delete(o)}}),[r]),u.createElement(t,f({"aria-disabled":n.open||void 0,id:n.buttonId},e,{ref:a}))}));AccordionButton.displayName=h;export const AccordionPanel=u.forwardRef(((e,o)=>{const r=E("AccordionPanel");return u.createElement(n,f({role:"region","aria-labelledby":r.buttonId},e,{style:{"--radix-accordion-panel-height":"var(--radix-collapsible-content-height)",...e.style},ref:o}))}));AccordionPanel.displayName="AccordionPanel";export const Root=Accordion;export const Item=AccordionItem;export const Header=AccordionHeader;export const Button=AccordionButton;export const Panel=AccordionPanel;e(s,"Panel",(function(){return Panel})),e(s,"Button",(function(){return Button})),e(s,"Header",(function(){return Header})),e(s,"Item",(function(){return Item})),e(s,"Root",(function(){return Root})),e(s,"AccordionPanel",(function(){return AccordionPanel})),e(s,"AccordionButton",(function(){return AccordionButton})),e(s,"AccordionHeader",(function(){return AccordionHeader})),e(s,"AccordionItem",(function(){return AccordionItem})),e(s,"Accordion",(function(){return Accordion}));
function e(e,r,o){Object.defineProperty(e,r,{get:o,enumerable:!0})}import{useId as r}from"@radix-ui/react-id";import{Root as o,Button as t,Content as n}from"@radix-ui/react-collapsible";import{Primitive as a}from"@radix-ui/react-primitive";import{useControllableState as c}from"@radix-ui/react-use-controllable-state";import{composeEventHandlers as i}from"@radix-ui/primitive";import{useComposedRefs as l}from"@radix-ui/react-compose-refs";import{createContext as u}from"@radix-ui/react-context";import d from"react";import s from"@babel/runtime-corejs3/core-js-stable/object/define-property";import f from"@babel/runtime-corejs3/core-js-stable/object/define-properties";import m from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";import p from"@babel/runtime-corejs3/core-js-stable/instance/for-each";import b from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";import v from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";import A from"@babel/runtime-corejs3/core-js-stable/object/keys";import j from"@babel/runtime-corejs3/core-js-stable/instance/index-of";import h from"@babel/runtime-corejs3/core-js-stable/instance/includes";import y from"@babel/runtime-corejs3/core-js-stable/set";import w from"@babel/runtime-corejs3/core-js-stable/instance/filter";import x from"@babel/runtime-corejs3/core-js-stable/instance/concat";import g from"@babel/runtime-corejs3/helpers/esm/extends";import I from"@babel/runtime-corejs3/helpers/esm/slicedToArray";import E from"@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";import R from"@babel/runtime-corejs3/helpers/esm/toConsumableArray";import P from"@babel/runtime-corejs3/helpers/esm/defineProperty";var C={};function H(e,r){var o=A(e);if(v){var t=v(e);r&&(t=w(t).call(t,(function(r){return b(e,r).enumerable}))),o.push.apply(o,t)}return o}function B(e){for(var r=1;r<arguments.length;r++){var o,t=null!=arguments[r]?arguments[r]:{};if(r%2)p(o=H(Object(t),!0)).call(o,(function(r){P(e,r,t[r])}));else if(m)f(e,m(t));else{var n;p(n=H(Object(t))).call(n,(function(r){s(e,r,b(t,r))}))}}return e}var k=["Home","End","ArrowDown","ArrowUp"];export var Accordion=d.forwardRef((function(e,r){if("single"===e.type)return d.createElement(K,g({},e,{ref:r}));if("multiple"===e.type)return d.createElement(M,g({},e,{ref:r}));throw new Error("Missing prop `type` expected on `".concat("Accordion","`"))}));Accordion.displayName="Accordion";var V=u("Accordion"),N=I(V,2),O=N[0],D=N[1],K=d.forwardRef((function(e,r){var o=e.value,t=e.defaultValue,n=e.onValueChange,a=void 0===n?function(){}:n,i=E(e,["value","defaultValue","onValueChange"]),l=c({prop:o,defaultProp:t,onChange:a}),u=I(l,2),s=u[0],f=u[1];return d.createElement(O,{value:s?[s]:[],onItemOpen:f,onItemClose:function(){return f(void 0)}},d.createElement(q,g({},i,{ref:r})))})),M=d.forwardRef((function(e,r){var o=e.value,t=e.defaultValue,n=e.onValueChange,a=void 0===n?function(){}:n,i=E(e,["value","defaultValue","onValueChange"]),l=c({prop:o,defaultProp:t,onChange:a}),u=I(l,2),s=u[0],f=void 0===s?[]:s,m=u[1],p=d.useCallback((function(e){return m((function(){var r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return x(r=[]).call(r,R(o),[e])}))}),[m]),b=d.useCallback((function(e){return m((function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return w(r).call(r,(function(r){return r!==e}))}))}),[m]);return d.createElement(O,{value:f,onItemOpen:p,onItemClose:b},d.createElement(q,g({},i,{ref:r})))})),T=u("Accordion"),U=I(T,2),L=U[0],W=U[1],q=d.forwardRef((function(e,r){var o=e.disabled,t=E(e,["disabled"]),n=d.useRef(new y),c=d.useRef(null),u=l(c,r),s=i(e.onKeyDown,(function(e){var r,o,t=e.target;if(h(k).call(k,e.key)&&t instanceof HTMLButtonElement){var a=w(r=R(n.current)).call(r,(function(e){return!(null!=e&&e.disabled)})),c=a.length,i=j(a).call(a,t);if(-1!==i){e.preventDefault();var l=i;switch(e.key){case"Home":l=0;break;case"End":l=c-1;break;case"ArrowDown":l=i+1;break;case"ArrowUp":(l=i-1)<0&&(l=c-1)}null===(o=a[l%c])||void 0===o||o.focus()}}}));return d.createElement(L,{disabled:o,buttonNodesRef:n},d.createElement(a,g({},t,{ref:u,onKeyDown:o?void 0:s})))})),z=u("AccordionItem"),F=I(z,2),G=F[0],J=F[1];export var AccordionItem=d.forwardRef((function(e,t){var n,a=e.value,c=E(e,["value"]),i=W("AccordionItem"),l=D("AccordionItem"),u=r(),s=a&&h(n=l.value).call(n,a)||!1,f=!0===i.disabled||e.disabled;return d.createElement(G,{open:s,disabled:f,buttonId:u},d.createElement(o,g({"data-state":s?"open":"closed"},c,{ref:t,disabled:f,open:s,onOpenChange:function(e){e?l.onItemOpen(a):l.onItemClose(a)}})))}));AccordionItem.displayName="AccordionItem";export var AccordionHeader=d.forwardRef((function(e,r){var o,t=e.as,n=void 0===t?"h3":t,c=E(e,["as"]),i=J(Q);return d.createElement(a,g({"data-state":(o=i.open,o?"open":"closed"),"data-disabled":i.disabled?"":void 0},c,{as:n,ref:r}))}));AccordionHeader.displayName="AccordionHeader";var Q="AccordionButton";export var AccordionButton=d.forwardRef((function(e,r){var o=W(Q).buttonNodesRef,n=J(Q),a=d.useRef(null),c=l(a,r);return d.useEffect((function(){var e=o.current,r=a.current;if(r)return e.add(r),function(){e.delete(r)}}),[o]),d.createElement(t,g({"aria-disabled":n.open||void 0,id:n.buttonId},e,{ref:c}))}));AccordionButton.displayName=Q;export var AccordionPanel=d.forwardRef((function(e,r){var o=J("AccordionPanel");return d.createElement(n,g({role:"region","aria-labelledby":o.buttonId},e,{style:B({"--radix-accordion-panel-height":"var(--radix-collapsible-content-height)"},e.style),ref:r}))}));AccordionPanel.displayName="AccordionPanel";export var Root=Accordion;export var Item=AccordionItem;export var Header=AccordionHeader;export var Button=AccordionButton;export var Panel=AccordionPanel;e(C,"Panel",(function(){return Panel})),e(C,"Button",(function(){return Button})),e(C,"Header",(function(){return Header})),e(C,"Item",(function(){return Item})),e(C,"Root",(function(){return Root})),e(C,"AccordionPanel",(function(){return AccordionPanel})),e(C,"AccordionButton",(function(){return AccordionButton})),e(C,"AccordionHeader",(function(){return AccordionHeader})),e(C,"AccordionItem",(function(){return AccordionItem})),e(C,"Accordion",(function(){return Accordion}));
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-accordion",
"version": "0.0.8",
"version": "0.0.9",
"license": "MIT",

@@ -16,13 +16,15 @@ "source": "src/index.ts",

"clean": "rm -rf dist",
"prepublish": "yarn clean"
"prepublish": "yarn clean",
"version": "yarn version"
},
"dependencies": {
"@radix-ui/primitive": "0.0.1",
"@radix-ui/react-collapsible": "0.0.8",
"@radix-ui/react-compose-refs": "0.0.1",
"@radix-ui/react-context": "0.0.1",
"@radix-ui/react-id": "0.0.1",
"@radix-ui/react-polymorphic": "0.0.6",
"@radix-ui/react-primitive": "0.0.6",
"@radix-ui/react-use-controllable-state": "0.0.1"
"@babel/runtime-corejs3": "^7.13.10",
"@radix-ui/primitive": "0.0.2",
"@radix-ui/react-collapsible": "0.0.9",
"@radix-ui/react-compose-refs": "0.0.2",
"@radix-ui/react-context": "0.0.2",
"@radix-ui/react-id": "0.0.2",
"@radix-ui/react-polymorphic": "0.0.7",
"@radix-ui/react-primitive": "0.0.7",
"@radix-ui/react-use-controllable-state": "0.0.2"
},

@@ -29,0 +31,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc