diff --git a/app/.storybook/main.ts b/app/.storybook/main.ts index 279e6d0d..74c089de 100644 --- a/app/.storybook/main.ts +++ b/app/.storybook/main.ts @@ -28,6 +28,7 @@ const config: StorybookConfig = { { from: '../public', to: '/' }, { from: '../../dist/', to: '/dist' }, { from: '../../css/foundations/fonts/', to: '/dist/fonts' }, + { from: '../../dist/', to: '/dist' }, ], } export default config diff --git a/app/.storybook/preview.ts b/app/.storybook/preview.ts index b1e0361e..1501a835 100644 --- a/app/.storybook/preview.ts +++ b/app/.storybook/preview.ts @@ -61,11 +61,28 @@ export default { }, backgrounds: { values: [ - { name: 'Light', value: 'var(--color-white, #fff)' }, - { name: 'Dark', value: 'var(--color-secondary-600, #5f755f)' }, + { name: 'Light', value: 'light' }, + { name: 'Dark', value: 'dark' }, ], // 👇 Specify which background is shown by default default: 'Light', }, }, + decorators: [ + (_, args) => { + const theme = args.globals?.backgrounds?.value + switch (theme) { + case 'light': + document.querySelector('html')?.setAttribute('data-theme', 'light') + break + case 'dark': + document.querySelector('html')?.setAttribute('data-theme', 'dark') + break + default: + document.querySelector('html')?.setAttribute('data-theme', 'auto') + break + } + return { template: `` } + }, + ], } diff --git a/app/public/images/grid-example-1.png b/app/assets/images/grid-example-1.png similarity index 100% rename from app/public/images/grid-example-1.png rename to app/assets/images/grid-example-1.png diff --git a/app/public/images/grid-example-2.png b/app/assets/images/grid-example-2.png similarity index 100% rename from app/public/images/grid-example-2.png rename to app/assets/images/grid-example-2.png diff --git a/app/public/images/grid-example-3.png b/app/assets/images/grid-example-3.png similarity index 100% rename from app/public/images/grid-example-3.png rename to app/assets/images/grid-example-3.png diff --git a/app/components/ch/components/AlertBanner.vue b/app/components/ch/components/AlertBanner.vue index bb6e599a..f16d0352 100644 --- a/app/components/ch/components/AlertBanner.vue +++ b/app/components/ch/components/AlertBanner.vue @@ -23,7 +23,8 @@ :icon="link.icon ? link.icon : 'ArrowRight'" icon-pos="right" size="sm" - variant="link-negative" + variant="link" + class="link--negative" /> diff --git a/app/components/ch/components/BackToTopBtn.vue b/app/components/ch/components/BackToTopBtn.vue index 5ebbdf0c..50967b55 100644 --- a/app/components/ch/components/BackToTopBtn.vue +++ b/app/components/ch/components/BackToTopBtn.vue @@ -19,7 +19,7 @@ const props = defineProps({ type: { type: String, validator: (prop) => - ['default', 'negative', 'outline'].includes(prop as string), + ['negative', 'outline'].includes(prop as string), default: () => undefined, }, target: { diff --git a/app/components/ch/components/Badge.vue b/app/components/ch/components/Badge.vue index caafda4e..e4815b71 100644 --- a/app/components/ch/components/Badge.vue +++ b/app/components/ch/components/Badge.vue @@ -20,8 +20,8 @@ diff --git a/app/components/ch/components/PaginationItem.vue b/app/components/ch/components/PaginationItem.vue index 48bb703e..10830788 100644 --- a/app/components/ch/components/PaginationItem.vue +++ b/app/components/ch/components/PaginationItem.vue @@ -17,12 +17,6 @@ import SvgIcon from './SvgIcon.vue' import { computed } from 'vue' const props = defineProps({ - type: { - type: String, - default: () => '', - validator: (prop) => - ['outline', 'outline-negative'].includes(prop as string), - }, icon: { type: String, default: () => '', @@ -38,8 +32,7 @@ const props = defineProps({ }) const computedClasses = computed(() => { - let base = 'btn ' - if (props.type) base += `btn--${props.type} ` + let base = 'btn btn--outline ' if (props.icon) base += `btn--icon-only ` return base }) diff --git a/app/components/ch/components/Radio.vue b/app/components/ch/components/Radio.vue index 02dab627..ec3abe0d 100644 --- a/app/components/ch/components/Radio.vue +++ b/app/components/ch/components/Radio.vue @@ -28,11 +28,6 @@ import { computed, type PropType } from 'vue' const props = defineProps({ - variant: { - type: String, - validator: (prop) => ['outline', 'negative'].includes(prop as string), - default: () => 'outline', - }, size: { type: String, validator: (prop) => ['sm', 'base', 'lg'].includes(prop as string), @@ -79,7 +74,6 @@ const props = defineProps({ const classes = computed(() => { let base = 'input ' - if (props.variant) base += `input--${props.variant} ` if (props.size) base += `input--${props.size} ` if (props.messageType) base += `input--${props.messageType} ` return base @@ -87,7 +81,6 @@ const classes = computed(() => { const labelClasses = computed(() => { let base = '' - if (props.variant === 'negative') base += `text--negative ` if (props.size) base += `text--${props.size} ` if (props.required) base += `text--asterisk ` return base diff --git a/app/components/ch/components/Select.vue b/app/components/ch/components/Select.vue index 36c9f3b9..521a5567 100644 --- a/app/components/ch/components/Select.vue +++ b/app/components/ch/components/Select.vue @@ -35,11 +35,6 @@ import { computed, type PropType } from 'vue' const props = defineProps({ - variant: { - type: String, - validator: (prop) => ['outline', 'negative'].includes(prop as string), - default: () => 'outline', - }, bare: { type: Boolean, default: () => false, @@ -95,7 +90,6 @@ const selectWrapperClasses = computed(() => { const selectClasses = computed(() => { let base = '' - if (props.variant) base += `input--${props.variant} ` if (props.size) base += `input--${props.size} ` if (props.message) base += `input--${props.messageType} ` return base @@ -103,7 +97,6 @@ const selectClasses = computed(() => { const labelClasses = computed(() => { let base = '' - if (props.variant === 'negative') base += `text--negative ` if (props.size) base += `text--${props.size} ` if (props.hideLabel) base += `sr-only ` if (props.required) base += `text--asterisk ` diff --git a/app/components/ch/components/ShoppingCard.vue b/app/components/ch/components/ShoppingCard.vue index c72d4351..7096211b 100644 --- a/app/components/ch/components/ShoppingCard.vue +++ b/app/components/ch/components/ShoppingCard.vue @@ -29,7 +29,7 @@ diff --git a/app/components/ch/components/ShoppingCart.vue b/app/components/ch/components/ShoppingCart.vue index dfb353c3..10b7b903 100644 --- a/app/components/ch/components/ShoppingCart.vue +++ b/app/components/ch/components/ShoppingCart.vue @@ -80,7 +80,7 @@ - + ['outline', 'negative'].includes(prop as string), - default: () => undefined, - }, size: { type: String, validator: (prop) => ['sm', 'base', 'lg'].includes(prop as string), @@ -92,7 +87,6 @@ const props = defineProps({ const classes = computed(() => { let base = '' - if (props.variant) base += `input--${props.variant} ` if (props.size) base += `input--${props.size} ` if (props.messageType) base += `input--${props.messageType} ` if (!props.resizable) base += 'textarea--public' @@ -101,7 +95,6 @@ const classes = computed(() => { const labelClasses = computed(() => { let base = '' - if (props.variant === 'negative') base += `text--negative ` if (props.size) base += `text--${props.size} ` if (props.required) base += `text--asterisk ` return base diff --git a/app/components/ch/demo/ColorList.vue b/app/components/ch/demo/ColorList.vue index 7d4ef2dd..3f67b07d 100644 --- a/app/components/ch/demo/ColorList.vue +++ b/app/components/ch/demo/ColorList.vue @@ -1,19 +1,24 @@ - - - {{ key }} colors + + + {{ groupName }} - + - - @@ -24,9 +29,53 @@ import ColorListItem from './ColorListItem.vue' import tailwindConfig from '../../../tailwind.config.js' import { reactive, onMounted } from 'vue' -const colors = reactive({} as Record>) +type ColorItem = { name: string; value: string } +type ColorGroup = { groupName: string; colorItems: ColorItem[] } + +const colors = reactive([] as ColorGroup[]) + +const flattenColors = (colorsRaw: any) => { + const result: ColorGroup[] = [] + + // Recursive function to process nested categories + const processCategory = (category: ColorItem, groupName: string) => { + const colorItems: ColorItem[] = [] + + // Loop through each key in the category + for (const [key, value] of Object.entries(category)) { + if (typeof value === 'object') { + // If the value is an object (nested category), recurse into it + processCategory(value, key) + } else if (typeof value === 'string') { + // If the value is a color value, add it to the colorItems array + colorItems.push({ name: key, value }) + } else { + console.warn(`Unknown value type for key ${key}`) + } + } + + // If colorItems are found, push the group and its colors to the result + if (colorItems.length > 0) { + result.push({ groupName, colorItems }) + } + } + + // Start the recursion for the top level of the object + processCategory(colorsRaw, '') + + return result +} + +// Put ungrouped colors at the top, everything else as appearing in tailwind.config.js +function colorSort(a: ColorGroup, b: ColorGroup) { + if (a.groupName === '') return -1 + return 0 +} onMounted(() => { - Object.assign(colors, tailwindConfig.theme?.colors) + Object.assign( + colors, + flattenColors(tailwindConfig.theme?.colors).sort(colorSort), + ) }) diff --git a/app/components/ch/demo/ColorListItem.vue b/app/components/ch/demo/ColorListItem.vue index 44d845e6..cb101a59 100644 --- a/app/components/ch/demo/ColorListItem.vue +++ b/app/components/ch/demo/ColorListItem.vue @@ -5,7 +5,7 @@ :style="`background-color: ${color} `" /> - {{ name }} + {{ name }} {{ color }} diff --git a/app/components/ch/demo/Tabs.vue b/app/components/ch/demo/Tabs.vue index af2aa368..428ec769 100644 --- a/app/components/ch/demo/Tabs.vue +++ b/app/components/ch/demo/Tabs.vue @@ -3,7 +3,9 @@ import { ref } from 'vue' -const videoFile = ref('../../../public/videos/demo.mp4') -const vttFile = ref('../../../public/videos/demo.vtt') +const videoFile = ref('/videos/demo.mp4') +const vttFile = ref('/videos/demo.vtt') diff --git a/app/components/ch/foundations/Backgrounds.vue b/app/components/ch/foundations/Backgrounds.vue index 2dea4293..0b24aa08 100644 --- a/app/components/ch/foundations/Backgrounds.vue +++ b/app/components/ch/foundations/Backgrounds.vue @@ -1,5 +1,10 @@ + bg--accent-01 + bg--accent-02 + bg--accent-03 + bg--accent-04 + bg--main bg--secondary-900 bg--secondary-800 bg--secondary-700 diff --git a/app/components/ch/navigations/MetaNavigation.vue b/app/components/ch/navigations/MetaNavigation.vue index e74301dd..8afde60a 100644 --- a/app/components/ch/navigations/MetaNavigation.vue +++ b/app/components/ch/navigations/MetaNavigation.vue @@ -19,7 +19,7 @@ - + diff --git a/app/components/ch/navigations/TopBarNavigation.vue b/app/components/ch/navigations/TopBarNavigation.vue index e22378b7..ff436316 100644 --- a/app/components/ch/navigations/TopBarNavigation.vue +++ b/app/components/ch/navigations/TopBarNavigation.vue @@ -10,10 +10,25 @@ Anmelden + + Informationsportal der Schweizer Behörden + + + Automatisch + Darkmode + Lightmode + + @@ -41,6 +56,7 @@ diff --git a/app/components/ch/objects/AlterBodyClasses.vue b/app/components/ch/objects/AlterBodyClasses.vue index d6c0a0e5..ec897964 100644 --- a/app/components/ch/objects/AlterBodyClasses.vue +++ b/app/components/ch/objects/AlterBodyClasses.vue @@ -1,3 +1,5 @@ + + diff --git a/app/components/ch/sections/FormDemo.vue b/app/components/ch/sections/FormDemo.vue index 750b4469..c5db991f 100644 --- a/app/components/ch/sections/FormDemo.vue +++ b/app/components/ch/sections/FormDemo.vue @@ -1,5 +1,5 @@ - + Classical input types @@ -56,7 +56,7 @@ /> - Other input types + Other input types - required fields example + required fields example diff --git a/app/components/ch/sections/PortraitSection.vue b/app/components/ch/sections/PortraitSection.vue index 5d2ef53d..b8b25391 100644 --- a/app/components/ch/sections/PortraitSection.vue +++ b/app/components/ch/sections/PortraitSection.vue @@ -21,37 +21,37 @@ nunc ultrices, tristique metus quis, sagittis ipsum, maecenas. - + Lebenslauf - + Anlässe - + Reden - + Interviews und Gastartikeln - + Autogrammkarte - + Präsidialjahr 2020 diff --git a/app/components/ch/sections/QuoteSection.vue b/app/components/ch/sections/QuoteSection.vue index ca30fc74..fa801001 100644 --- a/app/components/ch/sections/QuoteSection.vue +++ b/app/components/ch/sections/QuoteSection.vue @@ -32,12 +32,12 @@ const props = defineProps({ validator: (prop) => [ 'white', - 'secondary-50', - 'secondary-100', - 'secondary-500', - 'secondary-600', + 'accent-01', + 'accent-02', + 'accent-03', + 'accent-04', ].includes(prop as string), - default: () => 'secondary-50', + default: () => 'accent-01', }, quote: { type: String, diff --git a/app/components/ch/sections/RelatedPublicationsSection.vue b/app/components/ch/sections/RelatedPublicationsSection.vue index c5dae5ba..b4b6129f 100644 --- a/app/components/ch/sections/RelatedPublicationsSection.vue +++ b/app/components/ch/sections/RelatedPublicationsSection.vue @@ -1,5 +1,5 @@ - + Das könnte Sie auch interessieren diff --git a/app/components/ch/sections/ServicesSection.vue b/app/components/ch/sections/ServicesSection.vue index 24366098..d0825c98 100644 --- a/app/components/ch/sections/ServicesSection.vue +++ b/app/components/ch/sections/ServicesSection.vue @@ -1,5 +1,5 @@ - + Unsere top Dienstleistungen diff --git a/app/components/ch/sections/SocialsSection.vue b/app/components/ch/sections/SocialsSection.vue index 1188833f..241803a4 100644 --- a/app/components/ch/sections/SocialsSection.vue +++ b/app/components/ch/sections/SocialsSection.vue @@ -1,5 +1,5 @@ - + @@ -8,7 +8,7 @@ {{ sectionTitle }} - + - + - + diff --git a/app/components/ch/sections/TopBar.vue b/app/components/ch/sections/TopBar.vue index 21411a7b..fff12014 100644 --- a/app/components/ch/sections/TopBar.vue +++ b/app/components/ch/sections/TopBar.vue @@ -24,7 +24,7 @@ size="base" /> - + @@ -62,7 +62,7 @@ - + @@ -199,7 +199,7 @@ label="Clear search input" icon="CancelCircle" icon-pos="only" - variant="bare-negative" + variant="bare" size="lg" @click=" () => { diff --git a/app/components/ch/sections/TopHeader.vue b/app/components/ch/sections/TopHeader.vue index dfe06e19..8c24ccdf 100644 --- a/app/components/ch/sections/TopHeader.vue +++ b/app/components/ch/sections/TopHeader.vue @@ -55,7 +55,6 @@ - + Aktuell @@ -59,15 +59,15 @@ - + 10-12 Mai 2022 - + 9 bis 11 Uhr - + Zürich diff --git a/app/components/ch/sections/TopicsSection.vue b/app/components/ch/sections/TopicsSection.vue index e8cb2e68..c3ff89ce 100644 --- a/app/components/ch/sections/TopicsSection.vue +++ b/app/components/ch/sections/TopicsSection.vue @@ -1,5 +1,5 @@ - + Schwerpunktthemen diff --git a/app/components/stories/components/BackToTopBtn.mdx b/app/components/stories/components/BackToTopBtn.mdx index bff5eba3..492ede90 100644 --- a/app/components/stories/components/BackToTopBtn.mdx +++ b/app/components/stories/components/BackToTopBtn.mdx @@ -48,7 +48,6 @@ You can Open a demo page For type variations, the following css classes are built: -- `back-to-top-btn--default` for standard back to top button - `back-to-top-btn--negative` for standard back to top button with dark color - `back-to-top-btn--outline` for back to top button with strokes diff --git a/app/components/stories/components/BackToTopBtn.stories.js b/app/components/stories/components/BackToTopBtn.stories.js index db769d7e..9d05ded2 100644 --- a/app/components/stories/components/BackToTopBtn.stories.js +++ b/app/components/stories/components/BackToTopBtn.stories.js @@ -5,8 +5,8 @@ export default { component: BackToTopBtn, argTypes: { type: { - table: { type: { summary: ['string: default, negative, outline'] } }, - options: ['default', 'negative', 'outline'], + table: { type: { summary: ['string: negative, outline'] } }, + options: ['negative', 'outline'], control: { type: 'select' }, }, }, @@ -22,12 +22,6 @@ export const Example = { export const Variations = { render: () => ({ template: ` - - - - - - diff --git a/app/components/stories/components/Badge.stories.js b/app/components/stories/components/Badge.stories.js index df4b23ae..8ceb7ff2 100644 --- a/app/components/stories/components/Badge.stories.js +++ b/app/components/stories/components/Badge.stories.js @@ -26,6 +26,7 @@ export default { 'indigo', 'purple', 'pink', + 'active', ], control: { type: 'select' }, }, @@ -43,15 +44,6 @@ export default { } export const Example = { - render: (args) => ({ - setup: () => ({ args }), - components: { Badge }, - template: ` - - - - `, - }), args: { color: 'blue', size: 'base', @@ -67,6 +59,7 @@ export const ColorsStates = { warning error success + active `, }), } diff --git a/app/components/stories/components/Btn.mdx b/app/components/stories/components/Btn.mdx index 0b44ed01..c12d33a7 100644 --- a/app/components/stories/components/Btn.mdx +++ b/app/components/stories/components/Btn.mdx @@ -28,13 +28,6 @@ For type variations, the following css classes are built: -## Button negative types - -- `btn--outline-negative` for standard buttons on dark background -- `btn--bare-negative` for buttons without strokes on dark background - - - ## Sizes For size variations, the following css classes are built: @@ -65,10 +58,6 @@ Button can be displayed as links. They are similar to bare buttons, but the padd -## Negative button links - - - ## Buttons inside notification component Buttons inside a `.notification` container inherit text color and border colors from their container. Check the [notification banner](?path=/docs/components-notificationbanner--example) example. diff --git a/app/components/stories/components/Btn.stories.js b/app/components/stories/components/Btn.stories.js index 4b48cf2c..5c7c0579 100644 --- a/app/components/stories/components/Btn.stories.js +++ b/app/components/stories/components/Btn.stories.js @@ -8,7 +8,7 @@ export default { table: { type: { summary: [ - 'string: outline, bare, filled, outline-negative, bare-negative, link, link-negative', + 'string: outline, bare, filled, link', ], }, }, @@ -16,10 +16,7 @@ export default { 'outline', 'bare', 'filled', - 'outline-negative', - 'bare-negative', 'link', - 'link-negative', ], control: { type: 'select' }, }, @@ -44,15 +41,6 @@ export default { } export const Example = { - render: (args) => ({ - setup: () => ({ args }), - components: { Btn }, - template: ` - - - - `, - }), args: { variant: 'outline', size: 'base', @@ -82,38 +70,23 @@ export const ButtonOrLink = { export const ButtonVariations = { render: () => ({ template: ` - - - btn--outline - - - - - btn--filled - + + + btn--outline + - - - btn--bare - - `, - }), -} + + btn--filled + -export const NegativeTypes = { - render: () => ({ - template: ` - - - btn--outline-negative - - + + btn--bare + - - - btn--bare-negative - - `, + + btn--link + + `, }), } @@ -180,24 +153,3 @@ export const ButtonLinks = { `, }), } - -export const NegativeButtonLinks = { - parameters: { - backgrounds: { - default: 'Dark', - }, - }, - render: () => ({ - template: ` - - - - - - - Negative button link with icon - - - `, - }), -} diff --git a/app/components/stories/components/Card.stories.js b/app/components/stories/components/Card.stories.js index e45f20f6..320f9715 100644 --- a/app/components/stories/components/Card.stories.js +++ b/app/components/stories/components/Card.stories.js @@ -69,7 +69,7 @@ export default { decorators: [ () => ({ template: - '', + '', }), ], } diff --git a/app/components/stories/components/CardsOnGrid.stories.js b/app/components/stories/components/CardsOnGrid.stories.js index 42669877..37da8cc3 100644 --- a/app/components/stories/components/CardsOnGrid.stories.js +++ b/app/components/stories/components/CardsOnGrid.stories.js @@ -11,7 +11,7 @@ export default { export const DynamicList = { render: () => ({ template: ` - + Dynamic list @@ -48,7 +48,7 @@ export const DynamicList = { export const GridClasses = { render: () => ({ template: ` - + Section title @@ -93,7 +93,7 @@ export const OneCard = { setup: () => ({ ...args }), components: { Card, Btn, SvgIcon, CardGrid }, template: ` - + {{ sectionTitle }} diff --git a/app/components/stories/components/CardsVariants.stories.js b/app/components/stories/components/CardsVariants.stories.js index 093aebab..5fabb644 100644 --- a/app/components/stories/components/CardsVariants.stories.js +++ b/app/components/stories/components/CardsVariants.stories.js @@ -8,7 +8,7 @@ const TemplateCardArticle = (args) => ({ components: { Card, Btn, SvgIcon }, template: ` - + @@ -58,7 +58,7 @@ const TemplateCardEvent = (args) => ({ components: { Card, Btn, SvgIcon }, template: ` - + @@ -122,7 +122,7 @@ const TemplateCardShare = (args) => ({ components: { Card, Btn, SvgIcon }, template: ` - + diff --git a/app/components/stories/components/Carousel.mdx b/app/components/stories/components/Carousel.mdx index 97cd790c..84b63715 100644 --- a/app/components/stories/components/Carousel.mdx +++ b/app/components/stories/components/Carousel.mdx @@ -23,6 +23,6 @@ If the number of cards is larger than 6, the bullet points are hidden through CS # Backgrounds -The recommended background colors for carousels are the following: `bg--default`, `bg--secondary-50`, `bg--secondary-100`, `bg--secondary-500`, `bg--secondary-600`. +The recommended background colors for carousels are the following: `bg--default`, `bg--accent-01`, `bg--accent-02`, `bg--accent-03`, `bg--accent-04`. diff --git a/app/components/stories/components/Carousel.stories.js b/app/components/stories/components/Carousel.stories.js index 7a01d905..f6b0077c 100644 --- a/app/components/stories/components/Carousel.stories.js +++ b/app/components/stories/components/Carousel.stories.js @@ -24,7 +24,7 @@ const TemplateBackgrounds = (args) => ({ components: { CarouselExample }, template: ` - + ({ /> - + ({ /> - + ({ /> - + -## Checkbox negative type - -- `input--negative` for standard checkboxes on dark background - - - ## Input disabled state - `input--disabled` or `disabled state on the input` to add the disabled style diff --git a/app/components/stories/components/Checkbox.stories.js b/app/components/stories/components/Checkbox.stories.js index 3d7af89b..5074fcd8 100644 --- a/app/components/stories/components/Checkbox.stories.js +++ b/app/components/stories/components/Checkbox.stories.js @@ -5,11 +5,6 @@ export default { component: Checkbox, argTypes: { - variant: { - table: { type: { summary: ['string: outline, negative'] } }, - options: ['outline', 'negative'], - control: { type: 'select' }, - }, size: { table: { type: { summary: ['string: sm, base, lg'] } }, options: ['sm', 'base', 'lg'], @@ -35,7 +30,6 @@ export const Example = { `, }), args: { - variant: 'outline', size: 'base', label: 'Label', name: 'checkbox-name', @@ -43,21 +37,13 @@ export const Example = { }, } -export const NegativeCheckbox = { - render: () => ({ - template: ` - - `, - }), -} - export const DisabledInput = { render: () => ({ template: ` - - - - + + + dark-themed disabled checkbox + dark-themed disabled checked checkbox `, }), } @@ -65,9 +51,9 @@ export const DisabledInput = { export const SizesCheckbox = { render: () => ({ template: ` - - - + + + `, }), } @@ -76,7 +62,7 @@ export const RequiredCheckbox = { render: () => ({ template: ` - + Label required @@ -89,7 +75,7 @@ export const MessagesCheckbox = { render: () => ({ template: ` - + Label required diff --git a/app/components/stories/components/DownloadItem.stories.js b/app/components/stories/components/DownloadItem.stories.js index 540c55c0..73704520 100644 --- a/app/components/stories/components/DownloadItem.stories.js +++ b/app/components/stories/components/DownloadItem.stories.js @@ -17,7 +17,7 @@ export const Example = { title: 'Information on the usage of websites', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean feugiat augue eu purus luctus rhoncus. Donec ultricies venenatis nibh, vel placerat est accumsan quis. Maecenas urna nibh, pretium pretium odio id, rhoncus rhoncus lorem. Nulla eu neque sagittis, cursus purus eget, sodales est. Duis at ultrices odio, ac egestas dolor.', - url: '../../../public/documents/dummy.pdf', + url: '/documents/dummy.pdf', type: 'PDF', date: '13.01.2022', headingLevel: 'h3', @@ -53,7 +53,7 @@ export const ListExample = { title: 'Information on the usage of websites', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean feugiat augue eu purus luctus rhoncus. Donec ultricies venenatis nibh, vel placerat est accumsan quis. Maecenas urna nibh, pretium pretium odio id, rhoncus rhoncus lorem. Nulla eu neque sagittis, cursus purus eget, sodales est. Duis at ultrices odio, ac egestas dolor.', - url: '../../../public/documents/dummy.pdf', + url: '/documents/dummy.pdf', type: 'PDF', date: '13.01.2022', }, @@ -61,7 +61,7 @@ export const ListExample = { filename: 'image.png', title: 'Information on the usage of websites', description: '', - url: '../../../public/images/html-structure.png', + url: '/images/html-structure.png', type: 'PNG', date: '22.01.2022', }, @@ -69,7 +69,7 @@ export const ListExample = { filename: 'image.png', title: 'Information on the usage of websites', description: '', - url: '../../../public/images/html-structure.png', + url: '/images/html-structure.png', type: '', date: '', }, diff --git a/app/components/stories/components/Fieldset.mdx b/app/components/stories/components/Fieldset.mdx index 76a89651..3568eb0b 100644 --- a/app/components/stories/components/Fieldset.mdx +++ b/app/components/stories/components/Fieldset.mdx @@ -18,7 +18,7 @@ import * as FieldsetStories from './Fieldset.stories' type="radio" id="radio-0" name="radio-group-1" - class="input input--outline" + class="input" value="value-0" /> Label for value one @@ -28,7 +28,7 @@ import * as FieldsetStories from './Fieldset.stories' type="radio" id="radio-1" name="radio-group-1" - class="input input--outline" + class="input" value="value-1" /> Label for value two @@ -57,7 +57,7 @@ The `legend` element provide a caption for the `fieldset` group. type="radio" id="radio-0" name="radio-group-1" - class="input input--outline" + class="input" value="value-0" /> Label for value one @@ -67,7 +67,7 @@ The `legend` element provide a caption for the `fieldset` group. type="radio" id="radio-1" name="radio-group-1" - class="input input--outline" + class="input" value="value-1" /> Label for value two diff --git a/app/components/stories/components/Fieldset.stories.js b/app/components/stories/components/Fieldset.stories.js index fbf419fc..353d4a09 100644 --- a/app/components/stories/components/Fieldset.stories.js +++ b/app/components/stories/components/Fieldset.stories.js @@ -7,11 +7,6 @@ export default { component: Fieldset, argTypes: { - variant: { - table: { type: { summary: ['string: outline, negative'] } }, - options: ['outline', 'negative'], - control: { type: 'select' }, - }, size: { table: { type: { summary: ['string: sm, base, lg'] } }, options: ['sm', 'base', 'lg'], @@ -38,8 +33,8 @@ export const WithRadio = { setup: () => ({ args }), template: ` - - + + `, }), @@ -55,8 +50,8 @@ export const WithCheckboxes = { setup: () => ({ args }), template: ` - - + + `, }), @@ -74,11 +69,11 @@ export const RequiredFieldset = { Radio button group legend required - + Label for value one - + Label for value two @@ -94,11 +89,11 @@ export const MessagesFieldset = { Radio button group legend required - + Label for value one - + Label for value two Error message, after last radio item diff --git a/app/components/stories/components/Input.mdx b/app/components/stories/components/Input.mdx index f8c2e455..b8dc8679 100644 --- a/app/components/stories/components/Input.mdx +++ b/app/components/stories/components/Input.mdx @@ -12,15 +12,10 @@ import * as InputStories from './Input.stories' -## Input negative variant - -- `input--negative` for standard buttons on dark background - - - ## Input disabled state - `input--disabled` or `disabled state on the input` to add the disabled style +- Second input: dark-themed version diff --git a/app/components/stories/components/Input.stories.js b/app/components/stories/components/Input.stories.js index 90828b07..ea5c9aa7 100644 --- a/app/components/stories/components/Input.stories.js +++ b/app/components/stories/components/Input.stories.js @@ -31,42 +31,21 @@ export default { 'week', 'submit', ], - control: { - type: 'select', - }, + control: { type: 'select' }, }, required: { - control: { - type: 'boolean', - }, + control: { type: 'boolean' }, }, size: { table: { - type: { - summary: ['string: sm, base, lg'], - }, + type: { summary: ['string: sm, base, lg'] }, }, options: ['sm', 'base', 'lg'], - control: { - type: 'select', - }, - }, - variant: { - table: { - type: { - summary: ['string: outline, negative'], - }, - }, - options: ['outline', 'negative'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, label: {}, hideLabel: { - control: { - type: 'boolean', - }, + control: { type: 'boolean' }, }, message: {}, messageType: { @@ -76,9 +55,7 @@ export default { }, }, options: ['error', 'warning', 'success', 'info'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, }, } @@ -105,19 +82,12 @@ export const Example = { }, } -export const NegativeInput = { - render: () => ({ - template: - '', - }), -} - export const DisabledInput = { render: () => ({ template: ` - - + + `, }), @@ -127,9 +97,9 @@ export const SizesInput = { render: () => ({ template: ` - - - + + + `, }), @@ -142,7 +112,7 @@ export const RequiredInput = { Name required - + `, }), @@ -155,7 +125,7 @@ export const MessagesInput = { Name required - + This field is required `, diff --git a/app/components/stories/components/Link.mdx b/app/components/stories/components/Link.mdx index 6a3bf9d8..f453bb93 100644 --- a/app/components/stories/components/Link.mdx +++ b/app/components/stories/components/Link.mdx @@ -23,10 +23,6 @@ You can add a `.link` class to force the link appearance -## Negative links - - - ## Links with icons Use the `.btn btn--link` component and its variants to display a link with an icon. diff --git a/app/components/stories/components/Link.stories.js b/app/components/stories/components/Link.stories.js index f728fa60..13fe517c 100644 --- a/app/components/stories/components/Link.stories.js +++ b/app/components/stories/components/Link.stories.js @@ -32,19 +32,6 @@ export const ForceLink = { }), } -export const NegativeLink = { - parameters: { - backgrounds: { - default: 'Dark', - }, - }, - render: () => ({ - template: ` - Negative Link - `, - }), -} - export const IconLink = { render: () => ({ template: ` diff --git a/app/components/stories/components/Lists.mdx b/app/components/stories/components/Lists.mdx index dbe5e876..22bd4fe7 100644 --- a/app/components/stories/components/Lists.mdx +++ b/app/components/stories/components/Lists.mdx @@ -43,10 +43,6 @@ Use `.list .list--roman` for roman glyphs: -## Negative List - - - ## Horizontal Lists `.list--flex` display list items horizontally, without wrapping diff --git a/app/components/stories/components/Lists.stories.js b/app/components/stories/components/Lists.stories.js index 34cc1dba..c4914aac 100644 --- a/app/components/stories/components/Lists.stories.js +++ b/app/components/stories/components/Lists.stories.js @@ -78,22 +78,6 @@ export const LooseVariant = { }), } -export const NegativeList = { - parameters: { - backgrounds: { - default: 'Dark', - }, - }, - render: () => ({ - template: ` - - List item - List item - - `, - }), -} - export const HorizontalList = { render: () => ({ template: ` diff --git a/app/components/stories/components/Modal.stories.js b/app/components/stories/components/Modal.stories.js index ca0866d7..6423c932 100644 --- a/app/components/stories/components/Modal.stories.js +++ b/app/components/stories/components/Modal.stories.js @@ -119,7 +119,6 @@ export const Example = { -## Radiobox negative type - -- `input--negative` for standard radioboxes on dark background - - - ## Radio disabled state - `input--disabled` or `disabled state on the input` to add the disabled style @@ -52,7 +46,7 @@ Check the [Fieldset documentation](/docs/components-form-fieldset--example-radio id="radio-0" name="radio-group-1" required="required" - class="input input--outline" + class="input" value="value-1" /> @@ -66,7 +60,7 @@ Check the [Fieldset documentation](/docs/components-form-fieldset--example-radio id="radio-1" name="radio-group-1" required="required" - class="input input--outline" + class="input" value="value-2" /> diff --git a/app/components/stories/components/Radio.stories.js b/app/components/stories/components/Radio.stories.js index 0514a787..d0eccf88 100644 --- a/app/components/stories/components/Radio.stories.js +++ b/app/components/stories/components/Radio.stories.js @@ -5,44 +5,23 @@ export default { component: Radio, argTypes: { - variant: { - table: { - type: { - summary: ['string: outline, negative'], - }, - }, - options: ['outline', 'negative'], - control: { - type: 'select', - }, - }, required: { - control: { - type: 'boolean', - }, + control: { type: 'boolean' }, }, size: { table: { - type: { - summary: ['string: sm, base, lg'], - }, + type: { summary: ['string: sm, base, lg'] }, }, options: ['sm', 'base', 'lg'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, message: {}, messageType: { table: { - type: { - summary: ['string: error, warning, success, info'], - }, + type: { summary: ['string: error, warning, success, info'] }, }, options: ['error', 'warning', 'success', 'info'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, }, } @@ -58,7 +37,6 @@ export const Example = { `, }), args: { - variant: 'outline', size: 'base', label: 'Label', name: 'radio-name', @@ -66,19 +44,13 @@ export const Example = { }, } -export const NegativeRadio = { - render: () => ({ - template: ``, - }), -} - export const DisabledRadio = { render: () => ({ template: ` - - - - + + + dark-themed disabled radio + dark-themed disabled checked radio `, }), } @@ -86,9 +58,9 @@ export const DisabledRadio = { export const SizesRadio = { render: () => ({ template: ` - - - + + + `, }), } @@ -102,7 +74,7 @@ export const RequiredRadio = { - + Label for value one @@ -110,7 +82,7 @@ export const RequiredRadio = { - + Label for value two @@ -118,7 +90,7 @@ export const RequiredRadio = { - + Label for value three @@ -138,7 +110,7 @@ export const MessageRadio = { - + Label for value one @@ -146,7 +118,7 @@ export const MessageRadio = { - + Label for value two @@ -154,7 +126,7 @@ export const MessageRadio = { - + Label for value three diff --git a/app/components/stories/components/Select.mdx b/app/components/stories/components/Select.mdx index c13d56bc..2bd02be5 100644 --- a/app/components/stories/components/Select.mdx +++ b/app/components/stories/components/Select.mdx @@ -12,12 +12,6 @@ import * as SelectStories from './Select.stories' -## Select negative type - -- `input--negative` for standard textareas on dark background - - - ## Select disabled state - `input--disabled` or `disabled state on the input` to add the disabled style diff --git a/app/components/stories/components/Select.stories.js b/app/components/stories/components/Select.stories.js index d611ed45..98a100fb 100644 --- a/app/components/stories/components/Select.stories.js +++ b/app/components/stories/components/Select.stories.js @@ -5,51 +5,28 @@ export default { component: Select, argTypes: { - variant: { - table: { - type: { - summary: ['string: outline, negative'], - }, - }, - options: ['outline', 'negative'], - control: { - type: 'select', - }, - }, required: { - control: { - type: 'boolean', - }, + control: { type: 'boolean' }, }, bare: {}, size: { table: { - type: { - summary: ['string: sm, base, lg'], - }, + type: { summary: ['string: sm, base, lg'] }, }, options: ['sm', 'base', 'lg'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, label: {}, hideLabel: { - control: { - type: 'boolean', - }, + control: { type: 'boolean' }, }, message: {}, messageType: { table: { - type: { - summary: ['string: error, warning, success, info'], - }, + type: { summary: ['string: error, warning, success, info'] }, }, options: ['error', 'warning', 'success', 'info'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, }, } @@ -68,7 +45,6 @@ export const Example = { `, }), args: { - variant: 'outline', bare: false, size: 'base', label: 'Label', @@ -78,31 +54,11 @@ export const Example = { }, } -export const NegativeSelect = { - render: () => ({ - template: ` - - - Choose your country - Switzerland - Swaziland - Sweden - - - - - - - - `, - }), -} - export const DisabledSelect = { render: () => ({ template: ` - + Choose your country Switzerland Swaziland @@ -122,7 +78,7 @@ export const SmallSizesSelect = { render: () => ({ template: ` - + Small @@ -139,7 +95,7 @@ export const BaseSizesSelect = { render: () => ({ template: ` - + Default @@ -156,7 +112,7 @@ export const LargeSizesSelect = { render: () => ({ template: ` - + Large @@ -177,7 +133,7 @@ export const RequiredSelect = { Label - + Choose your country @@ -205,7 +161,7 @@ export const MessagesSelect = { Label - + Choose your country diff --git a/app/components/stories/components/Separator.mdx b/app/components/stories/components/Separator.mdx index cab6d0a1..b7a71519 100644 --- a/app/components/stories/components/Separator.mdx +++ b/app/components/stories/components/Separator.mdx @@ -16,10 +16,3 @@ A separator is an horizonal line, helping to separate content visually. ## Separator with spacings - -## Negative Separator - - diff --git a/app/components/stories/components/Separator.stories.js b/app/components/stories/components/Separator.stories.js index 345bc715..c482e0c4 100644 --- a/app/components/stories/components/Separator.stories.js +++ b/app/components/stories/components/Separator.stories.js @@ -7,7 +7,7 @@ export const Separator = { template: ` Content above - + Content below `, @@ -25,20 +25,3 @@ export const SeparatorSpacings = { `, }), } - -export const SeparatorNegative = { - parameters: { - backgrounds: { - default: 'Dark', - }, - }, - render: () => ({ - template: ` - - Content above - - Content below - - `, - }), -} diff --git a/app/components/stories/components/Table.stories.js b/app/components/stories/components/Table.stories.js index 8417132a..14bbf682 100644 --- a/app/components/stories/components/Table.stories.js +++ b/app/components/stories/components/Table.stories.js @@ -7,14 +7,10 @@ export default { argTypes: { variant: { table: { - type: { - summary: ['string: default, compact'], - }, + type: { summary: ['string: default, compact'] }, }, options: ['default', 'compact'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, }, } diff --git a/app/components/stories/components/Tabs.mdx b/app/components/stories/components/Tabs.mdx index 6b9ce303..ede4b862 100644 --- a/app/components/stories/components/Tabs.mdx +++ b/app/components/stories/components/Tabs.mdx @@ -17,7 +17,7 @@ If you want to add vertical spacing to the content of your tab, add the class `. While it is not advised to use more than 4 tabs, it can happen that the tabs are too large or too many to fit in the available space. In this case, the tabcontainer can be made to overflow. -If the tabs are placed in a grey container (`.bg--secondary-50`), the colors will update accordingly. +If the tabs are placed in a grey container (`.bg--accent-01`), the colors will update accordingly. diff --git a/app/components/stories/components/Tabs.stories.js b/app/components/stories/components/Tabs.stories.js index 39485997..f079f846 100644 --- a/app/components/stories/components/Tabs.stories.js +++ b/app/components/stories/components/Tabs.stories.js @@ -17,6 +17,6 @@ export const LargeExample = { render: () => ({ components: { TabsLarge }, template: - '', + '', }), } diff --git a/app/components/stories/components/Textarea.mdx b/app/components/stories/components/Textarea.mdx index 721c578c..74623733 100644 --- a/app/components/stories/components/Textarea.mdx +++ b/app/components/stories/components/Textarea.mdx @@ -11,15 +11,6 @@ import * as TextareaStories from './Textarea.stories' -## Textarea negative type - -- `input--negative` for standard textareas on dark background - - - ## Textarea disabled state - `input--disabled` or `disabled state on the input` to add the disabled style diff --git a/app/components/stories/components/Textarea.stories.js b/app/components/stories/components/Textarea.stories.js index d9225f21..02ffdea3 100644 --- a/app/components/stories/components/Textarea.stories.js +++ b/app/components/stories/components/Textarea.stories.js @@ -5,43 +5,22 @@ export default { component: Textarea, argTypes: { - variant: { - table: { - type: { - summary: ['string: outline, negative'], - }, - }, - options: ['outline', 'negative'], - control: { - type: 'select', - }, - }, required: { - control: { - type: 'boolean', - }, + control: { type: 'boolean' }, }, size: { table: { - type: { - summary: ['string: sm, base, lg'], - }, + type: { summary: ['string: sm, base, lg'] }, }, options: ['sm', 'base', 'lg'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, messageType: { table: { - type: { - summary: ['string: error, warning, success, info'], - }, + type: { summary: ['string: error, warning, success, info'] }, }, options: ['error', 'warning', 'success', 'info'], - control: { - type: 'select', - }, + control: { type: 'select' }, }, }, } @@ -53,7 +32,6 @@ export const Example = { template: ``, }), args: { - variant: 'outline', size: 'base', label: 'Label', name: 'textarea-name', @@ -62,18 +40,11 @@ export const Example = { }, } -export const NegativeTextarea = { - render: () => ({ - template: ``, - }), -} - export const DisabledTextarea = { render: () => ({ template: ` - Disabled - Disabled and negative + Disabled `, }), @@ -83,9 +54,9 @@ export const SizesTextarea = { render: () => ({ template: ` - Small - Default - Large + Small + Default + Large `, }), @@ -98,7 +69,7 @@ export const RequiredTextarea = { Your message - + `, }), @@ -111,7 +82,7 @@ export const MessagesTextarea = { Your message - + This field is required diff --git a/app/components/stories/components/Video.mdx b/app/components/stories/components/Video.mdx index 3a43944b..ecce35c1 100644 --- a/app/components/stories/components/Video.mdx +++ b/app/components/stories/components/Video.mdx @@ -14,7 +14,7 @@ If the video need a label, use the `figure` and `figcaption`combination. 4/3 video in a tight and centered container - + Geoinformation - Alles findet irgendwo statt — © Swiss Geoportal @@ -18,7 +18,7 @@ export const Example = { 16/9 video in a medium and centered container - + Geoinformation - Alles findet irgendwo statt — © Swiss Geoportal diff --git a/app/components/stories/foundations/Icons.stories.js b/app/components/stories/foundations/Icons.stories.js index ac3bf77f..b20d285a 100644 --- a/app/components/stories/foundations/Icons.stories.js +++ b/app/components/stories/foundations/Icons.stories.js @@ -9,7 +9,7 @@ export const List = {} export const Example = { render: () => ({ - template: ` + template: ` @@ -51,7 +51,7 @@ export const Example = { export const SpinningIcon = { render: () => ({ - template: ` + template: ` `, }), diff --git a/app/components/stories/foundations/backgrounds/Backgrounds.stories.js b/app/components/stories/foundations/backgrounds/Backgrounds.stories.js index 63a6aeb3..ca6e68d4 100644 --- a/app/components/stories/foundations/backgrounds/Backgrounds.stories.js +++ b/app/components/stories/foundations/backgrounds/Backgrounds.stories.js @@ -5,6 +5,40 @@ export default { export const Example = { render: () => ({ template: ` + + + bg--accent-01 + + + + + + + bg--accent-02 + + + + + + + bg--accent-03 + + + + + + + bg--accent-04 + + + + + + + bg--main + + + bg--secondary-900 diff --git a/app/components/stories/foundations/favicon/Favicon.mdx b/app/components/stories/foundations/favicon/Favicon.mdx index a73a483e..132e1eea 100644 --- a/app/components/stories/foundations/favicon/Favicon.mdx +++ b/app/components/stories/foundations/favicon/Favicon.mdx @@ -2,7 +2,7 @@ import { Meta, Story, Canvas } from '@storybook/blocks' - + # Favicon diff --git a/app/components/stories/foundations/fonts/Colors.mdx b/app/components/stories/foundations/fonts/Colors.mdx index 2e2e3a65..b99d9d26 100644 --- a/app/components/stories/foundations/fonts/Colors.mdx +++ b/app/components/stories/foundations/fonts/Colors.mdx @@ -3,17 +3,24 @@ import * as ColorsStories from './Colors.stories' -# Text colors +The first story depicts the colors that are currently in use and are able to switch between light and dark mode. +All other stories below show the old color values for reference but should not be used. + +# New Light/Darkmode colors + + + +# Text colors (deprecated) Text colors should be automatically defined. You can force them with specific classes though: -# Negative color +# Negative color (deprecated) -# All text color variants +# All text color variants (deprecated) Colors have a complete spectrum based on Tailwind configuration. Use them with precaution and be sure the contrast fit the accessibility recommendations. @@ -21,7 +28,7 @@ Colors have a complete spectrum based on Tailwind configuration. Use them with p -# Flexible Colors for future projects +# Flexible Colors for future projects (deprecated) For future projects, if you generate the CSS by your own, it's possible to use not only the mentioned colors above, but the whole palette of colors declared in the Tailwind config and all its variations. diff --git a/app/components/stories/foundations/fonts/Colors.stories.js b/app/components/stories/foundations/fonts/Colors.stories.js index b42014dc..5c4c0801 100644 --- a/app/components/stories/foundations/fonts/Colors.stories.js +++ b/app/components/stories/foundations/fonts/Colors.stories.js @@ -5,6 +5,19 @@ export default { component: ColorList, } +export const LightDarkModeColors = { + render: () => ({ + template: ` + color--text-contrast + color--text-disabled + color--text-label + color--text-main + color--text-quote + color--text-selected + `, + }), +} + export const TextColors = { render: () => ({ template: ` @@ -17,7 +30,7 @@ export const TextColors = { export const NegativeColor = { render: () => ({ - template: ` + template: ` color--negative `, }), @@ -27,16 +40,16 @@ export const AllColorVariantsDefault = { render: () => ({ template: ` color--text-900 - color--text-800 – default text color + color--text-800 - default text color color--text-700 color--text-600 - color--text-500 – still AA Accessible on white backgrounds - color--text-400 - color--text-300 - color--text-200 - color--text-100 - color--text-50 - color--white + color--text-500 - still AA Accessible on white backgrounds + color--text-400 + color--text-300 + color--text-200 + color--text-100 + color--text-50 + color--white `, }), } @@ -47,14 +60,14 @@ export const AllColorVariantsPrimary = { color--primary-900 color--primary-800 color--primary-700 - color--primary-600 – default link color + color--primary-600 - default link color color--primary-500 - color--primary-400 - color--primary-300 - color--primary-200 - color--primary-100 - color--primary-50 - color--white + color--primary-400 + color--primary-300 + color--primary-200 + color--primary-100 + color--primary-50 + color--white `, }), } diff --git a/app/components/stories/layout/Containers.mdx b/app/components/stories/layout/Containers.mdx index cc0c2704..789a6559 100644 --- a/app/components/stories/layout/Containers.mdx +++ b/app/components/stories/layout/Containers.mdx @@ -87,11 +87,11 @@ The default full width of `container` is used for hub pages and homepage. It's g ```html - + Section title - + @@ -186,10 +186,10 @@ Then, the content can be rythmed by consecutive sections with different backgrou - + - + diff --git a/app/components/stories/layout/General.mdx b/app/components/stories/layout/General.mdx index 03f2372a..233ffeac 100644 --- a/app/components/stories/layout/General.mdx +++ b/app/components/stories/layout/General.mdx @@ -11,7 +11,7 @@ Schematically, a `section` contains a `container`. ```html - + @@ -23,7 +23,7 @@ Apply the `container--grid` variant to create a 12 cols grid container. ```html - + diff --git a/app/components/stories/layout/Grids.mdx b/app/components/stories/layout/Grids.mdx index 8ce1210b..86182dcd 100644 --- a/app/components/stories/layout/Grids.mdx +++ b/app/components/stories/layout/Grids.mdx @@ -125,9 +125,9 @@ The following html strucuture will display 1 column on mobile, 3 columns on tabl Here are visual examples of the grid above: -import gridImage1 from '../../../public/images/grid-example-1.png' -import gridImage2 from '../../../public/images/grid-example-2.png' -import gridImage3 from '../../../public/images/grid-example-3.png' +import gridImage1 from '../../../assets/images/grid-example-1.png' +import gridImage2 from '../../../assets/images/grid-example-2.png' +import gridImage3 from '../../../assets/images/grid-example-3.png' **Mobile view** diff --git a/app/components/stories/layout/Sections.mdx b/app/components/stories/layout/Sections.mdx index bb92a3dc..d8a1f1fa 100644 --- a/app/components/stories/layout/Sections.mdx +++ b/app/components/stories/layout/Sections.mdx @@ -18,14 +18,14 @@ After section's content, a `.section__action` wraps a potential link, inviting t # Dark sections -If you define a dark background (`.bg--secondary-[variant]` where `variant ≥ 500`) the `.section__title` will turn automatically to white. In other contexts, you can force negative color with `.section__title--negative`. +If you define a dark background (`.bg--secondary-[variant]` where `variant ≥ 500` or `.bg--accent-[variant]` where `variant = 03 || 04`) the `.section__title` will turn automatically to white. In other contexts, you can force negative color with `.section__title--negative`. # Paddings for sections - `.section.section--default` and -- `.section.bg--secondary-[color-variant]` add top and bottom paddings to the section. +- `.section.bg--[secondary || accent]-[color-variant]` add top and bottom paddings to the section. - consecutive sections with the same background color removes the double spacing automatically. - consecutive `.container` elements adds a top padding to the second container. diff --git a/app/components/stories/layout/Sections.stories.js b/app/components/stories/layout/Sections.stories.js index 91c73008..fe33aaf5 100644 --- a/app/components/stories/layout/Sections.stories.js +++ b/app/components/stories/layout/Sections.stories.js @@ -16,7 +16,7 @@ export const MainContentExample = { export const Titles = { render: () => ({ template: ` - + Section title Section subtitle @@ -38,7 +38,7 @@ export const Titles = { export const DarkSections = { render: () => ({ template: ` - + Negative section title @@ -74,13 +74,13 @@ export const Paddings = { - + Section with top and bottom paddings - + Section with padding bottom only (padding top is removed because previous section has the same background color) @@ -92,7 +92,7 @@ export const Paddings = { - + Section with top and padding bottom diff --git a/app/components/stories/layout/Spacings.mdx b/app/components/stories/layout/Spacings.mdx index f5098f96..27bf52af 100644 --- a/app/components/stories/layout/Spacings.mdx +++ b/app/components/stories/layout/Spacings.mdx @@ -11,7 +11,7 @@ In order to set vertical spacings between generic DOM elements (created in a WYS ```html - + @@ -28,7 +28,7 @@ In order to set vertical spacings between generic DOM elements (created in a WYS ```html - + diff --git a/app/components/stories/layout/Spacings.stories.js b/app/components/stories/layout/Spacings.stories.js index 89c5609f..83de296a 100644 --- a/app/components/stories/layout/Spacings.stories.js +++ b/app/components/stories/layout/Spacings.stories.js @@ -5,89 +5,85 @@ export default { export const WithVerticalSpacing = { render: () => ({ template: ` - - - - Title H3 - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat - - - - - - - - - - - Image label here — © Photograph Name - - - - Title H3 - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat - - - - `, + + + Title H3 + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat + + + + + + + + + + + Image label here — © Photograph Name + + + + Title H3 + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat + + + `, }), } export const WithoutVerticalSpacing = { render: () => ({ template: ` - - - - Title H3 - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat - - - - - - - - - - - Image label here — © Photograph Name - - - - Title H3 - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat - - - - `, + + + Title H3 + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat + + + + + + + + + + + Image label here — © Photograph Name + + + + Title H3 + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat + + + `, }), } diff --git a/app/components/stories/pages/FreebrandPageSimple.mdx b/app/components/stories/pages/FreebrandPageSimple.mdx index ae000733..1cb6ecf7 100644 --- a/app/components/stories/pages/FreebrandPageSimple.mdx +++ b/app/components/stories/pages/FreebrandPageSimple.mdx @@ -22,6 +22,8 @@ Freebrand design. See bottom of page for configuration options. Overwrite the colors by setting the color style attributes on the body +{/* TODO: Change documentation for dark modes */} + ```javascript const freebrandColors = [ { key: '--color-primary-50', value: '#eaffe9' }, diff --git a/app/components/stories/sections/Breadcrumb.stories.js b/app/components/stories/sections/Breadcrumb.stories.js index e1b8b5d4..facd0d23 100644 --- a/app/components/stories/sections/Breadcrumb.stories.js +++ b/app/components/stories/sections/Breadcrumb.stories.js @@ -1,17 +1,9 @@ import Breadcrumb from '../../ch/sections/Breadcrumb.vue' export default { - render: (args) => ({ - setup: () => ({ args }), - components: { Breadcrumb }, - template: ` - - - - `, - }), title: 'Sections/Header/Breadcrumb', component: Breadcrumb, + decorators: [() => ({ template: '' })], } export const Example = {} diff --git a/app/components/stories/sections/DesktopMenu.stories.js b/app/components/stories/sections/DesktopMenu.stories.js index 5985f814..5eb7f700 100644 --- a/app/components/stories/sections/DesktopMenu.stories.js +++ b/app/components/stories/sections/DesktopMenu.stories.js @@ -3,6 +3,7 @@ import DesktopMenu from '../../ch/sections/DesktopMenu.vue' export default { title: 'Sections/Header/DesktopMenu', component: DesktopMenu, + decorators: [() => ({ template: '' })], } export const Example = { diff --git a/app/components/stories/sections/FooterInformation.stories.js b/app/components/stories/sections/FooterInformation.stories.js index 187782fd..9d1b637d 100644 --- a/app/components/stories/sections/FooterInformation.stories.js +++ b/app/components/stories/sections/FooterInformation.stories.js @@ -3,6 +3,7 @@ import FooterInformation from '../../ch/sections/FooterInformation.vue' export default { title: 'Sections/Footer/FooterInformation', component: FooterInformation, + decorators: [() => ({ template: '' })], } export const Example = {} diff --git a/app/components/stories/sections/FooterNavigation.stories.js b/app/components/stories/sections/FooterNavigation.stories.js index a1abae26..38815729 100644 --- a/app/components/stories/sections/FooterNavigation.stories.js +++ b/app/components/stories/sections/FooterNavigation.stories.js @@ -3,6 +3,7 @@ import FooterNavigation from '../../ch/sections/FooterNavigation.vue' export default { title: 'Sections/Footer/FooterNavigation', component: FooterNavigation, + decorators: [() => ({ template: '' })], } export const Example = {} diff --git a/app/components/stories/sections/MobileMenu.stories.js b/app/components/stories/sections/MobileMenu.stories.js index 00b84dd8..45f5e0a0 100644 --- a/app/components/stories/sections/MobileMenu.stories.js +++ b/app/components/stories/sections/MobileMenu.stories.js @@ -3,6 +3,7 @@ import MobileMenu from '../../ch/sections/MobileMenu.vue' export default { title: 'Sections/Header/MobileMenu', component: MobileMenu, + decorators: [() => ({ template: '' })], } export const Example = { diff --git a/app/components/stories/sections/QuoteSection.mdx b/app/components/stories/sections/QuoteSection.mdx index e4492024..33ef3b28 100644 --- a/app/components/stories/sections/QuoteSection.mdx +++ b/app/components/stories/sections/QuoteSection.mdx @@ -14,10 +14,10 @@ import * as QuoteSectionStories from './QuoteSection.stories' The recommended background colors for the section are the following: - white -- secondary-50 -- secondary-100 -- secondary-500 -- secondary-600 +- accent-01 +- accent-02 +- accent-03 +- accent-04 {'Go to the Canvas Tab'} diff --git a/app/components/stories/sections/QuoteSection.stories.js b/app/components/stories/sections/QuoteSection.stories.js index 8a988d65..21fad96c 100644 --- a/app/components/stories/sections/QuoteSection.stories.js +++ b/app/components/stories/sections/QuoteSection.stories.js @@ -9,16 +9,16 @@ export default { table: { type: { summary: [ - 'string: white, secondary-50, secondary-100, secondary-500, secondary-600', + 'string: white, accent-01, accent-02, accent-03, accent-04', ], }, }, options: [ 'white', - 'secondary-50', - 'secondary-100', - 'secondary-500', - 'secondary-600', + 'accent-01', + 'accent-02', + 'accent-03', + 'accent-04', ], control: { type: 'select', @@ -45,6 +45,6 @@ export const Example = { }, caption: 'Image one caption — © Photograph Name', }, - background: 'secondary-50', + background: 'accent-01', }, } diff --git a/app/components/stories/sections/TopBar.stories.js b/app/components/stories/sections/TopBar.stories.js index e9e23f85..4ea99f0b 100644 --- a/app/components/stories/sections/TopBar.stories.js +++ b/app/components/stories/sections/TopBar.stories.js @@ -8,6 +8,7 @@ export default { table: { category: 'props' }, }, }, + decorators: [() => ({ template: '' })], } export const Example = { diff --git a/app/components/stories/sections/TopHeader.stories.js b/app/components/stories/sections/TopHeader.stories.js index 3e823a5c..ab9ec5bd 100644 --- a/app/components/stories/sections/TopHeader.stories.js +++ b/app/components/stories/sections/TopHeader.stories.js @@ -3,6 +3,7 @@ import TopHeader from '../../ch/sections/TopHeader.vue' export default { title: 'Sections/Header/TopHeader', component: TopHeader, + decorators: [() => ({ template: '' })], } export const Example = {} diff --git a/app/package.json b/app/package.json index f7f09069..fdf30f72 100644 --- a/app/package.json +++ b/app/package.json @@ -9,7 +9,7 @@ "start": "nuxi preview", "storybook": "storybook dev --no-open -p 6006", "build-storybook": "storybook build", - "chromatic": "chromatic --project-token=a59f72b20002", + "chromatic": "chromatic --project-token=chpt_d750d8f88584b59", "check": "pnpm check:format && pnpm check:ts:vue && pnpm check:lint", "check:format": "prettier --check \"./**/*.{ts,js,mjs,vue,mdx,md,css,postcss}\"", "check:format:fix": "prettier --write \"./**/*.{ts,js,mjs,vue,mdx,md,css,postcss}\"", @@ -19,29 +19,29 @@ }, "dependencies": { "pinia": "^2.3.1", - "swiper": "^11.2.1", - "uuid": "^11.0.5", + "swiper": "^11.2.5", + "uuid": "^11.1.0", "vue": "^3.5.13", "vue-inline-svg": "^3.1.4", "vue-select": "4.0.0-beta.6" }, "devDependencies": { - "@eslint/js": "^9.19.0", + "@eslint/js": "^9.21.0", "@nuxt/eslint": "^0.7.5", "@nuxtjs/tailwindcss": "^6.13.1", - "@pinia/nuxt": "^0.9.0", - "@storybook/addon-a11y": "^8.5.2", - "@storybook/addon-actions": "^8.5.2", - "@storybook/addon-designs": "8.0.4", - "@storybook/addon-docs": "^8.5.2", - "@storybook/addon-essentials": "^8.5.2", - "@storybook/addon-links": "^8.5.2", - "@storybook/blocks": "^8.5.2", - "@storybook/manager-api": "^8.5.2", - "@storybook/preview-api": "^8.5.2", - "@storybook/theming": "^8.5.2", - "@storybook/vue3": "^8.5.2", - "@storybook/vue3-vite": "^8.5.2", + "@pinia/nuxt": "^0.10.1", + "@storybook/addon-a11y": "^8.6.3", + "@storybook/addon-actions": "^8.6.3", + "@storybook/addon-designs": "8.2.0", + "@storybook/addon-docs": "^8.6.3", + "@storybook/addon-essentials": "^8.6.3", + "@storybook/addon-links": "^8.6.3", + "@storybook/blocks": "^8.6.3", + "@storybook/manager-api": "^8.6.3", + "@storybook/preview-api": "^8.6.3", + "@storybook/theming": "^8.6.3", + "@storybook/vue3": "^8.6.3", + "@storybook/vue3-vite": "^8.6.3", "@types/eslint-config-prettier": "^6.11.3", "@types/eslint__js": "^8.42.3", "@types/uuid": "^10.0.0", @@ -50,20 +50,19 @@ "@vueform/multiselect": "^2.6.11", "@whitespace/storybook-addon-html": "^6.1.1", "acorn": "^8.14.0", - "chromatic": "^11.25.1", + "chromatic": "^11.27.0", "eslint": "^9.19.0", "eslint-config-prettier": "^10.0.1", "eslint-plugin-vue": "^9.32.0", "jsdoc-type-pratt-parser": "^4.1.0", - "nuxt": "^3.15.3", - "postcss": "^8.5.1", - "prettier": "^3.4.2", - "remark-gfm": "^4.0.0", - "storybook": "^8.5.2", - "svg-inline-loader": "^0.8.2", - "typescript": "^5.7.3", - "typescript-eslint": "^8.22.0", - "vite": "^6.0.11", + "nuxt": "^3.15.4", + "postcss": "^8.5.3", + "prettier": "^3.5.3", + "remark-gfm": "^4.0.1", + "storybook": "^8.6.3", + "typescript": "^5.8.2", + "typescript-eslint": "^8.26.0", + "vite": "^6.2.0", "vue-tsc": "^2.2.0" }, "readme": "ERROR: No README data found!", diff --git a/app/pages/SearchResultsFilters.vue b/app/pages/SearchResultsFilters.vue index 3bc23739..5dafb26c 100644 --- a/app/pages/SearchResultsFilters.vue +++ b/app/pages/SearchResultsFilters.vue @@ -9,7 +9,7 @@ - + Search Results @@ -55,7 +55,6 @@ - - - - - Skip to main content - - - - - - - - - - - - - - Symposium Extremhochwasser in der Schweiz - - - - - - - - - - - + + + + Skip to main content + + + + + + + + + + + + + Symposium Extremhochwasser in der Schweiz + + + + + + + + + + - - - - Event Date - - - 10 - Apr - - – - - 11 - Apr - 2023 - + + + + Event Date + + + 10 + Apr - - Friday 18:00 – 21:00 - Saturday 10:00 – 17:00 + – + + 11 + Apr + 2023 - - - - - + + Friday 18:00 – 21:00 + Saturday 10:00 – 17:00 - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean - euismod bibendum laoreet. Proin gravida dolor sit amet lacus - accumsan et viverra justo commodo. Proin sodales pulvinar - tempor. - - - Aenean euismod bibendum laoreet. Proin gravida dolor sit amet - lacus accumsan et viverra justo commodo. Proin sodales pulvinar - tempor. - + + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean + euismod bibendum laoreet. Proin gravida dolor sit amet lacus + accumsan et viverra justo commodo. Proin sodales pulvinar tempor. + + + Aenean euismod bibendum laoreet. Proin gravida dolor sit amet + lacus accumsan et viverra justo commodo. Proin sodales pulvinar + tempor. + - Veranstaltungsdetails + Veranstaltungsdetails - - - Anmeldung zwingend. - Anmeldefrist: 10. Dezember 2023 - + + + Anmeldung zwingend. + Anmeldefrist: 10. Dezember 2023 + - - Deutsch - + + Deutsch + - - - + + + - - - + + + - - - - Prices entries - - - - Children under 12 - Free - - - Students under 18, with ID - CHF 10.– - - - AHV - CHF 10.– - - - Adults - CHF 15.– - - - Families - CHF 30.– - - - Handicapped visitors - Free - - - Swiss Museums pass - Free - - - - + + + + Prices entries + + + + Children under 12 + Free + + + Students under 18, with ID + CHF 10.– + + + AHV + CHF 10.– + + + Adults + CHF 15.– + + + Families + CHF 30.– + + + Handicapped visitors + Free + + + Swiss Museums pass + Free + + + + - - - - - - - - - - - + + + + + + + + + + + - - FAQ - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Aenean euismod bibendum laoreet. Proin gravida dolor - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Aenean euismod bibendum laoreet. Proin gravida dolor - - - - + + FAQ + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Aenean euismod bibendum laoreet. Proin gravida dolor + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Aenean euismod bibendum laoreet. Proin gravida dolor + + + + - - Themen - - + + Themen + - - - - - Event Date - - - 10 - Apr - - – - - 11 - Apr - 2023 - + + + + + + Event Date + + + 10 + Apr - - Friday 18:00 – 21:00 - Saturday 10:00 – 17:00 + – + + 11 + Apr + 2023 - - - - - + + Friday 18:00 – 21:00 + Saturday 10:00 – 17:00 + + + + + + - - - - - - - - - - + + + + + + + + + +
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum - nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida - purus et ipsum placerat -
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ipsum + nisl, ultricies quis aliquet ac, ultrices nec felis. Proin gravida + purus et ipsum placerat +
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean - euismod bibendum laoreet. Proin gravida dolor sit amet lacus - accumsan et viverra justo commodo. Proin sodales pulvinar - tempor. -
- Aenean euismod bibendum laoreet. Proin gravida dolor sit amet - lacus accumsan et viverra justo commodo. Proin sodales pulvinar - tempor. -
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean + euismod bibendum laoreet. Proin gravida dolor sit amet lacus + accumsan et viverra justo commodo. Proin sodales pulvinar tempor. +
+ Aenean euismod bibendum laoreet. Proin gravida dolor sit amet + lacus accumsan et viverra justo commodo. Proin sodales pulvinar + tempor. +
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Aenean euismod bibendum laoreet. Proin gravida dolor -
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Aenean euismod bibendum laoreet. Proin gravida dolor +