@3dsource/source-ui 0.0.28 → 0.0.30
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/README.md +57 -62
- package/fesm2022/3dsource-source-ui.mjs +143 -143
- package/fesm2022/3dsource-source-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/styles/material/checkbox.scss +102 -18
- package/styles/material/form-field.scss +256 -36
- package/styles/material/radio.scss +73 -15
- package/styles/material/select.scss +54 -36
- package/styles/material/theme.scss +307 -301
- package/styles/material/toggle.scss +82 -24
- package/styles/toastr/toastr.scss +1 -1
|
@@ -16,9 +16,9 @@ import { FormsModule } from '@angular/forms';
|
|
|
16
16
|
class SourceModalComponent {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.data = inject(DIALOG_DATA);
|
|
19
|
-
this.size = signal(this.data?.size || 'default');
|
|
20
|
-
this.testID = signal(this.data?.testID || 'modal');
|
|
21
|
-
this.stringContent = signal(typeof this.data.content === 'string' ? this.data.content : null);
|
|
19
|
+
this.size = signal(this.data?.size || 'default', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
20
|
+
this.testID = signal(this.data?.testID || 'modal', ...(ngDevMode ? [{ debugName: "testID" }] : []));
|
|
21
|
+
this.stringContent = signal(typeof this.data.content === 'string' ? this.data.content : null, ...(ngDevMode ? [{ debugName: "stringContent" }] : []));
|
|
22
22
|
this.#dialogRef = inject((DialogRef));
|
|
23
23
|
}
|
|
24
24
|
#dialogRef;
|
|
@@ -34,17 +34,17 @@ class SourceModalComponent {
|
|
|
34
34
|
...externalConfig,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
38
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SourceModalComponent, isStandalone: true, selector: "src-modal", ngImport: i0, template: "<div\n [attr.data-testid]=\"testID()\"\n [ngClass]=\"{ 'src-modal--small': size() === 'small' }\"\n class=\"src-modal\"\n>\n <div class=\"src-modal__header\">\n @if (data['backButton']) {\n <src-icon-button\n class=\"src-modal__back\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-back'\"\n (onClick)=\"goBack()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n >\n <path\n d=\"m438-480 164 164q11 11 11 25.5T602-265q-11 11-25.5 11t-25.84-11.34L361-455q-5-5.4-7.5-11.7-2.5-6.3-2.5-13.5t2.5-13.5Q356-500 361-505l189.66-189.66Q562-706 576.5-706t25.5 11q11 11 11 25.5T602-644L438-480Z\"\n />\n </svg>\n </src-icon-button>\n }\n\n <div\n [attr.data-testid]=\"testID() + '-header-title'\"\n class=\"src-modal__title\"\n >\n {{ data['headerTitle'] }}\n </div>\n\n @if (data['closeButton']) {\n <src-icon-button\n class=\"src-modal__close\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-close'\"\n (onClick)=\"close()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10.0001 11.229L6.68618 14.5429C6.51951 14.7096 6.31818 14.7896 6.08218 14.7829C5.84618 14.7756 5.64485 14.6886 5.47818 14.5219C5.31151 14.3553 5.22818 14.1506 5.22818 13.9079C5.22818 13.6646 5.31151 13.4596 5.47818 13.2929L8.77107 10L5.45718 6.68615C5.29051 6.51949 5.21051 6.31482 5.21718 6.07215C5.22451 5.82882 5.31151 5.62382 5.47818 5.45715C5.64485 5.29049 5.84951 5.20715 6.09218 5.20715C6.33551 5.20715 6.54051 5.29049 6.70718 5.45715L10.0001 8.77105L13.314 5.45715C13.4806 5.29049 13.6853 5.20715 13.928 5.20715C14.1713 5.20715 14.3763 5.29049 14.543 5.45715C14.7096 5.62382 14.793 5.82882 14.793 6.07215C14.793 6.31482 14.7096 6.51949 14.543 6.68615L11.2291 10L14.543 13.3139C14.7096 13.4806 14.793 13.6819 14.793 13.9179C14.793 14.1539 14.7096 14.3553 14.543 14.5219C14.3763 14.6886 14.1713 14.7719 13.928 14.7719C13.6853 14.7719 13.4806 14.6886 13.314 14.5219L10.0001 11.229Z\"\n fill=\"currentColor\"\n />\n </svg>\n </src-icon-button>\n }\n </div>\n\n <div\n [class.src-modal__body--scrollable]=\"scrollbar.isVerticallyScrollable()\"\n class=\"src-modal__body\"\n >\n <ng-scrollbar #scrollbar class=\"src-modal__scroll-box\">\n @if (stringContent(); as content) {\n <div [innerHTML]=\"content\"></div>\n }\n </ng-scrollbar>\n </div>\n\n @if (data.footerButtons) {\n <div class=\"src-modal__footer\">\n @for (footerButton of data.footerButtons; track footerButton.label) {\n <src-button\n [srcButtonConfig]=\"getButtonConfig(footerButton.srcButtonConfig)\"\n (onClick)=\"close(footerButton.action())\"\n >\n {{ footerButton.label }}\n </src-button>\n }\n </div>\n }\n</div>\n", styles: [".src-modal__body--scrollable{padding:0 0 0 var(--srcModalBodyPadding)}.src-modal__body--scrollable .src-modal__scroll-box.ng-scrollbar{--scrollbar-border-radius: 0px;--scrollbar-thickness: 3;--scrollbar-offset: 8;--scrollbar-track-color: transparent;--scrollbar-thumb-color: var(--src-color-border-default, #e5e7eb);--scrollbar-thumb-hover-color: var(--src-scrollbar-thumb-color)}.src-modal__body .src-modal__scroll-box{max-height:100%}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SourceIconButtonComponent, selector: "src-icon-button", inputs: ["name", "type", "size", "shape", "counter", "isActive", "isDisabled", "data-testid"], outputs: ["onClick"] }, { kind: "ngmodule", type: NgScrollbarModule }, { kind: "component", type: i1.NgScrollbar, selector: "ng-scrollbar:not([externalViewport])", exportAs: ["ngScrollbar"] }, { kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceModalComponent, decorators: [{
|
|
41
41
|
type: Component,
|
|
42
42
|
args: [{ selector: 'src-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
43
43
|
NgClass,
|
|
44
44
|
SourceIconButtonComponent,
|
|
45
45
|
NgScrollbarModule,
|
|
46
46
|
SourceButtonComponent,
|
|
47
|
-
], template: "<div\n [attr.data-testid]=\"testID()\"\n [ngClass]=\"{ 'src-modal--small': size() === 'small' }\"\n class=\"src-modal\"\n>\n <div class=\"src-modal__header\">\n @if (data['backButton']) {\n <src-icon-button\n class=\"src-modal__back\"\n shape=\"round\"\n size=\"sm\"\n [data-testid]=\"testID() + '-header-back'\"\n (onClick)=\"goBack()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n >\n <path\n d=\"m438-480 164 164q11 11 11 25.5T602-265q-11 11-25.5 11t-25.84-11.34L361-455q-5-5.4-7.5-11.7-2.5-6.3-2.5-13.5t2.5-13.5Q356-500 361-505l189.66-189.66Q562-706 576.5-706t25.5 11q11 11 11 25.5T602-644L438-480Z\"\n />\n </svg>\n </src-icon-button>\n }\n\n <div\n [attr.data-testid]=\"testID() + '-header-title'\"\n class=\"src-modal__title\"\n >\n {{ data['headerTitle'] }}\n </div>\n\n @if (data['closeButton']) {\n <src-icon-button\n class=\"src-modal__close\"\n shape=\"round\"\n size=\"sm\"\n [data-testid]=\"testID() + '-header-close'\"\n (onClick)=\"close()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10.0001 11.229L6.68618 14.5429C6.51951 14.7096 6.31818 14.7896 6.08218 14.7829C5.84618 14.7756 5.64485 14.6886 5.47818 14.5219C5.31151 14.3553 5.22818 14.1506 5.22818 13.9079C5.22818 13.6646 5.31151 13.4596 5.47818 13.2929L8.77107 10L5.45718 6.68615C5.29051 6.51949 5.21051 6.31482 5.21718 6.07215C5.22451 5.82882 5.31151 5.62382 5.47818 5.45715C5.64485 5.29049 5.84951 5.20715 6.09218 5.20715C6.33551 5.20715 6.54051 5.29049 6.70718 5.45715L10.0001 8.77105L13.314 5.45715C13.4806 5.29049 13.6853 5.20715 13.928 5.20715C14.1713 5.20715 14.3763 5.29049 14.543 5.45715C14.7096 5.62382 14.793 5.82882 14.793 6.07215C14.793 6.31482 14.7096 6.51949 14.543 6.68615L11.2291 10L14.543 13.3139C14.7096 13.4806 14.793 13.6819 14.793 13.9179C14.793 14.1539 14.7096 14.3553 14.543 14.5219C14.3763 14.6886 14.1713 14.7719 13.928 14.7719C13.6853 14.7719 13.4806 14.6886 13.314 14.5219L10.0001 11.229Z\"\n fill=\"currentColor\"\n />\n </svg>\n </src-icon-button>\n }\n </div>\n\n <div\n [class.src-modal__body--scrollable]=\"scrollbar.isVerticallyScrollable()\"\n class=\"src-modal__body\"\n >\n <ng-scrollbar #scrollbar class=\"src-modal__scroll-box\">\n @if (stringContent(); as content) {\n <div [innerHTML]=\"content\"></div>\n }\n </ng-scrollbar>\n </div>\n\n @if (data.footerButtons) {\n <div class=\"src-modal__footer\">\n @for (footerButton of data.footerButtons; track footerButton.label) {\n <src-button\n [srcButtonConfig]=\"getButtonConfig(footerButton.srcButtonConfig)\"\n (onClick)=\"close(footerButton.action())\"\n >\n {{ footerButton.label }}\n </src-button>\n }\n </div>\n }\n</div>\n", styles: [".src-modal__body--scrollable{padding:0 0 0 var(--srcModalBodyPadding)}.src-modal__body--scrollable .src-modal__scroll-box.ng-scrollbar{--scrollbar-border-radius: 0px;--scrollbar-thickness: 3;--scrollbar-offset: 8;--scrollbar-track-color: transparent;--scrollbar-thumb-color: var(--src-color-border-default, #e5e7eb);--scrollbar-thumb-hover-color: var(--src-scrollbar-thumb-color)}.src-modal__body .src-modal__scroll-box{max-height:100%}
|
|
47
|
+
], template: "<div\n [attr.data-testid]=\"testID()\"\n [ngClass]=\"{ 'src-modal--small': size() === 'small' }\"\n class=\"src-modal\"\n>\n <div class=\"src-modal__header\">\n @if (data['backButton']) {\n <src-icon-button\n class=\"src-modal__back\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-back'\"\n (onClick)=\"goBack()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n >\n <path\n d=\"m438-480 164 164q11 11 11 25.5T602-265q-11 11-25.5 11t-25.84-11.34L361-455q-5-5.4-7.5-11.7-2.5-6.3-2.5-13.5t2.5-13.5Q356-500 361-505l189.66-189.66Q562-706 576.5-706t25.5 11q11 11 11 25.5T602-644L438-480Z\"\n />\n </svg>\n </src-icon-button>\n }\n\n <div\n [attr.data-testid]=\"testID() + '-header-title'\"\n class=\"src-modal__title\"\n >\n {{ data['headerTitle'] }}\n </div>\n\n @if (data['closeButton']) {\n <src-icon-button\n class=\"src-modal__close\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-close'\"\n (onClick)=\"close()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10.0001 11.229L6.68618 14.5429C6.51951 14.7096 6.31818 14.7896 6.08218 14.7829C5.84618 14.7756 5.64485 14.6886 5.47818 14.5219C5.31151 14.3553 5.22818 14.1506 5.22818 13.9079C5.22818 13.6646 5.31151 13.4596 5.47818 13.2929L8.77107 10L5.45718 6.68615C5.29051 6.51949 5.21051 6.31482 5.21718 6.07215C5.22451 5.82882 5.31151 5.62382 5.47818 5.45715C5.64485 5.29049 5.84951 5.20715 6.09218 5.20715C6.33551 5.20715 6.54051 5.29049 6.70718 5.45715L10.0001 8.77105L13.314 5.45715C13.4806 5.29049 13.6853 5.20715 13.928 5.20715C14.1713 5.20715 14.3763 5.29049 14.543 5.45715C14.7096 5.62382 14.793 5.82882 14.793 6.07215C14.793 6.31482 14.7096 6.51949 14.543 6.68615L11.2291 10L14.543 13.3139C14.7096 13.4806 14.793 13.6819 14.793 13.9179C14.793 14.1539 14.7096 14.3553 14.543 14.5219C14.3763 14.6886 14.1713 14.7719 13.928 14.7719C13.6853 14.7719 13.4806 14.6886 13.314 14.5219L10.0001 11.229Z\"\n fill=\"currentColor\"\n />\n </svg>\n </src-icon-button>\n }\n </div>\n\n <div\n [class.src-modal__body--scrollable]=\"scrollbar.isVerticallyScrollable()\"\n class=\"src-modal__body\"\n >\n <ng-scrollbar #scrollbar class=\"src-modal__scroll-box\">\n @if (stringContent(); as content) {\n <div [innerHTML]=\"content\"></div>\n }\n </ng-scrollbar>\n </div>\n\n @if (data.footerButtons) {\n <div class=\"src-modal__footer\">\n @for (footerButton of data.footerButtons; track footerButton.label) {\n <src-button\n [srcButtonConfig]=\"getButtonConfig(footerButton.srcButtonConfig)\"\n (onClick)=\"close(footerButton.action())\"\n >\n {{ footerButton.label }}\n </src-button>\n }\n </div>\n }\n</div>\n", styles: [".src-modal__body--scrollable{padding:0 0 0 var(--srcModalBodyPadding)}.src-modal__body--scrollable .src-modal__scroll-box.ng-scrollbar{--scrollbar-border-radius: 0px;--scrollbar-thickness: 3;--scrollbar-offset: 8;--scrollbar-track-color: transparent;--scrollbar-thumb-color: var(--src-color-border-default, #e5e7eb);--scrollbar-thumb-hover-color: var(--src-scrollbar-thumb-color)}.src-modal__body .src-modal__scroll-box{max-height:100%}\n"] }]
|
|
48
48
|
}] });
|
|
49
49
|
|
|
50
50
|
const SourceModalSize = {
|
|
@@ -88,8 +88,8 @@ class SourcePopoverService {
|
|
|
88
88
|
this.#overlay = inject(Overlay);
|
|
89
89
|
this.#destroyRef$ = inject(DestroyRef);
|
|
90
90
|
this.#defaultSourcePopoverConfig = defaultSourcePopoverConfig;
|
|
91
|
-
this.#isMobile = signal(false);
|
|
92
|
-
this.backButtonClicked = signal(null);
|
|
91
|
+
this.#isMobile = signal(false, ...(ngDevMode ? [{ debugName: "#isMobile" }] : []));
|
|
92
|
+
this.backButtonClicked = signal(null, ...(ngDevMode ? [{ debugName: "backButtonClicked" }] : []));
|
|
93
93
|
}
|
|
94
94
|
#breakpointObserver;
|
|
95
95
|
#overlay;
|
|
@@ -174,10 +174,10 @@ class SourcePopoverService {
|
|
|
174
174
|
testID: override?.testID ?? this.#defaultSourcePopoverConfig.testID,
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
178
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
178
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverService }); }
|
|
179
179
|
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverService, decorators: [{
|
|
181
181
|
type: Injectable
|
|
182
182
|
}] });
|
|
183
183
|
|
|
@@ -186,8 +186,8 @@ class SourcePopoverComponent {
|
|
|
186
186
|
this.data = inject(SOURCE_POPOVER_DATA);
|
|
187
187
|
this.template = signal(this.data.srcPopoverTpl instanceof TemplateRef
|
|
188
188
|
? this.data.srcPopoverTpl
|
|
189
|
-
: null);
|
|
190
|
-
this.testID = signal(this.data.testID || 'popover');
|
|
189
|
+
: null, ...(ngDevMode ? [{ debugName: "template" }] : []));
|
|
190
|
+
this.testID = signal(this.data.testID || 'popover', ...(ngDevMode ? [{ debugName: "testID" }] : []));
|
|
191
191
|
this.#sourcePopoverService = inject(SourcePopoverService);
|
|
192
192
|
}
|
|
193
193
|
#sourcePopoverService;
|
|
@@ -197,28 +197,28 @@ class SourcePopoverComponent {
|
|
|
197
197
|
emitBackAction() {
|
|
198
198
|
this.#sourcePopoverService.closePopover(this.data.overlayRef);
|
|
199
199
|
}
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
201
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SourcePopoverComponent, isStandalone: true, selector: "src-popover", ngImport: i0, template: "<div\n class=\"src-popover\"\n [style.maxHeight]=\"data.popoverMaxHeight\"\n [attr.data-testid]=\"testID()\"\n>\n @if (\n data['hasBackButton'] ||\n data['hasCloseButton'] ||\n (data['headerTitle'] && data['headerTitle'] !== '')\n ) {\n <div class=\"src-popover__header\">\n @if (data['hasBackButton']) {\n <src-icon-button\n class=\"src-popover__back\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-back'\"\n (onClick)=\"emitBackAction()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n >\n <path\n d=\"m438-480 164 164q11 11 11 25.5T602-265q-11 11-25.5 11t-25.84-11.34L361-455q-5-5.4-7.5-11.7-2.5-6.3-2.5-13.5t2.5-13.5Q356-500 361-505l189.66-189.66Q562-706 576.5-706t25.5 11q11 11 11 25.5T602-644L438-480Z\"\n />\n </svg>\n </src-icon-button>\n }\n\n <div\n class=\"src-popover__title\"\n [attr.data-testid]=\"testID() + '-header-title'\"\n >\n {{ data.headerTitle }}\n </div>\n\n @if (data['hasCloseButton']) {\n <src-icon-button\n class=\"src-popover__close\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-close'\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n d=\"M10.0001 11.229L6.68618 14.5429C6.51951 14.7096 6.31818 14.7896 6.08218 14.7829C5.84618 14.7756 5.64485 14.6886 5.47818 14.5219C5.31151 14.3553 5.22818 14.1506 5.22818 13.9079C5.22818 13.6646 5.31151 13.4596 5.47818 13.2929L8.77107 10L5.45718 6.68615C5.29051 6.51949 5.21051 6.31482 5.21718 6.07215C5.22451 5.82882 5.31151 5.62382 5.47818 5.45715C5.64485 5.29049 5.84951 5.20715 6.09218 5.20715C6.33551 5.20715 6.54051 5.29049 6.70718 5.45715L10.0001 8.77105L13.314 5.45715C13.4806 5.29049 13.6853 5.20715 13.928 5.20715C14.1713 5.20715 14.3763 5.29049 14.543 5.45715C14.7096 5.62382 14.793 5.82882 14.793 6.07215C14.793 6.31482 14.7096 6.51949 14.543 6.68615L11.2291 10L14.543 13.3139C14.7096 13.4806 14.793 13.6819 14.793 13.9179C14.793 14.1539 14.7096 14.3553 14.543 14.5219C14.3763 14.6886 14.1713 14.7719 13.928 14.7719C13.6853 14.7719 13.4806 14.6886 13.314 14.5219L10.0001 11.229Z\"\n fill=\"currentColor\"\n />\n </svg>\n </src-icon-button>\n }\n </div>\n }\n\n <div class=\"src-popover__body\">\n @if (template()) {\n <ng-template [ngTemplateOutlet]=\"template()\"></ng-template>\n }\n </div>\n</div>\n", styles: [".src-popover-backdrop{background-color:#0000}.src-popover-backdrop--mobile{background-color:#00000052}.src-popover__header{display:flex;padding:12px;width:100%;border-bottom:var(--srcPopoverTitleBorder)}.src-popover__title{font-size:var(--srcPopoverTitleSize);font-weight:var(--src-font-weight-semiBold, 600);line-height:var(--srcPopoverTitleLineHeight);color:var(--srcPopoverTitleColor);padding:0 4px;word-break:break-word}.src-popover__back{margin-right:8px}.src-popover__close{margin-left:auto}\n"], dependencies: [{ kind: "component", type: SourceIconButtonComponent, selector: "src-icon-button", inputs: ["name", "type", "size", "shape", "counter", "isActive", "isDisabled", "data-testid"], outputs: ["onClick"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
202
202
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverComponent, decorators: [{
|
|
204
204
|
type: Component,
|
|
205
|
-
args: [{ selector: 'src-popover', imports: [SourceIconButtonComponent, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"src-popover\"\n [style.maxHeight]=\"data.popoverMaxHeight\"\n [attr.data-testid]=\"testID()\"\n>\n @if (\n data['hasBackButton'] ||\n data['hasCloseButton'] ||\n (data['headerTitle'] && data['headerTitle'] !== '')\n ) {\n <div class=\"src-popover__header\">\n @if (data['hasBackButton']) {\n <src-icon-button\n class=\"src-popover__back\"\n shape=\"round\"\n size=\"sm\"\n [data-testid]=\"testID() + '-header-back'\"\n (onClick)=\"emitBackAction()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n >\n <path\n d=\"m438-480 164 164q11 11 11 25.5T602-265q-11 11-25.5 11t-25.84-11.34L361-455q-5-5.4-7.5-11.7-2.5-6.3-2.5-13.5t2.5-13.5Q356-500 361-505l189.66-189.66Q562-706 576.5-706t25.5 11q11 11 11 25.5T602-644L438-480Z\"\n />\n </svg>\n </src-icon-button>\n }\n\n <div\n class=\"src-popover__title\"\n [attr.data-testid]=\"testID() + '-header-title'\"\n >\n {{ data.headerTitle }}\n </div>\n\n @if (data['hasCloseButton']) {\n <src-icon-button\n class=\"src-popover__close\"\n shape=\"round\"\n size=\"sm\"\n [data-testid]=\"testID() + '-header-close'\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n d=\"M10.0001 11.229L6.68618 14.5429C6.51951 14.7096 6.31818 14.7896 6.08218 14.7829C5.84618 14.7756 5.64485 14.6886 5.47818 14.5219C5.31151 14.3553 5.22818 14.1506 5.22818 13.9079C5.22818 13.6646 5.31151 13.4596 5.47818 13.2929L8.77107 10L5.45718 6.68615C5.29051 6.51949 5.21051 6.31482 5.21718 6.07215C5.22451 5.82882 5.31151 5.62382 5.47818 5.45715C5.64485 5.29049 5.84951 5.20715 6.09218 5.20715C6.33551 5.20715 6.54051 5.29049 6.70718 5.45715L10.0001 8.77105L13.314 5.45715C13.4806 5.29049 13.6853 5.20715 13.928 5.20715C14.1713 5.20715 14.3763 5.29049 14.543 5.45715C14.7096 5.62382 14.793 5.82882 14.793 6.07215C14.793 6.31482 14.7096 6.51949 14.543 6.68615L11.2291 10L14.543 13.3139C14.7096 13.4806 14.793 13.6819 14.793 13.9179C14.793 14.1539 14.7096 14.3553 14.543 14.5219C14.3763 14.6886 14.1713 14.7719 13.928 14.7719C13.6853 14.7719 13.4806 14.6886 13.314 14.5219L10.0001 11.229Z\"\n fill=\"currentColor\"\n />\n </svg>\n </src-icon-button>\n }\n </div>\n }\n\n <div class=\"src-popover__body\">\n @if (template()) {\n <ng-template [ngTemplateOutlet]=\"template()\"></ng-template>\n }\n </div>\n</div>\n", styles: [".src-popover-backdrop{background-color:#0000}.src-popover-backdrop--mobile{background-color:#00000052}.src-popover__header{display:flex;padding:12px;width:100%;border-bottom:var(--srcPopoverTitleBorder)}.src-popover__title{font-size:var(--srcPopoverTitleSize);font-weight:var(--src-
|
|
205
|
+
args: [{ selector: 'src-popover', imports: [SourceIconButtonComponent, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"src-popover\"\n [style.maxHeight]=\"data.popoverMaxHeight\"\n [attr.data-testid]=\"testID()\"\n>\n @if (\n data['hasBackButton'] ||\n data['hasCloseButton'] ||\n (data['headerTitle'] && data['headerTitle'] !== '')\n ) {\n <div class=\"src-popover__header\">\n @if (data['hasBackButton']) {\n <src-icon-button\n class=\"src-popover__back\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-back'\"\n (onClick)=\"emitBackAction()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n >\n <path\n d=\"m438-480 164 164q11 11 11 25.5T602-265q-11 11-25.5 11t-25.84-11.34L361-455q-5-5.4-7.5-11.7-2.5-6.3-2.5-13.5t2.5-13.5Q356-500 361-505l189.66-189.66Q562-706 576.5-706t25.5 11q11 11 11 25.5T602-644L438-480Z\"\n />\n </svg>\n </src-icon-button>\n }\n\n <div\n class=\"src-popover__title\"\n [attr.data-testid]=\"testID() + '-header-title'\"\n >\n {{ data.headerTitle }}\n </div>\n\n @if (data['hasCloseButton']) {\n <src-icon-button\n class=\"src-popover__close\"\n shape=\"round\"\n size=\"sm\"\n colorScheme=\"ghost\"\n [data-testid]=\"testID() + '-header-close'\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n d=\"M10.0001 11.229L6.68618 14.5429C6.51951 14.7096 6.31818 14.7896 6.08218 14.7829C5.84618 14.7756 5.64485 14.6886 5.47818 14.5219C5.31151 14.3553 5.22818 14.1506 5.22818 13.9079C5.22818 13.6646 5.31151 13.4596 5.47818 13.2929L8.77107 10L5.45718 6.68615C5.29051 6.51949 5.21051 6.31482 5.21718 6.07215C5.22451 5.82882 5.31151 5.62382 5.47818 5.45715C5.64485 5.29049 5.84951 5.20715 6.09218 5.20715C6.33551 5.20715 6.54051 5.29049 6.70718 5.45715L10.0001 8.77105L13.314 5.45715C13.4806 5.29049 13.6853 5.20715 13.928 5.20715C14.1713 5.20715 14.3763 5.29049 14.543 5.45715C14.7096 5.62382 14.793 5.82882 14.793 6.07215C14.793 6.31482 14.7096 6.51949 14.543 6.68615L11.2291 10L14.543 13.3139C14.7096 13.4806 14.793 13.6819 14.793 13.9179C14.793 14.1539 14.7096 14.3553 14.543 14.5219C14.3763 14.6886 14.1713 14.7719 13.928 14.7719C13.6853 14.7719 13.4806 14.6886 13.314 14.5219L10.0001 11.229Z\"\n fill=\"currentColor\"\n />\n </svg>\n </src-icon-button>\n }\n </div>\n }\n\n <div class=\"src-popover__body\">\n @if (template()) {\n <ng-template [ngTemplateOutlet]=\"template()\"></ng-template>\n }\n </div>\n</div>\n", styles: [".src-popover-backdrop{background-color:#0000}.src-popover-backdrop--mobile{background-color:#00000052}.src-popover__header{display:flex;padding:12px;width:100%;border-bottom:var(--srcPopoverTitleBorder)}.src-popover__title{font-size:var(--srcPopoverTitleSize);font-weight:var(--src-font-weight-semiBold, 600);line-height:var(--srcPopoverTitleLineHeight);color:var(--srcPopoverTitleColor);padding:0 4px;word-break:break-word}.src-popover__back{margin-right:8px}.src-popover__close{margin-left:auto}\n"] }]
|
|
206
206
|
}] });
|
|
207
207
|
|
|
208
208
|
class SourcePopoverTriggerComponent {
|
|
209
209
|
constructor() {
|
|
210
|
-
this.overlayOrigin = viewChild(CdkOverlayOrigin);
|
|
211
|
-
this.srcPopoverTpl = input.required();
|
|
212
|
-
this.headerTitle = input();
|
|
213
|
-
this.activeClass = input();
|
|
214
|
-
this.hasBackButton = input(false);
|
|
215
|
-
this.hasCloseButton = input(true);
|
|
216
|
-
this.hasBackdrop = input(true);
|
|
217
|
-
this.closeOnBackdropClick = input(true);
|
|
218
|
-
this.popoverMaxHeight = input('auto');
|
|
219
|
-
this.panelCustomClass = input();
|
|
220
|
-
this.testID = input('', { alias: 'data-testid' });
|
|
221
|
-
this.breakpointDesktop = input('(min-width: 1024px)');
|
|
210
|
+
this.overlayOrigin = viewChild(CdkOverlayOrigin, ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : []));
|
|
211
|
+
this.srcPopoverTpl = input.required(...(ngDevMode ? [{ debugName: "srcPopoverTpl" }] : []));
|
|
212
|
+
this.headerTitle = input(...(ngDevMode ? [undefined, { debugName: "headerTitle" }] : []));
|
|
213
|
+
this.activeClass = input(...(ngDevMode ? [undefined, { debugName: "activeClass" }] : []));
|
|
214
|
+
this.hasBackButton = input(false, ...(ngDevMode ? [{ debugName: "hasBackButton" }] : []));
|
|
215
|
+
this.hasCloseButton = input(true, ...(ngDevMode ? [{ debugName: "hasCloseButton" }] : []));
|
|
216
|
+
this.hasBackdrop = input(true, ...(ngDevMode ? [{ debugName: "hasBackdrop" }] : []));
|
|
217
|
+
this.closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : []));
|
|
218
|
+
this.popoverMaxHeight = input('auto', ...(ngDevMode ? [{ debugName: "popoverMaxHeight" }] : []));
|
|
219
|
+
this.panelCustomClass = input(...(ngDevMode ? [undefined, { debugName: "panelCustomClass" }] : []));
|
|
220
|
+
this.testID = input('', ...(ngDevMode ? [{ debugName: "testID", alias: 'data-testid' }] : [{ alias: 'data-testid' }]));
|
|
221
|
+
this.breakpointDesktop = input('(min-width: 1024px)', ...(ngDevMode ? [{ debugName: "breakpointDesktop" }] : []));
|
|
222
222
|
this.positions = input([
|
|
223
223
|
{
|
|
224
224
|
originX: 'start',
|
|
@@ -234,8 +234,8 @@ class SourcePopoverTriggerComponent {
|
|
|
234
234
|
overlayY: 'bottom',
|
|
235
235
|
offsetY: -8,
|
|
236
236
|
},
|
|
237
|
-
]);
|
|
238
|
-
this.popoverShown = signal(false);
|
|
237
|
+
], ...(ngDevMode ? [{ debugName: "positions" }] : []));
|
|
238
|
+
this.popoverShown = signal(false, ...(ngDevMode ? [{ debugName: "popoverShown" }] : []));
|
|
239
239
|
this.onPopoverShown = output();
|
|
240
240
|
this.onBackButtonClick = output();
|
|
241
241
|
this.overlayRef = null;
|
|
@@ -245,7 +245,7 @@ class SourcePopoverTriggerComponent {
|
|
|
245
245
|
if (this.#sourcePopoverService.backButtonClicked()) {
|
|
246
246
|
this.onBackButtonClick.emit(this.overlayRef);
|
|
247
247
|
}
|
|
248
|
-
});
|
|
248
|
+
}, ...(ngDevMode ? [{ debugName: "_" }] : []));
|
|
249
249
|
}
|
|
250
250
|
#sourcePopoverService;
|
|
251
251
|
#viewContainerRef;
|
|
@@ -280,10 +280,10 @@ class SourcePopoverTriggerComponent {
|
|
|
280
280
|
.pipe(take(1))
|
|
281
281
|
.subscribe(() => this.overlayRef?.detach());
|
|
282
282
|
}
|
|
283
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
284
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
284
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.3", type: SourcePopoverTriggerComponent, isStandalone: true, selector: "src-popover-trigger", inputs: { srcPopoverTpl: { classPropertyName: "srcPopoverTpl", publicName: "srcPopoverTpl", isSignal: true, isRequired: true, transformFunction: null }, headerTitle: { classPropertyName: "headerTitle", publicName: "headerTitle", isSignal: true, isRequired: false, transformFunction: null }, activeClass: { classPropertyName: "activeClass", publicName: "activeClass", isSignal: true, isRequired: false, transformFunction: null }, hasBackButton: { classPropertyName: "hasBackButton", publicName: "hasBackButton", isSignal: true, isRequired: false, transformFunction: null }, hasCloseButton: { classPropertyName: "hasCloseButton", publicName: "hasCloseButton", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, popoverMaxHeight: { classPropertyName: "popoverMaxHeight", publicName: "popoverMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, panelCustomClass: { classPropertyName: "panelCustomClass", publicName: "panelCustomClass", isSignal: true, isRequired: false, transformFunction: null }, testID: { classPropertyName: "testID", publicName: "data-testid", isSignal: true, isRequired: false, transformFunction: null }, breakpointDesktop: { classPropertyName: "breakpointDesktop", publicName: "breakpointDesktop", isSignal: true, isRequired: false, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPopoverShown: "onPopoverShown", onBackButtonClick: "onBackButtonClick" }, providers: [SourcePopoverService], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n cdkOverlayOrigin\n [attr.data-testid]=\"testID()\"\n (click)=\"showPopover()\"\n [class]=\"popoverShown() ? activeClass() || 'active' : ''\"\n>\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
285
285
|
}
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourcePopoverTriggerComponent, decorators: [{
|
|
287
287
|
type: Component,
|
|
288
288
|
args: [{ selector: 'src-popover-trigger', encapsulation: ViewEncapsulation.None, providers: [SourcePopoverService], changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkOverlayOrigin], template: "<div\n cdkOverlayOrigin\n [attr.data-testid]=\"testID()\"\n (click)=\"showPopover()\"\n [class]=\"popoverShown() ? activeClass() || 'active' : ''\"\n>\n <ng-content></ng-content>\n</div>\n" }]
|
|
289
289
|
}] });
|
|
@@ -291,24 +291,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
291
291
|
register();
|
|
292
292
|
class SourceTabLineComponent {
|
|
293
293
|
constructor() {
|
|
294
|
-
this.swiperRef = viewChild('swiperRef');
|
|
295
|
-
this.tabs = input.required();
|
|
296
|
-
this.label = input.required();
|
|
297
|
-
this.selectedIndex = input(0);
|
|
298
|
-
this.isCompact = input(false);
|
|
299
|
-
this.offsetBefore = input(0);
|
|
300
|
-
this.offsetAfter = input(0);
|
|
301
|
-
this.spaceBetween = input(0);
|
|
302
|
-
this.isFullWidth = input(false);
|
|
303
|
-
this.isSwiper = input(false);
|
|
304
|
-
this.testID = input('', { alias: 'data-testid' });
|
|
294
|
+
this.swiperRef = viewChild('swiperRef', ...(ngDevMode ? [{ debugName: "swiperRef" }] : []));
|
|
295
|
+
this.tabs = input.required(...(ngDevMode ? [{ debugName: "tabs" }] : []));
|
|
296
|
+
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
297
|
+
this.selectedIndex = input(0, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
|
|
298
|
+
this.isCompact = input(false, ...(ngDevMode ? [{ debugName: "isCompact" }] : []));
|
|
299
|
+
this.offsetBefore = input(0, ...(ngDevMode ? [{ debugName: "offsetBefore" }] : []));
|
|
300
|
+
this.offsetAfter = input(0, ...(ngDevMode ? [{ debugName: "offsetAfter" }] : []));
|
|
301
|
+
this.spaceBetween = input(0, ...(ngDevMode ? [{ debugName: "spaceBetween" }] : []));
|
|
302
|
+
this.isFullWidth = input(false, ...(ngDevMode ? [{ debugName: "isFullWidth" }] : []));
|
|
303
|
+
this.isSwiper = input(false, ...(ngDevMode ? [{ debugName: "isSwiper" }] : []));
|
|
304
|
+
this.testID = input('', ...(ngDevMode ? [{ debugName: "testID", alias: 'data-testid' }] : [{ alias: 'data-testid' }]));
|
|
305
305
|
this.tabsSelectedIndex = linkedSignal(() => this.selectedIndex());
|
|
306
306
|
this.onSelectTab = output();
|
|
307
|
-
this.classes = computed(() => this.isFullWidth() ? ['src-tab-line--full-width'] : []);
|
|
308
|
-
this.variables = computed(() => `--srcTabsOffsetBefore: ${this.tabsOffsetBefore()}px; --srcTabsOffsetAfter: ${this.tabsOffsetAfter()}px; --srcTabsSpaceBetween: ${this.spacing()}px
|
|
309
|
-
this.tabsOffsetBefore = computed(() => this.offsetBefore() || (this.isCompact() ? 8 : 16));
|
|
310
|
-
this.tabsOffsetAfter = computed(() => this.offsetAfter() || (this.isCompact() ? 8 : 16));
|
|
311
|
-
this.spacing = computed(() => this.spaceBetween() || (this.isCompact() ? 0 : 4));
|
|
307
|
+
this.classes = computed(() => this.isFullWidth() ? ['src-tab-line--full-width'] : [], ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
308
|
+
this.variables = computed(() => `--srcTabsOffsetBefore: ${this.tabsOffsetBefore()}px; --srcTabsOffsetAfter: ${this.tabsOffsetAfter()}px; --srcTabsSpaceBetween: ${this.spacing()}px;`, ...(ngDevMode ? [{ debugName: "variables" }] : []));
|
|
309
|
+
this.tabsOffsetBefore = computed(() => this.offsetBefore() || (this.isCompact() ? 8 : 16), ...(ngDevMode ? [{ debugName: "tabsOffsetBefore" }] : []));
|
|
310
|
+
this.tabsOffsetAfter = computed(() => this.offsetAfter() || (this.isCompact() ? 8 : 16), ...(ngDevMode ? [{ debugName: "tabsOffsetAfter" }] : []));
|
|
311
|
+
this.spacing = computed(() => this.spaceBetween() || (this.isCompact() ? 0 : 4), ...(ngDevMode ? [{ debugName: "spacing" }] : []));
|
|
312
312
|
this._ = effect(() => {
|
|
313
313
|
const swiperRef = this.swiperRef();
|
|
314
314
|
untracked(() => {
|
|
@@ -324,52 +324,52 @@ class SourceTabLineComponent {
|
|
|
324
324
|
});
|
|
325
325
|
swiperRef.nativeElement.initialize();
|
|
326
326
|
});
|
|
327
|
-
});
|
|
327
|
+
}, ...(ngDevMode ? [{ debugName: "_" }] : []));
|
|
328
328
|
}
|
|
329
329
|
selectTab(tabIndex) {
|
|
330
330
|
this.tabsSelectedIndex.set(tabIndex);
|
|
331
331
|
this.onSelectTab.emit(tabIndex);
|
|
332
332
|
}
|
|
333
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
334
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTabLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
334
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SourceTabLineComponent, isStandalone: true, selector: "src-tab-line", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, isCompact: { classPropertyName: "isCompact", publicName: "isCompact", isSignal: true, isRequired: false, transformFunction: null }, offsetBefore: { classPropertyName: "offsetBefore", publicName: "offsetBefore", isSignal: true, isRequired: false, transformFunction: null }, offsetAfter: { classPropertyName: "offsetAfter", publicName: "offsetAfter", isSignal: true, isRequired: false, transformFunction: null }, spaceBetween: { classPropertyName: "spaceBetween", publicName: "spaceBetween", isSignal: true, isRequired: false, transformFunction: null }, isFullWidth: { classPropertyName: "isFullWidth", publicName: "isFullWidth", isSignal: true, isRequired: false, transformFunction: null }, isSwiper: { classPropertyName: "isSwiper", publicName: "isSwiper", isSignal: true, isRequired: false, transformFunction: null }, testID: { classPropertyName: "testID", publicName: "data-testid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectTab: "onSelectTab" }, viewQueries: [{ propertyName: "swiperRef", first: true, predicate: ["swiperRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [attr.data-testid]=\"testID()\" [ngClass]=\"classes()\" class=\"src-tab-line\">\n @if (isSwiper()) {\n <div class=\"src-tabs__nav src-tabs__nav--swiper\">\n <swiper-container #swiperRef init=\"false\">\n @for (tab of tabs(); track tab) {\n <swiper-slide class=\"src-tabs__nav-slide\">\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ tab: tab, index: $index }\"\n ></ng-container>\n </swiper-slide>\n }\n </swiper-container>\n </div>\n } @else {\n <div class=\"src-tabs__nav\" [style]=\"variables()\">\n @for (tab of tabs(); track tab) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ tab: tab, index: $index }\"\n ></ng-container>\n }\n </div>\n }\n</div>\n\n<ng-template #template let-i=\"index\" let-tab=\"tab\">\n <div\n (click)=\"selectTab(i)\"\n [attr.data-testid]=\"testID() + '-tab-label-' + tab[label()]\"\n [class.src-disabled]=\"tab.isDisabled\"\n [class.src-tabs__nav-item--active]=\"i === tabsSelectedIndex()\"\n class=\"src-tabs__nav-item\"\n >\n {{ tab[label()] }}\n </div>\n</ng-template>\n", styles: [".src-tab-line{--srcTabActiveBorderBg: transparent;--srcTabActiveBorderRadius: 4px 4px 0 0;--srcTabActiveBorderWidth: 100%;--srcTabActiveBorderHeight: 3px;--srcTabTextColor: var(--src-color-text-default-subdued);--srcTabTextWeight: var(--src-font-weight-regular, 400);--srcTabTextSize: var(--src-font-size-sm, 14px);--srcTabTextLineHeight: var(--src-font-line-sm, 20px)}.src-tabs__nav{width:100%;display:flex;padding:0;margin:0;list-style:none;background:transparent;box-shadow:0 -1px #e1e3e5 inset}.src-tabs__nav swiper-container{width:100%}.src-tabs__nav swiper-container .src-tabs__nav-slide{width:auto}.src-tabs__nav:not(.src-tabs__nav--swiper){padding-left:var(--srcTabsOffsetBefore);padding-right:var(--srcTabsOffsetAfter);gap:var(--srcTabsSpaceBetween)}.src-tabs__nav-item{position:relative;flex-shrink:0;margin:0;text-align:center;padding:14px 16px;font-size:var(--srcTabTextSize);font-style:normal;cursor:pointer;font-weight:var(--srcTabTextWeight);line-height:var(--srcTabTextLineHeight);color:var(--srcTabTextColor);text-decoration:none;background-color:transparent;border:none}.src-tabs__nav-item:after{content:\"\";position:absolute;bottom:0;left:0;border-radius:var(--srcTabActiveBorderRadius);width:var(--srcTabActiveBorderWidth);height:var(--srcTabActiveBorderHeight);background:var(--srcTabActiveBorderBg)}.src-tabs__nav-item:hover{--srcTabActiveBorderBg: var(--src-color-bg-strong);--srcTabTextColor: var(--src-color-text-default)}.src-tabs__nav-item.src-disabled{--srcTabTextColor: var(--src-color-text-default-disabled);pointer-events:none}.src-tabs__nav-item--active{--srcTabActiveBorderBg: var(--src-color-bg-primary);--srcTabTextColor: var(--src-color-text-default);--srcTabTextWeight: 500}.src-tabs__nav-item--active.src-disabled{--srcTabActiveBorderBg: var(--src-color-border-strong-disabled);--srcTabTextColor: var(--src-color-text-default-disabled)}.src-tabs__nav-item--active:hover{--srcTabTextColor: var(--src-color-text-default);--srcTabActiveBorderBg: var(--src-color-bg-primary)}.src-tab-line--full-width .src-tabs__nav-slide,.src-tab-line--full-width .src-tabs__nav-item{flex-grow:1}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
335
335
|
}
|
|
336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTabLineComponent, decorators: [{
|
|
337
337
|
type: Component,
|
|
338
|
-
args: [{ selector: 'src-tab-line', imports: [NgClass, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<div [attr.data-testid]=\"testID()\" [ngClass]=\"classes()\" class=\"src-tab-line\">\n @if (isSwiper()) {\n <div class=\"src-tabs__nav src-tabs__nav--swiper\">\n <swiper-container #swiperRef init=\"false\">\n @for (tab of tabs(); track tab) {\n <swiper-slide class=\"src-tabs__nav-slide\">\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ tab: tab, index: $index }\"\n ></ng-container>\n </swiper-slide>\n }\n </swiper-container>\n </div>\n } @else {\n <div class=\"src-tabs__nav\" [style]=\"variables()\">\n @for (tab of tabs(); track tab) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ tab: tab, index: $index }\"\n ></ng-container>\n }\n </div>\n }\n</div>\n\n<ng-template #template let-i=\"index\" let-tab=\"tab\">\n <div\n (click)=\"selectTab(i)\"\n [attr.data-testid]=\"testID() + '-tab-label-' + tab[label()]\"\n [class.src-disabled]=\"tab.isDisabled\"\n [class.src-tabs__nav-item--active]=\"i === tabsSelectedIndex()\"\n class=\"src-tabs__nav-item\"\n >\n {{ tab[label()] }}\n </div>\n</ng-template>\n", styles: [".src-tab-line{--srcTabActiveBorderBg: transparent;--srcTabActiveBorderRadius: 4px 4px 0 0;--srcTabActiveBorderWidth: 100%;--srcTabActiveBorderHeight: 3px;--srcTabTextColor: var(--src-color-text-default-subdued);--srcTabTextWeight: var(--src-
|
|
338
|
+
args: [{ selector: 'src-tab-line', imports: [NgClass, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<div [attr.data-testid]=\"testID()\" [ngClass]=\"classes()\" class=\"src-tab-line\">\n @if (isSwiper()) {\n <div class=\"src-tabs__nav src-tabs__nav--swiper\">\n <swiper-container #swiperRef init=\"false\">\n @for (tab of tabs(); track tab) {\n <swiper-slide class=\"src-tabs__nav-slide\">\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ tab: tab, index: $index }\"\n ></ng-container>\n </swiper-slide>\n }\n </swiper-container>\n </div>\n } @else {\n <div class=\"src-tabs__nav\" [style]=\"variables()\">\n @for (tab of tabs(); track tab) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ tab: tab, index: $index }\"\n ></ng-container>\n }\n </div>\n }\n</div>\n\n<ng-template #template let-i=\"index\" let-tab=\"tab\">\n <div\n (click)=\"selectTab(i)\"\n [attr.data-testid]=\"testID() + '-tab-label-' + tab[label()]\"\n [class.src-disabled]=\"tab.isDisabled\"\n [class.src-tabs__nav-item--active]=\"i === tabsSelectedIndex()\"\n class=\"src-tabs__nav-item\"\n >\n {{ tab[label()] }}\n </div>\n</ng-template>\n", styles: [".src-tab-line{--srcTabActiveBorderBg: transparent;--srcTabActiveBorderRadius: 4px 4px 0 0;--srcTabActiveBorderWidth: 100%;--srcTabActiveBorderHeight: 3px;--srcTabTextColor: var(--src-color-text-default-subdued);--srcTabTextWeight: var(--src-font-weight-regular, 400);--srcTabTextSize: var(--src-font-size-sm, 14px);--srcTabTextLineHeight: var(--src-font-line-sm, 20px)}.src-tabs__nav{width:100%;display:flex;padding:0;margin:0;list-style:none;background:transparent;box-shadow:0 -1px #e1e3e5 inset}.src-tabs__nav swiper-container{width:100%}.src-tabs__nav swiper-container .src-tabs__nav-slide{width:auto}.src-tabs__nav:not(.src-tabs__nav--swiper){padding-left:var(--srcTabsOffsetBefore);padding-right:var(--srcTabsOffsetAfter);gap:var(--srcTabsSpaceBetween)}.src-tabs__nav-item{position:relative;flex-shrink:0;margin:0;text-align:center;padding:14px 16px;font-size:var(--srcTabTextSize);font-style:normal;cursor:pointer;font-weight:var(--srcTabTextWeight);line-height:var(--srcTabTextLineHeight);color:var(--srcTabTextColor);text-decoration:none;background-color:transparent;border:none}.src-tabs__nav-item:after{content:\"\";position:absolute;bottom:0;left:0;border-radius:var(--srcTabActiveBorderRadius);width:var(--srcTabActiveBorderWidth);height:var(--srcTabActiveBorderHeight);background:var(--srcTabActiveBorderBg)}.src-tabs__nav-item:hover{--srcTabActiveBorderBg: var(--src-color-bg-strong);--srcTabTextColor: var(--src-color-text-default)}.src-tabs__nav-item.src-disabled{--srcTabTextColor: var(--src-color-text-default-disabled);pointer-events:none}.src-tabs__nav-item--active{--srcTabActiveBorderBg: var(--src-color-bg-primary);--srcTabTextColor: var(--src-color-text-default);--srcTabTextWeight: 500}.src-tabs__nav-item--active.src-disabled{--srcTabActiveBorderBg: var(--src-color-border-strong-disabled);--srcTabTextColor: var(--src-color-text-default-disabled)}.src-tabs__nav-item--active:hover{--srcTabTextColor: var(--src-color-text-default);--srcTabActiveBorderBg: var(--src-color-bg-primary)}.src-tab-line--full-width .src-tabs__nav-slide,.src-tab-line--full-width .src-tabs__nav-item{flex-grow:1}\n"] }]
|
|
339
339
|
}] });
|
|
340
340
|
|
|
341
341
|
class SourceTabsComponent {
|
|
342
342
|
constructor() {
|
|
343
|
-
this.label = input.required();
|
|
344
|
-
this.data = input.required();
|
|
345
|
-
this.selectedIndex = input(0);
|
|
346
|
-
this.headerTemplate = input();
|
|
347
|
-
this.isCompact = input(false);
|
|
348
|
-
this.isFullWidth = input(false);
|
|
349
|
-
this.isSwiper = input(false);
|
|
350
|
-
this.swiperConfig = input();
|
|
351
|
-
this.testID = input('', { alias: 'data-testid' });
|
|
343
|
+
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
344
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
345
|
+
this.selectedIndex = input(0, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
|
|
346
|
+
this.headerTemplate = input(...(ngDevMode ? [undefined, { debugName: "headerTemplate" }] : []));
|
|
347
|
+
this.isCompact = input(false, ...(ngDevMode ? [{ debugName: "isCompact" }] : []));
|
|
348
|
+
this.isFullWidth = input(false, ...(ngDevMode ? [{ debugName: "isFullWidth" }] : []));
|
|
349
|
+
this.isSwiper = input(false, ...(ngDevMode ? [{ debugName: "isSwiper" }] : []));
|
|
350
|
+
this.swiperConfig = input(...(ngDevMode ? [undefined, { debugName: "swiperConfig" }] : []));
|
|
351
|
+
this.testID = input('', ...(ngDevMode ? [{ debugName: "testID", alias: 'data-testid' }] : [{ alias: 'data-testid' }]));
|
|
352
352
|
this.onSelectTab = output();
|
|
353
353
|
}
|
|
354
354
|
setActive(idx) {
|
|
355
355
|
this.onSelectTab.emit(idx);
|
|
356
356
|
}
|
|
357
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: SourceTabsComponent, isStandalone: true, selector: "src-tabs", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, isCompact: { classPropertyName: "isCompact", publicName: "isCompact", isSignal: true, isRequired: false, transformFunction: null }, isFullWidth: { classPropertyName: "isFullWidth", publicName: "isFullWidth", isSignal: true, isRequired: false, transformFunction: null }, isSwiper: { classPropertyName: "isSwiper", publicName: "isSwiper", isSignal: true, isRequired: false, transformFunction: null }, swiperConfig: { classPropertyName: "swiperConfig", publicName: "swiperConfig", isSignal: true, isRequired: false, transformFunction: null }, testID: { classPropertyName: "testID", publicName: "data-testid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectTab: "onSelectTab" }, ngImport: i0, template: "<div class=\"src-tabs\">\n <ng-template #defaultTabsHeader>\n <src-tab-line\n [tabs]=\"data()\"\n [label]=\"label()\"\n [isCompact]=\"isCompact()\"\n [isFullWidth]=\"isFullWidth()\"\n [selectedIndex]=\"selectedIndex()\"\n [isSwiper]=\"isSwiper()\"\n [data-testid]=\"testID()\"\n (onSelectTab)=\"setActive($event)\"\n ></src-tab-line>\n </ng-template>\n\n <ng-container\n *ngTemplateOutlet=\"\n headerTemplate() ? headerTemplate()! : defaultTabsHeader;\n context: { tabs: this.data }\n \"\n >\n </ng-container>\n\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SourceTabLineComponent, selector: "src-tab-line", inputs: ["tabs", "label", "selectedIndex", "isCompact", "offsetBefore", "offsetAfter", "spaceBetween", "isFullWidth", "isSwiper", "data-testid"], outputs: ["onSelectTab"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
359
359
|
}
|
|
360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTabsComponent, decorators: [{
|
|
361
361
|
type: Component,
|
|
362
362
|
args: [{ selector: 'src-tabs', imports: [NgTemplateOutlet, SourceTabLineComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"src-tabs\">\n <ng-template #defaultTabsHeader>\n <src-tab-line\n [tabs]=\"data()\"\n [label]=\"label()\"\n [isCompact]=\"isCompact()\"\n [isFullWidth]=\"isFullWidth()\"\n [selectedIndex]=\"selectedIndex()\"\n [isSwiper]=\"isSwiper()\"\n [data-testid]=\"testID()\"\n (onSelectTab)=\"setActive($event)\"\n ></src-tab-line>\n </ng-template>\n\n <ng-container\n *ngTemplateOutlet=\"\n headerTemplate() ? headerTemplate()! : defaultTabsHeader;\n context: { tabs: this.data }\n \"\n >\n </ng-container>\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
363
363
|
}] });
|
|
364
364
|
|
|
365
365
|
class SourceTabComponent {
|
|
366
366
|
constructor() {
|
|
367
|
-
this.isActive = input(false);
|
|
367
|
+
this.isActive = input(false, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
368
368
|
}
|
|
369
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
370
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
369
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
370
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.3", type: SourceTabComponent, isStandalone: true, selector: "src-tab", inputs: { isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [hidden]=\"!isActive()\" class=\"src-tab-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".src-tab-content{padding:var(--spacing-16);background-color:var(--color-bg-default)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
371
371
|
}
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTabComponent, decorators: [{
|
|
373
373
|
type: Component,
|
|
374
374
|
args: [{ selector: 'src-tab', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [hidden]=\"!isActive()\" class=\"src-tab-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".src-tab-content{padding:var(--spacing-16);background-color:var(--color-bg-default)}\n"] }]
|
|
375
375
|
}] });
|
|
@@ -386,12 +386,12 @@ class SourceTooltipComponent {
|
|
|
386
386
|
get asTemplate() {
|
|
387
387
|
return this.data.content instanceof TemplateRef ? this.data.content : false;
|
|
388
388
|
}
|
|
389
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
390
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
390
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SourceTooltipComponent, isStandalone: true, selector: "src-tooltip", ngImport: i0, template: "<div\n class=\"src-tooltip\"\n [ngClass]=\"data.srcTooltipCustomClass\"\n [style.--srcTooltipMaxWidth]=\"data.srcTooltipMaxWidth\"\n>\n <div\n class=\"src-tooltip__content\"\n [class.src-tooltip__content--custom]=\"asTemplate\"\n >\n @if (asString) {\n {{ asString }}\n }\n\n @if (asTemplate) {\n <ng-template [ngTemplateOutlet]=\"asTemplate\"></ng-template>\n }\n </div>\n\n @if (data.srcTooltipPosition === 'top') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"11\"\n height=\"6\"\n viewBox=\"0 0 11 6\"\n fill=\"none\"\n >\n <path\n d=\"M6.26822 5.07814C5.86842 5.55789 5.13157 5.55789 4.73178 5.07813L0.500001 -1.35106e-06L10.5 -4.76837e-07L6.26822 5.07814Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'right') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n >\n <path\n d=\"M0.921864 5.76822C0.44211 5.36842 0.442111 4.63157 0.921865 4.23178L6 -2.62268e-07L6 10L0.921864 5.76822Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'bottom') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"11\"\n height=\"6\"\n viewBox=\"0 0 11 6\"\n fill=\"none\"\n >\n <path\n d=\"M4.73178 0.921865C5.13158 0.44211 5.86843 0.442111 6.26822 0.921866L10.5 6L0.5 6L4.73178 0.921865Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'left') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n >\n <path\n d=\"M5.07814 5.76822C5.55789 5.36842 5.55789 4.63157 5.07813 4.23178L-3.97233e-08 -2.62268e-07L-4.76837e-07 10L5.07814 5.76822Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n</div>\n", styles: [".src-tooltip{--srcTooltipFontSize: var(--src-font-size-xs);--srcTooltipFontColor: var(--src-color-text-inverse, #fff);--srcTooltipFontWeight: var(--src-font-weight-regular);--srcTooltipFontLineHeight: var(--src-font-line-xs);--srcTooltipBg: var(--src-color-bg-inverse, #1f2937);--srcTooltipShape: var(--src-border-rounded, 4px);--srcTooltipMaxWidth: 280px;--srcTooltipPointerEvents: none;position:relative;box-sizing:border-box}.src-tooltip__pin{position:absolute;color:var(--srcTooltipBg);pointer-events:var(--srcTooltipPointerEvents, none)}.src-tooltip__content{display:flex;flex-wrap:wrap;padding:8px 12px;max-width:var(--srcTooltipMaxWidth);text-align:center;font-family:var(--src-font-family-body, \"Inter\", sans-serif);font-size:var(--srcTooltipFontSize);font-style:normal;font-weight:var(--srcTooltipFontWeight);line-height:var(--srcTooltipFontLineHeight);color:var(--srcTooltipFontColor);border-radius:var(--srcTooltipShape);background:var(--srcTooltipBg)}.src-tooltip__content--custom{padding:6px}.src-tooltip--top{padding-bottom:6px}.src-tooltip--top .src-tooltip__pin{left:50%;bottom:-6px;transform:translate(-50%)}.src-tooltip--right{padding-left:6px}.src-tooltip--right .src-tooltip__pin{left:-6px;top:50%;transform:translateY(-50%)}.src-tooltip--bottom{padding-top:6px}.src-tooltip--bottom .src-tooltip__pin{left:50%;top:-6px;transform:translate(-50%)}.src-tooltip--left{padding-right:6px}.src-tooltip--left .src-tooltip__pin{right:-6px;top:50%;transform:translateY(-50%)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
391
391
|
}
|
|
392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTooltipComponent, decorators: [{
|
|
393
393
|
type: Component,
|
|
394
|
-
args: [{ selector: 'src-tooltip', imports: [NgClass, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"src-tooltip\"\n [ngClass]=\"data.srcTooltipCustomClass\"\n [style.--srcTooltipMaxWidth]=\"data.srcTooltipMaxWidth\"\n>\n <div\n class=\"src-tooltip__content\"\n [class.src-tooltip__content--custom]=\"asTemplate\"\n >\n @if (asString) {\n {{ asString }}\n }\n\n @if (asTemplate) {\n <ng-template [ngTemplateOutlet]=\"asTemplate\"></ng-template>\n }\n </div>\n\n @if (data.srcTooltipPosition === 'top') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"11\"\n height=\"6\"\n viewBox=\"0 0 11 6\"\n fill=\"none\"\n >\n <path\n d=\"M6.26822 5.07814C5.86842 5.55789 5.13157 5.55789 4.73178 5.07813L0.500001 -1.35106e-06L10.5 -4.76837e-07L6.26822 5.07814Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'right') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n >\n <path\n d=\"M0.921864 5.76822C0.44211 5.36842 0.442111 4.63157 0.921865 4.23178L6 -2.62268e-07L6 10L0.921864 5.76822Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'bottom') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"11\"\n height=\"6\"\n viewBox=\"0 0 11 6\"\n fill=\"none\"\n >\n <path\n d=\"M4.73178 0.921865C5.13158 0.44211 5.86843 0.442111 6.26822 0.921866L10.5 6L0.5 6L4.73178 0.921865Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'left') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n >\n <path\n d=\"M5.07814 5.76822C5.55789 5.36842 5.55789 4.63157 5.07813 4.23178L-3.97233e-08 -2.62268e-07L-4.76837e-07 10L5.07814 5.76822Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n</div>\n", styles: [".src-tooltip{--srcTooltipFontSize: var(--src-
|
|
394
|
+
args: [{ selector: 'src-tooltip', imports: [NgClass, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"src-tooltip\"\n [ngClass]=\"data.srcTooltipCustomClass\"\n [style.--srcTooltipMaxWidth]=\"data.srcTooltipMaxWidth\"\n>\n <div\n class=\"src-tooltip__content\"\n [class.src-tooltip__content--custom]=\"asTemplate\"\n >\n @if (asString) {\n {{ asString }}\n }\n\n @if (asTemplate) {\n <ng-template [ngTemplateOutlet]=\"asTemplate\"></ng-template>\n }\n </div>\n\n @if (data.srcTooltipPosition === 'top') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"11\"\n height=\"6\"\n viewBox=\"0 0 11 6\"\n fill=\"none\"\n >\n <path\n d=\"M6.26822 5.07814C5.86842 5.55789 5.13157 5.55789 4.73178 5.07813L0.500001 -1.35106e-06L10.5 -4.76837e-07L6.26822 5.07814Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'right') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n >\n <path\n d=\"M0.921864 5.76822C0.44211 5.36842 0.442111 4.63157 0.921865 4.23178L6 -2.62268e-07L6 10L0.921864 5.76822Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'bottom') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"11\"\n height=\"6\"\n viewBox=\"0 0 11 6\"\n fill=\"none\"\n >\n <path\n d=\"M4.73178 0.921865C5.13158 0.44211 5.86843 0.442111 6.26822 0.921866L10.5 6L0.5 6L4.73178 0.921865Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n\n @if (data.srcTooltipPosition === 'left') {\n <svg\n class=\"src-tooltip__pin\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n >\n <path\n d=\"M5.07814 5.76822C5.55789 5.36842 5.55789 4.63157 5.07813 4.23178L-3.97233e-08 -2.62268e-07L-4.76837e-07 10L5.07814 5.76822Z\"\n fill=\"currentColor\"\n />\n </svg>\n }\n</div>\n", styles: [".src-tooltip{--srcTooltipFontSize: var(--src-font-size-xs);--srcTooltipFontColor: var(--src-color-text-inverse, #fff);--srcTooltipFontWeight: var(--src-font-weight-regular);--srcTooltipFontLineHeight: var(--src-font-line-xs);--srcTooltipBg: var(--src-color-bg-inverse, #1f2937);--srcTooltipShape: var(--src-border-rounded, 4px);--srcTooltipMaxWidth: 280px;--srcTooltipPointerEvents: none;position:relative;box-sizing:border-box}.src-tooltip__pin{position:absolute;color:var(--srcTooltipBg);pointer-events:var(--srcTooltipPointerEvents, none)}.src-tooltip__content{display:flex;flex-wrap:wrap;padding:8px 12px;max-width:var(--srcTooltipMaxWidth);text-align:center;font-family:var(--src-font-family-body, \"Inter\", sans-serif);font-size:var(--srcTooltipFontSize);font-style:normal;font-weight:var(--srcTooltipFontWeight);line-height:var(--srcTooltipFontLineHeight);color:var(--srcTooltipFontColor);border-radius:var(--srcTooltipShape);background:var(--srcTooltipBg)}.src-tooltip__content--custom{padding:6px}.src-tooltip--top{padding-bottom:6px}.src-tooltip--top .src-tooltip__pin{left:50%;bottom:-6px;transform:translate(-50%)}.src-tooltip--right{padding-left:6px}.src-tooltip--right .src-tooltip__pin{left:-6px;top:50%;transform:translateY(-50%)}.src-tooltip--bottom{padding-top:6px}.src-tooltip--bottom .src-tooltip__pin{left:50%;top:-6px;transform:translate(-50%)}.src-tooltip--left{padding-right:6px}.src-tooltip--left .src-tooltip__pin{right:-6px;top:50%;transform:translateY(-50%)}\n"] }]
|
|
395
395
|
}] });
|
|
396
396
|
|
|
397
397
|
const TooltipPositions = {
|
|
@@ -445,12 +445,12 @@ const isDesktop = () => {
|
|
|
445
445
|
|
|
446
446
|
class SourceTooltipDirective {
|
|
447
447
|
constructor() {
|
|
448
|
-
this.srcTooltip = input.required();
|
|
449
|
-
this.srcTooltipPosition = input('top');
|
|
450
|
-
this.srcTooltipHideDelay = input(0);
|
|
451
|
-
this.srcTooltipMaxWidth = input('280px');
|
|
452
|
-
this.srcTooltipCustomClass = input('');
|
|
453
|
-
this.sourceTooltipData = input();
|
|
448
|
+
this.srcTooltip = input.required(...(ngDevMode ? [{ debugName: "srcTooltip" }] : []));
|
|
449
|
+
this.srcTooltipPosition = input('top', ...(ngDevMode ? [{ debugName: "srcTooltipPosition" }] : []));
|
|
450
|
+
this.srcTooltipHideDelay = input(0, ...(ngDevMode ? [{ debugName: "srcTooltipHideDelay" }] : []));
|
|
451
|
+
this.srcTooltipMaxWidth = input('280px', ...(ngDevMode ? [{ debugName: "srcTooltipMaxWidth" }] : []));
|
|
452
|
+
this.srcTooltipCustomClass = input('', ...(ngDevMode ? [{ debugName: "srcTooltipCustomClass" }] : []));
|
|
453
|
+
this.sourceTooltipData = input(...(ngDevMode ? [undefined, { debugName: "sourceTooltipData" }] : []));
|
|
454
454
|
this.overlayRef = null;
|
|
455
455
|
this.hoverDevice = this.isDeviceWithHover();
|
|
456
456
|
this.element = inject(ElementRef);
|
|
@@ -462,7 +462,7 @@ class SourceTooltipDirective {
|
|
|
462
462
|
...this._config,
|
|
463
463
|
content: tooltip,
|
|
464
464
|
};
|
|
465
|
-
});
|
|
465
|
+
}, ...(ngDevMode ? [{ debugName: "_" }] : []));
|
|
466
466
|
}
|
|
467
467
|
showTooltip() {
|
|
468
468
|
this.addTooltip();
|
|
@@ -549,10 +549,10 @@ class SourceTooltipDirective {
|
|
|
549
549
|
const isSamsungDevice = /Samsung/i.test(userAgent);
|
|
550
550
|
return (hasHover || hasFinePointer) && isDesktop() && !isSamsungDevice;
|
|
551
551
|
}
|
|
552
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
553
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
552
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
553
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: SourceTooltipDirective, isStandalone: true, selector: "[srcTooltip]", inputs: { srcTooltip: { classPropertyName: "srcTooltip", publicName: "srcTooltip", isSignal: true, isRequired: true, transformFunction: null }, srcTooltipPosition: { classPropertyName: "srcTooltipPosition", publicName: "srcTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, srcTooltipHideDelay: { classPropertyName: "srcTooltipHideDelay", publicName: "srcTooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null }, srcTooltipMaxWidth: { classPropertyName: "srcTooltipMaxWidth", publicName: "srcTooltipMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, srcTooltipCustomClass: { classPropertyName: "srcTooltipCustomClass", publicName: "srcTooltipCustomClass", isSignal: true, isRequired: false, transformFunction: null }, sourceTooltipData: { classPropertyName: "sourceTooltipData", publicName: "sourceTooltipData", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" } }, ngImport: i0 }); }
|
|
554
554
|
}
|
|
555
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceTooltipDirective, decorators: [{
|
|
556
556
|
type: Directive,
|
|
557
557
|
args: [{
|
|
558
558
|
selector: '[srcTooltip]',
|
|
@@ -683,16 +683,16 @@ function RGBtoHEX(r, g, b) {
|
|
|
683
683
|
|
|
684
684
|
class ColorPaletteComponent {
|
|
685
685
|
constructor() {
|
|
686
|
-
this.paletteContainer = viewChild('paletteContainer');
|
|
687
|
-
this.canvas = viewChild('paletteCanvas');
|
|
688
|
-
this.indicator = viewChild('indicator');
|
|
689
|
-
this.selectedHex = input.required();
|
|
690
|
-
this.isNeedUpdatePalette = input.required();
|
|
686
|
+
this.paletteContainer = viewChild('paletteContainer', ...(ngDevMode ? [{ debugName: "paletteContainer" }] : []));
|
|
687
|
+
this.canvas = viewChild('paletteCanvas', ...(ngDevMode ? [{ debugName: "canvas" }] : []));
|
|
688
|
+
this.indicator = viewChild('indicator', ...(ngDevMode ? [{ debugName: "indicator" }] : []));
|
|
689
|
+
this.selectedHex = input.required(...(ngDevMode ? [{ debugName: "selectedHex" }] : []));
|
|
690
|
+
this.isNeedUpdatePalette = input.required(...(ngDevMode ? [{ debugName: "isNeedUpdatePalette" }] : []));
|
|
691
691
|
this.paletteColorUpdate = output();
|
|
692
|
-
this.selectedPosition = signal({ x: 0, y: 0 });
|
|
693
|
-
this.ctx = signal(null);
|
|
694
|
-
this.width = signal(0);
|
|
695
|
-
this.height = signal(0);
|
|
692
|
+
this.selectedPosition = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "selectedPosition" }] : []));
|
|
693
|
+
this.ctx = signal(null, ...(ngDevMode ? [{ debugName: "ctx" }] : []));
|
|
694
|
+
this.width = signal(0, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
695
|
+
this.height = signal(0, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
696
696
|
this._ = effect(() => {
|
|
697
697
|
const container = this.paletteContainer();
|
|
698
698
|
const canvas = this.canvas();
|
|
@@ -703,7 +703,7 @@ class ColorPaletteComponent {
|
|
|
703
703
|
requestAnimationFrame(() => this.redraw());
|
|
704
704
|
}
|
|
705
705
|
});
|
|
706
|
-
});
|
|
706
|
+
}, ...(ngDevMode ? [{ debugName: "_" }] : []));
|
|
707
707
|
this._isNeedUpdatePalette = effect(() => {
|
|
708
708
|
const isNeedUpdatePalette = this.isNeedUpdatePalette();
|
|
709
709
|
untracked(() => {
|
|
@@ -711,7 +711,7 @@ class ColorPaletteComponent {
|
|
|
711
711
|
this.redraw();
|
|
712
712
|
}
|
|
713
713
|
});
|
|
714
|
-
});
|
|
714
|
+
}, ...(ngDevMode ? [{ debugName: "_isNeedUpdatePalette" }] : []));
|
|
715
715
|
this.#mousedown = false;
|
|
716
716
|
}
|
|
717
717
|
#mousedown;
|
|
@@ -773,10 +773,10 @@ class ColorPaletteComponent {
|
|
|
773
773
|
const imageData = this.ctx().getImageData(this.selectedPosition().x, this.selectedPosition().y, 1, 1).data;
|
|
774
774
|
this.paletteColorUpdate.emit(`#${RGBtoHEX(imageData[0], imageData[1], imageData[2])}`);
|
|
775
775
|
}
|
|
776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
777
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ColorPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
777
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.3", type: ColorPaletteComponent, isStandalone: true, selector: "src-color-palette", inputs: { selectedHex: { classPropertyName: "selectedHex", publicName: "selectedHex", isSignal: true, isRequired: true, transformFunction: null }, isNeedUpdatePalette: { classPropertyName: "isNeedUpdatePalette", publicName: "isNeedUpdatePalette", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { paletteColorUpdate: "paletteColorUpdate" }, host: { listeners: { "window:mouseup": "onMouseUp($event)" } }, viewQueries: [{ propertyName: "paletteContainer", first: true, predicate: ["paletteContainer"], descendants: true, isSignal: true }, { propertyName: "canvas", first: true, predicate: ["paletteCanvas"], descendants: true, isSignal: true }, { propertyName: "indicator", first: true, predicate: ["indicator"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #paletteContainer class=\"src-color-palette\">\n <canvas\n #paletteCanvas\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n [height]=\"height()\"\n [width]=\"width()\"\n class=\"src-color-palette__canvas\"\n >\n </canvas>\n</div>\n<span #indicator class=\"src-color-picker-indicator\"></span>\n", styles: [":host{position:relative}.src-color-palette{position:relative;width:100%;height:100%;min-height:0;border-radius:var(--srcColorPickerBorderRadius);overflow:hidden;display:block;box-sizing:border-box}.src-color-palette__canvas{display:block;line-height:1;width:100%;height:100%;min-height:0;box-sizing:border-box;cursor:pointer}.src-color-picker-indicator{position:absolute;width:var(--srcColorPickerIndicatorWidth);height:var(--srcColorPickerIndicatorHeight);background-color:transparent;border-radius:var(--srcColorPickerIndicatorBorderRadius);box-shadow:var(--srcColorPickerIndicatorShadow);pointer-events:none;margin:calc(var(--srcColorPickerIndicatorHeight) / -2) 0 0 calc(var(--srcColorPickerIndicatorWidth) / -2);border:var(--srcColorPickerIndicatorBorderWidth) solid var(--srcColorPickerIndicatorBorderColor)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
778
778
|
}
|
|
779
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ColorPaletteComponent, decorators: [{
|
|
780
780
|
type: Component,
|
|
781
781
|
args: [{ standalone: true, selector: 'src-color-palette', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #paletteContainer class=\"src-color-palette\">\n <canvas\n #paletteCanvas\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n [height]=\"height()\"\n [width]=\"width()\"\n class=\"src-color-palette__canvas\"\n >\n </canvas>\n</div>\n<span #indicator class=\"src-color-picker-indicator\"></span>\n", styles: [":host{position:relative}.src-color-palette{position:relative;width:100%;height:100%;min-height:0;border-radius:var(--srcColorPickerBorderRadius);overflow:hidden;display:block;box-sizing:border-box}.src-color-palette__canvas{display:block;line-height:1;width:100%;height:100%;min-height:0;box-sizing:border-box;cursor:pointer}.src-color-picker-indicator{position:absolute;width:var(--srcColorPickerIndicatorWidth);height:var(--srcColorPickerIndicatorHeight);background-color:transparent;border-radius:var(--srcColorPickerIndicatorBorderRadius);box-shadow:var(--srcColorPickerIndicatorShadow);pointer-events:none;margin:calc(var(--srcColorPickerIndicatorHeight) / -2) 0 0 calc(var(--srcColorPickerIndicatorWidth) / -2);border:var(--srcColorPickerIndicatorBorderWidth) solid var(--srcColorPickerIndicatorBorderColor)}\n"] }]
|
|
782
782
|
}], propDecorators: { onMouseUp: [{
|
|
@@ -801,18 +801,18 @@ function drawGradient(ctx, rectWidth, rectHeight, orientation) {
|
|
|
801
801
|
|
|
802
802
|
class ColorSliderComponent {
|
|
803
803
|
constructor() {
|
|
804
|
-
this.sliderContainer = viewChild('sliderContainer');
|
|
805
|
-
this.canvas = viewChild('canvas');
|
|
806
|
-
this.indicator = viewChild('indicator');
|
|
807
|
-
this.selectedHex = input.required();
|
|
808
|
-
this.orientation = input.required();
|
|
809
|
-
this.sliderThickness = input.required();
|
|
810
|
-
this.isNeedUpdateSlider = input.required();
|
|
804
|
+
this.sliderContainer = viewChild('sliderContainer', ...(ngDevMode ? [{ debugName: "sliderContainer" }] : []));
|
|
805
|
+
this.canvas = viewChild('canvas', ...(ngDevMode ? [{ debugName: "canvas" }] : []));
|
|
806
|
+
this.indicator = viewChild('indicator', ...(ngDevMode ? [{ debugName: "indicator" }] : []));
|
|
807
|
+
this.selectedHex = input.required(...(ngDevMode ? [{ debugName: "selectedHex" }] : []));
|
|
808
|
+
this.orientation = input.required(...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
809
|
+
this.sliderThickness = input.required(...(ngDevMode ? [{ debugName: "sliderThickness" }] : []));
|
|
810
|
+
this.isNeedUpdateSlider = input.required(...(ngDevMode ? [{ debugName: "isNeedUpdateSlider" }] : []));
|
|
811
811
|
this.sliderColorUpdate = output();
|
|
812
|
-
this.selectedPosition = signal({ x: 0, y: 0 });
|
|
813
|
-
this.width = signal(0);
|
|
814
|
-
this.height = signal(0);
|
|
815
|
-
this.ctx = signal(null);
|
|
812
|
+
this.selectedPosition = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "selectedPosition" }] : []));
|
|
813
|
+
this.width = signal(0, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
814
|
+
this.height = signal(0, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
815
|
+
this.ctx = signal(null, ...(ngDevMode ? [{ debugName: "ctx" }] : []));
|
|
816
816
|
this._ = effect(() => {
|
|
817
817
|
const container = this.sliderContainer();
|
|
818
818
|
const canvas = this.canvas();
|
|
@@ -827,7 +827,7 @@ class ColorSliderComponent {
|
|
|
827
827
|
requestAnimationFrame(() => this.redraw());
|
|
828
828
|
}
|
|
829
829
|
});
|
|
830
|
-
});
|
|
830
|
+
}, ...(ngDevMode ? [{ debugName: "_" }] : []));
|
|
831
831
|
this._isNeedUpdateSlider = effect(() => {
|
|
832
832
|
const isNeedUpdateSlider = this.isNeedUpdateSlider();
|
|
833
833
|
untracked(() => {
|
|
@@ -835,7 +835,7 @@ class ColorSliderComponent {
|
|
|
835
835
|
this.redraw();
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
|
-
});
|
|
838
|
+
}, ...(ngDevMode ? [{ debugName: "_isNeedUpdateSlider" }] : []));
|
|
839
839
|
this.#mousedown = false;
|
|
840
840
|
}
|
|
841
841
|
#mousedown;
|
|
@@ -901,10 +901,10 @@ class ColorSliderComponent {
|
|
|
901
901
|
const imageData = this.ctx().getImageData(this.selectedPosition().x, this.selectedPosition().y, 1, 1).data;
|
|
902
902
|
this.sliderColorUpdate.emit(`#${RGBtoHEX(imageData[0], imageData[1], imageData[2])}`);
|
|
903
903
|
}
|
|
904
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
905
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
904
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ColorSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
905
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.3", type: ColorSliderComponent, isStandalone: true, selector: "src-color-slider", inputs: { selectedHex: { classPropertyName: "selectedHex", publicName: "selectedHex", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, sliderThickness: { classPropertyName: "sliderThickness", publicName: "sliderThickness", isSignal: true, isRequired: true, transformFunction: null }, isNeedUpdateSlider: { classPropertyName: "isNeedUpdateSlider", publicName: "isNeedUpdateSlider", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { sliderColorUpdate: "sliderColorUpdate" }, host: { listeners: { "window:mouseup": "onMouseUp($event)" } }, viewQueries: [{ propertyName: "sliderContainer", first: true, predicate: ["sliderContainer"], descendants: true, isSignal: true }, { propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }, { propertyName: "indicator", first: true, predicate: ["indicator"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #sliderContainer class=\"src-color-slider\">\n <canvas\n #canvas\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n [height]=\"height()\"\n [width]=\"width()\"\n class=\"src-color-slider__canvas\"\n >\n </canvas>\n <span #indicator class=\"src-color-picker-indicator\"></span>\n</div>\n", styles: [".src-color-slider{width:100%;height:100%;position:relative}.src-color-slider__canvas{display:block;border-radius:var(--srcColorPickerBorderRadius);overflow:hidden;cursor:pointer}.src-color-picker-indicator{position:absolute;width:var(--srcColorPickerIndicatorWidth);height:var(--srcColorPickerIndicatorHeight);background-color:transparent;border-radius:var(--srcColorPickerIndicatorBorderRadius);box-shadow:var(--srcColorPickerIndicatorShadow);pointer-events:none;margin:calc(var(--srcColorPickerIndicatorHeight) / -2) 0 0 calc(var(--srcColorPickerIndicatorWidth) / -2);border:var(--srcColorPickerIndicatorBorderWidth) solid var(--srcColorPickerIndicatorBorderColor)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
906
906
|
}
|
|
907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ColorSliderComponent, decorators: [{
|
|
908
908
|
type: Component,
|
|
909
909
|
args: [{ standalone: true, selector: 'src-color-slider', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #sliderContainer class=\"src-color-slider\">\n <canvas\n #canvas\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n [height]=\"height()\"\n [width]=\"width()\"\n class=\"src-color-slider__canvas\"\n >\n </canvas>\n <span #indicator class=\"src-color-picker-indicator\"></span>\n</div>\n", styles: [".src-color-slider{width:100%;height:100%;position:relative}.src-color-slider__canvas{display:block;border-radius:var(--srcColorPickerBorderRadius);overflow:hidden;cursor:pointer}.src-color-picker-indicator{position:absolute;width:var(--srcColorPickerIndicatorWidth);height:var(--srcColorPickerIndicatorHeight);background-color:transparent;border-radius:var(--srcColorPickerIndicatorBorderRadius);box-shadow:var(--srcColorPickerIndicatorShadow);pointer-events:none;margin:calc(var(--srcColorPickerIndicatorHeight) / -2) 0 0 calc(var(--srcColorPickerIndicatorWidth) / -2);border:var(--srcColorPickerIndicatorBorderWidth) solid var(--srcColorPickerIndicatorBorderColor)}\n"] }]
|
|
910
910
|
}], propDecorators: { onMouseUp: [{
|
|
@@ -917,16 +917,16 @@ const randomUUID = () => crypto.randomUUID();
|
|
|
917
917
|
const matchRegexp = /^#[0-9a-f]{6}$/i;
|
|
918
918
|
class SourceColorPickerComponent {
|
|
919
919
|
constructor() {
|
|
920
|
-
this.selectedColor = input.required();
|
|
921
|
-
this.isCompact = input(false);
|
|
922
|
-
this.orientation = input('horizontal');
|
|
923
|
-
this.hasInput = input(true);
|
|
924
|
-
this.sliderThickness = input(28);
|
|
925
|
-
this.testID = input('', { alias: 'data-testid' });
|
|
920
|
+
this.selectedColor = input.required(...(ngDevMode ? [{ debugName: "selectedColor" }] : []));
|
|
921
|
+
this.isCompact = input(false, ...(ngDevMode ? [{ debugName: "isCompact" }] : []));
|
|
922
|
+
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
923
|
+
this.hasInput = input(true, ...(ngDevMode ? [{ debugName: "hasInput" }] : []));
|
|
924
|
+
this.sliderThickness = input(28, ...(ngDevMode ? [{ debugName: "sliderThickness" }] : []));
|
|
925
|
+
this.testID = input('', ...(ngDevMode ? [{ debugName: "testID", alias: 'data-testid' }] : [{ alias: 'data-testid' }]));
|
|
926
926
|
this.colorUpdate = output();
|
|
927
927
|
this.selectedHex = linkedSignal(() => this.selectedColor());
|
|
928
|
-
this.isNeedUpdatePalette = signal(null);
|
|
929
|
-
this.isNeedUpdateSlider = signal(null);
|
|
928
|
+
this.isNeedUpdatePalette = signal(null, ...(ngDevMode ? [{ debugName: "isNeedUpdatePalette" }] : []));
|
|
929
|
+
this.isNeedUpdateSlider = signal(null, ...(ngDevMode ? [{ debugName: "isNeedUpdateSlider" }] : []));
|
|
930
930
|
}
|
|
931
931
|
paletteColorUpdate(color) {
|
|
932
932
|
this.update(color);
|
|
@@ -948,12 +948,12 @@ class SourceColorPickerComponent {
|
|
|
948
948
|
this.selectedHex.set(color);
|
|
949
949
|
this.colorUpdate.emit(color);
|
|
950
950
|
}
|
|
951
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
952
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
952
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SourceColorPickerComponent, isStandalone: true, selector: "src-color-picker", inputs: { selectedColor: { classPropertyName: "selectedColor", publicName: "selectedColor", isSignal: true, isRequired: true, transformFunction: null }, isCompact: { classPropertyName: "isCompact", publicName: "isCompact", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, hasInput: { classPropertyName: "hasInput", publicName: "hasInput", isSignal: true, isRequired: false, transformFunction: null }, sliderThickness: { classPropertyName: "sliderThickness", publicName: "sliderThickness", isSignal: true, isRequired: false, transformFunction: null }, testID: { classPropertyName: "testID", publicName: "data-testid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorUpdate: "colorUpdate" }, ngImport: i0, template: "<div\n [class.src-color-picker--compact]=\"isCompact()\"\n [class.src-color-picker--horizontal]=\"orientation() === 'horizontal'\"\n [class.src-color-picker--vertical]=\"orientation() === 'vertical'\"\n [style.--srcColorPickerSliderThickness]=\"sliderThickness() + 'px'\"\n class=\"src-color-picker\"\n [attr.data-testid]=\"testID()\"\n>\n <div class=\"src-color-picker__wrapper\">\n <src-color-palette\n (paletteColorUpdate)=\"paletteColorUpdate($event)\"\n [isNeedUpdatePalette]=\"isNeedUpdatePalette()\"\n [selectedHex]=\"selectedHex()\"\n ></src-color-palette>\n <src-color-slider\n (sliderColorUpdate)=\"sliderColorUpdate($event)\"\n [isNeedUpdateSlider]=\"isNeedUpdateSlider()\"\n [orientation]=\"orientation()\"\n [selectedHex]=\"selectedHex()\"\n [sliderThickness]=\"sliderThickness()\"\n ></src-color-slider>\n </div>\n @if (hasInput()) {\n <div class=\"src-color-picker__input-row\">\n <input\n class=\"src-input src-color-picker__input\"\n type=\"text\"\n [attr.data-testid]=\"testID() + '-hex-input'\"\n [value]=\"selectedHex()\"\n (input)=\"inputUpdate($event)\"\n />\n <div\n class=\"src-color-picker__swatch\"\n [attr.data-testid]=\"testID() + '-swatch'\"\n [style.background-color]=\"selectedHex() || 'white'\"\n ></div>\n </div>\n }\n</div>\n", styles: [".src-color-picker{--srcColorPickerWidth: 360px;--srcColorPickerHeight: 340px;--srcColorPickerBorderRadius: var(--src-border-rounded, var(--src-space-1-5));--srcColorPickerBorderColor: var(--src-border-input-basic, #d1d5db);--srcColorPickerCanvasesGap: 8px;--srcColorPickerInputsGap: 12px;--srcColorPickerIndicatorWidth: 32px;--srcColorPickerIndicatorHeight: 32px;--srcColorPickerIndicatorBorderRadius: 50%;--srcColorPickerIndicatorBorderWidth: 5px;--srcColorPickerIndicatorBorderColor: #fff;--srcColorPickerIndicatorShadow: 0px 0px 2px 0px #0000007a, 0px 0px 3px 0px #00000033;width:var(--srcColorPickerWidth);height:var(--srcColorPickerHeight)}.src-color-picker--compact{--srcColorPickerWidth: 200px;--srcColorPickerHeight: 220px}.src-color-picker--horizontal{display:grid;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);gap:var(--srcColorPickerInputsGap)}.src-color-picker--horizontal .src-color-picker__wrapper{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) var(--srcColorPickerSliderThickness)}.src-color-picker--vertical{display:grid;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);gap:var(--srcColorPickerInputsGap)}.src-color-picker--vertical .src-color-picker__wrapper{grid-template-columns:minmax(0,1fr) var(--srcColorPickerSliderThickness);grid-template-rows:minmax(0,1fr)}.src-color-picker__wrapper{display:grid;width:100%;height:100%;gap:var(--srcColorPickerCanvasesGap)}.src-color-picker__input-row{width:100%;display:flex;align-items:center;gap:8px}.src-color-picker__input{flex-grow:1;height:36px}.src-color-picker__swatch{width:64px;height:36px;flex-shrink:0;border:1px solid var(--srcColorPickerBorderColor);border-radius:var(--srcColorPickerBorderRadius)}\n"], dependencies: [{ kind: "component", type: ColorSliderComponent, selector: "src-color-slider", inputs: ["selectedHex", "orientation", "sliderThickness", "isNeedUpdateSlider"], outputs: ["sliderColorUpdate"] }, { kind: "component", type: ColorPaletteComponent, selector: "src-color-palette", inputs: ["selectedHex", "isNeedUpdatePalette"], outputs: ["paletteColorUpdate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
953
953
|
}
|
|
954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceColorPickerComponent, decorators: [{
|
|
955
955
|
type: Component,
|
|
956
|
-
args: [{ selector: 'src-color-picker', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ColorSliderComponent, ColorPaletteComponent], template: "<div\n [class.src-color-picker--compact]=\"isCompact()\"\n [class.src-color-picker--horizontal]=\"orientation() === 'horizontal'\"\n [class.src-color-picker--vertical]=\"orientation() === 'vertical'\"\n [style.--srcColorPickerSliderThickness]=\"sliderThickness() + 'px'\"\n class=\"src-color-picker\"\n [attr.data-testid]=\"testID()\"\n>\n <div class=\"src-color-picker__wrapper\">\n <src-color-palette\n (paletteColorUpdate)=\"paletteColorUpdate($event)\"\n [isNeedUpdatePalette]=\"isNeedUpdatePalette()\"\n [selectedHex]=\"selectedHex()\"\n ></src-color-palette>\n <src-color-slider\n (sliderColorUpdate)=\"sliderColorUpdate($event)\"\n [isNeedUpdateSlider]=\"isNeedUpdateSlider()\"\n [orientation]=\"orientation()\"\n [selectedHex]=\"selectedHex()\"\n [sliderThickness]=\"sliderThickness()\"\n ></src-color-slider>\n </div>\n @if (hasInput()) {\n <div class=\"src-color-picker__input-row\">\n <input\n class=\"src-input src-color-picker__input\"\n type=\"text\"\n [attr.data-testid]=\"testID() + '-hex-input'\"\n [value]=\"selectedHex()\"\n (input)=\"inputUpdate($event)\"\n />\n <div\n class=\"src-color-picker__swatch\"\n [attr.data-testid]=\"testID() + '-swatch'\"\n [style.background-color]=\"selectedHex() || 'white'\"\n ></div>\n </div>\n }\n</div>\n", styles: [".src-color-picker{--srcColorPickerWidth: 360px;--srcColorPickerHeight: 340px;--srcColorPickerBorderRadius:
|
|
956
|
+
args: [{ selector: 'src-color-picker', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ColorSliderComponent, ColorPaletteComponent], template: "<div\n [class.src-color-picker--compact]=\"isCompact()\"\n [class.src-color-picker--horizontal]=\"orientation() === 'horizontal'\"\n [class.src-color-picker--vertical]=\"orientation() === 'vertical'\"\n [style.--srcColorPickerSliderThickness]=\"sliderThickness() + 'px'\"\n class=\"src-color-picker\"\n [attr.data-testid]=\"testID()\"\n>\n <div class=\"src-color-picker__wrapper\">\n <src-color-palette\n (paletteColorUpdate)=\"paletteColorUpdate($event)\"\n [isNeedUpdatePalette]=\"isNeedUpdatePalette()\"\n [selectedHex]=\"selectedHex()\"\n ></src-color-palette>\n <src-color-slider\n (sliderColorUpdate)=\"sliderColorUpdate($event)\"\n [isNeedUpdateSlider]=\"isNeedUpdateSlider()\"\n [orientation]=\"orientation()\"\n [selectedHex]=\"selectedHex()\"\n [sliderThickness]=\"sliderThickness()\"\n ></src-color-slider>\n </div>\n @if (hasInput()) {\n <div class=\"src-color-picker__input-row\">\n <input\n class=\"src-input src-color-picker__input\"\n type=\"text\"\n [attr.data-testid]=\"testID() + '-hex-input'\"\n [value]=\"selectedHex()\"\n (input)=\"inputUpdate($event)\"\n />\n <div\n class=\"src-color-picker__swatch\"\n [attr.data-testid]=\"testID() + '-swatch'\"\n [style.background-color]=\"selectedHex() || 'white'\"\n ></div>\n </div>\n }\n</div>\n", styles: [".src-color-picker{--srcColorPickerWidth: 360px;--srcColorPickerHeight: 340px;--srcColorPickerBorderRadius: var(--src-border-rounded, var(--src-space-1-5));--srcColorPickerBorderColor: var(--src-border-input-basic, #d1d5db);--srcColorPickerCanvasesGap: 8px;--srcColorPickerInputsGap: 12px;--srcColorPickerIndicatorWidth: 32px;--srcColorPickerIndicatorHeight: 32px;--srcColorPickerIndicatorBorderRadius: 50%;--srcColorPickerIndicatorBorderWidth: 5px;--srcColorPickerIndicatorBorderColor: #fff;--srcColorPickerIndicatorShadow: 0px 0px 2px 0px #0000007a, 0px 0px 3px 0px #00000033;width:var(--srcColorPickerWidth);height:var(--srcColorPickerHeight)}.src-color-picker--compact{--srcColorPickerWidth: 200px;--srcColorPickerHeight: 220px}.src-color-picker--horizontal{display:grid;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);gap:var(--srcColorPickerInputsGap)}.src-color-picker--horizontal .src-color-picker__wrapper{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) var(--srcColorPickerSliderThickness)}.src-color-picker--vertical{display:grid;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);gap:var(--srcColorPickerInputsGap)}.src-color-picker--vertical .src-color-picker__wrapper{grid-template-columns:minmax(0,1fr) var(--srcColorPickerSliderThickness);grid-template-rows:minmax(0,1fr)}.src-color-picker__wrapper{display:grid;width:100%;height:100%;gap:var(--srcColorPickerCanvasesGap)}.src-color-picker__input-row{width:100%;display:flex;align-items:center;gap:8px}.src-color-picker__input{flex-grow:1;height:36px}.src-color-picker__swatch{width:64px;height:36px;flex-shrink:0;border:1px solid var(--srcColorPickerBorderColor);border-radius:var(--srcColorPickerBorderRadius)}\n"] }]
|
|
957
957
|
}] });
|
|
958
958
|
|
|
959
959
|
const SourceColorPickerOrientation = {
|
|
@@ -963,17 +963,17 @@ const SourceColorPickerOrientation = {
|
|
|
963
963
|
|
|
964
964
|
class SourceSliderGroupComponent {
|
|
965
965
|
constructor() {
|
|
966
|
-
this.min = input.required();
|
|
967
|
-
this.max = input.required();
|
|
968
|
-
this.value = input.required();
|
|
969
|
-
this.label = input('');
|
|
970
|
-
this.id = input('');
|
|
971
|
-
this.step = input(1);
|
|
972
|
-
this.units = input('%');
|
|
973
|
-
this.showTicks = input(false);
|
|
974
|
-
this.showRange = input(false);
|
|
975
|
-
this.isDisabled = input(false);
|
|
976
|
-
this.testID = input('', { alias: 'data-testid' });
|
|
966
|
+
this.min = input.required(...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
967
|
+
this.max = input.required(...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
968
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
969
|
+
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
970
|
+
this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
971
|
+
this.step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
972
|
+
this.units = input('%', ...(ngDevMode ? [{ debugName: "units" }] : []));
|
|
973
|
+
this.showTicks = input(false, ...(ngDevMode ? [{ debugName: "showTicks" }] : []));
|
|
974
|
+
this.showRange = input(false, ...(ngDevMode ? [{ debugName: "showRange" }] : []));
|
|
975
|
+
this.isDisabled = input(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
976
|
+
this.testID = input('', ...(ngDevMode ? [{ debugName: "testID", alias: 'data-testid' }] : [{ alias: 'data-testid' }]));
|
|
977
977
|
this.groupValueChange = output();
|
|
978
978
|
this.inputValue = linkedSignal(() => this.value());
|
|
979
979
|
this.sliderValue = linkedSignal(() => Math.min(Math.max(this.value(), this.min()), this.max()));
|
|
@@ -998,10 +998,10 @@ class SourceSliderGroupComponent {
|
|
|
998
998
|
this.updateSliderValueFromInput(event);
|
|
999
999
|
event.target.blur();
|
|
1000
1000
|
}
|
|
1001
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1002
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1001
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceSliderGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1002
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: SourceSliderGroupComponent, isStandalone: true, selector: "src-slider-group", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, units: { classPropertyName: "units", publicName: "units", isSignal: true, isRequired: false, transformFunction: null }, showTicks: { classPropertyName: "showTicks", publicName: "showTicks", isSignal: true, isRequired: false, transformFunction: null }, showRange: { classPropertyName: "showRange", publicName: "showRange", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, testID: { classPropertyName: "testID", publicName: "data-testid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { groupValueChange: "groupValueChange" }, ngImport: i0, template: "<div\n [attr.data-testid]=\"testID()\"\n [class.src-slider-group--disabled]=\"isDisabled()\"\n class=\"src-slider-group\"\n>\n <div class=\"src-slider-group__label\">\n <label [attr.data-testid]=\"testID() + '-label'\" [for]=\"id()\">\n {{ label() }}</label\n >\n </div>\n <div class=\"src-slider-group__input\">\n <input\n (change)=\"updateSliderValueFromInput($event)\"\n (keydown.enter)=\"onEnter($event)\"\n [attr.data-testid]=\"testID() + '-input'\"\n [disabled]=\"isDisabled()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [value]=\"inputValue()\"\n class=\"src-slider-group__number\"\n type=\"number\"\n />\n @if (units()) {\n <div class=\"src-slider-group__units\">{{ units() }}</div>\n }\n </div>\n <src-slider\n (onChange)=\"updateSliderValue($event)\"\n [data-testid]=\"testID() + '-slider'\"\n [id]=\"id()\"\n [isDisabled]=\"isDisabled()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [showTicks]=\"showTicks()\"\n [step]=\"step()\"\n [value]=\"sliderValue()\"\n ></src-slider>\n @if (showRange()) {\n <div class=\"src-slider-group__range\">\n <span class=\"src-slider-group__range-min\">{{ min() }}</span>\n <span class=\"src-slider-group__range-max\">{{ max() }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;position:relative}.src-slider-group{--srcSliderLabelColor: var(--src-color-text-default, #1f2937);--srcSliderInputColor: var(--src-color-text-default, #1f2937);--srcSliderInputBorder: transparent;position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto auto;gap:0 12px}.src-slider-group--disabled{--srcSliderLabelColor: var(--src-color-text-default-disabled, #abb2be);--srcSliderInputColor: var(--src-color-text-default-disabled, #abb2be);--srcSliderInputBorder: transparent}.src-slider-group--disabled .src-slider-group__input:hover{--srcSliderInputBorder: transparent}.src-slider-group__label{grid-column:1/2;grid-row:1/2;padding-bottom:6px}.src-slider-group__label label{padding:2px 0;color:var(--srcSliderLabelColor);font-size:13px;font-style:normal;font-weight:400;line-height:16px}.src-slider-group__input{grid-column:2/-1;grid-row:1/2;display:flex;align-items:center;justify-self:flex-end;position:relative;margin-bottom:6px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:var(--srcSliderInputBorder)}.src-slider-group__input:hover{--srcSliderInputBorder: var(--src-color-border-hover, #d1d5db)}.src-slider-group__input:focus-within{outline:none;--srcSliderInputBorder: var(--src-color-border-primary, #0a8552);box-shadow:inset 0 -2px 0 0 var(--srcSliderInputBorder)}.src-slider-group__units{color:var(--srcSliderInputColor);font-size:13px;font-weight:400;line-height:16px}src-slider{grid-column:1/-1;grid-row:2/-1}.src-slider-group__number{text-align:right;border:none;padding:2px 0;background-color:transparent;min-width:0;width:auto;color:var(--srcSliderInputColor);font-size:13px;font-weight:400;line-height:16px;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.src-slider-group__number::-webkit-outer-spin-button,.src-slider-group__number::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.src-slider-group__range{grid-column:1/-1;width:100%;padding-top:6px;display:flex;align-items:center;justify-content:space-between;color:var(--srcSliderInputColor);font-size:13px;font-weight:400;line-height:16px}.src-slider-group__range-max{justify-self:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: SourceSliderComponent, selector: "src-slider", inputs: ["id", "value", "min", "max", "thumbSize", "trackHeight", "step", "showTicks", "isDisabled", "orientation", "data-testid"], outputs: ["onChange", "onInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1003
1003
|
}
|
|
1004
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SourceSliderGroupComponent, decorators: [{
|
|
1005
1005
|
type: Component,
|
|
1006
1006
|
args: [{ selector: 'src-slider-group', imports: [FormsModule, SourceSliderComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [attr.data-testid]=\"testID()\"\n [class.src-slider-group--disabled]=\"isDisabled()\"\n class=\"src-slider-group\"\n>\n <div class=\"src-slider-group__label\">\n <label [attr.data-testid]=\"testID() + '-label'\" [for]=\"id()\">\n {{ label() }}</label\n >\n </div>\n <div class=\"src-slider-group__input\">\n <input\n (change)=\"updateSliderValueFromInput($event)\"\n (keydown.enter)=\"onEnter($event)\"\n [attr.data-testid]=\"testID() + '-input'\"\n [disabled]=\"isDisabled()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [value]=\"inputValue()\"\n class=\"src-slider-group__number\"\n type=\"number\"\n />\n @if (units()) {\n <div class=\"src-slider-group__units\">{{ units() }}</div>\n }\n </div>\n <src-slider\n (onChange)=\"updateSliderValue($event)\"\n [data-testid]=\"testID() + '-slider'\"\n [id]=\"id()\"\n [isDisabled]=\"isDisabled()\"\n [max]=\"max()\"\n [min]=\"min()\"\n [showTicks]=\"showTicks()\"\n [step]=\"step()\"\n [value]=\"sliderValue()\"\n ></src-slider>\n @if (showRange()) {\n <div class=\"src-slider-group__range\">\n <span class=\"src-slider-group__range-min\">{{ min() }}</span>\n <span class=\"src-slider-group__range-max\">{{ max() }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;position:relative}.src-slider-group{--srcSliderLabelColor: var(--src-color-text-default, #1f2937);--srcSliderInputColor: var(--src-color-text-default, #1f2937);--srcSliderInputBorder: transparent;position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto auto;gap:0 12px}.src-slider-group--disabled{--srcSliderLabelColor: var(--src-color-text-default-disabled, #abb2be);--srcSliderInputColor: var(--src-color-text-default-disabled, #abb2be);--srcSliderInputBorder: transparent}.src-slider-group--disabled .src-slider-group__input:hover{--srcSliderInputBorder: transparent}.src-slider-group__label{grid-column:1/2;grid-row:1/2;padding-bottom:6px}.src-slider-group__label label{padding:2px 0;color:var(--srcSliderLabelColor);font-size:13px;font-style:normal;font-weight:400;line-height:16px}.src-slider-group__input{grid-column:2/-1;grid-row:1/2;display:flex;align-items:center;justify-self:flex-end;position:relative;margin-bottom:6px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:var(--srcSliderInputBorder)}.src-slider-group__input:hover{--srcSliderInputBorder: var(--src-color-border-hover, #d1d5db)}.src-slider-group__input:focus-within{outline:none;--srcSliderInputBorder: var(--src-color-border-primary, #0a8552);box-shadow:inset 0 -2px 0 0 var(--srcSliderInputBorder)}.src-slider-group__units{color:var(--srcSliderInputColor);font-size:13px;font-weight:400;line-height:16px}src-slider{grid-column:1/-1;grid-row:2/-1}.src-slider-group__number{text-align:right;border:none;padding:2px 0;background-color:transparent;min-width:0;width:auto;color:var(--srcSliderInputColor);font-size:13px;font-weight:400;line-height:16px;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.src-slider-group__number::-webkit-outer-spin-button,.src-slider-group__number::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.src-slider-group__range{grid-column:1/-1;width:100%;padding-top:6px;display:flex;align-items:center;justify-content:space-between;color:var(--srcSliderInputColor);font-size:13px;font-weight:400;line-height:16px}.src-slider-group__range-max{justify-self:flex-end}\n"] }]
|
|
1007
1007
|
}] });
|