-
Notifications
You must be signed in to change notification settings - Fork 31
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
32 changed files
with
282 additions
and
84 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
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 |
---|---|---|
|
@@ -5,7 +5,5 @@ | |
"lib": { | ||
"entryFile": "src/public_api.ts" | ||
}, | ||
"assets": [ | ||
"assets/**/*.json" | ||
] | ||
"assets": ["assets/**/*.json"] | ||
} |
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 |
---|---|---|
|
@@ -4,7 +4,5 @@ | |
"lib": { | ||
"entryFile": "src/public_api.ts" | ||
}, | ||
"assets": [ | ||
"assets/**/*.json" | ||
] | ||
"assets": ["assets/**/*.json"] | ||
} |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{ | ||
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", | ||
"schematics": { | ||
"ng-add": { | ||
"description": "Add my Design Angular Kit to the project.", | ||
"factory": "./ng-add/index", | ||
"schema": "./ng-add/schema.json", | ||
"hidden": true, | ||
"aliases": ["install"] | ||
}, | ||
"ng-add-setup-project": { | ||
"description": "Sets up the specified project after the ng-add dependencies have been installed", | ||
"factory": "./ng-add/setup-project", | ||
"schema": "./ng-add/schema.json", | ||
"hidden": true, | ||
"private": true | ||
} | ||
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", | ||
"schematics": { | ||
"ng-add": { | ||
"description": "Add my Design Angular Kit to the project.", | ||
"factory": "./ng-add/index", | ||
"schema": "./ng-add/schema.json", | ||
"hidden": true, | ||
"aliases": ["install"] | ||
}, | ||
"ng-add-setup-project": { | ||
"description": "Sets up the specified project after the ng-add dependencies have been installed", | ||
"factory": "./ng-add/setup-project", | ||
"schema": "./ng-add/schema.json", | ||
"hidden": true, | ||
"private": true | ||
} | ||
} | ||
} | ||
} |
30 changes: 15 additions & 15 deletions
30
projects/design-angular-kit/schematics/ng-add/schema.json
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema", | ||
"$id": "design-angular-kit-ng-add", | ||
"title": "Design Angular Hit ng-add schematic", | ||
"type": "object", | ||
"properties": { | ||
"project": { | ||
"type": "string", | ||
"description": "Name of the project.", | ||
"$default": { | ||
"$source": "projectName" | ||
} | ||
} | ||
}, | ||
"required": [] | ||
} | ||
"$schema": "http://json-schema.org/schema", | ||
"$id": "design-angular-kit-ng-add", | ||
"title": "Design Angular Hit ng-add schematic", | ||
"type": "object", | ||
"properties": { | ||
"project": { | ||
"type": "string", | ||
"description": "Name of the project.", | ||
"$default": { | ||
"$source": "projectName" | ||
} | ||
} | ||
}, | ||
"required": [] | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ects/design-angular-kit/src/lib/components/core/carousel/carousel/carousel.component.scss
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 |
---|---|---|
@@ -1 +1 @@ | ||
@import "@splidejs/splide/dist/css/splide.min"; // Splide | ||
@import '@splidejs/splide/dist/css/splide.min'; // Splide |
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
12 changes: 10 additions & 2 deletions
12
projects/design-angular-kit/src/lib/components/form/range/range.component.scss
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 |
---|---|---|
@@ -1,9 +1,17 @@ | ||
.form-range.double-color { | ||
&::-webkit-slider-runnable-track { | ||
background: linear-gradient(to right, var(--range-left-color) var(--range-percentage), var(--range-right-color) var(--range-percentage)); | ||
background: linear-gradient( | ||
to right, | ||
var(--range-left-color) var(--range-percentage), | ||
var(--range-right-color) var(--range-percentage) | ||
); | ||
} | ||
|
||
&::-moz-range-track { | ||
background: linear-gradient(to right, var(--range-left-color) var(--range-percentage), var(--range-right-color) var(--range-percentage)); | ||
background: linear-gradient( | ||
to right, | ||
var(--range-left-color) var(--range-percentage), | ||
var(--range-right-color) var(--range-percentage) | ||
); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...lar-kit/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.html
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 @@ | ||
@if (inNav) { | ||
<li class="visually-hidden-focusable"> | ||
<it-link [href]="href" [externalLink]="externalLink"> | ||
<ng-container *ngTemplateOutlet="linkContent"></ng-container> | ||
</it-link> | ||
</li> | ||
} @else { | ||
<it-link class="visually-hidden-focusable" [href]="href" [externalLink]="externalLink"> | ||
<ng-container *ngTemplateOutlet="linkContent"></ng-container> | ||
</it-link> | ||
} | ||
|
||
<ng-template #linkContent> | ||
<ng-content></ng-content> | ||
</ng-template> |
37 changes: 37 additions & 0 deletions
37
...gular-kit/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.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,37 @@ | ||
import { ChangeDetectionStrategy, Component, Host, Input } from '@angular/core'; | ||
import { NgTemplateOutlet } from '@angular/common'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { inputToBoolean } from '../../../../utils/coercion'; | ||
import { ItLinkComponent, ItSkiplinkComponent } from 'projects/design-angular-kit/src/public_api'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'it-skiplink-item', | ||
templateUrl: './skiplink-item.component.html', | ||
exportAs: 'itSkipLinkItem', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
imports: [NgTemplateOutlet, TranslateModule, ItLinkComponent], | ||
}) | ||
export class ItSkiplinkItemComponent { | ||
/** | ||
* The router link action | ||
* | ||
* Commands to pass to Router#createUrlTree. | ||
* - array: commands to pass to Router#createUrlTree. | ||
* - string: shorthand for array of commands with just the string, i.e. ['/route'] | ||
* - null|undefined: Disables the link by removing the href | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@Input() href: any[] | string | null | undefined; | ||
|
||
/** | ||
* Is an external link (false to not use Angular router link) | ||
* @default false | ||
*/ | ||
@Input({ transform: inputToBoolean }) externalLink?: boolean; | ||
inNav: boolean; | ||
|
||
constructor(@Host() parent: ItSkiplinkComponent) { | ||
this.inNav = parent.nav ? true : false; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
projects/design-angular-kit/src/lib/components/navigation/skiplink/skiplink.module.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,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { ItSkiplinkComponent } from './skiplink/skiplink.component'; | ||
import { ItSkiplinkItemComponent } from './skiplink-item/skiplink-item.component'; | ||
|
||
const skiplinkComponents = [ItSkiplinkComponent, ItSkiplinkItemComponent]; | ||
|
||
@NgModule({ | ||
imports: skiplinkComponents, | ||
exports: skiplinkComponents, | ||
}) | ||
export class ItSkiplinkModule {} |
15 changes: 15 additions & 0 deletions
15
...esign-angular-kit/src/lib/components/navigation/skiplink/skiplink/skiplink.component.html
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 @@ | ||
@if (nav) { | ||
<nav class="skiplinks"> | ||
<ul> | ||
<ng-container *ngTemplateOutlet="linkContent"></ng-container> | ||
</ul> | ||
</nav> | ||
} @else { | ||
<div class="skiplinks"> | ||
<ng-container *ngTemplateOutlet="linkContent"></ng-container> | ||
</div> | ||
} | ||
|
||
<ng-template #linkContent> | ||
<ng-content></ng-content> | ||
</ng-template> |
27 changes: 27 additions & 0 deletions
27
.../design-angular-kit/src/lib/components/navigation/skiplink/skiplink/skiplink.component.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,27 @@ | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; | ||
import { NgTemplateOutlet } from '@angular/common'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { inputToBoolean } from '../../../../utils/coercion'; | ||
import { ItLinkComponent } from 'projects/design-angular-kit/src/public_api'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'it-skiplink', | ||
templateUrl: './skiplink.component.html', | ||
exportAs: 'itSkipLink', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
imports: [NgTemplateOutlet, TranslateModule, ItLinkComponent], | ||
}) | ||
export class ItSkiplinkComponent { | ||
/** | ||
* Aria label for `nav` mode | ||
* @default 'Scorciatoie di navigazione' | ||
*/ | ||
@Input() ariaLabel: string = 'Scorciatoie di navigazione'; | ||
|
||
/** | ||
* If `true` nav mode is enabled | ||
* @default false | ||
*/ | ||
@Input({ transform: inputToBoolean }) nav?: boolean; | ||
} |
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
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
"angularCompilerOptions": { | ||
"compilationMode": "partial" | ||
} | ||
} | ||
} |
Oops, something went wrong.