Releases: swisspost/design-system
@swisspost/[email protected]
@swisspost/[email protected]
@swisspost/[email protected]
Major Changes
-
Updated styles for elements slotted in the
post-headercomponent. Slotted lists should now omit the.list-inlineclass and will be automatically styled as part of thepost-header.
Keeping the.list-inlineclass will cause incorrect spacing between header elements. (by @alizedebray with #6661) -
Removed the
traget-group.cssfile, target group styles are now bundled with thepost-headerstyles. The.traget-groupclass no longer exist and the component will only work when placed into apost-header. (by @alizedebray with #6661) -
Refactored the icon mixins so that icons no longer need to be included separately, imports are now handled automatically. The
custom-propertymixin as therefore be removed entirely.The
iconmixin arguments have also been updated:$heightand$widthhave been replaced with a single$sizesince all icons are square. (by @alizedebray with #6836) -
Removed the subnavigation component in favor of page tabs. (by @alizedebray with #6913)
Minor Changes
-
Extended Swiss Post Sans font support with Extra Black (950) weight. (by @alizedebray with #6932)
-
Implemented a
Dividerhtml/css component using tokens for styles. Divider documentation is also added to /Components/Divider page. (by @bucknatt with #6783)
Patch Changes
-
Integrated the burger menu button into the
<post-header>by removing the previouspost-togglebuttonslot and introducing the requiredtextMenuprop. (by @myrta2302 with #6801) -
Fixed an issue where sections could overflow the body when a scrollbar was present due to incorrect width calculations. (by @alizedebray with #6933)
-
Update the
post-megadropdownto allow full customization of its content. Thepost-megadropdowncan now contain any HTML elements, not just lists of links.As a result, list styling is no longer applied automatically.
If you want a properly styled list of links, you must now add the requiredpost-megadropdown-*classes to the corresponding elements yourself.BEFORE:
<post-megadropdown id="packages" label-close="Close" label-back="Back"> <a class="post-megadropdown-overview" href="/packages">Overview Packages</a> <post-list> <p>Send packages</p> <post-list-item><a href="/sch">Packages Switzerland</a></post-list-item> <post-list-item><a href="/kl">Small goods international</a></post-list-item> </post-list> <post-list> <p><a href="/step-by-step">Step by step</a></p> <post-list-item><a href="/sch">Packages Switzerland</a></post-list-item> <post-list-item><a href="/kl">Small goods international</a></post-list-item> </post-list> </post-megadropdown>
AFTER:
<post-megadropdown id="packages" label-close="Close" label-back="Back"> <a class="post-megadropdown-overview" href="/packages">Overview Packages</a> <div class="row row-cols-1 row-cols-sm-2"> <div class="col"> <p class="post-megadropdown-list-title" id="send-packages">Send packages</p> <ul class="post-megadropdown-list" aria-labelledby="send-packages"> <li><a href="/sch">Packages Switzerland</a></li> <li><a href="/kl">Small goods international</a></li> </ul> </div> <div class="col"> <a class="post-megadropdown-list-title" id="step-by-step-packages" href="/step-by-step" >Step by step</a > <ul class="post-megadropdown-list" aria-labelledby="step-by-step-packages"> <li><a href="/sch">Packages Switzerland</a></li> <li><a href="/kl">Small goods international</a></li> </ul> </div> </div> </post-megadropdown> ``` (by [@alizedebray](https://github.com/alizedebray) with [#6891](https://github.com/swisspost/design-system/pull/6891))
-
Updated the
<post-header>component to show the local-header when the mobile menu is open and the page is scrolled. (by @myrta2302 with #6758) -
Removed
local-controlsandnavigation-controlsslots from thepost-headercomponent. Use the newlocal-navslot for all application-specific controls. (by @alizedebray with #6747) -
Simplified the
post-footercomponent by removing thepost-listandpost-list-item. The footer now only uses simpleulandlitags. (by @leagrdv with #6740) -
Updated dependencies:
- @swisspost/[email protected]
@swisspost/[email protected]
Patch Changes
- Updated dependencies:
- @swisspost/[email protected]
@swisspost/[email protected]
Minor Changes
-
Added icons:
2742,2743and2744(by @swisspost-bot with #6708) -
Added icons:
paintroll(solid): 40px (by @swisspost-bot with #6719)
-
Added icons:
2745,2746,2747and2748(by @swisspost-bot with #6760) -
Added icons:
adresschange(line & solid): 16, 24, 32, 40, 48 and 64pxalcoholicgoods(line & solid): 16, 24, 32, 40, 48 and 64pxanchor(line & solid): 16, 24, 32, 40, 48 and 64pxanimals(line & solid): 16, 24, 32, 40, 48 and 64pxartobjects(line & solid): 16, 24, 32, 40, 48 and 64pxbranchaccesspoint(line & solid): 16, 24, 32, 40, 48 and 64pxbranchhandover(line & solid): 16, 24, 32, 40, 48 and 64pxbranchselfservice(line & solid): 16, 24, 32, 40, 48 and 64pxbusstop(line & solid): 16, 24, 32, 40, 48 and 64pxcertificate(line & solid): 16, 24, 32, 40, 48 and 64pxdocumentcarnetata(line & solid): 16, 24, 32, 40, 48 and 64pxdocumentofficial(line & solid): 16, 24, 32, 40, 48 and 64pxdryice(line & solid): 16, 24, 32, 40, 48 and 64pxe(line & solid): 16, 24, 32, 40, 48 and 64pxexplosives(line & solid): 16, 24, 32, 40, 48 and 64pxhandsanitizer(line & solid): 16, 24, 32, 40, 48 and 64pxhorseshoe(line & solid): 16, 24, 32, 40, 48 and 64pxlacquer(line & solid): 16, 24, 32, 40, 48 and 64pxlayers(line & solid): 16, 24, 32, 40, 48 and 64pxmusic(line & solid): 16, 24, 32, 40, 48 and 64pxopensource(line & solid): 16, 24, 32, 40, 48 and 64pxpobox(line & solid): 16, 24, 32, 40, 48 and 64pxplant(line & solid): 16, 24, 32, 40, 48 and 64pxpreciousmetals(line & solid): 16, 24, 32, 40, 48 and 64pxproduct(line & solid): 16, 24, 32, 40, 48 and 64pxrelocation(line & solid): 16, 24, 32, 40, 48 and 64pxseed(line & solid): 16, 24, 32, 40, 48 and 64pxusb(line & solid): 16, 24, 32, 40, 48 and 64pxurn(line & solid): 16, 24, 32, 40, 48 and 64px (by @swisspost-bot with #6807)
-
Added icons:
bed(line & solid): 16, 24, 32, 40, 48 and 64pxhourglass(line & solid): 16, 24, 32, 40, 48 and 64px (by @swisspost-bot with #6860)
Patch Changes
-
Updated icons:
mypost24(line & solid): 16, 24, 32, 40, 48 and 64px (by @swisspost-bot with #6760)
-
Updated icons:
globemeridian(line): 16pxhandstop(solid): 16 and 24pxheart(solid): 40, 48 and 64pxlocationfavorite(line): 16pxplus(solid): 64pxsearchmenu(solid): 24, 32, 40, 48 and 64pxsend(solid): 16pxshipmentbroken(solid): 32pxtooth(solid): 64pxtourlist(solid): 16, 32, 40, 48 and 64pxwallet(solid): 16 and 24px (by @swisspost-bot with #6787)
-
Updated icons:
brain(line & solid): 16, 24, 32, 40, 48 and 64pxdocumentonenote(line & solid): 16, 24, 32, 40, 48 and 64pxlinkedin(solid): 16, 24, 32, 40, 48 and 64pxmailcarrier(line): 16, 24, 32, 40, 48 and 64pxqrcode(line & solid): 16, 24, 32, 40, 48 and 64pxsnapchat(solid): 16, 24, 32, 40, 48 and 64pxstreetviewsatellite(line & solid): 16, 24, 32, 40, 48 and 64pxstreetviewterrain(line & solid): 16, 24, 32, 40, 48 and 64pxtwitterx(line & solid): 16, 24, 32, 40, 48 and 64pxwhatsapp(solid): 16, 24, 32, 40, 48 and 64pxxing(line & solid): 16, 24, 32, 40, 48 and 64pxyoutube(solid): 16, 24, 32, 40, 48 and 64pxkununu(solid): 16, 24, 32, 40, 48 and 64px (by @swisspost-bot with #6832)
@swisspost/[email protected]
@swisspost/[email protected]
@swisspost/[email protected]
Major Changes
-
Updated
post-headerto prevent unnecessary h-tags. An h-tag can now only be used for the header title in microsite or one-page variants, other elements no longer use h-tags. (by @alizedebray with #6693) -
Renamed
post-tabsparts to avoid naming confusions with other components.::part(tabs)is now::part(post-tabs).::part(content)is now::part(post-tabs-content). (by @alionazherdetska with #6806)
-
Updated the
post-accordionandpost-accordion-itemstyles to fully align with the design specification. As part of this cleanup, theaccordion-itempart has been removed frompost-accordion-item. The component’s styles can now be customized directly by targeting the host or by using the exposed parts for the trigger button and body elements (e.g.,::part(post-accordion-body) { ... }). (by @oliverschuerch with #6676) -
Integrated the burger menu button into the
<post-header>by removing the previouspost-togglebuttonslot and introducing the requiredtextMenuprop. (by @myrta2302 with #6801) -
Added a required
captionproperty to thepost-mainnavigationcomponent for the accessible name of the navigation landmark. (by @alionazherdetska with #6841) -
Renamed the following component props
post-back-to-top
label→textBackToTop
post-breadcrumbs
menuLabel→textMoreItemslabel→textBreadcrumbshomeText→textHome
post-footer
label→textFooter
post-language-menu
caption→textChangeLanguagedescription→textCurrentLanguage
post-main-navigation
caption→textMain
post-pagination
labelLast→textLastlabelFirst→textFirstlabelPage→textPagelabelNext→textNextlabelPrevious→textPrevious
post-popover
closeButtonCaption→textClose
post-stepper
activeStepLabel→textStepNumbercompletedLabel→textCompletedStepcurrentLabel→textCurrentStep(by @myrta2302 with #6894)
-
Update the
post-megadropdownto allow full customization of its content. Thepost-megadropdowncan now contain any HTML elements, not just lists of links.As a result, list styling is no longer applied automatically.
If you want a properly styled list of links, you must now add the requiredpost-megadropdown-*classes to the corresponding elements yourself.BEFORE:
<post-megadropdown id="packages" label-close="Close" label-back="Back"> <a class="post-megadropdown-overview" href="/packages">Overview Packages</a> <post-list> <p>Send packages</p> <post-list-item><a href="/sch">Packages Switzerland</a></post-list-item> <post-list-item><a href="/kl">Small goods international</a></post-list-item> </post-list> <post-list> <p><a href="/step-by-step">Step by step</a></p> <post-list-item><a href="/sch">Packages Switzerland</a></post-list-item> <post-list-item><a href="/kl">Small goods international</a></post-list-item> </post-list> </post-megadropdown>
AFTER:
<post-megadropdown id="packages" label-close="Close" label-back="Back"> <a class="post-megadropdown-overview" href="/packages">Overview Packages</a> <div class="row row-cols-1 row-cols-sm-2"> <div class="col"> <p class="post-megadropdown-list-title" id="send-packages">Send packages</p> <ul class="post-megadropdown-list" aria-labelledby="send-packages"> <li><a href="/sch">Packages Switzerland</a></li> <li><a href="/kl">Small goods international</a></li> </ul> </div> <div class="col"> <a class="post-megadropdown-list-title" id="step-by-step-packages" href="/step-by-step" >Step by step</a > <ul class="post-megadropdown-list" aria-labelledby="step-by-step-packages"> <li><a href="/sch">Packages Switzerland</a></li> <li><a href="/kl">Small goods international</a></li> </ul> </div> </div> </post-megadropdown> ``` (by [@alizedebray](https://github.com/alizedebray) with [#6891](https://github.com/swisspost/design-system/pull/6891))
-
Renamed slots in the
post-headercomponent for improved clarity and consistency. The following slots have been renamed:target-group→audienceglobal-controls→global-nav-primarymeta-navigation→global-nav-secondarypost-language-switch→language-menuglobal-login→post-loginpost-mainnavigation→main-nav
All slot names must be updated in existing implementations to ensure header components render correctly. (by @alionazherdetska with #6780)
-
Updated the
post-megadropdowncomponent to no longer use named slots, it now provides only a default slot for its content. The close and back buttons are built into the component and are configured using thelabelCloseandlabelBackproperties instead of slotted markup.
To preserve styling, the overview link should use the.post-megadropdown-overviewclass.BEFORE:
<post-megadropdown> <button slot="back-button" class="btn btn-tertiary px-0 btn-sm"> <post-icon name="arrowleft"></post-icon> Back </button> <post-closebutton slot="close-button">Close</post-closebutton> <a slot="post-megadropdown-overview" href="/letters">Overview Letters</a> <!-- Mega drop-down links --> </post-megadropdown>
AFTER:
<post-megadropdown label-close="Close" label-back="Back"> <a class="post-megadropdown-overview" href="/letters">Overview Letters</a> <!-- Mega drop-down links --> </post-megadropdown> ``` (by [@alizedebray](https://github.com/alizedebray) with [#6813](https://github.com/swisspost/design-system/pull/6813))
-
Renamed
post-menuparts to avoid naming confusions with other components.::part(menu)is now::part(post-menu). (by @alionazherdetska with #6806)
-
Removed
local-controlsandnavigation-controlsslots from thepost-headercomponent. Use the newlocal-navslot for all application-specific controls. (by @alizedebray with #6747) -
Renamed language components for improved semantic clarity:
post-language-switch→post-language-menupost-language-option→post-language-menu-item
Component tags must be updated accordingly. (by @alionazherdetska with #6773)
-
Simplified the
post-footercomponent by removing thepost-listandpost-list-item. The footer now only uses simpleulandlitags. (by @leagrdv with #6740) -
Renamed
post-accordion-itemparts to avoid naming confusions with other components.::part(button)is now::part(post-accordion-button).::part(body)is now::part(post-accordion-body). (by @oliverschuerch with #6676)
-
Refactored
<post-tabs>component:- Renamed
post-tab-headercomponent topost-tab-item - Renamed
panelproperty tonameinpost-tab-itemcomponent - Renamed
nameproperty toforinpost-tab-panelcomponent - Renamed
activePanelproperty toactiveTabinpost-tabscomponent
BEFORE:
<post-tabs active-panel="first"> <post-tab-header panel="first">First tab</post-tab-header> <post-tab-header panel="second">Second tab</post-tab-header> <post-tab-header panel="third">Third tab</post-tab-header> <post-tab-panel name="first"> This is the content of the first tab. </post-tab-panel> <post-tab-panel name="second"> This is the content of the second tab. </post-tab-panel> <post-tab-panel name="third"> This is the content of the third tab. </post-tab-panel> </post-tabs>
AFTER:
<post-tabs active-tab="first"> <post-tab-item name="first">First tab</post-tab-item> <post-tab-item name="second">Second tab</post-tab-item> <post-tab-item name="third">Third tab</post-tab-item> <post-tab-panel for="first"> This is the content of the first tab. </post-tab-panel> <post-tab-panel for="second"> This is the content of the second tab. </post-tab-panel> <post-tab-panel for="third"> This is the content of the third tab. </post-tab-panel> </post-tabs> ``` (by [@alionazherdetska](https://github.com/alionazherdetska) with [#6350](https://github.com/swisspost/design-system/pull/6350))
- Renamed
Minor Changes
- Added navigation variant to the
post-tabscomponent, enabling anchor-based navigation. The component now automatical...
@swisspost/[email protected]
Major Changes
-
Refactored
<post-tabs>component:- Renamed
post-tab-headercomponent topost-tab-item - Renamed
panelproperty tonameinpost-tab-itemcomponent - Renamed
nameproperty toforinpost-tab-panelcomponent - Renamed
activePanelproperty toactiveTabinpost-tabscomponent
BEFORE:
<post-tabs active-panel="first"> <post-tab-header panel="first">First tab</post-tab-header> <post-tab-header panel="second">Second tab</post-tab-header> <post-tab-header panel="third">Third tab</post-tab-header> <post-tab-panel name="first"> This is the content of the first tab. </post-tab-panel> <post-tab-panel name="second"> This is the content of the second tab. </post-tab-panel> <post-tab-panel name="third"> This is the content of the third tab. </post-tab-panel> </post-tabs>
AFTER:
<post-tabs active-tab="first"> <post-tab-item name="first">First tab</post-tab-item> <post-tab-item name="second">Second tab</post-tab-item> <post-tab-item name="third">Third tab</post-tab-item> <post-tab-panel for="first"> This is the content of the first tab. </post-tab-panel> <post-tab-panel for="second"> This is the content of the second tab. </post-tab-panel> <post-tab-panel for="third"> This is the content of the third tab. </post-tab-panel> </post-tabs> ``` (by [@alionazherdetska](https://github.com/alionazherdetska) with [#6350](https://github.com/swisspost/design-system/pull/6350))
- Renamed
Patch Changes
- Updated dependencies:
- @swisspost/[email protected]
@swisspost/[email protected]
Major Changes
-
Refactored
<post-tabs>component:- Renamed
post-tab-headercomponent topost-tab-item - Renamed
panelproperty tonameinpost-tab-itemcomponent - Renamed
nameproperty toforinpost-tab-panelcomponent - Renamed
activePanelproperty toactiveTabinpost-tabscomponent
BEFORE:
<post-tabs active-panel="first"> <post-tab-header panel="first">First tab</post-tab-header> <post-tab-header panel="second">Second tab</post-tab-header> <post-tab-header panel="third">Third tab</post-tab-header> <post-tab-panel name="first"> This is the content of the first tab. </post-tab-panel> <post-tab-panel name="second"> This is the content of the second tab. </post-tab-panel> <post-tab-panel name="third"> This is the content of the third tab. </post-tab-panel> </post-tabs>
AFTER:
<post-tabs active-tab="first"> <post-tab-item name="first">First tab</post-tab-item> <post-tab-item name="second">Second tab</post-tab-item> <post-tab-item name="third">Third tab</post-tab-item> <post-tab-panel for="first"> This is the content of the first tab. </post-tab-panel> <post-tab-panel for="second"> This is the content of the second tab. </post-tab-panel> <post-tab-panel for="third"> This is the content of the third tab. </post-tab-panel> </post-tabs> ``` (by [@alionazherdetska](https://github.com/alionazherdetska) with [#6350](https://github.com/swisspost/design-system/pull/6350))
- Renamed
Patch Changes
- Updated dependencies:
- @swisspost/[email protected]
@swisspost/[email protected]
@swisspost/[email protected]
@swisspost/[email protected]
Patch Changes
- Updated dependencies:
- @swisspost/[email protected]