-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
409 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ on: | |
- message-box | ||
- numeric-stepper | ||
- overlay | ||
- sidenav | ||
- snackbar | ||
- splitter | ||
- status | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test sidenav | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
paths: | ||
- '.github/workflows/ci_test_sidenav.yml' | ||
- 'projects/sidenav/**' | ||
|
||
concurrency: | ||
group: ci-test-sidenav-group-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci_test_sidenav: | ||
if: "${{ !contains(github.event.head_commit.message, 'chore(release): publish') }}" | ||
uses: dsi-hug/action/.github/workflows/action.yml@v1 | ||
with: | ||
working-directory: projects/sidenav | ||
runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]' | ||
node-versions: '[18, 20]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@hug/sidenav | ||
======= | ||
|
||
The sources for this package are in the main [DSI-HUG/ngx-components](https://github.com/dsi-hug/ngx-components) repo. Please file issues and pull requests against that repo. | ||
|
||
License: GPL-3.0-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = config => { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage'), | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
client: { | ||
jasmine: { | ||
// you can add configuration options for Jasmine here | ||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html | ||
// for example, you can disable the random execution with `random: false` | ||
// or set a specific seed with `seed: 4321` | ||
}, | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
jasmineHtmlReporter: { | ||
suppressAll: true // removes the duplicated traces | ||
}, | ||
coverageReporter: { | ||
dir: require('path').join(__dirname, '../../coverage/sidenav'), | ||
subdir: '.', | ||
reporters: [ | ||
{ type: 'html' }, | ||
{ type: 'text-summary' } | ||
] | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false, | ||
failOnEmptyTestSuite: false, | ||
restartOnFileChange: true | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json", | ||
"dest": "../../dist/sidenav", | ||
"assets": [ | ||
"CHANGELOG.md", | ||
{ | ||
"input": "src/", | ||
"glob": "_sidenav-theme.scss", | ||
"output": "." | ||
} | ||
], | ||
"lib": { | ||
"entryFile": "src/index.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "@hug/ngx-sidenav", | ||
"version": "1.0.0", | ||
"description": "HUG Angular - sidenav component", | ||
"homepage": "https://github.com/dsi-hug/ngx-components", | ||
"license": "GPL-3.0-only", | ||
"author": "HUG - Hôpitaux Universitaires Genève", | ||
"contributors": [ | ||
"badisi (https://github.com/badisi)", | ||
"vapkse (https://github.com/vapkse)" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/dsi-hug/ngx-components.git" | ||
}, | ||
"keywords": [ | ||
"angular", | ||
"material", | ||
"material design", | ||
"components" | ||
], | ||
"sideEffects": false, | ||
"scripts": { | ||
"lint": "eslint . --fix", | ||
"test": "ng test sidenav", | ||
"test:ci": "ng test sidenav --watch=false --browsers=ChromeHeadless", | ||
"build:ng": "ng build sidenav -c=production", | ||
"build": "nx build:ng @hug/ngx-sidenav --verbose", | ||
"release": "nx release -p=@hug/ngx-sidenav --yes --verbose", | ||
"release:dry-run": "nx release -p=@hug/ngx-sidenav --verbose --dry-run" | ||
}, | ||
"peerDependencies": { | ||
"@angular/common": ">= 14", | ||
"@angular/core": ">= 14", | ||
"rxjs": ">= 7.0.0", | ||
"@hug/ngx-core": "1.1.5" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.6.3" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
@use '@angular/material' as mat; | ||
|
||
@mixin sidenav-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
|
||
.mat-drawer-container { | ||
&.sidenav-light { | ||
.mat-sidenav { | ||
.header { | ||
background: mat.get-color-from-palette($primary); | ||
|
||
.header-menu-btn [fontIcon] { | ||
color: mat.get-color-from-palette($primary, default-contrast); | ||
} | ||
} | ||
} | ||
} | ||
|
||
.mat-sidenav { | ||
.header { | ||
border-bottom: 1px solid mat.get-color-from-palette($foreground, divider); | ||
background: mat.get-color-from-palette($background, background); | ||
} | ||
|
||
.sidenav-menu { | ||
border-right: 1px solid mat.get-color-from-palette($foreground, divider); | ||
|
||
.mat-list-item { | ||
&.active { | ||
|
||
.mat-list-icon, | ||
.mat-list-text { | ||
color: mat.get-color-from-palette($primary) !important; | ||
} | ||
|
||
.mat-icon { | ||
font-variation-settings: "FILL" 1; | ||
} | ||
} | ||
|
||
.mat-list-item-content { | ||
.mat-list-icon { | ||
color: mat.get-color-from-palette($foreground, icons) | ||
} | ||
|
||
.mat-list-text { | ||
color: mat.get-color-from-palette($foreground, text) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './sidenav.service'; |
Oops, something went wrong.