- Lorem ipsum dolor sit, amet consectetur adipisicing elit. Debitis
- temporibus blanditiis expedita inventore atque. Numquam velit aut
- eveniet cumque non?
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Debitis
temporibus blanditiis expedita inventore atque. Numquam velit aut
eveniet cumque non?
- `}
- ${args.action
- ? html`
-
-
-
-
- `
- : null}
-
- `,
- )}
-
- `,
- )}
-
- `,
+
+ `
+ : html`
+
Banner
+
+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. Debitis
+ temporibus blanditiis expedita inventore atque. Numquam velit aut eveniet
+ cumque non?
+
- Lorem ipsum dolor sit, amet consectetur adipisicing elit. Debitis temporibus
- blanditiis expedita inventore atque. Numquam velit aut eveniet cumque non?
-
+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. Debitis temporibus
+ blanditiis expedita inventore atque. Numquam velit aut eveniet cumque non?
+
- ${bombArgs({
- text: [
- 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero mollitia magnam quo quam saepe. Aliquam tempore non deleniti culpa reprehenderit.',
- 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem maxime eius aut quae ducimus dignissimos pariatur suscipit distinctio, accusamus laudantium, sint quibusdam nisi optio? Ut quae obcaecati, harum ullam quos beatae, ipsam enim, placeat eligendi dolores excepturi. Quia quod eligendi ab voluptas modi id distinctio iure vel possimus deserunt, amet, dolores laboriosam quas qui aut laborum? Et numquam esse laboriosam totam quod sapiente recusandae consectetur optio, quaerat quia. Sequi excepturi quia voluptate nesciunt cum veritatis? Quas molestias nostrum temporibus saepe porro facilis tempora natus non modi fugiat, vitae facere quos placeat maiores incidunt illo itaque sequi dolore! Temporibus recusandae, veritatis eos vitae optio porro magni rem culpa enim provident sed. Libero blanditiis delectus voluptatibus, temporibus alias laudantium ad tempora iure, sunt minima maiores qui ut? Aliquam quis obcaecati id, officiis accusamus voluptas rerum magnam, est a culpa voluptatum tenetur ab, asperiores vel dolor ipsum alias tempore sint aliquid? Eum architecto laboriosam dolor inventore deleniti? Repellat perferendis ratione dolorem, amet deleniti minima repudiandae eos iure maiores, dicta sequi architecto ipsa sit ab laudantium praesentium maxime asperiores molestiae ad nulla ullam est saepe vero. Qui ratione vero dicta nisi molestiae rem consectetur, natus ipsam facilis repellendus animi ullam debitis temporibus sapiente quam.',
- ],
- language: context.argTypes.language.options,
- caption: [false, true],
- captionAuthor: ['Author'],
- captionSource: ['Source'],
- })
- .map((args: Args) => ({
- ...args,
- text: `${args.language.toUpperCase()}: ${args.text}`,
- }))
- .map((args: Args) => meta.render?.({ ...context.args, ...args }, context))}
-
- `,
- )}
-
- `;
+ return schemes(
+ () => html`
+
+ ${bombArgs({
+ text: [
+ 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero mollitia magnam quo quam saepe. Aliquam tempore non deleniti culpa reprehenderit.',
+ 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem maxime eius aut quae ducimus dignissimos pariatur suscipit distinctio, accusamus laudantium, sint quibusdam nisi optio? Ut quae obcaecati, harum ullam quos beatae, ipsam enim, placeat eligendi dolores excepturi. Quia quod eligendi ab voluptas modi id distinctio iure vel possimus deserunt, amet, dolores laboriosam quas qui aut laborum? Et numquam esse laboriosam totam quod sapiente recusandae consectetur optio, quaerat quia. Sequi excepturi quia voluptate nesciunt cum veritatis? Quas molestias nostrum temporibus saepe porro facilis tempora natus non modi fugiat, vitae facere quos placeat maiores incidunt illo itaque sequi dolore! Temporibus recusandae, veritatis eos vitae optio porro magni rem culpa enim provident sed. Libero blanditiis delectus voluptatibus, temporibus alias laudantium ad tempora iure, sunt minima maiores qui ut? Aliquam quis obcaecati id, officiis accusamus voluptas rerum magnam, est a culpa voluptatum tenetur ab, asperiores vel dolor ipsum alias tempore sint aliquid? Eum architecto laboriosam dolor inventore deleniti? Repellat perferendis ratione dolorem, amet deleniti minima repudiandae eos iure maiores, dicta sequi architecto ipsa sit ab laudantium praesentium maxime asperiores molestiae ad nulla ullam est saepe vero. Qui ratione vero dicta nisi molestiae rem consectetur, natus ipsam facilis repellendus animi ullam debitis temporibus sapiente quam.',
+ ],
+ language: context.argTypes.language.options,
+ caption: [false, true],
+ captionAuthor: ['Author'],
+ captionSource: ['Source'],
+ })
+ .map((args: Args) => ({
+ ...args,
+ text: `${args.language.toUpperCase()}: ${args.text}`,
+ }))
+ .map((args: Args) => meta.render?.({ ...context.args, ...args }, context))}
+
+ `,
+ );
},
};
diff --git a/packages/documentation/src/stories/components/button-close/button-close.snapshot.stories.ts b/packages/documentation/src/stories/components/button-close/button-close.snapshot.stories.ts
index 87e7a5bea9..fa407a03a7 100644
--- a/packages/documentation/src/stories/components/button-close/button-close.snapshot.stories.ts
+++ b/packages/documentation/src/stories/components/button-close/button-close.snapshot.stories.ts
@@ -1,6 +1,7 @@
import type { Args, StoryContext, StoryObj } from '@storybook/web-components';
import meta, { Default } from './button-close.stories';
import { html } from 'lit';
+import { schemes } from '@/shared/snapshots/schemes';
const { id, ...metaWithoutId } = meta;
@@ -13,14 +14,6 @@ type Story = StoryObj;
export const PostClosebutton: Story = {
render: (_args: Args, context: StoryContext) => {
- return html`
- ${['bg-white', 'bg-dark'].map(
- bg => html`
-
+ `,
+ {
+ filter: scheme => scheme === COLOR_SCHEMES.light,
+ },
+ );
},
};
diff --git a/packages/documentation/src/stories/components/switch/switch.snapshot.stories.ts b/packages/documentation/src/stories/components/switch/switch.snapshot.stories.ts
index 73fdc01d6a..e140657065 100644
--- a/packages/documentation/src/stories/components/switch/switch.snapshot.stories.ts
+++ b/packages/documentation/src/stories/components/switch/switch.snapshot.stories.ts
@@ -1,6 +1,7 @@
import type { Args, StoryContext, StoryObj } from '@storybook/web-components';
import meta from './switch.stories';
import { html } from 'lit';
+import { schemes } from '@/shared/snapshots/schemes';
import { bombArgs } from '@/utils';
const { id, ...metaWithoutId } = meta;
@@ -16,7 +17,7 @@ export const Switch: Story = {
render: (_args: Args, context: StoryContext) => {
const longerText =
'Longa etikedo kiu plej versajne ne taugas sur unu linio kaj tial devas esti envolvita. Kaj nur por esti sur la sekura flanko, ni simple aldonu unu plian tre sencelan frazon ci tie. Vi neniam scias...';
- const templateVariants = (bg: string) =>
+ const templateVariants = (scheme: string) =>
bombArgs({
labelPosition: ['before', 'after'],
label: ['Notifications', longerText],
@@ -26,7 +27,7 @@ export const Switch: Story = {
validation: ['null', 'is-valid', 'is-invalid'],
})
.filter((args: Args) => !(args.labelPosition == 'before' && args.label === longerText))
- .map(args => ({ ...args, id: `${bg}-${crypto.randomUUID()}` }))
+ .map(args => ({ ...args, id: `${scheme}-${crypto.randomUUID()}` }))
.map(
(args: Args) =>
html`
@@ -36,12 +37,6 @@ export const Switch: Story = {
`,
);
- return html`
-
- ${['white', 'dark'].map(
- bg => html`
${templateVariants(bg)}
`,
- )}
-
- `;
+ return schemes(scheme => html`
${templateVariants(scheme)}
`);
},
};
diff --git a/packages/documentation/src/stories/components/table/table.snapshot.stories.ts b/packages/documentation/src/stories/components/table/table.snapshot.stories.ts
index 8f607015ef..8dfdd98881 100644
--- a/packages/documentation/src/stories/components/table/table.snapshot.stories.ts
+++ b/packages/documentation/src/stories/components/table/table.snapshot.stories.ts
@@ -1,6 +1,7 @@
import type { Args, StoryContext, StoryObj } from '@storybook/web-components';
import meta from './table.stories';
import { html } from 'lit';
+import { schemes } from '@/shared/snapshots/schemes';
import { bombArgs } from '@/utils';
const { id, ...metaWithoutId } = meta;
@@ -16,158 +17,153 @@ export const Table: Story = {
render: (_args: Args, context: StoryContext) => {
const longCaption =
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem maxime eius aut quae ducimus dignissimos pariatur suscipit distinctio, accusamus laudantium, sint quibusdam nisi optio? Ut quae obcaecati, harum ullam quos beatae, ipsam enim, placeat eligendi dolores excepturi. Quia quod eligendi ab voluptas modi id distinctio iure vel possimus deserunt, amet, dolores laboriosam quas qui aut laborum? Et numquam esse laboriosam totam quod sapiente recusandae consectetur optio, quaerat quia. Sequi excepturi quia voluptate nesciunt cum veritatis? Quas molestias nostrum temporibus saepe porro facilis tempora natus non modi fugiat, vitae facere quos placeat maiores incidunt illo itaque sequi dolore! Temporibus recusandae, veritatis eos vitae optio porro magni rem culpa enim provident sed. Libero blanditiis delectus voluptatibus, temporibus alias laudantium ad tempora iure, sunt minima maiores qui ut? Aliquam quis obcaecati id, officiis accusamus voluptas rerum magnam, est a culpa voluptatum tenetur ab, asperiores vel dolor ipsum alias tempore sint aliquid? Eum architecto laboriosam dolor inventore deleniti? Repellat perferendis ratione dolorem, amet deleniti minima repudiandae eos iure maiores, dicta sequi architecto ipsa sit ab laudantium praesentium maxime asperiores molestiae ad nulla ullam est saepe vero. Qui ratione vero dicta nisi molestiae rem consectetur, natus ipsam facilis repellendus animi ullam debitis temporibus sapiente quam.';
- return html`
-
- ${['bg-white', 'bg-dark'].map(
- bg => html`
-
- ${[
- ...bombArgs({
- content: [
- html`
-
-
1
-
Mark
-
Otto
-
@mdo
-
-
-
2
-
Jacob
-
Thornton
-
@fat
-
-
-
4
-
Someone
-
- else
-
- entirely
-
-
@twitter
-
- `,
- ],
- caption: [
- 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero mollitia magnam quo quam saepe. Aliquam tempore non deleniti culpa reprehenderit.',
- longCaption,
- ],
- captionPlacement: context.argTypes.captionPlacement.options,
- borderStyle: context.argTypes.borderStyle.options,
- alignment: context.argTypes.alignment.options,
- }) /*
- prevents combinations with changed borderStyle and changed
- alignement also prevents their respective duplicate hiddens
- */
- .filter(
- (args: Args) =>
- (args.borderStyle === 'null' || args.alignment === 'align-top') &&
- (args.captionPlacement === 'bottom' || args.alignment === 'align-top') &&
- (args.borderStyle === 'null' || args.captionPlacement === 'bottom'),
- )
- /*
- prevents more long text captions than neccessary
- */
- .filter(
- (args: Args) =>
- (args.borderStyle === 'null' &&
- args.alignment === 'align-top' &&
- args.captionPlacement !== 'hidden') ||
- args.caption !== longCaption,
- ),
- ...bombArgs({
- content: [
- html`
-
+ `,
+ );
},
};
diff --git a/packages/documentation/src/stories/components/toast/toast.snapshot.stories.ts b/packages/documentation/src/stories/components/toast/toast.snapshot.stories.ts
index 624a1e9ea3..62de919be4 100644
--- a/packages/documentation/src/stories/components/toast/toast.snapshot.stories.ts
+++ b/packages/documentation/src/stories/components/toast/toast.snapshot.stories.ts
@@ -1,6 +1,7 @@
import type { Args, StoryContext, StoryObj } from '@storybook/web-components';
import meta from './toast.stories';
import { html } from 'lit';
+import { schemes } from '@/shared/snapshots/schemes';
import { bombArgs } from '@/utils';
const { id, ...metaWithoutId } = meta;
@@ -18,31 +19,24 @@ export const Toast: Story = {
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero mollitia magnam quo quam saepe. Aliquam tempore non deleniti culpa reprehenderit.';
const longText =
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem maxime eius aut quae ducimus dignissimos pariatur suscipit distinctio, accusamus laudantium, sint quibusdam nisi optio? Ut quae obcaecati, harum ullam quos beatae, ipsam enim, placeat eligendi dolores excepturi. Quia quod eligendi ab voluptas modi id distinctio iure vel possimus deserunt, amet, dolores laboriosam quas qui aut laborum? Et numquam esse laboriosam totam quod sapiente recusandae consectetur optio, quaerat quia. Sequi excepturi quia voluptate nesciunt cum veritatis? Quas molestias nostrum temporibus saepe porro facilis tempora natus non modi fugiat, vitae facere quos placeat maiores incidunt illo itaque sequi dolore! Temporibus recusandae, veritatis eos vitae optio porro magni rem culpa enim provident sed. Libero blanditiis delectus voluptatibus, temporibus alias laudantium ad tempora iure, sunt minima maiores qui ut? Aliquam quis obcaecati id, officiis accusamus voluptas rerum magnam, est a culpa voluptatum tenetur ab, asperiores vel dolor ipsum alias tempore sint aliquid? Eum architecto laboriosam dolor inventore deleniti? Repellat perferendis ratione dolorem, amet deleniti minima repudiandae eos iure maiores, dicta sequi architecto ipsa sit ab laudantium praesentium maxime asperiores molestiae ad nulla ullam est saepe vero. Qui ratione vero dicta nisi molestiae rem consectetur, natus ipsam facilis repellendus animi ullam debitis temporibus sapiente quam.';
- return html`
-
- Therefore it should be rendered with sequential numbers at the beginning of each
- list item.
-
-
- Nested list:
-
-
This is a nested list
-
It is further indented, depending on the depth of nesting.
-
Nested lists numbers are independent form the numbers of their parents.
-
- After nested list item
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
- irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
- pariatur
-
-
Ordered list item
-
Ordered list item
-
Ordered list item
-
Ordered list item
-
Ordered list item
-
-
- `,
- )}
-
- `;
+ return schemes(
+ () => html`
+
+
This is an ordered list.
+
It appears in its default style.
+
+ Therefore it should be rendered with sequential numbers at the beginning of each list
+ item.
+
+
+ Nested list:
+
+
This is a nested list
+
It is further indented, depending on the depth of nesting.
+
Nested lists numbers are independent form the numbers of their parents.
+
+ After nested list item
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur
+
+
Ordered list item
+
Ordered list item
+
Ordered list item
+
Ordered list item
+
Ordered list item
+
+ `,
+ );
},
};
diff --git a/packages/documentation/src/stories/utilities/display/display.snapshot.stories.ts b/packages/documentation/src/stories/utilities/display/display.snapshot.stories.ts
index 6600a7ed1c..fbcd4b1011 100644
--- a/packages/documentation/src/stories/utilities/display/display.snapshot.stories.ts
+++ b/packages/documentation/src/stories/utilities/display/display.snapshot.stories.ts
@@ -1,5 +1,6 @@
import type { StoryObj } from '@storybook/web-components';
import { html } from 'lit';
+import { COLOR_SCHEMES, schemes } from '@/shared/snapshots/schemes';
import meta from './display.stories';
import { displayOptions } from './display.docs.mdx';
import './display.styles.scss';
@@ -15,17 +16,20 @@ type Story = StoryObj;
export const Display: Story = {
render: () => {
- return html`
-
- ${displayOptions.map(
- display => html`
-
-
${display}
-
${display}
-
- `,
- )}
-
- `;
+ return schemes(
+ () => html`
+
+ ${displayOptions.map(
+ display => html`
+
+
display: ${display}
+
${display}
+
+ `,
+ )}
+
+ `,
+ { filter: scheme => scheme === COLOR_SCHEMES.light },
+ );
},
};
diff --git a/packages/documentation/src/stories/utilities/display/display.styles.scss b/packages/documentation/src/stories/utilities/display/display.styles.scss
index eb981a09ce..3bf9067e93 100644
--- a/packages/documentation/src/stories/utilities/display/display.styles.scss
+++ b/packages/documentation/src/stories/utilities/display/display.styles.scss
@@ -4,7 +4,7 @@
.display-container {
border: post.$border-width solid post.$border-color;
- > * {
+ > div {
border: post.$border-width solid post.$border-color;
background-color: color.adjust(post.$border-color, $lightness: 15%);
}
diff --git a/packages/documentation/src/stories/utilities/flex/flex.snapshot.stories.ts b/packages/documentation/src/stories/utilities/flex/flex.snapshot.stories.ts
index 4dc2b239ae..1add5d5375 100644
--- a/packages/documentation/src/stories/utilities/flex/flex.snapshot.stories.ts
+++ b/packages/documentation/src/stories/utilities/flex/flex.snapshot.stories.ts
@@ -1,5 +1,6 @@
import type { StoryObj } from '@storybook/web-components';
import { html } from 'lit';
+import { COLOR_SCHEMES, schemes } from '@/shared/snapshots/schemes';
import meta from './flex.stories';
import './flex.styles.scss';
import {
@@ -152,23 +153,26 @@ function getFlex(type: string) {
export const Flex: Story = {
render: () => {
- return html`