Skip to content

@shopware/cms-base-layer@2.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Dec 13:39
· 69 commits to main since this release
a6376b3

Major Changes

  • #1944 c41a839 Thanks @mkucmus! - Updates the @shopware/cms-base-layer package with the following changes:

    • Adds support for the new SwQuantitySelect component
    • Updates the SwProductAddToCart component to use the new SwQuantitySelect component
    • Fixes the Status component to use the new state classes
    • Updates the uno.config.ts file to include default styling that can be used and extended in the end-project:

    Nuxt UnoCSS Configuration Example

    // nuxt.config.ts in your end-project
    {
      unocss: {
        nuxtLayers: true; // enable Nuxt layers support in order to merge UnoCSS configurations
      }
    }

    UnoCSS Configuration Example

    // uno.config.ts in your end-project
    import { mergeConfigs } from "@unocss/core";
    import baseConfig from "./.nuxt/uno.config.mjs";
    
    export default mergeConfigs(baseConfig, {
      // will be merged with the base config - all optional
      theme: {
        colors: {
          "brand-primary": "#ff3e00",
          "brand-secondary": "#ff6a00",
        },
      },
      safelist: ["states-success"],
      preflights: [
        {
          getCSS: () => `
            body {
                font-family: 'Inter', sans-serif;
                -moz-osx-font-smoothing: grayscale;
                -webkit-font-smoothing: antialiased;
            }
            `,
        },
      ],
    });

Minor Changes

  • #2030 22ff62e Thanks @mkucmus! - Introduce new UI components, refine listing filters (structure and UX), add global collapse animations, and improve type safety.

    Features

    • New UI components:
      • SwFilterChips – shows active filters as removable chips
      • SwSortDropdown – sorting dropdown
      • SwProductListingPagination – listing pagination
      • Checkbox – reusable checkbox
      • ChevronIcon – configurable chevron (up/down/left/right)
      • RadioButton – reusable radio button
      • SwitchButton – toggle switch

    Refactors

    • SwFilterProperties:
      • Replace computed factory with isChecked() and selectValue() helpers for better performance and readability.
    • Filter collapse animation:
      • Unified expand/collapse animations for SwFilterProperties, SwFilterRating, SwFilterShippingFree, and SwFilterPrice using UnoCSS preflights.

    TypeScript fixes

    • SwProductListingFilters:
      • Provide fallbacks (?? [], ?? '') when passing getSortingOrders and getCurrentSortingOrder.
    • SwFilterChips:
      • Relax prop types to accept union types compatible with both full Shopware schemas and simplified helper types.

    Code quality improvements

    • SwFilterPrice:
      • Remove unnecessary optional chaining on props.selectedFilters to prevent masking undefined errors
    • Checkbox component:
      • Replace outline-blue-500 with outline-brand-primary for brand consistency
      • Make label prop optional to support checkbox-only pattern
    • SwFilterShippingFree:
      • Add i18n support using useCmsTranslations instead of hardcoded "free delivery" text
    • SwFilterProperties:
      • Remove unnecessary empty label prop from Checkbox usage

    Note: Transition classes are globally available via UnoCSS preflights.

  • #2139 20d1066 Thanks @mkucmus! - Added a new SwProductReviewsForm component that allows logged-in customers to submit product reviews.

  • #1959 c77daa6 Thanks @patzick! - Updated default types to Shopware 6.7

  • #2176 c647baf Thanks @mkucmus! - - Extract product listing data early from CMS page responses to enable SSR rendering

    • Remove ClientOnly wrappers from SwProductListingFilters and SwFilterChips components
    • Resolve hydration mismatches on category pages with filters

Patch Changes