@postnord/pn-marketweb-components 3.5.2 → 3.5.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/alert_exclamation_circle-24f29a5b.js +8 -0
- package/cjs/alert_exclamation_circle-24f29a5b.js.map +1 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-address-autofill.cjs.entry.js +47 -72
- package/cjs/pn-address-autofill.cjs.entry.js.map +1 -1
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +18 -6
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-input.cjs.entry.js +2 -4
- package/cjs/pn-marketweb-input.cjs.entry.js.map +1 -1
- package/collection/components/input/pn-address-autofill/pn-address-autofill.css +6 -1
- package/collection/components/input/pn-address-autofill/pn-address-autofill.js +58 -68
- package/collection/components/input/pn-address-autofill/pn-address-autofill.js.map +1 -1
- package/collection/components/input/pn-address-autofill/pn-address-autofill.stories.js +2 -1
- package/collection/components/input/pn-address-autofill/translations.js +6 -3
- package/collection/components/input/pn-address-autofill/translations.js.map +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +18 -6
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
- package/components/alert_exclamation_circle.js +6 -0
- package/components/alert_exclamation_circle.js.map +1 -0
- package/components/pn-address-autofill.js +48 -72
- package/components/pn-address-autofill.js.map +1 -1
- package/components/pn-dropdown-choice-adds-row.js +18 -6
- package/components/pn-dropdown-choice-adds-row.js.map +1 -1
- package/components/pn-marketweb-input2.js +1 -3
- package/components/pn-marketweb-input2.js.map +1 -1
- package/esm/alert_exclamation_circle-f0fe7c7b.js +6 -0
- package/esm/alert_exclamation_circle-f0fe7c7b.js.map +1 -0
- package/esm/loader.js +1 -1
- package/esm/pn-address-autofill.entry.js +47 -72
- package/esm/pn-address-autofill.entry.js.map +1 -1
- package/esm/pn-dropdown-choice-adds-row.entry.js +18 -6
- package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-input.entry.js +1 -3
- package/esm/pn-marketweb-input.entry.js.map +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-0ac30ee9.entry.js +2 -0
- package/pn-market-web-components/p-0ac30ee9.entry.js.map +1 -0
- package/pn-market-web-components/p-15d70aaf.entry.js +2 -0
- package/pn-market-web-components/p-15d70aaf.entry.js.map +1 -0
- package/pn-market-web-components/p-76c2c01f.js +2 -0
- package/pn-market-web-components/p-76c2c01f.js.map +1 -0
- package/pn-market-web-components/p-a11fdf9f.entry.js +2 -0
- package/pn-market-web-components/p-a11fdf9f.entry.js.map +1 -0
- 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/input/pn-address-autofill/pn-address-autofill.d.ts +2 -3
- package/types/components/input/pn-address-autofill/translations.d.ts +3 -0
- package/types/components.d.ts +2 -0
- package/umd/modules/@postnord/web-components/cjs/{angle_down-0b63ebde.js → chevron_down-83e72319.js} +3 -3
- package/umd/modules/@postnord/web-components/cjs/chevron_down-83e72319.js.map +1 -0
- package/umd/modules/@postnord/web-components/cjs/{angle_right-c8c55b43.js → chevron_right-aeb6aef3.js} +5 -5
- package/umd/modules/@postnord/web-components/cjs/chevron_right-aeb6aef3.js.map +1 -0
- package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +42 -12
- package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-button_2.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-choice-chip.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-counter.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +22 -6
- package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +21 -7
- package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-bar.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +26 -41
- package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +25 -16
- package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/buttons/pn-action-menu/pn-action-menu.js +41 -11
- package/umd/modules/@postnord/web-components/collection/components/buttons/pn-action-menu/pn-action-menu.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/content/pn-accordion/row/pn-accordion-row.js +2 -2
- package/umd/modules/@postnord/web-components/collection/components/content/pn-accordion/row/pn-accordion-row.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.css +92 -40
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js +35 -9
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-bar/pn-progress-bar.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.js +5 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator.js +5 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.css +85 -9
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.js +100 -97
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-spinner/pn-spinner.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.css +0 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.js +24 -15
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-tooltip/pn-tooltip.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-checkbox/pn-checkbox.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-choice-chip/pn-choice-chip.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.css +2 -3
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +22 -6
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +2 -2
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +2 -2
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +2 -2
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/layout/pn-header/pn-header.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-footer/pn-footer.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/dropdown-item/pn-page-nav-dropdown-item.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/item/pn-page-nav-item.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js +2 -2
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-pagination/pn-pagination.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js +2 -2
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js.map +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-text-link/pn-text-link.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tile/pn-tile.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/web-components/pn-ocr-search/pn-ocr-search.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/web-components/pn-zipcode-search/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/collection/globals/types.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/{angle_down.js → chevron_down.js} +3 -3
- package/umd/modules/@postnord/web-components/components/chevron_down.js.map +1 -0
- package/umd/modules/@postnord/web-components/{esm/angle_right-b52095c9.js → components/chevron_right.js} +4 -4
- package/umd/modules/@postnord/web-components/components/chevron_right.js.map +1 -0
- package/umd/modules/@postnord/web-components/components/pn-accordion-row.js +2 -2
- package/umd/modules/@postnord/web-components/components/pn-accordion-row.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-action-menu.js +42 -12
- package/umd/modules/@postnord/web-components/components/pn-action-menu.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-card.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-checkbox.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-choice-chip.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-counter.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-date-picker.js +23 -7
- package/umd/modules/@postnord/web-components/components/pn-date-picker.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-fieldset.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-file-upload.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-footer.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-header.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-input.js +2 -2
- package/umd/modules/@postnord/web-components/components/pn-modal.js +25 -10
- package/umd/modules/@postnord/web-components/components/pn-modal.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-multiselect.js +2 -2
- package/umd/modules/@postnord/web-components/components/pn-multiselect.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-ocr-search.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav-dropdown-item.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav-item.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav.js +2 -2
- package/umd/modules/@postnord/web-components/components/pn-page-nav.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-pagination.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-bar2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-indicator-step.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-indicator-step.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-indicator.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-indicator.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-stepper.js +34 -48
- package/umd/modules/@postnord/web-components/components/pn-progress-stepper.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-search-field2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-segment.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-segmented-control.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-select2.js +2 -2
- package/umd/modules/@postnord/web-components/components/pn-select2.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-spinner2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tab.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tablist.js +2 -2
- package/umd/modules/@postnord/web-components/components/pn-tablist.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-text-link2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-textarea.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tile.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-toast.js +25 -16
- package/umd/modules/@postnord/web-components/components/pn-toast.js.map +1 -1
- package/umd/modules/@postnord/web-components/components/pn-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tooltip.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/esm/{angle_down-d788f691.js → chevron_down-6e3fb42f.js} +3 -3
- package/umd/modules/@postnord/web-components/esm/chevron_down-6e3fb42f.js.map +1 -0
- package/umd/modules/@postnord/web-components/{components/angle_right.js → esm/chevron_right-9d9305e8.js} +4 -4
- package/umd/modules/@postnord/web-components/esm/chevron_right-9d9305e8.js.map +1 -0
- package/umd/modules/@postnord/web-components/esm/loader.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +42 -12
- package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-button_2.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-choice-chip.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-counter.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +23 -7
- package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +22 -8
- package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-bar.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +26 -41
- package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-select.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +25 -16
- package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js.map +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +1 -1
- package/umd/modules/@postnord/web-components/hydrate/index.js +204 -137
- package/umd/modules/@postnord/web-components/hydrate/index.mjs +204 -137
- package/umd/modules/@postnord/web-components/package.json +16 -14
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-7e88df1f.entry.js → p-01472170.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ed4271af.entry.js → p-06c7e91b.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-06c7e91b.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-8773152d.entry.js → p-10532427.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ffe79fa4.entry.js → p-11ef58ab.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-16fb83d9.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-16fb83d9.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-d74ccbb2.entry.js → p-1cd57319.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-adc6404b.entry.js → p-1e7c31ed.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-1e7c31ed.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c2bbbcaa.entry.js → p-1fe6fc61.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-203ad7de.entry.js → p-23fdc4b6.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-23fdc4b6.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-240f6613.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-7ae9c053.entry.js.map → p-240f6613.entry.js.map} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-4f67fffa.entry.js → p-28357e12.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-28357e12.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c96ff403.js → p-2f7bb5e8.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2f7bb5e8.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-5b0000e9.entry.js → p-363f578a.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c0d19737.entry.js → p-37297b9a.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-49a39ea1.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-49a39ea1.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-bc95d4b0.entry.js → p-49f5fdd2.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-49f5fdd2.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b556b835.entry.js → p-4d371963.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ab29b9c0.entry.js → p-4eaab357.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-da713fc1.entry.js → p-5ed7e9b7.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-617a946d.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-617a946d.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e087c5c5.entry.js → p-63aa3911.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-65ae6360.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-65ae6360.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-bf015c0f.entry.js → p-699b7bde.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-9bc1d14f.entry.js → p-6f9a21be.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-75c5fb41.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-75c5fb41.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-bd14cdca.entry.js → p-8e07bc17.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-7bd6d804.entry.js → p-8eaa2540.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-bf967b50.js → p-99600bc7.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-99600bc7.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ff068744.entry.js → p-9cecd28d.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-605d99df.entry.js → p-a440734f.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b9a494ae.entry.js → p-ab553e80.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-936ed2a1.entry.js → p-ae04e001.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ae04e001.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-a4df55c4.entry.js → p-b202a599.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b83e6373.entry.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b83e6373.entry.js.map +1 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-fcd5028f.entry.js → p-bdb9bdc3.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-81f9f367.entry.js → p-cebe3a25.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-76b020f0.entry.js → p-d2f7b4a9.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c45dc75d.entry.js → p-e8050420.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-412fc8d6.entry.js → p-eee2d131.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-d3521b5d.entry.js → p-fb5d6d47.entry.js} +2 -2
- package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js.map +1 -1
- package/umd/modules/@postnord/web-components/types/components/buttons/pn-action-menu/pn-action-menu.d.ts +3 -0
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-modal/pn-modal.d.ts +12 -2
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.d.ts +4 -0
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-progress-indicator/pn-progress-indicator.d.ts +4 -0
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-progress-stepper/pn-progress-stepper.d.ts +27 -22
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-toast/pn-toast.d.ts +2 -1
- package/umd/modules/@postnord/web-components/types/components.d.ts +60 -12
- package/umd/modules/@postnord/web-components/types/globals/types.d.ts +2 -1
- package/umd/modules/@postnord/web-components/vscode-data.json +7 -3
- package/vscode-data.json +4 -0
- package/pn-market-web-components/p-59cb7166.entry.js +0 -2
- package/pn-market-web-components/p-59cb7166.entry.js.map +0 -1
- package/pn-market-web-components/p-7c3091eb.entry.js +0 -2
- package/pn-market-web-components/p-7c3091eb.entry.js.map +0 -1
- package/pn-market-web-components/p-94a69959.entry.js +0 -2
- package/pn-market-web-components/p-94a69959.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/cjs/angle_down-0b63ebde.js.map +0 -1
- package/umd/modules/@postnord/web-components/cjs/angle_right-c8c55b43.js.map +0 -1
- package/umd/modules/@postnord/web-components/components/angle_down.js.map +0 -1
- package/umd/modules/@postnord/web-components/components/angle_right.js.map +0 -1
- package/umd/modules/@postnord/web-components/esm/angle_down-d788f691.js.map +0 -1
- package/umd/modules/@postnord/web-components/esm/angle_right-b52095c9.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-203ad7de.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2615282e.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2615282e.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-3bd59ac8.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-3bd59ac8.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-4f67fffa.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-514107a5.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-514107a5.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-6a30576b.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-6a30576b.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-7ae9c053.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-8bc8f614.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-8bc8f614.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-936ed2a1.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-adc6404b.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-bc95d4b0.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-bf967b50.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c96ff403.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ed4271af.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-fc5f9092.entry.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-fc5f9092.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/readme.md +0 -32
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-7e88df1f.entry.js.map → p-01472170.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-8773152d.entry.js.map → p-10532427.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-ffe79fa4.entry.js.map → p-11ef58ab.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-d74ccbb2.entry.js.map → p-1cd57319.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-c2bbbcaa.entry.js.map → p-1fe6fc61.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-5b0000e9.entry.js.map → p-363f578a.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-c0d19737.entry.js.map → p-37297b9a.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-b556b835.entry.js.map → p-4d371963.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-ab29b9c0.entry.js.map → p-4eaab357.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-da713fc1.entry.js.map → p-5ed7e9b7.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-e087c5c5.entry.js.map → p-63aa3911.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-bf015c0f.entry.js.map → p-699b7bde.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-9bc1d14f.entry.js.map → p-6f9a21be.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-bd14cdca.entry.js.map → p-8e07bc17.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-7bd6d804.entry.js.map → p-8eaa2540.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-ff068744.entry.js.map → p-9cecd28d.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-605d99df.entry.js.map → p-a440734f.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-b9a494ae.entry.js.map → p-ab553e80.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-a4df55c4.entry.js.map → p-b202a599.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-fcd5028f.entry.js.map → p-bdb9bdc3.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-81f9f367.entry.js.map → p-cebe3a25.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-76b020f0.entry.js.map → p-d2f7b4a9.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-c45dc75d.entry.js.map → p-e8050420.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-412fc8d6.entry.js.map → p-eee2d131.entry.js.map} +0 -0
- /package/umd/modules/@postnord/web-components/postnord-web-components/{p-d3521b5d.entry.js.map → p-fb5d6d47.entry.js.map} +0 -0
package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-modal.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-modal/pn-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGxD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAkB,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7D;;;;;;;;GAQG;AAKH,MAAM,OAAO,OAAO;;yBAYY,KAAK;yBACL,KAAK;;;wBAOF,IAAI;oBAGoB,KAAK;0BAE/B,KAAK;yBAEN,KAAK;6BAKD,KAAK;qBAGb,KAAK;wBAEH,IAAI;;IApCxB,EAAE,CAAmB;IAEZ,yBAAyB,GAAG,GAAG,CAAC;IACzC,iBAAiB,GAAW,IAAI,CAAC,yBAAyB,CAAC;IAEnE,YAAY,CAAiB;IAErB,YAAY,CAAoB;IAE7B,WAAW,CAAc;IA8BpC,UAAU;QACR,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,SAAS,EAAE,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, Watch, Event, EventEmitter, forceUpdate, State } from '@stencil/core';\nimport { awaitTopbar, en, reduceMotion } from '@/index';\nimport type { PnLanguages } from '@/index';\n\nimport { close as closeIcon } from 'pn-design-assets/pn-assets/icons.js';\nimport { PnTranslations, translations } from './translation';\n\n/**\n * Present content in a modal that overlays everything on the current page.\n * Use the prop `open` to toggle the visiblity.\n * Use the event `modalToggle` to determine when the modal is being closed/opened by the user.\n *\n * @slot - The default slot, will be placed in the middle content area.\n * @slot header - Place the title + lead text in the header.\n * @slot buttons - Place buttons inside the modal at the bottom.\n */\n@Component({\n tag: 'pn-modal',\n styleUrl: 'pn-modal.scss',\n})\nexport class PnModal {\n private mo: MutationObserver;\n\n private readonly standardAnimationDuration = 400;\n private animationDuration: number = this.standardAnimationDuration;\n\n modalTimeout: NodeJS.Timeout;\n\n private modalElement: HTMLDialogElement;\n\n @Element() hostElement: HTMLElement;\n\n @State() isClosing: boolean = false;\n @State() isOpening: boolean = false;\n\n /** Set a label for the modal. */\n @Prop() label?: string;\n /** Set a descriptive text for the modal. */\n @Prop() helpertext?: string;\n /** Set the language. */\n @Prop() language?: PnLanguages = null;\n\n /** Bind to this property if you want to control the visibility of the modal from your own data. @category Features */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /** Prevent users from closing the modal by clicking on the backdrop or the `ESC` key. @category Features */\n @Prop() persistent?: boolean = false;\n /** Hide the close button. If you disable this, make sure you build your own cancel button. @category Features */\n @Prop() hideClose?: boolean = false;\n /**\n * Allow overflow if possible. When the modal opens, it will check scrollHeight > offsetHeight.\n * Do not use if you have a lot of conditional rendering inside the modal.\n */\n @Prop() allowOverflow?: boolean = false;\n\n /** Use the `sheet` visual. Aligns the modal to the right. @category Visual */\n @Prop() sheet?: boolean = false;\n /** Define your own max width of the modal. Default is `45em`. @category Visual */\n @Prop() maxWidth?: string = null;\n\n @Watch('open')\n handleOpen() {\n if (this.open) this.openModal();\n else {\n this.closeModal();\n /** In the next update, we can remove this one so you can finally stack modals. */\n this.close.emit(true);\n }\n\n this.handleOverflow();\n\n clearTimeout(this.modalTimeout);\n this.isClosing = !this.open && true;\n\n if (reduceMotion()) this.animationDuration = 0;\n else this.animationDuration = this.standardAnimationDuration;\n\n this.modalTimeout = setTimeout(() => {\n this.isClosing = false;\n this.modalVisiblity.emit({ visible: this.open });\n }, this.animationDuration);\n }\n\n @Watch('maxWidth')\n handleMaxWidth() {\n const width = this.maxWidth || '45em';\n this.modalElement.style.setProperty('--pn-modal-max-width', width);\n }\n\n /** This event is fired when the modal is toggled. */\n @Event() modalToggle: EventEmitter<{ open: boolean }>;\n /** This event is dispatched after the opening/closing animation has finished playing. */\n @Event() modalVisiblity: EventEmitter<{ visible: boolean }>;\n /**\n * Event fired when the modal is closed, either by clicking on the dark background or by clicking on the close button.\n * @deprecated Use the new `modalToggle` event instead.\n */\n @Event() close: EventEmitter<boolean>;\n\n connectedCallback() {\n this.mo = new MutationObserver(() => forceUpdate(this.hostElement));\n this.mo.observe(this.hostElement, { childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mo) this.mo.disconnect();\n }\n\n async componentWillLoad() {\n if (this.language === null) await awaitTopbar(this.hostElement);\n }\n\n componentDidLoad() {\n this.handleMaxWidth();\n if (this.open) this.openModal();\n }\n\n private translate(prop: PnTranslations) {\n return translations?.[prop]?.[this.language || en] || prop;\n }\n\n private handleOverflow() {\n if (!this.allowOverflow) return;\n const overflow = this.modalElement.scrollHeight > innerHeight * 0.85 ? 'hidden auto' : 'unset';\n this.modalElement.style.setProperty('--pn-modal-overflow', overflow);\n }\n\n private isSameModal(target: HTMLElement) {\n return this.modalElement.isSameNode(target);\n }\n\n private handleKeyboard(event: KeyboardEvent) {\n if (event.key !== 'Escape') return;\n\n event.preventDefault();\n event.stopImmediatePropagation();\n\n if (!this.persistent) this.setModalClose();\n }\n\n private clickModalBackground(event: MouseEvent) {\n const { clientY, clientX } = event;\n\n const notInsideAnyModal = (event.target as HTMLDialogElement).localName !== this.modalElement.localName;\n const notThisModal = !this.isSameModal(event.target as HTMLElement);\n\n if (notInsideAnyModal || notThisModal) return;\n\n const { top, left, height, width } = this.modalElement.getBoundingClientRect();\n const isInModal = top <= clientY && clientY <= top + height && left <= clientX && clientX <= left + width;\n\n if (!isInModal && !this.persistent) this.toggleOpen(false);\n }\n\n private setModalClose() {\n this.toggleOpen(false);\n }\n\n private closeModal() {\n this.modalElement.close();\n }\n\n private openModal() {\n this.modalElement.showModal();\n }\n\n private toggleOpen(state?: boolean) {\n this.open = state ?? !this.open;\n }\n\n render() {\n return (\n <Host>\n <dialog\n class=\"pn-modal\"\n data-closing={this.isClosing}\n data-sheet={this.sheet}\n onClose={() => this.setModalClose()}\n onCancel={() => this.setModalClose()}\n onToggle={() => this.modalToggle.emit({ open: this.open })}\n onKeyDown={event => this.handleKeyboard(event)}\n onClick={event => this.clickModalBackground(event)}\n ref={el => (this.modalElement = el)}\n >\n {!this.hideClose && (\n <pn-button\n small\n class=\"pn-modal-close-button\"\n icon={closeIcon}\n iconOnly={true}\n arialabel={this.translate('CLOSE_MODAL')}\n appearance=\"light\"\n variant=\"borderless\"\n type=\"button\"\n onPnClick={() => this.setModalClose()}\n />\n )}\n\n <header class=\"pn-modal-header\">\n {this.label && <h2 class=\"pn-modal-label\">{this.label}</h2>}\n {this.helpertext && <p class=\"pn-modal-text\">{this.helpertext}</p>}\n\n <slot name=\"header\"></slot>\n </header>\n\n <section class=\"pn-modal-content\">\n <slot></slot>\n </section>\n\n <nav class=\"pn-modal-buttons\">\n <slot name=\"buttons\"></slot>\n </nav>\n </dialog>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pn-modal.js","sourceRoot":"","sources":["../../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IAAI,0DAAG,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,UAAU,CAAK;wBAElE,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB;oBACT,gEAAS,KAAK,EAAC,kBAAkB;wBAC/B,8DAAa,CACL;oBACV,4DAAK,KAAK,EAAC,kBAAkB;wBAC3B,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n h,\n Host,\n Prop,\n Watch,\n Event,\n EventEmitter,\n forceUpdate,\n State,\n Listen,\n} from '@stencil/core';\nimport { awaitTopbar, en, isSmallScreen, reduceMotion } from '@/index';\nimport type { PnLanguages } from '@/index';\n\nimport { close as closeIcon } from 'pn-design-assets/pn-assets/icons.js';\nimport { PnTranslations, translations } from './translation';\n\n/**\n * Present content in a modal that overlays everything on the current page.\n * Use the prop `open` to toggle the visiblity.\n * Use the event `modalToggle` to determine when the modal is being closed/opened by the user.\n *\n * @slot - The default slot, will be placed in the middle content area.\n * @slot image - Place an image or illustration at the top of the modal.\n * @slot header - Place the title + lead text in the header.\n * @slot buttons - Place buttons inside the modal at the bottom.\n * pn-buttons aligns automatically to the right, set the data-left attribute on the button you want to align to the left.\n */\n@Component({\n tag: 'pn-modal',\n styleUrl: 'pn-modal.scss',\n})\nexport class PnModal {\n private mo: MutationObserver;\n\n private readonly standardAnimationDuration = 400;\n private animationDuration: number = this.standardAnimationDuration;\n\n private modalTimeout: NodeJS.Timeout;\n\n private modalElement: HTMLDialogElement;\n private modalContainer: HTMLDivElement;\n private modalPicture: HTMLPictureElement;\n\n @Element() hostElement: HTMLElement;\n\n @State() isClosing: boolean = false;\n @State() isOpening: boolean = false;\n\n /** If true, the modal content will remove overflow CSS property. */\n @State() removeOverflow: boolean = false;\n\n /** Set a label for the modal. */\n @Prop() label?: string;\n /** Set a descriptive text for the modal. */\n @Prop() helpertext?: string;\n /** Set the language. */\n @Prop() language?: PnLanguages = null;\n\n /** Bind to this property if you want to control the visibility of the modal from your own data. @category Features */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /** Prevent users from closing the modal by clicking on the backdrop or the `ESC` key. @category Features */\n @Prop() persistent?: boolean = false;\n /** Hide the close button. If you disable this, make sure you build your own cancel button. @category Features */\n @Prop() hideClose?: boolean = false;\n /**\n * Allow overflow if possible. When the modal opens, it will check scrollHeight > offsetHeight.\n * Do not use if you have a lot of conditional rendering inside the modal.\n */\n @Prop() allowOverflow?: boolean = false;\n\n /** Use the `sheet` visual. Aligns the modal to the right. @category Visual */\n @Prop() sheet?: boolean = false;\n /** Define your own max width of the modal. Default is `45em`. @category Visual */\n @Prop() maxWidth?: string = null;\n\n @Watch('open')\n handleOpen() {\n if (this.open) this.openModal();\n else {\n this.closeModal();\n /** In the next update, we can remove this one so you can finally stack modals. */\n this.close.emit(true);\n }\n\n this.handleOverflow();\n\n clearTimeout(this.modalTimeout);\n this.isClosing = !this.open && true;\n\n if (reduceMotion()) this.animationDuration = 0;\n else this.animationDuration = this.standardAnimationDuration;\n\n this.modalTimeout = setTimeout(() => {\n this.isClosing = false;\n this.modalVisiblity.emit({ visible: this.open });\n }, this.animationDuration);\n }\n\n @Watch('maxWidth')\n handleMaxWidth() {\n const width = this.maxWidth || '45em';\n this.modalElement.style.setProperty('--pn-modal-max-width', width);\n }\n\n @Listen('resize', { target: 'window' })\n handleOverflow() {\n if (this.allowOverflow) this.setOverflow();\n }\n\n /** This event is fired when the modal is toggled. */\n @Event() modalToggle: EventEmitter<{ open: boolean }>;\n /** This event is dispatched after the opening/closing animation has finished playing. */\n @Event() modalVisiblity: EventEmitter<{ visible: boolean }>;\n /**\n * Event fired when the modal is closed, either by clicking on the dark background or by clicking on the close button.\n * @deprecated Use the new `modalToggle` event instead.\n */\n @Event() close: EventEmitter<boolean>;\n\n connectedCallback() {\n this.mo = new MutationObserver(() => forceUpdate(this.hostElement));\n this.mo.observe(this.hostElement, { childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mo) this.mo.disconnect();\n }\n\n async componentWillLoad() {\n if (this.language === null) await awaitTopbar(this.hostElement);\n }\n\n componentDidLoad() {\n this.handleMaxWidth();\n if (this.open) this.openModal();\n }\n\n private translate(prop: PnTranslations) {\n return translations?.[prop]?.[this.language || en] || prop;\n }\n\n private showImage() {\n return !!this.modalPicture?.innerHTML;\n }\n\n private showHeader() {\n return !!(this.label || this.helpertext || this.hostElement.querySelector('[slot=\"header\"]')?.textContent);\n }\n\n private setOverflow() {\n this.removeOverflow = !this.hasOverflow();\n }\n\n private hasOverflow(): boolean {\n const multiplyWith = isSmallScreen() ? 0.95 : 0.85;\n return this.modalContainer?.scrollHeight > innerHeight * multiplyWith;\n }\n\n private isSameModal(target: HTMLElement): boolean {\n return this.modalElement.isSameNode(target);\n }\n\n private handleKeyboard(event: KeyboardEvent) {\n if (event.key !== 'Escape') return;\n\n event.preventDefault();\n event.stopImmediatePropagation();\n\n if (!this.persistent) this.setModalClose();\n }\n\n private clickModalBackground(event: MouseEvent) {\n const { clientY, clientX } = event;\n\n const notInsideAnyModal = (event.target as HTMLDialogElement).localName !== this.modalElement.localName;\n const notThisModal = !this.isSameModal(event.target as HTMLElement);\n\n if (notInsideAnyModal || notThisModal) return;\n\n const { top, left, height, width } = this.modalElement.getBoundingClientRect();\n const isInModal = top <= clientY && clientY <= top + height && left <= clientX && clientX <= left + width;\n\n if (!isInModal && !this.persistent) this.toggleOpen(false);\n }\n\n private setModalClose() {\n this.toggleOpen(false);\n }\n\n private closeModal() {\n this.modalElement.close();\n }\n\n private openModal() {\n this.modalElement.showModal();\n }\n\n private toggleOpen(state?: boolean) {\n this.open = state ?? !this.open;\n }\n\n render() {\n return (\n <Host>\n <dialog\n class=\"pn-modal\"\n data-closing={this.isClosing}\n data-sheet={this.sheet}\n data-image={this.showImage()}\n data-allow-overflow={this.removeOverflow}\n onClose={() => this.setModalClose()}\n onCancel={() => this.setModalClose()}\n onToggle={() => this.modalToggle.emit({ open: this.open })}\n onKeyDown={event => this.handleKeyboard(event)}\n onClick={event => this.clickModalBackground(event)}\n ref={el => (this.modalElement = el)}\n >\n {!this.hideClose && (\n <pn-button\n small\n class=\"pn-modal-close-button\"\n icon={closeIcon}\n iconOnly={true}\n arialabel={this.translate('CLOSE_MODAL')}\n appearance=\"light\"\n variant=\"borderless\"\n type=\"button\"\n onPnClick={() => this.setModalClose()}\n />\n )}\n <div class=\"pn-modal-container\" ref={el => (this.modalContainer = el)}>\n <div class=\"pn-modal-image\" hidden={!this.showImage()}>\n <picture class=\"pn-modal-picture\" ref={el => (this.modalPicture = el)}>\n <slot name=\"image\"></slot>\n </picture>\n </div>\n <header class=\"pn-modal-header\" hidden={!this.showHeader()}>\n {this.label && <h2 class=\"pn-modal-label\">{this.label}</h2>}\n {this.helpertext && <p class=\"pn-modal-text\">{this.helpertext}</p>}\n\n <slot name=\"header\"></slot>\n </header>\n <section class=\"pn-modal-content\">\n <slot></slot>\n </section>\n <nav class=\"pn-modal-buttons\">\n <slot name=\"buttons\"></slot>\n </nav>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -63,7 +63,7 @@ export class PnProgressBar {
|
|
|
63
63
|
return 'green500';
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '141fef1da768dc423cf53dfa8088f1b98429236c' }, this.hasLabel() && (h("p", { key: '294199499037e6ed0e816f8a68850dfede795884', id: this.idLabel, class: "pn-progress-bar-label" }, h("span", { key: 'f292e951e29878d186b7f7896d7346fd41677006' }, this.label), this.hasIcon() && h("pn-icon", { key: '47b8065b97a8cd0f0d3e57ea4f68b07ad09c12a5', icon: this.getIconSvg(), color: this.getIconColor() }))), h("div", { key: '0dd5189948aad2e501ee10076ed212987a52e4d8', id: this.progressId, class: "pn-progress-bar-container", role: "progressbar", "aria-labelledby": this.idLabel, "aria-describedby": this.hasIcon() ? this.idText : null, "aria-valuenow": this.progress, "aria-valuetext": this.progressPercentage }, h("div", { key: '51ceae38d589385687dd3e25c86526b4758f2792', class: "pn-progress-bar-meter" }, h("div", { key: '714d0aa19a487bf625ae10bcdd68d21d54b6f48a', class: "pn-progress-bar-value", "data-error": this.hasError(), "data-valid": this.isValid() }))), h("p", { key: 'b540a56c9d7fdfae49f508472d315ce1eeda5e99', id: this.idText, class: "pn-progress-bar-subtext", role: this.hasError() ? 'alert' : null }, h("span", { key: '35d515a823d117a6ab31e3cda778a2ada8093233' }, this.getSubtext()))));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "pn-progress-bar"; }
|
|
69
69
|
static get originalStyleUrls() {
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { h, Host } from "@stencil/core";
|
|
6
6
|
import { white } from "pn-design-assets/pn-assets/colors.js";
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated This component will be removed in v8. Please use the `pn-progress-stepper` instead.
|
|
9
|
+
* @see {@link https://portal.postnord.com/web-components/?path=/docs/components-feedback-progress-stepper--docs Use `pn-progress-stepper` instead.}
|
|
10
|
+
*/
|
|
7
11
|
export class PnProgressIndicatorStep {
|
|
8
12
|
constructor() {
|
|
9
13
|
this.activated = undefined;
|
|
@@ -52,7 +56,7 @@ export class PnProgressIndicatorStep {
|
|
|
52
56
|
return className;
|
|
53
57
|
}
|
|
54
58
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: 'e5518f2d8c21c889738beb3a42e6865e7c64ac76', class: this.getClassNames(), onClick: () => this.setActiveStepHandler() }, h("div", { key: 'b0f5f684ca12fda2b22b51945d3b0b41ab490fa3', class: "progress-line" }), h("div", { key: '8d05494d4cc77145e44270666b678cf48eb05a96', class: "info-container" }, h("slot", { key: '864bea1ce3dd348be1abadcc3f8fb3757ac009b9' }), this.name), h("div", { key: '7d8394e5a4919404a137fd30ce125dfda5ed3034', class: "circle" }, this.done || this.checked ? (h("svg", { xmlns: "http://www.w3.org/2000/svg", "enable-background": "new 0 0 24 24", id: "checkmark", version: "1.0", viewBox: "0 0 24 24" }, h("polyline", { class: "checkmark-path", fill: "none", points: "20,6 9,17 4,12", stroke: white, "stroke-miterlimit": "10", "stroke-width": "3" }))) : (''))));
|
|
56
60
|
}
|
|
57
61
|
static get is() { return "pn-progress-indicator-step"; }
|
|
58
62
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-progress-indicator-step.js","sourceRoot":"","sources":["../../../../../src/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"pn-progress-indicator-step.js","sourceRoot":"","sources":["../../../../../src/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7D;;;GAGG;AAKH,MAAM,OAAO,uBAAuB;;;;;;;uBAWP,KAAK;;;I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OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC3E,4DAAK,KAAK,EAAC,eAAe,GAAG;YAC7B,4DAAK,KAAK,EAAC,gBAAgB;gBACzB,8DAAQ;gBACP,IAAI,CAAC,IAAI,CACN;YACN,4DAAK,KAAK,EAAC,QAAQ,IAChB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAC3B,WACE,KAAK,EAAC,4BAA4B,uBAChB,eAAe,EACjC,EAAE,EAAC,WAAW,EACd,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,WAAW;gBAEnB,gBACE,KAAK,EAAC,gBAAgB,EACtB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,gBAAgB,EACvB,MAAM,EAAE,KAAK,uBACK,IAAI,kBACT,GAAG,GAChB,CACE,CACP,CAAC,CAAC,CAAC,CACF,EAAE,CACH,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, EventEmitter, h, Host, State } from '@stencil/core';\nimport { white } from 'pn-design-assets/pn-assets/colors.js';\n\n/**\n * @deprecated This component will be removed in v8. Please use the `pn-progress-stepper` instead.\n * @see {@link https://portal.postnord.com/web-components/?path=/docs/components-feedback-progress-stepper--docs Use `pn-progress-stepper` instead.}\n */\n@Component({\n tag: 'pn-progress-indicator-step',\n styleUrl: 'pn-progress-indicator-step.scss',\n})\nexport class PnProgressIndicatorStep {\n @State() activated: boolean;\n @State() done: boolean;\n\n /** Set by the parent component. Do not use manually. @hide true */\n @Prop() activeStep: number;\n /** Set by the parent component. Do not use manually. @hide true */\n @Prop() index: number;\n /** The step name. */\n @Prop() name: string;\n /** Set the step as checked, meaning a white check mark will appear. */\n @Prop() checked: boolean = false;\n /** Set by the parent component. Do not use manually. @hide true */\n @Prop() active?: 'yes' | 'no';\n\n @Event() setactivestep: EventEmitter<number>;\n setActiveStepHandler() {\n if (this.done || this.activated) {\n this.setactivestep.emit(this.index);\n }\n }\n\n componentWillLoad() {\n this.checkStatus();\n }\n\n componentDidUpdate() {\n this.checkStatus();\n }\n\n checkStatus() {\n if (!this.done) {\n this.done = this.checked || this.activeStep > this.index;\n }\n\n if (this.active === 'yes') {\n this.activated = true;\n } else if (this.active === 'no') {\n this.activated = false;\n this.done = false;\n } else if (!this.activated) {\n this.activated = this.activeStep >= this.index;\n }\n }\n\n getClassNames() {\n let className = 'pn-progress-indicator-step';\n if (this.done || this.checked) className += ' done';\n if (this.activated) className += ' activated';\n if (this.activeStep === this.index) className += ' active';\n return className;\n }\n\n render() {\n return (\n <Host class={this.getClassNames()} onClick={() => this.setActiveStepHandler()}>\n <div class=\"progress-line\" />\n <div class=\"info-container\">\n <slot />\n {this.name}\n </div>\n <div class=\"circle\">\n {this.done || this.checked ? (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n enable-background=\"new 0 0 24 24\"\n id=\"checkmark\"\n version=\"1.0\"\n viewBox=\"0 0 24 24\"\n >\n <polyline\n class=\"checkmark-path\"\n fill=\"none\"\n points=\"20,6 9,17 4,12\"\n stroke={white}\n stroke-miterlimit=\"10\"\n stroke-width=\"3\"\n />\n </svg>\n ) : (\n ''\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
5
|
import { h } from "@stencil/core";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated This component will be removed in v8. Please use the `pn-progress-stepper` instead.
|
|
8
|
+
* @see {@link https://portal.postnord.com/web-components/?path=/docs/components-feedback-progress-stepper--docs Use `pn-progress-stepper` instead.}
|
|
9
|
+
*/
|
|
6
10
|
export class PnProgressIndicator {
|
|
7
11
|
constructor() {
|
|
8
12
|
this.activeStep = 0;
|
|
@@ -28,7 +32,7 @@ export class PnProgressIndicator {
|
|
|
28
32
|
});
|
|
29
33
|
}
|
|
30
34
|
render() {
|
|
31
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: '1108f70edf525c6e7e0e45d34a6d58e69c5b9ab2', class: "pn-progress-indicator" }, h("slot", { key: 'c4035cf9fadb46f4e573c0225bebb2f8f7187da6' })));
|
|
32
36
|
}
|
|
33
37
|
static get is() { return "pn-progress-indicator"; }
|
|
34
38
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-progress-indicator.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-progress-indicator/pn-progress-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pn-progress-indicator.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-progress-indicator/pn-progress-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;AAEzF;;;GAGG;AAKH,MAAM,OAAO,mBAAmB;;0BAIgB,CAAC;;IAHpC,WAAW,CAAc;IAKpC,iGAAiG;IACxF,cAAc,CAAuB;IAG9C,oBAAoB,CAAC,EAAE,MAAM,EAAE;QAC7B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED,mBAAmB;QACjB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAqC,4BAA4B,CAAC,CACpG,CAAC;QAEF,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;YAC5B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YACnC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,uBAAuB;YAChC,8DAAQ,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Element, Listen, Event, EventEmitter, h } from '@stencil/core';\n\n/**\n * @deprecated This component will be removed in v8. Please use the `pn-progress-stepper` instead.\n * @see {@link https://portal.postnord.com/web-components/?path=/docs/components-feedback-progress-stepper--docs Use `pn-progress-stepper` instead.}\n */\n@Component({\n tag: 'pn-progress-indicator',\n styleUrl: 'pn-progress-indicator.scss',\n})\nexport class PnProgressIndicator {\n @Element() hostElement: HTMLElement;\n\n /** Takes the index of the active step */\n @Prop({ mutable: true }) activeStep: number = 0;\n\n /** This will emit when progress is changed and is the value you want to bind to your VM state */\n @Event() progresschange: EventEmitter<number>;\n\n @Listen('setactivestep')\n setActiveStepHandler({ detail }) {\n this.activeStep = detail;\n this.progresschange.emit(this.activeStep);\n }\n\n componentWillLoad() {\n this.passPropsToChildren();\n }\n\n componentDidUpdate() {\n this.passPropsToChildren();\n }\n\n passPropsToChildren() {\n const children = Array.from(\n this.hostElement.querySelectorAll<HTMLPnProgressIndicatorStepElement>('pn-progress-indicator-step'),\n );\n\n children.forEach((child, i) => {\n child.activeStep = this.activeStep;\n child.index = i;\n });\n }\n\n render() {\n return (\n <div class=\"pn-progress-indicator\">\n <slot />\n </div>\n );\n }\n}\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/* Global utility variables */
|
|
2
2
|
/* Input styles */
|
|
3
3
|
/* Transition variables */
|
|
4
|
-
pn-progress-stepper
|
|
4
|
+
pn-progress-stepper {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
pn-progress-stepper .pn-progress {
|
|
5
9
|
position: relative;
|
|
6
10
|
width: 100%;
|
|
7
11
|
background: #f3f2f2;
|
|
@@ -9,28 +13,100 @@ pn-progress-stepper .pn-progress-stepper {
|
|
|
9
13
|
border-radius: 0.5em;
|
|
10
14
|
box-shadow: 0 0 0 0.0625em #969087;
|
|
11
15
|
}
|
|
12
|
-
pn-progress-stepper .pn-progress-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pn-progress-stepper .pn-progress-stepper-label {
|
|
16
|
+
pn-progress-stepper .pn-progress-label {
|
|
17
|
+
display: block;
|
|
18
|
+
color: #2d2013;
|
|
19
|
+
font-size: 1em;
|
|
17
20
|
margin-bottom: 0.5em;
|
|
18
21
|
}
|
|
19
|
-
pn-progress-stepper .pn-progress-
|
|
22
|
+
pn-progress-stepper .pn-progress-value {
|
|
20
23
|
position: absolute;
|
|
21
24
|
top: -0.0625em;
|
|
22
25
|
left: -0.0625em;
|
|
23
26
|
height: 0.625em;
|
|
24
27
|
background-color: #005d92;
|
|
25
|
-
width: calc(var(--progress-value) + 0.125em);
|
|
28
|
+
width: calc(var(--pn-progress-value) + 0.125em);
|
|
26
29
|
border-radius: 0.5em 0 0 0.5em;
|
|
27
30
|
transition-property: width, border-radius;
|
|
28
31
|
transition-duration: 0.4s;
|
|
29
32
|
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
30
33
|
}
|
|
31
34
|
@media (prefers-reduced-motion: reduce) {
|
|
32
|
-
pn-progress-stepper .pn-progress-
|
|
35
|
+
pn-progress-stepper .pn-progress-value {
|
|
36
|
+
transition-duration: 0s;
|
|
37
|
+
transition-delay: 0s;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
pn-progress-stepper .pn-progress-value[data-full] {
|
|
41
|
+
border-top-right-radius: 0.5em;
|
|
42
|
+
border-bottom-right-radius: 0.5em;
|
|
43
|
+
}
|
|
44
|
+
pn-progress-stepper .pn-progress-dots {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
gap: 1em;
|
|
49
|
+
}
|
|
50
|
+
pn-progress-stepper .pn-progress-dot {
|
|
51
|
+
width: 0.875em;
|
|
52
|
+
height: 0.875em;
|
|
53
|
+
background-color: #f3f2f2;
|
|
54
|
+
border: 0.0625em solid #d3cecb;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
transform: scale(1) translateY(0%);
|
|
57
|
+
transition-property: background-color, border-color;
|
|
58
|
+
transition-duration: 0.4s;
|
|
59
|
+
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
60
|
+
animation: pnBackwards 0.2s cubic-bezier(0.7, 0, 0.3, 1);
|
|
61
|
+
animation-fill-mode: forwards;
|
|
62
|
+
}
|
|
63
|
+
@media (prefers-reduced-motion: reduce) {
|
|
64
|
+
pn-progress-stepper .pn-progress-dot {
|
|
33
65
|
transition-duration: 0s;
|
|
34
66
|
transition-delay: 0s;
|
|
35
67
|
}
|
|
68
|
+
}
|
|
69
|
+
pn-progress-stepper .pn-progress-dot[data-active] {
|
|
70
|
+
background-color: #005d92;
|
|
71
|
+
border-color: #005d92;
|
|
72
|
+
animation: pnForward 0.2s cubic-bezier(0.7, 0, 0.3, 1);
|
|
73
|
+
animation-fill-mode: forwards;
|
|
74
|
+
}
|
|
75
|
+
pn-progress-stepper .pn-progress-sr-only {
|
|
76
|
+
position: absolute;
|
|
77
|
+
height: 1px;
|
|
78
|
+
width: 1px;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
81
|
+
margin: -1px;
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes pnForward {
|
|
86
|
+
0% {
|
|
87
|
+
transform: scale(1) translateY(0%);
|
|
88
|
+
}
|
|
89
|
+
50% {
|
|
90
|
+
transform: scale(1) translateY(20%);
|
|
91
|
+
}
|
|
92
|
+
75% {
|
|
93
|
+
transform: scale(1.1) translateY(10%);
|
|
94
|
+
}
|
|
95
|
+
100% {
|
|
96
|
+
transform: scale(1) translateY(0%);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
@keyframes pnBackwards {
|
|
100
|
+
0% {
|
|
101
|
+
transform: scale(1) translateY(0%);
|
|
102
|
+
}
|
|
103
|
+
50% {
|
|
104
|
+
transform: scale(1) translateY(-20%);
|
|
105
|
+
}
|
|
106
|
+
75% {
|
|
107
|
+
transform: scale(0.9) translateY(-10%);
|
|
108
|
+
}
|
|
109
|
+
100% {
|
|
110
|
+
transform: scale(1) translateY(0%);
|
|
111
|
+
}
|
|
36
112
|
}
|
|
@@ -10,57 +10,37 @@ import { en, awaitTopbar, uuidv4 } from "../../../globals/helpers";
|
|
|
10
10
|
**/
|
|
11
11
|
export class PnProgressStepper {
|
|
12
12
|
constructor() {
|
|
13
|
+
this.builtInLabel = undefined;
|
|
13
14
|
this.progressValue = 0;
|
|
14
|
-
this.label =
|
|
15
|
+
this.label = '';
|
|
16
|
+
this.progressStepperId = '';
|
|
17
|
+
this.language = null;
|
|
15
18
|
this.totalSteps = this.maxStep;
|
|
16
19
|
this.currentStep = this.minStep;
|
|
17
20
|
this.stepName = undefined;
|
|
18
|
-
this.
|
|
19
|
-
this.language = null;
|
|
21
|
+
this.dots = false;
|
|
20
22
|
}
|
|
21
23
|
id = `pn-progress-stepper-${uuidv4()}`;
|
|
22
|
-
idLabel = `${this.id}-label`;
|
|
23
|
-
idBar = `${this.id}-bar`;
|
|
24
24
|
minStep = 1;
|
|
25
25
|
maxStep = 7;
|
|
26
26
|
hostElement;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
stepWatchers(a, b, c) {
|
|
28
|
+
if (c === 'currentStep')
|
|
29
|
+
this.validate(a, 'currentStep');
|
|
30
|
+
if (c === 'totalSteps')
|
|
31
|
+
this.validate(b, 'totalSteps');
|
|
32
|
+
this.calculateProgress();
|
|
32
33
|
}
|
|
33
34
|
watchLanguage() {
|
|
34
|
-
|
|
35
|
-
return;
|
|
36
|
-
this.label = translations.STEP[this.language || en];
|
|
37
|
-
}
|
|
38
|
-
watchId() {
|
|
39
|
-
if (this.progressStepperId) {
|
|
40
|
-
this.idLabel = `${this.progressStepperId}-label`;
|
|
41
|
-
this.idBar = `${this.progressStepperId}-bar`;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.idLabel = `${this.id}-label`;
|
|
45
|
-
this.idBar = `${this.id}-bar`;
|
|
46
|
-
}
|
|
35
|
+
this.builtInLabel = translations.STEP[this.language || en];
|
|
47
36
|
}
|
|
48
37
|
async componentWillLoad() {
|
|
49
38
|
this.watchLanguage();
|
|
50
|
-
this.watchId();
|
|
51
39
|
this.validate(this.currentStep, 'currentStep');
|
|
52
40
|
this.validate(this.totalSteps, 'totalSteps');
|
|
53
|
-
if (this.language)
|
|
54
|
-
return;
|
|
55
|
-
await awaitTopbar(this.hostElement);
|
|
56
|
-
}
|
|
57
|
-
componentWillRender() {
|
|
58
41
|
this.calculateProgress();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (this.label === undefined)
|
|
62
|
-
return false;
|
|
63
|
-
return !Object.keys(translations.STEP).find(step => translations.STEP[step] === this.label);
|
|
42
|
+
if (this.language === null)
|
|
43
|
+
await awaitTopbar(this.hostElement);
|
|
64
44
|
}
|
|
65
45
|
validate(step, prop) {
|
|
66
46
|
const componentName = this.hostElement.localName;
|
|
@@ -80,14 +60,20 @@ export class PnProgressStepper {
|
|
|
80
60
|
calculateProgress() {
|
|
81
61
|
try {
|
|
82
62
|
this.progressValue = Math.floor((this.currentStep / this.totalSteps) * 100);
|
|
83
|
-
this.hostElement.style.setProperty('--progress-value', `${this.progressValue}%`);
|
|
63
|
+
this.hostElement.style.setProperty('--pn-progress-value', `${this.progressValue}%`);
|
|
84
64
|
}
|
|
85
65
|
catch (error) {
|
|
86
66
|
console.error(`${this.hostElement.localName}:`, error.message);
|
|
87
67
|
}
|
|
88
68
|
}
|
|
69
|
+
getLabel() {
|
|
70
|
+
return this.label || this.builtInLabel;
|
|
71
|
+
}
|
|
72
|
+
getId() {
|
|
73
|
+
return this.progressStepperId || this.id;
|
|
74
|
+
}
|
|
89
75
|
render() {
|
|
90
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '8b188af32a20e83f8e8d0460c676bda9e1560911' }, h("label", { key: '9501af57bade0fd22ca865990e9c6934fb8da0d2', htmlFor: this.getId(), class: 'pn-progress-label' + (this.dots ? ' pn-progress-sr-only' : '') }, h("span", { key: '7ae3e7e7fa8ea5d24fe13c895b6b86d7a0bd780a' }, this.getLabel(), " ", this.currentStep, "/", this.totalSteps), this.stepName && h("span", { key: '3e15c0c51b59bbea44e8d589ff29da8c9cb5a666' }, " - ", this.stepName)), h("progress", { key: '7e379261374b13ad1b06216fe96146ac7fad73c2', id: this.getId(), class: "pn-progress-sr-only", max: "100", value: this.progressValue }), this.dots ? (h("div", { class: "pn-progress-dots", "aria-hidden": "true" }, [...Array(this.totalSteps)].map((_, i) => (h("div", { class: "pn-progress-dot", "data-active": i + 1 <= this.currentStep, key: i }))))) : (h("div", { "aria-hidden": "true", class: "pn-progress" }, h("div", { class: "pn-progress-value", "data-full": this.currentStep === this.totalSteps })))));
|
|
91
77
|
}
|
|
92
78
|
static get is() { return "pn-progress-stepper"; }
|
|
93
79
|
static get originalStyleUrls() {
|
|
@@ -104,7 +90,7 @@ export class PnProgressStepper {
|
|
|
104
90
|
return {
|
|
105
91
|
"label": {
|
|
106
92
|
"type": "string",
|
|
107
|
-
"mutable":
|
|
93
|
+
"mutable": false,
|
|
108
94
|
"complexType": {
|
|
109
95
|
"original": "string",
|
|
110
96
|
"resolved": "string",
|
|
@@ -114,30 +100,70 @@ export class PnProgressStepper {
|
|
|
114
100
|
"optional": true,
|
|
115
101
|
"docs": {
|
|
116
102
|
"tags": [],
|
|
117
|
-
"text": "Set custom label for the stepper,
|
|
103
|
+
"text": "Set custom label for the stepper, default label is \"Step\"."
|
|
118
104
|
},
|
|
119
105
|
"attribute": "label",
|
|
120
|
-
"reflect": false
|
|
106
|
+
"reflect": false,
|
|
107
|
+
"defaultValue": "''"
|
|
121
108
|
},
|
|
122
|
-
"
|
|
123
|
-
"type": "
|
|
124
|
-
"mutable":
|
|
109
|
+
"progressStepperId": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "string",
|
|
114
|
+
"resolved": "string",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": true,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Set a custom HTML id on the progress stepper element to associate progress bar with label."
|
|
122
|
+
},
|
|
123
|
+
"attribute": "progress-stepper-id",
|
|
124
|
+
"reflect": false,
|
|
125
|
+
"defaultValue": "''"
|
|
126
|
+
},
|
|
127
|
+
"language": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"mutable": false,
|
|
125
130
|
"complexType": {
|
|
126
|
-
"original": "
|
|
127
|
-
"resolved": "
|
|
131
|
+
"original": "PnLanguages",
|
|
132
|
+
"resolved": "\"\" | \"da\" | \"en\" | \"fi\" | \"no\" | \"sv\"",
|
|
128
133
|
"references": {
|
|
129
|
-
"
|
|
134
|
+
"PnLanguages": {
|
|
130
135
|
"location": "import",
|
|
131
136
|
"path": "@/globals/types",
|
|
132
|
-
"id": "src/globals/types.ts::
|
|
137
|
+
"id": "src/globals/types.ts::PnLanguages"
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
140
|
},
|
|
136
141
|
"required": false,
|
|
137
|
-
"optional":
|
|
142
|
+
"optional": true,
|
|
138
143
|
"docs": {
|
|
139
144
|
"tags": [],
|
|
140
|
-
"text": "Set
|
|
145
|
+
"text": "Set the language manually, only use this prop if the pnTopbar is not loaded.\nWill not overwrite the custom `label` prop if used."
|
|
146
|
+
},
|
|
147
|
+
"attribute": "language",
|
|
148
|
+
"reflect": false,
|
|
149
|
+
"defaultValue": "null"
|
|
150
|
+
},
|
|
151
|
+
"totalSteps": {
|
|
152
|
+
"type": "number",
|
|
153
|
+
"mutable": true,
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "number",
|
|
156
|
+
"resolved": "number",
|
|
157
|
+
"references": {}
|
|
158
|
+
},
|
|
159
|
+
"required": false,
|
|
160
|
+
"optional": false,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [{
|
|
163
|
+
"name": "category",
|
|
164
|
+
"text": "Steps"
|
|
165
|
+
}],
|
|
166
|
+
"text": "Set total amount of steps, maximum allowed is `7`."
|
|
141
167
|
},
|
|
142
168
|
"attribute": "total-steps",
|
|
143
169
|
"reflect": false,
|
|
@@ -147,20 +173,17 @@ export class PnProgressStepper {
|
|
|
147
173
|
"type": "number",
|
|
148
174
|
"mutable": true,
|
|
149
175
|
"complexType": {
|
|
150
|
-
"original": "
|
|
151
|
-
"resolved": "
|
|
152
|
-
"references": {
|
|
153
|
-
"PnSteps": {
|
|
154
|
-
"location": "import",
|
|
155
|
-
"path": "@/globals/types",
|
|
156
|
-
"id": "src/globals/types.ts::PnSteps"
|
|
157
|
-
}
|
|
158
|
-
}
|
|
176
|
+
"original": "number",
|
|
177
|
+
"resolved": "number",
|
|
178
|
+
"references": {}
|
|
159
179
|
},
|
|
160
180
|
"required": false,
|
|
161
181
|
"optional": false,
|
|
162
182
|
"docs": {
|
|
163
|
-
"tags": [
|
|
183
|
+
"tags": [{
|
|
184
|
+
"name": "category",
|
|
185
|
+
"text": "Steps"
|
|
186
|
+
}],
|
|
164
187
|
"text": "The current step of the progress stepper."
|
|
165
188
|
},
|
|
166
189
|
"attribute": "current-step",
|
|
@@ -178,58 +201,41 @@ export class PnProgressStepper {
|
|
|
178
201
|
"required": false,
|
|
179
202
|
"optional": true,
|
|
180
203
|
"docs": {
|
|
181
|
-
"tags": [
|
|
204
|
+
"tags": [{
|
|
205
|
+
"name": "category",
|
|
206
|
+
"text": "Steps"
|
|
207
|
+
}],
|
|
182
208
|
"text": "You can add a custom optional string to the label if you need a name for the current step."
|
|
183
209
|
},
|
|
184
210
|
"attribute": "step-name",
|
|
185
211
|
"reflect": false
|
|
186
212
|
},
|
|
187
|
-
"
|
|
188
|
-
"type": "
|
|
213
|
+
"dots": {
|
|
214
|
+
"type": "boolean",
|
|
189
215
|
"mutable": false,
|
|
190
216
|
"complexType": {
|
|
191
|
-
"original": "
|
|
192
|
-
"resolved": "
|
|
217
|
+
"original": "boolean",
|
|
218
|
+
"resolved": "boolean",
|
|
193
219
|
"references": {}
|
|
194
220
|
},
|
|
195
221
|
"required": false,
|
|
196
|
-
"optional":
|
|
197
|
-
"docs": {
|
|
198
|
-
"tags": [],
|
|
199
|
-
"text": "Set a custom HTML id on the progress stepper element to associate progress bar with label."
|
|
200
|
-
},
|
|
201
|
-
"attribute": "progress-stepper-id",
|
|
202
|
-
"reflect": false,
|
|
203
|
-
"defaultValue": "''"
|
|
204
|
-
},
|
|
205
|
-
"language": {
|
|
206
|
-
"type": "string",
|
|
207
|
-
"mutable": false,
|
|
208
|
-
"complexType": {
|
|
209
|
-
"original": "PnLanguages",
|
|
210
|
-
"resolved": "\"\" | \"da\" | \"en\" | \"fi\" | \"no\" | \"sv\"",
|
|
211
|
-
"references": {
|
|
212
|
-
"PnLanguages": {
|
|
213
|
-
"location": "import",
|
|
214
|
-
"path": "@/globals/types",
|
|
215
|
-
"id": "src/globals/types.ts::PnLanguages"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
"required": false,
|
|
220
|
-
"optional": true,
|
|
222
|
+
"optional": false,
|
|
221
223
|
"docs": {
|
|
222
|
-
"tags": [
|
|
223
|
-
|
|
224
|
+
"tags": [{
|
|
225
|
+
"name": "category",
|
|
226
|
+
"text": "Visual"
|
|
227
|
+
}],
|
|
228
|
+
"text": "Use the dots visual, instead of the bar.\n\nThis will hide the label from view, but is still accessible to screenreaders."
|
|
224
229
|
},
|
|
225
|
-
"attribute": "
|
|
230
|
+
"attribute": "dots",
|
|
226
231
|
"reflect": false,
|
|
227
|
-
"defaultValue": "
|
|
232
|
+
"defaultValue": "false"
|
|
228
233
|
}
|
|
229
234
|
};
|
|
230
235
|
}
|
|
231
236
|
static get states() {
|
|
232
237
|
return {
|
|
238
|
+
"builtInLabel": {},
|
|
233
239
|
"progressValue": {}
|
|
234
240
|
};
|
|
235
241
|
}
|
|
@@ -237,16 +243,13 @@ export class PnProgressStepper {
|
|
|
237
243
|
static get watchers() {
|
|
238
244
|
return [{
|
|
239
245
|
"propName": "currentStep",
|
|
240
|
-
"methodName": "
|
|
246
|
+
"methodName": "stepWatchers"
|
|
241
247
|
}, {
|
|
242
248
|
"propName": "totalSteps",
|
|
243
|
-
"methodName": "
|
|
249
|
+
"methodName": "stepWatchers"
|
|
244
250
|
}, {
|
|
245
251
|
"propName": "language",
|
|
246
252
|
"methodName": "watchLanguage"
|
|
247
|
-
}, {
|
|
248
|
-
"propName": "progressStepperId",
|
|
249
|
-
"methodName": "watchId"
|
|
250
253
|
}];
|
|
251
254
|
}
|
|
252
255
|
}
|