` (no longer a heading)
+- `IntroBox` title: `` (no longer a heading)
+- `PopupMenuSectionHeading` label: plain text inside `` (no longer a heading)
diff --git a/packages/ui-components/src/components/ContentHeading/ContentHeading.component.tsx b/packages/ui-components/src/components/ContentHeading/ContentHeading.component.tsx
index 87aaf3a080..cf22f9c7d1 100644
--- a/packages/ui-components/src/components/ContentHeading/ContentHeading.component.tsx
+++ b/packages/ui-components/src/components/ContentHeading/ContentHeading.component.tsx
@@ -6,8 +6,6 @@
import React, { HTMLAttributes, ReactNode } from "react"
const baseHeadingStyles = `
- jn:font-bold
- jn:text-lg
jn:text-theme-high
jn:pb-2
`
diff --git a/packages/ui-components/src/components/Form/Form.component.tsx b/packages/ui-components/src/components/Form/Form.component.tsx
index e6b610b800..b252ede711 100644
--- a/packages/ui-components/src/components/Form/Form.component.tsx
+++ b/packages/ui-components/src/components/Form/Form.component.tsx
@@ -10,8 +10,6 @@ const formBaseStyles = `
`
const formTitleStyles = `
- jn:text-2xl
- jn:font-bold
jn:mb-4
`
@@ -45,7 +43,7 @@ export interface FormProps extends FormHTMLAttributes {
export const Form = ({ title = "", className = "", children, ...props }: FormProps): ReactNode => {
return (
)
diff --git a/packages/ui-components/src/components/Form/Form.test.tsx b/packages/ui-components/src/components/Form/Form.test.tsx
index e0a0af3198..e9df8fdc41 100644
--- a/packages/ui-components/src/components/Form/Form.test.tsx
+++ b/packages/ui-components/src/components/Form/Form.test.tsx
@@ -19,8 +19,8 @@ describe("Form Component Tests", () => {
test("renders a title", () => {
render()
expect(screen.getByTestId("my-form")).toBeInTheDocument()
- expect(screen.getByRole("heading")).toHaveClass("juno-form-heading")
- expect(screen.getByRole("heading")).toHaveTextContent("My Form")
+ expect(screen.getByRole("heading", { level: 3 })).toHaveClass("juno-form-heading")
+ expect(screen.getByRole("heading", { level: 3 })).toHaveTextContent("My Form")
})
test("renders without any props", () => {
diff --git a/packages/ui-components/src/components/FormSection/FormSection.component.tsx b/packages/ui-components/src/components/FormSection/FormSection.component.tsx
index 38f160985e..df39d46e60 100644
--- a/packages/ui-components/src/components/FormSection/FormSection.component.tsx
+++ b/packages/ui-components/src/components/FormSection/FormSection.component.tsx
@@ -11,8 +11,6 @@ const formSectionBaseStyles = `
`
const headingStyles = `
- jn:text-lg
- jn:font-bold
jn:mb-4
`
@@ -45,7 +43,7 @@ export interface FormSectionProps extends HTMLAttributes {
export const FormSection = ({ title = "", children, className = "", ...props }: FormSectionProps): ReactNode => {
return (
- {title ? {title}
: null}
+ {title ? {title}
: null}
{children}
)
diff --git a/packages/ui-components/src/components/FormSection/FormSection.test.tsx b/packages/ui-components/src/components/FormSection/FormSection.test.tsx
index f98e8e8e6c..da04437b3d 100644
--- a/packages/ui-components/src/components/FormSection/FormSection.test.tsx
+++ b/packages/ui-components/src/components/FormSection/FormSection.test.tsx
@@ -7,8 +7,18 @@ import React from "react"
import { render, screen } from "@testing-library/react"
import { describe, expect, test } from "vitest"
+import { FormSection } from "./FormSection.component"
import { FormRow } from "../FormRow/FormRow.component"
+describe("FormSection Component Tests", () => {
+ test("renders a title as h4", () => {
+ render()
+ expect(screen.getByRole("heading", { level: 4 })).toBeInTheDocument()
+ expect(screen.getByRole("heading", { level: 4 })).toHaveClass("juno-formsection-heading")
+ expect(screen.getByRole("heading", { level: 4 })).toHaveTextContent("My Section")
+ })
+})
+
describe("FormRow Component Tests", () => {
describe("Basic Rendering", () => {
test("renders a FormRow", () => {
diff --git a/packages/ui-components/src/components/FormattedText/FormattedText.stories.tsx b/packages/ui-components/src/components/FormattedText/FormattedText.stories.tsx
index f7c824af66..286a61ba28 100644
--- a/packages/ui-components/src/components/FormattedText/FormattedText.stories.tsx
+++ b/packages/ui-components/src/components/FormattedText/FormattedText.stories.tsx
@@ -41,6 +41,7 @@ const Template = (args: FormattedTextProps) => (
Headline 3
Headline 4
Headline 5
+ Headline 6
h2: Lorem ipsum dolor sit amet
h3: Sunt in culpa qui officia
@@ -177,6 +178,7 @@ const Template = (args: FormattedTextProps) => (
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ h6: Duis aute irure dolor in reprehenderit
)
diff --git a/packages/ui-components/src/components/FormattedText/FormattedText.test.tsx b/packages/ui-components/src/components/FormattedText/FormattedText.test.tsx
index 4df41c9d4a..0734976cbe 100644
--- a/packages/ui-components/src/components/FormattedText/FormattedText.test.tsx
+++ b/packages/ui-components/src/components/FormattedText/FormattedText.test.tsx
@@ -22,4 +22,14 @@ describe("FormattedText", () => {
expect(element).not.toBeNull() // Check if element exists
expect(element.getAttribute("data-lolol")).toBe("123-456") // Check attribute value
})
+
+ it("renders h6 headings inside FormattedText", () => {
+ render(
+
+ Headline 6
+
+ )
+ expect(screen.getByRole("heading", { level: 6 })).toBeInTheDocument()
+ expect(screen.getByRole("heading", { level: 6 })).toHaveTextContent("Headline 6")
+ })
})
diff --git a/packages/ui-components/src/components/FormattedText/formatted-text.css b/packages/ui-components/src/components/FormattedText/formatted-text.css
index 68d5bddfec..0ef051be29 100644
--- a/packages/ui-components/src/components/FormattedText/formatted-text.css
+++ b/packages/ui-components/src/components/FormattedText/formatted-text.css
@@ -36,42 +36,40 @@
h1 {
font-size: 1.69rem;
- font-weight: 700;
- line-height: 1.11; /* round(40 / 36) */
+ line-height: 1.375;
margin-top: 0;
margin-bottom: 2rem; /* rem(32) */
}
h2 {
font-size: 1.56rem;
- font-weight: 700;
- line-height: 160%;
+ line-height: 1.375;
margin-top: 3rem; /* rem(48) */
margin-bottom: 1.5rem; /* rem(24) */
}
h3 {
font-size: 1.44rem;
- font-weight: 700;
- line-height: 160%;
+ line-height: 1.375;
margin-top: 1rem;
margin-bottom: 0.75rem; /* rem(12) */
}
h4 {
font-size: 1.28rem;
- font-style: normal;
- font-weight: 700;
- line-height: 160%;
+ line-height: 1.625;
margin-top: 1.5rem; /* rem(24) */
margin-bottom: 0.5rem; /* rem(8) */
}
h5 {
- font-size: 1.03rem;
- font-style: normal;
- font-weight: 700;
- line-height: 160%;
+ font-size: 1.125rem;
+ line-height: 1.625;
+ }
+
+ h6 {
+ font-size: 1rem;
+ line-height: 1.5;
}
img,
diff --git a/packages/ui-components/src/components/IntroBox/IntroBox.component.tsx b/packages/ui-components/src/components/IntroBox/IntroBox.component.tsx
index 0a719dddab..776519aa57 100644
--- a/packages/ui-components/src/components/IntroBox/IntroBox.component.tsx
+++ b/packages/ui-components/src/components/IntroBox/IntroBox.component.tsx
@@ -119,7 +119,7 @@ export const IntroBox = ({
>
- {title ?
{title}
: ""}
+ {title ?
{title}
: ""}
{children ? children :
{text}
}