diff --git a/packages/css/src/components/form-label/form-label.scss b/packages/css/src/components/form-label/form-label.scss
deleted file mode 100644
index b6a6bab147..0000000000
--- a/packages/css/src/components/form-label/form-label.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * @license EUPL-1.2+
- * Copyright Gemeente Amsterdam
- */
-
-@import "../../common/hyphenation";
-@import "../../common/text-rendering";
-
-.ams-form-label {
- color: var(--ams-form-label-color);
- font-family: var(--ams-form-label-font-family);
- font-size: var(--ams-form-label-font-size);
- font-weight: var(--ams-form-label-font-weight);
- line-height: var(--ams-form-label-line-height);
-
- @include hyphenation;
- @include text-rendering;
-}
diff --git a/packages/css/src/components/index.scss b/packages/css/src/components/index.scss
index 0fdcbee9dc..0ca1ff3e8e 100644
--- a/packages/css/src/components/index.scss
+++ b/packages/css/src/components/index.scss
@@ -41,7 +41,7 @@
@import "./button/button";
@import "./card/card";
@import "./checkbox/checkbox";
-@import "./form-label/form-label";
+@import "./label/label";
@import "./grid/grid";
@import "./heading/heading";
@import "./spotlight/spotlight";
diff --git a/packages/css/src/components/form-label/README.md b/packages/css/src/components/label/README.md
similarity index 92%
rename from packages/css/src/components/form-label/README.md
rename to packages/css/src/components/label/README.md
index 623bea5655..7851a28de1 100644
--- a/packages/css/src/components/form-label/README.md
+++ b/packages/css/src/components/label/README.md
@@ -1,6 +1,6 @@
-# Form Label
+# Label
Describes a form control.
diff --git a/packages/css/src/components/label/label.scss b/packages/css/src/components/label/label.scss
new file mode 100644
index 0000000000..53ab1f55a4
--- /dev/null
+++ b/packages/css/src/components/label/label.scss
@@ -0,0 +1,18 @@
+/**
+ * @license EUPL-1.2+
+ * Copyright Gemeente Amsterdam
+ */
+
+@import "../../common/hyphenation";
+@import "../../common/text-rendering";
+
+.ams-label {
+ color: var(--ams-label-color);
+ font-family: var(--ams-label-font-family);
+ font-size: var(--ams-label-font-size);
+ font-weight: var(--ams-label-font-weight);
+ line-height: var(--ams-label-line-height);
+
+ @include hyphenation;
+ @include text-rendering;
+}
diff --git a/packages/css/src/components/search-field/search-field.scss b/packages/css/src/components/search-field/search-field.scss
index 9b5d11d4a4..56cdf5069e 100644
--- a/packages/css/src/components/search-field/search-field.scss
+++ b/packages/css/src/components/search-field/search-field.scss
@@ -11,7 +11,11 @@
}
@mixin reset-input {
+ // Reset native appearance, this causes issues on iOS and Android devices
+ -webkit-appearance: none;
+ appearance: none;
border: 0;
+ border-radius: 0; // Reset rounded borders on iOS devices
box-sizing: border-box;
margin-block: 0;
}
@@ -57,6 +61,10 @@
@mixin reset-button {
border: 0;
+
+ // Reset margins added by Safari on iOS
+ margin-block: 0;
+ margin-inline: 0;
}
.ams-search-field__button {
diff --git a/packages/react/src/FormLabel/README.md b/packages/react/src/FormLabel/README.md
deleted file mode 100644
index 135d0779b4..0000000000
--- a/packages/react/src/FormLabel/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-# React Form Label Component
-
-[Form label documentation](../../../css/src/components/form-label/README.md)
diff --git a/packages/react/src/FormLabel/index.ts b/packages/react/src/FormLabel/index.ts
deleted file mode 100644
index 5d86e6f51a..0000000000
--- a/packages/react/src/FormLabel/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { FormLabel } from './FormLabel'
diff --git a/packages/react/src/FormLabel/FormLabel.test.tsx b/packages/react/src/Label/Label.test.tsx
similarity index 69%
rename from packages/react/src/FormLabel/FormLabel.test.tsx
rename to packages/react/src/Label/Label.test.tsx
index 3b6fa3a86e..eea47d3611 100644
--- a/packages/react/src/FormLabel/FormLabel.test.tsx
+++ b/packages/react/src/Label/Label.test.tsx
@@ -1,11 +1,11 @@
import { render, screen } from '@testing-library/react'
import { createRef } from 'react'
-import { FormLabel } from './FormLabel'
+import { Label } from './Label'
import '@testing-library/jest-dom'
-describe('Form label', () => {
+describe('Label', () => {
it('renders an HTML label element', () => {
- const { container } = render()
+ const { container } = render()
const label = container.querySelector('label:only-child')
@@ -14,7 +14,7 @@ describe('Form label', () => {
})
it('renders an HTML label element with for attribute', () => {
- const { container } = render()
+ const { container } = render()
const label = container.querySelector('label[for="form-control"]:only-child')
@@ -22,18 +22,18 @@ describe('Form label', () => {
})
it('renders a design system BEM class name', () => {
- const { container } = render()
+ const { container } = render()
const label = container.querySelector(':only-child')
- expect(label).toHaveClass('ams-form-label')
+ expect(label).toHaveClass('ams-label')
})
it('renders rich text content', () => {
const { container } = render(
-
+ ,
+ ,
)
const label = container.querySelector(':only-child')
@@ -46,7 +46,7 @@ describe('Form label', () => {
it('can be associated with an HTML form input', () => {
render(
<>
- Email
+
>,
)
@@ -60,7 +60,7 @@ describe('Form label', () => {
})
it('can be hidden', () => {
- const { container } = render()
+ const { container } = render()
const label = container.querySelector(':only-child')
@@ -68,19 +68,19 @@ describe('Form label', () => {
})
it('renders an additional class name', () => {
- const { container } = render()
+ const { container } = render()
const label = container.querySelector(':only-child')
expect(label).toHaveClass('large')
- expect(label).toHaveClass('ams-form-label')
+ expect(label).toHaveClass('ams-label')
})
it('supports ForwardRef in React', () => {
const ref = createRef()
- const { container } = render()
+ const { container } = render()
const div = container.querySelector(':only-child')
diff --git a/packages/react/src/FormLabel/FormLabel.tsx b/packages/react/src/Label/Label.tsx
similarity index 73%
rename from packages/react/src/FormLabel/FormLabel.tsx
rename to packages/react/src/Label/Label.tsx
index 601b74ec6a..6b963e86df 100644
--- a/packages/react/src/FormLabel/FormLabel.tsx
+++ b/packages/react/src/Label/Label.tsx
@@ -8,15 +8,15 @@ import clsx from 'clsx'
import { forwardRef } from 'react'
import type { ForwardedRef, LabelHTMLAttributes, PropsWithChildren } from 'react'
-export const FormLabel = forwardRef(
+export const Label = forwardRef(
(
{ children, className, ...restProps }: PropsWithChildren>,
ref: ForwardedRef,
) => (
-