@wdcoders/ui-ng 1.0.0 → 1.0.1
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/wdcoders-ui-ng.mjs +1013 -79
- package/fesm2022/wdcoders-ui-ng.mjs.map +1 -1
- package/package.json +2 -2
- package/types/wdcoders-ui-ng.d.ts +320 -25
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component, output, TemplateRef, ChangeDetectionStrategy, signal, Input, model,
|
|
2
|
+
import { input, computed, Component, output, TemplateRef, ChangeDetectionStrategy, signal, Input, model, effect, contentChildren, Injectable, inject, forwardRef, viewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$1 from '@angular/forms';
|
|
6
|
+
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
7
|
|
|
6
8
|
class SpinnerComponent {
|
|
7
9
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
@@ -153,43 +155,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
153
155
|
|
|
154
156
|
class IconsComponent {
|
|
155
157
|
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
156
|
-
|
|
158
|
+
customClass = input('', ...(ngDevMode ? [{ debugName: "customClass" }] : []));
|
|
157
159
|
size = input('16', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
160
|
+
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
158
161
|
get sizeClass() {
|
|
159
|
-
|
|
160
|
-
case '10':
|
|
161
|
-
return 'icon-10';
|
|
162
|
-
case '12':
|
|
163
|
-
return 'icon-12';
|
|
164
|
-
case '14':
|
|
165
|
-
return 'icon-14';
|
|
166
|
-
case '16':
|
|
167
|
-
return 'icon-16';
|
|
168
|
-
case '18':
|
|
169
|
-
return 'icon-18';
|
|
170
|
-
case '20':
|
|
171
|
-
return 'icon-20';
|
|
172
|
-
case '22':
|
|
173
|
-
return 'icon-22';
|
|
174
|
-
case '24':
|
|
175
|
-
return 'icon-24';
|
|
176
|
-
case '40':
|
|
177
|
-
return 'icon-40';
|
|
178
|
-
case '48':
|
|
179
|
-
return 'icon-48';
|
|
180
|
-
case '56':
|
|
181
|
-
return 'icon-56';
|
|
182
|
-
default:
|
|
183
|
-
return 'w-8 h-8';
|
|
184
|
-
}
|
|
162
|
+
return `icon-${this.size()}`;
|
|
185
163
|
}
|
|
186
164
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: IconsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
187
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.5", type: IconsComponent, isStandalone: true, selector: "wdc-icons", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null },
|
|
165
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.5", type: IconsComponent, isStandalone: true, selector: "wdc-icons", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"flex\">\r\n <span [class]=\"`material-symbols-outlined ${customClass} ${sizeClass}`\" aria-hidden=\"true\">{{\r\n name()\r\n }}</span>\r\n</span>\r\n", styles: [".icon-10{font-size:10px;font-variation-settings:\"OPSZ\" 10}.icon-12{font-size:12px;font-variation-settings:\"OPSZ\" 12}.icon-14{font-size:14px;font-variation-settings:\"OPSZ\" 14}.icon-16{font-size:16px;font-variation-settings:\"OPSZ\" 16}.icon-18{font-size:18px;font-variation-settings:\"OPSZ\" 18}.icon-20{font-size:20px;font-variation-settings:\"OPSZ\" 20}.icon-22{font-size:22px;font-variation-settings:\"OPSZ\" 22}.icon-24{font-size:24px;font-variation-settings:\"OPSZ\" 24}.icon-40{font-size:40px;font-variation-settings:\"OPSZ\" 40}.icon-48{font-size:48px;font-variation-settings:\"OPSZ\" 48}.icon-56{font-size:56px;font-variation-settings:\"OPSZ\" 56}\n"] });
|
|
188
166
|
}
|
|
189
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: IconsComponent, decorators: [{
|
|
190
168
|
type: Component,
|
|
191
|
-
args: [{ selector: 'wdc-icons', imports: [], template: "<span class=\"flex\">\r\n <span [class]=\"`material-symbols-outlined ${
|
|
192
|
-
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }],
|
|
169
|
+
args: [{ selector: 'wdc-icons', imports: [], template: "<span class=\"flex\">\r\n <span [class]=\"`material-symbols-outlined ${customClass} ${sizeClass}`\" aria-hidden=\"true\">{{\r\n name()\r\n }}</span>\r\n</span>\r\n", styles: [".icon-10{font-size:10px;font-variation-settings:\"OPSZ\" 10}.icon-12{font-size:12px;font-variation-settings:\"OPSZ\" 12}.icon-14{font-size:14px;font-variation-settings:\"OPSZ\" 14}.icon-16{font-size:16px;font-variation-settings:\"OPSZ\" 16}.icon-18{font-size:18px;font-variation-settings:\"OPSZ\" 18}.icon-20{font-size:20px;font-variation-settings:\"OPSZ\" 20}.icon-22{font-size:22px;font-variation-settings:\"OPSZ\" 22}.icon-24{font-size:24px;font-variation-settings:\"OPSZ\" 24}.icon-40{font-size:40px;font-variation-settings:\"OPSZ\" 40}.icon-48{font-size:48px;font-variation-settings:\"OPSZ\" 48}.icon-56{font-size:56px;font-variation-settings:\"OPSZ\" 56}\n"] }]
|
|
170
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
193
171
|
|
|
194
172
|
class CardComponent {
|
|
195
173
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
@@ -213,7 +191,7 @@ class StatCardComponent {
|
|
|
213
191
|
trendLabel = input('', ...(ngDevMode ? [{ debugName: "trendLabel" }] : []));
|
|
214
192
|
iconName = input('chart_data', ...(ngDevMode ? [{ debugName: "iconName" }] : []));
|
|
215
193
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: StatCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
216
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: StatCardComponent, isStandalone: true, selector: "wdc-stat-card", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, trend: { classPropertyName: "trend", publicName: "trend", isSignal: true, isRequired: false, transformFunction: null }, trendLabel: { classPropertyName: "trendLabel", publicName: "trendLabel", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block h-full" }, ngImport: i0, template: "<div\n class=\"bg-white p-6 rounded-xl shadow-sm border border-gray-100 flex items-start justify-between h-full\"\n>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex items-start justify-between\">\n <div>\n <p class=\"text-sm font-medium text-gray-500 mb-1\">{{ label() }}</p>\n <h4 class=\"text-2xl font-bold text-gray-900\">{{ value() }}</h4>\n </div>\n <div class=\"p-3 bg-indigo-50 rounded-lg text-indigo-600\">\n <wdc-icons [name]=\"iconName()\" size=\"22\"></wdc-icons>\n </div>\n </div>\n\n @if (trend() !== 0) {\n <div class=\"flex items-center mt-2 text-sm\">\n @if (trend() > 0) {\n <span\n class=\"text-emerald-600 bg-emerald-50 px-1.5 py-0.5 rounded flex items-center gap-1 font-medium\"\n >\n <svg class=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6\"\n ></path>\n </svg>\n {{ trend() }}%\n </span>\n } @else {\n <span\n class=\"text-rose-600 bg-rose-50 px-1.5 py-0.5 rounded flex items-center gap-1 font-medium\"\n >\n <svg class=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 17h8m0 0V9m0 8l-8-8-4 4-6-6\"\n ></path>\n </svg>\n {{ trend() }}%\n </span>\n }\n <span class=\"text-gray-400 ml-2\">{{ trendLabel() }}</span>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: IconsComponent, selector: "wdc-icons", inputs: ["name", "
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: StatCardComponent, isStandalone: true, selector: "wdc-stat-card", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, trend: { classPropertyName: "trend", publicName: "trend", isSignal: true, isRequired: false, transformFunction: null }, trendLabel: { classPropertyName: "trendLabel", publicName: "trendLabel", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block h-full" }, ngImport: i0, template: "<div\n class=\"bg-white p-6 rounded-xl shadow-sm border border-gray-100 flex items-start justify-between h-full\"\n>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex items-start justify-between\">\n <div>\n <p class=\"text-sm font-medium text-gray-500 mb-1\">{{ label() }}</p>\n <h4 class=\"text-2xl font-bold text-gray-900\">{{ value() }}</h4>\n </div>\n <div class=\"p-3 bg-indigo-50 rounded-lg text-indigo-600\">\n <wdc-icons [name]=\"iconName()\" size=\"22\"></wdc-icons>\n </div>\n </div>\n\n @if (trend() !== 0) {\n <div class=\"flex items-center mt-2 text-sm\">\n @if (trend() > 0) {\n <span\n class=\"text-emerald-600 bg-emerald-50 px-1.5 py-0.5 rounded flex items-center gap-1 font-medium\"\n >\n <svg class=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6\"\n ></path>\n </svg>\n {{ trend() }}%\n </span>\n } @else {\n <span\n class=\"text-rose-600 bg-rose-50 px-1.5 py-0.5 rounded flex items-center gap-1 font-medium\"\n >\n <svg class=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 17h8m0 0V9m0 8l-8-8-4 4-6-6\"\n ></path>\n </svg>\n {{ trend() }}%\n </span>\n }\n <span class=\"text-gray-400 ml-2\">{{ trendLabel() }}</span>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: IconsComponent, selector: "wdc-icons", inputs: ["name", "customClass", "size", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
217
195
|
}
|
|
218
196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: StatCardComponent, decorators: [{
|
|
219
197
|
type: Component,
|
|
@@ -326,13 +304,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
326
304
|
args: [{ selector: 'wdc-badge', imports: [CommonModule], template: "<span [class]=\"classes()\">\r\n <ng-content></ng-content>\r\n @if (value()) {\r\n <span>{{ value() }}</span>\r\n }\r\n</span>\r\n" }]
|
|
327
305
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }] } });
|
|
328
306
|
|
|
329
|
-
// import { trigger, transition, style, animate } from '@angular/animations';
|
|
330
307
|
class ModalComponent {
|
|
331
308
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
332
309
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
333
310
|
isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
334
311
|
closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : []));
|
|
335
312
|
onClose = output();
|
|
313
|
+
isRendered = signal(false, ...(ngDevMode ? [{ debugName: "isRendered" }] : []));
|
|
314
|
+
isClosing = signal(false, ...(ngDevMode ? [{ debugName: "isClosing" }] : []));
|
|
315
|
+
constructor() {
|
|
316
|
+
// 3. Effect to watch Input changes
|
|
317
|
+
effect(() => {
|
|
318
|
+
if (this.isOpen()) {
|
|
319
|
+
// OPENING LOGIC
|
|
320
|
+
this.isClosing.set(false);
|
|
321
|
+
this.isRendered.set(true); // Turant DOM mein lao
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
// CLOSING LOGIC
|
|
325
|
+
// Pehle 'closing' flag set karo taaki exit animation play ho
|
|
326
|
+
this.isClosing.set(true);
|
|
327
|
+
// 200ms wait karo (CSS animation duration match honi chahiye)
|
|
328
|
+
setTimeout(() => {
|
|
329
|
+
this.isRendered.set(false); // Ab DOM se hatao
|
|
330
|
+
}, 200);
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
}
|
|
336
334
|
closeModal() {
|
|
337
335
|
this.isOpen.set(false);
|
|
338
336
|
this.onClose.emit();
|
|
@@ -359,12 +357,12 @@ class ModalComponent {
|
|
|
359
357
|
}
|
|
360
358
|
}, ...(ngDevMode ? [{ debugName: "sizeClasses" }] : []));
|
|
361
359
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
362
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: ModalComponent, isStandalone: true, selector: "wdc-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", onClose: "onClose" }, ngImport: i0, template: "@if (isOpen()) {\r\n <div class=\"relative z-50\" aria-labelledby=\"modal-title\" role=\"dialog\" aria-modal=\"true\">\r\n <!-- Backdrop -->\r\n <div\r\n [@fadeAnimation]\r\n class=\"fixed inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity\"\r\n (click)=\"onBackdropClick()\"\r\n ></div>\r\n\r\n <!-- Panel -->\r\n <div class=\"fixed inset-0 z-10 overflow-y-auto w-screen overflow-x-hidden\">\r\n <div class=\"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0\">\r\n <div\r\n [@modalAnimation]\r\n class=\"relative transform overflow-hidden rounded-lg bg-white dark:bg-slate-900 px-4 pb-4 pt-5 text-left shadow-xl sm:my-8 w-full sm:p-6\"\r\n [class]=\"sizeClasses()\"\r\n >\r\n <!-- Header -->\r\n @if (title()) {\r\n <div class=\"mb-4 sm:flex sm:items-start justify-between\">\r\n <h3\r\n class=\"text-lg font-semibold leading-6 text-slate-900 dark:text-white\"\r\n id=\"modal-title\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n <button\r\n type=\"button\"\r\n class=\"rounded-md bg-white dark:bg-slate-900 text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-slate-900\"\r\n (click)=\"closeModal()\"\r\n >\r\n <span class=\"sr-only\">Close</span>\r\n <svg\r\n class=\"h-6 w-6\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke-width=\"1.5\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\"\r\n >\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Body -->\r\n <div class=\"mt-2\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n" });
|
|
360
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: ModalComponent, isStandalone: true, selector: "wdc-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", onClose: "onClose" }, ngImport: i0, template: "@if (isRendered()) {\r\n <div class=\"relative z-50\" aria-labelledby=\"modal-title\" role=\"dialog\" aria-modal=\"true\">\r\n <!-- Backdrop -->\r\n <div\r\n class=\"fixed inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity\"\r\n [class]=\"isClosing() ? 'wdc-animate-exit' : 'wdc-animate-enter'\"\r\n (click)=\"onBackdropClick()\"\r\n ></div>\r\n\r\n <!-- Panel -->\r\n <div class=\"fixed inset-0 z-10 overflow-y-auto w-screen overflow-x-hidden\">\r\n <div class=\"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0\">\r\n <div\r\n class=\"relative transform overflow-hidden rounded-lg bg-white dark:bg-slate-900 px-4 pb-4 pt-5 text-left shadow-xl sm:my-8 w-full sm:p-6\"\r\n [class]=\"(isClosing() ? 'wdc-zoom-exit' : 'wdc-zoom-enter') + ' ' + sizeClasses()\"\r\n >\r\n <!-- Header -->\r\n @if (title()) {\r\n <div class=\"mb-4 sm:flex sm:items-start justify-between\">\r\n <h3\r\n class=\"text-lg font-semibold leading-6 text-slate-900 dark:text-white\"\r\n id=\"modal-title\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n <button\r\n type=\"button\"\r\n class=\"rounded-md cursor-pointer bg-white dark:bg-slate-900 text-slate-400 hover:text-slate-500 focus:outline-none\"\r\n (click)=\"closeModal()\"\r\n >\r\n <wdc-icons name=\"close\" size=\"20\"></wdc-icons>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Body -->\r\n <div class=\"mt-2\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@tailwind utilities;@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; --font-serif: ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scaleOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}.wdc-animate-enter{animation:fadeIn .2s ease-out forwards}.wdc-animate-exit{animation:fadeOut .2s ease-in forwards}.wdc-zoom-enter{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.wdc-zoom-exit{animation:scaleOut .2s ease-in forwards}.wdc-slide-in-left{animation:slideInLeft .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-left{animation:slideOutLeft .3s ease-in forwards!important;will-change:transform}.wdc-slide-in-right{animation:slideInRight .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-right{animation:slideOutRight .3s ease-in forwards!important;will-change:transform}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconsComponent, selector: "wdc-icons", inputs: ["name", "customClass", "size", "ariaLabel"] }] });
|
|
363
361
|
}
|
|
364
362
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ModalComponent, decorators: [{
|
|
365
363
|
type: Component,
|
|
366
|
-
args: [{ selector: 'wdc-modal', imports: [], template: "@if (isOpen()) {\r\n <div class=\"relative z-50\" aria-labelledby=\"modal-title\" role=\"dialog\" aria-modal=\"true\">\r\n <!-- Backdrop -->\r\n <div\r\n [@fadeAnimation]\r\n class=\"fixed inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity\"\r\n (click)=\"onBackdropClick()\"\r\n ></div>\r\n\r\n <!-- Panel -->\r\n <div class=\"fixed inset-0 z-10 overflow-y-auto w-screen overflow-x-hidden\">\r\n <div class=\"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0\">\r\n <div\r\n [@modalAnimation]\r\n class=\"relative transform overflow-hidden rounded-lg bg-white dark:bg-slate-900 px-4 pb-4 pt-5 text-left shadow-xl sm:my-8 w-full sm:p-6\"\r\n [class]=\"sizeClasses()\"\r\n >\r\n <!-- Header -->\r\n @if (title()) {\r\n <div class=\"mb-4 sm:flex sm:items-start justify-between\">\r\n <h3\r\n class=\"text-lg font-semibold leading-6 text-slate-900 dark:text-white\"\r\n id=\"modal-title\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n <button\r\n type=\"button\"\r\n class=\"rounded-md bg-white dark:bg-slate-900 text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-slate-900\"\r\n (click)=\"closeModal()\"\r\n >\r\n <span class=\"sr-only\">Close</span>\r\n <svg\r\n class=\"h-6 w-6\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke-width=\"1.5\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\"\r\n >\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Body -->\r\n <div class=\"mt-2\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n" }]
|
|
367
|
-
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], onClose: [{ type: i0.Output, args: ["onClose"] }] } });
|
|
364
|
+
args: [{ selector: 'wdc-modal', standalone: true, imports: [CommonModule, IconsComponent], template: "@if (isRendered()) {\r\n <div class=\"relative z-50\" aria-labelledby=\"modal-title\" role=\"dialog\" aria-modal=\"true\">\r\n <!-- Backdrop -->\r\n <div\r\n class=\"fixed inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity\"\r\n [class]=\"isClosing() ? 'wdc-animate-exit' : 'wdc-animate-enter'\"\r\n (click)=\"onBackdropClick()\"\r\n ></div>\r\n\r\n <!-- Panel -->\r\n <div class=\"fixed inset-0 z-10 overflow-y-auto w-screen overflow-x-hidden\">\r\n <div class=\"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0\">\r\n <div\r\n class=\"relative transform overflow-hidden rounded-lg bg-white dark:bg-slate-900 px-4 pb-4 pt-5 text-left shadow-xl sm:my-8 w-full sm:p-6\"\r\n [class]=\"(isClosing() ? 'wdc-zoom-exit' : 'wdc-zoom-enter') + ' ' + sizeClasses()\"\r\n >\r\n <!-- Header -->\r\n @if (title()) {\r\n <div class=\"mb-4 sm:flex sm:items-start justify-between\">\r\n <h3\r\n class=\"text-lg font-semibold leading-6 text-slate-900 dark:text-white\"\r\n id=\"modal-title\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n <button\r\n type=\"button\"\r\n class=\"rounded-md cursor-pointer bg-white dark:bg-slate-900 text-slate-400 hover:text-slate-500 focus:outline-none\"\r\n (click)=\"closeModal()\"\r\n >\r\n <wdc-icons name=\"close\" size=\"20\"></wdc-icons>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Body -->\r\n <div class=\"mt-2\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@tailwind utilities;@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; --font-serif: ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scaleOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}.wdc-animate-enter{animation:fadeIn .2s ease-out forwards}.wdc-animate-exit{animation:fadeOut .2s ease-in forwards}.wdc-zoom-enter{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.wdc-zoom-exit{animation:scaleOut .2s ease-in forwards}.wdc-slide-in-left{animation:slideInLeft .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-left{animation:slideOutLeft .3s ease-in forwards!important;will-change:transform}.wdc-slide-in-right{animation:slideInRight .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-right{animation:slideOutRight .3s ease-in forwards!important;will-change:transform}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}\n"] }]
|
|
365
|
+
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], onClose: [{ type: i0.Output, args: ["onClose"] }] } });
|
|
368
366
|
|
|
369
367
|
class NavbarComponent {
|
|
370
368
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -442,40 +440,60 @@ class TabsComponent {
|
|
|
442
440
|
this.activeTab.set(tab);
|
|
443
441
|
}
|
|
444
442
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
445
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: TabsComponent, isStandalone: true, selector: "wdc-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], ngImport: i0, template: "
|
|
443
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: TabsComponent, isStandalone: true, selector: "wdc-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], ngImport: i0, template: "<div\r\n [class]=\"\r\n `w-full flex bg-white p-4 rounded-lg border border-gray-100 ${orientation() === 'vertical' ? 'flex-row gap-6' : 'flex-col'}`\r\n \"\r\n>\r\n <div\r\n [class]=\"\r\n `flex flex-shrink-0 border-gray-200 ${orientation() === 'vertical' ? 'border-r w-42 flex-col' : 'border-b'}`\r\n \"\r\n >\r\n <nav\r\n [class]=\"\r\n `flex ${orientation() === 'vertical' ? 'flex-col -mr-px flex-shrink-0' : '-mb-px space-x-8'}`\r\n \"\r\n >\r\n @for (item of tabs(); track $index; let i = $index) {\r\n <button\r\n (click)=\"selectTab(item)\"\r\n [class.border-indigo-500]=\"activeTab() === item\"\r\n [class.text-indigo-600]=\"activeTab() === item\"\r\n [class.border-transparent]=\"activeTab() !== item\"\r\n [class.text-gray-500]=\"activeTab() !== item\"\r\n [class.hover:text-gray-700]=\"activeTab() !== item\"\r\n [class.hover:border-gray-300]=\"activeTab() !== item\"\r\n [class]=\"\r\n `whitespace-nowrap flex cursor-pointer py-4 px-1 font-medium text-sm transition-all focus:outline-none ${\r\n orientation() === 'vertical' ? 'border-r-2' : 'border-b-2'\r\n }`\r\n \"\r\n >\r\n @if (item.headerTemplate()) {\r\n <ng-container *ngTemplateOutlet=\"item.headerTemplate()\"></ng-container>\r\n } @else {\r\n {{ item.label() }}\r\n }\r\n </button>\r\n }\r\n </nav>\r\n </div>\r\n\r\n @if (activeTab(); as active) {\r\n <div [class]=\"`${orientation() === 'vertical' ? 'flex-1 h-full overflow-y-auto' : 'mt-4'}`\">\r\n <ng-container *ngTemplateOutlet=\"active.contentTemplate()\"></ng-container>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
446
444
|
}
|
|
447
445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TabsComponent, decorators: [{
|
|
448
446
|
type: Component,
|
|
449
|
-
args: [{ selector: 'wdc-tabs', imports: [CommonModule], template: "
|
|
447
|
+
args: [{ selector: 'wdc-tabs', imports: [CommonModule], template: "<div\r\n [class]=\"\r\n `w-full flex bg-white p-4 rounded-lg border border-gray-100 ${orientation() === 'vertical' ? 'flex-row gap-6' : 'flex-col'}`\r\n \"\r\n>\r\n <div\r\n [class]=\"\r\n `flex flex-shrink-0 border-gray-200 ${orientation() === 'vertical' ? 'border-r w-42 flex-col' : 'border-b'}`\r\n \"\r\n >\r\n <nav\r\n [class]=\"\r\n `flex ${orientation() === 'vertical' ? 'flex-col -mr-px flex-shrink-0' : '-mb-px space-x-8'}`\r\n \"\r\n >\r\n @for (item of tabs(); track $index; let i = $index) {\r\n <button\r\n (click)=\"selectTab(item)\"\r\n [class.border-indigo-500]=\"activeTab() === item\"\r\n [class.text-indigo-600]=\"activeTab() === item\"\r\n [class.border-transparent]=\"activeTab() !== item\"\r\n [class.text-gray-500]=\"activeTab() !== item\"\r\n [class.hover:text-gray-700]=\"activeTab() !== item\"\r\n [class.hover:border-gray-300]=\"activeTab() !== item\"\r\n [class]=\"\r\n `whitespace-nowrap flex cursor-pointer py-4 px-1 font-medium text-sm transition-all focus:outline-none ${\r\n orientation() === 'vertical' ? 'border-r-2' : 'border-b-2'\r\n }`\r\n \"\r\n >\r\n @if (item.headerTemplate()) {\r\n <ng-container *ngTemplateOutlet=\"item.headerTemplate()\"></ng-container>\r\n } @else {\r\n {{ item.label() }}\r\n }\r\n </button>\r\n }\r\n </nav>\r\n </div>\r\n\r\n @if (activeTab(); as active) {\r\n <div [class]=\"`${orientation() === 'vertical' ? 'flex-1 h-full overflow-y-auto' : 'mt-4'}`\">\r\n <ng-container *ngTemplateOutlet=\"active.contentTemplate()\"></ng-container>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
450
448
|
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }] } });
|
|
451
449
|
|
|
452
450
|
class ToastService {
|
|
453
451
|
toasts = signal([], ...(ngDevMode ? [{ debugName: "toasts" }] : []));
|
|
454
452
|
nextId = 0;
|
|
455
|
-
|
|
453
|
+
defaultPosition = 'top-center';
|
|
454
|
+
toastTimeouts = new Map();
|
|
455
|
+
MAX_TOASTS = 5;
|
|
456
|
+
show(message, type = 'info', duration = 3000, position) {
|
|
456
457
|
const id = this.nextId++;
|
|
457
|
-
const
|
|
458
|
-
|
|
458
|
+
const finalPosition = position || this.defaultPosition;
|
|
459
|
+
const toast = { id, message, type, duration, position: finalPosition };
|
|
460
|
+
this.toasts.update((current) => {
|
|
461
|
+
// Optional: Limit max toasts to prevent UI clutter
|
|
462
|
+
if (current.length >= this.MAX_TOASTS) {
|
|
463
|
+
this.remove(current[0].id);
|
|
464
|
+
}
|
|
465
|
+
return [...current, toast];
|
|
466
|
+
});
|
|
459
467
|
if (duration > 0) {
|
|
460
|
-
setTimeout(() =>
|
|
461
|
-
|
|
462
|
-
}, duration);
|
|
468
|
+
const timer = setTimeout(() => this.remove(id), duration);
|
|
469
|
+
this.toastTimeouts.set(id, timer);
|
|
463
470
|
}
|
|
464
471
|
}
|
|
472
|
+
// Confirm your remove method looks like this:
|
|
465
473
|
remove(id) {
|
|
466
|
-
this.toasts
|
|
474
|
+
const currentToasts = this.toasts();
|
|
475
|
+
const toastExists = currentToasts.find((t) => t.id === id);
|
|
476
|
+
if (!toastExists || toastExists.closing)
|
|
477
|
+
return;
|
|
478
|
+
// 1. Set Closing Flag (Triggers .animate-out CSS)
|
|
479
|
+
this.toasts.update((current) => current.map((t) => (t.id === id ? { ...t, closing: true } : t)));
|
|
480
|
+
// 2. Wait 300ms (Matches CSS duration) then delete
|
|
481
|
+
setTimeout(() => {
|
|
482
|
+
this.toasts.update((current) => current.filter((t) => t.id !== id));
|
|
483
|
+
}, 300);
|
|
467
484
|
}
|
|
468
|
-
|
|
469
|
-
|
|
485
|
+
// --- Helper Methods ---
|
|
486
|
+
success(message, duration, position) {
|
|
487
|
+
this.show(message, 'success', duration, position);
|
|
470
488
|
}
|
|
471
|
-
error(message, duration) {
|
|
472
|
-
this.show(message, 'error', duration);
|
|
489
|
+
error(message, duration, position) {
|
|
490
|
+
this.show(message, 'error', duration, position);
|
|
473
491
|
}
|
|
474
|
-
warning(message, duration) {
|
|
475
|
-
this.show(message, 'warning', duration);
|
|
492
|
+
warning(message, duration, position) {
|
|
493
|
+
this.show(message, 'warning', duration, position);
|
|
476
494
|
}
|
|
477
|
-
info(message, duration) {
|
|
478
|
-
this.show(message, 'info', duration);
|
|
495
|
+
info(message, duration, position) {
|
|
496
|
+
this.show(message, 'info', duration, position);
|
|
479
497
|
}
|
|
480
498
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
481
499
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ToastService, providedIn: 'root' });
|
|
@@ -488,9 +506,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
488
506
|
}] });
|
|
489
507
|
|
|
490
508
|
class ToastComponent {
|
|
491
|
-
toastService;
|
|
492
|
-
|
|
493
|
-
|
|
509
|
+
toastService = inject(ToastService);
|
|
510
|
+
// 1. Identify which positions currently have active toasts
|
|
511
|
+
activePositions = computed(() => {
|
|
512
|
+
const toasts = this.toastService.toasts();
|
|
513
|
+
// Returns unique positions (e.g., ['top-right', 'bottom-center'])
|
|
514
|
+
return [...new Set(toasts.map((t) => t.position))];
|
|
515
|
+
}, ...(ngDevMode ? [{ debugName: "activePositions" }] : []));
|
|
516
|
+
// 2. Helper to get toasts for a specific position loop
|
|
517
|
+
getToastsByPosition(pos) {
|
|
518
|
+
return this.toastService.toasts().filter((t) => t.position === pos);
|
|
519
|
+
}
|
|
520
|
+
// 3. Get CSS for the Container (The fixed wrapper)
|
|
521
|
+
getPositionClasses(pos) {
|
|
522
|
+
const base = 'fixed z-[100] flex flex-col gap-2 pointer-events-none p-4 max-w-full';
|
|
523
|
+
const positions = {
|
|
524
|
+
'top-left': 'top-0 left-0 items-start',
|
|
525
|
+
'top-center': 'top-0 left-1/2 -translate-x-1/2 items-center',
|
|
526
|
+
'top-right': 'top-0 right-0 items-end',
|
|
527
|
+
'bottom-left': 'bottom-0 left-0 items-start',
|
|
528
|
+
'bottom-center': 'bottom-0 left-1/2 -translate-x-1/2 items-center',
|
|
529
|
+
'bottom-right': 'bottom-0 right-0 items-end',
|
|
530
|
+
};
|
|
531
|
+
return `${base} ${positions[pos]}`;
|
|
532
|
+
}
|
|
533
|
+
// 4. Get Animation based on position
|
|
534
|
+
getAnimationClass(pos, isClosing) {
|
|
535
|
+
const duration = 'duration-300'; // Common duration
|
|
536
|
+
// 1. EXIT ANIMATIONS (Jab closing: true ho)
|
|
537
|
+
if (isClosing) {
|
|
538
|
+
if (pos.includes('left'))
|
|
539
|
+
return `animate-out fade-out slide-out-to-left ${duration}`;
|
|
540
|
+
if (pos.includes('right'))
|
|
541
|
+
return `animate-out fade-out slide-out-to-right ${duration}`;
|
|
542
|
+
if (pos.includes('top'))
|
|
543
|
+
return `animate-out fade-out slide-out-to-top ${duration}`;
|
|
544
|
+
return `animate-out fade-out slide-out-to-bottom ${duration}`;
|
|
545
|
+
}
|
|
546
|
+
// 2. ENTER ANIMATIONS (Jab naya aaye)
|
|
547
|
+
if (pos.includes('left'))
|
|
548
|
+
return `animate-in slide-in-from-left ${duration}`;
|
|
549
|
+
if (pos.includes('right'))
|
|
550
|
+
return `animate-in slide-in-from-right ${duration}`;
|
|
551
|
+
if (pos.includes('top'))
|
|
552
|
+
return `animate-in slide-in-from-top ${duration}`;
|
|
553
|
+
return `animate-in slide-in-from-bottom ${duration}`;
|
|
494
554
|
}
|
|
495
555
|
getIcon(type) {
|
|
496
556
|
switch (type) {
|
|
@@ -504,25 +564,51 @@ class ToastComponent {
|
|
|
504
564
|
return 'info';
|
|
505
565
|
}
|
|
506
566
|
}
|
|
567
|
+
// Helper for container colors
|
|
507
568
|
getClasses(type) {
|
|
569
|
+
const base = 'pointer-events-auto flex items-center gap-2 w-full max-w-xs px-4 py-3 rounded-lg shadow-lg border duration-300';
|
|
570
|
+
let colorClass = '';
|
|
508
571
|
switch (type) {
|
|
509
572
|
case 'success':
|
|
510
|
-
|
|
573
|
+
colorClass =
|
|
574
|
+
'bg-green-50 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800';
|
|
575
|
+
break;
|
|
511
576
|
case 'error':
|
|
512
|
-
|
|
577
|
+
colorClass =
|
|
578
|
+
'bg-red-50 text-red-800 border-red-200 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800';
|
|
579
|
+
break;
|
|
513
580
|
case 'warning':
|
|
514
|
-
|
|
581
|
+
colorClass =
|
|
582
|
+
'bg-yellow-50 text-yellow-800 border-yellow-200 dark:bg-yellow-900/30 dark:text-yellow-300 dark:border-yellow-800';
|
|
583
|
+
break;
|
|
515
584
|
case 'info':
|
|
516
|
-
|
|
585
|
+
colorClass =
|
|
586
|
+
'bg-blue-50 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-800';
|
|
587
|
+
break;
|
|
517
588
|
}
|
|
589
|
+
return `${base} ${colorClass}`;
|
|
518
590
|
}
|
|
519
|
-
|
|
520
|
-
|
|
591
|
+
// Helper for Close button colors (Tailwind safe)
|
|
592
|
+
getCloseButtonClass(type) {
|
|
593
|
+
const base = 'ml-auto -mx-1.5 -my-1.5 rounded-lg cursor-pointer focus:outline-none p-1.5 hover:bg-black/5 dark:hover:bg-white/10 inline-flex items-center justify-center h-8 w-8 transition-colors';
|
|
594
|
+
switch (type) {
|
|
595
|
+
case 'success':
|
|
596
|
+
return `${base} text-green-500`;
|
|
597
|
+
case 'error':
|
|
598
|
+
return `${base} text-red-500`;
|
|
599
|
+
case 'warning':
|
|
600
|
+
return `${base} text-yellow-500`;
|
|
601
|
+
case 'info':
|
|
602
|
+
return `${base} text-blue-500`;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
606
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: ToastComponent, isStandalone: true, selector: "wdc-toast", ngImport: i0, template: "@for (pos of activePositions(); track pos) {\r\n <div [class]=\"getPositionClasses(pos)\">\r\n @for (toast of getToastsByPosition(pos); track toast.id) {\r\n <div\r\n [class]=\"getClasses(toast.type) + ' ' + getAnimationClass(pos, toast.closing)\"\r\n role=\"alert\"\r\n >\r\n <div class=\"inline-flex items-center justify-center flex-shrink-0 w-8 h-8\">\r\n <wdc-icons [name]=\"getIcon(toast.type)\" size=\"24\"></wdc-icons>\r\n </div>\r\n\r\n <div class=\"text-sm font-normal\">{{ toast.message }}</div>\r\n\r\n <button\r\n type=\"button\"\r\n (click)=\"toastService.remove(toast.id)\"\r\n [class]=\"getCloseButtonClass(toast.type)\"\r\n aria-label=\"Close\"\r\n >\r\n <wdc-icons name=\"close\"></wdc-icons>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".animate-in,.animate-out{animation-duration:.3s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-fill-mode:forwards;will-change:transform,opacity}.slide-in-from-top{animation-name:slideInTop}@keyframes slideInTop{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}.slide-in-from-bottom{animation-name:slideInBottom}@keyframes slideInBottom{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.slide-in-from-left{animation-name:slideInLeft}@keyframes slideInLeft{0%{transform:translate(-100%);opacity:0}to{transform:translate(0);opacity:1}}.slide-in-from-right{animation-name:slideInRight}@keyframes slideInRight{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.fade-out{opacity:0}.slide-out-to-top{animation-name:slideOutTop}@keyframes slideOutTop{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}.slide-out-to-bottom{animation-name:slideOutBottom}@keyframes slideOutBottom{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}.slide-out-to-left{animation-name:slideOutLeft}@keyframes slideOutLeft{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}.slide-out-to-right{animation-name:slideOutRight}@keyframes slideOutRight{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconsComponent, selector: "wdc-icons", inputs: ["name", "customClass", "size", "ariaLabel"] }] });
|
|
521
607
|
}
|
|
522
608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ToastComponent, decorators: [{
|
|
523
609
|
type: Component,
|
|
524
|
-
args: [{ selector: 'wdc-toast', standalone: true, imports: [CommonModule], template: "
|
|
525
|
-
}]
|
|
610
|
+
args: [{ selector: 'wdc-toast', standalone: true, imports: [CommonModule, IconsComponent], template: "@for (pos of activePositions(); track pos) {\r\n <div [class]=\"getPositionClasses(pos)\">\r\n @for (toast of getToastsByPosition(pos); track toast.id) {\r\n <div\r\n [class]=\"getClasses(toast.type) + ' ' + getAnimationClass(pos, toast.closing)\"\r\n role=\"alert\"\r\n >\r\n <div class=\"inline-flex items-center justify-center flex-shrink-0 w-8 h-8\">\r\n <wdc-icons [name]=\"getIcon(toast.type)\" size=\"24\"></wdc-icons>\r\n </div>\r\n\r\n <div class=\"text-sm font-normal\">{{ toast.message }}</div>\r\n\r\n <button\r\n type=\"button\"\r\n (click)=\"toastService.remove(toast.id)\"\r\n [class]=\"getCloseButtonClass(toast.type)\"\r\n aria-label=\"Close\"\r\n >\r\n <wdc-icons name=\"close\"></wdc-icons>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".animate-in,.animate-out{animation-duration:.3s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-fill-mode:forwards;will-change:transform,opacity}.slide-in-from-top{animation-name:slideInTop}@keyframes slideInTop{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}.slide-in-from-bottom{animation-name:slideInBottom}@keyframes slideInBottom{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.slide-in-from-left{animation-name:slideInLeft}@keyframes slideInLeft{0%{transform:translate(-100%);opacity:0}to{transform:translate(0);opacity:1}}.slide-in-from-right{animation-name:slideInRight}@keyframes slideInRight{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.fade-out{opacity:0}.slide-out-to-top{animation-name:slideOutTop}@keyframes slideOutTop{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}.slide-out-to-bottom{animation-name:slideOutBottom}@keyframes slideOutBottom{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}.slide-out-to-left{animation-name:slideOutLeft}@keyframes slideOutLeft{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}.slide-out-to-right{animation-name:slideOutRight}@keyframes slideOutRight{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}\n"] }]
|
|
611
|
+
}] });
|
|
526
612
|
|
|
527
613
|
class TableComponent {
|
|
528
614
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -628,26 +714,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
628
714
|
}] });
|
|
629
715
|
|
|
630
716
|
class DrawerComponent {
|
|
631
|
-
isOpen =
|
|
632
|
-
position = input('
|
|
633
|
-
|
|
634
|
-
|
|
717
|
+
isOpen = input.required(...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
718
|
+
position = input('left', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
719
|
+
footer = input(false, ...(ngDevMode ? [{ debugName: "footer" }] : []));
|
|
720
|
+
closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : []));
|
|
721
|
+
close = output();
|
|
722
|
+
width = input('w-80 max-w-[80vw]', ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
723
|
+
isRendered = signal(false, ...(ngDevMode ? [{ debugName: "isRendered" }] : []));
|
|
724
|
+
isClosing = signal(false, ...(ngDevMode ? [{ debugName: "isClosing" }] : []));
|
|
725
|
+
constructor() {
|
|
726
|
+
effect(() => {
|
|
727
|
+
if (this.isOpen()) {
|
|
728
|
+
this.isClosing.set(false);
|
|
729
|
+
this.isRendered.set(true);
|
|
730
|
+
}
|
|
731
|
+
else {
|
|
732
|
+
this.isClosing.set(true);
|
|
733
|
+
setTimeout(() => this.isRendered.set(false), 300);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
635
736
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
737
|
+
// 1. Parent Container ka Alignment (Left vs Right)
|
|
738
|
+
getFlexDirection() {
|
|
739
|
+
return this.position() === 'right' ? 'justify-end' : 'justify-start';
|
|
740
|
+
}
|
|
741
|
+
// 2. Sidebar ki Width
|
|
742
|
+
getWidthClass() {
|
|
743
|
+
return 'w-80 max-w-[80vw]'; // Mobile responsive width
|
|
744
|
+
}
|
|
745
|
+
// 3. Animation Class (Sirf Transform wali classes)
|
|
746
|
+
getAnimationClass() {
|
|
747
|
+
const pos = this.position();
|
|
748
|
+
const closing = this.isClosing();
|
|
749
|
+
if (pos === 'left') {
|
|
750
|
+
return closing ? 'wdc-slide-out-left' : 'wdc-slide-in-left';
|
|
751
|
+
}
|
|
752
|
+
if (pos === 'right') {
|
|
753
|
+
return closing ? 'wdc-slide-out-right' : 'wdc-slide-in-right';
|
|
754
|
+
}
|
|
755
|
+
return '';
|
|
643
756
|
}
|
|
644
757
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: DrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
645
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: DrawerComponent, isStandalone: true, selector: "wdc-drawer", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange" }, ngImport: i0, template: "@if (isOpen()) {\r\n <div class=\"relative z-50\" aria-labelledby=\"slide-over-title\" role=\"dialog\" aria-modal=\"true\">\r\n <!-- Backdrop -->\r\n <div\r\n [@fadeAnimation]\r\n class=\"fixed inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity\"\r\n (click)=\"close()\"\r\n ></div>\r\n\r\n <!-- Panel -->\r\n <div class=\"fixed inset-0 overflow-hidden pointer-events-none\">\r\n <div class=\"absolute inset-0 overflow-hidden\">\r\n <div\r\n class=\"pointer-events-auto fixed inset-y-0 flex max-w-full\"\r\n [class.right-0]=\"position() === 'right'\"\r\n [class.left-0]=\"position() === 'left'\"\r\n [class.pl-10]=\"position() === 'right'\"\r\n [class.sm:pl-16]=\"position() === 'right'\"\r\n [class.pr-10]=\"position() === 'left'\"\r\n [class.sm:pr-16]=\"position() === 'left'\"\r\n >\r\n <div\r\n [@drawerAnimation]=\"transformParams\"\r\n class=\"flex w-screen max-w-md flex-col overflow-y-scroll bg-white dark:bg-slate-900 py-6 shadow-2xl\"\r\n >\r\n <div class=\"px-4 sm:px-6 flex items-center justify-between\">\r\n <h2\r\n class=\"text-base font-semibold leading-6 text-slate-900 dark:text-white\"\r\n id=\"slide-over-title\"\r\n >\r\n <ng-content select=\"[header]\"></ng-content>\r\n </h2>\r\n <button\r\n type=\"button\"\r\n class=\"rounded-md text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500\"\r\n (click)=\"close()\"\r\n >\r\n <span class=\"sr-only\">Close panel</span>\r\n <svg\r\n class=\"h-6 w-6\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke-width=\"1.5\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\"\r\n >\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <div class=\"relative mt-6 flex-1 px-4 sm:px-6 text-slate-600 dark:text-slate-400\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
758
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: DrawerComponent, isStandalone: true, selector: "wdc-drawer", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, ngImport: i0, template: "@if (isRendered()) {\r\n <div class=\"fixed inset-0 z-50 flex pointer-events-none\" [ngClass]=\"getFlexDirection()\">\r\n <div\r\n class=\"fixed inset-0 bg-black/30 backdrop-blur-sm transition-opacity pointer-events-auto\"\r\n [class]=\"isClosing() ? 'wdc-animate-exit' : 'wdc-animate-enter'\"\r\n (click)=\"close.emit()\"\r\n ></div>\r\n\r\n <div\r\n class=\"relative pointer-events-auto bg-white dark:bg-slate-900 shadow-2xl flex flex-col h-full\"\r\n [class]=\"getAnimationClass() + ' ' + width()\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div>\r\n <ng-content select=\"[drawer-header]\"></ng-content>\r\n </div>\r\n <div>\r\n <ng-content select=\"[drawer-body]\"></ng-content>\r\n </div>\r\n @if (footer()) {\r\n <div>\r\n <ng-content select=\"[drawer-footer]\"></ng-content>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@tailwind utilities;@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; --font-serif: ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scaleOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}.wdc-animate-enter{animation:fadeIn .2s ease-out forwards}.wdc-animate-exit{animation:fadeOut .2s ease-in forwards}.wdc-zoom-enter{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.wdc-zoom-exit{animation:scaleOut .2s ease-in forwards}.wdc-slide-in-left{animation:slideInLeft .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-left{animation:slideOutLeft .3s ease-in forwards!important;will-change:transform}.wdc-slide-in-right{animation:slideInRight .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-right{animation:slideOutRight .3s ease-in forwards!important;will-change:transform}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
646
759
|
}
|
|
647
760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: DrawerComponent, decorators: [{
|
|
648
761
|
type: Component,
|
|
649
|
-
args: [{ selector: 'wdc-drawer', imports: [CommonModule], template: "@if (isOpen()) {\r\n <div class=\"relative z-50\" aria-labelledby=\"slide-over-title\" role=\"dialog\" aria-modal=\"true\">\r\n <!-- Backdrop -->\r\n <div\r\n [@fadeAnimation]\r\n class=\"fixed inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity\"\r\n (click)=\"close()\"\r\n ></div>\r\n\r\n <!-- Panel -->\r\n <div class=\"fixed inset-0 overflow-hidden pointer-events-none\">\r\n <div class=\"absolute inset-0 overflow-hidden\">\r\n <div\r\n class=\"pointer-events-auto fixed inset-y-0 flex max-w-full\"\r\n [class.right-0]=\"position() === 'right'\"\r\n [class.left-0]=\"position() === 'left'\"\r\n [class.pl-10]=\"position() === 'right'\"\r\n [class.sm:pl-16]=\"position() === 'right'\"\r\n [class.pr-10]=\"position() === 'left'\"\r\n [class.sm:pr-16]=\"position() === 'left'\"\r\n >\r\n <div\r\n [@drawerAnimation]=\"transformParams\"\r\n class=\"flex w-screen max-w-md flex-col overflow-y-scroll bg-white dark:bg-slate-900 py-6 shadow-2xl\"\r\n >\r\n <div class=\"px-4 sm:px-6 flex items-center justify-between\">\r\n <h2\r\n class=\"text-base font-semibold leading-6 text-slate-900 dark:text-white\"\r\n id=\"slide-over-title\"\r\n >\r\n <ng-content select=\"[header]\"></ng-content>\r\n </h2>\r\n <button\r\n type=\"button\"\r\n class=\"rounded-md text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500\"\r\n (click)=\"close()\"\r\n >\r\n <span class=\"sr-only\">Close panel</span>\r\n <svg\r\n class=\"h-6 w-6\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke-width=\"1.5\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\"\r\n >\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <div class=\"relative mt-6 flex-1 px-4 sm:px-6 text-slate-600 dark:text-slate-400\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n" }]
|
|
650
|
-
}], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["
|
|
762
|
+
args: [{ selector: 'wdc-drawer', imports: [CommonModule], standalone: true, template: "@if (isRendered()) {\r\n <div class=\"fixed inset-0 z-50 flex pointer-events-none\" [ngClass]=\"getFlexDirection()\">\r\n <div\r\n class=\"fixed inset-0 bg-black/30 backdrop-blur-sm transition-opacity pointer-events-auto\"\r\n [class]=\"isClosing() ? 'wdc-animate-exit' : 'wdc-animate-enter'\"\r\n (click)=\"close.emit()\"\r\n ></div>\r\n\r\n <div\r\n class=\"relative pointer-events-auto bg-white dark:bg-slate-900 shadow-2xl flex flex-col h-full\"\r\n [class]=\"getAnimationClass() + ' ' + width()\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div>\r\n <ng-content select=\"[drawer-header]\"></ng-content>\r\n </div>\r\n <div>\r\n <ng-content select=\"[drawer-body]\"></ng-content>\r\n </div>\r\n @if (footer()) {\r\n <div>\r\n <ng-content select=\"[drawer-footer]\"></ng-content>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@tailwind utilities;@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; --font-serif: ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scaleOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}.wdc-animate-enter{animation:fadeIn .2s ease-out forwards}.wdc-animate-exit{animation:fadeOut .2s ease-in forwards}.wdc-zoom-enter{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.wdc-zoom-exit{animation:scaleOut .2s ease-in forwards}.wdc-slide-in-left{animation:slideInLeft .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-left{animation:slideOutLeft .3s ease-in forwards!important;will-change:transform}.wdc-slide-in-right{animation:slideInRight .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-right{animation:slideOutRight .3s ease-in forwards!important;will-change:transform}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}\n"] }]
|
|
763
|
+
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
|
|
651
764
|
|
|
652
765
|
class CarouselComponent {
|
|
653
766
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -710,9 +823,830 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
710
823
|
args: [{ selector: 'wdc-page-loader', imports: [CommonModule, SpinnerComponent], template: "<div\r\n class=\"fixed inset-0 z-50 flex flex-col items-center justify-center bg-white/80 dark:bg-slate-900/80 backdrop-blur-md transition-all duration-300\"\r\n [class.absolute]=\"!fullScreen()\"\r\n [class.fixed]=\"fullScreen()\"\r\n>\r\n <wdc-spinner size=\"lg\" color=\"primary\"></wdc-spinner>\r\n @if (message()) {\r\n <p class=\"mt-4 text-sm font-medium text-slate-600 dark:text-slate-400 animate-pulse\">\r\n {{ message() }}\r\n </p>\r\n }\r\n</div>\r\n" }]
|
|
711
824
|
}], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], fullScreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullScreen", required: false }] }] } });
|
|
712
825
|
|
|
826
|
+
class AccordionComponent {
|
|
827
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
828
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.5", type: AccordionComponent, isStandalone: true, selector: "wdc-accordion", ngImport: i0, template: "<div class=\"flex flex-col space-y-4\">\r\n <ng-content></ng-content>\r\n</div>\r\n" });
|
|
829
|
+
}
|
|
830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
831
|
+
type: Component,
|
|
832
|
+
args: [{ selector: 'wdc-accordion', imports: [], template: "<div class=\"flex flex-col space-y-4\">\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
|
|
833
|
+
}] });
|
|
834
|
+
|
|
835
|
+
class AccordionItemComponent {
|
|
836
|
+
open = input(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
837
|
+
active = signal(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
838
|
+
noPaddingBody = input(false, ...(ngDevMode ? [{ debugName: "noPaddingBody" }] : []));
|
|
839
|
+
customActions = input(false, ...(ngDevMode ? [{ debugName: "customActions" }] : []));
|
|
840
|
+
ngOnInit() {
|
|
841
|
+
this.active.set(this.open());
|
|
842
|
+
}
|
|
843
|
+
toggleAccordion() {
|
|
844
|
+
this.active.set(!this.active());
|
|
845
|
+
}
|
|
846
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
847
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: AccordionItemComponent, isStandalone: true, selector: "wdc-accordion-item", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, noPaddingBody: { classPropertyName: "noPaddingBody", publicName: "noPaddingBody", isSignal: true, isRequired: false, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex flex-col bg-white rounded-xl shadow-sm overflow-hidden\">\r\n <button\r\n class=\"flex cursor-pointer items-center justify-between w-full px-4 py-4 border-b border-gray-100 font-medium hover:bg-gray-100\"\r\n (click)=\"toggleAccordion()\"\r\n >\r\n <div>\r\n <ng-content select=\"[accordion-header]\"></ng-content>\r\n </div>\r\n @if (customActions()) {\r\n <ng-content select=\"[accordion-actions]\"></ng-content>\r\n } @else {\r\n <div class=\"transition-transform duration-200\" [class]=\"{ 'rotate-180': active() }\">\r\n <wdc-icons name=\"keyboard_arrow_down\" size=\"24\"></wdc-icons>\r\n </div>\r\n }\r\n </button>\r\n @if (active()) {\r\n <div [class]=\"noPaddingBody() ? '' : 'p-4'\">\r\n <ng-content select=\"[accordion-body]\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "component", type: IconsComponent, selector: "wdc-icons", inputs: ["name", "customClass", "size", "ariaLabel"] }] });
|
|
848
|
+
}
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
850
|
+
type: Component,
|
|
851
|
+
args: [{ selector: 'wdc-accordion-item', standalone: true, imports: [IconsComponent], template: "<div class=\"flex flex-col bg-white rounded-xl shadow-sm overflow-hidden\">\r\n <button\r\n class=\"flex cursor-pointer items-center justify-between w-full px-4 py-4 border-b border-gray-100 font-medium hover:bg-gray-100\"\r\n (click)=\"toggleAccordion()\"\r\n >\r\n <div>\r\n <ng-content select=\"[accordion-header]\"></ng-content>\r\n </div>\r\n @if (customActions()) {\r\n <ng-content select=\"[accordion-actions]\"></ng-content>\r\n } @else {\r\n <div class=\"transition-transform duration-200\" [class]=\"{ 'rotate-180': active() }\">\r\n <wdc-icons name=\"keyboard_arrow_down\" size=\"24\"></wdc-icons>\r\n </div>\r\n }\r\n </button>\r\n @if (active()) {\r\n <div [class]=\"noPaddingBody() ? '' : 'p-4'\">\r\n <ng-content select=\"[accordion-body]\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
852
|
+
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], noPaddingBody: [{ type: i0.Input, args: [{ isSignal: true, alias: "noPaddingBody", required: false }] }], customActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "customActions", required: false }] }] } });
|
|
853
|
+
|
|
854
|
+
class SidebarComponent {
|
|
855
|
+
isOpen = input.required(...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
856
|
+
position = input('left', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
857
|
+
footer = input(false, ...(ngDevMode ? [{ debugName: "footer" }] : []));
|
|
858
|
+
closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : []));
|
|
859
|
+
close = output();
|
|
860
|
+
isRendered = signal(false, ...(ngDevMode ? [{ debugName: "isRendered" }] : []));
|
|
861
|
+
isClosing = signal(false, ...(ngDevMode ? [{ debugName: "isClosing" }] : []));
|
|
862
|
+
constructor() {
|
|
863
|
+
effect(() => {
|
|
864
|
+
if (this.isOpen()) {
|
|
865
|
+
this.isClosing.set(false);
|
|
866
|
+
this.isRendered.set(true);
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
this.isClosing.set(true);
|
|
870
|
+
setTimeout(() => this.isRendered.set(false), 300);
|
|
871
|
+
}
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
// 1. Parent Container ka Alignment (Left vs Right)
|
|
875
|
+
getFlexDirection() {
|
|
876
|
+
return this.position() === 'right' ? 'justify-end' : 'justify-start';
|
|
877
|
+
}
|
|
878
|
+
// 2. Sidebar ki Width
|
|
879
|
+
getWidthClass() {
|
|
880
|
+
return 'w-80 max-w-[80vw]'; // Mobile responsive width
|
|
881
|
+
}
|
|
882
|
+
// 3. Animation Class (Sirf Transform wali classes)
|
|
883
|
+
getAnimationClass() {
|
|
884
|
+
const pos = this.position();
|
|
885
|
+
const closing = this.isClosing();
|
|
886
|
+
if (pos === 'left') {
|
|
887
|
+
return closing ? 'wdc-slide-out-left' : 'wdc-slide-in-left';
|
|
888
|
+
}
|
|
889
|
+
if (pos === 'right') {
|
|
890
|
+
return closing ? 'wdc-slide-out-right' : 'wdc-slide-in-right';
|
|
891
|
+
}
|
|
892
|
+
return '';
|
|
893
|
+
}
|
|
894
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
895
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: SidebarComponent, isStandalone: true, selector: "wdc-sidebar", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, ngImport: i0, template: "@if (isRendered()) {\r\n <div class=\"fixed inset-0 z-50 flex pointer-events-none\" [ngClass]=\"getFlexDirection()\">\r\n <div\r\n class=\"fixed inset-0 bg-black/30 backdrop-blur-sm transition-opacity pointer-events-auto\"\r\n [class]=\"isClosing() ? 'wdc-animate-exit' : 'wdc-animate-enter'\"\r\n (click)=\"close.emit()\"\r\n ></div>\r\n\r\n <div\r\n class=\"relative pointer-events-auto bg-white dark:bg-slate-900 shadow-2xl flex flex-col h-full\"\r\n [class]=\"getAnimationClass() + ' ' + getWidthClass()\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div>\r\n <ng-content select=\"[sidebar-header]\"></ng-content>\r\n </div>\r\n <div>\r\n <ng-content select=\"[sidebar-body]\"></ng-content>\r\n </div>\r\n @if (footer()) {\r\n <div>\r\n <ng-content select=\"[sidebar-footer]\"></ng-content>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@tailwind utilities;@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; --font-serif: ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scaleOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}.wdc-animate-enter{animation:fadeIn .2s ease-out forwards}.wdc-animate-exit{animation:fadeOut .2s ease-in forwards}.wdc-zoom-enter{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.wdc-zoom-exit{animation:scaleOut .2s ease-in forwards}.wdc-slide-in-left{animation:slideInLeft .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-left{animation:slideOutLeft .3s ease-in forwards!important;will-change:transform}.wdc-slide-in-right{animation:slideInRight .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-right{animation:slideOutRight .3s ease-in forwards!important;will-change:transform}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
896
|
+
}
|
|
897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
898
|
+
type: Component,
|
|
899
|
+
args: [{ selector: 'wdc-sidebar', standalone: true, imports: [CommonModule], template: "@if (isRendered()) {\r\n <div class=\"fixed inset-0 z-50 flex pointer-events-none\" [ngClass]=\"getFlexDirection()\">\r\n <div\r\n class=\"fixed inset-0 bg-black/30 backdrop-blur-sm transition-opacity pointer-events-auto\"\r\n [class]=\"isClosing() ? 'wdc-animate-exit' : 'wdc-animate-enter'\"\r\n (click)=\"close.emit()\"\r\n ></div>\r\n\r\n <div\r\n class=\"relative pointer-events-auto bg-white dark:bg-slate-900 shadow-2xl flex flex-col h-full\"\r\n [class]=\"getAnimationClass() + ' ' + getWidthClass()\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div>\r\n <ng-content select=\"[sidebar-header]\"></ng-content>\r\n </div>\r\n <div>\r\n <ng-content select=\"[sidebar-body]\"></ng-content>\r\n </div>\r\n @if (footer()) {\r\n <div>\r\n <ng-content select=\"[sidebar-footer]\"></ng-content>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@tailwind utilities;@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; --font-serif: ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scaleOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}.wdc-animate-enter{animation:fadeIn .2s ease-out forwards}.wdc-animate-exit{animation:fadeOut .2s ease-in forwards}.wdc-zoom-enter{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.wdc-zoom-exit{animation:scaleOut .2s ease-in forwards}.wdc-slide-in-left{animation:slideInLeft .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-left{animation:slideOutLeft .3s ease-in forwards!important;will-change:transform}.wdc-slide-in-right{animation:slideInRight .3s cubic-bezier(.16,1,.3,1) forwards!important;will-change:transform}.wdc-slide-out-right{animation:slideOutRight .3s ease-in forwards!important;will-change:transform}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}\n"] }]
|
|
900
|
+
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], close: [{ type: i0.Output, args: ["close"] }] } });
|
|
901
|
+
|
|
902
|
+
class TextInputComponent {
|
|
903
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
904
|
+
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
905
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
906
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
907
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
908
|
+
isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
909
|
+
set disabled(val) {
|
|
910
|
+
this.isDisabled.set(val);
|
|
911
|
+
}
|
|
912
|
+
onChange = (value) => { };
|
|
913
|
+
onTouched = () => { };
|
|
914
|
+
onInput(event) {
|
|
915
|
+
const val = event.target.value;
|
|
916
|
+
this.value.set(val);
|
|
917
|
+
this.onChange(val);
|
|
918
|
+
}
|
|
919
|
+
onBlur() {
|
|
920
|
+
this.onTouched();
|
|
921
|
+
}
|
|
922
|
+
writeValue(value) {
|
|
923
|
+
this.value.set(value || '');
|
|
924
|
+
}
|
|
925
|
+
registerOnChange(fn) {
|
|
926
|
+
this.onChange = fn;
|
|
927
|
+
}
|
|
928
|
+
registerOnTouched(fn) {
|
|
929
|
+
this.onTouched = fn;
|
|
930
|
+
}
|
|
931
|
+
setDisabledState(isDisabled) {
|
|
932
|
+
this.isDisabled.set(isDisabled);
|
|
933
|
+
}
|
|
934
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
935
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: TextInputComponent, isStandalone: true, selector: "wdc-text-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, providers: [
|
|
936
|
+
{
|
|
937
|
+
provide: NG_VALUE_ACCESSOR,
|
|
938
|
+
useExisting: forwardRef(() => TextInputComponent),
|
|
939
|
+
multi: true,
|
|
940
|
+
},
|
|
941
|
+
], ngImport: i0, template: "<div class=\"w-full\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n <input\r\n [type]=\"type()\"\r\n [value]=\"value()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"isDisabled()\"\r\n (input)=\"onInput($event)\"\r\n (blur)=\"onBlur()\"\r\n [class.border-rose-300]=\"error()\"\r\n [class.focus:ring-rose-500]=\"error()\"\r\n [class.focus:border-rose-500]=\"error()\"\r\n [class.border-gray-200]=\"!error()\"\r\n [class.focus:ring-indigo-500]=\"!error()\"\r\n [class.focus:border-indigo-500]=\"!error()\"\r\n class=\"w-full px-3 py-2 bg-white border-2 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\r\n />\r\n @if (error()) {\r\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
942
|
+
}
|
|
943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TextInputComponent, decorators: [{
|
|
944
|
+
type: Component,
|
|
945
|
+
args: [{ selector: 'wdc-text-input', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
946
|
+
{
|
|
947
|
+
provide: NG_VALUE_ACCESSOR,
|
|
948
|
+
useExisting: forwardRef(() => TextInputComponent),
|
|
949
|
+
multi: true,
|
|
950
|
+
},
|
|
951
|
+
], template: "<div class=\"w-full\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n <input\r\n [type]=\"type()\"\r\n [value]=\"value()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"isDisabled()\"\r\n (input)=\"onInput($event)\"\r\n (blur)=\"onBlur()\"\r\n [class.border-rose-300]=\"error()\"\r\n [class.focus:ring-rose-500]=\"error()\"\r\n [class.focus:border-rose-500]=\"error()\"\r\n [class.border-gray-200]=\"!error()\"\r\n [class.focus:ring-indigo-500]=\"!error()\"\r\n [class.focus:border-indigo-500]=\"!error()\"\r\n class=\"w-full px-3 py-2 bg-white border-2 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\r\n />\r\n @if (error()) {\r\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\r\n }\r\n</div>\r\n" }]
|
|
952
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], disabled: [{
|
|
953
|
+
type: Input
|
|
954
|
+
}] } });
|
|
955
|
+
|
|
956
|
+
class SelectInputComponent {
|
|
957
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
958
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
959
|
+
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
960
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
961
|
+
searchable = input(false, ...(ngDevMode ? [{ debugName: "searchable" }] : []));
|
|
962
|
+
placeholder = input('Select an option', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
963
|
+
// State
|
|
964
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : [])); // Single value or Array
|
|
965
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
966
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
967
|
+
searchTerm = signal('', ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
968
|
+
// Computed
|
|
969
|
+
filteredOptions = computed(() => {
|
|
970
|
+
const term = this.searchTerm().toLowerCase();
|
|
971
|
+
const opts = this.options();
|
|
972
|
+
if (!term)
|
|
973
|
+
return opts;
|
|
974
|
+
return opts.filter((o) => o.label.toLowerCase().includes(term));
|
|
975
|
+
}, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
|
|
976
|
+
displayValue = computed(() => {
|
|
977
|
+
const val = this.value();
|
|
978
|
+
const opts = this.options();
|
|
979
|
+
if (this.multiple()) {
|
|
980
|
+
if (!Array.isArray(val) || val.length === 0)
|
|
981
|
+
return '';
|
|
982
|
+
return val.map((v) => opts.find((o) => o.value == v)?.label || v).join(', ');
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
return opts.find((o) => o.value == val)?.label || '';
|
|
986
|
+
}
|
|
987
|
+
}, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
|
|
988
|
+
selectedLabels = computed(() => {
|
|
989
|
+
if (!this.multiple() || !Array.isArray(this.value()))
|
|
990
|
+
return [];
|
|
991
|
+
const opts = this.options();
|
|
992
|
+
return this.value().map((v) => ({
|
|
993
|
+
value: v,
|
|
994
|
+
label: opts.find((o) => o.value == v)?.label || v,
|
|
995
|
+
}));
|
|
996
|
+
}, ...(ngDevMode ? [{ debugName: "selectedLabels" }] : []));
|
|
997
|
+
onChange = (value) => { };
|
|
998
|
+
onTouched = () => { };
|
|
999
|
+
toggleDropdown() {
|
|
1000
|
+
if (this.disabled())
|
|
1001
|
+
return;
|
|
1002
|
+
this.isOpen.update((v) => !v);
|
|
1003
|
+
if (this.isOpen()) {
|
|
1004
|
+
this.searchTerm.set(''); // Reset search on open
|
|
1005
|
+
}
|
|
1006
|
+
else {
|
|
1007
|
+
this.onTouched();
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
closeDropdown() {
|
|
1011
|
+
this.isOpen.set(false);
|
|
1012
|
+
this.onTouched();
|
|
1013
|
+
}
|
|
1014
|
+
selectOption(optValue) {
|
|
1015
|
+
if (this.multiple()) {
|
|
1016
|
+
const current = Array.isArray(this.value()) ? [...this.value()] : [];
|
|
1017
|
+
const index = current.indexOf(optValue);
|
|
1018
|
+
if (index > -1) {
|
|
1019
|
+
current.splice(index, 1);
|
|
1020
|
+
}
|
|
1021
|
+
else {
|
|
1022
|
+
current.push(optValue);
|
|
1023
|
+
}
|
|
1024
|
+
this.value.set(current);
|
|
1025
|
+
this.onChange(current);
|
|
1026
|
+
}
|
|
1027
|
+
else {
|
|
1028
|
+
this.value.set(optValue);
|
|
1029
|
+
this.onChange(optValue);
|
|
1030
|
+
this.closeDropdown();
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
isSelected(optValue) {
|
|
1034
|
+
if (this.multiple()) {
|
|
1035
|
+
return Array.isArray(this.value()) && this.value().includes(optValue);
|
|
1036
|
+
}
|
|
1037
|
+
return this.value() == optValue; // Loose equality for number/string mix
|
|
1038
|
+
}
|
|
1039
|
+
removeValue(optValue, event) {
|
|
1040
|
+
event.stopPropagation();
|
|
1041
|
+
if (this.disabled())
|
|
1042
|
+
return;
|
|
1043
|
+
const current = [...this.value()];
|
|
1044
|
+
const index = current.indexOf(optValue);
|
|
1045
|
+
if (index > -1) {
|
|
1046
|
+
current.splice(index, 1);
|
|
1047
|
+
this.value.set(current);
|
|
1048
|
+
this.onChange(current);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
// CVA Implementation
|
|
1052
|
+
writeValue(value) {
|
|
1053
|
+
if (this.multiple() && !Array.isArray(value)) {
|
|
1054
|
+
this.value.set(value ? [value] : []);
|
|
1055
|
+
}
|
|
1056
|
+
else {
|
|
1057
|
+
this.value.set(value);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
registerOnChange(fn) {
|
|
1061
|
+
this.onChange = fn;
|
|
1062
|
+
}
|
|
1063
|
+
registerOnTouched(fn) {
|
|
1064
|
+
this.onTouched = fn;
|
|
1065
|
+
}
|
|
1066
|
+
setDisabledState(isDisabled) {
|
|
1067
|
+
this.disabled.set(isDisabled);
|
|
1068
|
+
}
|
|
1069
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1070
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: SelectInputComponent, isStandalone: true, selector: "wdc-select-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1071
|
+
{
|
|
1072
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1073
|
+
useExisting: forwardRef(() => SelectInputComponent),
|
|
1074
|
+
multi: true,
|
|
1075
|
+
},
|
|
1076
|
+
], ngImport: i0, template: "<div class=\"w-full relative\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n\r\n <!-- Trigger -->\r\n <div\r\n (click)=\"toggleDropdown()\"\r\n [class.border-rose-300]=\"error()\"\r\n [class.focus-within:border-rose-500]=\"error()\"\r\n [class.border-gray-200]=\"!error()\"\r\n [class.focus-within:border-indigo-500]=\"!error()\"\r\n class=\"relative w-full min-h-[42px] px-3 py-2 border-2 rounded-lg bg-white cursor-pointer transition-all flex items-center justify-between gap-2 focus-within:ring-0\"\r\n [class.opacity-60]=\"disabled()\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.border-indigo-500]=\"isOpen() && !error()\"\r\n >\r\n <div class=\"flex-1 flex flex-wrap gap-1.5 items-center overflow-hidden\">\r\n @if (multiple() && selectedLabels().length > 0) {\r\n @for (item of selectedLabels(); track item.value) {\r\n <span\r\n class=\"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-indigo-50 text-indigo-700 border border-indigo-100\"\r\n >\r\n {{ item.label }}\r\n <button\r\n (click)=\"removeValue(item.value, $event)\"\r\n type=\"button\"\r\n class=\"ml-1 text-indigo-400 hover:text-indigo-900 focus:outline-none\"\r\n >\r\n <svg class=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\"\r\n ></path>\r\n </svg>\r\n </button>\r\n </span>\r\n }\r\n } @else if (!multiple() && displayValue()) {\r\n <span class=\"text-gray-900 text-sm truncate\">{{ displayValue() }}</span>\r\n } @else {\r\n <span class=\"text-gray-400 text-sm\">{{ placeholder() }}</span>\r\n }\r\n </div>\r\n\r\n <!-- Arrow -->\r\n <svg\r\n [class.rotate-180]=\"isOpen()\"\r\n class=\"w-4 h-4 text-gray-500 transition-transform duration-200 shrink-0\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M19 9l-7 7-7-7\"\r\n ></path>\r\n </svg>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n @if (error()) {\r\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\r\n }\r\n\r\n <!-- Dropdown -->\r\n @if (isOpen()) {\r\n <!-- Backdrop for click outside -->\r\n <div\r\n (click)=\"closeDropdown()\"\r\n class=\"fixed inset-0 z-10 cursor-default\"\r\n style=\"background: transparent\"\r\n ></div>\r\n\r\n <div\r\n class=\"absolute z-20 mt-1 w-full bg-white rounded-xl border-2 border-gray-100 shadow-xl py-1 overflow-hidden animate-in fade-in zoom-in-95 duration-100 origin-top\"\r\n >\r\n <!-- Search Input -->\r\n @if (searchable() || options().length > 10) {\r\n <div class=\"px-2 pb-2 pt-2 border-b border-gray-100\">\r\n <input\r\n type=\"text\"\r\n [ngModel]=\"searchTerm()\"\r\n (ngModelChange)=\"searchTerm.set($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n placeholder=\"Search options...\"\r\n class=\"w-full px-3 py-1.5 text-sm border-2 border-gray-200 rounded-md focus:outline-none focus:border-indigo-500 transition-colors\"\r\n autoFocus\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Options List -->\r\n <div class=\"max-h-60 overflow-y-auto\">\r\n @for (opt of filteredOptions(); track opt.value) {\r\n <div\r\n (click)=\"selectOption(opt.value)\"\r\n class=\"px-4 py-2 text-sm text-gray-700 hover:bg-indigo-50 hover:text-indigo-700 cursor-pointer flex items-center justify-between group transition-colors\"\r\n [class.bg-indigo-50]=\"isSelected(opt.value)\"\r\n [class.text-indigo-700]=\"isSelected(opt.value)\"\r\n >\r\n <span>{{ opt.label }}</span>\r\n\r\n @if (isSelected(opt.value)) {\r\n <svg\r\n class=\"w-4 h-4 text-indigo-600\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M5 13l4 4L19 7\"\r\n ></path>\r\n </svg>\r\n }\r\n </div>\r\n } @empty {\r\n <div class=\"px-4 py-3 text-sm text-gray-400 text-center\">No options found.</div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1077
|
+
}
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: SelectInputComponent, decorators: [{
|
|
1079
|
+
type: Component,
|
|
1080
|
+
args: [{ selector: 'wdc-select-input', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1081
|
+
{
|
|
1082
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1083
|
+
useExisting: forwardRef(() => SelectInputComponent),
|
|
1084
|
+
multi: true,
|
|
1085
|
+
},
|
|
1086
|
+
], template: "<div class=\"w-full relative\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n\r\n <!-- Trigger -->\r\n <div\r\n (click)=\"toggleDropdown()\"\r\n [class.border-rose-300]=\"error()\"\r\n [class.focus-within:border-rose-500]=\"error()\"\r\n [class.border-gray-200]=\"!error()\"\r\n [class.focus-within:border-indigo-500]=\"!error()\"\r\n class=\"relative w-full min-h-[42px] px-3 py-2 border-2 rounded-lg bg-white cursor-pointer transition-all flex items-center justify-between gap-2 focus-within:ring-0\"\r\n [class.opacity-60]=\"disabled()\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.border-indigo-500]=\"isOpen() && !error()\"\r\n >\r\n <div class=\"flex-1 flex flex-wrap gap-1.5 items-center overflow-hidden\">\r\n @if (multiple() && selectedLabels().length > 0) {\r\n @for (item of selectedLabels(); track item.value) {\r\n <span\r\n class=\"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-indigo-50 text-indigo-700 border border-indigo-100\"\r\n >\r\n {{ item.label }}\r\n <button\r\n (click)=\"removeValue(item.value, $event)\"\r\n type=\"button\"\r\n class=\"ml-1 text-indigo-400 hover:text-indigo-900 focus:outline-none\"\r\n >\r\n <svg class=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\"\r\n ></path>\r\n </svg>\r\n </button>\r\n </span>\r\n }\r\n } @else if (!multiple() && displayValue()) {\r\n <span class=\"text-gray-900 text-sm truncate\">{{ displayValue() }}</span>\r\n } @else {\r\n <span class=\"text-gray-400 text-sm\">{{ placeholder() }}</span>\r\n }\r\n </div>\r\n\r\n <!-- Arrow -->\r\n <svg\r\n [class.rotate-180]=\"isOpen()\"\r\n class=\"w-4 h-4 text-gray-500 transition-transform duration-200 shrink-0\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M19 9l-7 7-7-7\"\r\n ></path>\r\n </svg>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n @if (error()) {\r\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\r\n }\r\n\r\n <!-- Dropdown -->\r\n @if (isOpen()) {\r\n <!-- Backdrop for click outside -->\r\n <div\r\n (click)=\"closeDropdown()\"\r\n class=\"fixed inset-0 z-10 cursor-default\"\r\n style=\"background: transparent\"\r\n ></div>\r\n\r\n <div\r\n class=\"absolute z-20 mt-1 w-full bg-white rounded-xl border-2 border-gray-100 shadow-xl py-1 overflow-hidden animate-in fade-in zoom-in-95 duration-100 origin-top\"\r\n >\r\n <!-- Search Input -->\r\n @if (searchable() || options().length > 10) {\r\n <div class=\"px-2 pb-2 pt-2 border-b border-gray-100\">\r\n <input\r\n type=\"text\"\r\n [ngModel]=\"searchTerm()\"\r\n (ngModelChange)=\"searchTerm.set($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n placeholder=\"Search options...\"\r\n class=\"w-full px-3 py-1.5 text-sm border-2 border-gray-200 rounded-md focus:outline-none focus:border-indigo-500 transition-colors\"\r\n autoFocus\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Options List -->\r\n <div class=\"max-h-60 overflow-y-auto\">\r\n @for (opt of filteredOptions(); track opt.value) {\r\n <div\r\n (click)=\"selectOption(opt.value)\"\r\n class=\"px-4 py-2 text-sm text-gray-700 hover:bg-indigo-50 hover:text-indigo-700 cursor-pointer flex items-center justify-between group transition-colors\"\r\n [class.bg-indigo-50]=\"isSelected(opt.value)\"\r\n [class.text-indigo-700]=\"isSelected(opt.value)\"\r\n >\r\n <span>{{ opt.label }}</span>\r\n\r\n @if (isSelected(opt.value)) {\r\n <svg\r\n class=\"w-4 h-4 text-indigo-600\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M5 13l4 4L19 7\"\r\n ></path>\r\n </svg>\r\n }\r\n </div>\r\n } @empty {\r\n <div class=\"px-4 py-3 text-sm text-gray-400 text-center\">No options found.</div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
1087
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
|
|
1088
|
+
|
|
1089
|
+
class CheckboxInputComponent {
|
|
1090
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1091
|
+
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
|
|
1092
|
+
value = signal(false, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1093
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1094
|
+
onChange = (value) => { };
|
|
1095
|
+
onTouched = () => { };
|
|
1096
|
+
onInput(event) {
|
|
1097
|
+
const val = event.target.checked;
|
|
1098
|
+
this.value.set(val);
|
|
1099
|
+
this.onChange(val);
|
|
1100
|
+
}
|
|
1101
|
+
toggle() {
|
|
1102
|
+
if (this.disabled())
|
|
1103
|
+
return;
|
|
1104
|
+
const newVal = !this.value();
|
|
1105
|
+
this.value.set(newVal);
|
|
1106
|
+
this.onChange(newVal);
|
|
1107
|
+
this.onTouched();
|
|
1108
|
+
}
|
|
1109
|
+
writeValue(value) {
|
|
1110
|
+
this.value.set(!!value);
|
|
1111
|
+
}
|
|
1112
|
+
registerOnChange(fn) {
|
|
1113
|
+
this.onChange = fn;
|
|
1114
|
+
}
|
|
1115
|
+
registerOnTouched(fn) {
|
|
1116
|
+
this.onTouched = fn;
|
|
1117
|
+
}
|
|
1118
|
+
setDisabledState(isDisabled) {
|
|
1119
|
+
this.disabled.set(isDisabled);
|
|
1120
|
+
}
|
|
1121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CheckboxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: CheckboxInputComponent, isStandalone: true, selector: "wdc-checkbox-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1123
|
+
{
|
|
1124
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1125
|
+
useExisting: forwardRef(() => CheckboxInputComponent),
|
|
1126
|
+
multi: true,
|
|
1127
|
+
},
|
|
1128
|
+
], ngImport: i0, template: "<div class=\"flex items-center group\">\r\n <!-- Hidden native input for form accessibility -->\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"value()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"onInput($event)\"\r\n (blur)=\"onTouched()\"\r\n class=\"sr-only\"\r\n />\r\n\r\n <!-- Custom Checkbox UI -->\r\n <div\r\n (click)=\"toggle()\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n class=\"w-5 h-5 rounded border flex items-center justify-center transition-all duration-200\"\r\n [class.bg-indigo-600]=\"(value() || indeterminate()) && !disabled()\"\r\n [class.border-indigo-600]=\"(value() || indeterminate()) && !disabled()\"\r\n [class.bg-gray-100]=\"disabled()\"\r\n [class.border-gray-200]=\"disabled()\"\r\n [class.bg-white]=\"!value() && !indeterminate() && !disabled()\"\r\n [class.border-gray-300]=\"!value() && !indeterminate() && !disabled()\"\r\n [class.group-hover:border-indigo-400]=\"!value() && !indeterminate() && !disabled()\"\r\n >\r\n @if (indeterminate()) {\r\n <!-- Indeterminate Dash -->\r\n <svg class=\"w-3.5 h-3.5 text-white\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"3\" d=\"M20 12H4\"></path>\r\n </svg>\r\n } @else if (value()) {\r\n <!-- Checkmark -->\r\n <svg class=\"w-3.5 h-3.5 text-white\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"3\"\r\n d=\"M5 13l4 4L19 7\"\r\n ></path>\r\n </svg>\r\n }\r\n </div>\r\n\r\n @if (label()) {\r\n <label\r\n (click)=\"toggle()\"\r\n class=\"ml-3 block text-sm text-gray-700 select-none transition-colors\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n [class.opacity-50]=\"disabled()\"\r\n [class.text-gray-900]=\"value()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1129
|
+
}
|
|
1130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: CheckboxInputComponent, decorators: [{
|
|
1131
|
+
type: Component,
|
|
1132
|
+
args: [{ selector: 'wdc-checkbox-input', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1133
|
+
{
|
|
1134
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1135
|
+
useExisting: forwardRef(() => CheckboxInputComponent),
|
|
1136
|
+
multi: true,
|
|
1137
|
+
},
|
|
1138
|
+
], template: "<div class=\"flex items-center group\">\r\n <!-- Hidden native input for form accessibility -->\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"value()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"onInput($event)\"\r\n (blur)=\"onTouched()\"\r\n class=\"sr-only\"\r\n />\r\n\r\n <!-- Custom Checkbox UI -->\r\n <div\r\n (click)=\"toggle()\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n class=\"w-5 h-5 rounded border flex items-center justify-center transition-all duration-200\"\r\n [class.bg-indigo-600]=\"(value() || indeterminate()) && !disabled()\"\r\n [class.border-indigo-600]=\"(value() || indeterminate()) && !disabled()\"\r\n [class.bg-gray-100]=\"disabled()\"\r\n [class.border-gray-200]=\"disabled()\"\r\n [class.bg-white]=\"!value() && !indeterminate() && !disabled()\"\r\n [class.border-gray-300]=\"!value() && !indeterminate() && !disabled()\"\r\n [class.group-hover:border-indigo-400]=\"!value() && !indeterminate() && !disabled()\"\r\n >\r\n @if (indeterminate()) {\r\n <!-- Indeterminate Dash -->\r\n <svg class=\"w-3.5 h-3.5 text-white\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"3\" d=\"M20 12H4\"></path>\r\n </svg>\r\n } @else if (value()) {\r\n <!-- Checkmark -->\r\n <svg class=\"w-3.5 h-3.5 text-white\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"3\"\r\n d=\"M5 13l4 4L19 7\"\r\n ></path>\r\n </svg>\r\n }\r\n </div>\r\n\r\n @if (label()) {\r\n <label\r\n (click)=\"toggle()\"\r\n class=\"ml-3 block text-sm text-gray-700 select-none transition-colors\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n [class.opacity-50]=\"disabled()\"\r\n [class.text-gray-900]=\"value()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n</div>\r\n" }]
|
|
1139
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }] } });
|
|
1140
|
+
|
|
1141
|
+
class RadioInputComponent {
|
|
1142
|
+
options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
1143
|
+
name = input('radio-group-' + Math.random(), ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
1144
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1145
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1146
|
+
onChange = (value) => { };
|
|
1147
|
+
onTouched = () => { };
|
|
1148
|
+
select(val) {
|
|
1149
|
+
if (this.disabled())
|
|
1150
|
+
return;
|
|
1151
|
+
this.value.set(val);
|
|
1152
|
+
this.onChange(val);
|
|
1153
|
+
this.onTouched();
|
|
1154
|
+
}
|
|
1155
|
+
writeValue(value) {
|
|
1156
|
+
this.value.set(value);
|
|
1157
|
+
}
|
|
1158
|
+
registerOnChange(fn) {
|
|
1159
|
+
this.onChange = fn;
|
|
1160
|
+
}
|
|
1161
|
+
registerOnTouched(fn) {
|
|
1162
|
+
this.onTouched = fn;
|
|
1163
|
+
}
|
|
1164
|
+
setDisabledState(isDisabled) {
|
|
1165
|
+
this.disabled.set(isDisabled);
|
|
1166
|
+
}
|
|
1167
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: RadioInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: RadioInputComponent, isStandalone: true, selector: "wdc-radio-input", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1169
|
+
{
|
|
1170
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1171
|
+
useExisting: forwardRef(() => RadioInputComponent),
|
|
1172
|
+
multi: true,
|
|
1173
|
+
},
|
|
1174
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\r\n @for (option of options(); track option.value) {\r\n <div class=\"flex items-center group\">\r\n <!-- Hidden native input -->\r\n <input\r\n type=\"radio\"\r\n [name]=\"name()\"\r\n [checked]=\"value() === option.value\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"select(option.value)\"\r\n class=\"sr-only\"\r\n />\r\n\r\n <!-- Custom Radio UI -->\r\n <div\r\n (click)=\"!disabled() && select(option.value)\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n class=\"w-5 h-5 rounded-full border flex items-center justify-center transition-all duration-200 relative\"\r\n [class.border-indigo-600]=\"value() === option.value && !disabled()\"\r\n [class.border-gray-300]=\"value() !== option.value && !disabled()\"\r\n [class.border-gray-200]=\"disabled()\"\r\n [class.bg-white]=\"!disabled()\"\r\n [class.bg-gray-100]=\"disabled()\"\r\n [class.group-hover:border-indigo-400]=\"value() !== option.value && !disabled()\"\r\n >\r\n <!-- Inner Dot -->\r\n <div\r\n class=\"w-2.5 h-2.5 rounded-full bg-indigo-600 transition-transform duration-200 transform scale-0\"\r\n [class.scale-100]=\"value() === option.value\"\r\n [class.bg-gray-400]=\"disabled()\"\r\n ></div>\r\n </div>\r\n\r\n <label\r\n (click)=\"!disabled() && select(option.value)\"\r\n class=\"ml-3 block text-sm text-gray-700 cursor-pointer select-none transition-colors\"\r\n [class.opacity-50]=\"disabled()\"\r\n [class.text-indigo-900]=\"value() === option.value && !disabled()\"\r\n [class.font-medium]=\"value() === option.value\"\r\n >\r\n {{ option.label }}\r\n </label>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1175
|
+
}
|
|
1176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: RadioInputComponent, decorators: [{
|
|
1177
|
+
type: Component,
|
|
1178
|
+
args: [{ selector: 'wdc-radio-input', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1179
|
+
{
|
|
1180
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1181
|
+
useExisting: forwardRef(() => RadioInputComponent),
|
|
1182
|
+
multi: true,
|
|
1183
|
+
},
|
|
1184
|
+
], template: "<div class=\"flex flex-col gap-3\">\r\n @for (option of options(); track option.value) {\r\n <div class=\"flex items-center group\">\r\n <!-- Hidden native input -->\r\n <input\r\n type=\"radio\"\r\n [name]=\"name()\"\r\n [checked]=\"value() === option.value\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"select(option.value)\"\r\n class=\"sr-only\"\r\n />\r\n\r\n <!-- Custom Radio UI -->\r\n <div\r\n (click)=\"!disabled() && select(option.value)\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n class=\"w-5 h-5 rounded-full border flex items-center justify-center transition-all duration-200 relative\"\r\n [class.border-indigo-600]=\"value() === option.value && !disabled()\"\r\n [class.border-gray-300]=\"value() !== option.value && !disabled()\"\r\n [class.border-gray-200]=\"disabled()\"\r\n [class.bg-white]=\"!disabled()\"\r\n [class.bg-gray-100]=\"disabled()\"\r\n [class.group-hover:border-indigo-400]=\"value() !== option.value && !disabled()\"\r\n >\r\n <!-- Inner Dot -->\r\n <div\r\n class=\"w-2.5 h-2.5 rounded-full bg-indigo-600 transition-transform duration-200 transform scale-0\"\r\n [class.scale-100]=\"value() === option.value\"\r\n [class.bg-gray-400]=\"disabled()\"\r\n ></div>\r\n </div>\r\n\r\n <label\r\n (click)=\"!disabled() && select(option.value)\"\r\n class=\"ml-3 block text-sm text-gray-700 cursor-pointer select-none transition-colors\"\r\n [class.opacity-50]=\"disabled()\"\r\n [class.text-indigo-900]=\"value() === option.value && !disabled()\"\r\n [class.font-medium]=\"value() === option.value\"\r\n >\r\n {{ option.label }}\r\n </label>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
1185
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
|
|
1186
|
+
|
|
1187
|
+
class SwitchInputComponent {
|
|
1188
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1189
|
+
description = input('', ...(ngDevMode ? [{ debugName: "description" }] : []));
|
|
1190
|
+
value = signal(false, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1191
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1192
|
+
onChange = (value) => { };
|
|
1193
|
+
onTouched = () => { };
|
|
1194
|
+
toggle() {
|
|
1195
|
+
if (this.disabled())
|
|
1196
|
+
return;
|
|
1197
|
+
const newVal = !this.value();
|
|
1198
|
+
this.value.set(newVal);
|
|
1199
|
+
this.onChange(newVal);
|
|
1200
|
+
this.onTouched();
|
|
1201
|
+
}
|
|
1202
|
+
writeValue(value) {
|
|
1203
|
+
this.value.set(!!value);
|
|
1204
|
+
}
|
|
1205
|
+
registerOnChange(fn) {
|
|
1206
|
+
this.onChange = fn;
|
|
1207
|
+
}
|
|
1208
|
+
registerOnTouched(fn) {
|
|
1209
|
+
this.onTouched = fn;
|
|
1210
|
+
}
|
|
1211
|
+
setDisabledState(isDisabled) {
|
|
1212
|
+
this.disabled.set(isDisabled);
|
|
1213
|
+
}
|
|
1214
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: SwitchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1215
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: SwitchInputComponent, isStandalone: true, selector: "wdc-switch-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1216
|
+
{
|
|
1217
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1218
|
+
useExisting: forwardRef(() => SwitchInputComponent),
|
|
1219
|
+
multi: true,
|
|
1220
|
+
},
|
|
1221
|
+
], ngImport: i0, template: "<div class=\"flex items-center justify-between\">\r\n <div>\r\n @if (label()) {\r\n <h4 class=\"text-sm font-medium text-gray-900\">{{ label() }}</h4>\r\n }\r\n @if (description()) {\r\n <p class=\"text-sm text-gray-500\">{{ description() }}</p>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n (click)=\"toggle()\"\r\n [disabled]=\"disabled()\"\r\n [class.bg-indigo-600]=\"value()\"\r\n [class.bg-gray-200]=\"!value()\"\r\n [class.opacity-50]=\"disabled()\"\r\n class=\"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none\"\r\n >\r\n <span\r\n [class.translate-x-5]=\"value()\"\r\n [class.translate-x-0]=\"!value()\"\r\n class=\"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out\"\r\n >\r\n </span>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1222
|
+
}
|
|
1223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: SwitchInputComponent, decorators: [{
|
|
1224
|
+
type: Component,
|
|
1225
|
+
args: [{ selector: 'wdc-switch-input', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1226
|
+
{
|
|
1227
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1228
|
+
useExisting: forwardRef(() => SwitchInputComponent),
|
|
1229
|
+
multi: true,
|
|
1230
|
+
},
|
|
1231
|
+
], template: "<div class=\"flex items-center justify-between\">\r\n <div>\r\n @if (label()) {\r\n <h4 class=\"text-sm font-medium text-gray-900\">{{ label() }}</h4>\r\n }\r\n @if (description()) {\r\n <p class=\"text-sm text-gray-500\">{{ description() }}</p>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n (click)=\"toggle()\"\r\n [disabled]=\"disabled()\"\r\n [class.bg-indigo-600]=\"value()\"\r\n [class.bg-gray-200]=\"!value()\"\r\n [class.opacity-50]=\"disabled()\"\r\n class=\"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none\"\r\n >\r\n <span\r\n [class.translate-x-5]=\"value()\"\r\n [class.translate-x-0]=\"!value()\"\r\n class=\"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out\"\r\n >\r\n </span>\r\n </button>\r\n</div>\r\n" }]
|
|
1232
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
1233
|
+
|
|
1234
|
+
class TextareaInputComponent {
|
|
1235
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1236
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
1237
|
+
rows = input(3, ...(ngDevMode ? [{ debugName: "rows" }] : []));
|
|
1238
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1239
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
1240
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1241
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1242
|
+
onChange = (value) => { };
|
|
1243
|
+
onTouched = () => { };
|
|
1244
|
+
onInput(event) {
|
|
1245
|
+
const val = event.target.value;
|
|
1246
|
+
this.value.set(val);
|
|
1247
|
+
this.onChange(val);
|
|
1248
|
+
}
|
|
1249
|
+
onBlur() {
|
|
1250
|
+
this.onTouched();
|
|
1251
|
+
}
|
|
1252
|
+
writeValue(value) {
|
|
1253
|
+
this.value.set(value || '');
|
|
1254
|
+
}
|
|
1255
|
+
registerOnChange(fn) {
|
|
1256
|
+
this.onChange = fn;
|
|
1257
|
+
}
|
|
1258
|
+
registerOnTouched(fn) {
|
|
1259
|
+
this.onTouched = fn;
|
|
1260
|
+
}
|
|
1261
|
+
setDisabledState(isDisabled) {
|
|
1262
|
+
this.disabled.set(isDisabled);
|
|
1263
|
+
}
|
|
1264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TextareaInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1265
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: TextareaInputComponent, isStandalone: true, selector: "wdc-textarea-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1266
|
+
{
|
|
1267
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1268
|
+
useExisting: forwardRef(() => TextareaInputComponent),
|
|
1269
|
+
multi: true,
|
|
1270
|
+
},
|
|
1271
|
+
], ngImport: i0, template: "<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n <textarea\n [rows]=\"rows()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [class.border-rose-300]=\"error()\"\n [class.focus:ring-rose-500]=\"error()\"\n [class.focus:border-rose-500]=\"error()\"\n [class.border-gray-200]=\"!error()\"\n [class.focus:ring-indigo-500]=\"!error()\"\n [class.focus:border-indigo-500]=\"!error()\"\n class=\"w-full px-3 py-2 bg-white border-2 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\n ></textarea>\n @if (error()) {\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\n }\n @if (hint() && !error()) {\n <p class=\"mt-1 text-xs text-gray-500\">{{ hint() }}</p>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1272
|
+
}
|
|
1273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: TextareaInputComponent, decorators: [{
|
|
1274
|
+
type: Component,
|
|
1275
|
+
args: [{ selector: 'wdc-textarea-input', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1276
|
+
{
|
|
1277
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1278
|
+
useExisting: forwardRef(() => TextareaInputComponent),
|
|
1279
|
+
multi: true,
|
|
1280
|
+
},
|
|
1281
|
+
], template: "<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n <textarea\n [rows]=\"rows()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [class.border-rose-300]=\"error()\"\n [class.focus:ring-rose-500]=\"error()\"\n [class.focus:border-rose-500]=\"error()\"\n [class.border-gray-200]=\"!error()\"\n [class.focus:ring-indigo-500]=\"!error()\"\n [class.focus:border-indigo-500]=\"!error()\"\n class=\"w-full px-3 py-2 bg-white border-2 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\n ></textarea>\n @if (error()) {\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\n }\n @if (hint() && !error()) {\n <p class=\"mt-1 text-xs text-gray-500\">{{ hint() }}</p>\n }\n</div>\n" }]
|
|
1282
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }] } });
|
|
1283
|
+
|
|
1284
|
+
class FileInputComponent {
|
|
1285
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1286
|
+
accept = input('*/*', ...(ngDevMode ? [{ debugName: "accept" }] : []));
|
|
1287
|
+
fileName = signal(null, ...(ngDevMode ? [{ debugName: "fileName" }] : []));
|
|
1288
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1289
|
+
isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
1290
|
+
onChange = (value) => { };
|
|
1291
|
+
onTouched = () => { };
|
|
1292
|
+
onFileSelected(event) {
|
|
1293
|
+
const input = event.target;
|
|
1294
|
+
if (input.files && input.files.length > 0) {
|
|
1295
|
+
const file = input.files[0];
|
|
1296
|
+
this.handleFile(file);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
onDragOver(event) {
|
|
1300
|
+
event.preventDefault();
|
|
1301
|
+
event.stopPropagation();
|
|
1302
|
+
if (!this.disabled()) {
|
|
1303
|
+
this.isDragging.set(true);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
onDragLeave(event) {
|
|
1307
|
+
event.preventDefault();
|
|
1308
|
+
event.stopPropagation();
|
|
1309
|
+
this.isDragging.set(false);
|
|
1310
|
+
}
|
|
1311
|
+
onDrop(event) {
|
|
1312
|
+
event.preventDefault();
|
|
1313
|
+
event.stopPropagation();
|
|
1314
|
+
this.isDragging.set(false);
|
|
1315
|
+
if (this.disabled())
|
|
1316
|
+
return;
|
|
1317
|
+
if (event.dataTransfer && event.dataTransfer.files.length > 0) {
|
|
1318
|
+
this.handleFile(event.dataTransfer.files[0]);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
handleFile(file) {
|
|
1322
|
+
this.fileName.set(file.name);
|
|
1323
|
+
this.onChange(file);
|
|
1324
|
+
this.onTouched();
|
|
1325
|
+
}
|
|
1326
|
+
clear(event) {
|
|
1327
|
+
event.stopPropagation();
|
|
1328
|
+
this.fileName.set(null);
|
|
1329
|
+
this.onChange(null);
|
|
1330
|
+
}
|
|
1331
|
+
writeValue(value) {
|
|
1332
|
+
// If we were handling real files, we might set a preview URL here.
|
|
1333
|
+
// For now, we assume null or File object.
|
|
1334
|
+
if (!value)
|
|
1335
|
+
this.fileName.set(null);
|
|
1336
|
+
}
|
|
1337
|
+
registerOnChange(fn) {
|
|
1338
|
+
this.onChange = fn;
|
|
1339
|
+
}
|
|
1340
|
+
registerOnTouched(fn) {
|
|
1341
|
+
this.onTouched = fn;
|
|
1342
|
+
}
|
|
1343
|
+
setDisabledState(isDisabled) {
|
|
1344
|
+
this.disabled.set(isDisabled);
|
|
1345
|
+
}
|
|
1346
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: FileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1347
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: FileInputComponent, isStandalone: true, selector: "wdc-file-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1348
|
+
{
|
|
1349
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1350
|
+
useExisting: forwardRef(() => FileInputComponent),
|
|
1351
|
+
multi: true,
|
|
1352
|
+
},
|
|
1353
|
+
], ngImport: i0, template: "<div class=\"w-full\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n\r\n <div\r\n class=\"relative flex items-center justify-center w-full border-2 border-dashed rounded-lg p-6 transition-colors\"\r\n [class.border-indigo-400]=\"isDragging()\"\r\n [class.bg-indigo-50]=\"isDragging()\"\r\n [class.border-gray-300]=\"!isDragging() && !disabled()\"\r\n [class.bg-white]=\"!isDragging() && !disabled()\"\r\n [class.bg-gray-100]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n >\r\n <input\r\n type=\"file\"\r\n [accept]=\"accept()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"onFileSelected($event)\"\r\n class=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed\"\r\n />\r\n\r\n <div class=\"text-center pointer-events-none\">\r\n @if (fileName()) {\r\n <div class=\"flex items-center gap-2 text-indigo-600\">\r\n <svg class=\"w-8 h-8 mx-auto mb-2\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\"\r\n ></path>\r\n </svg>\r\n <span class=\"font-medium text-sm truncate max-w-[200px]\">{{ fileName() }}</span>\r\n </div>\r\n <p class=\"text-xs text-gray-500 mt-1\">Click to replace or drag new file</p>\r\n } @else {\r\n <svg\r\n class=\"w-10 h-10 mx-auto text-gray-400 mb-2\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12\"\r\n ></path>\r\n </svg>\r\n <p class=\"text-sm text-gray-600\">\r\n <span class=\"font-semibold text-indigo-600\">Click to upload</span> or drag and drop\r\n </p>\r\n <p class=\"text-xs text-gray-500 mt-1\">SVG, PNG, JPG or GIF</p>\r\n }\r\n </div>\r\n\r\n @if (fileName() && !disabled()) {\r\n <button\r\n type=\"button\"\r\n (click)=\"clear($event)\"\r\n class=\"absolute top-2 right-2 p-1 bg-white rounded-full shadow hover:bg-rose-50 text-gray-400 hover:text-rose-600 transition-colors z-10\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\"\r\n ></path>\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1354
|
+
}
|
|
1355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
1356
|
+
type: Component,
|
|
1357
|
+
args: [{ selector: 'wdc-file-input', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1358
|
+
{
|
|
1359
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1360
|
+
useExisting: forwardRef(() => FileInputComponent),
|
|
1361
|
+
multi: true,
|
|
1362
|
+
},
|
|
1363
|
+
], template: "<div class=\"w-full\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n\r\n <div\r\n class=\"relative flex items-center justify-center w-full border-2 border-dashed rounded-lg p-6 transition-colors\"\r\n [class.border-indigo-400]=\"isDragging()\"\r\n [class.bg-indigo-50]=\"isDragging()\"\r\n [class.border-gray-300]=\"!isDragging() && !disabled()\"\r\n [class.bg-white]=\"!isDragging() && !disabled()\"\r\n [class.bg-gray-100]=\"disabled()\"\r\n [class.cursor-pointer]=\"!disabled()\"\r\n [class.cursor-not-allowed]=\"disabled()\"\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n >\r\n <input\r\n type=\"file\"\r\n [accept]=\"accept()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"onFileSelected($event)\"\r\n class=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed\"\r\n />\r\n\r\n <div class=\"text-center pointer-events-none\">\r\n @if (fileName()) {\r\n <div class=\"flex items-center gap-2 text-indigo-600\">\r\n <svg class=\"w-8 h-8 mx-auto mb-2\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\"\r\n ></path>\r\n </svg>\r\n <span class=\"font-medium text-sm truncate max-w-[200px]\">{{ fileName() }}</span>\r\n </div>\r\n <p class=\"text-xs text-gray-500 mt-1\">Click to replace or drag new file</p>\r\n } @else {\r\n <svg\r\n class=\"w-10 h-10 mx-auto text-gray-400 mb-2\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12\"\r\n ></path>\r\n </svg>\r\n <p class=\"text-sm text-gray-600\">\r\n <span class=\"font-semibold text-indigo-600\">Click to upload</span> or drag and drop\r\n </p>\r\n <p class=\"text-xs text-gray-500 mt-1\">SVG, PNG, JPG or GIF</p>\r\n }\r\n </div>\r\n\r\n @if (fileName() && !disabled()) {\r\n <button\r\n type=\"button\"\r\n (click)=\"clear($event)\"\r\n class=\"absolute top-2 right-2 p-1 bg-white rounded-full shadow hover:bg-rose-50 text-gray-400 hover:text-rose-600 transition-colors z-10\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\"\r\n ></path>\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
1364
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }] } });
|
|
1365
|
+
|
|
1366
|
+
class DateInputComponent {
|
|
1367
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1368
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1369
|
+
min = input('', ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
1370
|
+
max = input('', ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
1371
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1372
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1373
|
+
onChange = (value) => { };
|
|
1374
|
+
onTouched = () => { };
|
|
1375
|
+
onInput(event) {
|
|
1376
|
+
const val = event.target.value;
|
|
1377
|
+
this.value.set(val);
|
|
1378
|
+
this.onChange(val);
|
|
1379
|
+
}
|
|
1380
|
+
writeValue(value) {
|
|
1381
|
+
this.value.set(value || '');
|
|
1382
|
+
}
|
|
1383
|
+
registerOnChange(fn) {
|
|
1384
|
+
this.onChange = fn;
|
|
1385
|
+
}
|
|
1386
|
+
registerOnTouched(fn) {
|
|
1387
|
+
this.onTouched = fn;
|
|
1388
|
+
}
|
|
1389
|
+
setDisabledState(isDisabled) {
|
|
1390
|
+
this.disabled.set(isDisabled);
|
|
1391
|
+
}
|
|
1392
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: DateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1393
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: DateInputComponent, isStandalone: true, selector: "wdc-date-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1394
|
+
{
|
|
1395
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1396
|
+
useExisting: forwardRef(() => DateInputComponent),
|
|
1397
|
+
multi: true,
|
|
1398
|
+
},
|
|
1399
|
+
], ngImport: i0, template: "<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n <div class=\"relative\">\n <input\n type=\"date\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [min]=\"min()\"\n [max]=\"max()\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [class.border-rose-300]=\"error()\"\n [class.focus:ring-rose-500]=\"error()\"\n [class.focus:border-rose-500]=\"error()\"\n [class.border-gray-300]=\"!error()\"\n [class.focus:ring-indigo-500]=\"!error()\"\n [class.focus:border-indigo-500]=\"!error()\"\n class=\"w-full px-3 py-2 bg-white border-2 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\n />\n <!-- Calendar Icon overlay for nicer look (pointer-events-none lets click pass to input) -->\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-gray-400\">\n <!-- <svg class=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\"\n ></path>\n </svg> -->\n </div>\n </div>\n @if (error()) {\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1400
|
+
}
|
|
1401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: DateInputComponent, decorators: [{
|
|
1402
|
+
type: Component,
|
|
1403
|
+
args: [{ selector: 'wdc-date-input', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1404
|
+
{
|
|
1405
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1406
|
+
useExisting: forwardRef(() => DateInputComponent),
|
|
1407
|
+
multi: true,
|
|
1408
|
+
},
|
|
1409
|
+
], template: "<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n <div class=\"relative\">\n <input\n type=\"date\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [min]=\"min()\"\n [max]=\"max()\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [class.border-rose-300]=\"error()\"\n [class.focus:ring-rose-500]=\"error()\"\n [class.focus:border-rose-500]=\"error()\"\n [class.border-gray-300]=\"!error()\"\n [class.focus:ring-indigo-500]=\"!error()\"\n [class.focus:border-indigo-500]=\"!error()\"\n class=\"w-full px-3 py-2 bg-white border-2 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\n />\n <!-- Calendar Icon overlay for nicer look (pointer-events-none lets click pass to input) -->\n <div class=\"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-gray-400\">\n <!-- <svg class=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\"\n ></path>\n </svg> -->\n </div>\n </div>\n @if (error()) {\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\n }\n</div>\n" }]
|
|
1410
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
|
|
1411
|
+
|
|
1412
|
+
class RangeInputComponent {
|
|
1413
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1414
|
+
min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
1415
|
+
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
1416
|
+
step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
1417
|
+
unit = input('', ...(ngDevMode ? [{ debugName: "unit" }] : []));
|
|
1418
|
+
value = signal(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1419
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1420
|
+
onChange = (value) => { };
|
|
1421
|
+
onTouched = () => { };
|
|
1422
|
+
onInput(event) {
|
|
1423
|
+
const val = Number(event.target.value);
|
|
1424
|
+
this.value.set(val);
|
|
1425
|
+
this.onChange(val);
|
|
1426
|
+
}
|
|
1427
|
+
writeValue(value) {
|
|
1428
|
+
this.value.set(value || 0);
|
|
1429
|
+
}
|
|
1430
|
+
registerOnChange(fn) {
|
|
1431
|
+
this.onChange = fn;
|
|
1432
|
+
}
|
|
1433
|
+
registerOnTouched(fn) {
|
|
1434
|
+
this.onTouched = fn;
|
|
1435
|
+
}
|
|
1436
|
+
setDisabledState(isDisabled) {
|
|
1437
|
+
this.disabled.set(isDisabled);
|
|
1438
|
+
}
|
|
1439
|
+
get percentage() {
|
|
1440
|
+
return ((this.value() - this.min()) / (this.max() - this.min())) * 100;
|
|
1441
|
+
}
|
|
1442
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: RangeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1443
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: RangeInputComponent, isStandalone: true, selector: "wdc-range-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1444
|
+
{
|
|
1445
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1446
|
+
useExisting: forwardRef(() => RangeInputComponent),
|
|
1447
|
+
multi: true,
|
|
1448
|
+
},
|
|
1449
|
+
], ngImport: i0, template: "\n<div class=\"w-full\">\n <div class=\"flex justify-between items-center mb-1\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700\">{{ label() }}</label>\n }\n <span class=\"text-sm font-medium text-indigo-600\">{{ value() }}{{ unit() }}</span>\n </div>\n \n <div class=\"relative w-full h-6 flex items-center\">\n <!-- Track background -->\n <div class=\"absolute w-full h-2 bg-gray-200 rounded-full overflow-hidden\">\n <!-- Progress fill -->\n <div class=\"h-full bg-indigo-600\" [style.width.%]=\"percentage\"></div>\n </div>\n \n <!-- Native Range Input -->\n <input \n type=\"range\" \n [min]=\"min()\" \n [max]=\"max()\" \n [step]=\"step()\" \n [value]=\"value()\" \n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"absolute w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed z-10\"\n >\n \n <!-- Custom Thumb (Visual only, position calculated) -->\n <div \n class=\"absolute w-4 h-4 bg-white border-2 border-indigo-600 rounded-full shadow pointer-events-none transition-transform active:scale-110\"\n [style.left.%]=\"percentage\"\n [style.transform]=\"'translateX(-50%)'\"\n ></div>\n </div>\n \n <div class=\"flex justify-between text-xs text-gray-400 mt-1\">\n <span>{{ min() }}</span>\n <span>{{ max() }}</span>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1450
|
+
}
|
|
1451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: RangeInputComponent, decorators: [{
|
|
1452
|
+
type: Component,
|
|
1453
|
+
args: [{ selector: 'wdc-range-input', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1454
|
+
{
|
|
1455
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1456
|
+
useExisting: forwardRef(() => RangeInputComponent),
|
|
1457
|
+
multi: true,
|
|
1458
|
+
},
|
|
1459
|
+
], template: "\n<div class=\"w-full\">\n <div class=\"flex justify-between items-center mb-1\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700\">{{ label() }}</label>\n }\n <span class=\"text-sm font-medium text-indigo-600\">{{ value() }}{{ unit() }}</span>\n </div>\n \n <div class=\"relative w-full h-6 flex items-center\">\n <!-- Track background -->\n <div class=\"absolute w-full h-2 bg-gray-200 rounded-full overflow-hidden\">\n <!-- Progress fill -->\n <div class=\"h-full bg-indigo-600\" [style.width.%]=\"percentage\"></div>\n </div>\n \n <!-- Native Range Input -->\n <input \n type=\"range\" \n [min]=\"min()\" \n [max]=\"max()\" \n [step]=\"step()\" \n [value]=\"value()\" \n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"absolute w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed z-10\"\n >\n \n <!-- Custom Thumb (Visual only, position calculated) -->\n <div \n class=\"absolute w-4 h-4 bg-white border-2 border-indigo-600 rounded-full shadow pointer-events-none transition-transform active:scale-110\"\n [style.left.%]=\"percentage\"\n [style.transform]=\"'translateX(-50%)'\"\n ></div>\n </div>\n \n <div class=\"flex justify-between text-xs text-gray-400 mt-1\">\n <span>{{ min() }}</span>\n <span>{{ max() }}</span>\n </div>\n</div>\n" }]
|
|
1460
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }] } });
|
|
1461
|
+
|
|
1462
|
+
class ColorInputComponent {
|
|
1463
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1464
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1465
|
+
value = signal('#4f46e5', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1466
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1467
|
+
onChange = (value) => { };
|
|
1468
|
+
onTouched = () => { };
|
|
1469
|
+
onInput(event) {
|
|
1470
|
+
const val = event.target.value;
|
|
1471
|
+
this.value.set(val);
|
|
1472
|
+
this.onChange(val);
|
|
1473
|
+
}
|
|
1474
|
+
// Handle text input changes (e.g. typing hex)
|
|
1475
|
+
onTextInput(event) {
|
|
1476
|
+
const val = event.target.value;
|
|
1477
|
+
this.value.set(val);
|
|
1478
|
+
this.onChange(val);
|
|
1479
|
+
}
|
|
1480
|
+
writeValue(value) {
|
|
1481
|
+
this.value.set(value || '#000000');
|
|
1482
|
+
}
|
|
1483
|
+
registerOnChange(fn) {
|
|
1484
|
+
this.onChange = fn;
|
|
1485
|
+
}
|
|
1486
|
+
registerOnTouched(fn) {
|
|
1487
|
+
this.onTouched = fn;
|
|
1488
|
+
}
|
|
1489
|
+
setDisabledState(isDisabled) {
|
|
1490
|
+
this.disabled.set(isDisabled);
|
|
1491
|
+
}
|
|
1492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ColorInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1493
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: ColorInputComponent, isStandalone: true, selector: "wdc-color-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1494
|
+
{
|
|
1495
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1496
|
+
useExisting: forwardRef(() => ColorInputComponent),
|
|
1497
|
+
multi: true,
|
|
1498
|
+
},
|
|
1499
|
+
], ngImport: i0, template: "<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n\n <div class=\"flex items-center gap-2\">\n <!-- Color Swatch / Native Picker Trigger -->\n <div class=\"relative w-11 h-11 rounded-lg overflow-hidden border-2 border-gray-300 shrink-0\">\n <input\n type=\"color\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"absolute -top-2 -left-2 w-16 h-16 p-0 border-0 cursor-pointer\"\n />\n </div>\n\n <!-- Hex Input -->\n <input\n type=\"text\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (input)=\"onTextInput($event)\"\n (blur)=\"onTouched()\"\n [class.border-rose-300]=\"error()\"\n [class.focus:ring-rose-500]=\"error()\"\n [class.focus:border-rose-500]=\"error()\"\n [class.border-gray-200]=\"!error()\"\n [class.focus:ring-indigo-500]=\"!error()\"\n [class.focus:border-indigo-500]=\"!error()\"\n placeholder=\"#000000\"\n class=\"w-full px-3 py-2 bg-white flex-1 border-2 border-gray-300 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1500
|
+
}
|
|
1501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: ColorInputComponent, decorators: [{
|
|
1502
|
+
type: Component,
|
|
1503
|
+
args: [{ selector: 'wdc-color-input', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1504
|
+
{
|
|
1505
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1506
|
+
useExisting: forwardRef(() => ColorInputComponent),
|
|
1507
|
+
multi: true,
|
|
1508
|
+
},
|
|
1509
|
+
], template: "<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n\n <div class=\"flex items-center gap-2\">\n <!-- Color Swatch / Native Picker Trigger -->\n <div class=\"relative w-11 h-11 rounded-lg overflow-hidden border-2 border-gray-300 shrink-0\">\n <input\n type=\"color\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n class=\"absolute -top-2 -left-2 w-16 h-16 p-0 border-0 cursor-pointer\"\n />\n </div>\n\n <!-- Hex Input -->\n <input\n type=\"text\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (input)=\"onTextInput($event)\"\n (blur)=\"onTouched()\"\n [class.border-rose-300]=\"error()\"\n [class.focus:ring-rose-500]=\"error()\"\n [class.focus:border-rose-500]=\"error()\"\n [class.border-gray-200]=\"!error()\"\n [class.focus:ring-indigo-500]=\"!error()\"\n [class.focus:border-indigo-500]=\"!error()\"\n placeholder=\"#000000\"\n class=\"w-full px-3 py-2 bg-white flex-1 border-2 border-gray-300 rounded-lg focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500\"\n />\n </div>\n</div>\n" }]
|
|
1510
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }] } });
|
|
1511
|
+
|
|
1512
|
+
class RichTextEditorComponent {
|
|
1513
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1514
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1515
|
+
editorContainer = viewChild('editorContainer', ...(ngDevMode ? [{ debugName: "editorContainer" }] : []));
|
|
1516
|
+
quill;
|
|
1517
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1518
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1519
|
+
onChange = (value) => { };
|
|
1520
|
+
onTouched = () => { };
|
|
1521
|
+
ngAfterViewInit() {
|
|
1522
|
+
if (typeof Quill === 'undefined') {
|
|
1523
|
+
console.error('Quill library not loaded');
|
|
1524
|
+
return;
|
|
1525
|
+
}
|
|
1526
|
+
this.quill = new Quill(this.editorContainer()?.nativeElement, {
|
|
1527
|
+
theme: 'snow',
|
|
1528
|
+
placeholder: 'Write something amazing...',
|
|
1529
|
+
modules: {
|
|
1530
|
+
toolbar: [
|
|
1531
|
+
[{ header: [1, 2, 3, false] }],
|
|
1532
|
+
['bold', 'italic', 'underline', 'strike'],
|
|
1533
|
+
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
1534
|
+
['link', 'image', 'clean'],
|
|
1535
|
+
],
|
|
1536
|
+
},
|
|
1537
|
+
});
|
|
1538
|
+
this.quill.on('text-change', () => {
|
|
1539
|
+
const html = this.editorContainer()?.nativeElement.querySelector('.ql-editor').innerHTML;
|
|
1540
|
+
this.value.set(html);
|
|
1541
|
+
this.onChange(html);
|
|
1542
|
+
});
|
|
1543
|
+
// Set initial value if available
|
|
1544
|
+
if (this.value()) {
|
|
1545
|
+
this.quill.clipboard.dangerouslyPasteHTML(this.value());
|
|
1546
|
+
}
|
|
1547
|
+
// Set disabled state
|
|
1548
|
+
if (this.disabled()) {
|
|
1549
|
+
this.quill.enable(false);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
ngOnDestroy() {
|
|
1553
|
+
// Quill cleanup usually not strictly necessary for simple use cases,
|
|
1554
|
+
// but good practice if bindings exist.
|
|
1555
|
+
}
|
|
1556
|
+
writeValue(value) {
|
|
1557
|
+
this.value.set(value || '');
|
|
1558
|
+
if (this.quill) {
|
|
1559
|
+
// Prevent infinite loop if update comes from inside
|
|
1560
|
+
if (value !== this.editorContainer()?.nativeElement.querySelector('.ql-editor').innerHTML) {
|
|
1561
|
+
this.quill.clipboard.dangerouslyPasteHTML(value || '');
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
registerOnChange(fn) {
|
|
1566
|
+
this.onChange = fn;
|
|
1567
|
+
}
|
|
1568
|
+
registerOnTouched(fn) {
|
|
1569
|
+
this.onTouched = fn;
|
|
1570
|
+
}
|
|
1571
|
+
setDisabledState(isDisabled) {
|
|
1572
|
+
this.disabled.set(isDisabled);
|
|
1573
|
+
if (this.quill) {
|
|
1574
|
+
this.quill.enable(!isDisabled);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: RichTextEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: RichTextEditorComponent, isStandalone: true, selector: "wdc-rich-text-editor", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1579
|
+
{
|
|
1580
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1581
|
+
useExisting: forwardRef(() => RichTextEditorComponent),
|
|
1582
|
+
multi: true,
|
|
1583
|
+
},
|
|
1584
|
+
], viewQueries: [{ propertyName: "editorContainer", first: true, predicate: ["editorContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "\n<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n \n <div \n [class.border-rose-300]=\"error()\"\n [class.ring-rose-500]=\"error()\"\n class=\"bg-white rounded-lg overflow-hidden border-2 border-gray-200 focus-within:border-indigo-500 transition-all\">\n <div #editorContainer class=\"h-64 font-sans text-base\"></div>\n </div>\n\n @if (error()) {\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1585
|
+
}
|
|
1586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: RichTextEditorComponent, decorators: [{
|
|
1587
|
+
type: Component,
|
|
1588
|
+
args: [{ selector: 'wdc-rich-text-editor', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1589
|
+
{
|
|
1590
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1591
|
+
useExisting: forwardRef(() => RichTextEditorComponent),
|
|
1592
|
+
multi: true,
|
|
1593
|
+
},
|
|
1594
|
+
], template: "\n<div class=\"w-full\">\n @if (label()) {\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\n }\n \n <div \n [class.border-rose-300]=\"error()\"\n [class.ring-rose-500]=\"error()\"\n class=\"bg-white rounded-lg overflow-hidden border-2 border-gray-200 focus-within:border-indigo-500 transition-all\">\n <div #editorContainer class=\"h-64 font-sans text-base\"></div>\n </div>\n\n @if (error()) {\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\n }\n</div>\n" }]
|
|
1595
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], editorContainer: [{ type: i0.ViewChild, args: ['editorContainer', { isSignal: true }] }] } });
|
|
1596
|
+
|
|
1597
|
+
class MarkdownEditorComponent {
|
|
1598
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1599
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1600
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1601
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1602
|
+
// Preview
|
|
1603
|
+
previewHtml = computed(() => {
|
|
1604
|
+
if (typeof marked === 'undefined')
|
|
1605
|
+
return this.value();
|
|
1606
|
+
return marked.parse(this.value());
|
|
1607
|
+
}, ...(ngDevMode ? [{ debugName: "previewHtml" }] : []));
|
|
1608
|
+
onChange = (value) => { };
|
|
1609
|
+
onTouched = () => { };
|
|
1610
|
+
onInput(event) {
|
|
1611
|
+
const val = event.target.value;
|
|
1612
|
+
this.value.set(val);
|
|
1613
|
+
this.onChange(val);
|
|
1614
|
+
}
|
|
1615
|
+
writeValue(value) {
|
|
1616
|
+
this.value.set(value || '');
|
|
1617
|
+
}
|
|
1618
|
+
registerOnChange(fn) {
|
|
1619
|
+
this.onChange = fn;
|
|
1620
|
+
}
|
|
1621
|
+
registerOnTouched(fn) {
|
|
1622
|
+
this.onTouched = fn;
|
|
1623
|
+
}
|
|
1624
|
+
setDisabledState(isDisabled) {
|
|
1625
|
+
this.disabled.set(isDisabled);
|
|
1626
|
+
}
|
|
1627
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: MarkdownEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1628
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: MarkdownEditorComponent, isStandalone: true, selector: "wdc-markdown-editor", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1629
|
+
{
|
|
1630
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1631
|
+
useExisting: forwardRef(() => MarkdownEditorComponent),
|
|
1632
|
+
multi: true,
|
|
1633
|
+
},
|
|
1634
|
+
], ngImport: i0, template: "<div class=\"w-full\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 h-[500px]\">\r\n <!-- Editor -->\r\n <div class=\"flex flex-col h-full\">\r\n <div\r\n class=\"bg-gray-100 px-3 py-2 border-t-2 border-l-2 border-r-2 border-gray-200 rounded-t-lg text-xs font-semibold text-gray-600 uppercase tracking-wide\"\r\n >\r\n Markdown Input\r\n </div>\r\n <textarea\r\n [value]=\"value()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput($event)\"\r\n (blur)=\"onTouched()\"\r\n [class.border-rose-300]=\"error()\"\r\n [class.focus:border-rose-500]=\"error()\"\r\n [class.border-gray-200]=\"!error()\"\r\n [class.focus:border-indigo-500]=\"!error()\"\r\n class=\"w-full flex-1 p-4 border-2 rounded-b-lg md:rounded-bl-lg md:rounded-br-none focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500 font-mono text-sm resize-none\"\r\n placeholder=\"# Hello World...\"\r\n ></textarea>\r\n </div>\r\n\r\n <!-- Preview -->\r\n <div class=\"flex flex-col h-full\">\r\n <div\r\n class=\"bg-gray-100 px-3 py-2 border-t-2 border-l-2 border-r-2 border-gray-200 rounded-t-lg text-xs font-semibold text-gray-600 uppercase tracking-wide\"\r\n >\r\n Live Preview\r\n </div>\r\n <div\r\n class=\"flex-1 p-4 border-2 border-gray-200 rounded-b-lg md:rounded-br-lg md:rounded-bl-none bg-white overflow-y-auto prose prose-sm max-w-none prose-indigo\"\r\n [innerHTML]=\"previewHtml()\"\r\n ></div>\r\n </div>\r\n </div>\r\n\r\n @if (error()) {\r\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1635
|
+
}
|
|
1636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: MarkdownEditorComponent, decorators: [{
|
|
1637
|
+
type: Component,
|
|
1638
|
+
args: [{ selector: 'wdc-markdown-editor', standalone: true, imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1639
|
+
{
|
|
1640
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1641
|
+
useExisting: forwardRef(() => MarkdownEditorComponent),
|
|
1642
|
+
multi: true,
|
|
1643
|
+
},
|
|
1644
|
+
], template: "<div class=\"w-full\">\r\n @if (label()) {\r\n <label class=\"block text-sm font-medium text-gray-700 mb-1\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 h-[500px]\">\r\n <!-- Editor -->\r\n <div class=\"flex flex-col h-full\">\r\n <div\r\n class=\"bg-gray-100 px-3 py-2 border-t-2 border-l-2 border-r-2 border-gray-200 rounded-t-lg text-xs font-semibold text-gray-600 uppercase tracking-wide\"\r\n >\r\n Markdown Input\r\n </div>\r\n <textarea\r\n [value]=\"value()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput($event)\"\r\n (blur)=\"onTouched()\"\r\n [class.border-rose-300]=\"error()\"\r\n [class.focus:border-rose-500]=\"error()\"\r\n [class.border-gray-200]=\"!error()\"\r\n [class.focus:border-indigo-500]=\"!error()\"\r\n class=\"w-full flex-1 p-4 border-2 rounded-b-lg md:rounded-bl-lg md:rounded-br-none focus:ring-0 outline-none transition-all disabled:bg-gray-100 disabled:text-gray-500 font-mono text-sm resize-none\"\r\n placeholder=\"# Hello World...\"\r\n ></textarea>\r\n </div>\r\n\r\n <!-- Preview -->\r\n <div class=\"flex flex-col h-full\">\r\n <div\r\n class=\"bg-gray-100 px-3 py-2 border-t-2 border-l-2 border-r-2 border-gray-200 rounded-t-lg text-xs font-semibold text-gray-600 uppercase tracking-wide\"\r\n >\r\n Live Preview\r\n </div>\r\n <div\r\n class=\"flex-1 p-4 border-2 border-gray-200 rounded-b-lg md:rounded-br-lg md:rounded-bl-none bg-white overflow-y-auto prose prose-sm max-w-none prose-indigo\"\r\n [innerHTML]=\"previewHtml()\"\r\n ></div>\r\n </div>\r\n </div>\r\n\r\n @if (error()) {\r\n <p class=\"mt-1 text-sm text-rose-600\">{{ error() }}</p>\r\n }\r\n</div>\r\n" }]
|
|
1645
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }] } });
|
|
1646
|
+
|
|
713
1647
|
/**
|
|
714
1648
|
* Generated bundle index. Do not edit.
|
|
715
1649
|
*/
|
|
716
1650
|
|
|
717
|
-
export { AvatarComponent, BadgeComponent, ButtonComponent, CardComponent, CarouselComponent, ChartComponent, ConfirmDialogComponent, ConfirmService, DrawerComponent, IconsComponent, ModalComponent, NavbarComponent, PageLoaderComponent, ProgressBarComponent, SpinnerComponent, StatCardComponent, TabComponent, TableComponent, TabsComponent, ToastComponent, ToastService, UploadComponent, WizardComponent };
|
|
1651
|
+
export { AccordionComponent, AccordionItemComponent, AvatarComponent, BadgeComponent, ButtonComponent, CardComponent, CarouselComponent, ChartComponent, CheckboxInputComponent, ColorInputComponent, ConfirmDialogComponent, ConfirmService, DateInputComponent, DrawerComponent, FileInputComponent, IconsComponent, MarkdownEditorComponent, ModalComponent, NavbarComponent, PageLoaderComponent, ProgressBarComponent, RadioInputComponent, RangeInputComponent, RichTextEditorComponent, SelectInputComponent, SidebarComponent, SpinnerComponent, StatCardComponent, SwitchInputComponent, TabComponent, TableComponent, TabsComponent, TextInputComponent, TextareaInputComponent, ToastComponent, ToastService, UploadComponent, WizardComponent };
|
|
718
1652
|
//# sourceMappingURL=wdcoders-ui-ng.mjs.map
|