@postnord/pn-marketweb-components 4.3.6 → 4.3.8
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/{convert-9361e443.js → convert-aa209554.js} +27 -17
- package/cjs/convert-aa209554.js.map +1 -0
- package/cjs/pn-find-price.cjs.entry.js +1 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/cjs/pn-teaser-card.cjs.entry.js +1 -1
- package/cjs/pn-teaser-card.cjs.entry.js.map +1 -1
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +2 -2
- package/components/convert.js +26 -16
- package/components/convert.js.map +1 -1
- package/components/pn-teaser-card.js +1 -1
- package/components/pn-teaser-card.js.map +1 -1
- package/esm/{convert-ecca01b6.js → convert-a9a18794.js} +27 -17
- package/esm/convert-a9a18794.js.map +1 -0
- package/esm/pn-find-price.entry.js +1 -1
- package/esm/pn-find-service-and-price.entry.js +1 -1
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm/pn-teaser-card.entry.js +1 -1
- package/esm/pn-teaser-card.entry.js.map +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-00e6bb4b.js +2 -0
- package/pn-market-web-components/p-00e6bb4b.js.map +1 -0
- package/pn-market-web-components/{p-c4059cc1.entry.js → p-181e40ee.entry.js} +2 -2
- package/pn-market-web-components/{p-6d263c6e.entry.js → p-96d81eb2.entry.js} +2 -2
- package/pn-market-web-components/p-96d81eb2.entry.js.map +1 -0
- package/pn-market-web-components/{p-f8ccc718.entry.js → p-a0d7154f.entry.js} +2 -2
- package/pn-market-web-components/{p-413afe7c.entry.js → p-c18154a4.entry.js} +2 -2
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/umd/modules/@postnord/web-components/cem.json +12220 -0
- package/umd/modules/@postnord/web-components/cjs/{index-CfUQZtlH.js → index-DWu-2oJc.js} +144 -85
- package/umd/modules/@postnord/web-components/cjs/{index-CNdVg5VI.js → index-vOySuOUW.js} +1 -1
- package/umd/modules/@postnord/web-components/cjs/index.cjs.js +18 -16
- package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-accordion.cjs.entry.js +5 -4
- package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +6 -6
- package/umd/modules/@postnord/web-components/cjs/pn-button-dropdown.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-button_2.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +4 -4
- package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +63 -21
- package/umd/modules/@postnord/web-components/cjs/pn-choice-chip.cjs.entry.js +38 -18
- package/umd/modules/@postnord/web-components/cjs/pn-counter.cjs.entry.js +71 -37
- package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +185 -103
- package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +33 -27
- package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +73 -42
- package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-icon_2.cjs.entry.js +8 -10
- package/umd/modules/@postnord/web-components/cjs/pn-illustration.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +122 -89
- package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +24 -12
- package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +136 -52
- package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +4 -4
- package/umd/modules/@postnord/web-components/cjs/pn-progress-bar.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +61 -20
- package/umd/modules/@postnord/web-components/cjs/pn-range.cjs.entry.js +88 -43
- package/umd/modules/@postnord/web-components/cjs/pn-read-only-button.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +42 -25
- package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +16 -11
- package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +21 -21
- package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +90 -35
- package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +15 -10
- package/umd/modules/@postnord/web-components/cjs/pn-table.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +5 -4
- package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +88 -34
- package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +5 -5
- package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +56 -20
- package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-wizard.cjs.entry.js +71 -49
- package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +3 -3
- package/umd/modules/@postnord/web-components/collection/collection-manifest.json +4 -1
- package/umd/modules/@postnord/web-components/collection/components/buttons/pn-action-menu/pn-action-menu.css +1 -10
- package/umd/modules/@postnord/web-components/collection/components/content/pn-accordion/pn-accordion.js +5 -4
- package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-icon/pn-icon.css +13 -9
- package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-icon/pn-icon.js +12 -14
- package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-illustration/pn-illustration.css +6 -2
- package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-illustration/pn-illustration.js +7 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.css +4 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js +71 -13
- 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 +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.js +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.js +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/feedback/pn-wizard/pn-wizard.css +5 -5
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-wizard/pn-wizard.js +70 -45
- package/umd/modules/@postnord/web-components/collection/components/input/pn-checkbox/pn-checkbox.css +3 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-checkbox/pn-checkbox.js +213 -52
- package/umd/modules/@postnord/web-components/collection/components/input/pn-choice-chip/pn-choice-chip.css +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-choice-chip/pn-choice-chip.js +128 -68
- package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +305 -154
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +562 -275
- package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.css +21 -16
- package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js +114 -54
- package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.css +37 -50
- package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.js +159 -97
- package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/translation.js +7 -0
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.css +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +415 -264
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.css +13 -24
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +316 -131
- package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.css +3 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +223 -63
- package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.css +3 -0
- package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.js +357 -191
- package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.css +6 -9
- package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +177 -90
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.css +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +24 -24
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +84 -37
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.css +18 -14
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +237 -90
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.css +6 -5
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +255 -115
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.css +5 -3
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +216 -68
- 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.css +2 -2
- 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 +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 +4 -3
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.css +3 -3
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +11 -6
- 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/helpers.js +16 -14
- package/umd/modules/@postnord/web-components/components/helpers.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-accordion.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-action-menu.js +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 +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-icon2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-illustration2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-input2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-modal.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-multiselect.js +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 +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.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-progress-stepper2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-range.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 +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 +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 +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-wizard.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/esm/{index-CosyroON.js → index-DyhO6xPY.js} +1 -1
- package/umd/modules/@postnord/web-components/esm/{index-CAEP792y.js → index-XKg-ydzH.js} +144 -85
- package/umd/modules/@postnord/web-components/esm/index.js +19 -17
- package/umd/modules/@postnord/web-components/esm/loader.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-accordion.entry.js +5 -4
- package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +6 -6
- package/umd/modules/@postnord/web-components/esm/pn-button-dropdown.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-button_2.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +4 -4
- package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +63 -21
- package/umd/modules/@postnord/web-components/esm/pn-choice-chip.entry.js +38 -18
- package/umd/modules/@postnord/web-components/esm/pn-counter.entry.js +71 -37
- package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +185 -103
- package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +33 -27
- package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +73 -42
- package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-icon_2.entry.js +8 -10
- package/umd/modules/@postnord/web-components/esm/pn-illustration.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +122 -89
- package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +24 -12
- package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +137 -53
- package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +4 -4
- package/umd/modules/@postnord/web-components/esm/pn-progress-bar.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +61 -20
- package/umd/modules/@postnord/web-components/esm/pn-range.entry.js +88 -43
- package/umd/modules/@postnord/web-components/esm/pn-read-only-button.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +42 -25
- package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +16 -11
- package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +21 -21
- package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +90 -35
- package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +15 -10
- package/umd/modules/@postnord/web-components/esm/pn-table.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +5 -4
- package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +88 -34
- package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +5 -5
- package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +56 -20
- package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-wizard.entry.js +71 -49
- package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +4 -4
- package/umd/modules/@postnord/web-components/hydrate/index.js +1715 -940
- package/umd/modules/@postnord/web-components/hydrate/index.mjs +1715 -940
- package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-gnu/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node +0 -0
- package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-musl/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node +0 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +3 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +3 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +3312 -561
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +2 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +2 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-globals/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +246 -179
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +245 -180
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +59 -22
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +49 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +51 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +26 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +23 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +238 -169
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +59 -22
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +12 -3
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +59 -22
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +10 -10
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/460.node-fetch.js +3 -3
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +2 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +32 -32
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +4 -4
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +33 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +1 -1
- package/umd/modules/@postnord/web-components/package.json +16 -16
- package/umd/modules/@postnord/web-components/postnord-web-components/index.esm.js +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ea50ecd2.entry.js → p-020ee3f4.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-060b6ad2.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-0bf70d44.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-1ec52623.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-27c71f60.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-292a7591.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-3d2cac86.entry.js → p-3709c995.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-3db02038.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-2f4ad4a4.entry.js → p-4b9fb0fc.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-506a801d.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-518651ad.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-54917d9f.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-56ade97b.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-64207923.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-665af57e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-6d85c967.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-6e407015.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-01ac1c67.entry.js → p-720b8b90.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-7aea3de5.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-7b6ae520.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-83d02093.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-88344f8d.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-3c96cb61.entry.js → p-895acf7f.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-8cedf2e0.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-91c6a8cf.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-98a37be9.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-9a6c90e4.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-9d2ee77a.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-9d56fb64.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-BlM_xfdt.js → p-BWAVaTWQ.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-XKg-ydzH.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-a1f92f19.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-a31d93db.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-aa15469e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-db2b7e5d.entry.js → p-b45e58df.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b72f9866.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b0710b87.entry.js → p-b7a2e5b0.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c09179d6.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-38e44ed0.entry.js → p-ce2c2395.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d228b929.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d71054df.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d81b4ede.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e11b4af5.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c4c4c75b.entry.js → p-e5574624.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e6ad75f9.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e6cd4c7f.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ede550f0.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ef00ef4d.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
- package/umd/modules/@postnord/web-components/types/components/buttons/pn-action-menu/pn-action-menu.d.ts +111 -0
- package/umd/modules/@postnord/web-components/types/components/content/pn-accordion/pn-accordion.d.ts +2 -2
- package/umd/modules/@postnord/web-components/types/components/design-tokens/pn-icon/pn-icon.d.ts +5 -7
- package/umd/modules/@postnord/web-components/types/components/design-tokens/pn-illustration/pn-illustration.d.ts +8 -2
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-modal/pn-modal.d.ts +17 -6
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-toast/pn-toast.d.ts +100 -0
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-wizard/pn-wizard.d.ts +6 -1
- package/umd/modules/@postnord/web-components/types/components/input/pn-checkbox/pn-checkbox.d.ts +124 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-choice-chip/pn-choice-chip.d.ts +31 -15
- package/umd/modules/@postnord/web-components/types/components/input/pn-counter/pn-counter.d.ts +51 -27
- package/umd/modules/@postnord/web-components/types/components/input/pn-date-picker/pn-date-picker.d.ts +338 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-fieldset/pn-fieldset.d.ts +24 -15
- package/umd/modules/@postnord/web-components/types/components/input/pn-file-upload/pn-file-upload.d.ts +36 -27
- package/umd/modules/@postnord/web-components/types/components/input/pn-file-upload/translation.d.ts +7 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-input/pn-input.d.ts +89 -66
- package/umd/modules/@postnord/web-components/types/components/input/pn-multiselect/pn-multiselect.d.ts +265 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-radio-button/pn-radio-button.d.ts +124 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-range/pn-range.d.ts +73 -42
- package/umd/modules/@postnord/web-components/types/components/input/pn-search-field/pn-search-field.d.ts +32 -21
- package/umd/modules/@postnord/web-components/types/components/input/pn-segmented-control/pn-segmented-control.d.ts +19 -18
- package/umd/modules/@postnord/web-components/types/components/input/pn-segmented-control/segment/pn-segment.d.ts +12 -9
- package/umd/modules/@postnord/web-components/types/components/input/pn-select/pn-select.d.ts +51 -31
- package/umd/modules/@postnord/web-components/types/components/input/pn-textarea/pn-textarea.d.ts +58 -27
- package/umd/modules/@postnord/web-components/types/components/input/pn-toggle-switch/pn-toggle-switch.d.ts +36 -14
- package/umd/modules/@postnord/web-components/types/components.d.ts +1851 -511
- package/umd/modules/@postnord/web-components/types/globals/mixins/index.d.ts +21 -0
- package/umd/modules/@postnord/web-components/types/stencil-public-runtime.d.ts +23 -2
- package/umd/modules/@postnord/web-components/vscode-data.json +218 -38
- package/umd/pn-marketweb-salesforce-header.js +1 -1
- package/cjs/convert-9361e443.js.map +0 -1
- package/esm/convert-ecca01b6.js.map +0 -1
- package/pn-market-web-components/p-63ff7fa2.js +0 -2
- package/pn-market-web-components/p-63ff7fa2.js.map +0 -1
- package/pn-market-web-components/p-6d263c6e.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-0dd15cc3.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-0e94a4dd.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-0ed2ee53.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-109ba1fc.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-153311c8.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-1a3c49ba.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2610f8ab.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-267c323e.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2a364778.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2a682ff9.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-2cce8a9f.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-306ec758.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-3d459401.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-3deb5a9e.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-41c09d4d.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-484dfaa4.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-50116c0d.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-502b8430.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-5b7c1333.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-67f55491.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-838c17b9.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-849d48c6.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-89aaa3c8.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-8b2b6f5d.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-93db2b9e.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-97ffc4b3.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-CAEP792y.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b3c4e3e8.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b8c4423b.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ba59528f.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c0ae367c.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c843ae5e.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d1e27524.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d214e930.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d7091312.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e3fb693e.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e83de0b1.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-edc28eee.entry.js +0 -5
- /package/pn-market-web-components/{p-c4059cc1.entry.js.map → p-181e40ee.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-f8ccc718.entry.js.map → p-a0d7154f.entry.js.map} +0 -0
- /package/pn-market-web-components/{p-413afe7c.entry.js.map → p-c18154a4.entry.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import { t as transformTag, r as registerInstance, g as getElement, f as forceUpdate, h, a as Host } from './index-
|
|
5
|
+
import { t as transformTag, r as registerInstance, g as getElement, f as forceUpdate, h, a as Host } from './index-XKg-ydzH.js';
|
|
6
6
|
import { uuidv4, awaitTopbar, en } from './index.js';
|
|
7
7
|
import { a as alert_exclamation_circle } from './alert_exclamation_circle-B88w-Zxn.js';
|
|
8
8
|
import { c as check } from './check-BpI8peGn.js';
|
|
@@ -38,22 +38,21 @@ const translations = {
|
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const pnInputCss = () => `${transformTag("pn-input")}{display:inline-flex;flex-direction:column}${transformTag("pn-input")} .pn-input{--pn-input-offset-left:0em;--pn-input-offset-right:0em}${transformTag("pn-input")} .pn-input-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, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-input")} .pn-input-label{transition-duration:0s;transition-delay:0s}}${transformTag("pn-input")} .pn-input-label[data-compact]{position:absolute;top:1.5625em;left:calc(var(--pn-input-offset-left, 0px) + 0.75em + 0.0625em);margin:0;pointer-events:none;align-items:center;height:1.5em;max-width:calc(100% - (var(--pn-input-offset-left, 0px) + 0.75em) - (var(--pn-input-offset-right, 0px) + 0.75em));transform:translateY(-50%) scale(1) translateZ(0);transform-origin:0 0;transition-delay:0.2s}${transformTag("pn-input")} .pn-input-label[data-compact]>span{font-size:1em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;line-height:1.5em}${transformTag("pn-input")} .pn-input-label>span{font-size:0.875em}${transformTag("pn-input")} .pn-input-group{position:relative}${transformTag("pn-input")} .pn-input-element{width:100%;color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em calc(0.75em + var(--pn-input-offset-right)) 0.75em calc(0.75em + var(--pn-input-offset-left));font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${transformTag("pn-input")} .pn-input-element:-webkit-autofill,${transformTag("pn-input")} .pn-input-element:-webkit-autofill:hover,${transformTag("pn-input")} .pn-input-element:-webkit-autofill:focus,${transformTag("pn-input")} .pn-input-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${transformTag("pn-input")} .pn-input-element{outline:0.2rem solid transparent;outline-offset:0.2rem}${transformTag("pn-input")} .pn-input-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${transformTag("pn-input")} .pn-input-element{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-input")} .pn-input-element{transition-duration:0s;transition-delay:0s}}${transformTag("pn-input")} .pn-input-element[data-compact]{text-align:left;padding-top:1.125em;padding-bottom:0.375em;max-width:unset}${transformTag("pn-input")} .pn-input-element[data-compact]::placeholder{color:transparent}${transformTag("pn-input")} .pn-input-element[data-compact]:focus+.pn-input-label,${transformTag("pn-input")} .pn-input-element[data-compact]:not(:placeholder-shown)+.pn-input-label{transform:translateY(-85%) scale(0.75);transition-delay:0s}${transformTag("pn-input")} .pn-input-element::placeholder{color:#5e554a;font-weight:normal}${transformTag("pn-input")} .pn-input-element:hover{border-color:#005d92}${transformTag("pn-input")} .pn-input-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${transformTag("pn-input")} .pn-input-element:read-only{border-color:#ffffff}${transformTag("pn-input")} .pn-input-element:disabled~.pn-input-eyecandy>${transformTag("pn-icon")}
|
|
41
|
+
const pnInputCss = () => `${transformTag("pn-input")}{display:inline-flex;flex-direction:column}${transformTag("pn-input")} .pn-input{--pn-input-offset-left:0em;--pn-input-offset-right:0em}${transformTag("pn-input")} .pn-input-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, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-input")} .pn-input-label{transition-duration:0s;transition-delay:0s}}${transformTag("pn-input")} .pn-input-label[data-compact]{position:absolute;top:1.5625em;left:calc(var(--pn-input-offset-left, 0px) + 0.75em + 0.0625em);margin:0;pointer-events:none;align-items:center;height:1.5em;max-width:calc(100% - (var(--pn-input-offset-left, 0px) + 0.75em) - (var(--pn-input-offset-right, 0px) + 0.75em));transform:translateY(-50%) scale(1) translateZ(0);transform-origin:0 0;transition-delay:0.2s}${transformTag("pn-input")} .pn-input-label[data-compact]>span{font-size:1em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;line-height:1.5em}${transformTag("pn-input")} .pn-input-label>span{font-size:0.875em}${transformTag("pn-input")} .pn-input-group{position:relative}${transformTag("pn-input")} .pn-input-element{width:100%;color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em calc(0.75em + var(--pn-input-offset-right)) 0.75em calc(0.75em + var(--pn-input-offset-left));font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${transformTag("pn-input")} .pn-input-element:-webkit-autofill,${transformTag("pn-input")} .pn-input-element:-webkit-autofill:hover,${transformTag("pn-input")} .pn-input-element:-webkit-autofill:focus,${transformTag("pn-input")} .pn-input-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${transformTag("pn-input")} .pn-input-element{outline:0.2rem solid transparent;outline-offset:0.2rem}${transformTag("pn-input")} .pn-input-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${transformTag("pn-input")} .pn-input-element{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-input")} .pn-input-element{transition-duration:0s;transition-delay:0s}}${transformTag("pn-input")} .pn-input-element[data-compact]{text-align:left;padding-top:1.125em;padding-bottom:0.375em;max-width:unset}${transformTag("pn-input")} .pn-input-element[data-compact]::placeholder{color:transparent}${transformTag("pn-input")} .pn-input-element[data-compact]:focus+.pn-input-label,${transformTag("pn-input")} .pn-input-element[data-compact]:not(:placeholder-shown)+.pn-input-label{transform:translateY(-85%) scale(0.75);transition-delay:0s}${transformTag("pn-input")} .pn-input-element::placeholder{color:#5e554a;font-weight:normal}${transformTag("pn-input")} .pn-input-element:hover{border-color:#005d92}${transformTag("pn-input")} .pn-input-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${transformTag("pn-input")} .pn-input-element:read-only{border-color:#ffffff}${transformTag("pn-input")} .pn-input-element:disabled~.pn-input-eyecandy>${transformTag("pn-icon")} .pn-icon-svg>path{fill:#969087}${transformTag("pn-input")} .pn-input-element::-webkit-calendar-picker-indicator{visibility:hidden;display:none !important}${transformTag("pn-input")} .pn-input-element::-webkit-textfield-decoration-container,${transformTag("pn-input")} .pn-input-element::-webkit-search-cancel-button,${transformTag("pn-input")} .pn-input-element::-webkit-inner-spin-button,${transformTag("pn-input")} .pn-input-element::-webkit-outer-spin-button,${transformTag("pn-input")} .pn-input-element::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}${transformTag("pn-input")} .pn-input-element[type=number]{appearance:textfield}${transformTag("pn-input")} .pn-input-eyecandy{position:absolute;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:0.5em;height:1.5em}${transformTag("pn-input")} .pn-input-eyecandy[data-prefix]{left:0.75em}${transformTag("pn-input")} .pn-input-eyecandy[data-suffix]{right:0.75em}${transformTag("pn-input")} .pn-input-text{color:#5e554a;font-weight:400;line-height:1.5em}${transformTag("pn-input")} .pn-input-message{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${transformTag("pn-input")} .pn-input-message[hidden],${transformTag("pn-input")} .pn-input-message>span[hidden]{display:none}${transformTag("pn-input")} .pn-input[data-error]>.pn-input-label{color:#a70707}${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element{border-color:#a70707}${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element:hover{border-color:#500715}${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element:-webkit-autofill,${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element:-webkit-autofill:hover,${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element:-webkit-autofill:focus,${transformTag("pn-input")} .pn-input[data-error]>.pn-input-group>.pn-input-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #fef7f6 inset;-webkit-text-fill-color:#2d2013}${transformTag("pn-input")} .pn-input[data-error]>.pn-input-message[role=alert]{color:#a70707}${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-label{color:#005e41}${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element{border-color:#005e41}${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element:hover{border-color:#002f24}${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element:focus-visible{background-color:#ffffff;border-color:#005e41;outline-color:#005e41}${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element:-webkit-autofill,${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element:-webkit-autofill:hover,${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element:-webkit-autofill:focus,${transformTag("pn-input")} .pn-input[data-valid]>.pn-input-group>.pn-input-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #edfbf3 inset;-webkit-text-fill-color:#2d2013}`;
|
|
42
42
|
|
|
43
43
|
const PnInput = class {
|
|
44
44
|
constructor(hostRef) {
|
|
45
45
|
registerInstance(this, hostRef);
|
|
46
46
|
}
|
|
47
47
|
id = `pn-input-${uuidv4()}`;
|
|
48
|
-
|
|
48
|
+
idHelper = `${this.id}-helper`;
|
|
49
|
+
idError = `${this.id}-error`;
|
|
49
50
|
prefix;
|
|
50
51
|
suffix;
|
|
51
52
|
mo;
|
|
52
53
|
get hostElement() { return getElement(this); }
|
|
53
54
|
offsetLeft = 0;
|
|
54
55
|
offsetRight = 0;
|
|
55
|
-
showHelperSlot = false;
|
|
56
|
-
showErrorSlot = false;
|
|
57
56
|
showPassword = false;
|
|
58
57
|
togglePassword() {
|
|
59
58
|
this.showPassword = !this.showPassword;
|
|
@@ -62,70 +61,38 @@ const PnInput = class {
|
|
|
62
61
|
label;
|
|
63
62
|
/** Text message placed underneath the input field. */
|
|
64
63
|
helpertext;
|
|
65
|
-
/**
|
|
66
|
-
* Provide a unique HTML id to connect the input with the label.
|
|
67
|
-
* A unique uuid ID will be generated if this field is left empty.
|
|
68
|
-
**/
|
|
69
|
-
inputid = this.id;
|
|
70
|
-
/** Set the value of the input. */
|
|
71
|
-
value = '';
|
|
72
64
|
/**
|
|
73
65
|
* Set the language manually for the translations of show/hide/clear button text.
|
|
74
66
|
* Not needed if you have the pntopbar on the page.
|
|
75
67
|
**/
|
|
76
|
-
language =
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Select an icon to display before the input field value.
|
|
81
|
-
* `icon` takes precedence over the `text-prefix` prop.
|
|
82
|
-
*
|
|
83
|
-
* @see {@link textPrefix}
|
|
84
|
-
* @category Visual
|
|
85
|
-
**/
|
|
86
|
-
icon;
|
|
87
|
-
/**
|
|
88
|
-
* Set a small text before the input field value.
|
|
89
|
-
* Cannot be used together with an `icon` at the same time.
|
|
90
|
-
*
|
|
91
|
-
* @see {@link icon}
|
|
92
|
-
* @see {@link textSuffix}
|
|
93
|
-
* @category Visual
|
|
94
|
-
**/
|
|
95
|
-
textPrefix;
|
|
96
|
-
/**
|
|
97
|
-
* Set a small text after the input field value.
|
|
98
|
-
* Cannot be used with the `text-prefix` prop at the same time.
|
|
99
|
-
*
|
|
100
|
-
* @see {@link textPrefix}
|
|
101
|
-
* @category Visual
|
|
102
|
-
**/
|
|
103
|
-
textSuffix;
|
|
104
|
-
/** pn-input supports: `text`, `password`, `url`, `tel`, `search`, `number` & `email`. @category HTML input */
|
|
68
|
+
language = undefined;
|
|
69
|
+
/** Set the value of the input. @category Native attributes */
|
|
70
|
+
value = '';
|
|
71
|
+
/** pn-input supports: `text`, `password`, `url`, `tel`, `search`, `number` & `email`. @category Native attributes */
|
|
105
72
|
type = 'text';
|
|
106
73
|
/**
|
|
107
74
|
* HTML input name. Setting a name will help the browser understand what type of data the input have
|
|
108
75
|
* and can better assist with autofill data based on previous entires much better.
|
|
109
|
-
*
|
|
110
|
-
* @category HTML input
|
|
76
|
+
* @category Native attributes
|
|
111
77
|
**/
|
|
112
78
|
name;
|
|
113
79
|
/**
|
|
114
80
|
* Provide a placeholder text. Remember that this is no replacement for a label.
|
|
115
81
|
* The placeholder should be a nice addition to the label/helpertext, not important information.
|
|
116
82
|
*
|
|
117
|
-
* @category
|
|
83
|
+
* @category Native attributes
|
|
118
84
|
**/
|
|
119
85
|
placeholder;
|
|
120
86
|
/**
|
|
121
87
|
* Let the browser know what type of autocorrects the input should use.
|
|
122
|
-
* Works much better if a `name` and `
|
|
88
|
+
* Works much better if a `name` and `pn-id` is supplied.
|
|
123
89
|
* @see {@link name}
|
|
124
90
|
* @see {@link inputid}
|
|
125
91
|
*
|
|
126
|
-
* @category
|
|
92
|
+
* @category Native attributes
|
|
93
|
+
*/
|
|
127
94
|
autocomplete;
|
|
128
|
-
/** The maximum number of characters the user should be able to add, also adds a visible counter. @category
|
|
95
|
+
/** The maximum number of characters the user should be able to add, also adds a visible counter. @category Native attributes */
|
|
129
96
|
maxlength;
|
|
130
97
|
/**
|
|
131
98
|
* Hint the browser about what type of virtual keyboard should be used.
|
|
@@ -134,35 +101,62 @@ const PnInput = class {
|
|
|
134
101
|
*
|
|
135
102
|
* Leave empty or with a `''` value if you want the browsers default behaviour (`text`).
|
|
136
103
|
*
|
|
137
|
-
* @category
|
|
104
|
+
* @category Native attributes
|
|
138
105
|
**/
|
|
139
106
|
inputmode;
|
|
140
|
-
/** Point to a datalist element for this input. @category
|
|
107
|
+
/** Point to a datalist element for this input. @category Native attributes */
|
|
141
108
|
list;
|
|
142
|
-
/** Pattern prop. @category
|
|
109
|
+
/** Pattern prop. @category Native attributes */
|
|
143
110
|
pattern;
|
|
144
|
-
/** Set the `min` value of the `number` input. @category
|
|
111
|
+
/** Set the `min` value of the `number` input. @category Native attributes */
|
|
145
112
|
min;
|
|
146
|
-
/** Set the `max` value of the `number` input. @category
|
|
113
|
+
/** Set the `max` value of the `number` input. @category Native attributes */
|
|
147
114
|
max;
|
|
148
|
-
/** Set a `step` for the number input. @category
|
|
115
|
+
/** Set a `step` for the number input. @category Native attributes */
|
|
149
116
|
step;
|
|
150
|
-
/**
|
|
151
|
-
arialabel;
|
|
152
|
-
/** Set the ID of what this input controls. @category HTML input */
|
|
153
|
-
ariacontrols;
|
|
154
|
-
/** Set the input as `required`. @category State */
|
|
117
|
+
/** Set the input as `required`. @category Native attributes */
|
|
155
118
|
required = false;
|
|
156
|
-
/** Set the input as `
|
|
157
|
-
disabled = false;
|
|
158
|
-
/** Set the input as `readonly`. @category State */
|
|
119
|
+
/** Set the input as `readonly`. @category Native attributes */
|
|
159
120
|
readonly = false;
|
|
160
|
-
/** Set the input as `
|
|
121
|
+
/** Set the input as `disabled`. @category Native attributes */
|
|
122
|
+
disabled = false;
|
|
123
|
+
/**
|
|
124
|
+
* Use the compact label variant. The `placeholder` you provide will not be visible if used at the same time.
|
|
125
|
+
* @since v7.21.0
|
|
126
|
+
* @category Features
|
|
127
|
+
*/
|
|
128
|
+
compact = false;
|
|
129
|
+
/**
|
|
130
|
+
* Select an icon to display before the input field value.
|
|
131
|
+
* `icon` takes precedence over the `text-prefix` prop.
|
|
132
|
+
*
|
|
133
|
+
* @see {@link textPrefix}
|
|
134
|
+
* @category Features
|
|
135
|
+
**/
|
|
136
|
+
icon;
|
|
137
|
+
/**
|
|
138
|
+
* Set a small text before the input field value.
|
|
139
|
+
* Cannot be used together with an `icon` at the same time.
|
|
140
|
+
*
|
|
141
|
+
* @see {@link icon}
|
|
142
|
+
* @see {@link textSuffix}
|
|
143
|
+
* @category Features
|
|
144
|
+
**/
|
|
145
|
+
textPrefix;
|
|
146
|
+
/**
|
|
147
|
+
* Set a small text after the input field value.
|
|
148
|
+
* Cannot be used with the `text-prefix` prop at the same time.
|
|
149
|
+
*
|
|
150
|
+
* @see {@link textPrefix}
|
|
151
|
+
* @category Features
|
|
152
|
+
**/
|
|
153
|
+
textSuffix;
|
|
154
|
+
/** Set the input as `valid`. Provides a green color and a check icon. @category Features */
|
|
161
155
|
valid = false;
|
|
162
156
|
/**
|
|
163
157
|
* Set the input as `invalid`. Provides a red color and red warning icon.
|
|
164
158
|
* @see{@link error Provide an error message.}
|
|
165
|
-
* @category
|
|
159
|
+
* @category Features
|
|
166
160
|
**/
|
|
167
161
|
invalid = false;
|
|
168
162
|
/**
|
|
@@ -170,9 +164,33 @@ const PnInput = class {
|
|
|
170
164
|
*
|
|
171
165
|
* Error message; will take precedence over helpertext if both are provided.
|
|
172
166
|
* @see{@link invalid Set invalid without an error message.}
|
|
173
|
-
* @category
|
|
167
|
+
* @category Features
|
|
174
168
|
**/
|
|
175
169
|
error;
|
|
170
|
+
/** Set a custom ID for the input (default is a generated UUID). @since v7.25.0 @category HTML attributes */
|
|
171
|
+
pnId;
|
|
172
|
+
/**
|
|
173
|
+
* Provide the label via an aria attribute.
|
|
174
|
+
* We strongly recommend you use the `label` prop instead.
|
|
175
|
+
* @since v7.25.0
|
|
176
|
+
* @category HTML attributes
|
|
177
|
+
*/
|
|
178
|
+
pnAriaLabel;
|
|
179
|
+
/**
|
|
180
|
+
* Provide the label from another element via its ID.
|
|
181
|
+
* We strongly recommend you use the `label` prop instead.
|
|
182
|
+
* @since v7.25.0
|
|
183
|
+
* @category HTML attributes
|
|
184
|
+
*/
|
|
185
|
+
pnAriaLabelledby;
|
|
186
|
+
/** Set the ID of what this input controls. @since v7.25.0 @category HTML attributes */
|
|
187
|
+
pnAriaControls;
|
|
188
|
+
/** Set a custom ID for the input (default is a generated UUID). @deprecated Use `pn-id` instead. @category HTML attributes */
|
|
189
|
+
inputid;
|
|
190
|
+
/** While you can use the `aria-label`, using a `label` is far more accessible. @deprecated Use `pn-aria-label` instead. @category HTML attributes */
|
|
191
|
+
arialabel;
|
|
192
|
+
/** Set the ID of what this input controls. @deprecated Use `pn-aria-controls` instead. @category HTML attributes */
|
|
193
|
+
ariacontrols;
|
|
176
194
|
handleOffset() {
|
|
177
195
|
requestAnimationFrame(() => {
|
|
178
196
|
const left = this.prefix?.clientWidth ? this.prefix.clientWidth + 8 : 0;
|
|
@@ -181,15 +199,14 @@ const PnInput = class {
|
|
|
181
199
|
this.offsetRight = right;
|
|
182
200
|
});
|
|
183
201
|
}
|
|
184
|
-
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
202
|
+
handleId() {
|
|
203
|
+
this.idHelper = `${this.getId()}-helper`;
|
|
204
|
+
this.idError = `${this.getId()}-error`;
|
|
187
205
|
}
|
|
188
206
|
connectedCallback() {
|
|
189
207
|
this.mo = new MutationObserver(() => {
|
|
190
208
|
forceUpdate(this.hostElement);
|
|
191
209
|
this.handleOffset();
|
|
192
|
-
this.handleMessage();
|
|
193
210
|
});
|
|
194
211
|
this.mo.observe(this.hostElement, { childList: true, subtree: true });
|
|
195
212
|
}
|
|
@@ -198,15 +215,15 @@ const PnInput = class {
|
|
|
198
215
|
this.mo.disconnect();
|
|
199
216
|
}
|
|
200
217
|
async componentWillLoad() {
|
|
201
|
-
this.
|
|
202
|
-
if (this.inputid !== this.id)
|
|
203
|
-
this.idMessage = `${this.inputid}-message`;
|
|
204
|
-
if (this.language === null)
|
|
218
|
+
if (this.language === undefined)
|
|
205
219
|
await awaitTopbar(this.hostElement);
|
|
206
220
|
}
|
|
207
221
|
componentDidLoad() {
|
|
208
222
|
this.handleOffset();
|
|
209
223
|
}
|
|
224
|
+
getId() {
|
|
225
|
+
return this.pnId || this.inputid || this.id;
|
|
226
|
+
}
|
|
210
227
|
setVal(event) {
|
|
211
228
|
const target = event.composedPath?.()[0];
|
|
212
229
|
this.value = target.value;
|
|
@@ -223,26 +240,26 @@ const PnInput = class {
|
|
|
223
240
|
return translations?.[prop]?.[this.language || en];
|
|
224
241
|
}
|
|
225
242
|
hasHelperText() {
|
|
226
|
-
return this.helpertext?.length > 0 || this.
|
|
243
|
+
return this.helpertext?.length > 0 || this.checkSlottedHelper();
|
|
227
244
|
}
|
|
228
245
|
hasErrorMessage() {
|
|
229
|
-
return this.error?.length > 0 || this.
|
|
246
|
+
return this.error?.length > 0 || this.checkSlottedError();
|
|
230
247
|
}
|
|
231
248
|
/** If any error is active, either via the prop `invalid` or `error` prop/slot. */
|
|
232
249
|
hasError() {
|
|
233
|
-
return this.hasErrorMessage() || this.invalid
|
|
250
|
+
return this.hasErrorMessage() || this.invalid;
|
|
251
|
+
}
|
|
252
|
+
hideHelpertext() {
|
|
253
|
+
return this.hasErrorMessage() || !this.hasHelperText();
|
|
234
254
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return this.hasHelperText() || this.hasErrorMessage();
|
|
255
|
+
hideError() {
|
|
256
|
+
return !this.hasErrorMessage();
|
|
238
257
|
}
|
|
239
258
|
checkSlottedHelper() {
|
|
240
|
-
|
|
241
|
-
this.showHelperSlot = !!slottedHelper?.length;
|
|
259
|
+
return !!this.hostElement.querySelector('[slot=helpertext]');
|
|
242
260
|
}
|
|
243
261
|
checkSlottedError() {
|
|
244
|
-
|
|
245
|
-
this.showErrorSlot = !!slottedError?.length;
|
|
262
|
+
return !!this.hostElement.querySelector('[slot=error]');
|
|
246
263
|
}
|
|
247
264
|
getInputType() {
|
|
248
265
|
const types = ['text', 'password', 'url', 'tel', 'search', 'number', 'email'];
|
|
@@ -300,14 +317,30 @@ const PnInput = class {
|
|
|
300
317
|
useCompactLabel() {
|
|
301
318
|
return this.validLabel() && this.compact;
|
|
302
319
|
}
|
|
320
|
+
displayLabel() {
|
|
321
|
+
return !!this.label;
|
|
322
|
+
}
|
|
323
|
+
getAriaLabel() {
|
|
324
|
+
return !this.displayLabel() && !this.pnAriaLabelledby ? this.pnAriaLabel : null;
|
|
325
|
+
}
|
|
326
|
+
getAriaLabelledby() {
|
|
327
|
+
return !this.displayLabel() && !(this.pnAriaLabel || this.arialabel) ? this.pnAriaLabelledby : null;
|
|
328
|
+
}
|
|
329
|
+
getAriaDescribedby() {
|
|
330
|
+
if (this.hasErrorMessage())
|
|
331
|
+
return this.idError;
|
|
332
|
+
else if (this.hasHelperText())
|
|
333
|
+
return this.idHelper;
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
303
336
|
renderLabel() {
|
|
304
|
-
return (h("label", { htmlFor: this.
|
|
337
|
+
return (h("label", { htmlFor: this.getId(), class: "pn-input-label", "data-compact": this.compact }, this.label && h("span", null, this.label), this.maxlength >= 0 && h("span", null, `${this.value.length}/${this.maxlength}`)));
|
|
305
338
|
}
|
|
306
339
|
render() {
|
|
307
|
-
return (h(Host, { key: '
|
|
340
|
+
return (h(Host, { key: '800f4fb8490656e28657f7a4a041ba0c6dc46af2' }, h("div", { key: '8defa078a3e541509bc17278751f8e59f59f3bd7', class: "pn-input", "data-valid": this.valid, "data-error": this.hasError(), style: {
|
|
308
341
|
'--pn-input-offset-left': `${this.offsetLeft}px`,
|
|
309
342
|
'--pn-input-offset-right': `${this.offsetRight}px`,
|
|
310
|
-
} }, this.useLabel() && this.renderLabel(), h("div", { key: '
|
|
343
|
+
} }, this.useLabel() && this.renderLabel(), h("div", { key: 'dc01fb7fdb2a60ee89473f0152d833243be4ff8d', class: "pn-input-group" }, h("input", { key: '32f63d4aa1c6edd2d10f8876ebd3371cff366eb7', type: this.getInputType(), id: this.getId(), class: "pn-input-element", name: this.name, placeholder: this.compact ? this.placeholder || ' ' : this.placeholder, autocomplete: this.autocomplete, maxlength: this.maxlength, list: this.list, pattern: this.pattern, min: this.min, max: this.max, step: this.step, value: this.value, inputmode: this.inputmode, disabled: this.disabled, required: this.required, readonly: this.readonly, "aria-label": this.getAriaLabel(), "aria-labelledby": this.getAriaLabelledby(), "aria-describedby": this.getAriaDescribedby(), "aria-controls": this.pnAriaControls || this.ariacontrols, "aria-invalid": this.hasError()?.toString(), "data-compact": this.compact, "data-value": this.value?.length > 0, onInput: e => this.setVal(e) }), this.useCompactLabel() && this.renderLabel(), h("div", { key: 'b52d9bfa61569635f422fedc22edd09c768ab9d8', class: "pn-input-eyecandy", "data-prefix": true, ref: el => (this.prefix = el) }, !!this.icon && h("pn-icon", { key: 'e5035273e663855094ba88ed0b485a4e8ffed56c', icon: this.icon, "aria-hidden": "true" }), this.showPrefix() && h("span", { key: '1d0e5355c5dbfecf3dbb693589726a233e3b7df6', class: "pn-input-text" }, this.textPrefix)), h("div", { key: 'e1faa82f19dcfdb6c427d5d2967bfb6694508675', class: "pn-input-eyecandy", "data-suffix": true, ref: el => (this.suffix = el) }, this.showSuffix() && h("span", { key: '4c5ecf7c19bf64eea77b21b05d9ffe491bf4b91c', class: "pn-input-text" }, this.textSuffix), this.displayState() && h("pn-icon", { key: 'f7014e0c31faf3c563c846e4a7061c6f4b35a64a', "aria-hidden": "true", icon: this.stateIcon(), color: this.stateColor() }), this.isPassword() && (h("pn-button", { key: '21518c4f16245de370fcba302b177cfe04e91904', icon: this.showPassword ? preview_on : preview_off, iconOnly: true, arialabel: this.passwordText(), small: true, appearance: "light", variant: "borderless", onClick: () => this.togglePassword() })), this.showClear() && (h("pn-button", { key: '60263a255ee8c8d3ed72ea89a26abfbe9be11d0d', icon: close, iconOnly: true, arialabel: this.translate('CLEAR'), small: true, appearance: "light", variant: "borderless", onClick: () => this.clearVal() })))), h("p", { key: 'd23165556ffcdbfcf7229a04f5c1ea8686432c97', id: this.idHelper, class: "pn-input-message", hidden: this.hideHelpertext() }, !!this.helpertext && h("span", { key: 'b7e31855d677953bbc7a4f65cb0b26a5eac8887b' }, this.helpertext), h("slot", { key: 'a6bbaeceb31e2cc38d1e110b900e13b4f0957c6e', name: "helpertext" })), h("p", { key: '3668fbc1a512f92d3f5a2c6f1f7d86cf04df148b', id: this.idError, class: "pn-input-message", role: "alert", hidden: this.hideError() }, !!this.error && h("span", { key: 'c14fb6ab8e17c7d17813c83c0993f95d079f8274' }, this.error), h("slot", { key: '75ba01e945315e6a3bbf2f5e5ac34c73fe7ab57f', name: "error" })))));
|
|
311
344
|
}
|
|
312
345
|
static get watchers() { return {
|
|
313
346
|
"textPrefix": [{
|
|
@@ -316,11 +349,11 @@ const PnInput = class {
|
|
|
316
349
|
"textSuffix": [{
|
|
317
350
|
"handleOffset": 0
|
|
318
351
|
}],
|
|
319
|
-
"
|
|
320
|
-
"
|
|
352
|
+
"inputid": [{
|
|
353
|
+
"handleId": 0
|
|
321
354
|
}],
|
|
322
|
-
"
|
|
323
|
-
"
|
|
355
|
+
"pnId": [{
|
|
356
|
+
"handleId": 1
|
|
324
357
|
}]
|
|
325
358
|
}; }
|
|
326
359
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import { t as transformTag, r as registerInstance, c as createEvent, g as getElement, f as forceUpdate, h, a as Host } from './index-
|
|
5
|
+
import { t as transformTag, r as registerInstance, c as createEvent, g as getElement, f as forceUpdate, h, a as Host } from './index-XKg-ydzH.js';
|
|
6
6
|
import { reduceMotion, awaitTopbar, en, isSmallScreen } from './index.js';
|
|
7
7
|
import { c as close } from './close-BvuWkoyY.js';
|
|
8
8
|
|
|
@@ -16,14 +16,15 @@ const translations = {
|
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const pnModalCss = () => `${transformTag("pn-modal")} .pn-modal{--pn-modal-max-width:45em;z-index:10000;position:fixed;top:0;inset-block-start:0;inset-block-end:0;margin:auto;padding:0;max-width:var(--pn-modal-max-width);overflow:hidden;border:0;border-radius:1.5em;box-shadow:0 0.25em 0.875em rgba(0, 0, 0, 0.18), 0 1.625em 3.5em rgba(0, 0, 0, 0.22);background-color:#ffffff;display:none;opacity:0;transform:translate(0%, 20%);outline:0.2rem solid transparent;outline-offset:0.2rem}${transformTag("pn-modal")} .pn-modal:focus-visible{outline-color:#ffffff}${transformTag("pn-modal")} .pn-modal{transition-property:opacity, overlay, display, transform, outline-color, border-radius;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-modal")} .pn-modal{transition-duration:0s;transition-delay:0s}}${transformTag("pn-modal")} .pn-modal{transition-behavior:allow-discrete}${transformTag("pn-modal")} .pn-modal[data-allow-overflow]{overflow:unset}${transformTag("pn-modal")} .pn-modal[data-allow-overflow] .pn-modal-container{overflow:unset}${transformTag("pn-modal")} .pn-modal[data-allow-overflow] .pn-modal-picture{border-top-right-radius:1.5em}${transformTag("pn-modal")} .pn-modal[data-image]{padding-top:0}${transformTag("pn-modal")} .pn-modal[data-sheet]{margin:0 0 0 auto;height:100%;max-height:unset;border-radius:1.5em 0 0 1.5em;transform:translate(20%, 0%)}${transformTag("pn-modal")} .pn-modal[data-sheet] .pn-modal-container{max-height:unset}${transformTag("pn-modal")} .pn-modal[open]{display:flex;opacity:1;transform:translate(0%, 0%)}@starting-style{${transformTag("pn-modal")} .pn-modal[open]{display:flex;opacity:0;transform:translate(0%, 20%)}}${transformTag("pn-modal")} .pn-modal[open][data-sheet]{transform:translate(0%, 0%)}@starting-style{${transformTag("pn-modal")} .pn-modal[open][data-sheet]{transform:translate(20%, 0%)}}${transformTag("pn-modal")} .pn-modal::backdrop{background-color:rgba(0, 0, 0, 0);transition-property:opacity, background-color, overlay, display;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-modal")} .pn-modal::backdrop{transition-duration:0s;transition-delay:0s}}${transformTag("pn-modal")} .pn-modal::backdrop{transition-behavior:allow-discrete}${transformTag("pn-modal")} .pn-modal[open]::backdrop{background-color:rgba(0, 0, 0, 0.55)}@starting-style{${transformTag("pn-modal")} .pn-modal[open]::backdrop{background-color:rgba(0, 0, 0, 0)}}${transformTag("pn-modal")} .pn-modal-container{max-height:85vh;display:flex;flex-direction:column;align-items:stretch;overflow:hidden auto}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-corner,${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-button{display:none}${transformTag("pn-modal")} .pn-modal-close-button{position:absolute;z-index:10;right:0.75em;top:0.75em}${transformTag("pn-modal")} .pn-modal-header{display:flex;flex-direction:column;gap:0.5em;padding:clamp(1em, 5vw, 1.5em)}${transformTag("pn-modal")} .pn-modal-header[hidden]{display:none}${transformTag("pn-modal")} .pn-modal-header:not([hidden])+.pn-modal-content:not([hidden]){padding-top:0}${transformTag("pn-modal")} .pn-modal-label{line-height:1.5;padding-right:1.5em;margin:0}${transformTag("pn-modal")} .pn-modal-text{margin:0}${transformTag("pn-modal")} .pn-modal-content{padding:clamp(1em, 5vw, 1.5em)}${transformTag("pn-modal")} .pn-modal-image{position:relative;display:flex;flex-direction:column}${transformTag("pn-modal")} .pn-modal-image[hidden]{display:none}${transformTag("pn-modal")} .pn-modal-picture{margin:0;padding:0;display:block;overflow:hidden;border-radius:1.5em 0 0 0}${transformTag("pn-modal")} .pn-modal-picture>*[slot=image]{display:block;height:100%;width:100%;object-fit:cover}${transformTag("pn-modal")} .pn-modal-buttons{background-color:#ffffff;
|
|
19
|
+
const pnModalCss = () => `${transformTag("pn-modal")} .pn-modal{--pn-modal-max-width:45em;z-index:10000;position:fixed;top:0;inset-block-start:0;inset-block-end:0;margin:auto;padding:0;max-width:var(--pn-modal-max-width);overflow:hidden;border:0;border-radius:1.5em;box-shadow:0 0.25em 0.875em rgba(0, 0, 0, 0.18), 0 1.625em 3.5em rgba(0, 0, 0, 0.22);background-color:#ffffff;display:none;opacity:0;transform:translate(0%, 20%);outline:0.2rem solid transparent;outline-offset:0.2rem}${transformTag("pn-modal")} .pn-modal:focus-visible{outline-color:#ffffff}${transformTag("pn-modal")} .pn-modal{transition-property:opacity, overlay, display, transform, outline-color, border-radius;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-modal")} .pn-modal{transition-duration:0s;transition-delay:0s}}${transformTag("pn-modal")} .pn-modal{transition-behavior:allow-discrete}${transformTag("pn-modal")} .pn-modal[data-allow-overflow]{overflow:unset}${transformTag("pn-modal")} .pn-modal[data-allow-overflow] .pn-modal-container{overflow:unset}${transformTag("pn-modal")} .pn-modal[data-allow-overflow] .pn-modal-picture{border-top-right-radius:1.5em}${transformTag("pn-modal")} .pn-modal[data-image]{padding-top:0}${transformTag("pn-modal")} .pn-modal[data-sheet]{margin:0 0 0 auto;height:100%;max-height:unset;border-radius:1.5em 0 0 1.5em;transform:translate(20%, 0%)}${transformTag("pn-modal")} .pn-modal[data-sheet] .pn-modal-container{max-height:unset}${transformTag("pn-modal")} .pn-modal[open]{display:flex;opacity:1;transform:translate(0%, 0%)}@starting-style{${transformTag("pn-modal")} .pn-modal[open]{display:flex;opacity:0;transform:translate(0%, 20%)}}${transformTag("pn-modal")} .pn-modal[open][data-sheet]{transform:translate(0%, 0%)}@starting-style{${transformTag("pn-modal")} .pn-modal[open][data-sheet]{transform:translate(20%, 0%)}}${transformTag("pn-modal")} .pn-modal::backdrop{background-color:rgba(0, 0, 0, 0);transition-property:opacity, background-color, overlay, display;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${transformTag("pn-modal")} .pn-modal::backdrop{transition-duration:0s;transition-delay:0s}}${transformTag("pn-modal")} .pn-modal::backdrop{transition-behavior:allow-discrete}${transformTag("pn-modal")} .pn-modal[open]::backdrop{background-color:rgba(0, 0, 0, 0.55)}@starting-style{${transformTag("pn-modal")} .pn-modal[open]::backdrop{background-color:rgba(0, 0, 0, 0)}}${transformTag("pn-modal")} .pn-modal-container{max-height:85vh;display:flex;flex-direction:column;align-items:stretch;overflow:hidden auto}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-corner,${transformTag("pn-modal")} .pn-modal-container::-webkit-scrollbar-button{display:none}${transformTag("pn-modal")} .pn-modal-close-button{position:absolute;z-index:10;right:0.75em;top:0.75em}${transformTag("pn-modal")} .pn-modal-header{display:flex;flex-direction:column;gap:0.5em;padding:clamp(1em, 5vw, 1.5em)}${transformTag("pn-modal")} .pn-modal-header[hidden]{display:none}${transformTag("pn-modal")} .pn-modal-header:not([hidden])+.pn-modal-content:not([hidden]){padding-top:0}${transformTag("pn-modal")} .pn-modal-label{line-height:1.5;padding-right:1.5em;margin:0}${transformTag("pn-modal")} .pn-modal-text{margin:0}${transformTag("pn-modal")} .pn-modal-content{padding:clamp(1em, 5vw, 1.5em)}${transformTag("pn-modal")} .pn-modal-image{position:relative;display:flex;flex-direction:column}${transformTag("pn-modal")} .pn-modal-image[hidden]{display:none}${transformTag("pn-modal")} .pn-modal-picture{margin:0;padding:0;display:block;overflow:hidden;border-radius:1.5em 0 0 0}${transformTag("pn-modal")} .pn-modal-picture>*[slot=image]{display:block;height:100%;width:100%;object-fit:cover}${transformTag("pn-modal")} .pn-modal-buttons{background-color:#ffffff;padding:clamp(1em, 5vw, 1.5em);display:flex;justify-content:flex-end;gap:0.5em;border-radius:0 0 1.5em 1.5em}${transformTag("pn-modal")} .pn-modal-buttons[data-divider]{border-top:0.0625em solid #d3cecb;margin-top:auto}${transformTag("pn-modal")} .pn-modal-buttons>[slot=buttons]:not(${transformTag("pn-button")}){display:flex;justify-content:flex-end;gap:0.5em}${transformTag("pn-modal")} .pn-modal-buttons>[slot=buttons]:not(${transformTag("pn-button")})>[data-left]{margin-right:auto}${transformTag("pn-modal")} .pn-modal-buttons>[data-left]{margin-right:auto}${transformTag("pn-modal")} .pn-modal-buttons:empty{display:none}@media (max-width: 55em){${transformTag("pn-modal")} .pn-modal{max-height:95vh;margin-bottom:0;bottom:0;transform:translate(0%, 20%);border-bottom-left-radius:0;border-bottom-right-radius:0}}`;
|
|
20
20
|
|
|
21
21
|
const PnModal = class {
|
|
22
22
|
constructor(hostRef) {
|
|
23
23
|
registerInstance(this, hostRef);
|
|
24
|
-
this.modalToggle = createEvent(this, "modalToggle");
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
24
|
+
this.modalToggle = createEvent(this, "modalToggle", 7);
|
|
25
|
+
this.modalVisibility = createEvent(this, "modalVisibility", 7);
|
|
26
|
+
this.modalVisiblity = createEvent(this, "modalVisiblity", 7);
|
|
27
|
+
this.close = createEvent(this, "close", 7);
|
|
27
28
|
}
|
|
28
29
|
mo;
|
|
29
30
|
standardAnimationDuration = 400;
|
|
@@ -43,7 +44,9 @@ const PnModal = class {
|
|
|
43
44
|
helpertext;
|
|
44
45
|
/** Set the language. @since v7.14.0 */
|
|
45
46
|
language = null;
|
|
46
|
-
/**
|
|
47
|
+
/** Set a custom HTML id. @since v7.24.0 */
|
|
48
|
+
pnId = null;
|
|
49
|
+
/** Use this prop if you want to control the visibility of the modal programmatically. @category Features */
|
|
47
50
|
open = false;
|
|
48
51
|
/**
|
|
49
52
|
* Prevent users from closing the modal by clicking on the backdrop or the `ESC` key.
|
|
@@ -52,19 +55,20 @@ const PnModal = class {
|
|
|
52
55
|
*/
|
|
53
56
|
persistent = false;
|
|
54
57
|
/**
|
|
55
|
-
* Hide the close button. If you
|
|
58
|
+
* Hide the close button. If you enable this, make sure you build your own cancel button.
|
|
56
59
|
* @since v7.14.0
|
|
57
60
|
* @category Features
|
|
58
61
|
*/
|
|
59
62
|
hideClose = false;
|
|
60
63
|
/**
|
|
61
|
-
* Allow overflow
|
|
62
|
-
* Do not use if you have a lot of conditional rendering inside the modal.
|
|
64
|
+
* Allow overflow *when* it is possible.
|
|
65
|
+
* Do not use if you have a lot of conditional rendering inside the modal as it can cause layout shifts.
|
|
63
66
|
* @since v7.14.0
|
|
67
|
+
* @category Features
|
|
64
68
|
*/
|
|
65
69
|
allowOverflow = false;
|
|
66
70
|
/**
|
|
67
|
-
* Use the `sheet` visual. Aligns the modal to the right.
|
|
71
|
+
* Use the `sheet` visual. Aligns the modal to the right instead of the center.
|
|
68
72
|
* @since v7.14.0
|
|
69
73
|
* @category Visual
|
|
70
74
|
*/
|
|
@@ -92,7 +96,9 @@ const PnModal = class {
|
|
|
92
96
|
this.animationDuration = this.standardAnimationDuration;
|
|
93
97
|
this.modalTimeout = setTimeout(() => {
|
|
94
98
|
this.isClosing = false;
|
|
99
|
+
/** @todo remove in v8.0.0 */
|
|
95
100
|
this.modalVisiblity.emit({ visible: this.open });
|
|
101
|
+
this.modalVisibility.emit({ visible: this.open });
|
|
96
102
|
}, this.animationDuration);
|
|
97
103
|
}
|
|
98
104
|
handleMaxWidth() {
|
|
@@ -105,7 +111,13 @@ const PnModal = class {
|
|
|
105
111
|
}
|
|
106
112
|
/** This event is fired when the modal is toggled. {@since v7.14.0} */
|
|
107
113
|
modalToggle;
|
|
108
|
-
/** This event is dispatched after the opening/closing animation has finished playing. {@since v7.
|
|
114
|
+
/** This event is dispatched after the opening/closing animation has finished playing. {@since v7.22.0} */
|
|
115
|
+
modalVisibility;
|
|
116
|
+
/**
|
|
117
|
+
* This event is dispatched after the opening/closing animation has finished playing.
|
|
118
|
+
* @since v7.14.0
|
|
119
|
+
* @deprecated v7.22.0. Use `modalVisibility` instead due to typo.
|
|
120
|
+
*/
|
|
109
121
|
modalVisiblity;
|
|
110
122
|
/**
|
|
111
123
|
* Event fired when the modal is closed, either by clicking on the dark background or by clicking on the close button.
|
|
@@ -180,7 +192,7 @@ const PnModal = class {
|
|
|
180
192
|
this.open = state ?? !this.open;
|
|
181
193
|
}
|
|
182
194
|
render() {
|
|
183
|
-
return (h(Host, { key: '
|
|
195
|
+
return (h(Host, { key: '5b50fca359ed20cebcbdead766d08c2439463b4c' }, h("dialog", { key: '43eb7bb4f09c6ce9a665f7478f25b1ae4a253562', id: this.pnId, class: "pn-modal", "data-closing": this.isClosing, "data-sheet": this.sheet, "data-image": this.showImage(), "data-allow-overflow": this.removeOverflow, onClose: () => this.setModalClose(), onCancel: () => this.setModalClose(), onToggle: () => this.modalToggle.emit({ open: this.open }), onKeyDown: event => this.handleKeyboard(event), onClick: event => this.clickModalBackground(event), ref: el => (this.modalElement = el) }, !this.hideClose && (h("pn-button", { key: '0bdc665fe32c8531edb073166fe8940d12360661', small: true, class: "pn-modal-close-button", icon: close, iconOnly: true, arialabel: this.translate('CLOSE_MODAL'), appearance: "light", variant: "borderless", type: "button", onPnClick: () => this.setModalClose() })), h("div", { key: 'ce9529f76b572f6681e1b75528bcab67e3246dbd', class: "pn-modal-container", ref: el => (this.modalContainer = el) }, h("div", { key: 'a2addec74c8af3fc9084a0d6faba9053a255bf86', class: "pn-modal-image", hidden: !this.showImage() }, h("picture", { key: '4341ae13d01268cc0f9df74bf417522116bed2d9', class: "pn-modal-picture", ref: el => (this.modalPicture = el) }, h("slot", { key: '99a643af231cdcd76ad2dafbcdbaf4fbabac5390', name: "image" }))), h("header", { key: '849eea60adcfb7c3bbba8687dc49edf752004617', class: "pn-modal-header", hidden: !this.showHeader() }, this.label && h("h2", { key: 'e57185ebd04cd622ceca5acb81c6606747afa6f9', class: "pn-modal-label" }, this.label), this.helpertext && h("p", { key: '2e0290387a2b96f3eb70db67dd7ac349c5c4fe9e', class: "pn-modal-text" }, this.helpertext), h("slot", { key: 'e05316839bfc8883a2e8f4c5079054e9edcd3859', name: "header" })), h("section", { key: 'd59b818c18159c106df1f6c3b2b3f747f1b6af29', class: "pn-modal-content" }, h("slot", { key: 'c740eb0b7909c9fa5878caecb66887f5bb9b2b73' })), h("nav", { key: '22971631737901988e27f4f01c311d2d76839c6a', class: "pn-modal-buttons", "data-divider": this.sheet }, h("slot", { key: '3c0e8e66db96d8abc8f718270d94e09b2ad90320', name: "buttons" }))))));
|
|
184
196
|
}
|
|
185
197
|
static get watchers() { return {
|
|
186
198
|
"open": [{
|