@designsystem-se/af 37.0.0 → 37.0.2-beta.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/components/digi-badge-notification.d.ts +1 -1
- package/components/digi-badge-status.d.ts +1 -1
- package/components/digi-bar-chart.d.ts +1 -1
- package/components/digi-bar-chart.js +1 -1
- package/components/digi-button.d.ts +1 -1
- package/components/digi-button.js +1 -1
- package/components/digi-calendar-datepicker.d.ts +1 -1
- package/components/digi-calendar-datepicker.js +4 -4
- package/components/digi-calendar-week-view.d.ts +1 -1
- package/components/digi-calendar-week-view.js +1 -1
- package/components/digi-calendar.d.ts +1 -1
- package/components/digi-calendar.js +1 -1
- package/components/digi-chart-line.d.ts +1 -1
- package/components/digi-chart-line.js +1 -1
- package/components/digi-code-block.d.ts +1 -1
- package/components/digi-code-block.js +1 -1
- package/components/digi-code-example.d.ts +1 -1
- package/components/digi-code-example.js +3 -3
- package/components/digi-code.d.ts +1 -1
- package/components/digi-context-menu.d.ts +1 -1
- package/components/digi-context-menu.js +1 -1
- package/components/digi-dialog.d.ts +1 -1
- package/components/digi-dialog.js +3 -3
- package/components/digi-expandable-accordion.d.ts +1 -1
- package/components/digi-expandable-faq-item.d.ts +1 -1
- package/components/digi-expandable-faq-item.js +1 -1
- package/components/digi-expandable-faq.d.ts +1 -1
- package/components/digi-footer-card.d.ts +1 -1
- package/components/digi-footer.d.ts +1 -1
- package/components/digi-footer.js +1 -1
- package/components/digi-form-category-filter.d.ts +1 -1
- package/components/digi-form-category-filter.js +1 -1
- package/components/digi-form-checkbox.d.ts +1 -1
- package/components/digi-form-checkbox.js +1 -1
- package/components/digi-form-error-list.d.ts +1 -1
- package/components/digi-form-error-list.js +3 -3
- package/components/digi-form-fieldset.d.ts +1 -1
- package/components/digi-form-file-upload.d.ts +1 -1
- package/components/digi-form-file-upload.js +1 -1
- package/components/digi-form-filter.d.ts +1 -1
- package/components/digi-form-filter.js +2 -2
- package/components/digi-form-input-search.d.ts +1 -1
- package/components/digi-form-input-search.js +1 -1
- package/components/digi-form-input.d.ts +1 -1
- package/components/digi-form-label.d.ts +1 -1
- package/components/digi-form-radiobutton.d.ts +1 -1
- package/components/digi-form-radiogroup.d.ts +1 -1
- package/components/digi-form-receipt.d.ts +1 -1
- package/components/digi-form-receipt.js +1 -1
- package/components/digi-form-select-filter.d.ts +1 -1
- package/components/digi-form-select-filter.js +3 -3
- package/components/digi-form-select.d.ts +1 -1
- package/components/digi-form-select.js +1 -1
- package/components/digi-form-textarea.d.ts +1 -1
- package/components/digi-form-validation-message.d.ts +1 -1
- package/components/digi-header-avatar.d.ts +1 -1
- package/components/digi-header-avatar.js +1 -1
- package/components/digi-header-navigation-item.d.ts +1 -1
- package/components/digi-header-navigation.d.ts +1 -1
- package/components/digi-header-navigation.js +2 -2
- package/components/digi-header-notification.d.ts +1 -1
- package/components/digi-header.d.ts +1 -1
- package/components/digi-header.js +3 -3
- package/components/digi-icon-accessibility-deaf.d.ts +1 -1
- package/components/digi-icon-accessibility-universal.d.ts +1 -1
- package/components/digi-icon-apple.d.ts +1 -1
- package/components/digi-icon-archive-outline.d.ts +1 -1
- package/components/digi-icon-archive.d.ts +1 -1
- package/components/digi-icon-arrow-back.d.ts +1 -1
- package/components/digi-icon-arrow-down.d.ts +1 -1
- package/components/digi-icon-arrow-left.d.ts +1 -1
- package/components/digi-icon-arrow-right.d.ts +1 -1
- package/components/digi-icon-arrow-sign-in.d.ts +1 -1
- package/components/digi-icon-arrow-sign-out.d.ts +1 -1
- package/components/digi-icon-arrow-up.d.ts +1 -1
- package/components/digi-icon-at.d.ts +1 -1
- package/components/digi-icon-bars.d.ts +1 -1
- package/components/digi-icon-bell-filled.d.ts +1 -1
- package/components/digi-icon-bell.d.ts +1 -1
- package/components/digi-icon-book.d.ts +1 -1
- package/components/digi-icon-bookmark-outline.d.ts +1 -1
- package/components/digi-icon-bookmark-solid.d.ts +1 -1
- package/components/digi-icon-bubble-ellipsis.d.ts +1 -1
- package/components/digi-icon-bubble.d.ts +1 -1
- package/components/digi-icon-building-outline.d.ts +1 -1
- package/components/digi-icon-building-solid.d.ts +1 -1
- package/components/digi-icon-bullseye.d.ts +1 -1
- package/components/digi-icon-calculator-solid.d.ts +1 -1
- package/components/digi-icon-calendar-alt-alert.d.ts +1 -1
- package/components/digi-icon-calendar-alt.d.ts +1 -1
- package/components/digi-icon-calendar.d.ts +1 -1
- package/components/digi-icon-caret-circle-right.d.ts +1 -1
- package/components/digi-icon-caret-down.d.ts +1 -1
- package/components/digi-icon-caret-left.d.ts +1 -1
- package/components/digi-icon-caret-right.d.ts +1 -1
- package/components/digi-icon-caret-up.d.ts +1 -1
- package/components/digi-icon-chart.d.ts +1 -1
- package/components/digi-icon-chat.d.ts +1 -1
- package/components/digi-icon-check-circle-reg-alt.d.ts +1 -1
- package/components/digi-icon-check-circle-solid.d.ts +1 -1
- package/components/digi-icon-check.d.ts +1 -1
- package/components/digi-icon-checklist.d.ts +1 -1
- package/components/digi-icon-chevron-down.d.ts +1 -1
- package/components/digi-icon-chevron-left.d.ts +1 -1
- package/components/digi-icon-chevron-right.d.ts +1 -1
- package/components/digi-icon-chevron-up.d.ts +1 -1
- package/components/digi-icon-clock.d.ts +1 -1
- package/components/digi-icon-communication-play-solid.d.ts +1 -1
- package/components/digi-icon-compress-alt.d.ts +1 -1
- package/components/digi-icon-comunication-case.d.ts +1 -1
- package/components/digi-icon-comunication-flag.d.ts +1 -1
- package/components/digi-icon-comunication-graduate.d.ts +1 -1
- package/components/digi-icon-comunication-play.d.ts +1 -1
- package/components/digi-icon-cooperation.d.ts +1 -1
- package/components/digi-icon-copy.d.ts +1 -1
- package/components/digi-icon-danger-outline.d.ts +1 -1
- package/components/digi-icon-download.d.ts +1 -1
- package/components/digi-icon-dxa.d.ts +1 -1
- package/components/digi-icon-edit.d.ts +1 -1
- package/components/digi-icon-ellipsis.d.ts +1 -1
- package/components/digi-icon-envelope-filled.d.ts +1 -1
- package/components/digi-icon-envelope.d.ts +1 -1
- package/components/digi-icon-exclamation-circle-filled.d.ts +1 -1
- package/components/digi-icon-exclamation-triangle-filled.d.ts +1 -1
- package/components/digi-icon-exclamation-triangle-warning.d.ts +1 -1
- package/components/digi-icon-exclamation-triangle.d.ts +1 -1
- package/components/digi-icon-expand-alt.d.ts +1 -1
- package/components/digi-icon-external-link-alt.d.ts +1 -1
- package/components/digi-icon-eye-slash.d.ts +1 -1
- package/components/digi-icon-eye.d.ts +1 -1
- package/components/digi-icon-facebook-square.d.ts +1 -1
- package/components/digi-icon-file-add.d.ts +1 -1
- package/components/digi-icon-file-document.d.ts +1 -1
- package/components/digi-icon-file-excel.d.ts +1 -1
- package/components/digi-icon-file-export.d.ts +1 -1
- package/components/digi-icon-file-governing.d.ts +1 -1
- package/components/digi-icon-file-pdf.d.ts +1 -1
- package/components/digi-icon-file-powerpoint.d.ts +1 -1
- package/components/digi-icon-file-remove.d.ts +1 -1
- package/components/digi-icon-file-word.d.ts +1 -1
- package/components/digi-icon-film.d.ts +1 -1
- package/components/digi-icon-filter.d.ts +1 -1
- package/components/digi-icon-folder-add.d.ts +1 -1
- package/components/digi-icon-folder-directory.d.ts +1 -1
- package/components/digi-icon-folder-open.d.ts +1 -1
- package/components/digi-icon-folder.d.ts +1 -1
- package/components/digi-icon-globe-filled.d.ts +1 -1
- package/components/digi-icon-globe.d.ts +1 -1
- package/components/digi-icon-headphones.d.ts +1 -1
- package/components/digi-icon-heart-solid.d.ts +1 -1
- package/components/digi-icon-heart.d.ts +1 -1
- package/components/digi-icon-history.d.ts +1 -1
- package/components/digi-icon-home.d.ts +1 -1
- package/components/digi-icon-image.d.ts +1 -1
- package/components/digi-icon-info-circle-solid.d.ts +1 -1
- package/components/digi-icon-input-select-marker.d.ts +1 -1
- package/components/digi-icon-instagram.d.ts +1 -1
- package/components/digi-icon-job-suggestion.d.ts +1 -1
- package/components/digi-icon-language-outline.d.ts +1 -1
- package/components/digi-icon-language.d.ts +1 -1
- package/components/digi-icon-laptop-phone.d.ts +1 -1
- package/components/digi-icon-lattlast.d.ts +1 -1
- package/components/digi-icon-licence-bus.d.ts +1 -1
- package/components/digi-icon-licence-car.d.ts +1 -1
- package/components/digi-icon-licence-motorcycle.d.ts +1 -1
- package/components/digi-icon-licence-truck.d.ts +1 -1
- package/components/digi-icon-lightbulb.d.ts +1 -1
- package/components/digi-icon-linkedin-in.d.ts +1 -1
- package/components/digi-icon-list-ul.d.ts +1 -1
- package/components/digi-icon-lock.d.ts +1 -1
- package/components/digi-icon-marker-filled.d.ts +1 -1
- package/components/digi-icon-marker.d.ts +1 -1
- package/components/digi-icon-media-course.d.ts +1 -1
- package/components/digi-icon-media-podcast.d.ts +1 -1
- package/components/digi-icon-microphone-off.d.ts +1 -1
- package/components/digi-icon-microphone.d.ts +1 -1
- package/components/digi-icon-minus.d.ts +1 -1
- package/components/digi-icon-move.d.ts +1 -1
- package/components/digi-icon-news.d.ts +1 -1
- package/components/digi-icon-notification-error.d.ts +1 -1
- package/components/digi-icon-notification-info.d.ts +1 -1
- package/components/digi-icon-notification-succes.d.ts +1 -1
- package/components/digi-icon-notification-warning.d.ts +1 -1
- package/components/digi-icon-online-computervideo.d.ts +1 -1
- package/components/digi-icon-online-interview.d.ts +1 -1
- package/components/digi-icon-online-meeting.d.ts +1 -1
- package/components/digi-icon-online-task.d.ts +1 -1
- package/components/digi-icon-online-video.d.ts +1 -1
- package/components/digi-icon-open-source.d.ts +1 -1
- package/components/digi-icon-palette.d.ts +1 -1
- package/components/digi-icon-paperclip.d.ts +1 -1
- package/components/digi-icon-paste.d.ts +1 -1
- package/components/digi-icon-pen.d.ts +1 -1
- package/components/digi-icon-phone-hangup.d.ts +1 -1
- package/components/digi-icon-phone.d.ts +1 -1
- package/components/digi-icon-plus.d.ts +1 -1
- package/components/digi-icon-pod.d.ts +1 -1
- package/components/digi-icon-print.d.ts +1 -1
- package/components/digi-icon-read.d.ts +1 -1
- package/components/digi-icon-redo.d.ts +1 -1
- package/components/digi-icon-scale.d.ts +1 -1
- package/components/digi-icon-screensharing-off.d.ts +1 -1
- package/components/digi-icon-screensharing.d.ts +1 -1
- package/components/digi-icon-search.d.ts +1 -1
- package/components/digi-icon-send-outline.d.ts +1 -1
- package/components/digi-icon-send-solid.d.ts +1 -1
- package/components/digi-icon-settings.d.ts +1 -1
- package/components/digi-icon-share-alt.d.ts +1 -1
- package/components/digi-icon-share-chain.d.ts +1 -1
- package/components/digi-icon-sign.d.ts +1 -1
- package/components/digi-icon-sliders-h.d.ts +1 -1
- package/components/digi-icon-sokkandidat.d.ts +1 -1
- package/components/digi-icon-sort-down.d.ts +1 -1
- package/components/digi-icon-sort-up.d.ts +1 -1
- package/components/digi-icon-sort.d.ts +1 -1
- package/components/digi-icon-spinner.d.ts +1 -1
- package/components/digi-icon-star-reg.d.ts +1 -1
- package/components/digi-icon-star.d.ts +1 -1
- package/components/digi-icon-suitcase-outline.d.ts +1 -1
- package/components/digi-icon-suitcase-solid.d.ts +1 -1
- package/components/digi-icon-system-assistance.d.ts +1 -1
- package/components/digi-icon-table-column.d.ts +1 -1
- package/components/digi-icon-table-row.d.ts +1 -1
- package/components/digi-icon-table.d.ts +1 -1
- package/components/digi-icon-task-done.d.ts +1 -1
- package/components/digi-icon-toggle-off.d.ts +1 -1
- package/components/digi-icon-toggle-on.d.ts +1 -1
- package/components/digi-icon-trash.d.ts +1 -1
- package/components/digi-icon-twitter.d.ts +1 -1
- package/components/digi-icon-tyck-till.d.ts +1 -1
- package/components/digi-icon-unlock.d.ts +1 -1
- package/components/digi-icon-update.d.ts +1 -1
- package/components/digi-icon-upload.d.ts +1 -1
- package/components/digi-icon-user-add.d.ts +1 -1
- package/components/digi-icon-user-alt.d.ts +1 -1
- package/components/digi-icon-user-edit.d.ts +1 -1
- package/components/digi-icon-users-solid.d.ts +1 -1
- package/components/digi-icon-validation-error.d.ts +1 -1
- package/components/digi-icon-validation-success.d.ts +1 -1
- package/components/digi-icon-validation-warning.d.ts +1 -1
- package/components/digi-icon-videocamera-off.d.ts +1 -1
- package/components/digi-icon-videocamera.d.ts +1 -1
- package/components/digi-icon-volume.d.ts +1 -1
- package/components/digi-icon-web-tv.d.ts +1 -1
- package/components/digi-icon-webinar.d.ts +1 -1
- package/components/digi-icon-wifi-signal0.d.ts +1 -1
- package/components/digi-icon-wifi-signal1.d.ts +1 -1
- package/components/digi-icon-wifi-signal2.d.ts +1 -1
- package/components/digi-icon-wifi-signal3.d.ts +1 -1
- package/components/digi-icon-window.d.ts +1 -1
- package/components/digi-icon-x-button-outline.d.ts +1 -1
- package/components/digi-icon-x-button.d.ts +1 -1
- package/components/digi-icon-x.d.ts +1 -1
- package/components/digi-icon-youtube.d.ts +1 -1
- package/components/digi-info-card-multi-container.d.ts +1 -1
- package/components/digi-info-card-multi.d.ts +1 -1
- package/components/digi-info-card.d.ts +1 -1
- package/components/digi-info-card.js +2 -2
- package/components/digi-layout-block.d.ts +1 -1
- package/components/digi-layout-columns.d.ts +1 -1
- package/components/digi-layout-container.d.ts +1 -1
- package/components/digi-link-button.d.ts +1 -1
- package/components/digi-link-external.d.ts +1 -1
- package/components/digi-link-internal.d.ts +1 -1
- package/components/digi-link-internal.js +1 -1
- package/components/digi-link.d.ts +1 -1
- package/components/digi-list.d.ts +1 -1
- package/components/digi-loader-skeleton.d.ts +1 -1
- package/components/digi-loader-spinner.d.ts +1 -1
- package/components/digi-logo.d.ts +1 -1
- package/components/digi-logo.js +1 -1
- package/components/digi-media-figure.d.ts +1 -1
- package/components/digi-media-image.d.ts +1 -1
- package/components/digi-navigation-breadcrumbs.d.ts +1 -1
- package/components/digi-navigation-pagination.d.ts +1 -1
- package/components/digi-navigation-pagination.js +2 -2
- package/components/digi-navigation-sidebar-button.d.ts +1 -1
- package/components/digi-navigation-sidebar-button.js +1 -1
- package/components/digi-navigation-sidebar.d.ts +1 -1
- package/components/digi-navigation-sidebar.js +1 -1
- package/components/digi-navigation-vertical-menu-item.d.ts +1 -1
- package/components/digi-navigation-vertical-menu-item.js +1 -1
- package/components/digi-navigation-vertical-menu.d.ts +1 -1
- package/components/digi-notification-alert.d.ts +1 -1
- package/components/digi-notification-alert.js +1 -1
- package/components/digi-notification-error-page.d.ts +1 -1
- package/components/digi-notification-error-page.js +1 -1
- package/components/digi-progress-circle.d.ts +1 -1
- package/components/digi-progress-indicator.d.ts +1 -1
- package/components/digi-progress-indicator.js +1 -1
- package/components/digi-progress-list-item.d.ts +1 -1
- package/components/digi-progress-list.d.ts +1 -1
- package/components/digi-progressbar.d.ts +1 -1
- package/components/digi-quote.d.ts +1 -1
- package/components/digi-quote.js +1 -1
- package/components/digi-table.d.ts +1 -1
- package/components/digi-tablist-panel.d.ts +1 -1
- package/components/digi-tablist.d.ts +1 -1
- package/components/digi-tag-media.d.ts +1 -1
- package/components/digi-tag.d.ts +1 -1
- package/components/digi-tag.js +1 -1
- package/components/digi-title-logo.d.ts +1 -1
- package/components/digi-title-logo.js +1 -1
- package/components/digi-tools-feedback-banner.d.ts +1 -1
- package/components/digi-tools-feedback-rating.d.ts +1 -1
- package/components/digi-tools-feedback.d.ts +1 -1
- package/components/digi-tools-feedback.js +3 -3
- package/components/digi-tools-theme-provider.d.ts +1 -1
- package/components/digi-tools-theme-provider.js +18 -5
- package/components/digi-typography-heading-jumbo.d.ts +1 -1
- package/components/digi-typography-meta.d.ts +1 -1
- package/components/digi-typography-preamble.d.ts +1 -1
- package/components/digi-typography-time.d.ts +1 -1
- package/components/digi-typography.d.ts +1 -1
- package/components/digi-util-breakpoint-observer.d.ts +1 -1
- package/components/digi-util-detect-click-outside.d.ts +1 -1
- package/components/digi-util-detect-focus-outside.d.ts +1 -1
- package/components/digi-util-intersection-observer.d.ts +1 -1
- package/components/digi-util-keydown-handler.d.ts +1 -1
- package/components/digi-util-keyup-handler.d.ts +1 -1
- package/components/digi-util-mutation-observer.d.ts +1 -1
- package/components/digi-util-resize-observer.d.ts +1 -1
- package/components/index.d.ts +284 -284
- package/components/index.js +1 -1
- package/components/p-0d568c4b.js +66 -0
- package/components/{p-9466c4e0.js → p-117e7b18.js} +1 -1
- package/components/{p-7ff04204.js → p-29f63312.js} +2 -2
- package/components/p-606ba731.js +165 -0
- package/components/{p-44f143ea.js → p-7d3fb535.js} +2 -2
- package/components/{p-2ac136a0.js → p-a79e144f.js} +1 -1
- package/components/{p-f53eb01a.js → p-d2a95a3e.js} +1 -1
- package/components/p-d7ef9cb1.js +13 -0
- package/components/{p-62a0008b.js → p-e756fda7.js} +2 -2
- package/components/p-f77cb7ae.js +163 -0
- package/custom-elements.json +4 -0
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-button_38.cjs.entry.js +5759 -0
- package/dist/cjs/digi-calendar-week-view.cjs.entry.js +50 -51
- package/dist/cjs/{digi-code-block_3.cjs.entry.js → digi-code-block.cjs.entry.js} +3 -143
- package/dist/cjs/digi-code-example.cjs.entry.js +1 -1
- package/dist/cjs/digi-dialog.cjs.entry.js +4 -15
- package/dist/cjs/digi-footer.cjs.entry.js +3 -14
- package/dist/cjs/digi-form-error-list.cjs.entry.js +3 -14
- package/dist/cjs/digi-form-file-upload.cjs.entry.js +10 -11
- package/dist/cjs/digi-form-input-search.cjs.entry.js +6 -7
- package/dist/cjs/digi-form-receipt.cjs.entry.js +3 -14
- package/dist/cjs/digi-header-avatar.cjs.entry.js +114 -0
- package/dist/cjs/digi-header-navigation-item.cjs.entry.js +27 -0
- package/dist/cjs/digi-header-navigation.cjs.entry.js +218 -0
- package/dist/cjs/digi-header-notification.cjs.entry.js +23 -0
- package/dist/cjs/digi-header.cjs.entry.js +134 -0
- package/dist/cjs/{digi-icon-copy.cjs.entry.js → digi-icon-bars.cjs.entry.js} +7 -7
- package/dist/cjs/digi-icon-bell-filled.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-x.cjs.entry.js +30 -0
- package/dist/cjs/digi-info-card.cjs.entry.js +1 -1
- package/dist/cjs/digi-link-internal.cjs.entry.js +1 -1
- package/dist/cjs/digi-media-image_2.cjs.entry.js +167 -0
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +3 -14
- package/dist/cjs/digi-navigation-sidebar-button.cjs.entry.js +30 -0
- package/dist/cjs/digi-notification-alert.cjs.entry.js +3 -14
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +3 -14
- package/dist/cjs/digi-quote.cjs.entry.js +1 -1
- package/dist/cjs/digi-title-logo.cjs.entry.js +121 -0
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +4 -15
- package/dist/cjs/digi-util-breakpoint-observer.cjs.entry.js +48 -0
- package/dist/cjs/{form-input-type.enum-9c8ee12a.js → form-input-type.enum-1fb2180a.js} +14 -0
- package/dist/cjs/{form-file-upload-variation.enum-634cfae8.js → form-validation-message-variation.enum-c5ec3e2d.js} +7 -0
- package/dist/cjs/index-7a477838.js +44 -96
- package/dist/cjs/{index-ac8e01b4.js → index-acb7b350.js} +189 -19
- package/dist/cjs/index.cjs.js +136 -141
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{typography-variation.enum-118ff8e5.js → typography-variation.enum-e41bd69d.js} +138 -0
- package/dist/collection/components/_button/button/button.css +6 -6
- package/dist/collection/components/_calendar/calendar/calendar.css +7 -2
- package/dist/collection/components/_calendar/calendar-datepicker/calendar-datepicker.css +347 -102
- package/dist/collection/components/_code/code-example/code-example.css +6 -0
- package/dist/collection/components/_dialog/dialog/dialog.css +1 -1
- package/dist/collection/components/_expandable/expandable-faq-item/expandable-faq-item.css +2 -2
- package/dist/collection/components/_form/form-checkbox/form-checkbox.css +347 -102
- package/dist/collection/components/_form/form-file-upload/form-file-upload.css +4 -3
- package/dist/collection/components/_form/form-select/form-select.css +2 -2
- package/dist/collection/components/_form/form-select-filter/form-select-filter.css +1 -1
- package/dist/collection/components/_header/header-avatar/header-avatar.css +346 -101
- package/dist/collection/components/_info-card/info-card/info-card.css +2 -2
- package/dist/collection/components/_link/link-internal/link-internal.css +346 -101
- package/dist/collection/components/_navigation/navigation-vertical-menu-item/navigation-vertical-menu-item.css +3 -3
- package/dist/collection/components/_progress/progress-indicator/progress-indicator.css +4 -3
- package/dist/collection/components/_quote/quote/quote.css +2 -2
- package/dist/collection/components/_tools/tools-feedback/tools-feedback.css +1 -1
- package/dist/collection/components/_tools/tools-theme-provider/tools-theme-provider.css +113 -2
- package/dist/collection/components/_tools/tools-theme-provider/tools-theme-provider.js +43 -2
- package/dist/collection/components/_tools/tools-theme-provider/tools-theme-provider.theme.enum.js +5 -0
- package/dist/collection/design-tokens/components/_button.variables.scss +6 -6
- package/dist/collection/design-tokens/components/_calendar-datepicker.variables.scss +1 -1
- package/dist/collection/design-tokens/components/_calendar.variables.scss +3 -2
- package/dist/collection/design-tokens/components/_dialog.variables.scss +1 -1
- package/dist/collection/design-tokens/components/_expandable-faq-item.variables.scss +2 -2
- package/dist/collection/design-tokens/components/_form-checkbox.variables.scss +1 -1
- package/dist/collection/design-tokens/components/_form-file-upload.variables.scss +2 -0
- package/dist/collection/design-tokens/components/_form-select-filter.variables.scss +1 -1
- package/dist/collection/design-tokens/components/_form-select.variables.scss +2 -2
- package/dist/collection/design-tokens/components/_info-card.variables.scss +2 -2
- package/dist/collection/design-tokens/components/_navigation-vertical-menu-item.variables.scss +3 -3
- package/dist/collection/design-tokens/components/_quote.variables.scss +2 -2
- package/dist/collection/design-tokens/components/_tools-feedback.variables.scss +1 -1
- package/dist/collection/enums.js +1 -0
- package/dist/collection/styles/src/_alias.mixin.scss +274 -128
- package/dist/collection/styles/src/themes/_common.mixin.scss +7 -0
- package/dist/collection/styles/src/themes/_theme-af25.mixin.scss +143 -0
- package/dist/collection/styles/src/tokens-documentation/web-AF25.json +1406 -323
- package/dist/digi-arbetsformedlingen/design-tokens/components/_button.variables.scss +6 -6
- package/dist/digi-arbetsformedlingen/design-tokens/components/_calendar-datepicker.variables.scss +1 -1
- package/dist/digi-arbetsformedlingen/design-tokens/components/_calendar.variables.scss +3 -2
- package/dist/digi-arbetsformedlingen/design-tokens/components/_dialog.variables.scss +1 -1
- package/dist/digi-arbetsformedlingen/design-tokens/components/_expandable-faq-item.variables.scss +2 -2
- package/dist/digi-arbetsformedlingen/design-tokens/components/_form-checkbox.variables.scss +1 -1
- package/dist/digi-arbetsformedlingen/design-tokens/components/_form-file-upload.variables.scss +2 -0
- package/dist/digi-arbetsformedlingen/design-tokens/components/_form-select-filter.variables.scss +1 -1
- package/dist/digi-arbetsformedlingen/design-tokens/components/_form-select.variables.scss +2 -2
- package/dist/digi-arbetsformedlingen/design-tokens/components/_info-card.variables.scss +2 -2
- package/dist/digi-arbetsformedlingen/design-tokens/components/_navigation-vertical-menu-item.variables.scss +3 -3
- package/dist/digi-arbetsformedlingen/design-tokens/components/_quote.variables.scss +2 -2
- package/dist/digi-arbetsformedlingen/design-tokens/components/_tools-feedback.variables.scss +1 -1
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.css +1 -1
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-0f543000.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-13120f18.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-180663ef.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-1a619dd3.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-237cad1c.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-26e8ea70.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-3887bb40.js +1 -0
- package/dist/digi-arbetsformedlingen/p-52a3c86a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-54d9bd3e.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-5ca38506.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-64b65586.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-67e32cc2.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-73a6be41.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-76ec3619.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-780519ec.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-800b764b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-82225661.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-84719680.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-920aee36.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-9b6e8cf8.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-9e56568b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a105d9fe.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ac87daf1.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-b328f60b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c64b4626.js +1 -0
- package/dist/digi-arbetsformedlingen/p-d9bcab5f.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e2c92528.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e540b80f.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e5fee242.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e7ee9bea.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f601908d.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fa44ce49.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fe409f14.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/styles/src/_alias.mixin.scss +274 -128
- package/dist/digi-arbetsformedlingen/styles/src/themes/_common.mixin.scss +7 -0
- package/dist/digi-arbetsformedlingen/styles/src/themes/_theme-af25.mixin.scss +143 -0
- package/dist/digi-arbetsformedlingen/styles/src/tokens-documentation/web-AF25.json +1406 -323
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-button_38.entry.js +5718 -0
- package/dist/esm/digi-calendar-week-view.entry.js +1 -2
- package/dist/esm/digi-code-block.entry.js +85 -0
- package/dist/esm/digi-code-example.entry.js +1 -1
- package/dist/esm/digi-dialog.entry.js +4 -15
- package/dist/esm/digi-footer.entry.js +3 -14
- package/dist/esm/digi-form-error-list.entry.js +3 -14
- package/dist/esm/digi-form-file-upload.entry.js +2 -3
- package/dist/esm/digi-form-input-search.entry.js +1 -2
- package/dist/esm/digi-form-receipt.entry.js +3 -14
- package/dist/esm/digi-header-avatar.entry.js +110 -0
- package/dist/esm/digi-header-navigation-item.entry.js +23 -0
- package/dist/esm/digi-header-navigation.entry.js +214 -0
- package/dist/esm/digi-header-notification.entry.js +19 -0
- package/dist/esm/digi-header.entry.js +130 -0
- package/dist/esm/digi-icon-bars.entry.js +26 -0
- package/dist/esm/digi-icon-bell-filled.entry.js +26 -0
- package/dist/esm/digi-icon-x.entry.js +26 -0
- package/dist/esm/digi-info-card.entry.js +1 -1
- package/dist/esm/digi-link-internal.entry.js +1 -1
- package/dist/esm/digi-media-image_2.entry.js +162 -0
- package/dist/esm/digi-navigation-pagination.entry.js +3 -14
- package/dist/esm/digi-navigation-sidebar-button.entry.js +26 -0
- package/dist/esm/digi-notification-alert.entry.js +3 -14
- package/dist/esm/digi-notification-error-page.entry.js +3 -14
- package/dist/esm/digi-quote.entry.js +1 -1
- package/dist/esm/digi-title-logo.entry.js +117 -0
- package/dist/esm/digi-tools-feedback.entry.js +4 -15
- package/dist/esm/digi-util-breakpoint-observer.entry.js +44 -0
- package/dist/esm/{form-input-type.enum-3da3db27.js → form-input-type.enum-a6bba983.js} +15 -1
- package/dist/esm/{form-file-upload-variation.enum-9c49ec5e.js → form-validation-message-variation.enum-f7835fc5.js} +8 -1
- package/dist/esm/index-148a7577.js +44 -96
- package/dist/esm/{index-2fce392f.js → index-dc6b83f7.js} +170 -3
- package/dist/esm/index.js +3 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{typography-variation.enum-23eeecd2.js → typography-variation.enum-b07f76c9.js} +139 -1
- package/dist/types/components/_tools/tools-theme-provider/tools-theme-provider.d.ts +9 -0
- package/dist/types/components/_tools/tools-theme-provider/tools-theme-provider.theme.enum.d.ts +4 -0
- package/dist/types/components.d.ts +12 -0
- package/dist/types/enums.d.ts +1 -0
- package/hydrate/index.js +40 -21
- package/hydrate/index.mjs +40 -21
- package/package.json +1 -1
- package/components/p-4bad4fb0.js +0 -7
- package/components/p-b57677c1.js +0 -66
- package/components/p-e8fc33ed.js +0 -165
- package/components/p-ff4f4fb8.js +0 -163
- package/dist/cjs/digi-button_17.cjs.entry.js +0 -1120
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +0 -2600
- package/dist/cjs/digi-calendar_2.cjs.entry.js +0 -464
- package/dist/cjs/digi-expandable-faq-item.cjs.entry.js +0 -97
- package/dist/cjs/digi-form-category-filter.cjs.entry.js +0 -121
- package/dist/cjs/digi-form-checkbox.cjs.entry.js +0 -127
- package/dist/cjs/digi-form-input.cjs.entry.js +0 -194
- package/dist/cjs/digi-form-label_3.cjs.entry.js +0 -129
- package/dist/cjs/digi-form-radiogroup.cjs.entry.js +0 -80
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +0 -565
- package/dist/cjs/digi-form-select_2.cjs.entry.js +0 -186
- package/dist/cjs/digi-icon-check.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-chevron-down.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-chevron-left_2.cjs.entry.js +0 -53
- package/dist/cjs/digi-icon-minus_2.cjs.entry.js +0 -53
- package/dist/cjs/digi-icon-validation-error_2.cjs.entry.js +0 -53
- package/dist/cjs/digi-link.cjs.entry.js +0 -75
- package/dist/cjs/digi-navigation-vertical-menu-item.cjs.entry.js +0 -150
- package/dist/cjs/digi-navigation-vertical-menu.cjs.entry.js +0 -177
- package/dist/cjs/digi-progress-indicator.cjs.entry.js +0 -137
- package/dist/cjs/digi-tools-theme-provider.cjs.entry.js +0 -28
- package/dist/cjs/digi-typography-heading-jumbo.cjs.entry.js +0 -38
- package/dist/cjs/digi-typography-preamble.cjs.entry.js +0 -20
- package/dist/cjs/digi-typography.cjs.entry.js +0 -26
- package/dist/cjs/digi-util-mutation-observer.cjs.entry.js +0 -64
- package/dist/cjs/expandable-faq-item-variation.enum-89427195.js +0 -18
- package/dist/cjs/form-checkbox-variation.enum-d2ca879e.js +0 -19
- package/dist/cjs/form-input-search-variation.enum-e0e025b1.js +0 -15
- package/dist/cjs/form-input-variation.enum-c750520c.js +0 -29
- package/dist/cjs/form-radiogroup-validation.enum-03a17d4d.js +0 -9
- package/dist/cjs/form-select-variation.enum-528c1bf0.js +0 -16
- package/dist/cjs/form-validation-message-variation.enum-855ae0be.js +0 -8
- package/dist/cjs/index-cad91a90.js +0 -66
- package/dist/cjs/index-e8333bcc.js +0 -174
- package/dist/cjs/navigation-vertical-menu-variation.enum-c237edd3.js +0 -13
- package/dist/cjs/progress-indicator-variation.enum-7cf8e0e4.js +0 -13
- package/dist/cjs/tools-theme-provider.brand.enum-bc855272.js +0 -7
- package/dist/cjs/typography-heading-jumbo-variation.enum-8677e099.js +0 -17
- package/dist/digi-arbetsformedlingen/p-029c4d40.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-07985aef.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-0c77050e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-1f3345e9.js +0 -1
- package/dist/digi-arbetsformedlingen/p-1f956af8.js +0 -1
- package/dist/digi-arbetsformedlingen/p-24fe2189.js +0 -1
- package/dist/digi-arbetsformedlingen/p-2693c1d8.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-2c698144.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-33349e7e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-3a76bfde.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-3b20ec86.js +0 -1
- package/dist/digi-arbetsformedlingen/p-3d7fff3c.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-41bc039f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4841b4e1.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4bad4fb0.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4e36c467.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-51149879.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-51bfa2a9.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-57319a80.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-57a0cc63.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-583d40dc.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-5d3383f9.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-681e7beb.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-6bd60ab6.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-6d864e79.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7238fdb8.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7327f45d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-750ff498.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-78c99e87.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7933b555.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7aacd45f.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7e125c6e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-8142cc73.js +0 -1
- package/dist/digi-arbetsformedlingen/p-88b4d03a.js +0 -1
- package/dist/digi-arbetsformedlingen/p-905ccb30.js +0 -1
- package/dist/digi-arbetsformedlingen/p-93766b5e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-96987381.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9a6ea3b7.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9b7f0707.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9be9a291.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9dd5d6c8.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a2561b9e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a34dfc04.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-bd55807c.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-c29ab968.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-c461917d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-c68bf2b3.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-c7949525.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ccd617cc.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d055d564.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d1886fff.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d5376b7c.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d7aa8315.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e9abb2b1.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-edcb61eb.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-eeca26b2.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-f40f4b2a.js +0 -1
- package/dist/digi-arbetsformedlingen/p-f447b984.js +0 -1
- package/dist/digi-arbetsformedlingen/p-f94db846.entry.js +0 -1
- package/dist/esm/digi-button_17.entry.js +0 -1100
- package/dist/esm/digi-calendar-datepicker.entry.js +0 -2596
- package/dist/esm/digi-calendar_2.entry.js +0 -459
- package/dist/esm/digi-code-block_3.entry.js +0 -223
- package/dist/esm/digi-expandable-faq-item.entry.js +0 -93
- package/dist/esm/digi-form-category-filter.entry.js +0 -117
- package/dist/esm/digi-form-checkbox.entry.js +0 -123
- package/dist/esm/digi-form-input.entry.js +0 -190
- package/dist/esm/digi-form-label_3.entry.js +0 -123
- package/dist/esm/digi-form-radiogroup.entry.js +0 -76
- package/dist/esm/digi-form-select-filter.entry.js +0 -561
- package/dist/esm/digi-form-select_2.entry.js +0 -181
- package/dist/esm/digi-icon-check.entry.js +0 -26
- package/dist/esm/digi-icon-chevron-down.entry.js +0 -26
- package/dist/esm/digi-icon-chevron-left_2.entry.js +0 -48
- package/dist/esm/digi-icon-copy.entry.js +0 -26
- package/dist/esm/digi-icon-minus_2.entry.js +0 -48
- package/dist/esm/digi-icon-validation-error_2.entry.js +0 -48
- package/dist/esm/digi-link.entry.js +0 -71
- package/dist/esm/digi-navigation-vertical-menu-item.entry.js +0 -146
- package/dist/esm/digi-navigation-vertical-menu.entry.js +0 -173
- package/dist/esm/digi-progress-indicator.entry.js +0 -133
- package/dist/esm/digi-tools-theme-provider.entry.js +0 -24
- package/dist/esm/digi-typography-heading-jumbo.entry.js +0 -34
- package/dist/esm/digi-typography-preamble.entry.js +0 -16
- package/dist/esm/digi-typography.entry.js +0 -22
- package/dist/esm/digi-util-mutation-observer.entry.js +0 -60
- package/dist/esm/expandable-faq-item-variation.enum-a8cb225b.js +0 -18
- package/dist/esm/form-checkbox-variation.enum-83e906fc.js +0 -19
- package/dist/esm/form-input-search-variation.enum-6d8dc10a.js +0 -15
- package/dist/esm/form-input-variation.enum-64d9450f.js +0 -29
- package/dist/esm/form-radiogroup-validation.enum-d790fc66.js +0 -9
- package/dist/esm/form-select-variation.enum-f2f6098d.js +0 -16
- package/dist/esm/form-validation-message-variation.enum-bcef8a9d.js +0 -8
- package/dist/esm/index-5b6c95c6.js +0 -63
- package/dist/esm/index-8685f88d.js +0 -170
- package/dist/esm/navigation-vertical-menu-variation.enum-c30b0ea9.js +0 -13
- package/dist/esm/progress-indicator-variation.enum-b12ba50a.js +0 -13
- package/dist/esm/tools-theme-provider.brand.enum-8c5a98c9.js +0 -7
- package/dist/esm/typography-heading-jumbo-variation.enum-eb737f1b.js +0 -17
|
@@ -1,459 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-148a7577.js';
|
|
2
|
-
import { r as randomIdGenerator } from './randomIdGenerator.util-56406f2e.js';
|
|
3
|
-
import { d as detectClickOutside } from './detectClickOutside.util-72594957.js';
|
|
4
|
-
import { d as detectFocusOutside } from './detectFocusOutside.util-a8676bee.js';
|
|
5
|
-
import { l as logger } from './logger.util-ede3c48a.js';
|
|
6
|
-
import { _ as _t } from './text-8f88c0f6.js';
|
|
7
|
-
import { i as isValid } from './index-8685f88d.js';
|
|
8
|
-
import { i as isBefore, a as isAfter } from './index-5b6c95c6.js';
|
|
9
|
-
import './detectClosest.util-58a7504f.js';
|
|
10
|
-
|
|
11
|
-
const calendarCss = ".sc-digi-calendar-h{--digi--calendar--display:inline-block;--digi--calendar--header--font-family:var(--digi--global--typography--font-family--default);--digi--calendar--header--font-weight:var(--digi--global--typography--font-weight--semibold);--digi--calendar--header--display:flex;--digi--calendar--header--align-items:center;--digi--calendar--header--justify-content:space-between;--digi--calendar--header--text-align:center;--digi--calendar--header--button--padding:var(--digi--gutter--medium) var(--digi--gutter--largest);--digi--calendar--header--button--background:transparent;--digi--calendar--header--button--box-shadow:none;--digi--calendar--header--button--background--hover:var(--digi--color--background--interactive--hover--secondary);--digi--calendar--table--border-spacing:0;--digi--calendar--table--border-collapse:collapse;--digi--calendar--table--font-family:var(--digi--global--typography--font-family--default);--digi--calendar--table--font-weight:var(--digi--global--typography--font-weight--semibold);--digi--calendar--table-header--padding:var(--digi--gutter--larger) 0;--digi--calendar--table-header--font-weight-normal:var(--digi--typography--body--font-weight--desktop);--digi--calendar--date--border-color:none;--digi--calendar--date--box-shadow:none;--digi--calendar--date--background-color:var(--digi--color--background--interactive--default--secondary);--digi--calendar--date--background-color--hover:var(--digi--color--background--interactive--hover--secondary);--digi--calendar--date--padding:var(--digi--gutter--large);--digi--calendar--date--color:var(--digi--color--text--primary);--digi--calendar--date--focused--background-color:var(--digi--color--background--interactive--hover--secondary);--digi--calendar--date--today--circle-border:2px solid var(--digi--color--marking--indication--secondary);--digi--calendar--date--today--circle-margin:10%;--digi--calendar--date--selected--color:var(--digi--color--text--interactive--secondary);--digi--calendar--date--selected--background-color:var(--digi--color--background--interactive--selected--primary);--digi--calendar--date--not-selectable-strike--color:var(--digi--color--marking--indication--tertiary);--digi--calendar--week--font-style:italic;--digi--calendar--week--font-size:var(--digi--global--typography--font-size--small);--digi--calendar--week--border-color:var(--digi--color--divider--primary);--digi--calendar--week--border-width:var(--digi--border-width--primary)}.sc-digi-calendar-h .digi-calendar.sc-digi-calendar{display:var(--digi--calendar--display);background:var(--digi--calendar--header--button--background);padding:0px 1px 3px 1px;overflow:hidden;max-width:23.4375rem}.sc-digi-calendar-h .digi-calendar--hide.sc-digi-calendar{--digi--calendar--display:none}.sc-digi-calendar-h .digi-calendar__header.sc-digi-calendar{display:var(--digi--calendar--header--display);align-items:var(--digi--calendar--header--align-items);justify-content:var(--digi--calendar--header--justify-content);text-align:var(--digi--calendar--header--text-align);font-size:var(--digi--global--typography--font-size--base);font-family:var(--digi--calendar--header--font-family);font-weight:var(--digi--calendar--header--font-weight)}.sc-digi-calendar-h .digi-calendar__header--year-select.sc-digi-calendar{display:inherit;justify-content:center;margin:0 auto}.sc-digi-calendar-h .digi-calendar__header--year-select.sc-digi-calendar digi-form-select.sc-digi-calendar:first-child{margin-right:var(--digi--padding--smaller)}.sc-digi-calendar-h .digi-calendar__header--year-select.sc-digi-calendar digi-form-select.sc-digi-calendar:last-child{width:5rem}.sc-digi-calendar-h .digi-calendar__header--year-select.sc-digi-calendar digi-form-select.sc-digi-calendar select.sc-digi-calendar{padding-inline-end:2rem}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar{flex:auto;display:inherit;align-items:inherit;justify-content:inherit}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-name.sc-digi-calendar{padding-inline:var(--digi--padding--smaller)}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar{font-family:inherit;font-size:inherit;font-weight:inherit;color:var(--digi--calendar--date--color);display:flex;align-items:center;background:var(--digi--calendar--header--button--background);border:var(--digi--calendar--date--box-shadow);padding:var(--digi--calendar--header--button--padding)}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar:last-child{border-radius:0 4px 0 0}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar:first-child{border-radius:4px 0 0 0}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar:focus-visible:not(.digi-calendar__date--not-selectable),.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar:active:not(.digi-calendar__date--not-selectable){--digi--calendar--header--button--background:var(\n --digi--calendar--header--button--background--hover\n );text-decoration:underline;cursor:pointer}@media (any-hover: hover){.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar:hover:not(.digi-calendar__date--not-selectable){--digi--calendar--header--button--background:var(\n --digi--calendar--header--button--background--hover\n );text-decoration:underline;cursor:pointer}}.sc-digi-calendar-h .digi-calendar__header--month-step.sc-digi-calendar .digi-calendar__month-select-button.sc-digi-calendar:focus-visible{outline:2px solid black;outline-offset:-3px;box-shadow:0px 0px 0px 5px inset white}.sc-digi-calendar-h .digi-calendar__table.sc-digi-calendar{border-collapse:var(--digi--calendar--table--border-collapse);border-spacing:var(--digi--calendar--table--border-spacing);font-family:var(--digi--calendar--table--font-family);table-layout:fixed;margin-bottom:var(--digi--margin--medium)}.sc-digi-calendar-h .digi-calendar__table-header-week.sc-digi-calendar{font-style:italic;padding:var(--digi--calendar--table-header--padding);font-weight:var(--digi--calendar--table-header--font-weight-normal);width:50px}.sc-digi-calendar-h .digi-calendar__table-header.sc-digi-calendar{padding:var(--digi--calendar--table-header--padding);font-weight:var(--digi--calendar--table--font-weight);width:46px}.sc-digi-calendar-h .digi-calendar__td-week.sc-digi-calendar{border-right:var(--digi--calendar--week--border-width) solid var(--digi--calendar--week--border-color)}.sc-digi-calendar-h .digi-calendar__td.sc-digi-calendar{text-align:right}.sc-digi-calendar-h .digi-calendar__date--week-number.sc-digi-calendar{font-style:var(--digi--calendar--week--font-style);font-size:var(--digi--calendar--week--font-size);display:table-cell;text-align:center}.sc-digi-calendar-h .digi-calendar__date--week-number.sc-digi-calendar:hover{cursor:default}.sc-digi-calendar-h .digi-calendar__date.sc-digi-calendar{position:relative;padding:var(--digi--calendar--date--padding);color:var(--digi--calendar--date--color);background-color:var(--digi--calendar--date--background-color);border-color:var(--digi--calendar--date--border-color);border-radius:var(--digi--border-radius--secondary);font-family:inherit;font-size:inherit;font-weight:inherit;text-align:center;border:none;width:44px;height:44px}.sc-digi-calendar-h .digi-calendar__date--disabled.sc-digi-calendar{--digi--calendar--date--color:transparent;pointer-events:none}.sc-digi-calendar-h .digi-calendar__date--today.sc-digi-calendar{position:relative}.sc-digi-calendar-h .digi-calendar__date--today.sc-digi-calendar::after{display:block;content:\" \";position:absolute;top:var(--digi--calendar--date--today--circle-margin);bottom:var(--digi--calendar--date--today--circle-margin);left:var(--digi--calendar--date--today--circle-margin);right:var(--digi--calendar--date--today--circle-margin);border:var(--digi--calendar--date--today--circle-border);border-radius:50%}.sc-digi-calendar-h .digi-calendar__date--today.digi-calendar__date--selected.sc-digi-calendar::after{border-color:var(--digi--color--icon--secondary)}@media (any-hover: hover){.sc-digi-calendar-h .digi-calendar__date.sc-digi-calendar:hover:not(.digi-calendar__date--not-selectable){cursor:pointer}.sc-digi-calendar-h .digi-calendar__date.sc-digi-calendar:hover:not(.digi-calendar__date--not-selectable):not(.digi-calendar__date--selected){--digi--calendar--date--box-shadow:var(--digi--calendar--date--box-shadow--hover);--digi--calendar--date--background-color:var(--digi--calendar--date--background-color--hover)}.sc-digi-calendar-h .digi-calendar__date.sc-digi-calendar:hover:not(.digi-calendar__date--not-selectable) span.sc-digi-calendar{text-decoration:underline}}.sc-digi-calendar-h .digi-calendar__date--selected.sc-digi-calendar{--digi--calendar--date--background-color:var(--digi--calendar--date--selected--background-color);--digi--calendar--date--color:var(--digi--calendar--date--selected--color)}.sc-digi-calendar-h .digi-calendar__date--selected.sc-digi-calendar:hover{--digi--calendar--date--background-color:var(--digi--calendar--date--selected--background-color)}.sc-digi-calendar-h .digi-calendar__date--selected.sc-digi-calendar:hover span.sc-digi-calendar{text-decoration:none}.sc-digi-calendar-h .digi-calendar__date--selected.sc-digi-calendar:focus-visible{outline:2px solid black;outline-offset:-3px;box-shadow:0px 0px 0px 5px inset white}.sc-digi-calendar-h .digi-calendar__date--not-selectable.sc-digi-calendar{cursor:not-allowed}.sc-digi-calendar-h .digi-calendar__date--not-selectable.sc-digi-calendar::after{display:block;content:\" \";width:0px;height:100%;border:1px solid #757575;transform:rotate(-45deg);position:absolute;top:0%;left:50%}.sc-digi-calendar-h .digi-calendar__date--focused.sc-digi-calendar:focus-visible:not(.digi-calendar__date--selected):not(.digi-calendar__date--not-selectable){--digi--calendar--date--background-color:var(--digi--calendar--date--focused--background-color);outline:2px solid black;outline-offset:-3px;box-shadow:0px 0px 0px 5px inset white}.sc-digi-calendar-s digi-form-label{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}";
|
|
12
|
-
const DigiCalendarStyle0 = calendarCss;
|
|
13
|
-
|
|
14
|
-
const Calendar = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
registerInstance(this, hostRef);
|
|
17
|
-
this.afOnDateSelectedChange = createEvent(this, "afOnDateSelectedChange", 7);
|
|
18
|
-
this.afOnFocusOutside = createEvent(this, "afOnFocusOutside", 7);
|
|
19
|
-
this.afOnClickOutside = createEvent(this, "afOnClickOutside", 7);
|
|
20
|
-
this.afOnDirty = createEvent(this, "afOnDirty", 7);
|
|
21
|
-
this.selectedDates = [];
|
|
22
|
-
this.focusedDate = undefined;
|
|
23
|
-
this.dirty = false;
|
|
24
|
-
this.afId = randomIdGenerator('digi-calendar');
|
|
25
|
-
this.afOpenCalendarTo = undefined;
|
|
26
|
-
this.afShowWeekNumber = false;
|
|
27
|
-
this.afSelectedDate = undefined;
|
|
28
|
-
this.afSelectedDates = [];
|
|
29
|
-
this.afActive = true;
|
|
30
|
-
this.afMinDate = undefined;
|
|
31
|
-
this.afMaxDate = undefined;
|
|
32
|
-
this.afMultipleDates = false;
|
|
33
|
-
this.afYearSelect = false;
|
|
34
|
-
this.activeCalendar = [];
|
|
35
|
-
}
|
|
36
|
-
focusedDateChanged() {
|
|
37
|
-
this.drawCalendar(this.focusedDate);
|
|
38
|
-
}
|
|
39
|
-
afOpenCalendarToChangeHandler() {
|
|
40
|
-
this.determineFocusedDate();
|
|
41
|
-
}
|
|
42
|
-
afShowWeekNumberChangeHandler() {
|
|
43
|
-
this.drawCalendar(this.focusedDate);
|
|
44
|
-
}
|
|
45
|
-
afSelectedDateChangeHandler() {
|
|
46
|
-
this.afSelectedDates = isValid(this.afSelectedDate)
|
|
47
|
-
? [this.afSelectedDate]
|
|
48
|
-
: [];
|
|
49
|
-
}
|
|
50
|
-
afSelectedDatesChangeHandler() {
|
|
51
|
-
if (this.afSelectedDates.length > 0) {
|
|
52
|
-
if (this.afMultipleDates) {
|
|
53
|
-
const invalidDate = this.afSelectedDates.find((date) => !isValid(date));
|
|
54
|
-
if (invalidDate === undefined) {
|
|
55
|
-
this.selectedDates = this.afSelectedDates;
|
|
56
|
-
this.determineFocusedDate();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
else if (isValid(this.afSelectedDates[0])) {
|
|
60
|
-
this.selectedDates = [this.afSelectedDates[0]];
|
|
61
|
-
this.determineFocusedDate();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
this.selectedDates = [];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
focusoutHandler(e) {
|
|
69
|
-
const target = e.target;
|
|
70
|
-
const selector = `#${this.afId}-calendar`;
|
|
71
|
-
if (detectFocusOutside(target, selector)) {
|
|
72
|
-
this.afOnFocusOutside.emit(e);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
clickHandler(e) {
|
|
76
|
-
const target = e.target;
|
|
77
|
-
const selector = `#${this.afId}-calendar`;
|
|
78
|
-
if (detectClickOutside(target, selector)) {
|
|
79
|
-
this.afOnClickOutside.emit(e);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
determineFocusedDate() {
|
|
83
|
-
if (this.dirty) {
|
|
84
|
-
return; // Don't change focused date if user has already interacted with the calendar
|
|
85
|
-
}
|
|
86
|
-
else if (this.afOpenCalendarTo && isValid(this.afOpenCalendarTo)) {
|
|
87
|
-
this.focusedDate = this.afOpenCalendarTo;
|
|
88
|
-
}
|
|
89
|
-
else if (this.selectedDates.length > 0) {
|
|
90
|
-
this.focusedDate = this.selectedDates[0];
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
this.focusedDate = new Date();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
drawCalendar(focusedDate) {
|
|
97
|
-
const date = {
|
|
98
|
-
year: focusedDate.getFullYear(),
|
|
99
|
-
month: focusedDate.getMonth()
|
|
100
|
-
};
|
|
101
|
-
this.lastWeekOfPreviousMonth = this.getWeekDays(this.getLastDayOfPrevMonth(date));
|
|
102
|
-
this.firstWeekOfNextMonth = this.getWeekDays(this.getFirstDayOfNextMonth(date));
|
|
103
|
-
this.weeksBetween = this.getWeeksBetween(this.getLastDayOfPrevMonth(date), this.getFirstDayOfNextMonth(date));
|
|
104
|
-
this.weekDaysbetween = this.getWeekdaysOfMonth(this.weeksBetween);
|
|
105
|
-
this.activeCalendar = this.appendFirstWeekOfNextMonth()
|
|
106
|
-
? [
|
|
107
|
-
this.lastWeekOfPreviousMonth,
|
|
108
|
-
...this.weekDaysbetween,
|
|
109
|
-
this.appendFirstWeekOfNextMonth()
|
|
110
|
-
]
|
|
111
|
-
: [this.lastWeekOfPreviousMonth, ...this.weekDaysbetween];
|
|
112
|
-
this.appendFirstWeekOfNextMonth();
|
|
113
|
-
if (this.afShowWeekNumber) {
|
|
114
|
-
this.activeCalendar.forEach((el, i) => {
|
|
115
|
-
this.activeCalendar[i].unshift(this.getWeekNumbers(el[0]));
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
appendFirstWeekOfNextMonth() {
|
|
120
|
-
const lastArray = JSON.stringify(this.weekDaysbetween.slice(-1)[0]);
|
|
121
|
-
const stringFirstweek = JSON.stringify(this.firstWeekOfNextMonth);
|
|
122
|
-
if (!this.firstWeekOfNextMonth.some((date) => this.isSameMonth(date, this.focusedDate))) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
else if (lastArray !== stringFirstweek) {
|
|
126
|
-
return this.firstWeekOfNextMonth;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
getLastDayOfPrevMonth(date) {
|
|
130
|
-
return new Date(date.year, date.month, 0);
|
|
131
|
-
}
|
|
132
|
-
getWeekDays(date) {
|
|
133
|
-
const today = date || new Date();
|
|
134
|
-
const week = [];
|
|
135
|
-
const dayOffset = today.getDay(); // 0=söndag
|
|
136
|
-
for (let i = 1; i <= 7; i++) {
|
|
137
|
-
week.push(new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOffset + i));
|
|
138
|
-
}
|
|
139
|
-
return week;
|
|
140
|
-
}
|
|
141
|
-
getFirstDayOfNextMonth(date) {
|
|
142
|
-
return new Date(date.year, date.month + 1, 1);
|
|
143
|
-
}
|
|
144
|
-
getWeeksBetween(lastDayOfPrevMonth, firstDayOnNextMonth) {
|
|
145
|
-
const week = 7 * 24 * 60 * 60 * 1000;
|
|
146
|
-
const d1ms = lastDayOfPrevMonth.getTime();
|
|
147
|
-
const d2ms = firstDayOnNextMonth.getTime();
|
|
148
|
-
const diff = Math.abs(d2ms - d1ms);
|
|
149
|
-
return Math.floor(diff / week);
|
|
150
|
-
}
|
|
151
|
-
getWeekdaysOfMonth(weeksBetween) {
|
|
152
|
-
let weeks = [];
|
|
153
|
-
for (let i = 1; i <= weeksBetween; i++) {
|
|
154
|
-
weeks = [...weeks, this.getWeekDays(this.getUpcoming(i))];
|
|
155
|
-
}
|
|
156
|
-
return weeks;
|
|
157
|
-
}
|
|
158
|
-
getUpcoming(weeks) {
|
|
159
|
-
return new Date(this.focusedDate.getFullYear(), this.focusedDate.getMonth(), 7 * weeks);
|
|
160
|
-
}
|
|
161
|
-
onDirty() {
|
|
162
|
-
if (!this.dirty) {
|
|
163
|
-
this.dirty = true;
|
|
164
|
-
this.afOnDirty.emit(this.dirty);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
selectDateHandler(dateSelected) {
|
|
168
|
-
this.onDirty();
|
|
169
|
-
if (!this.isDateSelectable(dateSelected))
|
|
170
|
-
return;
|
|
171
|
-
if (this.isDateSelected(dateSelected)) {
|
|
172
|
-
this.selectedDates = this.afMultipleDates
|
|
173
|
-
? this.selectedDates.filter((d) => {
|
|
174
|
-
return !this.isSameDate(d, dateSelected);
|
|
175
|
-
})
|
|
176
|
-
: [];
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
this.selectedDates = this.afMultipleDates
|
|
180
|
-
? [...this.selectedDates, dateSelected]
|
|
181
|
-
: [dateSelected];
|
|
182
|
-
}
|
|
183
|
-
this.focusedDate = new Date(dateSelected);
|
|
184
|
-
this.afOnDateSelectedChange.emit(this.selectedDates);
|
|
185
|
-
}
|
|
186
|
-
getMonthName(monthNumber) {
|
|
187
|
-
return new Date(1992, monthNumber, 1)
|
|
188
|
-
.toLocaleDateString(_t.locale, {
|
|
189
|
-
month: 'short'
|
|
190
|
-
})
|
|
191
|
-
.replace('.', '');
|
|
192
|
-
}
|
|
193
|
-
getFullMonthName(monthNumber) {
|
|
194
|
-
return new Date(this.focusedDate.getFullYear(), monthNumber, 1).toLocaleDateString(_t.locale, {
|
|
195
|
-
month: 'long',
|
|
196
|
-
year: 'numeric'
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
// Get the week number of a specific date. Taken from https://weeknumber.com/how-to/javascript
|
|
200
|
-
getWeekNumbers(dateInput) {
|
|
201
|
-
const date = new Date(dateInput);
|
|
202
|
-
date.getTime();
|
|
203
|
-
date.setHours(0, 0, 0, 0);
|
|
204
|
-
date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));
|
|
205
|
-
const week1 = new Date(date.getFullYear(), 0, 4);
|
|
206
|
-
return (1 +
|
|
207
|
-
Math.round(((date.getTime() - week1.getTime()) / 86400000 -
|
|
208
|
-
3 +
|
|
209
|
-
((week1.getDay() + 6) % 7)) /
|
|
210
|
-
7));
|
|
211
|
-
}
|
|
212
|
-
isSameMonth(date, currentDate) {
|
|
213
|
-
if (date instanceof Date && date instanceof Date) {
|
|
214
|
-
return (`${date.getFullYear()}${date.getMonth()}` ===
|
|
215
|
-
`${currentDate.getFullYear()}${currentDate.getMonth()}`);
|
|
216
|
-
}
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
isSameDate(date, newDate) {
|
|
220
|
-
return this.getDateString(date) === this.getDateString(newDate);
|
|
221
|
-
}
|
|
222
|
-
getDateString(date) {
|
|
223
|
-
return `${date.getDate()}${date.getMonth()}${date.getFullYear()}`;
|
|
224
|
-
}
|
|
225
|
-
isDateSelected(date) {
|
|
226
|
-
return !!this.selectedDates.find((d) => this.isSameDate(date, d));
|
|
227
|
-
}
|
|
228
|
-
isDateSelectable(date) {
|
|
229
|
-
if (this.afMinDate && this.isBefore(date, this.afMinDate))
|
|
230
|
-
return false;
|
|
231
|
-
if (this.afMaxDate && this.isAfter(date, this.afMaxDate))
|
|
232
|
-
return false;
|
|
233
|
-
return true;
|
|
234
|
-
}
|
|
235
|
-
isBefore(a, b) {
|
|
236
|
-
return isBefore(this.dateWithoutTime(a), this.dateWithoutTime(b));
|
|
237
|
-
}
|
|
238
|
-
isAfter(a, b) {
|
|
239
|
-
return isAfter(this.dateWithoutTime(a), this.dateWithoutTime(b));
|
|
240
|
-
}
|
|
241
|
-
dateWithoutTime(date) {
|
|
242
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
243
|
-
}
|
|
244
|
-
isInAnotherMonth(date) {
|
|
245
|
-
return !this.isSameMonth(date, this.focusedDate);
|
|
246
|
-
}
|
|
247
|
-
subtractMonth() {
|
|
248
|
-
this.onDirty();
|
|
249
|
-
const month = new Date(this.focusedDate);
|
|
250
|
-
const currentDay = month.getDate();
|
|
251
|
-
month.setMonth(month.getMonth() - 1, 1);
|
|
252
|
-
const lastDayOfPrevMonth = new Date(month.getFullYear(), month.getMonth() + 1, 0).getDate();
|
|
253
|
-
month.setDate(Math.min(currentDay, lastDayOfPrevMonth));
|
|
254
|
-
this.focusedDate = month;
|
|
255
|
-
}
|
|
256
|
-
addMonth() {
|
|
257
|
-
this.onDirty();
|
|
258
|
-
const month = new Date(this.focusedDate);
|
|
259
|
-
const currentDay = month.getDate();
|
|
260
|
-
month.setMonth(month.getMonth() + 1, 1);
|
|
261
|
-
const lastDayOfNextMonth = new Date(month.getFullYear(), month.getMonth() + 1, 0).getDate();
|
|
262
|
-
month.setDate(Math.min(currentDay, lastDayOfNextMonth));
|
|
263
|
-
this.focusedDate = month;
|
|
264
|
-
}
|
|
265
|
-
getCurrent(date) {
|
|
266
|
-
return this.isSameDate(date, new Date()) ? 'date' : null;
|
|
267
|
-
}
|
|
268
|
-
setTabIndex(date) {
|
|
269
|
-
return this.isFocused(date) ? 0 : -1;
|
|
270
|
-
}
|
|
271
|
-
navigateHandler(e, daysToAdd) {
|
|
272
|
-
!!e.detail && e.detail.preventDefault();
|
|
273
|
-
if (e.detail.key === 'Tab') {
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
this.onDirty();
|
|
277
|
-
const date = new Date(e.detail.target.dataset.date);
|
|
278
|
-
const newDate = new Date(date.setDate(date.getDate() + daysToAdd));
|
|
279
|
-
this.focusedDate = newDate;
|
|
280
|
-
this.resetFocus();
|
|
281
|
-
}
|
|
282
|
-
resetFocus() {
|
|
283
|
-
setTimeout(() => {
|
|
284
|
-
const dates = this._tbody.querySelectorAll('.digi-calendar__date');
|
|
285
|
-
if (dates.length <= 0) {
|
|
286
|
-
logger.warn(`Could not find an element with data-date attribute matching navigated date.`, this._tbody);
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
Array.from(dates).map((date) => {
|
|
290
|
-
const d = date;
|
|
291
|
-
d.tabIndex = -1;
|
|
292
|
-
d.classList.remove('digi-calendar__date--focused');
|
|
293
|
-
if (d.dataset.date === this.getFullDate(this.focusedDate)) {
|
|
294
|
-
d.focus();
|
|
295
|
-
d.tabIndex = 0;
|
|
296
|
-
d.classList.add('digi-calendar__date--focused');
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
}, 100);
|
|
300
|
-
}
|
|
301
|
-
getFullDate(date) {
|
|
302
|
-
return date.toLocaleString(_t.locale, {
|
|
303
|
-
day: 'numeric',
|
|
304
|
-
month: 'numeric',
|
|
305
|
-
year: 'numeric'
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
getDateName(date) {
|
|
309
|
-
return date.toLocaleString(_t.locale, {
|
|
310
|
-
year: 'numeric',
|
|
311
|
-
month: 'long',
|
|
312
|
-
day: 'numeric'
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
isFocused(date) {
|
|
316
|
-
if (this.dirty) {
|
|
317
|
-
return this.isSameDate(date, this.focusedDate);
|
|
318
|
-
}
|
|
319
|
-
if (this.afOpenCalendarTo) {
|
|
320
|
-
return this.isSameDate(date, this.afOpenCalendarTo);
|
|
321
|
-
}
|
|
322
|
-
return this.isSameMonth(date, new Date())
|
|
323
|
-
? this.isSameDate(date, new Date())
|
|
324
|
-
: this.isSameMonth(date, this.focusedDate) && date.getDate() === 1;
|
|
325
|
-
}
|
|
326
|
-
ariaPressed(date) {
|
|
327
|
-
return this.selectedDates.length > 0 &&
|
|
328
|
-
!!this.selectedDates.find((d) => this.isSameDate(d, date))
|
|
329
|
-
? 'true'
|
|
330
|
-
: 'false';
|
|
331
|
-
}
|
|
332
|
-
selectMonth(evt) {
|
|
333
|
-
this.onDirty();
|
|
334
|
-
const tempDate = new Date(this.focusedDate);
|
|
335
|
-
const selectedMonth = parseInt(evt.target.value, 10);
|
|
336
|
-
const currentDay = tempDate.getDate();
|
|
337
|
-
tempDate.setMonth(selectedMonth, 1);
|
|
338
|
-
const lastDayOfSelectedMonth = new Date(tempDate.getFullYear(), selectedMonth + 1, 0).getDate();
|
|
339
|
-
tempDate.setDate(Math.min(currentDay, lastDayOfSelectedMonth));
|
|
340
|
-
this.focusedDate = tempDate;
|
|
341
|
-
}
|
|
342
|
-
selectYear(evt) {
|
|
343
|
-
this.onDirty();
|
|
344
|
-
const selectedYear = parseInt(evt.target.value, 10);
|
|
345
|
-
// Skydda mot ogiltiga datum som 29 februari
|
|
346
|
-
const day = Math.min(this.focusedDate.getDate(), new Date(selectedYear, this.focusedDate.getMonth() + 1, 0).getDate());
|
|
347
|
-
const newDate = new Date(selectedYear, this.focusedDate.getMonth(), day);
|
|
348
|
-
this.focusedDate = newDate;
|
|
349
|
-
}
|
|
350
|
-
earliestSelectableYear() {
|
|
351
|
-
if (this.afMinDate)
|
|
352
|
-
return this.afMinDate.getFullYear();
|
|
353
|
-
return 1900;
|
|
354
|
-
}
|
|
355
|
-
latestSelectableYear() {
|
|
356
|
-
if (this.afMaxDate)
|
|
357
|
-
return this.afMaxDate.getFullYear();
|
|
358
|
-
return new Date(Date.now()).getFullYear() + 10;
|
|
359
|
-
}
|
|
360
|
-
allSelectableYears() {
|
|
361
|
-
const allYears = [];
|
|
362
|
-
let currentYear = this.earliestSelectableYear();
|
|
363
|
-
while (currentYear <= this.latestSelectableYear()) {
|
|
364
|
-
allYears.push(currentYear++);
|
|
365
|
-
}
|
|
366
|
-
return allYears;
|
|
367
|
-
}
|
|
368
|
-
componentWillLoad() {
|
|
369
|
-
var _a;
|
|
370
|
-
if (isValid(this.afSelectedDate)) {
|
|
371
|
-
this.selectedDates = [this.afSelectedDate];
|
|
372
|
-
}
|
|
373
|
-
else if (((_a = this.afSelectedDates) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
374
|
-
const valid = this.afSelectedDates.filter((d) => isValid(d));
|
|
375
|
-
if (valid.length > 0)
|
|
376
|
-
this.selectedDates = valid;
|
|
377
|
-
}
|
|
378
|
-
this.determineFocusedDate();
|
|
379
|
-
this.drawCalendar(this.focusedDate);
|
|
380
|
-
}
|
|
381
|
-
async componentDidLoad() {
|
|
382
|
-
if (isValid(this.afSelectedDate))
|
|
383
|
-
this.selectedDates = [this.afSelectedDate];
|
|
384
|
-
else
|
|
385
|
-
this.afSelectedDatesChangeHandler();
|
|
386
|
-
await customElements.whenDefined('digi-form-select');
|
|
387
|
-
}
|
|
388
|
-
cssDateModifiers(date) {
|
|
389
|
-
const shownMonth = this.focusedDate.getMonth();
|
|
390
|
-
return {
|
|
391
|
-
'digi-calendar__date--today': this.isSameDate(date, new Date()) && !this.isInAnotherMonth(date),
|
|
392
|
-
'digi-calendar__date--disabled': this.isInAnotherMonth(date),
|
|
393
|
-
'digi-calendar__date--focused': this.isFocused(date),
|
|
394
|
-
'digi-calendar__date--selected': this.isDateSelected(date) && date.getMonth() === shownMonth,
|
|
395
|
-
'digi-calendar__date--not-selectable': !this.isInAnotherMonth(date) && !this.isDateSelectable(date)
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
render() {
|
|
399
|
-
return (h("div", { key: '1077a770af823d9e0c0f59cdc6f1fef2a49d761a', class: {
|
|
400
|
-
'digi-calendar': true,
|
|
401
|
-
'digi-calendar--hide': !this.afActive
|
|
402
|
-
}, id: `${this.afId}-calendar` }, this.afYearSelect && (h("div", { key: 'cd7dfa8e20efd08afa590cd4e177ddb4c41455d8', class: "digi-calendar__header" }, h("div", { key: 'd1e6e956713de7fe417253be0fc1ec3aea9748b0', class: "digi-calendar__header--year-select" }, h("digi-form-select", { key: 'cf34feec9ed25e0251effe86b3ce393918a32eda', afLabel: _t.calendar.month, "af-variation": "small", afValue: this.focusedDate.getMonth().toString(), onAfOnSelect: (evt) => {
|
|
403
|
-
this.selectMonth(evt);
|
|
404
|
-
} }, _t.calendar.months.map((month, index) => {
|
|
405
|
-
return h("option", { value: index }, month);
|
|
406
|
-
})), h("digi-form-select", { key: 'ddcd90917d6dba315f8018c4311c852f3471d3c0', afLabel: _t.calendar.year, "af-variation": "small", afValue: this.focusedDate.getFullYear().toString(), onAfOnSelect: (evt) => {
|
|
407
|
-
this.selectYear(evt);
|
|
408
|
-
} }, this.allSelectableYears().map((year) => (h("option", { value: year.toString() }, year))))))), !this.afYearSelect && (h("div", { key: '814648caa21619240a5904a809c95024398e9741', class: "digi-calendar__header" }, h("div", { key: 'd3dc54a4d0172d503bff66e5171846f433755c4b', class: "digi-calendar__header--month-step" }, h("button", { key: '7725160aab267e5cdd70618613b2f485d5b7dd7f', class: "digi-calendar__month-select-button", type: "button", "aria-label": this.getFullMonthName(this.focusedDate.getMonth() - 1) +
|
|
409
|
-
', ' + _t.calendar.previousMonth, onClick: () => this.subtractMonth() }, h("digi-icon-chevron-left", { key: 'e8d1dc80011cb7e79ce6af893df2fd4601d92c74', slot: "icon", "aria-hidden": "true" }), h("span", { key: 'ae56dadf565d819f8e89804596dbe38119fb592e', class: "digi-calendar__month-select-name" }, this.getMonthName(this.focusedDate.getMonth() - 1))), h("div", { key: '257ac7d346e084390aba658eb7329cab913e3463', class: "digi-calendar__month" }, this.getFullMonthName(this.focusedDate.getMonth())), h("button", { key: '0c483763c0420f1c172c78364d2ce931ffcd116d', class: "digi-calendar__month-select-button", type: "button", "aria-label": this.getFullMonthName(this.focusedDate.getMonth() + 1) +
|
|
410
|
-
', ' + _t.calendar.nextMonth, onClick: () => this.addMonth() }, h("span", { key: 'de4617285a713bd9baa375a99f81bb027768c947', class: "digi-calendar__month-select-name" }, this.getMonthName(this.focusedDate.getMonth() + 1)), h("digi-icon-chevron-right", { key: '8d6252fcdd7a035ce8fe4e6f4cb468ce7935aeba', slot: "icon", "aria-hidden": "true" }))))), h("digi-util-keydown-handler", { key: '5080246278db71745444dcd40d0722a64e8c80b5', onAfOnDown: (e) => this.navigateHandler(e, 7), onAfOnUp: (e) => this.navigateHandler(e, -7), onAfOnLeft: (e) => this.navigateHandler(e, -1), onAfOnRight: (e) => this.navigateHandler(e, 1) }, h("table", { key: '9052f9c8135d95110f927c6a5a949fbd63daec7a', role: "grid", class: "digi-calendar__table" }, h("thead", { key: '428467866c49e65d348db796a006611542aabc02' }, h("tr", { key: '260024069438dadff553bc3391a37bbb533b5d11', role: "row" }, this.afShowWeekNumber && (h("th", { key: '2c22102011ade9125e61416ac78eaed16dec2e26', role: "columnheader", abbr: _t.calendar.week, class: "digi-calendar__table-header-week" }, _t.calendar.week.toLowerCase())), Object.keys(_t.calendar.weekdays).map((day) => (h("th", { role: "columnheader", "aria-label": _t.calendar.weekdays[day], abbr: _t.calendar.weekdays[day], class: "digi-calendar__table-header" }, _t.calendar.weekdays_short[day].toLowerCase()))))), h("tbody", { key: 'cbe3d290919c35ad27799c17e6b6236557dbe126', ref: (el) => (this._tbody = el) }, this.activeCalendar.map((week) => {
|
|
411
|
-
return (h("tr", null, week.map((day, i) => {
|
|
412
|
-
if (this.afShowWeekNumber && i === 0) {
|
|
413
|
-
return (h("th", { role: "rowheader", "aria-label": _t.calendar.week + ' ' + day, class: "digi-calendar__td-week digi-calendar__date--week-number", id: 'digi-calendar__week-' + day }, day));
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
return this.isInAnotherMonth(day) ? (h("td", null)) : (h("td", { role: "gridcell", class: "digi-calendar__td" }, h("button", { key: this.getFullDate(day), type: "button", class: Object.assign(Object.assign({}, this.cssDateModifiers(day)), { 'digi-calendar__date': true }), onClick: () => this.selectDateHandler(day), "aria-current": this.isSameDate(day, new Date()) ? 'date' : null, "aria-label": `
|
|
417
|
-
${!this.isDateSelectable(day)
|
|
418
|
-
? _t.calendar.disabledDate
|
|
419
|
-
: ''} ${this.getDateName(day)}
|
|
420
|
-
`, "aria-disabled": !this.isDateSelectable(day) ? 'true' : null, tabindex: this.setTabIndex(day), "data-date": this.getFullDate(day), "aria-pressed": this.isDateSelectable(day)
|
|
421
|
-
? this.ariaPressed(day)
|
|
422
|
-
: null }, h("span", { "aria-hidden": "true" }, day.getDate()))));
|
|
423
|
-
}
|
|
424
|
-
})));
|
|
425
|
-
})))), h("slot", { key: 'e97e8147fc91a3b401665eeeb8db6be7036f678b', name: "calendar-footer" })));
|
|
426
|
-
}
|
|
427
|
-
static get watchers() { return {
|
|
428
|
-
"focusedDate": ["focusedDateChanged"],
|
|
429
|
-
"afOpenCalendarTo": ["afOpenCalendarToChangeHandler"],
|
|
430
|
-
"afShowWeekNumber": ["afShowWeekNumberChangeHandler"],
|
|
431
|
-
"afSelectedDate": ["afSelectedDateChangeHandler"],
|
|
432
|
-
"afSelectedDates": ["afSelectedDatesChangeHandler"]
|
|
433
|
-
}; }
|
|
434
|
-
};
|
|
435
|
-
Calendar.style = DigiCalendarStyle0;
|
|
436
|
-
|
|
437
|
-
const iconCalendarAltCss = ".sc-digi-icon-calendar-alt-h{--digi--icon--color:var(--digi--color--icon--primary);--digi--icon--width:initial;--digi--icon--height:auto;display:flex;min-height:1.4em;align-items:center}.sc-digi-icon-calendar-alt-h svg.sc-digi-icon-calendar-alt{color:var(--digi--icon--color);max-width:var(--digi--icon--width);max-height:var(--digi--icon--height);width:var(--digi--icon--width, auto);height:var(--digi--icon--height, auto)}";
|
|
438
|
-
const DigiIconCalendarAltStyle0 = iconCalendarAltCss;
|
|
439
|
-
|
|
440
|
-
const IconCalendarAlt = class {
|
|
441
|
-
constructor(hostRef) {
|
|
442
|
-
registerInstance(this, hostRef);
|
|
443
|
-
this.afTitle = undefined;
|
|
444
|
-
this.afDesc = undefined;
|
|
445
|
-
this.afSvgAriaHidden = true;
|
|
446
|
-
this.afSvgAriaLabelledby = undefined;
|
|
447
|
-
this.titleId = randomIdGenerator('icontitle');
|
|
448
|
-
}
|
|
449
|
-
render() {
|
|
450
|
-
return (h("svg", { key: '87e379017e361b0e21f2ea5eeeb865aa9d406c58', class: "digi-icon-calendar-alt", width: "22", height: "26", viewBox: "0 0 22 26", "aria-hidden": this.afSvgAriaHidden ? 'true' : 'false', "aria-labelledby": this.afSvgAriaLabelledby
|
|
451
|
-
? this.afSvgAriaLabelledby
|
|
452
|
-
: this.afTitle
|
|
453
|
-
? this.titleId
|
|
454
|
-
: undefined, xmlns: "http://www.w3.org/2000/svg" }, this.afTitle && h("title", { key: '2bfb6fba555a94a63b1f2e2cc398c8993807852a', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: 'adff2ed4fb53f4ae4e0ec6b5dd1b51e2e12a0b2e' }, this.afDesc), h("path", { key: '0928cefdc9310488322b5ce6b5ee334fdee1778b', class: "digi-icon-calendar-alt__shape", d: "M21.41 8.125H.59a.601.601 0 01-.59-.61V5.689C0 4.341 1.056 3.25 2.357 3.25h2.357V.61c0-.336.265-.61.59-.61h1.964c.324 0 .59.274.59.61v2.64h6.285V.61c0-.336.265-.61.59-.61h1.963c.325 0 .59.274.59.61v2.64h2.357C20.944 3.25 22 4.342 22 5.688v1.828c0 .335-.265.609-.59.609zM.59 9.75h20.82c.325 0 .59.274.59.61v13.203C22 24.907 20.944 26 19.643 26H2.357C1.056 26 0 24.908 0 23.562V10.36c0-.335.265-.609.59-.609zm5.696 10.36a.601.601 0 00-.59-.61H3.732a.601.601 0 00-.59.61v2.03c0 .336.266.61.59.61h1.964c.325 0 .59-.274.59-.61v-2.03zm0-6.5a.601.601 0 00-.59-.61H3.732a.601.601 0 00-.59.61v2.03c0 .336.266.61.59.61h1.964c.325 0 .59-.274.59-.61v-2.03zm6.285 6.5a.601.601 0 00-.589-.61h-1.964a.601.601 0 00-.59.61v2.03c0 .336.266.61.59.61h1.964c.324 0 .59-.274.59-.61v-2.03zm0-6.5a.601.601 0 00-.589-.61h-1.964a.601.601 0 00-.59.61v2.03c0 .336.266.61.59.61h1.964c.324 0 .59-.274.59-.61v-2.03zm6.286 6.5a.601.601 0 00-.59-.61h-1.963a.601.601 0 00-.59.61v2.03c0 .336.265.61.59.61h1.964c.324 0 .59-.274.59-.61v-2.03zm0-6.5a.601.601 0 00-.59-.61h-1.963a.601.601 0 00-.59.61v2.03c0 .336.265.61.59.61h1.964c.324 0 .59-.274.59-.61v-2.03z", fill: "currentColor", "fill-rule": "nonzero" })));
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
IconCalendarAlt.style = DigiIconCalendarAltStyle0;
|
|
458
|
-
|
|
459
|
-
export { Calendar as digi_calendar, IconCalendarAlt as digi_icon_calendar_alt };
|