@postnord/pn-marketweb-components 4.2.2 → 4.2.3
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 +519 -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 +333 -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 +1 -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-24e428e4.entry.js +2 -0
- package/pn-market-web-components/p-24e428e4.entry.js.map +1 -0
- 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-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 +27 -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,326 @@
|
|
|
1
|
+
import { HeadingTag } from "../../../globals/HeadingTag";
|
|
2
|
+
import { h, Host, } from "@stencil/core";
|
|
3
|
+
/** A short description about `pn-versa-card` */
|
|
4
|
+
export class PnVersaCard {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.label = undefined;
|
|
7
|
+
this.heading = undefined;
|
|
8
|
+
this.preamble = undefined;
|
|
9
|
+
this.imageGrow = false;
|
|
10
|
+
this.horizontal = false;
|
|
11
|
+
this.imgAlignment = 'left';
|
|
12
|
+
this.hasImageCover = false;
|
|
13
|
+
this.alignMiddle = false;
|
|
14
|
+
this.center = false;
|
|
15
|
+
this.roundImage = false;
|
|
16
|
+
this.headingLevel = 'h3';
|
|
17
|
+
this.opacity = 90;
|
|
18
|
+
this.transparentBackground = false;
|
|
19
|
+
this.showImage = false;
|
|
20
|
+
this.showRte = false;
|
|
21
|
+
this.showCta = false;
|
|
22
|
+
}
|
|
23
|
+
hostElement;
|
|
24
|
+
cx(parts) {
|
|
25
|
+
return parts.filter(Boolean).join(' ');
|
|
26
|
+
}
|
|
27
|
+
get hasImageCoverText() {
|
|
28
|
+
return !!(this.label || this.heading || this.preamble || this.showRte || this.showCta);
|
|
29
|
+
}
|
|
30
|
+
get normalizedOpacity() {
|
|
31
|
+
return Math.min(100, Math.max(0, this.opacity ?? 90));
|
|
32
|
+
}
|
|
33
|
+
// This getter reads the data-card-color attribute, which is used to set CSS variables for background and text colors in the SCSS file. It returns the color value or null if not set.
|
|
34
|
+
get cardColor() {
|
|
35
|
+
const value = this.hostElement.getAttribute('data-card-color')?.trim().toLowerCase();
|
|
36
|
+
return value || null;
|
|
37
|
+
}
|
|
38
|
+
get hasBg() {
|
|
39
|
+
return !!this.cardColor;
|
|
40
|
+
}
|
|
41
|
+
get cardClass() {
|
|
42
|
+
return this.cx([
|
|
43
|
+
'pn-versa-card',
|
|
44
|
+
// modifiers
|
|
45
|
+
this.horizontal && 'pn-versa-card-horizontal',
|
|
46
|
+
this.horizontal && this.imgAlignment === 'right' && 'pn-versa-card-horizontal--imgRight',
|
|
47
|
+
this.hasBg && 'pn-versa-card-hasBg',
|
|
48
|
+
this.hasImageCover && 'pn-versa-card-hasImageCover', // can be true without text, just means image covers whole card without text on top
|
|
49
|
+
this.hasImageCover && this.hasImageCoverText && 'pn-versa-card-hasImageCoverText', //has to have imageCover true AND imageCoverText in order for class to be set
|
|
50
|
+
this.roundImage && 'pn-versa-card-hasRoundedImage',
|
|
51
|
+
this.center && 'pn-versa-card-center',
|
|
52
|
+
this.alignMiddle && 'pn-versa-card-alignMiddle',
|
|
53
|
+
this.imageGrow && 'pn-versa-card-imageGrow',
|
|
54
|
+
this.hasBg && this.transparentBackground && 'pn-versa-card-transparentBackground',
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
get showContent() {
|
|
58
|
+
return this.showTextContent || this.showCta;
|
|
59
|
+
}
|
|
60
|
+
get showTextContent() {
|
|
61
|
+
return !!(this.label || this.heading || this.preamble || this.showRte);
|
|
62
|
+
}
|
|
63
|
+
componentWillLoad() {
|
|
64
|
+
this.showImage = !!this.hostElement.querySelector('[slot="image"]');
|
|
65
|
+
this.showRte = !!this.hostElement.querySelector('[slot="rte"]');
|
|
66
|
+
this.showCta = !!this.hostElement.querySelector('[slot="cta"]');
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return (h(Host, { key: '68795fe8f1d2c350e5a75587f4f3a4c5c7aa36c9' }, h("div", { key: '56ed337bc840a49cb2cabac58296816a863476d0', class: this.cardClass, style: { '--pn-versa-opacity': `${this.normalizedOpacity / 100}` } }, this.showImage && (h("div", { key: '819b335ef80afc4a7acdcdc4b8de3aa778f5848b', class: "pn-versa-card-imageWrapper" }, h("slot", { key: '29ec92758424d1ab78ec647a88960b30ef831296', name: "image" }))), this.showContent && (h("div", { key: '52f708312839f2026574e4c26e4d5cc7dd19d9c7', class: "pn-versa-card-content" }, this.showTextContent && h("div", { key: 'f945d3960dab715386493f01d798d81eec49f47d', class: "pn-versa-card-textContent" }, this.label && (h("span", { key: 'acf5de375907dbf4699d450cd8f358a68475808d', class: "pn-versa-card-label" }, this.label)), this.heading && (h(HeadingTag, { key: 'e2cdc9c1662c77184010fc6a5179b47959a637e9', cssClass: "pn-versa-card-heading", level: this.headingLevel }, this.heading)), this.preamble && (h("p", { key: '82c6e264660a5acc5227f9db0f0a7c5777e37d83', class: "pn-versa-card-preamble" }, this.preamble)), this.showRte && h("div", { key: '1025d88c618f24e63d8b75cf3fb62262d98015e0', class: "pn-versa-card-RTEtext" }, h("slot", { key: 'ec7cadcd2950cdb5d697f1bdd059d5ece1473168', name: "rte" }))), this.showCta && h("div", { key: '7ae363ccac0b3ea35559c97d0a45b8629c8c310e', class: "pn-versa-card-linkwrapper" }, h("slot", { key: 'e0d30dd052fab2dd5a3af805f67628b26e71750b', name: "cta" })))))));
|
|
70
|
+
}
|
|
71
|
+
static get is() { return "pn-versa-card"; }
|
|
72
|
+
static get originalStyleUrls() {
|
|
73
|
+
return {
|
|
74
|
+
"$": ["pn-versa-card.scss"]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
static get styleUrls() {
|
|
78
|
+
return {
|
|
79
|
+
"$": ["pn-versa-card.css"]
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get properties() {
|
|
83
|
+
return {
|
|
84
|
+
"label": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"mutable": false,
|
|
87
|
+
"complexType": {
|
|
88
|
+
"original": "string",
|
|
89
|
+
"resolved": "string",
|
|
90
|
+
"references": {}
|
|
91
|
+
},
|
|
92
|
+
"required": false,
|
|
93
|
+
"optional": true,
|
|
94
|
+
"docs": {
|
|
95
|
+
"tags": [],
|
|
96
|
+
"text": ""
|
|
97
|
+
},
|
|
98
|
+
"attribute": "label",
|
|
99
|
+
"reflect": false
|
|
100
|
+
},
|
|
101
|
+
"heading": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "string",
|
|
106
|
+
"resolved": "string",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": true,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": ""
|
|
114
|
+
},
|
|
115
|
+
"attribute": "heading",
|
|
116
|
+
"reflect": false
|
|
117
|
+
},
|
|
118
|
+
"preamble": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "string",
|
|
123
|
+
"resolved": "string",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": true,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": ""
|
|
131
|
+
},
|
|
132
|
+
"attribute": "preamble",
|
|
133
|
+
"reflect": false
|
|
134
|
+
},
|
|
135
|
+
"imageGrow": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "boolean",
|
|
140
|
+
"resolved": "boolean",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": ""
|
|
148
|
+
},
|
|
149
|
+
"attribute": "image-grow",
|
|
150
|
+
"reflect": false,
|
|
151
|
+
"defaultValue": "false"
|
|
152
|
+
},
|
|
153
|
+
"horizontal": {
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "boolean",
|
|
158
|
+
"resolved": "boolean",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": ""
|
|
166
|
+
},
|
|
167
|
+
"attribute": "horizontal",
|
|
168
|
+
"reflect": false,
|
|
169
|
+
"defaultValue": "false"
|
|
170
|
+
},
|
|
171
|
+
"imgAlignment": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "'left' | 'right'",
|
|
176
|
+
"resolved": "\"left\" | \"right\"",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": true,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": ""
|
|
184
|
+
},
|
|
185
|
+
"attribute": "img-alignment",
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"defaultValue": "'left'"
|
|
188
|
+
},
|
|
189
|
+
"hasImageCover": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "boolean",
|
|
194
|
+
"resolved": "boolean",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": ""
|
|
202
|
+
},
|
|
203
|
+
"attribute": "has-image-cover",
|
|
204
|
+
"reflect": false,
|
|
205
|
+
"defaultValue": "false"
|
|
206
|
+
},
|
|
207
|
+
"alignMiddle": {
|
|
208
|
+
"type": "boolean",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "boolean",
|
|
212
|
+
"resolved": "boolean",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": false,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": ""
|
|
220
|
+
},
|
|
221
|
+
"attribute": "align-middle",
|
|
222
|
+
"reflect": false,
|
|
223
|
+
"defaultValue": "false"
|
|
224
|
+
},
|
|
225
|
+
"center": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "boolean",
|
|
230
|
+
"resolved": "boolean",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": ""
|
|
238
|
+
},
|
|
239
|
+
"attribute": "center",
|
|
240
|
+
"reflect": false,
|
|
241
|
+
"defaultValue": "false"
|
|
242
|
+
},
|
|
243
|
+
"roundImage": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"mutable": false,
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "boolean",
|
|
248
|
+
"resolved": "boolean",
|
|
249
|
+
"references": {}
|
|
250
|
+
},
|
|
251
|
+
"required": false,
|
|
252
|
+
"optional": false,
|
|
253
|
+
"docs": {
|
|
254
|
+
"tags": [],
|
|
255
|
+
"text": ""
|
|
256
|
+
},
|
|
257
|
+
"attribute": "round-image",
|
|
258
|
+
"reflect": false,
|
|
259
|
+
"defaultValue": "false"
|
|
260
|
+
},
|
|
261
|
+
"headingLevel": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
|
|
266
|
+
"resolved": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
|
|
267
|
+
"references": {}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": false,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": ""
|
|
274
|
+
},
|
|
275
|
+
"attribute": "heading-level",
|
|
276
|
+
"reflect": false,
|
|
277
|
+
"defaultValue": "'h3'"
|
|
278
|
+
},
|
|
279
|
+
"opacity": {
|
|
280
|
+
"type": "number",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "number",
|
|
284
|
+
"resolved": "number",
|
|
285
|
+
"references": {}
|
|
286
|
+
},
|
|
287
|
+
"required": false,
|
|
288
|
+
"optional": false,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [],
|
|
291
|
+
"text": ""
|
|
292
|
+
},
|
|
293
|
+
"attribute": "opacity",
|
|
294
|
+
"reflect": false,
|
|
295
|
+
"defaultValue": "90"
|
|
296
|
+
},
|
|
297
|
+
"transparentBackground": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"mutable": false,
|
|
300
|
+
"complexType": {
|
|
301
|
+
"original": "boolean",
|
|
302
|
+
"resolved": "boolean",
|
|
303
|
+
"references": {}
|
|
304
|
+
},
|
|
305
|
+
"required": false,
|
|
306
|
+
"optional": false,
|
|
307
|
+
"docs": {
|
|
308
|
+
"tags": [],
|
|
309
|
+
"text": ""
|
|
310
|
+
},
|
|
311
|
+
"attribute": "transparent-background",
|
|
312
|
+
"reflect": false,
|
|
313
|
+
"defaultValue": "false"
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
static get states() {
|
|
318
|
+
return {
|
|
319
|
+
"showImage": {},
|
|
320
|
+
"showRte": {},
|
|
321
|
+
"showCta": {}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
static get elementRef() { return "hostElement"; }
|
|
325
|
+
}
|
|
326
|
+
//# sourceMappingURL=pn-versa-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pn-versa-card.js","sourceRoot":"","sources":["../../../../src/components/cards/pn-versa-card/pn-versa-card.tsx"],"names":[],"mappings":"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","sourcesContent":["import { HeadingTag } from '@/globals/HeadingTag';\nimport {\n Component,\n Element,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\n\n/** A short description about `pn-versa-card` */\n@Component({\n tag: 'pn-versa-card',\n styleUrl: 'pn-versa-card.scss',\n})\nexport class PnVersaCard {\n\n @Element() hostElement: HTMLElement;\n\n @Prop() label?: string;\n @Prop() heading?: string;\n @Prop() preamble?: string;\n @Prop() imageGrow = false;\n\n // Layout / modifiers\n @Prop() horizontal = false;\n @Prop() imgAlignment?: 'left' | 'right' = 'left';\n @Prop() hasImageCover = false;\n @Prop() alignMiddle = false;\n @Prop() center = false;\n\n @Prop() roundImage = false;\n @Prop() headingLevel: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' = 'h3';\n\n @Prop() opacity: number = 90;\n @Prop() transparentBackground = false;\n\n private cx(parts: Array<string | false | null | undefined>) {\n return parts.filter(Boolean).join(' ');\n }\n\n private get hasImageCoverText(): boolean {\n return !!(this.label || this.heading || this.preamble || this.showRte || this.showCta);\n }\n\n private get normalizedOpacity(): number {\n return Math.min(100, Math.max(0, this.opacity ?? 90));\n }\n\n // This getter reads the data-card-color attribute, which is used to set CSS variables for background and text colors in the SCSS file. It returns the color value or null if not set.\n private get cardColor() {\n const value = this.hostElement.getAttribute('data-card-color')?.trim().toLowerCase();\n return value || null;\n }\n\n private get hasBg(): boolean {\n return !!this.cardColor;\n }\n\n private get cardClass() {\n\n return this.cx([\n 'pn-versa-card',\n\n // modifiers \n this.horizontal && 'pn-versa-card-horizontal',\n this.horizontal && this.imgAlignment === 'right' && 'pn-versa-card-horizontal--imgRight',\n this.hasBg && 'pn-versa-card-hasBg',\n this.hasImageCover && 'pn-versa-card-hasImageCover', // can be true without text, just means image covers whole card without text on top\n this.hasImageCover && this.hasImageCoverText && 'pn-versa-card-hasImageCoverText', //has to have imageCover true AND imageCoverText in order for class to be set\n this.roundImage && 'pn-versa-card-hasRoundedImage',\n this.center && 'pn-versa-card-center',\n this.alignMiddle && 'pn-versa-card-alignMiddle',\n this.imageGrow && 'pn-versa-card-imageGrow',\n this.hasBg && this.transparentBackground && 'pn-versa-card-transparentBackground',\n\n ]);\n }\n\n private get showContent(): boolean {\n return this.showTextContent || this.showCta;\n }\n\n private get showTextContent(): boolean {\n return !!(this.label || this.heading || this.preamble || this.showRte);\n }\n\n @State() showImage: boolean = false;\n @State() showRte: boolean = false;\n @State() showCta: boolean = false;\n\n componentWillLoad() {\n this.showImage = !!this.hostElement.querySelector('[slot=\"image\"]');\n this.showRte = !!this.hostElement.querySelector('[slot=\"rte\"]');\n this.showCta = !!this.hostElement.querySelector('[slot=\"cta\"]');\n\n }\n\n render() {\n return (\n <Host>\n <div class={this.cardClass} style={{ '--pn-versa-opacity': `${this.normalizedOpacity / 100}` }}>\n {this.showImage && (\n <div class=\"pn-versa-card-imageWrapper\">\n <slot name=\"image\" />\n </div>)}\n {this.showContent && (\n <div class=\"pn-versa-card-content\">\n {this.showTextContent && <div class=\"pn-versa-card-textContent\">\n {this.label && (\n <span class=\"pn-versa-card-label\">{this.label}</span>\n )}\n\n {this.heading && (\n <HeadingTag cssClass=\"pn-versa-card-heading\" level={this.headingLevel}>{this.heading}</HeadingTag>\n )}\n\n {this.preamble && (\n <p class=\"pn-versa-card-preamble\">{this.preamble}</p>\n )}\n\n {this.showRte && <div class=\"pn-versa-card-RTEtext\">\n <slot name=\"rte\" />\n </div>\n }\n </div>}\n\n {this.showCta && <div class=\"pn-versa-card-linkwrapper\">\n <slot name=\"cta\" />\n </div>}\n\n </div>\n )}\n </div>\n </Host>\n );\n }\n}"]}
|
|
@@ -0,0 +1,333 @@
|
|
|
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 OneCardCenteredQuarterDefaultHorizontal = {
|
|
267
|
+
name: 'Horizontal Background, Image, Label, Heading, Preamble, RTE, CTA)',
|
|
268
|
+
parameters: {
|
|
269
|
+
controls: {
|
|
270
|
+
include: ['hasBg', 'label', 'heading', 'preamble', 'imageSrc', 'imgAlignment', 'roundImage', 'cardColor'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
render: (args) => renderCenteredRow([
|
|
274
|
+
{
|
|
275
|
+
...args,
|
|
276
|
+
horizontal: true,
|
|
277
|
+
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>',
|
|
278
|
+
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>`,
|
|
279
|
+
},
|
|
280
|
+
], 'halfwidth', 1),
|
|
281
|
+
};
|
|
282
|
+
export const OneCardCenteredQuarterTransparentBackground = {
|
|
283
|
+
name: 'Horizontal Transparent Background (Image, Label, Heading, Preamble, RTE, CTA)',
|
|
284
|
+
parameters: {
|
|
285
|
+
controls: {
|
|
286
|
+
include: [
|
|
287
|
+
'hasBg',
|
|
288
|
+
'transparentBackground',
|
|
289
|
+
'label',
|
|
290
|
+
'heading',
|
|
291
|
+
'preamble',
|
|
292
|
+
'imageSrc',
|
|
293
|
+
'imageAlt',
|
|
294
|
+
'imgAlignment',
|
|
295
|
+
'roundImage',
|
|
296
|
+
'cardColor',
|
|
297
|
+
],
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
render: (args) => {
|
|
301
|
+
const wrapper = document.createElement('div');
|
|
302
|
+
wrapper.style.background = 'linear-gradient(135deg, #fff 0%, #000 100%)';
|
|
303
|
+
wrapper.style.padding = '64px 0';
|
|
304
|
+
const row = renderCenteredRow([
|
|
305
|
+
{
|
|
306
|
+
...args,
|
|
307
|
+
horizontal: true,
|
|
308
|
+
rteHtml: `
|
|
309
|
+
<p>This card demonstrates a <strong>10% transparent background</strong>.
|
|
310
|
+
The gradient behind the card should be visible through the background.</p>
|
|
311
|
+
`,
|
|
312
|
+
ctaHtml: `
|
|
313
|
+
<pn-button class="btn btn-primary">Click me</pn-button>
|
|
314
|
+
<a target="_blank" href="https://google.com">
|
|
315
|
+
Read More <pn-icon icon='${arrow_right}'></pn-icon>
|
|
316
|
+
</a>
|
|
317
|
+
`,
|
|
318
|
+
},
|
|
319
|
+
], 'halfwidth', 1);
|
|
320
|
+
wrapper.appendChild(row);
|
|
321
|
+
return wrapper;
|
|
322
|
+
},
|
|
323
|
+
args: {
|
|
324
|
+
transparentBackground: true,
|
|
325
|
+
label: 'Story demo',
|
|
326
|
+
heading: 'Transparent background card',
|
|
327
|
+
preamble: 'The card background is slightly transparent while content remains opaque.',
|
|
328
|
+
imgAlignment: 'left',
|
|
329
|
+
roundImage: false,
|
|
330
|
+
cardColor: 'white',
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
//# sourceMappingURL=pn-versa-card.stories.js.map
|