├── projects ├── demo │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── components │ │ │ │ ├── button │ │ │ │ │ ├── button.component.scss │ │ │ │ │ └── button-routing.module.ts │ │ │ │ ├── spacing │ │ │ │ │ ├── spacing.component.scss │ │ │ │ │ ├── spacing.component.ts │ │ │ │ │ ├── spacing-styles.component.ts │ │ │ │ │ ├── spacing-routing.module.ts │ │ │ │ │ ├── spacing-styles-routing.module.ts │ │ │ │ │ ├── spacing.module.ts │ │ │ │ │ ├── spacing-styles.component.scss │ │ │ │ │ └── spacing-styles.module.ts │ │ │ │ ├── form-controls │ │ │ │ │ ├── row.component.html │ │ │ │ │ ├── row.component.ts │ │ │ │ │ └── form-controls-routing.module.ts │ │ │ │ ├── validation │ │ │ │ │ ├── validation.component.scss │ │ │ │ │ └── validation-routing.module.ts │ │ │ │ ├── icon │ │ │ │ │ ├── icon.component.ts │ │ │ │ │ ├── icon-routing.module.ts │ │ │ │ │ └── icon.module.ts │ │ │ │ ├── logo │ │ │ │ │ ├── logo.component.ts │ │ │ │ │ ├── logo-routing.module.ts │ │ │ │ │ └── logo.module.ts │ │ │ │ ├── breakpoints │ │ │ │ │ ├── breakpoints.component.html │ │ │ │ │ ├── breakpoints.component.ts │ │ │ │ │ ├── breakpoints-routing.module.ts │ │ │ │ │ └── breakpoints.module.ts │ │ │ │ ├── drawer │ │ │ │ │ ├── drawer.component.scss │ │ │ │ │ └── drawer-routing.module.ts │ │ │ │ ├── loading-overlay │ │ │ │ │ ├── loading-overlay.component.ts │ │ │ │ │ ├── loading-overlay-routing.module.ts │ │ │ │ │ └── loading-overlay.module.ts │ │ │ │ ├── table │ │ │ │ │ ├── table.component.scss │ │ │ │ │ └── table-routing.module.ts │ │ │ │ ├── typography │ │ │ │ │ ├── typography.component.ts │ │ │ │ │ ├── typography-routing.module.ts │ │ │ │ │ └── typography.module.ts │ │ │ │ ├── scrollbars │ │ │ │ │ ├── scrollbars.component.scss │ │ │ │ │ └── scrollbars-routing.module.ts │ │ │ │ ├── navigation │ │ │ │ │ ├── navigation.component.scss │ │ │ │ │ ├── navigation-routing.module.ts │ │ │ │ │ └── navigation.component.html │ │ │ │ ├── icon-button │ │ │ │ │ ├── icon-button.component.ts │ │ │ │ │ └── icon-button-routing.module.ts │ │ │ │ ├── login-form │ │ │ │ │ ├── login-form.component.html │ │ │ │ │ ├── login-form-routing.module.ts │ │ │ │ │ └── login-form.module.ts │ │ │ │ ├── tooltip │ │ │ │ │ ├── tooltip.component.ts │ │ │ │ │ ├── tooltip-routing.module.ts │ │ │ │ │ └── tooltip.module.ts │ │ │ │ ├── link │ │ │ │ │ ├── link.component.ts │ │ │ │ │ ├── link-routing.module.ts │ │ │ │ │ └── link.module.ts │ │ │ │ ├── card │ │ │ │ │ └── card-routing.module.ts │ │ │ │ ├── chart │ │ │ │ │ ├── chart-routing.module.ts │ │ │ │ │ └── chart.component.html │ │ │ │ ├── chip │ │ │ │ │ └── chip-routing.module.ts │ │ │ │ ├── copy │ │ │ │ │ ├── copy-routing.module.ts │ │ │ │ │ ├── copy.component.ts │ │ │ │ │ └── copy.module.ts │ │ │ │ ├── menu │ │ │ │ │ └── menu-routing.module.ts │ │ │ │ ├── tabs │ │ │ │ │ └── tabs-routing.module.ts │ │ │ │ ├── input │ │ │ │ │ └── input-routing.module.ts │ │ │ │ ├── pipes │ │ │ │ │ ├── pipes-routing.module.ts │ │ │ │ │ ├── pipes.module.ts │ │ │ │ │ └── pipes.component.ts │ │ │ │ ├── radio │ │ │ │ │ └── radio-routing.module.ts │ │ │ │ ├── search │ │ │ │ │ ├── search-routing.module.ts │ │ │ │ │ ├── search.component.ts │ │ │ │ │ ├── search.component.html │ │ │ │ │ └── search.module.ts │ │ │ │ ├── select │ │ │ │ │ └── select-routing.module.ts │ │ │ │ ├── toggle │ │ │ │ │ ├── toggle-routing.module.ts │ │ │ │ │ └── toggle.module.ts │ │ │ │ ├── checkbox │ │ │ │ │ └── checkbox-routing.module.ts │ │ │ │ ├── popover │ │ │ │ │ └── popover-routing.module.ts │ │ │ │ ├── autofocus │ │ │ │ │ ├── autofocus-routing.module.ts │ │ │ │ │ └── autofocus.component.ts │ │ │ │ ├── csv-entry │ │ │ │ │ └── csv-entry-routing.module.ts │ │ │ │ ├── date-range │ │ │ │ │ └── date-range-routing.module.ts │ │ │ │ ├── paginator │ │ │ │ │ └── paginator-routing.module.ts │ │ │ │ ├── file-upload │ │ │ │ │ └── file-upload-routing.module.ts │ │ │ │ ├── autocomplete │ │ │ │ │ └── autocomplete-routing.module.ts │ │ │ │ ├── confirmation │ │ │ │ │ └── confirmation-routing.module.ts │ │ │ │ ├── selection-list │ │ │ │ │ └── selection-list-routing.module.ts │ │ │ │ ├── expansion-panel │ │ │ │ │ └── expansion-panel-routing.module.ts │ │ │ │ └── cohort-date-range │ │ │ │ │ └── cohort-date-range-routing.module.ts │ │ │ ├── app.component.spec.ts │ │ │ └── app-routing.module.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── typings.d.ts │ │ ├── tslint.json │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── main.ts │ │ ├── index.html │ │ └── styles.scss │ ├── stylelint.config.js │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── browserslist ├── visual-regression │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── components │ │ │ │ ├── components.component.html │ │ │ │ ├── components.component.ts │ │ │ │ ├── validation │ │ │ │ │ ├── validation.component.scss │ │ │ │ │ └── validation-routing.module.ts │ │ │ │ ├── button │ │ │ │ │ ├── button.component.ts │ │ │ │ │ └── button-routing.module.ts │ │ │ │ ├── card │ │ │ │ │ └── card-routing.module.ts │ │ │ │ ├── chip │ │ │ │ │ └── chip-routing.module.ts │ │ │ │ ├── input │ │ │ │ │ ├── input-routing.module.ts │ │ │ │ │ └── input.module.ts │ │ │ │ ├── paginator │ │ │ │ │ └── paginator-routing.module.ts │ │ │ │ ├── selection-list │ │ │ │ │ └── selection-list-routing.module.ts │ │ │ │ └── expansion-panel │ │ │ │ │ ├── expansion-panel-routing.module.ts │ │ │ │ │ └── expansion-panel.component.ts │ │ │ └── app.component.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── tsconfig.app.json │ │ ├── main.ts │ │ ├── styles.scss │ │ ├── index.html │ │ └── test.ts │ ├── stylelint.config.js │ ├── e2e │ │ └── tsconfig.json │ ├── tsconfig.spec.json │ ├── tsconfig.app.json │ └── browserslist └── library │ ├── src │ ├── public-api.ts │ └── index.ts │ ├── button │ ├── src │ │ └── public-api.ts │ └── package.json │ ├── card │ ├── src │ │ ├── public-api.ts │ │ └── card.module.ts │ └── package.json │ ├── chart │ ├── src │ │ ├── public-api.ts │ │ ├── chart.component.html │ │ ├── chart.component.scss │ │ └── amcharts.service.spec.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── chip │ ├── src │ │ ├── public-api.ts │ │ ├── chip-collection.component.html │ │ ├── chip.component.html │ │ ├── chip-collection.component.scss │ │ └── chip-badge.directive.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── copy │ ├── src │ │ ├── public-api.ts │ │ └── copy.module.ts │ └── package.json │ ├── drawer │ ├── src │ │ ├── public-api.ts │ │ ├── drawer-header-footer.component.html │ │ ├── drawer.component.html │ │ └── drawer-container.component.html │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── icon │ ├── src │ │ ├── public-api.ts │ │ ├── custom-icons │ │ │ └── table-large-plus.ts │ │ ├── icon.module.ts │ │ ├── design-decisions.md │ │ └── icon.component.html │ └── package.json │ ├── input │ ├── src │ │ ├── public-api.ts │ │ └── input-value-accessor.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── link │ ├── src │ │ ├── public-api.ts │ │ ├── link.module.ts │ │ └── link.component.html │ └── package.json │ ├── logo │ ├── src │ │ ├── public-api.ts │ │ ├── logo.component.html │ │ ├── logo.module.ts │ │ └── logo.component.scss │ └── package.json │ ├── menu │ ├── src │ │ ├── public-api.ts │ │ └── menu.module.ts │ └── package.json │ ├── option │ ├── src │ │ ├── public-api.ts │ │ ├── option-display.directive.ts │ │ ├── optgroup.component.html │ │ └── optgroup.component.scss │ └── package.json │ ├── pipes │ ├── src │ │ ├── public-api.ts │ │ ├── sentence-case │ │ │ └── sentence-case.pipe.ts │ │ ├── title-case │ │ │ ├── title-case.pipe.spec.ts │ │ │ └── title-case.pipe.ts │ │ └── round-number │ │ │ └── round-number.pipe.spec.ts │ └── package.json │ ├── scss │ ├── input │ │ ├── _input.scss │ │ └── _input-placeholder.scss │ ├── reset │ │ ├── _reset.spec.scss │ │ └── _reset.scss │ ├── triangle │ │ └── _triangle.spec.scss │ ├── global │ │ ├── _custom-properties.scss │ │ ├── terminus-ui.scss │ │ └── _generated-classes.scss │ ├── docs │ │ └── assets │ │ │ ├── acc.png │ │ │ ├── na.png │ │ │ ├── prim.png │ │ │ ├── util.png │ │ │ ├── warn.png │ │ │ ├── acc-d.png │ │ │ ├── acc-l.png │ │ │ ├── acc-xd.png │ │ │ ├── acc-xl.png │ │ │ ├── prim-d.png │ │ │ ├── prim-l.png │ │ │ ├── pure-d.png │ │ │ ├── pure-l.png │ │ │ ├── util-d.png │ │ │ ├── util-l.png │ │ │ ├── warn-d.png │ │ │ ├── warn-l.png │ │ │ ├── prim-xd.png │ │ │ ├── prim-xl.png │ │ │ ├── util-xd.png │ │ │ └── util-xl.png │ ├── utilities │ │ └── _utilities.scss │ ├── layout │ │ ├── _layout.scss │ │ ├── _center-content.scss │ │ ├── _take-space.scss │ │ ├── _pseudo.scss │ │ └── _visually-hidden.scss │ ├── color │ │ └── _color.spec.scss │ ├── buttons │ │ ├── _buttons.scss │ │ └── _buttons.spec.scss │ ├── theme │ │ └── _theme.scss │ ├── cursors │ │ └── _cursors.spec.scss │ ├── menu │ │ └── _menu.scss │ ├── a11y │ │ └── _a11y.spec.scss │ └── card │ │ └── _card.scss │ ├── search │ ├── src │ │ ├── public-api.ts │ │ ├── search.component.scss │ │ └── search.module.ts │ └── package.json │ ├── select │ ├── src │ │ └── public-api.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── sort │ ├── src │ │ ├── public-api.ts │ │ ├── sort.directive.spec.ts │ │ └── sort-errors.ts │ └── package.json │ ├── table │ ├── src │ │ └── public-api.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── tabs │ ├── src │ │ ├── public-api.ts │ │ ├── tab │ │ │ └── tab.component.html │ │ ├── body │ │ │ ├── tab-body.component.html │ │ │ ├── tab-body.component.scss │ │ │ └── tab-content.directive.ts │ │ ├── label │ │ │ └── tab-label.directive.ts │ │ └── collection │ │ │ └── tab-collection.component.scss │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── toggle │ ├── src │ │ ├── public-api.ts │ │ ├── toggle.component.scss │ │ ├── toggle.component.html │ │ ├── toggle.component.md │ │ └── toggle.module.ts │ └── package.json │ ├── checkbox │ ├── src │ │ ├── public-api.ts │ │ ├── checkbox.component.html │ │ └── checkbox.module.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── popover │ ├── src │ │ ├── public-api.ts │ │ ├── popover.component.html │ │ └── popover.module.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── spacing │ ├── src │ │ ├── public-api.ts │ │ └── spacing.module.ts │ └── package.json │ ├── tooltip │ ├── src │ │ ├── public-api.ts │ │ ├── tooltip.component.html │ │ └── tooltip.module.ts │ ├── testing │ │ ├── src │ │ │ ├── public-api.ts │ │ │ └── test-helpers.ts │ │ └── package.json │ └── package.json │ ├── autofocus │ ├── src │ │ ├── public-api.ts │ │ └── autofocus.module.ts │ └── package.json │ ├── csv-entry │ ├── src │ │ └── public-api.ts │ └── package.json │ ├── date-range │ ├── src │ │ ├── public-api.ts │ │ ├── date-range.component.scss │ │ └── date-range.module.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── file-upload │ ├── src │ │ ├── public-api.ts │ │ ├── image-dimensions.ts │ │ ├── image-dimension-constraints.ts │ │ └── mime-types.ts │ └── package.json │ ├── form-field │ ├── src │ │ ├── public-api.ts │ │ ├── prefix.directive.ts │ │ ├── suffix.directive.ts │ │ ├── custom-validation.directive.ts │ │ └── label.directive.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── icon-button │ ├── src │ │ ├── public-api.ts │ │ ├── icon-button.component.html │ │ └── icon-button.module.ts │ └── package.json │ ├── login-form │ ├── src │ │ ├── public-api.ts │ │ ├── login-form.component.scss │ │ └── login-form.component.md │ └── package.json │ ├── navigation │ ├── src │ │ └── public-api.ts │ └── package.json │ ├── paginator │ ├── src │ │ └── public-api.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── radio-group │ ├── src │ │ ├── public-api.ts │ │ └── design-decisions.md │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── scrollbars │ ├── src │ │ ├── public-api.ts │ │ ├── scrollbars.component.scss │ │ ├── scrollbars.module.ts │ │ └── scrollbars.component.html │ └── package.json │ ├── utilities │ ├── src │ │ ├── public-api.ts │ │ ├── types │ │ │ └── style-theme.types.ts │ │ ├── strip-control-characters │ │ │ ├── strip-control-characters.spec.ts │ │ │ └── strip-control-characters.ts │ │ ├── cva-provider-factory │ │ │ ├── cva-provider-factory.spec.ts │ │ │ └── cva-provider-factory.ts │ │ ├── version │ │ │ ├── version.ts │ │ │ └── version.spec.ts │ │ ├── error │ │ │ ├── ui-error.ts │ │ │ └── ui-error.spec.ts │ │ └── merge │ │ │ └── merge.ts │ └── package.json │ ├── validators │ ├── src │ │ ├── public-api.ts │ │ └── validators.module.ts │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── autocomplete │ ├── src │ │ ├── public-api.ts │ │ └── autocomplete-panel │ │ │ └── autocomplete-panel.component.html │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── confirmation │ ├── src │ │ ├── public-api.ts │ │ └── confirmation-overlay.component.html │ └── package.json │ ├── expansion-panel │ ├── src │ │ ├── public-api.ts │ │ ├── trigger │ │ │ ├── expansion-panel-trigger.component.html │ │ │ ├── expansion-panel-trigger-title.component.ts │ │ │ └── expansion-panel-trigger-description.component.ts │ │ └── expansion-panel.component.html │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── loading-overlay │ ├── src │ │ ├── public-api.ts │ │ ├── loading-overlay.component.html │ │ ├── loading-overlay.component.ts │ │ └── loading-overlay.module.ts │ └── package.json │ ├── selection-list │ ├── src │ │ ├── public-api.ts │ │ └── selection-list-panel │ │ │ └── selection-list-panel.component.html │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── cohort-date-range │ ├── src │ │ ├── public-api.ts │ │ └── cohort-date-range.component.scss │ ├── testing │ │ ├── src │ │ │ └── public-api.ts │ │ └── package.json │ └── package.json │ ├── validation-messages │ ├── src │ │ ├── public-api.ts │ │ └── validation-messages.component.html │ ├── testing │ │ ├── package.json │ │ └── src │ │ │ ├── public-api.ts │ │ │ ├── validation-messages.service.mock.ts │ │ │ └── test-helpers.ts │ └── package.json │ ├── tsconfig.lib.prod.json │ ├── typings.d.ts │ ├── tsconfig.compodoc.json │ ├── tsconfig.lint.json │ ├── tsconfig.spec.json │ └── tsconfig.lib.json ├── cypress.json ├── .eslintignore ├── .github ├── CODEOWNERS ├── workflows │ ├── pr-labeler.yml │ ├── auto-assign-pr.yml │ └── label-approved-pr.yml ├── labeler.yml └── ISSUE_TEMPLATE │ └── feature_request.md ├── .ctrlpignore ├── cypress ├── fixtures │ └── example.json ├── integration │ └── spin-up.js └── support │ └── index.js ├── tooling ├── ci │ ├── rename-typings-index.sh │ ├── test-unit.sh │ ├── report-system-name.sh │ ├── replace-docs-emoji.js │ ├── build-demos-aot.sh │ ├── demos-predeploy.sh │ └── inject-library-version-number.sh ├── jest-setup.ts └── mark-small.svg ├── ngcc.config.js ├── .editorconfig ├── jest.library.config.js ├── jest.demo.config.js ├── .gitignore ├── jest.visual-regression.config.js └── .codecov.yml /projects/demo/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projects/visual-regression/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projects/library/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "watchForFileChanges": true 3 | } 4 | -------------------------------------------------------------------------------- /projects/library/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './public-api'; 2 | -------------------------------------------------------------------------------- /projects/demo/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /projects/library/button/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './button.module'; 2 | -------------------------------------------------------------------------------- /projects/library/card/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './card.module'; 2 | -------------------------------------------------------------------------------- /projects/library/chart/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './chart.module'; 2 | -------------------------------------------------------------------------------- /projects/library/chip/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './chip.module'; 2 | -------------------------------------------------------------------------------- /projects/library/copy/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './copy.module'; 2 | -------------------------------------------------------------------------------- /projects/library/drawer/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer.module'; 2 | -------------------------------------------------------------------------------- /projects/library/icon/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './icon.module'; 2 | -------------------------------------------------------------------------------- /projects/library/input/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './input.module'; 2 | -------------------------------------------------------------------------------- /projects/library/link/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './link.module'; 2 | -------------------------------------------------------------------------------- /projects/library/logo/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './logo.module'; 2 | -------------------------------------------------------------------------------- /projects/library/menu/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './menu.module'; 2 | -------------------------------------------------------------------------------- /projects/library/option/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './option.module'; 2 | -------------------------------------------------------------------------------- /projects/library/pipes/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './pipes.module'; 2 | -------------------------------------------------------------------------------- /projects/library/scss/input/_input.scss: -------------------------------------------------------------------------------- 1 | @import './input-placeholder'; 2 | -------------------------------------------------------------------------------- /projects/library/search/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './search.module'; 2 | -------------------------------------------------------------------------------- /projects/library/select/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './select.module'; 2 | -------------------------------------------------------------------------------- /projects/library/sort/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './sort.module'; 2 | -------------------------------------------------------------------------------- /projects/library/table/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './table.module'; 2 | -------------------------------------------------------------------------------- /projects/library/tabs/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './tabs.module'; 2 | -------------------------------------------------------------------------------- /projects/library/toggle/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './toggle.module'; 2 | -------------------------------------------------------------------------------- /projects/library/checkbox/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './checkbox.module'; 2 | -------------------------------------------------------------------------------- /projects/library/popover/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './popover.module'; 2 | -------------------------------------------------------------------------------- /projects/library/spacing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './spacing.module'; 2 | -------------------------------------------------------------------------------- /projects/library/tooltip/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './tooltip.module'; 2 | -------------------------------------------------------------------------------- /projects/library/autofocus/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './autofocus.module'; 2 | -------------------------------------------------------------------------------- /projects/library/checkbox/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-helpers'; 2 | -------------------------------------------------------------------------------- /projects/library/csv-entry/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './csv-entry.module'; 2 | -------------------------------------------------------------------------------- /projects/library/date-range/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './date-range.module'; 2 | -------------------------------------------------------------------------------- /projects/library/drawer/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | -------------------------------------------------------------------------------- /projects/library/file-upload/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './file-upload.module'; 2 | -------------------------------------------------------------------------------- /projects/library/form-field/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './form-field.module'; 2 | -------------------------------------------------------------------------------- /projects/library/icon-button/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './icon-button.module'; 2 | -------------------------------------------------------------------------------- /projects/library/login-form/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './login-form.module'; 2 | -------------------------------------------------------------------------------- /projects/library/navigation/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './navigation.module'; 2 | -------------------------------------------------------------------------------- /projects/library/paginator/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './paginator.module'; 2 | -------------------------------------------------------------------------------- /projects/library/radio-group/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './radio-group.module'; 2 | -------------------------------------------------------------------------------- /projects/library/scrollbars/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './scrollbars.module'; 2 | -------------------------------------------------------------------------------- /projects/library/scss/reset/_reset.spec.scss: -------------------------------------------------------------------------------- 1 | @import 'true'; 2 | @import 'reset'; 3 | -------------------------------------------------------------------------------- /projects/library/utilities/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './utilities.module'; 2 | -------------------------------------------------------------------------------- /projects/library/validators/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './validators.module'; 2 | -------------------------------------------------------------------------------- /projects/library/autocomplete/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './autocomplete.module'; 2 | -------------------------------------------------------------------------------- /projects/library/confirmation/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './confirmation.module'; 2 | -------------------------------------------------------------------------------- /projects/library/drawer/src/drawer-header-footer.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /projects/library/form-field/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | -------------------------------------------------------------------------------- /projects/library/logo/src/logo.component.html: -------------------------------------------------------------------------------- 1 |
4 | -------------------------------------------------------------------------------- /projects/library/popover/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | -------------------------------------------------------------------------------- /projects/library/radio-group/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-helpers'; 2 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './expansion-panel.module'; 2 | -------------------------------------------------------------------------------- /projects/library/loading-overlay/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './loading-overlay.module'; 2 | -------------------------------------------------------------------------------- /projects/library/scss/triangle/_triangle.spec.scss: -------------------------------------------------------------------------------- 1 | @import 'true'; 2 | @import 'triangle'; 3 | -------------------------------------------------------------------------------- /projects/library/selection-list/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './selection-list.module'; 2 | -------------------------------------------------------------------------------- /projects/demo/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { production: true }; 2 | -------------------------------------------------------------------------------- /projects/library/chart/src/chart.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /projects/library/cohort-date-range/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './cohort-date-range.module'; 2 | -------------------------------------------------------------------------------- /projects/library/validators/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './validators.service.mock'; 2 | -------------------------------------------------------------------------------- /projects/library/validation-messages/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './validation-messages.module'; 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .github 2 | coverage 3 | dist 4 | docs 5 | e2e 6 | node_modules 7 | .DS_Store 8 | **/*.d.ts 9 | -------------------------------------------------------------------------------- /projects/library/scss/global/_custom-properties.scss: -------------------------------------------------------------------------------- 1 | // TODO: Create library specific global tokens here 2 | 3 | -------------------------------------------------------------------------------- /projects/demo/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/demo/src/favicon.ico -------------------------------------------------------------------------------- /projects/library/tabs/src/tab/tab.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /projects/visual-regression/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { production: true }; 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in the repo. 2 | * @GetTerminus/uxe 3 | -------------------------------------------------------------------------------- /projects/demo/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | @import '~@terminus/ui/helpers'; 2 | 3 | h1 { 4 | color: color(warn); 5 | } 6 | -------------------------------------------------------------------------------- /projects/library/chip/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/input/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/table/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/tabs/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-helpers'; 2 | export * from './test-components'; 3 | -------------------------------------------------------------------------------- /projects/library/date-range/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/paginator/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/select/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/tooltip/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/autocomplete/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/library/selection-list/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/button/button.component.scss: -------------------------------------------------------------------------------- 1 | .double { 2 | .ts-button { 3 | margin-right: 1em; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing.component.scss: -------------------------------------------------------------------------------- 1 | div { 2 | outline: 1px solid lightblue; 3 | padding: 8px; 4 | } 5 | -------------------------------------------------------------------------------- /projects/library/cohort-date-range/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | @import '~@terminus/ui/helpers'; 2 | 3 | h1 { 4 | color: color(warn); 5 | } 6 | -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/acc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/acc.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/na.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/na.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/prim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/prim.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/util.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/util.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/warn.png -------------------------------------------------------------------------------- /projects/visual-regression/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/visual-regression/src/favicon.ico -------------------------------------------------------------------------------- /projects/library/chip/src/chip-collection.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /projects/library/chip/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /projects/library/logo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/acc-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/acc-d.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/acc-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/acc-l.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/acc-xd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/acc-xd.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/acc-xl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/acc-xl.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/prim-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/prim-d.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/prim-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/prim-l.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/pure-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/pure-d.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/pure-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/pure-l.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/util-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/util-d.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/util-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/util-l.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/warn-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/warn-d.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/warn-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/warn-l.png -------------------------------------------------------------------------------- /projects/library/spacing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.ctrlpignore: -------------------------------------------------------------------------------- 1 | ^\.git$ 2 | ^coverage$ 3 | ^dist$ 4 | ^build$ 5 | ^docs$ 6 | ^integration$ 7 | ^node_modules$ 8 | ^out-tsc$ 9 | ^styleguide$ 10 | -------------------------------------------------------------------------------- /projects/library/icon-button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/prim-xd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/prim-xd.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/prim-xl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/prim-xl.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/util-xd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/util-xd.png -------------------------------------------------------------------------------- /projects/library/scss/docs/assets/util-xl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GetTerminus/terminus-ui/HEAD/projects/library/scss/docs/assets/util-xl.png -------------------------------------------------------------------------------- /projects/library/tabs/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/demo/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /projects/library/autocomplete/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /projects/library/checkbox/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/drawer/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/input/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/paginator/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/popover/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/select/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/selection-list/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /projects/library/table/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/tooltip/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/date-range/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/form-field/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/radio-group/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.lib.json", 3 | "angularCompilerOptions": { 4 | "enableIvy": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /projects/library/validators/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/chart/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | export * from './amcharts.service.mock'; 4 | -------------------------------------------------------------------------------- /projects/library/cohort-date-range/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/library/validation-messages/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/form-controls/row.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /projects/library/validation-messages/testing/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './test-components'; 2 | export * from './test-helpers'; 3 | export * from './validation-messages.service.mock'; 4 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/components.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
7 | -------------------------------------------------------------------------------- /projects/visual-regression/stylelint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rules: { 3 | 'color-named': null, 4 | 'no-eol-whitespace': [true, { ignore: 'empty-lines' }], 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /tooling/ci/rename-typings-index.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Rename built typings index file 5 | # 6 | 7 | . ~/.bashrc 8 | 9 | mv dist/library/terminus-ui.d.ts dist/library/index.d.ts 10 | -------------------------------------------------------------------------------- /projects/library/scss/utilities/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import '../layout/layout'; 2 | 3 | 4 | /** 5 | * Utility class to hide an element 6 | */ 7 | .u-visually-hidden { 8 | @include visually-hidden; 9 | } 10 | -------------------------------------------------------------------------------- /ngcc.config.js: -------------------------------------------------------------------------------- 1 | // https://github.com/angular/angular/issues/29703 2 | module.exports = { 3 | packages: { 4 | '@terminus/ui': { 5 | entryPoints: { './dist/library': { ignore: true } }, 6 | }, 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /projects/library/scss/layout/_layout.scss: -------------------------------------------------------------------------------- 1 | @import './center-content'; 2 | @import './opposite-direction'; 3 | @import './pseudo'; 4 | @import './responsive-ratio'; 5 | @import './take-space'; 6 | @import './visually-hidden'; 7 | -------------------------------------------------------------------------------- /projects/library/validation-messages/src/validation-messages.component.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /projects/library/chart/src/chart.component.scss: -------------------------------------------------------------------------------- 1 | // 2 | // @component 3 | // Chart 4 | // @description 5 | // A charting component using AmCharts 6 | // 7 | .ts-chart { 8 | display: block; 9 | height: 100%; 10 | } 11 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/validation/validation.component.scss: -------------------------------------------------------------------------------- 1 | pre { 2 | background-color: #eee; 3 | border: 1px solid #999; 4 | font-size: .8em; 5 | max-width: 50%; 6 | overflow-x: scroll; 7 | padding: 1em; 8 | } 9 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/icon/icon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'demo-icon', 5 | templateUrl: './icon.component.html', 6 | }) 7 | export class IconComponent { 8 | } 9 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/logo/logo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'demo-logo', 5 | templateUrl: './logo.component.html', 6 | }) 7 | export class LogoComponent { 8 | } 9 | -------------------------------------------------------------------------------- /projects/library/drawer/src/drawer.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /projects/library/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | let var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | 7 | 8 | /** 9 | * Needed for inputmask library 10 | */ 11 | declare module 'inputmask'; 12 | 13 | -------------------------------------------------------------------------------- /projects/library/validation-messages/testing/src/validation-messages.service.mock.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class TsValidationMessagesServiceMock { 5 | public getValidatorErrorMessage = () => 'foo'; 6 | } 7 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/breakpoints/breakpoints.component.html: -------------------------------------------------------------------------------- 1 | Text color will change at each breakpoint: 2 | 3 |
4 | 5 | 6 |
7 | Breakpoints example 8 |
9 |
10 | -------------------------------------------------------------------------------- /projects/library/chart/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/icon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/components.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-components', 5 | templateUrl: './components.component.html', 6 | }) 7 | export class ComponentsComponent { } 8 | -------------------------------------------------------------------------------- /projects/library/autofocus/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/form-field/src/prefix.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | 3 | 4 | /** 5 | * Prefix to be placed the front of the {@link TsFormFieldComponent} 6 | */ 7 | @Directive({ selector: '[tsPrefix]' }) 8 | export class TsPrefixDirective {} 9 | -------------------------------------------------------------------------------- /projects/library/navigation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/chart/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/form-field/src/suffix.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | 3 | 4 | /** 5 | * Suffix to be placed at the end of the {@link TsFormFieldComponent} 6 | */ 7 | @Directive({ selector: '[tsSuffix]' }) 8 | export class TsSuffixDirective {} 9 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://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 | 12 | [*.md] 13 | max_line_length = 0 14 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /projects/library/toggle/src/toggle.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/reset/reset'; 2 | 3 | 4 | // 5 | // @component 6 | // Toggle component 7 | // @description 8 | // A toggle/switch component 9 | // 10 | .ts-toggle { 11 | @include reset; 12 | display: inline-block; 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/pr-labeler.yml: -------------------------------------------------------------------------------- 1 | name: PR Labeler 2 | on: pull_request 3 | jobs: 4 | build: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: srvaroa/labeler@master 8 | name: Autolabel PR 9 | env: 10 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 11 | -------------------------------------------------------------------------------- /projects/library/scss/layout/_center-content.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Center child content vertically and horizontally 3 | * 4 | * @example 5 | * @include center-content; 6 | */ 7 | @mixin center-content { 8 | align-items: center; 9 | display: flex; 10 | justify-content: center; 11 | } 12 | -------------------------------------------------------------------------------- /projects/visual-regression/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/tooltip/src/tooltip.component.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /projects/visual-regression/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jest", 9 | "node" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /jest.library.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('./jest.base.config'); 2 | 3 | module.exports = { 4 | ...baseConfig, 5 | roots: ['.'], 6 | testMatch: [ 7 | '/projects/library/**/?(*.)spec.ts?(x)', 8 | '/projects/library/**/?(*.)test-sass.js?(x)', 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/validation/validation.component.scss: -------------------------------------------------------------------------------- 1 | pre { 2 | background-color: #eee; 3 | border: 1px solid #999; 4 | font-size: .8em; 5 | max-width: 50%; 6 | overflow-x: scroll; 7 | padding: 1em; 8 | } 9 | 10 | .page { 11 | margin-left: 20px; 12 | } 13 | -------------------------------------------------------------------------------- /jest.demo.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('./jest.base.config'); 2 | 3 | module.exports = { 4 | ...baseConfig, 5 | roots: ['/projects/demo'], 6 | modulePaths: ['/projects/library'], 7 | testMatch: [ 8 | '/projects/demo/**/?(*.)spec.ts?(x)', 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /projects/library/login-form/src/login-form.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/reset/reset'; 2 | 3 | 4 | // 5 | // @component 6 | // Log In Form 7 | // @description 8 | // The log in form component 9 | // 10 | .ts-login-form { 11 | @include reset; 12 | display: block; 13 | width: 100%; 14 | } 15 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-spacing', 6 | styleUrls: ['./spacing.component.scss'], 7 | templateUrl: './spacing.component.html', 8 | }) 9 | export class SpacingComponent { 10 | } 11 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/drawer/drawer.component.scss: -------------------------------------------------------------------------------- 1 | .drawer-container { 2 | bottom: 0; 3 | left: 0; 4 | position: absolute; 5 | right: 0; 6 | top: 25%; 7 | } 8 | .drawer-card { 9 | min-height: 600px; 10 | } 11 | .first-drawer { 12 | .content { 13 | margin-right: 20px; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /projects/library/card/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/link/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/checkbox/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/drawer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/login-form/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/option/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/toggle/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/tooltip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cypress/screenshots/* 2 | cypress/videos/* 3 | .idea/ 4 | .vscode/ 5 | dist/ 6 | node_modules/ 7 | out-tsc/ 8 | debug.log 9 | npm-debug.log 10 | src/**/*.css 11 | *.js.map 12 | *.css.map 13 | e2e/**/*.js 14 | e2e/**/*.js.map 15 | .ng_build 16 | .vscode 17 | docs/* 18 | coverage/ 19 | .tsbuildinfo 20 | .DS_Store 21 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/loading-overlay/loading-overlay.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-loading-overlay', 6 | templateUrl: './loading-overlay.component.html', 7 | }) 8 | export class LoadingOverlayComponent { 9 | isLoading = true; 10 | } 11 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/table/table.component.scss: -------------------------------------------------------------------------------- 1 | .example-container { 2 | overflow-y: scroll; 3 | width: 100%; 4 | } 5 | 6 | .truncate { 7 | display: block; 8 | max-height: 100px; 9 | overflow: hidden; 10 | text-overflow: ellipsis; 11 | white-space: nowrap; 12 | word-break: break-word; 13 | } 14 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.scss'], 8 | }) 9 | export class AppComponent { 10 | public title = 'Visual Regression'; 11 | } 12 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/typography/typography.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-typography', 6 | styleUrls: ['./typography.component.scss'], 7 | templateUrl: './typography.component.html', 8 | }) 9 | export class TypographyComponent { 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/copy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/breakpoints/breakpoints.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-breakpoints', 6 | templateUrl: './breakpoints.component.html', 7 | styleUrls: ['./breakpoints.component.scss'], 8 | }) 9 | export class BreakpointsComponent { 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/file-upload/src/image-dimensions.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A class to store dimensions for an image 3 | * 4 | * @param width - The image width 5 | * @param height - The image height 6 | */ 7 | export class TsImageDimensions { 8 | constructor( 9 | public width: number, 10 | public height: number, 11 | ) {} 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/scss/color/_color.spec.scss: -------------------------------------------------------------------------------- 1 | @import 'true'; 2 | @import 'color'; 3 | 4 | @include describe ('color') { 5 | @include test('should return the correct color based on palette and tone') { 6 | $test: color(warn, dark); 7 | $expect: #b55949; 8 | 9 | @include assert-equal($test, $expect); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/date-range/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/paginator/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/search/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/scrollbars/scrollbars.component.scss: -------------------------------------------------------------------------------- 1 | .scroll-container { 2 | height: 320px; 3 | outline: 1px solid lightblue; 4 | width: 400px; 5 | } 6 | 7 | .ts-scrollbars { 8 | p { 9 | margin-bottom: 2em; 10 | } 11 | 12 | &.nowrap { 13 | p { 14 | white-space: nowrap; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing-styles.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-spacing-styles', 6 | styleUrls: ['./spacing-styles.component.scss'], 7 | templateUrl: './spacing-styles.component.html', 8 | }) 9 | export class SpacingStylesComponent { 10 | } 11 | -------------------------------------------------------------------------------- /projects/library/form-field/src/custom-validation.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | 3 | 4 | /** 5 | * A directive used to pass a custom validation messages component through to {@link TsFormFieldComponent} 6 | */ 7 | @Directive({ selector: '[tsCustomValidationMessage]' }) 8 | export class TsCustomValidationDirective {} 9 | -------------------------------------------------------------------------------- /projects/library/loading-overlay/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/library/validators/src/validators.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { TsValidatorsService } from './validators.service'; 4 | 5 | export * from './validators.service'; 6 | 7 | 8 | @NgModule({ 9 | providers: [ 10 | TsValidatorsService, 11 | ], 12 | }) 13 | export class TsValidatorsModule {} 14 | -------------------------------------------------------------------------------- /projects/library/autocomplete/src/autocomplete-panel/autocomplete-panel.component.html: -------------------------------------------------------------------------------- 1 | 2 |
9 | 10 |
11 |
12 | -------------------------------------------------------------------------------- /projects/library/cohort-date-range/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/demo/stylelint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: '@terminus/stylelint-config-frontend', 3 | rules: { 4 | 'color-named': null, 5 | 'no-eol-whitespace': [true, { ignore: 'empty-lines' }], 6 | 'plugin/stylelint-no-indistinguishable-colors': null, 7 | 'scale-unlimited/declaration-strict-value': null, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/form-controls/row.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, OnInit, 3 | } from '@angular/core'; 4 | 5 | @Component({ 6 | selector: 'demo-row', 7 | templateUrl: './row.component.html', 8 | }) 9 | 10 | export class RowComponent implements OnInit { 11 | constructor() { 12 | } 13 | 14 | ngOnInit() { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /projects/library/drawer/src/drawer-container.component.html: -------------------------------------------------------------------------------- 1 |
7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /projects/library/selection-list/src/selection-list-panel/selection-list-panel.component.html: -------------------------------------------------------------------------------- 1 | 2 |
9 | 10 |
11 |
12 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/navigation/navigation.component.scss: -------------------------------------------------------------------------------- 1 | @import '~@terminus/ui/helpers'; 2 | 3 | .outer { 4 | @include elevation-element(app-bar); 5 | background-color: color(primary); 6 | 7 | span { 8 | color: color(pure); 9 | padding: 0 1rem; 10 | } 11 | } 12 | 13 | a { 14 | display: inline-block; 15 | padding: 8px; 16 | } 17 | -------------------------------------------------------------------------------- /projects/library/tabs/src/body/tab-body.component.html: -------------------------------------------------------------------------------- 1 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /projects/demo/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "angularCompilerOptions": { 4 | "enableIvy": false 5 | }, 6 | "compilerOptions": { 7 | "outDir": "../../out-tsc/app", 8 | "types": [] 9 | }, 10 | "files": [ 11 | "src/main.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /projects/library/pipes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "date-fns": "dateFns", 7 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tooling/ci/test-unit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Run Unit Tests 5 | # 6 | # Run all unit tests 7 | # Upload coverage to CodeCov 8 | # 9 | 10 | . ~/.bashrc 11 | 12 | # Run tests 13 | yarn run library:test:ci || { 14 | echo 'yarn run library:test:ci failed!'; 15 | exit 1; 16 | } 17 | 18 | # Upload coverage report 19 | bash <(curl -s https://codecov.io/bash) 20 | 21 | -------------------------------------------------------------------------------- /jest.visual-regression.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('./jest.base.config'); 2 | 3 | module.exports = { 4 | ...baseConfig, 5 | roots: ['.'], 6 | modulePaths: ['/projects/library'], 7 | testMatch: [ 8 | '/projects/visual-regression/**/?(*.)spec.ts?(x)', 9 | '/projects/visual-regression/**/?(*.)test-sass.js?(x)', 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /projects/library/form-field/src/label.directive.ts: -------------------------------------------------------------------------------- 1 | // NOTE: We are using this directive as a component 2 | import { Directive } from '@angular/core'; 3 | 4 | 5 | /** 6 | * The floating label for a {@link TsFormFieldComponent} 7 | */ 8 | // eslint-disable-next-line @angular-eslint/directive-selector 9 | @Directive({ selector: 'ts-label' }) 10 | export class TsLabelDirective {} 11 | -------------------------------------------------------------------------------- /projects/library/scrollbars/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "ngx-perfect-scrollbar": "ngxPerfectScrollbar", 7 | "@terminus/ngx-tools": "terminus.ngxTools", 8 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/utilities/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "date-fns": "dateFns", 7 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities", 8 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/validation-messages/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "date-fns": "dateFns", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/tabs/src/label/tab-label.directive.ts: -------------------------------------------------------------------------------- 1 | import { CdkPortal } from '@angular/cdk/portal'; 2 | import { Directive } from '@angular/core'; 3 | 4 | 5 | /** 6 | * Used to flag tab labels for use with the portal directive 7 | */ 8 | @Directive({ 9 | selector: '[tsTabLabel]', 10 | exportAs: 'tsTabLabel', 11 | }) 12 | export class TsTabLabelDirective extends CdkPortal { } 13 | -------------------------------------------------------------------------------- /projects/library/utilities/src/types/style-theme.types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Define the allowed theme types 3 | */ 4 | export type TsStyleThemeTypes 5 | = 'primary' 6 | | 'accent' 7 | | 'warn' 8 | ; 9 | 10 | /** 11 | * An array of the allowed {@link TsStyleThemeTypes} for checking values 12 | */ 13 | export const tsStyleThemeTypesArray: TsStyleThemeTypes[] = ['primary', 'accent', 'warn']; 14 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/icon-button/icon-button.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-icon-button', 6 | templateUrl: './icon-button.component.html', 7 | }) 8 | export class IconButtonComponent { 9 | 10 | clickTheme(v: string): void { 11 | console.log(`DEMO: '${v}' icon-button clicked.`); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/scss/buttons/_buttons.scss: -------------------------------------------------------------------------------- 1 | @import '../cursors/cursors'; 2 | 3 | 4 | /** 5 | * Reset button styles 6 | * 7 | * @example 8 | * @include button-base; 9 | */ 10 | @mixin button-base { 11 | background-color: transparent; 12 | border: 0; 13 | cursor: cursor(pointer); 14 | outline: 0; 15 | text-align: center; 16 | 17 | &:focus { 18 | outline: 0; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /projects/visual-regression/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": [ 6 | "jest", 7 | "node" 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 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | # Targeting all titles so that this label is added to every PR 2 | "PR: awaiting review": 3 | title: '[\s\S]*' 4 | 5 | "Size: XS": 6 | size-below: 20 7 | "Size: S": 8 | size-above: 20 9 | size-below: 60 10 | "Size: M": 11 | size-above: 60 12 | size-below: 140 13 | "Size: L": 14 | size-above: 140 15 | size-below: 400 16 | "Size: XL": 17 | size-above: 400 18 | 19 | -------------------------------------------------------------------------------- /projects/library/scss/global/terminus-ui.scss: -------------------------------------------------------------------------------- 1 | @import './custom-properties'; 2 | @import './generated-classes'; 3 | @import '../theme/theme'; 4 | 5 | 6 | // Remove outline from all focused elements. Focus styles should be handled by the component 7 | * { 8 | &:focus { 9 | outline: 0; 10 | } 11 | } 12 | 13 | // Include our custom theme 14 | @include angular-material-theme($ts-app-theme); 15 | -------------------------------------------------------------------------------- /projects/library/toggle/src/toggle.component.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/button/button.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-button', 5 | templateUrl: './button.component.html', 6 | }) 7 | export class ButtonComponent { 8 | public title = 'Visual Regression'; 9 | public progress = false; 10 | 11 | public run(): void { 12 | this.progress = true; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tooling/ci/report-system-name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Report the current system name 5 | # 6 | 7 | . ~/.bashrc 8 | 9 | unameOut="$(uname -s)" 10 | case "${unameOut}" in 11 | Linux*) machine=Linux;; 12 | Darwin*) machine=Mac;; 13 | CYGWIN*) machine=Cygwin;; 14 | MINGW*) machine=MinGw;; 15 | *) machine="UNKNOWN:${unameOut}" 16 | esac 17 | echo "${machine}" 18 | -------------------------------------------------------------------------------- /projects/demo/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./../tslint.json", 3 | "rules": { 4 | "component-selector": [ 5 | true, 6 | "element", 7 | "demo", 8 | "kebab-case" 9 | ], 10 | "member-access": false, 11 | "prefer-on-push-component-change-detection": false, 12 | "template-no-call-expression": false, 13 | "template-use-track-by-function": false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /projects/library/csv-entry/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/form-field/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/sort/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/confirmation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/library/table/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /projects/demo/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "emitDecoratorMetadata": true, 5 | "outDir": "../../out-tsc/spec", 6 | "types": [ 7 | "jest", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "src/test.ts", 13 | "src/polyfills.ts" 14 | ], 15 | "include": [ 16 | "src/**/*.spec.ts", 17 | "src/**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /projects/library/radio-group/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/demo/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "projects/demo", 5 | "outDir": "./../out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.ts" 14 | ], 15 | "exclude": [ 16 | "src/test.ts", 17 | "src/**/*.spec.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /projects/library/option/src/option-display.directive.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Directive, 3 | ElementRef, 4 | } from '@angular/core'; 5 | 6 | 7 | /** 8 | * Directive used to allow the consumer to define the view text for a {@link TsOptionComponent} 9 | */ 10 | @Directive({ selector: '[tsOptionDisplay]' }) 11 | export class TsOptionDisplayDirective { 12 | constructor( 13 | public elementRef: ElementRef, 14 | ) {} 15 | } 16 | -------------------------------------------------------------------------------- /tooling/jest-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular'; 2 | import './jest-global-mocks'; 3 | 4 | global.window.document.createRange = function createRange() { 5 | return { 6 | setEnd: () => {}, 7 | setStart: () => {}, 8 | getBoundingClientRect: () => { 9 | return { right: 0 }; 10 | }, 11 | getClientRects: () => [], 12 | commonAncestorContainer: document.createElement('div'), 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/login-form/login-form.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 |
7 | 8 | 13 |
14 | -------------------------------------------------------------------------------- /projects/library/scss/layout/_take-space.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Fill the parent element 3 | * 4 | * @param $margin 5 | * The amount of space between the edge of the parent. Default: 0 6 | * @example 7 | * @include fill-parent; 8 | * @include fill-parent(1em); 9 | */ 10 | @mixin take-space($margin: 0) { 11 | bottom: $margin; 12 | left: $margin; 13 | position: absolute; 14 | right: $margin; 15 | top: $margin; 16 | } 17 | -------------------------------------------------------------------------------- /projects/library/tsconfig.compodoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "es2018", 9 | "dom" 10 | ] 11 | }, 12 | "include": [ 13 | "**/*" 14 | ], 15 | "exclude": [ 16 | "**/*.spec.ts", 17 | "**/*.mock.ts", 18 | "**/testing/**" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /projects/demo/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { production: false }; 7 | -------------------------------------------------------------------------------- /projects/library/validators/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/regex": "terminus.ngxTools.regex", 8 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 9 | "date-fns": "dateFns" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/tooltip/tooltip.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TsTooltipPositionTypes } from '@terminus/ui/tooltip'; 3 | 4 | 5 | @Component({ 6 | selector: 'demo-tooltip', 7 | templateUrl: './tooltip.component.html', 8 | }) 9 | export class TooltipComponent { 10 | myTooltip = 'Here is my content.'; 11 | myPosition: TsTooltipPositionTypes = 'below'; 12 | showUnderline = true; 13 | } 14 | -------------------------------------------------------------------------------- /projects/library/autofocus/src/autofocus.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { TsAutofocusDirective } from './autofocus.directive'; 5 | 6 | export * from './autofocus.directive'; 7 | 8 | 9 | @NgModule({ 10 | imports: [CommonModule], 11 | declarations: [TsAutofocusDirective], 12 | exports: [TsAutofocusDirective], 13 | }) 14 | export class TsAutofocusModule {} 15 | -------------------------------------------------------------------------------- /projects/library/utilities/src/strip-control-characters/strip-control-characters.spec.ts: -------------------------------------------------------------------------------- 1 | import { stripControlCharacters } from './strip-control-characters'; 2 | 3 | describe(`stripControlCharacters`, function() { 4 | const specialString = `\thttps://www.google.com\r`; 5 | 6 | test(`should remove control characters from a string`, () => { 7 | expect(stripControlCharacters(specialString)).toEqual(`https://www.google.com`); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /projects/library/chip/src/chip.component.html: -------------------------------------------------------------------------------- 1 |
10 | 11 | 12 | 13 | 14 | 15 | cancel 16 | 17 |
18 | -------------------------------------------------------------------------------- /projects/library/utilities/src/cva-provider-factory/cva-provider-factory.spec.ts: -------------------------------------------------------------------------------- 1 | import { ControlValueAccessorProviderFactory } from './cva-provider-factory'; 2 | 3 | describe(`ControlValueAccessorProviderFactory`, function() { 4 | test(`should forward a reference to this component`, () => { 5 | class Foo {} 6 | const provider = ControlValueAccessorProviderFactory(Foo); 7 | expect(provider.useExisting()).toEqual(Foo); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /projects/visual-regression/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 | -------------------------------------------------------------------------------- /projects/library/file-upload/src/image-dimension-constraints.ts: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * An individual size constraint 4 | */ 5 | export interface TsFileImageDimensionContraint { 6 | height: { 7 | min: number; 8 | max: number; 9 | }; 10 | width: { 11 | min: number; 12 | max: number; 13 | }; 14 | } 15 | 16 | /** 17 | * An array of file size constraints 18 | */ 19 | export type TsFileImageDimensionConstraints = TsFileImageDimensionContraint[]; 20 | -------------------------------------------------------------------------------- /projects/library/chip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 8 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 9 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /projects/library/scss/theme/_theme.scss: -------------------------------------------------------------------------------- 1 | @import '../color/color'; 2 | @import '../../../../node_modules/@angular/material/theming'; 3 | @include mat-core; 4 | 5 | $ts-default-primary: mat-palette($ts-material-primary, 500, 100, 700); 6 | $ts-default-accent: mat-palette($ts-material-accent, 500, 100, 700); 7 | $ts-default-warn: mat-palette($ts-material-warn, 500, 100, 700); 8 | $ts-app-theme: mat-light-theme($ts-default-primary, $ts-default-accent, $ts-default-warn); 9 | -------------------------------------------------------------------------------- /.github/workflows/auto-assign-pr.yml: -------------------------------------------------------------------------------- 1 | name: Auto Assign PR to Author 2 | on: [pull_request] 3 | jobs: 4 | assignAuthor: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Assign PR to Author 8 | uses: samspills/assign-pr-to-author@v1.0 9 | if: github.event_name == 'pull_request' && github.event.action == 'opened' && github.repository == 'GetTerminus/terminus-ui' 10 | with: 11 | repo-token: '${{ secrets.GITHUB_TOKEN }}' 12 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/link/link.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-link', 6 | templateUrl: './link.component.html', 7 | }) 8 | export class LinkComponent { 9 | localDestination = ['/components/copy']; 10 | emailDestination = 'mailto:support@terminus.com'; 11 | phoneDestination = 'tel: 1800-423-4562'; 12 | externalDestination = `http://google.com`; 13 | external = true; 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/logo/src/logo.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { TsLogoComponent } from './logo.component'; 5 | 6 | export * from './logo.component'; 7 | 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule, 12 | ], 13 | declarations: [ 14 | TsLogoComponent, 15 | ], 16 | exports: [ 17 | TsLogoComponent, 18 | ], 19 | }) 20 | export class TsLogoModule {} 21 | -------------------------------------------------------------------------------- /projects/library/scss/layout/_pseudo.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Pseudo element base styles 3 | * 4 | * @param $display 5 | * The display value (block/inline/etc) 6 | * @param $position 7 | * The position style (absolute/static/etc) 8 | * @param $content 9 | * The content value 10 | */ 11 | @mixin pseudo( 12 | $display: block, 13 | $position: absolute, 14 | $content: '' 15 | ) { 16 | content: $content; 17 | display: $display; 18 | position: $position; 19 | } 20 | -------------------------------------------------------------------------------- /projects/library/validation-messages/testing/src/test-helpers.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture } from '@angular/core/testing'; 2 | import { By } from '@angular/platform-browser'; 3 | 4 | /** 5 | * Get the message element 6 | * 7 | * @param fixture 8 | * @returns HTMLElement 9 | */ 10 | export const getValidationMessageElement = 11 | (fixture: ComponentFixture): HTMLElement => fixture.debugElement.query(By.css('.ts-validation-messages')).nativeElement; 12 | 13 | -------------------------------------------------------------------------------- /projects/visual-regression/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "angularCompilerOptions": { 4 | "enableIvy": false 5 | }, 6 | "compilerOptions": { 7 | "outDir": "../../out-tsc/app", 8 | "types": [] 9 | }, 10 | "files": [ 11 | "src/main.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.d.ts" 16 | ], 17 | "exclude": [ 18 | "src/test.ts", 19 | "src/**/*.spec.ts" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /cypress/integration/spin-up.js: -------------------------------------------------------------------------------- 1 | describe(`Demo`, () => { 2 | it(`should load demo page`, () => { 3 | cy.visit('http://localhost:4200/'); 4 | cy.get('body').contains('Demos'); 5 | }); 6 | 7 | it(`should load button page`, () => { 8 | cy.visit('http://localhost:4200/components/button'); 9 | cy.get(':nth-child(1) > label > .ng-pristine').contains('Primary'); 10 | cy.get('[tsverticalspacing="small--0"]').contains('Click Me!'); 11 | }); 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /projects/library/tabs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 7 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 8 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities", 9 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /projects/library/checkbox/src/checkbox.component.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tooling/mark-small.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projects/demo/browserslist: -------------------------------------------------------------------------------- 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 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /projects/demo/src/app/components/card/card-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, Routes, 4 | } from '@angular/router'; 5 | 6 | import { CardComponent } from './card.component'; 7 | 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: CardComponent, 13 | }, 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [RouterModule.forChild(routes)], 18 | exports: [RouterModule], 19 | }) 20 | export class CardRoutingModule { } 21 | -------------------------------------------------------------------------------- /projects/library/popover/src/popover.component.html: -------------------------------------------------------------------------------- 1 |
12 |
13 | 14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /projects/library/search/src/search.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/reset/reset'; 2 | @import '../../scss/spacing/spacing'; 3 | @import '../../scss/typography/typography'; 4 | 5 | 6 | // 7 | // @component 8 | // Search form 9 | // @description 10 | // A search form with an input and a button 11 | // 12 | .ts-search { 13 | @include reset; 14 | display: block; 15 | } 16 | 17 | //
primary container 18 | .c-search { 19 | ts-button { 20 | margin-left: spacing(default); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/label-approved-pr.yml: -------------------------------------------------------------------------------- 1 | name: Label Approved PRs 2 | on: pull_request_review 3 | jobs: 4 | labelWhenApproved: 5 | name: Label when approved 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Label When Approved 9 | uses: pullreminders/label-when-approved-action@master 10 | env: 11 | APPROVALS: "1" 12 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 13 | ADD_LABEL: "PR: approved" 14 | REMOVE_LABEL: "PR%3A%20awaiting%20review" 15 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/chart/chart-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, Routes, 4 | } from '@angular/router'; 5 | 6 | import { ChartComponent } from './chart.component'; 7 | 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: ChartComponent, 13 | }, 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [RouterModule.forChild(routes)], 18 | exports: [RouterModule], 19 | }) 20 | export class ChartRoutingModule { } 21 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/chip/chip-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ChipComponent } from './chip.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ChipComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ChipRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/copy/copy-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { CopyComponent } from './copy.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: CopyComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class CopyRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/icon/icon-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { IconComponent } from './icon.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: IconComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class IconRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/link/link-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { LinkComponent } from './link.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: LinkComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class LinkRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/logo/logo-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { LogoComponent } from './logo.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: LogoComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class LogoRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/menu/menu-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { MenuComponent } from './menu.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: MenuComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class MenuRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/tabs/tabs-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { TabsComponent } from './tabs.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: TabsComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class TabsRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/scss/input/_input-placeholder.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A mixin to correctly nest placeholder styles 3 | * 4 | * @example 5 | * input-placeholder { 6 | * transition: all 200ms ease; 7 | * } 8 | */ 9 | @mixin input-placeholder { 10 | &::placeholder { 11 | @content; 12 | } 13 | 14 | &::-moz-placeholder { 15 | @content; 16 | } 17 | 18 | &::-webkit-input-placeholder { 19 | @content; 20 | } 21 | 22 | &:-ms-input-placeholder { 23 | @content; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /projects/visual-regression/browserslist: -------------------------------------------------------------------------------- 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 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /projects/demo/src/app/components/input/input-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { InputComponent } from './input.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: InputComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class InputRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/pipes/pipes-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { PipesComponent } from './pipes.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: PipesComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class PipesRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/radio/radio-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { RadioComponent } from './radio.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: RadioComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class RadioRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/table/table-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { TableComponent } from './table.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: TableComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class TableRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/button/button-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ButtonComponent } from './button.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ButtonComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ButtonRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/drawer/drawer-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { DrawerComponent } from './drawer.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: DrawerComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class DrawerRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/search/search-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { SearchComponent } from './search.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: SearchComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class SearchRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/select/select-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { SelectComponent } from './select.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: SelectComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class SelectRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, Routes, 4 | } from '@angular/router'; 5 | 6 | import { SpacingComponent } from './spacing.component'; 7 | 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: SpacingComponent, 13 | }, 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [RouterModule.forChild(routes)], 18 | exports: [RouterModule], 19 | }) 20 | export class SpacingRoutingModule { } 21 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/toggle/toggle-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ToggleComponent } from './toggle.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ToggleComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ToggleRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/src/trigger/expansion-panel-trigger.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /projects/library/loading-overlay/src/loading-overlay.component.html: -------------------------------------------------------------------------------- 1 |
2 | 9 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/card/card-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { CardComponent } from './card.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: CardComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class CardRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/chip/chip-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ChipComponent } from './chip.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ChipComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ChipRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/checkbox/checkbox-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, Routes, 4 | } from '@angular/router'; 5 | 6 | import { CheckboxComponent } from './checkbox.component'; 7 | 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: CheckboxComponent, 13 | }, 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [RouterModule.forChild(routes)], 18 | exports: [RouterModule], 19 | }) 20 | export class CheckboxRoutingModule { } 21 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/popover/popover-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { PopoverComponent } from './popover.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: PopoverComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class PopoverRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/tooltip/tooltip-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { TooltipComponent } from './tooltip.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: TooltipComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class TooltipRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/scrollbars/src/scrollbars.component.scss: -------------------------------------------------------------------------------- 1 | // 2 | // @component 3 | // Scrollbars 4 | // @description 5 | // Styles for custom scrollbars component 6 | // 7 | .ts-scrollbars { 8 | display: block; 9 | height: 100%; 10 | 11 | // Top level styles belong here 12 | .c-scrollbars { 13 | max-height: 100%; 14 | position: relative; 15 | } 16 | } 17 | 18 | .c-scrollbars { 19 | // Make scrollbar rails always visible 20 | .ps__rail-x, 21 | .ps__rail-y { 22 | opacity: .6; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/autofocus/autofocus-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, Routes, 4 | } from '@angular/router'; 5 | 6 | import { AutofocusComponent } from './autofocus.component'; 7 | 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: AutofocusComponent, 13 | }, 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [RouterModule.forChild(routes)], 18 | exports: [RouterModule], 19 | }) 20 | export class AutofocusRoutingModule { } 21 | -------------------------------------------------------------------------------- /projects/library/popover/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools": "terminus.ngxTools", 7 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 8 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 9 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities", 10 | "popper.js/dist/esm/popper.js": "Popper" 11 | } 12 | } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /projects/library/tooltip/testing/src/test-helpers.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture } from '@angular/core/testing'; 2 | 3 | /** 4 | * Helper function to display the tooltip 5 | * 6 | * @param fixture - the fixture with a tooltip 7 | */ 8 | export function getTooltipText(fixture: ComponentFixture): string | null { 9 | fixture.componentInstance.tooltipComponent.showTooltip(); 10 | fixture.detectChanges(); 11 | const matTooltipEl = document.querySelector('.mat-tooltip'); 12 | return matTooltipEl!.textContent; 13 | } 14 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/input/input-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { InputComponent } from './input.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: InputComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class InputRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/csv-entry/csv-entry-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { CSVEntryComponent } from './csv-entry.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: CSVEntryComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class CSVEntryRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/icon-button/src/icon-button.component.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /projects/library/icon/src/custom-icons/table-large-plus.ts: -------------------------------------------------------------------------------- 1 | export const TABLE_LARGE_PLUS = ` 2 | 3 | 6 | 7 | `; 8 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/button/button-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ButtonComponent } from './button.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ButtonComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ButtonRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/date-range/date-range-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { DateRangeComponent } from './date-range.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: DateRangeComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class DateRangeRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/login-form/login-form-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { LoginFormComponent } from './login-form.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: LoginFormComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class LoginFormRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/paginator/paginator-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { PaginatorComponent } from './paginator.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: PaginatorComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class PaginatorRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/breakpoints/breakpoints-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, Routes, 4 | } from '@angular/router'; 5 | 6 | import { BreakpointsComponent } from './breakpoints.component'; 7 | 8 | 9 | const routes: Routes = [ 10 | { 11 | path: '', 12 | component: BreakpointsComponent, 13 | }, 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [RouterModule.forChild(routes)], 18 | exports: [RouterModule], 19 | }) 20 | export class BreakpointsRoutingModule { } 21 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/navigation/navigation-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { NavigationComponent } from './navigation.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: NavigationComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class NavigationRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/scrollbars/scrollbars-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ScrollbarsComponent } from './scrollbars.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ScrollbarsComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ScrollbarsRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/typography/typography-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { TypographyComponent } from './typography.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: TypographyComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class TypographyRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/validation/validation-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ValidationComponent } from './validation.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ValidationComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ValidationRoutingModule { } 22 | -------------------------------------------------------------------------------- /tooling/ci/replace-docs-emoji.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | // https://github.com/tallesl/node-emojis 4 | const emojis = require('emojis'); 5 | 6 | console.log('Fetching "docs/index.html" to emojify...'); 7 | fs.readFile('docs/index.html', 'utf8', (readError, data) => { 8 | const emojifiedText = emojis.unicode(data); 9 | console.log('Text emojified, saving file...'); 10 | 11 | fs.writeFile('docs/index.html', emojifiedText, writeError => { 12 | console.log('"docs/index.html" file has been emojified!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/file-upload/file-upload-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { FileUploadComponent } from './file-upload.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: FileUploadComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class FileUploadRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/icon-button/icon-button-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { IconButtonComponent } from './icon-button.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: IconButtonComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class IconButtonRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/toggle/src/toggle.component.md: -------------------------------------------------------------------------------- 1 |

Toggle

2 | 3 | 4 | 5 | 6 | **Table of Contents** 7 | 8 | - [Basic Usage](#basic-usage) 9 | 10 | 11 | 12 | 13 | ## Basic Usage 14 | 15 | Create a basic toggle 16 | 17 | ```html 18 | Toggle 19 | ``` 20 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/paginator/paginator-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { PaginatorComponent } from './paginator.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: PaginatorComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class PaginatorRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/autocomplete/autocomplete-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { AutocompleteComponent } from './autocomplete.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: AutocompleteComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class AutocompleteRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/confirmation/confirmation-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ConfirmationComponent } from './confirmation.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ConfirmationComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ConfirmationRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/icon/src/icon.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { MatIconModule } from '@angular/material/icon'; 4 | 5 | import { TsIconComponent } from './icon.component'; 6 | 7 | export * from './icon.component'; 8 | 9 | 10 | @NgModule({ 11 | imports: [ 12 | CommonModule, 13 | MatIconModule, 14 | ], 15 | declarations: [ 16 | TsIconComponent, 17 | ], 18 | exports: [ 19 | TsIconComponent, 20 | ], 21 | }) 22 | export class TsIconModule {} 23 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/form-controls/form-controls-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { FormControlsComponent } from './form-controls.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: FormControlsComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class FormControlsRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing-styles-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { SpacingStylesComponent } from './spacing-styles.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: SpacingStylesComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class SpacingStylesRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "target": "es6", 7 | "baseUrl": "", 8 | "paths": { 9 | "@angular/*": [ 10 | "./../../../node_modules/@angular/*" 11 | ], 12 | "@terminus/ui": ["./../../dist/library"] 13 | } 14 | }, 15 | "files": [ 16 | "test.ts", 17 | "polyfills.ts" 18 | ], 19 | "include": [ 20 | "**/*.spec.ts", 21 | "**/*.d.ts" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /projects/library/select/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 9 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 10 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/utilities/src/strip-control-characters/strip-control-characters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Strip any control characters from a string (eg backspace or carriage return) 3 | * 4 | * @param str - The string to strip 5 | * @returns The string without control characters 6 | */ 7 | export const stripControlCharacters = (str: string): string => str.split('').filter(x => { 8 | const controlLowerLimit = 31; 9 | const controlUpperLimit = 127; 10 | const n = x.charCodeAt(0); 11 | return n > controlLowerLimit && n < controlUpperLimit; 12 | }).join(''); 13 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/validation/validation-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ValidationComponent } from './validation.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ValidationComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ValidationRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/selection-list/selection-list-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { SelectionListComponent } from './selection-list.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: SelectionListComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class SelectionListRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/file-upload/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 9 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 10 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/icon/src/design-decisions.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Table of Contents** 4 | 5 | - [Icon Design Decisions](#icon-design-decisions) 6 | 7 | 8 | 9 | ## Icon Design Decisions 10 | 11 | 1. We are not exposing `MatIconRegistry` to the underlying user. If icons need to be added to our 12 | set, it should be done at the library level. 13 | -------------------------------------------------------------------------------- /projects/library/logo/src/logo.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/reset/reset'; 2 | @import '../../scss/color/color'; 3 | 4 | 5 | // 6 | // @component 7 | // Logo 8 | // @description 9 | // Styles for the logo component 10 | // 11 | .ts-logo { 12 | $logo-gray: #44525e; 13 | @include reset; 14 | 15 | &.ts-logo--black { 16 | svg { 17 | path { 18 | fill: color(pure, dark); 19 | } 20 | } 21 | } 22 | 23 | &.ts-logo--gray { 24 | svg { 25 | path { 26 | fill: $logo-gray; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/expansion-panel/expansion-panel-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ExpansionPanelComponent } from './expansion-panel.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ExpansionPanelComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ExpansionPanelRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/loading-overlay/loading-overlay-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { LoadingOverlayComponent } from './loading-overlay.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: LoadingOverlayComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class LoadingOverlayRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/library/autocomplete/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 9 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 10 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/cohort-date-range/src/cohort-date-range.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/spacing/spacing'; 2 | 3 | 4 | .ts-cohort-date-range { 5 | --cohort-selection-list-minWidth: 200px; 6 | display: block; 7 | 8 | .ts-selection-list { 9 | &.ts-cohort-date-range__select { 10 | display: inline-block; 11 | min-width: var(--cohort-selection-list-minWidth); 12 | } 13 | } 14 | } 15 | 16 | .ts-date-range { 17 | &.ts-cohort-date-range__date-range { 18 | display: inline-block; 19 | margin-right: spacing(large); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /projects/library/selection-list/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/keycodes": "terminus.ngxTools.keycodes", 9 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 10 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/tsconfig.lint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./../../tsconfig.json", 3 | "compilerOptions": { 4 | "target": "es2015", 5 | "rootDir": ".", 6 | "baseUrl": "", 7 | "experimentalDecorators": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "**/*.spec.ts", 12 | "**/testing/*", 13 | "**/test-sass.js" 14 | ], 15 | "angularCompilerOptions": { 16 | "annotateForClosureCompiler": true, 17 | "strictMetadataEmit": true, 18 | "skipTemplateCodegen": true, 19 | "flatModuleId": "@terminus/ui" 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /projects/library/spacing/src/spacing.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { TsVerticalSpacingDirective } from './vertical-spacing.directive'; 5 | 6 | export * from './vertical-spacing.directive'; 7 | export * from './spacing.constant'; 8 | 9 | 10 | @NgModule({ 11 | imports: [ 12 | CommonModule, 13 | ], 14 | declarations: [ 15 | TsVerticalSpacingDirective, 16 | ], 17 | exports: [ 18 | TsVerticalSpacingDirective, 19 | ], 20 | }) 21 | export class TsSpacingModule {} 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/cohort-date-range/cohort-date-range-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { CohortDateRangeComponent } from './cohort-date-range.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: CohortDateRangeComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class CohortDateRangeRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsSpacingModule } from '@terminus/ui/spacing'; 4 | 5 | import { SpacingRoutingModule } from './spacing-routing.module'; 6 | import { SpacingComponent } from './spacing.component'; 7 | 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule, 12 | SpacingRoutingModule, 13 | TsSpacingModule, 14 | ], 15 | declarations: [ 16 | SpacingComponent, 17 | ], 18 | }) 19 | export class SpacingModule {} 20 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/selection-list/selection-list-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { SelectionListComponent } from './selection-list.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: SelectionListComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class SelectionListRoutingModule { } 22 | -------------------------------------------------------------------------------- /tooling/ci/build-demos-aot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Build the demo project 5 | # 6 | # 1. Overwrite the library in node_modules with the freshly built version 7 | # 2. Build the app with the correct base href 8 | # 9 | 10 | . ~/.bashrc 11 | 12 | # Remove any existing library files 13 | rm -rf node_modules/@terminus/ui/* 14 | 15 | # Move library files to the demo's node_modules 16 | cp -r dist/library/* node_modules/@terminus/ui/ 17 | 18 | # Build the app with the correct base href 19 | yarn run demo:build:ci --base-href https://getterminus.github.io/ui-demos-release/ 20 | -------------------------------------------------------------------------------- /projects/library/scss/layout/_visually-hidden.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Make content visually hidden 3 | * 4 | * @example 5 | * @include visually-hidden; 6 | */ 7 | @mixin visually-hidden { 8 | $smallest-adjustment: 1px; 9 | border: 0; 10 | clip-path: rect(0, 0, 0, 0); 11 | // Not all styles apply to inline elements 12 | display: block; 13 | height: $smallest-adjustment; 14 | margin: -$smallest-adjustment; 15 | overflow: hidden; 16 | padding: 0; 17 | pointer-events: none; 18 | position: absolute; 19 | visibility: hidden; 20 | width: $smallest-adjustment; 21 | } 22 | -------------------------------------------------------------------------------- /projects/library/tooltip/src/tooltip.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { MatTooltipModule } from '@angular/material/tooltip'; 4 | 5 | import { TsTooltipComponent } from './tooltip.component'; 6 | 7 | export * from './tooltip.component'; 8 | 9 | 10 | @NgModule({ 11 | imports: [ 12 | CommonModule, 13 | MatTooltipModule, 14 | ], 15 | exports: [ 16 | TsTooltipComponent, 17 | ], 18 | declarations: [ 19 | TsTooltipComponent, 20 | ], 21 | }) 22 | export class TsTooltipModule {} 23 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/expansion-panel/expansion-panel-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | RouterModule, 4 | Routes, 5 | } from '@angular/router'; 6 | 7 | import { ExpansionPanelComponent } from './expansion-panel.component'; 8 | 9 | 10 | const routes: Routes = [ 11 | { 12 | path: '', 13 | component: ExpansionPanelComponent, 14 | }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forChild(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class ExpansionPanelRoutingModule { } 22 | -------------------------------------------------------------------------------- /projects/visual-regression/src/styles.scss: -------------------------------------------------------------------------------- 1 | @import '~@terminus/ui/helpers'; 2 | @import '~@terminus/ui/terminus-ui.css'; 3 | @import '~@terminus/design-tokens/css/library-design-tokens.css'; 4 | 5 | html { 6 | background-color: color(pure); 7 | font-family: $type__family--base; 8 | font-size: $type__size--base; 9 | font-weight: $type__weight--base; 10 | } 11 | 12 | body { 13 | margin: 0; 14 | } 15 | 16 | hr, 17 | .page { 18 | margin: 1rem; 19 | } 20 | 21 | 22 | router-outlet + * { 23 | display: flex; 24 | flex-direction: column; 25 | min-height: 100%; 26 | } 27 | -------------------------------------------------------------------------------- /projects/library/icon/src/icon.component.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /projects/visual-regression/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | VisualRegression 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tooling/ci/demos-predeploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Deploy demos 5 | # 6 | 7 | . ~/.bashrc 8 | 9 | # Enter the demos repo 10 | cd ui-demos-release || exit 11 | 12 | # Remove old demo files 13 | echo "Deleting old demo files:" 14 | find . -regextype posix-extended -regex '.*\.(html|css|js)' -type f -delete 15 | 16 | # Go back to the root 17 | cd ../ 18 | 19 | # Move new files into the cloned repo 20 | mv -f -v dist/demo/* ui-demos-release/ 21 | 22 | # Clone the index.html file as 404.html to support deep linking 23 | cp ui-demos-release/index.html ui-demos-release/404.html 24 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/expansion-panel/expansion-panel.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'app-expansion-panel', 6 | templateUrl: './expansion-panel.component.html', 7 | }) 8 | export class ExpansionPanelComponent { 9 | loadPanel = true; 10 | allowMultiple = false; 11 | activeStep = 0; 12 | 13 | nextStep() { 14 | this.activeStep++; 15 | } 16 | 17 | previousStep() { 18 | this.activeStep--; 19 | } 20 | 21 | setStep(index) { 22 | this.activeStep = index; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/typography/typography.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsCardModule } from '@terminus/ui/card'; 4 | 5 | import { TypographyRoutingModule } from './typography-routing.module'; 6 | import { TypographyComponent } from './typography.component'; 7 | 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule, 12 | TsCardModule, 13 | TypographyRoutingModule, 14 | ], 15 | declarations: [ 16 | TypographyComponent, 17 | ], 18 | }) 19 | export class TypographyModule {} 20 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/src/trigger/expansion-panel-trigger-title.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ChangeDetectionStrategy, 3 | Component, 4 | ViewEncapsulation, 5 | } from '@angular/core'; 6 | 7 | 8 | @Component({ 9 | selector: 'ts-expansion-panel-trigger-title', 10 | template: ``, 11 | host: { class: 'ts-expansion-panel__trigger-title' }, 12 | changeDetection: ChangeDetectionStrategy.OnPush, 13 | encapsulation: ViewEncapsulation.None, 14 | exportAs: 'tsExpansionPanelTriggerTitle', 15 | }) 16 | export class TsExpansionPanelTriggerTitleComponent {} 17 | -------------------------------------------------------------------------------- /projects/library/scss/cursors/_cursors.spec.scss: -------------------------------------------------------------------------------- 1 | @import 'true'; 2 | @import 'cursors'; 3 | 4 | 5 | @include describe ('cursors') { 6 | @include test ('should output a cursor') { 7 | @include assert { 8 | @include output { 9 | .foo { 10 | cursor: cursor(col-resize); 11 | } 12 | .bar { 13 | cursor: cursor(help); 14 | } 15 | } 16 | @include expect { 17 | .foo { 18 | cursor: col-resize; 19 | } 20 | .bar { 21 | cursor: help; 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /projects/library/utilities/src/version/version.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Create version information from a version string 3 | */ 4 | export class Version { 5 | public readonly major: string; 6 | public readonly minor: string; 7 | public readonly patch: string; 8 | 9 | constructor(public full: string) { 10 | this.major = full.split('.')[0]; 11 | this.minor = full.split('.')[1]; 12 | // eslint-disable-next-line @typescript-eslint/no-magic-numbers 13 | this.patch = full.split('.').slice(2).join('.'); 14 | } 15 | } 16 | 17 | export const VERSION = new Version('0.0.0-PLACEHOLDER'); 18 | -------------------------------------------------------------------------------- /projects/library/login-form/src/login-form.component.md: -------------------------------------------------------------------------------- 1 |

Login Form

2 | 3 | 4 | 5 | 6 | **Table of Contents** 7 | 8 | - [Basic Usage](#basic-usage) 9 | 10 | 11 | 12 | 13 | ## Basic Usage 14 | 15 | Create a basic login form with submit function: 16 | 17 | ```html 18 | 21 | ``` 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { createComponent } from '@terminus/ngx-tools/testing'; 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | describe('AppComponent', () => { 8 | test('should create the app', async(() => { 9 | const fixture = createComponent(AppComponent, [], [RouterTestingModule]); 10 | const app = fixture.debugElement.componentInstance; 11 | fixture.detectChanges(); 12 | 13 | expect(app).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/breakpoints/breakpoints.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsCardModule } from '@terminus/ui/card'; 4 | 5 | import { BreakpointsRoutingModule } from './breakpoints-routing.module'; 6 | import { BreakpointsComponent } from './breakpoints.component'; 7 | 8 | 9 | @NgModule({ 10 | imports: [ 11 | BreakpointsRoutingModule, 12 | CommonModule, 13 | TsCardModule, 14 | ], 15 | declarations: [ 16 | BreakpointsComponent, 17 | ], 18 | }) 19 | export class BreakpointsModule {} 20 | -------------------------------------------------------------------------------- /projects/library/sort/src/sort.directive.spec.ts: -------------------------------------------------------------------------------- 1 | import { TsSortDirective } from './sort.directive'; 2 | 3 | // NOTE: These tests were added to cover areas missed by the TsTable integration tests 4 | describe(`TsSortDirective`, function() { 5 | let directive: TsSortDirective; 6 | 7 | beforeEach(() => { 8 | directive = new TsSortDirective(); 9 | }); 10 | 11 | describe(`getNextSortDirection()`, () => { 12 | it(`should return an empty string if no 'sortable' was passed in`, () => { 13 | expect(directive.getNextSortDirection(null as any)).toEqual(''); 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /projects/library/utilities/src/error/ui-error.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A Terminus UI specific Error 3 | */ 4 | export class TsUILibraryError extends Error { 5 | constructor(message: string) { 6 | super(message); 7 | // HACK: Set the prototype explicitly. See: 8 | // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work 9 | Object.setPrototypeOf(this, TsUILibraryError.prototype); 10 | this.message = message; 11 | this.name = 'TsUILibraryError'; 12 | this.stack = (new Error(message)).stack; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/library/date-range/src/date-range.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/color/color'; 2 | @import '../../scss/reset/reset'; 3 | 4 | 5 | // 6 | // @component 7 | // Date Range 8 | // @description 9 | // Two datepicker components to create a date range component 10 | // 11 | .ts-date-range { 12 | @include reset; 13 | display: block; 14 | } 15 | 16 | .c-date-range { 17 | .c-date-range__separator { 18 | // NOTE: Needed to offset the space created for validation messages 19 | $negative-adjustment: -1.2em; 20 | color: color(utility); 21 | margin-top: $negative-adjustment; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /projects/library/link/src/link.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | import { TsIconModule } from '@terminus/ui/icon'; 5 | 6 | import { TsLinkComponent } from './link.component'; 7 | 8 | export * from './link.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | RouterModule, 15 | TsIconModule, 16 | ], 17 | exports: [ 18 | TsLinkComponent, 19 | ], 20 | declarations: [ 21 | TsLinkComponent, 22 | ], 23 | }) 24 | export class TsLinkModule {} 25 | -------------------------------------------------------------------------------- /projects/library/scrollbars/src/scrollbars.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; 4 | 5 | import { TsScrollbarsComponent } from './scrollbars.component'; 6 | 7 | 8 | export * from './scrollbars.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | PerfectScrollbarModule, 15 | ], 16 | declarations: [ 17 | TsScrollbarsComponent, 18 | ], 19 | exports: [ 20 | TsScrollbarsComponent, 21 | ], 22 | }) 23 | export class TsScrollbarsModule {} 24 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing-styles.component.scss: -------------------------------------------------------------------------------- 1 | @import '~@terminus/ui/helpers'; 2 | 3 | .box { 4 | margin-bottom: spacing(large, 0); 5 | // sass-lint:disable no-color-keywords no-color-literals 6 | outline: 1px solid lightblue; 7 | 8 | // Create classes to demonstrate all spacing options 9 | @each $type, $sizes in $g-spacings { 10 | @each $size, $space in $sizes { 11 | &--#{$type}--#{$size} { 12 | @if $space { 13 | padding: spacing($type, $size); 14 | } @else { 15 | padding: spacing($type); 16 | } 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/spacing/spacing-styles.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsSpacingModule } from '@terminus/ui/spacing'; 4 | 5 | import { SpacingStylesRoutingModule } from './spacing-styles-routing.module'; 6 | import { SpacingStylesComponent } from './spacing-styles.component'; 7 | 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule, 12 | SpacingStylesRoutingModule, 13 | TsSpacingModule, 14 | ], 15 | declarations: [ 16 | SpacingStylesComponent, 17 | ], 18 | }) 19 | export class SpacingStylesModule {} 20 | -------------------------------------------------------------------------------- /projects/demo/src/main.ts: -------------------------------------------------------------------------------- 1 | // NOTE: Import needed since v9 2 | // See: https://stackoverflow.com/a/60183174/722367 3 | // eslint-disable-next-line import/no-unassigned-import 4 | import '@angular/compiler'; 5 | import { enableProdMode } from '@angular/core'; 6 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 7 | 8 | import { AppModule } from './app/app.module'; 9 | import { environment } from './environments/environment'; 10 | 11 | if (environment.production) { 12 | enableProdMode(); 13 | } 14 | 15 | platformBrowserDynamic().bootstrapModule(AppModule) 16 | .catch(err => console.error(err)); 17 | -------------------------------------------------------------------------------- /projects/library/checkbox/src/checkbox.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { MatCheckboxModule } from '@angular/material/checkbox'; 5 | 6 | import { TsCheckboxComponent } from './checkbox.component'; 7 | 8 | export * from './checkbox.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | FormsModule, 15 | MatCheckboxModule, 16 | ], 17 | exports: [TsCheckboxComponent], 18 | declarations: [TsCheckboxComponent], 19 | }) 20 | export class TsCheckboxModule {} 21 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/src/trigger/expansion-panel-trigger-description.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ChangeDetectionStrategy, 3 | Component, 4 | ViewEncapsulation, 5 | } from '@angular/core'; 6 | 7 | 8 | @Component({ 9 | selector: 'ts-expansion-panel-trigger-description', 10 | template: ``, 11 | host: { class: 'ts-expansion-panel__trigger-description' }, 12 | changeDetection: ChangeDetectionStrategy.OnPush, 13 | encapsulation: ViewEncapsulation.None, 14 | exportAs: 'tsExpansionPanelTriggerDescription', 15 | }) 16 | export class TsExpansionPanelTriggerDescriptionComponent {} 17 | -------------------------------------------------------------------------------- /projects/library/utilities/src/error/ui-error.spec.ts: -------------------------------------------------------------------------------- 1 | import { TsUILibraryError } from './ui-error'; 2 | 3 | describe(`TsUILibraryError`, () => { 4 | let error: TsUILibraryError; 5 | 6 | beforeEach(() => { 7 | error = new TsUILibraryError('Foo bar baz'); 8 | }); 9 | 10 | test(`should return our error`, () => { 11 | expect(error.name).toEqual('TsUILibraryError'); 12 | expect(error.message).toEqual('Foo bar baz'); 13 | expect(error.stack).toEqual(expect.stringContaining('Error: Foo bar baz')); 14 | expect(error.stack).toEqual(expect.stringContaining('at new TsUILibraryError')); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /projects/library/chip/src/chip-collection.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/spacing/spacing'; 2 | 3 | 4 | .ts-chip-collection { 5 | display: block; 6 | 7 | &--vertical { 8 | display: inline-block; 9 | 10 | .ts-chip-collection-wrapper { 11 | align-items: flex-start; 12 | flex-direction: column; 13 | } 14 | 15 | // Needed for specificity 16 | .ts-chip { 17 | .c-chip { 18 | margin-left: 0; 19 | margin-right: 0; 20 | } 21 | } 22 | } 23 | } 24 | 25 | .ts-chip-collection-wrapper { 26 | align-items: center; 27 | display: flex; 28 | flex-wrap: wrap; 29 | } 30 | -------------------------------------------------------------------------------- /projects/library/scss/menu/_menu.scss: -------------------------------------------------------------------------------- 1 | @import '../typography/typography'; 2 | @import '../spacing/spacing'; 3 | 4 | 5 | /** 6 | * Base styles for menu items 7 | * 8 | * @example 9 | * @include menu-base; 10 | */ 11 | @mixin menu-item-base() { 12 | @include truncate-overflow; 13 | // Needs to be a block for the ellipsis to work. 14 | display: block; 15 | // Required for Edge not to show scrollbars when setting the width manually. 16 | max-width: 100%; 17 | padding: 0 spacing(default); 18 | position: relative; 19 | text-align: left; 20 | // Necessary to reset anchor tags: 21 | text-decoration: none; 22 | } 23 | -------------------------------------------------------------------------------- /projects/library/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./../../tsconfig.json", 3 | "includes": [ 4 | "projects/**/!(*spec|*mock|*d).ts" 5 | ], 6 | "angularCompilerOptions": { 7 | "enableIvy": true 8 | }, 9 | "compilerOptions": { 10 | "baseUrl": "./", 11 | "rootDir": "./", 12 | "declaration": false, 13 | "emitDecoratorMetadata": true, 14 | "experimentalDecorators": true, 15 | "types": [ 16 | "jsdom", 17 | "jest" 18 | ], 19 | "paths": { 20 | "@terminus/ui": [ 21 | "dist/library/terminus-ui", 22 | "dist/library" 23 | ] 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /projects/demo/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UI Demos 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /projects/library/option/src/optgroup.component.html: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /projects/library/option/src/optgroup.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../scss/color/color'; 2 | @import '../../scss/spacing/spacing'; 3 | @import '../../scss/typography/typography'; 4 | 5 | 6 | // 7 | // @component 8 | // Optgroup 9 | // @description 10 | // An optgroup for a select menu 11 | // 12 | .ts-optgroup { 13 | display: block; 14 | 15 | &.ts-optgroup--disabled { 16 | color: color(utility, dark); 17 | } 18 | 19 | .ts-optgroup-label { 20 | @include typography(body, 2); 21 | @include truncate-overflow; 22 | color: color(utility); 23 | display: block; 24 | padding-left: spacing(small); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /projects/library/sort/src/sort-errors.ts: -------------------------------------------------------------------------------- 1 | export const getSortDuplicateSortableIdError = 2 | (id: string): Error => Error(`Cannot have two TsSortables with the same id (${id}).`); 3 | 4 | export const getSortHeaderNotContainedWithinSortError = 5 | (): Error => Error(`TsSortHeader must be placed within a parent element with the TsSort directive.`); 6 | 7 | export const getSortHeaderMissingIdError = 8 | (): Error => Error(`TsSortHeader must be provided with a unique id.`); 9 | 10 | export const getSortInvalidDirectionError = 11 | (direction: string): Error => Error(`${direction} is not a valid sort direction ('asc' or 'desc').`); 12 | -------------------------------------------------------------------------------- /projects/library/utilities/src/cva-provider-factory/cva-provider-factory.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ExistingProvider, 3 | forwardRef, 4 | Type, 5 | } from '@angular/core'; 6 | import { NG_VALUE_ACCESSOR } from '@angular/forms'; 7 | 8 | 9 | /** 10 | * Generate our custom CVA factory 11 | * 12 | * @param type 13 | * @returns ExistingProvider 14 | */ 15 | // eslint-disable-next-line prefer-arrow/prefer-arrow-functions 16 | export function ControlValueAccessorProviderFactory(type: Type): ExistingProvider { 17 | return { 18 | provide: NG_VALUE_ACCESSOR, 19 | useExisting: forwardRef(() => type), 20 | multi: true, 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /projects/library/input/src/input-value-accessor.ts: -------------------------------------------------------------------------------- 1 | import { InjectionToken } from '@angular/core'; 2 | 3 | 4 | /** 5 | * This token is used to inject the object whose value should be set into {@link TsInputComponent}. If none is 6 | * provided, the native `HTMLInputElement` is used. Directives like {@link TsAutocompleteTriggerDirective} can provide 7 | * themselves for this token, in order to make `TsInputComponent` delegate the getting and setting of the 8 | * value to them. 9 | */ 10 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 11 | export const TS_INPUT_VALUE_ACCESSOR = new InjectionToken<{value: any}>('TS_INPUT_VALUE_ACCESSOR'); 12 | -------------------------------------------------------------------------------- /projects/library/toggle/src/toggle.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { MatSlideToggleModule } from '@angular/material/slide-toggle'; 5 | 6 | import { TsToggleComponent } from './toggle.component'; 7 | 8 | export * from './toggle.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | FormsModule, 15 | MatSlideToggleModule, 16 | ], 17 | exports: [ 18 | TsToggleComponent, 19 | ], 20 | declarations: [ 21 | TsToggleComponent, 22 | ], 23 | }) 24 | export class TsToggleModule {} 25 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | notify: 3 | require_ci_to_pass: yes 4 | 5 | coverage: 6 | range: 90..100 7 | round: down 8 | precision: 2 9 | status: 10 | project: 11 | default: off 12 | unit: 13 | flags: unit 14 | 15 | flags: 16 | unit: 17 | paths: 18 | - terminus-ui/ 19 | 20 | ignore: 21 | - "coverage" 22 | - "dist" 23 | - "build" 24 | - "docs" 25 | # TODO: Remove 'integration' from this list when enabling integration tests 26 | - "integration" 27 | - "node_modules" 28 | - "out-tsc" 29 | - "demo/app" 30 | - "tooling" 31 | - "terminus-ui/src/**/*.spec.ts" 32 | - "terminus-ui/src/**/*.mock.ts" 33 | 34 | -------------------------------------------------------------------------------- /projects/library/tabs/src/collection/tab-collection.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../scss/animation/animation'; 2 | 3 | 4 | // Container around all tabs 5 | .ts-tab-collection { 6 | display: flex; 7 | flex-direction: column; 8 | 9 | // Support for moving the tab header below the content 10 | &.ts-tab-collection--inverted-header { 11 | flex-direction: column-reverse; 12 | } 13 | } 14 | 15 | // The bottom section of the view containing the tab bodies 16 | .ts-tab-collection__body-wrapper { 17 | display: flex; 18 | overflow: hidden; 19 | position: relative; 20 | transition: height $g-tab-animation-duration $g-tab-ease-in-out-curve-function; 21 | } 22 | -------------------------------------------------------------------------------- /projects/library/date-range/src/date-range.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FlexLayoutModule } from '@angular/flex-layout'; 4 | import { TsInputModule } from '@terminus/ui/input'; 5 | 6 | import { TsDateRangeComponent } from './date-range.component'; 7 | 8 | export * from './date-range.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | FlexLayoutModule, 15 | TsInputModule, 16 | ], 17 | exports: [ 18 | TsDateRangeComponent, 19 | ], 20 | declarations: [ 21 | TsDateRangeComponent, 22 | ], 23 | }) 24 | export class TsDateRangeModule {} 25 | -------------------------------------------------------------------------------- /projects/library/expansion-panel/src/expansion-panel.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
13 |
14 | 15 | 16 |
17 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /projects/library/scss/buttons/_buttons.spec.scss: -------------------------------------------------------------------------------- 1 | @import 'true'; 2 | @import 'buttons'; 3 | 4 | @include describe ('button') { 5 | @include test ('should correctly render button-base') { 6 | @include assert { 7 | @include output { 8 | .button-test { 9 | @include button-base(); 10 | } 11 | } 12 | @include expect { 13 | .button-test { 14 | background-color: transparent; 15 | border: 0; 16 | cursor: pointer; 17 | outline: 0; 18 | text-align: center; 19 | } 20 | 21 | .button-test:focus { 22 | outline: 0; 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /projects/library/utilities/src/version/version.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Version, 3 | VERSION, 4 | } from './version'; 5 | 6 | describe(`Version`, function() { 7 | test(`should expose a Version object`, () => { 8 | const version = new Version('9.8.7-beta.1'); 9 | expect(version.full).toEqual('9.8.7-beta.1'); 10 | expect(version.major).toEqual('9'); 11 | expect(version.minor).toEqual('8'); 12 | expect(version.patch).toEqual('7-beta.1'); 13 | }); 14 | }); 15 | 16 | describe(`VERSION`, () => { 17 | test(`should have full version object`, () => { 18 | expect(VERSION.full).toEqual('0.0.0-PLACEHOLDER'); 19 | expect(VERSION.major).toEqual('0'); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/icon/icon.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsCardModule } from '@terminus/ui/card'; 4 | import { TsIconModule } from '@terminus/ui/icon'; 5 | import { TsSpacingModule } from '@terminus/ui/spacing'; 6 | 7 | import { IconRoutingModule } from './icon-routing.module'; 8 | import { IconComponent } from './icon.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | IconRoutingModule, 15 | TsCardModule, 16 | TsIconModule, 17 | TsSpacingModule, 18 | ], 19 | declarations: [ 20 | IconComponent, 21 | ], 22 | }) 23 | export class IconModule {} 24 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/link/link.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsCardModule } from '@terminus/ui/card'; 4 | import { TsLinkModule } from '@terminus/ui/link'; 5 | import { TsSpacingModule } from '@terminus/ui/spacing'; 6 | 7 | import { LinkRoutingModule } from './link-routing.module'; 8 | import { LinkComponent } from './link.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | LinkRoutingModule, 15 | TsCardModule, 16 | TsLinkModule, 17 | TsSpacingModule, 18 | ], 19 | declarations: [ 20 | LinkComponent, 21 | ], 22 | }) 23 | export class LinkModule {} 24 | -------------------------------------------------------------------------------- /projects/demo/src/styles.scss: -------------------------------------------------------------------------------- 1 | @import '~@terminus/ui/helpers'; 2 | @import '~@terminus/ui/terminus-ui.css'; 3 | @import '~@terminus/design-tokens/css/library-design-tokens.css'; 4 | 5 | html { 6 | background-color: color(pure); 7 | font-family: $type__family--base; 8 | font-size: $type__size--base; 9 | font-weight: $type__weight--base; 10 | } 11 | 12 | body { 13 | margin: 0; 14 | } 15 | 16 | hr { 17 | margin: 1rem; 18 | } 19 | 20 | 21 | // stylelint-disable-next-line selector-type-no-unknown, scss/selector-nest-combinators 22 | router-outlet + * { 23 | display: flex; 24 | flex-direction: column; 25 | min-height: 100%; 26 | 27 | .content { 28 | padding: 2rem; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /projects/library/chip/src/chip-badge.directive.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Directive, 3 | ElementRef, 4 | Host, 5 | OnInit, 6 | } from '@angular/core'; 7 | 8 | import { TsChipComponent } from './chip.component'; 9 | 10 | 11 | @Directive({ selector: '[tsChipBadge]' }) 12 | export class TsChipBadgeDirective implements OnInit { 13 | 14 | constructor( 15 | private elementRef: ElementRef, 16 | @Host() private parent: TsChipComponent, 17 | ) {} 18 | 19 | public ngOnInit(): void { 20 | this.parent.isFocusable = false; 21 | this.parent.isRemovable = false; 22 | this.parent.isSelectable = false; 23 | this.elementRef.nativeElement.classList.add('ts-chip--badge'); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/pipes/pipes.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsCardModule } from '@terminus/ui/card'; 4 | import { TsPipesModule } from '@terminus/ui/pipes'; 5 | import { TsSpacingModule } from '@terminus/ui/spacing'; 6 | 7 | import { PipesRoutingModule } from './pipes-routing.module'; 8 | import { PipesComponent } from './pipes.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | PipesRoutingModule, 15 | TsCardModule, 16 | TsPipesModule, 17 | TsSpacingModule, 18 | ], 19 | declarations: [ 20 | PipesComponent, 21 | ], 22 | }) 23 | export class PipesModule {} 24 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/chart/chart.component.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Demo Controls 4 |

5 | 6 |
7 | 11 | {{ option }} 15 | 16 |
17 |
18 | 19 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /projects/library/popover/src/popover.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { TsPopoverTriggerDirective } from './popover-trigger.directive'; 5 | import { TsPopoverComponent } from './popover.component'; 6 | 7 | export * from './popover.component'; 8 | export * from './popover-trigger.directive'; 9 | export * from './popover-options'; 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | ], 15 | declarations: [ 16 | TsPopoverComponent, 17 | TsPopoverTriggerDirective, 18 | ], 19 | exports: [ 20 | TsPopoverComponent, 21 | TsPopoverTriggerDirective, 22 | ], 23 | }) 24 | export class TsPopoverModule { } 25 | -------------------------------------------------------------------------------- /projects/library/scrollbars/src/scrollbars.component.html: -------------------------------------------------------------------------------- 1 |
18 | 19 |
20 | -------------------------------------------------------------------------------- /projects/library/scss/reset/_reset.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Reset browser and bootstrap styles 3 | * 4 | * NOTE: This is needed because we cannot use a global reset stylesheet. Once the full Terminus app 5 | * has transitioned to the UI library, this can be removed in favor of a global reset stylesheet. 6 | * 7 | * @example 8 | * @include reset; 9 | */ 10 | @mixin reset() { 11 | // Enforce consistent sizing 12 | // NOTE: wrappers for Material labels use a custom box-sizing 13 | * { 14 | &:not(.mat-form-field-label-wrapper) { 15 | box-sizing: border-box; 16 | } 17 | } 18 | 19 | // Unset margins 20 | h1, 21 | h2, 22 | h3, 23 | h4, 24 | h5, 25 | p { 26 | margin: unset; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/pipes/pipes.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TsSentenceCasePipe } from '@terminus/ui/pipes'; 3 | 4 | 5 | @Component({ 6 | selector: 'demo-pipes', 7 | styles: [` 8 | strong { display: block; } 9 | pre { font-size: 12px; } 10 | `], 11 | templateUrl: './pipes.component.html', 12 | }) 13 | export class PipesComponent { 14 | date = new Date(2018, 1, 8); 15 | dateString = this.date.toISOString(); 16 | oldDate = new Date(2018, 1, 3); 17 | myString = 'ANOTHER STRING'; 18 | myStringTransformed = this.sentenceCasePipe.transform(this.myString); 19 | 20 | constructor( 21 | private sentenceCasePipe: TsSentenceCasePipe, 22 | ) {} 23 | } 24 | -------------------------------------------------------------------------------- /projects/library/radio-group/src/design-decisions.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Table of Contents** 4 | 5 | - [Radio Group design decisions](#radio-group-design-decisions) 6 | 7 | 8 | 9 | ## Radio Group design decisions 10 | 11 | 1. Users cannot tab through a collection of radio buttons. According to the spec, a radio group acts 12 | as a single form item. See https://stackoverflow.com/a/14322755/722367 13 | - Users can use `` to reach the tab group, then the arrow keys to move between radio 14 | options. 15 | -------------------------------------------------------------------------------- /projects/library/scss/a11y/_a11y.spec.scss: -------------------------------------------------------------------------------- 1 | @import 'true'; 2 | @import 'a11y'; 3 | 4 | @include describe ('a11y') { 5 | @include test ('should correctly render cdk-a11y') { 6 | @include assert { 7 | @include output { 8 | @include cdk-a11y(); 9 | } 10 | @include expect { 11 | .cdk-visually-hidden { 12 | -webkit-appearance: none; 13 | -moz-appearance: none; 14 | 15 | border: 0; 16 | clip: rect(0 0 0 0); 17 | height: 1px; 18 | margin: -1px; 19 | outline: 0; 20 | overflow: hidden; 21 | padding: 0; 22 | position: absolute; 23 | width: 1px; 24 | } 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/copy/copy.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TsStyleThemeTypes } from '@terminus/ui/utilities'; 3 | 4 | 5 | @Component({ 6 | selector: 'demo-copy', 7 | templateUrl: './copy.component.html', 8 | }) 9 | export class CopyComponent { 10 | // eslint-disable-next-line max-len 11 | public fakeUrl = 'https://github.com/foo/bar/baz/bing/bang/boom/foo/bar/baz/bing/bang/boom/foo/bar/baz/bing/bang/boom/foo/bar/baz/bing/bang/boom/foo/bar/baz/bing/bang/boom/foo/bar/baz/bing/bang/boom'; 12 | public canCopy = true; 13 | public format = 'standard'; 14 | public theme: TsStyleThemeTypes = 'primary'; 15 | public themes: TsStyleThemeTypes[] = ['primary', 'accent', 'warn']; 16 | } 17 | -------------------------------------------------------------------------------- /projects/library/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "angularCompilerOptions": { 4 | "enableIvy": false, 5 | "enableResourceInlining": true, 6 | "flatModuleId": "@terminus/ui", 7 | "preserveWhitespaces": false, 8 | "skipTemplateCodegen": true, 9 | "strictMetadataEmit": true 10 | }, 11 | "compilerOptions": { 12 | "declaration": true, 13 | "experimentalDecorators": true, 14 | "outDir": "../../out-tsc/lib", 15 | "strictNullChecks": true, 16 | "target": "es2015", 17 | "types": [] 18 | }, 19 | "exclude": [ 20 | "**/*.spec.ts", 21 | "**/testing/*", 22 | "**/test-sass.js", 23 | "**/!(demo)/**/*", 24 | "**/!(visual-regression)/**/*" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/navigation/navigation.component.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Demo Controls 4 |

5 | 6 | 7 |
8 | 9 | 10 |
11 |
12 | 13 | Logo 14 | 15 |
16 | 17 | 25 |
26 | -------------------------------------------------------------------------------- /projects/library/input/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "ngPackage": { 3 | "lib": { 4 | "entryFile": "src/public-api.ts", 5 | "umdModuleIds": { 6 | "@terminus/ngx-tools/browser": "terminus.ngxTools.browser", 7 | "@terminus/ngx-tools/coercion": "terminus.ngxTools.coercion", 8 | "@terminus/ngx-tools/type-guards": "terminus.ngxTools.type-guards", 9 | "@terminus/ngx-tools/utilities": "terminus.ngxTools.utilities", 10 | "date-fns": "dateFns", 11 | "text-mask-core/dist/textMaskCore": "textMaskCore", 12 | "text-mask-addons/dist/createNumberMask": "createNumberMask", 13 | "text-mask-addons/dist/createAutoCorrectedDatePipe": "createAutoCorrectedDatePipe" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/library/pipes/src/sentence-case/sentence-case.pipe.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Pipe, 3 | PipeTransform, 4 | } from '@angular/core'; 5 | 6 | 7 | /** 8 | * The sentence case pipe 9 | * 10 | * @example 11 | * {{ 'HERE IS MY STRING' | tsSentenceCase }} 12 | * 13 | * https://getterminus.github.io/ui-demos-release/components/pipes 14 | */ 15 | @Pipe({ name: 'tsSentenceCase' }) 16 | export class TsSentenceCasePipe implements PipeTransform { 17 | public transform(value: string): string | undefined { 18 | // Check for null values to avoid issues during data-binding 19 | if (!value) { 20 | return undefined; 21 | } 22 | return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /projects/library/loading-overlay/src/loading-overlay.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ChangeDetectionStrategy, 3 | Component, 4 | ViewEncapsulation, 5 | } from '@angular/core'; 6 | 7 | 8 | /** 9 | * The loading overlay component. Implemented by {@link TsLoadingOverlayDirective} 10 | * 11 | * @example 12 | * See {@link TsLoadingOverlayDirective} 13 | */ 14 | @Component({ 15 | selector: 'ts-loading-overlay', 16 | styleUrls: ['./loading-overlay.component.scss'], 17 | host: { class: 'ts-loading-overlay' }, 18 | templateUrl: './loading-overlay.component.html', 19 | changeDetection: ChangeDetectionStrategy.OnPush, 20 | encapsulation: ViewEncapsulation.None, 21 | exportAs: 'tsLoadingOverlay', 22 | }) 23 | export class TsLoadingOverlayComponent {} 24 | -------------------------------------------------------------------------------- /projects/library/scss/global/_generated-classes.scss: -------------------------------------------------------------------------------- 1 | @import '../typography/typography'; 2 | @import '../spacing/spacing'; 3 | 4 | 5 | /** 6 | * Base vertical spacing class 7 | */ 8 | .u-vertical-spacing { 9 | margin-bottom: $g-spacing; 10 | } 11 | 12 | 13 | /** 14 | * Loop over the map and create vertical layout utility classes 15 | * Example: `.u-spacing__large--2` 16 | */ 17 | @each $size, $collection in $g-spacings { 18 | // Loop over each collection (ie 'small') 19 | @each $x, $spacing in $collection { 20 | .u-vertical-spacing__#{$size}--#{$x} { 21 | margin-bottom: $spacing; 22 | } 23 | } 24 | 25 | // Class needed for directive implementation 26 | .u-vertical-spacing__none { 27 | margin-bottom: 0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /projects/library/tabs/src/body/tab-body.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../scss/color/color'; 2 | @import '../../../scss/layout/layout'; 3 | @import '../../../scss/spacing/spacing'; 4 | 5 | 6 | // Wraps each tab body 7 | .ts-tab-body { 8 | $z-index-upper: 1; 9 | 10 | @include take-space; 11 | display: block; 12 | // Fix for auto content wrapping in IE11 13 | flex-basis: 100%; 14 | overflow: hidden; 15 | 16 | &.ts-tab-body--active { 17 | flex-grow: 1; 18 | overflow-x: hidden; 19 | overflow-y: hidden; 20 | position: relative; 21 | z-index: $z-index-upper; 22 | } 23 | } 24 | 25 | .ts-tab-body__content { 26 | background-color: color(pure); 27 | height: 100%; 28 | overflow: hidden; 29 | padding: spacing(default); 30 | } 31 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/login-form/login-form.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { TsCardModule } from '@terminus/ui/card'; 4 | import { TsLoginFormModule } from '@terminus/ui/login-form'; 5 | import { TsSpacingModule } from '@terminus/ui/spacing'; 6 | 7 | import { LoginFormRoutingModule } from './login-form-routing.module'; 8 | import { LoginFormComponent } from './login-form.component'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | LoginFormRoutingModule, 15 | TsCardModule, 16 | TsLoginFormModule, 17 | TsSpacingModule, 18 | ], 19 | declarations: [ 20 | LoginFormComponent, 21 | ], 22 | }) 23 | export class LoginFormModule {} 24 | -------------------------------------------------------------------------------- /projects/library/tabs/src/body/tab-content.directive.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Directive, 3 | TemplateRef, 4 | } from '@angular/core'; 5 | 6 | 7 | /** 8 | * Decorates the `ng-template` tags and reads out the template from it 9 | * 10 | * @example 11 | * 12 | * 13 | * My tab content 14 | * 15 | * 16 | * 17 | * https://getterminus.github.io/ui-demos-release/components/tabs 18 | */ 19 | @Directive({ selector: '[tsTabContent]' }) 20 | export class TsTabContentDirective { 21 | constructor( 22 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 23 | public template: TemplateRef, 24 | ) {} 25 | } 26 | -------------------------------------------------------------------------------- /projects/visual-regression/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { production: false }; 6 | 7 | /* 8 | * For easier debugging in development mode, you can import the following file 9 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 10 | * 11 | * This import should be commented out in production mode because it will have a negative impact 12 | * on performance if an error is thrown. 13 | */ 14 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 15 | -------------------------------------------------------------------------------- /cypress/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /projects/library/confirmation/src/confirmation-overlay.component.html: -------------------------------------------------------------------------------- 1 |
4 |

5 | {{ explanationText }} 6 |

7 | 8 |
13 | 19 | {{ cancelButtonText }} 20 | 21 | 22 | 26 | {{ confirmationButtonText }} 27 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /projects/library/icon-button/src/icon-button.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { MatButtonModule } from '@angular/material/button'; 4 | import { MatRippleModule } from '@angular/material/core'; 5 | import { TsIconModule } from '@terminus/ui/icon'; 6 | 7 | import { TsIconButtonComponent } from './icon-button.component'; 8 | 9 | export * from './icon-button.component'; 10 | 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | MatButtonModule, 16 | MatRippleModule, 17 | TsIconModule, 18 | ], 19 | declarations: [ 20 | TsIconButtonComponent, 21 | ], 22 | exports: [ 23 | TsIconButtonComponent, 24 | ], 25 | }) 26 | export class TsIconButtonModule {} 27 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/copy/copy.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { TsCardModule } from '@terminus/ui/card'; 5 | import { TsCopyModule } from '@terminus/ui/copy'; 6 | import { TsSpacingModule } from '@terminus/ui/spacing'; 7 | 8 | import { CopyRoutingModule } from './copy-routing.module'; 9 | import { CopyComponent } from './copy.component'; 10 | 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | CopyRoutingModule, 16 | FormsModule, 17 | TsCardModule, 18 | TsCopyModule, 19 | TsSpacingModule, 20 | ], 21 | declarations: [ 22 | CopyComponent, 23 | ], 24 | }) 25 | export class CopyModule {} 26 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/search/search.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-search', 6 | templateUrl: './search.component.html', 7 | }) 8 | export class SearchComponent { 9 | inProgress = false; 10 | startingValue = ''; 11 | shouldAutoSubmit = true; 12 | 13 | 14 | onSubmit(query: string): void { 15 | console.warn('DEMO: submission!', query); 16 | this.inProgress = true; 17 | 18 | setTimeout(() => { 19 | this.inProgress = false; 20 | }, 1000); 21 | } 22 | 23 | 24 | onClear(): void { 25 | console.log('DEMO: search cleared!'); 26 | } 27 | 28 | onChange(value: string): void { 29 | console.log('DEMO: search input changed: ', value); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /projects/library/link/src/link.component.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 24 | open_in_new 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /projects/library/scss/card/_card.scss: -------------------------------------------------------------------------------- 1 | @import '../typography/typography'; 2 | @import '../spacing/spacing'; 3 | @import '../shadows/shadows'; 4 | @import '../cursors/cursors'; 5 | 6 | 7 | @mixin card( 8 | $allows-interaction: false 9 | ) { 10 | min-height: calc(100% - #{spacing(large) * 2}); 11 | padding: spacing(large); 12 | vertical-align: top; 13 | 14 | // If the card allows interaction, give it a hover state 15 | @if $allows-interaction == true { 16 | @include elevation-element(card); 17 | cursor: cursor(pointer); 18 | } @else { 19 | // Otherwise include standard elevation 20 | @include elevation(2); 21 | } 22 | 23 | // Class added by the TsCardTitleDirective 24 | .c-card__title { 25 | @include typography(title); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/search/search.component.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Demo Controls 4 |

5 | 6 | 10 | 11 |
12 | 13 | 17 |
18 | 19 | 20 | 21 | 30 | 31 | -------------------------------------------------------------------------------- /projects/library/loading-overlay/src/loading-overlay.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { TsLoadingOverlayComponent } from './loading-overlay.component'; 5 | import { TsLoadingOverlayDirective } from './loading-overlay.directive'; 6 | 7 | export * from './loading-overlay.component'; 8 | export * from './loading-overlay.directive'; 9 | 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | ], 15 | declarations: [ 16 | TsLoadingOverlayComponent, 17 | TsLoadingOverlayDirective, 18 | ], 19 | entryComponents: [ 20 | TsLoadingOverlayComponent, 21 | ], 22 | exports: [ 23 | TsLoadingOverlayDirective, 24 | ], 25 | }) 26 | export class TsLoadingOverlayModule {} 27 | -------------------------------------------------------------------------------- /projects/library/file-upload/src/mime-types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Define the allowed mime types for {@link TsFileUploadComponent} 3 | */ 4 | export type TsFileAcceptedMimeTypes 5 | = 'text/csv' 6 | | 'image/jpeg' 7 | | 'image/jpg' 8 | | 'image/png' 9 | | 'image/gif' 10 | | 'video/mp4' 11 | | 'video/x-flv' 12 | | 'video/webm' 13 | | 'video/quicktime' 14 | | 'video/mpeg' 15 | ; 16 | 17 | 18 | /** 19 | * Define an array of all allowed mime types for {@link TsFileUploadComponent} 20 | */ 21 | export const TS_ACCEPTED_MIME_TYPES: TsFileAcceptedMimeTypes[] = [ 22 | 'text/csv', 23 | 'image/jpeg', 24 | 'image/jpg', 25 | 'image/png', 26 | 'image/gif', 27 | 'video/mp4', 28 | 'video/x-flv', 29 | 'video/webm', 30 | 'video/quicktime', 31 | 'video/mpeg', 32 | ]; 33 | -------------------------------------------------------------------------------- /projects/library/utilities/src/merge/merge.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Merge two objects. 3 | * 4 | * @example 5 | * const merged = merge(objA, objB); 6 | * 7 | * @param obj1 - The first object to merge 8 | * @param obj2 - The second object to merge 9 | * @returns A new object 10 | */ 11 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 12 | export function merge(obj1: Record, obj2: Record): Record { 13 | const freshObject: object = { ...obj1 }; 14 | 15 | for (const n in obj2) { 16 | if (typeof freshObject[n] !== 'object') { 17 | freshObject[n] = obj2[n]; 18 | } else if (typeof obj2[n] === 'object') { 19 | freshObject[n] = merge(freshObject[n], obj2[n]); 20 | } 21 | } 22 | 23 | return freshObject; 24 | } 25 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/logo/logo.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FlexLayoutModule } from '@angular/flex-layout'; 4 | import { TsCardModule } from '@terminus/ui/card'; 5 | import { TsLogoModule } from '@terminus/ui/logo'; 6 | import { TsSpacingModule } from '@terminus/ui/spacing'; 7 | 8 | import { LogoRoutingModule } from './logo-routing.module'; 9 | import { LogoComponent } from './logo.component'; 10 | 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | FlexLayoutModule, 16 | LogoRoutingModule, 17 | TsCardModule, 18 | TsLogoModule, 19 | TsSpacingModule, 20 | ], 21 | declarations: [ 22 | LogoComponent, 23 | ], 24 | }) 25 | export class LogoModule {} 26 | -------------------------------------------------------------------------------- /projects/library/pipes/src/title-case/title-case.pipe.spec.ts: -------------------------------------------------------------------------------- 1 | import { TsTitleCasePipe } from './title-case.pipe'; 2 | 3 | describe(`TsSentenceCasePipe`, function() { 4 | let pipeClass: TsTitleCasePipe; 5 | let pipe: Function; 6 | 7 | beforeEach(() => { 8 | pipeClass = new TsTitleCasePipe(); 9 | pipe = pipeClass.transform; 10 | }); 11 | 12 | test(`should return undefined if no value is passed in`, () => { 13 | expect(pipe(null)).toEqual(undefined); 14 | expect(pipe('')).toEqual(undefined); 15 | }); 16 | 17 | test(`should format a string`, () => { 18 | expect(pipe('HELLO THERE')).toEqual('Hello There'); 19 | expect(pipe('hi there friend')).toEqual('Hi There Friend'); 20 | expect(pipe('i Am A hAcKeR')).toEqual('I Am A Hacker'); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'Type: feature, Needs: planning' 6 | assignees: benjamincharity 7 | 8 | --- 9 | 10 | ### Is your feature request related to a problem? Please describe. 11 | 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | 15 | ### Describe the solution you'd like. 16 | 17 | A clear and concise description of what you want to happen. 18 | 19 | 20 | ### Describe alternatives you've considered 21 | 22 | A clear and concise description of any alternative solutions or features you've considered. 23 | 24 | 25 | ### Additional context 26 | 27 | Add any other context or screenshots about the feature request here. 28 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/autofocus/autofocus.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'demo-autofocus', 6 | templateUrl: './autofocus.component.html', 7 | }) 8 | export class AutofocusComponent { 9 | example = 'default'; 10 | items: any[] = [ 11 | { 12 | name: 'tsAutofocus', 13 | value: 'default', 14 | }, 15 | { 16 | name: '[tsAutofocus]="true"', 17 | value: 'bindingTrue', 18 | }, 19 | { 20 | name: '[tsAutofocus]="my string"', 21 | value: 'bindingString', 22 | }, 23 | { 24 | name: 'tsAutofocus=""', 25 | value: 'emptyString', 26 | }, 27 | { 28 | name: '[tsAutofocus]="false"', 29 | value: 'bindingFalse', 30 | }, 31 | ]; 32 | } 33 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/search/search.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { TsCardModule } from '@terminus/ui/card'; 5 | import { TsSearchModule } from '@terminus/ui/search'; 6 | import { TsSpacingModule } from '@terminus/ui/spacing'; 7 | 8 | import { SearchRoutingModule } from './search-routing.module'; 9 | import { SearchComponent } from './search.component'; 10 | 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | FormsModule, 16 | SearchRoutingModule, 17 | TsCardModule, 18 | TsSearchModule, 19 | TsSpacingModule, 20 | ], 21 | declarations: [ 22 | SearchComponent, 23 | ], 24 | }) 25 | export class SearchModule {} 26 | -------------------------------------------------------------------------------- /projects/library/menu/src/menu.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { MatButtonModule } from '@angular/material/button'; 4 | import { MatMenuModule } from '@angular/material/menu'; 5 | import { TsButtonModule } from '@terminus/ui/button'; 6 | import { TsIconModule } from '@terminus/ui/icon'; 7 | 8 | import { TsMenuComponent } from './menu.component'; 9 | 10 | export * from './menu.component'; 11 | 12 | 13 | @NgModule({ 14 | imports: [ 15 | CommonModule, 16 | MatButtonModule, 17 | MatMenuModule, 18 | TsButtonModule, 19 | TsIconModule, 20 | ], 21 | exports: [ 22 | TsMenuComponent, 23 | ], 24 | declarations: [ 25 | TsMenuComponent, 26 | ], 27 | }) 28 | export class TsMenuModule {} 29 | -------------------------------------------------------------------------------- /projects/visual-regression/src/app/components/input/input.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FlexLayoutModule } from '@angular/flex-layout'; 4 | import { 5 | FormsModule, 6 | ReactiveFormsModule, 7 | } from '@angular/forms'; 8 | import { TsInputModule } from '@terminus/ui/input'; 9 | 10 | import { InputRoutingModule } from './input-routing.module'; 11 | import { InputComponent } from './input.component'; 12 | 13 | 14 | @NgModule({ 15 | imports: [ 16 | CommonModule, 17 | FormsModule, 18 | InputRoutingModule, 19 | ReactiveFormsModule, 20 | TsInputModule, 21 | FlexLayoutModule, 22 | ], 23 | declarations: [ 24 | InputComponent, 25 | ], 26 | }) 27 | export class InputModule {} 28 | -------------------------------------------------------------------------------- /projects/library/card/src/card.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { MatRippleModule } from '@angular/material/core'; 4 | import { TsIconModule } from '@terminus/ui/icon'; 5 | 6 | import { TsCardTitleDirective } from './card-title.directive'; 7 | import { TsCardComponent } from './card.component'; 8 | 9 | export * from './card.component'; 10 | export * from './card-title.directive'; 11 | 12 | 13 | @NgModule({ 14 | imports: [ 15 | CommonModule, 16 | MatRippleModule, 17 | TsIconModule, 18 | ], 19 | declarations: [ 20 | TsCardComponent, 21 | TsCardTitleDirective, 22 | ], 23 | exports: [ 24 | TsCardComponent, 25 | TsCardTitleDirective, 26 | ], 27 | }) 28 | export class TsCardModule {} 29 | -------------------------------------------------------------------------------- /projects/library/copy/src/copy.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FlexLayoutModule } from '@angular/flex-layout'; 4 | import { MatRippleModule } from '@angular/material/core'; 5 | import { TsIconModule } from '@terminus/ui/icon'; 6 | import { TsTooltipModule } from '@terminus/ui/tooltip'; 7 | 8 | import { TsCopyComponent } from './copy.component'; 9 | 10 | export * from './copy.component'; 11 | 12 | 13 | @NgModule({ 14 | imports: [ 15 | CommonModule, 16 | FlexLayoutModule, 17 | MatRippleModule, 18 | TsIconModule, 19 | TsTooltipModule, 20 | ], 21 | exports: [ 22 | TsCopyComponent, 23 | ], 24 | declarations: [ 25 | TsCopyComponent, 26 | ], 27 | }) 28 | export class TsCopyModule {} 29 | -------------------------------------------------------------------------------- /projects/library/pipes/src/round-number/round-number.pipe.spec.ts: -------------------------------------------------------------------------------- 1 | import { TsRoundNumberPipe } from './round-number.pipe'; 2 | 3 | describe(`TsRoundNumberPipe`, function() { 4 | let pipeClass: TsRoundNumberPipe; 5 | let pipe: Function; 6 | const num = 3456.3456; 7 | 8 | beforeEach(() => { 9 | pipeClass = new TsRoundNumberPipe(); 10 | pipe = pipeClass.transform; 11 | }); 12 | 13 | test(`should return undefined if no value is passed in`, () => { 14 | expect(pipe(null)).toEqual(undefined); 15 | expect(pipe('')).toEqual(undefined); 16 | }); 17 | 18 | test(`should round a number`, () => { 19 | expect(pipe(num, 2)).toEqual(3456.35); 20 | }); 21 | 22 | test(`should default to a precision of 0`, () => { 23 | expect(pipe(num)).toEqual(3456); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /tooling/ci/inject-library-version-number.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Inject the new package version number in the demo build 5 | # 6 | 7 | PLACEHOLDER="0.0.0-PLACEHOLDER" 8 | VERSION_NUMBER="$(yarn info @terminus/ui version --silent)" 9 | echo "version number: $VERSION_NUMBER" 10 | VERSION_TRIMMED="$(echo -e "$VERSION_NUMBER" | tr -d '[:space:]')" 11 | 12 | echo "Updating library version to: '$VERSION_TRIMMED'" 13 | 14 | # Replace the placeholder text with the library version in all demo app files 15 | grep -rl $PLACEHOLDER 'dist/demo' | xargs sed -i'' -e 's|'$PLACEHOLDER'|'"$VERSION_TRIMMED"'|g' 16 | 17 | # Delete edit reference files left over from the sed replacement 18 | # NOTE: The force flag is required so that the build isn't cancelled if these files don't exist 19 | rm -f dist/demo/*-e 20 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/tooltip/tooltip.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { TsCardModule } from '@terminus/ui/card'; 5 | import { TsSpacingModule } from '@terminus/ui/spacing'; 6 | import { TsTooltipModule } from '@terminus/ui/tooltip'; 7 | 8 | import { TooltipRoutingModule } from './tooltip-routing.module'; 9 | import { TooltipComponent } from './tooltip.component'; 10 | 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | FormsModule, 16 | TooltipRoutingModule, 17 | TsCardModule, 18 | TsSpacingModule, 19 | TsTooltipModule, 20 | ], 21 | declarations: [ 22 | TooltipComponent, 23 | ], 24 | }) 25 | export class TooltipModule {} 26 | -------------------------------------------------------------------------------- /projects/library/pipes/src/title-case/title-case.pipe.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Pipe, 3 | PipeTransform, 4 | } from '@angular/core'; 5 | 6 | 7 | /** 8 | * A pipe that converts a string to title case 9 | * 10 | * @example 11 | * {{ 'MY TEXT' | tsTitleCase }} 12 | * 13 | * https://getterminus.github.io/ui-demos-release/components/pipes 14 | */ 15 | @Pipe({ name: 'tsTitleCase' }) 16 | export class TsTitleCasePipe implements PipeTransform { 17 | public transform(value: string): string | undefined { 18 | // Check for null values to avoid issues during data-binding 19 | if (value == null || value === '') { 20 | return undefined; 21 | } 22 | return value.toLowerCase().split(' ').map(word => (word.charAt(0).toUpperCase() + word.slice(1))).join(' '); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/loading-overlay/loading-overlay.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | 5 | import { TsCardModule } from '@terminus/ui/card'; 6 | import { TsLoadingOverlayModule } from '@terminus/ui/loading-overlay'; 7 | import { TsSpacingModule } from '@terminus/ui/spacing'; 8 | 9 | import { LoadingOverlayRoutingModule } from './loading-overlay-routing.module'; 10 | import { LoadingOverlayComponent } from './loading-overlay.component'; 11 | 12 | @NgModule({ 13 | imports: [CommonModule, FormsModule, LoadingOverlayRoutingModule, TsCardModule, TsLoadingOverlayModule, TsSpacingModule], 14 | declarations: [LoadingOverlayComponent], 15 | }) 16 | export class LoadingOverlayModule {} 17 | -------------------------------------------------------------------------------- /projects/demo/src/app/components/toggle/toggle.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { ReactiveFormsModule } from '@angular/forms'; 4 | import { TsCardModule } from '@terminus/ui/card'; 5 | import { TsSpacingModule } from '@terminus/ui/spacing'; 6 | import { TsToggleModule } from '@terminus/ui/toggle'; 7 | 8 | import { ToggleRoutingModule } from './toggle-routing.module'; 9 | import { ToggleComponent } from './toggle.component'; 10 | 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | ReactiveFormsModule, 16 | ToggleRoutingModule, 17 | TsCardModule, 18 | TsSpacingModule, 19 | TsToggleModule, 20 | ], 21 | declarations: [ 22 | ToggleComponent, 23 | ], 24 | }) 25 | export class ToggleModule {} 26 | -------------------------------------------------------------------------------- /projects/library/chart/src/amcharts.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | TsAmChartsService, 3 | TsAmChartsToken, 4 | } from './amcharts.service'; 5 | 6 | const AM_CHARTS_TOKEN_MOCK = { 7 | core: { useTheme: jest.fn() }, 8 | themes: ['foo', null, 'bar'], 9 | } as TsAmChartsToken; 10 | 11 | describe(`TsAmChartsService`, function() { 12 | let service: TsAmChartsService; 13 | 14 | beforeEach(() => { 15 | service = new TsAmChartsService(AM_CHARTS_TOKEN_MOCK); 16 | }); 17 | 18 | test(`should set the theme if passed in`, () => { 19 | expect(service.amCharts.core.useTheme).toHaveBeenCalledWith('foo'); 20 | expect(service.amCharts.core.useTheme).not.toHaveBeenCalledWith(null); 21 | expect(service.amCharts.core.useTheme).toHaveBeenCalledWith('bar'); 22 | expect.assertions(3); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /projects/library/search/src/search.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FlexLayoutModule } from '@angular/flex-layout'; 4 | import { ReactiveFormsModule } from '@angular/forms'; 5 | import { TsButtonModule } from '@terminus/ui/button'; 6 | import { TsInputModule } from '@terminus/ui/input'; 7 | 8 | import { TsSearchComponent } from './search.component'; 9 | 10 | export * from './search.component'; 11 | 12 | 13 | @NgModule({ 14 | imports: [ 15 | CommonModule, 16 | FlexLayoutModule, 17 | ReactiveFormsModule, 18 | TsButtonModule, 19 | TsInputModule, 20 | ], 21 | exports: [ 22 | TsSearchComponent, 23 | ], 24 | declarations: [ 25 | TsSearchComponent, 26 | ], 27 | }) 28 | export class TsSearchModule {} 29 | -------------------------------------------------------------------------------- /projects/visual-regression/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | // eslint-disable-next-line import/no-unassigned-import 4 | import 'zone.js/dist/zone-testing'; 5 | import { getTestBed } from '@angular/core/testing'; 6 | import { 7 | BrowserDynamicTestingModule, 8 | platformBrowserDynamicTesting, 9 | } from '@angular/platform-browser-dynamic/testing'; 10 | 11 | declare const require: any; 12 | 13 | // First, initialize the Angular testing environment. 14 | getTestBed().initTestEnvironment( 15 | BrowserDynamicTestingModule, 16 | platformBrowserDynamicTesting(), 17 | ); 18 | // Then we find all the tests. 19 | const context = require.context('./', true, /\.spec\.ts$/); 20 | // And load the modules. 21 | context.keys().map(context); 22 | -------------------------------------------------------------------------------- /projects/demo/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { 3 | ExtraOptions, 4 | RouterModule, 5 | Routes, 6 | } from '@angular/router'; 7 | 8 | import { ComponentsComponent } from './components/components.component'; 9 | import { componentsList } from './components/components.constant'; 10 | 11 | 12 | const routerOptions: ExtraOptions = { anchorScrolling: 'enabled' }; 13 | 14 | const routes: Routes = [ 15 | { 16 | path: 'components', 17 | component: ComponentsComponent, 18 | children: componentsList, 19 | }, 20 | { 21 | path: '**', 22 | redirectTo: '/components', 23 | }, 24 | ]; 25 | 26 | 27 | @NgModule({ 28 | imports: [RouterModule.forRoot(routes, routerOptions)], 29 | exports: [RouterModule], 30 | }) 31 | export class AppRoutingModule { } 32 | --------------------------------------------------------------------------------