@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
|
@@ -59,7 +59,7 @@ const PnFieldset$1 = /*@__PURE__*/ proxyCustomElement(class PnFieldset extends H
|
|
|
59
59
|
return alert_exclamation_circle;
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: 'f02790151992e43958982c27b08b91a2f625dc69' }, h("fieldset", { key: '72f7ce4fa8c06a0d7a5cd628578e99df4af6feaa', id: this.fieldsetId, class: "pn-fieldset", disabled: this.disabled, "aria-describedby": this.helpertext && this.idHelpertext, "aria-invalid": this.hasError().toString() }, h("legend", { key: 'd1e8927af562fac146d0d3d6bb8999cfed227251', class: "pn-fieldset-legend" }, this.legend), this.helpertext && (h("p", { key: '565e38f11324a2999649a1507bdca869963d40fc', id: this.idHelpertext, class: "pn-fieldset-helpertext" }, this.helpertext)), h("div", { key: '41f24d04a919cc469265a909f4038a313450e5c1', class: "pn-fieldset-items" }, h("slot", { key: 'a69ed2d87fa287f72217608a394da2e28d16b012' })), h("div", { key: 'a35cbee15cb692542331fe879f14ffca6bbd5954', class: "pn-fieldset-message-wrapper", role: "alert", hidden: !this.error }, h("pn-icon", { key: 'f2391c0f07ccd87f676fd3105f405826fe7f60c4', icon: this.getSymbol() }), h("p", { key: '44e30e61d9455c6fdf415658d760d86b6bba3af7', class: "pn-fieldset-message" }, this.error)))));
|
|
63
63
|
}
|
|
64
64
|
static get watchers() { return {
|
|
65
65
|
"fieldsetId": ["handleId"]
|
|
@@ -425,7 +425,7 @@ const PnFileUpload$1 = /*@__PURE__*/ proxyCustomElement(class PnFileUpload exten
|
|
|
425
425
|
return list.join(',');
|
|
426
426
|
}
|
|
427
427
|
render() {
|
|
428
|
-
return (h(Host, { key: '
|
|
428
|
+
return (h(Host, { key: '30d80fef46dd4ec1a35ebed92cdd3a5799e8a274' }, h("div", { key: '74424e1a3f093f5b39efff46be24b6e501c5967c', class: "pn-file-upload-container" }, h("div", { key: '8575f8345855437ce1ab132931a6db83daedab63', class: "pn-dropzone-container" }, h("input", { key: 'e1f64e842cc835fc3b999a40125acc06aeca9d49', id: this.idFileUpload, class: "pn-file-upload-input", type: "file", name: this.name, multiple: this.multiple, accept: this.accept, capture: this.capture, disabled: this.disabled, required: this.required, "aria-describedby": this.describedBy(), "aria-invalid": this.invalid?.toString(), onClick: e => ripple(e, this.hostElement, '.pn-dropzone-inner'), onChange: () => this._onAddFile(), onDragOver: e => this._onDragOverFile(e), onDragLeave: e => this._onDragLeaveFile(e), onDrop: e => this._onDropFile(e), ref: el => (this.fileInputElement = el) }), h("div", { key: '9d1a9a487c267a0b5a0d26469245490bf45113db', class: "pn-dropzone-inner", "data-hover": this.isHovering, "data-invalid": this.invalid }, h("pn-icon", { key: 'c0625796810d3187b54060841dab300d0a3f88d2', class: "pn-file-upload-icon-element", icon: upload, color: "blue700" }), h("label", { key: '15fa438f664fd63153153b70132f1577be6699ab', htmlFor: this.idFileUpload, class: "pn-file-upload-title" }, this.label || this.translate('CLICKORDRAG')), this.helpertext && (h("p", { key: '2bdeea0f1cee2cdb77c0f5454a9a51977ceb2100', id: this.idHelpertext, class: "pn-file-upload-subtitle" }, this.helpertext)), this.accept && (h("p", { key: '2981fc00ff552d608db0f7ca9dee6551463c18cf', id: this.idAccepttext, class: "pn-file-upload-subtitle" }, this.translate('ACCEPTEDFORMATS'), ": ", this.accept, this.maxSize && (h("span", { key: 'b9a481a9e54df2d25c104395259aac0c642db78a' }, ' ', "(", this.translate('MAXFILESIZE'), ": ", this.maxSize, ")")))))), !!this.files.length && (h("ul", { key: '4c2205aa04c293d9e3757ddb1606596147dd0d46', class: "files-list" }, this.files.map((file) => (h("li", { class: "files-list-item-container", key: file.uuid }, h("div", { class: this.getFileItemClass(file) }, h("div", { class: "file-list-item-title" }, h("pn-icon", { icon: this.getFileIcon(file), color: this.getFileColor(file) }), this.hideProgress || file.progress === 0 ? (h("div", { class: "filename" }, file.filename)) : (h("pn-progress-bar", { label: file.filename, progress: file.progress, error: file.error && file.errorMessage }))), h("pn-button", { small: true, variant: "borderless", arialabel: `${this.translate('REMOVE_FILE')} ${file.filename}`, appearance: file.error ? 'warning' : 'light', icon: trash_can, iconOnly: true, tooltip: this.translate('REMOVE_FILE'), loading: this.isLoading(file), onClick: () => this.removeFile(file) })), file.error ? (h("div", { class: "files-list-item-text-error" }, file.errorMessage || file.error.message)) : null))))), h("slot", { key: 'c2838dd4eb5d553deab6c198f3f203ddf3612706' }))));
|
|
429
429
|
}
|
|
430
430
|
static get watchers() { return {
|
|
431
431
|
"limit": ["handleLimit"],
|
|
@@ -178,7 +178,7 @@ const PnFooter$1 = /*@__PURE__*/ proxyCustomElement(class PnFooter extends HTMLE
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
render() {
|
|
181
|
-
return (h(Host, { key: '
|
|
181
|
+
return (h(Host, { key: 'eb51a2359d790d67d2a655fe98b1315e57558cb9' }, h("div", { key: 'e5c3ca2d99668b56a51f4cff35512c87a649fc8e', class: "pn-footer-row" }, h("p", { key: 'e0e95967f2f2a58875109acf64682ab6c34df81d' }, this.getText('questions')), this.renderLink('contact')), h("div", { key: 'c8c8770491f39445575f0770a2d52bb392d7095e', class: "pn-footer-row" }, this.market !== NO && this.renderLink('terms'), this.renderLink('privacy'), this.renderLink('cookies')), h("div", { key: '944d4f4f3a3baa245da8a6ba25837314d385b4f8', class: "pn-footer-row" }, h("p", { key: '3e35f3e9f882c07ba3b074a02c7752dc021d31b3' }, this.getText('info')), this.renderLink('domain'))));
|
|
182
182
|
}
|
|
183
183
|
static get style() { return PnFooterStyle0; }
|
|
184
184
|
}, [0, "pn-footer", {
|
|
@@ -66,7 +66,7 @@ const PnHeader$1 = /*@__PURE__*/ proxyCustomElement(class PnHeader extends HTMLE
|
|
|
66
66
|
return this.hasBreadcrumb || !!this.goBackHref?.length;
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '0c5653c92c6502f2f3ee2db0595be669a5588dd7' }, h("header", { key: 'fdc4a48ee31a83e86cbba171677d09d5845c6e0f', class: "pn-header" }, h("div", { key: 'dca702aad4ca3c0b658bf16ecd2621094db8e893', class: "pn-header-container" }, h("div", { key: '6da162eb32c0a76e9cd631559d522c82b8e682b9', class: "pn-header-breadcrumbs", hidden: !this.showBreadcrumb() }, this.goBackHref && (h("pn-text-link", { key: '02e7658941132a034bd058b0e3e716f32cba7f98', label: this.goBackTextTranslated, href: this.goBackHref, icon: arrow_left, leftIcon: true })), h("slot", { key: '1f358d45875bc7e7382e34eb00d845f34c3ae33f', name: "breadcrumb" })), h("div", { key: '402dcd759dc7e200899a61ac5f198105e28c8202', class: "pn-header-content" }, this.heading && h("h1", { key: '6b5755ad86d300f4e070b5444a04399fa497ac6f' }, this.heading), h("slot", { key: 'c51eb23c6e206762395cf40f86fe870ae8eb8afb' })), h("div", { key: '5beec993b7da17304cdeb31cafb5850adb878611', class: "pn-header-buttons", hidden: !this.hasButtons }, h("slot", { key: 'd38cec8bea8f49c85a1ed504f197aad06c8fee6d', name: "buttons" })), h("slot", { key: '31c06cf9cfbcf4b0b76bb0356db4b736aa8a9a81', name: "menu" })))));
|
|
70
70
|
}
|
|
71
71
|
static get watchers() { return {
|
|
72
72
|
"maxWidth": ["setMaxWidth"],
|
|
@@ -206,10 +206,10 @@ const PnInput$1 = /*@__PURE__*/ proxyCustomElement(class PnInput extends HTMLEle
|
|
|
206
206
|
return !this.showPrefix() && !!this.textSuffix?.length && !this.isPassword() && this.type !== 'search';
|
|
207
207
|
}
|
|
208
208
|
render() {
|
|
209
|
-
return (h(Host, { key: '
|
|
209
|
+
return (h(Host, { key: '7f8348da79171fdb3f3b48733a746d6bd531adee' }, h("div", { key: '4867fbb2418edcab774c6cd8c7d98c2431243ac1', class: "pn-input", "data-valid": this.valid, "data-error": this.hasError() }, (this.label || this.maxlength >= 1) && (h("label", { key: 'b8978f74d228ab484d3eb4abcba54f693781f4cf', htmlFor: this.inputid, class: "pn-input-label" }, this.label && h("span", { key: '1d28ce32a353c180a8cb4c2e0011362c9911a1f3' }, this.label), this.maxlength >= 0 && h("span", { key: 'aa862bff99623ec29fa4252c6b2a352900726bef' }, `${this.value.length}/${this.maxlength}`))), h("div", { key: '595c30428744da15ef835ced9a9d2eec8d866fda', class: "pn-input-group" }, h("input", { key: '343c997a23eb23b28daad30e19e26e7685eda62e', type: this.getInputType(), id: this.inputid, class: "pn-input-element", name: this.name, placeholder: this.placeholder, autocomplete: this.autocomplete, maxlength: this.maxlength, list: this.list, pattern: this.pattern, min: this.min, max: this.max, step: this.step, value: this.value, inputmode: this.inputmode, disabled: this.disabled, required: this.required, readonly: this.readonly, "aria-label": this.arialabel, "aria-describedby": this.hasMessage() ? this.idMessage : null, "aria-controls": this.ariacontrols, "aria-invalid": this.hasError()?.toString(), style: {
|
|
210
210
|
'--pn-input-offset-left': `${this.offsetLeft}px`,
|
|
211
211
|
'--pn-input-offset-right': `${this.offsetRight}px`,
|
|
212
|
-
}, onInput: e => this.setVal(e) }), h("div", { key: '
|
|
212
|
+
}, onInput: e => this.setVal(e) }), h("div", { key: 'b6442450590e1a5e26322e7c2e5664dc645a2338', class: "pn-input-eyecandy", "data-prefix": true, ref: el => (this.prefix = el) }, !!this.icon && h("pn-icon", { key: '9e832e7d92c500a8b999570334386567da7bdfb2', icon: this.icon, "aria-hidden": "true" }), this.showPrefix() && h("span", { key: '06d7d276a732e8506524fd4e04389e6d7a779724', class: "pn-input-text" }, this.textPrefix)), h("div", { key: '4fddb9d6b0112af9f194d548cfa45013d55d5345', class: "pn-input-eyecandy", "data-suffix": true, ref: el => (this.suffix = el) }, this.showSuffix() && h("span", { key: 'a1979b08de663081b527cff264b44da4bc4eed9c', class: "pn-input-text" }, this.textSuffix), this.stateDisplay() && h("pn-icon", { key: '4439c0e48081e602e632438948bd4aad7df271dd', "aria-hidden": "true", icon: this.stateIcon(), color: this.stateColor() }), this.isPassword() && (h("pn-button", { key: '263f37a02ef2774ced61547355fd1646b42ca465', icon: this.showPassword ? preview_on : preview_off, iconOnly: true, arialabel: this.passwordText(), small: true, appearance: "light", variant: "borderless", onClick: () => this.togglePassword() })), this.isSearch() && (h("pn-button", { key: 'd623852137ec384fb10144253f2e8fc48a2cc0b2', icon: close, iconOnly: true, arialabel: this.translate('CLEAR'), small: true, appearance: "light", variant: "borderless", onClick: () => this.clearVal() })))), h("p", { key: 'f88d31f6be9ca8bc1bf96eb58020dcf34c657730', class: "pn-input-message", id: this.idMessage, role: this.hasErrorMessage() ? 'alert' : null, hidden: !this.hasMessage() }, this.hasHelperText() && !this.hasError() && h("span", { key: '2e255d5201e9485e9f594ad9c4c68cfc123d36fa', class: "pn-input-helper" }, this.helpertext), h("span", { key: 'a7e6b9cb46357227d0b1c318522b43e866383aea', class: "pn-input-helper-slot", hidden: !this.showHelperSlot || this.hasError() }, h("slot", { key: '6e614ea8cf861d78cb63ffb6d3eaa54053b45017', name: "helpertext" })), this.hasErrorMessage() && h("span", { key: '545331e7c33cbbbb8f9d1952228dcf1819a48a66', class: "pn-input-error" }, this.error), h("span", { key: 'e446082015c2a97a3317f0b251e52b64d114de59', class: "pn-input-error-slot", hidden: !this.showErrorSlot }, h("slot", { key: '7827f003bf9eb49991776dabd9567d603562bec2', name: "error" }))))));
|
|
213
213
|
}
|
|
214
214
|
static get watchers() { return {
|
|
215
215
|
"textPrefix": ["handleOffset"],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
5
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
6
|
-
import { r as reduceMotion, k as awaitTopbar, e as en } from './helpers.js';
|
|
6
|
+
import { r as reduceMotion, k as awaitTopbar, e as en, i as isSmallScreen } from './helpers.js';
|
|
7
7
|
import { c as close } from './close.js';
|
|
8
8
|
import { d as defineCustomElement$4 } from './pn-button2.js';
|
|
9
9
|
import { d as defineCustomElement$3 } from './pn-icon2.js';
|
|
@@ -19,7 +19,7 @@ const translations = {
|
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const pnModalCss = "/* Global utility variables */\n/* Input styles */\n/* Transition variables */\npn-modal .pn-modal {\n --pn-modal-max-width: 45em;\n
|
|
22
|
+
const pnModalCss = "/* Global utility variables */\n/* Input styles */\n/* Transition variables */\npn-modal .pn-modal {\n --pn-modal-max-width: 45em;\n z-index: 10000;\n position: fixed;\n top: 0;\n inset-block-start: 0;\n inset-block-end: 0;\n margin: auto;\n padding: 0;\n max-width: var(--pn-modal-max-width);\n overflow: hidden;\n border: 0;\n border-radius: 1.5em;\n box-shadow: 0 0.25em 0.875em rgba(0, 0, 0, 0.18), 0 1.625em 3.5em rgba(0, 0, 0, 0.22);\n background-color: #ffffff;\n display: none;\n opacity: 0;\n transform: translate(0%, 20%);\n outline: 0.2rem solid transparent;\n outline-offset: 0.2rem;\n transition-property: opacity, overlay, display, transform, outline-color, border-radius;\n transition-duration: 0.4s;\n transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);\n transition-behavior: allow-discrete;\n}\npn-modal .pn-modal:focus-visible {\n outline-color: #ffffff;\n}\n@media (prefers-reduced-motion: reduce) {\n pn-modal .pn-modal {\n transition-duration: 0s;\n transition-delay: 0s;\n }\n}\npn-modal .pn-modal[data-allow-overflow] {\n overflow: unset;\n}\npn-modal .pn-modal[data-allow-overflow] .pn-modal-container {\n overflow: unset;\n}\npn-modal .pn-modal[data-allow-overflow] .pn-modal-picture {\n border-top-right-radius: 1.5em;\n}\npn-modal .pn-modal[data-image] {\n padding-top: 0;\n}\npn-modal .pn-modal[data-sheet] {\n margin: 0 0 0 auto;\n height: 100%;\n max-height: unset;\n border-radius: 1.5em 0 0 1.5em;\n transform: translate(20%, 0%);\n}\npn-modal .pn-modal[data-sheet] .pn-modal-container {\n max-height: unset;\n}\npn-modal .pn-modal[open] {\n display: flex;\n opacity: 1;\n transform: translate(0%, 0%);\n}\n@starting-style {\n pn-modal .pn-modal[open] {\n display: flex;\n opacity: 0;\n transform: translate(0%, 20%);\n }\n}\npn-modal .pn-modal[open][data-sheet] {\n transform: translate(0%, 0%);\n}\n@starting-style {\n pn-modal .pn-modal[open][data-sheet] {\n transform: translate(20%, 0%);\n }\n}\npn-modal .pn-modal::backdrop {\n background-color: rgba(0, 0, 0, 0);\n transition-property: opacity, background-color, overlay, display;\n transition-duration: 0.4s;\n transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);\n transition-behavior: allow-discrete;\n}\n@media (prefers-reduced-motion: reduce) {\n pn-modal .pn-modal::backdrop {\n transition-duration: 0s;\n transition-delay: 0s;\n }\n}\npn-modal .pn-modal[open]::backdrop {\n background-color: rgba(0, 0, 0, 0.55);\n}\n@starting-style {\n pn-modal .pn-modal[open]::backdrop {\n background-color: rgba(0, 0, 0, 0);\n }\n}\npn-modal .pn-modal-container {\n max-height: 85vh;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n height: 100%;\n overflow: hidden auto;\n}\npn-modal .pn-modal-container::-webkit-scrollbar {\n background-color: #ffffff;\n width: 0.875em;\n border-radius: 0.5em;\n}\npn-modal .pn-modal-container::-webkit-scrollbar-track {\n background-color: #ffffff;\n border-radius: 0.5em;\n}\npn-modal .pn-modal-container::-webkit-scrollbar-thumb {\n cursor: pointer;\n background-color: #969087;\n border-radius: 1em;\n border: 0.25em solid #ffffff;\n}\npn-modal .pn-modal-container::-webkit-scrollbar-thumb:hover {\n background-color: #5e554a;\n}\npn-modal .pn-modal-container::-webkit-scrollbar-corner, pn-modal .pn-modal-container::-webkit-scrollbar-button {\n display: none;\n}\npn-modal .pn-modal-close-button {\n position: absolute;\n z-index: 10;\n right: 0.75em;\n top: 0.75em;\n}\npn-modal .pn-modal-header {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n padding: clamp(1em, 5vw, 1.5em);\n}\npn-modal .pn-modal-header[hidden] {\n display: none;\n}\npn-modal .pn-modal-header:not([hidden]) + .pn-modal-content:not([hidden]) {\n padding-top: 0;\n}\npn-modal .pn-modal-label {\n line-height: 1.5;\n padding-right: 1.5em;\n margin: 0;\n}\npn-modal .pn-modal-text {\n margin: 0;\n}\npn-modal .pn-modal-content {\n padding: clamp(1em, 5vw, 1.5em);\n}\npn-modal .pn-modal-image {\n position: relative;\n display: flex;\n flex-direction: column;\n}\npn-modal .pn-modal-image[hidden] {\n display: none;\n}\npn-modal .pn-modal-picture {\n margin: 0;\n padding: 0;\n display: block;\n overflow: hidden;\n border-radius: 1.5em 0 0 0;\n}\npn-modal .pn-modal-picture > *[slot=image] {\n display: block;\n height: 100%;\n width: 100%;\n object-fit: cover;\n}\npn-modal .pn-modal-buttons {\n background-color: #ffffff;\n border-top: 0.0625em solid #d3cecb;\n padding: clamp(1em, 5vw, 1.5em);\n display: flex;\n justify-content: flex-end;\n gap: 0.5em;\n border-radius: 0 0 1.5em 1.5em;\n}\npn-modal .pn-modal-buttons > [slot=buttons]:not(pn-button) {\n display: flex;\n justify-content: flex-end;\n gap: 0.5em;\n}\npn-modal .pn-modal-buttons > [slot=buttons]:not(pn-button) > [data-left] {\n margin-right: auto;\n}\npn-modal .pn-modal-buttons > [data-left] {\n margin-right: auto;\n}\npn-modal .pn-modal-buttons:empty {\n display: none;\n}\n\n@media (max-width: 55em) {\n pn-modal .pn-modal {\n max-height: 95vh;\n margin-bottom: 0;\n bottom: 0;\n transform: translate(0%, 20%);\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n}";
|
|
23
23
|
const PnModalStyle0 = pnModalCss;
|
|
24
24
|
|
|
25
25
|
const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLElement {
|
|
@@ -31,6 +31,7 @@ const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLEle
|
|
|
31
31
|
this.close = createEvent(this, "close", 7);
|
|
32
32
|
this.isClosing = false;
|
|
33
33
|
this.isOpening = false;
|
|
34
|
+
this.removeOverflow = false;
|
|
34
35
|
this.label = undefined;
|
|
35
36
|
this.helpertext = undefined;
|
|
36
37
|
this.language = null;
|
|
@@ -46,6 +47,8 @@ const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLEle
|
|
|
46
47
|
animationDuration = this.standardAnimationDuration;
|
|
47
48
|
modalTimeout;
|
|
48
49
|
modalElement;
|
|
50
|
+
modalContainer;
|
|
51
|
+
modalPicture;
|
|
49
52
|
get hostElement() { return this; }
|
|
50
53
|
handleOpen() {
|
|
51
54
|
if (this.open)
|
|
@@ -71,6 +74,10 @@ const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLEle
|
|
|
71
74
|
const width = this.maxWidth || '45em';
|
|
72
75
|
this.modalElement.style.setProperty('--pn-modal-max-width', width);
|
|
73
76
|
}
|
|
77
|
+
handleOverflow() {
|
|
78
|
+
if (this.allowOverflow)
|
|
79
|
+
this.setOverflow();
|
|
80
|
+
}
|
|
74
81
|
/** This event is fired when the modal is toggled. */
|
|
75
82
|
modalToggle;
|
|
76
83
|
/** This event is dispatched after the opening/closing animation has finished playing. */
|
|
@@ -100,11 +107,18 @@ const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLEle
|
|
|
100
107
|
translate(prop) {
|
|
101
108
|
return translations?.[prop]?.[this.language || en] || prop;
|
|
102
109
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.
|
|
110
|
+
showImage() {
|
|
111
|
+
return !!this.modalPicture?.innerHTML;
|
|
112
|
+
}
|
|
113
|
+
showHeader() {
|
|
114
|
+
return !!(this.label || this.helpertext || this.hostElement.querySelector('[slot="header"]')?.textContent);
|
|
115
|
+
}
|
|
116
|
+
setOverflow() {
|
|
117
|
+
this.removeOverflow = !this.hasOverflow();
|
|
118
|
+
}
|
|
119
|
+
hasOverflow() {
|
|
120
|
+
const multiplyWith = isSmallScreen() ? 0.95 : 0.85;
|
|
121
|
+
return this.modalContainer?.scrollHeight > innerHeight * multiplyWith;
|
|
108
122
|
}
|
|
109
123
|
isSameModal(target) {
|
|
110
124
|
return this.modalElement.isSameNode(target);
|
|
@@ -141,7 +155,7 @@ const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLEle
|
|
|
141
155
|
this.open = state ?? !this.open;
|
|
142
156
|
}
|
|
143
157
|
render() {
|
|
144
|
-
return (h(Host, { key: '
|
|
158
|
+
return (h(Host, { key: 'd24c1b43f9eebc2d2759e4b6b15982889c559c08' }, h("dialog", { key: '4111d8ae6c9eb198cb74744dce15b37ec1a4157c', class: "pn-modal", "data-closing": this.isClosing, "data-sheet": this.sheet, "data-image": this.showImage(), "data-allow-overflow": this.removeOverflow, onClose: () => this.setModalClose(), onCancel: () => this.setModalClose(), onToggle: () => this.modalToggle.emit({ open: this.open }), onKeyDown: event => this.handleKeyboard(event), onClick: event => this.clickModalBackground(event), ref: el => (this.modalElement = el) }, !this.hideClose && (h("pn-button", { key: '9411bdbf12899d1913f5094981d08e8161277408', small: true, class: "pn-modal-close-button", icon: close, iconOnly: true, arialabel: this.translate('CLOSE_MODAL'), appearance: "light", variant: "borderless", type: "button", onPnClick: () => this.setModalClose() })), h("div", { key: '917803e1f7847c4b4609fd121391fc33919ea5d3', class: "pn-modal-container", ref: el => (this.modalContainer = el) }, h("div", { key: '3241e14d8647278032ecb4274c39ab6e3615cf6b', class: "pn-modal-image", hidden: !this.showImage() }, h("picture", { key: '6a830c0e51a4c1a9870dd06509a3eaa5a06ce048', class: "pn-modal-picture", ref: el => (this.modalPicture = el) }, h("slot", { key: '098e962a7cc8ac57309ba74951e4a8b0c0aebf08', name: "image" }))), h("header", { key: '41697c436ba9431fe4fa2ae11ca270852f7db309', class: "pn-modal-header", hidden: !this.showHeader() }, this.label && h("h2", { key: '1fcb37a181cfcb6315f2e470eef006842b1ccf53', class: "pn-modal-label" }, this.label), this.helpertext && h("p", { key: '7907955b0d34a729eb142985be24a85fcf5b0c73', class: "pn-modal-text" }, this.helpertext), h("slot", { key: 'c4c8d17830001c3e8df504de9006bcc3cd448549', name: "header" })), h("section", { key: '266f424be0a181433d50cb08904133c9f2aaa67e', class: "pn-modal-content" }, h("slot", { key: '030bb328e6fc00a14305b4134861b38a8fc8f426' })), h("nav", { key: '05d67c40c30af133a7037c3ed57a72b5e5b9de2f', class: "pn-modal-buttons" }, h("slot", { key: 'a12fd530166c6d08aa1a50f0393c4ca2b22b1fc0', name: "buttons" }))))));
|
|
145
159
|
}
|
|
146
160
|
static get watchers() { return {
|
|
147
161
|
"open": ["handleOpen"],
|
|
@@ -159,8 +173,9 @@ const PnModal$1 = /*@__PURE__*/ proxyCustomElement(class PnModal extends HTMLEle
|
|
|
159
173
|
"sheet": [4],
|
|
160
174
|
"maxWidth": [1, "max-width"],
|
|
161
175
|
"isClosing": [32],
|
|
162
|
-
"isOpening": [32]
|
|
163
|
-
|
|
176
|
+
"isOpening": [32],
|
|
177
|
+
"removeOverflow": [32]
|
|
178
|
+
}, [[9, "resize", "handleOverflow"]], {
|
|
164
179
|
"open": ["handleOpen"],
|
|
165
180
|
"maxWidth": ["handleMaxWidth"]
|
|
166
181
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pn-modal.js","mappings":";;;;;;;;;;;AAAO,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE;QACX,EAAE,EAAE,cAAc;QAClB,EAAE,EAAE,mBAAmB;QACvB,EAAE,EAAE,gBAAgB;QACpB,EAAE,EAAE,qBAAqB;QACzB,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;;;;;;;;;;;;;;;;;;;;;;;;","names":["PnModal","closeIcon"],"sources":["src/components/feedback/pn-modal/translation.ts","src/components/feedback/pn-modal/pn-modal.scss?tag=pn-modal","src/components/feedback/pn-modal/pn-modal.tsx"],"sourcesContent":["export const translations = {\n CLOSE_MODAL: {\n en: 'Close dialog',\n sv: 'Stäng dialogrutan',\n da: 'Luk dialogboks',\n fi: 'Sulje valintaikkuna',\n no: 'Lukk dialogboksen',\n },\n};\n\nexport type PnTranslations = keyof typeof translations;\n","@use 'sass:string';\n@use 'src/globals/main';\n\npn-modal .pn-modal {\n --pn-modal-max-width: 45em;\n --pn-modal-overflow: hidden auto;\n\n z-index: 10000;\n position: fixed;\n top: 0;\n inset-block-start: 0;\n inset-block-end: 0;\n margin: auto;\n\n overflow: var(--pn-modal-overflow);\n\n max-width: var(--pn-modal-max-width);\n max-height: 85vh;\n padding: clamp(1em, 5vw, 1.5em) 0;\n\n border: 0.0625em solid main.$gray50;\n border-radius: 0.5em;\n\n flex-direction: column;\n align-items: stretch;\n gap: 0.75em;\n\n box-shadow:\n 0 0.25em 0.875em rgba(0, 0, 0, 0.18),\n 0 1.625em 3.5em rgba(0, 0, 0, 0.22);\n background-color: main.$white;\n\n display: none;\n opacity: 0;\n transform: translate(0%, 20%);\n\n @include main.pn-focus(main.$white);\n @include main.pn-scrollbar;\n\n @include main.pn-transition('opacity, overlay, display, transform, outline-color', main.$timing-layout);\n transition-behavior: allow-discrete;\n\n &[data-sheet] {\n margin: 0 0 0 auto;\n height: 100%;\n max-height: unset;\n border-radius: 0.5em 0 0 0.5em;\n transform: translate(20%, 0%);\n }\n\n &[open] {\n display: flex;\n opacity: 1;\n transform: translate(0%, 0%);\n\n @starting-style {\n display: flex;\n opacity: 0;\n transform: translate(0%, 20%);\n }\n\n &[data-sheet] {\n transform: translate(0%, 0%);\n @starting-style {\n transform: translate(20%, 0%);\n }\n }\n }\n\n &::backdrop {\n background-color: rgba(main.$black, 0);\n\n @include main.pn-transition('opacity, background-color, overlay, display', main.$timing-layout);\n transition-behavior: allow-discrete;\n }\n\n &[open]::backdrop {\n background-color: rgba(main.$black, 0.55);\n @starting-style {\n background-color: rgba(main.$black, 0);\n }\n }\n\n &-close-button {\n position: absolute;\n right: 0.5em;\n top: 0.5em;\n }\n\n &-header {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n padding: 0 clamp(1em, 5vw, 1.5em);\n }\n\n &-label {\n line-height: 1.5;\n padding-right: 1.5em;\n margin: 0;\n }\n\n &-text {\n margin: 0;\n }\n\n &-content {\n padding: 0 clamp(1em, 5vw, 1.5em);\n }\n\n &-buttons {\n background-color: main.$white;\n border-top: 0.0625em solid main.$gray200;\n padding: clamp(1em, 5vw, 1.5em) clamp(1em, 5vw, 1.5em) 0;\n display: flex;\n justify-content: flex-end;\n gap: 0.5em;\n [slot='buttons']:not(pn-button) {\n display: flex;\n justify-content: flex-end;\n gap: 0.5em;\n }\n &:empty {\n display: none;\n }\n }\n}\n\n@media (max-width: 30em) {\n pn-modal .pn-modal {\n width: 100%;\n max-height: 95vh;\n margin-bottom: 0;\n bottom: 0;\n transform: translate(0%, 20%);\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n","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"],"version":3}
|
|
1
|
+
{"file":"pn-modal.js","mappings":";;;;;;;;;;;AAAO,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE;QACX,EAAE,EAAE,cAAc;QAClB,EAAE,EAAE,mBAAmB;QACvB,EAAE,EAAE,gBAAgB;QACpB,EAAE,EAAE,qBAAqB;QACzB,EAAE,EAAE,mBAAmB;KACxB;CACF;;ACRD,MAAM,UAAU,GAAG,soKAAsoK,CAAC;AAC1pK,sBAAe,UAAU;;MCiCZA,SAAO;;;;;;;yBAcY,KAAK;yBACL,KAAK;8BAGA,KAAK;;;wBAOP,IAAI;oBAGoB,KAAK;0BAE/B,KAAK;yBAEN,KAAK;6BAKD,KAAK;qBAGb,KAAK;wBAEH,IAAI;;IAzCxB,EAAE,CAAmB;IAEZ,yBAAyB,GAAG,GAAG,CAAC;IACzC,iBAAiB,GAAW,IAAI,CAAC,yBAAyB,CAAC;IAE3D,YAAY,CAAiB;IAE7B,YAAY,CAAoB;IAChC,cAAc,CAAiB;IAC/B,YAAY,CAAqB;;IAmCzC,UAAU;QACR,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,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U,IAAI,0DAAG,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,UAAU,CAAK,EAElE,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB,EACT,gEAAS,KAAK,EAAC,kBAAkB,IAC/B,8DAAa,CACL,EACV,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACC,CACJ,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PnModal","closeIcon"],"sources":["src/components/feedback/pn-modal/translation.ts","src/components/feedback/pn-modal/pn-modal.scss?tag=pn-modal","src/components/feedback/pn-modal/pn-modal.tsx"],"sourcesContent":["export const translations = {\n CLOSE_MODAL: {\n en: 'Close dialog',\n sv: 'Stäng dialogrutan',\n da: 'Luk dialogboks',\n fi: 'Sulje valintaikkuna',\n no: 'Lukk dialogboksen',\n },\n};\n\nexport type PnTranslations = keyof typeof translations;\n","@use 'sass:string';\n@use 'src/globals/main';\n\npn-modal .pn-modal {\n --pn-modal-max-width: 45em;\n\n z-index: 10000;\n position: fixed;\n top: 0;\n\n inset-block-start: 0;\n inset-block-end: 0;\n\n margin: auto;\n padding: 0;\n\n max-width: var(--pn-modal-max-width);\n\n overflow: hidden;\n border: 0;\n border-radius: 1.5em;\n\n box-shadow:\n 0 0.25em 0.875em rgba(0, 0, 0, 0.18),\n 0 1.625em 3.5em rgba(0, 0, 0, 0.22);\n background-color: main.$white;\n\n display: none;\n opacity: 0;\n transform: translate(0%, 20%);\n\n @include main.pn-focus(main.$white);\n\n @include main.pn-transition(\n 'opacity, overlay, display, transform, outline-color, border-radius',\n main.$timing-layout\n );\n transition-behavior: allow-discrete;\n\n &[data-allow-overflow] {\n overflow: unset;\n .pn-modal-container {\n overflow: unset;\n }\n .pn-modal-picture {\n border-top-right-radius: 1.5em;\n }\n }\n\n &[data-image] {\n padding-top: 0;\n }\n\n &[data-sheet] {\n margin: 0 0 0 auto;\n height: 100%;\n max-height: unset;\n border-radius: 1.5em 0 0 1.5em;\n transform: translate(20%, 0%);\n .pn-modal-container {\n max-height: unset;\n }\n }\n\n &[open] {\n display: flex;\n opacity: 1;\n transform: translate(0%, 0%);\n\n @starting-style {\n display: flex;\n opacity: 0;\n transform: translate(0%, 20%);\n }\n\n &[data-sheet] {\n transform: translate(0%, 0%);\n @starting-style {\n transform: translate(20%, 0%);\n }\n }\n }\n\n &::backdrop {\n background-color: rgba(main.$black, 0);\n\n @include main.pn-transition('opacity, background-color, overlay, display', main.$timing-layout);\n transition-behavior: allow-discrete;\n }\n\n &[open]::backdrop {\n background-color: rgba(main.$black, 0.55);\n @starting-style {\n background-color: rgba(main.$black, 0);\n }\n }\n\n &-container {\n max-height: 85vh;\n\n display: flex;\n flex-direction: column;\n align-items: stretch;\n\n height: 100%;\n overflow: hidden auto;\n @include main.pn-scrollbar;\n }\n\n &-close-button {\n position: absolute;\n z-index: 10;\n right: 0.75em;\n top: 0.75em;\n }\n\n &-header {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n padding: clamp(1em, 5vw, 1.5em);\n &[hidden] {\n display: none;\n }\n &:not([hidden]) + .pn-modal-content:not([hidden]) {\n padding-top: 0;\n }\n }\n\n &-label {\n line-height: 1.5;\n padding-right: 1.5em;\n margin: 0;\n }\n\n &-text {\n margin: 0;\n }\n\n &-content {\n padding: clamp(1em, 5vw, 1.5em);\n }\n\n &-image {\n position: relative;\n display: flex;\n flex-direction: column;\n &[hidden] {\n display: none;\n }\n }\n\n &-picture {\n margin: 0;\n padding: 0;\n display: block;\n overflow: hidden;\n border-radius: 1.5em 0 0 0;\n > *[slot='image'] {\n display: block;\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n }\n\n &-buttons {\n background-color: main.$white;\n border-top: 0.0625em solid main.$gray200;\n padding: clamp(1em, 5vw, 1.5em);\n display: flex;\n justify-content: flex-end;\n gap: 0.5em;\n border-radius: 0 0 1.5em 1.5em;\n\n > [slot='buttons']:not(pn-button) {\n display: flex;\n justify-content: flex-end;\n gap: 0.5em;\n > [data-left] {\n margin-right: auto;\n }\n }\n\n > [data-left] {\n margin-right: auto;\n }\n\n &:empty {\n display: none;\n }\n }\n}\n\n@media (max-width: 55em) {\n pn-modal .pn-modal {\n max-height: 95vh;\n margin-bottom: 0;\n bottom: 0;\n transform: translate(0%, 20%);\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n","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"],"version":3}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
6
|
import { a as alert_exclamation_circle } from './alert_exclamation_circle.js';
|
|
7
|
-
import {
|
|
7
|
+
import { c as chevron_down } from './chevron_down.js';
|
|
8
8
|
import { c as close } from './close.js';
|
|
9
9
|
import { u as uuidv4, k as awaitTopbar, r as reduceMotion, o as ripple, j as getTotalHeightOffset, e as en } from './helpers.js';
|
|
10
10
|
import { d as defineCustomElement$2 } from './pn-icon2.js';
|
|
@@ -631,7 +631,7 @@ const PnMultiselect$1 = /*@__PURE__*/ proxyCustomElement(class PnMultiselect ext
|
|
|
631
631
|
return (h("ul", { id: this.idChips, class: "pn-multiselect-chips", "aria-label": this.translate('SELECTED_OPTIONS'), ref: el => (this.elChips = el) }, this.optionsCheckedPreview()?.map(({ label, value }, index) => (h("li", { class: "pn-multiselect-chip", "aria-setsize": this.optionsCheckedTotal(), "aria-posinset": index + 1, key: `${label}-${value}` }, h("span", { class: "pn-multiselect-chip-label" }, label), h("button", { type: "button", class: "pn-multiselect-chip-button", "aria-label": `${this.translate('REMOVE')} ${label}`, onClick: () => this.optionSelect({ val: value, checked: false, chip: index }) }, h("pn-icon", { icon: close, small: true, color: "blue700" }))))), this.optionsCheckedTotal() > this.itemCount && (h("li", { class: "pn-multiselect-chip", "data-count": true }, h("span", { class: "pn-multiselect-chip-label" }, "+ ", this.additonalOptions())))));
|
|
632
632
|
}
|
|
633
633
|
render() {
|
|
634
|
-
return (h(Host, { key: '
|
|
634
|
+
return (h(Host, { key: '8dcab6f8526d10167d647733ebeba91c6cc4a891' }, h("fieldset", { key: 'b60a7513bb1481686d0353911fe946a8a0534416', class: "pn-multiselect", "data-icon": !!this.icon, "data-error": this.hasError(), disabled: this.disabled }, this.label && (h("legend", { key: '51f1dc3597171f431ec55d6960f5c22a1af86ea0', id: this.idLegend, class: "pn-multiselect-label", onClick: () => this.handleLabel() }, h("span", { key: '95c5a289c2489059fb076ed82fa40b57965b40fa' }, this.label), !!this.optionsChecked()?.length && (h("span", { key: 'bb1a5f52c8b05612c31325e9237292ad6cdd83ac' }, this.optionsCheckedTotal(), "/", this.optionsTotal())))), h("div", { key: '05bcb2bc08fe7495db84681072c83cef9aa1c00e', class: "pn-multiselect-group", ref: el => (this.elGroup = el) }, h("div", { key: '7da7473b15c01f1233dc0441571495743c7e8c91', class: "pn-multiselect-input" }, !!this.icon && h("pn-icon", { key: '2ac559c573d8fd0f1e6f39b94c7ba54e8f82530b', class: "pn-multiselect-icon", "data-custom": true, icon: this.icon }), h("input", { key: '0839cb250ceab31a45d643c89451cedb02d9e7bb', tabindex: this.search ? null : '-1', type: this.search ? 'search' : 'input', id: this.selectId, class: "pn-multiselect-element", value: this.search ? this.searchQuery : this.optionsCheckedLabels(), name: this.selectName, placeholder: this.getPlaceholder(), required: this.search ? null : this.required, "aria-labelledby": this.idLegend, "aria-describedby": this.describedBy(), "aria-controls": `${this.idOptions} ${this.search ? this.idChips : ''}`, "aria-invalid": this.hasError()?.toString(), disabled: this.disabled, readonly: !this.search, onClick: () => (this.search && this.open ? null : this.toggleOpen()), onKeyDown: e => this.handleInputKeyboard(e), onBlur: e => this.handleBlur(e), onInput: e => this.search && this.setSearchQuery(e.target.value), ref: el => (this.elInput = el) }), this.hasError() && (h("pn-icon", { key: 'bbe2ed7c5f861b6972ea3937c1aad7fa53269878', class: "pn-multiselect-icon", "data-error": true, icon: alert_exclamation_circle, color: "warning" })), h("button", { key: '4e2871a96160b3416dce289c8716665a04113b44', id: this.idButton, type: "button", class: "pn-multiselect-button", "aria-label": this.translate(`BUTTON_${this.open ? 'CLOSE' : 'OPEN'}`), "aria-describedby": this.search ? null : this.selectId, "aria-controls": this.idOptions, "aria-expanded": this.open.toString(), onClick: () => this.toggleOpen(), ref: el => (this.elButton = el) }, h("pn-icon", { key: '71c79e52bcca84ae16b225dc6c58332b95788234', class: "pn-multiselect-icon", icon: chevron_down, color: "blue700" }))), this.renderOptions()), this.hasMessage() && (h("p", { key: 'a27a65d1fba955a5b1bab1c7b79c5e78b5c0040a', id: this.idHelper, class: "pn-multiselect-description", role: !!this.error ? 'alert' : null }, h("span", { key: 'c00904641ae7ba9a9fb482fbf215d6a7f2643872' }, this.error || this.helpertext))), this.search && this.renderChips(), h("slot", { key: '02c6ced4675438a0b29505a2c20948b1345ec1e0' }), this.search && (h("p", { key: 'c8ce14a5d9d28e235de857c2264bed4f5507e389', id: this.idSr, class: "pn-multiselect-sr-only", role: "alert", "aria-live": "assertive" }, this.srMessage && h("span", { key: 'a365ee9816a1e3e732649857c4cf73c0470a85bf' }, this.srMessage))))));
|
|
635
635
|
}
|
|
636
636
|
static get watchers() { return {
|
|
637
637
|
"open": ["handleOpen"],
|