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

@elvia/elvis-accordion

Package Overview
Dependencies
Maintainers
7
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elvia/elvis-accordion - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

13

CHANGELOG.json
{
"$schema": "../../changelogSchema.json",
"name": "elvis-accordion",
"content": [
{
"date": "05.04.24",
"version": "3.2.2",
"changelog": [
{
"type": "bug_fix",
"changes": [
"The accordion will not correctly be open on initial render when the <code>isOpen</code> prop is set to <code>true</code>."
]
}
]
},
{
"date": "05.02.24",

@@ -6,0 +19,0 @@ "version": "3.2.1",

18

dist/react/elvia-accordion.js
// components/elvis-accordion/src/react/elvia-accordion.tsx
import expandCircleColor from "@elvia/elvis-assets-icons/dist/icons/expandCircleColor";
import expandCircleFilledColor from "@elvia/elvis-assets-icons/dist/icons/expandCircleFilledColor";
import { outlineListener, useSlot } from "@elvia/elvis-toolbox";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { outlineListener, useSlot } from "@elvia/elvis-toolbox";
// components/elvis-accordion/src/react/styledComponents.tsx
import styled, { css } from "styled-components";
import { getThemeColor } from "@elvia/elvis-colors";
import { IconWrapper } from "@elvia/elvis-toolbox";
import { getTypographyCss } from "@elvia/elvis-typography";
import { IconWrapper } from "@elvia/elvis-toolbox";
import styled, { css } from "styled-components";
var AccordionArea = styled.div.withConfig({

@@ -130,4 +132,2 @@ displayName: "AccordionArea",

// components/elvis-accordion/src/react/elvia-accordion.tsx
import expandCircleColor from "@elvia/elvis-assets-icons/dist/icons/expandCircleColor";
import expandCircleFilledColor from "@elvia/elvis-assets-icons/dist/icons/expandCircleFilledColor";
var Accordion = ({

@@ -168,3 +168,3 @@ content,

const [contentHeight, setContentHeight] = useState(getClosedHeight());
const [visibility, setVisibility] = useState(type === "overflow" ? "unset" : "hidden");
const [visibility, setVisibility] = useState(isOpen ? "unset" : type === "overflow" ? "unset" : "hidden");
const accordionRef = useRef(null);

@@ -197,6 +197,6 @@ useEffect(() => {

const slotContentHeight = accordionContentRef.current?.getBoundingClientRect().height ?? 0;
useEffect(() => {
updateOpenState(isOpenState);
}, [accordionContentRef, accordionContentRef.current]);
const updateOpenState = (newIsOpenState) => {
if (newIsOpenState === isOpenState) {
return;
}
if (newIsOpenState) {

@@ -203,0 +203,0 @@ setVisibility("unset");

@@ -0,3 +1,3 @@

import { TypographyName } from '@elvia/elvis-typography';
import { AccordionLabelPosition, AccordionSize, AccordionSpacingContent, AccordionType } from './elvia-accordion.types';
import { TypographyName } from '@elvia/elvis-typography';
interface AccordionAreaProps {

@@ -4,0 +4,0 @@ normalSpacing?: AccordionSpacingContent;

{
"name": "@elvia/elvis-accordion",
"version": "3.2.1",
"version": "3.2.2",
"license": "MIT",

@@ -14,6 +14,6 @@ "homepage": "https://design.elvia.io/components/accordion",

"dependencies": {
"@elvia/elvis-assets-icons": "^3.9.0",
"@elvia/elvis-colors": "^4.1.0",
"@elvia/elvis-assets-icons": "^3.10.0",
"@elvia/elvis-colors": "^4.4.1",
"@elvia/elvis-component-wrapper": "^4.2.0",
"@elvia/elvis-toolbox": "^11.1.0",
"@elvia/elvis-toolbox": "^11.5.0",
"@elvia/elvis-typography": "^2.7.0",

@@ -20,0 +20,0 @@ "styled-components": "^5.3.3"

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