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

@interop-ui/react-accordion

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.1-15 to 0.0.1-16

16

dist/index.d.ts

@@ -12,2 +12,5 @@ type AccordionItemOwnProps = {

value: string;
open: never;
defaultOpen: never;
onOpenChange: never;
};

@@ -18,3 +21,2 @@ /**

export const AccordionItem: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", import("@interop-ui/react-polymorphic").MergeProps<import("@interop-ui/react-collapsible").CollapsibleOwnProps, AccordionItemOwnProps>>;
type AccordionHeaderOwnProps = {};
/**

@@ -24,3 +26,3 @@ * `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible

*/
export const AccordionHeader: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"h3", AccordionHeaderOwnProps>;
export const AccordionHeader: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"h3", {}>;
/**

@@ -34,3 +36,3 @@ * `AccordionButton` is the trigger that toggles the collapsed state of an `AccordionItem`. It

*/
export const AccordionPanel: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", Pick<{}, never>>;
export const AccordionPanel: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", Pick<import("@interop-ui/react-collapsible").CollapsibleContentOwnProps, "forceMount">>;
type AccordionOwnProps = {

@@ -54,6 +56,4 @@ /**

* The callback that fires when the state of the accordion changes.
*
* @param value
*/
onChange?(value: string): void;
onValueChange?(value: string): void;
};

