@elvia/elvis-accordion
Advanced tools
Comparing version 3.2.1 to 3.2.2
{ | ||
"$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", |
// 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" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38546
1232
+ Addedelectron-to-chromium@1.5.64(transitive)
- Removedelectron-to-chromium@1.5.66(transitive)
Updated@elvia/elvis-colors@^4.4.1
Updated@elvia/elvis-toolbox@^11.5.0