diff --git a/design-library/src/components/BccAccordion/BccAccordion.css b/design-library/src/components/BccAccordion/BccAccordion.css index e376343b..999be9dc 100644 --- a/design-library/src/components/BccAccordion/BccAccordion.css +++ b/design-library/src/components/BccAccordion/BccAccordion.css @@ -1,105 +1,100 @@ @layer components { - .bcc-accordion { - @apply rounded-lg bg-secondary shadow-sm; - } - - .bcc-accordion-header { - @apply flex w-full px-3 bg-white flex-row rounded-lg items-center justify-between cursor-pointer; - } - - .bcc-accordion-title-wrap { - @apply flex flex-row items-center - } - - .bcc-accordion:has(.bcc-accordion-interactive) { - @apply border border-on-primary bg-white; - } - - .bcc-accordion:has(.bcc-accordion-desktop) { - @apply bg-white shadow-none; - } - - .bcc-accordion:has(.bcc-accordion-lg) { - & .bcc-accordion-content { - @apply px-4; - } - } - - .bcc-accordion:has(.bcc-accordion-readonly) { - & .bcc-accordion-content { - @apply pt-0 text-secondary text-body-sm; - } - } - - .bcc-accordion:has(.bcc-accordion-brand) { - & .bcc-accordion-content { - @apply pt-3 px-4 text-secondary text-body-sm; - } - } - - .bcc-accordion-header.bcc-accordion-readonly.bcc-accordion-active { - @apply bg-secondary pb-1; - } - - .bcc-accordion-header.bcc-accordion-interactive.bcc-accordion-active { - @apply rounded-b-none border-b border-on-primary; - } - - .bcc-accordion-desktop.bcc-accordion-active { - @apply bg-secondary; - } - - .bcc-accordion-base { - @apply py-2 px-3; - } - .bcc-accordion-lg { - @apply px-4 py-4 text-lg; - } - .bcc-accordion-title { - @apply font-semibold text-primary flex flex-col items-start; - } - .bcc-accordion-subtitle { - @apply text-caption text-secondary; - } - .bcc-accordion-right { - @apply flex flex-row items-center justify-end h-6; - } - .bcc-accordion-icon { - @apply h-full text-interactive rotate-0 transform duration-300; - - > svg{ - @apply w-6 h-6; - } - } - .bcc-accordion-active .bcc-accordion-icon { - @apply rotate-180 transform; - } - - .bcc-accordion-brand.bcc-accordion-active { - @apply bg-brand-600; - & .bcc-accordion-title { - @apply text-emphasis; - } - & .bcc-accordion-subtitle { - @apply text-neutral-200; - } - & .bcc-accordion-icon { - @apply text-neutral-200; - } - } - .bcc-accordion-right-icon { - @apply ml-4; - } - - .bcc-accordion.bcc-accordion-interactive { - @apply border border-on-primary bg-white; - } - - .bcc-accordion.bcc-desktop { - @apply bg-white; - } - - .bcc-accordion-content { - @apply w-full px-3 py-4; - } + .bcc-accordion { + @apply rounded-lg bg-secondary shadow-sm; + } + + .bcc-accordion-header { + @apply flex w-full cursor-pointer flex-row items-center justify-between rounded-lg bg-white px-3; + } + + .bcc-accordion-title-wrap { + @apply flex flex-row items-center; + } + + .bcc-accordion:has(.bcc-accordion-lg) { + & .bcc-accordion-content { + @apply px-4; + } + } + + .bcc-accordion-base { + @apply px-3 py-2; + } + .bcc-accordion-lg { + @apply px-4 py-4 text-lg; + } + .bcc-accordion-title { + @apply flex flex-col items-start font-semibold text-primary; + } + .bcc-accordion-subtitle { + @apply text-caption text-secondary; + } + .bcc-accordion-info { + @apply text-caption text-tertiary; + } + .bcc-accordion-right { + @apply flex h-6 flex-row items-center justify-end; + } + .bcc-accordion-icon { + @apply h-full rotate-0 transform text-interactive duration-300; + + > svg { + @apply h-6 w-6; + } + } + .bcc-accordion-active .bcc-accordion-icon { + @apply rotate-180 transform; + } + + .bcc-accordion-right-icon { + @apply ml-4; + } + + .bcc-accordion-content { + @apply text-body-sm w-full px-3 py-4; + } + + /* Filled Variant */ + .bcc-accordion:has(.bcc-accordion-filled) { + @apply bg-secondary; + & .bcc-accordion-content { + @apply rounded-b-lg border border-on-primary; + } + } + .bcc-accordion-filled.bcc-accordion-header { + @apply border border-on-primary bg-secondary; + } + .bcc-accordion-filled.bcc-accordion-active.bcc-accordion-header { + @apply rounded-b-none; + } + + /* Outlined Variant */ + .bcc-accordion:has(.bcc-accordion-outlined) { + @apply border border-on-primary bg-white; + } + .bcc-accordion-header.bcc-accordion-outlined.bcc-accordion-active { + @apply rounded-b-none border-b border-on-primary; + } + .bcc-accordion.bcc-accordion-outlined { + @apply border border-on-primary bg-white; + } + + /* Ghost Variant */ + .bcc-accordion:has(.bcc-accordion-ghost) { + @apply shadow-none; + background-color: unset; + } + .bcc-accordion-ghost.bcc-accordion-header { + @apply hover:bg-secondary; + } + + /* Soft Variant */ + .bcc-accordion:has(.bcc-accordion-soft) { + & .bcc-accordion-content { + @apply text-body-sm pt-0 text-secondary; + } + } + .bcc-accordion-header.bcc-accordion-soft.bcc-accordion-header { + @apply bg-secondary; + } } diff --git a/design-library/src/components/BccAccordion/BccAccordion.spec.ts b/design-library/src/components/BccAccordion/BccAccordion.spec.ts index 69a23ce7..324a9b7c 100644 --- a/design-library/src/components/BccAccordion/BccAccordion.spec.ts +++ b/design-library/src/components/BccAccordion/BccAccordion.spec.ts @@ -17,17 +17,21 @@ describe("BccAccordion", () => { props: { title: "Props Title", subtitle: "Props Subtitle", - variant: "readonly", + info: "Props Info", + variant: "filled", size: "base", }, slots: { - left: '