@daffodil/design 0.77.0 → 0.79.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/accordion/README.md +40 -2
- package/accordion/accordion/accordion/accordion.component.d.ts +1 -1
- package/accordion/accordion/accordion-item/accordion-item.component.d.ts +19 -8
- package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +1 -1
- package/accordion/accordion.d.ts +4 -0
- package/accordion/accordion.module.d.ts +6 -7
- package/accordion/examples/basic-accordion/basic-accordion.component.d.ts +1 -1
- package/accordion/examples/public_api.d.ts +0 -1
- package/accordion/public_api.d.ts +1 -0
- package/article/README.md +42 -1
- package/article/article/article.component.d.ts +1 -1
- package/article/article-meta/article-meta.directive.d.ts +1 -1
- package/article/article.d.ts +3 -0
- package/article/article.module.d.ts +5 -4
- package/article/public_api.d.ts +2 -1
- package/atoms/form/form-field/form-field/form-field.component.d.ts +1 -1
- package/button/README.md +42 -1
- package/button/button/basic/button.component.d.ts +28 -0
- package/button/button/button-base.directive.d.ts +51 -0
- package/button/button/flat/flat.component.d.ts +28 -0
- package/button/button/icon/icon.component.d.ts +24 -0
- package/button/button/raised/raised.component.d.ts +28 -0
- package/button/button/stroked/stroked.component.d.ts +28 -0
- package/button/button/underline/underline.component.d.ts +28 -0
- package/button/button.d.ts +8 -0
- package/button/button.module.d.ts +10 -5
- package/button/public_api.d.ts +7 -1
- package/button/src/button/basic/button-theme.scss +145 -0
- package/button/src/button/button-base.scss +79 -0
- package/button/src/button/flat/flat-theme.scss +143 -0
- package/button/src/button/icon/icon-theme.scss +141 -0
- package/button/src/button/raised/raised-theme.scss +120 -0
- package/button/src/button/stroked/stroked-theme.scss +158 -0
- package/button/src/button/underline/underline-theme.scss +93 -0
- package/callout/README.md +42 -0
- package/callout/callout/callout.component.d.ts +1 -1
- package/callout/callout-body/callout-body.directive.d.ts +1 -1
- package/callout/callout-icon/callout-icon.directive.d.ts +1 -1
- package/callout/callout-subtitle/callout-subtitle.directive.d.ts +1 -1
- package/callout/callout-tagline/callout-tagline.directive.d.ts +1 -1
- package/callout/callout-title/callout-title.directive.d.ts +1 -1
- package/callout/callout.d.ts +7 -0
- package/callout/callout.module.d.ts +9 -8
- package/callout/public_api.d.ts +1 -0
- package/card/README.md +41 -0
- package/card/card/card.component.d.ts +1 -1
- package/card/card-actions/card-actions.directive.d.ts +1 -1
- package/card/card-content/card-content.directive.d.ts +1 -1
- package/card/card-icon/card-icon.directive.d.ts +1 -1
- package/card/card-image/card-image.directive.d.ts +1 -1
- package/card/card-tagline/card-tagline.directive.d.ts +1 -1
- package/card/card-title/card-title.directive.d.ts +1 -1
- package/card/card.d.ts +8 -0
- package/card/card.module.d.ts +12 -9
- package/card/public_api.d.ts +1 -0
- package/container/README.md +42 -1
- package/container/container/container.component.d.ts +1 -1
- package/container/container.d.ts +2 -0
- package/container/container.module.d.ts +6 -3
- package/container/public_api.d.ts +1 -0
- package/core/openable/openable.d.ts +13 -0
- package/core/openable/openable.directive.d.ts +81 -0
- package/core/openable/public_api.d.ts +2 -0
- package/core/openable/utils/state-error.d.ts +1 -0
- package/core/public_api.d.ts +1 -0
- package/core/statusable/statusable.d.ts +5 -3
- package/core/statusable/statusable.directive.d.ts +6 -4
- package/esm2022/accordion/accordion/accordion/accordion.component.mjs +3 -3
- package/esm2022/accordion/accordion/accordion-item/accordion-item.component.mjs +38 -22
- package/esm2022/accordion/accordion/accordion-item-title/accordion-item-title.directive.mjs +3 -2
- package/esm2022/accordion/accordion/animation/accordion-animation.mjs +1 -4
- package/esm2022/accordion/accordion.mjs +9 -0
- package/esm2022/accordion/accordion.module.mjs +6 -14
- package/esm2022/accordion/examples/basic-accordion/basic-accordion.component.mjs +6 -3
- package/esm2022/accordion/examples/public_api.mjs +1 -2
- package/esm2022/accordion/public_api.mjs +2 -1
- package/esm2022/article/article/article.component.mjs +3 -3
- package/esm2022/article/article-meta/article-meta.directive.mjs +3 -2
- package/esm2022/article/article.mjs +7 -0
- package/esm2022/article/article.module.mjs +5 -5
- package/esm2022/article/examples/article-blockquote/article-blockquote.component.mjs +6 -4
- package/esm2022/article/examples/article-code-block/article-code-block.component.mjs +6 -4
- package/esm2022/article/examples/article-code-inline/article-code-inline.component.mjs +6 -4
- package/esm2022/article/examples/article-headings/article-headings.component.mjs +7 -3
- package/esm2022/article/examples/article-hr/article-hr.component.mjs +6 -4
- package/esm2022/article/examples/article-link/article-link.component.mjs +6 -4
- package/esm2022/article/examples/article-meta/article-meta.component.mjs +6 -4
- package/esm2022/article/examples/article-ol/article-ol.component.mjs +6 -4
- package/esm2022/article/examples/article-table/article-table.component.mjs +6 -4
- package/esm2022/article/examples/article-ul/article-ul.component.mjs +6 -4
- package/esm2022/article/public_api.mjs +3 -2
- package/esm2022/atoms/form/form-field/form-field/form-field.component.mjs +2 -2
- package/esm2022/button/button/basic/button.component.mjs +48 -0
- package/esm2022/button/button/button-base.directive.mjs +105 -0
- package/esm2022/button/button/flat/flat.component.mjs +48 -0
- package/esm2022/button/button/icon/icon.component.mjs +44 -0
- package/esm2022/button/button/raised/raised.component.mjs +48 -0
- package/esm2022/button/button/stroked/stroked.component.mjs +48 -0
- package/esm2022/button/button/underline/underline.component.mjs +48 -0
- package/esm2022/button/button.mjs +17 -0
- package/esm2022/button/button.module.mjs +36 -12
- package/esm2022/button/examples/basic-button/basic-button.component.mjs +4 -8
- package/esm2022/button/examples/flat-button/flat-button.component.mjs +4 -8
- package/esm2022/button/examples/icon-button/icon-button.component.mjs +7 -5
- package/esm2022/button/examples/raised-button/raised-button.component.mjs +4 -8
- package/esm2022/button/examples/sizeable-button/sizeable-button.component.mjs +8 -4
- package/esm2022/button/examples/statusable-button/statusable-button.component.mjs +8 -4
- package/esm2022/button/examples/stroked-button/stroked-button.component.mjs +4 -8
- package/esm2022/button/examples/underline-button/underline-button.component.mjs +4 -8
- package/esm2022/button/public_api.mjs +8 -2
- package/esm2022/callout/callout/callout.component.mjs +4 -4
- package/esm2022/callout/callout-body/callout-body.directive.mjs +3 -2
- package/esm2022/callout/callout-icon/callout-icon.directive.mjs +3 -2
- package/esm2022/callout/callout-subtitle/callout-subtitle.directive.mjs +3 -2
- package/esm2022/callout/callout-tagline/callout-tagline.directive.mjs +3 -2
- package/esm2022/callout/callout-title/callout-title.directive.mjs +3 -2
- package/esm2022/callout/callout.mjs +15 -0
- package/esm2022/callout/callout.module.mjs +5 -5
- package/esm2022/callout/examples/callout-text-alignment/callout-text-alignment.component.mjs +9 -10
- package/esm2022/callout/examples/callout-theming/callout-theming.component.mjs +7 -8
- package/esm2022/callout/examples/callout-with-grid/callout-with-grid.component.mjs +9 -9
- package/esm2022/callout/examples/compact-callout/compact-callout.component.mjs +8 -9
- package/esm2022/callout/public_api.mjs +2 -1
- package/esm2022/card/card/card.component.mjs +3 -3
- package/esm2022/card/card-actions/card-actions.directive.mjs +3 -2
- package/esm2022/card/card-content/card-content.directive.mjs +3 -2
- package/esm2022/card/card-icon/card-icon.directive.mjs +3 -2
- package/esm2022/card/card-image/card-image.directive.mjs +3 -2
- package/esm2022/card/card-tagline/card-tagline.directive.mjs +3 -2
- package/esm2022/card/card-title/card-title.directive.mjs +3 -2
- package/esm2022/card/card.mjs +17 -0
- package/esm2022/card/card.module.mjs +7 -5
- package/esm2022/card/examples/basic-card/basic-card.component.mjs +8 -9
- package/esm2022/card/examples/card-orientation/card-orientation.component.mjs +9 -10
- package/esm2022/card/examples/card-theming/card-theming.component.mjs +4 -4
- package/esm2022/card/examples/linkable-card/linkable-card.component.mjs +6 -6
- package/esm2022/card/examples/raised-card/raised-card.component.mjs +6 -6
- package/esm2022/card/examples/stroked-card/stroked-card.component.mjs +6 -6
- package/esm2022/card/public_api.mjs +2 -1
- package/esm2022/checkbox/examples/basic-checkbox/basic-checkbox.component.mjs +4 -5
- package/esm2022/checkbox/examples/checkbox-set/checkbox-set.component.mjs +4 -5
- package/esm2022/container/container/container.component.mjs +3 -3
- package/esm2022/container/container.mjs +5 -0
- package/esm2022/container/container.module.mjs +6 -4
- package/esm2022/container/examples/container-sizes/container-sizes.component.mjs +4 -4
- package/esm2022/container/public_api.mjs +2 -1
- package/esm2022/core/openable/openable.directive.mjs +122 -0
- package/esm2022/core/openable/openable.mjs +2 -0
- package/esm2022/core/openable/public_api.mjs +2 -0
- package/esm2022/core/openable/utils/state-error.mjs +2 -0
- package/esm2022/core/public_api.mjs +2 -1
- package/esm2022/core/statusable/statusable.directive.mjs +7 -5
- package/esm2022/core/statusable/statusable.mjs +3 -2
- package/esm2022/hero/examples/compact-hero/compact-hero.component.mjs +6 -7
- package/esm2022/hero/examples/hero-text-alignment/hero-text-alignment.component.mjs +9 -10
- package/esm2022/hero/examples/hero-theming/hero-theming.component.mjs +7 -8
- package/esm2022/hero/examples/hero-with-grid/hero-with-grid.component.mjs +8 -9
- package/esm2022/hero/hero/hero.component.mjs +4 -7
- package/esm2022/hero/hero-body/hero-body.directive.mjs +3 -2
- package/esm2022/hero/hero-icon/hero-icon.directive.mjs +3 -2
- package/esm2022/hero/hero-subtitle/hero-subtitle.directive.mjs +3 -2
- package/esm2022/hero/hero-tagline/hero-tagline.directive.mjs +3 -2
- package/esm2022/hero/hero-title/hero-title.directive.mjs +3 -2
- package/esm2022/hero/hero.mjs +15 -0
- package/esm2022/hero/hero.module.mjs +7 -5
- package/esm2022/hero/public_api.mjs +2 -1
- package/esm2022/image/examples/basic-image/basic-image.component.mjs +6 -4
- package/esm2022/image/examples/load-image/load-image.component.mjs +7 -4
- package/esm2022/image/examples/skeleton-image/skeleton-image.component.mjs +6 -4
- package/esm2022/image/image/image.component.mjs +3 -3
- package/esm2022/image/image.mjs +5 -0
- package/esm2022/image/image.module.mjs +7 -5
- package/esm2022/image/public_api.mjs +2 -1
- package/esm2022/link-set/link-set/link-set.component.mjs +3 -3
- package/esm2022/link-set/link-set-heading/link-set-heading.directive.mjs +3 -2
- package/esm2022/link-set/link-set-item/link-set-item.component.mjs +3 -2
- package/esm2022/link-set/link-set-subheading/link-set-subheading.directive.mjs +3 -2
- package/esm2022/link-set/link-set.mjs +11 -0
- package/esm2022/link-set/link-set.module.mjs +8 -6
- package/esm2022/link-set/public_api.mjs +2 -1
- package/esm2022/list/examples/basic-list/basic-list.component.mjs +7 -4
- package/esm2022/list/examples/icon-list/icon-list.component.mjs +4 -6
- package/esm2022/list/examples/multiline-list/multiline-list.component.mjs +7 -4
- package/esm2022/list/examples/nav-list/nav-list.component.mjs +4 -6
- package/esm2022/list/list/list.component.mjs +3 -3
- package/esm2022/list/list-item/list-item.component.mjs +8 -5
- package/esm2022/list/list.mjs +9 -0
- package/esm2022/list/list.module.mjs +8 -8
- package/esm2022/list/public_api.mjs +2 -1
- package/esm2022/loading-icon/examples/examples.mjs +1 -3
- package/esm2022/loading-icon/examples/loading-icon-color/loading-icon-color.component.mjs +4 -4
- package/esm2022/loading-icon/loading-icon/loading-icon.component.mjs +5 -20
- package/esm2022/loading-icon/loading-icon.mjs +5 -0
- package/esm2022/loading-icon/loading-icon.module.mjs +6 -4
- package/esm2022/loading-icon/public_api.mjs +2 -1
- package/esm2022/media-gallery/examples/basic-media-gallery/basic-media-gallery.component.mjs +8 -5
- package/esm2022/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.component.mjs +8 -5
- package/esm2022/media-gallery/examples/skeleton-media-gallery/skeleton-media-gallery.component.mjs +8 -5
- package/esm2022/media-gallery/helpers/media-gallery-token.mjs +7 -3
- package/esm2022/media-gallery/media-gallery/media-gallery.component.mjs +9 -5
- package/esm2022/media-gallery/media-gallery.mjs +9 -0
- package/esm2022/media-gallery/media-gallery.module.mjs +11 -9
- package/esm2022/media-gallery/media-renderer/media-renderer.component.mjs +3 -2
- package/esm2022/media-gallery/public_api.mjs +2 -1
- package/esm2022/media-gallery/thumbnail/thumbnail-compat.token.mjs +8 -3
- package/esm2022/media-gallery/thumbnail/thumbnail.directive.mjs +3 -2
- package/esm2022/menu/examples/basic-menu/basic-menu.component.mjs +8 -6
- package/esm2022/menu/examples/basic-menu/menu-content/menu-content.component.mjs +6 -3
- package/esm2022/menu/menu/menu.component.mjs +6 -3
- package/esm2022/menu/menu-activator/menu-activator.component.mjs +3 -2
- package/esm2022/menu/menu-item/menu-item.component.mjs +8 -5
- package/esm2022/menu/menu.module.mjs +8 -7
- package/esm2022/menu/services/menu.service.mjs +8 -7
- package/esm2022/modal/examples/basic-modal/basic-modal.component.mjs +12 -6
- package/esm2022/modal/examples/basic-modal/modal-content.component.mjs +8 -6
- package/esm2022/modal/modal/modal.component.mjs +47 -21
- package/esm2022/modal/modal-actions/modal-actions.component.mjs +3 -2
- package/esm2022/modal/modal-close/modal-close.directive.mjs +3 -2
- package/esm2022/modal/modal-content/modal-content.component.mjs +3 -2
- package/esm2022/modal/modal-header/modal-header.component.mjs +12 -7
- package/esm2022/modal/modal-title/modal-title.directive.mjs +3 -2
- package/esm2022/modal/modal.mjs +13 -0
- package/esm2022/modal/modal.module.mjs +17 -11
- package/esm2022/modal/public_api.mjs +2 -1
- package/esm2022/modal/service/modal.service.mjs +7 -5
- package/esm2022/navbar/examples/basic-navbar/basic-navbar.component.mjs +8 -6
- package/esm2022/navbar/examples/contained-navbar/contained-navbar.component.mjs +8 -9
- package/esm2022/navbar/examples/navbar-theming/navbar-theming.component.mjs +7 -8
- package/esm2022/navbar/examples/raised-navbar/raised-navbar.component.mjs +8 -6
- package/esm2022/navbar/navbar/navbar.component.mjs +3 -6
- package/esm2022/navbar/navbar.mjs +5 -0
- package/esm2022/navbar/navbar.module.mjs +10 -4
- package/esm2022/navbar/public_api.mjs +2 -1
- package/esm2022/notification/examples/default-notification/default-notification.component.mjs +4 -6
- package/esm2022/notification/examples/dismissible-notification/dismissible-notification.component.mjs +4 -4
- package/esm2022/notification/examples/notification-orientations/notification-orientations.component.mjs +4 -6
- package/esm2022/notification/examples/notification-status/notification-status.component.mjs +5 -7
- package/esm2022/notification/examples/notification-with-actions/notification-with-actions.component.mjs +6 -7
- package/esm2022/notification/notification/notification.component.mjs +12 -8
- package/esm2022/notification/notification-actions/notification-actions.directive.mjs +3 -2
- package/esm2022/notification/notification-message/notification-message.directive.mjs +3 -2
- package/esm2022/notification/notification-subtitle/notification-subtitle.directive.mjs +3 -2
- package/esm2022/notification/notification-title/notification-title.directive.mjs +3 -2
- package/esm2022/notification/notification.mjs +15 -0
- package/esm2022/notification/notification.module.mjs +11 -8
- package/esm2022/notification/public_api.mjs +2 -1
- package/esm2022/paginator/examples/basic-paginator/basic-paginator.component.mjs +4 -4
- package/esm2022/paginator/examples/link-paginator/link-paginator.component.mjs +4 -4
- package/esm2022/paginator/paginator/paginator.component.mjs +12 -9
- package/esm2022/paginator/paginator.mjs +5 -0
- package/esm2022/paginator/paginator.module.mjs +9 -6
- package/esm2022/paginator/public_api.mjs +2 -1
- package/esm2022/progress-bar/examples/progress-bar-default/progress-bar-default.component.mjs +6 -4
- package/esm2022/progress-bar/examples/progress-bar-indeterminate/progress-bar-indeterminate.component.mjs +6 -4
- package/esm2022/progress-bar/examples/progress-bar-themes/progress-bar-themes.component.mjs +7 -4
- package/esm2022/progress-bar/progress-bar-label/progress-bar-label.directive.mjs +20 -0
- package/esm2022/progress-bar/progress-bar.component.mjs +5 -3
- package/esm2022/progress-bar/progress-bar.mjs +7 -0
- package/esm2022/progress-bar/progress-bar.module.mjs +11 -4
- package/esm2022/progress-bar/public_api.mjs +3 -1
- package/esm2022/sidebar/examples/basic-sidebar/basic-sidebar.component.mjs +6 -4
- package/esm2022/sidebar/examples/over-and-under-sidebars/over-and-under-sidebars.component.mjs +8 -8
- package/esm2022/sidebar/examples/side-fixed-sidebar/side-fixed-sidebar.component.mjs +5 -5
- package/esm2022/sidebar/examples/sidebar-with-sticky-content/sidebar-with-sticky-content.component.mjs +6 -4
- package/esm2022/sidebar/public_api.mjs +2 -1
- package/esm2022/sidebar/sidebar/sidebar.component.mjs +35 -15
- package/esm2022/sidebar/sidebar-footer/sidebar-footer.component.mjs +3 -3
- package/esm2022/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.mjs +3 -2
- package/esm2022/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.mjs +3 -2
- package/esm2022/sidebar/sidebar-header/sidebar-header.component.mjs +3 -3
- package/esm2022/sidebar/sidebar-viewport/scroll-token/scroll.token.mjs +9 -3
- package/esm2022/sidebar/sidebar-viewport/sidebar-viewport.component.mjs +22 -38
- package/esm2022/sidebar/sidebar-viewport/utils/content-pad.mjs +6 -6
- package/esm2022/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.mjs +3 -3
- package/esm2022/sidebar/sidebar.mjs +17 -0
- package/esm2022/sidebar/sidebar.module.mjs +8 -6
- package/esm2022/tabs/daffodil-design-tabs.mjs +5 -0
- package/esm2022/tabs/examples/basic-tabs/basic-tabs.component.mjs +22 -0
- package/esm2022/tabs/examples/custom-select-tabs/custom-select-tabs.component.mjs +34 -0
- package/esm2022/tabs/examples/daffodil-design-tabs-examples.mjs +5 -0
- package/esm2022/tabs/examples/disabled-tabs/disabled-tabs.component.mjs +22 -0
- package/esm2022/tabs/examples/index.mjs +2 -0
- package/esm2022/tabs/examples/initially-select-tab/initially-select-tab.component.mjs +22 -0
- package/esm2022/tabs/examples/public_api.mjs +11 -0
- package/esm2022/tabs/index.mjs +2 -0
- package/esm2022/tabs/public_api.mjs +6 -0
- package/esm2022/tabs/tabs/tab/tab.component.mjs +86 -0
- package/esm2022/tabs/tabs/tab-activator/tab-activator.component.mjs +83 -0
- package/esm2022/tabs/tabs/tab-label/tab-label.component.mjs +33 -0
- package/esm2022/tabs/tabs/tab-panel/tab-panel.component.mjs +68 -0
- package/esm2022/tabs/tabs/tabs.component.mjs +161 -0
- package/esm2022/tabs/tabs.mjs +13 -0
- package/esm2022/text-snippet/daffodil-design-text-snippet.mjs +5 -0
- package/esm2022/text-snippet/examples/basic-text-snippet/basic-text-snippet.component.mjs +14 -0
- package/esm2022/text-snippet/examples/daffodil-design-text-snippet-examples.mjs +5 -0
- package/esm2022/text-snippet/examples/index.mjs +2 -0
- package/esm2022/text-snippet/examples/public_api.mjs +5 -0
- package/esm2022/text-snippet/index.mjs +2 -0
- package/esm2022/text-snippet/public_api.mjs +2 -0
- package/esm2022/text-snippet/text-snippet.component.mjs +46 -0
- package/esm2022/toast/examples/default-toast/default-toast.component.mjs +6 -5
- package/esm2022/toast/examples/toast-positions/toast-positions.component.mjs +7 -5
- package/esm2022/toast/examples/toast-status/toast-status.component.mjs +11 -8
- package/esm2022/toast/examples/toast-with-custom-duration/toast-with-custom-duration.component.mjs +6 -5
- package/esm2022/toast/options/daff-toast-options.mjs +7 -7
- package/esm2022/toast/public_api.mjs +2 -1
- package/esm2022/toast/service/toast.service.mjs +9 -10
- package/esm2022/toast/toast/toast-provider.mjs +7 -0
- package/esm2022/toast/toast/toast-template.component.mjs +30 -12
- package/esm2022/toast/toast/toast.component.mjs +6 -9
- package/esm2022/toast/toast-actions/toast-actions.directive.mjs +3 -2
- package/esm2022/toast/toast-message/toast-message.directive.mjs +3 -2
- package/esm2022/toast/toast-title/toast-title.directive.mjs +3 -2
- package/esm2022/toast/toast.module.mjs +10 -11
- package/esm2022/tree/examples/basic-tree/basic-tree.component.mjs +7 -4
- package/esm2022/tree/public_api.mjs +2 -2
- package/esm2022/tree/tree/tree.component.mjs +8 -5
- package/esm2022/tree/tree-item/tree-item.directive.mjs +3 -2
- package/esm2022/tree/tree.mjs +7 -0
- package/esm2022/tree/tree.module.mjs +9 -7
- package/fesm2022/daffodil-design-accordion-examples.mjs +7 -26
- package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-accordion.mjs +52 -41
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article-examples.mjs +41 -21
- package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +15 -9
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +27 -24
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +312 -135
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +21 -21
- package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +27 -13
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +23 -24
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +31 -13
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +5 -6
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container-examples.mjs +3 -3
- package/fesm2022/daffodil-design-container-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +12 -6
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +19 -20
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +29 -16
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image-examples.mjs +14 -7
- package/fesm2022/daffodil-design-image-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +13 -7
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +23 -11
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +14 -13
- package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +22 -14
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon-examples.mjs +3 -13
- package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +14 -23
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery-examples.mjs +17 -8
- package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +82 -59
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu-examples.mjs +11 -6
- package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +55 -48
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal-examples.mjs +16 -7
- package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +95 -49
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar-examples.mjs +22 -17
- package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +16 -9
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +14 -18
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +39 -21
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator-examples.mjs +5 -5
- package/fesm2022/daffodil-design-paginator-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +23 -16
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +14 -7
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +38 -8
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +18 -14
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +94 -70
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs-examples.mjs +93 -0
- package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-tabs.mjs +431 -0
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet-examples.mjs +25 -0
- package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet.mjs +53 -0
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -0
- package/fesm2022/daffodil-design-toast-examples.mjs +23 -13
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +152 -132
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree-examples.mjs +6 -3
- package/fesm2022/daffodil-design-tree-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +23 -35
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +132 -8
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/README.md +41 -0
- package/hero/hero/hero.component.d.ts +1 -4
- package/hero/hero-body/hero-body.directive.d.ts +1 -1
- package/hero/hero-icon/hero-icon.directive.d.ts +1 -1
- package/hero/hero-subtitle/hero-subtitle.directive.d.ts +1 -1
- package/hero/hero-tagline/hero-tagline.directive.d.ts +1 -1
- package/hero/hero-title/hero-title.directive.d.ts +1 -1
- package/hero/hero.d.ts +7 -0
- package/hero/hero.module.d.ts +11 -8
- package/hero/public_api.d.ts +1 -0
- package/image/README.md +47 -8
- package/image/image/image.component.d.ts +1 -1
- package/image/image.d.ts +2 -0
- package/image/image.module.d.ts +6 -3
- package/image/public_api.d.ts +1 -0
- package/link-set/README.md +43 -2
- package/link-set/link-set/link-set.component.d.ts +1 -1
- package/link-set/link-set-heading/link-set-heading.directive.d.ts +1 -1
- package/link-set/link-set-item/link-set-item.component.d.ts +1 -1
- package/link-set/link-set-subheading/link-set-subheading.directive.d.ts +1 -1
- package/link-set/link-set.d.ts +5 -0
- package/link-set/link-set.module.d.ts +9 -6
- package/link-set/public_api.d.ts +1 -0
- package/list/README.md +42 -1
- package/list/list/list.component.d.ts +1 -1
- package/list/list-item/list-item.component.d.ts +1 -1
- package/list/list.d.ts +4 -0
- package/list/list.module.d.ts +7 -4
- package/list/public_api.d.ts +1 -0
- package/loading-icon/README.md +39 -3
- package/loading-icon/examples/examples.d.ts +2 -2
- package/loading-icon/loading-icon/loading-icon.component.d.ts +1 -9
- package/loading-icon/loading-icon.d.ts +2 -0
- package/loading-icon/loading-icon.module.d.ts +6 -3
- package/loading-icon/public_api.d.ts +1 -0
- package/media-gallery/README.md +45 -1
- package/media-gallery/helpers/media-gallery-token.d.ts +1 -2
- package/media-gallery/media-gallery/media-gallery.component.d.ts +1 -1
- package/media-gallery/media-gallery.d.ts +4 -0
- package/media-gallery/media-gallery.module.d.ts +8 -5
- package/media-gallery/media-renderer/media-renderer.component.d.ts +1 -1
- package/media-gallery/public_api.d.ts +1 -0
- package/media-gallery/thumbnail/thumbnail-compat.token.d.ts +1 -5
- package/media-gallery/thumbnail/thumbnail.directive.d.ts +1 -1
- package/menu/README.md +23 -0
- package/menu/menu/menu.component.d.ts +1 -1
- package/menu/menu-activator/menu-activator.component.d.ts +1 -1
- package/menu/menu-item/menu-item.component.d.ts +1 -1
- package/menu/menu.module.d.ts +6 -6
- package/menu/services/menu.service.d.ts +3 -2
- package/modal/README.md +41 -0
- package/modal/modal/modal.component.d.ts +20 -8
- package/modal/modal-actions/modal-actions.component.d.ts +1 -1
- package/modal/modal-close/modal-close.directive.d.ts +1 -1
- package/modal/modal-content/modal-content.component.d.ts +1 -1
- package/modal/modal-header/modal-header.component.d.ts +1 -1
- package/modal/modal-title/modal-title.directive.d.ts +1 -1
- package/modal/modal.d.ts +6 -0
- package/modal/modal.module.d.ts +15 -12
- package/modal/public_api.d.ts +1 -0
- package/navbar/README.md +41 -0
- package/navbar/navbar/navbar.component.d.ts +1 -4
- package/navbar/navbar.d.ts +2 -0
- package/navbar/navbar.module.d.ts +6 -2
- package/navbar/public_api.d.ts +1 -0
- package/notification/README.md +43 -2
- package/notification/notification/notification.component.d.ts +2 -2
- package/notification/notification-actions/notification-actions.directive.d.ts +1 -1
- package/notification/notification-message/notification-message.directive.d.ts +1 -1
- package/notification/notification-subtitle/notification-subtitle.directive.d.ts +1 -1
- package/notification/notification-title/notification-title.directive.d.ts +1 -1
- package/notification/notification.d.ts +7 -0
- package/notification/notification.module.d.ts +12 -9
- package/notification/public_api.d.ts +1 -0
- package/notification/src/notification-theme.scss +17 -13
- package/package.json +1 -1
- package/paginator/README.md +45 -4
- package/paginator/paginator/paginator.component.d.ts +1 -4
- package/paginator/paginator.d.ts +2 -0
- package/paginator/paginator.module.d.ts +8 -5
- package/paginator/public_api.d.ts +1 -0
- package/progress-bar/README.md +41 -0
- package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +6 -0
- package/progress-bar/progress-bar.component.d.ts +1 -1
- package/progress-bar/progress-bar.d.ts +3 -0
- package/progress-bar/progress-bar.module.d.ts +7 -3
- package/progress-bar/public_api.d.ts +2 -0
- package/scss/theme.scss +13 -1
- package/scss/theming/_configure-theme.scss +60 -2
- package/scss/theming/_theme-css-variables.scss +1 -1
- package/sidebar/README.md +78 -20
- package/sidebar/public_api.d.ts +1 -0
- package/sidebar/sidebar/sidebar.component.d.ts +19 -8
- package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +1 -1
- package/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.d.ts +1 -1
- package/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.d.ts +1 -1
- package/sidebar/sidebar-header/sidebar-header.component.d.ts +1 -1
- package/sidebar/sidebar-viewport/scroll-token/scroll.token.d.ts +1 -7
- package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +5 -17
- package/sidebar/sidebar-viewport/utils/content-pad.d.ts +2 -2
- package/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.d.ts +1 -1
- package/sidebar/sidebar.d.ts +8 -0
- package/sidebar/sidebar.module.d.ts +13 -10
- package/tabs/README.md +19 -0
- package/tabs/examples/basic-tabs/basic-tabs.component.d.ts +6 -0
- package/tabs/examples/custom-select-tabs/custom-select-tabs.component.d.ts +11 -0
- package/tabs/examples/disabled-tabs/disabled-tabs.component.d.ts +6 -0
- package/tabs/examples/index.d.ts +1 -0
- package/tabs/examples/initially-select-tab/initially-select-tab.component.d.ts +6 -0
- package/tabs/examples/public_api.d.ts +2 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/public_api.d.ts +5 -0
- package/tabs/src/tabs-theme.scss +22 -0
- package/tabs/tabs/tab/tab.component.d.ts +57 -0
- package/tabs/tabs/tab-activator/tab-activator.component.d.ts +37 -0
- package/tabs/tabs/tab-label/tab-label.component.d.ts +19 -0
- package/tabs/tabs/tab-panel/tab-panel.component.d.ts +38 -0
- package/tabs/tabs/tabs.component.d.ts +104 -0
- package/tabs/tabs.d.ts +6 -0
- package/text-snippet/README.md +2 -0
- package/text-snippet/examples/basic-text-snippet/basic-text-snippet.component.d.ts +5 -0
- package/text-snippet/examples/index.d.ts +1 -0
- package/text-snippet/examples/public_api.d.ts +2 -0
- package/text-snippet/index.d.ts +1 -0
- package/text-snippet/public_api.d.ts +1 -0
- package/text-snippet/text-snippet.component.d.ts +19 -0
- package/toast/README.md +109 -34
- package/toast/options/daff-toast-options.d.ts +1 -3
- package/toast/public_api.d.ts +1 -0
- package/toast/service/toast.service.d.ts +4 -3
- package/toast/src/toast-theme.scss +14 -10
- package/toast/toast/toast-provider.d.ts +2 -0
- package/toast/toast/toast-template.component.d.ts +1 -1
- package/toast/toast/toast.component.d.ts +1 -3
- package/toast/toast-actions/toast-actions.directive.d.ts +1 -1
- package/toast/toast-message/toast-message.directive.d.ts +1 -1
- package/toast/toast-title/toast-title.directive.d.ts +1 -1
- package/toast/toast.module.d.ts +14 -12
- package/tree/README.md +41 -0
- package/tree/public_api.d.ts +1 -2
- package/tree/tree/tree.component.d.ts +1 -1
- package/tree/tree-item/tree-item.directive.d.ts +1 -1
- package/tree/tree.d.ts +3 -0
- package/tree/tree.module.d.ts +7 -4
- package/accordion/examples/accordion-examples.module.d.ts +0 -9
- package/button/button/button.component.d.ts +0 -80
- package/button/src/button-theme-variants/button.scss +0 -26
- package/button/src/button-theme-variants/flat.scss +0 -25
- package/button/src/button-theme-variants/icon.scss +0 -21
- package/button/src/button-theme-variants/raised.scss +0 -36
- package/button/src/button-theme-variants/stroked.scss +0 -28
- package/button/src/button-theme-variants/underline.scss +0 -9
- package/button/src/button-theme.scss +0 -574
- package/esm2022/accordion/examples/accordion-examples.module.mjs +0 -26
- package/esm2022/button/button/button.component.mjs +0 -207
- package/esm2022/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.mjs +0 -13
- package/esm2022/tree/utils/transform-in-place.mjs +0 -23
- package/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.d.ts +0 -5
- package/tree/utils/transform-in-place.d.ts +0 -15
@@ -0,0 +1,431 @@
|
|
1
|
+
import * as i1 from '@daffodil/design';
|
2
|
+
import { DaffPrefixDirective, DaffSuffixDirective, DaffPrefixSuffixModule, DaffArticleEncapsulatedDirective } from '@daffodil/design';
|
3
|
+
import * as i0 from '@angular/core';
|
4
|
+
import { TemplateRef, Component, ChangeDetectionStrategy, Input, ViewChild, ContentChild, HostBinding, ViewEncapsulation, EventEmitter, Output, ContentChildren, ViewChildren } from '@angular/core';
|
5
|
+
import { NgIf, NgTemplateOutlet } from '@angular/common';
|
6
|
+
|
7
|
+
let tabId = 1;
|
8
|
+
/**
|
9
|
+
* `DaffTabComponet` is an element in the tab list that is used as a content container to group the label of a tab panel and the tab panel together.
|
10
|
+
*
|
11
|
+
* ## Template Structure
|
12
|
+
* A `<daff-tab>` should include the {@link DaffTabLabelComponent} and {@link DaffTabPanelComponent} components in order to properly structure the UI.
|
13
|
+
*
|
14
|
+
* ## Usage
|
15
|
+
* ```html
|
16
|
+
* <daff-tab>
|
17
|
+
* <daff-tab-label>
|
18
|
+
* <fa-icon [icon]="faInfoCircle" daffPrefix></fa-icon>
|
19
|
+
* Tab 1
|
20
|
+
* </daff-tab-label>
|
21
|
+
* <daff-tab-panel>
|
22
|
+
* Tab 1 Panel
|
23
|
+
* </daff-tab-panel>
|
24
|
+
* </daff-tab>
|
25
|
+
* ```
|
26
|
+
*/
|
27
|
+
class DaffTabComponent {
|
28
|
+
constructor() {
|
29
|
+
/**
|
30
|
+
* Whether the tab is disabled.
|
31
|
+
*
|
32
|
+
* ```html
|
33
|
+
* <daff-tab [disabled]="true">
|
34
|
+
* </daff-tab>
|
35
|
+
* ```
|
36
|
+
*/
|
37
|
+
this.disabled = false;
|
38
|
+
/**
|
39
|
+
* A unique id for the tab component.
|
40
|
+
*
|
41
|
+
* The `id` is automatically generated by linking the prefix 'daff-tab-' with an incrementing `tabId`. This value can be customized by passing a different `id` value via the component's `id` input.
|
42
|
+
*
|
43
|
+
* ```html
|
44
|
+
* <daff-tab [id]="'custom-id'"></daff-tab>
|
45
|
+
* ```
|
46
|
+
*/
|
47
|
+
this.id = 'daff-tab-' + tabId;
|
48
|
+
/**
|
49
|
+
* @docs-private
|
50
|
+
*/
|
51
|
+
this.panelId = 'daff-tab-panel-' + tabId;
|
52
|
+
tabId++;
|
53
|
+
}
|
54
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
55
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: DaffTabComponent, isStandalone: true, selector: "daff-tab", inputs: { disabled: "disabled", id: "id" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["content"], descendants: true, read: TemplateRef, static: true }, { propertyName: "labelRef", first: true, predicate: ["label"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
|
56
|
+
<ng-template #label>
|
57
|
+
<ng-content select="daff-tab-label"></ng-content>
|
58
|
+
</ng-template>
|
59
|
+
<ng-template #content>
|
60
|
+
<ng-content select="daff-tab-panel"></ng-content>
|
61
|
+
</ng-template>
|
62
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
63
|
+
}
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabComponent, decorators: [{
|
65
|
+
type: Component,
|
66
|
+
args: [{
|
67
|
+
standalone: true,
|
68
|
+
selector: 'daff-tab',
|
69
|
+
template: `
|
70
|
+
<ng-template #label>
|
71
|
+
<ng-content select="daff-tab-label"></ng-content>
|
72
|
+
</ng-template>
|
73
|
+
<ng-template #content>
|
74
|
+
<ng-content select="daff-tab-panel"></ng-content>
|
75
|
+
</ng-template>
|
76
|
+
`,
|
77
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
78
|
+
}]
|
79
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{
|
80
|
+
type: Input
|
81
|
+
}], contentRef: [{
|
82
|
+
type: ViewChild,
|
83
|
+
args: ['content', { read: TemplateRef, static: true }]
|
84
|
+
}], labelRef: [{
|
85
|
+
type: ViewChild,
|
86
|
+
args: ['label', { read: TemplateRef, static: true }]
|
87
|
+
}], id: [{
|
88
|
+
type: Input
|
89
|
+
}] } });
|
90
|
+
|
91
|
+
/**
|
92
|
+
* DaffTabLabelComponent is used to display the label of a tab panel. Labels may optionally contain a `daffPrefix` or `daffSuffix` to add icons or badges.
|
93
|
+
*
|
94
|
+
* ```html
|
95
|
+
* <daff-tab-label>
|
96
|
+
* <div daffPrefix></div>
|
97
|
+
* Label
|
98
|
+
* <div daffSuffix></div
|
99
|
+
* </daff-tab-Label>
|
100
|
+
* ```
|
101
|
+
*/
|
102
|
+
class DaffTabLabelComponent {
|
103
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
104
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: DaffTabLabelComponent, isStandalone: true, selector: "daff-tab-label", queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>", styles: [":host{display:flex;gap:8px}.daff-tab-label__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DaffPrefixSuffixModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
105
|
+
}
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabLabelComponent, decorators: [{
|
107
|
+
type: Component,
|
108
|
+
args: [{ standalone: true, selector: 'daff-tab-label', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
109
|
+
NgIf,
|
110
|
+
DaffPrefixSuffixModule,
|
111
|
+
], template: "<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>", styles: [":host{display:flex;gap:8px}.daff-tab-label__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}\n"] }]
|
112
|
+
}], propDecorators: { _prefix: [{
|
113
|
+
type: ContentChild,
|
114
|
+
args: [DaffPrefixDirective]
|
115
|
+
}], _suffix: [{
|
116
|
+
type: ContentChild,
|
117
|
+
args: [DaffSuffixDirective]
|
118
|
+
}] } });
|
119
|
+
|
120
|
+
/**
|
121
|
+
* DaffTabPanelComponent is used to display the content panel of a tab.
|
122
|
+
*
|
123
|
+
* ```html
|
124
|
+
* <daff-tab-panel>
|
125
|
+
* <!-- Tab panel content goes here -->
|
126
|
+
* </daff-tab-panel>
|
127
|
+
* ```
|
128
|
+
*/
|
129
|
+
class DaffTabPanelComponent {
|
130
|
+
/**
|
131
|
+
* Dynamically binds the tab panel's id to a unique value generated from the associated tab's panelId.
|
132
|
+
*/
|
133
|
+
get tabPanelId() {
|
134
|
+
return this._id;
|
135
|
+
}
|
136
|
+
constructor(tab) {
|
137
|
+
this.tab = tab;
|
138
|
+
/**
|
139
|
+
* @docs-private
|
140
|
+
*/
|
141
|
+
this.class = true;
|
142
|
+
/**
|
143
|
+
* Sets the `role` to tabpanel.
|
144
|
+
*/
|
145
|
+
this.role = 'tabpanel';
|
146
|
+
/**
|
147
|
+
* `aria-labelledby` for the tab.
|
148
|
+
*/
|
149
|
+
this.ariaLabelledBy = '';
|
150
|
+
/**
|
151
|
+
* Sets the `tabindex` to 0.
|
152
|
+
*/
|
153
|
+
this.tabIndex = '0';
|
154
|
+
this._id = '';
|
155
|
+
/**
|
156
|
+
* Sets the value of `ariaLabelledBy` to the id of the tab component.
|
157
|
+
*/
|
158
|
+
this.ariaLabelledBy = this.tab.id;
|
159
|
+
this._id = this.tab.panelId;
|
160
|
+
}
|
161
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabPanelComponent, deps: [{ token: DaffTabComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
162
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: DaffTabPanelComponent, isStandalone: true, selector: "daff-tab-panel", host: { properties: { "class.daff-tab-panel": "this.class", "attr.role": "this.role", "attr.aria-labelledby": "this.ariaLabelledBy", "attr.tabindex": "this.tabIndex", "attr.id": "this.tabPanelId" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host(.daff-tab-panel){display:block;padding:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
163
|
+
}
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabPanelComponent, decorators: [{
|
165
|
+
type: Component,
|
166
|
+
args: [{ standalone: true, selector: 'daff-tab-panel', template: `<ng-content></ng-content>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host(.daff-tab-panel){display:block;padding:1rem}\n"] }]
|
167
|
+
}], ctorParameters: () => [{ type: DaffTabComponent }], propDecorators: { class: [{
|
168
|
+
type: HostBinding,
|
169
|
+
args: ['class.daff-tab-panel']
|
170
|
+
}], role: [{
|
171
|
+
type: HostBinding,
|
172
|
+
args: ['attr.role']
|
173
|
+
}], ariaLabelledBy: [{
|
174
|
+
type: HostBinding,
|
175
|
+
args: ['attr.aria-labelledby']
|
176
|
+
}], tabIndex: [{
|
177
|
+
type: HostBinding,
|
178
|
+
args: ['attr.tabindex']
|
179
|
+
}], tabPanelId: [{
|
180
|
+
type: HostBinding,
|
181
|
+
args: ['attr.id']
|
182
|
+
}] } });
|
183
|
+
|
184
|
+
class DaffTabActivatorComponent {
|
185
|
+
/**
|
186
|
+
* Sets `aria-selected` to true if the component is selected and false if it's not selected.
|
187
|
+
*/
|
188
|
+
get ariaSelected() {
|
189
|
+
return this.selected ? true : false;
|
190
|
+
}
|
191
|
+
/**
|
192
|
+
* Sets `tabindex` to `0` if the component is selected and `-1` if it's not selected.
|
193
|
+
*/
|
194
|
+
get tabIndex() {
|
195
|
+
return this.selected ? '0' : '-1';
|
196
|
+
}
|
197
|
+
ngOnInit() {
|
198
|
+
/**
|
199
|
+
* Sets the value of `panelId` to the `ariaControls` property
|
200
|
+
*/
|
201
|
+
this.ariaControls = this.panelId;
|
202
|
+
}
|
203
|
+
constructor(el) {
|
204
|
+
this.el = el;
|
205
|
+
/**
|
206
|
+
* @docs-private
|
207
|
+
*/
|
208
|
+
this.class = true;
|
209
|
+
/**
|
210
|
+
* Sets the `role` to tab.
|
211
|
+
*/
|
212
|
+
this.role = 'tab';
|
213
|
+
/** Whether or not a tab is selected */
|
214
|
+
this.selected = false;
|
215
|
+
this.ariaControls = '';
|
216
|
+
/**
|
217
|
+
* The html id of the tab activator component
|
218
|
+
*/
|
219
|
+
this.tabActivatorId = '';
|
220
|
+
this.panelId = '';
|
221
|
+
}
|
222
|
+
/**
|
223
|
+
* Sets focus to the native element of the component
|
224
|
+
*/
|
225
|
+
focus() {
|
226
|
+
this.el.nativeElement.focus();
|
227
|
+
}
|
228
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabActivatorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
229
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: DaffTabActivatorComponent, isStandalone: true, selector: "button[daff-tab-activator],a[daff-tab-activator]", inputs: { selected: "selected", tabActivatorId: "tabActivatorId", panelId: "panelId" }, host: { properties: { "class.daff-tab-activator": "this.class", "attr.role": "this.role", "class.selected": "this.selected", "attr.aria-selected": "this.ariaSelected", "attr.tabindex": "this.tabIndex", "attr.aria-controls": "this.ariaControls", "attr.id": "this.tabActivatorId" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".daff-tab-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;appearance:none;background:none;border:none;color:currentColor;font-size:1rem;font-weight:400;height:2.5rem;margin:0;padding:.5rem 1.5rem}.daff-tab-activator[disabled]{cursor:not-allowed;opacity:.6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
230
|
+
}
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabActivatorComponent, decorators: [{
|
232
|
+
type: Component,
|
233
|
+
args: [{ standalone: true, selector: '' +
|
234
|
+
'button[daff-tab-activator]' + ',' +
|
235
|
+
'a[daff-tab-activator]', template: `<ng-content></ng-content>`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".daff-tab-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;appearance:none;background:none;border:none;color:currentColor;font-size:1rem;font-weight:400;height:2.5rem;margin:0;padding:.5rem 1.5rem}.daff-tab-activator[disabled]{cursor:not-allowed;opacity:.6}\n"] }]
|
236
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { class: [{
|
237
|
+
type: HostBinding,
|
238
|
+
args: ['class.daff-tab-activator']
|
239
|
+
}], role: [{
|
240
|
+
type: HostBinding,
|
241
|
+
args: ['attr.role']
|
242
|
+
}], selected: [{
|
243
|
+
type: Input
|
244
|
+
}, {
|
245
|
+
type: HostBinding,
|
246
|
+
args: ['class.selected']
|
247
|
+
}], ariaSelected: [{
|
248
|
+
type: HostBinding,
|
249
|
+
args: ['attr.aria-selected']
|
250
|
+
}], tabIndex: [{
|
251
|
+
type: HostBinding,
|
252
|
+
args: ['attr.tabindex']
|
253
|
+
}], ariaControls: [{
|
254
|
+
type: HostBinding,
|
255
|
+
args: ['attr.aria-controls']
|
256
|
+
}], tabActivatorId: [{
|
257
|
+
type: Input
|
258
|
+
}, {
|
259
|
+
type: HostBinding,
|
260
|
+
args: ['attr.id']
|
261
|
+
}], panelId: [{
|
262
|
+
type: Input
|
263
|
+
}] } });
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Tabs provide a way to navigate between panels that display related content.
|
267
|
+
*
|
268
|
+
* ## Usage
|
269
|
+
* ```html
|
270
|
+
* <daff-tabs aria-label="List of tabs">
|
271
|
+
* <daff-tab>
|
272
|
+
* <daff-tab-label>
|
273
|
+
* <fa-icon [icon]="faInfoCircle" daffPrefix></fa-icon>
|
274
|
+
* Tab 1
|
275
|
+
* </daff-tab-label>
|
276
|
+
* <daff-tab-panel>
|
277
|
+
* Tab 1 Panel
|
278
|
+
* </daff-tab-panel>
|
279
|
+
* </daff-tab>
|
280
|
+
* <daff-tab>
|
281
|
+
* <daff-tab-label>
|
282
|
+
* Tab 2
|
283
|
+
* <fa-icon [icon]="faInfoCircle" daffSuffix></fa-icon>
|
284
|
+
* </daff-tab-label>
|
285
|
+
* <daff-tab-panel>
|
286
|
+
* Tab 2 Panel
|
287
|
+
* </daff-tab-panel>
|
288
|
+
* </daff-tab>
|
289
|
+
* </daff-tabs>
|
290
|
+
* ```
|
291
|
+
*/
|
292
|
+
class DaffTabsComponent {
|
293
|
+
constructor(cdRef) {
|
294
|
+
this.cdRef = cdRef;
|
295
|
+
/**
|
296
|
+
* @docs-private
|
297
|
+
*/
|
298
|
+
this.class = true;
|
299
|
+
/**
|
300
|
+
* The tab that is initially selected on initial load. If it's not used, the first tab in the tablist will be selected by default.
|
301
|
+
*/
|
302
|
+
this.initiallySelected = null;
|
303
|
+
/**
|
304
|
+
* @docs-private
|
305
|
+
*/
|
306
|
+
this.externalAriaLabel = null;
|
307
|
+
/**
|
308
|
+
* aria-label for the tab.
|
309
|
+
*/
|
310
|
+
this.ariaLabel = '';
|
311
|
+
/**
|
312
|
+
* Event emitted when tab selection changes.
|
313
|
+
*/
|
314
|
+
this.tabChange = new EventEmitter();
|
315
|
+
}
|
316
|
+
/**
|
317
|
+
* @docs-private
|
318
|
+
*/
|
319
|
+
ngAfterContentInit() {
|
320
|
+
if (this.initiallySelected) {
|
321
|
+
this.selectedTab = this.initiallySelected;
|
322
|
+
}
|
323
|
+
if (!this.selectedTab) {
|
324
|
+
this.selectedTab = this._tabs.first.id;
|
325
|
+
}
|
326
|
+
}
|
327
|
+
/**
|
328
|
+
* Selects a tab and sets focus on the selected tab.
|
329
|
+
*/
|
330
|
+
select(tabId) {
|
331
|
+
const tabActivator = this._tabActivators.find(el => el.tabActivatorId === tabId);
|
332
|
+
if (!tabActivator) {
|
333
|
+
console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);
|
334
|
+
return;
|
335
|
+
}
|
336
|
+
this.tabChange.emit(tabId);
|
337
|
+
this.selectedTab = tabId;
|
338
|
+
this.cdRef.markForCheck();
|
339
|
+
tabActivator.focus();
|
340
|
+
}
|
341
|
+
/**
|
342
|
+
* Navigates through the tabs based on the given offset.
|
343
|
+
* Moves forward or backward in the tab array, wrapping around when necessary.
|
344
|
+
*/
|
345
|
+
navigateTabs(offset) {
|
346
|
+
const array = this._tabs.toArray();
|
347
|
+
let selectedIndex = array.findIndex(el => el.id === this.selectedTab);
|
348
|
+
const startingIndex = selectedIndex;
|
349
|
+
let newIndex;
|
350
|
+
do {
|
351
|
+
newIndex = (selectedIndex + offset + array.length) % array.length;
|
352
|
+
selectedIndex = newIndex;
|
353
|
+
} while (array[newIndex].disabled && selectedIndex !== startingIndex); // Skip disabled tabs
|
354
|
+
this.select(array[newIndex].id);
|
355
|
+
}
|
356
|
+
/**
|
357
|
+
* Selects the previous tab and wraps around to the last tab if the first tab is currently selected.
|
358
|
+
*/
|
359
|
+
previous() {
|
360
|
+
this.navigateTabs(-1);
|
361
|
+
}
|
362
|
+
/**
|
363
|
+
* Selects the next tab and wraps around to the first tab if the last tab is currently selected.
|
364
|
+
*/
|
365
|
+
next() {
|
366
|
+
this.navigateTabs(1);
|
367
|
+
}
|
368
|
+
/**
|
369
|
+
* Selects the first tab.
|
370
|
+
*/
|
371
|
+
selectFirst(event) {
|
372
|
+
event.preventDefault();
|
373
|
+
this.select(this._tabs.toArray()[0].id);
|
374
|
+
}
|
375
|
+
/**
|
376
|
+
* Selects the last tab.
|
377
|
+
*/
|
378
|
+
selectLast(event) {
|
379
|
+
event.preventDefault();
|
380
|
+
const array = this._tabs.toArray();
|
381
|
+
this.select(array[array.length - 1].id);
|
382
|
+
}
|
383
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
384
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DaffTabsComponent, isStandalone: true, selector: "daff-tabs", inputs: { initiallySelected: "initiallySelected", ariaLabel: ["aria-label", "ariaLabel"] }, outputs: { tabChange: "tabChange" }, host: { properties: { "class.daff-tabs": "this.class", "attr.aria-label": "this.externalAriaLabel" } }, queries: [{ propertyName: "_labels", predicate: DaffTabLabelComponent, descendants: true }, { propertyName: "_tabs", predicate: DaffTabComponent }], viewQueries: [{ propertyName: "_tabActivators", predicate: DaffTabActivatorComponent, descendants: true }], hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }], ngImport: i0, template: "<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t<button daff-tab-activator\n\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t(click)=\"select(tab.id)\"\n\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t</button>\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}", styles: [":host(.daff-tabs){max-width:100%}.daff-tabs{display:block}.daff-tabs .daff-tabs__tab-list{display:flex;overflow-x:scroll;scrollbar-width:thin}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DaffTabActivatorComponent, selector: "button[daff-tab-activator],a[daff-tab-activator]", inputs: ["selected", "tabActivatorId", "panelId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
385
|
+
}
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTabsComponent, decorators: [{
|
387
|
+
type: Component,
|
388
|
+
args: [{ standalone: true, selector: 'daff-tabs', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
389
|
+
NgTemplateOutlet,
|
390
|
+
DaffTabActivatorComponent,
|
391
|
+
], hostDirectives: [
|
392
|
+
{ directive: DaffArticleEncapsulatedDirective },
|
393
|
+
], template: "<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t<button daff-tab-activator\n\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t(click)=\"select(tab.id)\"\n\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t</button>\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}", styles: [":host(.daff-tabs){max-width:100%}.daff-tabs{display:block}.daff-tabs .daff-tabs__tab-list{display:flex;overflow-x:scroll;scrollbar-width:thin}\n"] }]
|
394
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { class: [{
|
395
|
+
type: HostBinding,
|
396
|
+
args: ['class.daff-tabs']
|
397
|
+
}], initiallySelected: [{
|
398
|
+
type: Input
|
399
|
+
}], externalAriaLabel: [{
|
400
|
+
type: HostBinding,
|
401
|
+
args: ['attr.aria-label']
|
402
|
+
}], ariaLabel: [{
|
403
|
+
type: Input,
|
404
|
+
args: ['aria-label']
|
405
|
+
}], tabChange: [{
|
406
|
+
type: Output
|
407
|
+
}], _labels: [{
|
408
|
+
type: ContentChildren,
|
409
|
+
args: [DaffTabLabelComponent, { descendants: true }]
|
410
|
+
}], _tabs: [{
|
411
|
+
type: ContentChildren,
|
412
|
+
args: [DaffTabComponent]
|
413
|
+
}], _tabActivators: [{
|
414
|
+
type: ViewChildren,
|
415
|
+
args: [DaffTabActivatorComponent]
|
416
|
+
}] } });
|
417
|
+
|
418
|
+
const DAFF_TABS_COMPONENTS = [
|
419
|
+
DaffTabsComponent,
|
420
|
+
DaffTabLabelComponent,
|
421
|
+
DaffTabPanelComponent,
|
422
|
+
DaffPrefixSuffixModule,
|
423
|
+
DaffTabComponent,
|
424
|
+
];
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Generated bundle index. Do not edit.
|
428
|
+
*/
|
429
|
+
|
430
|
+
export { DAFF_TABS_COMPONENTS, DaffTabComponent, DaffTabLabelComponent, DaffTabPanelComponent, DaffTabsComponent };
|
431
|
+
//# sourceMappingURL=daffodil-design-tabs.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-design-tabs.mjs","sources":["../../../libs/design/tabs/src/tabs/tab/tab.component.ts","../../../libs/design/tabs/src/tabs/tab-label/tab-label.component.ts","../../../libs/design/tabs/src/tabs/tab-label/tab-label.component.html","../../../libs/design/tabs/src/tabs/tab-panel/tab-panel.component.ts","../../../libs/design/tabs/src/tabs/tab-activator/tab-activator.component.ts","../../../libs/design/tabs/src/tabs/tabs.component.ts","../../../libs/design/tabs/src/tabs/tabs.component.html","../../../libs/design/tabs/src/tabs.ts","../../../libs/design/tabs/src/daffodil-design-tabs.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n TemplateRef,\n ViewChild,\n Input,\n} from '@angular/core';\n\nlet tabId = 1;\n\n/**\n * `DaffTabComponet` is an element in the tab list that is used as a content container to group the label of a tab panel and the tab panel together.\n *\n * ## Template Structure\n * A `<daff-tab>` should include the {@link DaffTabLabelComponent} and {@link DaffTabPanelComponent} components in order to properly structure the UI.\n *\n * ## Usage\n * ```html\n * <daff-tab>\n * \t<daff-tab-label>\n * \t\t<fa-icon [icon]=\"faInfoCircle\" daffPrefix></fa-icon>\n * \t\tTab 1\n * \t</daff-tab-label>\n * \t<daff-tab-panel>\n * \t\tTab 1 Panel\n * \t</daff-tab-panel>\n * </daff-tab>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'daff-tab',\n template: `\n <ng-template #label>\n <ng-content select=\"daff-tab-label\"></ng-content>\n </ng-template>\n <ng-template #content>\n <ng-content select=\"daff-tab-panel\"></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffTabComponent {\n /**\n * Whether the tab is disabled.\n *\n * ```html\n * <daff-tab [disabled]=\"true\">\n * </daff-tab>\n * ```\n */\n @Input() disabled = false;\n\n /**\n * @docs-private\n */\n @ViewChild('content', { read: TemplateRef, static: true }) contentRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n @ViewChild('label', { read: TemplateRef, static: true }) labelRef: TemplateRef<any>;\n\n /**\n * A unique id for the tab component.\n *\n * The `id` is automatically generated by linking the prefix 'daff-tab-' with an incrementing `tabId`. This value can be customized by passing a different `id` value via the component's `id` input.\n *\n * ```html\n * <daff-tab [id]=\"'custom-id'\"></daff-tab>\n * ```\n */\n @Input() id = 'daff-tab-' + tabId;\n\n /**\n * @docs-private\n */\n panelId = 'daff-tab-panel-' + tabId;\n\n constructor() {\n tabId++;\n }\n}\n","import { NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n DaffPrefixable,\n DaffSuffixable,\n DaffPrefixSuffixModule,\n} from '@daffodil/design';\n\n/**\n * DaffTabLabelComponent is used to display the label of a tab panel. Labels may optionally contain a `daffPrefix` or `daffSuffix` to add icons or badges.\n *\n * ```html\n * <daff-tab-label>\n * <div daffPrefix></div>\n * Label\n * <div daffSuffix></div\n * </daff-tab-Label>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'daff-tab-label',\n templateUrl: './tab-label.component.html',\n styleUrl: './tab-label.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgIf,\n DaffPrefixSuffixModule,\n ],\n})\nexport class DaffTabLabelComponent implements DaffPrefixable, DaffSuffixable {\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n}\n","<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>","import {\n Component,\n HostBinding,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { DaffTabComponent } from '../tab/tab.component';\n\n/**\n * DaffTabPanelComponent is used to display the content panel of a tab.\n *\n * ```html\n * <daff-tab-panel>\n * <!-- Tab panel content goes here -->\n * </daff-tab-panel>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'daff-tab-panel',\n template: `<ng-content></ng-content>`,\n styleUrl: './tab-panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffTabPanelComponent {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-tab-panel') private class = true;\n\n /**\n * Sets the `role` to tabpanel.\n */\n @HostBinding('attr.role') role = 'tabpanel';\n\n /**\n * `aria-labelledby` for the tab.\n */\n @HostBinding('attr.aria-labelledby') ariaLabelledBy = '';\n\n /**\n * Sets the `tabindex` to 0.\n */\n @HostBinding('attr.tabindex') tabIndex = '0';\n\n private _id = '';\n\n /**\n * Dynamically binds the tab panel's id to a unique value generated from the associated tab's panelId.\n */\n @HostBinding('attr.id') get tabPanelId() {\n return this._id;\n }\n\n constructor(private tab: DaffTabComponent) {\n /**\n * Sets the value of `ariaLabelledBy` to the id of the tab component.\n */\n this.ariaLabelledBy = this.tab.id;\n\n this._id = this.tab.panelId;\n }\n}\n","import {\n HostBinding,\n Input,\n OnInit,\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ElementRef,\n} from '@angular/core';\n\n@Component({\n standalone: true,\n selector: '' +\n 'button[daff-tab-activator]' + ',' +\n 'a[daff-tab-activator]',\n template: `<ng-content></ng-content>`,\n styleUrl: './tab-activator.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DaffTabActivatorComponent implements OnInit {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-tab-activator') class = true;\n\n /**\n * Sets the `role` to tab.\n */\n @HostBinding('attr.role') role = 'tab';\n\n /** Whether or not a tab is selected */\n @Input() @HostBinding('class.selected') selected = false;\n\n /**\n * Sets `aria-selected` to true if the component is selected and false if it's not selected.\n */\n @HostBinding('attr.aria-selected') get ariaSelected() {\n return this.selected ? true : false;\n }\n\n /**\n * Sets `tabindex` to `0` if the component is selected and `-1` if it's not selected.\n */\n @HostBinding('attr.tabindex') get tabIndex() {\n return this.selected ? '0' : '-1';\n }\n\n @HostBinding('attr.aria-controls') ariaControls = '';\n\n /**\n * The html id of the tab activator component\n */\n @Input() @HostBinding('attr.id') tabActivatorId = '';\n\n @Input() panelId = '';\n\n ngOnInit() {\n /**\n * Sets the value of `panelId` to the `ariaControls` property\n */\n this.ariaControls = this.panelId;\n }\n\n constructor(\n private el: ElementRef,\n ) {\n }\n\n /**\n * Sets focus to the native element of the component\n */\n focus() {\n this.el.nativeElement.focus();\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Input,\n Output,\n EventEmitter,\n ViewChildren,\n ChangeDetectorRef,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\nimport { DaffTabComponent } from './tab/tab.component';\nimport { DaffTabActivatorComponent } from './tab-activator/tab-activator.component';\nimport { DaffTabLabelComponent } from './tab-label/tab-label.component';\n\n/**\n * Tabs provide a way to navigate between panels that display related content.\n *\n * ## Usage\n * ```html\n * <daff-tabs aria-label=\"List of tabs\">\n * \t<daff-tab>\n * \t\t<daff-tab-label>\n * \t\t\t<fa-icon [icon]=\"faInfoCircle\" daffPrefix></fa-icon>\n * \t\t\tTab 1\n * \t\t</daff-tab-label>\n * \t\t<daff-tab-panel>\n * \t\t\tTab 1 Panel\n * \t\t</daff-tab-panel>\n * \t</daff-tab>\n * \t<daff-tab>\n * \t\t<daff-tab-label>\n * \t\t\tTab 2\n * \t\t\t<fa-icon [icon]=\"faInfoCircle\" daffSuffix></fa-icon>\n * \t\t</daff-tab-label>\n * \t\t<daff-tab-panel>\n * \t\t\tTab 2 Panel\n * \t\t</daff-tab-panel>\n * \t</daff-tab>\n * </daff-tabs>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'daff-tabs',\n templateUrl: './tabs.component.html',\n styleUrl: './tabs.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n DaffTabActivatorComponent,\n ],\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n ],\n})\n\nexport class DaffTabsComponent implements AfterContentInit {\n /**\n * @docs-private\n */\n @HostBinding('class.daff-tabs') private class = true;\n\n /**\n * The currently selected tab. This property is dynamically updated when a user selects a tab\n */\n selectedTab: string;\n\n /**\n * The tab that is initially selected on initial load. If it's not used, the first tab in the tablist will be selected by default.\n */\n @Input() initiallySelected: string = null;\n\n /**\n * @docs-private\n */\n @HostBinding('attr.aria-label') private externalAriaLabel = null;\n\n /**\n * aria-label for the tab.\n */\n @Input('aria-label') ariaLabel = '';\n\n /**\n * Event emitted when tab selection changes.\n */\n @Output() tabChange = new EventEmitter<string>();\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffTabLabelComponent, { descendants: true }) _labels: QueryList<DaffTabLabelComponent>;\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffTabComponent) _tabs: QueryList<DaffTabComponent>;\n\n /**\n * @docs-private\n */\n @ViewChildren(DaffTabActivatorComponent) _tabActivators: QueryList<DaffTabActivatorComponent>;\n\n constructor(private cdRef: ChangeDetectorRef) {}\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n if(this.initiallySelected) {\n this.selectedTab = this.initiallySelected;\n }\n\n if (!this.selectedTab) {\n this.selectedTab = this._tabs.first.id;\n }\n }\n\n /**\n * Selects a tab and sets focus on the selected tab.\n */\n select(tabId: string) {\n const tabActivator = this._tabActivators.find(el => el.tabActivatorId === tabId);\n\n if (!tabActivator) {\n console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);\n return;\n }\n\n this.tabChange.emit(tabId);\n this.selectedTab = tabId;\n this.cdRef.markForCheck();\n\n tabActivator.focus();\n }\n\n /**\n * Navigates through the tabs based on the given offset.\n * Moves forward or backward in the tab array, wrapping around when necessary.\n */\n private navigateTabs(offset: number) {\n const array = this._tabs.toArray();\n let selectedIndex = array.findIndex(el => el.id === this.selectedTab);\n const startingIndex = selectedIndex;\n let newIndex;\n\n do {\n newIndex = (selectedIndex + offset + array.length) % array.length;\n selectedIndex = newIndex;\n } while (array[newIndex].disabled && selectedIndex !== startingIndex); // Skip disabled tabs\n\n this.select(array[newIndex].id);\n }\n\n /**\n * Selects the previous tab and wraps around to the last tab if the first tab is currently selected.\n */\n previous() {\n this.navigateTabs(-1);\n }\n\n /**\n * Selects the next tab and wraps around to the first tab if the last tab is currently selected.\n */\n next() {\n this.navigateTabs(1);\n }\n\n /**\n * Selects the first tab.\n */\n selectFirst(event: KeyboardEvent | null) {\n event.preventDefault();\n this.select(this._tabs.toArray()[0].id);\n }\n\n /**\n * Selects the last tab.\n */\n selectLast(event: KeyboardEvent | null) {\n event.preventDefault();\n const array = this._tabs.toArray();\n this.select(array[array.length - 1].id);\n }\n}\n","<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t<button daff-tab-activator\n\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t(click)=\"select(tab.id)\"\n\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t</button>\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}","import { DaffPrefixSuffixModule } from '@daffodil/design';\n\nimport { DaffTabComponent } from './tabs/tab/tab.component';\nimport { DaffTabLabelComponent } from './tabs/tab-label/tab-label.component';\nimport { DaffTabPanelComponent } from './tabs/tab-panel/tab-panel.component';\nimport { DaffTabsComponent } from './tabs/tabs.component';\n\nexport const DAFF_TABS_COMPONENTS = <const>[\n DaffTabsComponent,\n DaffTabLabelComponent,\n DaffTabPanelComponent,\n DaffPrefixSuffixModule,\n DaffTabComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffTabComponent"],"mappings":";;;;;;AAQA,IAAI,KAAK,GAAG,CAAC,CAAC;AAEd;;;;;;;;;;;;;;;;;;AAkBG;MAcU,gBAAgB,CAAA;AAqC3B,IAAA,WAAA,GAAA;AApCA;;;;;;;AAOG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAY1B;;;;;;;;AAQG;AACM,QAAA,IAAA,CAAA,EAAE,GAAG,WAAW,GAAG,KAAK,CAAC;AAElC;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,iBAAiB,GAAG,KAAK,CAAC;AAGlC,QAAA,KAAK,EAAE,CAAC;KACT;iIAvCU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAcG,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,YA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y } from '@angular/core';
|
3
|
+
import { DaffTextSnippetComponent } from '@daffodil/design/text-snippet';
|
4
|
+
|
5
|
+
class BasicTextSnippetComponent {
|
6
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: BasicTextSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
7
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: BasicTextSnippetComponent, isStandalone: true, selector: "basic-text-snippet", ngImport: i0, template: "<daff-text-snippet>\n\tLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n</daff-text-snippet>", dependencies: [{ kind: "component", type: DaffTextSnippetComponent, selector: "daff-text-snippet", inputs: ["condensed", "html"], outputs: ["toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8
|
+
}
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: BasicTextSnippetComponent, decorators: [{
|
10
|
+
type: Component,
|
11
|
+
args: [{ selector: 'basic-text-snippet', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
12
|
+
DaffTextSnippetComponent,
|
13
|
+
], template: "<daff-text-snippet>\n\tLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n</daff-text-snippet>" }]
|
14
|
+
}] });
|
15
|
+
|
16
|
+
const TEXT_SNIPPET_EXAMPLES = [
|
17
|
+
BasicTextSnippetComponent,
|
18
|
+
];
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Generated bundle index. Do not edit.
|
22
|
+
*/
|
23
|
+
|
24
|
+
export { TEXT_SNIPPET_EXAMPLES };
|
25
|
+
//# sourceMappingURL=daffodil-design-text-snippet-examples.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-design-text-snippet-examples.mjs","sources":["../../../libs/design/text-snippet/examples/src/basic-text-snippet/basic-text-snippet.component.ts","../../../libs/design/text-snippet/examples/src/basic-text-snippet/basic-text-snippet.component.html","../../../libs/design/text-snippet/examples/src/public_api.ts","../../../libs/design/text-snippet/examples/src/daffodil-design-text-snippet-examples.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { DaffTextSnippetComponent } from '@daffodil/design/text-snippet';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'basic-text-snippet',\n templateUrl: './basic-text-snippet.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n DaffTextSnippetComponent,\n ],\n})\nexport class BasicTextSnippetComponent {}\n","<daff-text-snippet>\n\tLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n</daff-text-snippet>","import { BasicTextSnippetComponent } from './basic-text-snippet/basic-text-snippet.component';\n\nexport const TEXT_SNIPPET_EXAMPLES = [\n BasicTextSnippetComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAiBa,yBAAyB,CAAA;iIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjBtC,4eAEoB,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDYhB,wBAAwB,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAVrC,SAAS;AAEE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,mBAEb,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,wBAAwB;AACzB,qBAAA,EAAA,QAAA,EAAA,4eAAA,EAAA,CAAA;;;AEbU,MAAA,qBAAqB,GAAG;IACnC,yBAAyB;;;ACH3B;;AAEG;;;;"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { NgIf } from '@angular/common';
|
2
|
+
import * as i0 from '@angular/core';
|
3
|
+
import { EventEmitter, ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild, Output } from '@angular/core';
|
4
|
+
import * as i2 from '@daffodil/design/button';
|
5
|
+
import { DAFF_BUTTON_COMPONENTS } from '@daffodil/design/button';
|
6
|
+
import * as i1 from '@daffodil/design';
|
7
|
+
|
8
|
+
class DaffTextSnippetComponent {
|
9
|
+
constructor() {
|
10
|
+
/**
|
11
|
+
* A property to track whether or not the component
|
12
|
+
* should render a condensed version of the content.
|
13
|
+
*/
|
14
|
+
this.condensed = true;
|
15
|
+
this.html = '';
|
16
|
+
/**
|
17
|
+
* An output event that can be used to track the state of the component externally.
|
18
|
+
*/
|
19
|
+
this.toggle = new EventEmitter();
|
20
|
+
}
|
21
|
+
toggleSnippet() {
|
22
|
+
this.condensed = !this.condensed;
|
23
|
+
this.toggle.emit(this.condensed);
|
24
|
+
}
|
25
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTextSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
26
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: DaffTextSnippetComponent, isStandalone: true, selector: "daff-text-snippet", inputs: { condensed: "condensed", html: "html" }, outputs: { toggle: "toggle" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentEl"], descendants: true, read: ElementRef }, { propertyName: "htmlRef", first: true, predicate: ["htmlEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"daff-text-snippet__content daff-text-snippet__html\" #htmlEl [class.condensed]=\"condensed\" [innerHtml]=\"html\" *ngIf=\"html\"></div>\n<div class=\"daff-text-snippet__content daff-text-snippet__ngcontent\" #contentEl [class.condensed]=\"condensed\" *ngIf=\"!html\">\n <ng-content></ng-content>\n</div>\n<button daff-underline-button color=\"theme-contrast\" [attr.aria-expanded]=\"!condensed ? true : false\" (click)=\"toggleSnippet()\">\n <ng-container *ngIf=\"condensed\">Show More</ng-container>\n <ng-container *ngIf=\"!condensed\">Show Less</ng-container>\n</button>\n", styles: [":host{display:block;position:relative}:host ::ng-deep .daff-text-snippet__content>*:first-child{margin-top:0}:host ::ng-deep .daff-text-snippet__content>*:last-child{margin-bottom:0}:host ::ng-deep h2:first-of-type{margin-top:0}.daff-text-snippet__content{display:block}.daff-text-snippet__content.condensed{display:-webkit-box;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;width:100%}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: i1.DaffPrefixSuffixModule }, { kind: "component", type: i2.DaffUnderlineButtonComponent, selector: "button[daff-underline-button],a[daff-underline-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
27
|
+
}
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTextSnippetComponent, decorators: [{
|
29
|
+
type: Component,
|
30
|
+
args: [{ selector: 'daff-text-snippet', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
31
|
+
NgIf,
|
32
|
+
DAFF_BUTTON_COMPONENTS,
|
33
|
+
], template: "<div class=\"daff-text-snippet__content daff-text-snippet__html\" #htmlEl [class.condensed]=\"condensed\" [innerHtml]=\"html\" *ngIf=\"html\"></div>\n<div class=\"daff-text-snippet__content daff-text-snippet__ngcontent\" #contentEl [class.condensed]=\"condensed\" *ngIf=\"!html\">\n <ng-content></ng-content>\n</div>\n<button daff-underline-button color=\"theme-contrast\" [attr.aria-expanded]=\"!condensed ? true : false\" (click)=\"toggleSnippet()\">\n <ng-container *ngIf=\"condensed\">Show More</ng-container>\n <ng-container *ngIf=\"!condensed\">Show Less</ng-container>\n</button>\n", styles: [":host{display:block;position:relative}:host ::ng-deep .daff-text-snippet__content>*:first-child{margin-top:0}:host ::ng-deep .daff-text-snippet__content>*:last-child{margin-bottom:0}:host ::ng-deep h2:first-of-type{margin-top:0}.daff-text-snippet__content{display:block}.daff-text-snippet__content.condensed{display:-webkit-box;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;width:100%}\n"] }]
|
34
|
+
}], propDecorators: { condensed: [{
|
35
|
+
type: Input
|
36
|
+
}], html: [{
|
37
|
+
type: Input
|
38
|
+
}], contentRef: [{
|
39
|
+
type: ViewChild,
|
40
|
+
args: ['contentEl', { read: ElementRef }]
|
41
|
+
}], htmlRef: [{
|
42
|
+
type: ViewChild,
|
43
|
+
args: ['htmlEl', { read: ElementRef }]
|
44
|
+
}], toggle: [{
|
45
|
+
type: Output
|
46
|
+
}] } });
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Generated bundle index. Do not edit.
|
50
|
+
*/
|
51
|
+
|
52
|
+
export { DaffTextSnippetComponent };
|
53
|
+
//# sourceMappingURL=daffodil-design-text-snippet.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-design-text-snippet.mjs","sources":["../../../libs/design/text-snippet/src/text-snippet.component.ts","../../../libs/design/text-snippet/src/text-snippet.component.html","../../../libs/design/text-snippet/src/daffodil-design-text-snippet.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport {\n Component,\n Input,\n ChangeDetectionStrategy,\n EventEmitter,\n Output,\n ElementRef,\n ViewChild,\n} from '@angular/core';\n\nimport { DAFF_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n@Component({\n selector: 'daff-text-snippet',\n templateUrl: './text-snippet.component.html',\n styleUrls: ['./text-snippet.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgIf,\n DAFF_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffTextSnippetComponent {\n\n /**\n * A property to track whether or not the component\n * should render a condensed version of the content.\n */\n @Input() condensed = true;\n\n @Input() html = '';\n\n @ViewChild('contentEl', { read: ElementRef }) contentRef: ElementRef;\n @ViewChild('htmlEl', { read: ElementRef }) htmlRef: ElementRef;\n\n /**\n * An output event that can be used to track the state of the component externally.\n */\n @Output() toggle: EventEmitter<boolean> = new EventEmitter();\n\n toggleSnippet() {\n this.condensed = !this.condensed;\n this.toggle.emit(this.condensed);\n }\n}\n","<div class=\"daff-text-snippet__content daff-text-snippet__html\" #htmlEl [class.condensed]=\"condensed\" [innerHtml]=\"html\" *ngIf=\"html\"></div>\n<div class=\"daff-text-snippet__content daff-text-snippet__ngcontent\" #contentEl [class.condensed]=\"condensed\" *ngIf=\"!html\">\n <ng-content></ng-content>\n</div>\n<button daff-underline-button color=\"theme-contrast\" [attr.aria-expanded]=\"!condensed ? true : false\" (click)=\"toggleSnippet()\">\n <ng-container *ngIf=\"condensed\">Show More</ng-container>\n <ng-container *ngIf=\"!condensed\">Show Less</ng-container>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAwBa,wBAAwB,CAAA;AAXrC,IAAA,WAAA,GAAA;AAaE;;;AAGG;QACM,IAAS,CAAA,SAAA,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;AAKnB;;AAEG;AACO,QAAA,IAAA,CAAA,MAAM,GAA0B,IAAI,YAAY,EAAE,CAAC;AAM9D,KAAA;IAJC,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAClC;iIArBU,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,kPAUH,UAAU,EAAA,EAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,QAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EACb,UAAU,ECnCzC,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAA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