@postnord/pn-marketweb-components 4.2.2 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index-9a9efa1c.js +4 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-address-autofill.cjs.entry.js +1 -1
- package/cjs/pn-app-banner.cjs.entry.js +1 -1
- package/cjs/pn-bonus-progressbar-level.cjs.entry.js +1 -1
- package/cjs/pn-bonus-progressbar.cjs.entry.js +1 -1
- package/cjs/pn-breakpoints.cjs.entry.js +1 -1
- package/cjs/pn-chart.cjs.entry.js +1 -1
- package/cjs/pn-charts-card.cjs.entry.js +3 -3
- package/cjs/pn-chat-message_2.cjs.entry.js +2 -2
- package/cjs/pn-chat.cjs.entry.js +2 -2
- package/cjs/pn-choice-button.cjs.entry.js +1 -1
- package/cjs/pn-cta-block.cjs.entry.js +2 -2
- package/cjs/pn-customernumber-selector-option.cjs.entry.js +1 -1
- package/cjs/pn-customernumber-selector.cjs.entry.js +1 -1
- package/cjs/pn-date-and-time.cjs.entry.js +1 -1
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +1 -1
- package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js +1 -1
- package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js +2 -2
- package/cjs/pn-filter-checkbox.cjs.entry.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +1 -1
- package/cjs/pn-find-price.cjs.entry.js +2 -2
- package/cjs/pn-find-service-and-price-result.cjs.entry.js +1 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +1 -1
- package/cjs/pn-hero-block-international.cjs.entry.js +1 -1
- package/cjs/pn-language-selector_9.cjs.entry.js +8 -8
- package/cjs/pn-level-up-modal.cjs.entry.js +1 -1
- package/cjs/pn-level-up.cjs.entry.js +2 -2
- package/cjs/pn-link-list.cjs.entry.js +1 -1
- package/cjs/pn-mainnav-link.cjs.entry.js +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-icon.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-input.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-search.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-siteheader-login-button_4.cjs.entry.js +2 -2
- package/cjs/pn-marketweb-siteheader-login-mypage-button.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +4 -4
- package/cjs/pn-marketweb-table.cjs.entry.js +1 -1
- package/cjs/pn-media-block.cjs.entry.js +1 -1
- package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js +1 -1
- package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js +1 -1
- package/cjs/pn-multiple-input.cjs.entry.js +2 -2
- package/cjs/pn-parcel-tracker.cjs.entry.js +1 -1
- package/cjs/pn-pex-pricefinder.cjs.entry.js +1 -1
- package/cjs/pn-product-card_3.cjs.entry.js +1 -1
- package/cjs/pn-product-pricelist-result.cjs.entry.js +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +2 -2
- package/cjs/pn-product-tile-info_2.cjs.entry.js +1 -1
- package/cjs/pn-product-tile.cjs.entry.js +1 -1
- package/cjs/pn-profile-modal-customernumber.cjs.entry.js +1 -1
- package/cjs/pn-profile-modal-profile.cjs.entry.js +2 -2
- package/cjs/pn-profile-modal-type.cjs.entry.js +1 -1
- package/cjs/pn-profile-modal.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector-option.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector.cjs.entry.js +1 -1
- package/cjs/pn-proxio-findprice-result.cjs.entry.js +1 -1
- package/cjs/pn-proxio-findprice.cjs.entry.js +3 -3
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +1 -1
- package/cjs/pn-proxio-productcard_4.cjs.entry.js +3 -3
- package/cjs/pn-qr-code-generator.cjs.entry.js +1 -1
- package/cjs/pn-quick-cta.cjs.entry.js +1 -1
- package/cjs/pn-share-item.cjs.entry.js +1 -1
- package/cjs/pn-share.cjs.entry.js +1 -1
- package/cjs/pn-sidenav-level.cjs.entry.js +1 -1
- package/cjs/pn-sidenav-link.cjs.entry.js +1 -1
- package/cjs/pn-sidenav-togglebutton.cjs.entry.js +1 -1
- package/cjs/pn-sidenav.cjs.entry.js +1 -1
- package/cjs/pn-site-footer_3.cjs.entry.js +3 -3
- package/cjs/pn-spotlight.cjs.entry.js +1 -1
- package/cjs/pn-stats-info-data.cjs.entry.js +1 -1
- package/cjs/pn-stats-info.cjs.entry.js +1 -1
- package/cjs/pn-titletag.cjs.entry.js +1 -1
- package/cjs/pn-usp-promoter.cjs.entry.js +1 -1
- package/cjs/pn-versa-card.cjs.entry.js +84 -0
- package/cjs/pn-versa-card.cjs.entry.js.map +1 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/cards/pn-versa-card/pn-versa-card.css +518 -0
- package/collection/components/cards/pn-versa-card/pn-versa-card.js +326 -0
- package/collection/components/cards/pn-versa-card/pn-versa-card.js.map +1 -0
- package/collection/components/cards/pn-versa-card/pn-versa-card.stories.js +360 -0
- package/collection/components/cards/pn-versa-card/pn-versa-card.stories.js.map +1 -0
- package/collection/components/charts/pn-chart/pn-chart.js +1 -1
- package/collection/components/charts/pn-charts-card/pn-charts-card.js +3 -3
- package/collection/components/cta/pn-cta-block/pn-cta-block.js +2 -2
- package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +1 -1
- package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +1 -1
- package/collection/components/cta/pn-share/pn-share-item.js +1 -1
- package/collection/components/cta/pn-share/pn-share.js +1 -1
- package/collection/components/cta/pn-spotlight/pn-spotlight.js +1 -1
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +1 -1
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +1 -1
- package/collection/components/input/pn-address-autofill/pn-address-autofill.js +1 -1
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +1 -1
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +1 -1
- package/collection/components/input/pn-choice-button/pn-choice-button.js +1 -1
- package/collection/components/input/pn-date-and-time/pn-date-and-time.js +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +1 -1
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.js +1 -1
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.js +2 -2
- package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +1 -1
- package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +1 -1
- package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +1 -1
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.js +1 -1
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.js +1 -1
- package/collection/components/input/pn-multiple-input/pn-multiple-input.js +2 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +4 -4
- package/collection/components/media/pn-media-block/pn-media-block.js +1 -1
- package/collection/components/minor/pn-app-banner/pn-app-banner.js +1 -1
- package/collection/components/minor/pn-marketweb-icon/pn-marketweb-icon.js +1 -1
- package/collection/components/minor/pn-swan/pn-swan.js +1 -1
- package/collection/components/minor/pn-titletag/pn-titletag.js +1 -1
- package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +1 -1
- package/collection/components/navigation/pn-language-selector/pn-language-selector.js +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +2 -2
- package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav.js +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav.js +1 -1
- package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +1 -1
- package/collection/components/navigation/pn-site-footer/pn-site-footer.js +1 -1
- package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +1 -1
- package/collection/components/navigation/pn-site-selector/pn-site-selector.js +1 -1
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +1 -1
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +2 -2
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +1 -1
- package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +1 -1
- package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +1 -1
- package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +1 -1
- package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js +1 -1
- package/collection/components/widgets/pn-chat/pn-chat.js +2 -2
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +1 -1
- package/collection/components/widgets/pn-find-price/pn-find-price.js +2 -2
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +1 -1
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +1 -1
- package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.js +1 -1
- package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.js +1 -1
- package/collection/components/widgets/pn-level-up/pn-level-up.js +2 -2
- package/collection/components/widgets/pn-link-list/pn-link-list.js +1 -1
- package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.js +1 -1
- package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.js +1 -1
- package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +1 -1
- package/collection/components/widgets/pn-product-card/pn-product-card.js +1 -1
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +1 -1
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +2 -2
- package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +1 -1
- package/collection/components/widgets/pn-product-tile/pn-product-tile.js +1 -1
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +1 -1
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +3 -3
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +1 -1
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +1 -1
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +1 -1
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +1 -1
- package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.js +1 -1
- package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.js +1 -1
- package/components/pn-address-autofill.js +1 -1
- package/components/pn-app-banner.js +1 -1
- package/components/pn-bonus-progressbar-level.js +1 -1
- package/components/pn-bonus-progressbar.js +1 -1
- package/components/pn-breakpoints.js +1 -1
- package/components/pn-chart.js +1 -1
- package/components/pn-charts-card.js +3 -3
- package/components/pn-chat-message2.js +1 -1
- package/components/pn-chat.js +2 -2
- package/components/pn-choice-button2.js +1 -1
- package/components/pn-cta-block.js +2 -2
- package/components/pn-customernumber-selector-option.js +1 -1
- package/components/pn-customernumber-selector.js +1 -1
- package/components/pn-date-and-time.js +1 -1
- package/components/pn-dropdown-choice-adds-row.js +1 -1
- package/components/pn-dropdown-with-multi-input-rows-row2.js +1 -1
- package/components/pn-dropdown-with-multi-input-rows.js +2 -2
- package/components/pn-filter-checkbox2.js +1 -1
- package/components/pn-find-price-result2.js +1 -1
- package/components/pn-find-price.js +2 -2
- package/components/pn-find-service-and-price-result2.js +1 -1
- package/components/pn-find-service-and-price.js +1 -1
- package/components/pn-hero-block-international.js +1 -1
- package/components/pn-language-selector-option2.js +1 -1
- package/components/pn-language-selector2.js +1 -1
- package/components/pn-level-up-modal2.js +1 -1
- package/components/pn-level-up.js +2 -2
- package/components/pn-link-list.js +1 -1
- package/components/pn-mainnav-level2.js +2 -2
- package/components/pn-mainnav-link2.js +1 -1
- package/components/pn-mainnav-list2.js +1 -1
- package/components/pn-mainnav2.js +1 -1
- package/components/pn-marketweb-carousel2.js +1 -1
- package/components/pn-marketweb-icon.js +1 -1
- package/components/pn-marketweb-input2.js +1 -1
- package/components/pn-marketweb-search.js +1 -1
- package/components/pn-marketweb-siteheader-login-button2.js +1 -1
- package/components/pn-marketweb-siteheader-login-mypage-button.js +1 -1
- package/components/pn-marketweb-siteheader-unified-login2.js +1 -1
- package/components/pn-marketweb-siteheader.js +4 -4
- package/components/pn-marketweb-table.js +1 -1
- package/components/pn-media-block.js +1 -1
- package/components/pn-multi-row-connected-dropdown-row2.js +1 -1
- package/components/pn-multi-row-connected-dropdown.js +1 -1
- package/components/pn-multiple-input.js +2 -2
- package/components/pn-parcel-tracker.js +1 -1
- package/components/pn-pex-pricefinder.js +1 -1
- package/components/pn-product-card2.js +1 -1
- package/components/pn-product-pricelist-result.js +1 -1
- package/components/pn-product-pricelist.js +2 -2
- package/components/pn-product-tile-info2.js +1 -1
- package/components/pn-product-tile.js +1 -1
- package/components/pn-profile-modal-customernumber.js +1 -1
- package/components/pn-profile-modal-profile.js +2 -2
- package/components/pn-profile-modal-type.js +1 -1
- package/components/pn-profile-modal.js +1 -1
- package/components/pn-profile-selector-option.js +1 -1
- package/components/pn-profile-selector.js +1 -1
- package/components/pn-proxio-findprice-result2.js +1 -1
- package/components/pn-proxio-findprice.js +3 -3
- package/components/pn-proxio-pricegroup.js +1 -1
- package/components/pn-proxio-productcard-description2.js +1 -1
- package/components/pn-proxio-productcard-information2.js +1 -1
- package/components/pn-proxio-productcard2.js +1 -1
- package/components/pn-qr-code-generator2.js +1 -1
- package/components/pn-quick-cta.js +1 -1
- package/components/pn-share-item2.js +1 -1
- package/components/pn-share.js +1 -1
- package/components/pn-sidenav-level.js +1 -1
- package/components/pn-sidenav-link.js +1 -1
- package/components/pn-sidenav-togglebutton.js +1 -1
- package/components/pn-sidenav.js +1 -1
- package/components/pn-site-footer-col2.js +1 -1
- package/components/pn-site-footer2.js +1 -1
- package/components/pn-site-selector-item2.js +1 -1
- package/components/pn-site-selector2.js +1 -1
- package/components/pn-spotlight.js +1 -1
- package/components/pn-stats-info-data2.js +1 -1
- package/components/pn-stats-info.js +1 -1
- package/components/pn-swan2.js +1 -1
- package/components/pn-titletag2.js +1 -1
- package/components/pn-usp-promoter.js +1 -1
- package/components/pn-versa-card.d.ts +11 -0
- package/components/pn-versa-card.js +114 -0
- package/components/pn-versa-card.js.map +1 -0
- package/esm/index-c0a4d8bd.js +4 -0
- package/esm/loader.js +1 -1
- package/esm/pn-address-autofill.entry.js +1 -1
- package/esm/pn-app-banner.entry.js +1 -1
- package/esm/pn-bonus-progressbar-level.entry.js +1 -1
- package/esm/pn-bonus-progressbar.entry.js +1 -1
- package/esm/pn-breakpoints.entry.js +1 -1
- package/esm/pn-chart.entry.js +1 -1
- package/esm/pn-charts-card.entry.js +3 -3
- package/esm/pn-chat-message_2.entry.js +2 -2
- package/esm/pn-chat.entry.js +2 -2
- package/esm/pn-choice-button.entry.js +1 -1
- package/esm/pn-cta-block.entry.js +2 -2
- package/esm/pn-customernumber-selector-option.entry.js +1 -1
- package/esm/pn-customernumber-selector.entry.js +1 -1
- package/esm/pn-date-and-time.entry.js +1 -1
- package/esm/pn-dropdown-choice-adds-row.entry.js +1 -1
- package/esm/pn-dropdown-with-multi-input-rows-row.entry.js +1 -1
- package/esm/pn-dropdown-with-multi-input-rows.entry.js +2 -2
- package/esm/pn-filter-checkbox.entry.js +1 -1
- package/esm/pn-find-price-result.entry.js +1 -1
- package/esm/pn-find-price.entry.js +2 -2
- package/esm/pn-find-service-and-price-result.entry.js +1 -1
- package/esm/pn-find-service-and-price.entry.js +1 -1
- package/esm/pn-hero-block-international.entry.js +1 -1
- package/esm/pn-language-selector_9.entry.js +8 -8
- package/esm/pn-level-up-modal.entry.js +1 -1
- package/esm/pn-level-up.entry.js +2 -2
- package/esm/pn-link-list.entry.js +1 -1
- package/esm/pn-mainnav-link.entry.js +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-icon.entry.js +1 -1
- package/esm/pn-marketweb-input.entry.js +1 -1
- package/esm/pn-marketweb-search.entry.js +1 -1
- package/esm/pn-marketweb-siteheader-login-button_4.entry.js +2 -2
- package/esm/pn-marketweb-siteheader-login-mypage-button.entry.js +1 -1
- package/esm/pn-marketweb-siteheader.entry.js +4 -4
- package/esm/pn-marketweb-table.entry.js +1 -1
- package/esm/pn-media-block.entry.js +1 -1
- package/esm/pn-multi-row-connected-dropdown-row.entry.js +1 -1
- package/esm/pn-multi-row-connected-dropdown.entry.js +1 -1
- package/esm/pn-multiple-input.entry.js +2 -2
- package/esm/pn-parcel-tracker.entry.js +1 -1
- package/esm/pn-pex-pricefinder.entry.js +1 -1
- package/esm/pn-product-card_3.entry.js +1 -1
- package/esm/pn-product-pricelist-result.entry.js +1 -1
- package/esm/pn-product-pricelist.entry.js +2 -2
- package/esm/pn-product-tile-info_2.entry.js +1 -1
- package/esm/pn-product-tile.entry.js +1 -1
- package/esm/pn-profile-modal-customernumber.entry.js +1 -1
- package/esm/pn-profile-modal-profile.entry.js +2 -2
- package/esm/pn-profile-modal-type.entry.js +1 -1
- package/esm/pn-profile-modal.entry.js +1 -1
- package/esm/pn-profile-selector-option.entry.js +1 -1
- package/esm/pn-profile-selector.entry.js +1 -1
- package/esm/pn-proxio-findprice-result.entry.js +1 -1
- package/esm/pn-proxio-findprice.entry.js +3 -3
- package/esm/pn-proxio-pricegroup.entry.js +1 -1
- package/esm/pn-proxio-productcard_4.entry.js +3 -3
- package/esm/pn-qr-code-generator.entry.js +1 -1
- package/esm/pn-quick-cta.entry.js +1 -1
- package/esm/pn-share-item.entry.js +1 -1
- package/esm/pn-share.entry.js +1 -1
- package/esm/pn-sidenav-level.entry.js +1 -1
- package/esm/pn-sidenav-link.entry.js +1 -1
- package/esm/pn-sidenav-togglebutton.entry.js +1 -1
- package/esm/pn-sidenav.entry.js +1 -1
- package/esm/pn-site-footer_3.entry.js +3 -3
- package/esm/pn-spotlight.entry.js +1 -1
- package/esm/pn-stats-info-data.entry.js +1 -1
- package/esm/pn-stats-info.entry.js +1 -1
- package/esm/pn-titletag.entry.js +1 -1
- package/esm/pn-usp-promoter.entry.js +1 -1
- package/esm/pn-versa-card.entry.js +80 -0
- package/esm/pn-versa-card.entry.js.map +1 -0
- package/package.json +2 -1
- package/pn-market-web-components/{p-e69d8395.entry.js → p-01fbf1ce.entry.js} +2 -2
- package/pn-market-web-components/{p-d18b9aff.entry.js → p-022780ab.entry.js} +2 -2
- package/pn-market-web-components/{p-ebba8dd2.entry.js → p-0700cb4c.entry.js} +2 -2
- package/pn-market-web-components/{p-89272a6b.entry.js → p-0a29bdca.entry.js} +2 -2
- package/pn-market-web-components/{p-aee65729.entry.js → p-0c07ad6d.entry.js} +2 -2
- package/pn-market-web-components/{p-e1c20440.entry.js → p-0d4d9d90.entry.js} +2 -2
- package/pn-market-web-components/{p-9c0243fd.entry.js → p-0f6f715b.entry.js} +2 -2
- package/pn-market-web-components/{p-b0845b6e.entry.js → p-118fe47d.entry.js} +2 -2
- package/pn-market-web-components/{p-02cc3319.entry.js → p-11c6e458.entry.js} +2 -2
- package/pn-market-web-components/{p-9b709942.entry.js → p-12cafd55.entry.js} +2 -2
- package/pn-market-web-components/{p-c6db243c.entry.js → p-150da889.entry.js} +2 -2
- package/pn-market-web-components/{p-b3605a96.entry.js → p-1c644b91.entry.js} +2 -2
- package/pn-market-web-components/{p-9638d206.entry.js → p-2616cdc1.entry.js} +2 -2
- package/pn-market-web-components/{p-6d6ae33e.entry.js → p-2e585ed5.entry.js} +2 -2
- package/pn-market-web-components/{p-f6c5c4de.entry.js → p-32bd2ff8.entry.js} +2 -2
- package/pn-market-web-components/{p-ed5c0dcc.entry.js → p-32e3ed3a.entry.js} +2 -2
- package/pn-market-web-components/p-3c69298b.entry.js +2 -0
- package/pn-market-web-components/p-3c69298b.entry.js.map +1 -0
- package/pn-market-web-components/{p-ec7a8e5a.entry.js → p-3f268359.entry.js} +2 -2
- package/pn-market-web-components/{p-7526d49d.entry.js → p-40e632cc.entry.js} +2 -2
- package/pn-market-web-components/{p-eafffc4b.entry.js → p-4149e715.entry.js} +2 -2
- package/pn-market-web-components/{p-368aa69f.entry.js → p-4517a3d4.entry.js} +2 -2
- package/pn-market-web-components/{p-588525ac.entry.js → p-461c8792.entry.js} +2 -2
- package/pn-market-web-components/{p-bb5a6883.entry.js → p-4915b14a.entry.js} +2 -2
- package/pn-market-web-components/{p-6f6ed930.entry.js → p-4a164ef8.entry.js} +2 -2
- package/pn-market-web-components/{p-08c96012.entry.js → p-4bc6d49f.entry.js} +2 -2
- package/pn-market-web-components/{p-44175dbd.entry.js → p-4d848e18.entry.js} +2 -2
- package/pn-market-web-components/{p-60e3ba3d.entry.js → p-5090bb1d.entry.js} +2 -2
- package/pn-market-web-components/{p-5d8eb438.entry.js → p-5efb190e.entry.js} +2 -2
- package/pn-market-web-components/{p-e07d8b18.entry.js → p-64f6691d.entry.js} +2 -2
- package/pn-market-web-components/{p-02094ddb.entry.js → p-66c0c8dc.entry.js} +2 -2
- package/pn-market-web-components/{p-315b9cba.entry.js → p-671a8129.entry.js} +2 -2
- package/pn-market-web-components/{p-b20d2e1b.entry.js → p-6d77e747.entry.js} +2 -2
- package/pn-market-web-components/{p-34cb1e2e.entry.js → p-6e693269.entry.js} +2 -2
- package/pn-market-web-components/{p-2f324058.entry.js → p-6f1e27ec.entry.js} +2 -2
- package/pn-market-web-components/{p-c7d41f58.entry.js → p-6f83d9ea.entry.js} +2 -2
- package/pn-market-web-components/{p-dc11fc75.entry.js → p-71956f95.entry.js} +2 -2
- package/pn-market-web-components/{p-b697755f.entry.js → p-7c1ba9d7.entry.js} +2 -2
- package/pn-market-web-components/{p-1cb0f3fa.entry.js → p-7e618c6b.entry.js} +2 -2
- package/pn-market-web-components/{p-5d70be75.entry.js → p-89fbca3b.entry.js} +2 -2
- package/pn-market-web-components/{p-7a721a2a.entry.js → p-8a76d782.entry.js} +2 -2
- package/pn-market-web-components/{p-fc5c33e7.entry.js → p-8f25176b.entry.js} +2 -2
- package/pn-market-web-components/{p-de55f656.entry.js → p-91effe9a.entry.js} +2 -2
- package/pn-market-web-components/{p-62ce6700.entry.js → p-9930e104.entry.js} +2 -2
- package/pn-market-web-components/{p-9fc3711d.entry.js → p-99843884.entry.js} +2 -2
- package/pn-market-web-components/{p-d3b4c8d7.entry.js → p-9ca239b4.entry.js} +2 -2
- package/pn-market-web-components/p-9d0ca27b.entry.js +2 -0
- package/pn-market-web-components/{p-e55e5b49.entry.js.map → p-9d0ca27b.entry.js.map} +1 -1
- package/pn-market-web-components/{p-6a5cb4ca.entry.js → p-9f2ad61a.entry.js} +2 -2
- package/pn-market-web-components/{p-3737defb.entry.js → p-a079f703.entry.js} +2 -2
- package/pn-market-web-components/{p-3a298543.entry.js → p-a13f1f73.entry.js} +2 -2
- package/pn-market-web-components/{p-b9774a2d.entry.js → p-a30de538.entry.js} +2 -2
- package/pn-market-web-components/p-a3f601cb.entry.js +2 -0
- package/pn-market-web-components/{p-e1ccd651.entry.js → p-ab1e3dc2.entry.js} +2 -2
- package/pn-market-web-components/{p-e9d495e3.entry.js → p-ac565795.entry.js} +2 -2
- package/pn-market-web-components/{p-096cbbcb.entry.js → p-af646091.entry.js} +2 -2
- package/pn-market-web-components/{p-46711387.entry.js → p-b2b2bae0.entry.js} +2 -2
- package/pn-market-web-components/{p-f962fd3e.entry.js → p-b8b84719.entry.js} +2 -2
- package/pn-market-web-components/{p-0d67f0af.entry.js → p-bd8ec517.entry.js} +2 -2
- package/pn-market-web-components/{p-317fcddf.entry.js → p-c0315c45.entry.js} +2 -2
- package/pn-market-web-components/p-c22e6a0d.entry.js +2 -0
- package/pn-market-web-components/{p-133c7313.entry.js.map → p-c22e6a0d.entry.js.map} +1 -1
- package/pn-market-web-components/{p-92e8e287.entry.js → p-c7965104.entry.js} +2 -2
- package/pn-market-web-components/{p-c030c263.entry.js → p-c89f3d6b.entry.js} +2 -2
- package/pn-market-web-components/{p-a6941ea3.entry.js → p-ca003c1f.entry.js} +2 -2
- package/pn-market-web-components/{p-4bf2c8ab.entry.js → p-d0f27361.entry.js} +2 -2
- package/pn-market-web-components/{p-d07efc2e.entry.js → p-d2c8cabd.entry.js} +2 -2
- package/pn-market-web-components/{p-6e3c311a.entry.js → p-da0477d7.entry.js} +2 -2
- package/pn-market-web-components/{p-4a8ef165.entry.js → p-e43a36e0.entry.js} +2 -2
- package/pn-market-web-components/{p-778ae152.entry.js → p-e6d6a752.entry.js} +2 -2
- package/pn-market-web-components/{p-5f904742.entry.js → p-ee33397c.entry.js} +2 -2
- package/pn-market-web-components/{p-0b092a5c.entry.js → p-f0d423d0.entry.js} +2 -2
- package/pn-market-web-components/{p-d49d093f.entry.js → p-f4d2d0d3.entry.js} +2 -2
- package/pn-market-web-components/{p-6b6aeeab.entry.js → p-ff38b9a5.entry.js} +2 -2
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
- package/types/components/cards/pn-versa-card/pn-versa-card.d.ts +30 -0
- package/types/components/cards/pn-versa-card/pn-versa-card.stories.d.ts +28 -0
- package/types/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.d.ts +1 -1
- package/types/components.d.ts +51 -0
- package/vscode-data.json +89 -0
- package/pn-market-web-components/p-0b7d3d23.entry.js +0 -2
- package/pn-market-web-components/p-133c7313.entry.js +0 -2
- package/pn-market-web-components/p-e55e5b49.entry.js +0 -2
- /package/pn-market-web-components/{p-e69d8395.entry.js.map → p-01fbf1ce.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-d18b9aff.entry.js.map → p-022780ab.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-ebba8dd2.entry.js.map → p-0700cb4c.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-89272a6b.entry.js.map → p-0a29bdca.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-aee65729.entry.js.map → p-0c07ad6d.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-e1c20440.entry.js.map → p-0d4d9d90.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-9c0243fd.entry.js.map → p-0f6f715b.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-b0845b6e.entry.js.map → p-118fe47d.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-02cc3319.entry.js.map → p-11c6e458.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-9b709942.entry.js.map → p-12cafd55.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-c6db243c.entry.js.map → p-150da889.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-b3605a96.entry.js.map → p-1c644b91.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-9638d206.entry.js.map → p-2616cdc1.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-6d6ae33e.entry.js.map → p-2e585ed5.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-f6c5c4de.entry.js.map → p-32bd2ff8.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-ed5c0dcc.entry.js.map → p-32e3ed3a.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-ec7a8e5a.entry.js.map → p-3f268359.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-7526d49d.entry.js.map → p-40e632cc.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-eafffc4b.entry.js.map → p-4149e715.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-368aa69f.entry.js.map → p-4517a3d4.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-588525ac.entry.js.map → p-461c8792.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-bb5a6883.entry.js.map → p-4915b14a.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-6f6ed930.entry.js.map → p-4a164ef8.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-08c96012.entry.js.map → p-4bc6d49f.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-44175dbd.entry.js.map → p-4d848e18.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-60e3ba3d.entry.js.map → p-5090bb1d.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-5d8eb438.entry.js.map → p-5efb190e.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-e07d8b18.entry.js.map → p-64f6691d.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-02094ddb.entry.js.map → p-66c0c8dc.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-315b9cba.entry.js.map → p-671a8129.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-b20d2e1b.entry.js.map → p-6d77e747.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-34cb1e2e.entry.js.map → p-6e693269.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-2f324058.entry.js.map → p-6f1e27ec.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-c7d41f58.entry.js.map → p-6f83d9ea.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-dc11fc75.entry.js.map → p-71956f95.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-b697755f.entry.js.map → p-7c1ba9d7.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-1cb0f3fa.entry.js.map → p-7e618c6b.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-5d70be75.entry.js.map → p-89fbca3b.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-7a721a2a.entry.js.map → p-8a76d782.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-fc5c33e7.entry.js.map → p-8f25176b.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-de55f656.entry.js.map → p-91effe9a.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-62ce6700.entry.js.map → p-9930e104.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-9fc3711d.entry.js.map → p-99843884.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-d3b4c8d7.entry.js.map → p-9ca239b4.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-6a5cb4ca.entry.js.map → p-9f2ad61a.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-3737defb.entry.js.map → p-a079f703.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-3a298543.entry.js.map → p-a13f1f73.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-b9774a2d.entry.js.map → p-a30de538.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-0b7d3d23.entry.js.map → p-a3f601cb.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-e1ccd651.entry.js.map → p-ab1e3dc2.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-e9d495e3.entry.js.map → p-ac565795.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-096cbbcb.entry.js.map → p-af646091.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-46711387.entry.js.map → p-b2b2bae0.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-f962fd3e.entry.js.map → p-b8b84719.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-0d67f0af.entry.js.map → p-bd8ec517.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-317fcddf.entry.js.map → p-c0315c45.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-92e8e287.entry.js.map → p-c7965104.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-c030c263.entry.js.map → p-c89f3d6b.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-a6941ea3.entry.js.map → p-ca003c1f.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-4bf2c8ab.entry.js.map → p-d0f27361.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-d07efc2e.entry.js.map → p-d2c8cabd.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-6e3c311a.entry.js.map → p-da0477d7.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-4a8ef165.entry.js.map → p-e43a36e0.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-778ae152.entry.js.map → p-e6d6a752.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-5f904742.entry.js.map → p-ee33397c.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-0b092a5c.entry.js.map → p-f0d423d0.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-d49d093f.entry.js.map → p-f4d2d0d3.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-6b6aeeab.entry.js.map → p-ff38b9a5.entry.js.map} +0 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { arrow_right } from "pn-design-assets/pn-assets/icons";
|
|
2
|
+
import { createComponent, createDocumentation, } from "../../../globals/documentation/story";
|
|
3
|
+
import docs from "./pn-versa-card-docs.json";
|
|
4
|
+
const { argTypes, textContent } = createDocumentation(docs);
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Cards/Versa card',
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: { description: { story: textContent } },
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
// Wrapper sizing
|
|
12
|
+
size: 'onequarterwidth',
|
|
13
|
+
// Content props
|
|
14
|
+
label: 'Example label',
|
|
15
|
+
heading: 'Example heading',
|
|
16
|
+
headingLevel: 'h3',
|
|
17
|
+
preamble: 'Example preamble',
|
|
18
|
+
imageSrc: 'https://www.postnord.se/siteassets/vi-tar-saker-framat---kampanjsida/paketbox3.jpg',
|
|
19
|
+
imageAlt: 'Versa card image',
|
|
20
|
+
// Slot content (optional)
|
|
21
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit.</p>',
|
|
22
|
+
ctaHtml: `<pn-button class="pn-button" appearance="light" target="_blank" href="google.com"> Read More </pn-button> <a class="versa-card-cta-link-animated"> Läs mer här <pn-icon icon='${arrow_right}' > </pn-icon> `,
|
|
23
|
+
// Modifier props (Stencil @Prop)
|
|
24
|
+
hasImageCover: false,
|
|
25
|
+
imageGrow: false,
|
|
26
|
+
horizontal: false,
|
|
27
|
+
imgAlignment: 'left',
|
|
28
|
+
roundImage: false,
|
|
29
|
+
center: false,
|
|
30
|
+
alignMiddle: false,
|
|
31
|
+
cardColor: 'white',
|
|
32
|
+
opacity: 85,
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
...argTypes,
|
|
36
|
+
// Slots
|
|
37
|
+
rteHtml: { control: 'text', description: 'Injected into slot="rte".' },
|
|
38
|
+
ctaHtml: { control: 'text', description: 'Injected into slot="cta".' },
|
|
39
|
+
imageSrc: { control: 'text', description: 'Image URL for the image slot.' },
|
|
40
|
+
imageAlt: { control: 'text', description: 'Alt text for the image slot.' },
|
|
41
|
+
// Wrapper sizing
|
|
42
|
+
size: {
|
|
43
|
+
control: 'radio',
|
|
44
|
+
options: ['default', 'halfwidth', 'onethirdwidth', 'onequarterwidth'],
|
|
45
|
+
description: 'Adds a parent wrapper class for `.halfwidth` / `.onequarterwidth` selectors in SCSS.',
|
|
46
|
+
},
|
|
47
|
+
// Story-only data attribute
|
|
48
|
+
cardColor: {
|
|
49
|
+
control: { type: 'select' },
|
|
50
|
+
options: [
|
|
51
|
+
'none',
|
|
52
|
+
'white',
|
|
53
|
+
'blue25',
|
|
54
|
+
'blue50',
|
|
55
|
+
'blue400',
|
|
56
|
+
'blue900',
|
|
57
|
+
'coral25',
|
|
58
|
+
'coral50',
|
|
59
|
+
'green25',
|
|
60
|
+
'green50',
|
|
61
|
+
],
|
|
62
|
+
description: 'Sets the data-card-color attribute on pn-versa-card.',
|
|
63
|
+
},
|
|
64
|
+
opacity: {
|
|
65
|
+
control: { type: 'range', min: 0, max: 100, step: 5 },
|
|
66
|
+
},
|
|
67
|
+
imgAlignment: {
|
|
68
|
+
control: 'select',
|
|
69
|
+
options: ['left', 'right'],
|
|
70
|
+
description: 'Sets the image to the right side of the card.',
|
|
71
|
+
},
|
|
72
|
+
roundImage: {
|
|
73
|
+
control: 'boolean',
|
|
74
|
+
description: 'Adds rounded image styling to the card.',
|
|
75
|
+
},
|
|
76
|
+
headingLevel: {
|
|
77
|
+
control: 'select',
|
|
78
|
+
options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
|
79
|
+
description: 'Sets the heading level for the card heading.',
|
|
80
|
+
},
|
|
81
|
+
transparentBackground: {
|
|
82
|
+
control: 'boolean',
|
|
83
|
+
description: 'If true, applies reduced opacity to the card background to allow content behind the card to show through.',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
export default meta;
|
|
88
|
+
function buildCard(args) {
|
|
89
|
+
const { rteHtml, ctaHtml, size: _size, cardColor, ...componentArgs } = args;
|
|
90
|
+
const { imageSrc, imageAlt, } = args;
|
|
91
|
+
const el = createComponent('pn-versa-card', componentArgs);
|
|
92
|
+
if (cardColor) {
|
|
93
|
+
if (cardColor === 'none') {
|
|
94
|
+
el.setAttribute('data-card-color', '');
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
el.setAttribute('data-card-color', cardColor);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (rteHtml?.trim()) {
|
|
101
|
+
const rte = document.createElement('div');
|
|
102
|
+
rte.slot = 'rte';
|
|
103
|
+
rte.innerHTML = rteHtml;
|
|
104
|
+
el.appendChild(rte);
|
|
105
|
+
}
|
|
106
|
+
if (ctaHtml?.trim()) {
|
|
107
|
+
const cta = document.createElement('div');
|
|
108
|
+
cta.slot = 'cta';
|
|
109
|
+
cta.innerHTML = ctaHtml;
|
|
110
|
+
el.appendChild(cta);
|
|
111
|
+
}
|
|
112
|
+
if (imageSrc) {
|
|
113
|
+
const media = document.createElement('div');
|
|
114
|
+
media.slot = 'image';
|
|
115
|
+
const picture = document.createElement('picture');
|
|
116
|
+
const img = document.createElement('img');
|
|
117
|
+
img.src = imageSrc;
|
|
118
|
+
if (imageAlt) {
|
|
119
|
+
img.alt = imageAlt;
|
|
120
|
+
}
|
|
121
|
+
picture.appendChild(img);
|
|
122
|
+
media.appendChild(picture);
|
|
123
|
+
el.appendChild(media);
|
|
124
|
+
}
|
|
125
|
+
return el;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* One card, constrained by wrapper class, and centered on the page.
|
|
129
|
+
*/
|
|
130
|
+
function renderCenteredQuarter(args) {
|
|
131
|
+
const wrapper = document.createElement('div');
|
|
132
|
+
if (args.size && args.size !== 'default') {
|
|
133
|
+
wrapper.className = args.size;
|
|
134
|
+
}
|
|
135
|
+
wrapper.style.marginInline = 'auto';
|
|
136
|
+
wrapper.style.display = 'block';
|
|
137
|
+
wrapper.style.maxWidth = '420px';
|
|
138
|
+
wrapper.appendChild(buildCard(args));
|
|
139
|
+
return wrapper;
|
|
140
|
+
}
|
|
141
|
+
function renderCenteredRow(items, size, columns) {
|
|
142
|
+
const wrapper = document.createElement('div');
|
|
143
|
+
if (size !== 'default') {
|
|
144
|
+
wrapper.className = size;
|
|
145
|
+
}
|
|
146
|
+
wrapper.style.display = 'flex';
|
|
147
|
+
wrapper.style.justifyContent = 'center';
|
|
148
|
+
wrapper.style.width = '100%';
|
|
149
|
+
wrapper.style.height = '100%';
|
|
150
|
+
const row = document.createElement('div');
|
|
151
|
+
row.style.display = 'flex';
|
|
152
|
+
row.style.gap = '24px';
|
|
153
|
+
row.style.alignItems = 'stretch';
|
|
154
|
+
row.style.height = '100%';
|
|
155
|
+
items.forEach((item) => {
|
|
156
|
+
const col = document.createElement('div');
|
|
157
|
+
col.style.flex = `0 1 ${100 / columns}%`;
|
|
158
|
+
col.style.display = 'flex';
|
|
159
|
+
const card = buildCard(item);
|
|
160
|
+
card.style.flex = '1';
|
|
161
|
+
col.appendChild(card);
|
|
162
|
+
row.appendChild(col);
|
|
163
|
+
});
|
|
164
|
+
wrapper.appendChild(row);
|
|
165
|
+
return wrapper;
|
|
166
|
+
}
|
|
167
|
+
/* -----------------------------
|
|
168
|
+
Stories
|
|
169
|
+
--------------------------------*/
|
|
170
|
+
export const OneCardCenteredQuarterPlayGround = {
|
|
171
|
+
name: 'Playground (all controls enabled, for testing purposes)',
|
|
172
|
+
render: (args) => renderCenteredRow([
|
|
173
|
+
{
|
|
174
|
+
...args,
|
|
175
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p> <blockquote> This is a blockquote example.This is a blockquote example.This is a blockquote example.This is a blockquote example. </blockquote>',
|
|
176
|
+
},
|
|
177
|
+
], 'onethirdwidth', 1),
|
|
178
|
+
parameters: {
|
|
179
|
+
controls: {
|
|
180
|
+
exclude: [],
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
export const OneCardCenteredQuarterDefault = {
|
|
185
|
+
name: 'Background, Image, Label, Heading, Preamble, RTE, CTA)',
|
|
186
|
+
render: (args) => renderCenteredQuarter(args),
|
|
187
|
+
args: {
|
|
188
|
+
label: 'Test',
|
|
189
|
+
heading: 'Heading',
|
|
190
|
+
preamble: 'Here goes the preamble for this block',
|
|
191
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',
|
|
192
|
+
ctaHtml: `<pn-button class="btn btn-secondary">Click me</pn-button>`,
|
|
193
|
+
cardColor: 'blue25',
|
|
194
|
+
},
|
|
195
|
+
parameters: {
|
|
196
|
+
controls: {
|
|
197
|
+
include: ['hasBg', 'label', 'heading', 'headingLevel', 'preamble', 'imageSrc', 'cardColor'],
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
export const OneCardRoundedImage = {
|
|
202
|
+
name: 'RoundedImage, Label, Heading, Preamble, RTE, CTA, Alignment)',
|
|
203
|
+
render: (args) => renderCenteredQuarter(args),
|
|
204
|
+
args: {
|
|
205
|
+
roundImage: true,
|
|
206
|
+
center: false,
|
|
207
|
+
label: 'Test',
|
|
208
|
+
heading: 'Heading',
|
|
209
|
+
preamble: 'Here goes the preamble for this block',
|
|
210
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',
|
|
211
|
+
},
|
|
212
|
+
parameters: {
|
|
213
|
+
controls: {
|
|
214
|
+
include: ['label', 'heading', 'preamble', 'imageSrc', 'center', 'hasBg', 'cardColor', 'headingLevel'],
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
export const OneCardCenteredQuarterImageCoverText = {
|
|
219
|
+
name: 'Background, Image, Label, Heading, Preamble, RTE, CTA)',
|
|
220
|
+
render: (args) => renderCenteredQuarter(args),
|
|
221
|
+
args: {
|
|
222
|
+
hasImageCover: true,
|
|
223
|
+
label: 'Test',
|
|
224
|
+
heading: 'Heading',
|
|
225
|
+
preamble: 'Here goes the preamble for this block',
|
|
226
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',
|
|
227
|
+
ctaHtml: `<pn-button class="btn btn-secondary">Click me</pn-button> <a target="_blank" href="google.com" class= "versa-card-cta-link-animated" > Read More<pn- icon icon='${arrow_right}' > </pn-icon></a > `,
|
|
228
|
+
cardColor: 'blue25',
|
|
229
|
+
},
|
|
230
|
+
parameters: {
|
|
231
|
+
controls: {
|
|
232
|
+
include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'opacity', 'cardColor', 'center'],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
export const ThreeCardsCenteredQuarter = {
|
|
237
|
+
name: 'Three cards, centered, with background and image (for layout testing)',
|
|
238
|
+
parameters: {
|
|
239
|
+
controls: {
|
|
240
|
+
include: ['imageSrc'],
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
render: (args) => renderCenteredRow([
|
|
244
|
+
{
|
|
245
|
+
...args,
|
|
246
|
+
cardColor: 'blue25',
|
|
247
|
+
label: 'Card 1',
|
|
248
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
...args,
|
|
252
|
+
label: 'Card 2',
|
|
253
|
+
heading: 'I am a card with no modifier',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
...args,
|
|
257
|
+
hasImageCover: true,
|
|
258
|
+
preamble: '',
|
|
259
|
+
heading: '',
|
|
260
|
+
label: '',
|
|
261
|
+
rteHtml: '',
|
|
262
|
+
ctaHtml: '',
|
|
263
|
+
},
|
|
264
|
+
], 'onethirdwidth', 3),
|
|
265
|
+
};
|
|
266
|
+
export const TwoCardsHorizontalAlignMiddle = {
|
|
267
|
+
name: 'Two cards, horizontal, aligned middle, with background and image (for layout testing)',
|
|
268
|
+
parameters: {
|
|
269
|
+
controls: {
|
|
270
|
+
include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'imgAlignment', 'roundImage', 'cardColor'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
render: (args) => renderCenteredRow([
|
|
274
|
+
{
|
|
275
|
+
...args,
|
|
276
|
+
cardColor: 'blue25',
|
|
277
|
+
horizontal: true,
|
|
278
|
+
alignMiddle: true,
|
|
279
|
+
rteHtml: '<p>These actions help us lower emissions while maintaining reliable service across the region. PostNord is continuously exploring and adopting new technologies that strengthen our operational capabilities and help us deliver better value to customers across the Nordic region.</p>',
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
...args,
|
|
283
|
+
preamble: '',
|
|
284
|
+
center: true,
|
|
285
|
+
roundImage: true,
|
|
286
|
+
horizontal: false,
|
|
287
|
+
alignMiddle: true,
|
|
288
|
+
rteHtml: '<p>Excellent operational stability 24/7. Deliveries completely aligned with business needs. Response to disruptions is predictive and swift with total transparency</p>',
|
|
289
|
+
ctaHtml: `<pn-button class="btn btn-secondary">Click me</pn-button> <a target="_blank" href="google.com" class= "versa-card-cta-link-animated" > Read More<pn- icon icon='${arrow_right}' > </pn-icon></a > `,
|
|
290
|
+
},
|
|
291
|
+
], 'halfwidth', 1),
|
|
292
|
+
};
|
|
293
|
+
export const OneCardCenteredQuarterDefaultHorizontal = {
|
|
294
|
+
name: 'Horizontal Background, Image, Label, Heading, Preamble, RTE, CTA)',
|
|
295
|
+
parameters: {
|
|
296
|
+
controls: {
|
|
297
|
+
include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'imgAlignment', 'roundImage', 'cardColor'],
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
render: (args) => renderCenteredRow([
|
|
301
|
+
{
|
|
302
|
+
...args,
|
|
303
|
+
horizontal: true,
|
|
304
|
+
rteHtml: '<p>Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',
|
|
305
|
+
ctaHtml: `<pn-button class="btn btn-primary">Click me</pn-button> <a target="_blank" href="google.com" class=""> Read More <pn-icon icon='${arrow_right}' > </pn-icon></a>`,
|
|
306
|
+
},
|
|
307
|
+
], 'halfwidth', 1),
|
|
308
|
+
};
|
|
309
|
+
export const OneCardCenteredQuarterTransparentBackground = {
|
|
310
|
+
name: 'Horizontal Transparent Background (Image, Label, Heading, Preamble, RTE, CTA)',
|
|
311
|
+
parameters: {
|
|
312
|
+
controls: {
|
|
313
|
+
include: [
|
|
314
|
+
'hasBg',
|
|
315
|
+
'transparentBackground',
|
|
316
|
+
'label',
|
|
317
|
+
'heading',
|
|
318
|
+
'preamble',
|
|
319
|
+
'imageSrc',
|
|
320
|
+
'imageAlt',
|
|
321
|
+
'imgAlignment',
|
|
322
|
+
'roundImage',
|
|
323
|
+
'cardColor',
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
render: (args) => {
|
|
328
|
+
const wrapper = document.createElement('div');
|
|
329
|
+
wrapper.style.background = 'linear-gradient(135deg, #fff 0%, #000 100%)';
|
|
330
|
+
wrapper.style.padding = '64px 0';
|
|
331
|
+
const row = renderCenteredRow([
|
|
332
|
+
{
|
|
333
|
+
...args,
|
|
334
|
+
horizontal: true,
|
|
335
|
+
rteHtml: `
|
|
336
|
+
<p>This card demonstrates a <strong>10% transparent background</strong>.
|
|
337
|
+
The gradient behind the card should be visible through the background.</p>
|
|
338
|
+
`,
|
|
339
|
+
ctaHtml: `
|
|
340
|
+
<pn-button class="btn btn-primary">Click me</pn-button>
|
|
341
|
+
<a target="_blank" href="https://google.com">
|
|
342
|
+
Read More <pn-icon icon='${arrow_right}'></pn-icon>
|
|
343
|
+
</a>
|
|
344
|
+
`,
|
|
345
|
+
},
|
|
346
|
+
], 'halfwidth', 1);
|
|
347
|
+
wrapper.appendChild(row);
|
|
348
|
+
return wrapper;
|
|
349
|
+
},
|
|
350
|
+
args: {
|
|
351
|
+
transparentBackground: true,
|
|
352
|
+
label: 'Story demo',
|
|
353
|
+
heading: 'Transparent background card',
|
|
354
|
+
preamble: 'The card background is slightly transparent while content remains opaque.',
|
|
355
|
+
imgAlignment: 'left',
|
|
356
|
+
roundImage: false,
|
|
357
|
+
cardColor: 'white',
|
|
358
|
+
},
|
|
359
|
+
};
|
|
360
|
+
//# sourceMappingURL=pn-versa-card.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pn-versa-card.stories.js","sourceRoot":"","sources":["../../../../src/components/cards/pn-versa-card/pn-versa-card.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EACH,eAAe,EACf,mBAAmB,GACtB,MAAM,+BAA+B,CAAC;AAMvC,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAwB7C,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAE5D,MAAM,IAAI,GAA6B;IACnC,KAAK,EAAE,6BAA6B;IACpC,UAAU,EAAE;QACR,IAAI,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE;KAChD;IACD,IAAI,EAAE;QACF,iBAAiB;QACjB,IAAI,EAAE,iBAAiB;QAEvB,gBAAgB;QAChB,KAAK,EAAE,eAAe;QACtB,OAAO,EAAE,iBAAiB;QAC1B,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,oFAAoF;QAC9F,QAAQ,EAAE,kBAAkB;QAE5B,0BAA0B;QAC1B,OAAO,EAAE,iFAAiF;QAC1F,OAAO,EAAE,iLAAiL,WAAW,iBAAiB;QAEtN,yCAAyC;QACzC,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,OAAO;QAClB,OAAO,EAAE,EAAE;KACd;IACD,QAAQ,EAA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d,YAAY;gBACZ,WAAW;aACd;SACJ;KACJ;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9C,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,6CAA6C,CAAC;QACzE,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC;QAEjC,MAAM,GAAG,GAAG,iBAAiB,CACzB;YACI;gBACI,GAAG,IAAI;gBACP,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE;;;qBAGR;gBACD,OAAO,EAAE;;;uDAG0B,WAAW;;qBAE7C;aACJ;SACJ,EACD,WAAW,EACX,CAAC,CACJ,CAAC;QAEF,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEzB,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,IAAI,EAAE;QACF,qBAAqB,EAAE,IAAI;QAC3B,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,6BAA6B;QACtC,QAAQ,EAAE,2EAA2E;QACrF,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,OAAO;KACrB;CACJ,CAAC","sourcesContent":["import { arrow_right } from 'pn-design-assets/pn-assets/icons';\n\nimport {\n createComponent,\n createDocumentation,\n} from '@/globals/documentation/story';\nimport type {\n Meta,\n StoryObj,\n} from '@storybook/web-components';\n\nimport docs from './pn-versa-card-docs.json';\n\ntype VersaSize = 'default' | 'halfwidth' | 'onethirdwidth' | 'onequarterwidth';\ntype CardColor = 'white' | 'blue25' | 'business' | 'blue50' | 'blue400' | 'blue900' | 'coral25' | 'coral50' | 'green25' | 'green50' | 'none';\n\ntype VersaCardStoryArgs = Omit<Partial<HTMLPnVersaCardElement>, 'theme'> & {\n /**\n * Wrapper-only sizing (because SCSS targets `.halfwidth .pn-versa-card-hasBg { ... }`)\n */\n size?: VersaSize;\n\n /** RTE slot content (simulates CMS output) */\n rteHtml?: string;\n\n /** CTA slot content (simulates CMS output) */\n ctaHtml?: string;\n\n /** Story-only attribute mapped to data-card-color */\n cardColor?: CardColor;\n\n imageSrc?: string;\n imageAlt?: string;\n};\n\nconst { argTypes, textContent } = createDocumentation(docs);\n\nconst meta: Meta<VersaCardStoryArgs> = {\n title: 'Components/Cards/Versa card',\n parameters: {\n docs: { description: { story: textContent } },\n },\n args: {\n // Wrapper sizing\n size: 'onequarterwidth',\n\n // Content props\n label: 'Example label',\n heading: 'Example heading',\n headingLevel: 'h3',\n preamble: 'Example preamble',\n imageSrc: 'https://www.postnord.se/siteassets/vi-tar-saker-framat---kampanjsida/paketbox3.jpg',\n imageAlt: 'Versa card image',\n\n // Slot content (optional)\n rteHtml: '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit.</p>',\n ctaHtml: `<pn-button class=\"pn-button\" appearance=\"light\" target=\"_blank\" href=\"google.com\"> Read More </pn-button> <a class=\"versa-card-cta-link-animated\"> Läs mer här <pn-icon icon='${arrow_right}' > </pn-icon> `,\n\n // Modifier props (Stencil @Prop) \n hasImageCover: false,\n imageGrow: false,\n horizontal: false,\n imgAlignment: 'left',\n roundImage: false,\n center: false,\n alignMiddle: false,\n cardColor: 'white',\n opacity: 85,\n },\n argTypes: {\n ...argTypes,\n\n // Slots\n rteHtml: { control: 'text', description: 'Injected into slot=\"rte\".' },\n ctaHtml: { control: 'text', description: 'Injected into slot=\"cta\".' },\n imageSrc: { control: 'text', description: 'Image URL for the image slot.' },\n imageAlt: { control: 'text', description: 'Alt text for the image slot.' },\n\n // Wrapper sizing\n size: {\n control: 'radio',\n options: ['default', 'halfwidth', 'onethirdwidth', 'onequarterwidth'],\n description:\n 'Adds a parent wrapper class for `.halfwidth` / `.onequarterwidth` selectors in SCSS.',\n },\n\n // Story-only data attribute\n cardColor: {\n control: { type: 'select' },\n options: [\n 'none',\n 'white',\n 'blue25',\n 'blue50',\n 'blue400',\n 'blue900',\n 'coral25',\n 'coral50',\n 'green25',\n 'green50',\n ],\n description: 'Sets the data-card-color attribute on pn-versa-card.',\n },\n\n opacity: {\n control: { type: 'range', min: 0, max: 100, step: 5 },\n },\n imgAlignment: {\n control: 'select',\n options: ['left', 'right'],\n description: 'Sets the image to the right side of the card.',\n },\n roundImage: {\n control: 'boolean',\n description: 'Adds rounded image styling to the card.',\n },\n\n headingLevel: {\n control: 'select',\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n description: 'Sets the heading level for the card heading.',\n },\n transparentBackground: {\n control: 'boolean',\n description: 'If true, applies reduced opacity to the card background to allow content behind the card to show through.',\n },\n },\n};\n\nexport default meta;\ntype Story = StoryObj<VersaCardStoryArgs>;\n\nfunction buildCard(args: VersaCardStoryArgs) {\n const {\n rteHtml,\n ctaHtml,\n size: _size,\n cardColor,\n ...componentArgs\n } = args;\n\n const { imageSrc,\n imageAlt, } = args;\n\n const el = createComponent('pn-versa-card', componentArgs) as HTMLElement;\n\n if (cardColor) {\n if (cardColor === 'none') {\n el.setAttribute('data-card-color', '');\n } else {\n el.setAttribute('data-card-color', cardColor);\n }\n }\n\n if (rteHtml?.trim()) {\n const rte = document.createElement('div');\n rte.slot = 'rte';\n rte.innerHTML = rteHtml;\n el.appendChild(rte);\n }\n\n if (ctaHtml?.trim()) {\n const cta = document.createElement('div');\n cta.slot = 'cta';\n cta.innerHTML = ctaHtml;\n el.appendChild(cta);\n }\n\n if (imageSrc) {\n const media = document.createElement('div');\n media.slot = 'image';\n\n const picture = document.createElement('picture');\n const img = document.createElement('img');\n img.src = imageSrc;\n\n if (imageAlt) {\n img.alt = imageAlt;\n }\n\n picture.appendChild(img);\n media.appendChild(picture);\n el.appendChild(media);\n }\n\n return el;\n}\n\n/**\n * One card, constrained by wrapper class, and centered on the page.\n */\nfunction renderCenteredQuarter(args: VersaCardStoryArgs) {\n const wrapper = document.createElement('div');\n\n if (args.size && args.size !== 'default') {\n wrapper.className = args.size;\n }\n\n wrapper.style.marginInline = 'auto';\n wrapper.style.display = 'block';\n wrapper.style.maxWidth = '420px';\n\n wrapper.appendChild(buildCard(args));\n return wrapper;\n}\n\nfunction renderCenteredRow(\n items: VersaCardStoryArgs[],\n size: VersaSize,\n columns: number,\n) {\n const wrapper = document.createElement('div');\n\n if (size !== 'default') {\n wrapper.className = size;\n }\n\n wrapper.style.display = 'flex';\n wrapper.style.justifyContent = 'center';\n wrapper.style.width = '100%';\n wrapper.style.height = '100%';\n\n const row = document.createElement('div');\n row.style.display = 'flex';\n row.style.gap = '24px';\n row.style.alignItems = 'stretch';\n row.style.height = '100%';\n\n items.forEach((item) => {\n const col = document.createElement('div');\n col.style.flex = `0 1 ${100 / columns}%`;\n col.style.display = 'flex';\n\n const card = buildCard(item);\n card.style.flex = '1';\n\n col.appendChild(card);\n row.appendChild(col);\n });\n\n wrapper.appendChild(row);\n return wrapper;\n}\n\n/* -----------------------------\n Stories\n--------------------------------*/\n\nexport const OneCardCenteredQuarterPlayGround: Story = {\n name: 'Playground (all controls enabled, for testing purposes)',\n render: (args) =>\n renderCenteredRow(\n [\n {\n ...args,\n rteHtml: '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p> <blockquote> This is a blockquote example.This is a blockquote example.This is a blockquote example.This is a blockquote example. </blockquote>',\n },\n ],\n 'onethirdwidth',\n 1,\n ),\n parameters: {\n controls: {\n exclude: [],\n },\n },\n};\n\nexport const OneCardCenteredQuarterDefault: Story = {\n name: 'Background, Image, Label, Heading, Preamble, RTE, CTA)',\n render: (args) => renderCenteredQuarter(args),\n args: {\n label: 'Test',\n heading: 'Heading',\n preamble: 'Here goes the preamble for this block',\n rteHtml:\n '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',\n ctaHtml: `<pn-button class=\"btn btn-secondary\">Click me</pn-button>`,\n cardColor: 'blue25',\n },\n parameters: {\n controls: {\n include: ['hasBg', 'label', 'heading', 'headingLevel', 'preamble', 'imageSrc', 'cardColor'],\n },\n },\n};\n\nexport const OneCardRoundedImage: Story = {\n name: 'RoundedImage, Label, Heading, Preamble, RTE, CTA, Alignment)',\n render: (args) => renderCenteredQuarter(args),\n args: {\n roundImage: true,\n center: false,\n label: 'Test',\n heading: 'Heading',\n preamble: 'Here goes the preamble for this block',\n rteHtml:\n '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',\n },\n parameters: {\n controls: {\n include: ['label', 'heading', 'preamble', 'imageSrc', 'center', 'hasBg', 'cardColor', 'headingLevel'],\n },\n },\n};\n\n\nexport const OneCardCenteredQuarterImageCoverText: Story = {\n name: 'Background, Image, Label, Heading, Preamble, RTE, CTA)',\n render: (args) => renderCenteredQuarter(args),\n args: {\n hasImageCover: true,\n label: 'Test',\n heading: 'Heading',\n preamble: 'Here goes the preamble for this block',\n rteHtml:\n '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',\n ctaHtml: `<pn-button class=\"btn btn-secondary\">Click me</pn-button> <a target=\"_blank\" href=\"google.com\" class= \"versa-card-cta-link-animated\" > Read More<pn- icon icon='${arrow_right}' > </pn-icon></a > `,\n cardColor: 'blue25',\n },\n parameters: {\n controls: {\n include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'opacity', 'cardColor', 'center'],\n },\n },\n};\n\nexport const ThreeCardsCenteredQuarter: Story = {\n name: 'Three cards, centered, with background and image (for layout testing)',\n parameters: {\n controls: {\n include: ['imageSrc'],\n },\n },\n render: (args) =>\n renderCenteredRow(\n [\n {\n ...args,\n\n cardColor: 'blue25',\n label: 'Card 1',\n rteHtml:\n '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',\n },\n {\n ...args,\n label: 'Card 2',\n heading: 'I am a card with no modifier',\n\n },\n {\n ...args,\n hasImageCover: true,\n preamble: '',\n heading: '',\n label: '',\n rteHtml: '',\n ctaHtml: '',\n },\n ],\n 'onethirdwidth',\n 3,\n ),\n};\n\nexport const TwoCardsHorizontalAlignMiddle: Story = {\n name: 'Two cards, horizontal, aligned middle, with background and image (for layout testing)',\n parameters: {\n controls: {\n include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'imgAlignment', 'roundImage', 'cardColor'],\n },\n },\n render: (args) =>\n renderCenteredRow(\n [\n {\n ...args,\n cardColor: 'blue25',\n horizontal: true,\n alignMiddle: true,\n rteHtml: '<p>These actions help us lower emissions while maintaining reliable service across the region. PostNord is continuously exploring and adopting new technologies that strengthen our operational capabilities and help us deliver better value to customers across the Nordic region.</p>',\n\n },\n {\n ...args,\n preamble: '',\n center: true,\n roundImage: true,\n horizontal: false,\n alignMiddle: true,\n rteHtml: '<p>Excellent operational stability 24/7. Deliveries completely aligned with business needs. Response to disruptions is predictive and swift with total transparency</p>',\n ctaHtml: `<pn-button class=\"btn btn-secondary\">Click me</pn-button> <a target=\"_blank\" href=\"google.com\" class= \"versa-card-cta-link-animated\" > Read More<pn- icon icon='${arrow_right}' > </pn-icon></a > `,\n },\n ],\n 'halfwidth',\n 1,\n ),\n};\n\nexport const OneCardCenteredQuarterDefaultHorizontal: Story = {\n name: 'Horizontal Background, Image, Label, Heading, Preamble, RTE, CTA)',\n parameters: {\n controls: {\n include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'imgAlignment', 'roundImage', 'cardColor'],\n },\n },\n render: (args) =>\n renderCenteredRow(\n [\n {\n ...args,\n horizontal: true,\n rteHtml:\n '<p>Lorem ipsum dolor sit amet, <a href=\"#\">consectetur</a> adipiscing elit. ipsum sodales tincidunt tincidunt nec nisi. Sed ante mauris, tempus sit amet dictum a, ornare tincidunt ex.</p>',\n ctaHtml: `<pn-button class=\"btn btn-primary\">Click me</pn-button> <a target=\"_blank\" href=\"google.com\" class=\"\"> Read More <pn-icon icon='${arrow_right}' > </pn-icon></a>`,\n },\n ],\n 'halfwidth',\n 1,\n ),\n};\n\n\nexport const OneCardCenteredQuarterTransparentBackground: Story = {\n name: 'Horizontal Transparent Background (Image, Label, Heading, Preamble, RTE, CTA)',\n parameters: {\n controls: {\n include: [\n 'hasBg',\n 'transparentBackground',\n 'label',\n 'heading',\n 'preamble',\n 'imageSrc',\n 'imageAlt',\n 'imgAlignment',\n 'roundImage',\n 'cardColor',\n ],\n },\n },\n render: (args) => {\n const wrapper = document.createElement('div');\n\n wrapper.style.background = 'linear-gradient(135deg, #fff 0%, #000 100%)';\n wrapper.style.padding = '64px 0';\n\n const row = renderCenteredRow(\n [\n {\n ...args,\n horizontal: true,\n rteHtml: `\n <p>This card demonstrates a <strong>10% transparent background</strong>.\n The gradient behind the card should be visible through the background.</p>\n `,\n ctaHtml: `\n <pn-button class=\"btn btn-primary\">Click me</pn-button>\n <a target=\"_blank\" href=\"https://google.com\">\n Read More <pn-icon icon='${arrow_right}'></pn-icon>\n </a>\n `,\n },\n ],\n 'halfwidth',\n 1,\n );\n\n wrapper.appendChild(row);\n\n return wrapper;\n },\n\n args: {\n transparentBackground: true,\n label: 'Story demo',\n heading: 'Transparent background card',\n preamble: 'The card background is slightly transparent while content remains opaque.',\n imgAlignment: 'left',\n roundImage: false,\n cardColor: 'white',\n },\n};"]}
|
|
@@ -42,7 +42,7 @@ export class PnChart {
|
|
|
42
42
|
this.myChart = new Chart(this.myChartCtxRef, chartCfg(this.dataChartType, this.data, this.numberOfSetsGreaterThanOne));
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '9f34e03c80c36bbe89f2407290a4d343164ac71f' }, h("div", { key: '7f61a11f9685fdacf6e984f8d4d4a907a17f4a43', class: "chart-wrapper" }, h("canvas", { key: '1483c145b02848fb2bd5e06efd9261eede6eafb0', id: "chart-canvas", class: "pnChart" }))));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "pn-chart"; }
|
|
48
48
|
static get originalStyleUrls() {
|
|
@@ -19,9 +19,9 @@ export class PnChartsCard {
|
|
|
19
19
|
return null;
|
|
20
20
|
};
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
23
|
-
(h("div", { key: '
|
|
24
|
-
(h("div", { key: '
|
|
22
|
+
return (h(Host, { key: '932e9396a6f2d92296f7d3891d30c8b239f7c505' }, h("slot", { key: 'f7b2cee3fbb752529007d357977367b75d7d92dc', name: "clickable-block-wrapper" }), h("div", { key: '4e41ef800cd83f9655498dc003cc475adf94be74', class: "pn-charts-card__wrapper" }, this.header &&
|
|
23
|
+
(h("div", { key: '887b87722b03a88b437e1fb8f08cd5b96a22d801', class: "pn-charts-card__heading__wrapper pn-charts-card__heading__wrapper--vertical" }, h("h2", { key: '7e42eed995b18e6e35420bc7164e2292c0ad8bad', class: "pn-charts-card__heading" }, this.header), h("div", { key: '2e5d4bfc48f85dca46a8a686ecc74c53fbea7f43', class: "pn-charts-card__heading__highlight" }, this.highlight))), h("div", { key: 'e6afaecfbff9546b65f23d063d78d2bd85fa577c', class: "pn-charts-card__content__wrapper" }, h("slot", { key: '9f648bbfba9338cadbdabf6045a4ed19a0575a99', name: "chart" }), h("div", { key: 'df43a6c84b8d990ac7ce92daea524c93427684ad', class: "pn-charts-card__text__container" }, this.header &&
|
|
24
|
+
(h("div", { key: 'fad6bbcd1d3588f580f55aeb0852acd8522e696e', class: "pn-charts-card__heading__wrapper pn-charts-card__heading__wrapper--horizontal" }, h("h2", { key: 'db90f01327a55f0acffaeb11be0839b348dc3854', class: "pn-charts-card__heading pn-charts-card__heading" }, this.header), h("div", { key: 'e08e7589c11ed25b8d0b2986e2e940a24d4f911e', class: "pn-charts-card__heading__highlight" }, this.highlight))), h("span", { key: '75d76421250f366755f17f0e42217d88fb6155fd', class: "pn-charts-card__preamble" }, this.preamble), h("div", { key: 'b54eea882f8f9d8b3934dda3fdcae18d76f938ce', class: "pn-charts-card__text__wrapper" }, h("div", { key: '5696594a4b9eec838d7bedfc515e11f2d95b3268', class: "pn-charts-card__source" }, h("label", { key: '1364ed359aa0bc1ab99d06a560cb3d03e3a0fede' }, this.label), this.source ? h("p", { class: "pn-chart-card__text__heading" }, this.source) : null, this.showCtaLinkText())))))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "pn-charts-card"; }
|
|
27
27
|
static get originalStyleUrls() {
|
|
@@ -13,8 +13,8 @@ export class PnCtaBlock {
|
|
|
13
13
|
render() {
|
|
14
14
|
const hasImage = this.hostElement.querySelector('[slot="illustration"]');
|
|
15
15
|
const hasButtons = this.hostElement.querySelector('[slot="cta-buttons"]');
|
|
16
|
-
return (h(Host, { key: '
|
|
17
|
-
h("div", { class: "cta-block__image-wrapper" }, h("slot", { name: "illustration" })) : null), h("div", { key: '
|
|
16
|
+
return (h(Host, { key: '8b2108e0a03e9545be40625634ab9557d868b812' }, h("div", { key: '53a19992a4c642703476963faa81dae31783f3e7', "pn-background-color": this.pnBackgroundColor, class: `cta-block ${this.isLarge ? 'cta-block--large' : ''} ${this.isCentered ? 'cta-block--center' : ''} ${(this.isSmall ? 'cta-block--small' : '')} ${this.contentTop ? 'cta-block--content-top' : ''}` }, (hasImage ?
|
|
17
|
+
h("div", { class: "cta-block__image-wrapper" }, h("slot", { name: "illustration" })) : null), h("div", { key: '6dbd1b2f7318308ed374582ca50638453a834b73', class: "cta-block__content" }, (this.heading) ? h("h2", { class: "cta-block__heading" }, this.heading) : null, (this.bodyText) ? h("p", { class: "cta-block__text" }, this.bodyText) : null), (hasButtons ?
|
|
18
18
|
h("div", { class: "cta-block__action" }, h("slot", { name: "cta-buttons" })) : null))));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "pn-cta-block"; }
|
|
@@ -15,7 +15,7 @@ export class PnSpotlight {
|
|
|
15
15
|
this.currentWidth = event.target.innerWidth;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '9e19eb36a77777d651f61085a8552f9aa8310b79' }, h("div", { key: '73ef3e4cda0a382e79270e2c43f4ddaa8bcd4414', class: "pn-parcel-tracker__container" }, h("form", { key: '66349ff229bb9d7cca1982a72a1fa300166d1631', method: "GET", action: this.formActionUrl }, h("h3", { key: 'eabf93412d1df20d5cc99a74e30337378d43b37a', class: "pn-parcel-tracker__container__heading" }, this.heading), h("pn-marketweb-input", { key: 'e8dab573ff27b488160181f803fe97207e0ab330', name: this.inputName, placeholder: this.placeholder }), h("pn-button", { key: '43c41a32db482f094659fe055d22b143d8af0e17', type: "submit", icon: search, tooltip: this.currentWidth < 412 ? this.buttonLabel : null }, this.currentWidth >= 412 && this.buttonLabel)))));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "pn-parcel-tracker"; }
|
|
21
21
|
static get originalStyleUrls() {
|
|
@@ -6,7 +6,7 @@ export class PnQuickCta {
|
|
|
6
6
|
}
|
|
7
7
|
hostElement;
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '0bcb4363f2719183b49ddbe16a2b4a4f73cb1833' }, h("div", { key: 'd0cad8249fb1f6f2bcfc42f5996f7749ef8eb829', class: "quick-cta__content" }, this.heading && h("h2", { key: 'a48140c8941a10038bda1da2895a85e74815ac99', class: "quick-cta__content__heading" }, this.heading), h("p", { key: '406a9a8ce995e35e09df5a4514a5ee10507cd537', class: "quick-cta__content__preamble" }, this.preamble), h("slot", { key: '075922f329090b5ca955bae2112c4197ae08135a', name: "quick-cta-cta" }))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "pn-quick-cta"; }
|
|
12
12
|
static get originalStyleUrls() {
|
|
@@ -6,7 +6,7 @@ export class PnShareItem {
|
|
|
6
6
|
}
|
|
7
7
|
hostElement;
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '4e1cea876f61c710df92104b45e50ba66cf0b623' }, h("div", { key: '0e6aed22f766bcb4f1f6eb84f36e3d4ba440e37a', class: "pn-share-item__container" }, h("a", { key: '563a048cf8a4b6050bf3db2a6621ae0743b298eb', href: `${this.link}` }, h("slot", { key: 'e5376f9ccd073b93adb746c88631f574185a6854', name: "icon" }), " ", this.text))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "pn-share-item"; }
|
|
12
12
|
static get originalStyleUrls() {
|
|
@@ -27,7 +27,7 @@ export class PnShare {
|
|
|
27
27
|
this.setTranslations();
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '87c86e64bc6e31b8ecb1f172005dc1fa2b2a821a' }, h("div", { key: 'b0ae9877a73c5b2a67a6fc03e91cae21062df823', class: "pn-share__container" }, h("h3", { key: 'b410f35c7a3e20951b6795c886e755d4c9cc6337', class: "pn-share__heading" }, this.i18n.sharelabel, ":"), h("div", { key: 'e5b84fdc21fb4fcd5de996f55ef2b689d3385f80', class: "pn-share__items" }, SHARE_URLS.map(platform => {
|
|
31
31
|
return (h("pn-share-item", { link: `${platform.url}${this.link}`, text: platform.text }, h("pn-icon", { slot: "icon", icon: platform.platform })));
|
|
32
32
|
})))));
|
|
33
33
|
}
|
|
@@ -12,7 +12,7 @@ export class PnSpotlight {
|
|
|
12
12
|
this.addDynamic = classNames({ 'cta--dynamic': this.isDynamic });
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'ec938ca8e73e29c04d713fff497da4d57bd25de2' }, h("div", { key: '8ca6ff6b0027bed2c5c369e127c474a1cb0246e8', class: "pn-spotlight__container" }, h("slot", { key: 'efc788918cc0d68450f77484ed5c6379a8243b6a', name: "mobile-heading" }), h("div", { key: 'accea01d45fce0d3685430eee037e17a3c1786bd', class: `pn-spotlight__container__wrapper ${this.addDynamic}` }, h("div", { key: '1fd54fb9bdab12397824b92dbb307227a4f0f120', class: "pn-spotlight__container__wrapper__content" }, h("div", { key: '36331f2de4f9be557e70660353356c5a629f0776', class: "pn-spotlight__container__wrapper__content__ball" }), h("slot", { key: '3e56d7906daa1af24db9be615975c33b53d82968', name: "content" }))))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "pn-spotlight"; }
|
|
18
18
|
static get originalStyleUrls() {
|
|
@@ -34,7 +34,7 @@ export class PnStatsInfoData {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'a1341a3318a51adb8a170b773f9109110bca65c6' }, h("div", { key: 'e7c94b94b3cf2b1c7fd4c05f953ca537ec17153c', class: "pn-stats-info-data__container" }, h("div", { key: '391ad615fa5930728fb3a7baece08d3636c90820', class: "pn-stats-info-data__container__content" }, h("div", { key: 'a54130470a7c195f2789c440167022d9eafbee42', class: "pn-stats-info-data__container__content__data", id: `pn-stats-info-data-${this.compId}-${this.index}` }), this.unit && h("div", { key: '0aa67825205280a82b65f8f650203bcbe9318ded', class: "pn-stats-info-data__container__content__unit" }, this.unit)), h("div", { key: '14bd4ef96a6d6be6591dbcb314c395a016e9ad9c', class: "pn-stats-info-data__container__content__preamble" }, this.preamble))));
|
|
38
38
|
}
|
|
39
39
|
componentDidRender() {
|
|
40
40
|
const observer = new IntersectionObserver(entries => inViewport(entries, 'is-inViewport', this.inViewPortCallback));
|
|
@@ -12,7 +12,7 @@ export class PnStatsInfo {
|
|
|
12
12
|
this.myParsedArray = JSON.parse(newValue);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'c0e816e4c281e81f243b88a2ccc7cb3f82e6d2a2' }, h("div", { key: '666152f5223cde318b12d55b4175b7622be3cb23', class: "pn-stats-info__container" }, h("div", { key: '29a902e1b93a94f9428fdf341eaba640177d4f14', class: "pn-stats-info__container__map", style: { backgroundImage: `url(${this.backgroundUrl})` } }), h("div", { key: 'b25c11b6e98bc2b36ea9859fa63903b0b3df18aa', class: "pn-stats-info-image-container" }, h("slot", { key: '368b94a4c51905e322b47d3ab064021005470d82', name: "illustration" })), h("div", { key: 'cea4df0e76ca50601b32f94a9ca3a3beb2bd8b09', class: "pn-stats-info__container__content", style: { backgroundImage: `url(${this.backgroundUrl})` } }, this.heading && h("h3", { key: '1e58ffbdfe93b320aee779751f05d49f9d2d1064', class: "pn-stats-info__container__content__heading" }, this.heading), h("div", { key: 'dbc3c69b74be499f991159ebcd5eeb515a54f509', class: "pn-stats-info__container__content__data" }, this.myParsedArray &&
|
|
16
16
|
this.myParsedArray.map((stats, index) => {
|
|
17
17
|
return (h("pn-stats-info-data", { index: index, startValue: stats.startValue, data: stats.data, unit: stats.unit, preamble: stats.preamble, duration: stats.duration, format: stats.format, formatStyle: stats.formatStyle }));
|
|
18
18
|
}))))));
|
|
@@ -242,7 +242,7 @@ export class PnAddressAutofill {
|
|
|
242
242
|
return str1;
|
|
243
243
|
}
|
|
244
244
|
render() {
|
|
245
|
-
return (h(Host, { key: '
|
|
245
|
+
return (h(Host, { key: '43ca8acceb3c02a3a12a6c4da9ae4e4b12853709', class: "pn-address-autofill" }, this._postalCodeProps?.postalCodeCityLabel ? (h("div", { class: "label-container" }, h("label", null, `${this._postalCodeProps.postalCodeCityLabel + ' ' + this.postalCodeRequiredLabel}`))) : null, h("div", { key: '4c61dd29dc1b53a71ab04f79a405bda5323764ab', class: "input-container-row" }, h("pn-input", { key: 'fd0baf1681bc21da522310f1233e693aa3f490cf', type: "number", name: this._postalCodeProps?.postalCodeInputName, required: this._postalCodeProps?.postalCodeInputRequired, placeholder: this._postalCodeProps?.postalCodeInputPlaceholder, ref: el => (this.pnInputPostalCode = el), autocomplete: "off", helpertext: this._postalCodeProps?.postalCodeInputHelpertext }), h("pn-input", { key: 'daa23faa30b9b48969b3f58e09ef6fe29a1f666d', type: "text", name: this._cityProps?.cityInputName, disabled: true, value: this.city, placeholder: this._cityProps?.cityInputPlaceholder, autocomplete: "off", helpertext: this._cityProps?.cityInputHelpertext })), this._streetAddressProps?.streetAddressNumberLabel ? (h("div", { class: "label-container" }, h("label", null, `${this._streetAddressProps.streetAddressNumberLabel + ' ' + this.streetRequiredLabel}`))) : null, h("div", { key: 'da8ef7b1eeca53ccbb926260acd2df79b395ee64', class: "input-container-row" }, h("pn-input", { key: 'cfd025d69b0901885da50d5dd7a763171ff96318', type: "text", name: this._streetAddressProps?.streetAddressInputName, required: this._streetAddressProps?.streetAddressInputRequired, value: this.streetAddress, placeholder: this._streetAddressProps?.streetAddressInputPlaceholder, ref: el => (this.pnInputStreetAddress = el), autocomplete: "off", helpertext: this._streetAddressProps?.streetAddressInputHelpertext, disabled: this.isLoading }), h("pn-input", { key: 'f9da42b0af3c7726686393ce1f161ac30d93a8b3', type: "text", name: this._streetNumberProps?.streetNumberInputName, required: this._streetNumberProps?.streetNumberInputRequired, value: this.streetNumber, placeholder: this._streetNumberProps?.streetNumberInputPlaceholder, ref: el => (this.pnInputStreetNumber = el), autocomplete: "off", helpertext: this._streetNumberProps?.streetNumberInputHelpertext, disabled: this.isLoading })), (!this.validAddress && this.streetAddressInputField.value && this.streetNumberInputField.value) ? (h("div", { class: "toast-container" }, h("pn-toast", { text: this.addressNotFoundError ?? this.translation.addressNotFound, appearance: "warning", icon: alert_exclamation_circle }))) : null));
|
|
246
246
|
}
|
|
247
247
|
static get is() { return "pn-address-autofill"; }
|
|
248
248
|
static get originalStyleUrls() {
|
|
@@ -26,7 +26,7 @@ export class PnBonusProgressbarLevel {
|
|
|
26
26
|
return `${this.value.toLocaleString('sv-SE', { maximumFractionDigits: 0 })} ${this.currency}`;
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: '00b80f6a445e99d2ba395fcef54e4138c4485d53', style: { left: `${this.visualpercentage}%` } }, h("div", { key: '4a04a5b11d281fb92b94ea0dfb423df01a59b1f4', class: "progressbar-level-percentage" }, this.bonuspercentage), h("div", { key: 'de57ec39c15545fb1e854f9c2a9540c49885676e', class: "progressbar-level-value" }, this.formatValue())));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "pn-bonus-progressbar-level"; }
|
|
32
32
|
static get originalStyleUrls() {
|
|
@@ -78,7 +78,7 @@ export class PnBonusProgressbar {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '0c2800a5ff59a29a2932257f625a86ec8217ab78' }, h("div", { key: 'd53c24cd81f61b5b71e8065b423108e70b37228e', class: "bonusprogressbar-top" }, this.icon ? (h("div", { class: "bonusprogressbar-top-icon" }, h("pn-icon", { icon: this.icon, small: "false", color: this.iconColor() }))) : ({}), h("div", { key: '4bf2dd629ee729f680f75e0bdb25d60ab29463cb', class: "bonusprogressbar-top-heading" }, h("h4", { key: 'c23baca714b75a70374c164c4af5fee0ac3df1a8', class: "bonusprogressbar-top-headline" }, this.heading, " ", h("strong", { key: 'aecfe379324384f06b23c648de1f902a6f233f62', class: "bonusprogressbar-top-percentage" }, this.bonuspercentage)), this.sumtext ? h("div", { class: "bonusprogressbar-sumtext" }, this.sumtext) : null)), h("div", { key: 'c4186c08abbf122d0895f030a836b5adbd4b4a6c', class: "bonusprogressbar-wrapper" }, h("progress", { key: '043df984daf3c135d4248c67e62d83ee4e1ea978', class: "bonusprogressbar-progress", value: this.progresspercentage, max: "100" }), h("slot", { key: 'adc85d4228cbbc28aa2846b78f753660cd7e366a' }))));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "pn-bonus-progressbar"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -26,7 +26,7 @@ export class PnChoiceButton {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'a1a97f024a1817a0833541650309056b8d4765ea' }, h("input", { key: '028965fc99719face3b99d28e64915a089f5f6f9', type: this.type, id: this.choiceid, value: this.value, name: this.name || this.choiceid, disabled: this.disabled, checked: this.checked }), h("label", { key: '372c83ee394b81b038300bdc19f8cccd15f14e48', htmlFor: this.choiceid, class: "pn-choice-button" }, h("slot", { key: '92fd81e2908be7d4eebc81c5c3676340bb596cee' }))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "pn-choice-button"; }
|
|
32
32
|
static get originalStyleUrls() {
|