├── src ├── assets │ ├── .gitkeep │ ├── farm.jpg │ ├── trex.png │ ├── favicon.png │ ├── topology_40.png │ ├── box-background.png │ ├── eaton-condensed.png │ └── github-icon.svg ├── docs │ ├── app.component.html │ ├── pages │ │ └── component-docs │ │ │ ├── components │ │ │ ├── hero │ │ │ │ ├── hero-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── with-icon.component.ts │ │ │ │ │ ├── value-units.component.ts │ │ │ │ │ ├── channel-value-children.component.ts │ │ │ │ │ ├── within-banner.component.ts │ │ │ │ │ └── icon-diffs.component.ts │ │ │ │ ├── hero-doc.component.spec.ts │ │ │ │ └── hero-doc.module.ts │ │ │ ├── spacer │ │ │ │ ├── spacer-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── flex.component.ts │ │ │ │ │ └── pixel.component.ts │ │ │ │ ├── spacer-doc.component.spec.ts │ │ │ │ └── spacer-doc.module.ts │ │ │ ├── app-bar │ │ │ │ ├── app-bar-doc.component.scss │ │ │ │ ├── app-bar-doc.component.spec.ts │ │ │ │ ├── examples │ │ │ │ │ ├── expanded.component.ts │ │ │ │ │ ├── collapsed.component.ts │ │ │ │ │ └── snap.component.ts │ │ │ │ └── app-bar-doc.module.ts │ │ │ ├── drawer │ │ │ │ ├── drawer │ │ │ │ │ ├── drawer-doc.component.scss │ │ │ │ │ ├── examples │ │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ │ └── anatomy.component.ts │ │ │ │ │ ├── drawer-doc.component.spec.ts │ │ │ │ │ └── drawer-doc.module.ts │ │ │ │ ├── drawer-body │ │ │ │ │ ├── drawer-body-doc.component.scss │ │ │ │ │ ├── drawer-body-doc.module.ts │ │ │ │ │ ├── drawer-body-doc.component.spec.ts │ │ │ │ │ └── drawer-body-doc.component.ts │ │ │ │ ├── drawer-footer │ │ │ │ │ ├── drawer-footer-doc.component.scss │ │ │ │ │ ├── drawer-footer-doc.module.ts │ │ │ │ │ ├── drawer-footer-doc.component.spec.ts │ │ │ │ │ └── examples │ │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ │ └── complex.component.ts │ │ │ │ ├── drawer-header │ │ │ │ │ ├── drawer-header-doc.component.scss │ │ │ │ │ ├── examples │ │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ │ ├── with-subtitle.component.ts │ │ │ │ │ │ ├── with-icon.component.ts │ │ │ │ │ │ └── with-custom-content.component.ts │ │ │ │ │ ├── drawer-header-doc.component.spec.ts │ │ │ │ │ └── drawer-header-doc.module.ts │ │ │ │ ├── drawer-nav-item │ │ │ │ │ ├── drawer-nav-item-doc.component.scss │ │ │ │ │ ├── examples │ │ │ │ │ │ ├── with-icons.component.ts │ │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ │ ├── with-nested-items.component.ts │ │ │ │ │ │ └── with-selected-item.component.ts │ │ │ │ │ ├── drawer-nav-item-doc.component.spec.ts │ │ │ │ │ └── drawer-nav-item-doc.module.ts │ │ │ │ ├── drawer-nav-group │ │ │ │ │ ├── drawer-nav-group-doc.component.scss │ │ │ │ │ ├── examples │ │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ │ ├── multiple-groups.component.ts │ │ │ │ │ │ ├── with-spacer.component.ts │ │ │ │ │ │ └── with-custom-content.component.ts │ │ │ │ │ ├── drawer-nav-group-doc.component.spec.ts │ │ │ │ │ └── drawer-nav-group-doc.module.ts │ │ │ │ ├── drawer-subheader │ │ │ │ │ ├── drawer-subheader-doc.component.scss │ │ │ │ │ ├── drawer-subheader-doc.component.spec.ts │ │ │ │ │ ├── examples │ │ │ │ │ │ └── basic.component.ts │ │ │ │ │ └── drawer-subheader-doc.module.ts │ │ │ │ └── drawer-layout │ │ │ │ │ ├── drawer-layout-doc.component.spec.ts │ │ │ │ │ ├── drawer-layout-doc.component.scss │ │ │ │ │ ├── examples │ │ │ │ │ ├── permanent.component.ts │ │ │ │ │ ├── rail.component.ts │ │ │ │ │ └── rail-condensed.component.ts │ │ │ │ │ └── drawer-layout-doc.module.ts │ │ │ ├── empty-state │ │ │ │ ├── empty-state-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── with-content.component.ts │ │ │ │ │ ├── with-description.component.ts │ │ │ │ │ ├── with-actions.component.ts │ │ │ │ │ └── within-card.component.ts │ │ │ │ ├── empty-state-doc.component.spec.ts │ │ │ │ └── empty-state-doc.module.ts │ │ │ ├── score-card │ │ │ │ ├── score-card-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── multi-line.component.ts │ │ │ │ │ ├── with-score-badge.component.ts │ │ │ │ │ ├── with-heroes.component.ts │ │ │ │ │ └── with-actions.component.ts │ │ │ │ ├── score-card-doc.component.spec.ts │ │ │ │ └── score-card-doc.module.ts │ │ │ ├── three-liner │ │ │ │ ├── three-liner-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ └── complex.component.ts │ │ │ │ ├── three-liner-doc.component.spec.ts │ │ │ │ └── three-liner-doc.module.ts │ │ │ ├── user-menu │ │ │ │ ├── user-menu-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── menu-header.component.ts │ │ │ │ │ ├── placement-options.component.ts │ │ │ │ │ ├── from-list.component.ts │ │ │ │ │ ├── bottomsheet.component.ts │ │ │ │ │ ├── within-toolbar.component.ts │ │ │ │ │ └── non-text-avatar.component.ts │ │ │ │ └── user-menu-doc.component.spec.ts │ │ │ ├── channel-value │ │ │ │ ├── channel-value-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── icon.component.ts │ │ │ │ │ ├── prefix.component.ts │ │ │ │ │ └── unit-space.component.ts │ │ │ │ ├── channel-value-doc.component.spec.ts │ │ │ │ └── channel-value-doc.module.ts │ │ │ ├── list-item-tag │ │ │ │ ├── list-item-tag-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ └── complex.component.ts │ │ │ │ ├── list-item-tag-doc.component.spec.ts │ │ │ │ └── list-item-tag-doc.module.ts │ │ │ ├── toolbar-menu │ │ │ │ ├── toolbar-menu-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── with-icon.component.ts │ │ │ │ │ └── within-toolbar.component.ts │ │ │ │ ├── toolbar-menu-doc.component.spec.ts │ │ │ │ └── toolbar-menu-doc.module.ts │ │ │ ├── info-list-item │ │ │ │ ├── info-list-item-doc.component.scss │ │ │ │ ├── examples │ │ │ │ │ ├── with-icon.component.ts │ │ │ │ │ ├── with-subtitle.component.ts │ │ │ │ │ ├── basic.component.ts │ │ │ │ │ ├── dense.component.ts │ │ │ │ │ ├── with-status.component.ts │ │ │ │ │ ├── with-left-right-content.component.ts │ │ │ │ │ └── within-list.component.ts │ │ │ │ ├── info-list-item-doc.component.spec.ts │ │ │ │ └── info-list-item-doc.module.ts │ │ │ └── mobile-stepper │ │ │ │ ├── mobile-stepper-doc.component.scss │ │ │ │ ├── examples │ │ │ │ ├── basic.component.ts │ │ │ │ ├── text.component.ts │ │ │ │ ├── progress.component.ts │ │ │ │ └── dots.component.ts │ │ │ │ ├── mobile-stepper-doc.component.spec.ts │ │ │ │ └── mobile-stepper-doc.module.ts │ │ │ └── shared │ │ │ ├── knobs │ │ │ ├── knob-boolean.component.ts │ │ │ ├── knob-text.component.ts │ │ │ └── knob-select.component.ts │ │ │ ├── buttons │ │ │ ├── view-code-button │ │ │ │ └── view-code-button.component.ts │ │ │ ├── toggle-code-button │ │ │ │ └── toggle-code-button.component.ts │ │ │ └── copy-code-button │ │ │ │ └── copy-code-button.component.ts │ │ │ └── example-code │ │ │ ├── example-code.component.ts │ │ │ └── example-code.component.scss │ ├── md │ │ ├── images │ │ │ ├── drawer.png │ │ │ ├── heroes.png │ │ │ ├── spacer.png │ │ │ ├── dotStepper.png │ │ │ ├── emptyState.png │ │ │ ├── heroAnatomy.png │ │ │ ├── listItemTag.png │ │ │ ├── scoreCard.png │ │ │ ├── channelValue.png │ │ │ ├── drawerAnatomy.png │ │ │ ├── infoListItem.png │ │ │ ├── scoreCard_alt.png │ │ │ ├── appBarCollapsed.png │ │ │ ├── appBarExpanded.png │ │ │ ├── dropdownToolbar.png │ │ │ ├── scoreCardAnatomy.png │ │ │ ├── userMenuAnatomy.png │ │ │ ├── userMenuAnatomy2.png │ │ │ ├── userMenuAvatar.png │ │ │ ├── userMenuOpened.png │ │ │ ├── emptyStateAnatomy.png │ │ │ ├── toolbarmenuAnatomy.png │ │ │ └── channelValueAnatomy.png │ │ ├── gifs │ │ │ ├── appBarSnap.gif │ │ │ └── appBarThreeLiner.gif │ │ ├── Spacer.md │ │ └── ListItemTag.md │ ├── components │ │ ├── pxb-logo │ │ │ ├── pxb-logo.component.scss │ │ │ └── pxb-logo.component.ts │ │ ├── coming-soon │ │ │ └── coming-soon.component.ts │ │ └── components.module.ts │ ├── services │ │ ├── viewport │ │ │ ├── viewport.service.spec.ts │ │ │ └── viewport.service.ts │ │ ├── tab │ │ │ └── tab.service.ts │ │ ├── drawer-state │ │ │ ├── drawer-state.service.spec.ts │ │ │ └── drawer-state.service.ts │ │ ├── playground │ │ │ └── playground.service.ts │ │ └── markdown-split │ │ │ └── markdown-split.service.ts │ ├── app.component.spec.ts │ ├── navigation │ │ └── navigation.component.scss │ └── app.component.ts ├── lib │ ├── core │ │ ├── utility │ │ │ ├── public-api.ts │ │ │ ├── utility.scss │ │ │ ├── spacer.component.spec.ts │ │ │ └── spacer.module.ts │ │ ├── app-bar │ │ │ ├── public-api.ts │ │ │ ├── app-bar.module.ts │ │ │ └── app-bar.component.spec.ts │ │ ├── score-card │ │ │ ├── public-api.ts │ │ │ └── score-card.module.ts │ │ ├── three-liner │ │ │ ├── public-api.ts │ │ │ ├── three-liner.module.ts │ │ │ ├── three-liner.component.scss │ │ │ └── three-liner.component.spec.ts │ │ ├── toolbar-menu │ │ │ ├── public-api.ts │ │ │ ├── toolbar-menu.module.ts │ │ │ ├── toolbar-menu.component.scss │ │ │ └── toolbar-menu.component.ts │ │ ├── drawer │ │ │ ├── drawer-footer │ │ │ │ ├── public-api.ts │ │ │ │ ├── drawer-footer.component.scss │ │ │ │ └── drawer-footer.module.ts │ │ │ ├── drawer-header │ │ │ │ ├── public-api.ts │ │ │ │ └── drawer-header.module.ts │ │ │ ├── drawer-layout │ │ │ │ ├── public-api.ts │ │ │ │ ├── drawer-layout.module.ts │ │ │ │ └── drawer-layout.component.scss │ │ │ ├── drawer-subheader │ │ │ │ ├── public-api.ts │ │ │ │ ├── drawer-subheader.component.scss │ │ │ │ └── drawer-subheader.module.ts │ │ │ ├── drawer-body │ │ │ │ ├── nav-group │ │ │ │ │ ├── public-api.ts │ │ │ │ │ └── drawer-nav-group.module.ts │ │ │ │ ├── nav-item │ │ │ │ │ ├── public-api.ts │ │ │ │ │ └── drawer-nav-item.module.ts │ │ │ │ ├── public-api.ts │ │ │ │ ├── drawer-body.module.ts │ │ │ │ ├── drawer-body.component.spec.ts │ │ │ │ └── drawer-body.component.ts │ │ │ ├── public-api.ts │ │ │ └── drawer.module.ts │ │ ├── empty-state │ │ │ ├── public-api.ts │ │ │ ├── empty-state.module.ts │ │ │ ├── empty-state.component.html │ │ │ └── empty-state.component.scss │ │ ├── channel-value │ │ │ ├── public-api.ts │ │ │ └── channel-value.module.ts │ │ ├── mobile-stepper │ │ │ ├── public-api.ts │ │ │ ├── mobile-stepper.module.ts │ │ │ ├── mobile-stepper.component.html │ │ │ └── mobile-stepper.component.scss │ │ ├── info-list-item │ │ │ ├── public-api.ts │ │ │ └── info-list-item.module.ts │ │ ├── list-item-tag │ │ │ ├── public-api.ts │ │ │ ├── list-item-tag.component.html │ │ │ ├── list-item-tag.module.ts │ │ │ ├── list-item-tag.component.scss │ │ │ ├── list-item-tag.component.ts │ │ │ └── list-item-tag.component.spec.ts │ │ ├── hero │ │ │ ├── public-api.ts │ │ │ ├── hero-banner.component.scss │ │ │ ├── hero.module.ts │ │ │ └── hero-banner.component.ts │ │ ├── user-menu │ │ │ ├── public-api.ts │ │ │ ├── user-menu-avatar.component.ts │ │ │ └── user-menu.module.ts │ │ └── index.ts │ ├── index.ts │ └── utils │ │ ├── test-utils.ts │ │ └── utils.ts ├── environments │ ├── environment.dev.ts │ ├── environment.prod.ts │ └── environment.ts ├── main.ts └── test.ts ├── CODEOWNERS ├── .firebaserc ├── ng-package.json ├── .gitmodules ├── .github ├── codecov.yml ├── dependabot.yml ├── workflows │ ├── tagging.yml │ ├── blui-pr-actions.yml │ └── firebase-hosting-pull-request.yml ├── ISSUE_TEMPLATE │ ├── feature-request.md │ └── bug-report.md └── PULL_REQUEST_TEMPLATE.md ├── LICENSES.json ├── firebase.json ├── config ├── tsconfig.spec.json ├── tsconfig.app.json ├── tsconfig.npm.json └── tsconfig.lib.json ├── .gitignore ├── .eslintrc.js ├── tsconfig.json ├── scripts ├── initializeSubmodule.sh ├── buildLib.sh └── linkComponents.sh ├── PUBLISHING.md └── LICENSE /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @JeffGreiner-eaton @surajeaton @ektaghag-eaton 2 | -------------------------------------------------------------------------------- /src/docs/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/hero-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/spacer/spacer-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/lib/core/utility/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './spacer.module'; 2 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/app-bar/app-bar-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer/drawer-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/empty-state-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/score-card-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/three-liner/three-liner-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/user-menu-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/channel-value-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/list-item-tag/list-item-tag-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/toolbar-menu/toolbar-menu-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "blui-angular-docs" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-body/drawer-body-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-footer/drawer-footer-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/drawer-header-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/drawer-nav-item-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/drawer-nav-group-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-subheader/drawer-subheader-doc.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "dist", 3 | "lib": { 4 | "entryFile": "src/lib/index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/farm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/assets/farm.jpg -------------------------------------------------------------------------------- /src/assets/trex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/assets/trex.png -------------------------------------------------------------------------------- /src/lib/core/app-bar/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './app-bar.component'; 2 | export * from './app-bar.module'; 3 | -------------------------------------------------------------------------------- /src/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/assets/favicon.png -------------------------------------------------------------------------------- /src/lib/core/score-card/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './score-card.component'; 2 | export * from './score-card.module'; 3 | -------------------------------------------------------------------------------- /src/assets/topology_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/assets/topology_40.png -------------------------------------------------------------------------------- /src/lib/core/three-liner/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './three-liner.component'; 2 | export * from './three-liner.module'; 3 | -------------------------------------------------------------------------------- /src/lib/core/toolbar-menu/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './toolbar-menu.component'; 2 | export * from './toolbar-menu.module'; 3 | -------------------------------------------------------------------------------- /src/assets/box-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/assets/box-background.png -------------------------------------------------------------------------------- /src/docs/md/images/drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/drawer.png -------------------------------------------------------------------------------- /src/docs/md/images/heroes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/heroes.png -------------------------------------------------------------------------------- /src/docs/md/images/spacer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/spacer.png -------------------------------------------------------------------------------- /src/assets/eaton-condensed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/assets/eaton-condensed.png -------------------------------------------------------------------------------- /src/docs/md/gifs/appBarSnap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/gifs/appBarSnap.gif -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-footer/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-footer.component'; 2 | export * from './drawer-footer.module'; 3 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-header/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-header.component'; 2 | export * from './drawer-header.module'; 3 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-layout/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-layout.component'; 2 | export * from './drawer-layout.module'; 3 | -------------------------------------------------------------------------------- /src/docs/md/images/dotStepper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/dotStepper.png -------------------------------------------------------------------------------- /src/docs/md/images/emptyState.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/emptyState.png -------------------------------------------------------------------------------- /src/docs/md/images/heroAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/heroAnatomy.png -------------------------------------------------------------------------------- /src/docs/md/images/listItemTag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/listItemTag.png -------------------------------------------------------------------------------- /src/docs/md/images/scoreCard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/scoreCard.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "showcase"] 2 | path = showcase 3 | url = https://github.com/etn-ccis/blui-angular-showcase-demo.git 4 | branch = dev 5 | -------------------------------------------------------------------------------- /src/docs/md/images/channelValue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/channelValue.png -------------------------------------------------------------------------------- /src/docs/md/images/drawerAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/drawerAnatomy.png -------------------------------------------------------------------------------- /src/docs/md/images/infoListItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/infoListItem.png -------------------------------------------------------------------------------- /src/docs/md/images/scoreCard_alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/scoreCard_alt.png -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-subheader/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-subheader.component'; 2 | export * from './drawer-subheader.module'; 3 | -------------------------------------------------------------------------------- /src/docs/md/gifs/appBarThreeLiner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/gifs/appBarThreeLiner.gif -------------------------------------------------------------------------------- /src/docs/md/images/appBarCollapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/appBarCollapsed.png -------------------------------------------------------------------------------- /src/docs/md/images/appBarExpanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/appBarExpanded.png -------------------------------------------------------------------------------- /src/docs/md/images/dropdownToolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/dropdownToolbar.png -------------------------------------------------------------------------------- /src/docs/md/images/scoreCardAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/scoreCardAnatomy.png -------------------------------------------------------------------------------- /src/docs/md/images/userMenuAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/userMenuAnatomy.png -------------------------------------------------------------------------------- /src/docs/md/images/userMenuAnatomy2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/userMenuAnatomy2.png -------------------------------------------------------------------------------- /src/docs/md/images/userMenuAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/userMenuAvatar.png -------------------------------------------------------------------------------- /src/docs/md/images/userMenuOpened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/userMenuOpened.png -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/nav-group/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-nav-group.module'; 2 | export * from './drawer-nav-group.component'; 3 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/nav-item/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-nav-item.module'; 2 | export * from './drawer-nav-item.component'; 3 | -------------------------------------------------------------------------------- /src/docs/md/images/emptyStateAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/emptyStateAnatomy.png -------------------------------------------------------------------------------- /src/docs/md/images/toolbarmenuAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/toolbarmenuAnatomy.png -------------------------------------------------------------------------------- /src/docs/md/images/channelValueAnatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-angular-component-library/HEAD/src/docs/md/images/channelValueAnatomy.png -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-footer/drawer-footer.component.scss: -------------------------------------------------------------------------------- 1 | .blui-drawer-footer-content { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /src/lib/core/empty-state/public-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of empty-state 3 | */ 4 | 5 | export * from './empty-state.component'; 6 | export * from './empty-state.module'; 7 | -------------------------------------------------------------------------------- /src/lib/core/channel-value/public-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of channel-value 3 | */ 4 | export * from './channel-value.component'; 5 | export * from './channel-value.module'; 6 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-subheader/drawer-subheader.component.scss: -------------------------------------------------------------------------------- 1 | .blui-drawer-subheader-content { 2 | display: flex; 3 | box-sizing: border-box; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /src/lib/core/mobile-stepper/public-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of dot stepper 3 | */ 4 | export * from './mobile-stepper.component'; 5 | export * from './mobile-stepper.module'; 6 | -------------------------------------------------------------------------------- /src/lib/core/info-list-item/public-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of Info List Item 3 | */ 4 | 5 | export * from './info-list-item.component'; 6 | export * from './info-list-item.module'; 7 | -------------------------------------------------------------------------------- /src/lib/core/list-item-tag/public-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of List Item Tag 3 | */ 4 | 5 | export * from './list-item-tag.component'; 6 | export * from './list-item-tag.module'; 7 | -------------------------------------------------------------------------------- /src/lib/core/hero/public-api.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of hero 3 | */ 4 | 5 | export * from './hero.module'; 6 | export * from './hero.component'; 7 | export * from './hero-banner.component'; 8 | -------------------------------------------------------------------------------- /src/environments/environment.dev.ts: -------------------------------------------------------------------------------- 1 | /** https://brightlayer-ui-components.github.io/angular-dev */ 2 | export const environment = { 3 | production: true, 4 | devDocsCodeSnippetBranch: 'dev', 5 | ga: 'G-FWWGC9WJWD', 6 | }; 7 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /** https://brightlayer-ui-components.github.io/angular */ 2 | export const environment = { 3 | production: true, 4 | devDocsCodeSnippetBranch: 'dev', 5 | ga: 'G-1KZ2TF5513', 6 | }; 7 | -------------------------------------------------------------------------------- /src/lib/core/user-menu/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './user-menu.component'; 2 | export * from './user-menu.module'; 3 | export * from './user-menu-avatar.component'; 4 | export * from './user-menu-header/user-menu-header.component'; 5 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/info-list-item-doc.component.scss: -------------------------------------------------------------------------------- 1 | .example-demo-wrapper > *, 2 | .info-list-item-playground { 3 | background-color: white; 4 | width: 100%; 5 | max-width: 700px; 6 | } 7 | -------------------------------------------------------------------------------- /src/docs/components/pxb-logo/pxb-logo.component.scss: -------------------------------------------------------------------------------- 1 | @keyframes pxb-logo-spin { 2 | 100% { 3 | transform: rotate(360deg); 4 | } 5 | } 6 | 7 | .pxb-logo { 8 | animation: pxb-logo-spin 2500ms linear infinite; 9 | } 10 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/mobile-stepper-doc.component.scss: -------------------------------------------------------------------------------- 1 | .example-demo-wrapper { 2 | ::ng-deep .blui-mobile-stepper { 3 | background-color: white !important; 4 | margin: 8px 0; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/lib/core/list-item-tag/list-item-tag.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ label }} 4 |
5 |
6 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-body.component'; 2 | export * from './nav-group/drawer-nav-group.component'; 3 | export * from './drawer-body.module'; 4 | export * from './nav-item/public-api'; 5 | export * from './nav-group/public-api'; 6 | -------------------------------------------------------------------------------- /.github/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: 80% 6 | threshold: 5% 7 | informational: true 8 | patch: 9 | default: 10 | target: 80% 11 | threshold: 5% 12 | informational: true -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | day: "monday" 8 | open-pull-requests-limit: 1 9 | target-branch: "dev" 10 | labels: 11 | - "external-dependency" -------------------------------------------------------------------------------- /LICENSES.json: -------------------------------------------------------------------------------- 1 | { 2 | "tslib@2.3.1": { 3 | "licenses": "0BSD", 4 | "repository": "https://github.com/Microsoft/tslib", 5 | "licenseUrl": "https://github.com/Microsoft/tslib/raw/master/LICENSE.txt", 6 | "parents": "@brightlayer-ui/angular-components" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/lib/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2021-present, Eaton 3 | 4 | All rights reserved. 5 | 6 | This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause. 7 | **/ 8 | export * from './core/index'; 9 | -------------------------------------------------------------------------------- /src/lib/core/list-item-tag/list-item-tag.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ListItemTagComponent } from './list-item-tag.component'; 3 | 4 | @NgModule({ 5 | declarations: [ListItemTagComponent], 6 | exports: [ListItemTagComponent], 7 | }) 8 | export class ListItemTagModule {} 9 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/lib/core/drawer/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './drawer-body/public-api'; 2 | export * from './drawer-footer/public-api'; 3 | export * from './drawer-header/public-api'; 4 | export * from './drawer-layout/public-api'; 5 | export * from './drawer-subheader/public-api'; 6 | export * from './drawer.module'; 7 | export * from './drawer.component'; 8 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ``; 4 | 5 | @Component({ 6 | selector: 'app-basic-channel-value-demo', 7 | template: BASIC, 8 | }) 9 | export class BasicExampleComponent {} 10 | -------------------------------------------------------------------------------- /config/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* Configuration used while testing. Reads the local instance of @blui-lab/angular. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "include": [ 11 | "../src/**/*.spec.ts", 12 | "../src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.github/workflows/tagging.yml: -------------------------------------------------------------------------------- 1 | name: Tagging 2 | 3 | env: 4 | GH_TOKEN: ${{ github.token }} 5 | CURRENT_BRANCH: ${{ github.ref_name }} 6 | 7 | on: 8 | push: 9 | branches: 10 | - master 11 | 12 | jobs: 13 | tag-package: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v2 17 | - run: yarn tag:package -b ${CURRENT_BRANCH} 18 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | `; 5 | 6 | @Component({ 7 | selector: 'app-basic-mobile-stepper-demo', 8 | template: BASIC, 9 | }) 10 | export class BasicExampleComponent {} 11 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | `; 7 | 8 | @Component({ 9 | selector: 'app-basic-hero-demo', 10 | template: BASIC, 11 | }) 12 | export class BasicExampleComponent {} 13 | -------------------------------------------------------------------------------- /src/lib/core/empty-state/empty-state.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { EmptyStateComponent } from './empty-state.component'; 4 | 5 | @NgModule({ 6 | declarations: [EmptyStateComponent], 7 | imports: [CommonModule], 8 | exports: [EmptyStateComponent], 9 | }) 10 | export class EmptyStateModule {} 11 | -------------------------------------------------------------------------------- /src/lib/core/three-liner/three-liner.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ThreeLinerComponent } from './three-liner.component'; 4 | 5 | @NgModule({ 6 | declarations: [ThreeLinerComponent], 7 | imports: [CommonModule], 8 | exports: [ThreeLinerComponent], 9 | }) 10 | export class ThreeLinerModule {} 11 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/three-liner/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 7 | `; 8 | 9 | @Component({ 10 | selector: 'app-basic-three-liner', 11 | template: BASIC, 12 | }) 13 | export class BasicExample {} 14 | -------------------------------------------------------------------------------- /src/lib/core/channel-value/channel-value.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ChannelValueComponent } from './channel-value.component'; 3 | import { CommonModule } from '@angular/common'; 4 | 5 | @NgModule({ 6 | declarations: [ChannelValueComponent], 7 | imports: [CommonModule], 8 | exports: [ChannelValueComponent], 9 | }) 10 | export class ChannelValueModule {} 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # See https://help.github.com/ignore-files/ for more about ignoring files. 3 | 4 | # dependencies 5 | node_modules 6 | package-lock.json 7 | 8 | # production 9 | dist 10 | 11 | # misc 12 | .vscode/ 13 | .idea/ 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | **/**/.DS_Store 18 | .firebase 19 | 20 | # test 21 | coverage 22 | .angular 23 | 24 | /showcase/src/lib/ 25 | 26 | build -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/examples/icon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ICON = ` 4 | trending_up 5 | `; 6 | 7 | @Component({ 8 | selector: 'app-icon-channel-value-demo', 9 | template: WITH_ICON, 10 | }) 11 | export class IconComponent {} 12 | -------------------------------------------------------------------------------- /src/lib/core/hero/hero-banner.component.scss: -------------------------------------------------------------------------------- 1 | .blui-hero-banner { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .blui-hero-banner-content { 7 | display: flex; 8 | flex: 1 1 0; 9 | align-items: center; 10 | justify-content: center; 11 | 12 | blui-hero { 13 | flex: 1 1 0; 14 | } 15 | 16 | blui-hero:nth-child(n + 5) { 17 | display: none; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/examples/prefix.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const PREFIX = ` 4 | check_circle 5 | `; 6 | 7 | @Component({ 8 | selector: 'app-prefix-channel-value-demo', 9 | template: PREFIX, 10 | }) 11 | export class PrefixComponent {} 12 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | `; 7 | 8 | @Component({ 9 | selector: 'app-basic-drawer-header-demo', 10 | template: BASIC, 11 | }) 12 | export class BasicExampleComponent {} 13 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: [ '@brightlayer-ui/eslint-config/ts' ], 5 | parserOptions: { 6 | project: "tsconfig.json", 7 | }, 8 | rules: { 9 | '@typescript-eslint/restrict-template-expressions': 'off' 10 | }, 11 | env: { 12 | browser: true 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | not_listed_location 5 | 6 | `; 7 | 8 | @Component({ 9 | selector: 'app-basic-empty-state-demo', 10 | template: BASIC, 11 | }) 12 | export class BasicExampleComponent {} 13 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './docs/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch((err) => console.error(err)); 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this resource 4 | title: '' 5 | labels: 'enhancement, needs-review, brightlayer-ui' 6 | assignees: '' 7 | 8 | --- 9 | 10 | #### Describe the desired feature/functionality 11 | 12 | #### Additional Context (where / how would this be used) 13 | 14 | #### Is this request related to a current issue? 15 | 16 | #### Suggested implementation details 17 | -------------------------------------------------------------------------------- /config/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* This configuration is used in the Demo Application & reads the local instance of @brightlayer-ui/angular-components */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "types": [], 6 | "paths": { 7 | "@brightlayer-ui/angular-components": ["src/lib"], 8 | } 9 | }, 10 | "files": [ 11 | "../src/main.ts" 12 | ], 13 | "include": [ 14 | "../src/**/*.d.ts" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/docs/services/viewport/viewport.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ViewportService } from './viewport.service'; 4 | 5 | describe('ViewportService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: ViewportService = TestBed.get(ViewportService); 10 | void expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /.github/workflows/blui-pr-actions.yml: -------------------------------------------------------------------------------- 1 | name: blui-pr-actions 2 | on: 3 | pull_request_target: 4 | types: 5 | - opened 6 | 7 | permissions: 8 | pull-requests: write 9 | contents: read 10 | 11 | jobs: 12 | pr-labels: 13 | uses: etn-ccis/blui-automation/.github/workflows/blui-labels.yml@dev 14 | secrets: inherit 15 | 16 | pr-comment: 17 | uses: etn-ccis/blui-automation/.github/workflows/blui-comment.yml@dev 18 | secrets: inherit -------------------------------------------------------------------------------- /src/docs/services/tab/tab.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Tab } from '../../pages/component-docs/shared/scaffold/scaffold.component'; 3 | 4 | @Injectable({ 5 | providedIn: 'root', 6 | }) 7 | export class TabService { 8 | private tab: Tab = 'examples'; 9 | 10 | setActiveTab(tab: Tab): void { 11 | this.tab = tab; 12 | } 13 | 14 | getPreviousTab(): Tab { 15 | return this.tab; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/examples/with-icon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ICON = ` 4 | 5 | trending_up 6 | 7 | `; 8 | 9 | @Component({ 10 | selector: 'app-with-icon-hero-demo', 11 | template: WITH_ICON, 12 | }) 13 | export class WithIconComponent {} 14 | -------------------------------------------------------------------------------- /src/lib/utils/test-utils.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture } from '@angular/core/testing'; 2 | 3 | // Using a selector, counts the number of instances. 4 | export const count = (fixture: ComponentFixture, selector: string, expected = 1): void => { 5 | const instances = fixture.nativeElement.querySelectorAll(selector); 6 | const length = instances.length; 7 | void expect(length).toBe(expected, `Expected ${expected} instances of '${selector}', but found ${length}`); 8 | }; 9 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; 6 | 7 | // First, initialize the Angular testing environment. 8 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); 9 | -------------------------------------------------------------------------------- /src/docs/services/drawer-state/drawer-state.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { DrawerStateService } from './drawer-state.service'; 3 | 4 | describe('DrawerStateService', () => { 5 | beforeEach(() => void TestBed.configureTestingModule({})); 6 | 7 | it('should be created', () => { 8 | const service: DrawerStateService = TestBed.get(DrawerStateService); 9 | void expect(service).toBeTruthy(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/examples/with-subtitle.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_SUBTITLE = ` 4 | 5 | 6 | `; 7 | 8 | @Component({ 9 | selector: 'app-with-subtitle-drawer-header-demo', 10 | template: WITH_SUBTITLE, 11 | }) 12 | export class WithSubtitleComponent {} 13 | -------------------------------------------------------------------------------- /config/tsconfig.npm.json: -------------------------------------------------------------------------------- 1 | /* This configuration is used in the Demo Application & reads the published instance of @blui-lab/angular, found in node_modules. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "paths": { 6 | "@brightlayer-ui/angular-components": ["node_modules/@brightlayer-ui/angular-components"], 7 | } 8 | }, 9 | "files": [ 10 | "../src/main.ts" 11 | ], 12 | "include": [ 13 | "../src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-footer/drawer-footer.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerFooterComponent } from './drawer-footer.component'; 4 | import { MatDividerModule } from '@angular/material/divider'; 5 | 6 | @NgModule({ 7 | declarations: [DrawerFooterComponent], 8 | imports: [CommonModule, MatDividerModule], 9 | exports: [DrawerFooterComponent], 10 | }) 11 | export class DrawerFooterModule {} 12 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-layout/drawer-layout.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerLayoutComponent } from './drawer-layout.component'; 4 | import { MatSidenavModule } from '@angular/material/sidenav'; 5 | 6 | @NgModule({ 7 | declarations: [DrawerLayoutComponent], 8 | imports: [CommonModule, MatSidenavModule], 9 | exports: [DrawerLayoutComponent], 10 | }) 11 | export class DrawerLayoutModule {} 12 | -------------------------------------------------------------------------------- /src/lib/core/three-liner/three-liner.component.scss: -------------------------------------------------------------------------------- 1 | $transition: all 0.3s, color 0s, background-color 0s; 2 | 3 | .blui-three-liner { 4 | display: flex; 5 | } 6 | 7 | .blui-three-liner-title { 8 | font-size: 1.875rem; 9 | transition: $transition; 10 | } 11 | .blui-three-liner-subtitle { 12 | font-size: 1rem; 13 | transition: $transition; 14 | } 15 | .blui-three-liner-info { 16 | font-size: 0.875rem; 17 | font-weight: 300; 18 | transition: $transition; 19 | } 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/examples/value-units.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const VALUE_AND_UNITS = ` 4 | 5 | 6 | 7 | 8 | `; 9 | 10 | @Component({ 11 | selector: 'app-value-units-hero-demo', 12 | template: VALUE_AND_UNITS, 13 | }) 14 | export class ValueUnitsComponent {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/with-icon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const ICON = ` 4 |
Info List Item
5 |
with an icon
6 | alarm 7 |
8 | `; 9 | 10 | @Component({ 11 | selector: 'app-with-icon-info-list-item-demo', 12 | template: ICON, 13 | }) 14 | export class WithIconComponent {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/with-subtitle.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const SUBTITLE = ` 4 |
Info List Item
5 |
this is a subtitle within an InfoListItem
6 |
7 | `; 8 | 9 | @Component({ 10 | selector: 'app-with-subtitle-info-list-item-demo', 11 | template: SUBTITLE, 12 | }) 13 | export class WithSubtitleComponent {} 14 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 |
Info List Item Title
5 |
Info List Item Subtitle
6 | alarm 7 |
8 | `; 9 | 10 | @Component({ 11 | selector: 'app-basic-info-list-item-demo', 12 | template: BASIC, 13 | }) 14 | export class BasicExampleComponent {} 15 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-subheader/drawer-subheader.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerSubheaderComponent } from './drawer-subheader.component'; 4 | import { MatDividerModule } from '@angular/material/divider'; 5 | 6 | @NgModule({ 7 | declarations: [DrawerSubheaderComponent], 8 | imports: [CommonModule, MatDividerModule], 9 | exports: [DrawerSubheaderComponent], 10 | }) 11 | export class DrawerSubheaderModule {} 12 | -------------------------------------------------------------------------------- /src/docs/components/coming-soon/coming-soon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-coming-soon', 5 | template: ` 6 | 11 | construction 12 | 13 | `, 14 | }) 15 | export class ComingSoonComponent {} 16 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-body/drawer-body-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerBodyDocComponent } from './drawer-body-doc.component'; 5 | 6 | @NgModule({ 7 | declarations: [DrawerBodyDocComponent], 8 | imports: [DrawerModule, SharedCompDocsModule], 9 | exports: [DrawerBodyDocComponent], 10 | }) 11 | export class DrawerBodyDocModule {} 12 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-header/drawer-header.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerHeaderComponent } from './drawer-header.component'; 4 | import { MatToolbarModule } from '@angular/material/toolbar'; 5 | import { MatDividerModule } from '@angular/material/divider'; 6 | @NgModule({ 7 | declarations: [DrawerHeaderComponent], 8 | imports: [CommonModule, MatToolbarModule, MatDividerModule], 9 | exports: [DrawerHeaderComponent], 10 | }) 11 | export class DrawerHeaderModule {} 12 | -------------------------------------------------------------------------------- /src/lib/core/list-item-tag/list-item-tag.component.scss: -------------------------------------------------------------------------------- 1 | .blui-list-item-tag { 2 | display: inline-block; 3 | } 4 | 5 | .blui-list-item-tag, 6 | .blui-list-item-tag-content { 7 | border-radius: 0.125rem; 8 | } 9 | 10 | .blui-list-item-tag-content { 11 | padding: 0 0.25rem; 12 | overflow: hidden; 13 | 14 | .blui-list-item-tag-label { 15 | font-weight: 700; 16 | text-transform: uppercase; 17 | letter-spacing: 1px; 18 | margin-right: -1px; 19 | line-height: 1rem; 20 | font-size: 0.625rem; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/lib/core/score-card/score-card.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ScoreCardComponent } from './score-card.component'; 4 | import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card'; 5 | import { MatDividerModule } from '@angular/material/divider'; 6 | 7 | @NgModule({ 8 | declarations: [ScoreCardComponent], 9 | imports: [CommonModule, MatCardModule, MatDividerModule], 10 | exports: [ScoreCardComponent], 11 | }) 12 | export class ScoreCardModule {} 13 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/examples/with-content.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_CONTENT = ` 4 |
Request Permission
5 |
You must contact your system admin to view this content.
6 | report 7 |
8 | `; 9 | 10 | @Component({ 11 | selector: 'app-with-content-empty-state-demo', 12 | template: WITH_CONTENT, 13 | }) 14 | export class WithContentComponent {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 7 | 8 | Body Content 9 | 10 | 11 | `; 12 | 13 | @Component({ 14 | selector: 'app-basic-score-card-demo', 15 | template: BASIC, 16 | }) 17 | export class BasicComponent {} 18 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/examples/with-description.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_DESCRIPTION = ` 6 | location_off 7 | 8 | `; 9 | 10 | @Component({ 11 | selector: 'app-with-description-empty-state-demo', 12 | template: WITH_DESCRIPTION, 13 | }) 14 | export class WithDescriptionComponent {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/examples/with-icon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ICON = ` 4 | 5 | 8 | 9 | 10 | `; 11 | 12 | @Component({ 13 | selector: 'app-with-icon-drawer-header-demo', 14 | template: WITH_ICON, 15 | }) 16 | export class WithIconComponent {} 17 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/spacer/examples/flex.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const FLEX = `
4 | 1 5 | 2 6 | 3 7 |
8 | `; 9 | 10 | @Component({ 11 | selector: 'app-flex-spacer-demo', 12 | template: FLEX, 13 | }) 14 | export class FlexComponent {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/examples/multi-line.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const MULTI_LINE = ` 7 | 8 | Body Content 9 | 10 | 11 | `; 12 | 13 | @Component({ 14 | selector: 'app-multi-line-score-card-demo', 15 | template: MULTI_LINE, 16 | }) 17 | export class MultiLineComponent {} 18 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/toolbar-menu/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | `; 11 | 12 | @Component({ 13 | selector: 'app-basic-toolbar-menu-demo', 14 | template: BASIC, 15 | }) 16 | export class BasicComponent {} 17 | -------------------------------------------------------------------------------- /src/lib/core/app-bar/app-bar.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { AppBarComponent } from './app-bar.component'; 4 | import { MatToolbarModule } from '@angular/material/toolbar'; 5 | import { SpacerModule } from '../utility/spacer.module'; 6 | import { MatIconModule } from '@angular/material/icon'; 7 | 8 | @NgModule({ 9 | declarations: [AppBarComponent], 10 | imports: [CommonModule, MatToolbarModule, SpacerModule, MatIconModule], 11 | exports: [AppBarComponent], 12 | }) 13 | export class AppBarModule {} 14 | -------------------------------------------------------------------------------- /src/lib/core/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app-bar/public-api'; 2 | export * from './channel-value/public-api'; 3 | export * from './drawer/public-api'; 4 | export * from './empty-state/public-api'; 5 | export * from './hero/public-api'; 6 | export * from './score-card/public-api'; 7 | export * from './info-list-item/public-api'; 8 | export * from './list-item-tag/public-api'; 9 | export * from './utility/public-api'; 10 | export * from './three-liner/public-api'; 11 | export * from './user-menu/public-api'; 12 | export * from './mobile-stepper/public-api'; 13 | export * from './toolbar-menu/public-api'; 14 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/list-item-tag/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = `
4 | 5 | 9 | 10 |
`; 11 | 12 | @Component({ 13 | selector: 'app-basic-list-item-tag-demo', 14 | template: BASIC, 15 | }) 16 | export class BasicExample {} 17 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/examples/channel-value-children.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const CV_CHILDREN = ` 4 | schedule 5 | 6 | 7 | 8 | `; 9 | 10 | @Component({ 11 | selector: 'app-channel-value-children-hero-demo', 12 | template: CV_CHILDREN, 13 | }) 14 | export class ChannelValueChildrenComponent {} 15 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/nav-group/drawer-nav-group.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatDividerModule } from '@angular/material/divider'; 4 | import { DrawerNavGroupComponent } from './drawer-nav-group.component'; 5 | import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; 6 | 7 | @NgModule({ 8 | declarations: [DrawerNavGroupComponent], 9 | imports: [CommonModule, MatDividerModule, MatListModule], 10 | exports: [DrawerNavGroupComponent], 11 | }) 12 | export class DrawerNavGroupModule {} 13 | -------------------------------------------------------------------------------- /src/docs/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | import { AppModule } from './app.module'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(() => { 7 | void TestBed.configureTestingModule({ 8 | imports: [AppModule], 9 | }).compileComponents(); 10 | }); 11 | 12 | it('should create the md', () => { 13 | const fixture = TestBed.createComponent(AppComponent); 14 | const app = fixture.debugElement.componentInstance; 15 | void expect(app).toBeTruthy(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /src/lib/core/hero/hero.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ChannelValueModule } from '../channel-value/public-api'; 3 | import { HeroBannerComponent } from './hero-banner.component'; 4 | import { HeroComponent } from './hero.component'; 5 | import { CommonModule } from '@angular/common'; 6 | import { MatDividerModule } from '@angular/material/divider'; 7 | 8 | @NgModule({ 9 | declarations: [HeroComponent, HeroBannerComponent], 10 | imports: [MatDividerModule, ChannelValueModule, CommonModule], 11 | exports: [HeroComponent, HeroBannerComponent], 12 | }) 13 | export class HeroModule {} 14 | -------------------------------------------------------------------------------- /src/lib/core/utility/utility.scss: -------------------------------------------------------------------------------- 1 | @mixin invert { 2 | transform: scaleX(-1); 3 | } 4 | 5 | /* Used for scaling icon-like content proportional to system font size. */ 6 | @mixin scale-icon-content { 7 | font-size: 1.5rem; 8 | height: 1.5rem; 9 | width: 1.5rem; 10 | } 11 | 12 | /* Used for scaling mat-icons inside of mat-buttons. */ 13 | @mixin scale-icon-button { 14 | .mat-icon-button { 15 | height: 2.5rem; 16 | width: 2.5rem; 17 | line-height: 2.5rem; 18 | .mat-icon { 19 | @include scale-icon-content(); 20 | height: unset; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "target": "ES2022", 8 | "module": "es2020", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "paths": { 14 | "@blui-lab/angular": [ 15 | "src/lab" 16 | ] 17 | }, 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ], 22 | "useDefineForClassFields": false 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/toolbar-menu/examples/with-icon.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ICON = ` 4 | home 5 | 6 | 7 | 8 | 9 | 10 | 11 | `; 12 | 13 | @Component({ 14 | selector: 'app-with-icon-toolbar-menu-demo', 15 | template: WITH_ICON, 16 | }) 17 | export class WithIconComponent {} 18 | -------------------------------------------------------------------------------- /src/docs/components/components.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { PxbLogoComponent } from './pxb-logo/pxb-logo.component'; 3 | import { ComingSoonComponent } from './coming-soon/coming-soon.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { EmptyStateModule } from 'src/lib/core'; 6 | import { MatIconModule } from '@angular/material/icon'; 7 | 8 | @NgModule({ 9 | declarations: [PxbLogoComponent, ComingSoonComponent], 10 | imports: [CommonModule, EmptyStateModule, MatIconModule], 11 | exports: [PxbLogoComponent, ComingSoonComponent], 12 | }) 13 | export class AppCommonComponentsModule {} 14 | -------------------------------------------------------------------------------- /src/lib/core/mobile-stepper/mobile-stepper.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MobileStepperComponent } from './mobile-stepper.component'; 4 | import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; 5 | import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar'; 6 | 7 | @NgModule({ 8 | declarations: [MobileStepperComponent], 9 | imports: [CommonModule, MatButtonModule, MatProgressBarModule], 10 | exports: [MobileStepperComponent], 11 | }) 12 | export class MobileStepperModule {} 13 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | `; 12 | 13 | @Component({ 14 | selector: 'app-basic-drawer-nav-group-demo', 15 | template: BASIC, 16 | }) 17 | export class BasicExampleComponent {} 18 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | settings 7 |
Settings
8 |
9 |
10 |
11 | `; 12 | 13 | @Component({ 14 | selector: 'app-basic-user-menu-demo', 15 | template: BASIC, 16 | }) 17 | export class BasicExampleComponent { 18 | open = false; 19 | } 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/dense.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const DENSE = ` 4 |
Dense Info List Item 1
5 |
6 | 7 |
Dense Info List Item 2
8 |
9 | 10 |
Dense Info List Item 3
11 |
12 | `; 13 | 14 | @Component({ 15 | selector: 'app-dense-info-list-item-demo', 16 | template: DENSE, 17 | }) 18 | export class DenseComponent {} 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/examples/with-actions.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ACTIONS = ` 6 | devices 7 | 11 | 12 | `; 13 | 14 | @Component({ 15 | selector: 'app-with-actions-empty-state-demo', 16 | template: WITH_ACTIONS, 17 | }) 18 | export class WithActionsComponent {} 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/with-status.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import * as Colors from '@brightlayer-ui/colors'; 3 | 4 | export const STATUS = ` 5 |
Info List Item
6 |
with a status indicator
7 | 8 | offline_bolt 9 | 10 |
11 | `; 12 | 13 | @Component({ 14 | selector: 'app-with-status-info-list-item-demo', 15 | template: STATUS, 16 | }) 17 | export class WithStatusComponent { 18 | Colors = Colors; 19 | } 20 | -------------------------------------------------------------------------------- /scripts/initializeSubmodule.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | BLUE='\033[0;34m' 3 | BBLUE='\033[1;34m' #BOLD 4 | PURPLE='\033[0;35m' 5 | RED='\033[0;31m' 6 | BRED='\033[1;31m' #BOLD 7 | GREEN='\033[0;32m' 8 | BGREEN='\033[1;32m' #BOLD 9 | GRAY='\033[1;30m' 10 | NC='\033[0m' # No Color 11 | 12 | if [ ! -f ./showcase/package.json ]; 13 | then echo -e "${BBLUE}Emptying Showcase Folder${NC}" && rm -r ./showcase/* && rm -rf ./showcase/.git 14 | fi 15 | 16 | echo -e "${BLUE}Initializing Showcase Submodule...${NC}" 17 | if [ ! -f ./showcase/package.json ]; 18 | then git submodule init && git submodule update; 19 | else echo -e "${BBLUE}Already initialized${NC}" && exit 0; 20 | fi 21 | echo -e "${BBLUE}Initialization Complete${NC}\r\n" 22 | -------------------------------------------------------------------------------- /scripts/buildLib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | BLUE='\033[0;34m' 3 | BBLUE='\033[1;34m' #BOLD 4 | PURPLE='\033[0;35m' 5 | RED='\033[0;31m' 6 | BRED='\033[1;31m' #BOLD 7 | GREEN='\033[0;32m' 8 | BGREEN='\033[1;32m' #BOLD 9 | GRAY='\033[1;30m' 10 | NC='\033[0m' # No Color 11 | 12 | # Remove previous build 13 | rm -rf ./dist 14 | 15 | yarn 16 | yarn ng build lib -c production 17 | 18 | echo -e "${BLUE}Copying Package Resources${NC}" 19 | # Do not copy over the package.json, we need to keep the generated package.json made with the ng build command. 20 | cp -r README.md ./dist/README.md 21 | cp -r LICENSE ./dist/LICENSE 22 | cp -r CHANGELOG.md ./dist/CHANGELOG.md 23 | cp -r LICENSES.json ./dist/LICENSES.json 24 | 25 | echo -e "${GRAY}Complete${NC}\r\n" 26 | -------------------------------------------------------------------------------- /.github/workflows/firebase-hosting-pull-request.yml: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by the Firebase CLI 2 | # https://github.com/firebase/firebase-tools 3 | 4 | name: Deploy to Firebase Hosting on PR 5 | 'on': pull_request 6 | jobs: 7 | build_and_preview: 8 | if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - run: yarn && yarn build:demo -c development 13 | - uses: emclaug2/action-hosting-deploy@main 14 | with: 15 | repoToken: '${{ secrets.GITHUB_TOKEN }}' 16 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_ANGULAR_DOCS }}' 17 | expires: 2d 18 | projectId: blui-angular-docs 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/hero-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { HeroDocModule } from './hero-doc.module'; 4 | import { HeroDocComponent } from './hero-doc.component'; 5 | 6 | describe('HeroDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [HeroDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(HeroDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/examples/text.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const TEXT = ` 4 | 7 | 10 | 11 | `; 12 | 13 | @Component({ 14 | selector: 'app-text-mobile-stepper-demo', 15 | template: TEXT, 16 | }) 17 | export class TextComponent { 18 | activeStep = 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | `; 14 | 15 | @Component({ 16 | selector: 'app-basic-drawer-demo', 17 | template: BASIC, 18 | }) 19 | export class BasicExampleComponent {} 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/spacer/spacer-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { SpacerDocModule } from './spacer-doc.module'; 4 | import { SpacerDocComponent } from './spacer-doc.component'; 5 | 6 | describe('SpacerDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [SpacerDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(SpacerDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/three-liner/examples/complex.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import * as Colors from '@brightlayer-ui/colors'; 3 | 4 | export const COMPLEX = ` 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | `; 13 | 14 | @Component({ 15 | selector: 'app-complex-three-liner', 16 | template: COMPLEX, 17 | }) 18 | export class ComplexExample { 19 | colors = Colors; 20 | } 21 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/app-bar/app-bar-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { AppBarDocModule } from './app-bar-doc.module'; 3 | import { AppBarDocComponent } from './app-bar-doc.component'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('AppBarDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [AppBarDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(AppBarDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/menu-header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const MENU_HEADER = ` 8 | 9 | 10 | settings 11 |
Settings
12 |
13 |
14 |
15 | `; 16 | 17 | @Component({ 18 | selector: 'app-menu-header-user-menu-demo', 19 | template: MENU_HEADER, 20 | }) 21 | export class MenuHeaderComponent { 22 | open = false; 23 | } 24 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/spacer/spacer-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { SpacerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { RouterModule } from '@angular/router'; 6 | import { SpacerDocComponent } from './spacer-doc.component'; 7 | import { FlexComponent } from './examples/flex.component'; 8 | import { PixelComponent } from './examples/pixel.component'; 9 | 10 | @NgModule({ 11 | declarations: [SpacerDocComponent, FlexComponent, PixelComponent], 12 | imports: [SpacerModule, SharedCompDocsModule, MatIconModule, RouterModule], 13 | exports: [SpacerDocComponent], 14 | }) 15 | export class SpacerDocModule {} 16 | -------------------------------------------------------------------------------- /src/lib/core/info-list-item/info-list-item.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatIconModule } from '@angular/material/icon'; 4 | import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; 5 | import { InfoListItemComponent } from './info-list-item.component'; 6 | import { SpacerModule } from '../utility/spacer.module'; 7 | import { MatDividerModule } from '@angular/material/divider'; 8 | 9 | @NgModule({ 10 | declarations: [InfoListItemComponent], 11 | imports: [SpacerModule, MatIconModule, CommonModule, MatListModule, MatDividerModule], 12 | exports: [InfoListItemComponent, MatIconModule, MatListModule, SpacerModule, MatDividerModule], 13 | }) 14 | export class InfoListItemModule {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer/drawer-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { DrawerDocModule } from './drawer-doc.module'; 4 | import { DrawerDocComponent } from './drawer-doc.component'; 5 | 6 | describe('DrawerBodyDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/examples/within-banner.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_BANNER = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | `; 15 | 16 | @Component({ 17 | selector: 'app-with-banner-hero-demo', 18 | template: WITH_BANNER, 19 | }) 20 | export class WithinBannerComponent {} 21 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/user-menu-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { UserMenuDocModule } from './user-menu-doc.module'; 4 | import { UserMenuDocComponent } from './user-menu-doc.component'; 5 | 6 | describe('UserMenuComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [UserMenuDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(UserMenuDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | ga: '', 8 | devDocsCodeSnippetBranch: 'master', 9 | }; 10 | 11 | /* 12 | * For easier debugging in development mode, you can import the following file 13 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 14 | * 15 | * This import should be commented out in production mode because it will have a negative impact 16 | * on performance if an error is thrown. 17 | */ 18 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/score-card-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { ScoreCardDocModule } from './score-card-doc.module'; 4 | import { ScoreCardDocComponent } from './score-card-doc.component'; 5 | 6 | describe('ScoreCardDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [ScoreCardDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(ScoreCardDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/assets/github-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/empty-state-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { EmptyStateDocModule } from './empty-state-doc.module'; 3 | import { EmptyStateDocComponent } from './empty-state-doc.component'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('EmptyStateDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [EmptyStateDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(EmptyStateDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/three-liner/three-liner-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { ThreeLinerDocModule } from './three-liner-doc.module'; 4 | import { ThreeLinerDocComponent } from './three-liner-doc.component'; 5 | 6 | describe('ThreeLinerDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [ThreeLinerDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(ThreeLinerDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/examples/with-icons.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ICONS = ` 4 | 5 | 6 | 7 | dashboard 8 | 9 | 10 | place 11 | 12 | 13 | 14 | 15 | `; 16 | 17 | @Component({ 18 | selector: 'app-nav-item-with-icons-demo', 19 | template: WITH_ICONS, 20 | }) 21 | export class WithIconsExampleComponent {} 22 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/examples/with-score-badge.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_SCORE_BADGE = ` 8 | 9 | Body Content 10 | 11 | 12 | 13 | 14 | 15 | `; 16 | 17 | @Component({ 18 | selector: 'app-with-score-badge-score-card-demo', 19 | template: WITH_SCORE_BADGE, 20 | }) 21 | export class WithScoreBadgeComponent {} 22 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/toolbar-menu/toolbar-menu-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { ToolbarMenuDocModule } from './toolbar-menu-doc.module'; 4 | import { ToolbarMenuDocComponent } from './toolbar-menu-doc.component'; 5 | 6 | describe('ToolbarDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [ToolbarMenuDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(ToolbarMenuDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-body/drawer-body-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { DrawerBodyDocModule } from './drawer-body-doc.module'; 4 | import { DrawerBodyDocComponent } from './drawer-body-doc.component'; 5 | 6 | describe('DrawerBodyDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerBodyDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerBodyDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-footer/drawer-footer-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerFooterDocComponent } from './drawer-footer-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { ComplexExampleComponent } from './examples/complex.component'; 7 | import { PlaygroundComponent } from './examples/playground.component'; 8 | 9 | @NgModule({ 10 | declarations: [DrawerFooterDocComponent, BasicExampleComponent, ComplexExampleComponent, PlaygroundComponent], 11 | imports: [DrawerModule, SharedCompDocsModule], 12 | exports: [DrawerFooterDocComponent], 13 | }) 14 | export class DrawerFooterDocModule {} 15 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/list-item-tag/list-item-tag-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { ListItemTagDocModule } from './list-item-tag-doc.module'; 3 | import { ListItemTagDocComponent } from './list-item-tag-doc.component'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('ListItemTagDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [ListItemTagDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(ListItemTagDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/channel-value-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { ChannelValueDocModule } from './channel-value-doc.module'; 4 | import { ChannelValueDocComponent } from './channel-value-doc.component'; 5 | 6 | describe('ChannelValueDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [ChannelValueDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(ChannelValueDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-footer/drawer-footer-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { DrawerFooterDocModule } from './drawer-footer-doc.module'; 3 | import { DrawerFooterDocComponent } from './drawer-footer-doc.component'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('DrawerNavItemDoc', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerFooterDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerFooterDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/drawer-header-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { DrawerHeaderDocModule } from './drawer-header-doc.module'; 3 | import { DrawerHeaderDocComponent } from './drawer-header-doc.component'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('DrawerNavItemDoc', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerHeaderDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerHeaderDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-layout/drawer-layout-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { DrawerLayoutDocModule } from './drawer-layout-doc.module'; 4 | import { DrawerLayoutDocComponent } from './drawer-layout-doc.component'; 5 | 6 | describe('DrawerLayoutDoc', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerLayoutDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerLayoutDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/mobile-stepper-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { MobileStepperDocModule } from './mobile-stepper-doc.module'; 4 | import { MobileStepperDocComponent } from './mobile-stepper-doc.component'; 5 | 6 | describe('MobileStepperDoc', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [MobileStepperDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(MobileStepperDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/info-list-item-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { InfoListItemDocModule } from './info-list-item-doc.module'; 4 | import { InfoListItemDocComponent } from './info-list-item-doc.component'; 5 | 6 | describe('InfoListItemDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [InfoListItemDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(InfoListItemDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/lib/core/empty-state/empty-state.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |

6 | 7 | {{ title }} 8 |

9 |

10 | 11 | {{ description }} 12 |

13 |
18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/drawer-nav-item-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { DrawerNavItemDocModule } from './drawer-nav-item-doc.module'; 3 | import { DrawerNavItemDocComponent } from './drawer-nav-item-doc.component'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('DrawerNavItemDoc', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerNavItemDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerNavItemDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/examples/progress.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const PROGRESS = ` 8 | 11 | 14 | 15 | `; 16 | 17 | @Component({ 18 | selector: 'app-progress-mobile-stepper-demo', 19 | template: PROGRESS, 20 | }) 21 | export class ProgressComponent { 22 | activeStep = 0; 23 | } 24 | -------------------------------------------------------------------------------- /src/lib/core/user-menu/user-menu-avatar.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'blui-user-menu-avatar', 5 | changeDetection: ChangeDetectionStrategy.OnPush, 6 | encapsulation: ViewEncapsulation.None, 7 | template: ` 8 |
9 |
{{ avatarValue }}
10 | User Menu Avatar 11 | 12 |
13 | `, 14 | host: { 15 | class: 'blui-user-menu-avatar', 16 | }, 17 | }) 18 | export class UserMenuAvatarComponent { 19 | @Input() avatarValue: string; 20 | @Input() avatarImage: string; 21 | } 22 | -------------------------------------------------------------------------------- /src/docs/services/drawer-state/drawer-state.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { ViewportService } from '../viewport/viewport.service'; 3 | 4 | @Injectable({ 5 | providedIn: 'root', 6 | }) 7 | export class DrawerStateService { 8 | private drawerOpen: boolean; 9 | private selectedItem: string; 10 | 11 | constructor(viewportService: ViewportService) { 12 | this.drawerOpen = !viewportService.isMedium(); 13 | } 14 | 15 | setDrawerOpen(drawerOpen: boolean): void { 16 | this.drawerOpen = drawerOpen; 17 | } 18 | 19 | getDrawerOpen(): boolean { 20 | return this.drawerOpen; 21 | } 22 | 23 | setSelectedItem(item: string): void { 24 | this.selectedItem = item; 25 | } 26 | 27 | getSelectedItem(): string { 28 | return this.selectedItem; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/examples/unit-space.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const UNIT_SPACE = `
4 | 5 | 6 | 7 | 8 | 9 |
`; 10 | 11 | @Component({ 12 | selector: 'app-unit-space-channel-value-demo', 13 | template: UNIT_SPACE, 14 | }) 15 | export class UnitSpaceComponent {} 16 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-subheader/drawer-subheader-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { DrawerSubheaderDocModule } from './drawer-subheader-doc.module'; 4 | import { DrawerSubheaderDocComponent } from './drawer-subheader-doc.component'; 5 | 6 | describe('DrawerBodyDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerSubheaderDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerSubheaderDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/drawer-nav-group-doc.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { DrawerNavGroupDocComponent } from './drawer-nav-group-doc.component'; 3 | import { DrawerNavGroupDocModule } from './drawer-nav-group-doc.module'; 4 | import { RouterTestingModule } from '@angular/router/testing'; 5 | 6 | describe('DrawerNavItemGroupDocComponent', () => { 7 | beforeEach(() => { 8 | void TestBed.configureTestingModule({ 9 | imports: [DrawerNavGroupDocModule, RouterTestingModule], 10 | }).compileComponents(); 11 | }); 12 | 13 | it('should create', () => { 14 | const fixture = TestBed.createComponent(DrawerNavGroupDocComponent); 15 | const app = fixture.debugElement.componentInstance; 16 | void expect(app).toBeTruthy(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-footer/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Footer Content Here
13 |
14 |
15 | `; 16 | 17 | @Component({ 18 | selector: 'app-basic-drawer-footer-demo', 19 | template: BASIC, 20 | }) 21 | export class BasicExampleComponent {} 22 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-subheader/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 |
Custom Content Goes here
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | `; 16 | 17 | @Component({ 18 | selector: 'app-basic-drawer-subheader-demo', 19 | template: BASIC, 20 | }) 21 | export class BasicExampleComponent {} 22 | -------------------------------------------------------------------------------- /src/lib/core/toolbar-menu/toolbar-menu.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ToolbarMenuComponent } from './toolbar-menu.component'; 4 | import { MatToolbarModule } from '@angular/material/toolbar'; 5 | import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; 6 | import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/material/legacy-form-field'; 7 | import { MatIconModule } from '@angular/material/icon'; 8 | import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; 9 | 10 | @NgModule({ 11 | declarations: [ToolbarMenuComponent], 12 | imports: [CommonModule, MatToolbarModule, MatSelectModule, MatFormFieldModule, MatIconModule, MatMenuModule], 13 | exports: [ToolbarMenuComponent], 14 | }) 15 | export class ToolbarMenuModule {} 16 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/knobs/knob-boolean.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-boolean-knob', 5 | template: ` 6 |
7 | {{ label }}: boolean{{ isRequired ? '*' : '' }} 9 | 10 |
{{ hint }}
11 |
12 | `, 13 | }) 14 | export class KnobBooleanComponent { 15 | @Input() label; 16 | @Input() value: boolean; 17 | @Input() hint: boolean; 18 | @Input() isRequired: boolean; 19 | @Output() valueChange = new EventEmitter(); 20 | } 21 | -------------------------------------------------------------------------------- /src/lib/core/toolbar-menu/toolbar-menu.component.scss: -------------------------------------------------------------------------------- 1 | [dir='rtl'] .blui-toolbar-menu .mat-icon { 2 | margin-left: 8px; 3 | margin-right: 0px; 4 | } 5 | .blui-toolbar-menu { 6 | display: flex; 7 | align-items: center; 8 | 9 | .blui-toolbar-menu-toggle-icon { 10 | transition: transform 250ms; 11 | } 12 | .blui-rotated-dropdown-arrow { 13 | transform: rotate(180deg); 14 | } 15 | .blui-toolbar-menu-trigger { 16 | display: flex; 17 | align-items: center; 18 | cursor: pointer; 19 | } 20 | .blui-toolbar-icon-wrapper { 21 | display: flex; 22 | align-items: center; 23 | } 24 | .blui-toolbar-menu-label { 25 | line-height: inherit; 26 | } 27 | .blui-toolbar-icon-wrapper .mat-icon { 28 | font-size: 1rem; 29 | width: 1rem; 30 | height: 1rem; 31 | margin-right: 8px; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/drawer-body.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerBodyComponent } from './drawer-body.component'; 4 | import { DrawerNavGroupComponent } from './nav-group/drawer-nav-group.component'; 5 | import { InfoListItemModule } from '../../info-list-item/public-api'; 6 | import { DrawerNavGroupModule } from './nav-group/drawer-nav-group.module'; 7 | import { DrawerNavItemModule } from './nav-item/drawer-nav-item.module'; 8 | 9 | @NgModule({ 10 | declarations: [DrawerBodyComponent], 11 | imports: [CommonModule, InfoListItemModule, DrawerNavGroupModule, DrawerNavItemModule], 12 | exports: [ 13 | DrawerBodyComponent, 14 | DrawerNavGroupComponent, 15 | InfoListItemModule, 16 | DrawerNavGroupModule, 17 | DrawerNavItemModule, 18 | ], 19 | }) 20 | export class DrawerBodyModule {} 21 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/spacer/examples/pixel.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const PIXELS = `
4 | 25 5 | 75 6 | 200 7 |
8 |
9 | 25 10 | 50 11 | 75 12 |
13 | `; 14 | 15 | @Component({ 16 | selector: 'app-pixel-spacer-demo', 17 | template: PIXELS, 18 | }) 19 | export class PixelComponent {} 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/list-item-tag/list-item-tag-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ListItemTagDocComponent } from './list-item-tag-doc.component'; 3 | import { BasicExample } from './examples/basic.component'; 4 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 5 | import { ChannelValueModule, InfoListItemModule, ListItemTagModule } from 'src/lib/core'; 6 | import { ComplexExample } from './examples/complex.component'; 7 | import { RouterModule } from '@angular/router'; 8 | import { PlaygroundComponent } from './examples/playground.component'; 9 | 10 | @NgModule({ 11 | declarations: [ListItemTagDocComponent, BasicExample, ComplexExample, PlaygroundComponent], 12 | imports: [SharedCompDocsModule, ListItemTagModule, ChannelValueModule, InfoListItemModule, RouterModule], 13 | exports: [ListItemTagDocComponent], 14 | }) 15 | export class ListItemTagDocModule {} 16 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer/drawer-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule, SpacerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerDocComponent } from './drawer-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { AnatomyComponent } from './examples/anatomy.component'; 7 | import { RouterModule } from '@angular/router'; 8 | import { FromListComponent } from './examples/from-list.component'; 9 | import { PlaygroundComponent } from './examples/playground.component'; 10 | 11 | @NgModule({ 12 | declarations: [DrawerDocComponent, BasicExampleComponent, AnatomyComponent, FromListComponent, PlaygroundComponent], 13 | imports: [DrawerModule, SpacerModule, SharedCompDocsModule, RouterModule], 14 | exports: [DrawerDocComponent], 15 | }) 16 | export class DrawerDocModule {} 17 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/with-left-right-content.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const LEFT_RIGHT_CONTENT = ` 4 | battery_charging_full 5 |
6 |
8:32 AM
7 |
11/21/21
8 |
9 |
Battery Fully Charged
10 |
Your device is ready to use
11 | 12 |
13 | `; 14 | 15 | @Component({ 16 | selector: 'app-with-left-right-content-info-list-item-demo', 17 | template: LEFT_RIGHT_CONTENT, 18 | }) 19 | export class WithLeftRightContentComponent {} 20 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/placement-options.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { ConnectionPositionPair } from '@angular/cdk/overlay'; 3 | 4 | export const PLACEMENT = ` 5 | 6 | 7 | settings 8 |
Settings
9 |
10 |
11 |
12 | `; 13 | 14 | @Component({ 15 | selector: 'app-placement-user-menu-demo', 16 | template: PLACEMENT, 17 | }) 18 | export class PlacementOptionsComponent { 19 | open = false; 20 | 21 | positions = new ConnectionPositionPair( 22 | { originX: 'start', originY: 'bottom' }, 23 | { overlayX: 'end', overlayY: 'bottom' } 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /src/lib/core/utility/spacer.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { SpacerComponent, SpacerModule } from './spacer.module'; 3 | 4 | describe('SpacerComponent', () => { 5 | let component: SpacerComponent; 6 | let fixture: ComponentFixture; 7 | 8 | beforeEach(() => { 9 | void TestBed.configureTestingModule({ 10 | imports: [SpacerModule], 11 | }).compileComponents(); 12 | fixture = TestBed.createComponent(SpacerComponent); 13 | component = fixture.componentInstance; 14 | }); 15 | 16 | it('should initialize', () => { 17 | fixture.detectChanges(); 18 | void expect(component).toBeTruthy(); 19 | }); 20 | 21 | it('should have a default flex value of 1', () => { 22 | fixture.detectChanges(); 23 | void expect(component.flex).toBe(1); 24 | void expect(component.grow).toBe('1 1 0px'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/examples/multiple-groups.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const MULTIPLE_GROUPS = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | `; 16 | 17 | @Component({ 18 | selector: 'app-multiple-groups-nav-group-demo', 19 | template: MULTIPLE_GROUPS, 20 | }) 21 | export class MultipleGroupsComponent {} 22 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/buttons/view-code-button/view-code-button.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { environment } from '../../../../../../environments/environment'; 3 | 4 | @Component({ 5 | selector: 'app-view-code-button', 6 | template: ` 7 | 11 | `, 12 | }) 13 | export class ViewCodeButtonComponent { 14 | @Input() examplePath; 15 | 16 | master = `https://github.com/etn-ccis/blui-angular-component-library/tree/${environment.devDocsCodeSnippetBranch}/src/docs/pages/component-docs/components`; 17 | 18 | viewCodeOnGitHub(): void { 19 | window.open(`${this.master}/${this.examplePath}.component.ts`, '_blank'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/examples/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BASIC = ` 4 | 5 | 6 | 7 | dashboard 8 | 9 | 10 | gavel 11 | 12 | 13 | place 14 | 15 | 16 | 17 | 18 | `; 19 | 20 | @Component({ 21 | selector: 'app-basic-drawer-nav-item-demo', 22 | template: BASIC, 23 | }) 24 | export class BasicExampleComponent {} 25 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/examples/with-heroes.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_HEROES = ` 7 | 8 | Body Content 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | `; 20 | 21 | @Component({ 22 | selector: 'app-with-heroes-score-card-demo', 23 | template: WITH_HEROES, 24 | }) 25 | export class WithHeroesComponent {} 26 | -------------------------------------------------------------------------------- /config/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | /* This configuration is used when building the @brightlayer-ui/angular-components package. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "declarationMap": false, 6 | "module": "es2015", 7 | "moduleResolution": "node", 8 | "declaration": true, 9 | "sourceMap": true, 10 | "inlineSources": true, 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "types": [], 15 | "lib": [ 16 | "dom", 17 | "es2018" 18 | ] 19 | }, 20 | "angularCompilerOptions": { 21 | "compilationMode": "partial", 22 | "skipTemplateCodegen": true, 23 | "strictMetadataEmit": true, 24 | "fullTemplateTypeCheck": true, 25 | "strictInjectionParameters": true, 26 | "enableResourceInlining": true 27 | }, 28 | "include": [ 29 | "../src/lib/**.ts" 30 | ], 31 | "exclude": [ 32 | "../test.ts", 33 | "../src/**/*.spec.ts" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/toolbar-menu/examples/within-toolbar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITHIN_TOOLBAR = ` 4 | 7 |
8 |
Alarms
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | `; 19 | 20 | @Component({ 21 | selector: 'app-within-toolbar-toolbar-menu-demo', 22 | template: WITHIN_TOOLBAR, 23 | }) 24 | export class WithinToolbarComponent {} 25 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/app-bar/examples/expanded.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { loremIpsum } from './lorem-ipsum'; 3 | 4 | export const EXPANDED = `
5 | 6 |
Content
7 |
8 |
{{ filler }}
9 |
10 | `; 11 | 12 | @Component({ 13 | selector: 'app-expanded-app-bar-demo', 14 | template: EXPANDED, 15 | styles: [ 16 | ` 17 | .scroll-container { 18 | width: 100%; 19 | max-width: 450px; 20 | max-height: 400px; 21 | overflow: auto; 22 | position: relative; 23 | } 24 | .content-body { 25 | padding: 16px; 26 | background: white; 27 | } 28 | `, 29 | ], 30 | }) 31 | export class ExpandedComponent { 32 | filler = loremIpsum; 33 | } 34 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-layout/drawer-layout-doc.component.scss: -------------------------------------------------------------------------------- 1 | .drawer-layout-examples { 2 | .blui-drawer-layout { 3 | height: 240px; 4 | width: 100%; 5 | &.rail-example { 6 | height: calc(72px * 3 + 2px); 7 | } 8 | &.condensed-rail-example { 9 | height: calc(56px * 3); 10 | } 11 | } 12 | } 13 | .drawer-layout-examples { 14 | .playground-live-example-wrapper { 15 | padding: 1rem 0 !important; 16 | } 17 | .playground-live-example-wrapper, 18 | app-layout-playground { 19 | width: 100%; 20 | display: flex; 21 | justify-content: center; 22 | align-items: center; 23 | } 24 | .playground-container .blui-drawer-layout { 25 | height: 350px; 26 | width: calc(100vw - 850px); 27 | max-width: 700px; 28 | } 29 | .playground-container.md .blui-drawer-layout { 30 | width: calc(100vw - 500px - 32px); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/app-bar/examples/collapsed.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { loremIpsum } from './lorem-ipsum'; 3 | 4 | export const COLLAPSED = `
5 | 6 |
Content
7 |
8 |
{{ filler }}
9 |
10 | `; 11 | 12 | @Component({ 13 | selector: 'app-collapsed-app-bar-demo', 14 | template: COLLAPSED, 15 | styles: [ 16 | ` 17 | .scroll-container { 18 | width: 100%; 19 | max-width: 450px; 20 | max-height: 200px; 21 | overflow: auto; 22 | position: relative; 23 | } 24 | .content-body { 25 | padding: 16px; 26 | background: white; 27 | } 28 | `, 29 | ], 30 | }) 31 | export class CollapsedComponent { 32 | filler = loremIpsum; 33 | } 34 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/examples/with-spacer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const SPACER = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | `; 18 | 19 | @Component({ 20 | selector: 'app-spacer-between-nav-group-demo', 21 | template: SPACER, 22 | }) 23 | export class WithSpacerComponent {} 24 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer/examples/anatomy.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const ANATOMY = ` 4 | 5 | 6 |
Subheader Content Here
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Footer Content Here
17 |
18 |
19 | `; 20 | 21 | @Component({ 22 | selector: 'app-anatomy-drawer-demo', 23 | template: ANATOMY, 24 | }) 25 | export class AnatomyComponent {} 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Report a bug with a Brightlayer UI resource 4 | title: '' 5 | labels: 'bug, needs-review, brightlayer-ui' 6 | assignees: '' 7 | 8 | --- 9 | 10 | #### Describe the bug / expected behavior 11 | 12 | #### What are the steps to reproduce? 13 | 1. Go to... 14 | 2. Click on... 15 | 16 | #### Screenshots / Screen recording 17 | 18 | #### Code snippet / Link to minimum reproduction example 19 | 20 | ``` 21 | CODE HERE 22 | ``` 23 | 24 | #### Your environment information 25 | 26 | 27 | #### Suggested fix 28 | 29 | 30 | #### Anything else to add? 31 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/buttons/toggle-code-button/toggle-code-button.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-toggle-code-button', 5 | template: ` 6 | 14 | `, 15 | }) 16 | export class ToggleCodeButtonComponent { 17 | @Input() showCode: boolean; 18 | @Output() showCodeChange: EventEmitter = new EventEmitter(); 19 | 20 | toggleShowCodeButton(): void { 21 | this.showCode = !this.showCode; 22 | this.showCodeChange.emit(this.showCode); 23 | setTimeout(() => { 24 | //@ts-ignore 25 | window.Prism.highlightAll(); 26 | window.dispatchEvent(new Event('resize')); 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/nav-item/drawer-nav-item.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerNavItemComponent } from './drawer-nav-item.component'; 4 | import { InfoListItemModule } from '../../../info-list-item/public-api'; 5 | import { MatIconModule } from '@angular/material/icon'; 6 | import { MatDividerModule } from '@angular/material/divider'; 7 | import { MatRippleModule } from '@angular/material/core'; 8 | import { MatExpansionModule } from '@angular/material/expansion'; 9 | import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip'; 10 | 11 | @NgModule({ 12 | declarations: [DrawerNavItemComponent], 13 | imports: [ 14 | MatTooltipModule, 15 | CommonModule, 16 | InfoListItemModule, 17 | MatIconModule, 18 | MatDividerModule, 19 | MatRippleModule, 20 | MatExpansionModule, 21 | ], 22 | exports: [DrawerNavItemComponent], 23 | }) 24 | export class DrawerNavItemModule {} 25 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/examples/with-nested-items.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_NESTED_ITEMS = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | `; 18 | 19 | @Component({ 20 | selector: 'app-nav-item-with-nested-items-demo', 21 | template: WITH_NESTED_ITEMS, 22 | }) 23 | export class WithNestedItemsComponent {} 24 | -------------------------------------------------------------------------------- /src/docs/services/playground/playground.service.ts: -------------------------------------------------------------------------------- 1 | import { Subject } from 'rxjs'; 2 | import { Knob } from '../../pages/component-docs/shared/scaffold/scaffold.component'; 3 | import { Injectable } from '@angular/core'; 4 | 5 | @Injectable({ 6 | providedIn: 'root', 7 | }) 8 | export class PlaygroundService { 9 | knobChange = new Subject(); 10 | 11 | addOptionalProp(inputs: { [key: string]: Knob }, name: keyof T, prefixSpace?: boolean): string { 12 | const knob = inputs[name as string]; 13 | if (knob.value === knob.componentDefault) { 14 | return ''; 15 | } 16 | const type = knob.type; 17 | const input = String(name); 18 | if (type === 'string' || type === 'color' || type === 'select') { 19 | return `${prefixSpace ? ' ' : ''}${input}="${knob.value}"`; 20 | } 21 | return `${prefixSpace ? ' ' : ''}[${input}]="${knob.value}"`; 22 | } 23 | 24 | removeEmptyLines(code: string): string { 25 | return code.replace(/^\s*$(?:\r\n?|\n)/gm, ''); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/examples/icon-diffs.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const ICON_DIFFS = ` 4 | 5 | 6 | 7 | 8 | 9 | schedule 10 | 11 | 12 | 13 | 14 | 15 | A T-Rex as the avatar image 16 | 17 | 18 | `; 19 | 20 | @Component({ 21 | selector: 'app-icon-diffs-hero-demo', 22 | template: ICON_DIFFS, 23 | }) 24 | export class IconDiffsComponent {} 25 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/from-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const FROM_LIST = ` 4 | 5 | 6 | {{item.icon}} 7 |
{{item.title}}
8 |
9 |
10 |
11 | `; 12 | 13 | @Component({ 14 | selector: 'app-from-list-user-menu-demo', 15 | template: FROM_LIST, 16 | }) 17 | export class FromListComponent { 18 | open = false; 19 | items = [ 20 | { 21 | title: 'Settings', 22 | icon: 'settings', 23 | }, 24 | { 25 | title: 'Contact Us', 26 | icon: 'mail', 27 | }, 28 | { 29 | title: 'Log Out', 30 | icon: 'logout', 31 | }, 32 | ]; 33 | } 34 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-subheader/drawer-subheader-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerSubheaderDocComponent } from './drawer-subheader-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { ComplexComponent } from './examples/complex.component'; 7 | import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/material/legacy-form-field'; 8 | import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; 9 | import { PlaygroundComponent } from './examples/playground.component'; 10 | 11 | @NgModule({ 12 | declarations: [DrawerSubheaderDocComponent, BasicExampleComponent, ComplexComponent, PlaygroundComponent], 13 | imports: [DrawerModule, SharedCompDocsModule, MatFormFieldModule, MatSelectModule], 14 | exports: [DrawerSubheaderDocComponent], 15 | }) 16 | export class DrawerSubheaderDocModule {} 17 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/buttons/copy-code-button/copy-code-button.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-copy-code-button', 5 | template: ` 6 | 12 | `, 13 | }) 14 | export class CopyCodeButtonComponent { 15 | @Input() code: string; 16 | 17 | hasCopiedCode: boolean; 18 | 19 | copyCode(): void { 20 | navigator.clipboard.writeText(this.code).then( 21 | () => {}, 22 | (err) => { 23 | console.error('Async: Could not copy text: ', err); 24 | } 25 | ); 26 | 27 | this.hasCopiedCode = true; 28 | setTimeout(() => { 29 | this.hasCopiedCode = false; 30 | }, 750); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/docs/md/Spacer.md: -------------------------------------------------------------------------------- 1 | # Spacer 2 | 3 | An invisible utility component that acts as a spacer element in various layouts. It works with flexbox sizing or fixed sizing. 4 | 5 |
6 | Spacer used in Drawer Body
7 |
8 | 9 | ## Usage 10 | 11 | ```typescript 12 | // app.module.ts 13 | import { SpacerModule } from '@brightlayer-ui/angular-components'; 14 | ... 15 | imports: [ 16 | SpacerModule 17 | ], 18 | ... 19 | ``` 20 | 21 | ## API 22 | 23 | Parent element (``) attributes: 24 | 25 |
26 | 27 | | @Input | Description | Type | Required | Default | 28 | | ------ | --------------------------------------- | -------- | -------- | ------- | 29 | | flex | Flex grow/shrink value for flex layouts | `number` | no | 1 | 30 | | height | Height (in px) for static layouts | `number` | no | | 31 | | width | Width (in px) for static layouts | `number` | no | | 32 | 33 |
34 | -------------------------------------------------------------------------------- /src/lib/core/hero/hero-banner.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core'; 2 | 3 | /** 4 | * [HeroBanner Component](https://brightlayer-ui-components.github.io/angular/?path=/info/components-hero--readme) 5 | * 6 | * The `` component is a simple wrapper component that is used to contain ``s. 7 | */ 8 | @Component({ 9 | selector: 'blui-hero-banner', 10 | changeDetection: ChangeDetectionStrategy.OnPush, 11 | encapsulation: ViewEncapsulation.None, 12 | template: ` 13 |
14 | 15 |
16 | 17 | `, 18 | styleUrls: ['./hero-banner.component.scss'], 19 | host: { 20 | class: 'blui-hero-banner', 21 | }, 22 | }) 23 | export class HeroBannerComponent { 24 | /** Whether to show the line separator 25 | * 26 | * @default false 27 | * */ 28 | @Input() divider = false; 29 | } 30 | -------------------------------------------------------------------------------- /src/lib/core/mobile-stepper/mobile-stepper.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |
13 |
14 |
{{ activeStep + 1 }} / {{ stepsArray.length }}
15 | 16 | 17 |
18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/bottomsheet.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const BOTTOMSHEET = ` 4 | 5 | 6 | {{item.icon}} 7 |
{{item.title}}
8 |
9 |
10 |
11 | `; 12 | 13 | @Component({ 14 | selector: 'app-bottom-sheet-user-menu-demo', 15 | template: BOTTOMSHEET, 16 | }) 17 | export class BottomsheetComponent { 18 | open = false; 19 | 20 | items = [ 21 | { 22 | title: 'Settings', 23 | icon: 'settings', 24 | }, 25 | { 26 | title: 'Contact Us', 27 | icon: 'mail', 28 | }, 29 | { 30 | title: 'Log Out', 31 | icon: 'logout', 32 | }, 33 | ]; 34 | } 35 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-layout/examples/permanent.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const PERMANENT = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | App Content Here. 15 |
16 |
17 | `; 18 | 19 | @Component({ 20 | selector: 'app-permanent-drawer-layout-demo', 21 | template: PERMANENT, 22 | styles: [ 23 | ` 24 | :host { 25 | display: flex; 26 | width: 100%; 27 | } 28 | `, 29 | ], 30 | }) 31 | export class PermanentVariantExampleComponent {} 32 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DrawerComponent } from './drawer.component'; 4 | import { DrawerBodyModule } from './drawer-body/drawer-body.module'; 5 | import { DrawerHeaderModule } from './drawer-header/drawer-header.module'; 6 | import { DrawerSubheaderModule } from './drawer-subheader/drawer-subheader.module'; 7 | import { DrawerFooterModule } from './drawer-footer/drawer-footer.module'; 8 | import { DrawerLayoutModule } from './drawer-layout/drawer-layout.module'; 9 | 10 | @NgModule({ 11 | declarations: [DrawerComponent], 12 | imports: [ 13 | CommonModule, 14 | DrawerHeaderModule, 15 | DrawerSubheaderModule, 16 | DrawerBodyModule, 17 | DrawerFooterModule, 18 | DrawerLayoutModule, 19 | ], 20 | exports: [ 21 | DrawerComponent, 22 | DrawerHeaderModule, 23 | DrawerSubheaderModule, 24 | DrawerBodyModule, 25 | DrawerFooterModule, 26 | DrawerLayoutModule, 27 | ], 28 | }) 29 | export class DrawerModule {} 30 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/examples/with-custom-content.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const CUSTOM_CONTENT = ` 4 | 5 | 6 |
11 |
Nav Group Title Content
12 | 13 |
14 | 15 | 16 |
17 |
18 |
19 | `; 20 | 21 | @Component({ 22 | selector: 'app-custom-content-nav-group-demo', 23 | template: CUSTOM_CONTENT, 24 | }) 25 | export class WithCustomContentComponent {} 26 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/drawer-nav-item-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerNavItemDocComponent } from './drawer-nav-item-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { WithIconsExampleComponent } from './examples/with-icons.component'; 7 | import { WithNestedItemsComponent } from './examples/with-nested-items.component'; 8 | import { WithSelectedItemComponent } from './examples/with-selected-item.component'; 9 | import { PlaygroundComponent } from './examples/playground.component'; 10 | 11 | @NgModule({ 12 | declarations: [ 13 | PlaygroundComponent, 14 | DrawerNavItemDocComponent, 15 | WithIconsExampleComponent, 16 | BasicExampleComponent, 17 | WithNestedItemsComponent, 18 | WithSelectedItemComponent, 19 | ], 20 | imports: [DrawerModule, SharedCompDocsModule], 21 | }) 22 | export class DrawerNavItemDocModule {} 23 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/list-item-tag/examples/complex.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import * as Colors from '@brightlayer-ui/colors'; 3 | 4 | export const COMPLEX = ` 5 |
Info List Item
6 |
with a ListItemTag component to the right
7 | battery_charging_full 8 |
9 | 14 | 15 | 19 | 20 |
21 |
`; 22 | 23 | @Component({ 24 | selector: 'app-complex-list-item-tag-demo', 25 | template: COMPLEX, 26 | }) 27 | export class ComplexExample { 28 | colors = Colors; 29 | } 30 | -------------------------------------------------------------------------------- /src/docs/services/markdown-split/markdown-split.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root', 5 | }) 6 | export class MarkdownSplitService { 7 | splitWithTail(str: string, delim: string, count: number): string[] { 8 | const parts = str.split(delim); 9 | const tail = parts.slice(count).join(delim); 10 | const result = parts.slice(0, count); 11 | result.push(tail); 12 | return result; 13 | } 14 | 15 | subsection(str: string, topDelim: string, bottomDelim?: string): string { 16 | const parts = str.split(topDelim); 17 | let tail = parts.slice(1).join(topDelim); 18 | tail = topDelim + tail; 19 | if (bottomDelim) { 20 | const offBottom = tail.split(bottomDelim)[0]; 21 | return offBottom; 22 | } 23 | return tail; 24 | 25 | /* 26 | const parts = str.split(bottomDelim); 27 | const tail = parts.slice(1).join(bottomDelim); 28 | const result = parts.slice(0, 1); 29 | result.push(tail); 30 | return result[1]; */ 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/lib/core/mobile-stepper/mobile-stepper.component.scss: -------------------------------------------------------------------------------- 1 | .blui-mobile-stepper { 2 | display: flex; 3 | width: 100%; 4 | } 5 | 6 | .blui-mobile-stepper-content { 7 | display: flex; 8 | justify-content: space-between; 9 | align-items: center; 10 | flex-grow: 1; 11 | button { 12 | margin: 1rem 16px; 13 | } 14 | } 15 | 16 | .blui-mobile-stepper-dots { 17 | display: flex; 18 | flex-direction: row; 19 | } 20 | 21 | .blui-mobile-stepper-dot { 22 | height: 0.5rem; 23 | width: 0.5rem; 24 | background-color: gray; 25 | border-radius: 100%; 26 | margin: 0 0.25rem; 27 | } 28 | 29 | .blui-mobile-stepper-dot-active { 30 | background-color: blue; /* Default color */ 31 | } 32 | 33 | .blui-mobile-stepper-display-none { 34 | display: none; 35 | } 36 | 37 | .blui-mobile-stepper-next-button-wrapper, 38 | .blui-mobile-stepper-back-button-wrapper { 39 | display: flex; 40 | flex: 1; 41 | } 42 | 43 | .blui-mobile-stepper-next-button-wrapper { 44 | justify-content: flex-end; 45 | } 46 | .blui-mobile-stepper-back-button-wrapper { 47 | justify-content: flex-start; 48 | } 49 | -------------------------------------------------------------------------------- /src/docs/services/viewport/viewport.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BreakpointObserver } from '@angular/cdk/layout'; 3 | 4 | // Use this service to get viewport size. 5 | @Injectable({ 6 | providedIn: 'root', 7 | }) 8 | export class ViewportService { 9 | breakpointSubscription: any; 10 | mobileViewport: boolean; 11 | mediumViewport: boolean; 12 | 13 | constructor(private readonly _breakpointObserver: BreakpointObserver) { 14 | this.breakpointSubscription = this._breakpointObserver 15 | .observe(['(max-width: 600px)', '(max-width: 1280px)']) 16 | .subscribe((result) => { 17 | const small = Object.keys(result.breakpoints)[0]; 18 | const medium = Object.keys(result.breakpoints)[1]; 19 | this.mobileViewport = result.breakpoints[small]; 20 | this.mediumViewport = result.breakpoints[medium]; 21 | }); 22 | } 23 | 24 | isSmall(): boolean { 25 | return this.mobileViewport; 26 | } 27 | 28 | isMedium(): boolean { 29 | return this.mediumViewport; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | Fixes # . 3 | 4 | 5 | #### Changes proposed in this Pull Request: 6 | - 7 | - 8 | - 9 | 10 | 11 | #### Screenshots / Screen Recording (if applicable) 12 | - 13 | 14 | 15 | 16 | #### To Test: 17 | - 18 | 19 | 20 | #### Any specific feedback you are looking for? 21 | - 22 | 23 | #### PR Readiness Checklist 24 | 25 | Please confirm all items below have been addressed prior to requesting review: 26 | 27 | - [ ] Code has been formatted with Prettier 28 | - [ ] Code passes all linting checks 29 | - [ ] All tests pass 30 | - [ ] Code builds successfully 31 | - [ ] Translations have been updated (if applicable) 32 | - [ ] Documentation has been updated (if applicable) 33 | - [ ] Changelog has been updated (if applicable) 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/app-bar/app-bar-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { AppBarModule, ThreeLinerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { AppBarDocComponent } from './app-bar-doc.component'; 5 | import { ThreeLinerComponent } from './examples/three-liner.component'; 6 | import { SnapAppBarComponent } from './examples/snap.component'; 7 | import { ExpandedComponent } from './examples/expanded.component'; 8 | import { CollapsedComponent } from './examples/collapsed.component'; 9 | import { MatIconModule } from '@angular/material/icon'; 10 | import { PlaygroundComponent } from './examples/playground.component'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | AppBarDocComponent, 15 | SnapAppBarComponent, 16 | ExpandedComponent, 17 | CollapsedComponent, 18 | ThreeLinerComponent, 19 | PlaygroundComponent, 20 | ], 21 | imports: [AppBarModule, ThreeLinerModule, SharedCompDocsModule, MatIconModule], 22 | exports: [AppBarDocComponent], 23 | }) 24 | export class AppBarDocModule {} 25 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/drawer-header-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule, ListItemTagModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerHeaderDocComponent } from './drawer-header-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { WithCustomContentComponent } from './examples/with-custom-content.component'; 7 | import { WithSubtitleComponent } from './examples/with-subtitle.component'; 8 | import { WithIconComponent } from './examples/with-icon.component'; 9 | import { PlaygroundComponent } from './examples/playground.component'; 10 | 11 | @NgModule({ 12 | declarations: [ 13 | DrawerHeaderDocComponent, 14 | BasicExampleComponent, 15 | WithCustomContentComponent, 16 | WithSubtitleComponent, 17 | WithIconComponent, 18 | PlaygroundComponent, 19 | ], 20 | imports: [DrawerModule, SharedCompDocsModule, ListItemTagModule], 21 | exports: [DrawerHeaderDocComponent], 22 | }) 23 | export class DrawerHeaderDocModule {} 24 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/examples/with-actions.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_ACTIONS = ` 6 | 7 | star 8 | settings 9 | more_vert 10 | 11 | 12 | Body Content 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
View Location
21 |
22 |
23 | `; 24 | 25 | @Component({ 26 | selector: 'app-custom-header-score-card-demo', 27 | template: WITH_ACTIONS, 28 | }) 29 | export class WithActionsComponent {} 30 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/drawer-body.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { count } from '../../../utils/test-utils'; 3 | import { DrawerBodyComponent } from './drawer-body.component'; 4 | import { DrawerBodyModule } from './drawer-body.module'; 5 | 6 | describe('DrawerBodyComponent', () => { 7 | let component: DrawerBodyComponent; 8 | let fixture: ComponentFixture; 9 | 10 | beforeEach(() => { 11 | void TestBed.configureTestingModule({ 12 | imports: [DrawerBodyModule], 13 | }).compileComponents(); 14 | fixture = TestBed.createComponent(DrawerBodyComponent); 15 | component = fixture.componentInstance; 16 | }); 17 | 18 | it('should create', () => { 19 | fixture.detectChanges(); 20 | void expect(component).toBeTruthy(); 21 | }); 22 | 23 | it('should enforce class naming conventions', () => { 24 | fixture.detectChanges(); 25 | const classList = ['.blui-drawer-body-content']; 26 | for (const className of classList) { 27 | count(fixture, className); 28 | } 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/app-bar/examples/snap.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { loremIpsum } from './lorem-ipsum'; 3 | 4 | export const SNAP = `
5 | 11 |
Content
12 |
13 |
{{ filler }}
14 |
15 | `; 16 | 17 | @Component({ 18 | selector: 'app-snap-app-bar-demo', 19 | template: SNAP, 20 | styles: [ 21 | ` 22 | .scroll-container { 23 | width: 100%; 24 | max-width: 450px; 25 | max-height: 400px; 26 | overflow: auto; 27 | position: relative; 28 | } 29 | .content-body { 30 | padding: 16px; 31 | background: white; 32 | } 33 | `, 34 | ], 35 | }) 36 | export class SnapAppBarComponent { 37 | filler = loremIpsum; 38 | } 39 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/examples/within-card.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITHIN_CARD = ` 4 | 5 | 6 | 7 | Device Usage 8 | 9 | 10 | 13 | location_off 14 | 18 | 19 | 20 | 21 | `; 22 | 23 | @Component({ 24 | selector: 'app-within-card-empty-state-demo', 25 | template: WITHIN_CARD, 26 | }) 27 | export class WithinCardComponent {} 28 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/channel-value/channel-value-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ChannelValueModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { RouterModule } from '@angular/router'; 6 | import { ChannelValueDocComponent } from './channel-value-doc.component'; 7 | import { BasicExampleComponent } from './examples/basic.component'; 8 | import { IconComponent } from './examples/icon.component'; 9 | import { PrefixComponent } from './examples/prefix.component'; 10 | import { UnitSpaceComponent } from './examples/unit-space.component'; 11 | import { PlaygroundComponent } from './examples/playground.component'; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | ChannelValueDocComponent, 16 | BasicExampleComponent, 17 | IconComponent, 18 | PrefixComponent, 19 | UnitSpaceComponent, 20 | PlaygroundComponent, 21 | ], 22 | imports: [ChannelValueModule, SharedCompDocsModule, MatIconModule, RouterModule], 23 | exports: [ChannelValueDocComponent], 24 | }) 25 | export class ChannelValueDocModule {} 26 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/mobile-stepper-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { MobileStepperModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { RouterModule } from '@angular/router'; 7 | import { MobileStepperDocComponent } from './mobile-stepper-doc.component'; 8 | import { TextComponent } from './examples/text.component'; 9 | import { ProgressComponent } from './examples/progress.component'; 10 | import { DotsComponent } from './examples/dots.component'; 11 | import { PlaygroundComponent } from './examples/playground.component'; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | MobileStepperDocComponent, 16 | DotsComponent, 17 | BasicExampleComponent, 18 | PlaygroundComponent, 19 | TextComponent, 20 | ProgressComponent, 21 | ], 22 | imports: [MobileStepperModule, SharedCompDocsModule, MatIconModule, RouterModule], 23 | exports: [MobileStepperDocComponent], 24 | }) 25 | export class MobileStepperDocModule {} 26 | -------------------------------------------------------------------------------- /src/docs/navigation/navigation.component.scss: -------------------------------------------------------------------------------- 1 | @use '@brightlayer-ui/colors/palette.scss' as blui; 2 | 3 | .toolbar { 4 | position: sticky; 5 | position: -webkit-sticky; 6 | top: 0; 7 | z-index: 1000; 8 | padding: 0 24px; 9 | } 10 | 11 | .drawer-content { 12 | display: flex; 13 | flex-direction: column; 14 | height: 100%; 15 | min-height: 100vh; 16 | } 17 | 18 | ::ng-deep .app-navigation-drawer .blui-drawer-header-background { 19 | background-image: linear-gradient(90deg, #007bc1 22.4%, rgba(0, 123, 193, 0.2) 100%), 20 | url('../../assets/box-background.png'); 21 | background-size: contain; 22 | background-position: right center; 23 | opacity: 1 !important; 24 | } 25 | 26 | ::ng-deep .app-navigation-drawer .blui-drawer-nav-group-title { 27 | color: map-get(blui.$blui-blue, 500) !important; 28 | } 29 | 30 | .framework-chip { 31 | margin-left: 12px; 32 | .mat-standard-chip { 33 | min-height: 24px; 34 | margin: 0; 35 | } 36 | div { 37 | color: map-get(blui.$blui-blue, 500) !important; 38 | font-size: 10px; 39 | text-transform: uppercase; 40 | letter-spacing: 1px; 41 | font-weight: 600; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/lib/core/list-item-tag/list-item-tag.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input, OnChanges, ViewEncapsulation } from '@angular/core'; 2 | import { requireInput } from '../../utils/utils'; 3 | 4 | /** 5 | * [ListItemTag Component](https://brightlayer-ui-components.github.io/angular/?path=/info/components-list-item-tag--readme) 6 | * 7 | * The `` is a text item with a colored background and rounded corners that is used to tag lists. 8 | */ 9 | @Component({ 10 | selector: 'blui-list-item-tag', 11 | templateUrl: './list-item-tag.component.html', 12 | styleUrls: ['./list-item-tag.component.scss'], 13 | changeDetection: ChangeDetectionStrategy.OnPush, 14 | encapsulation: ViewEncapsulation.None, 15 | host: { 16 | class: 'blui-list-item-tag', 17 | }, 18 | }) 19 | export class ListItemTagComponent implements OnChanges { 20 | /** Color of the label background */ 21 | @Input() backgroundColor: string; 22 | /** Color of the label text */ 23 | @Input() fontColor: string; 24 | /** The label text */ 25 | @Input() label: string; 26 | 27 | ngOnChanges(): void { 28 | requireInput(['label'], this); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-header/examples/with-custom-content.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_CUSTOM_CONTENT = ` 4 | 5 |
6 |
API Documentation
7 | 8 |
9 | 12 |
13 |
14 | `; 15 | 16 | @Component({ 17 | selector: 'app-with-custom-content-drawer-header-demo', 18 | template: WITH_CUSTOM_CONTENT, 19 | styles: [ 20 | ` 21 | ::ng-deep .drawer-header-with-custom-content .blui-drawer-header-background { 22 | background-image: url('../../../../../../../assets/topology_40.png'); 23 | } 24 | `, 25 | ], 26 | }) 27 | export class WithCustomContentComponent {} 28 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/knobs/knob-text.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; 2 | import { FormControl, Validators } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-text-knob', 6 | template: ` 7 | 8 | {{ label }}: string 9 | {{ hint }} 10 | {{ label }} is required 11 | {{ hint }} 12 | 13 | 14 | `, 15 | }) 16 | export class KnobTextComponent { 17 | @Input() label: string; 18 | @Input() isRequired: boolean; 19 | @Input() hint: string; 20 | @Input() value: string; 21 | @Output() valueChange = new EventEmitter(); 22 | control: FormControl; 23 | 24 | ngOnInit(): void { 25 | this.control = new FormControl(this.value, this.isRequired ? [Validators.required] : []); 26 | this.control.markAsTouched(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/within-toolbar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITHIN_TOOLBAR = ` 4 |
Toolbar Title
5 | 6 | 7 | 8 | 9 | exit_to_app 10 |
Log Out
11 |
12 |
13 |
14 |
15 | `; 16 | 17 | @Component({ 18 | selector: 'app-in-toolbar-user-menu-demo', 19 | template: WITHIN_TOOLBAR, 20 | }) 21 | export class WithinToolbarComponent { 22 | open = false; 23 | items = [ 24 | { 25 | title: 'Settings', 26 | icon: 'settings', 27 | }, 28 | { 29 | title: 'Contact Us', 30 | icon: 'mail', 31 | }, 32 | { 33 | title: 'Log Out', 34 | icon: 'logout', 35 | }, 36 | ]; 37 | } 38 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-group/drawer-nav-group-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule, ListItemTagModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { DrawerNavGroupDocComponent } from './drawer-nav-group-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { MultipleGroupsComponent } from './examples/multiple-groups.component'; 7 | import { WithSpacerComponent } from './examples/with-spacer.component'; 8 | import { PlaygroundComponent } from './examples/playground.component'; 9 | import { WithCustomContentComponent } from './examples/with-custom-content.component'; 10 | import { RouterModule } from '@angular/router'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | DrawerNavGroupDocComponent, 15 | BasicExampleComponent, 16 | WithCustomContentComponent, 17 | MultipleGroupsComponent, 18 | WithSpacerComponent, 19 | PlaygroundComponent, 20 | ], 21 | imports: [DrawerModule, ListItemTagModule, SharedCompDocsModule, RouterModule], 22 | exports: [DrawerNavGroupDocComponent], 23 | }) 24 | export class DrawerNavGroupDocModule {} 25 | -------------------------------------------------------------------------------- /src/docs/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { MatIconRegistry } from '@angular/material/icon'; 3 | import { DomSanitizer } from '@angular/platform-browser'; 4 | 5 | @Component({ 6 | selector: 'app-root', 7 | templateUrl: './app.component.html', 8 | }) 9 | export class AppComponent { 10 | constructor(private readonly _matIconRegistry: MatIconRegistry, private readonly _domSanitizer: DomSanitizer) { 11 | this._matIconRegistry.addSvgIconSetInNamespace( 12 | 'blui-icons', 13 | /* **Note to Brightlayer UI Users: 14 | Stackblitz has difficulty reading static assets found within the node_modules folder. 15 | For this example to work inside Stackblitz, we use a https request to fetch the Brightlayer UI icon set. 16 | In normal situations, we encourage you to import the iconSet directly from the node_modules folder like below: 17 | // const iconSet = require('@brightlayer-ui/icons-svg/icons.svg').default; 18 | // this._domSanitizer.bypassSecurityTrustResourceUrl('iconSet') 19 | */ 20 | this._domSanitizer.bypassSecurityTrustResourceUrl('assets/blui-icons/icons.svg') 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/examples/within-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITHIN_LIST = ` 4 | 5 |
Status
6 | 7 |
8 | 9 | 10 |
Output Voltage
11 |
Phase A · Phase B · Phase C
12 | 13 | check_circle 14 | 15 |
16 | 17 | 18 |
Output Current
19 | battery_charging_full 20 |
21 |
22 | `; 23 | 24 | @Component({ 25 | selector: 'app-within-list-info-list-item-demo', 26 | template: WITHIN_LIST, 27 | }) 28 | export class WithinListComponent {} 29 | -------------------------------------------------------------------------------- /src/lib/core/empty-state/empty-state.component.scss: -------------------------------------------------------------------------------- 1 | .blui-empty-state { 2 | display: flex; 3 | } 4 | 5 | .blui-empty-state-content { 6 | height: 100%; 7 | width: 100%; 8 | box-sizing: border-box; 9 | padding: 1rem; 10 | display: flex; 11 | flex-direction: column; 12 | align-items: center; 13 | justify-content: center; 14 | 15 | .blui-empty-state-title { 16 | margin-bottom: 0; 17 | } 18 | 19 | .blui-empty-state-title, 20 | .blui-empty-state-description { 21 | text-align: center; 22 | font-weight: 600; 23 | } 24 | 25 | .blui-empty-state-empty-icon-wrapper { 26 | margin-bottom: 1rem; 27 | line-height: 1; 28 | > * { 29 | $size: 96px; 30 | display: block; 31 | font-size: $size; 32 | height: $size; 33 | width: $size; 34 | text-align: center; 35 | } 36 | } 37 | 38 | .blui-empty-state-actions-wrapper { 39 | margin-top: 1rem; 40 | &.blui-empty-state-actions-wrapper-no-action { 41 | margin-top: 0; 42 | } 43 | } 44 | 45 | .blui-empty-state-actions-wrapper .mat-button-wrapper { 46 | display: flex; 47 | align-items: center; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/three-liner/three-liner-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BasicExample } from './examples/basic.component'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { ThreeLinerModule, ToolbarMenuModule } from 'src/lib/core'; 5 | import { ComplexExample } from './examples/complex.component'; 6 | import { ThreeLinerDocComponent } from './three-liner-doc.component'; 7 | import { MatIconModule } from '@angular/material/icon'; 8 | import { RouterModule } from '@angular/router'; 9 | import { PlaygroundComponent } from './examples/playground.component'; 10 | import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; 11 | import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; 12 | 13 | @NgModule({ 14 | declarations: [ThreeLinerDocComponent, BasicExample, ComplexExample, PlaygroundComponent], 15 | imports: [ 16 | SharedCompDocsModule, 17 | MatButtonModule, 18 | MatMenuModule, 19 | MatIconModule, 20 | ThreeLinerModule, 21 | RouterModule, 22 | ToolbarMenuModule, 23 | ], 24 | exports: [ThreeLinerDocComponent], 25 | }) 26 | export class ThreeLinerDocModule {} 27 | -------------------------------------------------------------------------------- /src/lib/core/user-menu/user-menu.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { UserMenuComponent } from './user-menu.component'; 4 | import { OverlayModule } from '@angular/cdk/overlay'; 5 | import { InfoListItemModule } from '../info-list-item/info-list-item.module'; 6 | import { UserMenuAvatarComponent } from './user-menu-avatar.component'; 7 | import { DrawerHeaderModule } from '../drawer/drawer-header/drawer-header.module'; 8 | import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card'; 9 | import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; 10 | import { UserMenuHeaderComponent } from './user-menu-header/user-menu-header.component'; 11 | import { MatToolbarModule } from '@angular/material/toolbar'; 12 | 13 | @NgModule({ 14 | declarations: [UserMenuComponent, UserMenuAvatarComponent, UserMenuHeaderComponent], 15 | imports: [ 16 | CommonModule, 17 | DrawerHeaderModule, 18 | InfoListItemModule, 19 | OverlayModule, 20 | MatBottomSheetModule, 21 | MatCardModule, 22 | MatToolbarModule, 23 | ], 24 | exports: [UserMenuComponent, UserMenuAvatarComponent, UserMenuHeaderComponent], 25 | }) 26 | export class UserMenuModule {} 27 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/example-code/example-code.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ViewEncapsulation } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-example-code', 5 | host: { 6 | class: 'app-example-code', 7 | }, 8 | template: ` 9 |
15 |             
16 |             
18 |             
19 |         
20 | `, 21 | encapsulation: ViewEncapsulation.None, 22 | styleUrls: ['example-code.component.scss'], 23 | }) 24 | export class ExampleCodeComponent { 25 | @Input() snippet: string; 26 | @Input() dataLine: string; 27 | @Input() copyButtonOnHover = false; 28 | 29 | isHoverSnippet: boolean; 30 | 31 | ngAfterViewInit(): void { 32 | /* This triggers a code-highlighting event. */ 33 | window.dispatchEvent(new Event('resize')); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/user-menu/examples/non-text-avatar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const NON_TEXT_AVATAR = `
4 | 5 | 6 | 7 | settings 8 |
Settings
9 |
10 |
11 |
12 | 13 | 14 | pets 15 | 16 | 17 | settings 18 |
Settings
19 |
20 |
21 |
22 |
23 | `; 24 | 25 | @Component({ 26 | selector: 'app-non-text-avatar-user-menu-demo', 27 | template: NON_TEXT_AVATAR, 28 | }) 29 | export class NonTextAvatarComponent { 30 | open1 = false; 31 | open2 = false; 32 | } 33 | -------------------------------------------------------------------------------- /src/docs/components/pxb-logo/pxb-logo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-pxb-logo', 5 | template: ` 6 | 18 | `, 19 | styleUrls: ['pxb-logo.component.scss'], 20 | }) 21 | export class PxbLogoComponent { 22 | @Input() size: number; 23 | @Input() color: string; 24 | } 25 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-layout/drawer-layout.component.scss: -------------------------------------------------------------------------------- 1 | $transition: 300ms cubic-bezier(0.4, 0, 0.2, 1); 2 | 3 | .blui-drawer-layout { 4 | display: flex; 5 | height: 100vh; 6 | } 7 | 8 | /* RTL */ 9 | [dir='rtl'] .blui-drawer-layout-content > .mat-drawer-side { 10 | border-left: 0; // Border-left is provided by the Drawer component. 11 | } 12 | 13 | .blui-drawer-layout-content { 14 | height: 100%; 15 | width: 100%; 16 | transition: none; 17 | display: flex; 18 | 19 | > mat-sidenav-content { 20 | // Do not let angular material control the margin. They will attempt to apply their own margin even though we are calculating our own. 21 | margin-left: 0 !important; 22 | margin-right: 0 !important; 23 | } 24 | 25 | > .mat-drawer-side { 26 | border-right: none; 27 | } 28 | 29 | > .blui-drawer-layout-sidenav .blui-drawer-content { 30 | transition: none; 31 | width: 100%; 32 | &.blui-drawer-collapse { 33 | width: 100%; 34 | } 35 | } 36 | 37 | > .blui-drawer-layout-sidenav, 38 | .blui-drawer-layout-nav-content { 39 | min-height: 100%; 40 | transition: none; 41 | &.blui-drawer-layout-smooth { 42 | transition: $transition; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-layout/examples/rail.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const RAIL = ` 4 | 5 | 6 | 7 | 8 | devices 9 | 10 | 11 | place 12 | 13 | 14 | gavel 15 | 16 | 17 | 18 | 19 |
20 | App Content Here. 21 |
22 |
23 | `; 24 | 25 | @Component({ 26 | selector: 'app-rail-drawer-layout-demo', 27 | template: RAIL, 28 | styles: [ 29 | ` 30 | :host { 31 | display: flex; 32 | width: 100%; 33 | } 34 | `, 35 | ], 36 | }) 37 | export class RailVariantExampleComponent {} 38 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/example-code/example-code.component.scss: -------------------------------------------------------------------------------- 1 | .app-example-code { 2 | border-radius: 4px; 3 | display: flex; 4 | height: 100%; 5 | code, 6 | pre { 7 | font-family: monospace !important; 8 | } 9 | > code { 10 | padding-left: 0 !important; 11 | } 12 | > pre > code { 13 | display: inline-flex; 14 | } 15 | pre { 16 | padding: 0 !important; 17 | box-sizing: border-box; 18 | margin: 0 !important; 19 | width: 100%; 20 | .line-highlight { 21 | z-index: 2; 22 | margin-top: 1rem; // Adjust me when font-size of pre > code changes. 23 | width: 100% !important; 24 | } 25 | .line-highlight::before, 26 | .line-highlight::after { 27 | display: none; // No line numbers 28 | } 29 | } 30 | pre.language-html { 31 | padding-left: 2rem !important; 32 | padding-top: 1rem !important; 33 | padding-bottom: 1rem !important; 34 | } 35 | pre > code { 36 | width: 100%; 37 | box-sizing: border-box; 38 | font-size: 1rem !important; // If this gets adjusted, the .line-hightlight margin needs adjusted. 39 | } 40 | pre[class*='language-']:before { 41 | display: none !important; 42 | } 43 | pre[class*='language-']:after { 44 | display: none !important; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/lib/core/list-item-tag/list-item-tag.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | import { count } from '../../utils/test-utils'; 3 | import { ListItemTagComponent } from './list-item-tag.component'; 4 | import { ListItemTagModule } from './list-item-tag.module'; 5 | 6 | describe('ListItemTagComponent', () => { 7 | let component: ListItemTagComponent; 8 | let fixture: ComponentFixture; 9 | 10 | beforeEach(waitForAsync(() => { 11 | void TestBed.configureTestingModule({ 12 | imports: [ListItemTagModule], 13 | }).compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ListItemTagComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | void expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should initialize', () => { 27 | fixture.detectChanges(); 28 | void expect(component).toBeTruthy(); 29 | }); 30 | 31 | it('should enforce class naming conventions', () => { 32 | fixture.detectChanges(); 33 | const classList = ['.blui-list-item-tag-content', '.blui-list-item-tag-label']; 34 | for (const className of classList) { 35 | count(fixture, className); 36 | } 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/hero/hero-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ChannelValueModule, HeroModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { HeroDocComponent } from './hero-doc.component'; 6 | import { BasicExampleComponent } from './examples/basic.component'; 7 | import { ValueUnitsComponent } from './examples/value-units.component'; 8 | import { ChannelValueChildrenComponent } from './examples/channel-value-children.component'; 9 | import { IconDiffsComponent } from './examples/icon-diffs.component'; 10 | import { WithinBannerComponent } from './examples/within-banner.component'; 11 | import { RouterModule } from '@angular/router'; 12 | import { WithIconComponent } from './examples/with-icon.component'; 13 | import { PlaygroundComponent } from './examples/playground.component'; 14 | 15 | @NgModule({ 16 | declarations: [ 17 | HeroDocComponent, 18 | BasicExampleComponent, 19 | IconDiffsComponent, 20 | ValueUnitsComponent, 21 | WithIconComponent, 22 | ChannelValueChildrenComponent, 23 | WithinBannerComponent, 24 | PlaygroundComponent, 25 | ], 26 | imports: [HeroModule, ChannelValueModule, SharedCompDocsModule, MatIconModule, RouterModule], 27 | exports: [HeroDocComponent], 28 | }) 29 | export class HeroDocModule {} 30 | -------------------------------------------------------------------------------- /scripts/linkComponents.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | BLUE='\033[0;34m' 3 | BBLUE='\033[1;34m' #BOLD 4 | PURPLE='\033[0;35m' 5 | RED='\033[0;31m' 6 | BRED='\033[1;31m' #BOLD 7 | GREEN='\033[0;32m' 8 | BGREEN='\033[1;32m' #BOLD 9 | GRAY='\033[1;30m' 10 | NC='\033[0m' # No Color 11 | 12 | echo -e "${BLUE}Building components...${NC}" 13 | yarn build 14 | 15 | echo -en "${BLUE}Creating new folder in node_modules...${NC}" 16 | rm -rf ./demos/showcase/node_modules/.cache 17 | rm -rf "./demos/showcase/node_modules/@brightlayer-ui/angular-components" 18 | # rm -rf "./demos/storybook/node_modules/@brightlayer-ui/angular-components" 19 | mkdir -p "./demos/showcase/node_modules/@brightlayer-ui/angular-components" 20 | # mkdir -p "./demos/storybook/node_modules/@brightlayer-ui/angular-components" 21 | echo -e "${GREEN}Done${NC}" 22 | 23 | echo -en "${BLUE}Copying build output into node_modules...${NC}"; 24 | cp -r ./dist/. ./demos/showcase/node_modules/@brightlayer-ui/angular-components 25 | # cp -r ./dist/. ./demos/storybook/node_modules/@brightlayer-ui/angular-components 26 | echo -e "${GREEN}Done${NC}" 27 | 28 | echo -en "\r\n${BBLUE}Linking Components: ${NC}" 29 | if [ ! -f ./demos/showcase/node_modules/@brightlayer-ui/angular-components/package.json ]; then echo -e "${BRED}Not Linked${NC}" && exit 1; fi 30 | # if [ ! -f ./demos/storybook/node_modules/@brightlayer-ui/angular-components/package.json ]; then echo -e "${BRED}Not Linked${NC}" && exit 1; fi 31 | 32 | echo -e "${GRAY}Complete${NC}\r\n" 33 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-layout/examples/rail-condensed.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const RAIL_CONDENSED = ` 4 | 5 | 6 | 7 | 8 | dashboard 9 | 10 | 11 | place 12 | 13 | 14 | gavel 15 | 16 | 17 | 18 | 19 |
20 | App Content Here. 21 |
22 |
23 | `; 24 | 25 | @Component({ 26 | selector: 'app-rail-condensed-drawer-layout-demo', 27 | template: RAIL_CONDENSED, 28 | styles: [ 29 | ` 30 | :host { 31 | display: flex; 32 | width: 100%; 33 | } 34 | `, 35 | ], 36 | }) 37 | export class RailCondensedVariantExampleComponent {} 38 | -------------------------------------------------------------------------------- /src/lib/core/drawer/drawer-body/drawer-body.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewEncapsulation } from '@angular/core'; 2 | import { DrawerStateManagerService, StateListener } from '../state-listener.component'; 3 | 4 | /** 5 | * The `` is a wrapper for the main content of the Drawer. 6 | * The typical use case is to display `` elements, but custom elements (e.g., for spacing) are accepted as well. 7 | */ 8 | @Component({ 9 | selector: 'blui-drawer-body', 10 | changeDetection: ChangeDetectionStrategy.OnPush, 11 | encapsulation: ViewEncapsulation.None, 12 | template: ` 13 |
14 | 15 |
16 | `, 17 | styles: [ 18 | ` 19 | .blui-drawer-body-content { 20 | height: 100%; 21 | display: flex; 22 | flex-direction: column; 23 | } 24 | .blui-drawer-body-closed { 25 | overflow-x: hidden; 26 | } 27 | `, 28 | ], 29 | host: { 30 | class: 'blui-drawer-body', 31 | }, 32 | }) 33 | export class DrawerBodyComponent extends StateListener { 34 | constructor(stateManagerService: DrawerStateManagerService, changeDetectorRef: ChangeDetectorRef) { 35 | super(stateManagerService, changeDetectorRef); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/lib/utils/utils.ts: -------------------------------------------------------------------------------- 1 | import { ElementRef } from '@angular/core'; 2 | 3 | export type ContentPair = { 4 | selector: string; 5 | ref: ElementRef; 6 | }; 7 | 8 | export function requireInput(inputs: Array, component: any): void { 9 | inputs.forEach((input: any) => { 10 | if (component[input] === undefined || component[input] === null || component[input] === '') { 11 | const name: string = component.constructor.name; 12 | // eslint-disable-next-line no-console 13 | console.warn(`Brightlayer UI ${name} error: Property "${input}" is required.`); 14 | } 15 | }); 16 | } 17 | 18 | export function requireContent(contentPairs: ContentPair[], component: any): void { 19 | contentPairs.forEach((contentPair) => { 20 | if (!contentPair.ref.nativeElement.children || contentPair.ref.nativeElement.children.length === 0) { 21 | const name: string = component.constructor.name; 22 | // eslint-disable-next-line no-console 23 | console.warn(`Brightlayer UI ${name} error: Selector "${contentPair.selector}" is required.`); 24 | } 25 | }); 26 | } 27 | 28 | export function hasChildren(el: ElementRef): boolean { 29 | return el.nativeElement.children && el.nativeElement.children.length > 0; 30 | } 31 | 32 | export function isEmptyView(el: ElementRef): boolean { 33 | if (!el || !el.nativeElement) { 34 | return true; 35 | } 36 | return !hasChildren(el); 37 | } 38 | -------------------------------------------------------------------------------- /PUBLISHING.md: -------------------------------------------------------------------------------- 1 | # Publishing Instructions 2 | 3 | ## Automatic Publishing 4 | 5 | This package is published to NPM automatically by Github when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. 6 | 7 | - The `dev` branch will publish versions marked as `alpha` or `beta`. 8 | - The `master` branch will publish any version (`alpha`, `beta`, or `latest`). 9 | In both cases, the code will only be published if the version number differs from the current version published under the respective dist tag. 10 | 11 | ## Manually Publishing 12 | 13 | If you need to publish a package manually, you can run the following commands from the root folder: 14 | 15 | ```sh 16 | yarn build:lib 17 | yarn publish:package 18 | ``` 19 | 20 | The publishing script will look at the version in the `package.json` and automatically determine whether to publish an alpha, beta, or latest package. 21 | 22 | For this command to work, you must have an NPM token configured in your environment variables or you can perform a login prior to executing the publish command via: 23 | 24 | ```sh 25 | yarn build:lib 26 | npm adduser && yarn publish:package 27 | ``` 28 | 29 | > Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in Github. 30 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/empty-state/empty-state-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { EmptyStateModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { EmptyStateDocComponent } from './empty-state-doc.component'; 5 | import { BasicExampleComponent } from './examples/basic.component'; 6 | import { MatIconModule } from '@angular/material/icon'; 7 | import { WithDescriptionComponent } from './examples/with-description.component'; 8 | import { WithActionsComponent } from './examples/with-actions.component'; 9 | import { WithContentComponent } from './examples/with-content.component'; 10 | import { WithinCardComponent } from './examples/within-card.component'; 11 | import { MatExpansionModule } from '@angular/material/expansion'; 12 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 13 | import { PlaygroundComponent } from './examples/playground.component'; 14 | 15 | @NgModule({ 16 | declarations: [ 17 | EmptyStateDocComponent, 18 | BasicExampleComponent, 19 | WithDescriptionComponent, 20 | WithActionsComponent, 21 | WithContentComponent, 22 | WithinCardComponent, 23 | PlaygroundComponent, 24 | ], 25 | imports: [EmptyStateModule, SharedCompDocsModule, MatIconModule, MatExpansionModule, BrowserAnimationsModule], 26 | exports: [EmptyStateDocComponent], 27 | }) 28 | export class EmptyStateDocModule {} 29 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-footer/examples/complex.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const COMPLEX = ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
v2.4.0
15 |
10:33:05 03/12/22
16 |
17 |
18 | 19 |
20 |
Copyright © Eaton
21 |
All Rights Reserved
22 |
23 |
24 |
25 |
26 |
27 | `; 28 | 29 | @Component({ 30 | selector: 'app-complex-drawer-footer-demo', 31 | template: COMPLEX, 32 | }) 33 | export class ComplexExampleComponent {} 34 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/toolbar-menu/toolbar-menu-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ToolbarMenuModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { RouterModule } from '@angular/router'; 6 | import { BasicComponent } from './examples/basic.component'; 7 | import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; 8 | import { ToolbarMenuDocComponent } from './toolbar-menu-doc.component'; 9 | import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; 10 | import { WithIconComponent } from './examples/with-icon.component'; 11 | import { WithinToolbarComponent } from './examples/within-toolbar.component'; 12 | import { MatToolbarModule } from '@angular/material/toolbar'; 13 | import { PlaygroundComponent } from './examples/playground.component'; 14 | 15 | @NgModule({ 16 | declarations: [ 17 | ToolbarMenuDocComponent, 18 | WithIconComponent, 19 | BasicComponent, 20 | WithinToolbarComponent, 21 | PlaygroundComponent, 22 | ], 23 | imports: [ 24 | MatToolbarModule, 25 | ToolbarMenuModule, 26 | MatListModule, 27 | MatMenuModule, 28 | SharedCompDocsModule, 29 | MatIconModule, 30 | RouterModule, 31 | ], 32 | exports: [ToolbarMenuDocComponent], 33 | }) 34 | export class ToolbarMenuDocModule {} 35 | -------------------------------------------------------------------------------- /src/docs/md/ListItemTag.md: -------------------------------------------------------------------------------- 1 | # List Item Tag 2 | 3 | The `` is a text item with a colored background and rounded corners that is used to tag lists. 4 | 5 | Info List Items in a variety of styles 6 | 7 | ## Usage 8 | 9 | ```typescript 10 | // app.module.ts 11 | import { ListItemTagModule } from '@brightlayer-ui/angular-components'; 12 | ... 13 | imports: [ 14 | ListItemTagModule 15 | ], 16 | ... 17 | ``` 18 | 19 | ## API 20 | 21 | Parent element (`blui-list-item-tag`) attributes: 22 | 23 |
24 | 25 | | @Input | Description | Type | Required | Default | 26 | | --------------- | ----------------------------- | -------- | -------- | ------- | 27 | | backgroundColor | Color of the label background | `string` | no | | 28 | | fontColor | Color of the label | `string` | no | | 29 | | label | The label text | `string` | yes | | 30 | 31 |
32 | 33 | ### Classes 34 | 35 | Each Brightlayer UI component has classes which can be used to override component styles: 36 | 37 | | Name | Description | 38 | | -------------------------- | ---------------------------------- | 39 | | blui-list-item-tag | Styles applied to the tag | 40 | | blui-list-item-tag-content | Styles applied to the root element | 41 | | blui-list-item-tag-label | Styles applied to the label @Input | 42 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-layout/drawer-layout-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DrawerModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../../shared/shared-comp-docs.module'; 4 | import { PlaygroundComponent } from './examples/playground.component'; 5 | import { DrawerLayoutDocComponent } from './drawer-layout-doc.component'; 6 | import { PersistentVariantExampleComponent } from './examples/persistent.component'; 7 | import { PermanentVariantExampleComponent } from './examples/permanent.component'; 8 | import { TemporaryVariantExampleComponent } from './examples/temporary.component'; 9 | import { MatToolbarModule } from '@angular/material/toolbar'; 10 | import { RailVariantExampleComponent } from './examples/rail.component'; 11 | import { RailCondensedVariantExampleComponent } from './examples/rail-condensed.component'; 12 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | DrawerLayoutDocComponent, 17 | TemporaryVariantExampleComponent, 18 | RailVariantExampleComponent, 19 | PersistentVariantExampleComponent, 20 | PermanentVariantExampleComponent, 21 | PlaygroundComponent, 22 | RailCondensedVariantExampleComponent, 23 | ], 24 | imports: [DrawerModule, BrowserAnimationsModule, SharedCompDocsModule, MatToolbarModule], 25 | exports: [DrawerLayoutDocComponent], 26 | }) 27 | export class DrawerLayoutDocModule {} 28 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/shared/knobs/knob-select.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; 2 | import { FormControl, Validators } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-select-knob', 6 | template: ` 7 | 8 | {{ label }}: string 9 | {{ hint }} 10 | 11 | 12 | 13 | (Empty) 14 | 15 | 16 | {{ option }} 17 | 18 | 19 | 20 | 21 | `, 22 | }) 23 | export class KnobSelectComponent { 24 | @Input() options: string[]; 25 | @Input() isRequired: boolean; 26 | @Input() value; 27 | @Input() hint; 28 | @Input() label; 29 | @Output() valueChange = new EventEmitter(); 30 | control: FormControl; 31 | 32 | ngOnInit(): void { 33 | this.control = new FormControl(this.value, this.isRequired ? [Validators.required] : []); 34 | this.control.markAsTouched(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/lib/core/toolbar-menu/toolbar-menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ViewChild, ViewEncapsulation } from '@angular/core'; 2 | import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu'; 3 | 4 | /** 5 | * [ToolbarMenu Component]() 6 | * 7 | * The `` component is used to display a menu within a toolbar. 8 | */ 9 | @Component({ 10 | selector: 'blui-toolbar-menu', 11 | encapsulation: ViewEncapsulation.None, 12 | template: ` 13 |
14 | 15 |
16 |
17 |
{{ label }}
18 | arrow_drop_down 21 |
22 | 23 | 24 | 25 | `, 26 | styleUrls: ['./toolbar-menu.component.scss'], 27 | host: { 28 | class: 'blui-toolbar-menu', 29 | }, 30 | }) 31 | export class ToolbarMenuComponent { 32 | /** The text to display for label */ 33 | @Input() label: string; 34 | @ViewChild('menuTrigger') menuTrigger: MatMenuTrigger; 35 | } 36 | -------------------------------------------------------------------------------- /src/lib/core/utility/spacer.module.ts: -------------------------------------------------------------------------------- 1 | import { Component, HostBinding, Input, NgModule, OnChanges, OnInit } from '@angular/core'; 2 | 3 | /** 4 | * [Spacer Component](https://brightlayer-ui-components.github.io/angular/?path=/info/components-spacer--readme) 5 | * 6 | * An invisible utility component that acts as a spacer element in various layouts. 7 | * It works with flexbox sizing or fixed sizing. 8 | */ 9 | @Component({ 10 | selector: 'blui-spacer', 11 | template: ` `, 12 | }) 13 | export class SpacerComponent implements OnChanges, OnInit { 14 | /** Flex grow/shrink value for use in flex layouts 15 | * 16 | * @default 1 17 | * */ 18 | @Input() flex = 1; 19 | /** Height (in px) for static layouts */ 20 | @HostBinding('style.height.px') @Input() height: number; 21 | /** Width (in px) for static layouts */ 22 | @HostBinding('style.width.px') @Input() width: number; 23 | @HostBinding('style.flex') grow: string; 24 | @HostBinding('style.display') display = 'flex'; 25 | 26 | ngOnInit(): void { 27 | this.calcGrow(); 28 | } 29 | 30 | ngOnChanges(): void { 31 | this.calcGrow(); 32 | } 33 | 34 | calcGrow(): void { 35 | this.grow = undefined; 36 | if (!this.height && !this.width) { 37 | this.grow = `${this.flex} ${this.flex} ${this.flex === 0 ? 'auto' : '0px'}`; 38 | } 39 | } 40 | } 41 | 42 | @NgModule({ 43 | declarations: [SpacerComponent], 44 | exports: [SpacerComponent], 45 | }) 46 | export class SpacerModule {} 47 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/info-list-item/info-list-item-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ChannelValueModule, InfoListItemModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { BasicExampleComponent } from './examples/basic.component'; 5 | import { MatIconModule } from '@angular/material/icon'; 6 | import { InfoListItemDocComponent } from './info-list-item-doc.component'; 7 | import { WithSubtitleComponent } from './examples/with-subtitle.component'; 8 | import { WithIconComponent } from './examples/with-icon.component'; 9 | import { WithStatusComponent } from './examples/with-status.component'; 10 | import { WithinListComponent } from './examples/within-list.component'; 11 | import { PlaygroundComponent } from './examples/playground.component'; 12 | import { DenseComponent } from './examples/dense.component'; 13 | import { WithLeftRightContentComponent } from './examples/with-left-right-content.component'; 14 | 15 | @NgModule({ 16 | declarations: [ 17 | InfoListItemDocComponent, 18 | BasicExampleComponent, 19 | WithSubtitleComponent, 20 | WithIconComponent, 21 | WithStatusComponent, 22 | WithLeftRightContentComponent, 23 | WithinListComponent, 24 | PlaygroundComponent, 25 | DenseComponent, 26 | ], 27 | imports: [InfoListItemModule, ChannelValueModule, SharedCompDocsModule, MatIconModule], 28 | exports: [InfoListItemDocComponent], 29 | }) 30 | export class InfoListItemDocModule {} 31 | -------------------------------------------------------------------------------- /src/lib/core/app-bar/app-bar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { AppBarModule } from './app-bar.module'; 3 | import { count } from '../../utils/test-utils'; 4 | import { Component } from '@angular/core'; 5 | 6 | @Component({ 7 | template: ` 8 | 9 |
title
10 |
11 | `, 12 | }) 13 | class TestBasicUsage {} 14 | 15 | describe('AppBarComponent', () => { 16 | let component: TestBasicUsage; 17 | let fixture: ComponentFixture; 18 | 19 | beforeEach(() => { 20 | void TestBed.configureTestingModule({ 21 | declarations: [TestBasicUsage], 22 | imports: [AppBarModule], 23 | }).compileComponents(); 24 | fixture = TestBed.createComponent(TestBasicUsage); 25 | component = fixture.componentInstance; 26 | }); 27 | 28 | it('should create', () => { 29 | fixture.detectChanges(); 30 | void expect(component).toBeTruthy(); 31 | }); 32 | 33 | it('should enforce class naming conventions', () => { 34 | fixture.detectChanges(); 35 | const classList = [ 36 | '.blui-app-bar', 37 | '.mat-elevation-z4', 38 | '.blui-app-bar-content', 39 | '.blui-app-bar-background', 40 | '.blui-app-bar-collapsed', 41 | '.blui-app-bar-body-wrapper', 42 | ]; 43 | for (const className of classList) { 44 | count(fixture, className); 45 | } 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-body/drawer-body-doc.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { MarkdownSplitService } from '../../../../../services/markdown-split/markdown-split.service'; 3 | import { MarkdownService } from 'ngx-markdown'; 4 | 5 | @Component({ 6 | selector: 'app-drawer-body-doc', 7 | template: ` 8 | 9 |
10 | 11 |
12 |
13 | 14 |
15 |
16 | 17 |
18 |
19 | `, 20 | styleUrls: ['./drawer-body-doc.component.scss'], 21 | }) 22 | export class DrawerBodyDocComponent { 23 | md: string; 24 | 25 | constructor( 26 | private readonly _splitService: MarkdownSplitService, 27 | private readonly _markdownService: MarkdownService 28 | ) {} 29 | 30 | ngOnInit(): void { 31 | this._markdownService.getSource(`src/assets/md/Drawer.md`).subscribe((data) => { 32 | const delimiterTop = '## Drawer Body'; 33 | const delimiterBottom = '## Drawer Nav Group'; 34 | const subsection = this._splitService.subsection(data, delimiterTop, delimiterBottom); 35 | this.md = subsection.replace('images/', 'src/assets/md/images/'); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/score-card/score-card-doc.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { HeroModule, InfoListItemModule, ScoreCardModule } from 'src/lib/core'; 3 | import { SharedCompDocsModule } from '../../shared/shared-comp-docs.module'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { RouterModule } from '@angular/router'; 6 | import { BasicComponent } from './examples/basic.component'; 7 | import { ScoreCardDocComponent } from './score-card-doc.component'; 8 | import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; 9 | import { MultiLineComponent } from './examples/multi-line.component'; 10 | import { WithActionsComponent } from './examples/with-actions.component'; 11 | import { WithHeroesComponent } from './examples/with-heroes.component'; 12 | import { WithScoreBadgeComponent } from './examples/with-score-badge.component'; 13 | import { PlaygroundComponent } from './examples/playground.component'; 14 | 15 | @NgModule({ 16 | declarations: [ 17 | ScoreCardDocComponent, 18 | WithScoreBadgeComponent, 19 | BasicComponent, 20 | WithHeroesComponent, 21 | MultiLineComponent, 22 | WithActionsComponent, 23 | PlaygroundComponent, 24 | ], 25 | imports: [ 26 | ScoreCardModule, 27 | HeroModule, 28 | InfoListItemModule, 29 | MatListModule, 30 | SharedCompDocsModule, 31 | MatIconModule, 32 | RouterModule, 33 | ], 34 | exports: [ScoreCardDocComponent], 35 | }) 36 | export class ScoreCardDocModule {} 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020 - present, Eaton 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /src/lib/core/three-liner/three-liner.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { count } from '../../utils/test-utils'; 3 | import { Component } from '@angular/core'; 4 | import { ThreeLinerModule } from './three-liner.module'; 5 | 6 | @Component({ 7 | template: ` 8 | 9 |
title
10 |
title
11 |
title
12 |
13 | `, 14 | }) 15 | class TestBasicUsage {} 16 | 17 | describe('ThreeLinerComponent', () => { 18 | let component: TestBasicUsage; 19 | let fixture: ComponentFixture; 20 | 21 | beforeEach(() => { 22 | void TestBed.configureTestingModule({ 23 | declarations: [TestBasicUsage], 24 | imports: [ThreeLinerModule], 25 | }).compileComponents(); 26 | fixture = TestBed.createComponent(TestBasicUsage); 27 | component = fixture.componentInstance; 28 | }); 29 | 30 | it('should create', () => { 31 | fixture.detectChanges(); 32 | void expect(component).toBeTruthy(); 33 | }); 34 | 35 | it('should enforce class naming conventions', () => { 36 | fixture.detectChanges(); 37 | const classList = [ 38 | '.blui-three-liner-content', 39 | '.blui-three-liner-title', 40 | '.blui-three-liner-subtitle', 41 | '.blui-three-liner-info', 42 | ]; 43 | for (const className of classList) { 44 | count(fixture, className); 45 | } 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/drawer/drawer-nav-item/examples/with-selected-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const WITH_SELECTED_ITEM = ` 4 | 5 | 6 | 12 | 13 | 19 | 20 | 25 | 26 | 27 | 28 | `; 29 | 30 | @Component({ 31 | selector: 'app-nav-item-with-selected-item-demo', 32 | template: WITH_SELECTED_ITEM, 33 | }) 34 | export class WithSelectedItemComponent { 35 | selectedId = 2; 36 | 37 | selectItem(id: number): void { 38 | this.selectedId = id; 39 | } 40 | 41 | isSelected(id: number): boolean { 42 | return this.selectedId === id; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/docs/pages/component-docs/components/mobile-stepper/examples/dots.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | export const DOTS = ` 4 | 7 | 8 | 9 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | `; 32 | 33 | @Component({ 34 | selector: 'app-dots-mobile-stepper-demo', 35 | template: DOTS, 36 | }) 37 | export class DotsComponent { 38 | activeStep = 0; 39 | } 40 | --------------------------------------------------------------------------------