├── .editorconfig
├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── PULL_REQUEST_TEMPLATE.md
├── SUPPORT.md
└── workflows
│ ├── check-build.yml
│ ├── codeql.yml
│ ├── dco.yml
│ ├── publish.yml
│ └── test.yml
├── .gitignore
├── .husky
├── commit-msg
└── pre-push
├── .nvmrc
├── .storybook
├── main.js
├── manager-head.html
├── manager.js
├── preview.js
├── preview.scss
├── public
│ └── carbon.jpg
└── tsconfig.json
├── .stylelintrc.yml
├── .travis.yml
├── CODEOWNERS
├── LICENSE.md
├── README.md
├── angular.json
├── commitlint.config.js
├── compodoc.storybook.json
├── gulpfile.js
├── integration
├── ng14
│ ├── .browserslistrc
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── angular.json
│ ├── karma.conf.js
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── app
│ │ │ ├── app-routing.module.ts
│ │ │ ├── app.component.html
│ │ │ ├── app.component.scss
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ └── app.module.ts
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── environments
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ ├── polyfills.ts
│ │ ├── styles.scss
│ │ └── test.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── ng15
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── angular.json
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── app
│ │ │ ├── app-routing.module.ts
│ │ │ ├── app.component.html
│ │ │ ├── app.component.scss
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ └── app.module.ts
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ └── styles.scss
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── ng16
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── angular.json
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── app
│ │ │ ├── app.component.html
│ │ │ ├── app.component.scss
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ ├── app.config.ts
│ │ │ └── app.routes.ts
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ └── styles.scss
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── ng17
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── angular.json
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── app
│ │ │ ├── app.component.html
│ │ │ ├── app.component.scss
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ ├── app.config.ts
│ │ │ └── app.routes.ts
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ └── styles.scss
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
└── ng18
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── angular.json
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ └── favicon.ico
│ ├── src
│ ├── app
│ │ ├── app.component.html
│ │ ├── app.component.scss
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ ├── app.config.ts
│ │ └── app.routes.ts
│ ├── index.html
│ ├── main.ts
│ └── styles.scss
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── karma-test-shim.js
├── karma.conf.js
├── package-lock.json
├── package.json
├── scripts
├── add-package-scripts.js
├── build.sh
├── compliance.js
├── deploy.sh
└── prepush.sh
├── src
├── accordion
│ ├── accordion-item.component.ts
│ ├── accordion.component.spec.ts
│ ├── accordion.component.ts
│ ├── accordion.module.ts
│ ├── accordion.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── breadcrumb
│ ├── breadcrumb-item.component.ts
│ ├── breadcrumb-item.interface.ts
│ ├── breadcrumb.component.spec.ts
│ ├── breadcrumb.component.ts
│ ├── breadcrumb.module.ts
│ ├── breadcrumb.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── button
│ ├── base-icon-button.component.ts
│ ├── button-set.component.ts
│ ├── button-set.stories.ts
│ ├── button.directive.ts
│ ├── button.module.ts
│ ├── button.stories.ts
│ ├── button.types.ts
│ ├── icon-button.component.ts
│ ├── icon-button.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── carbon.yml
├── checkbox
│ ├── checkbox-exported-tests.ts
│ ├── checkbox.component.spec.ts
│ ├── checkbox.component.ts
│ ├── checkbox.module.ts
│ ├── checkbox.stories.ts
│ ├── checkbox.types.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── stories
│ │ ├── index.ts
│ │ └── reactive-form.component.ts
├── code-snippet
│ ├── code-snippet.component.spec.ts
│ ├── code-snippet.component.ts
│ ├── code-snippet.module.ts
│ ├── code-snippet.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── combo-button
│ ├── combo-button.component.ts
│ ├── combo-button.module.ts
│ ├── combo-button.spec.ts
│ ├── combo-button.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── combobox
│ ├── combobox.component.spec.ts
│ ├── combobox.component.ts
│ ├── combobox.module.ts
│ ├── combobox.stories.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── stories
│ │ ├── app-dynamic-list-combobox.component.ts
│ │ ├── app-mock-query-search.component.ts
│ │ ├── app-reactive-combobox.component.ts
│ │ └── index.ts
├── common
│ ├── index.ts
│ ├── ng-package.json
│ ├── tab.service.ts
│ ├── utils.spec.ts
│ └── utils.ts
├── contained-list
│ ├── contained-list-item.component.ts
│ ├── contained-list.component.spec.ts
│ ├── contained-list.component.ts
│ ├── contained-list.enums.ts
│ ├── contained-list.module.ts
│ ├── contained-list.stories.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── stories
│ │ └── contained-list-story.module.ts
├── content-switcher
│ ├── content-switcher-option.directive.ts
│ ├── content-switcher.component.spec.ts
│ ├── content-switcher.component.ts
│ ├── content-switcher.module.ts
│ ├── content-switcher.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── context-menu
│ ├── context-menu-divider.component.ts
│ ├── context-menu-group.component.ts
│ ├── context-menu-item.component.ts
│ ├── context-menu-selection.service.ts
│ ├── context-menu.component.ts
│ ├── context-menu.module.ts
│ ├── context-menu.spec.ts
│ ├── context-menu.stories.ts
│ ├── context-menu.types.ts
│ ├── index.ts
│ └── ng-package.json
├── datepicker-input
│ ├── datepicker-input.component.spec.ts
│ ├── datepicker-input.component.ts
│ ├── datepicker-input.module.ts
│ ├── index.ts
│ └── ng-package.json
├── datepicker
│ ├── carbon-flatpickr-month-select.ts
│ ├── datepicker.component.spec.ts
│ ├── datepicker.component.ts
│ ├── datepicker.module.ts
│ ├── datepicker.stories.ts
│ ├── index.ts
│ └── ng-package.json
├── dialog
│ ├── dialog-config.interface.ts
│ ├── dialog.component.ts
│ ├── dialog.directive.ts
│ ├── dialog.module.ts
│ ├── dialog.service.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── overflow-menu
│ │ ├── overflow-menu-custom-pane.component.ts
│ │ ├── overflow-menu-option.component.ts
│ │ ├── overflow-menu-pane.component.ts
│ │ ├── overflow-menu.component.ts
│ │ ├── overflow-menu.directive.ts
│ │ └── overflow-menu.stories.ts
├── documentation-component
│ ├── documentation.component.ts
│ └── documentation.module.ts
├── dropdown
│ ├── abstract-dropdown-view.class.ts
│ ├── dropdown.component.spec.ts
│ ├── dropdown.component.ts
│ ├── dropdown.module.ts
│ ├── dropdown.service.ts
│ ├── dropdown.stories.ts
│ ├── dropdowntools.ts
│ ├── index.ts
│ ├── list-item.interface.ts
│ ├── list
│ │ ├── dropdown-list.component.spec.ts
│ │ ├── dropdown-list.component.ts
│ │ └── scroll-custom-event.interface.ts
│ ├── ng-package.json
│ ├── scrollable-list.directive.ts
│ └── stories
│ │ ├── app-reactive-forms.component.ts
│ │ └── index.ts
├── experimental
│ ├── experimental.module.ts
│ ├── experimental.service.ts
│ ├── index.ts
│ └── ng-package.json
├── exported-tests
│ └── component-tests.ts
├── file-uploader
│ ├── file-item.interface.ts
│ ├── file-uploader.component.spec.ts
│ ├── file-uploader.component.ts
│ ├── file-uploader.module.ts
│ ├── file-uploader.stories.ts
│ ├── file.component.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── stories
│ │ ├── drag-drop.component.ts
│ │ ├── index.ts
│ │ ├── uploader-form.component.ts
│ │ ├── uploader-reactive-form.component.ts
│ │ └── uploader.component.ts
├── forms
│ ├── forms.module.ts
│ ├── index.ts
│ └── ng-package.json
├── grid
│ ├── column.directive.ts
│ ├── css-grid.stories.ts
│ ├── grid.directive.spec.ts
│ ├── grid.directive.ts
│ ├── grid.module.ts
│ ├── grid.service.ts
│ ├── grid.stories.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── row.directive.ts
├── i18n
│ ├── en.ts
│ ├── i18n.module.ts
│ ├── i18n.service.ts
│ ├── i18n.spec.ts
│ ├── index.ts
│ ├── ng-package.json
│ └── replace.pipe.ts
├── icon
│ ├── icon.directive.ts
│ ├── icon.module.ts
│ ├── icon.service.ts
│ ├── icon.stories.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── public_api.ts
│ └── stories
│ │ ├── icon-demo.component.ts
│ │ ├── index.ts
│ │ └── many-icons-demo.component.ts
├── index.stories.ts
├── index.ts
├── inline-loading
│ ├── index.ts
│ ├── inline-loading.component.ts
│ ├── inline-loading.module.ts
│ ├── inline-loading.spec.ts
│ ├── inline-loading.stories.ts
│ ├── ng-package.json
│ └── stories
│ │ ├── index.ts
│ │ └── inline.component.ts
├── input
│ ├── index.ts
│ ├── input.directive.ts
│ ├── input.module.ts
│ ├── input.stories.ts
│ ├── label.component.spec.ts
│ ├── label.component.ts
│ ├── ng-package.json
│ ├── password-input-label.component.ts
│ ├── password.directive.ts
│ ├── password.spec.ts
│ ├── password.stories.ts
│ ├── text-area.directive.ts
│ ├── text-input-label.component.ts
│ ├── textarea-label.component.ts
│ └── textarea.stories.ts
├── layer
│ ├── index.ts
│ ├── layer.directive.ts
│ ├── layer.module.ts
│ ├── layer.spec.ts
│ ├── layer.stories.ts
│ └── ng-package.json
├── layout
│ ├── index.ts
│ ├── layout.module.ts
│ ├── ng-package.json
│ ├── stack.directive.ts
│ ├── stack.spec.ts
│ └── stack.stories.ts
├── link
│ ├── index.ts
│ ├── link-icon.directive.ts
│ ├── link.directive.ts
│ ├── link.module.ts
│ ├── link.spec.ts
│ ├── link.stories.ts
│ └── ng-package.json
├── list
│ ├── index.ts
│ ├── list-item.directive.ts
│ ├── list.directive.ts
│ ├── list.module.ts
│ ├── list.stories.ts
│ └── ng-package.json
├── loading
│ ├── index.ts
│ ├── loading.component.spec.ts
│ ├── loading.component.ts
│ ├── loading.module.ts
│ ├── loading.stories.ts
│ └── ng-package.json
├── menu-button
│ ├── index.ts
│ ├── menu-button.component.ts
│ ├── menu-button.module.ts
│ ├── menu-button.spec.ts
│ ├── menu-button.stories.ts
│ └── ng-package.json
├── modal
│ ├── alert-modal.component.ts
│ ├── alert-modal.interface.ts
│ ├── base-modal.class.ts
│ ├── base-modal.service.ts
│ ├── index.ts
│ ├── modal-content-text.directive.ts
│ ├── modal-content.directive.ts
│ ├── modal-footer.component.ts
│ ├── modal-header-heading.directive.ts
│ ├── modal-header-label.directive.ts
│ ├── modal-header.component.ts
│ ├── modal.component.spec.ts
│ ├── modal.component.ts
│ ├── modal.module.ts
│ ├── modal.service.ts
│ ├── modal.stories.ts
│ ├── ng-package.json
│ ├── overlay.component.ts
│ └── stories
│ │ ├── alert-modal.component.ts
│ │ ├── data-passing.component.ts
│ │ ├── form-modal.component.ts
│ │ ├── index.ts
│ │ ├── input-modal.component.ts
│ │ ├── modal.component.ts
│ │ └── sample-modal.component.ts
├── ng-package.json
├── notification
│ ├── actionable-button.directive.ts
│ ├── actionable-notification.component.ts
│ ├── actionable-subtitle.directive.ts
│ ├── actionable-title.directive.ts
│ ├── base-notification.component.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── notification-content.interface.ts
│ ├── notification-display.service.ts
│ ├── notification-subtitle.directive.ts
│ ├── notification-title.directive.ts
│ ├── notification.component.spec.ts
│ ├── notification.component.ts
│ ├── notification.module.ts
│ ├── notification.service.ts
│ ├── notification.stories.ts
│ ├── stories
│ │ ├── dynamic-actionable.component.ts
│ │ ├── index.ts
│ │ ├── notification.component.ts
│ │ └── toast.component.ts
│ ├── toast-caption.directive.ts
│ ├── toast-subtitle.directive.ts
│ ├── toast-title.directive.ts
│ └── toast.component.ts
├── number-input
│ ├── index.ts
│ ├── ng-package.json
│ ├── number.component.spec.ts
│ ├── number.component.ts
│ ├── number.module.ts
│ └── number.stories.ts
├── package.json
├── pagination
│ ├── index.ts
│ ├── ng-package.json
│ ├── pagination-model.class.ts
│ ├── pagination-nav.stories.ts
│ ├── pagination-nav
│ │ ├── index.ts
│ │ ├── pagination-item.component.ts
│ │ ├── pagination-nav.component.spec.ts
│ │ ├── pagination-nav.component.ts
│ │ ├── pagination-overflow.component.ts
│ │ └── stories
│ │ │ ├── index.ts
│ │ │ └── pagination-nav-story.component.ts
│ ├── pagination.component.spec.ts
│ ├── pagination.component.ts
│ ├── pagination.module.ts
│ ├── pagination.stories.ts
│ └── stories
│ │ ├── index.ts
│ │ └── pagination.component.ts
├── patterns
│ ├── dialogs
│ │ └── modal-with-table.stories.ts
│ ├── filtering
│ │ ├── multi-selection.stories.ts
│ │ ├── multiple-categories.stories.ts
│ │ └── single-selection.stories.ts
│ ├── forms
│ │ └── multi-step-form.stories.ts
│ └── loading
│ │ ├── large-loading.stories.ts
│ │ └── progressive-loading.stories.ts
├── placeholder
│ ├── index.ts
│ ├── ng-package.json
│ ├── placeholder.component.ts
│ ├── placeholder.module.ts
│ └── placeholder.service.ts
├── popover
│ ├── index.ts
│ ├── ng-package.json
│ ├── popover-content.component.ts
│ ├── popover.component.spec.ts
│ ├── popover.directive.ts
│ ├── popover.module.ts
│ └── popover.stories.ts
├── progress-bar
│ ├── index.ts
│ ├── ng-package.json
│ ├── progress-bar.component.spec.ts
│ ├── progress-bar.component.ts
│ ├── progress-bar.module.ts
│ └── progress-bar.stories.ts
├── progress-indicator
│ ├── index.ts
│ ├── ng-package.json
│ ├── progress-indicator-step.interface.ts
│ ├── progress-indicator.component.spec.ts
│ ├── progress-indicator.component.ts
│ ├── progress-indicator.module.ts
│ └── progress-indicator.stories.ts
├── radio
│ ├── index.ts
│ ├── ng-package.json
│ ├── radio-change.class.ts
│ ├── radio-group.component.ts
│ ├── radio.component.spec.ts
│ ├── radio.component.ts
│ ├── radio.module.ts
│ ├── radio.stories.ts
│ └── stories
│ │ ├── app-reactive-forms.component.ts
│ │ └── index.ts
├── search
│ ├── index.ts
│ ├── ng-package.json
│ ├── search.component.html
│ ├── search.component.spec.ts
│ ├── search.component.ts
│ ├── search.module.ts
│ └── search.stories.ts
├── select
│ ├── index.ts
│ ├── ng-package.json
│ ├── optgroup.directive.ts
│ ├── option.directive.ts
│ ├── select.component.spec.ts
│ ├── select.component.ts
│ ├── select.module.ts
│ ├── select.stories.ts
│ └── stories
│ │ ├── app-reactive-form.component.ts
│ │ └── index.ts
├── skeleton
│ ├── index.ts
│ ├── ng-package.json
│ ├── skeleton-placeholder.component.ts
│ ├── skeleton-text.component.ts
│ ├── skeleton.module.ts
│ └── skeleton.stories.ts
├── slider
│ ├── index.ts
│ ├── ng-package.json
│ ├── slider.component.spec.ts
│ ├── slider.component.ts
│ ├── slider.module.ts
│ └── slider.stories.ts
├── structured-list
│ ├── index.ts
│ ├── list-column.component.ts
│ ├── list-header.component.ts
│ ├── list-row.component.ts
│ ├── ng-package.json
│ ├── structured-list.component.spec.ts
│ ├── structured-list.component.ts
│ ├── structured-list.module.ts
│ └── structured-list.stories.ts
├── table
│ ├── body
│ │ ├── table-body.component.ts
│ │ ├── table-expanded-row.component.ts
│ │ └── table-row.component.ts
│ ├── cell
│ │ ├── table-checkbox.component.ts
│ │ ├── table-data.component.ts
│ │ ├── table-expand-button.component.ts
│ │ └── table-radio.component.ts
│ ├── data-grid-interaction-model.class.ts
│ ├── expanded-row-hover.directive.ts
│ ├── head
│ │ ├── table-head-cell-label.directive.ts
│ │ ├── table-head-cell.component.ts
│ │ ├── table-head-checkbox.component.ts
│ │ ├── table-head-expand.component.ts
│ │ └── table-head.component.ts
│ ├── header
│ │ ├── table-header-description.directive.ts
│ │ ├── table-header-title.directive.ts
│ │ └── table-header.component.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── stories
│ │ ├── app-custom-table.component.ts
│ │ ├── app-expansion-table.component.ts
│ │ ├── app-function-override-filter-table.component.ts
│ │ ├── app-model-filter-table.component.ts
│ │ ├── app-no-data.component.ts
│ │ ├── app-overflow-table.component.ts
│ │ ├── app-pagination-table.component.ts
│ │ ├── app-skeleton-table.component.ts
│ │ ├── app-table.component.ts
│ │ └── index.ts
│ ├── table-adapter.class.ts
│ ├── table-container.component.ts
│ ├── table-header-item.class.ts
│ ├── table-item.class.ts
│ ├── table-model.class.spec.ts
│ ├── table-model.class.ts
│ ├── table-row.class.ts
│ ├── table.component.spec.ts
│ ├── table.component.ts
│ ├── table.directive.ts
│ ├── table.module.ts
│ ├── table.stories.ts
│ ├── table.types.ts
│ └── toolbar
│ │ ├── table-toolbar-actions.component.ts
│ │ ├── table-toolbar-content.component.ts
│ │ ├── table-toolbar-search.component.ts
│ │ └── table-toolbar.component.ts
├── tabs
│ ├── base-tab-header.component.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── stories
│ │ ├── index.ts
│ │ └── tabs.component.ts
│ ├── tab-header-group.component.ts
│ ├── tab-header.directive.ts
│ ├── tab-headers.component.ts
│ ├── tab-skeleton.component.ts
│ ├── tab.component.ts
│ ├── tabs.component.spec.ts
│ ├── tabs.component.ts
│ ├── tabs.module.ts
│ └── tabs.stories.ts
├── tag
│ ├── index.ts
│ ├── ng-package.json
│ ├── tag-filter.component.spec.ts
│ ├── tag-filter.component.ts
│ ├── tag-icon.directive.ts
│ ├── tag-operational.component.ts
│ ├── tag-selectable.component.ts
│ ├── tag.component.ts
│ ├── tag.module.ts
│ └── tag.stories.ts
├── test.ts
├── theme
│ ├── index.ts
│ ├── ng-package.json
│ ├── theme.directive.ts
│ ├── theme.module.ts
│ ├── theme.spec.ts
│ └── theme.stories.ts
├── thumbnails
│ ├── context-menu.svg
│ ├── icon.svg
│ ├── input.svg
│ ├── list.svg
│ ├── radio.svg
│ ├── skeleton.svg
│ ├── table.svg
│ ├── time-picker-select.svg
│ └── tooltip-icon.svg
├── tiles
│ ├── clickable-tile-icon.directive.ts
│ ├── clickable-tile.component.spec.ts
│ ├── clickable-tile.component.ts
│ ├── clickable-tile.stories.ts
│ ├── expandable-tile-above.directive.ts
│ ├── expandable-tile-below.directive.ts
│ ├── expandable-tile.component.ts
│ ├── expandable-tile.stories.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── selection-tile.component.ts
│ ├── tile-group.component.ts
│ ├── tile-group.stories.ts
│ ├── tile-selection.interface.ts
│ ├── tile.component.spec.ts
│ ├── tile.component.ts
│ ├── tiles.module.ts
│ └── tiles.stories.ts
├── timepicker-select
│ ├── index.ts
│ ├── ng-package.json
│ ├── timepicker-select.component.spec.ts
│ ├── timepicker-select.component.ts
│ ├── timepicker-select.module.ts
│ └── timepicker-select.stories.ts
├── timepicker
│ ├── index.ts
│ ├── ng-package.json
│ ├── timepicker.component.spec.ts
│ ├── timepicker.component.ts
│ ├── timepicker.module.ts
│ └── timepicker.stories.ts
├── toggle
│ ├── index.ts
│ ├── ng-package.json
│ ├── toggle.component.spec.ts
│ ├── toggle.component.ts
│ ├── toggle.module.ts
│ └── toggle.stories.ts
├── toggletip
│ ├── index.ts
│ ├── ng-package.json
│ ├── toggletip-action.directive.ts
│ ├── toggletip-button.directive.ts
│ ├── toggletip-content.directive.ts
│ ├── toggletip-label.directive.ts
│ ├── toggletip.component.spec.ts
│ ├── toggletip.component.ts
│ ├── toggletip.module.ts
│ └── toggletip.stories.ts
├── tooltip
│ ├── definition-tooltip.component.spec.ts
│ ├── definition-tooptip.component.ts
│ ├── definition-tooptip.stories.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── tooltip.component.spec.ts
│ ├── tooltip.component.ts
│ ├── tooltip.interface.ts
│ ├── tooltip.module.ts
│ └── tooltip.stories.ts
├── treeview
│ ├── index.ts
│ ├── ng-package.json
│ ├── stories
│ │ └── app-treeview-icons.component.ts
│ ├── tree-node.component.ts
│ ├── tree-node.types.ts
│ ├── treeview.component.spec.ts
│ ├── treeview.component.ts
│ ├── treeview.module.ts
│ ├── treeview.service.ts
│ └── treeview.stories.ts
├── tsconfig.lib.json
├── ui-shell
│ ├── header
│ │ ├── hamburger.component.ts
│ │ ├── header-action.component.ts
│ │ ├── header-global.component.ts
│ │ ├── header-item.component.ts
│ │ ├── header-menu.component.ts
│ │ ├── header-navigation-items.interface.ts
│ │ ├── header-navigation.component.ts
│ │ ├── header.component.spec.ts
│ │ ├── header.component.ts
│ │ └── header.module.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── panel
│ │ ├── panel.component.ts
│ │ ├── panel.module.ts
│ │ ├── switcher-list-item.component.ts
│ │ └── switcher-list.component.ts
│ ├── sidenav
│ │ ├── routerlink-extended.directive.ts
│ │ ├── side-nav.component.spec.ts
│ │ ├── sidenav-item.component.ts
│ │ ├── sidenav-item.interface.ts
│ │ ├── sidenav-menu.component.ts
│ │ ├── sidenav.component.ts
│ │ └── sidenav.module.ts
│ ├── stories
│ │ ├── header-fluid.component.ts
│ │ └── index.ts
│ ├── ui-shell.module.ts
│ └── ui-shell.stories.ts
└── utils
│ ├── a11y.ts
│ ├── animation-frame.service.ts
│ ├── document.service.ts
│ ├── element.service.ts
│ ├── element.types.ts
│ ├── event-observable.ts
│ ├── event.service.ts
│ ├── index.ts
│ ├── ng-package.json
│ ├── object.ts
│ ├── position.ts
│ ├── public_api.ts
│ ├── scroll.ts
│ ├── types.ts
│ ├── utils.module.ts
│ ├── utils.ts
│ └── window-tools.ts
├── telemetry.yml
├── test.ts
├── tsconfig.doc.json
├── tsconfig.json
├── tsconfig.spec.json
└── tslint.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | end_of_file = lf
8 | indent_style = tab
9 | indent_size = 4
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 |
13 | [*.json]
14 | charset = utf-8
15 | end_of_file = lf
16 | indent_style = space
17 | indent_size = 2
18 | trim_trailing_whitespace = true
19 | insert_final_newline = true
20 |
21 | [*.yml]
22 | charset = utf-8
23 | indent_style = space
24 | indent_size = 2
25 | trim_trailing_whitespace = true
26 | insert_final_newline = true
27 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Closes carbon-design-system/carbon-components-angular#
2 |
3 | {{short description}}
4 |
5 | #### Changelog
6 |
7 | **New**
8 |
9 | * {{new thing}}
10 |
11 | **Changed**
12 |
13 | * {{change thing}}
14 |
15 | **Removed**
16 |
17 | * {{removed thing}}
18 |
--------------------------------------------------------------------------------
/.github/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # Support
2 |
3 | If you run into an issue, sorry about that! We definitely want to make sure that
4 | your experience using the Carbon Design System is the best that it can be.
5 |
6 | When this happens, just create an issue on GitHub by filling out the template
7 | and we'll try our best to respond in a reasonable time.
8 |
--------------------------------------------------------------------------------
/.github/workflows/codeql.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: [ next, master ]
6 | pull_request:
7 | branches: [ next, master ]
8 |
9 | jobs:
10 | analyze:
11 | name: Analyze
12 | runs-on: ubuntu-latest
13 |
14 |
15 | steps:
16 | - name: Checkout repository
17 | uses: actions/checkout@v3
18 |
19 | # Initializes the CodeQL tools for scanning.
20 | - name: Initialize CodeQL
21 | uses: github/codeql-action/init@v2
22 | with:
23 | languages: javascript
24 |
25 | - name: Perform CodeQL Analysis
26 | uses: github/codeql-action/analyze@v2
27 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Run tests
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master, next, v3, v9 ]
8 |
9 | jobs:
10 | test:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | strategy:
15 | matrix:
16 | node-version: [16.x]
17 |
18 | steps:
19 | - uses: actions/checkout@v3
20 | - name: Use Node.js ${{ matrix.node-version }}
21 | uses: actions/setup-node@v3
22 | with:
23 | node-version: ${{ matrix.node-version }}
24 | - run: npm i
25 | - run: npm run test
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .angular/cache
2 | .DS_Store
3 | *.log*
4 | *.swp
5 | bower_components
6 | node_modules
7 | dist
8 | dist-pkg
9 | demo/bundle
10 | .idea
11 | .vscode
12 | .cache
13 | .cache/
14 | doc/
15 | documentation/
16 | dist/
17 | a11y/results*
18 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | set -e
5 |
6 | # Lint commit messages
7 | npx --no -- commitlint --edit $1
8 |
--------------------------------------------------------------------------------
/.husky/pre-push:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | set -e
5 |
6 | # Lint files before pushing
7 | npm run lint
8 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | v16
2 |
--------------------------------------------------------------------------------
/.storybook/main.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | module.exports = {
3 | staticDirs: ["public"],
4 | stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
5 | addons: [
6 | "@storybook/addon-links",
7 | {
8 | name: "@storybook/addon-essentials",
9 | options: {
10 | backgrounds: false
11 | }
12 | },
13 | "@storybook/addon-a11y",
14 | "@storybook/addon-storysource"
15 | ],
16 | framework: {
17 | name: "@storybook/angular",
18 | options: {}
19 | },
20 | core: {
21 | disableTelemetry: true
22 | },
23 | docs: {
24 | autodocs: true
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/.storybook/manager.js:
--------------------------------------------------------------------------------
1 | import { addons } from '@storybook/addons';
2 | import { create } from '@storybook/theming';
3 |
4 | addons.setConfig({
5 | theme: create({
6 | base: 'light',
7 | fontBase: "'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",
8 | fontCode:
9 | "'IBM Plex Mono', Menlo, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",
10 | brandTitle: `carbon components angular`,
11 | brandUrl: 'https://github.com/IBM/carbon-components-angular',
12 | })
13 | });
14 |
--------------------------------------------------------------------------------
/.storybook/public/carbon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/.storybook/public/carbon.jpg
--------------------------------------------------------------------------------
/.storybook/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "types": [
5 | "node"
6 | ],
7 | "allowSyntheticDefaultImports": true,
8 | },
9 | "include": [
10 | "**/*.stories.ts",
11 | "../src/**/*",
12 | "../projects/**/*"
13 | ],
14 | "exclude": [],
15 | }
16 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: trusty
2 | language: node_js
3 | node_js:
4 | - "14"
5 | addons:
6 | chrome: stable
7 | before_install:
8 | - "google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &"
9 | before_script:
10 | - "export DISPLAY=:99.0"
11 | - "sh -e /etc/init.d/xvfb start"
12 | - "sleep 3"
13 | - "sudo chown root /opt/google/chrome/chrome-sandbox"
14 | - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
15 | script: "npm run lint && npm test"
16 | deploy:
17 | provider: script
18 | script: "bash ./scripts/deploy.sh"
19 | skip_cleanup: true
20 | on:
21 | all_branches: true
22 | notifications:
23 | email: false
24 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @carbon-design-system/angular-maintainers
2 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "rules": {
3 | "subject-max-length": [1, "always", 100],
4 | "type-enum": [
5 | 1,
6 | "always",
7 | [
8 | "feat",
9 | "fix",
10 | "docs",
11 | "style",
12 | "refactor",
13 | "perf",
14 | "test",
15 | "build",
16 | "chore",
17 | "ci",
18 | "revert"
19 | ]
20 | ]
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/compodoc.storybook.json:
--------------------------------------------------------------------------------
1 | {
2 | "exportFormat": "json",
3 | "tsconfig": "tsconfig.doc.json",
4 | "output": "./dist/docs",
5 | "disablePrivate": true,
6 | "disableProtected": true,
7 | "disableLifeCycleHooks": true,
8 | "disableInternal": true
9 | }
10 |
--------------------------------------------------------------------------------
/integration/ng14/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
18 |
--------------------------------------------------------------------------------
/integration/ng14/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/integration/ng14/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # Compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | /bazel-out
8 |
9 | # Node
10 | /node_modules
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | # IDEs and editors
15 | .idea/
16 | .project
17 | .classpath
18 | .c9/
19 | *.launch
20 | .settings/
21 | *.sublime-workspace
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 | .history/*
30 |
31 | # Miscellaneous
32 | /.angular/cache
33 | .sass-cache/
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | testem.log
38 | /typings
39 |
40 | # System files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/integration/ng14/README.md:
--------------------------------------------------------------------------------
1 | # Ng14
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.1.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
28 |
--------------------------------------------------------------------------------
/integration/ng14/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [];
5 |
6 | @NgModule({
7 | imports: [RouterModule.forRoot(routes)],
8 | exports: [RouterModule]
9 | })
10 | export class AppRoutingModule { }
11 |
--------------------------------------------------------------------------------
/integration/ng14/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration/ng14/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng14/src/app/app.component.scss
--------------------------------------------------------------------------------
/integration/ng14/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { ListItem } from 'carbon-components-angular';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.scss']
8 | })
9 | export class AppComponent {
10 | items: ListItem[] = [
11 | {
12 | content: 'One',
13 | selected: false
14 | },
15 | {
16 | content: 'Two',
17 | selected: false
18 | },
19 | {
20 | content: 'Three',
21 | selected: false
22 | },
23 | {
24 | content: 'Four',
25 | selected: false
26 | }
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/integration/ng14/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 |
4 | import { AppRoutingModule } from './app-routing.module';
5 | import { AppComponent } from './app.component';
6 |
7 | import { ButtonModule, DropdownModule } from 'carbon-components-angular';
8 |
9 | @NgModule({
10 | declarations: [
11 | AppComponent
12 | ],
13 | imports: [
14 | BrowserModule,
15 | AppRoutingModule,
16 | ButtonModule,
17 | DropdownModule
18 | ],
19 | providers: [],
20 | bootstrap: [AppComponent]
21 | })
22 | export class AppModule { }
23 |
--------------------------------------------------------------------------------
/integration/ng14/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng14/src/assets/.gitkeep
--------------------------------------------------------------------------------
/integration/ng14/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/integration/ng14/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/integration/ng14/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng14/src/favicon.ico
--------------------------------------------------------------------------------
/integration/ng14/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ng14
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration/ng14/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/integration/ng14/src/styles.scss:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | @use './../node_modules/@carbon/styles';
3 |
--------------------------------------------------------------------------------
/integration/ng14/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: {
11 | context(path: string, deep?: boolean, filter?: RegExp): {
12 | (id: string): T;
13 | keys(): string[];
14 | };
15 | };
16 |
17 | // First, initialize the Angular testing environment.
18 | getTestBed().initTestEnvironment(
19 | BrowserDynamicTestingModule,
20 | platformBrowserDynamicTesting(),
21 | );
22 |
23 | // Then we find all the tests.
24 | const context = require.context('./', true, /\.spec\.ts$/);
25 | // And load the modules.
26 | context.keys().forEach(context);
27 |
--------------------------------------------------------------------------------
/integration/ng14/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts",
10 | "src/polyfills.ts"
11 | ],
12 | "include": [
13 | "src/**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/integration/ng14/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "noImplicitOverride": true,
10 | "noPropertyAccessFromIndexSignature": true,
11 | "noImplicitReturns": true,
12 | "noFallthroughCasesInSwitch": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "es2020",
20 | "module": "es2020",
21 | "lib": [
22 | "es2020",
23 | "dom"
24 | ]
25 | },
26 | "angularCompilerOptions": {
27 | "enableI18nLegacyMessageIdFormat": false,
28 | "strictInjectionParameters": true,
29 | "strictInputAccessModifiers": true,
30 | "strictTemplates": true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/integration/ng14/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts",
12 | "src/polyfills.ts"
13 | ],
14 | "include": [
15 | "src/**/*.spec.ts",
16 | "src/**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/integration/ng15/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/integration/ng15/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # Compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | /bazel-out
8 |
9 | # Node
10 | /node_modules
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | # IDEs and editors
15 | .idea/
16 | .project
17 | .classpath
18 | .c9/
19 | *.launch
20 | .settings/
21 | *.sublime-workspace
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 | .history/*
30 |
31 | # Miscellaneous
32 | /.angular/cache
33 | .sass-cache/
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | testem.log
38 | /typings
39 |
40 | # System files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/integration/ng15/README.md:
--------------------------------------------------------------------------------
1 | # Ng15
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.5.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
28 |
--------------------------------------------------------------------------------
/integration/ng15/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [];
5 |
6 | @NgModule({
7 | imports: [RouterModule.forRoot(routes)],
8 | exports: [RouterModule]
9 | })
10 | export class AppRoutingModule { }
11 |
--------------------------------------------------------------------------------
/integration/ng15/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration/ng15/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng15/src/app/app.component.scss
--------------------------------------------------------------------------------
/integration/ng15/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { ListItem } from 'carbon-components-angular';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.scss']
8 | })
9 | export class AppComponent {
10 | items: ListItem[] = [
11 | {
12 | content: 'One',
13 | selected: false
14 | },
15 | {
16 | content: 'Two',
17 | selected: false
18 | },
19 | {
20 | content: 'Three',
21 | selected: false
22 | },
23 | {
24 | content: 'Four',
25 | selected: false
26 | }
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/integration/ng15/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 |
4 | import { AppRoutingModule } from './app-routing.module';
5 | import { AppComponent } from './app.component';
6 |
7 | import { ButtonModule, DropdownModule } from 'carbon-components-angular';
8 |
9 | @NgModule({
10 | declarations: [
11 | AppComponent
12 | ],
13 | imports: [
14 | BrowserModule,
15 | AppRoutingModule,
16 | ButtonModule,
17 | DropdownModule
18 | ],
19 | providers: [],
20 | bootstrap: [AppComponent]
21 | })
22 | export class AppModule { }
23 |
--------------------------------------------------------------------------------
/integration/ng15/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng15/src/assets/.gitkeep
--------------------------------------------------------------------------------
/integration/ng15/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng15/src/favicon.ico
--------------------------------------------------------------------------------
/integration/ng15/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ng15
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration/ng15/src/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppModule } from './app/app.module';
4 |
5 |
6 | platformBrowserDynamic().bootstrapModule(AppModule)
7 | .catch(err => console.error(err));
8 |
--------------------------------------------------------------------------------
/integration/ng15/src/styles.scss:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | @use './../node_modules/@carbon/styles';
3 |
--------------------------------------------------------------------------------
/integration/ng15/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts"
10 | ],
11 | "include": [
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/integration/ng15/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "noImplicitOverride": true,
10 | "noPropertyAccessFromIndexSignature": true,
11 | "noImplicitReturns": true,
12 | "noFallthroughCasesInSwitch": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "ES2022",
20 | "module": "ES2022",
21 | "useDefineForClassFields": false,
22 | "lib": [
23 | "ES2022",
24 | "dom"
25 | ]
26 | },
27 | "angularCompilerOptions": {
28 | "enableI18nLegacyMessageIdFormat": false,
29 | "strictInjectionParameters": true,
30 | "strictInputAccessModifiers": true,
31 | "strictTemplates": true
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/integration/ng15/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "include": [
11 | "src/**/*.spec.ts",
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/integration/ng16/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/integration/ng16/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # Compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | /bazel-out
8 |
9 | # Node
10 | /node_modules
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | # IDEs and editors
15 | .idea/
16 | .project
17 | .classpath
18 | .c9/
19 | *.launch
20 | .settings/
21 | *.sublime-workspace
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 | .history/*
30 |
31 | # Miscellaneous
32 | /.angular/cache
33 | .sass-cache/
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | testem.log
38 | /typings
39 |
40 | # System files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/integration/ng16/README.md:
--------------------------------------------------------------------------------
1 | # Ng16
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.0.5.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
28 |
--------------------------------------------------------------------------------
/integration/ng16/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration/ng16/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng16/src/app/app.component.scss
--------------------------------------------------------------------------------
/integration/ng16/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 | import { AppComponent } from './app.component';
3 |
4 | describe('AppComponent', () => {
5 | beforeEach(() => TestBed.configureTestingModule({
6 | imports: [AppComponent]
7 | }));
8 |
9 | it('should create the app', () => {
10 | const fixture = TestBed.createComponent(AppComponent);
11 | const app = fixture.componentInstance;
12 | expect(app).toBeTruthy();
13 | });
14 |
15 | it(`should have the 'ng16' title`, () => {
16 | const fixture = TestBed.createComponent(AppComponent);
17 | const app = fixture.componentInstance;
18 | expect(app.title).toEqual('ng16');
19 | });
20 |
21 | it('should render title', () => {
22 | const fixture = TestBed.createComponent(AppComponent);
23 | fixture.detectChanges();
24 | const compiled = fixture.nativeElement as HTMLElement;
25 | expect(compiled.querySelector('.content span')?.textContent).toContain('ng16 app is running!');
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/integration/ng16/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { RouterOutlet } from '@angular/router';
4 | import { DropdownModule, ButtonModule, ListItem } from 'carbon-components-angular';
5 |
6 | @Component({
7 | selector: 'app-root',
8 | standalone: true,
9 | imports: [CommonModule, RouterOutlet, DropdownModule, ButtonModule],
10 | templateUrl: './app.component.html',
11 | styleUrls: ['./app.component.scss']
12 | })
13 | export class AppComponent {
14 | items: ListItem[] = [
15 | {
16 | content: 'One',
17 | selected: false
18 | },
19 | {
20 | content: 'Two',
21 | selected: false
22 | },
23 | {
24 | content: 'Three',
25 | selected: false
26 | },
27 | {
28 | content: 'Four',
29 | selected: false
30 | }
31 | ];
32 | }
33 |
--------------------------------------------------------------------------------
/integration/ng16/src/app/app.config.ts:
--------------------------------------------------------------------------------
1 | import { ApplicationConfig } from '@angular/core';
2 | import { provideRouter } from '@angular/router';
3 |
4 | import { routes } from './app.routes';
5 |
6 | export const appConfig: ApplicationConfig = {
7 | providers: [provideRouter(routes) ]
8 | };
9 |
--------------------------------------------------------------------------------
/integration/ng16/src/app/app.routes.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 |
3 | export const routes: Routes = [];
4 |
--------------------------------------------------------------------------------
/integration/ng16/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng16/src/assets/.gitkeep
--------------------------------------------------------------------------------
/integration/ng16/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng16/src/favicon.ico
--------------------------------------------------------------------------------
/integration/ng16/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ng16
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration/ng16/src/main.ts:
--------------------------------------------------------------------------------
1 | import { bootstrapApplication } from '@angular/platform-browser';
2 | import { appConfig } from './app/app.config';
3 | import { AppComponent } from './app/app.component';
4 |
5 | bootstrapApplication(AppComponent, appConfig)
6 | .catch((err) => console.error(err));
7 |
--------------------------------------------------------------------------------
/integration/ng16/src/styles.scss:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | @use './../node_modules/@carbon/styles';
3 |
--------------------------------------------------------------------------------
/integration/ng16/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts"
10 | ],
11 | "include": [
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/integration/ng16/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "noImplicitOverride": true,
10 | "noPropertyAccessFromIndexSignature": true,
11 | "noImplicitReturns": true,
12 | "noFallthroughCasesInSwitch": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "ES2022",
20 | "module": "ES2022",
21 | "useDefineForClassFields": false,
22 | "lib": [
23 | "ES2022",
24 | "dom"
25 | ]
26 | },
27 | "angularCompilerOptions": {
28 | "enableI18nLegacyMessageIdFormat": false,
29 | "strictInjectionParameters": true,
30 | "strictInputAccessModifiers": true,
31 | "strictTemplates": true
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/integration/ng16/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "include": [
11 | "src/**/*.spec.ts",
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/integration/ng17/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/integration/ng17/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # Compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | /bazel-out
8 |
9 | # Node
10 | /node_modules
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | # IDEs and editors
15 | .idea/
16 | .project
17 | .classpath
18 | .c9/
19 | *.launch
20 | .settings/
21 | *.sublime-workspace
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 | .history/*
30 |
31 | # Miscellaneous
32 | /.angular/cache
33 | .sass-cache/
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | testem.log
38 | /typings
39 |
40 | # System files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/integration/ng17/README.md:
--------------------------------------------------------------------------------
1 | # Ng17
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.0.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
28 |
--------------------------------------------------------------------------------
/integration/ng17/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration/ng17/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng17/src/app/app.component.scss
--------------------------------------------------------------------------------
/integration/ng17/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 | import { AppComponent } from './app.component';
3 |
4 | describe('AppComponent', () => {
5 | beforeEach(async () => {
6 | await TestBed.configureTestingModule({
7 | imports: [AppComponent],
8 | }).compileComponents();
9 | });
10 |
11 | it('should create the app', () => {
12 | const fixture = TestBed.createComponent(AppComponent);
13 | const app = fixture.componentInstance;
14 | expect(app).toBeTruthy();
15 | });
16 |
17 | it(`should have the 'ng17' title`, () => {
18 | const fixture = TestBed.createComponent(AppComponent);
19 | const app = fixture.componentInstance;
20 | expect(app.title).toEqual('ng17');
21 | });
22 |
23 | it('should render title', () => {
24 | const fixture = TestBed.createComponent(AppComponent);
25 | fixture.detectChanges();
26 | const compiled = fixture.nativeElement as HTMLElement;
27 | expect(compiled.querySelector('h1')?.textContent).toContain('Hello, ng17');
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/integration/ng17/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { RouterOutlet } from '@angular/router';
4 | import { DropdownModule, ButtonModule, ListItem } from 'carbon-components-angular';
5 |
6 | @Component({
7 | selector: 'app-root',
8 | standalone: true,
9 | imports: [CommonModule, RouterOutlet, DropdownModule, ButtonModule],
10 | templateUrl: './app.component.html',
11 | styleUrls: ['./app.component.scss']
12 | })
13 | export class AppComponent {
14 | items: ListItem[] = [
15 | {
16 | content: 'One',
17 | selected: false
18 | },
19 | {
20 | content: 'Two',
21 | selected: false
22 | },
23 | {
24 | content: 'Three',
25 | selected: false
26 | },
27 | {
28 | content: 'Four',
29 | selected: false
30 | }
31 | ];
32 | }
33 |
--------------------------------------------------------------------------------
/integration/ng17/src/app/app.config.ts:
--------------------------------------------------------------------------------
1 | import { ApplicationConfig } from '@angular/core';
2 | import { provideRouter } from '@angular/router';
3 |
4 | import { routes } from './app.routes';
5 |
6 | export const appConfig: ApplicationConfig = {
7 | providers: [provideRouter(routes)]
8 | };
9 |
--------------------------------------------------------------------------------
/integration/ng17/src/app/app.routes.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 |
3 | export const routes: Routes = [];
4 |
--------------------------------------------------------------------------------
/integration/ng17/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng17/src/assets/.gitkeep
--------------------------------------------------------------------------------
/integration/ng17/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng17/src/favicon.ico
--------------------------------------------------------------------------------
/integration/ng17/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ng17
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration/ng17/src/main.ts:
--------------------------------------------------------------------------------
1 | import { bootstrapApplication } from '@angular/platform-browser';
2 | import { appConfig } from './app/app.config';
3 | import { AppComponent } from './app/app.component';
4 |
5 | bootstrapApplication(AppComponent, appConfig)
6 | .catch((err) => console.error(err));
7 |
--------------------------------------------------------------------------------
/integration/ng17/src/styles.scss:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | @use './../node_modules/@carbon/styles/scss/config' with (
3 | $use-flexbox-grid: true,
4 | $font-path: '@ibm/plex'
5 | );
6 |
7 | @use './../node_modules/@carbon/styles';
8 |
--------------------------------------------------------------------------------
/integration/ng17/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts"
10 | ],
11 | "include": [
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/integration/ng17/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "outDir": "./dist/out-tsc",
6 | "forceConsistentCasingInFileNames": true,
7 | "strict": true,
8 | "noImplicitOverride": true,
9 | "noPropertyAccessFromIndexSignature": true,
10 | "noImplicitReturns": true,
11 | "noFallthroughCasesInSwitch": true,
12 | "esModuleInterop": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "ES2022",
20 | "module": "ES2022",
21 | "useDefineForClassFields": false,
22 | "lib": [
23 | "ES2022",
24 | "dom"
25 | ]
26 | },
27 | "angularCompilerOptions": {
28 | "enableI18nLegacyMessageIdFormat": false,
29 | "strictInjectionParameters": true,
30 | "strictInputAccessModifiers": true,
31 | "strictTemplates": true
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/integration/ng17/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "include": [
11 | "src/**/*.spec.ts",
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/integration/ng18/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/integration/ng18/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2 |
3 | # Compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | /bazel-out
8 |
9 | # Node
10 | /node_modules
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | # IDEs and editors
15 | .idea/
16 | .project
17 | .classpath
18 | .c9/
19 | *.launch
20 | .settings/
21 | *.sublime-workspace
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 | .history/*
30 |
31 | # Miscellaneous
32 | /.angular/cache
33 | .sass-cache/
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | testem.log
38 | /typings
39 |
40 | # System files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/integration/ng18/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng18/public/favicon.ico
--------------------------------------------------------------------------------
/integration/ng18/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration/ng18/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carbon-design-system/carbon-components-angular/e54c845c149a39d890526b8560481815b0805631/integration/ng18/src/app/app.component.scss
--------------------------------------------------------------------------------
/integration/ng18/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 | import { AppComponent } from './app.component';
3 |
4 | describe('AppComponent', () => {
5 | beforeEach(async () => {
6 | await TestBed.configureTestingModule({
7 | imports: [AppComponent],
8 | }).compileComponents();
9 | });
10 |
11 | it('should create the app', () => {
12 | const fixture = TestBed.createComponent(AppComponent);
13 | const app = fixture.componentInstance;
14 | expect(app).toBeTruthy();
15 | });
16 |
17 | it(`should have the 'ng18' title`, () => {
18 | const fixture = TestBed.createComponent(AppComponent);
19 | const app = fixture.componentInstance;
20 | expect(app.title).toEqual('ng18');
21 | });
22 |
23 | it('should render title', () => {
24 | const fixture = TestBed.createComponent(AppComponent);
25 | fixture.detectChanges();
26 | const compiled = fixture.nativeElement as HTMLElement;
27 | expect(compiled.querySelector('h1')?.textContent).toContain('Hello, ng18');
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/integration/ng18/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { RouterOutlet } from '@angular/router';
3 | import { DropdownModule, ButtonModule, ListItem } from 'carbon-components-angular';
4 |
5 | @Component({
6 | selector: 'app-root',
7 | standalone: true,
8 | imports: [RouterOutlet, DropdownModule, ButtonModule],
9 | templateUrl: './app.component.html',
10 | styleUrl: './app.component.scss'
11 | })
12 | export class AppComponent {
13 | items: ListItem[] = [
14 | {
15 | content: 'One',
16 | selected: false
17 | },
18 | {
19 | content: 'Two',
20 | selected: false
21 | },
22 | {
23 | content: 'Three',
24 | selected: false
25 | },
26 | {
27 | content: 'Four',
28 | selected: false
29 | }
30 | ];
31 | }
32 |
--------------------------------------------------------------------------------
/integration/ng18/src/app/app.config.ts:
--------------------------------------------------------------------------------
1 | import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
2 | import { provideRouter } from '@angular/router';
3 |
4 | import { routes } from './app.routes';
5 |
6 | export const appConfig: ApplicationConfig = {
7 | /**
8 | * As `eventCoalescing` is enabled by default for NEW projects starting v18,
9 | * there is a possibility CCA may run into issues - most components should work OOB
10 | */
11 | providers: [provideZoneChangeDetection({ eventCoalescing: false }), provideRouter(routes)]
12 | };
13 |
--------------------------------------------------------------------------------
/integration/ng18/src/app/app.routes.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 |
3 | export const routes: Routes = [];
4 |
--------------------------------------------------------------------------------
/integration/ng18/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ng18
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration/ng18/src/main.ts:
--------------------------------------------------------------------------------
1 | import { bootstrapApplication } from '@angular/platform-browser';
2 | import { appConfig } from './app/app.config';
3 | import { AppComponent } from './app/app.component';
4 |
5 | bootstrapApplication(AppComponent, appConfig)
6 | .catch((err) => console.error(err));
7 |
--------------------------------------------------------------------------------
/integration/ng18/src/styles.scss:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 | @use './../node_modules/@carbon/styles/scss/config' with (
3 | $use-flexbox-grid: true,
4 | $font-path: '@ibm/plex'
5 | );
6 |
7 | @use './../node_modules/@carbon/styles';
8 |
--------------------------------------------------------------------------------
/integration/ng18/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3 | {
4 | "extends": "./tsconfig.json",
5 | "compilerOptions": {
6 | "outDir": "./out-tsc/app",
7 | "types": []
8 | },
9 | "files": [
10 | "src/main.ts"
11 | ],
12 | "include": [
13 | "src/**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/integration/ng18/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3 | {
4 | "extends": "./tsconfig.json",
5 | "compilerOptions": {
6 | "outDir": "./out-tsc/spec",
7 | "types": [
8 | "jasmine"
9 | ]
10 | },
11 | "include": [
12 | "src/**/*.spec.ts",
13 | "src/**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/karma-test-shim.js:
--------------------------------------------------------------------------------
1 | Error.stackTraceLimit = Infinity;
2 |
3 | require('core-js');
4 |
5 | require('zone.js');
6 | require('zone.js/dist/long-stack-trace-zone');
7 | require('zone.js/dist/proxy');
8 | require('zone.js/dist/sync-test');
9 | require('zone.js/dist/jasmine-patch');
10 | require('zone.js/dist/async-test');
11 | require('zone.js/dist/fake-async-test');
12 |
13 | var appContext = require.context('./src', true, /\.spec\.ts/);
14 |
15 | appContext.keys().forEach(appContext);
16 |
17 | var testing = require('@angular/core/testing');
18 | var browser = require('@angular/platform-browser-dynamic/testing');
19 |
20 | testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
21 |
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function (config) {
2 | config.set({
3 | basePath: '',
4 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
5 | plugins: [
6 | require('karma-jasmine'),
7 | require('karma-chrome-launcher'),
8 | require('karma-jasmine-html-reporter'),
9 | require('karma-coverage-istanbul-reporter'),
10 | require('@angular-devkit/build-angular/plugins/karma')
11 | ],
12 | autoWatch: true,
13 | browsers: ['ChromeHeadless'],
14 | client: {
15 | clearContext: false // leave Jasmine Spec Runner output visible in browser
16 | },
17 | coverageIstanbulReporter: {
18 | dir: require('path').join(__dirname, 'coverage'),
19 | reports: ['html', 'lcovonly', 'text-summary'],
20 | fixWebpackSourcePaths: true
21 | },
22 | reporters: ['progress', 'kjhtml'],
23 | port: 9876,
24 | logLevel: config.LOG_INFO,
25 | colors: true,
26 | singleRun: false,
27 | restartOnFileChange: true
28 | });
29 | };
30 |
--------------------------------------------------------------------------------
/scripts/add-package-scripts.js:
--------------------------------------------------------------------------------
1 | const { readFileSync, writeFileSync } = require("fs");
2 | const { resolve } = require("path");
3 |
4 | const srcPath = resolve("src/package.json");
5 | const distPath = resolve("dist/package.json");
6 |
7 | const srcPackageJson = JSON.parse(readFileSync(srcPath));
8 | const distPackageJson = JSON.parse(readFileSync(distPath));
9 |
10 | distPackageJson["scripts"] = srcPackageJson["scripts"];
11 |
12 | writeFileSync(distPath, JSON.stringify(distPackageJson, null, 2));
13 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e # exit with nonzero exit code if anything fails
4 |
5 | rm -rf dist
6 |
7 | # run the angular/ng-packagr build
8 | npm run ng:build
9 |
10 | # restore the scripts to the dist package.json
11 | node scripts/add-package-scripts.js
12 |
13 | # move/generate/update meta files into dist
14 | gulp buildMeta
15 |
16 | # generate ALL the documentation
17 | mkdir dist/docs
18 | npm run build-storybook
19 | npm run docs:build && mv documentation dist/docs/ && mv telemetry.yml dist/telemetry.yml
20 |
--------------------------------------------------------------------------------
/scripts/prepush.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | npm run lint
6 |
--------------------------------------------------------------------------------
/src/accordion/accordion.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { Accordion } from "./accordion.component";
5 | import { AccordionItem } from "./accordion-item.component";
6 | import { IconModule } from "carbon-components-angular/icon";
7 |
8 | @NgModule({
9 | declarations: [
10 | Accordion,
11 | AccordionItem
12 | ],
13 | exports: [
14 | Accordion,
15 | AccordionItem
16 | ],
17 | imports: [
18 | CommonModule,
19 | IconModule
20 | ]
21 | })
22 | export class AccordionModule { }
23 |
--------------------------------------------------------------------------------
/src/accordion/index.ts:
--------------------------------------------------------------------------------
1 | export { AccordionItem } from "./accordion-item.component";
2 | export { Accordion } from "./accordion.component";
3 | export { AccordionModule } from "./accordion.module";
4 |
--------------------------------------------------------------------------------
/src/accordion/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/breadcrumb/breadcrumb-item.interface.ts:
--------------------------------------------------------------------------------
1 | import { TemplateRef } from "@angular/core";
2 |
3 | /**
4 | * A structure that represents a breadcrumb item.
5 | */
6 | export interface BreadcrumbItem {
7 | /**
8 | * Content to be displayed in the breadcrumb item.
9 | */
10 | content: string;
11 | /**
12 | * Href for the breadcrumb item.
13 | */
14 | href?: string;
15 | /**
16 | * Array of commands to send to the router when the link is activated
17 | * See: https://angular.io/api/router/Router#navigate
18 | */
19 | route?: any[];
20 | /**
21 | * Router options. Used in conjunction with `route`
22 | * See: https://angular.io/api/router/Router#navigate
23 | */
24 | routeExtras?: any;
25 | /**
26 | * Optional `TemplateRef` for the breadcrumb item. Receives the content as an `$implicit` template variable
27 | */
28 | template?: TemplateRef;
29 | /**
30 | * aria-current for the breadcrumb item.
31 | */
32 | ariaCurrent?: string;
33 | /**
34 | * Sets the current class for the breadcrumb item.
35 | */
36 | current?: boolean;
37 | }
38 |
--------------------------------------------------------------------------------
/src/breadcrumb/breadcrumb.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { DialogModule } from "carbon-components-angular/dialog";
5 | import { I18nModule } from "carbon-components-angular/i18n";
6 |
7 | import { Breadcrumb } from "./breadcrumb.component";
8 | import { BreadcrumbItemComponent } from "./breadcrumb-item.component";
9 | import { ButtonModule } from "carbon-components-angular/button";
10 | import { IconModule } from "carbon-components-angular/icon";
11 |
12 | @NgModule({
13 | declarations: [
14 | Breadcrumb,
15 | BreadcrumbItemComponent
16 | ],
17 | exports: [
18 | Breadcrumb,
19 | BreadcrumbItemComponent
20 | ],
21 | imports: [
22 | CommonModule,
23 | ButtonModule,
24 | DialogModule,
25 | I18nModule,
26 | IconModule
27 | ]
28 | })
29 | export class BreadcrumbModule { }
30 |
--------------------------------------------------------------------------------
/src/breadcrumb/index.ts:
--------------------------------------------------------------------------------
1 | export { Breadcrumb } from "./breadcrumb.component";
2 | export { BreadcrumbItemComponent } from "./breadcrumb-item.component";
3 | export { BreadcrumbItem } from "./breadcrumb-item.interface";
4 | export { BreadcrumbModule } from "./breadcrumb.module";
5 |
--------------------------------------------------------------------------------
/src/breadcrumb/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/button/button-set.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, HostBinding } from "@angular/core";
2 |
3 | /**
4 | * Get started with importing the module:
5 | *
6 | * ```typescript
7 | * import { ButtonModule } from 'carbon-components-angular';
8 | * ```
9 | *
10 | * [See demo](../../?path=/story/components-button-button-set--basic)
11 | */
12 | @Component({
13 | selector: "cds-button-set, ibm-button-set",
14 | template: ""
15 | })
16 | export class ButtonSet {
17 | @HostBinding("class.cds--btn-set") buttonSetClass = true;
18 | }
19 |
--------------------------------------------------------------------------------
/src/button/button-set.stories.ts:
--------------------------------------------------------------------------------
1 | /* tslint:disable variable-name */
2 |
3 | import { moduleMetadata, Meta } from "@storybook/angular";
4 | import { IconModule } from "../icon";
5 | import { ButtonModule, ButtonSet } from "./";
6 |
7 | export default {
8 | title: "Components/Button/Button Set",
9 | decorators: [
10 | moduleMetadata({
11 | imports: [
12 | ButtonModule,
13 | IconModule
14 | ]
15 | })
16 | ],
17 | parameters: {
18 | layout: "centered"
19 | },
20 | component: ButtonSet
21 | } as Meta;
22 |
23 | const Template = (args) => ({
24 | props: args,
25 | template: `
26 |
27 |
28 |
29 |
30 | `
31 | });
32 | export const Basic = Template.bind({});
33 |
--------------------------------------------------------------------------------
/src/button/button.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { Button } from "./button.directive";
5 | import { ButtonSet } from "./button-set.component";
6 | import { BaseIconButton } from "./base-icon-button.component";
7 | import { IconButton } from "./icon-button.component";
8 |
9 | import { TooltipModule } from "carbon-components-angular/tooltip";
10 |
11 | @NgModule({
12 | declarations: [
13 | Button,
14 | ButtonSet,
15 | BaseIconButton,
16 | IconButton
17 | ],
18 | exports: [
19 | Button,
20 | ButtonSet,
21 | IconButton
22 | ],
23 | imports: [CommonModule, TooltipModule]
24 | })
25 | export class ButtonModule { }
26 |
--------------------------------------------------------------------------------
/src/button/button.types.ts:
--------------------------------------------------------------------------------
1 | export type DangerButtonType = "danger--primary" | "danger--tertiary" | "danger--ghost";
2 | export type ButtonType = "primary" | "secondary" | "tertiary" | "ghost" | "danger" | DangerButtonType;
3 |
4 | export type ButtonSize = "sm" | "md" | "lg" | "xl" | "2xl";
5 |
--------------------------------------------------------------------------------
/src/button/index.ts:
--------------------------------------------------------------------------------
1 | export { Button } from "./button.directive";
2 | export { ButtonSet } from "./button-set.component";
3 | export { IconButton } from "./icon-button.component";
4 | export { BaseIconButton } from "./base-icon-button.component";
5 | export { ButtonModule } from "./button.module";
6 | export { ButtonSize, ButtonType, DangerButtonType } from "./button.types";
7 |
--------------------------------------------------------------------------------
/src/button/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/checkbox/checkbox.module.ts:
--------------------------------------------------------------------------------
1 | // modules
2 | import { NgModule } from "@angular/core";
3 | import { FormsModule } from "@angular/forms";
4 | import { CommonModule } from "@angular/common";
5 |
6 | // imports
7 | import { Checkbox } from "./checkbox.component";
8 |
9 | @NgModule({
10 | declarations: [
11 | Checkbox
12 | ],
13 | exports: [
14 | Checkbox
15 | ],
16 | imports: [
17 | CommonModule,
18 | FormsModule
19 | ]
20 | })
21 | export class CheckboxModule { }
22 |
--------------------------------------------------------------------------------
/src/checkbox/checkbox.types.ts:
--------------------------------------------------------------------------------
1 | export type CheckboxValue = boolean | "on" | "off";
2 |
--------------------------------------------------------------------------------
/src/checkbox/index.ts:
--------------------------------------------------------------------------------
1 | export { Checkbox, CheckboxState } from "./checkbox.component";
2 | export { CheckboxModule } from "./checkbox.module";
3 | export { CheckboxValue } from "./checkbox.types";
4 |
--------------------------------------------------------------------------------
/src/checkbox/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/checkbox/stories/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./reactive-form.component";
2 |
--------------------------------------------------------------------------------
/src/code-snippet/code-snippet.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
2 | import { ComponentFixture, TestBed } from "@angular/core/testing";
3 | import { I18nModule } from "../i18n/index";
4 | import { IconModule } from "../icon/index";
5 | import { UtilsModule } from "../utils/index";
6 |
7 | import { CodeSnippet } from "./code-snippet.component";
8 |
9 | describe("CodeSnippet", () => {
10 | let component: CodeSnippet;
11 | let fixture: ComponentFixture;
12 |
13 | beforeEach(() => {
14 | TestBed.configureTestingModule({
15 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
16 | declarations: [CodeSnippet],
17 | imports: [
18 | I18nModule,
19 | IconModule,
20 | UtilsModule
21 | ]
22 | });
23 |
24 | fixture = TestBed.createComponent(CodeSnippet);
25 | component = fixture.componentInstance;
26 | });
27 |
28 | it("should work", () => {
29 | expect(component instanceof CodeSnippet).toBe(true);
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/src/code-snippet/code-snippet.module.ts:
--------------------------------------------------------------------------------
1 | // modules
2 | import { NgModule } from "@angular/core";
3 | import { CommonModule } from "@angular/common";
4 | import { ButtonModule } from "carbon-components-angular/button";
5 | import { IconModule } from "carbon-components-angular/icon";
6 | import { I18nModule } from "carbon-components-angular/i18n";
7 | import { UtilsModule } from "carbon-components-angular/utils";
8 |
9 | // imports
10 | import { CodeSnippet } from "./code-snippet.component";
11 |
12 | @NgModule({
13 | declarations: [
14 | CodeSnippet
15 | ],
16 | exports: [
17 | CodeSnippet
18 | ],
19 | imports: [
20 | CommonModule,
21 | ButtonModule,
22 | I18nModule,
23 | UtilsModule,
24 | IconModule
25 | ]
26 | })
27 | export class CodeSnippetModule { }
28 |
--------------------------------------------------------------------------------
/src/code-snippet/index.ts:
--------------------------------------------------------------------------------
1 | export { CodeSnippet, SnippetType } from "./code-snippet.component";
2 | export * from "./code-snippet.module";
3 |
--------------------------------------------------------------------------------
/src/code-snippet/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/combo-button/combo-button.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { IconModule } from "carbon-components-angular/icon";
5 | import { ContextMenuModule } from "carbon-components-angular/context-menu";
6 | import { ButtonModule } from "carbon-components-angular/button";
7 |
8 | import { ComboButtonComponent } from "./combo-button.component";
9 |
10 | @NgModule({
11 | imports: [
12 | CommonModule,
13 | ButtonModule,
14 | IconModule,
15 | ContextMenuModule
16 | ],
17 | exports: [ComboButtonComponent],
18 | declarations: [ComboButtonComponent]
19 | })
20 | export class ComboButtonModule { }
21 |
--------------------------------------------------------------------------------
/src/combo-button/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./combo-button.component";
2 | export * from "./combo-button.module";
3 |
--------------------------------------------------------------------------------
/src/combo-button/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/combobox/combobox.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { ComboBox } from "./combobox.component";
5 | import { DropdownModule, DropdownService } from "carbon-components-angular/dropdown";
6 | import { I18nModule } from "carbon-components-angular/i18n";
7 | import { UtilsModule } from "carbon-components-angular/utils";
8 | import { IconModule } from "carbon-components-angular/icon";
9 |
10 | @NgModule({
11 | declarations: [
12 | ComboBox
13 | ],
14 | exports: [
15 | ComboBox,
16 | DropdownModule
17 | ],
18 | imports: [
19 | CommonModule,
20 | DropdownModule,
21 | I18nModule,
22 | UtilsModule,
23 | IconModule
24 | ],
25 | providers: [ DropdownService ]
26 | })
27 | export class ComboBoxModule {}
28 |
--------------------------------------------------------------------------------
/src/combobox/index.ts:
--------------------------------------------------------------------------------
1 | export { ComboBox } from "./combobox.component";
2 | export * from "./combobox.module";
3 |
--------------------------------------------------------------------------------
/src/combobox/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/combobox/stories/app-dynamic-list-combobox.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, AfterViewInit } from "@angular/core";
2 |
3 | @Component({
4 | selector: "app-dynamic-list-combobox",
5 | template: `
6 |
10 |
11 |
12 | `
13 | })
14 | export class DynamicListComboBox implements AfterViewInit {
15 | items = [
16 | {
17 | content: "one"
18 | },
19 | {
20 | content: "two"
21 | },
22 | {
23 | content: "three"
24 | },
25 | {
26 | content: "four"
27 | }
28 | ];
29 |
30 | updateSelected(event) {
31 | this.items.forEach((item: any) => {
32 | if (event.some(selectedItem => selectedItem.content === item.content)) {
33 | item.selected = true;
34 | } else {
35 | item.selected = false;
36 | }
37 | });
38 | }
39 |
40 | ngAfterViewInit() {
41 | setTimeout(() => {
42 | const newItems = JSON.parse(JSON.stringify(this.items));
43 | newItems.push({ content: `New ${newItems.length}` });
44 | this.items = newItems;
45 | }, 4000);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/combobox/stories/app-mock-query-search.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 |
3 | @Component({
4 | selector: "app-mock-query-search",
5 | template: `
6 |
10 |
11 |
12 | `
13 | })
14 | export class MockQueryCombobox {
15 | filterItems: any = [];
16 |
17 | onSearch() {
18 | // Call API or search through items list
19 | setTimeout(() => {
20 | this.filterItems = [
21 | { content: `Random ${Math.random()}` },
22 | { content: `Random ${Math.random()}` },
23 | { content: `Random ${Math.random()}` },
24 | { content: `Random ${Math.random()}` }
25 | ];
26 | }, 1000);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/combobox/stories/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./app-dynamic-list-combobox.component";
2 | export * from "./app-mock-query-search.component";
3 | export * from "./app-reactive-combobox.component";
4 |
--------------------------------------------------------------------------------
/src/common/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | cycleTabs,
3 | focusFirstFocusableElement,
4 | focusLastFocusableElement,
5 | getFocusElementList,
6 | isElementFocused,
7 | isFocusInFirstItem,
8 | isFocusInLastItem,
9 | isVisible,
10 | tabbableSelector,
11 | tabbableSelectorIgnoreTabIndex
12 | } from "./tab.service";
13 | export { range } from "./utils";
14 |
--------------------------------------------------------------------------------
/src/common/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/common/utils.spec.ts:
--------------------------------------------------------------------------------
1 | import * as utils from "./utils";
2 |
3 | describe("utils", () => {
4 | it("range should work", () => {
5 | expect(utils.range(5)).toEqual([0, 1, 2, 3, 4]);
6 | });
7 |
8 | it("range with start should work", () => {
9 | expect(utils.range(5, 2)).toEqual([2, 3, 4]);
10 | });
11 |
12 | it("range with step should work", () => {
13 | expect(utils.range(5, 0, 2)).toEqual([0, 2, 4]);
14 | });
15 |
16 | it("range with start and step should work", () => {
17 | expect(utils.range(7, 2, 2)).toEqual([2, 4, 6]);
18 | });
19 |
20 | it("range with negative step should work", () => {
21 | expect(utils.range(-5, 0, -1)).toEqual([0, -1, -2, -3, -4]);
22 | });
23 |
24 | it("range with negative start and step should work", () => {
25 | expect(utils.range(-5, -1, -1)).toEqual([-1, -2, -3, -4]);
26 | });
27 |
28 | it("range with positive start and negative end and step should work", () => {
29 | expect(utils.range(-5, 1, -1)).toEqual([1, 0, -1, -2, -3, -4]);
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/src/common/utils.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Does what python's `range` function does, with a slightly different
3 | * signature because of Typescript limitations.
4 | *
5 | * Useful for numbered loops in angular templates, since we can do
6 | * a normal for loop.
7 | *
8 | * @export
9 | * @param stop Generate numbers up to, but not including this number
10 | * @param [start=0] Starting number of the sequence
11 | * @param [step=1] Difference between each number in the sequence
12 | * @returns an array with resulting numbers
13 | */
14 | export function range(stop: number, start = 0, step = 1) {
15 | return Array(Math.ceil((stop - start) / step)).fill(0).map((x, i) => i * step + start);
16 | }
17 |
--------------------------------------------------------------------------------
/src/contained-list/contained-list.enums.ts:
--------------------------------------------------------------------------------
1 | export enum ContainedListSize {
2 | Small = "sm",
3 | Medium = "md",
4 | Large = "lg",
5 | ExtraLarge = "xl"
6 | }
7 |
8 | export enum ContainedListKind {
9 | OnPage = "on-page",
10 | Disclosed = "disclosed"
11 | }
12 |
--------------------------------------------------------------------------------
/src/contained-list/contained-list.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 | import { ContainedList } from "./contained-list.component";
4 | import { ContainedListItem } from "./contained-list-item.component";
5 | import { IconModule } from "carbon-components-angular/icon";
6 |
7 | @NgModule({
8 | declarations: [ContainedList, ContainedListItem],
9 | exports: [ContainedList, ContainedListItem],
10 | imports: [CommonModule, IconModule]
11 | })
12 | export class ContainedListModule {}
13 |
--------------------------------------------------------------------------------
/src/contained-list/index.ts:
--------------------------------------------------------------------------------
1 | export { ContainedList } from "./contained-list.component";
2 | export { ContainedListItem } from "./contained-list-item.component";
3 | export { ContainedListSize, ContainedListKind } from "./contained-list.enums";
4 | export * from "./contained-list.module";
5 |
--------------------------------------------------------------------------------
/src/contained-list/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/contained-list/stories/contained-list-story.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { IconService } from "../../icon/icon.service";
3 | import Apple16 from "@carbon/icons/es/apple/16";
4 | import Fish16 from "@carbon/icons/es/fish/16";
5 | import Strawberry16 from "@carbon/icons/es/strawberry/16";
6 | import SubtractAlt16 from "@carbon/icons/es/subtract--alt/16";
7 | import Wheat16 from "@carbon/icons/es/wheat/16";
8 | import { CommonModule } from "@angular/common";
9 |
10 | @NgModule({
11 | imports: [CommonModule]
12 | })
13 | export class ContainedListStoryModule {
14 | constructor(private iconService: IconService) {
15 | this.iconService.registerAll([
16 | Apple16,
17 | Fish16,
18 | Strawberry16,
19 | SubtractAlt16,
20 | Wheat16
21 | ]);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/content-switcher/content-switcher.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { ContentSwitcher } from "./content-switcher.component";
5 | import { ContentSwitcherOption } from "./content-switcher-option.directive";
6 |
7 | @NgModule({
8 | declarations: [
9 | ContentSwitcher,
10 | ContentSwitcherOption
11 | ],
12 | exports: [
13 | ContentSwitcher,
14 | ContentSwitcherOption
15 | ],
16 | imports: [CommonModule]
17 | })
18 | export class ContentSwitcherModule { }
19 |
--------------------------------------------------------------------------------
/src/content-switcher/content-switcher.stories.ts:
--------------------------------------------------------------------------------
1 | /* tslint:disable variable-name */
2 |
3 | import { moduleMetadata, Meta } from "@storybook/angular";
4 | import {
5 | ContentSwitcherModule,
6 | ContentSwitcher,
7 | ContentSwitcherOption
8 | } from "./";
9 |
10 | export default {
11 | title: "Components/Content Switcher",
12 | decorators: [
13 | moduleMetadata({
14 | imports: [ContentSwitcherModule]
15 | })
16 | ],
17 | argTypes: {
18 | code: {
19 | control: false
20 | }
21 | },
22 | component: ContentSwitcher,
23 | subcomponents: ContentSwitcherOption
24 | } as Meta;
25 |
26 | const Template = (args) => ({
27 | props: args,
28 | template: `
29 |
30 |
31 |
32 |
33 |
34 | `
35 | });
36 | export const Basic = Template.bind({});
37 |
--------------------------------------------------------------------------------
/src/content-switcher/index.ts:
--------------------------------------------------------------------------------
1 | export { ContentSwitcher } from "./content-switcher.component";
2 | export { ContentSwitcherOption } from "./content-switcher-option.directive";
3 | export * from "./content-switcher.module";
4 |
--------------------------------------------------------------------------------
/src/content-switcher/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/context-menu/context-menu-divider.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, HostBinding } from "@angular/core";
2 |
3 | @Component({
4 | selector: "cds-menu-divider, cds-context-menu-divider, ibm-context-menu-divider",
5 | template: ""
6 | })
7 | export class ContextMenuDividerComponent {
8 | @HostBinding("class.cds--menu-item-divider") dividerClass = true;
9 | @HostBinding("attr.role") role = "separator";
10 | }
11 |
--------------------------------------------------------------------------------
/src/context-menu/context-menu-selection.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from "@angular/core";
2 | import { Observable, ReplaySubject } from "rxjs";
3 |
4 | @Injectable()
5 | export class ContextMenuSelectionService {
6 | public selectionObservable: Observable;
7 | private selectionSubject = new ReplaySubject(1);
8 | private value: any[] = [];
9 |
10 | constructor() {
11 | this.selectionObservable = this.selectionSubject.asObservable();
12 | }
13 |
14 | selectRadio(value: any) {
15 | if (!value) {
16 | return;
17 | }
18 | this.selectionSubject.next(value);
19 | this.value = [value];
20 | }
21 |
22 | selectCheckbox(value: any) {
23 | if (!value) {
24 | return;
25 | }
26 | if (this.value.includes(value)) {
27 | this.value = this.value.filter(v => v !== value);
28 | } else {
29 | this.value.push(value);
30 | }
31 | this.selectionSubject.next(this.value);
32 | }
33 |
34 | selectCheckboxes(value: any[]) {
35 | if (!value) {
36 | return;
37 | }
38 | this.value = value;
39 | this.selectionSubject.next(value);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/context-menu/context-menu.module.ts:
--------------------------------------------------------------------------------
1 | import { CommonModule } from "@angular/common";
2 | import { NgModule } from "@angular/core";
3 | import { IconModule } from "carbon-components-angular/icon";
4 |
5 | import { ContextMenuDividerComponent } from "./context-menu-divider.component";
6 | import { ContextMenuGroupComponent } from "./context-menu-group.component";
7 | import { ContextMenuItemComponent } from "./context-menu-item.component";
8 | import { ContextMenuComponent } from "./context-menu.component";
9 |
10 | @NgModule({
11 | declarations: [
12 | ContextMenuDividerComponent,
13 | ContextMenuGroupComponent,
14 | ContextMenuItemComponent,
15 | ContextMenuComponent
16 | ],
17 | exports: [
18 | ContextMenuDividerComponent,
19 | ContextMenuGroupComponent,
20 | ContextMenuItemComponent,
21 | ContextMenuComponent
22 | ],
23 | imports: [CommonModule, IconModule]
24 | })
25 | export class ContextMenuModule { }
26 |
--------------------------------------------------------------------------------
/src/context-menu/context-menu.types.ts:
--------------------------------------------------------------------------------
1 | export interface ItemClickEvent {
2 | type: null | "checkbox" | "radio";
3 | label: string;
4 | info: string;
5 | value: string;
6 | event: MouseEvent & KeyboardEvent;
7 | }
8 |
--------------------------------------------------------------------------------
/src/context-menu/index.ts:
--------------------------------------------------------------------------------
1 | export { ContextMenuModule } from "./context-menu.module";
2 | export { ContextMenuDividerComponent } from "./context-menu-divider.component";
3 | export { ContextMenuGroupComponent } from "./context-menu-group.component";
4 | export { ContextMenuItemComponent } from "./context-menu-item.component";
5 | export { ContextMenuComponent } from "./context-menu.component";
6 | export * from "./context-menu.types";
7 |
--------------------------------------------------------------------------------
/src/context-menu/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/datepicker-input/datepicker-input.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 | import { DatePickerInput } from "./datepicker-input.component";
4 | import { IconModule } from "carbon-components-angular/icon";
5 |
6 | @NgModule({
7 | declarations: [
8 | DatePickerInput
9 | ],
10 | exports: [
11 | DatePickerInput
12 | ],
13 | imports: [
14 | CommonModule,
15 | IconModule
16 | ]
17 | })
18 | export class DatePickerInputModule { }
19 |
--------------------------------------------------------------------------------
/src/datepicker-input/index.ts:
--------------------------------------------------------------------------------
1 | export { DatePickerInputModule } from "./datepicker-input.module";
2 | export { DatePickerInput } from "./datepicker-input.component";
3 |
--------------------------------------------------------------------------------
/src/datepicker-input/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/datepicker/datepicker.module.ts:
--------------------------------------------------------------------------------
1 | import { DatePickerInputModule } from "carbon-components-angular/datepicker-input";
2 | import { NgModule } from "@angular/core";
3 | import { CommonModule } from "@angular/common";
4 | import { DatePicker } from "./datepicker.component";
5 | import { UtilsModule } from "carbon-components-angular/utils";
6 | import { I18nModule } from "carbon-components-angular/i18n";
7 |
8 | @NgModule({
9 | declarations: [
10 | DatePicker
11 | ],
12 | exports: [
13 | DatePicker,
14 | DatePickerInputModule
15 | ],
16 | imports: [
17 | CommonModule,
18 | DatePickerInputModule,
19 | UtilsModule,
20 | I18nModule
21 | ]
22 | })
23 | export class DatePickerModule { }
24 |
--------------------------------------------------------------------------------
/src/datepicker/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./datepicker.component";
2 | export * from "./datepicker.module";
3 |
--------------------------------------------------------------------------------
/src/datepicker/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/dialog/index.ts:
--------------------------------------------------------------------------------
1 | export { DialogService } from "./dialog.service";
2 | export { Dialog } from "./dialog.component";
3 | export { DialogDirective } from "./dialog.directive";
4 |
5 | export { OverflowMenu } from "./overflow-menu/overflow-menu.component";
6 | export { OverflowMenuPane } from "./overflow-menu/overflow-menu-pane.component";
7 | export { OverflowMenuCustomPane } from "./overflow-menu/overflow-menu-custom-pane.component";
8 | export { OverflowMenuDirective } from "./overflow-menu/overflow-menu.directive";
9 | export { OverflowMenuOption } from "./overflow-menu/overflow-menu-option.component";
10 |
11 | export {
12 | DialogConfig,
13 | CloseMeta,
14 | CloseReasons
15 | } from "./dialog-config.interface";
16 |
17 | export { DialogModule } from "./dialog.module";
18 |
--------------------------------------------------------------------------------
/src/dialog/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/documentation-component/documentation.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { Documentation } from "./documentation.component";
5 |
6 | export { Documentation } from "./documentation.component";
7 |
8 | @NgModule({
9 | declarations: [
10 | Documentation
11 | ],
12 | exports: [
13 | Documentation
14 | ],
15 | imports: [
16 | CommonModule
17 | ]
18 | })
19 | export class DocumentationModule { }
20 |
--------------------------------------------------------------------------------
/src/dropdown/index.ts:
--------------------------------------------------------------------------------
1 | export { Dropdown } from "./dropdown.component";
2 | export { DropdownList } from "./list/dropdown-list.component";
3 |
4 | export { ScrollableList } from "./scrollable-list.directive";
5 | export { AbstractDropdownView } from "./abstract-dropdown-view.class";
6 | export { ListItem } from "./list-item.interface";
7 | export { DropdownService } from "./dropdown.service";
8 |
9 | export * from "./dropdown.module";
10 |
--------------------------------------------------------------------------------
/src/dropdown/list/scroll-custom-event.interface.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * A custom structure that represents a custom event to emit when scroll.
3 | *
4 | * ```typescript
5 | * export interface ScrollCustomEvent {
6 | * atTop: boolean;
7 | * atBottom: boolean;
8 | * event: Event;
9 | * }
10 | * ```
11 | */
12 | export interface ScrollCustomEvent {
13 | /**
14 | * Flag to communicate if scroll is at the top of container
15 | */
16 | atTop: boolean;
17 | /**
18 | * Flag to communicate if scroll is at the bottom of container
19 | */
20 | atBottom: boolean;
21 | /**
22 | * Complete Scroll event available to get any more data required
23 | */
24 | event: Event;
25 | }
26 |
--------------------------------------------------------------------------------
/src/dropdown/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/dropdown/stories/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./app-reactive-forms.component";
2 |
--------------------------------------------------------------------------------
/src/experimental/experimental.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, SkipSelf, Optional } from "@angular/core";
2 | import { ExperimentalService } from "./experimental.service";
3 |
4 | // either provides a new instance of ExperimentalService, or returns the parent
5 | export function EXPERIMENTAL_SERVICE_PROVIDER_FACTORY(parentService: ExperimentalService) {
6 | return parentService || new ExperimentalService();
7 | }
8 |
9 | export const EXPERIMENTAL_SERVICE_PROVIDER = {
10 | provide: ExperimentalService,
11 | deps: [[new Optional(), new SkipSelf(), ExperimentalService]],
12 | useFactory: EXPERIMENTAL_SERVICE_PROVIDER_FACTORY
13 | };
14 |
15 | @NgModule({
16 | providers: [
17 | ExperimentalService,
18 | EXPERIMENTAL_SERVICE_PROVIDER
19 | ]
20 | })
21 | export class ExperimentalModule { }
22 |
--------------------------------------------------------------------------------
/src/experimental/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./experimental.module";
2 | export * from "./experimental.service";
3 |
--------------------------------------------------------------------------------
/src/experimental/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/exported-tests/component-tests.ts:
--------------------------------------------------------------------------------
1 | import merge from "lodash-es/merge";
2 |
3 | function isObject(val) {
4 | if (val === null) {
5 | return false;
6 | }
7 | return typeof val === "function" || typeof val === "object";
8 | }
9 |
10 | class ComponentTests {
11 | static defaults = {
12 | selectors: {
13 | root: ""
14 | },
15 | classes: {}
16 | };
17 | settings: any = {};
18 | tests: any[] = [];
19 |
20 | constructor(configs = {}) {
21 | this.settings = merge({}, ComponentTests.defaults, configs);
22 | }
23 |
24 | getTests(tests) {
25 | if (isObject(tests)) {
26 | return Object.keys(tests).map(i => tests[i]);
27 | }
28 | return tests;
29 | }
30 |
31 | getComponent(fragment, selector) {
32 | const root = fragment.querySelector(selector);
33 | return root;
34 | }
35 | }
36 |
37 | export default ComponentTests;
38 |
--------------------------------------------------------------------------------
/src/file-uploader/file-item.interface.ts:
--------------------------------------------------------------------------------
1 | export interface FileItem {
2 | file: File;
3 | state: "edit" | "upload" | "complete";
4 | uploaded: boolean;
5 | invalid?: boolean;
6 | invalidTitle?: string;
7 | invalidText?: string;
8 | }
9 |
--------------------------------------------------------------------------------
/src/file-uploader/file-uploader.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { FileUploader } from "./file-uploader.component";
5 | import { FileComponent } from "./file.component";
6 | import { ButtonModule } from "carbon-components-angular/button";
7 | import { LoadingModule } from "carbon-components-angular/loading";
8 | import { IconModule } from "carbon-components-angular/icon";
9 |
10 | @NgModule({
11 | declarations: [FileUploader, FileComponent],
12 | exports: [FileUploader, FileComponent],
13 | imports: [
14 | CommonModule,
15 | ButtonModule,
16 | LoadingModule,
17 | IconModule
18 | ]
19 | })
20 | export class FileUploaderModule { }
21 |
--------------------------------------------------------------------------------
/src/file-uploader/index.ts:
--------------------------------------------------------------------------------
1 | export { FileUploader } from "./file-uploader.component";
2 | export { FileComponent } from "./file.component";
3 | export * from "./file-item.interface";
4 | export * from "./file-uploader.module";
5 |
--------------------------------------------------------------------------------
/src/file-uploader/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/file-uploader/stories/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./drag-drop.component";
2 | export * from "./uploader-form.component";
3 | export * from "./uploader-reactive-form.component";
4 | export * from "./uploader.component";
5 |
--------------------------------------------------------------------------------
/src/forms/forms.module.ts:
--------------------------------------------------------------------------------
1 | // modules
2 | import { NgModule } from "@angular/core";
3 | import { FormsModule } from "@angular/forms";
4 | import { CommonModule } from "@angular/common";
5 |
6 | // imports
7 | import { CheckboxModule } from "carbon-components-angular/checkbox";
8 | import { ToggleModule } from "carbon-components-angular/toggle";
9 | import { RadioModule } from "carbon-components-angular/radio";
10 | import { InputModule } from "carbon-components-angular/input";
11 | import { ButtonModule } from "carbon-components-angular/button";
12 |
13 | @NgModule({
14 | exports: [
15 | CheckboxModule,
16 | ToggleModule,
17 | RadioModule,
18 | InputModule,
19 | ButtonModule,
20 | InputModule
21 | ],
22 | imports: [
23 | CommonModule,
24 | FormsModule,
25 | CheckboxModule,
26 | ToggleModule,
27 | RadioModule,
28 | InputModule,
29 | ButtonModule
30 | ]
31 | })
32 | export class NFormsModule { }
33 |
--------------------------------------------------------------------------------
/src/forms/index.ts:
--------------------------------------------------------------------------------
1 | // export the forms module
2 | export { NFormsModule } from "./forms.module";
3 |
4 | // re-export from form related modules and components
5 | export {
6 | CheckboxModule,
7 | Checkbox,
8 | CheckboxState,
9 | CheckboxValue
10 | } from "carbon-components-angular/checkbox";
11 | export {
12 | ToggleModule,
13 | Toggle,
14 | ToggleState
15 | } from "carbon-components-angular/toggle";
16 | export {
17 | RadioModule,
18 | Radio,
19 | RadioChange,
20 | RadioGroup
21 | } from "carbon-components-angular/radio";
22 | export {
23 | InputModule,
24 | Label,
25 | TextArea,
26 | TextInput,
27 | TextInputLabelComponent,
28 | TextareaLabelComponent
29 | } from "carbon-components-angular/input";
30 | export {
31 | ButtonModule,
32 | Button,
33 | ButtonSize,
34 | ButtonType,
35 | ButtonSet,
36 | DangerButtonType,
37 | IconButton
38 | } from "carbon-components-angular/button";
39 |
--------------------------------------------------------------------------------
/src/forms/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/grid/grid.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { ColumnDirective } from "./column.directive";
5 | import { RowDirective } from "./row.directive";
6 | import { GridDirective } from "./grid.directive";
7 | import { GridService } from "./grid.service";
8 |
9 | @NgModule({
10 | declarations: [
11 | ColumnDirective,
12 | GridDirective,
13 | RowDirective
14 | ],
15 | exports: [
16 | ColumnDirective,
17 | GridDirective,
18 | RowDirective
19 | ],
20 | providers: [GridService],
21 | imports: [CommonModule]
22 | })
23 | export class GridModule {}
24 |
--------------------------------------------------------------------------------
/src/grid/grid.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from "@angular/core";
2 | import { BehaviorSubject, Observable } from "rxjs";
3 |
4 | @Injectable()
5 | export class GridService {
6 | public gridObservable: Observable;
7 | private gridSubject = new BehaviorSubject(false);
8 | private cssGridEnabled = false;
9 |
10 | constructor() {
11 | this.gridObservable = this.gridSubject.asObservable();
12 | }
13 |
14 | /**
15 | * Ping all subscribers to update to use Css Grid
16 | * @param enableCssGrid
17 | */
18 | updateGridType(enableCssGrid: boolean) {
19 | if (this.cssGridEnabled === enableCssGrid) {
20 | return;
21 | }
22 |
23 | this.cssGridEnabled = true;
24 | this.gridSubject.next(enableCssGrid);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/grid/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./grid.module";
2 | export * from "./grid.directive";
3 | export * from "./grid.service";
4 | export * from "./row.directive";
5 | export * from "./column.directive";
6 |
--------------------------------------------------------------------------------
/src/grid/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/grid/row.directive.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Directive,
3 | HostBinding,
4 | Input
5 | } from "@angular/core";
6 |
7 | @Directive({
8 | selector: "[cdsRow], [ibmRow]"
9 | })
10 | export class RowDirective {
11 | @HostBinding("class.cds--row") baseClass = true;
12 | @HostBinding("class.cds--row--condensed") @Input() condensed = false;
13 | @HostBinding("class.cds--row--narrow") @Input() narrow = false;
14 | }
15 |
--------------------------------------------------------------------------------
/src/i18n/i18n.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, SkipSelf, Optional } from "@angular/core";
2 |
3 | import { I18n } from "./i18n.service";
4 | import { ReplacePipe } from "./replace.pipe";
5 |
6 | // either provides a new instance of I18n, or returns the parent
7 | export function I18N_SERVICE_PROVIDER_FACTORY(parentService: I18n) {
8 | return parentService || new I18n();
9 | }
10 |
11 | // I18n should provide a single instance of itself to ensure that translations are consistent through the app
12 | export const I18N_SERVICE_PROVIDER = {
13 | provide: I18n,
14 | deps: [[new Optional(), new SkipSelf(), I18n]],
15 | useFactory: I18N_SERVICE_PROVIDER_FACTORY
16 | };
17 |
18 | @NgModule({
19 | declarations: [ReplacePipe],
20 | exports: [ReplacePipe],
21 | providers: [
22 | I18n,
23 | I18N_SERVICE_PROVIDER
24 | ]
25 | })
26 | export class I18nModule {}
27 |
--------------------------------------------------------------------------------
/src/i18n/index.ts:
--------------------------------------------------------------------------------
1 | export { I18n, replace, Overridable } from "./i18n.service";
2 | export { ReplacePipe } from "./replace.pipe";
3 | export * from "./i18n.module";
4 |
--------------------------------------------------------------------------------
/src/i18n/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/i18n/replace.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from "@angular/core";
2 | import { replace } from "./i18n.service";
3 |
4 | @Pipe({
5 | name: "i18nReplace"
6 | })
7 | export class ReplacePipe implements PipeTransform {
8 | transform(value, variables) {
9 | return replace(value, variables);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/icon/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./public_api";
2 |
--------------------------------------------------------------------------------
/src/icon/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "public_api.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/icon/public_api.ts:
--------------------------------------------------------------------------------
1 | export {
2 | IconDirective
3 | } from "./icon.directive";
4 | export {
5 | ICON_SERVICE_PROVIDER,
6 | ICON_SERVICE_PROVIDER_FACTORY,
7 | IconModule
8 | } from "./icon.module";
9 | export {
10 | IconCache,
11 | IconDescriptor,
12 | IconMemoryCache,
13 | IconNameNotFoundError,
14 | IconService,
15 | IconSizeNotFoundError
16 | } from "./icon.service";
17 |
--------------------------------------------------------------------------------
/src/icon/stories/icon-demo.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from "@angular/core";
2 | import { Accessibility16 } from "@carbon/icons";
3 |
4 | import { IconService } from "../";
5 |
6 | @Component({
7 | selector: "app-demo-icon",
8 | template: `
9 |
10 | `
11 | })
12 | export class IconDemo implements OnInit {
13 | constructor(protected iconService: IconService) { }
14 |
15 | ngOnInit() {
16 | this.iconService.register(Accessibility16);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/icon/stories/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./icon-demo.component";
2 | export * from "./many-icons-demo.component";
3 |
--------------------------------------------------------------------------------
/src/inline-loading/index.ts:
--------------------------------------------------------------------------------
1 | export { InlineLoading, InlineLoadingState } from "./inline-loading.component";
2 | export * from "./inline-loading.module";
3 |
--------------------------------------------------------------------------------
/src/inline-loading/inline-loading.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { CommonModule } from "@angular/common";
3 |
4 | import { InlineLoading } from "./inline-loading.component";
5 | import { IconModule } from "carbon-components-angular/icon";
6 |
7 | @NgModule({
8 | declarations: [InlineLoading],
9 | exports: [InlineLoading],
10 | imports: [CommonModule, IconModule]
11 | })
12 | export class InlineLoadingModule { }
13 |
--------------------------------------------------------------------------------
/src/inline-loading/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "entryFile": "index.ts"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/inline-loading/stories/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./inline.component";
2 |
--------------------------------------------------------------------------------
/src/inline-loading/stories/inline.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from "@angular/core";
2 | import { InlineLoadingState } from "../";
3 |
4 | @Component({
5 | selector: "app-inline-loading",
6 | template: `
7 |
13 |
14 |
15 | State: {{ state }}
16 | `
17 | })
18 | export class InlineLoadingStory {
19 | @Input() loadingText = "";
20 | @Input() successText = "";
21 | @Input() errorText = "";
22 |
23 | state = InlineLoadingState.Active;
24 |
25 | toggleState() {
26 | switch (this.state) {
27 | case InlineLoadingState.Inactive: this.state = InlineLoadingState.Active; break;
28 | case InlineLoadingState.Active: this.state = InlineLoadingState.Finished; break;
29 | case InlineLoadingState.Finished: this.state = InlineLoadingState.Error; break;
30 | case InlineLoadingState.Error: this.state = InlineLoadingState.Inactive; break;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/input/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./input.directive";
2 | export * from "./input.module";
3 | export * from "./label.component";
4 | export * from "./text-area.directive";
5 | export * from "./text-input-label.component";
6 | export * from "./textarea-label.component";
7 | export * from "./password-input-label.component";
8 | export * from "./password.directive";
9 |
--------------------------------------------------------------------------------
/src/input/label.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { ComponentFixture, TestBed } from "@angular/core/testing";
2 | import { By } from "@angular/platform-browser";
3 | import { DebugElement } from "@angular/core";
4 |
5 | import { Label } from "./label.component";
6 |
7 | describe("Label", () => {
8 | let component: Label;
9 | let fixture: ComponentFixture