diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-colorblind-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-colorblind-linux.png
new file mode 100644
index 00000000000..8c33f704f80
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-colorblind-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-dimmed-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-dimmed-linux.png
new file mode 100644
index 00000000000..e28973b7417
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-dimmed-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-high-contrast-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-high-contrast-linux.png
new file mode 100644
index 00000000000..9b9039f5076
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-high-contrast-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-linux.png
new file mode 100644
index 00000000000..917e8babe7a
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-tritanopia-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-tritanopia-linux.png
new file mode 100644
index 00000000000..917e8babe7a
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-dark-tritanopia-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-colorblind-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-colorblind-linux.png
new file mode 100644
index 00000000000..98f27f8aa1b
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-colorblind-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-high-contrast-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-high-contrast-linux.png
new file mode 100644
index 00000000000..c5c02fb32aa
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-high-contrast-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-linux.png
new file mode 100644
index 00000000000..f82a1be25f5
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-tritanopia-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-tritanopia-linux.png
new file mode 100644
index 00000000000..cd50d271113
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Default-light-tritanopia-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-colorblind-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-colorblind-linux.png
new file mode 100644
index 00000000000..8c33f704f80
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-colorblind-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-dimmed-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-dimmed-linux.png
new file mode 100644
index 00000000000..e28973b7417
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-dimmed-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-high-contrast-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-high-contrast-linux.png
new file mode 100644
index 00000000000..9b9039f5076
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-high-contrast-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-linux.png
new file mode 100644
index 00000000000..917e8babe7a
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-tritanopia-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-tritanopia-linux.png
new file mode 100644
index 00000000000..917e8babe7a
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-dark-tritanopia-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-colorblind-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-colorblind-linux.png
new file mode 100644
index 00000000000..98f27f8aa1b
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-colorblind-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-high-contrast-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-high-contrast-linux.png
new file mode 100644
index 00000000000..c5c02fb32aa
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-high-contrast-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-linux.png
new file mode 100644
index 00000000000..f82a1be25f5
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-linux.png differ
diff --git a/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-tritanopia-linux.png b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-tritanopia-linux.png
new file mode 100644
index 00000000000..cd50d271113
Binary files /dev/null and b/.playwright/snapshots/components/LabelGroup.test.ts-snapshots/LabelGroup-Playground-light-tritanopia-linux.png differ
diff --git a/docs/content/LabelGroup.mdx b/docs/content/LabelGroup.mdx
index 4d68eb12189..8df3fd268f3 100644
--- a/docs/content/LabelGroup.mdx
+++ b/docs/content/LabelGroup.mdx
@@ -6,7 +6,7 @@ status: Alpha
componentId: label_group
---
-import data from '../../src/LabelGroup.docs.json'
+import data from '../../src/LabelGroup/LabelGroup.docs.json'
## Example
diff --git a/e2e/components/LabelGroup.test.ts b/e2e/components/LabelGroup.test.ts
new file mode 100644
index 00000000000..b4e48650df7
--- /dev/null
+++ b/e2e/components/LabelGroup.test.ts
@@ -0,0 +1,61 @@
+import {test, expect} from '@playwright/test'
+import {visit} from '../test-helpers/storybook'
+import {themes} from '../test-helpers/themes'
+
+test.describe('LabelGroup', () => {
+ test.describe('Default', () => {
+ for (const theme of themes) {
+ test.describe(theme, () => {
+ test('default @vrt', async ({page}) => {
+ await visit(page, {
+ id: 'components-labelgroup--default',
+ globals: {
+ colorScheme: theme,
+ },
+ })
+
+ // Default state
+ expect(await page.screenshot()).toMatchSnapshot(`LabelGroup.Default.${theme}.png`)
+ })
+
+ test('axe @aat', async ({page}) => {
+ await visit(page, {
+ id: 'components-labelgroup--default',
+ globals: {
+ colorScheme: theme,
+ },
+ })
+ await expect(page).toHaveNoViolations()
+ })
+ })
+ }
+ })
+
+ test.describe('Playground', () => {
+ for (const theme of themes) {
+ test.describe(theme, () => {
+ test('default @vrt', async ({page}) => {
+ await visit(page, {
+ id: 'components-labelgroup--playground',
+ globals: {
+ colorScheme: theme,
+ },
+ })
+
+ // Default state
+ expect(await page.screenshot()).toMatchSnapshot(`LabelGroup.Playground.${theme}.png`)
+ })
+
+ test('axe @aat', async ({page}) => {
+ await visit(page, {
+ id: 'components-labelgroup--playground',
+ globals: {
+ colorScheme: theme,
+ },
+ })
+ await expect(page).toHaveNoViolations()
+ })
+ })
+ }
+ })
+})
diff --git a/generated/components.json b/generated/components.json
index 5ca51d847a6..68faf8c7a3e 100644
--- a/generated/components.json
+++ b/generated/components.json
@@ -97,20 +97,6 @@
}
]
},
- "label_group": {
- "id": "label_group",
- "name": "LabelGroup",
- "status": "alpha",
- "a11yReviewed": false,
- "stories": [],
- "props": [
- {
- "name": "sx",
- "type": "SystemStyleObject"
- }
- ],
- "subcomponents": []
- },
"overlay": {
"id": "overlay",
"name": "Overlay",
@@ -2352,6 +2338,25 @@
],
"subcomponents": []
},
+ "label_group": {
+ "id": "label_group",
+ "name": "LabelGroup",
+ "status": "alpha",
+ "a11yReviewed": false,
+ "stories": [
+ {
+ "id": "components-labelgroup--default",
+ "code": "() => (\n \n \n \n \n \n)"
+ }
+ ],
+ "props": [
+ {
+ "name": "sx",
+ "type": "SystemStyleObject"
+ }
+ ],
+ "subcomponents": []
+ },
"link": {
"id": "link",
"name": "Link",
diff --git a/script/generate-e2e-tests.js b/script/generate-e2e-tests.js
index 84534470bca..9a01ef258ec 100644
--- a/script/generate-e2e-tests.js
+++ b/script/generate-e2e-tests.js
@@ -596,6 +596,21 @@ const components = new Map([
],
},
],
+ [
+ 'LabelGroup',
+ {
+ stories: [
+ {
+ id: 'components-labelgroup--default',
+ name: 'Default',
+ },
+ {
+ id: 'components-labelgroup--playground',
+ name: 'Playground',
+ },
+ ],
+ },
+ ],
[
'Link',
{
diff --git a/src/LabelGroup.docs.json b/src/LabelGroup/LabelGroup.docs.json
similarity index 100%
rename from src/LabelGroup.docs.json
rename to src/LabelGroup/LabelGroup.docs.json
diff --git a/src/LabelGroup/LabelGroup.stories.tsx b/src/LabelGroup/LabelGroup.stories.tsx
new file mode 100644
index 00000000000..ed640508827
--- /dev/null
+++ b/src/LabelGroup/LabelGroup.stories.tsx
@@ -0,0 +1,34 @@
+import React from 'react'
+import {Meta, ComponentStory} from '@storybook/react'
+import LabelGroup from './LabelGroup'
+import Label from '../Label'
+
+export default {
+ title: 'Components/LabelGroup',
+ component: LabelGroup,
+} as Meta
+
+export const Default = () => (
+
+
+
+
+
+)
+
+export const Playground: ComponentStory = args => (
+
+
+
+
+
+)
+
+Playground.argTypes = {
+ sx: {
+ controls: false,
+ table: {
+ disable: true,
+ },
+ },
+}
diff --git a/src/LabelGroup.tsx b/src/LabelGroup/LabelGroup.tsx
similarity index 71%
rename from src/LabelGroup.tsx
rename to src/LabelGroup/LabelGroup.tsx
index 94e43d9b381..6d9618d2980 100644
--- a/src/LabelGroup.tsx
+++ b/src/LabelGroup/LabelGroup.tsx
@@ -1,7 +1,7 @@
import styled from 'styled-components'
-import {get} from './constants'
-import sx, {SxProp} from './sx'
-import {ComponentProps} from './utils/types'
+import {get} from '../constants'
+import sx, {SxProp} from '../sx'
+import {ComponentProps} from '../utils/types'
const LabelGroup = styled.span`
& * {
diff --git a/src/LabelGroup/index.ts b/src/LabelGroup/index.ts
new file mode 100644
index 00000000000..ce8583dc6be
--- /dev/null
+++ b/src/LabelGroup/index.ts
@@ -0,0 +1 @@
+export {default, LabelGroupProps} from './LabelGroup'