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

react-accessible-accordion

Package Overview
Dependencies
Maintainers
8
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-accessible-accordion - npm Package Compare versions

Comparing version 3.3.5 to 4.0.0

11

dist/es/index.js

@@ -867,4 +867,5 @@ import { createElement, PureComponent, createContext, useState, Fragment } from 'react';

className = _ref$className === void 0 ? 'accordion__panel' : _ref$className,
region = _ref.region,
id = _ref.id,
rest = _objectWithoutProperties(_ref, ["className", "id"]);
rest = _objectWithoutProperties(_ref, ["className", "region", "id"]);

@@ -878,6 +879,12 @@ var renderChildren = function renderChildren(_ref2) {

var attrs = _objectSpread2(_objectSpread2({}, panelAttributes), {}, {
'aria-labelledby': region ? panelAttributes['aria-labelledby'] : undefined
});
return /*#__PURE__*/createElement("div", _extends({
"data-accordion-component": "AccordionItemPanel",
className: className
}, rest, panelAttributes));
}, rest, attrs, {
role: region ? 'region' : undefined
}));
};

@@ -884,0 +891,0 @@

3

dist/types/components/AccordionItemPanel.d.ts
/// <reference types="react" />
import { DivAttributes } from '../helpers/types';
declare type Props = DivAttributes & {
region?: boolean;
className?: string;
};
declare const AccordionItemPanel: ({ className, id, ...rest }: Props) => JSX.Element;
declare const AccordionItemPanel: ({ className, region, id, ...rest }: Props) => JSX.Element;
export default AccordionItemPanel;

@@ -871,4 +871,5 @@ (function (global, factory) {

className = _ref$className === void 0 ? 'accordion__panel' : _ref$className,
region = _ref.region,
id = _ref.id,
rest = _objectWithoutProperties(_ref, ["className", "id"]);
rest = _objectWithoutProperties(_ref, ["className", "region", "id"]);

@@ -882,6 +883,12 @@ var renderChildren = function renderChildren(_ref2) {

var attrs = _objectSpread2(_objectSpread2({}, panelAttributes), {}, {
'aria-labelledby': region ? panelAttributes['aria-labelledby'] : undefined
});
return /*#__PURE__*/React.createElement("div", _extends({
"data-accordion-component": "AccordionItemPanel",
className: className
}, rest, panelAttributes));
}, rest, attrs, {
role: region ? 'region' : undefined
}));
};

@@ -888,0 +895,0 @@

{
"name": "react-accessible-accordion",
"version": "3.3.5",
"version": "4.0.0",
"description": "Accessible Accordion component for React",

@@ -5,0 +5,0 @@ "main": "dist/umd/index.js",

@@ -158,2 +158,6 @@ [react-accessible-accordion](https://springload.github.io/react-accessible-accordion/)

#### region: `boolean`
Make the element have a region role.
---

@@ -160,0 +164,0 @@

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