@ongov/ontario-design-system-component-library 6.0.0-alpha.5 → 6.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.d.ts +43 -0
- package/components/index.js +2169 -0
- package/components/index.js.map +1 -0
- package/components/ontario-accordion.d.ts +11 -0
- package/components/ontario-accordion.js +378 -0
- package/components/ontario-accordion.js.map +1 -0
- package/components/ontario-aside.d.ts +11 -0
- package/components/ontario-aside.js +171 -0
- package/components/ontario-aside.js.map +1 -0
- package/components/ontario-back-to-top.d.ts +11 -0
- package/components/ontario-back-to-top.js +119 -0
- package/components/ontario-back-to-top.js.map +1 -0
- package/components/ontario-badge.d.ts +11 -0
- package/components/ontario-badge.js +9 -0
- package/components/ontario-badge.js.map +1 -0
- package/components/ontario-blockquote.d.ts +11 -0
- package/components/ontario-blockquote.js +145 -0
- package/components/ontario-blockquote.js.map +1 -0
- package/components/ontario-button.d.ts +11 -0
- package/components/ontario-button.js +237 -0
- package/components/ontario-button.js.map +1 -0
- package/components/ontario-callout.d.ts +11 -0
- package/components/ontario-callout.js +170 -0
- package/components/ontario-callout.js.map +1 -0
- package/components/ontario-card-collection.d.ts +11 -0
- package/components/ontario-card-collection.js +111 -0
- package/components/ontario-card-collection.js.map +1 -0
- package/components/ontario-card.d.ts +11 -0
- package/components/ontario-card.js +389 -0
- package/components/ontario-card.js.map +1 -0
- package/components/ontario-checkboxes.d.ts +11 -0
- package/components/ontario-checkboxes.js +428 -0
- package/components/ontario-checkboxes.js.map +1 -0
- package/components/ontario-critical-alert.d.ts +11 -0
- package/components/ontario-critical-alert.js +128 -0
- package/components/ontario-critical-alert.js.map +1 -0
- package/components/ontario-date-input.d.ts +11 -0
- package/components/ontario-date-input.js +623 -0
- package/components/ontario-date-input.js.map +1 -0
- package/components/ontario-dropdown-list.d.ts +11 -0
- package/components/ontario-dropdown-list.js +449 -0
- package/components/ontario-dropdown-list.js.map +1 -0
- package/components/ontario-fieldset.d.ts +11 -0
- package/components/ontario-fieldset.js +167 -0
- package/components/ontario-fieldset.js.map +1 -0
- package/components/ontario-footer.d.ts +11 -0
- package/components/ontario-footer.js +455 -0
- package/components/ontario-footer.js.map +1 -0
- package/components/ontario-form-container.d.ts +11 -0
- package/components/ontario-form-container.js +74 -0
- package/components/ontario-form-container.js.map +1 -0
- package/components/ontario-header-overflow-menu.d.ts +11 -0
- package/components/ontario-header-overflow-menu.js +9 -0
- package/components/ontario-header-overflow-menu.js.map +1 -0
- package/components/ontario-header.d.ts +11 -0
- package/components/ontario-header.js +900 -0
- package/components/ontario-header.js.map +1 -0
- package/components/ontario-hint-expander.d.ts +11 -0
- package/components/ontario-hint-expander.js +9 -0
- package/components/ontario-hint-expander.js.map +1 -0
- package/components/ontario-hint-text.d.ts +11 -0
- package/components/ontario-hint-text.js +9 -0
- package/components/ontario-hint-text.js.map +1 -0
- package/components/ontario-icon-accessibility.d.ts +11 -0
- package/components/ontario-icon-accessibility.js +170 -0
- package/components/ontario-icon-accessibility.js.map +1 -0
- package/components/ontario-icon-account.d.ts +11 -0
- package/components/ontario-icon-account.js +170 -0
- package/components/ontario-icon-account.js.map +1 -0
- package/components/ontario-icon-add-alt.d.ts +11 -0
- package/components/ontario-icon-add-alt.js +171 -0
- package/components/ontario-icon-add-alt.js.map +1 -0
- package/components/ontario-icon-add.d.ts +11 -0
- package/components/ontario-icon-add.js +171 -0
- package/components/ontario-icon-add.js.map +1 -0
- package/components/ontario-icon-alert-error.d.ts +11 -0
- package/components/ontario-icon-alert-error.js +9 -0
- package/components/ontario-icon-alert-error.js.map +1 -0
- package/components/ontario-icon-alert-information.d.ts +11 -0
- package/components/ontario-icon-alert-information.js +9 -0
- package/components/ontario-icon-alert-information.js.map +1 -0
- package/components/ontario-icon-alert-success.d.ts +11 -0
- package/components/ontario-icon-alert-success.js +9 -0
- package/components/ontario-icon-alert-success.js.map +1 -0
- package/components/ontario-icon-alert-warning.d.ts +11 -0
- package/components/ontario-icon-alert-warning.js +9 -0
- package/components/ontario-icon-alert-warning.js.map +1 -0
- package/components/ontario-icon-arrow-up.d.ts +11 -0
- package/components/ontario-icon-arrow-up.js +171 -0
- package/components/ontario-icon-arrow-up.js.map +1 -0
- package/components/ontario-icon-attach.d.ts +11 -0
- package/components/ontario-icon-attach.js +172 -0
- package/components/ontario-icon-attach.js.map +1 -0
- package/components/ontario-icon-bookmark-off.d.ts +11 -0
- package/components/ontario-icon-bookmark-off.js +170 -0
- package/components/ontario-icon-bookmark-off.js.map +1 -0
- package/components/ontario-icon-bookmark-on.d.ts +11 -0
- package/components/ontario-icon-bookmark-on.js +170 -0
- package/components/ontario-icon-bookmark-on.js.map +1 -0
- package/components/ontario-icon-calendar.d.ts +11 -0
- package/components/ontario-icon-calendar.js +170 -0
- package/components/ontario-icon-calendar.js.map +1 -0
- package/components/ontario-icon-camera.d.ts +11 -0
- package/components/ontario-icon-camera.js +170 -0
- package/components/ontario-icon-camera.js.map +1 -0
- package/components/ontario-icon-chevron-down.d.ts +11 -0
- package/components/ontario-icon-chevron-down.js +9 -0
- package/components/ontario-icon-chevron-down.js.map +1 -0
- package/components/ontario-icon-chevron-left.d.ts +11 -0
- package/components/ontario-icon-chevron-left.js +9 -0
- package/components/ontario-icon-chevron-left.js.map +1 -0
- package/components/ontario-icon-chevron-right.d.ts +11 -0
- package/components/ontario-icon-chevron-right.js +171 -0
- package/components/ontario-icon-chevron-right.js.map +1 -0
- package/components/ontario-icon-chevron-up.d.ts +11 -0
- package/components/ontario-icon-chevron-up.js +9 -0
- package/components/ontario-icon-chevron-up.js.map +1 -0
- package/components/ontario-icon-clock.d.ts +11 -0
- package/components/ontario-icon-clock.js +170 -0
- package/components/ontario-icon-clock.js.map +1 -0
- package/components/ontario-icon-close-header.d.ts +11 -0
- package/components/ontario-icon-close-header.js +171 -0
- package/components/ontario-icon-close-header.js.map +1 -0
- package/components/ontario-icon-close.d.ts +11 -0
- package/components/ontario-icon-close.js +171 -0
- package/components/ontario-icon-close.js.map +1 -0
- package/components/ontario-icon-cloud.d.ts +11 -0
- package/components/ontario-icon-cloud.js +170 -0
- package/components/ontario-icon-cloud.js.map +1 -0
- package/components/ontario-icon-collapse.d.ts +11 -0
- package/components/ontario-icon-collapse.js +168 -0
- package/components/ontario-icon-collapse.js.map +1 -0
- package/components/ontario-icon-credit-card.d.ts +11 -0
- package/components/ontario-icon-credit-card.js +171 -0
- package/components/ontario-icon-credit-card.js.map +1 -0
- package/components/ontario-icon-critical-alert-warning.d.ts +11 -0
- package/components/ontario-icon-critical-alert-warning.js +188 -0
- package/components/ontario-icon-critical-alert-warning.js.map +1 -0
- package/components/ontario-icon-delete.d.ts +11 -0
- package/components/ontario-icon-delete.js +170 -0
- package/components/ontario-icon-delete.js.map +1 -0
- package/components/ontario-icon-document.d.ts +11 -0
- package/components/ontario-icon-document.js +170 -0
- package/components/ontario-icon-document.js.map +1 -0
- package/components/ontario-icon-download.d.ts +11 -0
- package/components/ontario-icon-download.js +170 -0
- package/components/ontario-icon-download.js.map +1 -0
- package/components/ontario-icon-dropdown-arrow.d.ts +11 -0
- package/components/ontario-icon-dropdown-arrow.js +142 -0
- package/components/ontario-icon-dropdown-arrow.js.map +1 -0
- package/components/ontario-icon-edit.d.ts +11 -0
- package/components/ontario-icon-edit.js +170 -0
- package/components/ontario-icon-edit.js.map +1 -0
- package/components/ontario-icon-email.d.ts +11 -0
- package/components/ontario-icon-email.js +171 -0
- package/components/ontario-icon-email.js.map +1 -0
- package/components/ontario-icon-expand.d.ts +11 -0
- package/components/ontario-icon-expand.js +168 -0
- package/components/ontario-icon-expand.js.map +1 -0
- package/components/ontario-icon-export.d.ts +11 -0
- package/components/ontario-icon-export.js +170 -0
- package/components/ontario-icon-export.js.map +1 -0
- package/components/ontario-icon-facebook-alt.d.ts +11 -0
- package/components/ontario-icon-facebook-alt.js +170 -0
- package/components/ontario-icon-facebook-alt.js.map +1 -0
- package/components/ontario-icon-facebook.d.ts +11 -0
- package/components/ontario-icon-facebook.js +170 -0
- package/components/ontario-icon-facebook.js.map +1 -0
- package/components/ontario-icon-favourite-off.d.ts +11 -0
- package/components/ontario-icon-favourite-off.js +170 -0
- package/components/ontario-icon-favourite-off.js.map +1 -0
- package/components/ontario-icon-favourite-on.d.ts +11 -0
- package/components/ontario-icon-favourite-on.js +170 -0
- package/components/ontario-icon-favourite-on.js.map +1 -0
- package/components/ontario-icon-filter.d.ts +11 -0
- package/components/ontario-icon-filter.js +170 -0
- package/components/ontario-icon-filter.js.map +1 -0
- package/components/ontario-icon-flickr.d.ts +11 -0
- package/components/ontario-icon-flickr.js +170 -0
- package/components/ontario-icon-flickr.js.map +1 -0
- package/components/ontario-icon-grid.d.ts +11 -0
- package/components/ontario-icon-grid.js +170 -0
- package/components/ontario-icon-grid.js.map +1 -0
- package/components/ontario-icon-help.d.ts +11 -0
- package/components/ontario-icon-help.js +171 -0
- package/components/ontario-icon-help.js.map +1 -0
- package/components/ontario-icon-instagram.d.ts +11 -0
- package/components/ontario-icon-instagram.js +170 -0
- package/components/ontario-icon-instagram.js.map +1 -0
- package/components/ontario-icon-interac-en-alt.d.ts +11 -0
- package/components/ontario-icon-interac-en-alt.js +203 -0
- package/components/ontario-icon-interac-en-alt.js.map +1 -0
- package/components/ontario-icon-interac-en.d.ts +11 -0
- package/components/ontario-icon-interac-en.js +202 -0
- package/components/ontario-icon-interac-en.js.map +1 -0
- package/components/ontario-icon-interac-fr-alt.d.ts +11 -0
- package/components/ontario-icon-interac-fr-alt.js +203 -0
- package/components/ontario-icon-interac-fr-alt.js.map +1 -0
- package/components/ontario-icon-interac-fr.d.ts +11 -0
- package/components/ontario-icon-interac-fr.js +183 -0
- package/components/ontario-icon-interac-fr.js.map +1 -0
- package/components/ontario-icon-linkedin-alt.d.ts +11 -0
- package/components/ontario-icon-linkedin-alt.js +170 -0
- package/components/ontario-icon-linkedin-alt.js.map +1 -0
- package/components/ontario-icon-linkedin.d.ts +11 -0
- package/components/ontario-icon-linkedin.js +170 -0
- package/components/ontario-icon-linkedin.js.map +1 -0
- package/components/ontario-icon-list.d.ts +11 -0
- package/components/ontario-icon-list.js +170 -0
- package/components/ontario-icon-list.js.map +1 -0
- package/components/ontario-icon-live-chat.d.ts +11 -0
- package/components/ontario-icon-live-chat.js +170 -0
- package/components/ontario-icon-live-chat.js.map +1 -0
- package/components/ontario-icon-location-off.d.ts +11 -0
- package/components/ontario-icon-location-off.js +170 -0
- package/components/ontario-icon-location-off.js.map +1 -0
- package/components/ontario-icon-location-on.d.ts +11 -0
- package/components/ontario-icon-location-on.js +170 -0
- package/components/ontario-icon-location-on.js.map +1 -0
- package/components/ontario-icon-lock-off.d.ts +11 -0
- package/components/ontario-icon-lock-off.js +170 -0
- package/components/ontario-icon-lock-off.js.map +1 -0
- package/components/ontario-icon-lock-on.d.ts +11 -0
- package/components/ontario-icon-lock-on.js +170 -0
- package/components/ontario-icon-lock-on.js.map +1 -0
- package/components/ontario-icon-map.d.ts +11 -0
- package/components/ontario-icon-map.js +170 -0
- package/components/ontario-icon-map.js.map +1 -0
- package/components/ontario-icon-mastercard-alt.d.ts +11 -0
- package/components/ontario-icon-mastercard-alt.js +161 -0
- package/components/ontario-icon-mastercard-alt.js.map +1 -0
- package/components/ontario-icon-mastercard.d.ts +11 -0
- package/components/ontario-icon-mastercard.js +173 -0
- package/components/ontario-icon-mastercard.js.map +1 -0
- package/components/ontario-icon-media-fast-forward.d.ts +11 -0
- package/components/ontario-icon-media-fast-forward.js +167 -0
- package/components/ontario-icon-media-fast-forward.js.map +1 -0
- package/components/ontario-icon-media-fast-rewind.d.ts +11 -0
- package/components/ontario-icon-media-fast-rewind.js +170 -0
- package/components/ontario-icon-media-fast-rewind.js.map +1 -0
- package/components/ontario-icon-media-pause.d.ts +11 -0
- package/components/ontario-icon-media-pause.js +167 -0
- package/components/ontario-icon-media-pause.js.map +1 -0
- package/components/ontario-icon-media-play.d.ts +11 -0
- package/components/ontario-icon-media-play.js +167 -0
- package/components/ontario-icon-media-play.js.map +1 -0
- package/components/ontario-icon-media-stop.d.ts +11 -0
- package/components/ontario-icon-media-stop.js +167 -0
- package/components/ontario-icon-media-stop.js.map +1 -0
- package/components/ontario-icon-menu-header.d.ts +11 -0
- package/components/ontario-icon-menu-header.js +171 -0
- package/components/ontario-icon-menu-header.js.map +1 -0
- package/components/ontario-icon-menu.d.ts +11 -0
- package/components/ontario-icon-menu.js +171 -0
- package/components/ontario-icon-menu.js.map +1 -0
- package/components/ontario-icon-microphone-off.d.ts +11 -0
- package/components/ontario-icon-microphone-off.js +170 -0
- package/components/ontario-icon-microphone-off.js.map +1 -0
- package/components/ontario-icon-microphone-on.d.ts +11 -0
- package/components/ontario-icon-microphone-on.js +170 -0
- package/components/ontario-icon-microphone-on.js.map +1 -0
- package/components/ontario-icon-more-vertical.d.ts +11 -0
- package/components/ontario-icon-more-vertical.js +170 -0
- package/components/ontario-icon-more-vertical.js.map +1 -0
- package/components/ontario-icon-new-window.d.ts +11 -0
- package/components/ontario-icon-new-window.js +171 -0
- package/components/ontario-icon-new-window.js.map +1 -0
- package/components/ontario-icon-next.d.ts +11 -0
- package/components/ontario-icon-next.js +170 -0
- package/components/ontario-icon-next.js.map +1 -0
- package/components/ontario-icon-notification.d.ts +11 -0
- package/components/ontario-icon-notification.js +170 -0
- package/components/ontario-icon-notification.js.map +1 -0
- package/components/ontario-icon-password-hide.d.ts +11 -0
- package/components/ontario-icon-password-hide.js +170 -0
- package/components/ontario-icon-password-hide.js.map +1 -0
- package/components/ontario-icon-password-show.d.ts +11 -0
- package/components/ontario-icon-password-show.js +170 -0
- package/components/ontario-icon-password-show.js.map +1 -0
- package/components/ontario-icon-phone.d.ts +11 -0
- package/components/ontario-icon-phone.js +171 -0
- package/components/ontario-icon-phone.js.map +1 -0
- package/components/ontario-icon-photo.d.ts +11 -0
- package/components/ontario-icon-photo.js +170 -0
- package/components/ontario-icon-photo.js.map +1 -0
- package/components/ontario-icon-pin-location-off.d.ts +11 -0
- package/components/ontario-icon-pin-location-off.js +170 -0
- package/components/ontario-icon-pin-location-off.js.map +1 -0
- package/components/ontario-icon-pin-location-on.d.ts +11 -0
- package/components/ontario-icon-pin-location-on.js +170 -0
- package/components/ontario-icon-pin-location-on.js.map +1 -0
- package/components/ontario-icon-previous.d.ts +11 -0
- package/components/ontario-icon-previous.js +170 -0
- package/components/ontario-icon-previous.js.map +1 -0
- package/components/ontario-icon-print.d.ts +11 -0
- package/components/ontario-icon-print.js +170 -0
- package/components/ontario-icon-print.js.map +1 -0
- package/components/ontario-icon-remove-alt.d.ts +11 -0
- package/components/ontario-icon-remove-alt.js +171 -0
- package/components/ontario-icon-remove-alt.js.map +1 -0
- package/components/ontario-icon-remove.d.ts +11 -0
- package/components/ontario-icon-remove.js +171 -0
- package/components/ontario-icon-remove.js.map +1 -0
- package/components/ontario-icon-replay.d.ts +11 -0
- package/components/ontario-icon-replay.js +170 -0
- package/components/ontario-icon-replay.js.map +1 -0
- package/components/ontario-icon-rss-feed.d.ts +11 -0
- package/components/ontario-icon-rss-feed.js +170 -0
- package/components/ontario-icon-rss-feed.js.map +1 -0
- package/components/ontario-icon-save.d.ts +11 -0
- package/components/ontario-icon-save.js +170 -0
- package/components/ontario-icon-save.js.map +1 -0
- package/components/ontario-icon-search-white.d.ts +11 -0
- package/components/ontario-icon-search-white.js +173 -0
- package/components/ontario-icon-search-white.js.map +1 -0
- package/components/ontario-icon-search.d.ts +11 -0
- package/components/ontario-icon-search.js +171 -0
- package/components/ontario-icon-search.js.map +1 -0
- package/components/ontario-icon-sentiment-1.d.ts +11 -0
- package/components/ontario-icon-sentiment-1.js +170 -0
- package/components/ontario-icon-sentiment-1.js.map +1 -0
- package/components/ontario-icon-sentiment-2.d.ts +11 -0
- package/components/ontario-icon-sentiment-2.js +170 -0
- package/components/ontario-icon-sentiment-2.js.map +1 -0
- package/components/ontario-icon-sentiment-3.d.ts +11 -0
- package/components/ontario-icon-sentiment-3.js +170 -0
- package/components/ontario-icon-sentiment-3.js.map +1 -0
- package/components/ontario-icon-sentiment-4.d.ts +11 -0
- package/components/ontario-icon-sentiment-4.js +170 -0
- package/components/ontario-icon-sentiment-4.js.map +1 -0
- package/components/ontario-icon-sentiment-5.d.ts +11 -0
- package/components/ontario-icon-sentiment-5.js +170 -0
- package/components/ontario-icon-sentiment-5.js.map +1 -0
- package/components/ontario-icon-settings.d.ts +11 -0
- package/components/ontario-icon-settings.js +170 -0
- package/components/ontario-icon-settings.js.map +1 -0
- package/components/ontario-icon-share.d.ts +11 -0
- package/components/ontario-icon-share.js +170 -0
- package/components/ontario-icon-share.js.map +1 -0
- package/components/ontario-icon-sort-alphabetical-ascending.d.ts +11 -0
- package/components/ontario-icon-sort-alphabetical-ascending.js +170 -0
- package/components/ontario-icon-sort-alphabetical-ascending.js.map +1 -0
- package/components/ontario-icon-sort-alphabetical-descending.d.ts +11 -0
- package/components/ontario-icon-sort-alphabetical-descending.js +170 -0
- package/components/ontario-icon-sort-alphabetical-descending.js.map +1 -0
- package/components/ontario-icon-sort-ascending.d.ts +11 -0
- package/components/ontario-icon-sort-ascending.js +170 -0
- package/components/ontario-icon-sort-ascending.js.map +1 -0
- package/components/ontario-icon-sort-descending.d.ts +11 -0
- package/components/ontario-icon-sort-descending.js +170 -0
- package/components/ontario-icon-sort-descending.js.map +1 -0
- package/components/ontario-icon-sort-variant.d.ts +11 -0
- package/components/ontario-icon-sort-variant.js +167 -0
- package/components/ontario-icon-sort-variant.js.map +1 -0
- package/components/ontario-icon-sort.d.ts +11 -0
- package/components/ontario-icon-sort.js +170 -0
- package/components/ontario-icon-sort.js.map +1 -0
- package/components/ontario-icon-tag.d.ts +11 -0
- package/components/ontario-icon-tag.js +170 -0
- package/components/ontario-icon-tag.js.map +1 -0
- package/components/ontario-icon-text-message.d.ts +11 -0
- package/components/ontario-icon-text-message.js +170 -0
- package/components/ontario-icon-text-message.js.map +1 -0
- package/components/ontario-icon-timer.d.ts +11 -0
- package/components/ontario-icon-timer.js +170 -0
- package/components/ontario-icon-timer.js.map +1 -0
- package/components/ontario-icon-transport-bicycle.d.ts +11 -0
- package/components/ontario-icon-transport-bicycle.js +170 -0
- package/components/ontario-icon-transport-bicycle.js.map +1 -0
- package/components/ontario-icon-transport-bus.d.ts +11 -0
- package/components/ontario-icon-transport-bus.js +170 -0
- package/components/ontario-icon-transport-bus.js.map +1 -0
- package/components/ontario-icon-transport-car.d.ts +11 -0
- package/components/ontario-icon-transport-car.js +170 -0
- package/components/ontario-icon-transport-car.js.map +1 -0
- package/components/ontario-icon-transport-walk.d.ts +11 -0
- package/components/ontario-icon-transport-walk.js +170 -0
- package/components/ontario-icon-transport-walk.js.map +1 -0
- package/components/ontario-icon-tty.d.ts +11 -0
- package/components/ontario-icon-tty.js +171 -0
- package/components/ontario-icon-tty.js.map +1 -0
- package/components/ontario-icon-twitter-alt.d.ts +11 -0
- package/components/ontario-icon-twitter-alt.js +170 -0
- package/components/ontario-icon-twitter-alt.js.map +1 -0
- package/components/ontario-icon-twitter.d.ts +11 -0
- package/components/ontario-icon-twitter.js +170 -0
- package/components/ontario-icon-twitter.js.map +1 -0
- package/components/ontario-icon-upload.d.ts +11 -0
- package/components/ontario-icon-upload.js +170 -0
- package/components/ontario-icon-upload.js.map +1 -0
- package/components/ontario-icon-video.d.ts +11 -0
- package/components/ontario-icon-video.js +170 -0
- package/components/ontario-icon-video.js.map +1 -0
- package/components/ontario-icon-visa.d.ts +11 -0
- package/components/ontario-icon-visa.js +148 -0
- package/components/ontario-icon-visa.js.map +1 -0
- package/components/ontario-icon-vote-dislike.d.ts +11 -0
- package/components/ontario-icon-vote-dislike.js +170 -0
- package/components/ontario-icon-vote-dislike.js.map +1 -0
- package/components/ontario-icon-vote-like.d.ts +11 -0
- package/components/ontario-icon-vote-like.js +170 -0
- package/components/ontario-icon-vote-like.js.map +1 -0
- package/components/ontario-icon-vpn-key.d.ts +11 -0
- package/components/ontario-icon-vpn-key.js +170 -0
- package/components/ontario-icon-vpn-key.js.map +1 -0
- package/components/ontario-icon-wheelchair.d.ts +11 -0
- package/components/ontario-icon-wheelchair.js +170 -0
- package/components/ontario-icon-wheelchair.js.map +1 -0
- package/components/ontario-icon-wifi.d.ts +11 -0
- package/components/ontario-icon-wifi.js +170 -0
- package/components/ontario-icon-wifi.js.map +1 -0
- package/components/ontario-icon-youtube.d.ts +11 -0
- package/components/ontario-icon-youtube.js +170 -0
- package/components/ontario-icon-youtube.js.map +1 -0
- package/components/ontario-input.d.ts +11 -0
- package/components/ontario-input.js +419 -0
- package/components/ontario-input.js.map +1 -0
- package/components/ontario-language-toggle.d.ts +11 -0
- package/components/ontario-language-toggle.js +9 -0
- package/components/ontario-language-toggle.js.map +1 -0
- package/components/ontario-loading-indicator.d.ts +11 -0
- package/components/ontario-loading-indicator.js +181 -0
- package/components/ontario-loading-indicator.js.map +1 -0
- package/components/ontario-page-alert.d.ts +11 -0
- package/components/ontario-page-alert.js +172 -0
- package/components/ontario-page-alert.js.map +1 -0
- package/components/ontario-radio-buttons.d.ts +11 -0
- package/components/ontario-radio-buttons.js +430 -0
- package/components/ontario-radio-buttons.js.map +1 -0
- package/components/ontario-search-box.d.ts +11 -0
- package/components/ontario-search-box.js +283 -0
- package/components/ontario-search-box.js.map +1 -0
- package/components/ontario-step-indicator.d.ts +11 -0
- package/components/ontario-step-indicator.js +172 -0
- package/components/ontario-step-indicator.js.map +1 -0
- package/components/ontario-table.d.ts +11 -0
- package/components/ontario-table.js +392 -0
- package/components/ontario-table.js.map +1 -0
- package/components/ontario-task-list.d.ts +11 -0
- package/components/ontario-task-list.js +211 -0
- package/components/ontario-task-list.js.map +1 -0
- package/components/ontario-task.d.ts +11 -0
- package/components/ontario-task.js +327 -0
- package/components/ontario-task.js.map +1 -0
- package/components/ontario-textarea.d.ts +11 -0
- package/components/ontario-textarea.js +327 -0
- package/components/ontario-textarea.js.map +1 -0
- package/components/p-6uqsTY-M.js +171 -0
- package/components/p-6uqsTY-M.js.map +1 -0
- package/components/p-A8xwC5QP.js +24 -0
- package/components/p-A8xwC5QP.js.map +1 -0
- package/components/p-BBhl-3u7.js +169 -0
- package/components/p-BBhl-3u7.js.map +1 -0
- package/components/p-BF0_OXTe.js +64 -0
- package/components/p-BF0_OXTe.js.map +1 -0
- package/components/p-BHTls9cv.js +286 -0
- package/components/p-BHTls9cv.js.map +1 -0
- package/components/p-BOcd5PoR.js +330 -0
- package/components/p-BOcd5PoR.js.map +1 -0
- package/components/p-BxXM4eur.js +29 -0
- package/components/p-BxXM4eur.js.map +1 -0
- package/components/p-C-t5TNzY.js +10 -0
- package/components/p-C-t5TNzY.js.map +1 -0
- package/components/p-C0Xvjp7G.js +282 -0
- package/components/p-C0Xvjp7G.js.map +1 -0
- package/components/p-C73HZQcq.js +89 -0
- package/components/p-C73HZQcq.js.map +1 -0
- package/components/p-CI209psv.js +271 -0
- package/components/p-CI209psv.js.map +1 -0
- package/components/p-CIdZS10A.js +20 -0
- package/components/p-CIdZS10A.js.map +1 -0
- package/components/p-CNDrx73J.js +145 -0
- package/components/p-CNDrx73J.js.map +1 -0
- package/components/p-CNqFEifG.js +34 -0
- package/components/p-CNqFEifG.js.map +1 -0
- package/components/p-CRMogYVY.js +168 -0
- package/components/p-CRMogYVY.js.map +1 -0
- package/components/p-CXTm9jmr.js +141 -0
- package/components/p-CXTm9jmr.js.map +1 -0
- package/components/p-CXfntdg5.js +7 -0
- package/components/p-CXfntdg5.js.map +1 -0
- package/components/p-C__FBxsY.js +145 -0
- package/components/p-C__FBxsY.js.map +1 -0
- package/components/p-Cdm-Ot0O.js +95 -0
- package/components/p-Cdm-Ot0O.js.map +1 -0
- package/components/p-CeFeBwzQ.js +331 -0
- package/components/p-CeFeBwzQ.js.map +1 -0
- package/components/p-DGFFJaKo.js +168 -0
- package/components/p-DGFFJaKo.js.map +1 -0
- package/components/p-DIe1tcOp.js +197 -0
- package/components/p-DIe1tcOp.js.map +1 -0
- package/components/p-DJOzeqZ-.js +168 -0
- package/components/p-DJOzeqZ-.js.map +1 -0
- package/components/p-DMH_JI3w.js +6 -0
- package/components/p-DMH_JI3w.js.map +1 -0
- package/components/p-DgMhpSmi.js +324 -0
- package/components/p-DgMhpSmi.js.map +1 -0
- package/components/p-TS9NoIOc.js +11 -0
- package/components/p-TS9NoIOc.js.map +1 -0
- package/components/p-V_1wpeJe.js +17 -0
- package/components/p-V_1wpeJe.js.map +1 -0
- package/components/p-dXtLd1df.js +63 -0
- package/components/p-dXtLd1df.js.map +1 -0
- package/components/p-vdzS-daB.js +145 -0
- package/components/p-vdzS-daB.js.map +1 -0
- package/package.json +11 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ontario-button.js","mappings":"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","names":["OntarioButton","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/ontario-button/ontario-button.types.ts","src/components/ontario-button/ontario-button.scss?tag=ontario-button&encapsulation=shadow","src/components/ontario-button/ontario-button.tsx"],"sourcesContent":["export const ButtonTypes = ['primary', 'secondary', 'tertiary', 'internalThemeDark'] as const;\nexport const HtmlTypes = ['button', 'reset', 'submit'] as const;\n\nexport type ButtonType = (typeof ButtonTypes)[number];\nexport type HtmlType = (typeof HtmlTypes)[number];\n","@use 'sass:math';\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/global.variables' as globalVariables;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/spacing.variables' as spacing;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/colours.variables' as colours;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/breakpoints.variables' as breakpoints;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/font-weights.variables' as fontWeights;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/fonts.variables' as fonts;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/2-tools/placeholder/focus.placeholders' as\n\tplaceholders;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/2-tools/placeholder/focus.placeholders' as\n\tfocusPlaceholders;\n\n$ontario-button-bg-primary: colours.$ontario-colour-link;\n$ontario-button-bg-primary--hover: colours.$ontario-colour-link--hover;\n$ontario-button-bg-primary--active: colours.$ontario-colour-link--active;\n$ontario-button-bg-secondary: colours.$ontario-colour-white;\n\n// Make the host box-level so its width/height/margins apply (was inline by default).\n// This also stabilizes VRT by giving the component predictable intrinsic sizing.\n:host {\n\tdisplay: inline-block;\n}\n\n.ontario-button {\n\tborder: none;\n\tborder-radius: globalVariables.$global-radius;\n\tbox-sizing: border-box;\n\tbox-shadow: none;\n\tdisplay: inline-block;\n\tfont-size: 1.125rem;\n\tfont-family: fonts.$ontario-font-open-sans;\n\tfont-weight: fontWeights.$ontario-font-weights-semi-bold;\n\tline-height: math.div(14, 9);\n\tmargin: spacing.$spacing-0;\n\tmin-width: 10rem;\n\tpadding: math.div((spacing.$spacing-4 + spacing.$spacing-1), 2) spacing.$spacing-5;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcursor: pointer;\n\n\t&:focus,\n\t&:active {\n\t\t@extend %ontario-focus;\n\t}\n\n\t@media screen and (max-width: breakpoints.$small-breakpoint) {\n\t\tmargin-right: 0;\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t}\n\n\t.ontario-icon {\n\t\tmargin-right: 4px;\n\t}\n}\n\n.ontario-button--primary {\n\tbackground-color: $ontario-button-bg-primary;\n\tcolor: colours.$ontario-colour-white;\n\n\t&:hover {\n\t\tbackground-color: $ontario-button-bg-primary--hover;\n\t\tcolor: colours.$ontario-colour-white;\n\t}\n\n\t&:focus {\n\t\tbackground-color: $ontario-button-bg-primary--hover;\n\t\tcolor: colours.$ontario-colour-white;\n\t\ttransition:\n\t\t\tbackground-color 0.2s ease-out,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:active {\n\t\tbackground-color: $ontario-button-bg-primary--active;\n\t\tcolor: colours.$ontario-colour-white;\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:visited {\n\t\tcolor: colours.$ontario-colour-white;\n\t}\n}\n\n.ontario-button--secondary {\n\tbackground-color: $ontario-button-bg-secondary;\n\tborder: globalVariables.$border-size-standard solid colours.$ontario-colour-link;\n\tcolor: colours.$ontario-colour-link;\n\tpadding-top: spacing.$spacing-2;\n\tpadding-bottom: spacing.$spacing-2;\n\n\t&:hover {\n\t\tbackground-color: colours.$ontario-colour-button-secondary--hover;\n\t\tborder-color: colours.$ontario-colour-link--hover;\n\t\tcolor: colours.$ontario-colour-link--hover;\n\t}\n\n\t&:focus {\n\t\tbackground-color: colours.$ontario-colour-button-secondary--hover;\n\t\tborder-color: colours.$ontario-colour-link--hover;\n\t\tcolor: colours.$ontario-colour-link--hover;\n\t\ttransition:\n\t\t\tbackground-color 0.2s ease-out,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:active {\n\t\tbackground-color: colours.$ontario-colour-button-secondary--active;\n\t\tborder-color: colours.$ontario-colour-link--active;\n\t\tcolor: colours.$ontario-colour-link--active;\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:visited {\n\t\tcolor: colours.$ontario-colour-link;\n\t}\n}\n\n.ontario-button--tertiary {\n\tbackground-color: transparent;\n\tcolor: colours.$ontario-colour-link;\n\ttext-decoration: underline;\n\n\t&:hover {\n\t\tbackground-color: colours.$ontario-colour-button-tertiary--hover;\n\t\tcolor: $ontario-button-bg-primary--hover;\n\t\ttext-decoration: underline;\n\t}\n\n\t&:focus {\n\t\tbackground-color: colours.$ontario-colour-button-tertiary--hover;\n\t\tcolor: colours.$ontario-colour-link--hover;\n\t\ttext-decoration: underline;\n\t\ttransition:\n\t\t\tbackground-color 0.2s ease-out,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:active {\n\t\tbackground-color: colours.$ontario-colour-button-tertiary--active;\n\t\tcolor: colours.$ontario-colour-link--active;\n\t\ttext-decoration: underline;\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:visited {\n\t\tcolor: colours.$ontario-colour-link;\n\t}\n}\n\n.ontario-button--internalThemeDark {\n\tbackground-color: colours.$ontario-colour-black;\n\tborder: globalVariables.$border-size-standard solid colours.$ontario-colour-white;\n\tcolor: colours.$ontario-colour-white;\n\n\t&:hover {\n\t\tbackground-color: colours.$ontario-greyscale-70;\n\t}\n\n\t&:focus {\n\t\tbackground-color: colours.$ontario-greyscale-70;\n\t\ttransition:\n\t\t\tbackground-color 0.2s ease-out,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:active {\n\t\tbackground-color: colours.$ontario-greyscale-70;\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tfocusPlaceholders.$ontario-focus-transition;\n\t}\n\n\t&:visited {\n\t\tcolor: colours.$ontario-colour-link;\n\t}\n}\n","import { Component, Prop, Element, h, Watch, State, AttachInternals } from '@stencil/core';\n\nimport { Button } from './button.interface';\nimport { ButtonType, ButtonTypes, HtmlType, HtmlTypes } from './ontario-button.types';\n\nimport { validatePropExists, validateValueAgainstArray } from '../../utils/validation/validation-functions';\nimport { ConsoleMessageClass } from '../../utils/console-message/console-message';\nimport { isServerSideRendering } from '../../utils/common/environment';\n\n@Component({\n\ttag: 'ontario-button',\n\tstyleUrl: 'ontario-button.scss',\n\tshadow: true,\n\tformAssociated: true,\n})\nexport class OntarioButton implements Button {\n\t@Element() host: HTMLElement;\n\t@AttachInternals() internals: ElementInternals;\n\n\t/**\n\t * The type of button to render.\n\t *\n\t * If no type is passed, it will default to 'secondary'.\n\t */\n\t@Prop() type: ButtonType = 'secondary';\n\n\t/**\n\t * The native HTML button type the button should use.\n\t *\n\t * If no htmlType is passed, it will default to 'button'.\n\t */\n\t@Prop() htmlType: HtmlType = 'button';\n\n\t/**\n\t * Text to be displayed within the button. This will override the text provided through the host element textContent.\n\t *\n\t * @example\n\t * <ontario-button label=\"Label Text\">Text</ontario-button>\n\t *\n\t * The resulting button will have the label `\"Label Text\"`.\n\t */\n\t@Prop() label?: string;\n\n\t/**\n\t * Provides more context as to what the button interaction is doing. This should only be used for accessibility purposes, if the button interaction requires more description than what the text provides.\n\t *\n\t * This is optional.\n\t *\n\t * @example\n\t * <ontario-button aria-label-text=\"Click button to open map\">Open</ontario button>\n\t */\n\t@Prop({ mutable: true }) ariaLabelText?: string;\n\n\t/**\n\t * The unique identifier of the button. This is optional - if no ID is passed, one will be generated.\n\t */\n\t@Prop({ mutable: true }) elementId?: string;\n\n\t/**\n\t * Mutable variable, for internal use only.\n\t * Set the button's type depending on validation result.\n\t */\n\t@State() private typeState: string;\n\n\t/**\n\t * Mutable variable, for internal use only.\n\t * Set the native HTML button type depending on validation result.\n\t */\n\t@State() private htmlTypeState: string;\n\n\t@State() private labelState: string;\n\n\t/**\n\t * A reference to the internal button element.\n\t */\n\n\tprivate buttonRef: HTMLButtonElement;\n\n\t/*\n\t * Watch for changes to the `label` property for validation purposes.\n\t *\n\t * If no `label` prop is provided, the `label` prop will be set to the host element textContent (if it exists).\n\t */\n\t@Watch('label')\n\tprivate updateLabelContent() {\n\t\tif (isServerSideRendering()) {\n\t\t\t// Ensure host and its textContent are defined and accessible (safe for SSR environments)\n\t\t\tthis.labelState = this.label ?? '';\n\t\t} else {\n\t\t\tthis.labelState = this.label ?? this.host.textContent ?? '';\n\t\t}\n\t\tthis.validateLabelContent(this.labelState);\n\t}\n\n\t/**\n\t * Watch for changes to the `type` property for validation purposes.\n\t *\n\t * If the user input doesn't match one of the array values then `type` will be set to its default (`secondary`).\n\t * If a match is found in one of the array values then `type` will be set to the matching array key value.\n\t */\n\t@Watch('type')\n\tvalidateType() {\n\t\tconst isValid = validateValueAgainstArray(this.type, ButtonTypes);\n\t\tthis.typeState = isValid ? this.type : this.warnDefaultType();\n\t}\n\n\t/**\n\t * Watch for changes to the `htmlType` property for validation purposes.\n\t *\n\t * If the user input doesn't match one of the array values then `htmlType` will be set to its default (`submit`).\n\t * If a match is found in one of the array values then `htmlType` will be set to the matching array key value.\n\t */\n\t@Watch('htmlType')\n\tvalidateHtmlType() {\n\t\tconst isValid = validateValueAgainstArray(this.htmlType, HtmlTypes);\n\t\tthis.htmlTypeState = isValid ? this.htmlType : this.warnDefaultHtmlType();\n\t}\n\n\t/**\n\t * Print the missing `label` prop warning message\n\t */\n\tvalidateLabelContent(newValue: string) {\n\t\tif (validatePropExists(newValue)) {\n\t\t\tconst message = new ConsoleMessageClass();\n\t\t\tmessage\n\t\t\t\t.addDesignSystemTag()\n\t\t\t\t.addMonospaceText(' label ')\n\t\t\t\t.addRegularText('for')\n\t\t\t\t.addMonospaceText(' <ontario-button> ')\n\t\t\t\t.addRegularText('was not provided')\n\t\t\t\t.printMessage();\n\t\t}\n\t}\n\n\t/**\n\t * Print the invalid `type` prop warning message\n\t * @returns default type (secondary)\n\t */\n\tprivate warnDefaultType(): ButtonType {\n\t\tconst message = new ConsoleMessageClass();\n\t\tmessage\n\t\t\t.addDesignSystemTag()\n\t\t\t.addMonospaceText(' type ')\n\t\t\t.addRegularText('on')\n\t\t\t.addMonospaceText(' <ontario-button> ')\n\t\t\t.addRegularText('was set to an invalid type; only')\n\t\t\t.addMonospaceText(' primary, secondary, or tertiary ')\n\t\t\t.addRegularText('are supported. The default type')\n\t\t\t.addMonospaceText(' secondary ')\n\t\t\t.addRegularText('is assumed.')\n\t\t\t.printMessage();\n\t\treturn 'secondary';\n\t}\n\n\t/**\n\t * Print the invalid `htmlType` warning message\n\t * @returns default htmlType (button)\n\t */\n\tprivate warnDefaultHtmlType(): HtmlType {\n\t\tconst message = new ConsoleMessageClass();\n\t\tmessage\n\t\t\t.addDesignSystemTag()\n\t\t\t.addMonospaceText(' htmlType ')\n\t\t\t.addRegularText('on')\n\t\t\t.addMonospaceText(' <ontario-button> ')\n\t\t\t.addRegularText('was set to an invalid htmlType; only')\n\t\t\t.addMonospaceText(' button, reset, or submit ')\n\t\t\t.addRegularText('are supported. The default type')\n\t\t\t.addMonospaceText(' button ')\n\t\t\t.addRegularText('is assumed.')\n\t\t\t.printMessage();\n\t\treturn 'button';\n\t}\n\n\t/**\n\t * @returns the classes of the button based of the button's `type`.\n\t */\n\tprivate getClass() {\n\t\treturn `ontario-button ontario-button--${this.typeState}`;\n\t}\n\n\tpublic getId(): string {\n\t\treturn this.elementId ?? '';\n\t}\n\n\t/**\n\t * Set `buttonId`, `label`, and `ariaLabel` using internal component logic.\n\t */\n\tcomponentWillLoad() {\n\t\tthis.updateLabelContent();\n\t\tthis.validateHtmlType();\n\t\tthis.validateType();\n\t\tthis.ariaLabelText = this.ariaLabelText ?? this.labelState;\n\t}\n\n\tcomponentDidLoad() {\n\t\t// Used to help load translations for any slots + text content passed in by the user.\n\t\tconst observer = new MutationObserver((mutations) => {\n\t\t\tmutations.forEach((mutation) => {\n\t\t\t\tif (mutation.type === 'attributes') {\n\t\t\t\t\tthis.updateLabelContent();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tconst options = { attributes: true };\n\t\tobserver.observe(this.host, options);\n\n\t\t// Add a click event listener to handle submitting a form\n\t\tif (this.htmlTypeState === 'submit') {\n\t\t\tthis.buttonRef.addEventListener('click', () => {\n\t\t\t\tconst { form } = this.internals;\n\t\t\t\tform?.requestSubmit();\n\t\t\t});\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<button\n\t\t\t\tref={(el) => (this.buttonRef = el as HTMLButtonElement)}\n\t\t\t\ttype={this.htmlTypeState}\n\t\t\t\tclass={this.getClass()}\n\t\t\t\taria-label={this.ariaLabelText}\n\t\t\t\tid={this.getId()}\n\t\t\t>\n\t\t\t\t{this.labelState}\n\t\t\t</button>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from '../dist/types/components';
|
|
2
|
+
|
|
3
|
+
interface OntarioCallout extends Components.OntarioCallout, HTMLElement {}
|
|
4
|
+
export const OntarioCallout: {
|
|
5
|
+
prototype: OntarioCallout;
|
|
6
|
+
new (): OntarioCallout;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H } from './index.js';
|
|
2
|
+
import {
|
|
3
|
+
i as isValidHeadingLevel,
|
|
4
|
+
H as HeadingContentTypes,
|
|
5
|
+
a as isValidHighlightColour,
|
|
6
|
+
g as generateCalloutAside,
|
|
7
|
+
} from './p-dXtLd1df.js';
|
|
8
|
+
import { v as validateValueAgainstArray } from './p-CNqFEifG.js';
|
|
9
|
+
import { C as ConsoleMessageClass } from './p-Cdm-Ot0O.js';
|
|
10
|
+
|
|
11
|
+
const ontarioCalloutCss =
|
|
12
|
+
'@charset "UTF-8";h6,.ontario-h6,h5,.ontario-h5,h4,.ontario-h4,h3,.ontario-h3,h2,.ontario-h2,h1,.ontario-h1{font-style:normal;font-weight:700;text-rendering:optimizeLegibility;margin-bottom:1rem;font-feature-settings:normal;font-family:"Raleway Modified", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif}h1,.ontario-h1{font-size:2rem;letter-spacing:0.04rem;line-height:1.29;margin:2.5rem 0 1.5rem 0;max-width:70rem}@media screen and (min-width: 40em){h1,.ontario-h1{font-size:2.5rem;letter-spacing:0.04rem;line-height:1.2}}h2,.ontario-h2{font-size:1.6875rem;letter-spacing:0.03rem;line-height:1.37;margin:0 0 0.75rem 0;max-width:48rem}@media screen and (min-width: 40em){h2,.ontario-h2{font-size:2.0625rem;letter-spacing:0.02rem;line-height:1.33}}h3,.ontario-h3{font-size:1.4375rem;letter-spacing:0.02rem;line-height:1.39;margin:0 0 0.75rem 0;max-width:48rem}@media screen and (min-width: 40em){h3,.ontario-h3{font-size:1.75rem;letter-spacing:0.02rem;line-height:1.43}}h4,.ontario-h4{font-size:1.25rem;letter-spacing:0.03rem;line-height:1.5;margin:0 0 0.75rem 0;max-width:48rem}@media screen and (min-width: 40em){h4,.ontario-h4{font-size:1.5rem;letter-spacing:0.0313rem;line-height:1.5}}h5,.ontario-h5{font-size:1.125rem;letter-spacing:0.03rem;line-height:1.56;margin:0 0 0.75rem 0;max-width:48rem}@media screen and (min-width: 40em){h5,.ontario-h5{font-size:1.1875rem;letter-spacing:0.025rem;line-height:1.5}}h6,.ontario-h6{font-size:1rem;line-height:1.56;letter-spacing:0.03rem;max-width:48rem;margin:0 0 0.75rem 0}@media screen and (min-width: 40em){h6,.ontario-h6{font-size:1rem;letter-spacing:0.025rem;line-height:1.5}}.ontario-lead-statement{font-size:1.25rem;line-height:1.6;max-width:70rem}@media screen and (min-width: 40em){.ontario-lead-statement{font-size:1.375rem}}html{font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:1rem}body{font-size:1rem;line-height:1.6;background-color:#FFFFFF;color:rgb(25.5, 25.5, 25.5);margin:0}p{font-size:inherit;margin-bottom:1.25rem;text-rendering:optimizeLegibility;margin:0 0 1.5rem 0}cite{font-style:italic;line-height:inherit}strong{font-weight:700;line-height:inherit}*,*::before,*::after{box-sizing:inherit}main p,main p:not(.ontario-lead-statement),main dd,main li{max-width:48rem}hr{border:0;padding:0;margin:2.5rem 0;border-bottom:4px solid #cccccc}hr.ontario-hr--dark{border-bottom:4px solid rgb(25.5, 25.5, 25.5)}a{color:#0066CC;text-decoration:underline}a:visited{color:#551A8B}a:hover{color:#00478F}a:active{color:#002142}a:focus{-moz-box-shadow:0 0 0 4px #009ADB;-webkit-box-shadow:0 0 0 4px #009ADB;box-shadow:0 0 0 4px #009ADB;outline:4px solid transparent;transition:all 0.1s ease-in-out}p{margin:0 0 1.5rem 0}p+h1,p+h2,p+h3,p+h4,p+h5,p+h6,ul+h1,ul+h2,ul+h3,ul+h4,ul+h5,ul+h6,ol+h1,ol+h2,ol+h3,ol+h4,ol+h5,ol+h6,h1+h2,h2+h3,h3+h4,h4+h5,h5+h6{margin-top:2rem}p code,td code,li code{line-height:2.25rem}input[type=text],input[type=number],input[type=email],input[type=date],input[type=color],input[type=search],input[type=tel],textarea{background-origin:initial;height:auto;-webkit-appearance:none;-moz-appearance:none}input[type=checkbox]+label,input[type=radio]+label{font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:1rem;font-weight:400;margin-left:0;margin-right:0}fieldset{border:0;margin:0;padding:0;page-break-inside:avoid}legend,label{display:block;margin:0}select{background-origin:initial;height:auto;-webkit-appearance:none;-moz-appearance:none}ul,ol{padding:0}ul{margin-left:2rem}ul li{padding:0 0 0.75rem 0}ol{margin-left:1.75rem}ol li{padding:0 0 0.75rem 0.25rem}ul li:last-child,ol li:last-child{padding-bottom:0}ul[class*=columns-] li:last-child,ol[class*=columns-] li:last-child{padding-bottom:0.75rem}ul ul,ol ul{margin:0.5rem 0 0.5rem 2rem}ul ol,ol ol{margin:0.5rem 0 0.5rem 1.75rem}p+ul,p+ol{margin-top:-0.75rem}@media screen and (min-width: 40em){ul{margin:0.5rem 0 1.5rem 3rem}ol{margin:0.5rem 0 1.5rem 2.75rem}ul ul,ol ul{margin:0.5rem 0 0.5rem 3rem}ul ol,ol ol{margin:0.5rem 0 0.5rem 2.75rem}}.ontario-callout{border-left:0.25rem solid #367A76;padding:1.5rem;margin:2rem 0 2.5rem 0;background-color:rgb(242.25, 242.25, 242.25)}.ontario-callout *{max-width:48rem}.ontario-callout *:last-child,.ontario-callout *:last-of-type{margin-bottom:0.5rem}.ontario-callout__title{margin:0 0 1rem}.ontario-border-highlight--teal{border-color:#367A76 !important}.ontario-border-highlight--gold{border-color:#86743D !important}.ontario-border-highlight--yellow{border-color:#8A600D !important}.ontario-border-highlight--taupe{border-color:#7B725C !important}.ontario-border-highlight--green{border-color:#2B8737 !important}.ontario-border-highlight--lime{border-color:#5F8129 !important}.ontario-border-highlight--sky{border-color:#1080A6 !important}.ontario-border-highlight--blue{border-color:#0369ac !important}.ontario-border-highlight--purple{border-color:#92278F !important}';
|
|
13
|
+
|
|
14
|
+
const OntarioCallout$1 = /*@__PURE__*/ proxyCustomElement(
|
|
15
|
+
class OntarioCallout extends H {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.__registerHost();
|
|
19
|
+
this.__attachShadow();
|
|
20
|
+
/**
|
|
21
|
+
* The type of the heading content. If no prop is passed, it will default to `string`.
|
|
22
|
+
*/
|
|
23
|
+
this.headingContentType = 'string';
|
|
24
|
+
/**
|
|
25
|
+
* Optional prop to choose the border colour of the callout. If none is passed, the default colour will be teal.
|
|
26
|
+
*/
|
|
27
|
+
this.highlightColour = 'teal';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Watch for changes to the `headingType` prop.
|
|
31
|
+
* This is for validation purposes to make sure the `headingType` matches one of the `HeadingLevelOptions`.
|
|
32
|
+
*/
|
|
33
|
+
validateHeadingType() {
|
|
34
|
+
if (!!this.headingType) {
|
|
35
|
+
if (isValidHeadingLevel(this.headingType)) return this.headingType;
|
|
36
|
+
const message = new ConsoleMessageClass();
|
|
37
|
+
return message
|
|
38
|
+
.addDesignSystemTag()
|
|
39
|
+
.addMonospaceText(` headingType ${this.headingType} `)
|
|
40
|
+
.addRegularText('for')
|
|
41
|
+
.addMonospaceText(' <ontario-callout> ')
|
|
42
|
+
.addRegularText('is not a valid type. Please ensure your heading type matches one of the headingType types.')
|
|
43
|
+
.printMessage();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Watch for changes in the `headingContentType` variable for validation purposes.
|
|
48
|
+
*
|
|
49
|
+
* If the user input doesn't match one of the array values then `headingContentType` will be set to its default (`string`).
|
|
50
|
+
* If a match is found in one of the array values then `headingContentType` will be set to the matching array key value.
|
|
51
|
+
*/
|
|
52
|
+
validateHeadingContentType() {
|
|
53
|
+
const isValid = validateValueAgainstArray(this.headingContentType, HeadingContentTypes);
|
|
54
|
+
if (isValid) {
|
|
55
|
+
return this.headingContentType;
|
|
56
|
+
} else {
|
|
57
|
+
return this.warnDefaultType();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Watch for changes to the `highlightColour` prop.
|
|
62
|
+
*
|
|
63
|
+
* If no `highlightColour` is passed, or if the `highlightColour` does not match the `highlightColour` options, a default value of 'teal' will be applied.
|
|
64
|
+
*/
|
|
65
|
+
validateHighlightColour() {
|
|
66
|
+
if (this.highlightColour) {
|
|
67
|
+
if (isValidHighlightColour(this.highlightColour)) return this.highlightColour;
|
|
68
|
+
else {
|
|
69
|
+
const message = new ConsoleMessageClass();
|
|
70
|
+
message
|
|
71
|
+
.addDesignSystemTag()
|
|
72
|
+
.addMonospaceText(` highlightColour ${this.highlightColour} `)
|
|
73
|
+
.addRegularText('for')
|
|
74
|
+
.addMonospaceText(' <ontario-callout> ')
|
|
75
|
+
.addRegularText(
|
|
76
|
+
'does not match one of the valid highlightColour types. A default colour of `teal` will be applied.',
|
|
77
|
+
)
|
|
78
|
+
.printMessage();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// if no highlight colour is passed, return 'teal'
|
|
82
|
+
return 'teal';
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Print the invalid `type` warning message.
|
|
86
|
+
* @returns default type ('string')
|
|
87
|
+
*/
|
|
88
|
+
warnDefaultType() {
|
|
89
|
+
const message = new ConsoleMessageClass();
|
|
90
|
+
message
|
|
91
|
+
.addDesignSystemTag()
|
|
92
|
+
.addMonospaceText(' headingContentType ')
|
|
93
|
+
.addRegularText('on')
|
|
94
|
+
.addMonospaceText(' <ontario-callout> ')
|
|
95
|
+
.addRegularText('was set to an invalid type; only')
|
|
96
|
+
.addMonospaceText(' string or html ')
|
|
97
|
+
.addRegularText('are supported. The default type')
|
|
98
|
+
.addMonospaceText(' string ')
|
|
99
|
+
.addRegularText('is assumed.')
|
|
100
|
+
.printMessage();
|
|
101
|
+
return (this.headingContentType = 'string');
|
|
102
|
+
}
|
|
103
|
+
componentWillLoad() {
|
|
104
|
+
this.validateHighlightColour();
|
|
105
|
+
this.validateHeadingType();
|
|
106
|
+
this.validateHeadingContentType();
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
return generateCalloutAside(
|
|
110
|
+
'callout',
|
|
111
|
+
this.headingContentType,
|
|
112
|
+
this.headingType,
|
|
113
|
+
this.headingContent,
|
|
114
|
+
this.content,
|
|
115
|
+
this.highlightColour,
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
static get watchers() {
|
|
119
|
+
return {
|
|
120
|
+
headingType: ['validateHeadingType'],
|
|
121
|
+
headingContentType: ['validateHeadingContentType'],
|
|
122
|
+
highlightColour: ['validateHighlightColour'],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
static get style() {
|
|
126
|
+
return ontarioCalloutCss;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
[
|
|
130
|
+
257,
|
|
131
|
+
'ontario-callout',
|
|
132
|
+
{
|
|
133
|
+
headingType: [1025, 'heading-type'],
|
|
134
|
+
headingContentType: [1025, 'heading-content-type'],
|
|
135
|
+
headingContent: [1, 'heading-content'],
|
|
136
|
+
content: [1],
|
|
137
|
+
highlightColour: [1025, 'highlight-colour'],
|
|
138
|
+
},
|
|
139
|
+
undefined,
|
|
140
|
+
{
|
|
141
|
+
headingType: ['validateHeadingType'],
|
|
142
|
+
headingContentType: ['validateHeadingContentType'],
|
|
143
|
+
highlightColour: ['validateHighlightColour'],
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
);
|
|
147
|
+
function defineCustomElement$1() {
|
|
148
|
+
if (typeof customElements === 'undefined') {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const components = ['ontario-callout'];
|
|
152
|
+
components.forEach((tagName) => {
|
|
153
|
+
switch (tagName) {
|
|
154
|
+
case 'ontario-callout':
|
|
155
|
+
if (!customElements.get(tagName)) {
|
|
156
|
+
customElements.define(tagName, OntarioCallout$1);
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
defineCustomElement$1();
|
|
163
|
+
|
|
164
|
+
const OntarioCallout = OntarioCallout$1;
|
|
165
|
+
const defineCustomElement = defineCustomElement$1;
|
|
166
|
+
|
|
167
|
+
export { OntarioCallout, defineCustomElement };
|
|
168
|
+
//# sourceMappingURL=ontario-callout.js.map
|
|
169
|
+
|
|
170
|
+
//# sourceMappingURL=ontario-callout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ontario-callout.js","mappings":";;;;;AAAA,MAAM,iBAAiB,GAAG,m1JAAm1J;;MCsBh2JA,gBAAc,iBAAAC,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;AAL3B,IAAA,WAAA,GAAA;;;;AAWC;;AAEG;AACsB,QAAA,IAAkB,CAAA,kBAAA,GAAuB,QAAQ;AAiB1E;;AAEG;AACsB,QAAA,IAAe,CAAA,eAAA,GAA4B,MAAM;AAqG1E;AAnGA;;;AAGG;IAEH,mBAAmB,GAAA;AAClB,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE;AACvB,YAAA,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC;gBAAE,OAAO,IAAI,CAAC,WAAW;AAElE,YAAA,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE;AACzC,YAAA,OAAO;AACL,iBAAA,kBAAkB;AAClB,iBAAA,gBAAgB,CAAC,CAAgB,aAAA,EAAA,IAAI,CAAC,WAAW,GAAG;iBACpD,cAAc,CAAC,KAAK;iBACpB,gBAAgB,CAAC,qBAAqB;iBACtC,cAAc,CAAC,4FAA4F;AAC3G,iBAAA,YAAY,EAAE;;;AAIlB;;;;;AAKG;IAEH,0BAA0B,GAAA;QACzB,MAAM,OAAO,GAAG,yBAAyB,CAAC,IAAI,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;QACvF,IAAI,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,kBAAkB;;aACxB;AACN,YAAA,OAAO,IAAI,CAAC,eAAe,EAAE;;;AAI/B;;;;AAIG;IAEH,uBAAuB,GAAA;AACtB,QAAA,IAAI,IAAI,CAAC,eAAe,EAAE;AACzB,YAAA,IAAI,sBAAsB,CAAC,IAAI,CAAC,eAAe,CAAC;gBAAE,OAAO,IAAI,CAAC,eAAe;iBACxE;AACJ,gBAAA,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE;gBACzC;AACE,qBAAA,kBAAkB;AAClB,qBAAA,gBAAgB,CAAC,CAAoB,iBAAA,EAAA,IAAI,CAAC,eAAe,GAAG;qBAC5D,cAAc,CAAC,KAAK;qBACpB,gBAAgB,CAAC,qBAAqB;qBACtC,cAAc,CACd,oGAAoG;AAEpG,qBAAA,YAAY,EAAE;;;;AAKlB,QAAA,OAAO,MAAM;;AAGd;;;AAGG;IACK,eAAe,GAAA;AACtB,QAAA,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE;QACzC;AACE,aAAA,kBAAkB;aAClB,gBAAgB,CAAC,sBAAsB;aACvC,cAAc,CAAC,IAAI;aACnB,gBAAgB,CAAC,qBAAqB;aACtC,cAAc,CAAC,kCAAkC;aACjD,gBAAgB,CAAC,kBAAkB;aACnC,cAAc,CAAC,iCAAiC;aAChD,gBAAgB,CAAC,UAAU;aAC3B,cAAc,CAAC,aAAa;AAC5B,aAAA,YAAY,EAAE;AAChB,QAAA,QAAQ,IAAI,CAAC,kBAAkB,GAAG,QAAQ;;IAG3C,iBAAiB,GAAA;QAChB,IAAI,CAAC,uBAAuB,EAAE;QAC9B,IAAI,CAAC,mBAAmB,EAAE;QAC1B,IAAI,CAAC,0BAA0B,EAAE;;IAGlC,MAAM,GAAA;QACL,OAAO,oBAAoB,CAC1B,SAAS,EACT,IAAI,CAAC,kBAAkB,EACvB,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,eAAe,CACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["OntarioCallout","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/ontario-callout/ontario-callout.scss?tag=ontario-callout&encapsulation=shadow","src/components/ontario-callout/ontario-callout.tsx"],"sourcesContent":["@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/spacing.variables' as spacing;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/colours.variables' as colours;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/global.variables' as globalVariables;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/4-elements/global.elements';\n\n.ontario-callout {\n\tborder-left: spacing.$spacing-1 solid colours.$ontario-colour-dark-teal;\n\tpadding: spacing.$spacing-5;\n\tmargin: spacing.$spacing-6 spacing.$spacing-0 spacing.$spacing-7 spacing.$spacing-0;\n\tbackground-color: colours.$ontario-greyscale-5;\n\n\t* {\n\t\tmax-width: globalVariables.$standard-width;\n\n\t\t&:last-child,\n\t\t&:last-of-type {\n\t\t\tmargin-bottom: spacing.$spacing-2;\n\t\t}\n\t}\n}\n\n.ontario-callout__title {\n\tmargin: spacing.$spacing-0 spacing.$spacing-0 spacing.$spacing-4;\n}\n\n$highlight-colours: (\n\t'teal': colours.$ontario-colour-dark-teal,\n\t'gold': colours.$ontario-colour-dark-gold,\n\t'yellow': colours.$ontario-colour-dark-yellow,\n\t'taupe': colours.$ontario-colour-dark-taupe,\n\t'green': colours.$ontario-colour-dark-green,\n\t'lime': colours.$ontario-colour-dark-lime,\n\t'sky': colours.$ontario-colour-dark-sky,\n\t'blue': colours.$ontario-colour-dark-blue,\n\t'purple': colours.$ontario-colour-dark-purple,\n);\n\n@each $colour-name, $hex in $highlight-colours {\n\t.ontario-border-highlight--#{$colour-name} {\n\t\tborder-color: $hex !important;\n\t}\n}\n","import { Component, Prop, Watch } from '@stencil/core';\n\nimport {\n\tCalloutAside,\n\tHeadingLevelOptions,\n\tHeadingContentType,\n\tHeadingContentTypes,\n\tHighlightColourOptions,\n} from '../../utils/components/callout-aside/callout-aside.interface';\nimport {\n\tisValidHighlightColour,\n\tgenerateCalloutAside,\n\tisValidHeadingLevel,\n} from '../../utils/components/callout-aside/callout-aside-helpers';\nimport { validateValueAgainstArray } from '../../utils/validation/validation-functions';\nimport { ConsoleMessageClass } from '../../utils/console-message/console-message';\n\n@Component({\n\ttag: 'ontario-callout',\n\tstyleUrl: 'ontario-callout.scss',\n\tshadow: true,\n})\nexport class OntarioCallout implements CalloutAside {\n\t/**\n\t * The heading level of the callout heading.\n\t */\n\t@Prop({ mutable: true }) headingType?: HeadingLevelOptions;\n\n\t/**\n\t * The type of the heading content. If no prop is passed, it will default to `string`.\n\t */\n\t@Prop({ mutable: true }) headingContentType: HeadingContentType = 'string';\n\n\t/**\n\t * Text or HTML to be displayed as the heading of the callout. If the heading content should be displayed as HTML, the `headingContentType` needs to be set to `html`.\n\t */\n\t@Prop() headingContent?: string;\n\n\t/**\n\t * Optional text to be displayed as the content for the callout component. If a string is passed, it will automatically be nested in a paragraph tag.\n\t *\n\t * HTML content can also be passed as the child/children of the callout component if additional/different elements for the content are needed.\n\t *\n\t * @example\n\t * <ontario-callout headingType='h3' headingContent='This is the callout heading'><p>This is the first sentence of the callout content.</p><p>This is the second sentence of the callout content.</p></ontario-callout>\n\t */\n\t@Prop() content?: string;\n\n\t/**\n\t * Optional prop to choose the border colour of the callout. If none is passed, the default colour will be teal.\n\t */\n\t@Prop({ mutable: true }) highlightColour?: HighlightColourOptions = 'teal';\n\n\t/**\n\t * Watch for changes to the `headingType` prop.\n\t * This is for validation purposes to make sure the `headingType` matches one of the `HeadingLevelOptions`.\n\t */\n\t@Watch('headingType')\n\tvalidateHeadingType() {\n\t\tif (!!this.headingType) {\n\t\t\tif (isValidHeadingLevel(this.headingType)) return this.headingType;\n\n\t\t\tconst message = new ConsoleMessageClass();\n\t\t\treturn message\n\t\t\t\t.addDesignSystemTag()\n\t\t\t\t.addMonospaceText(` headingType ${this.headingType} `)\n\t\t\t\t.addRegularText('for')\n\t\t\t\t.addMonospaceText(' <ontario-callout> ')\n\t\t\t\t.addRegularText('is not a valid type. Please ensure your heading type matches one of the headingType types.')\n\t\t\t\t.printMessage();\n\t\t}\n\t}\n\n\t/**\n\t * Watch for changes in the `headingContentType` variable for validation purposes.\n\t *\n\t * If the user input doesn't match one of the array values then `headingContentType` will be set to its default (`string`).\n\t * If a match is found in one of the array values then `headingContentType` will be set to the matching array key value.\n\t */\n\t@Watch('headingContentType')\n\tvalidateHeadingContentType() {\n\t\tconst isValid = validateValueAgainstArray(this.headingContentType, HeadingContentTypes);\n\t\tif (isValid) {\n\t\t\treturn this.headingContentType;\n\t\t} else {\n\t\t\treturn this.warnDefaultType();\n\t\t}\n\t}\n\n\t/**\n\t * Watch for changes to the `highlightColour` prop.\n\t *\n\t * If no `highlightColour` is passed, or if the `highlightColour` does not match the `highlightColour` options, a default value of 'teal' will be applied.\n\t */\n\t@Watch('highlightColour')\n\tvalidateHighlightColour() {\n\t\tif (this.highlightColour) {\n\t\t\tif (isValidHighlightColour(this.highlightColour)) return this.highlightColour;\n\t\t\telse {\n\t\t\t\tconst message = new ConsoleMessageClass();\n\t\t\t\tmessage\n\t\t\t\t\t.addDesignSystemTag()\n\t\t\t\t\t.addMonospaceText(` highlightColour ${this.highlightColour} `)\n\t\t\t\t\t.addRegularText('for')\n\t\t\t\t\t.addMonospaceText(' <ontario-callout> ')\n\t\t\t\t\t.addRegularText(\n\t\t\t\t\t\t'does not match one of the valid highlightColour types. A default colour of `teal` will be applied.',\n\t\t\t\t\t)\n\t\t\t\t\t.printMessage();\n\t\t\t}\n\t\t}\n\n\t\t// if no highlight colour is passed, return 'teal'\n\t\treturn 'teal';\n\t}\n\n\t/**\n\t * Print the invalid `type` warning message.\n\t * @returns default type ('string')\n\t */\n\tprivate warnDefaultType() {\n\t\tconst message = new ConsoleMessageClass();\n\t\tmessage\n\t\t\t.addDesignSystemTag()\n\t\t\t.addMonospaceText(' headingContentType ')\n\t\t\t.addRegularText('on')\n\t\t\t.addMonospaceText(' <ontario-callout> ')\n\t\t\t.addRegularText('was set to an invalid type; only')\n\t\t\t.addMonospaceText(' string or html ')\n\t\t\t.addRegularText('are supported. The default type')\n\t\t\t.addMonospaceText(' string ')\n\t\t\t.addRegularText('is assumed.')\n\t\t\t.printMessage();\n\t\treturn (this.headingContentType = 'string');\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateHighlightColour();\n\t\tthis.validateHeadingType();\n\t\tthis.validateHeadingContentType();\n\t}\n\n\trender() {\n\t\treturn generateCalloutAside(\n\t\t\t'callout',\n\t\t\tthis.headingContentType,\n\t\t\tthis.headingType,\n\t\t\tthis.headingContent,\n\t\t\tthis.content,\n\t\t\tthis.highlightColour,\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from '../dist/types/components';
|
|
2
|
+
|
|
3
|
+
interface OntarioCardCollection extends Components.OntarioCardCollection, HTMLElement {}
|
|
4
|
+
export const OntarioCardCollection: {
|
|
5
|
+
prototype: OntarioCardCollection;
|
|
6
|
+
new (): OntarioCardCollection;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h } from './index.js';
|
|
2
|
+
import { C as ConsoleMessageClass } from './p-Cdm-Ot0O.js';
|
|
3
|
+
|
|
4
|
+
const ontarioCardCollectionCss =
|
|
5
|
+
'.ontario-card-collection__container{display:flex;flex-wrap:wrap;column-gap:2rem;row-gap:0;margin:0;padding:0}.ontario-card-collecton--cards-per-row-4 ::slotted(ontario-card){width:calc(25% - 1.5rem)}@media screen and (max-width: 73em){.ontario-card-collecton--cards-per-row-4 ::slotted(ontario-card){width:calc(50% - 1rem)}}@media screen and (max-width: 40em){.ontario-card-collecton--cards-per-row-4 ::slotted(ontario-card){width:100%}}.ontario-card-collecton--cards-per-row-3 ::slotted(ontario-card){width:calc(33.3% - 1.33rem)}@media screen and (max-width: 40em){.ontario-card-collecton--cards-per-row-3 ::slotted(ontario-card){width:100%}}.ontario-card-collecton--cards-per-row-2 ::slotted(ontario-card){width:calc(50% - 1rem)}@media screen and (max-width: 40em){.ontario-card-collecton--cards-per-row-2 ::slotted(ontario-card){width:100%}}';
|
|
6
|
+
|
|
7
|
+
const OntarioCardCollection$1 = /*@__PURE__*/ proxyCustomElement(
|
|
8
|
+
class OntarioCardCollection extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
/**
|
|
14
|
+
* The number of cards to display per row.
|
|
15
|
+
*
|
|
16
|
+
* If no number is passed, it will default to 3.
|
|
17
|
+
*/
|
|
18
|
+
this.cardsPerRow = 3;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Watch for changes to the `cardsPerRow` property for validation purposes.
|
|
22
|
+
*
|
|
23
|
+
* If the user input is not a number or is a negative number then `cardsPerRow` will be set to its default (3).
|
|
24
|
+
*/
|
|
25
|
+
validateCardsPerRow() {
|
|
26
|
+
if (isNaN(this.cardsPerRow) || (!isNaN(this.cardsPerRow) && this.cardsPerRow <= 0)) {
|
|
27
|
+
const message = new ConsoleMessageClass();
|
|
28
|
+
message
|
|
29
|
+
.addDesignSystemTag()
|
|
30
|
+
.addMonospaceText(' cards-per-row ')
|
|
31
|
+
.addRegularText('on')
|
|
32
|
+
.addMonospaceText(' <ontario-card-collection> ')
|
|
33
|
+
.addRegularText(
|
|
34
|
+
`${isNaN(this.cardsPerRow) ? 'was set to a non-numeric value' : 'was set to a negative number'}; only a positive number is allowed. The default number of cards per row: `,
|
|
35
|
+
)
|
|
36
|
+
.addMonospaceText(' 3 ')
|
|
37
|
+
.addRegularText('was assumed.')
|
|
38
|
+
.printMessage();
|
|
39
|
+
this.cardsPerRowState = 3;
|
|
40
|
+
} else {
|
|
41
|
+
this.cardsPerRowState = this.cardsPerRow;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @returns the classes of the ontario cards based off the `cardType` and number of cards per row.
|
|
46
|
+
*/
|
|
47
|
+
getClass() {
|
|
48
|
+
return `
|
|
49
|
+
ontario-card-collection__container
|
|
50
|
+
ontario-card-collecton--cards-per-row-${this.cardsPerRowState}
|
|
51
|
+
`.trim();
|
|
52
|
+
}
|
|
53
|
+
componentWillLoad() {
|
|
54
|
+
this.validateCardsPerRow();
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return h(
|
|
58
|
+
'ul',
|
|
59
|
+
{ key: '29dac6dce71cbf67d785843e06aff63ffc90df6f', class: this.getClass() },
|
|
60
|
+
h('slot', { key: 'd15bfd8f3aea5bfe32825edfdb722018ed291b22' }),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
get host() {
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
static get watchers() {
|
|
67
|
+
return {
|
|
68
|
+
cardsPerRow: ['validateCardsPerRow'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get style() {
|
|
72
|
+
return ontarioCardCollectionCss;
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
[
|
|
76
|
+
257,
|
|
77
|
+
'ontario-card-collection',
|
|
78
|
+
{
|
|
79
|
+
cardsPerRow: [2, 'cards-per-row'],
|
|
80
|
+
cardsPerRowState: [32],
|
|
81
|
+
},
|
|
82
|
+
undefined,
|
|
83
|
+
{
|
|
84
|
+
cardsPerRow: ['validateCardsPerRow'],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
);
|
|
88
|
+
function defineCustomElement$1() {
|
|
89
|
+
if (typeof customElements === 'undefined') {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const components = ['ontario-card-collection'];
|
|
93
|
+
components.forEach((tagName) => {
|
|
94
|
+
switch (tagName) {
|
|
95
|
+
case 'ontario-card-collection':
|
|
96
|
+
if (!customElements.get(tagName)) {
|
|
97
|
+
customElements.define(tagName, OntarioCardCollection$1);
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
defineCustomElement$1();
|
|
104
|
+
|
|
105
|
+
const OntarioCardCollection = OntarioCardCollection$1;
|
|
106
|
+
const defineCustomElement = defineCustomElement$1;
|
|
107
|
+
|
|
108
|
+
export { OntarioCardCollection, defineCustomElement };
|
|
109
|
+
//# sourceMappingURL=ontario-card-collection.js.map
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=ontario-card-collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ontario-card-collection.js","mappings":";;;AAAA,MAAM,wBAAwB,GAAG,80BAA80B;;MCSl2BA,uBAAqB,iBAAAC,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AALlC,IAAA,WAAA,GAAA;;;;AAQC;;;;AAIG;AACK,QAAA,IAAW,CAAA,WAAA,GAAgB,CAAC;AA0DpC;AAjDA;;;;AAIG;IAEH,mBAAmB,GAAA;QAClB,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,EAAE;AACnF,YAAA,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE;YACzC;AACE,iBAAA,kBAAkB;iBAClB,gBAAgB,CAAC,iBAAiB;iBAClC,cAAc,CAAC,IAAI;iBACnB,gBAAgB,CAAC,6BAA6B;AAC9C,iBAAA,cAAc,CACd,CACC,EAAA,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,gCAAgC,GAAG,8BAC9D,4EAA4E;iBAE5E,gBAAgB,CAAC,KAAK;iBACtB,cAAc,CAAC,cAAc;AAC7B,iBAAA,YAAY,EAAE;AAChB,YAAA,IAAI,CAAC,gBAAgB,GAAG,CAAC;;aACnB;AACN,YAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW;;;AAI1C;;AAEG;IACK,QAAQ,GAAA;QACf,OAAO;;AAEqC,4CAAA,EAAA,IAAI,CAAC,gBAAgB;KAC9D,CAAC,IAAI,EAAE;;IAGX,iBAAiB,GAAA;QAChB,IAAI,CAAC,mBAAmB,EAAE;;IAG3B,MAAM,GAAA;AACL,QAAA,QACC,CAAI,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAA,EACzB,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["OntarioCardCollection","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/ontario-card-collection/ontario-card-collection.scss?tag=ontario-card-collection&encapsulation=shadow","src/components/ontario-card-collection/ontario-card-collection.tsx"],"sourcesContent":["@use 'sass:math';\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/spacing.variables' as spacing;\n@use 'pkg:@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/breakpoints.variables' as breakpoints;\n\n.ontario-card-collection__container {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tcolumn-gap: spacing.$spacing-6;\n\trow-gap: spacing.$spacing-0;\n\tmargin: spacing.$spacing-0;\n\tpadding: spacing.$spacing-0;\n}\n\n.ontario-card-collecton--cards-per-row-4 ::slotted(ontario-card) {\n\twidth: calc(25% - 1.5rem);\n\n\t@media screen and (max-width: breakpoints.$medium-breakpoint) {\n\t\twidth: calc(50% - 1rem);\n\t}\n\n\t@media screen and (max-width: breakpoints.$small-breakpoint) {\n\t\twidth: 100%;\n\t}\n}\n\n.ontario-card-collecton--cards-per-row-3 ::slotted(ontario-card) {\n\twidth: calc(33.3% - 1.33rem);\n\n\t@media screen and (max-width: breakpoints.$small-breakpoint) {\n\t\twidth: 100%;\n\t}\n}\n\n.ontario-card-collecton--cards-per-row-2 ::slotted(ontario-card) {\n\twidth: calc(50% - 1rem);\n\n\t@media screen and (max-width: breakpoints.$small-breakpoint) {\n\t\twidth: 100%;\n\t}\n}\n","import { Component, Prop, Element, h, Watch, State } from '@stencil/core';\nimport { CardsPerRow } from './ontario-collection-card-types';\nimport { ConsoleMessageClass } from '../../utils/console-message/console-message';\n\n@Component({\n\ttag: 'ontario-card-collection',\n\tstyleUrl: 'ontario-card-collection.scss',\n\tshadow: true,\n})\nexport class OntarioCardCollection {\n\t@Element() host: HTMLElement;\n\n\t/**\n\t * The number of cards to display per row.\n\t *\n\t * If no number is passed, it will default to 3.\n\t */\n\t@Prop() cardsPerRow: CardsPerRow = 3;\n\n\t/**\n\t * Mutable variable, for internal use only.\n\t *\n\t * Set number of cards per row depending on validation result.\n\t */\n\t@State() private cardsPerRowState: number;\n\n\t/**\n\t * Watch for changes to the `cardsPerRow` property for validation purposes.\n\t *\n\t * If the user input is not a number or is a negative number then `cardsPerRow` will be set to its default (3).\n\t */\n\t@Watch('cardsPerRow')\n\tvalidateCardsPerRow() {\n\t\tif (isNaN(this.cardsPerRow) || (!isNaN(this.cardsPerRow) && this.cardsPerRow <= 0)) {\n\t\t\tconst message = new ConsoleMessageClass();\n\t\t\tmessage\n\t\t\t\t.addDesignSystemTag()\n\t\t\t\t.addMonospaceText(' cards-per-row ')\n\t\t\t\t.addRegularText('on')\n\t\t\t\t.addMonospaceText(' <ontario-card-collection> ')\n\t\t\t\t.addRegularText(\n\t\t\t\t\t`${\n\t\t\t\t\t\tisNaN(this.cardsPerRow) ? 'was set to a non-numeric value' : 'was set to a negative number'\n\t\t\t\t\t}; only a positive number is allowed. The default number of cards per row: `,\n\t\t\t\t)\n\t\t\t\t.addMonospaceText(' 3 ')\n\t\t\t\t.addRegularText('was assumed.')\n\t\t\t\t.printMessage();\n\t\t\tthis.cardsPerRowState = 3;\n\t\t} else {\n\t\t\tthis.cardsPerRowState = this.cardsPerRow;\n\t\t}\n\t}\n\n\t/**\n\t * @returns the classes of the ontario cards based off the `cardType` and number of cards per row.\n\t */\n\tprivate getClass(): string {\n\t\treturn `\n ontario-card-collection__container\n ontario-card-collecton--cards-per-row-${this.cardsPerRowState}\n `.trim();\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateCardsPerRow();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ul class={this.getClass()}>\n\t\t\t\t<slot></slot>\n\t\t\t</ul>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from '../dist/types/components';
|
|
2
|
+
|
|
3
|
+
interface OntarioCard extends Components.OntarioCard, HTMLElement {}
|
|
4
|
+
export const OntarioCard: {
|
|
5
|
+
prototype: OntarioCard;
|
|
6
|
+
new (): OntarioCard;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|