diff --git a/.changeset/red-cobras-cry.md b/.changeset/red-cobras-cry.md new file mode 100644 index 0000000000..7dab717fee --- /dev/null +++ b/.changeset/red-cobras-cry.md @@ -0,0 +1,7 @@ +--- +'@swisspost/design-system-styles-primeng-workspace': patch +'@swisspost/design-system-documentation': patch +'@swisspost/design-system-styles': major +--- + +Removed deprecated accent colors (nightblue, petrol, coral, olive, purple, aubergine and their light variations) and updated all relevant components, documentation, and utilities. \ No newline at end of file diff --git a/packages/documentation/.storybook/styles/manager.scss b/packages/documentation/.storybook/styles/manager.scss index 74c4bf74ac..58e2cb99f2 100644 --- a/packages/documentation/.storybook/styles/manager.scss +++ b/packages/documentation/.storybook/styles/manager.scss @@ -80,13 +80,13 @@ color: var(--post-gray-60); } &[data-nodetype='component'] svg { - color: var(--post-nightblue-bright); + color: #0076a8; } &[data-nodetype='document'] svg { - color: var(--post-coral-bright); + color: #e03c31; } &[data-nodetype='story'] svg { - color: var(--post-aubergine-bright); + color: #7566a0; } &[data-selected='true'] { @@ -102,10 +102,10 @@ margin-top: 1px; width: 1.2em; height: 1.2em; - color: var(--post-aubergine-bright); + color: #7566a0; &[color='secondary'] { - color: var(--post-nightblue-bright); + color: #0076a8; } } diff --git a/packages/documentation/src/shared/tile/tile.component.scss b/packages/documentation/src/shared/tile/tile.component.scss index e59f6fa2f7..d054281dd3 100644 --- a/packages/documentation/src/shared/tile/tile.component.scss +++ b/packages/documentation/src/shared/tile/tile.component.scss @@ -19,7 +19,7 @@ $tile-rg-size: var(--post-docs-tile-rg-size, calc($tile-size / 1.2)); height: $tile-size; background-color: post.$white; border-radius: post.$size-regular; - box-shadow: 0 2px 5px 0 rgba(post.$aubergine-dark, 0.3); + box-shadow: 0 2px 5px 0 rgba(82, 49, 120, 0.3); text-decoration: none; text-align: center; diff --git a/packages/documentation/src/stories/components/button/button.docs.mdx b/packages/documentation/src/stories/components/button/button.docs.mdx index be5b9cdbcd..7c1027b99f 100644 --- a/packages/documentation/src/stories/components/button/button.docs.mdx +++ b/packages/documentation/src/stories/components/button/button.docs.mdx @@ -34,17 +34,6 @@ Inverted buttons don't need special classes anymore, just use any of the [backgr -### Accent colors - -
-

The accent colors are deprecated

-

The CSS classes to apply to the buttons will be removed in the future.

-
- -There are a number of accent colors that you can apply to buttons instead of the usual colors. - - - ### Signal colors Besides the usual and the accent button variations, there are also signal button colors. diff --git a/packages/documentation/src/stories/components/button/button.snapshot.stories.ts b/packages/documentation/src/stories/components/button/button.snapshot.stories.ts index ff8db2a59f..67a58aaf25 100644 --- a/packages/documentation/src/stories/components/button/button.snapshot.stories.ts +++ b/packages/documentation/src/stories/components/button/button.snapshot.stories.ts @@ -1,5 +1,5 @@ import type { Args, StoryContext, StoryObj } from '@storybook/web-components'; -import meta, { Default, AccentColors, SignalColors } from './button.stories'; +import meta, { Default, SignalColors } from './button.stories'; import { html } from 'lit'; import { bombArgs } from '@/utils'; @@ -42,8 +42,6 @@ export const Button: Story = { Default.render?.({ ...context.args, ...args, animated: false }, context), )}
- ${AccentColors.render?.({ ...context.args, ...AccentColors.args }, context)} -
${SignalColors.render?.({ ...context.args, ...SignalColors.args }, context)} `, diff --git a/packages/documentation/src/stories/components/button/button.stories.ts b/packages/documentation/src/stories/components/button/button.stories.ts index 9ef2b2b16d..160270d993 100644 --- a/packages/documentation/src/stories/components/button/button.stories.ts +++ b/packages/documentation/src/stories/components/button/button.stories.ts @@ -297,26 +297,6 @@ const VariantsTemplate = { `, }; -export const AccentColors: Story = { - ...VariantsTemplate, - args: { - variants: [ - 'btn-nightblue', - 'btn-nightblue-bright', - 'btn-petrol', - 'btn-petrol-bright', - 'btn-coral', - 'btn-coral-bright', - 'btn-olive', - 'btn-olive-bright', - 'btn-purple', - 'btn-purple-bright', - 'btn-aubergine', - 'btn-aubergine-bright', - ], - }, -}; - export const SignalColors: Story = { ...VariantsTemplate, args: { diff --git a/packages/documentation/src/stories/components/internet-header/header/overrides-stories/header-css-variables.stories.ts b/packages/documentation/src/stories/components/internet-header/header/overrides-stories/header-css-variables.stories.ts index 23995b5877..fa7598fc5a 100644 --- a/packages/documentation/src/stories/components/internet-header/header/overrides-stories/header-css-variables.stories.ts +++ b/packages/documentation/src/stories/components/internet-header/header/overrides-stories/header-css-variables.stories.ts @@ -24,7 +24,7 @@ export const Default = { } ${meta.render && meta.render(args, context)} -

+

I am sticky! I am always positioned right below the header when you scroll up and down.

`; diff --git a/packages/documentation/src/stories/components/topic-teaser/topic-teaser.snapshot.stories.ts b/packages/documentation/src/stories/components/topic-teaser/topic-teaser.snapshot.stories.ts index f441fab1b0..680e52cec0 100644 --- a/packages/documentation/src/stories/components/topic-teaser/topic-teaser.snapshot.stories.ts +++ b/packages/documentation/src/stories/components/topic-teaser/topic-teaser.snapshot.stories.ts @@ -25,7 +25,7 @@ export const TopicTeaser: Story = { subtitle: [short, long], title: [short, long], alignment: context.argTypes.alignment.options, - backgroundColor: ['bg-nightblue', 'bg-coral-bright'], + backgroundColor: ['bg-light', 'bg-yellow'], linkCount: [1, 5, 10], }) .filter((args: Args) => args.title !== args.subtitle || args.linkCount == 5) diff --git a/packages/documentation/src/stories/components/topic-teaser/topic-teaser.stories.ts b/packages/documentation/src/stories/components/topic-teaser/topic-teaser.stories.ts index 10cc43c464..d60948a87c 100644 --- a/packages/documentation/src/stories/components/topic-teaser/topic-teaser.stories.ts +++ b/packages/documentation/src/stories/components/topic-teaser/topic-teaser.stories.ts @@ -20,7 +20,7 @@ const meta: MetaComponent = { subtitle: 'Vero siteos et accusam iretea et justo', linkCount: 5, alignment: 'null', - backgroundColor: 'bg-nightblue', + backgroundColor: 'bg-yellow', }, argTypes: { title: { @@ -78,36 +78,9 @@ const meta: MetaComponent = { labels: { 'bg-light': 'Light', 'bg-dark': 'Dark', - 'bg-nightblue': 'Nightblue', - 'bg-nightblue-bright': 'Nightblue (bright)', - 'bg-petrol': 'Petrol', - 'bg-petrol-bright': 'Petrol (bright)', - 'bg-coral': 'Coral', - 'bg-coral-bright': 'Coral (bright)', - 'bg-olive': 'Olive', - 'bg-olive-bright': 'Olive (bright)', - 'bg-purple': 'Purple', - 'bg-purple-bright': 'Purple (bright)', - 'bg-aubergine': 'Aubergine', - 'bg-aubergine-bright': 'Aubergine (bright)', }, }, - options: [ - 'bg-light', - 'bg-dark', - 'bg-nightblue', - 'bg-nightblue-bright', - 'bg-petrol', - 'bg-petrol-bright', - 'bg-coral', - 'bg-coral-bright', - 'bg-olive', - 'bg-olive-bright', - 'bg-purple', - 'bg-purple-bright', - 'bg-aubergine', - 'bg-aubergine-bright', - ], + options: ['bg-light', 'bg-yellow'], table: { category: 'General', }, diff --git a/packages/documentation/src/stories/foundation/color/color.docs.mdx b/packages/documentation/src/stories/foundation/color/color.docs.mdx index ff54e647b0..344316beac 100644 --- a/packages/documentation/src/stories/foundation/color/color.docs.mdx +++ b/packages/documentation/src/stories/foundation/color/color.docs.mdx @@ -59,21 +59,6 @@ These colors are also available via the **Sass map** `$signal-background-colors` })} -## Accent colors - -
-

The accent colors are deprecated

-

Its CSS and SASS variables will be removed in the future.

-
- -These colors are also available via the **Sass map** `$accent-colors`. - -
- {forEach(SCSS_VARIABLES.accent, function ({ key, value}) { - return ; - })} -
- ## Black alpha colors These colors are also available via the **Sass map** `$post-black-alphas`. diff --git a/packages/documentation/src/stories/foundation/color/color.module.scss b/packages/documentation/src/stories/foundation/color/color.module.scss index b807818733..af5fe0a66a 100644 --- a/packages/documentation/src/stories/foundation/color/color.module.scss +++ b/packages/documentation/src/stories/foundation/color/color.module.scss @@ -16,7 +16,6 @@ $contrast-color-maps: ( post.$post-grays, post.$signal-colors, post.$signal-background-colors, - post.$accent-colors ); :export { @@ -52,10 +51,6 @@ $contrast-color-maps: ( signal-background_#{$colorName}: $value; } - @each $colorName, $value in post.$accent-colors { - accent_#{$colorName}: $value; - } - @each $map in $contrast-color-maps { @each $name, $value in $map { contrast_color_#{$name}: post.get-best-contrast-text($value); diff --git a/packages/documentation/src/stories/foundation/layout/columns/columns.styles.scss b/packages/documentation/src/stories/foundation/layout/columns/columns.styles.scss index 6946909b68..0ca6b8aa18 100644 --- a/packages/documentation/src/stories/foundation/layout/columns/columns.styles.scss +++ b/packages/documentation/src/stories/foundation/layout/columns/columns.styles.scss @@ -5,12 +5,12 @@ .row > *:not(.w-100) { padding-block: 0.75rem; - background-color: lighten(post.$nightblue-bright, 55%); - border: 1px solid lighten(post.$nightblue-dark, 45%); + background-color: lighten(#0076a8, 55%); + border: 1px solid lighten(#004976, 45%); } .row { - background-color: lighten(post.$nightblue-bright, 61.5%); + background-color: lighten(#0076a8, 61.5%); } .row-height { @@ -19,7 +19,5 @@ .standalone-columns > *:not(p){ padding-block: 0.75rem; - background-color: lighten(post.$nightblue-bright, 55%); - border: 1px solid lighten(post.$nightblue-dark, 45%); } -} \ No newline at end of file +} diff --git a/packages/documentation/src/stories/foundation/layout/grid/grid.styles.scss b/packages/documentation/src/stories/foundation/layout/grid/grid.styles.scss index 8f1ef67556..56a47a8877 100644 --- a/packages/documentation/src/stories/foundation/layout/grid/grid.styles.scss +++ b/packages/documentation/src/stories/foundation/layout/grid/grid.styles.scss @@ -6,7 +6,7 @@ &.grid-nested-example [class^="col"], &:not(.grid-nested-example) .my-col-content-style { padding: 0.75rem; - background-color: lighten(post.$nightblue-bright, 60%); - border: 1px solid lighten(post.$nightblue-dark, 60%); + background-color: lighten(#0076a8, 60%); + border: 1px solid lighten(#004976, 60%); } } diff --git a/packages/documentation/src/stories/getting-started/migration-guide/shared.component.scss b/packages/documentation/src/stories/getting-started/migration-guide/shared.component.scss index f77ec5c066..f1965cb901 100644 --- a/packages/documentation/src/stories/getting-started/migration-guide/shared.component.scss +++ b/packages/documentation/src/stories/getting-started/migration-guide/shared.component.scss @@ -69,7 +69,7 @@ migration-global-state { } em { - color: post.$coral-dark; + color: #9e2a2f; } .info { diff --git a/packages/documentation/src/stories/home.styles.scss b/packages/documentation/src/stories/home.styles.scss index 2d238cf481..5d85ccd27f 100644 --- a/packages/documentation/src/stories/home.styles.scss +++ b/packages/documentation/src/stories/home.styles.scss @@ -48,7 +48,7 @@ .feature--icon { margin-bottom: post.$size-regular; font-size: post.$size-huge; - color: post.$aubergine-dark; + color: #523178; } .feature--content { diff --git a/packages/documentation/src/stories/utilities/background/background.docs.mdx b/packages/documentation/src/stories/utilities/background/background.docs.mdx index 0feba20683..2a6611121c 100644 --- a/packages/documentation/src/stories/utilities/background/background.docs.mdx +++ b/packages/documentation/src/stories/utilities/background/background.docs.mdx @@ -53,14 +53,6 @@ To set a background on an element, simply add a `.bg-{colorname}` class to it. })} -#### Accent - -
- {forEach(SCSS_VARIABLES.accent, function ({ key, value }) { - return ; - })} -
- ## Nested It is possible to nest backgrounds. diff --git a/packages/documentation/src/stories/utilities/background/background.module.scss b/packages/documentation/src/stories/utilities/background/background.module.scss index 5b75271a86..f630e81f1d 100644 --- a/packages/documentation/src/stories/utilities/background/background.module.scss +++ b/packages/documentation/src/stories/utilities/background/background.module.scss @@ -4,7 +4,6 @@ $non-base-background-colors: (); $non-base-background-colors: map.merge($non-base-background-colors, post.$signal-colors); $non-base-background-colors: map.merge($non-base-background-colors, post.$signal-background-colors); -$non-base-background-colors: map.merge($non-base-background-colors, post.$accent-colors); :export { @each $color, $value in post.$background-colors { @@ -13,10 +12,6 @@ $non-base-background-colors: map.merge($non-base-background-colors, post.$accent } } - @each $color, $value in post.$accent-colors { - accent_#{$color}: $value; - } - @each $color, $value in post.$signal-colors { signal_#{$color}: $value; } diff --git a/packages/documentation/src/stories/utilities/background/background.stories.ts b/packages/documentation/src/stories/utilities/background/background.stories.ts index 4ac0d880f4..3d8e27f20c 100644 --- a/packages/documentation/src/stories/utilities/background/background.stories.ts +++ b/packages/documentation/src/stories/utilities/background/background.stories.ts @@ -40,10 +40,10 @@ export const NestedBackgrounds: Story = { export const TranslucentBackgrounds: Story = { render: () => html` -
Container with default opacity (1).
-
Container with opacity 0.8.
-
Container with opacity 0.6.
-
Container with opacity 0.4.
-
Container with opacity 0.2.
+
Container with default opacity (1).
+
Container with opacity 0.8.
+
Container with opacity 0.6.
+
Container with opacity 0.4.
+
Container with opacity 0.2.
`, }; diff --git a/packages/documentation/src/stories/utilities/spacing/spacing.styles.scss b/packages/documentation/src/stories/utilities/spacing/spacing.styles.scss index f9afc38bd2..49e084df0c 100644 --- a/packages/documentation/src/stories/utilities/spacing/spacing.styles.scss +++ b/packages/documentation/src/stories/utilities/spacing/spacing.styles.scss @@ -1,9 +1,9 @@ @use 'sass:color'; @use '@swisspost/design-system-styles/core' as post; -$margin-color: color.adjust(post.$coral-bright, $lightness: 30%); +$margin-color: color.adjust(#e03c31, $lightness: 30%); $padding-color: color.complement($margin-color); -$gap-color: color.adjust(post.$aubergine-bright, $lightness: 30%); +$gap-color: color.adjust(#7566a0, $lightness: 30%); $content-color: post.$white; $border: 1px solid post.$gray-40; diff --git a/packages/styles-primeng-workspace/projects/styles-primeng-showcase/src/app/app.component.html b/packages/styles-primeng-workspace/projects/styles-primeng-showcase/src/app/app.component.html index 3fe9ef430b..69061786fc 100644 --- a/packages/styles-primeng-workspace/projects/styles-primeng-showcase/src/app/app.component.html +++ b/packages/styles-primeng-workspace/projects/styles-primeng-showcase/src/app/app.component.html @@ -3,7 +3,7 @@

PrimeNg data table showcase