diff --git a/src/app/shared/abstractClasses/abstract-form.ts b/src/app/shared/abstractClasses/abstract-form.ts
index 31fcaf0..88feecf 100644
--- a/src/app/shared/abstractClasses/abstract-form.ts
+++ b/src/app/shared/abstractClasses/abstract-form.ts
@@ -36,7 +36,7 @@ export abstract class AbstractForm<
return payload;
}
- ngAfterViewInit() {
+ ngOnInit() {
this.form.reset(this.initialValues ?? this.defaultValues);
// Object.entries(this.form.controls).forEach(([key, control]) => {
// console.log(key, control);
diff --git a/src/app/shared/components/dialog/light-bottomsheet.component.html b/src/app/shared/components/dialog/light-bottomsheet.component.html
new file mode 100644
index 0000000..a2e6fe7
--- /dev/null
+++ b/src/app/shared/components/dialog/light-bottomsheet.component.html
@@ -0,0 +1,25 @@
+
+
+
+
+ @if (header || closable) {
+
+ }
+
+
+
+
+
diff --git a/src/app/shared/components/dialog/light-bottomsheet.component.ts b/src/app/shared/components/dialog/light-bottomsheet.component.ts
new file mode 100644
index 0000000..715767d
--- /dev/null
+++ b/src/app/shared/components/dialog/light-bottomsheet.component.ts
@@ -0,0 +1,120 @@
+import { NgStyle } from '@angular/common';
+import { Component, EventEmitter, Input, Output } from '@angular/core';
+
+@Component({
+ selector: 'shared-light-bottomsheet',
+ templateUrl: './light-bottomsheet.component.html',
+ imports: [NgStyle],
+ styles: [
+ `
+ :host {
+ position: fixed;
+ inset: 0;
+ z-index: 11020;
+ }
+
+ .light-bottomsheet-mask {
+ position: absolute;
+ inset: 0;
+ background: rgba(15, 23, 42, 0.22);
+ will-change: opacity;
+ animation: sheetFadeIn var(--sheet-transition, 130ms cubic-bezier(0.2, 0, 0, 1));
+ }
+
+ .light-bottomsheet-panel {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ max-height: 80svh;
+ background: var(--surface-card, #fff);
+ border-radius: 12px 12px 0 0;
+ box-shadow: none;
+ transform: translate3d(0, 0, 0);
+ will-change: transform;
+ backface-visibility: hidden;
+ animation: sheetSlideUp var(--sheet-transition, 130ms cubic-bezier(0.2, 0, 0, 1));
+ overflow: hidden;
+ }
+
+ .light-bottomsheet-content {
+ max-height: 80svh;
+ overflow: auto;
+ padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
+ -webkit-overflow-scrolling: touch;
+ overscroll-behavior: contain;
+ }
+
+ .light-bottomsheet-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.75rem;
+ padding: 0.75rem 1rem;
+ }
+
+ .light-bottomsheet-title {
+ margin: 0;
+ font-size: 0.95rem;
+ font-weight: 600;
+ }
+
+ .light-bottomsheet-close {
+ border: 0;
+ background: transparent;
+ padding: 0.25rem;
+ line-height: 1;
+ font-size: 1.25rem;
+ }
+
+ @keyframes sheetSlideUp {
+ from {
+ transform: translate3d(0, 100%, 0);
+ }
+ to {
+ transform: translate3d(0, 0, 0);
+ }
+ }
+
+ @keyframes sheetFadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+ }
+ `,
+ ],
+ host: {
+ '[style.display]': 'visible ? "block" : "none"',
+ '[style.--sheet-transition]': 'transitionOptions',
+ },
+})
+export class SharedLightBottomsheetComponent {
+ @Input() header = '';
+ @Input() visible = false;
+ @Output() visibleChange = new EventEmitter
();
+
+ @Input() modal = true;
+ @Input() closable = true;
+ @Input() style: Record | undefined;
+ @Input() mobileDrawerHeight = '80svh';
+ @Input() transitionOptions = '130ms cubic-bezier(0.2, 0, 0, 1)';
+
+ @Output() onHide = new EventEmitter();
+
+ onVisibilityChange(nextValue: boolean) {
+ this.visible = nextValue;
+ this.visibleChange.emit(nextValue);
+ if (!nextValue) {
+ this.onHide.emit();
+ }
+ }
+
+ onMaskClick() {
+ if (this.modal && this.closable) {
+ this.onVisibilityChange(false);
+ }
+ }
+}