@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
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postnord/web-components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.0",
|
|
4
4
|
"description": "PostNord Web Components",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"registry": "https://registry.npmjs.org/"
|
|
7
|
-
},
|
|
8
5
|
"main": "index.cjs.js",
|
|
9
6
|
"module": "components/index.js",
|
|
10
7
|
"es2017": "esm/index.js",
|
|
@@ -12,6 +9,10 @@
|
|
|
12
9
|
"collection": "collection/collection-manifest.json",
|
|
13
10
|
"collection:main": "collection/index.js",
|
|
14
11
|
"unpkg": "postnord-web-components/postnord-web-components.esm.js",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/postnord-group/web-components.git"
|
|
15
|
+
},
|
|
15
16
|
"scripts": {
|
|
16
17
|
"start": "wireit",
|
|
17
18
|
"build": "wireit",
|
|
@@ -27,25 +28,26 @@
|
|
|
27
28
|
"@babel/core": "^7.27.7",
|
|
28
29
|
"@cyclonedx/bom": "^3.10.6",
|
|
29
30
|
"@stencil/sass": "3.2.1",
|
|
30
|
-
"@storybook/addon-a11y": "^9.
|
|
31
|
-
"@storybook/addon-designs": "^10.0.
|
|
32
|
-
"@storybook/
|
|
33
|
-
"@storybook/
|
|
34
|
-
"@storybook/
|
|
31
|
+
"@storybook/addon-a11y": "^9.1.8",
|
|
32
|
+
"@storybook/addon-designs": "^10.0.2",
|
|
33
|
+
"@storybook/addon-docs": "^9.1.8",
|
|
34
|
+
"@storybook/builder-vite": "^9.1.8",
|
|
35
|
+
"@storybook/cli": "^9.1.8",
|
|
36
|
+
"@storybook/web-components-vite": "^9.1.8",
|
|
35
37
|
"api-now": "^0.5.4",
|
|
36
38
|
"dayjs": "1.11.13",
|
|
37
|
-
"
|
|
39
|
+
"osls": "^3.54.0",
|
|
38
40
|
"plop": "^4.0.1",
|
|
39
|
-
"pn-design-assets": "
|
|
41
|
+
"pn-design-assets": "3.0.0",
|
|
40
42
|
"prettier": "3.6.2",
|
|
41
43
|
"sass": "^1.89.2",
|
|
42
|
-
"
|
|
44
|
+
"serverless-plugin-scripts": "^1.0.2",
|
|
45
|
+
"storybook": "^9.1.8",
|
|
43
46
|
"typescript": "^5.8.3",
|
|
44
47
|
"uuid": "^11.1.0",
|
|
45
48
|
"vite": "^6.3.5",
|
|
46
49
|
"vite-tsconfig-paths": "^5.1.4",
|
|
47
|
-
"wireit": "^0.14.12"
|
|
48
|
-
"@storybook/addon-docs": "^9.0.13"
|
|
50
|
+
"wireit": "^0.14.12"
|
|
49
51
|
},
|
|
50
52
|
"license": "MIT",
|
|
51
53
|
"type": "module",
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import{r as s,c as t,g as e,h as i,a}from"./p-43660913.js";import{u as h,k as r,s as n}from"./p-f64d17a6.js";const o={CLOSEST_DELIVERY_DATE:{en:"Closest delivery date:",sv:"Nästa utdelningsdag:"},NEXT_DELIVERY_DATE:{en:"Next delivery date:",sv:"Kommande utdelningsdag:"},ZIP_CODE:{en:"Zip code:",sv:"Postnummer:"},VALIDATION_ERROR_MESSAGE:{en:"Zip code not valid",sv:"Postnumret är inte giltigt"},SERVER_ERROR_MESSAGE:{en:"Could not find zip code",sv:"Kan inte hitta postnumret"},PLACEHOLDER_TEXT:{en:"Search for a zip code",sv:"Sök på ett postnummer"},SEARCH:{en:"Search",sv:"Sök"}};const
|
|
6
|
-
//# sourceMappingURL=p-
|
|
5
|
+
import{r as s,c as t,g as e,h as i,a}from"./p-43660913.js";import{u as h,k as r,s as n}from"./p-f64d17a6.js";const o={CLOSEST_DELIVERY_DATE:{en:"Closest delivery date:",sv:"Nästa utdelningsdag:"},NEXT_DELIVERY_DATE:{en:"Next delivery date:",sv:"Kommande utdelningsdag:"},ZIP_CODE:{en:"Zip code:",sv:"Postnummer:"},VALIDATION_ERROR_MESSAGE:{en:"Zip code not valid",sv:"Postnumret är inte giltigt"},SERVER_ERROR_MESSAGE:{en:"Could not find zip code",sv:"Kan inte hitta postnumret"},PLACEHOLDER_TEXT:{en:"Search for a zip code",sv:"Sök på ett postnummer"},SEARCH:{en:"Search",sv:"Sök"}};const c="pn-zipcode-search{display:block;color:#5e554a}pn-zipcode-search .pn-search-results{display:flex;flex-direction:column;gap:1em;padding:0 0.75em}pn-zipcode-search .pn-search-results span{color:#5e554a}pn-zipcode-search .pn-search-results h3{color:#2d2013}pn-zipcode-search .pn-error-text{color:#a70707;padding:0 0.75em}pn-zipcode-search>pn-search-field{width:100%;margin-bottom:1em}";const l=c;const d=class{constructor(e){s(this,e);this.searchsuccessful=t(this,"searchsuccessful",7);this.validZipCode=undefined;this.loading=false;this.showResult=false;this.zipCodeSearchResult={delivery:"",upcoming:"",city:"",postalCode:""};this.error=false;this.errorMessage=undefined;this.language=null;this.value=undefined}searchId=`pn-zipcode-${h()}`;get hostElement(){return e(this)}searchsuccessful;async componentWillLoad(){if(this.language===null)await r(this.hostElement);if(!!this.value)this.handleSearch(this.value)}translation(s){return o[s][this.language||n]}handleSearch(s){this.value=s;this.validateZipCode();if(this.error){this.errorMessage="VALIDATION_ERROR_MESSAGE";return}this.zipCodeSearch()}async zipCodeSearch(){this.loading=true;await fetch(`https://portal.postnord.com/api/sendoutarrival/closest?postalCode=${this.validZipCode}`).then((s=>s.json())).then((s=>{this.showResult=true;this.zipCodeSearchResult=s;this.searchsuccessful.emit(true)})).catch((()=>{this.error=true;this.errorMessage="SERVER_ERROR_MESSAGE";this.searchsuccessful.emit(false)})).finally((()=>{this.loading=false}))}validateZipCode(){const s=this.value?this.value.replace(/[ -]/gi,""):"";const t=/^\d{5}$/;const e=t.test(s);this.error=!e;if(e){this.validZipCode=s}}renderSearchResult(){if(!this.loading&&!this.error&&this.showResult){return i("output",{class:"pn-search-results",htmlFor:this.searchId},i("p",{class:"text-row"},i("span",null,this.translation("CLOSEST_DELIVERY_DATE")),i("h3",{class:"delivery-date"},this.zipCodeSearchResult.delivery)),i("p",{class:"text-row"},i("span",null,this.translation("NEXT_DELIVERY_DATE")),i("h3",{class:"delivery-date"},this.zipCodeSearchResult.upcoming)),i("p",{class:"text-row"},i("span",null,this.translation("ZIP_CODE")),i("h3",null,this.zipCodeSearchResult.postalCode,", ",this.zipCodeSearchResult.city||"N/A")))}}renderErrorMessage(){if(this.error&&!this.loading){return i("p",{class:"pn-error-text",role:"alert"},i("small",null,this.translation(this.errorMessage)))}}render(){return i(a,{key:"cc6f1ccb014330d11b8b75fa09e2f39da079a7f4"},i("pn-search-field",{key:"60bbf5751e937c820afbf997a3f51ba9ac85d762",label:this.translation("PLACEHOLDER_TEXT"),value:this.value,searchid:this.searchId,loading:this.loading,button:"icon",buttonLabel:this.translation("SEARCH"),placeholder:this.translation("PLACEHOLDER_TEXT"),onSearch:s=>this.handleSearch(s.detail)}),this.renderSearchResult(),this.renderErrorMessage())}};d.style=l;export{d as pn_zipcode_search};
|
|
6
|
+
//# sourceMappingURL=p-01472170.entry.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as e,g as i,h as n,a as o}from"./p-43660913.js";import{a as l}from"./p-9a18b612.js";import{a as s}from"./p-bf967b50.js";import{c}from"./p-92b0338a.js";import{u as r,k as a,r as p,o as u,j as d,e as h}from"./p-f64d17a6.js";const m={SELECT_AN_OPTION:{en:"Select an option",sv:"Välj ett alternativ",da:"Vælg en mulighed",fi:"Valitse vaihtoehto",no:"Velg et alternativ"},SELECT_ALL_OPTIONS:{en:"Select all options",sv:"Välj alla alternativ",da:"Vælg alle muligheder",fi:"Valitse kaikki vaihtoehdot",no:"Velg alle alternativer"},SELECT_FOUND_OPTIONS:{en:"Select {number} options",sv:"Välj {number} alternativ",da:"Vælg {number} muligheder",fi:"Valitse {number} vaihtoehtoa",no:"Velg {number} alternativer"},SELECTED_OPTIONS:{en:"Selected options.",sv:"Valda alternativ.",da:"Valgte muligheder.",fi:"Valitut vaihtoehdot.",no:"Valgte alternativer."},BUTTON_OPEN:{en:"Open list",sv:"Öppna listan",da:"Open list",fi:"Open list",no:"Open list"},BUTTON_CLOSE:{en:"Close list",sv:"Stäng listan",da:"Close list",fi:"Close list",no:"Close list"},REMOVE:{en:"Remove",sv:"Ta bort",da:"Remove",fi:"Remove",no:"Remove"},REMOVED:{en:"Removed",sv:"Tog bort",da:"Fjernet",fi:"Poistettu",no:"Fjernet"},MORE_OPTION:{en:"more option.",sv:"alternativ till.",da:"mulighed mere.",fi:"vaihtoehto lisää.",no:"alternativ til."},MORE_OPTIONS:{en:"more options.",sv:"fler alternativ.",da:"more options.",fi:"more options.",no:"more options."},SEARCH:{en:"Search",sv:"Sök",da:"Søg",fi:"Hae",no:"Søk"},RESULTS_FOUND:{en:"options found",sv:"alternativ hittades",da:"muligheder fundet",fi:"vaihtoehtoja löytyi",no:"alternativer funnet"},NO_SEARCH_RESULTS:{en:"No options found",sv:"Inga alternativ hittades",da:"Ingen muligheder fundet",fi:"Vaihtoehtoja ei löytynyt",no:"Finner ingen alternativer"},NO_OPTIONS:{en:"No options available",sv:"Inga alternativ tillgängliga",da:"Ingen tilgængelige muligheder",fi:"Ei vaihtoehtoja",no:"Ingen tilgjengelige alternativer"}};const f="pn-multiselect{display:inline-block}pn-multiselect .pn-multiselect{border:0;margin:0;padding:0}pn-multiselect .pn-multiselect[data-icon] .pn-multiselect-element{padding-left:3em}pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element{padding-right:5.5em;border-color:#a70707}pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:hover{border-color:#500715}pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}pn-multiselect .pn-multiselect-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);width:100%}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-label{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-label>span{font-size:0.875em}pn-multiselect .pn-multiselect-sr-only{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}pn-multiselect .pn-multiselect-group{position:relative;padding:0;margin:0}pn-multiselect .pn-multiselect-input{position:relative}pn-multiselect .pn-multiselect-input>pn-icon{pointer-events:none;position:absolute;top:0.75em;right:3.5em}pn-multiselect .pn-multiselect-input>pn-icon[data-custom]{left:0.75em;right:unset}pn-multiselect .pn-multiselect-button{cursor:pointer;position:absolute;right:0.75em;top:50%;transform:translateY(-50%);padding:0;margin:0;border:0;width:2em;height:2em;font-size:1em;border-radius:50%;background-color:transparent;-webkit-tap-highlight-color:transparent;transition-property:background-color, outline-color, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);outline:0.2rem solid transparent;outline-offset:0.2rem}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-button{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-button:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}pn-multiselect .pn-multiselect-button>pn-icon>svg>path{transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);transition-delay:0.2s;transform-origin:center;transform:rotate(0deg)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-button>pn-icon>svg>path{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-button:hover{background-color:#effbff}pn-multiselect .pn-multiselect-button[aria-expanded=true]{background-color:#effbff}pn-multiselect .pn-multiselect-button[aria-expanded=true]>pn-icon>svg>path{transform:rotate(180deg);transition-delay:0s}pn-multiselect .pn-multiselect-element{color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);cursor:text;text-align:left;transition-delay:0.1s, 0.1s, 0s;width:100%;padding-right:3.5em;display:flex;align-items:center;justify-content:space-between;gap:0.5em;overflow:hidden;text-overflow:ellipsis}pn-multiselect .pn-multiselect-element:-webkit-autofill,pn-multiselect .pn-multiselect-element:-webkit-autofill:hover,pn-multiselect .pn-multiselect-element:-webkit-autofill:focus,pn-multiselect .pn-multiselect-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}pn-multiselect .pn-multiselect-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-element{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-element::placeholder{color:#5e554a;font-weight:normal}pn-multiselect .pn-multiselect-element:hover{border-color:#005d92}pn-multiselect .pn-multiselect-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}pn-multiselect .pn-multiselect-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2;pointer-events:none}pn-multiselect .pn-multiselect-element:disabled+.pn-multiselect-button{pointer-events:none}pn-multiselect .pn-multiselect-element:disabled+.pn-multiselect-button path{fill:#5e554a}pn-multiselect .pn-multiselect-element:placeholder{color:#5e554a;font-weight:normal}pn-multiselect .pn-multiselect-element[type=input]:hover{cursor:pointer;color:#2d2013;background-color:#effbff;transition-delay:0s}pn-multiselect .pn-multiselect-element[type=input]:hover[aria-invalid=true]{background-color:#fdefee}pn-multiselect .pn-multiselect-element:focus-visible{transition-delay:0s}pn-multiselect .pn-multiselect-element::-webkit-search-cancel-button,pn-multiselect .pn-multiselect-element::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}pn-multiselect .pn-multiselect-options{scroll-behavior:smooth;position:absolute;z-index:10;top:calc(100% + 0.5em);left:0;right:0;background-color:#ffffff;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);border-radius:0.5em;list-style:none;margin:0;padding:0;width:var(--pn-select-options-width);max-height:var(--pn-select-max-height);overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;visibility:hidden;transform-origin:top left}pn-multiselect .pn-multiselect-options[data-open]{visibility:visible}pn-multiselect .pn-multiselect-options[data-upwards]{top:unset;bottom:calc(100% + 0.5em);transform-origin:bottom left;box-shadow:0 -0.0625em 0.125em rgba(0, 0, 0, 0.2)}pn-multiselect .pn-multiselect-options[data-moving]{overflow:hidden;visibility:visible}pn-multiselect .pn-multiselect-options::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-thumb:hover{background-color:#5e554a}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-corner,pn-multiselect .pn-multiselect-options::-webkit-scrollbar-button{display:none}pn-multiselect .pn-multiselect-options>pn-input{padding:0.5em}pn-multiselect .pn-multiselect-optgroup{list-style:none;padding:0}pn-multiselect .pn-multiselect-optgroup>.pn-multiselect-option>.pn-multiselect-option-content{padding-left:2em}pn-multiselect .pn-multiselect-chips{list-style:none;display:flex;flex-wrap:wrap;gap:0.5em;padding:0;margin:0.5em 0 0 0;color:#5e554a;font-weight:400}pn-multiselect .pn-multiselect-chips:empty{display:none}pn-multiselect .pn-multiselect-chip{margin:0;display:inline-flex;align-items:center;gap:0.25em;background-color:#ffffff;border-radius:0.5em;padding:0.125em 0.25em 0.125em 0.5em;line-height:1.5em;border:0.0625em solid #5e554a;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-chip{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-chip:focus-within{color:#005d92;outline-color:#005d92;background-color:#effbff;border-color:#005d92}pn-multiselect .pn-multiselect-chip[data-count]{pointer-events:none;border:0;padding-left:0;padding-right:0;background-color:unset}pn-multiselect .pn-multiselect-chip-label{font-size:0.875em;white-space:nowrap}pn-multiselect .pn-multiselect-chip-button{cursor:pointer;font-size:1em;padding:0.25em;height:1.5em;width:1.5em;border:0;background-color:unset;border-radius:50%;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);-webkit-tap-highlight-color:transparent}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-chip-button{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-chip-button:hover{background-color:#8eddf9}pn-multiselect .pn-multiselect-chip-button:focus{outline:0}pn-multiselect .pn-multiselect-no-results{margin:0;padding:0.75em}pn-multiselect .pn-multiselect-description{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}pn-multiselect .pn-multiselect-description[role=alert]{color:#a70707}pn-multiselect .pn-multiselect-option{position:relative;margin:0;padding:0}pn-multiselect .pn-multiselect-option .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}pn-multiselect .pn-multiselect-option-input{cursor:pointer;position:absolute;opacity:0;left:0;top:0;height:100%;width:100%;margin:0;-webkit-tap-highlight-color:transparent}pn-multiselect .pn-multiselect-option-input:disabled{pointer-events:none}pn-multiselect .pn-multiselect-option-input:disabled+.pn-multiselect-option-content{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2;pointer-events:none}pn-multiselect .pn-multiselect-option-input:disabled+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#f3f2f2;border-color:#969087}pn-multiselect .pn-multiselect-option-input:disabled+.pn-multiselect-option-content path{fill:#5e554a}pn-multiselect .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}pn-multiselect .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#969087;border-color:#969087}pn-multiselect .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content path{fill:#5e554a}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]+.pn-multiselect-option-content .pn-ripple{background-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked+.pn-multiselect-option-content{background-color:#fdefee}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#a70707;border-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:focus-visible+.pn-multiselect-option-content{background-color:#fdefee}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#500715;border-color:#500715}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:hover+.pn-multiselect-option-content{background-color:#fef7f6}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#500715;border-color:#500715}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:hover+.pn-multiselect-option-content{background-color:#fef7f6}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#fdefee;border-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{outline-color:#a70707;background-color:#fdefee;border-color:#a70707}pn-multiselect .pn-multiselect-option-input:hover+.pn-multiselect-option-content{background-color:#effbff}pn-multiselect .pn-multiselect-option-input:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#005d92;background-color:#e0f8ff}pn-multiselect .pn-multiselect-option-input:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{outline-color:#005d92;background-color:#e0f8ff;border-color:#005d92}pn-multiselect .pn-multiselect-option-input:checked+.pn-multiselect-option-content{background-color:#e0f8ff}pn-multiselect .pn-multiselect-option-input:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#005d92;background-color:#005d92}pn-multiselect .pn-multiselect-option-input:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-checkmark-path{transition-delay:0.2s;stroke-dashoffset:0}pn-multiselect .pn-multiselect-option-input:checked:hover+.pn-multiselect-option-content{background-color:#effbff}pn-multiselect .pn-multiselect-option-input:checked:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#0d234b;background-color:#0d234b}pn-multiselect .pn-multiselect-option-input:checked:focus-visible+.pn-multiselect-option-content{background-color:#e0f8ff}pn-multiselect .pn-multiselect-option-input:checked:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#0d234b;background-color:#0d234b}pn-multiselect .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#005d92;border-color:#005d92}pn-multiselect .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content svg .pn-multiselect-option-checkbox-checkmark-path{stroke-dashoffset:23}pn-multiselect .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content svg .pn-multiselect-option-checkbox-indeterminate-path{stroke-dashoffset:0}pn-multiselect .pn-multiselect-option-input:indeterminate:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#0d234b;border-color:#0d234b}pn-multiselect .pn-multiselect-option-content{position:relative;overflow:hidden;z-index:-1;display:flex;align-items:center;padding:0.75em 1em;gap:0.5em;background-color:#ffffff;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-option-content{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-option-text{flex:1;text-overflow:ellipsis;overflow:hidden}pn-multiselect .pn-multiselect-option-label{color:#2d2013;font-weight:400}pn-multiselect .pn-multiselect-option-helper{color:#5e554a;margin:0}pn-multiselect .pn-multiselect-option-checkbox{background-color:#ffffff;flex:0 0 1.5em;width:1.5em;height:1.5em;border:0.0625em solid #969087;border-radius:0.25em;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, border-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-option-checkbox{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-option-checkbox svg polyline{stroke:#ffffff;stroke-linecap:round;stroke-dasharray:23;transition-property:stroke-dashoffset;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);transition-delay:0s}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-option-checkbox svg polyline{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-checkmark-path{stroke-dashoffset:23}pn-multiselect .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-indeterminate-path{stroke-dashoffset:23}";const b=f;const g=class{constructor(i){t(this,i);this.toggleSelect=e(this,"toggleSelect",7);this.allOptions=e(this,"allOptions",7);this.selectedOption=e(this,"selectedOption",7);this.selectedAllOptions=e(this,"selectedAllOptions",7);this.searchInput=e(this,"searchInput",7);this.isSearching=false;this.open=false;this.upwards=false;this.srMessage=undefined;this.isClosing=false;this.isExpanding=false;this.label=undefined;this.helpertext=undefined;this.placeholder=undefined;this.name=undefined;this.selectId=this.id;this.selectName=undefined;this.icon=undefined;this.language=null;this.options=undefined;this.selectAll=false;this.allValue="pn_multiselect_all";this.search=false;this.searchQuery="";this.itemCount=5;this.maxHeight=undefined;this.top=false;this.bottom=false;this.required=false;this.disabled=false;this.invalid=false;this.error=undefined}id=`pn-multiselect-${r()}`;idLegend=`${this.id}-legend`;idButton=`${this.id}-button`;idOptions=`${this.id}-options`;idHelper=`${this.id}-text`;idChips=`${this.id}-chips`;idSr=`${this.id}-sr`;elGroup;elButton;elInput;elList;elChips;srTimer;animation;animationDurationDefault=400;animationDuration=this.animationDurationDefault;get hostElement(){return i(this)}handleOpen(){if(this.open){this.addGlobalEventListeners();this.handleDirection();this.handleMaxHeight();this.handleWidth();requestAnimationFrame((()=>this.openGrid()))}else{this.closeGrid();this.removeGlobalEventListeners()}}handleSearch(){if(!this.search)this.options=[...this.options.map((t=>{const e={...t,hide:false};if(e?.group?.length)e.group.map((t=>({...t,hide:false})));return e}))]}handleSearchQuery(){if(this.search&&typeof this.searchQuery==="string")this.handleInputSearch()}handleSelectId(){const t=this.selectId;this.idLegend=`${t}-legend`;this.idButton=`${t}-button`;this.idOptions=`${t}-options`;this.idHelper=`${t}-text`;this.idChips=`${t}-chips`;this.idSr=`${t}-sr`}handleResize(){if(!this.open)return;this.toggleOpen(false);this.elList.style.removeProperty("--pn-select-options-width");this.elList.style.removeProperty("--pn-select-max-height")}toggleSelect;allOptions;selectedOption;selectedAllOptions;searchInput;async componentWillLoad(){this.handleSelectId();if(this.language===null)await a(this.hostElement)}componentDidLoad(){if(!!this.searchQuery?.length)this.handleSearchQuery()}globalEvents=t=>{const e=t.target;const i=e?.closest(this.hostElement.localName);if(!i)this.toggleOpen(false)};addGlobalEventListeners(){const t=this.hostElement.getRootNode();t.addEventListener("click",this.globalEvents)}removeGlobalEventListeners(){const t=this.hostElement.getRootNode();t.removeEventListener("click",this.globalEvents)}openGrid(){requestAnimationFrame((()=>{const{clientHeight:t,scrollHeight:e}=this.elList;const i=this.isClosing?t:0;this.elList.style.height=`${e}px`;this.isExpanding=true;this.animateGrid(true,`${i}px`,this.maxHeight||`${this.elList.scrollHeight}px`)}))}closeGrid(){const{scrollHeight:t,clientHeight:e}=this.elList;const i=this.isExpanding?e:t;this.elList.style.height=`0px`;this.isClosing=true;this.animateGrid(false,`${i}px`,`0px`)}animateGrid(t,e,i){this.cancelAnimations();if(p())this.animationDuration=0;else this.animationDuration=this.animationDurationDefault;this.animation=this.elList.animate({height:[e,i]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"});this.animation.onfinish=()=>this.animationFinish();this.animation.oncancel=()=>t?this.isExpanding=false:this.isClosing=false}animationFinish(){this.cancelAnimations();this.elList.style.height=this.isClosing?"0px":"";this.isClosing=false;this.isExpanding=false}cancelAnimations(){if(this.animation)this.animation.cancel()}emitEvents(t,e){this.allOptions.emit(this.options);if(t)return this.selectedOption.emit(t);const i={checked:e,searching:this.isSearching};if(this.search&&this.optionsTotal()!==this.optionsSearch().length){i.query=this.searchQuery;i.found=this.optionsSearch()}this.selectedAllOptions.emit(i)}optionsChecked(){const t=this.options?.reduce(((t,e)=>{const i=e.group?[...e.group.filter((({checked:t})=>t))]:[];if(e.checked)t.push(e);if(i?.length)t.push(...i);return t}),[]);return t}optionsTotal(){return this.options?.reduce(((t,e)=>t+(e?.group?.length?e.group.length+1:1)),0)}optionsIndex(t){const e=({group:e=[]})=>e?.findIndex((({value:e})=>e===t));const i=this.options.findIndex((i=>i.value===t||e(i)!==-1));const n=e(this.options?.[i]);return{indexGroup:i,indexNested:n}}optionsCheckedTotal(){return this.optionsChecked()?.length}optionsCheckedPreview(){return this.optionsChecked()?.slice(0,this.itemCount)}optionsCheckedLabels(){return this.optionsChecked()?.map((({label:t})=>t))?.join(", ")}optionsSearch(){const t=this.options?.reduce(((t,e)=>{const i=e.group?[...e.group.filter((({hide:t})=>!t))]:[];if(!e.hide)t.push(e);if(i?.length)t.push(...i);return t}),[]);return t}noResults(){return this.optionsSearch()?.length===0}isIndeterminate(t){const e=this.options?.[t];if(e?.group?.length){const t=e.group.every((({checked:t})=>t));const i=e.group.every((({checked:t})=>!t));return!(t||i)}return false}optionSelect({val:t,checked:e,chip:i}){if(t===this.allValue)return this.optionSelectAll(e);const n=this.options;const{indexGroup:o,indexNested:l}=this.optionsIndex(t);const s=n[o]?.group;const c=s?.[l];if(c?.value){n[o].group[l].checked=e;const t=s?.every((({checked:t})=>t));if(t)n[o].checked=true;else n[o].checked=false}else{n[o].checked=e;if(s?.length)n[o].group=s?.map((t=>({...t,checked:e})))}const r=l===-1?n[o]:n[o].group[l];this.emitEvents(r);this.options=[...n];if(typeof i==="number"){this.handleSrMesssage(`${this.translate("REMOVED")} ${r.label}`);requestAnimationFrame((()=>{const t=i===this.optionsCheckedTotal()?i-1:i;const e=Array.from(this.elChips.children)?.[t];e?.querySelector("button").focus({preventScroll:true})}))}}optionSelectAll(t){this.options=[...this.options.map((e=>{const i={...e,checked:this.isSearching?e.hide?e.checked:t:t};if(i.group)i.group=[...i.group.map((e=>({...e,checked:this.isSearching?e.hide?e.checked:t:t})))];const n=i?.group?.every((({checked:t})=>t));if(i?.group?.length)i.checked=n;return i}))];this.emitEvents(null,t)}optionSelected(t){return!!this.optionsChecked()?.find((({value:e,checked:i})=>e===t&&i))}translate(t){const e=m?.[t]?.[this.language||h];if(e.includes("{number}"))return e.replace("{number}",this.optionsSearch().length);return e}getRect(t){return t?.getBoundingClientRect()}ripple({clientX:t,clientY:e,target:i}){const n=t===0&&e===0;const o=i.nextElementSibling;const{x:l,width:s,y:c,top:r}=this.getRect(o);const a=n?{clientX:l+s-24,clientY:c-r}:{clientX:t,clientY:e};u(a,o)}handleSrMesssage(t){this.srMessage=t;clearTimeout(this.srTimer);this.srTimer=setTimeout((()=>this.srMessage=null),2e3)}handleDirection(){if(this.top)return this.upwards=true;if(this.bottom)return this.upwards=false;const{bottom:t,top:e}=this.getRect(this.elInput);const i=16;const n=window.innerHeight-t-i;const o=e-i;this.upwards=o/2>n}handleMaxHeight(){if(this.maxHeight)return this.elGroup.style.setProperty("--pn-select-max-height",this.maxHeight);const{bottom:t,top:e}=this.getRect(this.elInput);const i=this.upwards?e:t;const n=d();const o=this.upwards?n+16:16;const l=this.upwards?i-o:window.innerHeight-i-o;this.elGroup.style.setProperty("--pn-select-max-height",`${Math.ceil(l)}px`)}handleWidth(){const{width:t}=this.getRect(this.elInput);this.elGroup.style.setProperty("--pn-select-options-width",`${Math.ceil(t)}px`)}setFocus(){if(this.search)this.elInput.focus({preventScroll:true});else this.elButton.focus({preventScroll:true})}hasError(){return this.invalid||!!this.error}hasMessage(){return!!this.helpertext||!!this.error}toggleOpen(t){if(typeof t==="boolean"&&t===this.open)return;this.open=t??!this.open;this.toggleSelect.emit({open:this.open})}handleInputKeyboard(t){t.stopImmediatePropagation();const{code:e}=t;if(e==="Escape")return this.toggleOpen(false);if(!this.open&&e.match(/^(Space|Enter)$|Arrow|^Key.*$/))this.toggleOpen()}setSearchQuery(t){if(!this.open)this.toggleOpen(true);this.searchQuery=t}handleInputSearch(){if(this.isEmpty())return;const t=this.searchQuery;const e=({label:e,helpertext:i,value:n})=>`${e} ${i} ${n}`.trim().toLowerCase().includes(t.toLowerCase());const i=this.options.map((t=>{const i=t?.group?.map((t=>({...t,hide:!e(t)})))||[];const n=e(t)||i?.some((({hide:t})=>!t));t.hide=!n;if(t?.group?.length)t.group=[...i];return t}));this.isSearching=t!=="";this.options=[...i];this.searchInput.emit({query:t,found:this.optionsSearch()})}getListItem(t){const{value:e}=this.options[t];return this.elList.querySelector(`.pn-multiselect-option-input[value='${e}']`)}getOptionIndex(t,e,i){const n=this.optionsTotal()-1;if(i==="End")return n;if(i==="Home")return 0;const o=this.options.findIndex((({value:e})=>e===t));const l=e.find((t=>typeof t==="number"));const s=o+l;if(s>=n)return n;if(s<=0)return 0;return s}checkboxNav(t,e){const{code:i}=t;const n=i==="ArrowUp"&&-1;const o=i==="ArrowDown"&&1;const l=i==="PageUp"&&-10;const s=i==="PageDown"&&10;const c=i==="Home"&&0;const r=i==="End"&&this.optionsTotal()-1;const a=i==="Tab";const p=i==="Space";const u=i==="Enter";const d=i==="Escape";const h=[n,o,l,s,c,r,a,p,u,d];if(!h.some((t=>typeof t==="number"||t)))return;if(a||p||u)return;t.stopImmediatePropagation();t.preventDefault();if(d){this.setFocus();return this.toggleOpen(false)}const m=this.getOptionIndex(e,h,i);return this.getListItem(m)?.focus()}handleBlur(t){const e=t.target;const i=t.relatedTarget;const n=(i||e)?.className==="pn-multiselect-chip-button";if(n)this.toggleOpen(false)}handleLabel(){if(this.disabled)return;this.setFocus()}isEmpty(){return(this.options?.length||0)===0}showSelectAll(){return this.selectAll&&!this.isEmpty()&&!this.noResults()}showEmptyOption(){return this.isSearching&&this.noResults()||this.isEmpty()}getPlaceholder(){const t=this.search?"SEARCH":"SELECT_AN_OPTION";return this.placeholder||this.translate(t)}handleChange({target:t}){const{value:e,checked:i}=t;this.optionSelect({val:e,checked:i})}additonalOptions(){const t=this.optionsCheckedTotal()-this.itemCount;const e=`MORE_OPTION${t===1?"":"S"}`;return`${t} ${this.translate(e)}`}describedBy(){const t=[this.search&&this.idChips,this.srMessage&&this.idSr,!!this.helpertext&&this.idHelper].filter(Boolean);if(t.length)return t.join(" ");return null}renderOption({label:t,value:e,checked:i,helpertext:o,icon:l,id:s=`${this.selectId}-${e||t}`,invalid:c,disabled:r,hide:a,group:p},u,d){return n("li",{class:"pn-multiselect-option",key:s,hidden:a},n("input",{type:"checkbox",id:s,class:"pn-multiselect-option-input",checked:i??this.optionSelected(e),indeterminate:d===undefined&&this.isIndeterminate(u),name:this.name,value:e,disabled:this.disabled||r,required:this.required,"aria-invalid":c?"true":null,"aria-describedby":o?`${s}-helper`:null,onClick:t=>this.ripple(t),onKeyDown:t=>this.checkboxNav(t,e),onBlur:t=>this.handleBlur(t)}),n("div",{class:"pn-multiselect-option-content"},!!l&&n("pn-icon",{icon:l,color:"blue900"}),n("div",{class:"pn-multiselect-option-text"},n("label",{class:"pn-multiselect-option-label",htmlFor:s},n("span",null,t)),o&&n("p",{class:"pn-multiselect-option-helper",id:`${s}-helper`},o)),n("div",{class:"pn-multiselect-option-checkbox"},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},n("polyline",{class:"pn-multiselect-option-checkbox-checkmark-path",points:"4,12 9,17 20,6","stroke-width":"3"}),n("polyline",{class:"pn-multiselect-option-checkbox-indeterminate-path",points:"4,12 20,12","stroke-width":"3"})))),p?.length&&n("ul",{class:"pn-multiselect-optgroup"},p?.map(((t,e)=>this.renderOption(t,u,e)))))}renderOptions(){return n("ul",{id:this.idOptions,class:"pn-multiselect-options","data-open":this.open,"data-upwards":this.upwards,"data-moving":this.isClosing||this.isExpanding,onChange:t=>this.handleChange(t),style:{height:"0px"},ref:t=>this.elList=t},this.showSelectAll()&&this.renderOption({label:this.translate(`SELECT_${this.isSearching?"FOUND":"ALL"}_OPTIONS`),value:this.allValue,checked:this.optionsTotal()===this.optionsCheckedTotal()}),this.options?.map(((t,e)=>this.renderOption(t,e))),this.showEmptyOption()&&n("li",{class:"pn-multiselect-option"},n("div",{class:"pn-multiselect-option-content",role:"alert"},n("div",{class:"pn-multiselect-option-text"},n("span",{class:"pn-multiselect-option-label"},this.translate(this.isEmpty()?"NO_OPTIONS":"NO_SEARCH_RESULTS"))))))}renderChips(){return n("ul",{id:this.idChips,class:"pn-multiselect-chips","aria-label":this.translate("SELECTED_OPTIONS"),ref:t=>this.elChips=t},this.optionsCheckedPreview()?.map((({label:t,value:e},i)=>n("li",{class:"pn-multiselect-chip","aria-setsize":this.optionsCheckedTotal(),"aria-posinset":i+1,key:`${t}-${e}`},n("span",{class:"pn-multiselect-chip-label"},t),n("button",{type:"button",class:"pn-multiselect-chip-button","aria-label":`${this.translate("REMOVE")} ${t}`,onClick:()=>this.optionSelect({val:e,checked:false,chip:i})},n("pn-icon",{icon:c,small:true,color:"blue700"}))))),this.optionsCheckedTotal()>this.itemCount&&n("li",{class:"pn-multiselect-chip","data-count":true},n("span",{class:"pn-multiselect-chip-label"},"+ ",this.additonalOptions())))}render(){return n(o,{key:"1cf81d38c41d906748ea6fd930ef0a3ffaa7f5d6"},n("fieldset",{key:"21265396b14535f99dba3e7fd2d093ccb2a380af",class:"pn-multiselect","data-icon":!!this.icon,"data-error":this.hasError(),disabled:this.disabled},this.label&&n("legend",{key:"7b9df3db2b214ddced59dd3cbc5d6b7e474f5c1b",id:this.idLegend,class:"pn-multiselect-label",onClick:()=>this.handleLabel()},n("span",{key:"de1e49c84b9c8a90e1f2e27b1757b9d7b80269f9"},this.label),!!this.optionsChecked()?.length&&n("span",{key:"4d7a4718ff5564a8bd9824191674a536e674db00"},this.optionsCheckedTotal(),"/",this.optionsTotal())),n("div",{key:"1133f2b71d626942cc1aedfcdb99c35c0cc19e6b",class:"pn-multiselect-group",ref:t=>this.elGroup=t},n("div",{key:"d48cbaecab417ef48f67be0a17255e2f17bef233",class:"pn-multiselect-input"},!!this.icon&&n("pn-icon",{key:"053f2dea56dc17880890780f4cb0dbe36973ce72",class:"pn-multiselect-icon","data-custom":true,icon:this.icon}),n("input",{key:"0e1ac1adee922ff2123aa8e8277288f661f40a48",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:t=>this.handleInputKeyboard(t),onBlur:t=>this.handleBlur(t),onInput:t=>this.search&&this.setSearchQuery(t.target.value),ref:t=>this.elInput=t}),this.hasError()&&n("pn-icon",{key:"0112d6d05e23edbd392b27df3bc29cb1e2909331",class:"pn-multiselect-icon","data-error":true,icon:l,color:"warning"}),n("button",{key:"e363e1f51469f973300db4543622de3da2dc1176",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:t=>this.elButton=t},n("pn-icon",{key:"4945c172b4913430a1d24e4e363b778734b19be4",class:"pn-multiselect-icon",icon:s,color:"blue700"}))),this.renderOptions()),this.hasMessage()&&n("p",{key:"318cf667b58984da1ba7eea2655cd87079efaf13",id:this.idHelper,class:"pn-multiselect-description",role:!!this.error?"alert":null},n("span",{key:"eca71fe8b54c115bfef10c96408a832e1ffb3e15"},this.error||this.helpertext)),this.search&&this.renderChips(),n("slot",{key:"7fb51af2932ef92ca98bddcb1831f586bba1a7dd"}),this.search&&n("p",{key:"4e7a2527cd6068ff1b17e23b775bc46b858f3256",id:this.idSr,class:"pn-multiselect-sr-only",role:"alert","aria-live":"assertive"},this.srMessage&&n("span",{key:"bc6de5cae5fc36189390c56af59f06671cbeabe0"},this.srMessage))))}static get watchers(){return{open:["handleOpen"],search:["handleSearch"],searchQuery:["handleSearchQuery"],selectId:["handleSelectId"]}}};g.style=b;export{g as pn_multiselect};
|
|
6
|
-
//# sourceMappingURL=p-
|
|
5
|
+
import{r as t,c as e,g as i,h as n,a as o}from"./p-43660913.js";import{a as l}from"./p-9a18b612.js";import{c as s}from"./p-99600bc7.js";import{c}from"./p-92b0338a.js";import{u as r,k as a,r as p,o as u,j as h,e as d}from"./p-f64d17a6.js";const m={SELECT_AN_OPTION:{en:"Select an option",sv:"Välj ett alternativ",da:"Vælg en mulighed",fi:"Valitse vaihtoehto",no:"Velg et alternativ"},SELECT_ALL_OPTIONS:{en:"Select all options",sv:"Välj alla alternativ",da:"Vælg alle muligheder",fi:"Valitse kaikki vaihtoehdot",no:"Velg alle alternativer"},SELECT_FOUND_OPTIONS:{en:"Select {number} options",sv:"Välj {number} alternativ",da:"Vælg {number} muligheder",fi:"Valitse {number} vaihtoehtoa",no:"Velg {number} alternativer"},SELECTED_OPTIONS:{en:"Selected options.",sv:"Valda alternativ.",da:"Valgte muligheder.",fi:"Valitut vaihtoehdot.",no:"Valgte alternativer."},BUTTON_OPEN:{en:"Open list",sv:"Öppna listan",da:"Open list",fi:"Open list",no:"Open list"},BUTTON_CLOSE:{en:"Close list",sv:"Stäng listan",da:"Close list",fi:"Close list",no:"Close list"},REMOVE:{en:"Remove",sv:"Ta bort",da:"Remove",fi:"Remove",no:"Remove"},REMOVED:{en:"Removed",sv:"Tog bort",da:"Fjernet",fi:"Poistettu",no:"Fjernet"},MORE_OPTION:{en:"more option.",sv:"alternativ till.",da:"mulighed mere.",fi:"vaihtoehto lisää.",no:"alternativ til."},MORE_OPTIONS:{en:"more options.",sv:"fler alternativ.",da:"more options.",fi:"more options.",no:"more options."},SEARCH:{en:"Search",sv:"Sök",da:"Søg",fi:"Hae",no:"Søk"},RESULTS_FOUND:{en:"options found",sv:"alternativ hittades",da:"muligheder fundet",fi:"vaihtoehtoja löytyi",no:"alternativer funnet"},NO_SEARCH_RESULTS:{en:"No options found",sv:"Inga alternativ hittades",da:"Ingen muligheder fundet",fi:"Vaihtoehtoja ei löytynyt",no:"Finner ingen alternativer"},NO_OPTIONS:{en:"No options available",sv:"Inga alternativ tillgängliga",da:"Ingen tilgængelige muligheder",fi:"Ei vaihtoehtoja",no:"Ingen tilgjengelige alternativer"}};const f="pn-multiselect{display:inline-block}pn-multiselect .pn-multiselect{border:0;margin:0;padding:0}pn-multiselect .pn-multiselect[data-icon] .pn-multiselect-element{padding-left:3em}pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element{padding-right:5.5em;border-color:#a70707}pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:hover{border-color:#500715}pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}pn-multiselect .pn-multiselect-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);width:100%}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-label{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-label>span{font-size:0.875em}pn-multiselect .pn-multiselect-sr-only{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}pn-multiselect .pn-multiselect-group{position:relative;padding:0;margin:0}pn-multiselect .pn-multiselect-input{position:relative}pn-multiselect .pn-multiselect-input>pn-icon{pointer-events:none;position:absolute;top:0.75em;right:3.5em}pn-multiselect .pn-multiselect-input>pn-icon[data-custom]{left:0.75em;right:unset}pn-multiselect .pn-multiselect-button{cursor:pointer;position:absolute;right:0.75em;top:50%;transform:translateY(-50%);padding:0;margin:0;border:0;width:2em;height:2em;font-size:1em;border-radius:50%;background-color:transparent;-webkit-tap-highlight-color:transparent;transition-property:background-color, outline-color, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);outline:0.2rem solid transparent;outline-offset:0.2rem}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-button{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-button:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}pn-multiselect .pn-multiselect-button>pn-icon>svg>path{transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);transition-delay:0.2s;transform-origin:center;transform:rotate(0deg)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-button>pn-icon>svg>path{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-button:hover{background-color:#effbff}pn-multiselect .pn-multiselect-button[aria-expanded=true]{background-color:#effbff}pn-multiselect .pn-multiselect-button[aria-expanded=true]>pn-icon>svg>path{transform:rotate(180deg);transition-delay:0s}pn-multiselect .pn-multiselect-element{color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);cursor:text;text-align:left;transition-delay:0.1s, 0.1s, 0s;width:100%;padding-right:3.5em;display:flex;align-items:center;justify-content:space-between;gap:0.5em;overflow:hidden;text-overflow:ellipsis}pn-multiselect .pn-multiselect-element:-webkit-autofill,pn-multiselect .pn-multiselect-element:-webkit-autofill:hover,pn-multiselect .pn-multiselect-element:-webkit-autofill:focus,pn-multiselect .pn-multiselect-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}pn-multiselect .pn-multiselect-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-element{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-element::placeholder{color:#5e554a;font-weight:normal}pn-multiselect .pn-multiselect-element:hover{border-color:#005d92}pn-multiselect .pn-multiselect-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}pn-multiselect .pn-multiselect-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2;pointer-events:none}pn-multiselect .pn-multiselect-element:disabled+.pn-multiselect-button{pointer-events:none}pn-multiselect .pn-multiselect-element:disabled+.pn-multiselect-button path{fill:#5e554a}pn-multiselect .pn-multiselect-element:placeholder{color:#5e554a;font-weight:normal}pn-multiselect .pn-multiselect-element[type=input]:hover{cursor:pointer;color:#2d2013;background-color:#effbff;transition-delay:0s}pn-multiselect .pn-multiselect-element[type=input]:hover[aria-invalid=true]{background-color:#fdefee}pn-multiselect .pn-multiselect-element:focus-visible{transition-delay:0s}pn-multiselect .pn-multiselect-element::-webkit-search-cancel-button,pn-multiselect .pn-multiselect-element::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}pn-multiselect .pn-multiselect-options{scroll-behavior:smooth;position:absolute;z-index:10;top:calc(100% + 0.5em);left:0;right:0;background-color:#ffffff;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);border-radius:0.5em;list-style:none;margin:0;padding:0;width:var(--pn-select-options-width);max-height:var(--pn-select-max-height);overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;visibility:hidden;transform-origin:top left}pn-multiselect .pn-multiselect-options[data-open]{visibility:visible}pn-multiselect .pn-multiselect-options[data-upwards]{top:unset;bottom:calc(100% + 0.5em);transform-origin:bottom left;box-shadow:0 -0.0625em 0.125em rgba(0, 0, 0, 0.2)}pn-multiselect .pn-multiselect-options[data-moving]{overflow:hidden;visibility:visible}pn-multiselect .pn-multiselect-options::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-thumb:hover{background-color:#5e554a}pn-multiselect .pn-multiselect-options::-webkit-scrollbar-corner,pn-multiselect .pn-multiselect-options::-webkit-scrollbar-button{display:none}pn-multiselect .pn-multiselect-options>pn-input{padding:0.5em}pn-multiselect .pn-multiselect-optgroup{list-style:none;padding:0}pn-multiselect .pn-multiselect-optgroup>.pn-multiselect-option>.pn-multiselect-option-content{padding-left:2em}pn-multiselect .pn-multiselect-chips{list-style:none;display:flex;flex-wrap:wrap;gap:0.5em;padding:0;margin:0.5em 0 0 0;color:#5e554a;font-weight:400}pn-multiselect .pn-multiselect-chips:empty{display:none}pn-multiselect .pn-multiselect-chip{margin:0;display:inline-flex;align-items:center;gap:0.25em;background-color:#ffffff;border-radius:0.5em;padding:0.125em 0.25em 0.125em 0.5em;line-height:1.5em;border:0.0625em solid #5e554a;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-chip{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-chip:focus-within{color:#005d92;outline-color:#005d92;background-color:#effbff;border-color:#005d92}pn-multiselect .pn-multiselect-chip[data-count]{pointer-events:none;border:0;padding-left:0;padding-right:0;background-color:unset}pn-multiselect .pn-multiselect-chip-label{font-size:0.875em;white-space:nowrap}pn-multiselect .pn-multiselect-chip-button{cursor:pointer;font-size:1em;padding:0.25em;height:1.5em;width:1.5em;border:0;background-color:unset;border-radius:50%;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);-webkit-tap-highlight-color:transparent}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-chip-button{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-chip-button:hover{background-color:#8eddf9}pn-multiselect .pn-multiselect-chip-button:focus{outline:0}pn-multiselect .pn-multiselect-no-results{margin:0;padding:0.75em}pn-multiselect .pn-multiselect-description{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}pn-multiselect .pn-multiselect-description[role=alert]{color:#a70707}pn-multiselect .pn-multiselect-option{position:relative;margin:0;padding:0}pn-multiselect .pn-multiselect-option .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}pn-multiselect .pn-multiselect-option-input{cursor:pointer;position:absolute;opacity:0;left:0;top:0;height:100%;width:100%;margin:0;-webkit-tap-highlight-color:transparent}pn-multiselect .pn-multiselect-option-input:disabled{pointer-events:none}pn-multiselect .pn-multiselect-option-input:disabled+.pn-multiselect-option-content{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2;pointer-events:none}pn-multiselect .pn-multiselect-option-input:disabled+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#f3f2f2;border-color:#969087}pn-multiselect .pn-multiselect-option-input:disabled+.pn-multiselect-option-content path{fill:#5e554a}pn-multiselect .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}pn-multiselect .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#969087;border-color:#969087}pn-multiselect .pn-multiselect-option-input:disabled:checked+.pn-multiselect-option-content path{fill:#5e554a}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]+.pn-multiselect-option-content .pn-ripple{background-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked+.pn-multiselect-option-content{background-color:#fdefee}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#a70707;border-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:focus-visible+.pn-multiselect-option-content{background-color:#fdefee}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#500715;border-color:#500715}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:hover+.pn-multiselect-option-content{background-color:#fef7f6}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:checked:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#500715;border-color:#500715}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:hover+.pn-multiselect-option-content{background-color:#fef7f6}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#fdefee;border-color:#a70707}pn-multiselect .pn-multiselect-option-input[aria-invalid=true]:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{outline-color:#a70707;background-color:#fdefee;border-color:#a70707}pn-multiselect .pn-multiselect-option-input:hover+.pn-multiselect-option-content{background-color:#effbff}pn-multiselect .pn-multiselect-option-input:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#005d92;background-color:#e0f8ff}pn-multiselect .pn-multiselect-option-input:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{outline-color:#005d92;background-color:#e0f8ff;border-color:#005d92}pn-multiselect .pn-multiselect-option-input:checked+.pn-multiselect-option-content{background-color:#e0f8ff}pn-multiselect .pn-multiselect-option-input:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#005d92;background-color:#005d92}pn-multiselect .pn-multiselect-option-input:checked+.pn-multiselect-option-content .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-checkmark-path{transition-delay:0.2s;stroke-dashoffset:0}pn-multiselect .pn-multiselect-option-input:checked:hover+.pn-multiselect-option-content{background-color:#effbff}pn-multiselect .pn-multiselect-option-input:checked:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#0d234b;background-color:#0d234b}pn-multiselect .pn-multiselect-option-input:checked:focus-visible+.pn-multiselect-option-content{background-color:#e0f8ff}pn-multiselect .pn-multiselect-option-input:checked:focus-visible+.pn-multiselect-option-content .pn-multiselect-option-checkbox{border-color:#0d234b;background-color:#0d234b}pn-multiselect .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#005d92;border-color:#005d92}pn-multiselect .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content svg .pn-multiselect-option-checkbox-checkmark-path{stroke-dashoffset:23}pn-multiselect .pn-multiselect-option-input:indeterminate+.pn-multiselect-option-content svg .pn-multiselect-option-checkbox-indeterminate-path{stroke-dashoffset:0}pn-multiselect .pn-multiselect-option-input:indeterminate:hover+.pn-multiselect-option-content .pn-multiselect-option-checkbox{background-color:#0d234b;border-color:#0d234b}pn-multiselect .pn-multiselect-option-content{position:relative;overflow:hidden;z-index:-1;display:flex;align-items:center;padding:0.75em 1em;gap:0.5em;background-color:#ffffff;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-option-content{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-option-text{flex:1;text-overflow:ellipsis;overflow:hidden}pn-multiselect .pn-multiselect-option-label{color:#2d2013;font-weight:400}pn-multiselect .pn-multiselect-option-helper{color:#5e554a;margin:0}pn-multiselect .pn-multiselect-option-checkbox{background-color:#ffffff;flex:0 0 1.5em;width:1.5em;height:1.5em;border:0.0625em solid #969087;border-radius:0.25em;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, border-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-option-checkbox{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-option-checkbox svg polyline{stroke:#ffffff;stroke-linecap:round;stroke-dasharray:23;transition-property:stroke-dashoffset;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);transition-delay:0s}@media (prefers-reduced-motion: reduce){pn-multiselect .pn-multiselect-option-checkbox svg polyline{transition-duration:0s;transition-delay:0s}}pn-multiselect .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-checkmark-path{stroke-dashoffset:23}pn-multiselect .pn-multiselect-option-checkbox svg polyline.pn-multiselect-option-checkbox-indeterminate-path{stroke-dashoffset:23}";const b=f;const g=class{constructor(i){t(this,i);this.toggleSelect=e(this,"toggleSelect",7);this.allOptions=e(this,"allOptions",7);this.selectedOption=e(this,"selectedOption",7);this.selectedAllOptions=e(this,"selectedAllOptions",7);this.searchInput=e(this,"searchInput",7);this.isSearching=false;this.open=false;this.upwards=false;this.srMessage=undefined;this.isClosing=false;this.isExpanding=false;this.label=undefined;this.helpertext=undefined;this.placeholder=undefined;this.name=undefined;this.selectId=this.id;this.selectName=undefined;this.icon=undefined;this.language=null;this.options=undefined;this.selectAll=false;this.allValue="pn_multiselect_all";this.search=false;this.searchQuery="";this.itemCount=5;this.maxHeight=undefined;this.top=false;this.bottom=false;this.required=false;this.disabled=false;this.invalid=false;this.error=undefined}id=`pn-multiselect-${r()}`;idLegend=`${this.id}-legend`;idButton=`${this.id}-button`;idOptions=`${this.id}-options`;idHelper=`${this.id}-text`;idChips=`${this.id}-chips`;idSr=`${this.id}-sr`;elGroup;elButton;elInput;elList;elChips;srTimer;animation;animationDurationDefault=400;animationDuration=this.animationDurationDefault;get hostElement(){return i(this)}handleOpen(){if(this.open){this.addGlobalEventListeners();this.handleDirection();this.handleMaxHeight();this.handleWidth();requestAnimationFrame((()=>this.openGrid()))}else{this.closeGrid();this.removeGlobalEventListeners()}}handleSearch(){if(!this.search)this.options=[...this.options.map((t=>{const e={...t,hide:false};if(e?.group?.length)e.group.map((t=>({...t,hide:false})));return e}))]}handleSearchQuery(){if(this.search&&typeof this.searchQuery==="string")this.handleInputSearch()}handleSelectId(){const t=this.selectId;this.idLegend=`${t}-legend`;this.idButton=`${t}-button`;this.idOptions=`${t}-options`;this.idHelper=`${t}-text`;this.idChips=`${t}-chips`;this.idSr=`${t}-sr`}handleResize(){if(!this.open)return;this.toggleOpen(false);this.elList.style.removeProperty("--pn-select-options-width");this.elList.style.removeProperty("--pn-select-max-height")}toggleSelect;allOptions;selectedOption;selectedAllOptions;searchInput;async componentWillLoad(){this.handleSelectId();if(this.language===null)await a(this.hostElement)}componentDidLoad(){if(!!this.searchQuery?.length)this.handleSearchQuery()}globalEvents=t=>{const e=t.target;const i=e?.closest(this.hostElement.localName);if(!i)this.toggleOpen(false)};addGlobalEventListeners(){const t=this.hostElement.getRootNode();t.addEventListener("click",this.globalEvents)}removeGlobalEventListeners(){const t=this.hostElement.getRootNode();t.removeEventListener("click",this.globalEvents)}openGrid(){requestAnimationFrame((()=>{const{clientHeight:t,scrollHeight:e}=this.elList;const i=this.isClosing?t:0;this.elList.style.height=`${e}px`;this.isExpanding=true;this.animateGrid(true,`${i}px`,this.maxHeight||`${this.elList.scrollHeight}px`)}))}closeGrid(){const{scrollHeight:t,clientHeight:e}=this.elList;const i=this.isExpanding?e:t;this.elList.style.height=`0px`;this.isClosing=true;this.animateGrid(false,`${i}px`,`0px`)}animateGrid(t,e,i){this.cancelAnimations();if(p())this.animationDuration=0;else this.animationDuration=this.animationDurationDefault;this.animation=this.elList.animate({height:[e,i]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"});this.animation.onfinish=()=>this.animationFinish();this.animation.oncancel=()=>t?this.isExpanding=false:this.isClosing=false}animationFinish(){this.cancelAnimations();this.elList.style.height=this.isClosing?"0px":"";this.isClosing=false;this.isExpanding=false}cancelAnimations(){if(this.animation)this.animation.cancel()}emitEvents(t,e){this.allOptions.emit(this.options);if(t)return this.selectedOption.emit(t);const i={checked:e,searching:this.isSearching};if(this.search&&this.optionsTotal()!==this.optionsSearch().length){i.query=this.searchQuery;i.found=this.optionsSearch()}this.selectedAllOptions.emit(i)}optionsChecked(){const t=this.options?.reduce(((t,e)=>{const i=e.group?[...e.group.filter((({checked:t})=>t))]:[];if(e.checked)t.push(e);if(i?.length)t.push(...i);return t}),[]);return t}optionsTotal(){return this.options?.reduce(((t,e)=>t+(e?.group?.length?e.group.length+1:1)),0)}optionsIndex(t){const e=({group:e=[]})=>e?.findIndex((({value:e})=>e===t));const i=this.options.findIndex((i=>i.value===t||e(i)!==-1));const n=e(this.options?.[i]);return{indexGroup:i,indexNested:n}}optionsCheckedTotal(){return this.optionsChecked()?.length}optionsCheckedPreview(){return this.optionsChecked()?.slice(0,this.itemCount)}optionsCheckedLabels(){return this.optionsChecked()?.map((({label:t})=>t))?.join(", ")}optionsSearch(){const t=this.options?.reduce(((t,e)=>{const i=e.group?[...e.group.filter((({hide:t})=>!t))]:[];if(!e.hide)t.push(e);if(i?.length)t.push(...i);return t}),[]);return t}noResults(){return this.optionsSearch()?.length===0}isIndeterminate(t){const e=this.options?.[t];if(e?.group?.length){const t=e.group.every((({checked:t})=>t));const i=e.group.every((({checked:t})=>!t));return!(t||i)}return false}optionSelect({val:t,checked:e,chip:i}){if(t===this.allValue)return this.optionSelectAll(e);const n=this.options;const{indexGroup:o,indexNested:l}=this.optionsIndex(t);const s=n[o]?.group;const c=s?.[l];if(c?.value){n[o].group[l].checked=e;const t=s?.every((({checked:t})=>t));if(t)n[o].checked=true;else n[o].checked=false}else{n[o].checked=e;if(s?.length)n[o].group=s?.map((t=>({...t,checked:e})))}const r=l===-1?n[o]:n[o].group[l];this.emitEvents(r);this.options=[...n];if(typeof i==="number"){this.handleSrMesssage(`${this.translate("REMOVED")} ${r.label}`);requestAnimationFrame((()=>{const t=i===this.optionsCheckedTotal()?i-1:i;const e=Array.from(this.elChips.children)?.[t];e?.querySelector("button").focus({preventScroll:true})}))}}optionSelectAll(t){this.options=[...this.options.map((e=>{const i={...e,checked:this.isSearching?e.hide?e.checked:t:t};if(i.group)i.group=[...i.group.map((e=>({...e,checked:this.isSearching?e.hide?e.checked:t:t})))];const n=i?.group?.every((({checked:t})=>t));if(i?.group?.length)i.checked=n;return i}))];this.emitEvents(null,t)}optionSelected(t){return!!this.optionsChecked()?.find((({value:e,checked:i})=>e===t&&i))}translate(t){const e=m?.[t]?.[this.language||d];if(e.includes("{number}"))return e.replace("{number}",this.optionsSearch().length);return e}getRect(t){return t?.getBoundingClientRect()}ripple({clientX:t,clientY:e,target:i}){const n=t===0&&e===0;const o=i.nextElementSibling;const{x:l,width:s,y:c,top:r}=this.getRect(o);const a=n?{clientX:l+s-24,clientY:c-r}:{clientX:t,clientY:e};u(a,o)}handleSrMesssage(t){this.srMessage=t;clearTimeout(this.srTimer);this.srTimer=setTimeout((()=>this.srMessage=null),2e3)}handleDirection(){if(this.top)return this.upwards=true;if(this.bottom)return this.upwards=false;const{bottom:t,top:e}=this.getRect(this.elInput);const i=16;const n=window.innerHeight-t-i;const o=e-i;this.upwards=o/2>n}handleMaxHeight(){if(this.maxHeight)return this.elGroup.style.setProperty("--pn-select-max-height",this.maxHeight);const{bottom:t,top:e}=this.getRect(this.elInput);const i=this.upwards?e:t;const n=h();const o=this.upwards?n+16:16;const l=this.upwards?i-o:window.innerHeight-i-o;this.elGroup.style.setProperty("--pn-select-max-height",`${Math.ceil(l)}px`)}handleWidth(){const{width:t}=this.getRect(this.elInput);this.elGroup.style.setProperty("--pn-select-options-width",`${Math.ceil(t)}px`)}setFocus(){if(this.search)this.elInput.focus({preventScroll:true});else this.elButton.focus({preventScroll:true})}hasError(){return this.invalid||!!this.error}hasMessage(){return!!this.helpertext||!!this.error}toggleOpen(t){if(typeof t==="boolean"&&t===this.open)return;this.open=t??!this.open;this.toggleSelect.emit({open:this.open})}handleInputKeyboard(t){t.stopImmediatePropagation();const{code:e}=t;if(e==="Escape")return this.toggleOpen(false);if(!this.open&&e.match(/^(Space|Enter)$|Arrow|^Key.*$/))this.toggleOpen()}setSearchQuery(t){if(!this.open)this.toggleOpen(true);this.searchQuery=t}handleInputSearch(){if(this.isEmpty())return;const t=this.searchQuery;const e=({label:e,helpertext:i,value:n})=>`${e} ${i} ${n}`.trim().toLowerCase().includes(t.toLowerCase());const i=this.options.map((t=>{const i=t?.group?.map((t=>({...t,hide:!e(t)})))||[];const n=e(t)||i?.some((({hide:t})=>!t));t.hide=!n;if(t?.group?.length)t.group=[...i];return t}));this.isSearching=t!=="";this.options=[...i];this.searchInput.emit({query:t,found:this.optionsSearch()})}getListItem(t){const{value:e}=this.options[t];return this.elList.querySelector(`.pn-multiselect-option-input[value='${e}']`)}getOptionIndex(t,e,i){const n=this.optionsTotal()-1;if(i==="End")return n;if(i==="Home")return 0;const o=this.options.findIndex((({value:e})=>e===t));const l=e.find((t=>typeof t==="number"));const s=o+l;if(s>=n)return n;if(s<=0)return 0;return s}checkboxNav(t,e){const{code:i}=t;const n=i==="ArrowUp"&&-1;const o=i==="ArrowDown"&&1;const l=i==="PageUp"&&-10;const s=i==="PageDown"&&10;const c=i==="Home"&&0;const r=i==="End"&&this.optionsTotal()-1;const a=i==="Tab";const p=i==="Space";const u=i==="Enter";const h=i==="Escape";const d=[n,o,l,s,c,r,a,p,u,h];if(!d.some((t=>typeof t==="number"||t)))return;if(a||p||u)return;t.stopImmediatePropagation();t.preventDefault();if(h){this.setFocus();return this.toggleOpen(false)}const m=this.getOptionIndex(e,d,i);return this.getListItem(m)?.focus()}handleBlur(t){const e=t.target;const i=t.relatedTarget;const n=(i||e)?.className==="pn-multiselect-chip-button";if(n)this.toggleOpen(false)}handleLabel(){if(this.disabled)return;this.setFocus()}isEmpty(){return(this.options?.length||0)===0}showSelectAll(){return this.selectAll&&!this.isEmpty()&&!this.noResults()}showEmptyOption(){return this.isSearching&&this.noResults()||this.isEmpty()}getPlaceholder(){const t=this.search?"SEARCH":"SELECT_AN_OPTION";return this.placeholder||this.translate(t)}handleChange({target:t}){const{value:e,checked:i}=t;this.optionSelect({val:e,checked:i})}additonalOptions(){const t=this.optionsCheckedTotal()-this.itemCount;const e=`MORE_OPTION${t===1?"":"S"}`;return`${t} ${this.translate(e)}`}describedBy(){const t=[this.search&&this.idChips,this.srMessage&&this.idSr,!!this.helpertext&&this.idHelper].filter(Boolean);if(t.length)return t.join(" ");return null}renderOption({label:t,value:e,checked:i,helpertext:o,icon:l,id:s=`${this.selectId}-${e||t}`,invalid:c,disabled:r,hide:a,group:p},u,h){return n("li",{class:"pn-multiselect-option",key:s,hidden:a},n("input",{type:"checkbox",id:s,class:"pn-multiselect-option-input",checked:i??this.optionSelected(e),indeterminate:h===undefined&&this.isIndeterminate(u),name:this.name,value:e,disabled:this.disabled||r,required:this.required,"aria-invalid":c?"true":null,"aria-describedby":o?`${s}-helper`:null,onClick:t=>this.ripple(t),onKeyDown:t=>this.checkboxNav(t,e),onBlur:t=>this.handleBlur(t)}),n("div",{class:"pn-multiselect-option-content"},!!l&&n("pn-icon",{icon:l,color:"blue900"}),n("div",{class:"pn-multiselect-option-text"},n("label",{class:"pn-multiselect-option-label",htmlFor:s},n("span",null,t)),o&&n("p",{class:"pn-multiselect-option-helper",id:`${s}-helper`},o)),n("div",{class:"pn-multiselect-option-checkbox"},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},n("polyline",{class:"pn-multiselect-option-checkbox-checkmark-path",points:"4,12 9,17 20,6","stroke-width":"3"}),n("polyline",{class:"pn-multiselect-option-checkbox-indeterminate-path",points:"4,12 20,12","stroke-width":"3"})))),p?.length&&n("ul",{class:"pn-multiselect-optgroup"},p?.map(((t,e)=>this.renderOption(t,u,e)))))}renderOptions(){return n("ul",{id:this.idOptions,class:"pn-multiselect-options","data-open":this.open,"data-upwards":this.upwards,"data-moving":this.isClosing||this.isExpanding,onChange:t=>this.handleChange(t),style:{height:"0px"},ref:t=>this.elList=t},this.showSelectAll()&&this.renderOption({label:this.translate(`SELECT_${this.isSearching?"FOUND":"ALL"}_OPTIONS`),value:this.allValue,checked:this.optionsTotal()===this.optionsCheckedTotal()}),this.options?.map(((t,e)=>this.renderOption(t,e))),this.showEmptyOption()&&n("li",{class:"pn-multiselect-option"},n("div",{class:"pn-multiselect-option-content",role:"alert"},n("div",{class:"pn-multiselect-option-text"},n("span",{class:"pn-multiselect-option-label"},this.translate(this.isEmpty()?"NO_OPTIONS":"NO_SEARCH_RESULTS"))))))}renderChips(){return n("ul",{id:this.idChips,class:"pn-multiselect-chips","aria-label":this.translate("SELECTED_OPTIONS"),ref:t=>this.elChips=t},this.optionsCheckedPreview()?.map((({label:t,value:e},i)=>n("li",{class:"pn-multiselect-chip","aria-setsize":this.optionsCheckedTotal(),"aria-posinset":i+1,key:`${t}-${e}`},n("span",{class:"pn-multiselect-chip-label"},t),n("button",{type:"button",class:"pn-multiselect-chip-button","aria-label":`${this.translate("REMOVE")} ${t}`,onClick:()=>this.optionSelect({val:e,checked:false,chip:i})},n("pn-icon",{icon:c,small:true,color:"blue700"}))))),this.optionsCheckedTotal()>this.itemCount&&n("li",{class:"pn-multiselect-chip","data-count":true},n("span",{class:"pn-multiselect-chip-label"},"+ ",this.additonalOptions())))}render(){return n(o,{key:"8dcab6f8526d10167d647733ebeba91c6cc4a891"},n("fieldset",{key:"b60a7513bb1481686d0353911fe946a8a0534416",class:"pn-multiselect","data-icon":!!this.icon,"data-error":this.hasError(),disabled:this.disabled},this.label&&n("legend",{key:"51f1dc3597171f431ec55d6960f5c22a1af86ea0",id:this.idLegend,class:"pn-multiselect-label",onClick:()=>this.handleLabel()},n("span",{key:"95c5a289c2489059fb076ed82fa40b57965b40fa"},this.label),!!this.optionsChecked()?.length&&n("span",{key:"bb1a5f52c8b05612c31325e9237292ad6cdd83ac"},this.optionsCheckedTotal(),"/",this.optionsTotal())),n("div",{key:"05bcb2bc08fe7495db84681072c83cef9aa1c00e",class:"pn-multiselect-group",ref:t=>this.elGroup=t},n("div",{key:"7da7473b15c01f1233dc0441571495743c7e8c91",class:"pn-multiselect-input"},!!this.icon&&n("pn-icon",{key:"2ac559c573d8fd0f1e6f39b94c7ba54e8f82530b",class:"pn-multiselect-icon","data-custom":true,icon:this.icon}),n("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:t=>this.handleInputKeyboard(t),onBlur:t=>this.handleBlur(t),onInput:t=>this.search&&this.setSearchQuery(t.target.value),ref:t=>this.elInput=t}),this.hasError()&&n("pn-icon",{key:"bbe2ed7c5f861b6972ea3937c1aad7fa53269878",class:"pn-multiselect-icon","data-error":true,icon:l,color:"warning"}),n("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:t=>this.elButton=t},n("pn-icon",{key:"71c79e52bcca84ae16b225dc6c58332b95788234",class:"pn-multiselect-icon",icon:s,color:"blue700"}))),this.renderOptions()),this.hasMessage()&&n("p",{key:"a27a65d1fba955a5b1bab1c7b79c5e78b5c0040a",id:this.idHelper,class:"pn-multiselect-description",role:!!this.error?"alert":null},n("span",{key:"c00904641ae7ba9a9fb482fbf215d6a7f2643872"},this.error||this.helpertext)),this.search&&this.renderChips(),n("slot",{key:"02c6ced4675438a0b29505a2c20948b1345ec1e0"}),this.search&&n("p",{key:"c8ce14a5d9d28e235de857c2264bed4f5507e389",id:this.idSr,class:"pn-multiselect-sr-only",role:"alert","aria-live":"assertive"},this.srMessage&&n("span",{key:"a365ee9816a1e3e732649857c4cf73c0470a85bf"},this.srMessage))))}static get watchers(){return{open:["handleOpen"],search:["handleSearch"],searchQuery:["handleSearchQuery"],selectId:["handleSelectId"]}}};g.style=b;export{g as pn_multiselect};
|
|
6
|
+
//# sourceMappingURL=p-06c7e91b.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["translations","SELECT_AN_OPTION","en","sv","da","fi","no","SELECT_ALL_OPTIONS","SELECT_FOUND_OPTIONS","SELECTED_OPTIONS","BUTTON_OPEN","BUTTON_CLOSE","REMOVE","REMOVED","MORE_OPTION","MORE_OPTIONS","SEARCH","RESULTS_FOUND","NO_SEARCH_RESULTS","NO_OPTIONS","pnMultiselectCss","PnMultiselectStyle0","PnMultiselect","this","id","uuidv4","idLegend","idButton","idOptions","idHelper","idChips","idSr","elGroup","elButton","elInput","elList","elChips","srTimer","animation","animationDurationDefault","animationDuration","handleOpen","open","addGlobalEventListeners","handleDirection","handleMaxHeight","handleWidth","requestAnimationFrame","openGrid","closeGrid","removeGlobalEventListeners","handleSearch","search","options","map","option","item","hide","group","length","opt","handleSearchQuery","searchQuery","handleInputSearch","handleSelectId","selectId","handleResize","toggleOpen","style","removeProperty","toggleSelect","allOptions","selectedOption","selectedAllOptions","searchInput","componentWillLoad","language","awaitTopbar","hostElement","componentDidLoad","globalEvents","event","target","isWithinCalendar","closest","localName","root","getRootNode","addEventListener","removeEventListener","clientHeight","scrollHeight","height","isClosing","isExpanding","animateGrid","maxHeight","startHeight","endHeight","cancelAnimations","reduceMotion","animate","duration","easing","onfinish","animationFinish","oncancel","cancel","emitEvents","all","emit","data","checked","searching","isSearching","optionsTotal","optionsSearch","query","found","optionsChecked","list","reduce","sum","subgroup","filter","push","optionsIndex","val","findNested","findIndex","value","indexGroup","indexNested","optionsCheckedTotal","optionsCheckedPreview","slice","itemCount","optionsCheckedLabels","label","join","noResults","isIndeterminate","groupIndex","every","none","optionSelect","chip","allValue","optionSelectAll","nested","allSiblingsChecked","handleSrMesssage","translate","index","btn","Array","from","children","querySelector","focus","preventScroll","allChecked","optionSelected","find","prop","text","includes","replace","getRect","element","getBoundingClientRect","ripple","clientX","clientY","isKeyboard","nextElementSibling","x","width","y","top","clientCor","srMessage","clearTimeout","setTimeout","upwards","bottom","oneEm","offsetTop","window","innerHeight","offsetBottom","setProperty","inputHeight","getTotalHeightOffset","offset","Math","ceil","setFocus","hasError","invalid","error","hasMessage","helpertext","state","handleInputKeyboard","stopImmediatePropagation","code","match","setSearchQuery","isEmpty","term","performSearch","trim","toLowerCase","foundNested","some","getListItem","getOptionIndex","triggers","total","valIndex","count","checkboxNav","e","arrowUp","arrowDown","pageUp","pageDown","home","end","tab","space","enter","escape","preventDefault","handleBlur","related","relatedTarget","jumpingToChips","className","handleLabel","disabled","showSelectAll","selectAll","showEmptyOption","getPlaceholder","autoTranslation","placeholder","handleChange","additonalOptions","single","describedBy","Boolean","renderOption","icon","h","class","key","hidden","type","indeterminate","undefined","name","required","onClick","onKeyDown","onBlur","color","htmlFor","xmlns","viewBox","fill","points","i","renderOptions","onChange","ref","el","role","renderChips","close","small","render","Host","tabindex","selectName","toString","readonly","onInput","alert_exclamation_circle","chevron_down"],"sources":["src/components/input/pn-multiselect/translations.ts","src/components/input/pn-multiselect/pn-multiselect.scss?tag=pn-multiselect","src/components/input/pn-multiselect/pn-multiselect.tsx"],"sourcesContent":["export const translations = {\n SELECT_AN_OPTION: {\n en: 'Select an option',\n sv: 'Välj ett alternativ',\n da: 'Vælg en mulighed',\n fi: 'Valitse vaihtoehto',\n no: 'Velg et alternativ',\n },\n SELECT_ALL_OPTIONS: {\n en: 'Select all options',\n sv: 'Välj alla alternativ',\n da: 'Vælg alle muligheder',\n fi: 'Valitse kaikki vaihtoehdot',\n no: 'Velg alle alternativer',\n },\n SELECT_FOUND_OPTIONS: {\n en: 'Select {number} options',\n sv: 'Välj {number} alternativ',\n da: 'Vælg {number} muligheder',\n fi: 'Valitse {number} vaihtoehtoa',\n no: 'Velg {number} alternativer',\n },\n SELECTED_OPTIONS: {\n en: 'Selected options.',\n sv: 'Valda alternativ.',\n da: 'Valgte muligheder.',\n fi: 'Valitut vaihtoehdot.',\n no: 'Valgte alternativer.',\n },\n BUTTON_OPEN: {\n en: 'Open list',\n sv: 'Öppna listan',\n da: 'Open list',\n fi: 'Open list',\n no: 'Open list',\n },\n BUTTON_CLOSE: {\n en: 'Close list',\n sv: 'Stäng listan',\n da: 'Close list',\n fi: 'Close list',\n no: 'Close list',\n },\n REMOVE: {\n en: 'Remove',\n sv: 'Ta bort',\n da: 'Remove',\n fi: 'Remove',\n no: 'Remove',\n },\n REMOVED: {\n en: 'Removed',\n sv: 'Tog bort',\n da: 'Fjernet',\n fi: 'Poistettu',\n no: 'Fjernet',\n },\n MORE_OPTION: {\n en: 'more option.',\n sv: 'alternativ till.',\n da: 'mulighed mere.',\n fi: 'vaihtoehto lisää.',\n no: 'alternativ til.',\n },\n MORE_OPTIONS: {\n en: 'more options.',\n sv: 'fler alternativ.',\n da: 'more options.',\n fi: 'more options.',\n no: 'more options.',\n },\n SEARCH: {\n en: 'Search',\n sv: 'Sök',\n da: 'Søg',\n fi: 'Hae',\n no: 'Søk',\n },\n RESULTS_FOUND: {\n en: 'options found',\n sv: 'alternativ hittades',\n da: 'muligheder fundet',\n fi: 'vaihtoehtoja löytyi',\n no: 'alternativer funnet',\n },\n NO_SEARCH_RESULTS: {\n en: 'No options found',\n sv: 'Inga alternativ hittades',\n da: 'Ingen muligheder fundet',\n fi: 'Vaihtoehtoja ei löytynyt',\n no: 'Finner ingen alternativer',\n },\n NO_OPTIONS: {\n en: 'No options available',\n sv: 'Inga alternativ tillgängliga',\n da: 'Ingen tilgængelige muligheder',\n fi: 'Ei vaihtoehtoja',\n no: 'Ingen tilgjengelige alternativer',\n },\n};\n","@use 'src/globals/main';\n\npn-multiselect {\n display: inline-block;\n}\n\npn-multiselect .pn-multiselect {\n border: 0;\n margin: 0;\n padding: 0;\n\n &[data-icon] .pn-multiselect-element {\n padding-left: 3em;\n }\n\n &[data-error] .pn-multiselect-element {\n padding-right: 5.5em;\n @include main.pn-input-field-error();\n }\n\n &-label {\n @include main.pn-input-label;\n width: 100%;\n }\n\n @include main.pn-sr-only-class();\n\n &-group {\n position: relative;\n padding: 0;\n margin: 0;\n }\n\n &-input {\n position: relative;\n\n > pn-icon {\n pointer-events: none;\n position: absolute;\n top: 0.75em;\n right: 3.5em;\n &[data-custom] {\n left: 0.75em;\n right: unset;\n }\n }\n }\n\n &-button {\n cursor: pointer;\n position: absolute;\n right: 0.75em;\n top: 50%;\n transform: translateY(-50%);\n padding: 0;\n margin: 0;\n border: 0;\n width: 2em;\n height: 2em;\n font-size: 1em;\n border-radius: 50%;\n background-color: transparent;\n\n -webkit-tap-highlight-color: transparent;\n\n @include main.pn-transition('background-color, outline-color, border-color');\n @include main.pn-focus(main.$blue700, main.$white, main.$blue700);\n\n > pn-icon > svg > path {\n @include main.pn-transition('transform');\n transition-delay: main.$timing;\n transform-origin: center;\n transform: rotate(0deg);\n }\n\n &:hover {\n background-color: main.$blue25;\n }\n\n &[aria-expanded='true'] {\n background-color: main.$blue25;\n > pn-icon > svg > path {\n transform: rotate(180deg);\n transition-delay: 0s;\n }\n }\n }\n\n &-element {\n @include main.pn-input-field;\n\n cursor: text;\n text-align: left;\n transition-delay: 0.1s, 0.1s, 0s;\n width: 100%;\n padding-right: 3.5em;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.5em;\n\n overflow: hidden;\n text-overflow: ellipsis;\n\n &:disabled {\n @include main.pn-disabled;\n pointer-events: none;\n + .pn-multiselect-button {\n pointer-events: none;\n path {\n fill: main.$input-color-disabled;\n }\n }\n }\n\n &:placeholder {\n @include main.pn-placeholder;\n }\n\n &[type='input']:hover {\n cursor: pointer;\n color: main.$input-color;\n background-color: main.$input-background-hover;\n transition-delay: 0s;\n &[aria-invalid='true'] {\n background-color: main.$input-background-error-hover;\n }\n }\n\n &:focus-visible {\n transition-delay: 0s;\n }\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n }\n\n &-options {\n scroll-behavior: smooth;\n position: absolute;\n z-index: 10;\n top: calc(100% + 0.5em);\n left: 0;\n right: 0;\n background-color: main.$white;\n box-shadow:\n 0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1),\n 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);\n\n border-radius: main.$border-radius;\n\n list-style: none;\n margin: 0;\n padding: 0;\n\n width: var(--pn-select-options-width);\n max-height: var(--pn-select-max-height);\n overflow-y: auto;\n overflow-x: hidden;\n\n display: flex;\n flex-direction: column;\n\n visibility: hidden;\n\n transform-origin: top left;\n\n &[data-open] {\n visibility: visible;\n }\n\n &[data-upwards] {\n top: unset;\n bottom: calc(100% + 0.5em);\n transform-origin: bottom left;\n box-shadow: 0 -0.0625em 0.125em rgba(0, 0, 0, 0.2);\n }\n\n &[data-moving] {\n overflow: hidden;\n visibility: visible;\n }\n\n @include main.pn-scrollbar();\n\n > pn-input {\n padding: 0.5em;\n }\n }\n\n &-optgroup {\n list-style: none;\n padding: 0;\n > .pn-multiselect-option > .pn-multiselect-option-content {\n padding-left: 2em;\n }\n }\n\n &-chips {\n list-style: none;\n display: flex;\n flex-wrap: wrap;\n gap: 0.5em;\n padding: 0;\n margin: 0.5em 0 0 0;\n color: main.$gray700;\n font-weight: 400;\n &:empty {\n display: none;\n }\n }\n\n &-chip {\n margin: 0;\n display: inline-flex;\n align-items: center;\n gap: 0.25em;\n background-color: main.$white;\n border-radius: main.$border-radius;\n padding: 0.125em 0.25em 0.125em 0.5em;\n line-height: 1.5em;\n border: 0.0625em solid main.$gray700;\n\n @include main.pn-focus-base;\n @include main.pn-transition('background-color, outline-color, border-color, color');\n\n &:focus-within {\n color: main.$blue700;\n @include main.pn-focus-visible(main.$blue700, main.$blue25, main.$blue700);\n }\n\n &[data-count] {\n pointer-events: none;\n border: 0;\n padding-left: 0;\n padding-right: 0;\n background-color: unset;\n }\n\n &-label {\n font-size: 0.875em;\n white-space: nowrap;\n }\n\n &-button {\n cursor: pointer;\n font-size: 1em;\n padding: 0.25em;\n height: 1.5em;\n width: 1.5em;\n border: 0;\n background-color: unset;\n border-radius: 50%;\n @include main.pn-transition('background-color');\n -webkit-tap-highlight-color: transparent;\n\n &:hover {\n background-color: main.$blue200;\n }\n &:focus {\n outline: 0;\n }\n }\n }\n\n &-no-results {\n margin: 0;\n padding: 0.75em;\n }\n\n &-description {\n @include main.pn-input-helpertext;\n &[role='alert'] {\n color: main.$helpertext-color-error;\n }\n }\n}\n\n// Select option\npn-multiselect .pn-multiselect-option {\n position: relative;\n margin: 0;\n padding: 0;\n @include main.pn-ripple(main.$blue700);\n\n &-input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n margin: 0;\n -webkit-tap-highlight-color: transparent;\n\n &:disabled {\n pointer-events: none;\n + .pn-multiselect-option-content {\n @include main.pn-disabled;\n pointer-events: none;\n .pn-multiselect-option-checkbox {\n background-color: main.$input-background-disabled;\n border-color: main.$input-border-disabled;\n }\n path {\n fill: main.$input-color-disabled;\n }\n }\n\n &:checked {\n + .pn-multiselect-option-content {\n @include main.pn-disabled;\n .pn-multiselect-option-checkbox {\n background-color: main.$input-button-disabled;\n border-color: main.$input-border-disabled;\n }\n path {\n fill: main.$input-color-disabled;\n }\n }\n }\n }\n\n &[aria-invalid='true'] {\n + .pn-multiselect-option-content {\n .pn-multiselect-option-checkbox {\n border-color: main.$border-color-error;\n }\n .pn-ripple {\n background-color: main.$warning;\n }\n }\n\n &:checked + .pn-multiselect-option-content {\n background-color: main.$input-background-error-active;\n .pn-multiselect-option-checkbox {\n background-color: main.$input-button-active-error;\n border-color: main.$input-button-active-error;\n }\n }\n\n &:checked:focus-visible + .pn-multiselect-option-content {\n background-color: main.$input-background-error-active;\n .pn-multiselect-option-checkbox {\n background-color: main.$input-button-active-error-focus;\n border-color: main.$input-button-active-error-focus;\n }\n }\n\n &:checked:hover + .pn-multiselect-option-content {\n background-color: main.$coral25;\n .pn-multiselect-option-checkbox {\n background-color: main.$input-button-active-error-hover;\n border-color: main.$input-button-active-error-hover;\n }\n }\n\n &:hover + .pn-multiselect-option-content {\n background-color: main.$coral25;\n .pn-multiselect-option-checkbox {\n background-color: main.$input-background-error-hover;\n border-color: main.$border-color-error-focus;\n }\n }\n\n &:focus-visible + .pn-multiselect-option-content .pn-multiselect-option-checkbox {\n @include main.pn-focus-visible(\n main.$border-color-error-focus,\n main.$input-background-error-active,\n main.$border-color-error-focus\n );\n }\n }\n\n &:hover + .pn-multiselect-option-content {\n background-color: main.$blue25;\n .pn-multiselect-option-checkbox {\n border-color: main.$blue700;\n background-color: main.$blue50;\n }\n }\n\n &:focus-visible + .pn-multiselect-option-content .pn-multiselect-option-checkbox {\n @include main.pn-focus-visible(main.$blue700, main.$blue50, main.$blue700);\n }\n\n &:checked + .pn-multiselect-option-content {\n background-color: main.$blue50;\n .pn-multiselect-option-checkbox {\n border-color: main.$blue700;\n background-color: main.$blue700;\n svg polyline.pn-multiselect-option-checkbox-checkmark-path {\n transition-delay: 0.2s;\n stroke-dashoffset: 0;\n }\n }\n }\n\n &:checked:hover + .pn-multiselect-option-content {\n background-color: main.$blue25;\n .pn-multiselect-option-checkbox {\n border-color: main.$blue900;\n background-color: main.$blue900;\n }\n }\n\n &:checked:focus-visible + .pn-multiselect-option-content {\n background-color: main.$blue50;\n .pn-multiselect-option-checkbox {\n border-color: main.$blue900;\n background-color: main.$blue900;\n }\n }\n\n &:indeterminate + .pn-multiselect-option-content {\n .pn-multiselect-option-checkbox {\n background-color: main.$blue700;\n border-color: main.$blue700;\n }\n svg .pn-multiselect-option-checkbox-checkmark-path {\n stroke-dashoffset: 23;\n }\n svg .pn-multiselect-option-checkbox-indeterminate-path {\n stroke-dashoffset: 0;\n }\n }\n\n &:indeterminate:hover + .pn-multiselect-option-content {\n .pn-multiselect-option-checkbox {\n background-color: main.$blue900;\n border-color: main.$blue900;\n }\n }\n }\n\n &-content {\n position: relative;\n overflow: hidden;\n z-index: -1;\n display: flex;\n align-items: center;\n padding: 0.75em 1em;\n gap: 0.5em;\n background-color: main.$white;\n @include main.pn-transition('background-color');\n }\n\n &-text {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n &-label {\n color: main.$gray900;\n font-weight: 400;\n }\n\n &-helper {\n color: main.$gray700;\n margin: 0;\n }\n\n &-checkbox {\n background-color: main.$white;\n flex: 0 0 1.5em;\n width: 1.5em;\n height: 1.5em;\n border: 0.0625em solid main.$gray400;\n border-radius: 0.25em;\n\n @include main.pn-focus-base;\n @include main.pn-transition('background-color, border-color, outline-color');\n\n svg polyline {\n stroke: main.$white;\n stroke-linecap: round;\n stroke-dasharray: 23;\n @include main.pn-transition('stroke-dashoffset');\n transition-delay: 0s;\n\n &.pn-multiselect-option-checkbox-checkmark-path {\n stroke-dashoffset: 23;\n }\n\n &.pn-multiselect-option-checkbox-indeterminate-path {\n stroke-dashoffset: 23;\n }\n }\n }\n}\n","import { Component, h, Host, Element, Watch, Prop, State, EventEmitter, Event, Listen } from '@stencil/core';\n\nimport { translations } from './translations';\n\nimport { close, alert_exclamation_circle, chevron_down } from 'pn-design-assets/pn-assets/icons.js';\n\nimport { uuidv4, awaitTopbar, ripple, en, getTotalHeightOffset, reduceMotion } from '@/index';\nimport type { PnLanguages, PnMultiselectOption } from '@/index';\n\n/**\n * The `pn-multiselect` gets its options via javascript.\n *\n * Native HTML does not accept arrays of objects. Most frameworks solves this automatically (Vue, react, etc...),\n * but keep this in mind if you use this component outside of a framework environment.\n *\n * @nativeChange The `pn-multiselect` is built with `input[type=checkbox]` elements, so the `change` event works. However, we recommend the customEvents described above.\n *\n * @see {@link https://portal.postnord.com/web-components/?path=/docs/components-input-multiselect--docs#pn-multiselect%20(options) Options documentation}\n */\n@Component({\n tag: 'pn-multiselect',\n styleUrl: 'pn-multiselect.scss',\n})\nexport class PnMultiselect {\n private readonly id: string = `pn-multiselect-${uuidv4()}`;\n private idLegend: string = `${this.id}-legend`;\n private idButton: string = `${this.id}-button`;\n private idOptions: string = `${this.id}-options`;\n private idHelper: string = `${this.id}-text`;\n private idChips: string = `${this.id}-chips`;\n private idSr: string = `${this.id}-sr`;\n\n private elGroup: HTMLDivElement;\n private elButton: HTMLButtonElement;\n private elInput: HTMLInputElement;\n private elList: HTMLUListElement;\n private elChips: HTMLUListElement;\n\n private srTimer: NodeJS.Timeout;\n\n private animation: Animation;\n private animationDurationDefault: number = 400;\n private animationDuration: number = this.animationDurationDefault;\n\n @Element() hostElement: HTMLElement;\n\n @State() private isSearching: boolean = false;\n\n /** Layout state. */\n @State() private open: boolean = false;\n @State() private upwards: boolean = false;\n\n @State() private srMessage?: string;\n\n @State() private isClosing: boolean = false;\n @State() private isExpanding: boolean = false;\n\n /** Label placed above the select */\n @Prop() label!: string;\n /** Display a helper text underneath the select */\n @Prop() helpertext?: string;\n /**\n * This is what will be shown on load if no value is used.\n * The `placeholder` will override the default text used if you have the `search` prop active.\n */\n @Prop() placeholder?: string;\n /** HTML name of the checkbox elements. Used for each checkbox inside the multiselect. */\n @Prop() name?: string;\n /** Select HTML id */\n @Prop() selectId?: string = this.id;\n /** HTML name of the input element.*/\n @Prop() selectName?: string;\n /** Display an icon to the left of the select input */\n @Prop() icon?: string;\n /** Manually set the language, not needed if you have the pnTopbar available */\n @Prop() language?: PnLanguages = null;\n /**\n * Array of options.\n * @hide true\n **/\n @Prop({ mutable: true }) options!: PnMultiselectOption[];\n\n /**\n * Adds a \"Select all\" option into the list.\n * If you use the search feature at the same time, clicking this option will only toggle the options found.\n * @see {@link search}\n * @category Features\n **/\n @Prop() selectAll?: boolean = false;\n /**\n * Set a custom value for the \"Select all value\" option.\n * @see {@link selectAll}\n * @category Features\n */\n @Prop() allValue?: string = 'pn_multiselect_all';\n /**\n * Allow the user to search among the options.\n * The selected options will now display underneath the multiselect element.\n *\n * @category Features\n **/\n @Prop() search?: boolean = false;\n /** Set the search query of the multiselect.\n *\n * @see {@link search}\n * @category Features\n */\n @Prop({ mutable: true }) searchQuery?: string = '';\n /**\n * Decide how many items should be shown before ellipsis. Requires the `search` prop to work.\n *\n * @see {@link search}\n * @category Features\n **/\n @Prop() itemCount?: number = 5;\n /**\n * Use a custom max-height for the dropdown list.\n * @description The component will automatically set the max height of the dropdown list on its own.\n * It takes the `pn-topbar` into account and will open in the direction that fits best.\n * Use this prop to override this behaviour and use a custom max-height.\n * @category Features\n **/\n @Prop() maxHeight?: string;\n /**\n * Force the dropdown to always open upwards.\n * @category Features\n **/\n @Prop() top?: boolean = false;\n /**\n * Force the dropdown to always open downwards.\n * @category Features\n **/\n @Prop() bottom?: boolean = false;\n\n /** Set the select as required. @category Validation */\n @Prop() required?: boolean = false;\n /** Disable the select. @category Validation */\n @Prop() disabled?: boolean = false;\n /** Trigger the invalid state. @category Validation */\n @Prop() invalid?: boolean = false;\n /** Display an error message and trigger the invalid state. @category Validation */\n @Prop() error?: string;\n\n @Watch('open')\n handleOpen() {\n if (this.open) {\n this.addGlobalEventListeners();\n\n this.handleDirection();\n this.handleMaxHeight();\n this.handleWidth();\n requestAnimationFrame(() => this.openGrid());\n } else {\n this.closeGrid();\n this.removeGlobalEventListeners();\n }\n }\n\n @Watch('search')\n handleSearch() {\n if (!this.search)\n this.options = [\n ...this.options.map(option => {\n const item = {\n ...option,\n hide: false,\n };\n\n if (item?.group?.length) item.group.map(opt => ({ ...opt, hide: false }));\n\n return item;\n }),\n ];\n }\n\n @Watch('searchQuery')\n handleSearchQuery() {\n if (this.search && typeof this.searchQuery === 'string') this.handleInputSearch();\n }\n\n @Watch('selectId')\n handleSelectId() {\n const id = this.selectId;\n this.idLegend = `${id}-legend`;\n this.idButton = `${id}-button`;\n this.idOptions = `${id}-options`;\n this.idHelper = `${id}-text`;\n this.idChips = `${id}-chips`;\n this.idSr = `${id}-sr`;\n }\n\n /**\n * If the select is open and you resize the window.\n * Remove all css props and disable the animations entierly.\n **/\n @Listen('resize', { target: 'window' })\n handleResize() {\n if (!this.open) return;\n this.toggleOpen(false);\n\n this.elList.style.removeProperty('--pn-select-options-width');\n this.elList.style.removeProperty('--pn-select-max-height');\n }\n\n /** Dispatched everytime the multiselect is opened or closed. */\n @Event() toggleSelect: EventEmitter<{ open: boolean }>;\n /** This event contains the entire options array with the new props. Dispatched everytime you make changes to any option. */\n @Event() allOptions: EventEmitter<PnMultiselectOption[]>;\n /** Dispatched when you toggle an option. Includes all the props of the option. */\n @Event() selectedOption: EventEmitter<PnMultiselectOption>;\n /**\n * This event is dispatched when the user toggles the \"Choose all options\" box.\n * Also triggers when you click the \"Select {number} options\" if you are performing a search at the same time.\n **/\n @Event() selectedAllOptions: EventEmitter<{\n checked: boolean;\n searching: boolean;\n query?: string;\n found?: PnMultiselectOption[];\n }>;\n /**\n * Contains the search text and the options found for that query.\n * Dispacthed everytime you change the search query.\n **/\n @Event() searchInput: EventEmitter<{\n query: string;\n found?: PnMultiselectOption[];\n }>;\n\n async componentWillLoad() {\n this.handleSelectId();\n if (this.language === null) await awaitTopbar(this.hostElement);\n }\n\n componentDidLoad() {\n if (!!this.searchQuery?.length) this.handleSearchQuery();\n }\n\n private globalEvents = (event: PointerEvent | KeyboardEvent) => {\n const target = event.target as HTMLElement;\n const isWithinCalendar = target?.closest(this.hostElement.localName);\n if (!isWithinCalendar) this.toggleOpen(false);\n };\n\n private addGlobalEventListeners() {\n const root: Document = this.hostElement.getRootNode() as Document;\n\n root.addEventListener('click', this.globalEvents);\n }\n\n private removeGlobalEventListeners() {\n const root: Document = this.hostElement.getRootNode() as Document;\n\n root.removeEventListener('click', this.globalEvents);\n }\n\n private openGrid() {\n requestAnimationFrame(() => {\n const { clientHeight, scrollHeight } = this.elList;\n const height = this.isClosing ? clientHeight : 0;\n this.elList.style.height = `${scrollHeight}px`;\n\n this.isExpanding = true;\n this.animateGrid(true, `${height}px`, this.maxHeight || `${this.elList.scrollHeight}px`);\n });\n }\n\n private closeGrid() {\n const { scrollHeight, clientHeight } = this.elList;\n const height = this.isExpanding ? clientHeight : scrollHeight;\n this.elList.style.height = `0px`;\n\n this.isClosing = true;\n this.animateGrid(false, `${height}px`, `0px`);\n }\n\n private animateGrid(open: boolean, startHeight: string, endHeight: string) {\n this.cancelAnimations();\n\n if (reduceMotion()) this.animationDuration = 0;\n else this.animationDuration = this.animationDurationDefault;\n\n this.animation = this.elList.animate(\n {\n height: [startHeight, endHeight],\n },\n {\n duration: this.animationDuration,\n easing: 'cubic-bezier(0.6, 0, 0.2, 1)',\n },\n );\n this.animation.onfinish = () => this.animationFinish();\n this.animation.oncancel = () => (open ? (this.isExpanding = false) : (this.isClosing = false));\n }\n\n private animationFinish() {\n this.cancelAnimations();\n this.elList.style.height = this.isClosing ? '0px' : '';\n this.isClosing = false;\n this.isExpanding = false;\n }\n\n private cancelAnimations() {\n if (this.animation) this.animation.cancel();\n }\n\n private emitEvents(option?: PnMultiselectOption, all?: boolean) {\n this.allOptions.emit(this.options);\n\n if (option) return this.selectedOption.emit(option);\n\n const data: { checked: boolean; searching: boolean; query?: string; found?: PnMultiselectOption[] } = {\n checked: all,\n searching: this.isSearching,\n };\n\n if (this.search && this.optionsTotal() !== this.optionsSearch().length) {\n data.query = this.searchQuery;\n data.found = this.optionsSearch();\n }\n\n this.selectedAllOptions.emit(data);\n }\n\n private optionsChecked(): PnMultiselectOption[] {\n const list = this.options?.reduce((sum, item) => {\n const subgroup = item.group ? [...item.group.filter(({ checked }) => checked)] : [];\n\n if (item.checked) sum.push(item);\n\n if (subgroup?.length) sum.push(...subgroup);\n\n return sum;\n }, []);\n\n return list;\n }\n\n private optionsTotal(): number {\n return this.options?.reduce((sum, item) => sum + (item?.group?.length ? item.group.length + 1 : 1), 0);\n }\n\n private optionsIndex(val: string): { indexGroup: number; indexNested?: number } {\n const findNested = ({ group = [] }: PnMultiselectOption) => group?.findIndex(({ value }) => value === val);\n\n const indexGroup = this.options.findIndex(option => option.value === val || findNested(option) !== -1);\n const indexNested = findNested(this.options?.[indexGroup]);\n\n return {\n indexGroup,\n indexNested,\n };\n }\n\n private optionsCheckedTotal(): number {\n return this.optionsChecked()?.length;\n }\n\n private optionsCheckedPreview(): PnMultiselectOption[] {\n return this.optionsChecked()?.slice(0, this.itemCount);\n }\n\n private optionsCheckedLabels(): string {\n return this.optionsChecked()\n ?.map(({ label }) => label)\n ?.join(', ');\n }\n\n private optionsSearch(): PnMultiselectOption[] {\n const list = this.options?.reduce((sum, item) => {\n const subgroup = item.group ? [...item.group.filter(({ hide }) => !hide)] : [];\n if (!item.hide) sum.push(item);\n if (subgroup?.length) sum.push(...subgroup);\n return sum;\n }, []);\n\n return list;\n }\n\n private noResults() {\n return this.optionsSearch()?.length === 0;\n }\n\n private isIndeterminate(groupIndex: number): boolean {\n const option = this.options?.[groupIndex];\n if (option?.group?.length) {\n const all = option.group.every(({ checked }) => checked);\n const none = option.group.every(({ checked }) => !checked);\n\n return !(all || none);\n }\n return false;\n }\n\n private optionSelect({ val, checked, chip }: { val: string; checked: boolean; chip?: number }) {\n if (val === this.allValue) return this.optionSelectAll(checked);\n\n const options = this.options;\n\n const { indexGroup, indexNested } = this.optionsIndex(val);\n\n const group = options[indexGroup]?.group;\n const nested = group?.[indexNested];\n\n if (nested?.value) {\n options[indexGroup].group[indexNested].checked = checked;\n\n const allSiblingsChecked = group?.every(({ checked }) => checked);\n\n if (allSiblingsChecked) options[indexGroup].checked = true;\n else options[indexGroup].checked = false;\n } else {\n options[indexGroup].checked = checked;\n if (group?.length) options[indexGroup].group = group?.map(opt => ({ ...opt, checked: checked }));\n }\n\n const option = indexNested === -1 ? options[indexGroup] : options[indexGroup].group[indexNested];\n\n this.emitEvents(option);\n\n this.options = [...options];\n\n if (typeof chip === 'number') {\n this.handleSrMesssage(`${this.translate('REMOVED')} ${option.label}`);\n\n requestAnimationFrame(() => {\n const index = chip === this.optionsCheckedTotal() ? chip - 1 : chip;\n const btn = Array.from(this.elChips.children)?.[index];\n btn?.querySelector('button').focus({ preventScroll: true });\n });\n }\n }\n\n private optionSelectAll(checked: boolean) {\n this.options = [\n ...this.options.map(option => {\n const opt = {\n ...option,\n checked: this.isSearching ? (option.hide ? option.checked : checked) : checked,\n };\n\n if (opt.group)\n opt.group = [\n ...opt.group.map(item => ({\n ...item,\n checked: this.isSearching ? (item.hide ? item.checked : checked) : checked,\n })),\n ];\n\n const allChecked = opt?.group?.every(({ checked }) => checked);\n if (opt?.group?.length) opt.checked = allChecked;\n\n return opt;\n }),\n ];\n\n this.emitEvents(null, checked);\n }\n\n private optionSelected(val: string): boolean {\n return !!this.optionsChecked()?.find(({ value, checked }) => value === val && checked);\n }\n\n private translate(prop: string): string {\n const text = translations?.[prop]?.[this.language || en];\n if (text.includes('{number}')) return text.replace('{number}', this.optionsSearch().length);\n return text;\n }\n\n private getRect(element: HTMLElement): DOMRect {\n return element?.getBoundingClientRect();\n }\n\n private ripple({ clientX, clientY, target }: MouseEvent) {\n const isKeyboard = clientX === 0 && clientY === 0;\n const element = (target as HTMLInputElement).nextElementSibling;\n const { x, width, y, top } = this.getRect(element as HTMLElement);\n const clientCor = isKeyboard ? { clientX: x + width - 24, clientY: y - top } : { clientX, clientY };\n\n ripple(clientCor, element as HTMLElement);\n }\n\n private handleSrMesssage(text: string) {\n this.srMessage = text;\n clearTimeout(this.srTimer);\n this.srTimer = setTimeout(() => (this.srMessage = null), 2000);\n }\n\n private handleDirection() {\n if (this.top) return (this.upwards = true);\n if (this.bottom) return (this.upwards = false);\n\n const { bottom, top } = this.getRect(this.elInput);\n\n const oneEm = 16;\n\n /*\n * Take the inner window height and subtract the elements bottom and 1em (16px)\n * If the max height of this calculation is less than the space above the element, open it upwards.\n * Do another calculation with the top value - 1em.\n */\n const offsetTop = window.innerHeight - bottom - oneEm;\n const offsetBottom = top - oneEm;\n\n /** Always point downwards, unless the space to the bottom is less than half of the top offset space. */\n this.upwards = offsetBottom / 2 > offsetTop;\n }\n\n private handleMaxHeight() {\n if (this.maxHeight) return this.elGroup.style.setProperty('--pn-select-max-height', this.maxHeight);\n\n const { bottom, top } = this.getRect(this.elInput);\n const inputHeight = this.upwards ? top : bottom;\n\n const offsetTop = getTotalHeightOffset();\n\n const offset = this.upwards ? offsetTop + 16 : 16;\n\n const maxHeight = this.upwards ? inputHeight - offset : window.innerHeight - inputHeight - offset;\n\n this.elGroup.style.setProperty('--pn-select-max-height', `${Math.ceil(maxHeight)}px`);\n }\n\n private handleWidth() {\n const { width } = this.getRect(this.elInput);\n this.elGroup.style.setProperty('--pn-select-options-width', `${Math.ceil(width)}px`);\n }\n\n private setFocus() {\n if (this.search) this.elInput.focus({ preventScroll: true });\n else this.elButton.focus({ preventScroll: true });\n }\n\n private hasError(): boolean {\n return this.invalid || !!this.error;\n }\n\n private hasMessage(): boolean {\n return !!this.helpertext || !!this.error;\n }\n\n private toggleOpen(state?: boolean) {\n if (typeof state === 'boolean' && state === this.open) return;\n this.open = state ?? !this.open;\n this.toggleSelect.emit({ open: this.open });\n }\n\n private handleInputKeyboard(event: KeyboardEvent) {\n event.stopImmediatePropagation();\n\n const { code } = event;\n\n if (code === 'Escape') return this.toggleOpen(false);\n if (!this.open && code.match(/^(Space|Enter)$|Arrow|^Key.*$/)) this.toggleOpen();\n }\n\n private setSearchQuery(value: string) {\n if (!this.open) this.toggleOpen(true);\n this.searchQuery = value;\n }\n\n private handleInputSearch() {\n if (this.isEmpty()) return;\n\n const term = this.searchQuery;\n const performSearch = ({ label, helpertext, value }: PnMultiselectOption): boolean => {\n return `${label} ${helpertext} ${value}`.trim().toLowerCase().includes(term.toLowerCase());\n };\n\n const options = this.options.map(option => {\n const foundNested = option?.group?.map(item => ({ ...item, hide: !performSearch(item) })) || [];\n\n const found = performSearch(option) || foundNested?.some(({ hide }) => !hide);\n\n option.hide = !found;\n if (option?.group?.length) option.group = [...foundNested];\n\n return option;\n });\n\n this.isSearching = term !== '';\n\n this.options = [...options];\n\n this.searchInput.emit({ query: term, found: this.optionsSearch() });\n }\n\n private getListItem(index: number): HTMLInputElement {\n const { value } = this.options[index];\n return this.elList.querySelector<HTMLInputElement>(`.pn-multiselect-option-input[value='${value}']`);\n }\n\n private getOptionIndex(val: string, triggers: (boolean | number)[], code?: string) {\n const total = this.optionsTotal() - 1;\n\n if (code === 'End') return total;\n if (code === 'Home') return 0;\n\n const valIndex = this.options.findIndex(({ value }) => value === val);\n\n const count = triggers.find(item => typeof item === 'number') as number;\n const index = valIndex + count;\n\n if (index >= total) return total;\n if (index <= 0) return 0;\n\n return index;\n }\n\n private checkboxNav(e: KeyboardEvent, val: string) {\n const { code } = e;\n\n const arrowUp = code === 'ArrowUp' && -1;\n const arrowDown = code === 'ArrowDown' && 1;\n const pageUp = code === 'PageUp' && -10;\n const pageDown = code === 'PageDown' && 10;\n const home = code === 'Home' && 0;\n const end = code === 'End' && this.optionsTotal() - 1;\n const tab = code === 'Tab';\n const space = code === 'Space';\n const enter = code === 'Enter';\n const escape = code === 'Escape';\n\n const triggers = [arrowUp, arrowDown, pageUp, pageDown, home, end, tab, space, enter, escape];\n\n if (!triggers.some(item => typeof item === 'number' || item)) return;\n\n if (tab || space || enter) return;\n\n e.stopImmediatePropagation();\n e.preventDefault();\n\n if (escape) {\n this.setFocus();\n return this.toggleOpen(false);\n }\n\n const item = this.getOptionIndex(val, triggers, code);\n return this.getListItem(item)?.focus();\n }\n\n private handleBlur(event: FocusEvent) {\n const target = event.target as HTMLElement;\n const related = event.relatedTarget as HTMLElement;\n\n const jumpingToChips = (related || target)?.className === 'pn-multiselect-chip-button';\n\n if (jumpingToChips) this.toggleOpen(false);\n }\n\n private handleLabel() {\n if (this.disabled) return;\n this.setFocus();\n }\n\n /** Check if there are no options in the list. */\n private isEmpty(): boolean {\n return (this.options?.length || 0) === 0;\n }\n\n private showSelectAll(): boolean {\n return this.selectAll && !this.isEmpty() && !this.noResults();\n }\n\n /** Check if the empty/nothing found should be visible. */\n private showEmptyOption() {\n return (this.isSearching && this.noResults()) || this.isEmpty();\n }\n\n private getPlaceholder(): string {\n const autoTranslation = this.search ? 'SEARCH' : 'SELECT_AN_OPTION';\n return this.placeholder || this.translate(autoTranslation);\n }\n\n private handleChange({ target }: InputEvent) {\n const { value, checked } = target as HTMLInputElement;\n this.optionSelect({ val: value, checked });\n }\n\n /** Display the \"X more selected options\" text. */\n private additonalOptions() {\n const count = this.optionsCheckedTotal() - this.itemCount;\n const single = `MORE_OPTION${count === 1 ? '' : 'S'}`;\n return `${count} ${this.translate(single)}`;\n }\n\n private describedBy(): string {\n const list = [this.search && this.idChips, this.srMessage && this.idSr, !!this.helpertext && this.idHelper].filter(\n Boolean,\n );\n if (list.length) return list.join(' ');\n return null;\n }\n\n private renderOption(\n {\n label,\n value,\n checked,\n helpertext,\n icon,\n id = `${this.selectId}-${value || label}`,\n invalid,\n disabled,\n hide,\n group,\n }: PnMultiselectOption,\n indexGroup?: number,\n indexNested?: number,\n ): HTMLLIElement {\n return (\n <li class=\"pn-multiselect-option\" key={id} hidden={hide}>\n <input\n type=\"checkbox\"\n id={id}\n class=\"pn-multiselect-option-input\"\n checked={checked ?? this.optionSelected(value)}\n indeterminate={indexNested === undefined && this.isIndeterminate(indexGroup)}\n name={this.name}\n value={value}\n disabled={this.disabled || disabled}\n required={this.required}\n aria-invalid={invalid ? 'true' : null}\n aria-describedby={helpertext ? `${id}-helper` : null}\n onClick={(event: MouseEvent) => this.ripple(event)}\n onKeyDown={(event: KeyboardEvent) => this.checkboxNav(event, value)}\n onBlur={(event: FocusEvent) => this.handleBlur(event)}\n />\n <div class=\"pn-multiselect-option-content\">\n {!!icon && <pn-icon icon={icon} color=\"blue900\" />}\n <div class=\"pn-multiselect-option-text\">\n <label class=\"pn-multiselect-option-label\" htmlFor={id}>\n <span>{label}</span>\n </label>\n {helpertext && (\n <p class=\"pn-multiselect-option-helper\" id={`${id}-helper`}>\n {helpertext}\n </p>\n )}\n </div>\n <div class=\"pn-multiselect-option-checkbox\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <polyline\n class=\"pn-multiselect-option-checkbox-checkmark-path\"\n points=\"4,12 9,17 20,6\"\n stroke-width=\"3\"\n />\n <polyline\n class=\"pn-multiselect-option-checkbox-indeterminate-path\"\n points=\"4,12 20,12\"\n stroke-width=\"3\"\n />\n </svg>\n </div>\n </div>\n {group?.length && (\n <ul class=\"pn-multiselect-optgroup\">{group?.map((option, i) => this.renderOption(option, indexGroup, i))}</ul>\n )}\n </li>\n );\n }\n\n private renderOptions(): HTMLUListElement {\n return (\n <ul\n id={this.idOptions}\n class=\"pn-multiselect-options\"\n data-open={this.open}\n data-upwards={this.upwards}\n data-moving={this.isClosing || this.isExpanding}\n onChange={(event: InputEvent) => this.handleChange(event)}\n style={{ height: '0px' }}\n ref={el => (this.elList = el)}\n >\n {this.showSelectAll() &&\n this.renderOption({\n label: this.translate(`SELECT_${this.isSearching ? 'FOUND' : 'ALL'}_OPTIONS`),\n value: this.allValue,\n checked: this.optionsTotal() === this.optionsCheckedTotal(),\n })}\n\n {this.options?.map((option, index) => this.renderOption(option, index))}\n\n {this.showEmptyOption() && (\n <li class=\"pn-multiselect-option\">\n <div class=\"pn-multiselect-option-content\" role=\"alert\">\n <div class=\"pn-multiselect-option-text\">\n <span class=\"pn-multiselect-option-label\">\n {this.translate(this.isEmpty() ? 'NO_OPTIONS' : 'NO_SEARCH_RESULTS')}\n </span>\n </div>\n </div>\n </li>\n )}\n </ul>\n );\n }\n\n private renderChips(): HTMLUListElement {\n return (\n <ul\n id={this.idChips}\n class=\"pn-multiselect-chips\"\n aria-label={this.translate('SELECTED_OPTIONS')}\n ref={el => (this.elChips = el)}\n >\n {this.optionsCheckedPreview()?.map(({ label, value }, index) => (\n <li\n class=\"pn-multiselect-chip\"\n aria-setsize={this.optionsCheckedTotal()}\n aria-posinset={index + 1}\n key={`${label}-${value}`}\n >\n <span class=\"pn-multiselect-chip-label\">{label}</span>\n <button\n type=\"button\"\n class=\"pn-multiselect-chip-button\"\n aria-label={`${this.translate('REMOVE')} ${label}`}\n onClick={() => this.optionSelect({ val: value, checked: false, chip: index })}\n >\n <pn-icon icon={close} small color=\"blue700\" />\n </button>\n </li>\n ))}\n {this.optionsCheckedTotal() > this.itemCount && (\n <li class=\"pn-multiselect-chip\" data-count>\n <span class=\"pn-multiselect-chip-label\">+ {this.additonalOptions()}</span>\n </li>\n )}\n </ul>\n );\n }\n\n render() {\n return (\n <Host>\n <fieldset class=\"pn-multiselect\" data-icon={!!this.icon} data-error={this.hasError()} disabled={this.disabled}>\n {this.label && (\n <legend id={this.idLegend} class=\"pn-multiselect-label\" onClick={() => this.handleLabel()}>\n <span>{this.label}</span>\n\n {!!this.optionsChecked()?.length && (\n <span>\n {this.optionsCheckedTotal()}/{this.optionsTotal()}\n </span>\n )}\n </legend>\n )}\n <div class=\"pn-multiselect-group\" ref={el => (this.elGroup = el)}>\n <div class=\"pn-multiselect-input\">\n {!!this.icon && <pn-icon class=\"pn-multiselect-icon\" data-custom icon={this.icon} />}\n\n <input\n tabindex={this.search ? null : '-1'}\n type={this.search ? 'search' : 'input'}\n id={this.selectId}\n class=\"pn-multiselect-element\"\n value={this.search ? this.searchQuery : this.optionsCheckedLabels()}\n name={this.selectName}\n placeholder={this.getPlaceholder()}\n required={this.search ? null : this.required}\n aria-labelledby={this.idLegend}\n aria-describedby={this.describedBy()}\n aria-controls={`${this.idOptions} ${this.search ? this.idChips : ''}`}\n aria-invalid={this.hasError()?.toString()}\n disabled={this.disabled}\n readonly={!this.search}\n onClick={() => (this.search && this.open ? null : this.toggleOpen())}\n onKeyDown={e => this.handleInputKeyboard(e)}\n onBlur={e => this.handleBlur(e)}\n onInput={e => this.search && this.setSearchQuery((e.target as HTMLInputElement).value)}\n ref={el => (this.elInput = el)}\n />\n\n {this.hasError() && (\n <pn-icon class=\"pn-multiselect-icon\" data-error icon={alert_exclamation_circle} color=\"warning\" />\n )}\n\n <button\n id={this.idButton}\n type=\"button\"\n class=\"pn-multiselect-button\"\n aria-label={this.translate(`BUTTON_${this.open ? 'CLOSE' : 'OPEN'}`)}\n aria-describedby={this.search ? null : this.selectId}\n aria-controls={this.idOptions}\n aria-expanded={this.open.toString()}\n onClick={() => this.toggleOpen()}\n ref={el => (this.elButton = el)}\n >\n <pn-icon class=\"pn-multiselect-icon\" icon={chevron_down} color=\"blue700\" />\n </button>\n </div>\n\n {this.renderOptions()}\n </div>\n\n {this.hasMessage() && (\n <p id={this.idHelper} class=\"pn-multiselect-description\" role={!!this.error ? 'alert' : null}>\n <span>{this.error || this.helpertext}</span>\n </p>\n )}\n\n {this.search && this.renderChips()}\n\n <slot />\n\n {this.search && (\n <p id={this.idSr} class=\"pn-multiselect-sr-only\" role=\"alert\" aria-live=\"assertive\">\n {this.srMessage && <span>{this.srMessage}</span>}\n </p>\n )}\n </fieldset>\n </Host>\n );\n }\n}\n"],"mappings":";;;;8OAAO,MAAMA,EAAe,CAC1BC,iBAAkB,CAChBC,GAAI,mBACJC,GAAI,sBACJC,GAAI,mBACJC,GAAI,qBACJC,GAAI,sBAENC,mBAAoB,CAClBL,GAAI,qBACJC,GAAI,uBACJC,GAAI,uBACJC,GAAI,6BACJC,GAAI,0BAENE,qBAAsB,CACpBN,GAAI,0BACJC,GAAI,2BACJC,GAAI,2BACJC,GAAI,+BACJC,GAAI,8BAENG,iBAAkB,CAChB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EpP,KAAK2P,iBAGP3P,KAAKkL,cACJsD,EAAA,KAAAE,IAAA,2CAAGzO,GAAID,KAAKM,SAAUmO,MAAM,6BAA6BsB,OAAQ/P,KAAKiL,MAAQ,QAAU,MACtFuD,EAAA,QAAAE,IAAA,4CAAO1O,KAAKiL,OAASjL,KAAKmL,aAI7BnL,KAAK6B,QAAU7B,KAAKgQ,cAErBxB,EAAA,QAAAE,IAAA,6CAEC1O,KAAK6B,QACJ2M,EAAA,KAAAE,IAAA,2CAAGzO,GAAID,KAAKQ,KAAMiO,MAAM,yBAAyBsB,KAAK,QAAO,YAAW,aACrE/P,KAAK8J,WAAa0E,EAAA,QAAAE,IAAA,4CAAO1O,KAAK8J,a","ignoreList":[]}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,c as t,g as i,h as n,a}from"./p-43660913.js";const s="pn-page-nav-item{position:relative;color:#ffffff;margin-right:0.5em;z-index:2;white-space:nowrap;scroll-snap-align:center;outline:none;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}pn-page-nav-item a{text-decoration:none;color:#ffffff;height:100%;width:100%;padding:0.5em;font-weight:500;border-radius:3em;border:0.0625em solid transparent;display:inline-flex;align-items:center;cursor:pointer;outline:none;transition:box-shadow 0.15s}pn-page-nav-item a:focus{box-shadow:0 0 0 0.1em #d3cecb}pn-page-nav-item a>pn-icon{margin-right:0.5em}pn-page-nav-item:last-of-type{margin-right:0}";const o=s;const r=class{constructor(i){e(this,i);this.itemselection=t(this,"itemselection",7);this.value=undefined;this.href=undefined;this.icon=undefined}get hostElement(){return i(this)}itemselection;select(e){if(this.value&&!this.href)e.preventDefault();this.itemselection.emit(this.value)}render(){return n(a,{key:"
|
|
6
|
-
//# sourceMappingURL=p-
|
|
5
|
+
import{r as e,c as t,g as i,h as n,a}from"./p-43660913.js";const s="pn-page-nav-item{position:relative;color:#ffffff;margin-right:0.5em;z-index:2;white-space:nowrap;scroll-snap-align:center;outline:none;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}pn-page-nav-item a{text-decoration:none;color:#ffffff;height:100%;width:100%;padding:0.5em;font-weight:500;border-radius:3em;border:0.0625em solid transparent;display:inline-flex;align-items:center;cursor:pointer;outline:none;transition:box-shadow 0.15s}pn-page-nav-item a:focus{box-shadow:0 0 0 0.1em #d3cecb}pn-page-nav-item a>pn-icon{margin-right:0.5em}pn-page-nav-item:last-of-type{margin-right:0}";const o=s;const r=class{constructor(i){e(this,i);this.itemselection=t(this,"itemselection",7);this.value=undefined;this.href=undefined;this.icon=undefined}get hostElement(){return i(this)}itemselection;select(e){if(this.value&&!this.href)e.preventDefault();this.itemselection.emit(this.value)}render(){return n(a,{key:"661feb5107ecf8dadaa62f137d8dd8ca54e83de7"},n("li",{key:"39f97a818c74ab3740592d997fc0ea9cf7ae9129"},n("a",{key:"a5528e3389075f88328bc8f64d608830f9c882ba",href:this.href||"#",class:"pn-page-nav-item",onClick:e=>this.select(e)},this.icon&&n("pn-icon",{key:"bee33613667acc22c223ed8192a0751df8186129",icon:this.icon,color:"white"}),n("slot",{key:"15d6a38762c81898f15f93f99eac390b92dc6209"}))))}};r.style=o;export{r as pn_page_nav_item};
|
|
6
|
+
//# sourceMappingURL=p-10532427.entry.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,c as t,g as n,h as s,a as i}from"./p-43660913.js";import{u as a}from"./p-f64d17a6.js";const
|
|
6
|
-
//# sourceMappingURL=p-
|
|
5
|
+
import{r as e,c as t,g as n,h as s,a as i}from"./p-43660913.js";import{u as a}from"./p-f64d17a6.js";const d="pn-segment{position:relative;color:#005d92;margin-right:0.5em;z-index:2;white-space:nowrap;scroll-snap-align:center;outline:none;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}pn-segment:last-of-type{margin-right:0}pn-segment .pn-segment{cursor:pointer;margin:0;padding:0;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-tap-highlight-color:transparent}pn-segment .pn-segment:disabled{cursor:not-allowed}pn-segment .pn-segment:disabled~.pn-segment-label{color:#5e554a}pn-segment .pn-segment:disabled~.pn-segment-label pn-icon .pn-icon-svg path{fill:#5e554a}pn-segment .pn-segment-label{height:100%;width:100%;padding:0.5em;border-radius:3em;font-weight:500;border:0.0625em solid transparent;display:inline-flex;gap:0.5em;align-items:center;-webkit-tap-highlight-color:transparent}";const o=d;const r=class{constructor(n){e(this,n);this.segmentHover=t(this,"segmentHover",7);this.label=undefined;this.name=undefined;this.value=undefined;this.selected=false;this.segmentid=this.id;this.icon=undefined;this.disabled=false}id=`pn-segment-${a()}`;get hostElement(){return n(this)}segmentHover;handleHover(e){this.segmentHover.emit(e)}render(){return s(i,{key:"aefe64a8e024e1677b3816973b9a91dc1048cb56",onMouseEnter:e=>this.handleHover(e)},s("input",{key:"4d36074e76de1648020c31d30ad38d8a67ca3984",class:"pn-segment",id:this.segmentid,name:this.name,checked:this.selected,type:"radio",value:this.value,disabled:this.disabled}),s("label",{key:"1e6e54d9140bd27266d426ad4e9ecf68f505a7ee",htmlFor:this.segmentid,class:"pn-segment-label"},this.icon&&s("pn-icon",{key:"5733ce0a43d33337785771da3071c0c9043fbdde",icon:this.icon,color:"blue700"}),s("span",{key:"07759d481e84a914e8c0525d0b21fcc85356c3db",class:"pn-segment-text"},this.label,s("slot",{key:"de3a243b862d18555f1073165f1b8b817d86aa04"}))))}};r.style=o;export{r as pn_segment};
|
|
6
|
+
//# sourceMappingURL=p-11ef58ab.entry.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* By PostNord.
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,c as a,g as s,h as e,a as n}from"./p-43660913.js";import{r as o,k as i,o as r,e as p}from"./p-f64d17a6.js";import{a as c}from"./p-9a18b612.js";import{a as d}from"./p-fc06684e.js";import{c as l}from"./p-ffa37a87.js";import{c as h}from"./p-92b0338a.js";const f='<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M12.874 2.514a1 1 0 0 0-1.748 0l-10 18A1 1 0 0 0 2 22h20a1 1 0 0 0 .874-1.486zM12 5.06 20.3 20H3.7zm-1.375 4.936a1.38 1.38 0 1 1 2.75 0l-.292 3.509a1.087 1.087 0 0 1-2.166 0zM12 15.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3" clip-rule="evenodd"/></svg>';const u=f;const b={HIDE:{sv:"Stäng meddelande",en:"Dismiss message",da:"Afvis besked",fi:"Hylkää viesti",no:"Avvis meldingen"}};const m="pn-toast{position:relative;display:block}pn-toast .pn-toast{position:relative;color:#2d2013;padding:1em;border-radius:0.5em;outline:none;font-size:1em;font-weight:400;background-color:#e0f8ff;border-color:#005d92;display:flex;align-items:center;gap:0.75em;visibility:visible;transition-property:visibility;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){pn-toast .pn-toast{transition-duration:0s;transition-delay:0s}}pn-toast .pn-toast .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}pn-toast .pn-toast[data-hide]{visibility:hidden;transition-delay:0.2s}pn-toast .pn-toast-heading{font-size:1em;font-style:normal;font-weight:500;margin:0}pn-toast .pn-toast-text{font-size:1em;font-style:normal;font-weight:400;margin:0 0 0.25em 0}pn-toast .pn-toast-text:last-child{margin-bottom:0}pn-toast .pn-toast-icon .pn-icon-svg path{fill:#2d2013}pn-toast .pn-toast-content{display:flex;flex-direction:column;align-self:center;align-items:flex-start;gap:0.25em;margin:0 auto 0 0}pn-toast .pn-toast-button{cursor:pointer;border-radius:50%;border:none;background:none;padding:0.25em;font-size:1em;display:flex;align-items:center;justify-content:center;transition-property:background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);outline:0.2rem solid transparent;outline-offset:0.2rem}@media (prefers-reduced-motion: reduce){pn-toast .pn-toast-button{transition-duration:0s;transition-delay:0s}}pn-toast .pn-toast-button:focus-visible{outline-color:#005d92;background-color:#8eddf9}pn-toast .pn-toast-button:hover{background-color:#8eddf9}pn-toast .pn-toast[data-appearance=success]{background-color:#dcf6e7}pn-toast .pn-toast[data-appearance=success] .pn-toast-button{outline:0.2rem solid transparent;outline-offset:0.2rem}pn-toast .pn-toast[data-appearance=success] .pn-toast-button:focus-visible{outline-color:#005e41;background-color:#abe3bb}pn-toast .pn-toast[data-appearance=success] .pn-toast-button:hover{background-color:#abe3bb}pn-toast .pn-toast[data-appearance=success] .pn-ripple{background-color:#005e41}pn-toast .pn-toast[data-appearance=success] .pn-toast-icon .pn-icon-svg path{fill:#005e41}pn-toast .pn-toast[data-appearance=success][data-temporary]{border-color:#005e41}pn-toast .pn-toast[data-appearance=warning]{background-color:#fff1e3}pn-toast .pn-toast[data-appearance=warning] .pn-toast-button{outline:0.2rem solid transparent;outline-offset:0.2rem}pn-toast .pn-toast[data-appearance=warning] .pn-toast-button:focus-visible{outline-color:#99290a;background-color:#ffc8a3}pn-toast .pn-toast[data-appearance=warning] .pn-toast-button:hover{background-color:#ffc8a3}pn-toast .pn-toast[data-appearance=warning] .pn-ripple{background-color:#99290a}pn-toast .pn-toast[data-appearance=warning] .pn-toast-icon .pn-icon-svg path{fill:#99290a}pn-toast .pn-toast[data-appearance=warning][data-temporary]{border-color:#ed7123}pn-toast .pn-toast[data-appearance=error]{background-color:#fdefee}pn-toast .pn-toast[data-appearance=error] .pn-toast-button{outline:0.2rem solid transparent;outline-offset:0.2rem}pn-toast .pn-toast[data-appearance=error] .pn-toast-button:focus-visible{outline-color:#a70707;background-color:#fbc2c1}pn-toast .pn-toast[data-appearance=error] .pn-toast-button:hover{background-color:#fbc2c1}pn-toast .pn-toast[data-appearance=error] .pn-ripple{background-color:#a70707}pn-toast .pn-toast[data-appearance=error] .pn-toast-icon .pn-icon-svg path{fill:#a70707}pn-toast .pn-toast[data-appearance=error][data-temporary]{border-color:#a70707}pn-toast .pn-toast[data-temporary]{border-style:solid;border-width:0.0625em;box-shadow:0 0.125em 0.25em rgba(0, 0, 0, 0.2)}";const g=m;const y=class{constructor(s){t(this,s);this.close=a(this,"close",7);this.hidden=a(this,"hidden",7);this.isClosing=false;this.isExpanding=false;this.hasSlottedContent=false;this.heading="";this.text="";this.toastId=undefined;this.appearance=undefined;this.temporary=false;this.icon=undefined;this.illustration=undefined;this.hide=false;this.closable=false;this.language=null}toast;button;duration=400;animationDuration=this.duration;animation;get hostElement(){return s(this)}handleHide(){if(o())this.animationDuration=0;else this.animationDuration=this.duration;this.hostElement.style.overflow="hidden";requestAnimationFrame((()=>{if(this.hide)this.closeToast();else this.openToast()}))}close;hidden;async componentWillLoad(){if(this.hide){this.hostElement.style.height="0";this.hostElement.style.overflow="hidden"}if(this.language===null)await i(this.hostElement);this.hasSlottedContent=!!this.hostElement.textContent}componentDidLoad(){if(!!this.heading&&!this.text&&!this.hasSlottedContent)console.warn("The %s prop is only available if you use the %s prop or slotted content.","heading","text")}getRect(t){return t.getBoundingClientRect()}openToast(){requestAnimationFrame((()=>{const{clientHeight:t}=this.toast;const{height:a}=this.getRect(this.hostElement);this.hostElement.style.height=`${a}px`;this.isExpanding=true;this.animateToast(true,`${a}px`,`${t}px`)}))}closeToast(){const{clientHeight:t}=this.hostElement;this.hostElement.style.height=`0px`;this.isClosing=true;this.animateToast(false,`${t}px`,`0px`)}animateToast(t,a,s){this.cancelAnimations();this.animation=this.hostElement.animate({height:[a,s]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"});this.animation.onfinish=()=>this.animationFinish();this.animation.oncancel=()=>t?this.isExpanding=false:this.isClosing=false}animationFinish(){this.cancelAnimations();if(this.hide)this.hidden.emit(this.hide);else{this.hostElement.style.height="";this.hostElement.style.overflow=""}this.isClosing=false;this.isExpanding=false}cancelAnimations(){if(this.animation)this.animation.cancel()}handleClick(t){this.hide=true;this.close.emit(this.hide);r(t,this.toast)}getIcon(){if(this.illustration)return"";if(this.icon)return this.icon;if(this.appearance==="success")return l;if(this.appearance==="warning")return u;if(this.appearance==="error")return c;return d}getRole(){return this.appearance==="error"?"alert":"status"}showIcon(){return!this.illustration}showIllustration(){return!this.showIcon()}showTitle(){return(this.hasSlottedContent||!!this.text)&&!!this.heading}translate(t){return b?.[t]?.[this.language||p]||t}isMoving(){return this.isClosing||this.isExpanding}hideToast(){return this.hide&&!this.isMoving()}render(){return e(n,{key:"b0f490bf139ccd8682e8d43f75ae99f6d5e4a054"},e("div",{key:"8bdd1b6525b579d06b82d762e56c0ec34c4bb822",id:this.toastId,class:"pn-toast",role:this.getRole(),"data-appearance":this.appearance,"data-temporary":this.temporary,"data-hide":this.hideToast(),ref:t=>this.toast=t},this.showIcon()&&e("pn-icon",{key:"fc5626dbbe0f5a5939179f02be8e1e70eec22ebd",class:"pn-toast-icon",icon:this.getIcon()}),e("div",{key:"f1aabfdd5d9e62d895cd4cfdaf31a7abb92e0749",class:"pn-toast-content"},this.showTitle()&&e("h4",{key:"6267fa5e2eb67c8a0d16506db0586f9b2fa6b18a",class:"pn-toast-heading"},this.heading),this.text&&e("p",{key:"b1a2ee4468223afc9c43bb57f3aa72c38d86cb1c",class:"pn-toast-text"},this.text),e("slot",{key:"2508212f2afc63d3faa5a189dd9ddba33cff3eaa"})),this.showIllustration()&&e("pn-illustration",{key:"bee93e5623aa57d1a1f765dd6ad13a8cdd1ea1d8",illustration:this.illustration,width:"5.5em",height:"5.5em"}),this.closable&&e("button",{key:"0db9441d732d60bd37446c92b0df34e44f1f61e9",class:"pn-toast-button",type:"button","aria-label":this.translate("HIDE"),onClick:t=>this.handleClick(t),ref:t=>this.button=t},e("pn-icon",{key:"a1325ada64366284633932d4ba775e67b3ae6f59",icon:h}))))}static get watchers(){return{hide:["handleHide"]}}};y.style=g;export{y as pn_toast};
|
|
6
|
+
//# sourceMappingURL=p-16fb83d9.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["icon","alert_exclamation_triangle","translations","HIDE","sv","en","da","fi","no","pnToastCss","PnToastStyle0","PnToast","toast","button","duration","animationDuration","this","animation","handleHide","reduceMotion","hostElement","style","overflow","requestAnimationFrame","hide","closeToast","openToast","close","hidden","componentWillLoad","height","language","awaitTopbar","hasSlottedContent","textContent","componentDidLoad","heading","text","console","warn","getRect","element","getBoundingClientRect","clientHeight","isExpanding","animateToast","isClosing","open","startHeight","endHeight","cancelAnimations","animate","easing","onfinish","animationFinish","oncancel","emit","cancel","handleClick","event","ripple","getIcon","illustration","appearance","check_circle","alert_exclamation_circle","alert_info_circle","getRole","showIcon","showIllustration","showTitle","translate","prop","isMoving","hideToast","render","h","Host","key","id","toastId","class","role","temporary","ref","el","width","closable","type","onClick"],"sources":["node_modules/pn-design-assets/pn-assets/icons/alert_exclamation_triangle.js","src/components/feedback/pn-toast/translation.ts","src/components/feedback/pn-toast/pn-toast.scss?tag=pn-toast","src/components/feedback/pn-toast/pn-toast.tsx"],"sourcesContent":["const icon = '<svg class=\"pn-icon-svg\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"#000\" fill-rule=\"evenodd\" d=\"M12.874 2.514a1 1 0 0 0-1.748 0l-10 18A1 1 0 0 0 2 22h20a1 1 0 0 0 .874-1.486zM12 5.06 20.3 20H3.7zm-1.375 4.936a1.38 1.38 0 1 1 2.75 0l-.292 3.509a1.087 1.087 0 0 1-2.166 0zM12 15.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3\" clip-rule=\"evenodd\"/></svg>';\nexport const alert_exclamation_triangle = icon;\nexport const alertExclamationTriangle = icon;\n","export const translations = {\n HIDE: {\n sv: 'Stäng meddelande',\n en: 'Dismiss message',\n da: 'Afvis besked',\n fi: 'Hylkää viesti',\n no: 'Avvis meldingen',\n },\n};\n","@use 'src/globals/main';\n\npn-toast {\n position: relative;\n display: block;\n}\n\npn-toast .pn-toast {\n position: relative;\n\n color: main.$gray900;\n padding: 1em;\n border-radius: 0.5em;\n\n outline: none;\n font-size: 1em;\n font-weight: 400;\n background-color: main.$blue50;\n border-color: main.$blue700;\n\n display: flex;\n align-items: center;\n gap: 0.75em;\n\n visibility: visible;\n\n @include main.pn-transition('visibility');\n\n @include main.pn-ripple(main.$blue700);\n\n &[data-hide] {\n visibility: hidden;\n transition-delay: main.$timing;\n }\n\n &-heading {\n font-size: 1em;\n font-style: normal;\n font-weight: 500;\n margin: 0;\n }\n\n &-text {\n font-size: 1em;\n font-style: normal;\n font-weight: 400;\n margin: 0 0 0.25em 0;\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n &-icon .pn-icon-svg path {\n fill: main.$gray900;\n }\n\n &-content {\n display: flex;\n flex-direction: column;\n align-self: center;\n align-items: flex-start;\n gap: 0.25em;\n margin: 0 auto 0 0;\n }\n\n &-button {\n cursor: pointer;\n border-radius: 50%;\n border: none;\n background: none;\n padding: 0.25em;\n font-size: 1em;\n display: flex;\n align-items: center;\n justify-content: center;\n @include main.pn-transition('background-color, outline-color');\n\n @include main.pn-focus(main.$blue700, main.$blue200);\n\n &:hover {\n background-color: main.$blue200;\n }\n }\n\n &[data-appearance='success'] {\n background-color: main.$green50;\n\n .pn-toast-button {\n @include main.pn-focus(main.$green700, main.$green200);\n\n &:hover {\n background-color: main.$green200;\n }\n }\n\n .pn-ripple {\n background-color: main.$green700;\n }\n\n .pn-toast-icon .pn-icon-svg path {\n fill: main.$green700;\n }\n\n &[data-temporary] {\n border-color: main.$green700;\n }\n }\n\n &[data-appearance='warning'] {\n background-color: main.$orange50;\n\n .pn-toast-button {\n @include main.pn-focus(main.$orange700, main.$orange200);\n\n &:hover {\n background-color: main.$orange200;\n }\n }\n\n .pn-ripple {\n background-color: main.$orange700;\n }\n\n .pn-toast-icon .pn-icon-svg path {\n fill: main.$orange700;\n }\n\n &[data-temporary] {\n border-color: main.$orange500;\n }\n }\n\n &[data-appearance='error'] {\n background-color: main.$coral50;\n\n .pn-toast-button {\n @include main.pn-focus(main.$warning, main.$coral200);\n\n &:hover {\n background-color: main.$coral200;\n }\n }\n\n .pn-ripple {\n background-color: main.$warning;\n }\n\n .pn-toast-icon .pn-icon-svg path {\n fill: main.$warning;\n }\n\n &[data-temporary] {\n border-color: main.$warning;\n }\n }\n\n &[data-temporary] {\n border-style: solid;\n border-width: 0.0625em;\n box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.2);\n }\n}\n","import type { PnLanguages } from '@/index';\nimport { awaitTopbar, en, ripple, reduceMotion } from '@/index';\nimport { Component, Host, Prop, h, Element, EventEmitter, Event, State, Watch } from '@stencil/core';\nimport {\n alert_info_circle,\n check_circle,\n alert_exclamation_triangle,\n alert_exclamation_circle,\n close,\n} from 'pn-design-assets/pn-assets/icons.js';\nimport { translations } from './translation';\n\n/**\n * This component is able to fill many roles of a classic toast.\n * It has 4 different colors, a temporary state, hide button, icon and illustration support.\n *\n * The `pn-toast` will expand to its parent containers full width.\n * Either limit the parent width or set a CSS rule to your specific width if needed.\n */\n@Component({\n tag: 'pn-toast',\n styleUrl: 'pn-toast.scss',\n})\nexport class PnToast {\n toast: HTMLDivElement;\n button: HTMLButtonElement;\n\n private readonly duration: number = 400;\n private animationDuration: number = this.duration;\n private animation: Animation;\n\n @Element() hostElement: HTMLElement;\n\n @State() isClosing = false;\n @State() isExpanding = false;\n\n @State() hasSlottedContent: boolean = false;\n\n /**\n * Set a title for the toast. Requires the `text` prop in order to work.\n * @description Can be used together with slotted content.\n */\n @Prop() heading?: string = '';\n /**\n * Set a paragraph of text for the toast.\n * @description Can be used together with slotted content.\n */\n @Prop() text?: string = '';\n /** Give the toast a HTML ID. */\n @Prop() toastId?: string;\n /**\n * Default color is blue, you also have the option of success (green), warning (orange) and error (red).\n * @category Visual\n */\n @Prop() appearance?: '' | 'success' | 'warning' | 'error';\n /**\n * This will apply a shadow and border to the toast.\n * @category Visual\n */\n @Prop() temporary: boolean = false;\n /**\n * Set an SVG icon.\n * @category Visual\n */\n @Prop() icon?: string;\n /**\n * Set an SVG illustration.\n * @category Visual\n */\n @Prop() illustration?: string;\n /**\n * Control the visibility of the toast. If the `closable` prop is active, the toast will set the `hide` prop on its own.\n * @see {@link closable}\n * @category Features\n */\n @Prop({ mutable: true, reflect: true }) hide: boolean = false;\n /**\n * Show close button.\n * @category Features\n */\n @Prop() closable: boolean = false;\n /**\n * Manually set the language, only needed if the `closable` prop is enabled.\n * @see {@link closable}\n * @category Features\n */\n @Prop({ mutable: true }) language?: PnLanguages = null;\n\n @Watch('hide')\n handleHide() {\n if (reduceMotion()) this.animationDuration = 0;\n else this.animationDuration = this.duration;\n\n this.hostElement.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n if (this.hide) this.closeToast();\n else this.openToast();\n });\n }\n\n /** Event fired when the close button is pressed. */\n @Event() close: EventEmitter<boolean>;\n /**\n * This event is fired when the toast is fully hidden after the animation is finished.\n * Triggers from the close button or if the prop `hide` is set to true.\n **/\n @Event() hidden: EventEmitter<boolean>;\n\n async componentWillLoad() {\n if (this.hide) {\n this.hostElement.style.height = '0';\n this.hostElement.style.overflow = 'hidden';\n }\n\n if (this.language === null) await awaitTopbar(this.hostElement);\n // Any text content at this stage means there is slotted content present.\n this.hasSlottedContent = !!this.hostElement.textContent;\n }\n\n componentDidLoad() {\n if (!!this.heading && !this.text && !this.hasSlottedContent)\n console.warn('The %s prop is only available if you use the %s prop or slotted content.', 'heading', 'text');\n }\n\n private getRect(element: HTMLElement): DOMRect {\n return element.getBoundingClientRect();\n }\n\n private openToast() {\n requestAnimationFrame(() => {\n const { clientHeight } = this.toast;\n const { height } = this.getRect(this.hostElement);\n\n this.hostElement.style.height = `${height}px`;\n\n this.isExpanding = true;\n this.animateToast(true, `${height}px`, `${clientHeight}px`);\n });\n }\n\n private closeToast() {\n const { clientHeight } = this.hostElement;\n this.hostElement.style.height = `0px`;\n\n this.isClosing = true;\n this.animateToast(false, `${clientHeight}px`, `0px`);\n }\n\n private animateToast(open: boolean, startHeight: string, endHeight: string) {\n this.cancelAnimations();\n this.animation = this.hostElement.animate(\n {\n height: [startHeight, endHeight],\n },\n {\n duration: this.animationDuration,\n easing: 'cubic-bezier(0.6, 0, 0.2, 1)',\n },\n );\n this.animation.onfinish = () => this.animationFinish();\n this.animation.oncancel = () => (open ? (this.isExpanding = false) : (this.isClosing = false));\n }\n\n private animationFinish() {\n this.cancelAnimations();\n if (this.hide) this.hidden.emit(this.hide);\n else {\n this.hostElement.style.height = '';\n this.hostElement.style.overflow = '';\n }\n this.isClosing = false;\n this.isExpanding = false;\n }\n\n private cancelAnimations() {\n if (this.animation) this.animation.cancel();\n }\n\n private handleClick(event: PointerEvent) {\n this.hide = true;\n this.close.emit(this.hide);\n ripple(event, this.toast);\n }\n\n private getIcon(): string {\n if (this.illustration) return '';\n if (this.icon) return this.icon;\n if (this.appearance === 'success') return check_circle;\n if (this.appearance === 'warning') return alert_exclamation_triangle;\n if (this.appearance === 'error') return alert_exclamation_circle;\n return alert_info_circle;\n }\n\n private getRole(): string {\n return this.appearance === 'error' ? 'alert' : 'status';\n }\n\n private showIcon(): boolean {\n return !this.illustration;\n }\n\n private showIllustration(): boolean {\n return !this.showIcon();\n }\n\n private showTitle(): boolean {\n return (this.hasSlottedContent || !!this.text) && !!this.heading;\n }\n\n private translate(prop: string): string {\n return translations?.[prop]?.[this.language || en] || prop;\n }\n\n private isMoving(): boolean {\n return this.isClosing || this.isExpanding;\n }\n\n private hideToast(): boolean {\n return this.hide && !this.isMoving();\n }\n\n render() {\n return (\n <Host>\n <div\n id={this.toastId}\n class=\"pn-toast\"\n role={this.getRole()}\n data-appearance={this.appearance}\n data-temporary={this.temporary}\n data-hide={this.hideToast()}\n ref={el => (this.toast = el)}\n >\n {this.showIcon() && <pn-icon class=\"pn-toast-icon\" icon={this.getIcon()} />}\n\n <div class=\"pn-toast-content\">\n {this.showTitle() && <h4 class=\"pn-toast-heading\">{this.heading}</h4>}\n {this.text && <p class=\"pn-toast-text\">{this.text}</p>}\n <slot />\n </div>\n\n {this.showIllustration() && <pn-illustration illustration={this.illustration} width=\"5.5em\" height=\"5.5em\" />}\n\n {this.closable && (\n <button\n class=\"pn-toast-button\"\n type=\"button\"\n aria-label={this.translate('HIDE')}\n onClick={(event: PointerEvent) => this.handleClick(event)}\n ref={el => (this.button = el)}\n >\n <pn-icon icon={close} />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":";;;;yQAAA,MAAMA,EAAO,+XACN,MAAMC,EAA6BD,ECDnC,MAAME,EAAe,CAC1BC,KAAM,CACJC,GAAI,mBACJC,GAAI,kBACJC,GAAI,eACJC,GAAI,gBACJC,GAAI,oBCNR,MAAMC,EAAa,22HACnB,MAAAC,EAAeD,E,MCsBFE,EAAO,M,oGAUG,M,iBACE,M,uBAEe,M,aAMX,G,UAKH,G,gEAYK,M,0DAgB2B,M,cAK5B,M,cAMsB,I,CA9DlDC,MACAC,OAEiBC,SAAmB,IAC5BC,kBAA4BC,KAAKF,SACjCG,U,iCA4DR,UAAAC,GACE,GAAIC,IAAgBH,KAAKD,kBAAoB,OACxCC,KAAKD,kBAAoBC,KAAKF,SAEnCE,KAAKI,YAAYC,MAAMC,SAAW,SAElCC,uBAAsB,KACpB,GAAIP,KAAKQ,KAAMR,KAAKS,kBACfT,KAAKU,WAAW,G,CAKhBC,MAKAC,OAET,uBAAMC,GACJ,GAAIb,KAAKQ,KAAM,CACbR,KAAKI,YAAYC,MAAMS,OAAS,IAChCd,KAAKI,YAAYC,MAAMC,SAAW,Q,CAGpC,GAAIN,KAAKe,WAAa,WAAYC,EAAYhB,KAAKI,aAEnDJ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B,MAC7CuC,EAAA,QAAAE,IAAA,8CAGD9D,KAAKqD,oBAAsBO,EAAA,mBAAAE,IAAA,2CAAiBhB,aAAc9C,KAAK8C,aAAcwB,MAAM,QAAQxD,OAAO,UAElGd,KAAKuE,UACJX,EAAA,UAAAE,IAAA,2CACEG,MAAM,kBACNO,KAAK,SAAQ,aACDxE,KAAKuD,UAAU,QAC3BkB,QAAU9B,GAAwB3C,KAAK0C,YAAYC,GACnDyB,IAAKC,GAAOrE,KAAKH,OAASwE,GAE1BT,EAAA,WAAAE,IAAA,2CAAS9E,KAAM2B,M","ignoreList":[]}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,c as n,g as t,h as o}from"./p-43660913.js";import{a as i}from"./p-d82ef4a1.js";const a="pn-page-nav-dropdown-item:first-of-type li>a,pn-page-nav-dropdown-item:first-of-type li>button{border-radius:0.5em 0.5em 0 0}pn-page-nav-dropdown-item:last-of-type li>a,pn-page-nav-dropdown-item:last-of-type li>button{border-radius:0 0 0.5em 0.5em}pn-page-nav-dropdown-item:last-of-type li>hr{display:none}pn-page-nav-dropdown-item li{font-size:inherit}pn-page-nav-dropdown-item li>*{color:#ffffff;font-size:inherit;border:none;padding:1em;margin:0;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:background 0.15s;outline:none;width:100%;font-weight:500}pn-page-nav-dropdown-item li>*>pn-icon{margin-left:1em}pn-page-nav-dropdown-item li>*.pn-page-nav-dropdown-item-active{background:#005d92}pn-page-nav-dropdown-item li>*.pn-page-nav-dropdown-item-active:hover,pn-page-nav-dropdown-item li>*.pn-page-nav-dropdown-item-active:focus{background:#005d92}pn-page-nav-dropdown-item li>*:hover,pn-page-nav-dropdown-item li>*:focus{background:#0d234b}pn-page-nav-dropdown-item li>*:focus{box-shadow:inset 0 0 0 0.1em #005d92, inset 0 0 0 0.2em #d3cecb}pn-page-nav-dropdown-item li>a{text-decoration:none}pn-page-nav-dropdown-item li>button{background:none}pn-page-nav-dropdown-item li>hr{bottom:0;padding:0;margin:0 auto;border-top:0.0625em solid #d3cecb;opacity:0.6;width:85%}";const d=a;const p=class{constructor(t){e(this,t);this.itemselection=n(this,"itemselection",7);this.value=undefined;this.href=undefined;this.active=false}get hostElement(){return t(this)}itemselection;select(e){if(this.value&&!this.href)e.preventDefault();this.itemselection.emit(this.value)}setClassnames(){let e="pn-page-nav-dropdown-item ";if(this.active)e+="pn-page-nav-dropdown-item-active ";return e}getType(){return this.value?null:"button"}getTagName(){return this.value?"a":"button"}render(){const e=this.getTagName();return o("li",{key:"
|
|
6
|
-
//# sourceMappingURL=p-
|
|
5
|
+
import{r as e,c as n,g as t,h as o}from"./p-43660913.js";import{a as i}from"./p-d82ef4a1.js";const a="pn-page-nav-dropdown-item:first-of-type li>a,pn-page-nav-dropdown-item:first-of-type li>button{border-radius:0.5em 0.5em 0 0}pn-page-nav-dropdown-item:last-of-type li>a,pn-page-nav-dropdown-item:last-of-type li>button{border-radius:0 0 0.5em 0.5em}pn-page-nav-dropdown-item:last-of-type li>hr{display:none}pn-page-nav-dropdown-item li{font-size:inherit}pn-page-nav-dropdown-item li>*{color:#ffffff;font-size:inherit;border:none;padding:1em;margin:0;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:background 0.15s;outline:none;width:100%;font-weight:500}pn-page-nav-dropdown-item li>*>pn-icon{margin-left:1em}pn-page-nav-dropdown-item li>*.pn-page-nav-dropdown-item-active{background:#005d92}pn-page-nav-dropdown-item li>*.pn-page-nav-dropdown-item-active:hover,pn-page-nav-dropdown-item li>*.pn-page-nav-dropdown-item-active:focus{background:#005d92}pn-page-nav-dropdown-item li>*:hover,pn-page-nav-dropdown-item li>*:focus{background:#0d234b}pn-page-nav-dropdown-item li>*:focus{box-shadow:inset 0 0 0 0.1em #005d92, inset 0 0 0 0.2em #d3cecb}pn-page-nav-dropdown-item li>a{text-decoration:none}pn-page-nav-dropdown-item li>button{background:none}pn-page-nav-dropdown-item li>hr{bottom:0;padding:0;margin:0 auto;border-top:0.0625em solid #d3cecb;opacity:0.6;width:85%}";const d=a;const p=class{constructor(t){e(this,t);this.itemselection=n(this,"itemselection",7);this.value=undefined;this.href=undefined;this.active=false}get hostElement(){return t(this)}itemselection;select(e){if(this.value&&!this.href)e.preventDefault();this.itemselection.emit(this.value)}setClassnames(){let e="pn-page-nav-dropdown-item ";if(this.active)e+="pn-page-nav-dropdown-item-active ";return e}getType(){return this.value?null:"button"}getTagName(){return this.value?"a":"button"}render(){const e=this.getTagName();return o("li",{key:"f4bdc8d41ea761f0fcca047fe70678cb83a0d0ad"},o(e,{key:"facd7296d4d26b872548c21491a901719e3bb278",href:this.href||"#",class:this.setClassnames(),type:this.getType(),onClick:e=>this.select(e),tabindex:"-1"},o("slot",{key:"c70b49d7079403d41fe68d799f621b58a0f377c4"}),o("pn-icon",{key:"3731f2a595d7234c78fe33458f1d2cdb3544aa20",icon:i,color:"white"})),o("hr",{key:"f5da263701f5b73566353a58268cbe59c48db725"}))}};p.style=d;export{p as pn_page_nav_dropdown_item};
|
|
6
|
+
//# sourceMappingURL=p-1cd57319.entry.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import{r as i,c as t,h as e,a as s}from"./p-43660913.js";import{w as r}from"./p-9b57dd6e.js";const n='pn-progress-indicator-step{display:flex;flex:1 0 4em}pn-progress-indicator-step:first-child{flex:0 0 auto}pn-progress-indicator-step:first-child .progress-line{display:none}pn-progress-indicator-step:first-child .info-container{transform:translateX(-50%);left:50%}.pn-progress-indicator-step{position:relative;display:flex;flex:1 0 4em;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent}.pn-progress-indicator-step .circle{width:1.5em;height:1.5em;padding:0.3rem;border-radius:50%;background-color:#f3f2f2;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .circle{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container{position:absolute;bottom:-2.5em;right:0;transform:translateX(50%) translateX(-1.2rem);white-space:nowrap;color:#f3f2f2;display:flex;align-items:center;flex-direction:column;font-size:1em;font-weight:normal;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .info-container{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container .pn-icon-svg{height:1.7em;width:1.7em;margin-bottom:0.1em}.pn-progress-indicator-step .info-container .pn-icon-svg path,.pn-progress-indicator-step .info-container .pn-icon-svg polygon{fill:#f3f2f2}.pn-progress-indicator-step .progress-line{flex:1 1 auto;margin:auto 4px;height:0.8rem;background-color:#f3f2f2;position:relative;overflow:hidden;pointer-events:none;border-radius:10rem}.pn-progress-indicator-step .progress-line:after{content:"";position:absolute;top:0;left:0;height:0.8rem;width:100%;background-color:#005d92;transform:translateX(-100%);transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);transition-delay:0.2s}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .progress-line:after{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step.active .info-container{color:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg path{fill:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg polygon{fill:#000000}.pn-progress-indicator-step.activated{cursor:pointer}.pn-progress-indicator-step.done .progress-line:after,.pn-progress-indicator-step.active .progress-line:after{transform:translateX(0)}.pn-progress-indicator-step.done .circle,.pn-progress-indicator-step.active .circle{background-color:#005d92}.pn-progress-indicator-step.done .checkmark-path{stroke-linecap:round;stroke-dasharray:27;stroke-dashoffset:-23;animation:dash 0.2s cubic-bezier(0.55, 0, 0.1, 1) both}@keyframes dash{to{stroke-dashoffset:0}}';const o=n;const a=class{constructor(e){i(this,e);this.setactivestep=t(this,"setactivestep",7);this.activated=undefined;this.done=undefined;this.activeStep=undefined;this.index=undefined;this.name=undefined;this.checked=false;this.active=undefined}setactivestep;setActiveStepHandler(){if(this.done||this.activated){this.setactivestep.emit(this.index)}}componentWillLoad(){this.checkStatus()}componentDidUpdate(){this.checkStatus()}checkStatus(){if(!this.done){this.done=this.checked||this.activeStep>this.index}if(this.active==="yes"){this.activated=true}else if(this.active==="no"){this.activated=false;this.done=false}else if(!this.activated){this.activated=this.activeStep>=this.index}}getClassNames(){let i="pn-progress-indicator-step";if(this.done||this.checked)i+=" done";if(this.activated)i+=" activated";if(this.activeStep===this.index)i+=" active";return i}render(){return e(s,{key:"
|
|
6
|
-
//# sourceMappingURL=p-
|
|
5
|
+
import{r as i,c as t,h as e,a as s}from"./p-43660913.js";import{w as r}from"./p-9b57dd6e.js";const n='pn-progress-indicator-step{display:flex;flex:1 0 4em}pn-progress-indicator-step:first-child{flex:0 0 auto}pn-progress-indicator-step:first-child .progress-line{display:none}pn-progress-indicator-step:first-child .info-container{transform:translateX(-50%);left:50%}.pn-progress-indicator-step{position:relative;display:flex;flex:1 0 4em;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent}.pn-progress-indicator-step .circle{width:1.5em;height:1.5em;padding:0.3rem;border-radius:50%;background-color:#f3f2f2;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .circle{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container{position:absolute;bottom:-2.5em;right:0;transform:translateX(50%) translateX(-1.2rem);white-space:nowrap;color:#f3f2f2;display:flex;align-items:center;flex-direction:column;font-size:1em;font-weight:normal;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .info-container{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container .pn-icon-svg{height:1.7em;width:1.7em;margin-bottom:0.1em}.pn-progress-indicator-step .info-container .pn-icon-svg path,.pn-progress-indicator-step .info-container .pn-icon-svg polygon{fill:#f3f2f2}.pn-progress-indicator-step .progress-line{flex:1 1 auto;margin:auto 4px;height:0.8rem;background-color:#f3f2f2;position:relative;overflow:hidden;pointer-events:none;border-radius:10rem}.pn-progress-indicator-step .progress-line:after{content:"";position:absolute;top:0;left:0;height:0.8rem;width:100%;background-color:#005d92;transform:translateX(-100%);transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1);transition-delay:0.2s}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .progress-line:after{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step.active .info-container{color:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg path{fill:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg polygon{fill:#000000}.pn-progress-indicator-step.activated{cursor:pointer}.pn-progress-indicator-step.done .progress-line:after,.pn-progress-indicator-step.active .progress-line:after{transform:translateX(0)}.pn-progress-indicator-step.done .circle,.pn-progress-indicator-step.active .circle{background-color:#005d92}.pn-progress-indicator-step.done .checkmark-path{stroke-linecap:round;stroke-dasharray:27;stroke-dashoffset:-23;animation:dash 0.2s cubic-bezier(0.55, 0, 0.1, 1) both}@keyframes dash{to{stroke-dashoffset:0}}';const o=n;const a=class{constructor(e){i(this,e);this.setactivestep=t(this,"setactivestep",7);this.activated=undefined;this.done=undefined;this.activeStep=undefined;this.index=undefined;this.name=undefined;this.checked=false;this.active=undefined}setactivestep;setActiveStepHandler(){if(this.done||this.activated){this.setactivestep.emit(this.index)}}componentWillLoad(){this.checkStatus()}componentDidUpdate(){this.checkStatus()}checkStatus(){if(!this.done){this.done=this.checked||this.activeStep>this.index}if(this.active==="yes"){this.activated=true}else if(this.active==="no"){this.activated=false;this.done=false}else if(!this.activated){this.activated=this.activeStep>=this.index}}getClassNames(){let i="pn-progress-indicator-step";if(this.done||this.checked)i+=" done";if(this.activated)i+=" activated";if(this.activeStep===this.index)i+=" active";return i}render(){return e(s,{key:"e5518f2d8c21c889738beb3a42e6865e7c64ac76",class:this.getClassNames(),onClick:()=>this.setActiveStepHandler()},e("div",{key:"b0f5f684ca12fda2b22b51945d3b0b41ab490fa3",class:"progress-line"}),e("div",{key:"8d05494d4cc77145e44270666b678cf48eb05a96",class:"info-container"},e("slot",{key:"864bea1ce3dd348be1abadcc3f8fb3757ac009b9"}),this.name),e("div",{key:"7d8394e5a4919404a137fd30ce125dfda5ed3034",class:"circle"},this.done||this.checked?e("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"},e("polyline",{class:"checkmark-path",fill:"none",points:"20,6 9,17 4,12",stroke:r,"stroke-miterlimit":"10","stroke-width":"3"})):""))}};a.style=o;export{a as pn_progress_indicator_step};
|
|
6
|
+
//# sourceMappingURL=p-1e7c31ed.entry.js.map
|