@postnord/pn-marketweb-components 4.1.1 → 4.2.0
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/loader.cjs.js +1 -1
- package/cjs/pn-chat-message_2.cjs.entry.js +5 -5
- package/cjs/pn-chat-message_2.cjs.entry.js.map +1 -1
- package/cjs/pn-chat.cjs.entry.js +18 -6
- package/cjs/pn-chat.cjs.entry.js.map +1 -1
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +17 -3
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +53 -3
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.stories.js +4 -0
- package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.css +27 -10
- package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js +3 -3
- package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js.map +1 -1
- package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js +18 -0
- package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js.map +1 -1
- package/collection/components/widgets/pn-chat/pn-chat.css +24 -13
- package/collection/components/widgets/pn-chat/pn-chat.js +17 -5
- package/collection/components/widgets/pn-chat/pn-chat.js.map +1 -1
- package/collection/components/widgets/pn-chat/pn-chat.stories.js +43 -0
- package/collection/components/widgets/pn-chat/pn-chat.stories.js.map +1 -1
- package/components/pn-chat-message2.js +5 -5
- package/components/pn-chat-message2.js.map +1 -1
- package/components/pn-chat.js +18 -6
- package/components/pn-chat.js.map +1 -1
- package/components/pn-dropdown-choice-adds-row.js +19 -3
- package/components/pn-dropdown-choice-adds-row.js.map +1 -1
- package/esm/loader.js +1 -1
- package/esm/pn-chat-message_2.entry.js +5 -5
- package/esm/pn-chat-message_2.entry.js.map +1 -1
- package/esm/pn-chat.entry.js +18 -6
- package/esm/pn-chat.entry.js.map +1 -1
- package/esm/pn-dropdown-choice-adds-row.entry.js +17 -3
- package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/package.json +14 -17
- package/pn-market-web-components/p-4a8ef165.entry.js +2 -0
- package/pn-market-web-components/p-4a8ef165.entry.js.map +1 -0
- package/pn-market-web-components/p-62ce6700.entry.js +2 -0
- package/pn-market-web-components/p-62ce6700.entry.js.map +1 -0
- package/pn-market-web-components/p-6f6ed930.entry.js +2 -0
- package/pn-market-web-components/p-6f6ed930.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-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.d.ts +2 -0
- package/types/components/widgets/pn-chat/pn-chat-stories-constants.d.ts +18 -0
- package/types/components/widgets/pn-chat/pn-chat.stories.d.ts +1 -0
- package/types/components.d.ts +4 -0
- package/umd/modules/@postnord/web-components/cjs/{index-BNXSyZmU.js → index-CNdVg5VI.js} +1 -1
- package/umd/modules/@postnord/web-components/cjs/{index-CAMqnx70.js → index-CfUQZtlH.js} +245 -1884
- package/umd/modules/@postnord/web-components/cjs/index.cjs.js +8 -5
- 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 +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-accordion.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +2 -2
- 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 +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +2 -2
- 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 +13 -15
- package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +12 -6
- package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +2 -2
- 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 +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-illustration.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +33 -16
- package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +16 -5
- 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 +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +2 -2
- 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.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-range.cjs.entry.js +3 -3
- 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 +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +10 -3
- package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +19 -9
- package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +3 -3
- package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-wizard.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +2 -2
- package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +3 -3
- package/umd/modules/@postnord/web-components/collection/collection-manifest.json +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.css +69 -27
- package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +34 -13
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.css +38 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +32 -3
- 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.css +48 -9
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +55 -15
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.css +63 -22
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +36 -2
- 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-range/pn-range.css +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.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.css +53 -14
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +31 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.css +54 -5
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +45 -13
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.css +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 +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 +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/components/helpers.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-card.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-input2.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-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-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-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/esm/{index-DWsprozV.js → index-CAEP792y.js} +245 -1884
- package/umd/modules/@postnord/web-components/esm/{index-BhpZuCL7.js → index-CosyroON.js} +1 -1
- package/umd/modules/@postnord/web-components/esm/index.js +9 -6
- package/umd/modules/@postnord/web-components/esm/loader.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-accordion.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +2 -2
- 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 +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +2 -2
- 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 +13 -15
- package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +12 -6
- package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +2 -2
- 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 +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-illustration.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +33 -16
- package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +16 -5
- 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 +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +2 -2
- 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.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-range.entry.js +3 -3
- 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 +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +10 -3
- package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-table.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-text-link.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +19 -9
- package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +3 -3
- package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-wizard.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +2 -2
- package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +4 -4
- package/umd/modules/@postnord/web-components/hydrate/index.js +3597 -3562
- package/umd/modules/@postnord/web-components/hydrate/index.mjs +3597 -3562
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +1 -18
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +1 -18
- 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 +70 -12
- 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 -19
- 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 +214 -1832
- 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 +3 -3
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +5172 -5086
- 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 +234 -263
- 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-public-compiler.d.ts +10 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +113 -74
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-dev-runtime.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-dev-runtime.js +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-runtime.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-runtime.js +9 -0
- 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 +13 -25
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +4 -3
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +13 -25
- 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 +13 -2
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +1 -18
- 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/index.js +34 -34
- 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/worker.js +1 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +19 -1
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +1 -1
- package/umd/modules/@postnord/web-components/package.json +19 -19
- package/umd/modules/@postnord/web-components/postnord-web-components/index.esm.js +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-215a8bab.entry.js → p-01ac1c67.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-0dd15cc3.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-f94947bd.entry.js → p-0e94a4dd.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-511bdc31.entry.js → p-0ed2ee53.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e545c35d.entry.js → p-109ba1fc.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-153311c8.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-9d3890d0.entry.js → p-1a3c49ba.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c9b8ed0a.entry.js → p-2610f8ab.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-267c323e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-dfa861a7.entry.js → p-2a364778.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-5cbd90c0.entry.js → p-2a682ff9.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b54f1a65.entry.js → p-2cce8a9f.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-44a6fe18.entry.js → p-2f4ad4a4.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-c867fce9.entry.js → p-306ec758.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-1d7b9fe8.entry.js → p-38e44ed0.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-66b77e7e.entry.js → p-3c96cb61.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-7ec29574.entry.js → p-3d2cac86.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-499ce292.entry.js → p-3d459401.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-795f8d58.entry.js → p-3deb5a9e.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-41c09d4d.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/p-484dfaa4.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-61af0540.entry.js → p-50116c0d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b8b5201d.entry.js → p-502b8430.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-96871fc2.entry.js → p-5b7c1333.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-3bc56c7f.entry.js → p-67f55491.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-cc1291a6.entry.js → p-838c17b9.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e221d65e.entry.js → p-849d48c6.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-584c2057.entry.js → p-89aaa3c8.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-2becf18d.entry.js → p-8b2b6f5d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-93db2b9e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-99d7a33d.entry.js → p-97ffc4b3.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-0j4cY0b7.js → p-BlM_xfdt.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-CAEP792y.js +6 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-26233654.entry.js → p-b0710b87.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b3c4e3e8.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e5d0281b.entry.js → p-b8c4423b.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ba59528f.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-92aa5cfa.entry.js → p-c0ae367c.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ddc430a5.entry.js → p-c4c4c75b.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-c843ae5e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-323e7706.entry.js → p-d1e27524.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-190d83cf.entry.js → p-d214e930.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-66fdb323.entry.js → p-d7091312.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-8f732dd9.entry.js → p-db2b7e5d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e3fb693e.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-10cb744b.entry.js → p-e83de0b1.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-bde90f4f.entry.js → p-ea50ecd2.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-1c376e6a.entry.js → p-edc28eee.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
- package/umd/modules/@postnord/web-components/types/components/input/pn-counter/pn-counter.d.ts +27 -26
- package/umd/modules/@postnord/web-components/types/components/input/pn-input/pn-input.d.ts +9 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-select/pn-select.d.ts +3 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-textarea/pn-textarea.d.ts +10 -8
- package/umd/modules/@postnord/web-components/types/components.d.ts +72 -0
- package/umd/modules/@postnord/web-components/vscode-data.json +24 -0
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/vscode-data.json +8 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.test.js +0 -95
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.test.js.map +0 -1
- package/pn-market-web-components/p-22a8fd6e.entry.js +0 -2
- package/pn-market-web-components/p-22a8fd6e.entry.js.map +0 -1
- package/pn-market-web-components/p-8afc2d30.entry.js +0 -2
- package/pn-market-web-components/p-8afc2d30.entry.js.map +0 -1
- package/pn-market-web-components/p-f97e58b8.entry.js +0 -2
- package/pn-market-web-components/p-f97e58b8.entry.js.map +0 -1
- package/types/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.test.d.ts +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-1bd12040.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-5a36a4ce.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-5ca4200c.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-8751c301.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-DWsprozV.js +0 -6
- package/umd/modules/@postnord/web-components/postnord-web-components/p-a6363f85.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b46922c6.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-de3ae08d.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-e6c7e352.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-ee6a305b.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-f667cb91.entry.js +0 -5
|
@@ -76,6 +76,8 @@ export class PnDatePicker extends Mixin(animateHeightFactory) {
|
|
|
76
76
|
* @see {@link https://day.js.org/docs/en/display/format Day.js format documentation.}
|
|
77
77
|
*/
|
|
78
78
|
format = 'YYYY-MM-DD';
|
|
79
|
+
/** Set the date picker label as compact. If used, the `placeholder` will no longer be displayed. @since v7.21.0 */
|
|
80
|
+
compact = false;
|
|
79
81
|
/** Manually set language; this will be inherited from the topbar. */
|
|
80
82
|
language = null;
|
|
81
83
|
/** Set a custom ID for the calendar. @since v7.6.0 @category HTML attributes */
|
|
@@ -698,10 +700,14 @@ export class PnDatePicker extends Mixin(animateHeightFactory) {
|
|
|
698
700
|
renderYearGrid() {
|
|
699
701
|
return (h("ul", { class: "pn-date-picker-list" }, this.getYearGrid()?.map(year => (h("li", { key: year, class: "pn-date-picker-item", "data-item": "year" }, h("button", { type: "button", class: "pn-date-picker-button", ...this.getDayAttributes({ year }, false) }, h("span", null, year)))))));
|
|
700
702
|
}
|
|
703
|
+
renderLabel(to = false) {
|
|
704
|
+
const id = to ? this.idTo : this.idFrom;
|
|
705
|
+
const label = to ? this.labelTo : this.labelFrom;
|
|
706
|
+
return (h("label", { class: "pn-date-picker-label", htmlFor: id, "data-compact": this.compact }, h("span", null, label)));
|
|
707
|
+
}
|
|
701
708
|
renderInput({ to = false } = {}) {
|
|
702
709
|
const id = to ? this.idTo : this.idFrom;
|
|
703
710
|
const idButton = to ? this.idToButton : this.idFromButton;
|
|
704
|
-
const label = to ? this.labelTo : this.labelFrom;
|
|
705
711
|
const value = to ? this.end : this.start;
|
|
706
712
|
const placeholder = to ? this.endPlaceholder : this.placeholder;
|
|
707
713
|
const list = to ? this.listEnd : this.list;
|
|
@@ -714,10 +720,10 @@ export class PnDatePicker extends Mixin(animateHeightFactory) {
|
|
|
714
720
|
textButton += `, ${dateText.replace('{date}', value)}`;
|
|
715
721
|
}
|
|
716
722
|
const showButton = !(this.disabled || this.readonly);
|
|
717
|
-
return (h("div", { class: "pn-date-picker-container", "data-error": this.hasError() },
|
|
723
|
+
return (h("div", { class: "pn-date-picker-container", "data-error": this.hasError() }, !this.compact && this.renderLabel(to), h("div", { class: "pn-date-picker-field" }, h("input", { type: "text", id: id, class: "pn-date-picker-input", name: this.name, placeholder: this.compact ? ' ' : placeholder, autocomplete: this.autocomplete, maxlength: this.disableMaxLength ? null : this.format.length, list: list, pattern: this.pattern, value: value, disabled: this.disabled, required: this.required, readonly: this.readonly, "aria-describedby": this.ariaDescribedby(), "aria-invalid": this.hasError()?.toString(), "data-active": editing, "data-compact": this.compact, onInput: e => this.inputHandler(e, to) }), this.compact && this.renderLabel(to), showButton && (h("pn-button", { class: "pn-date-picker-toggle", buttonId: idButton, icon: calendar, iconOnly: true, appearance: "light", arialabel: textButton, ariaexpanded: this.open.toString(), ariacontrols: this.idCalendar, "data-active": this.open, "data-input": true, small: true, onPnClick: () => this.toggleGrid(null, to), onKeyDown: e => this.handleButtonBlur(e) })))));
|
|
718
724
|
}
|
|
719
725
|
render() {
|
|
720
|
-
return (h(Host, { key: '
|
|
726
|
+
return (h(Host, { key: '0485d508d1df7d71009ab2c22096384928750697' }, h("div", { key: '31514c4b9c216ca227ac91c90e82846992df283c', class: "pn-date-picker" }, this.renderInput(), this.range && (h("div", { key: '2d924b59e6f7e41364413935b08640db0aa1622e', class: "pn-date-picker-range-icon test" }, h("pn-icon", { key: '51ec54178bbf69c66fe17228017aeb8985e551fc', icon: arrow_right }))), this.range && this.renderInput({ to: this.range })), h("div", { key: '16d60d86b8d9c01b7732a3c7b773d1157eedbd2b', id: this.idCalendar, class: "pn-date-picker-calendar", role: "dialog", "aria-label": this.translate('CALENDAR_NAVIGATION'), "data-open": this.open, "data-direction": this.openUp ? 'top' : 'bottom', "data-range": this.range, style: { height: '0px' }, ref: el => (this.calendarElement = el), onKeyDown: e => this.handleCalendarTabEsc(e) }, h("div", { key: '703d253840d5e9943750469c9495c3151b85f08c', class: "pn-date-picker-wrapper" }, h("nav", { key: 'e25723946681d630dffeeddbf814b3a720c9685c', class: "pn-date-picker-nav", "aria-labelledby": this.idCalendar }, h("pn-button", { key: '9dec68c96c3ab4f8ca0c29783cd1e693e43281e1', hidden: this.viewingMonth(), small: true, appearance: "light", arialabel: this.translate(`PREVIOUS_${this.viewType().toUpperCase()}`), icon: arrow_left, iconOnly: true, onPnClick: () => this.setNavView({ minus: true }) }), h("pn-button", { key: '33dfc7f288f489eb814f27f61869793bf718fb6a', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(MONTHS) }, h("span", { key: '67b029ff5dae525732dc78d1be4a3c706848078c', class: "pn-date-picker-month", "data-full": true }, this.translateDateText({ date: 1 }, 'MMMM')), h("span", { key: '82b2346a120e52d3f55d40eae85d191673c4e906', class: "pn-date-picker-month", "data-abbr": true }, this.translateDateText({ date: 1 }, 'MMM'))), h("h2", { key: '64c4b74c742c62370e8fe74b7ffd0c8e10c8c8d7', hidden: this.viewingCalendar(), class: "pn-date-picker-title" }, this.translate(`SELECT_${this.viewType().toUpperCase()}`)), h("pn-button", { key: '065dcdbccfaf4f4b3eeae1bba9772a8bce804b66', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(YEARS) }, h("span", { key: '2c0b032610650aa43701a3f52052defad495569d' }, this.dateViewYear)), h("pn-button", { key: 'feb54d3c95595a39aa93eb2c74c7582a82b3031a', hidden: this.viewingMonth(), small: true, appearance: "light", arialabel: this.translate(`NEXT_${this.viewType().toUpperCase()}`), icon: arrow_right, iconOnly: true, onPnClick: () => this.setNavView({ plus: true }) })), this.viewingYears() && this.renderYearGrid(), this.viewingMonth() && this.renderMonthGrid(), this.viewingCalendar() && this.renderDateGrid(), h("aside", { key: '1d1aa223f4314d714db6e994a7f87f3f0004f472', class: "pn-date-picker-chips" }, h("slot", { key: '1239efd56b8aa01558c9671e3a1c198af8cdec28', name: "chips" })), h("nav", { key: '0410b4a1a92b1ccb56dee901be8df49933301142', class: "pn-date-picker-bottom", hidden: this.viewingCalendar() }, h("pn-button", { key: 'ec803a3af2c22f05f1416e0f62424b3341256d0f', appearance: "light", variant: "outlined", small: true, icon: pn_return, onPnClick: () => this.setView(CALENDAR) }, h("span", { key: '76b1889719347c417b5366bc511f48604aad35e1' }, this.translate('GO_CALENDAR')))))), h("p", { key: 'efb966a5373f0a1b0e300999af60a1f8b9194429', id: this.idHelper, class: "pn-date-picker-helpertext", hidden: !this.hasHelperText() || this.hasError() }, h("span", { key: 'cf169a86e1a4c9ca46d835a536971306dba5224f' }, this.helpertext), h("slot", { key: '858470af2c9febb68a7beffa3014485d91297893', name: "helpertext" })), h("p", { key: '219d57d13eebcb6d6621fe8e1a717fedcc39e641', id: this.idError, class: "pn-date-picker-error", role: "alert", hidden: !this.hasErrorMessage() }, h("span", { key: '92b84f913d27642f9487f6316040f95478a75373' }, this.error), h("slot", { key: '31a3de009f3b54f775f558ae6a9aa17ebb2bbc88', name: "error" }))));
|
|
721
727
|
}
|
|
722
728
|
static get is() { return "pn-date-picker"; }
|
|
723
729
|
static get originalStyleUrls() {
|
|
@@ -867,6 +873,29 @@ export class PnDatePicker extends Mixin(animateHeightFactory) {
|
|
|
867
873
|
"attribute": "format",
|
|
868
874
|
"defaultValue": "'YYYY-MM-DD'"
|
|
869
875
|
},
|
|
876
|
+
"compact": {
|
|
877
|
+
"type": "boolean",
|
|
878
|
+
"mutable": false,
|
|
879
|
+
"complexType": {
|
|
880
|
+
"original": "boolean",
|
|
881
|
+
"resolved": "boolean",
|
|
882
|
+
"references": {}
|
|
883
|
+
},
|
|
884
|
+
"required": false,
|
|
885
|
+
"optional": true,
|
|
886
|
+
"docs": {
|
|
887
|
+
"tags": [{
|
|
888
|
+
"name": "since",
|
|
889
|
+
"text": "v7.21.0"
|
|
890
|
+
}],
|
|
891
|
+
"text": "Set the date picker label as compact. If used, the `placeholder` will no longer be displayed."
|
|
892
|
+
},
|
|
893
|
+
"getter": false,
|
|
894
|
+
"setter": false,
|
|
895
|
+
"reflect": false,
|
|
896
|
+
"attribute": "compact",
|
|
897
|
+
"defaultValue": "false"
|
|
898
|
+
},
|
|
870
899
|
"language": {
|
|
871
900
|
"type": "string",
|
|
872
901
|
"mutable": false,
|
package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js
CHANGED
|
@@ -67,7 +67,7 @@ export class PnFieldset {
|
|
|
67
67
|
return alert_exclamation_circle;
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: '4eac26b9a4c9095888cbe548f30eddcbed3efcdf' }, h("fieldset", { key: '341684c752c43382f37d0d95f9ea8c0d2d170ef1', id: this.fieldsetId, class: "pn-fieldset", disabled: this.disabled, "aria-describedby": this.helpertext && this.idHelpertext, "aria-invalid": this.hasError().toString() }, h("legend", { key: '3f98ab3a56288cebb07cce9c49b6e1bebd2096f2', class: "pn-fieldset-legend" }, this.legend), this.helpertext && (h("p", { key: '979b9b47ae0baa2f84bf19de877149773bfd63b9', id: this.idHelpertext, class: "pn-fieldset-helpertext" }, this.helpertext)), h("div", { key: 'a67905a01003d767e26061ff8fa3af86a0900c27', class: "pn-fieldset-items" }, h("slot", { key: 'a2a02e54157e39e43cf03839c8bb2a561533eb39' })), h("div", { key: '4c618709e6a3cbaa20761368acc70b6d2e964930', class: "pn-fieldset-message-wrapper", role: "alert", hidden: !this.error }, h("pn-icon", { key: 'db1b62bccada153943c62195242e66b62d9cc2c3', icon: this.getSymbol() }), h("p", { key: '9b94853b5064d9563e39c20491d7139eead83f56', class: "pn-fieldset-message" }, this.error)))));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "pn-fieldset"; }
|
|
73
73
|
static get originalStyleUrls() {
|
|
@@ -391,7 +391,7 @@ export class PnFileUpload {
|
|
|
391
391
|
return list.join(',');
|
|
392
392
|
}
|
|
393
393
|
render() {
|
|
394
|
-
return (h(Host, { key: '
|
|
394
|
+
return (h(Host, { key: 'bce5d5c3684f31a2841ecf631155ab384f318879' }, h("div", { key: '07abc549d0ad86fb818f446e4fa223e3b4ea6c84', class: "pn-file-upload-container" }, h("div", { key: '1a9d09dd8cf39db11dc741732a7c04276e10a6a9', class: "pn-dropzone-container" }, h("input", { key: '387071f47d9aa658929448b041285c01d5187da4', id: this.idFileUpload, class: "pn-file-upload-input", type: "file", name: this.name, multiple: this.multiple, accept: this.accept, capture: this.capture, disabled: this.disabled, required: this.required, "aria-describedby": this.describedBy(), "aria-invalid": this.invalid?.toString(), onClick: e => ripple(e, this.hostElement, '.pn-dropzone-inner'), onChange: () => this._onAddFile(), onDragOver: e => this._onDragOverFile(e), onDragLeave: e => this._onDragLeaveFile(e), onDrop: e => this._onDropFile(e), ref: el => (this.fileInputElement = el) }), h("div", { key: '71c627aa6044908835b0f6e2227d7744da76680e', class: "pn-dropzone-inner", "data-hover": this.isHovering, "data-invalid": this.invalid }, h("pn-icon", { key: 'a621fd0abb16c8c7b2efcb67932a0e50e12942dd', class: "pn-file-upload-icon-element", icon: upload, color: "blue700" }), h("label", { key: 'cc90d1af83fe3814b8ea9991bcdf85c40f48f874', htmlFor: this.idFileUpload, class: "pn-file-upload-title" }, this.label || this.translate('CLICKORDRAG')), this.helpertext && (h("p", { key: '8d4032bcd909516779d07f042be878105f3479a1', id: this.idHelpertext, class: "pn-file-upload-subtitle" }, this.helpertext)), this.accept && (h("p", { key: '715cc9ed4c8878068182a30affa8649c904f041d', id: this.idAccepttext, class: "pn-file-upload-subtitle" }, this.translate('ACCEPTEDFORMATS'), ": ", this.accept, this.maxSize && (h("span", { key: 'a217dcfd8528d86deb9aee37b7750eb574936a56' }, ' ', "(", this.translate('MAXFILESIZE'), ": ", this.maxSize, ")")))))), !!this.files.length && (h("ul", { key: 'c1a1cd0c816992c6f524eaf82296ad4fd3300a6b', class: "files-list" }, this.files.map((file) => (h("li", { class: "files-list-item-container", key: file.uuid }, h("div", { class: this.getFileItemClass(file) }, h("div", { class: "file-list-item-title" }, h("pn-icon", { icon: this.getFileIcon(file), color: this.getFileColor(file) }), this.hideProgress || file.progress === 0 ? (h("div", { class: "filename" }, file.filename)) : (h("pn-progress-bar", { label: file.filename, progress: file.progress, error: file.error && file.errorMessage }))), h("pn-button", { small: true, variant: "borderless", arialabel: `${this.translate('REMOVE_FILE')} ${file.filename}`, appearance: file.error ? 'warning' : 'light', icon: trash_can, iconOnly: true, tooltip: this.translate('REMOVE_FILE'), loading: this.isLoading(file), onClick: () => this.removeFile(file) })), file.error ? (h("div", { class: "files-list-item-text-error" }, file.errorMessage || file.error.message)) : null))))), h("slot", { key: '2690ccdc2c5e97a41c99a3b385e68739bb69cecb' }))));
|
|
395
395
|
}
|
|
396
396
|
static get is() { return "pn-file-upload"; }
|
|
397
397
|
static get originalStyleUrls() {
|
package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.css
CHANGED
|
@@ -6,6 +6,10 @@ pn-input {
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
pn-input .pn-input {
|
|
10
|
+
--pn-input-offset-left: 0em;
|
|
11
|
+
--pn-input-offset-right: 0em;
|
|
12
|
+
}
|
|
9
13
|
pn-input .pn-input-label {
|
|
10
14
|
cursor: pointer;
|
|
11
15
|
display: flex;
|
|
@@ -16,7 +20,7 @@ pn-input .pn-input-label {
|
|
|
16
20
|
margin: 0 0 0.25em 0;
|
|
17
21
|
gap: 0.5em;
|
|
18
22
|
-webkit-tap-highlight-color: transparent;
|
|
19
|
-
transition-property: color;
|
|
23
|
+
transition-property: color, transform;
|
|
20
24
|
transition-duration: 0.2s;
|
|
21
25
|
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
22
26
|
}
|
|
@@ -26,6 +30,26 @@ pn-input .pn-input-label {
|
|
|
26
30
|
transition-delay: 0s;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
33
|
+
pn-input .pn-input-label[data-compact] {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 1.5625em;
|
|
36
|
+
left: calc(var(--pn-input-offset-left, 0px) + 0.75em + 0.0625em);
|
|
37
|
+
margin: 0;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
align-items: center;
|
|
40
|
+
height: 1.5em;
|
|
41
|
+
max-width: calc(100% - (var(--pn-input-offset-left, 0px) + 0.75em) - (var(--pn-input-offset-right, 0px) + 0.75em));
|
|
42
|
+
transform: translateY(-50%) scale(1) translateZ(0);
|
|
43
|
+
transform-origin: 0 0;
|
|
44
|
+
transition-delay: 0.2s;
|
|
45
|
+
}
|
|
46
|
+
pn-input .pn-input-label[data-compact] > span {
|
|
47
|
+
font-size: 1em;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
line-height: 1.5em;
|
|
52
|
+
}
|
|
29
53
|
pn-input .pn-input-label > span {
|
|
30
54
|
font-size: 0.875em;
|
|
31
55
|
}
|
|
@@ -33,13 +57,12 @@ pn-input .pn-input-group {
|
|
|
33
57
|
position: relative;
|
|
34
58
|
}
|
|
35
59
|
pn-input .pn-input-element {
|
|
36
|
-
|
|
37
|
-
--pn-input-offset-right: 0em;
|
|
60
|
+
width: 100%;
|
|
38
61
|
color: #2d2013;
|
|
39
62
|
background-color: #ffffff;
|
|
40
63
|
border: 0.0625em solid #969087;
|
|
41
64
|
border-radius: 0.5em;
|
|
42
|
-
padding: 0.75em;
|
|
65
|
+
padding: 0.75em calc(0.75em + var(--pn-input-offset-right)) 0.75em calc(0.75em + var(--pn-input-offset-left));
|
|
43
66
|
font-family: inherit;
|
|
44
67
|
font-size: 1em;
|
|
45
68
|
font-weight: 500;
|
|
@@ -71,6 +94,19 @@ pn-input .pn-input-element {
|
|
|
71
94
|
transition-delay: 0s;
|
|
72
95
|
}
|
|
73
96
|
}
|
|
97
|
+
pn-input .pn-input-element[data-compact] {
|
|
98
|
+
text-align: left;
|
|
99
|
+
padding-top: 1.125em;
|
|
100
|
+
padding-bottom: 0.375em;
|
|
101
|
+
max-width: unset;
|
|
102
|
+
}
|
|
103
|
+
pn-input .pn-input-element[data-compact]::placeholder {
|
|
104
|
+
color: transparent;
|
|
105
|
+
}
|
|
106
|
+
pn-input .pn-input-element[data-compact]:focus + .pn-input-label, pn-input .pn-input-element[data-compact]:not(:placeholder-shown) + .pn-input-label {
|
|
107
|
+
transform: translateY(-85%) scale(0.75);
|
|
108
|
+
transition-delay: 0s;
|
|
109
|
+
}
|
|
74
110
|
pn-input .pn-input-element::placeholder {
|
|
75
111
|
color: #5e554a;
|
|
76
112
|
font-weight: normal;
|
|
@@ -83,11 +119,6 @@ pn-input .pn-input-element:disabled {
|
|
|
83
119
|
background-color: #f3f2f2;
|
|
84
120
|
border-color: #f3f2f2;
|
|
85
121
|
}
|
|
86
|
-
pn-input .pn-input-element {
|
|
87
|
-
width: 100%;
|
|
88
|
-
padding-left: calc(var(--pn-input-offset-left) + 0.75em);
|
|
89
|
-
padding-right: calc(var(--pn-input-offset-right) + 0.75em);
|
|
90
|
-
}
|
|
91
122
|
pn-input .pn-input-element:read-only {
|
|
92
123
|
border-color: #ffffff;
|
|
93
124
|
}
|
|
@@ -153,6 +184,10 @@ pn-input .pn-input[data-error] > .pn-input-group > .pn-input-element:focus-visib
|
|
|
153
184
|
border-color: #a70707;
|
|
154
185
|
outline-color: #a70707;
|
|
155
186
|
}
|
|
187
|
+
pn-input .pn-input[data-error] > .pn-input-group > .pn-input-element:-webkit-autofill, pn-input .pn-input[data-error] > .pn-input-group > .pn-input-element:-webkit-autofill:hover, pn-input .pn-input[data-error] > .pn-input-group > .pn-input-element:-webkit-autofill:focus, pn-input .pn-input[data-error] > .pn-input-group > .pn-input-element:-webkit-autofill:active {
|
|
188
|
+
-webkit-box-shadow: 0 0 0 10em #fef7f6 inset;
|
|
189
|
+
-webkit-text-fill-color: #2d2013;
|
|
190
|
+
}
|
|
156
191
|
pn-input .pn-input[data-error] > .pn-input-message[role=alert] {
|
|
157
192
|
color: #a70707;
|
|
158
193
|
}
|
|
@@ -169,4 +204,8 @@ pn-input .pn-input[data-valid] > .pn-input-group > .pn-input-element:focus-visib
|
|
|
169
204
|
background-color: #ffffff;
|
|
170
205
|
border-color: #005e41;
|
|
171
206
|
outline-color: #005e41;
|
|
207
|
+
}
|
|
208
|
+
pn-input .pn-input[data-valid] > .pn-input-group > .pn-input-element:-webkit-autofill, pn-input .pn-input[data-valid] > .pn-input-group > .pn-input-element:-webkit-autofill:hover, pn-input .pn-input[data-valid] > .pn-input-group > .pn-input-element:-webkit-autofill:focus, pn-input .pn-input[data-valid] > .pn-input-group > .pn-input-element:-webkit-autofill:active {
|
|
209
|
+
-webkit-box-shadow: 0 0 0 10em #edfbf3 inset;
|
|
210
|
+
-webkit-text-fill-color: #2d2013;
|
|
172
211
|
}
|
package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* By PostNord.
|
|
4
4
|
*/
|
|
5
|
-
import { h, Host } from "@stencil/core";
|
|
5
|
+
import { h, Host, forceUpdate } from "@stencil/core";
|
|
6
6
|
import { uuidv4, en, awaitTopbar } from "../../../index";
|
|
7
7
|
import { alert_exclamation_circle, check, close, preview_on, preview_off } from "pn-design-assets/pn-assets/icons.js";
|
|
8
8
|
import { translations } from "./translations";
|
|
@@ -49,6 +49,8 @@ export class PnInput {
|
|
|
49
49
|
* Not needed if you have the pntopbar on the page.
|
|
50
50
|
**/
|
|
51
51
|
language = null;
|
|
52
|
+
/** Use the compact label variant. The `placeholder` you provide will not be visible if used at the same time. @since v7.21.0 */
|
|
53
|
+
compact = false;
|
|
52
54
|
/**
|
|
53
55
|
* Select an icon to display before the input field value.
|
|
54
56
|
* `icon` takes precedence over the `text-prefix` prop.
|
|
@@ -147,17 +149,29 @@ export class PnInput {
|
|
|
147
149
|
**/
|
|
148
150
|
error;
|
|
149
151
|
handleOffset() {
|
|
150
|
-
requestAnimationFrame(() =>
|
|
152
|
+
requestAnimationFrame(() => {
|
|
151
153
|
const left = this.prefix?.clientWidth ? this.prefix.clientWidth + 8 : 0;
|
|
152
154
|
const right = this.suffix?.clientWidth ? this.suffix.clientWidth + 8 : 0;
|
|
153
155
|
this.offsetLeft = left;
|
|
154
156
|
this.offsetRight = right;
|
|
155
|
-
})
|
|
157
|
+
});
|
|
156
158
|
}
|
|
157
159
|
handleMessage() {
|
|
158
160
|
this.checkSlottedHelper();
|
|
159
161
|
this.checkSlottedError();
|
|
160
162
|
}
|
|
163
|
+
connectedCallback() {
|
|
164
|
+
this.mo = new MutationObserver(() => {
|
|
165
|
+
forceUpdate(this.hostElement);
|
|
166
|
+
this.handleOffset();
|
|
167
|
+
this.handleMessage();
|
|
168
|
+
});
|
|
169
|
+
this.mo.observe(this.hostElement, { childList: true, subtree: true });
|
|
170
|
+
}
|
|
171
|
+
disconnectedCallback() {
|
|
172
|
+
if (this.mo)
|
|
173
|
+
this.mo.disconnect();
|
|
174
|
+
}
|
|
161
175
|
async componentWillLoad() {
|
|
162
176
|
this.handleMessage();
|
|
163
177
|
if (this.inputid !== this.id)
|
|
@@ -167,16 +181,6 @@ export class PnInput {
|
|
|
167
181
|
}
|
|
168
182
|
componentDidLoad() {
|
|
169
183
|
this.handleOffset();
|
|
170
|
-
if (this.mo)
|
|
171
|
-
this.mo.disconnect();
|
|
172
|
-
this.mo = new MutationObserver(() => {
|
|
173
|
-
this.handleOffset();
|
|
174
|
-
this.handleMessage();
|
|
175
|
-
});
|
|
176
|
-
this.mo.observe(this.hostElement, {
|
|
177
|
-
subtree: true,
|
|
178
|
-
childList: true,
|
|
179
|
-
});
|
|
180
184
|
}
|
|
181
185
|
setVal(event) {
|
|
182
186
|
const target = event.composedPath?.()[0];
|
|
@@ -261,11 +265,24 @@ export class PnInput {
|
|
|
261
265
|
return false;
|
|
262
266
|
return this.type === 'search' && !!this.value?.length;
|
|
263
267
|
}
|
|
268
|
+
validLabel() {
|
|
269
|
+
return this.label?.length > 0 || this.maxlength >= 1;
|
|
270
|
+
}
|
|
271
|
+
useLabel() {
|
|
272
|
+
return this.validLabel() && !this.compact;
|
|
273
|
+
}
|
|
274
|
+
/** Compact label must be positioned after the input element in order to work. */
|
|
275
|
+
useCompactLabel() {
|
|
276
|
+
return this.validLabel() && this.compact;
|
|
277
|
+
}
|
|
278
|
+
renderLabel() {
|
|
279
|
+
return (h("label", { htmlFor: this.inputid, 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}`)));
|
|
280
|
+
}
|
|
264
281
|
render() {
|
|
265
|
-
return (h(Host, { key: '
|
|
282
|
+
return (h(Host, { key: '3250630450288d09811b7c78bca5091ba93ec7ab' }, h("div", { key: 'db673ba19f300966eaf5c38136fe7d6143aa661d', class: "pn-input", "data-valid": this.valid, "data-error": this.hasError(), style: {
|
|
266
283
|
'--pn-input-offset-left': `${this.offsetLeft}px`,
|
|
267
284
|
'--pn-input-offset-right': `${this.offsetRight}px`,
|
|
268
|
-
}, onInput: e => this.setVal(e) }), h("div", { key: '
|
|
285
|
+
} }, this.useLabel() && this.renderLabel(), h("div", { key: 'b216b7f951be237aed6e46f1ccbcfd29b2a3cad1', class: "pn-input-group" }, h("input", { key: '4ee129c35c6a74a359df9d611b236132d7afac38', type: this.getInputType(), id: this.inputid, 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.arialabel, "aria-describedby": this.hasMessage() ? this.idMessage : null, "aria-controls": 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: '753a9abeaf5bfa5ffb3be10042a76aa7863bce9c', class: "pn-input-eyecandy", "data-prefix": true, ref: el => (this.prefix = el) }, !!this.icon && h("pn-icon", { key: 'acf1a6e42c9d37cab6f6a0453d8ea674df1cd0c3', icon: this.icon, "aria-hidden": "true" }), this.showPrefix() && h("span", { key: '70d2eb7e94e790d665a57557595c2bce4855b827', class: "pn-input-text" }, this.textPrefix)), h("div", { key: '1dcae3fb8489d2dc6aa7325baea693591acef31c', class: "pn-input-eyecandy", "data-suffix": true, ref: el => (this.suffix = el) }, this.showSuffix() && h("span", { key: '05044f3fbea582d507de30a0ff751abaf1da3206', class: "pn-input-text" }, this.textSuffix), this.displayState() && h("pn-icon", { key: '727650c9e6c9b9da2ef43e933fab95b6adc8a6bb', "aria-hidden": "true", icon: this.stateIcon(), color: this.stateColor() }), this.isPassword() && (h("pn-button", { key: '4e28eddff11c9aea670a6764aeb0316bccba1c1c', 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: '2181adb68c152d837ef03bf9b7e0eb66eb3ea6d2', icon: close, iconOnly: true, arialabel: this.translate('CLEAR'), small: true, appearance: "light", variant: "borderless", onClick: () => this.clearVal() })))), h("p", { key: 'b8b1039a61a23efd24ebd71285b15cce7bfc5ec0', class: "pn-input-message", id: this.idMessage, role: this.hasErrorMessage() ? 'alert' : null, hidden: !this.hasMessage() }, this.hasHelperText() && !this.hasError() && h("span", { key: '4433df6b700cc40ce2ae698d2474f57163b398a1', class: "pn-input-helper" }, this.helpertext), h("span", { key: '41c8fb1cbbc17b7c349922cac2ff42244a017e0c', class: "pn-input-helper-slot", hidden: !this.showHelperSlot || this.hasError() }, h("slot", { key: '5628bbc8db75161d18ad3e75c259bf3eb5fc9052', name: "helpertext" })), this.hasErrorMessage() && h("span", { key: 'e41145d7fab9f3ae35dd428971c79673d0531301', class: "pn-input-error" }, this.error), h("span", { key: 'ae85a9420fcb449cc874eadc7a066dd772f097a9', class: "pn-input-error-slot", hidden: !this.showErrorSlot }, h("slot", { key: 'bdd31ab2f706cac6e243562d035361a381ecfa43', name: "error" }))))));
|
|
269
286
|
}
|
|
270
287
|
static get is() { return "pn-input"; }
|
|
271
288
|
static get originalStyleUrls() {
|
|
@@ -385,6 +402,29 @@ export class PnInput {
|
|
|
385
402
|
"attribute": "language",
|
|
386
403
|
"defaultValue": "null"
|
|
387
404
|
},
|
|
405
|
+
"compact": {
|
|
406
|
+
"type": "boolean",
|
|
407
|
+
"mutable": false,
|
|
408
|
+
"complexType": {
|
|
409
|
+
"original": "boolean",
|
|
410
|
+
"resolved": "boolean",
|
|
411
|
+
"references": {}
|
|
412
|
+
},
|
|
413
|
+
"required": false,
|
|
414
|
+
"optional": true,
|
|
415
|
+
"docs": {
|
|
416
|
+
"tags": [{
|
|
417
|
+
"name": "since",
|
|
418
|
+
"text": "v7.21.0"
|
|
419
|
+
}],
|
|
420
|
+
"text": "Use the compact label variant. The `placeholder` you provide will not be visible if used at the same time."
|
|
421
|
+
},
|
|
422
|
+
"getter": false,
|
|
423
|
+
"setter": false,
|
|
424
|
+
"reflect": false,
|
|
425
|
+
"attribute": "compact",
|
|
426
|
+
"defaultValue": "false"
|
|
427
|
+
},
|
|
388
428
|
"icon": {
|
|
389
429
|
"type": "string",
|
|
390
430
|
"mutable": false,
|
|
@@ -6,12 +6,22 @@ pn-multiselect {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
pn-multiselect .pn-multiselect {
|
|
9
|
+
position: relative;
|
|
9
10
|
border: 0;
|
|
10
11
|
margin: 0;
|
|
11
12
|
padding: 0;
|
|
12
13
|
}
|
|
14
|
+
pn-multiselect .pn-multiselect[data-icon] {
|
|
15
|
+
--pn-input-offset-left: 2em;
|
|
16
|
+
}
|
|
13
17
|
pn-multiselect .pn-multiselect[data-icon] .pn-multiselect-element {
|
|
14
|
-
padding-left:
|
|
18
|
+
padding-left: 2.75em;
|
|
19
|
+
}
|
|
20
|
+
pn-multiselect .pn-multiselect[data-error] .pn-multiselect-label {
|
|
21
|
+
color: #a70707;
|
|
22
|
+
}
|
|
23
|
+
pn-multiselect .pn-multiselect[data-error] .pn-multiselect-label[data-compact] {
|
|
24
|
+
color: #2d2013;
|
|
15
25
|
}
|
|
16
26
|
pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element {
|
|
17
27
|
padding-right: 5.5em;
|
|
@@ -25,7 +35,12 @@ pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:focus-visible
|
|
|
25
35
|
border-color: #a70707;
|
|
26
36
|
outline-color: #a70707;
|
|
27
37
|
}
|
|
38
|
+
pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:-webkit-autofill, pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:-webkit-autofill:hover, pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:-webkit-autofill:focus, pn-multiselect .pn-multiselect[data-error] .pn-multiselect-element:-webkit-autofill:active {
|
|
39
|
+
-webkit-box-shadow: 0 0 0 10em #fef7f6 inset;
|
|
40
|
+
-webkit-text-fill-color: #2d2013;
|
|
41
|
+
}
|
|
28
42
|
pn-multiselect .pn-multiselect-label {
|
|
43
|
+
width: 100%;
|
|
29
44
|
cursor: pointer;
|
|
30
45
|
display: flex;
|
|
31
46
|
justify-content: space-between;
|
|
@@ -35,7 +50,7 @@ pn-multiselect .pn-multiselect-label {
|
|
|
35
50
|
margin: 0 0 0.25em 0;
|
|
36
51
|
gap: 0.5em;
|
|
37
52
|
-webkit-tap-highlight-color: transparent;
|
|
38
|
-
transition-property: color;
|
|
53
|
+
transition-property: color, transform;
|
|
39
54
|
transition-duration: 0.2s;
|
|
40
55
|
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
41
56
|
}
|
|
@@ -45,11 +60,31 @@ pn-multiselect .pn-multiselect-label {
|
|
|
45
60
|
transition-delay: 0s;
|
|
46
61
|
}
|
|
47
62
|
}
|
|
63
|
+
pn-multiselect .pn-multiselect-label[data-compact] {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 1.5625em;
|
|
66
|
+
left: calc(var(--pn-input-offset-left, 0px) + 0.75em + 0.0625em);
|
|
67
|
+
margin: 0;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
align-items: center;
|
|
70
|
+
height: 1.5em;
|
|
71
|
+
max-width: calc(100% - (var(--pn-input-offset-left, 0px) + 0.75em) - (var(--pn-input-offset-right, 0px) + 0.75em));
|
|
72
|
+
transform: translateY(-50%) scale(1) translateZ(0);
|
|
73
|
+
transform-origin: 0 0;
|
|
74
|
+
transition-delay: 0.2s;
|
|
75
|
+
}
|
|
76
|
+
pn-multiselect .pn-multiselect-label[data-compact] > span {
|
|
77
|
+
font-size: 1em;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
line-height: 1.5em;
|
|
82
|
+
}
|
|
48
83
|
pn-multiselect .pn-multiselect-label > span {
|
|
49
84
|
font-size: 0.875em;
|
|
50
85
|
}
|
|
51
|
-
pn-multiselect .pn-multiselect-label {
|
|
52
|
-
|
|
86
|
+
pn-multiselect .pn-multiselect-label[data-compact] {
|
|
87
|
+
justify-content: start;
|
|
53
88
|
}
|
|
54
89
|
pn-multiselect .pn-multiselect-sr-only {
|
|
55
90
|
position: absolute;
|
|
@@ -139,11 +174,21 @@ pn-multiselect .pn-multiselect-button[aria-expanded=true] > pn-icon > svg > path
|
|
|
139
174
|
transition-delay: 0s;
|
|
140
175
|
}
|
|
141
176
|
pn-multiselect .pn-multiselect-element {
|
|
177
|
+
cursor: text;
|
|
178
|
+
text-align: left;
|
|
179
|
+
transition-delay: 0.1s, 0.1s, 0s;
|
|
180
|
+
width: 100%;
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
gap: 0.5em;
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
text-overflow: ellipsis;
|
|
142
187
|
color: #2d2013;
|
|
143
188
|
background-color: #ffffff;
|
|
144
189
|
border: 0.0625em solid #969087;
|
|
145
190
|
border-radius: 0.5em;
|
|
146
|
-
padding: 0.75em;
|
|
191
|
+
padding: 0.75em 3.5em 0.75em 0.75em;
|
|
147
192
|
font-family: inherit;
|
|
148
193
|
font-size: 1em;
|
|
149
194
|
font-weight: 500;
|
|
@@ -175,6 +220,19 @@ pn-multiselect .pn-multiselect-element {
|
|
|
175
220
|
transition-delay: 0s;
|
|
176
221
|
}
|
|
177
222
|
}
|
|
223
|
+
pn-multiselect .pn-multiselect-element[data-compact] {
|
|
224
|
+
text-align: left;
|
|
225
|
+
padding-top: 1.125em;
|
|
226
|
+
padding-bottom: 0.375em;
|
|
227
|
+
max-width: unset;
|
|
228
|
+
}
|
|
229
|
+
pn-multiselect .pn-multiselect-element[data-compact]::placeholder {
|
|
230
|
+
color: transparent;
|
|
231
|
+
}
|
|
232
|
+
pn-multiselect .pn-multiselect-element[data-compact]:focus + .pn-multiselect-label, pn-multiselect .pn-multiselect-element[data-compact]:not(:placeholder-shown) + .pn-multiselect-label {
|
|
233
|
+
transform: translateY(-85%) scale(0.75);
|
|
234
|
+
transition-delay: 0s;
|
|
235
|
+
}
|
|
178
236
|
pn-multiselect .pn-multiselect-element::placeholder {
|
|
179
237
|
color: #5e554a;
|
|
180
238
|
font-weight: normal;
|
|
@@ -187,19 +245,6 @@ pn-multiselect .pn-multiselect-element:disabled {
|
|
|
187
245
|
background-color: #f3f2f2;
|
|
188
246
|
border-color: #f3f2f2;
|
|
189
247
|
}
|
|
190
|
-
pn-multiselect .pn-multiselect-element {
|
|
191
|
-
cursor: text;
|
|
192
|
-
text-align: left;
|
|
193
|
-
transition-delay: 0.1s, 0.1s, 0s;
|
|
194
|
-
width: 100%;
|
|
195
|
-
padding-right: 3.5em;
|
|
196
|
-
display: flex;
|
|
197
|
-
align-items: center;
|
|
198
|
-
justify-content: space-between;
|
|
199
|
-
gap: 0.5em;
|
|
200
|
-
overflow: hidden;
|
|
201
|
-
text-overflow: ellipsis;
|
|
202
|
-
}
|
|
203
248
|
pn-multiselect .pn-multiselect-element:disabled {
|
|
204
249
|
color: #5e554a;
|
|
205
250
|
background-color: #f3f2f2;
|
|
@@ -570,10 +615,6 @@ pn-multiselect .pn-multiselect-option-text {
|
|
|
570
615
|
text-overflow: ellipsis;
|
|
571
616
|
overflow: hidden;
|
|
572
617
|
}
|
|
573
|
-
pn-multiselect .pn-multiselect-option-label {
|
|
574
|
-
color: #2d2013;
|
|
575
|
-
font-weight: 400;
|
|
576
|
-
}
|
|
577
618
|
pn-multiselect .pn-multiselect-option-helper {
|
|
578
619
|
color: #5e554a;
|
|
579
620
|
margin: 0;
|
|
@@ -57,6 +57,8 @@ export class PnMultiselect extends Mixin(animateHeightFactory) {
|
|
|
57
57
|
selectName;
|
|
58
58
|
/** Display an icon to the left of the select input */
|
|
59
59
|
icon;
|
|
60
|
+
/** Set the date picker label as compact. If used, the `placeholder` will no longer be displayed. @since v7.21.0 */
|
|
61
|
+
compact = false;
|
|
60
62
|
/** Manually set the language, not needed if you have the pnTopbar available */
|
|
61
63
|
language = null;
|
|
62
64
|
/**
|
|
@@ -264,7 +266,8 @@ export class PnMultiselect extends Mixin(animateHeightFactory) {
|
|
|
264
266
|
optionsCheckedLabels() {
|
|
265
267
|
return this.optionsChecked()
|
|
266
268
|
?.map(({ label }) => label)
|
|
267
|
-
?.join(', ')
|
|
269
|
+
?.join(', ')
|
|
270
|
+
?.trim();
|
|
268
271
|
}
|
|
269
272
|
optionsSearch() {
|
|
270
273
|
const list = this.options?.reduce((sum, item) => {
|
|
@@ -550,8 +553,16 @@ export class PnMultiselect extends Mixin(animateHeightFactory) {
|
|
|
550
553
|
renderChips() {
|
|
551
554
|
return (h("ul", { id: this.idChips, class: "pn-multiselect-chips", "aria-label": this.translate('SELECTED_OPTIONS'), ref: el => (this.elChips = el) }, this.optionsCheckedPreview()?.map(({ label, value }, index) => (h("li", { class: "pn-multiselect-chip", "aria-setsize": this.optionsCheckedTotal(), "aria-posinset": index + 1, key: `${label}-${value}` }, h("span", { class: "pn-multiselect-chip-label" }, label), h("button", { type: "button", class: "pn-multiselect-chip-button", "aria-label": `${this.translate('REMOVE')} ${label}`, onClick: () => this.optionSelect({ val: value, checked: false, chip: index }) }, h("pn-icon", { icon: close, small: true, color: "blue700" }))))), this.optionsCheckedTotal() > this.itemCount && (h("li", { class: "pn-multiselect-chip", "data-count": true }, h("span", { class: "pn-multiselect-chip-label" }, "+ ", this.additonalOptions())))));
|
|
552
555
|
}
|
|
556
|
+
renderLabel(compactLabel = false) {
|
|
557
|
+
if (!this.label)
|
|
558
|
+
return null;
|
|
559
|
+
const Tag = compactLabel ? 'div' : 'legend';
|
|
560
|
+
const id = compactLabel ? null : this.idLegend;
|
|
561
|
+
const attrs = compactLabel ? { inert: true } : { onClick: () => this.handleLabel() };
|
|
562
|
+
return (h(Tag, { id: id, class: { 'pn-multiselect-label': true, 'pn-multiselect-sr-only': this.compact && !compactLabel }, "data-compact": this.compact, ...attrs }, h("span", null, this.label), !!this.optionsChecked()?.length && (h("span", null, this.optionsCheckedTotal(), "/", this.optionsTotal()))));
|
|
563
|
+
}
|
|
553
564
|
render() {
|
|
554
|
-
return (h(Host, { key: '
|
|
565
|
+
return (h(Host, { key: '55af777ec6dd7165b4d16bdad6ec784fe81b8f20' }, h("fieldset", { key: '41a5e9a45b3460a96676d606c458a062efe6ab80', class: "pn-multiselect", "data-icon": !!this.icon, "data-error": this.hasError(), disabled: this.disabled }, this.renderLabel(), h("div", { key: 'fb6874e8d17a70ec0e1e21bf3474575b01c3e669', class: "pn-multiselect-group", ref: el => (this.elGroup = el) }, h("div", { key: 'ab6aa995337f5a80e2026d98fe69399571249c24', class: "pn-multiselect-input" }, !!this.icon && h("pn-icon", { key: '0d9495e8864e266a6ababc752781b6e9c75595c3', class: "pn-multiselect-icon", "data-custom": true, icon: this.icon }), h("input", { key: '6b5adbc27ab64b9cdb7f53a99d2f4cd9a2185e47', 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, "data-compact": this.compact, onClick: () => (this.search && this.open ? null : this.toggleOpen()), onKeyDown: e => this.handleInputKeyboard(e), onBlur: e => this.handleBlur(e), onInput: e => this.search && this.setSearchQuery(e.target.value), ref: el => (this.elInput = el) }), this.compact && this.renderLabel(true), this.hasError() && (h("pn-icon", { key: '36e6f1e307758cdec5f9eda59413b8a0c28af78c', class: "pn-multiselect-icon", "data-error": true, icon: alert_exclamation_circle, color: "warning" })), h("button", { key: '6197b7545b8646fecbd5a12e540e3011303f660c', id: this.idButton, type: "button", class: "pn-multiselect-button", "aria-label": this.translate(`BUTTON_${this.open ? 'CLOSE' : 'OPEN'}`), "aria-describedby": this.search ? null : this.selectId, "aria-controls": this.idOptions, "aria-expanded": this.open.toString(), onClick: () => this.toggleOpen(), ref: el => (this.elButton = el) }, h("pn-icon", { key: 'f9ddba2705b7782606897f6374f5963833bde76e', class: "pn-multiselect-icon", icon: chevron_down, color: "blue700" }))), this.renderOptions()), this.hasMessage() && (h("p", { key: 'd9fb544f999b9d779362f13090e9653bbd22fd4e', id: this.idHelper, class: "pn-multiselect-description", role: !!this.error ? 'alert' : null }, h("span", { key: 'ed1426909307379ba22c06a6870ad867f5a7cdad' }, this.error || this.helpertext))), this.search && this.renderChips(), h("slot", { key: 'd0bc44a9160fa4151e6f74c05fa3102189710454' }), this.search && (h("p", { key: '0d8c04c19227c1461a18ccc21a9fd7412a2f6ee1', id: this.idSr, class: "pn-multiselect-sr-only", role: "alert", "aria-live": "assertive" }, this.srMessage && h("span", { key: '610fc47f9a032c6e8931745e6b6d0b418eadd5ee' }, this.srMessage))))));
|
|
555
566
|
}
|
|
556
567
|
static get is() { return "pn-multiselect"; }
|
|
557
568
|
static get originalStyleUrls() {
|
|
@@ -700,6 +711,29 @@ export class PnMultiselect extends Mixin(animateHeightFactory) {
|
|
|
700
711
|
"reflect": false,
|
|
701
712
|
"attribute": "icon"
|
|
702
713
|
},
|
|
714
|
+
"compact": {
|
|
715
|
+
"type": "boolean",
|
|
716
|
+
"mutable": false,
|
|
717
|
+
"complexType": {
|
|
718
|
+
"original": "boolean",
|
|
719
|
+
"resolved": "boolean",
|
|
720
|
+
"references": {}
|
|
721
|
+
},
|
|
722
|
+
"required": false,
|
|
723
|
+
"optional": true,
|
|
724
|
+
"docs": {
|
|
725
|
+
"tags": [{
|
|
726
|
+
"name": "since",
|
|
727
|
+
"text": "v7.21.0"
|
|
728
|
+
}],
|
|
729
|
+
"text": "Set the date picker label as compact. If used, the `placeholder` will no longer be displayed."
|
|
730
|
+
},
|
|
731
|
+
"getter": false,
|
|
732
|
+
"setter": false,
|
|
733
|
+
"reflect": false,
|
|
734
|
+
"attribute": "compact",
|
|
735
|
+
"defaultValue": "false"
|
|
736
|
+
},
|
|
703
737
|
"language": {
|
|
704
738
|
"type": "string",
|
|
705
739
|
"mutable": false,
|
|
@@ -129,7 +129,7 @@ export class PnRadioButton extends Mixin(animateHeightFactory) {
|
|
|
129
129
|
return this.tile && this.expand;
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: 'f386b0de0377d3dbe6891a2396d32b91a808d53c' }, h("input", { key: '189e352a198275f4dbd733425166e9cb2ed417ef', type: "radio", id: this.radioid, class: "pn-radio-input", value: this.value, name: this.name, disabled: this.disabled, checked: this.checked, required: this.required, "aria-invalid": this.isInvalid()?.toString(), "aria-describedby": this.displayHelpertext() ? this.idHelpertext : null, "data-tile": this.tile, "data-expand": this.expand, ref: el => (this.radioInput = el) }), h("div", { key: '710dcfe5b1660d25a9d98eb2c3739eb092f2ab4e', class: "pn-radio", "data-tile": this.tile, "data-expand": this.expand, "data-invalid": this.isInvalid() }, h("div", { key: '2d6bd1b03ee6565b88773c60a529ae2c5be89ffd', class: "pn-radio-button" }, h("div", { key: '8b15488acb65132b2498d361d320bb804af793de', class: "pn-radio-outer" }, h("div", { key: '64ebbe9b4d18f158a43bb5d82116ef4b19325ca1', class: "pn-radio-inner" }))), h("p", { key: '3b5ed02eeae60cff45b3b4999055c6d853a6c22f', class: "pn-radio-content", hidden: !this.displayText() }, h("label", { key: 'd5f3c5f59630407a45cc48fcb26e60fe7419c73c', htmlFor: this.radioid, class: "pn-radio-label", hidden: !this.displayLabel() }, this.label), h("span", { key: 'd4329417f178f6e7bcff365a1c051ebaa51b0447', id: this.idHelpertext, class: "pn-radio-helpertext", hidden: !this.displayHelpertext() }, this.helpertext, h("slot", { key: 'defddc5970a0ea4c94c4f7b07e2cec3e7616d8c2', name: "helpertext" })), h("slot", { key: 'edaaf37351bb5d05bdc92696ac9ee2c8bc8e13f7' })), this.displayIcon() && h("pn-icon", { key: 'b9cd0ab07c691020efe39e8bb6ec39d02d5be826', icon: this.icon, color: "gray900" }), h("div", { key: '89655e67304498950e11c0388fddbbde350239a1', class: "pn-radio-container", "data-open": this.checked, hidden: !this.displayContent(), style: { height: '0px' }, ref: el => (this.contentArea = el) }, h("div", { key: 'eeebaf7c0b1fe8327810faec62877888cb6ff95d', class: "pn-radio-area" }, h("slot", { key: 'c997ee7e8ef719ff4b830df30a414cea637a54ff', name: "content" }))))));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "pn-radio-button"; }
|
|
135
135
|
static get originalStyleUrls() {
|
package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.css
CHANGED
|
@@ -59,7 +59,7 @@ pn-range .pn-range-label {
|
|
|
59
59
|
margin: 0 0 0.25em 0;
|
|
60
60
|
gap: 0.5em;
|
|
61
61
|
-webkit-tap-highlight-color: transparent;
|
|
62
|
-
transition-property: color;
|
|
62
|
+
transition-property: color, transform;
|
|
63
63
|
transition-duration: 0.2s;
|
|
64
64
|
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
65
65
|
}
|