@gardev/components 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/gardev-components.mjs +575 -0
- package/fesm2022/gardev-components.mjs.map +1 -0
- package/package.json +25 -12
- package/types/gardev-components.d.ts +139 -0
- package/ng-package.json +0 -7
- package/src/lib/components/bottle/bottle.component.css +0 -4
- package/src/lib/components/bottle/bottle.component.html +0 -1
- package/src/lib/components/bottle/bottle.component.spec.ts +0 -23
- package/src/lib/components/bottle/bottle.component.ts +0 -164
- package/src/lib/components/caroussel/caroussel-menu/caroussel-menu.component.css +0 -23
- package/src/lib/components/caroussel/caroussel-menu/caroussel-menu.component.html +0 -5
- package/src/lib/components/caroussel/caroussel-menu/caroussel-menu.component.ts +0 -63
- package/src/lib/components/caroussel/caroussel-menu/caroussel-menu.spec.ts +0 -23
- package/src/lib/components/caroussel/caroussel.component.css +0 -11
- package/src/lib/components/caroussel/caroussel.component.html +0 -8
- package/src/lib/components/caroussel/caroussel.component.ts +0 -24
- package/src/lib/components/cronogram/cronogram.component.css +0 -58
- package/src/lib/components/cronogram/cronogram.component.html +0 -47
- package/src/lib/components/cronogram/cronogram.component.spec.ts +0 -23
- package/src/lib/components/cronogram/cronogram.component.ts +0 -99
- package/src/lib/components/stack-caroussel/stack-caroussel.css +0 -25
- package/src/lib/components/stack-caroussel/stack-caroussel.html +0 -4
- package/src/lib/components/stack-caroussel/stack-caroussel.spec.ts +0 -23
- package/src/lib/components/stack-caroussel/stack-caroussel.ts +0 -50
- package/src/lib/layouts/menu/menu.component.css +0 -50
- package/src/lib/layouts/menu/menu.component.html +0 -21
- package/src/lib/layouts/menu/menu.component.ts +0 -98
- package/src/lib/layouts/menu/menu.spec.ts +0 -23
- package/src/lib/layouts/navbar/navbar.component.css +0 -34
- package/src/lib/layouts/navbar/navbar.component.html +0 -10
- package/src/lib/layouts/navbar/navbar.component.spec.ts +0 -23
- package/src/lib/layouts/navbar/navbar.component.ts +0 -46
- package/src/lib/layouts/page-layout/page-layout.component.css +0 -13
- package/src/lib/layouts/page-layout/page-layout.component.html +0 -32
- package/src/lib/layouts/page-layout/page-layout.component.spec.ts +0 -23
- package/src/lib/layouts/page-layout/page-layout.component.ts +0 -13
- package/src/lib/layouts/scroll-reactive-section/scroll-reactive-section.component.css +0 -0
- package/src/lib/layouts/scroll-reactive-section/scroll-reactive-section.component.html +0 -10
- package/src/lib/layouts/scroll-reactive-section/scroll-reactive-section.component.spec.ts +0 -23
- package/src/lib/layouts/scroll-reactive-section/scroll-reactive-section.component.ts +0 -40
- package/src/lib/layouts/section/section.component.css +0 -0
- package/src/lib/layouts/section/section.component.html +0 -10
- package/src/lib/layouts/section/section.component.spec.ts +0 -23
- package/src/lib/layouts/section/section.component.ts +0 -12
- package/src/lib/theme.service.ts +0 -22
- package/src/public-api.ts +0 -14
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<header class="page-header" [ngStyle]="{
|
|
2
|
-
'background': headerBackground
|
|
3
|
-
? `linear-gradient(color-mix(in srgb, var(--color-bg) 40%, transparent), color-mix(in srgb, var(--color-bg) 40%, transparent)),
|
|
4
|
-
url('${headerBackground}') center/cover no-repeat`
|
|
5
|
-
: 'none'
|
|
6
|
-
}" style="position: relative">
|
|
7
|
-
<div class="layout_max-width">
|
|
8
|
-
<h1>
|
|
9
|
-
{{title}}
|
|
10
|
-
</h1>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="custom-shape-divider-top-1770151990" style="position: absolute; bottom: 0; height: 25px; width: 100%">
|
|
13
|
-
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"
|
|
14
|
-
style="height: 40px; width: 100%">
|
|
15
|
-
<path
|
|
16
|
-
d="M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z"
|
|
17
|
-
style="fill: var(--color-bg)"></path>
|
|
18
|
-
</svg>
|
|
19
|
-
</div>
|
|
20
|
-
</header>
|
|
21
|
-
|
|
22
|
-
<main class="page-main">
|
|
23
|
-
<div class="layout_max-width">
|
|
24
|
-
<ng-content></ng-content>
|
|
25
|
-
</div>
|
|
26
|
-
</main>
|
|
27
|
-
|
|
28
|
-
<section class="page-sections">
|
|
29
|
-
<div class="layout_max-width">
|
|
30
|
-
<ng-content select="[sections]"></ng-content>
|
|
31
|
-
</div>
|
|
32
|
-
</section>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { PageLayoutComponent } from './page-layout.component';
|
|
4
|
-
|
|
5
|
-
describe('PageLayoutComponent', () => {
|
|
6
|
-
let component: PageLayoutComponent;
|
|
7
|
-
let fixture: ComponentFixture<PageLayoutComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [PageLayoutComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(PageLayoutComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
await fixture.whenStable();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NgStyle } from '@angular/common';
|
|
2
|
-
import { Component, Input, } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'ard-page-layout',
|
|
6
|
-
templateUrl: './page-layout.component.html',
|
|
7
|
-
styleUrls: ['./page-layout.component.css'],
|
|
8
|
-
imports: [NgStyle,]
|
|
9
|
-
})
|
|
10
|
-
export class PageLayoutComponent {
|
|
11
|
-
@Input() headerBackground?: string = '';
|
|
12
|
-
@Input() title?: string = 'Lorem ipsum'
|
|
13
|
-
}
|
|
File without changes
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<div style="position: sticky; top:0; height: 0; z-index: 0;">
|
|
2
|
-
<div #content
|
|
3
|
-
style="background: gray; display: flex; justify-content: center; align-items: center;overflow: hidden;">
|
|
4
|
-
<ng-content></ng-content>
|
|
5
|
-
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
<div style="position: relative; height: 100vh; pointer-events: none;" #container>
|
|
9
|
-
|
|
10
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ScrollReactiveSectionComponent } from './scroll-reactive-section.component';
|
|
4
|
-
|
|
5
|
-
describe('ScrollReactiveSectionComponent', () => {
|
|
6
|
-
let component: ScrollReactiveSectionComponent;
|
|
7
|
-
let fixture: ComponentFixture<ScrollReactiveSectionComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [ScrollReactiveSectionComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ScrollReactiveSectionComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
await fixture.whenStable();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
ElementRef,
|
|
4
|
-
ViewChild,
|
|
5
|
-
AfterViewInit,
|
|
6
|
-
HostListener
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'ard-scroll-reactive-section',
|
|
11
|
-
standalone: true,
|
|
12
|
-
templateUrl: './scroll-reactive-section.component.html',
|
|
13
|
-
})
|
|
14
|
-
export class ScrollReactiveSectionComponent implements AfterViewInit {
|
|
15
|
-
@ViewChild('container') container!: ElementRef<HTMLElement>;
|
|
16
|
-
@ViewChild('content') content!: ElementRef<HTMLElement>;
|
|
17
|
-
|
|
18
|
-
ngAfterViewInit() {
|
|
19
|
-
this.update();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@HostListener('window:scroll')
|
|
23
|
-
@HostListener('window:resize')
|
|
24
|
-
update() {
|
|
25
|
-
const containerEl = this.container.nativeElement;
|
|
26
|
-
const contentEl = this.content.nativeElement;
|
|
27
|
-
|
|
28
|
-
const rect = containerEl.getBoundingClientRect();
|
|
29
|
-
const viewportHeight = window.innerHeight;
|
|
30
|
-
|
|
31
|
-
const visibleTop = Math.max(rect.top, 0);
|
|
32
|
-
const visibleBottom = Math.min(rect.bottom, viewportHeight);
|
|
33
|
-
const visibleHeight = Math.max(0, visibleBottom - visibleTop);
|
|
34
|
-
|
|
35
|
-
const maxHeight = containerEl.offsetHeight;
|
|
36
|
-
const height = Math.min(visibleHeight, maxHeight);
|
|
37
|
-
|
|
38
|
-
contentEl.style.height = `${height}px`;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
File without changes
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<section class="layout_max-width">
|
|
2
|
-
<h2>Secció</h2>
|
|
3
|
-
<div style="display: flex;">
|
|
4
|
-
<!-- <app-bottle [color]="'#5b8940'"></app-bottle> -->
|
|
5
|
-
<!-- <app-bottle [color]="'#b4862a'"></app-bottle>
|
|
6
|
-
<app-bottle [color]="'#121e10'"></app-bottle>
|
|
7
|
-
<app-bottle [wineColor]="'#ffffff'"></app-bottle> -->
|
|
8
|
-
<!-- <app-bottle [color]="'#868132'" [wineColor]="'#e2d744'"></app-bottle> -->
|
|
9
|
-
</div>
|
|
10
|
-
</section>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SectionComponent } from './section.component';
|
|
4
|
-
|
|
5
|
-
describe('Section', () => {
|
|
6
|
-
let component: SectionComponent;
|
|
7
|
-
let fixture: ComponentFixture<SectionComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [SectionComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SectionComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
await fixture.whenStable();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
package/src/lib/theme.service.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Injectable } from "@angular/core";
|
|
2
|
-
|
|
3
|
-
@Injectable({ providedIn: 'root' })
|
|
4
|
-
export class ThemeService {
|
|
5
|
-
|
|
6
|
-
ngOnInit() {
|
|
7
|
-
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
8
|
-
document.body.classList.toggle('dark', prefersDark);
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
toggle() {
|
|
12
|
-
document.body.classList.toggle('dark');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
setDark() {
|
|
16
|
-
document.body.classList.add('dark');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
setLight() {
|
|
20
|
-
document.body.classList.remove('dark');
|
|
21
|
-
}
|
|
22
|
-
}
|
package/src/public-api.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of @ardev/components
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export * from './lib/components/bottle/bottle.component';
|
|
6
|
-
export * from './lib/components/caroussel/caroussel.component';
|
|
7
|
-
export * from './lib/components/cronogram/cronogram.component';
|
|
8
|
-
export * from './lib/layouts/menu/menu.component';
|
|
9
|
-
export * from './lib/layouts/navbar/navbar.component';
|
|
10
|
-
export * from './lib/layouts/page-layout/page-layout.component';
|
|
11
|
-
export * from './lib/layouts/scroll-reactive-section/scroll-reactive-section.component'; // probablement esborrar
|
|
12
|
-
export * from './lib/layouts/section/section.component';
|
|
13
|
-
export * from './lib/components/stack-caroussel/stack-caroussel'
|
|
14
|
-
export * from './lib/theme.service'
|
package/tsconfig.lib.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"extends": "../../../tsconfig.json",
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"outDir": "../../../../out-tsc/lib",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"types": []
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"src/**/*.ts"
|
|
13
|
-
],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"**/*.spec.ts"
|
|
16
|
-
]
|
|
17
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"extends": "./tsconfig.lib.json",
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"declarationMap": false
|
|
7
|
-
},
|
|
8
|
-
"angularCompilerOptions": {
|
|
9
|
-
"compilationMode": "partial"
|
|
10
|
-
}
|
|
11
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"extends": "../../tsconfig.json",
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"outDir": "../../out-tsc/spec",
|
|
7
|
-
"types": [
|
|
8
|
-
"vitest/globals"
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"src/**/*.d.ts",
|
|
13
|
-
"src/**/*.spec.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|