From f299bb9957e8160e838f263d2aab5a4488637d13 Mon Sep 17 00:00:00 2001 From: Vanessa Tran Date: Tue, 29 Oct 2024 09:18:49 -0600 Subject: [PATCH] fix(#2162): accordion padding for right and left icon position --- .../src/components/accordion/Accordion.svelte | 7 ++++++- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/web-components/src/components/accordion/Accordion.svelte b/libs/web-components/src/components/accordion/Accordion.svelte index df8acf29c..e59aefe84 100644 --- a/libs/web-components/src/components/accordion/Accordion.svelte +++ b/libs/web-components/src/components/accordion/Accordion.svelte @@ -85,6 +85,7 @@ on:blur={() => (_hovering = false)} aria-controls={`${_accordionId}-content`} aria-expanded={open === "true"} + class:iconRight={iconposition === "right"} > {#if iconposition === "left"} @@ -156,7 +157,7 @@ summary { min-height: 3.5rem; - padding: var(--goa-accordion-padding-heading); + padding: var(--goa-accordion-padding-heading-icon-left); border: var(--goa-accordion-border); border-radius: var(--goa-accordion-border-radius); background-color: var(--goa-accordion-color-bg-heading); @@ -170,6 +171,10 @@ position: relative; } + summary.iconRight { + padding: var(--goa-accordion-padding-heading-icon-right); + } + summary:hover { background-color: var(--goa-accordion-color-bg-heading-hover); color: var(--goa-accordion-color-heading-hover); diff --git a/package-lock.json b/package-lock.json index ab4d7dd10..f35ba8ab3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "zone.js": "0.14.3" }, "devDependencies": { - "@abgov/design-tokens": "^1.4.1", + "@abgov/design-tokens": "^1.4.2", "@abgov/nx-release": "8.0.0", "@angular-devkit/build-angular": "18.2.8", "@angular-devkit/core": "18.1.4", @@ -98,9 +98,9 @@ } }, "node_modules/@abgov/design-tokens": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@abgov/design-tokens/-/design-tokens-1.4.1.tgz", - "integrity": "sha512-GDXvX2+yiYBHJsJOw/eKwehvVXCSYIdWI0RjDlLBaizpEoiMUWRcN1OeS2PVK7fm/WtceB46WKn5qxyQgRT+Qg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@abgov/design-tokens/-/design-tokens-1.4.2.tgz", + "integrity": "sha512-7ieW6s7XxwDGbaAlU8XAer3CuoJP8mVh0PIq7TjHrFYAbNBM11JZrF6SMJ7dRwbLH3F8LNeKyZIIKDB041Pf2g==", "dev": true, "dependencies": { "style-dictionary": "^3.7.1" diff --git a/package.json b/package.json index 9986bbf59..f7ebaae02 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "private": true, "devDependencies": { - "@abgov/design-tokens": "^1.4.1", + "@abgov/design-tokens": "^1.4.2", "@abgov/nx-release": "8.0.0", "@angular-devkit/build-angular": "18.2.8", "@angular-devkit/core": "18.1.4",