@@ -66,6 +66,6 @@ /**

export const Item: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", import("@interop-ui/react-polymorphic").MergeProps<import("@interop-ui/react-collapsible").CollapsibleOwnProps, AccordionItemOwnProps>>;
export const Header: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"h3", AccordionHeaderOwnProps>;
export const Header: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"h3", {}>;
export const Button: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"button", Pick<{}, never>>;
export const Panel: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", Pick<{}, never>>;
export const Panel: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", Pick<import("@interop-ui/react-collapsible").CollapsibleContentOwnProps, "forceMount">>;
//# sourceMappingURL=index.d.ts.map

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

var e,r=require("@interop-ui/react-collapsible"),t=r.Collapsible,n=r.CollapsibleButton,o=r.CollapsibleContent,a=require("@interop-ui/react-polymorphic").forwardRefWithAs,i=require("@interop-ui/react-utils"),u=i.composeEventHandlers,c=i.createContext,l=i.useComposedRefs,d=i.useControlledState,s=i.useId,f=require("@interop-ui/utils").getPartDataAttrObj,p=(e=require("react"))&&e.__esModule?e.default:e;function v(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(){return(b=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)}function y(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}(e,r)||A(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,r){if(e){if("string"==typeof e)return h(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}}function h(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var g=m(c("AccordionContext","Accordion"),2),O=g[0],w=g[1],I=m(c("AccordionItemContext","AccordionItem"),2),x=I[0],E=I[1],S=a((function(e,r){var n,o=e.value,a=(e.isOpen,e.defaultIsOpen,e.children),i=(e.onToggle,y(e,["value","isOpen","defaultIsOpen","children","onToggle"])),u=w("AccordionItem"),c="accordion-button-".concat(s()),l=e.id||c,d=o&&o===u.value||!1,v=null!==(n=u.isDisabled)&&void 0!==n?n:e.disabled,m=p.useMemo((function(){return{isOpen:d,buttonId:l}}),[d,l]);return p.createElement(t,b({},i,f("AccordionItem"),{ref:r,"data-state":d?"open":"closed","data-disabled":v||void 0,disabled:v,isOpen:d,onToggle:function(){return u.setValue(o)}}),p.createElement(x.Provider,{value:m},a))}));exports.AccordionItem=S,S.displayName="AccordionItem";var j=a((function(e,r){var t=e.as,n=void 0===t?"h3":t,o=y(e,["as"]);return p.createElement(n,b({ref:r},o,f("AccordionHeader")))}));exports.AccordionHeader=j,j.displayName="AccordionHeader";var C=a((function(e,r){var t=Object.assign({},e),o=w("AccordionButton").buttonNodesRef,a=E("AccordionButton"),i=p.useRef(null),u=l(i,r);return p.useEffect((function(){var e=o.current,r=i.current;if(r)return e.add(r),function(){e.delete(r)}}),[o]),p.createElement(n,b({},t,f("AccordionButton"),{ref:u,"aria-disabled":a.isOpen||void 0,id:a.buttonId}))}));exports.AccordionButton=C,C.displayName="AccordionButton";var P=a((function(e,r){var t=E("AccordionPanel");return p.createElement(o,b({},e,f("AccordionPanel"),{ref:r,role:"region","aria-labelledby":t.buttonId}))}));exports.AccordionPanel=P,P.displayName="AccordionPanel";var B=["Home","End","ArrowDown","ArrowUp"],D=a((function(e,r){var t=e.as,n=void 0===t?"div":t,o=e.value,a=e.defaultValue,i=e.children,c=e.disabled,s=e.onChange,A=void 0===s?function(){}:s,h=y(e,["as","value","defaultValue","children","disabled","onChange"]),g=p.useRef(new Set),w=p.useRef(null),I=l(w,r),x=m(d({prop:o,defaultProp:a,onChange:function(e){function r(r){return e.apply(this,arguments)}return r.toString=function(){return e.toString()},r}((function(e){return e&&A(e)}))}),2),E=x[0],S=x[1],j=u(e.onKeyDown,(function(e){var r,t=e.target;if(B.includes(e.key)&&t instanceof HTMLButtonElement){var n=v(g.current).filter((function(e){return!(e&&e.disabled)})),o=n.length,a=n.indexOf(t);if(-1!==a){e.preventDefault();var i=a;switch(e.key){case"Home":i=0;break;case"End":i=o-1;break;case"ArrowDown":i=a+1;break;case"ArrowUp":(i=a-1)<0&&(i=o-1)}null===(r=n[i%o])||void 0===r||r.focus()}}})),C=p.useMemo((function(){return{isDisabled:c,buttonNodesRef:g,value:E,setValue:S}}),[c,E,S]);return p.createElement(n,b({},h,f("Accordion"),{ref:I,onKeyDown:c?void 0:j}),p.createElement(O.Provider,{value:C},i))}));exports.Accordion=D,D.displayName="Accordion";var H=D;exports.Root=H;var R=S;exports.Item=R;var N=j;exports.Header=N;var k=C;exports.Button=k;var T=P;exports.Panel=T;
var e,r=require("@interop-ui/react-collapsible"),t=r.Collapsible,n=r.CollapsibleButton,o=r.CollapsibleContent,a=require("@interop-ui/react-polymorphic").forwardRefWithAs,i=require("@interop-ui/react-utils"),c=i.composeEventHandlers,u=i.createContext,l=i.useComposedRefs,d=i.useControlledState,s=i.useId,f=require("@interop-ui/utils").getPartDataAttrObj,p=(e=require("react"))&&e.__esModule?e.default:e;function v(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(){return(b=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)}function m(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function y(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw a}}return t}(e,r)||A(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,r){if(e){if("string"==typeof e)return h(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}}function h(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var g=y(u("AccordionContext","Accordion"),2),w=g[0],O=g[1],x=y(u("AccordionItemContext","AccordionItem"),2),I=x[0],E=x[1],j=a((function(e,r){var n,o=e.value,a=e.children,i=m(e,["value","children"]),c=O("AccordionItem"),u="accordion-button-".concat(s()),l=e.id||u,d=o&&o===c.value||!1,v=null!==(n=c.disabled)&&void 0!==n?n:e.disabled,y=p.useMemo((function(){return{open:d,buttonId:l}}),[d,l]);return p.createElement(t,b({},i,f("AccordionItem"),{ref:r,"data-state":d?"open":"closed","data-disabled":v||void 0,disabled:v,open:d,onOpenChange:function(){return c.setValue(o)}}),p.createElement(I.Provider,{value:y},a))}));exports.AccordionItem=j,j.displayName="AccordionItem";var C=a((function(e,r){var t=e.as,n=void 0===t?"h3":t,o=m(e,["as"]);return p.createElement(n,b({ref:r},o,f("AccordionHeader")))}));exports.AccordionHeader=C,C.displayName="AccordionHeader";var S=a((function(e,r){var t=Object.assign({},e),o=O("AccordionButton").buttonNodesRef,a=E("AccordionButton"),i=p.useRef(null),c=l(i,r);return p.useEffect((function(){var e=o.current,r=i.current;if(r)return e.add(r),function(){e.delete(r)}}),[o]),p.createElement(n,b({},t,f("AccordionButton"),{ref:c,"aria-disabled":a.open||void 0,id:a.buttonId}))}));exports.AccordionButton=S,S.displayName="AccordionButton";var P=a((function(e,r){var t=E("AccordionPanel");return p.createElement(o,b({},e,f("AccordionPanel"),{ref:r,role:"region","aria-labelledby":t.buttonId}))}));exports.AccordionPanel=P,P.displayName="AccordionPanel";var B=["Home","End","ArrowDown","ArrowUp"],H=a((function(e,r){var t=e.as,n=void 0===t?"div":t,o=e.value,a=e.defaultValue,i=e.children,u=e.disabled,s=e.onValueChange,A=void 0===s?function(){}:s,h=m(e,["as","value","defaultValue","children","disabled","onValueChange"]),g=p.useRef(new Set),O=p.useRef(null),x=l(O,r),I=y(d({prop:o,defaultProp:a,onChange:function(e){return e&&A(e)}}),2),E=I[0],j=I[1],C=c(e.onKeyDown,(function(e){var r,t=e.target;if(B.includes(e.key)&&t instanceof HTMLButtonElement){var n=v(g.current).filter((function(e){return!(e&&e.disabled)})),o=n.length,a=n.indexOf(t);if(-1!==a){e.preventDefault();var i=a;switch(e.key){case"Home":i=0;break;case"End":i=o-1;break;case"ArrowDown":i=a+1;break;case"ArrowUp":(i=a-1)<0&&(i=o-1)}null===(r=n[i%o])||void 0===r||r.focus()}}})),S=p.useMemo((function(){return{disabled:u,buttonNodesRef:g,value:E,setValue:j}}),[u,E,j]);return p.createElement(n,b({},h,f("Accordion"),{ref:x,onKeyDown:u?void 0:C}),p.createElement(w.Provider,{value:S},i))}));exports.Accordion=H,H.displayName="Accordion";var R=H;exports.Root=R;var N=j;exports.Item=N;var k=C;exports.Header=k;var D=S;exports.Button=D;var V=P;exports.Panel=V;
//# sourceMappingURL=index.js.map

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

import{Collapsible as e,CollapsibleButton as o,CollapsibleContent as n}from"@interop-ui/react-collapsible";import{forwardRefWithAs as t}from"@interop-ui/react-polymorphic";import{composeEventHandlers as r,createContext as c,useComposedRefs as i,useControlledState as a,useId as d}from"@interop-ui/react-utils";import{getPartDataAttrObj as l}from"@interop-ui/utils";import s from"react";function u(){return(u=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function p(e,o){if(null==e)return{};var n,t,r=function(e,o){if(null==e)return{};var n,t,r={},c=Object.keys(e);for(t=0;t<c.length;t++)n=c[t],o.indexOf(n)>=0||(r[n]=e[n]);return r}(e,o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(t=0;t<c.length;t++)n=c[t],o.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const[f,m]=c("AccordionContext","Accordion"),[A,b]=c("AccordionItemContext","AccordionItem");export const AccordionItem=t(((o,n)=>{var t;const{value:r,isOpen:c,defaultIsOpen:i,children:a,onToggle:f}=o,b=p(o,["value","isOpen","defaultIsOpen","children","onToggle"]),v=m("AccordionItem"),y="accordion-button-".concat(d()),g=o.id||y,O=r&&r===v.value||!1,h=null!==(t=v.isDisabled)&&void 0!==t?t:o.disabled,x=s.useMemo((()=>({isOpen:O,buttonId:g})),[O,g]);return s.createElement(e,u({},b,l("AccordionItem"),{ref:n,"data-state":O?"open":"closed","data-disabled":h||void 0,disabled:h,isOpen:O,onToggle:()=>v.setValue(r)}),s.createElement(A.Provider,{value:x},a))}));AccordionItem.displayName="AccordionItem";const v="h3";export const AccordionHeader=t(((e,o)=>{const{as:n=v}=e,t=p(e,["as"]);return s.createElement(n,u({ref:o},t,l("AccordionHeader")))}));AccordionHeader.displayName="AccordionHeader";export const AccordionButton=t(((e,n)=>{const t=Object.assign({},e),{buttonNodesRef:r}=m("AccordionButton"),c=b("AccordionButton"),a=s.useRef(null),d=i(a,n);return s.useEffect((()=>{const e=r.current,o=a.current;if(o)return e.add(o),()=>{e.delete(o)}}),[r]),s.createElement(o,u({},t,l("AccordionButton"),{ref:d,"aria-disabled":c.isOpen||void 0,id:c.buttonId}))}));AccordionButton.displayName="AccordionButton";export const AccordionPanel=t(((e,o)=>{const t=b("AccordionPanel");return s.createElement(n,u({},e,l("AccordionPanel"),{ref:o,role:"region","aria-labelledby":t.buttonId}))}));AccordionPanel.displayName="AccordionPanel";const y="div",g=["Home","End","ArrowDown","ArrowUp"];export const Accordion=t(((e,o)=>{const{as:n=y,value:t,defaultValue:c,children:d,disabled:m,onChange:A=(()=>{})}=e,b=p(e,["as","value","defaultValue","children","disabled","onChange"]),v=s.useRef(new Set),O=s.useRef(null),h=i(O,o),[x,I]=a({prop:t,defaultProp:c,onChange:function(e){function o(o){return e.apply(this,arguments)}return o.toString=function(){return e.toString()},o}((e=>e&&A(e)))}),w=r(e.onKeyDown,(e=>{var o;const n=e.target;if(!(g.includes(e.key)&&(t=n,t instanceof HTMLButtonElement)))return;var t;const r=[...v.current].filter((e=>!(e&&e.disabled))),c=r.length,i=r.indexOf(n);if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=c-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":a=i-1,a<0&&(a=c-1)}null===(o=r[a%c])||void 0===o||o.focus()})),P=s.useMemo((()=>({isDisabled:m,buttonNodesRef:v,value:x,setValue:I})),[m,x,I]);return s.createElement(n,u({},b,l("Accordion"),{ref:h,onKeyDown:m?void 0:w}),s.createElement(f.Provider,{value:P},d))}));Accordion.displayName="Accordion";export const Root=Accordion;export const Item=AccordionItem;export const Header=AccordionHeader;export const Button=AccordionButton;export const Panel=AccordionPanel;
import{Collapsible as e,CollapsibleButton as o,CollapsibleContent as t}from"@interop-ui/react-collapsible";import{forwardRefWithAs as n}from"@interop-ui/react-polymorphic";import{composeEventHandlers as r,createContext as c,useComposedRefs as a,useControlledState as i,useId as d}from"@interop-ui/react-utils";import{getPartDataAttrObj as l}from"@interop-ui/utils";import u from"react";function s(){return(s=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function p(e,o){if(null==e)return{};var t,n,r=function(e,o){if(null==e)return{};var t,n,r={},c=Object.keys(e);for(n=0;n<c.length;n++)t=c[n],o.indexOf(t)>=0||(r[t]=e[t]);return r}(e,o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)t=c[n],o.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}const[f,m]=c("AccordionContext","Accordion"),[A,b]=c("AccordionItemContext","AccordionItem");export const AccordionItem=n(((o,t)=>{var n;const{value:r,children:c}=o,a=p(o,["value","children"]),i=m("AccordionItem"),f="accordion-button-".concat(d()),b=o.id||f,v=r&&r===i.value||!1,y=null!==(n=i.disabled)&&void 0!==n?n:o.disabled,h=u.useMemo((()=>({open:v,buttonId:b})),[v,b]);return u.createElement(e,s({},a,l("AccordionItem"),{ref:t,"data-state":v?"open":"closed","data-disabled":y||void 0,disabled:y,open:v,onOpenChange:()=>i.setValue(r)}),u.createElement(A.Provider,{value:h},c))}));AccordionItem.displayName="AccordionItem";const v="h3";export const AccordionHeader=n(((e,o)=>{const{as:t=v}=e,n=p(e,["as"]);return u.createElement(t,s({ref:o},n,l("AccordionHeader")))}));AccordionHeader.displayName="AccordionHeader";export const AccordionButton=n(((e,t)=>{const n=Object.assign({},e),{buttonNodesRef:r}=m("AccordionButton"),c=b("AccordionButton"),i=u.useRef(null),d=a(i,t);return u.useEffect((()=>{const e=r.current,o=i.current;if(o)return e.add(o),()=>{e.delete(o)}}),[r]),u.createElement(o,s({},n,l("AccordionButton"),{ref:d,"aria-disabled":c.open||void 0,id:c.buttonId}))}));AccordionButton.displayName="AccordionButton";export const AccordionPanel=n(((e,o)=>{const n=b("AccordionPanel");return u.createElement(t,s({},e,l("AccordionPanel"),{ref:o,role:"region","aria-labelledby":n.buttonId}))}));AccordionPanel.displayName="AccordionPanel";const y="div",h=["Home","End","ArrowDown","ArrowUp"];export const Accordion=n(((e,o)=>{const{as:t=y,value:n,defaultValue:c,children:d,disabled:m,onValueChange:A=(()=>{})}=e,b=p(e,["as","value","defaultValue","children","disabled","onValueChange"]),v=u.useRef(new Set),x=u.useRef(null),g=a(x,o),[O,w]=i({prop:n,defaultProp:c,onChange:e=>e&&A(e)}),I=r(e.onKeyDown,(e=>{var o;const t=e.target;if(!(h.includes(e.key)&&(n=t,n instanceof HTMLButtonElement)))return;var n;const r=[...v.current].filter((e=>!(e&&e.disabled))),c=r.length,a=r.indexOf(t);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)}null===(o=r[i%c])||void 0===o||o.focus()})),P=u.useMemo((()=>({disabled:m,buttonNodesRef:v,value:O,setValue:w})),[m,O,w]);return u.createElement(t,s({},b,l("Accordion"),{ref:g,onKeyDown:m?void 0:I}),u.createElement(f.Provider,{value:P},d))}));Accordion.displayName="Accordion";export const Root=Accordion;export const Item=AccordionItem;export const Header=AccordionHeader;export const Button=AccordionButton;export const Panel=AccordionPanel;
//# sourceMappingURL=index.module.js.map
{
"name": "@interop-ui/react-accordion",
"version": "0.0.1-15",
"version": "0.0.1-16",
"license": "MIT",

@@ -20,6 +20,6 @@ "source": "src/index.ts",

"dependencies": {
"@interop-ui/react-collapsible": "0.0.1-14",
"@interop-ui/react-polymorphic": "0.0.1-1",
"@interop-ui/react-utils": "0.0.1-14",
"@interop-ui/utils": "0.0.1-6"
"@interop-ui/react-collapsible": "0.0.1-15",
"@interop-ui/react-polymorphic": "0.0.1-2",
"@interop-ui/react-utils": "0.0.1-15",
"@interop-ui/utils": "0.0.1-7"
},

@@ -26,0 +26,0 @@ "devDependencies": {

@@ -13,35 +13,2 @@ # `react-accordion`

```js
import * as React from 'react';
import {
Accordion,
AccordionItem,
AccordionHeader,
AccordionButton,
AccordionPanel,
} from '@interop-ui/react-accordion';
function MyComponent() {
return (
<Accordion>
{/* start items */}
<AccordionItem value="one">
<AccordionHeader>
<AccordionButton>One</AccordionButton>
</AccordionHeader>
<AccordionPanel>Content for item 1</AccordionPanel>
</AccordionItem>
<AccordionItem value="two">
<AccordionHeader>
<AccordionButton>Two</AccordionButton>
</AccordionHeader>
<AccordionPanel>Content for item 2</AccordionPanel>
</AccordionItem>
{/* end items */}
</Accordion>
);
}
```
View docs [here](https://radix-ui.com/primitives/docs/components/accordion).

Sorry, the diff of this file is not supported yet

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