@semantic-components/ui-lab 0.66.0 → 0.67.0
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.
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, DestroyRef, output, signal, effect, ElementRef, InjectionToken, model, viewChild, Directive, PLATFORM_ID, afterNextRender, afterRenderEffect, ViewChild, ViewContainerRef, contentChild, contentChildren, untracked, Injectable, TemplateRef } from '@angular/core';
|
|
3
|
-
import { RouterOutlet, Router, NavigationEnd
|
|
4
|
-
import { cn,
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, DestroyRef, output, signal, effect, ElementRef, InjectionToken, model, viewChild, Directive, PLATFORM_ID, afterNextRender, afterRenderEffect, ViewChild, ViewContainerRef, contentChild, Injector, runInInjectionContext, contentChildren, untracked, Injectable, TemplateRef } from '@angular/core';
|
|
3
|
+
import { RouterOutlet, Router, NavigationEnd } from '@angular/router';
|
|
4
|
+
import { cn, ScCalendar, buttonVariants, SC_FIELD, ScSheetProvider, ScSheetPortal, ScSheet, ScSheetClose, ScSkeleton, SC_TIME_PICKER } from '@semantic-components/ui';
|
|
5
5
|
import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
6
|
-
import { _IdGenerator, CdkTrapFocus } from '@angular/cdk/a11y';
|
|
7
6
|
import * as i1 from '@angular/aria/combobox';
|
|
8
7
|
import { Combobox, ComboboxInput, ComboboxPopupContainer, ComboboxDialog } from '@angular/aria/combobox';
|
|
9
8
|
import { signalSetFn, SIGNAL } from '@angular/core/primitives/signals';
|
|
10
9
|
import * as i1$1 from '@angular/aria/listbox';
|
|
11
10
|
import { Listbox, Option } from '@angular/aria/listbox';
|
|
12
11
|
import * as i1$2 from '@angular/cdk/overlay';
|
|
13
|
-
import { Overlay,
|
|
12
|
+
import { Overlay, OverlayModule, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
14
13
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
15
14
|
import { Temporal } from '@js-temporal/polyfill';
|
|
16
15
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
16
|
+
import { _IdGenerator, CdkTrapFocus } from '@angular/cdk/a11y';
|
|
17
17
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
18
18
|
import { filter, fromEvent, merge } from 'rxjs';
|
|
19
|
-
import {
|
|
19
|
+
import { SiGripVerticalIcon, SiXIcon } from '@semantic-icons/lucide-icons';
|
|
20
20
|
import { cva } from 'class-variance-authority';
|
|
21
21
|
import * as i1$3 from '@angular/aria/tree';
|
|
22
22
|
import { Tree, TreeItemGroup, TreeItem } from '@angular/aria/tree';
|
|
@@ -2451,98 +2451,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2451
2451
|
}]
|
|
2452
2452
|
}], ctorParameters: () => [], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], checkedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }] } });
|
|
2453
2453
|
|
|
2454
|
-
class ScNativeSelectContainer {
|
|
2455
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
2456
|
-
class = computed(() => cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
2457
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2458
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNativeSelectContainer, isStandalone: true, selector: "div[scNativeSelectContainer]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "native-select-container" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
2459
|
-
}
|
|
2460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectContainer, decorators: [{
|
|
2461
|
-
type: Directive,
|
|
2462
|
-
args: [{
|
|
2463
|
-
selector: 'div[scNativeSelectContainer]',
|
|
2464
|
-
host: {
|
|
2465
|
-
'data-slot': 'native-select-container',
|
|
2466
|
-
'[class]': 'class()',
|
|
2467
|
-
},
|
|
2468
|
-
}]
|
|
2469
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2470
|
-
|
|
2471
|
-
class ScNativeSelect {
|
|
2472
|
-
field = inject(SC_FIELD, { optional: true });
|
|
2473
|
-
fallbackId = inject(_IdGenerator).getId('sc-native-select-');
|
|
2474
|
-
idInput = input('', { ...(ngDevMode ? { debugName: "idInput" } : {}), alias: 'id' });
|
|
2475
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
2476
|
-
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
2477
|
-
id = computed(() => this.idInput() || this.field?.id() || this.fallbackId, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
2478
|
-
class = computed(() => cn('border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 outline-none disabled:pointer-events-none disabled:cursor-not-allowed', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
2479
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2480
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNativeSelect, isStandalone: true, selector: "select[scNativeSelect]", inputs: { idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "native-select" }, properties: { "attr.id": "id()", "attr.data-size": "size()", "class": "class()" } }, ngImport: i0 });
|
|
2481
|
-
}
|
|
2482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelect, decorators: [{
|
|
2483
|
-
type: Directive,
|
|
2484
|
-
args: [{
|
|
2485
|
-
selector: 'select[scNativeSelect]',
|
|
2486
|
-
host: {
|
|
2487
|
-
'data-slot': 'native-select',
|
|
2488
|
-
'[attr.id]': 'id()',
|
|
2489
|
-
'[attr.data-size]': 'size()',
|
|
2490
|
-
'[class]': 'class()',
|
|
2491
|
-
},
|
|
2492
|
-
}]
|
|
2493
|
-
}], propDecorators: { idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
2494
|
-
|
|
2495
|
-
class ScNativeSelectIcon {
|
|
2496
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
2497
|
-
class = computed(() => cn('text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
2498
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2499
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNativeSelectIcon, isStandalone: true, selector: "[scNativeSelectIcon]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "native-select-icon" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
2500
|
-
}
|
|
2501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectIcon, decorators: [{
|
|
2502
|
-
type: Directive,
|
|
2503
|
-
args: [{
|
|
2504
|
-
selector: '[scNativeSelectIcon]',
|
|
2505
|
-
host: {
|
|
2506
|
-
'data-slot': 'native-select-icon',
|
|
2507
|
-
'[class]': 'class()',
|
|
2508
|
-
},
|
|
2509
|
-
}]
|
|
2510
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2511
|
-
|
|
2512
|
-
class ScNativeSelectOption {
|
|
2513
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
2514
|
-
class = computed(() => cn(this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
2515
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2516
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNativeSelectOption, isStandalone: true, selector: "option[scNativeSelectOption]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "native-select-option" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
2517
|
-
}
|
|
2518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectOption, decorators: [{
|
|
2519
|
-
type: Directive,
|
|
2520
|
-
args: [{
|
|
2521
|
-
selector: 'option[scNativeSelectOption]',
|
|
2522
|
-
host: {
|
|
2523
|
-
'data-slot': 'native-select-option',
|
|
2524
|
-
'[class]': 'class()',
|
|
2525
|
-
},
|
|
2526
|
-
}]
|
|
2527
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2528
|
-
|
|
2529
|
-
class ScNativeSelectOptGroup {
|
|
2530
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
2531
|
-
class = computed(() => cn(this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
2532
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectOptGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2533
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNativeSelectOptGroup, isStandalone: true, selector: "optgroup[scNativeSelectOptgroup]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "native-select-optgroup" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
2534
|
-
}
|
|
2535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNativeSelectOptGroup, decorators: [{
|
|
2536
|
-
type: Directive,
|
|
2537
|
-
args: [{
|
|
2538
|
-
selector: 'optgroup[scNativeSelectOptgroup]',
|
|
2539
|
-
host: {
|
|
2540
|
-
'data-slot': 'native-select-optgroup',
|
|
2541
|
-
'[class]': 'class()',
|
|
2542
|
-
},
|
|
2543
|
-
}]
|
|
2544
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2545
|
-
|
|
2546
2454
|
// Token for color picker context
|
|
2547
2455
|
const SC_COLOR_PICKER = new InjectionToken('SC_COLOR_PICKER');
|
|
2548
2456
|
// Color conversion utilities
|
|
@@ -4087,6 +3995,10 @@ class ScContextMenuSub {
|
|
|
4087
3995
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
4088
3996
|
/** Whether the submenu is open */
|
|
4089
3997
|
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
3998
|
+
/** Overlay origin registered by the sub-trigger */
|
|
3999
|
+
overlayOrigin = null;
|
|
4000
|
+
/** Cancel hide function registered by the sub-trigger */
|
|
4001
|
+
cancelTriggerHide = null;
|
|
4090
4002
|
class = computed(() => cn('relative', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
4091
4003
|
show() {
|
|
4092
4004
|
this.open.set(true);
|
|
@@ -4115,10 +4027,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
4115
4027
|
}]
|
|
4116
4028
|
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
4117
4029
|
|
|
4030
|
+
const positions = [
|
|
4031
|
+
{
|
|
4032
|
+
originX: 'end',
|
|
4033
|
+
originY: 'top',
|
|
4034
|
+
overlayX: 'start',
|
|
4035
|
+
overlayY: 'top',
|
|
4036
|
+
offsetX: 4,
|
|
4037
|
+
},
|
|
4038
|
+
{
|
|
4039
|
+
originX: 'start',
|
|
4040
|
+
originY: 'top',
|
|
4041
|
+
overlayX: 'end',
|
|
4042
|
+
overlayY: 'top',
|
|
4043
|
+
offsetX: -4,
|
|
4044
|
+
},
|
|
4045
|
+
];
|
|
4046
|
+
class ScContextMenuSubContent {
|
|
4047
|
+
submenu = inject(ScContextMenuSub);
|
|
4048
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
4049
|
+
positions = positions;
|
|
4050
|
+
class = computed(() => cn('', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
4051
|
+
contentClass = computed(() => cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg', this.submenu.open()
|
|
4052
|
+
? 'opacity-100 scale-100 transition-[opacity,transform] duration-150 ease-out'
|
|
4053
|
+
: 'opacity-0 scale-95 transition-[opacity,transform] duration-150 ease-in'), ...(ngDevMode ? [{ debugName: "contentClass" }] : []));
|
|
4054
|
+
onMouseEnter() {
|
|
4055
|
+
this.submenu.cancelTriggerHide?.();
|
|
4056
|
+
}
|
|
4057
|
+
onMouseLeave() {
|
|
4058
|
+
this.submenu.hide();
|
|
4059
|
+
}
|
|
4060
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScContextMenuSubContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScContextMenuSubContent, isStandalone: true, selector: "div[scContextMenuSubContent]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "context-menu-sub-content" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
4062
|
+
<ng-template
|
|
4063
|
+
cdkConnectedOverlay
|
|
4064
|
+
[cdkConnectedOverlayOrigin]="submenu.overlayOrigin!"
|
|
4065
|
+
[cdkConnectedOverlayOpen]="submenu.open()"
|
|
4066
|
+
[cdkConnectedOverlayPositions]="positions"
|
|
4067
|
+
>
|
|
4068
|
+
<div
|
|
4069
|
+
[class]="contentClass()"
|
|
4070
|
+
role="menu"
|
|
4071
|
+
(mouseenter)="onMouseEnter()"
|
|
4072
|
+
(mouseleave)="onMouseLeave()"
|
|
4073
|
+
>
|
|
4074
|
+
<ng-content />
|
|
4075
|
+
</div>
|
|
4076
|
+
</ng-template>
|
|
4077
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4078
|
+
}
|
|
4079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScContextMenuSubContent, decorators: [{
|
|
4080
|
+
type: Component,
|
|
4081
|
+
args: [{
|
|
4082
|
+
selector: 'div[scContextMenuSubContent]',
|
|
4083
|
+
imports: [OverlayModule],
|
|
4084
|
+
template: `
|
|
4085
|
+
<ng-template
|
|
4086
|
+
cdkConnectedOverlay
|
|
4087
|
+
[cdkConnectedOverlayOrigin]="submenu.overlayOrigin!"
|
|
4088
|
+
[cdkConnectedOverlayOpen]="submenu.open()"
|
|
4089
|
+
[cdkConnectedOverlayPositions]="positions"
|
|
4090
|
+
>
|
|
4091
|
+
<div
|
|
4092
|
+
[class]="contentClass()"
|
|
4093
|
+
role="menu"
|
|
4094
|
+
(mouseenter)="onMouseEnter()"
|
|
4095
|
+
(mouseleave)="onMouseLeave()"
|
|
4096
|
+
>
|
|
4097
|
+
<ng-content />
|
|
4098
|
+
</div>
|
|
4099
|
+
</ng-template>
|
|
4100
|
+
`,
|
|
4101
|
+
host: {
|
|
4102
|
+
'data-slot': 'context-menu-sub-content',
|
|
4103
|
+
'[class]': 'class()',
|
|
4104
|
+
},
|
|
4105
|
+
encapsulation: ViewEncapsulation.None,
|
|
4106
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4107
|
+
}]
|
|
4108
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
4109
|
+
|
|
4118
4110
|
class ScContextMenuSubTrigger {
|
|
4119
4111
|
submenu = inject(ScContextMenuSub);
|
|
4120
4112
|
overlayOrigin = inject(CdkOverlayOrigin);
|
|
4121
4113
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
4114
|
+
constructor() {
|
|
4115
|
+
this.submenu.overlayOrigin = this.overlayOrigin;
|
|
4116
|
+
this.submenu.cancelTriggerHide = () => this.cancelHide();
|
|
4117
|
+
}
|
|
4122
4118
|
showTimeout = null;
|
|
4123
4119
|
hideTimeout = null;
|
|
4124
4120
|
class = computed(() => cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none', 'focus:bg-accent focus:text-accent-foreground', 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
@@ -4202,88 +4198,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
4202
4198
|
encapsulation: ViewEncapsulation.None,
|
|
4203
4199
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4204
4200
|
}]
|
|
4205
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
4206
|
-
|
|
4207
|
-
const positions = [
|
|
4208
|
-
{
|
|
4209
|
-
originX: 'end',
|
|
4210
|
-
originY: 'top',
|
|
4211
|
-
overlayX: 'start',
|
|
4212
|
-
overlayY: 'top',
|
|
4213
|
-
offsetX: 4,
|
|
4214
|
-
},
|
|
4215
|
-
{
|
|
4216
|
-
originX: 'start',
|
|
4217
|
-
originY: 'top',
|
|
4218
|
-
overlayX: 'end',
|
|
4219
|
-
overlayY: 'top',
|
|
4220
|
-
offsetX: -4,
|
|
4221
|
-
},
|
|
4222
|
-
];
|
|
4223
|
-
class ScContextMenuSubContent {
|
|
4224
|
-
submenu = inject(ScContextMenuSub);
|
|
4225
|
-
trigger = inject(ScContextMenuSubTrigger);
|
|
4226
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
4227
|
-
positions = positions;
|
|
4228
|
-
class = computed(() => cn('', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
4229
|
-
contentClass = computed(() => cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg', this.submenu.open()
|
|
4230
|
-
? 'opacity-100 scale-100 transition-[opacity,transform] duration-150 ease-out'
|
|
4231
|
-
: 'opacity-0 scale-95 transition-[opacity,transform] duration-150 ease-in'), ...(ngDevMode ? [{ debugName: "contentClass" }] : []));
|
|
4232
|
-
onMouseEnter() {
|
|
4233
|
-
this.trigger.cancelHide();
|
|
4234
|
-
}
|
|
4235
|
-
onMouseLeave() {
|
|
4236
|
-
this.submenu.hide();
|
|
4237
|
-
}
|
|
4238
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScContextMenuSubContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4239
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScContextMenuSubContent, isStandalone: true, selector: "div[scContextMenuSubContent]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "context-menu-sub-content" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
4240
|
-
<ng-template
|
|
4241
|
-
cdkConnectedOverlay
|
|
4242
|
-
[cdkConnectedOverlayOrigin]="trigger.overlayOrigin"
|
|
4243
|
-
[cdkConnectedOverlayOpen]="submenu.open()"
|
|
4244
|
-
[cdkConnectedOverlayPositions]="positions"
|
|
4245
|
-
>
|
|
4246
|
-
<div
|
|
4247
|
-
[class]="contentClass()"
|
|
4248
|
-
role="menu"
|
|
4249
|
-
(mouseenter)="onMouseEnter()"
|
|
4250
|
-
(mouseleave)="onMouseLeave()"
|
|
4251
|
-
>
|
|
4252
|
-
<ng-content />
|
|
4253
|
-
</div>
|
|
4254
|
-
</ng-template>
|
|
4255
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4256
|
-
}
|
|
4257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScContextMenuSubContent, decorators: [{
|
|
4258
|
-
type: Component,
|
|
4259
|
-
args: [{
|
|
4260
|
-
selector: 'div[scContextMenuSubContent]',
|
|
4261
|
-
imports: [OverlayModule],
|
|
4262
|
-
template: `
|
|
4263
|
-
<ng-template
|
|
4264
|
-
cdkConnectedOverlay
|
|
4265
|
-
[cdkConnectedOverlayOrigin]="trigger.overlayOrigin"
|
|
4266
|
-
[cdkConnectedOverlayOpen]="submenu.open()"
|
|
4267
|
-
[cdkConnectedOverlayPositions]="positions"
|
|
4268
|
-
>
|
|
4269
|
-
<div
|
|
4270
|
-
[class]="contentClass()"
|
|
4271
|
-
role="menu"
|
|
4272
|
-
(mouseenter)="onMouseEnter()"
|
|
4273
|
-
(mouseleave)="onMouseLeave()"
|
|
4274
|
-
>
|
|
4275
|
-
<ng-content />
|
|
4276
|
-
</div>
|
|
4277
|
-
</ng-template>
|
|
4278
|
-
`,
|
|
4279
|
-
host: {
|
|
4280
|
-
'data-slot': 'context-menu-sub-content',
|
|
4281
|
-
'[class]': 'class()',
|
|
4282
|
-
},
|
|
4283
|
-
encapsulation: ViewEncapsulation.None,
|
|
4284
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4285
|
-
}]
|
|
4286
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
4201
|
+
}], ctorParameters: () => [], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
4287
4202
|
|
|
4288
4203
|
class ScContextMenuTrigger {
|
|
4289
4204
|
contextMenu = inject(ScContextMenu);
|
|
@@ -7765,524 +7680,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
7765
7680
|
}]
|
|
7766
7681
|
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
7767
7682
|
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
const newFiles = Array.from(fileList);
|
|
7789
|
-
const currentFiles = this.files();
|
|
7790
|
-
const maxFiles = this.maxFiles();
|
|
7791
|
-
const maxSize = this.maxSize();
|
|
7792
|
-
const accept = this.accept();
|
|
7793
|
-
const validFiles = [];
|
|
7794
|
-
for (const file of newFiles) {
|
|
7795
|
-
// Check max files limit
|
|
7796
|
-
if (maxFiles > 0 && currentFiles.length + validFiles.length >= maxFiles) {
|
|
7797
|
-
this.error.emit(`Maximum ${maxFiles} files allowed`);
|
|
7798
|
-
break;
|
|
7799
|
-
}
|
|
7800
|
-
// Check file size
|
|
7801
|
-
if (maxSize > 0 && file.size > maxSize) {
|
|
7802
|
-
this.error.emit(`File "${file.name}" exceeds maximum size`);
|
|
7803
|
-
continue;
|
|
7804
|
-
}
|
|
7805
|
-
// Check file type
|
|
7806
|
-
if (accept && !this.isAcceptedType(file, accept)) {
|
|
7807
|
-
this.error.emit(`File "${file.name}" is not an accepted type`);
|
|
7808
|
-
continue;
|
|
7809
|
-
}
|
|
7810
|
-
validFiles.push(file);
|
|
7811
|
-
}
|
|
7812
|
-
if (validFiles.length > 0) {
|
|
7813
|
-
const uploadFiles = validFiles.map((file) => ({
|
|
7814
|
-
file,
|
|
7815
|
-
id: this.generateId(),
|
|
7816
|
-
status: 'pending',
|
|
7817
|
-
}));
|
|
7818
|
-
if (this.multiple()) {
|
|
7819
|
-
this.files.update((files) => [...files, ...uploadFiles]);
|
|
7820
|
-
}
|
|
7821
|
-
else {
|
|
7822
|
-
this.files.set(uploadFiles.slice(0, 1));
|
|
7823
|
-
}
|
|
7824
|
-
this.filesSelected.emit(validFiles);
|
|
7825
|
-
}
|
|
7826
|
-
}
|
|
7827
|
-
removeFile(fileId) {
|
|
7828
|
-
const file = this.files().find((f) => f.id === fileId);
|
|
7829
|
-
if (file) {
|
|
7830
|
-
this.files.update((files) => files.filter((f) => f.id !== fileId));
|
|
7831
|
-
this.fileRemoved.emit(file);
|
|
7832
|
-
}
|
|
7833
|
-
}
|
|
7834
|
-
updateFileProgress(fileId, progress) {
|
|
7835
|
-
this.files.update((files) => files.map((f) => f.id === fileId ? { ...f, progress, status: 'uploading' } : f));
|
|
7836
|
-
}
|
|
7837
|
-
updateFileStatus(fileId, status, error) {
|
|
7838
|
-
this.files.update((files) => files.map((f) => (f.id === fileId ? { ...f, status, error } : f)));
|
|
7839
|
-
}
|
|
7840
|
-
clearFiles() {
|
|
7841
|
-
this.files.set([]);
|
|
7842
|
-
}
|
|
7843
|
-
isAcceptedType(file, accept) {
|
|
7844
|
-
const acceptTypes = accept.split(',').map((t) => t.trim().toLowerCase());
|
|
7845
|
-
for (const acceptType of acceptTypes) {
|
|
7846
|
-
if (acceptType.startsWith('.')) {
|
|
7847
|
-
// Extension check
|
|
7848
|
-
if (file.name.toLowerCase().endsWith(acceptType)) {
|
|
7849
|
-
return true;
|
|
7850
|
-
}
|
|
7851
|
-
}
|
|
7852
|
-
else if (acceptType.endsWith('/*')) {
|
|
7853
|
-
// MIME type wildcard (e.g., image/*)
|
|
7854
|
-
const mimePrefix = acceptType.slice(0, -2);
|
|
7855
|
-
if (file.type.toLowerCase().startsWith(mimePrefix)) {
|
|
7856
|
-
return true;
|
|
7857
|
-
}
|
|
7858
|
-
}
|
|
7859
|
-
else {
|
|
7860
|
-
// Exact MIME type match
|
|
7861
|
-
if (file.type.toLowerCase() === acceptType) {
|
|
7862
|
-
return true;
|
|
7863
|
-
}
|
|
7864
|
-
}
|
|
7865
|
-
}
|
|
7866
|
-
return false;
|
|
7867
|
-
}
|
|
7868
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUpload, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
7869
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUpload, isStandalone: true, selector: "[scFileUpload]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesSelected: "filesSelected", fileRemoved: "fileRemoved", error: "error" }, host: { attributes: { "data-slot": "file-upload" }, properties: { "class": "class()" } }, providers: [{ provide: SC_FILE_UPLOAD, useExisting: ScFileUpload }], ngImport: i0 });
|
|
7870
|
-
}
|
|
7871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUpload, decorators: [{
|
|
7872
|
-
type: Directive,
|
|
7873
|
-
args: [{
|
|
7874
|
-
selector: '[scFileUpload]',
|
|
7875
|
-
providers: [{ provide: SC_FILE_UPLOAD, useExisting: ScFileUpload }],
|
|
7876
|
-
host: {
|
|
7877
|
-
'data-slot': 'file-upload',
|
|
7878
|
-
'[class]': 'class()',
|
|
7879
|
-
},
|
|
7880
|
-
}]
|
|
7881
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], fileRemoved: [{ type: i0.Output, args: ["fileRemoved"] }], error: [{ type: i0.Output, args: ["error"] }] } });
|
|
7882
|
-
|
|
7883
|
-
class ScFileUploadDropzone {
|
|
7884
|
-
fileUpload = inject(SC_FILE_UPLOAD);
|
|
7885
|
-
elementRef = inject(ElementRef);
|
|
7886
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
7887
|
-
isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
7888
|
-
class = computed(() => cn('relative flex min-h-[150px] cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed', 'transition-colors hover:border-primary/50 hover:bg-accent/50', 'data-[dragging=true]:border-primary data-[dragging=true]:bg-accent', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7889
|
-
openFilePicker() {
|
|
7890
|
-
if (this.fileUpload.disabled())
|
|
7891
|
-
return;
|
|
7892
|
-
const input = this.elementRef.nativeElement.querySelector('input[type="file"]');
|
|
7893
|
-
input?.click();
|
|
7894
|
-
}
|
|
7895
|
-
onFileSelect(event) {
|
|
7896
|
-
const input = event.target;
|
|
7897
|
-
if (input.files && input.files.length > 0) {
|
|
7898
|
-
this.fileUpload.addFiles(input.files);
|
|
7899
|
-
input.value = '';
|
|
7900
|
-
}
|
|
7901
|
-
}
|
|
7902
|
-
onDragOver(event) {
|
|
7903
|
-
event.preventDefault();
|
|
7904
|
-
event.stopPropagation();
|
|
7905
|
-
if (!this.fileUpload.disabled()) {
|
|
7906
|
-
this.isDragging.set(true);
|
|
7907
|
-
}
|
|
7908
|
-
}
|
|
7909
|
-
onDragLeave(event) {
|
|
7910
|
-
event.preventDefault();
|
|
7911
|
-
event.stopPropagation();
|
|
7912
|
-
this.isDragging.set(false);
|
|
7913
|
-
}
|
|
7914
|
-
onDrop(event) {
|
|
7915
|
-
event.preventDefault();
|
|
7916
|
-
event.stopPropagation();
|
|
7917
|
-
this.isDragging.set(false);
|
|
7918
|
-
if (this.fileUpload.disabled())
|
|
7919
|
-
return;
|
|
7920
|
-
const files = event.dataTransfer?.files;
|
|
7921
|
-
if (files && files.length > 0) {
|
|
7922
|
-
this.fileUpload.addFiles(files);
|
|
7923
|
-
}
|
|
7924
|
-
}
|
|
7925
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadDropzone, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7926
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadDropzone, isStandalone: true, selector: "[scFileUploadDropzone]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-dropzone" }, listeners: { "click": "openFilePicker()", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class": "class()", "attr.data-dragging": "isDragging()", "attr.data-disabled": "fileUpload.disabled() || null" } }, ngImport: i0, template: `
|
|
7927
|
-
<input
|
|
7928
|
-
#fileInput
|
|
7929
|
-
type="file"
|
|
7930
|
-
class="sr-only"
|
|
7931
|
-
[multiple]="fileUpload.multiple()"
|
|
7932
|
-
[accept]="fileUpload.accept()"
|
|
7933
|
-
[disabled]="fileUpload.disabled()"
|
|
7934
|
-
(change)="onFileSelect($event)"
|
|
7935
|
-
/>
|
|
7936
|
-
<ng-content />
|
|
7937
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
7938
|
-
}
|
|
7939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadDropzone, decorators: [{
|
|
7940
|
-
type: Component,
|
|
7941
|
-
args: [{
|
|
7942
|
-
selector: '[scFileUploadDropzone]',
|
|
7943
|
-
template: `
|
|
7944
|
-
<input
|
|
7945
|
-
#fileInput
|
|
7946
|
-
type="file"
|
|
7947
|
-
class="sr-only"
|
|
7948
|
-
[multiple]="fileUpload.multiple()"
|
|
7949
|
-
[accept]="fileUpload.accept()"
|
|
7950
|
-
[disabled]="fileUpload.disabled()"
|
|
7951
|
-
(change)="onFileSelect($event)"
|
|
7952
|
-
/>
|
|
7953
|
-
<ng-content />
|
|
7954
|
-
`,
|
|
7955
|
-
host: {
|
|
7956
|
-
'data-slot': 'file-upload-dropzone',
|
|
7957
|
-
'[class]': 'class()',
|
|
7958
|
-
'[attr.data-dragging]': 'isDragging()',
|
|
7959
|
-
'[attr.data-disabled]': 'fileUpload.disabled() || null',
|
|
7960
|
-
'(click)': 'openFilePicker()',
|
|
7961
|
-
'(dragover)': 'onDragOver($event)',
|
|
7962
|
-
'(dragleave)': 'onDragLeave($event)',
|
|
7963
|
-
'(drop)': 'onDrop($event)',
|
|
7964
|
-
},
|
|
7965
|
-
encapsulation: ViewEncapsulation.None,
|
|
7966
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7967
|
-
}]
|
|
7968
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
7969
|
-
|
|
7970
|
-
class ScFileUploadTrigger {
|
|
7971
|
-
fileUpload = inject(SC_FILE_UPLOAD);
|
|
7972
|
-
elementRef = inject(ElementRef);
|
|
7973
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
7974
|
-
class = computed(() => cn(buttonVariants({ variant: 'default', size: 'lg' }), this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7975
|
-
openFilePicker(event) {
|
|
7976
|
-
event.preventDefault();
|
|
7977
|
-
if (this.fileUpload.disabled())
|
|
7978
|
-
return;
|
|
7979
|
-
const input = this.elementRef.nativeElement.querySelector('input[type="file"]');
|
|
7980
|
-
input?.click();
|
|
7981
|
-
}
|
|
7982
|
-
onFileSelect(event) {
|
|
7983
|
-
const input = event.target;
|
|
7984
|
-
if (input.files && input.files.length > 0) {
|
|
7985
|
-
this.fileUpload.addFiles(input.files);
|
|
7986
|
-
input.value = '';
|
|
7987
|
-
}
|
|
7988
|
-
}
|
|
7989
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7990
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadTrigger, isStandalone: true, selector: "button[scFileUploadTrigger]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-trigger", "type": "button" }, listeners: { "click": "openFilePicker($event)" }, properties: { "class": "class()", "disabled": "fileUpload.disabled()", "attr.aria-disabled": "fileUpload.disabled() || null" } }, ngImport: i0, template: `
|
|
7991
|
-
<input
|
|
7992
|
-
#fileInput
|
|
7993
|
-
type="file"
|
|
7994
|
-
class="sr-only"
|
|
7995
|
-
[multiple]="fileUpload.multiple()"
|
|
7996
|
-
[accept]="fileUpload.accept()"
|
|
7997
|
-
[disabled]="fileUpload.disabled()"
|
|
7998
|
-
(change)="onFileSelect($event)"
|
|
7999
|
-
/>
|
|
8000
|
-
<ng-content />
|
|
8001
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8002
|
-
}
|
|
8003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadTrigger, decorators: [{
|
|
8004
|
-
type: Component,
|
|
8005
|
-
args: [{
|
|
8006
|
-
selector: 'button[scFileUploadTrigger]',
|
|
8007
|
-
template: `
|
|
8008
|
-
<input
|
|
8009
|
-
#fileInput
|
|
8010
|
-
type="file"
|
|
8011
|
-
class="sr-only"
|
|
8012
|
-
[multiple]="fileUpload.multiple()"
|
|
8013
|
-
[accept]="fileUpload.accept()"
|
|
8014
|
-
[disabled]="fileUpload.disabled()"
|
|
8015
|
-
(change)="onFileSelect($event)"
|
|
8016
|
-
/>
|
|
8017
|
-
<ng-content />
|
|
8018
|
-
`,
|
|
8019
|
-
host: {
|
|
8020
|
-
'data-slot': 'file-upload-trigger',
|
|
8021
|
-
type: 'button',
|
|
8022
|
-
'[class]': 'class()',
|
|
8023
|
-
'[disabled]': 'fileUpload.disabled()',
|
|
8024
|
-
'[attr.aria-disabled]': 'fileUpload.disabled() || null',
|
|
8025
|
-
'(click)': 'openFilePicker($event)',
|
|
8026
|
-
},
|
|
8027
|
-
encapsulation: ViewEncapsulation.None,
|
|
8028
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8029
|
-
}]
|
|
8030
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
8031
|
-
|
|
8032
|
-
class ScFileUploadList {
|
|
8033
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8034
|
-
class = computed(() => cn('mt-4 space-y-2', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8035
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8036
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadList, isStandalone: true, selector: "[scFileUploadList]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-list" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
8037
|
-
}
|
|
8038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadList, decorators: [{
|
|
8039
|
-
type: Directive,
|
|
8040
|
-
args: [{
|
|
8041
|
-
selector: '[scFileUploadList]',
|
|
8042
|
-
host: {
|
|
8043
|
-
'data-slot': 'file-upload-list',
|
|
8044
|
-
'[class]': 'class()',
|
|
8045
|
-
},
|
|
8046
|
-
}]
|
|
8047
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
8048
|
-
|
|
8049
|
-
class ScFileUploadItem {
|
|
8050
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8051
|
-
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
8052
|
-
class = computed(() => cn('flex items-center gap-3 rounded-lg border bg-background p-3', 'data-[status=error]:border-destructive data-[status=error]:bg-destructive/10', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8053
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8054
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadItem, isStandalone: true, selector: "[scFileUploadItem]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-item" }, properties: { "class": "class()", "attr.data-status": "file().status" } }, ngImport: i0, template: `
|
|
8055
|
-
<ng-content />
|
|
8056
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8057
|
-
}
|
|
8058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItem, decorators: [{
|
|
8059
|
-
type: Component,
|
|
8060
|
-
args: [{
|
|
8061
|
-
selector: '[scFileUploadItem]',
|
|
8062
|
-
template: `
|
|
8063
|
-
<ng-content />
|
|
8064
|
-
`,
|
|
8065
|
-
host: {
|
|
8066
|
-
'data-slot': 'file-upload-item',
|
|
8067
|
-
'[class]': 'class()',
|
|
8068
|
-
'[attr.data-status]': 'file().status',
|
|
8069
|
-
},
|
|
8070
|
-
encapsulation: ViewEncapsulation.None,
|
|
8071
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8072
|
-
}]
|
|
8073
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }] } });
|
|
8074
|
-
|
|
8075
|
-
class ScFileUploadItemPreview {
|
|
8076
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8077
|
-
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
8078
|
-
isImage = computed(() => this.file().file.type.startsWith('image/'), ...(ngDevMode ? [{ debugName: "isImage" }] : []));
|
|
8079
|
-
previewUrl = computed(() => {
|
|
8080
|
-
if (this.isImage()) {
|
|
8081
|
-
return URL.createObjectURL(this.file().file);
|
|
8082
|
-
}
|
|
8083
|
-
return '';
|
|
8084
|
-
}, ...(ngDevMode ? [{ debugName: "previewUrl" }] : []));
|
|
8085
|
-
class = computed(() => cn('flex size-10 items-center justify-center overflow-hidden rounded bg-muted', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8086
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemPreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8087
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ScFileUploadItemPreview, isStandalone: true, selector: "[scFileUploadItemPreview]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-item-preview" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
8088
|
-
@if (isImage()) {
|
|
8089
|
-
<img
|
|
8090
|
-
[src]="previewUrl()"
|
|
8091
|
-
[alt]="file().file.name"
|
|
8092
|
-
class="size-full object-cover"
|
|
8093
|
-
/>
|
|
8094
|
-
} @else {
|
|
8095
|
-
<ng-content />
|
|
8096
|
-
}
|
|
8097
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8098
|
-
}
|
|
8099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemPreview, decorators: [{
|
|
8100
|
-
type: Component,
|
|
8101
|
-
args: [{
|
|
8102
|
-
selector: '[scFileUploadItemPreview]',
|
|
8103
|
-
template: `
|
|
8104
|
-
@if (isImage()) {
|
|
8105
|
-
<img
|
|
8106
|
-
[src]="previewUrl()"
|
|
8107
|
-
[alt]="file().file.name"
|
|
8108
|
-
class="size-full object-cover"
|
|
8109
|
-
/>
|
|
8110
|
-
} @else {
|
|
8111
|
-
<ng-content />
|
|
8112
|
-
}
|
|
8113
|
-
`,
|
|
8114
|
-
host: {
|
|
8115
|
-
'data-slot': 'file-upload-item-preview',
|
|
8116
|
-
'[class]': 'class()',
|
|
8117
|
-
},
|
|
8118
|
-
encapsulation: ViewEncapsulation.None,
|
|
8119
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8120
|
-
}]
|
|
8121
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }] } });
|
|
8122
|
-
|
|
8123
|
-
class ScFileUploadItemName {
|
|
8124
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8125
|
-
class = computed(() => cn('flex-1 truncate text-sm font-medium', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemName, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8127
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadItemName, isStandalone: true, selector: "[scFileUploadItemName]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-item-name" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
8128
|
-
}
|
|
8129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemName, decorators: [{
|
|
8130
|
-
type: Directive,
|
|
8131
|
-
args: [{
|
|
8132
|
-
selector: '[scFileUploadItemName]',
|
|
8133
|
-
host: {
|
|
8134
|
-
'data-slot': 'file-upload-item-name',
|
|
8135
|
-
'[class]': 'class()',
|
|
8136
|
-
},
|
|
8137
|
-
}]
|
|
8138
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
8139
|
-
|
|
8140
|
-
class ScFileUploadItemSize {
|
|
8141
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8142
|
-
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
8143
|
-
formattedSize = computed(() => {
|
|
8144
|
-
const bytes = this.file().file.size;
|
|
8145
|
-
if (bytes === 0)
|
|
8146
|
-
return '0 B';
|
|
8147
|
-
const k = 1024;
|
|
8148
|
-
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
8149
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
8150
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
|
|
8151
|
-
}, ...(ngDevMode ? [{ debugName: "formattedSize" }] : []));
|
|
8152
|
-
class = computed(() => cn('text-xs text-muted-foreground', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemSize, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadItemSize, isStandalone: true, selector: "[scFileUploadItemSize]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-item-size" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
8155
|
-
{{ formattedSize() }}
|
|
8156
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8157
|
-
}
|
|
8158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemSize, decorators: [{
|
|
8159
|
-
type: Component,
|
|
8160
|
-
args: [{
|
|
8161
|
-
selector: '[scFileUploadItemSize]',
|
|
8162
|
-
template: `
|
|
8163
|
-
{{ formattedSize() }}
|
|
8164
|
-
`,
|
|
8165
|
-
host: {
|
|
8166
|
-
'data-slot': 'file-upload-item-size',
|
|
8167
|
-
'[class]': 'class()',
|
|
8168
|
-
},
|
|
8169
|
-
encapsulation: ViewEncapsulation.None,
|
|
8170
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8171
|
-
}]
|
|
8172
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }] } });
|
|
8173
|
-
|
|
8174
|
-
class ScFileUploadItemDelete {
|
|
8175
|
-
fileUpload = inject(SC_FILE_UPLOAD);
|
|
8176
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8177
|
-
fileId = input.required(...(ngDevMode ? [{ debugName: "fileId" }] : []));
|
|
8178
|
-
class = computed(() => cn(buttonVariants({ variant: 'ghost', size: 'icon' }), 'text-muted-foreground', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8179
|
-
onClick() {
|
|
8180
|
-
this.fileUpload.removeFile(this.fileId());
|
|
8181
|
-
}
|
|
8182
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemDelete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8183
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadItemDelete, isStandalone: true, selector: "button[scFileUploadItemDelete]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, fileId: { classPropertyName: "fileId", publicName: "fileId", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-item-delete", "type": "button" }, listeners: { "click": "onClick()" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
8184
|
-
<svg
|
|
8185
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8186
|
-
width="24"
|
|
8187
|
-
height="24"
|
|
8188
|
-
viewBox="0 0 24 24"
|
|
8189
|
-
fill="none"
|
|
8190
|
-
stroke="currentColor"
|
|
8191
|
-
stroke-width="2"
|
|
8192
|
-
stroke-linecap="round"
|
|
8193
|
-
stroke-linejoin="round"
|
|
8194
|
-
class="size-4"
|
|
8195
|
-
>
|
|
8196
|
-
<path d="M18 6 6 18" />
|
|
8197
|
-
<path d="m6 6 12 12" />
|
|
8198
|
-
</svg>
|
|
8199
|
-
<span class="sr-only">Remove file</span>
|
|
8200
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8201
|
-
}
|
|
8202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemDelete, decorators: [{
|
|
8203
|
-
type: Component,
|
|
8204
|
-
args: [{
|
|
8205
|
-
selector: 'button[scFileUploadItemDelete]',
|
|
8206
|
-
template: `
|
|
8207
|
-
<svg
|
|
8208
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8209
|
-
width="24"
|
|
8210
|
-
height="24"
|
|
8211
|
-
viewBox="0 0 24 24"
|
|
8212
|
-
fill="none"
|
|
8213
|
-
stroke="currentColor"
|
|
8214
|
-
stroke-width="2"
|
|
8215
|
-
stroke-linecap="round"
|
|
8216
|
-
stroke-linejoin="round"
|
|
8217
|
-
class="size-4"
|
|
8218
|
-
>
|
|
8219
|
-
<path d="M18 6 6 18" />
|
|
8220
|
-
<path d="m6 6 12 12" />
|
|
8221
|
-
</svg>
|
|
8222
|
-
<span class="sr-only">Remove file</span>
|
|
8223
|
-
`,
|
|
8224
|
-
host: {
|
|
8225
|
-
'data-slot': 'file-upload-item-delete',
|
|
8226
|
-
type: 'button',
|
|
8227
|
-
'[class]': 'class()',
|
|
8228
|
-
'(click)': 'onClick()',
|
|
8229
|
-
},
|
|
8230
|
-
encapsulation: ViewEncapsulation.None,
|
|
8231
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8232
|
-
}]
|
|
8233
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], fileId: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileId", required: true }] }] } });
|
|
8234
|
-
|
|
8235
|
-
class ScFileUploadItemProgress {
|
|
8236
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8237
|
-
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
8238
|
-
class = computed(() => cn('h-1 w-full overflow-hidden rounded-full bg-muted', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8239
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8240
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScFileUploadItemProgress, isStandalone: true, selector: "[scFileUploadItemProgress]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-slot": "file-upload-item-progress" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
8241
|
-
<div
|
|
8242
|
-
class="h-full rounded-full bg-primary transition-all"
|
|
8243
|
-
[style.width.%]="file().progress || 0"
|
|
8244
|
-
></div>
|
|
8245
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8246
|
-
}
|
|
8247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScFileUploadItemProgress, decorators: [{
|
|
8248
|
-
type: Component,
|
|
8249
|
-
args: [{
|
|
8250
|
-
selector: '[scFileUploadItemProgress]',
|
|
8251
|
-
template: `
|
|
8252
|
-
<div
|
|
8253
|
-
class="h-full rounded-full bg-primary transition-all"
|
|
8254
|
-
[style.width.%]="file().progress || 0"
|
|
8255
|
-
></div>
|
|
8256
|
-
`,
|
|
8257
|
-
host: {
|
|
8258
|
-
'data-slot': 'file-upload-item-progress',
|
|
8259
|
-
'[class]': 'class()',
|
|
8260
|
-
},
|
|
8261
|
-
encapsulation: ViewEncapsulation.None,
|
|
8262
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8263
|
-
}]
|
|
8264
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }] } });
|
|
8265
|
-
|
|
8266
|
-
class ScImageAnnotator {
|
|
8267
|
-
sanitizer = inject(DomSanitizer);
|
|
8268
|
-
imageCanvasRef = viewChild('imageCanvas', ...(ngDevMode ? [{ debugName: "imageCanvasRef" }] : []));
|
|
8269
|
-
annotationCanvasRef = viewChild('annotationCanvas', ...(ngDevMode ? [{ debugName: "annotationCanvasRef" }] : []));
|
|
8270
|
-
src = input.required(...(ngDevMode ? [{ debugName: "src" }] : []));
|
|
8271
|
-
width = input(600, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
8272
|
-
height = input(400, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
8273
|
-
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
8274
|
-
annotationsChange = output();
|
|
8275
|
-
save = output();
|
|
8276
|
-
annotations = signal([], ...(ngDevMode ? [{ debugName: "annotations" }] : []));
|
|
8277
|
-
currentTool = signal('pen', ...(ngDevMode ? [{ debugName: "currentTool" }] : []));
|
|
8278
|
-
currentColor = signal('#ef4444', ...(ngDevMode ? [{ debugName: "currentColor" }] : []));
|
|
8279
|
-
lineWidth = signal(3, ...(ngDevMode ? [{ debugName: "lineWidth" }] : []));
|
|
8280
|
-
imageLoaded = signal(false, ...(ngDevMode ? [{ debugName: "imageLoaded" }] : []));
|
|
8281
|
-
isDrawing = false;
|
|
8282
|
-
currentAnnotation = null;
|
|
8283
|
-
startPoint = null;
|
|
8284
|
-
trustHtml(html) {
|
|
8285
|
-
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
7683
|
+
class ScImageAnnotator {
|
|
7684
|
+
sanitizer = inject(DomSanitizer);
|
|
7685
|
+
imageCanvasRef = viewChild('imageCanvas', ...(ngDevMode ? [{ debugName: "imageCanvasRef" }] : []));
|
|
7686
|
+
annotationCanvasRef = viewChild('annotationCanvas', ...(ngDevMode ? [{ debugName: "annotationCanvasRef" }] : []));
|
|
7687
|
+
src = input.required(...(ngDevMode ? [{ debugName: "src" }] : []));
|
|
7688
|
+
width = input(600, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
7689
|
+
height = input(400, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
7690
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7691
|
+
annotationsChange = output();
|
|
7692
|
+
save = output();
|
|
7693
|
+
annotations = signal([], ...(ngDevMode ? [{ debugName: "annotations" }] : []));
|
|
7694
|
+
currentTool = signal('pen', ...(ngDevMode ? [{ debugName: "currentTool" }] : []));
|
|
7695
|
+
currentColor = signal('#ef4444', ...(ngDevMode ? [{ debugName: "currentColor" }] : []));
|
|
7696
|
+
lineWidth = signal(3, ...(ngDevMode ? [{ debugName: "lineWidth" }] : []));
|
|
7697
|
+
imageLoaded = signal(false, ...(ngDevMode ? [{ debugName: "imageLoaded" }] : []));
|
|
7698
|
+
isDrawing = false;
|
|
7699
|
+
currentAnnotation = null;
|
|
7700
|
+
startPoint = null;
|
|
7701
|
+
trustHtml(html) {
|
|
7702
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
8286
7703
|
}
|
|
8287
7704
|
tools = [];
|
|
8288
7705
|
colors = [
|
|
@@ -9493,6 +8910,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
9493
8910
|
class ScImageCropperContainer {
|
|
9494
8911
|
cropper = inject(SC_IMAGE_CROPPER);
|
|
9495
8912
|
elementRef = inject((ElementRef));
|
|
8913
|
+
injector = inject(Injector);
|
|
9496
8914
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
9497
8915
|
class = computed(() => cn('block', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
9498
8916
|
imageEl = viewChild('imageEl', ...(ngDevMode ? [{ debugName: "imageEl" }] : []));
|
|
@@ -9516,8 +8934,10 @@ class ScImageCropperContainer {
|
|
|
9516
8934
|
return;
|
|
9517
8935
|
this.cropper.onImageLoad(img.naturalWidth, img.naturalHeight);
|
|
9518
8936
|
// Initialize crop area after image loads
|
|
9519
|
-
|
|
9520
|
-
|
|
8937
|
+
runInInjectionContext(this.injector, () => {
|
|
8938
|
+
afterNextRender(() => {
|
|
8939
|
+
this.cropper.initializeCropArea(this.getContainerWidth());
|
|
8940
|
+
});
|
|
9521
8941
|
});
|
|
9522
8942
|
}
|
|
9523
8943
|
onCropAreaMouseDown(event) {
|
|
@@ -14159,306 +13579,16 @@ class ScNavbarMobileLink {
|
|
|
14159
13579
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavbarMobileLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14160
13580
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNavbarMobileLink, isStandalone: true, selector: "a[scNavbarMobileLink], button[scNavbarMobileLink]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navbar-mobile-link" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
14161
13581
|
}
|
|
14162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavbarMobileLink, decorators: [{
|
|
14163
|
-
type: Directive,
|
|
14164
|
-
args: [{
|
|
14165
|
-
selector: 'a[scNavbarMobileLink], button[scNavbarMobileLink]',
|
|
14166
|
-
host: {
|
|
14167
|
-
'data-slot': 'navbar-mobile-link',
|
|
14168
|
-
'[class]': 'class()',
|
|
14169
|
-
},
|
|
14170
|
-
}]
|
|
14171
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
14172
|
-
|
|
14173
|
-
class ScNavigationMenu {
|
|
14174
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14175
|
-
/** Currently active item ID */
|
|
14176
|
-
activeItem = signal(null, ...(ngDevMode ? [{ debugName: "activeItem" }] : []));
|
|
14177
|
-
class = computed(() => cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14178
|
-
setActiveItem(id) {
|
|
14179
|
-
this.activeItem.set(id);
|
|
14180
|
-
}
|
|
14181
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14182
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScNavigationMenu, isStandalone: true, selector: "nav[scNavigationMenu]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
14183
|
-
<ng-content />
|
|
14184
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
14185
|
-
}
|
|
14186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenu, decorators: [{
|
|
14187
|
-
type: Component,
|
|
14188
|
-
args: [{
|
|
14189
|
-
selector: 'nav[scNavigationMenu]',
|
|
14190
|
-
template: `
|
|
14191
|
-
<ng-content />
|
|
14192
|
-
`,
|
|
14193
|
-
host: {
|
|
14194
|
-
'data-slot': 'navigation-menu',
|
|
14195
|
-
'[class]': 'class()',
|
|
14196
|
-
},
|
|
14197
|
-
encapsulation: ViewEncapsulation.None,
|
|
14198
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14199
|
-
}]
|
|
14200
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
14201
|
-
|
|
14202
|
-
class ScNavigationMenuTrigger {
|
|
14203
|
-
menuItem = inject(ScNavigationMenuItem);
|
|
14204
|
-
overlayOrigin = inject(CdkOverlayOrigin);
|
|
14205
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14206
|
-
class = computed(() => cn('group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium', 'hover:bg-accent hover:text-accent-foreground', 'focus:bg-accent focus:text-accent-foreground', 'disabled:pointer-events-none disabled:opacity-50', 'data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50', 'focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1', '[&_svg]:pointer-events-none', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14207
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14208
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScNavigationMenuTrigger, isStandalone: true, selector: "button[scNavigationMenuTrigger]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-trigger", "type": "button" }, properties: { "class": "class()", "attr.aria-expanded": "menuItem.open()", "attr.data-state": "menuItem.open() ? \"open\" : \"closed\"" } }, hostDirectives: [{ directive: i1$2.CdkOverlayOrigin }], ngImport: i0, template: `
|
|
14209
|
-
<ng-content />
|
|
14210
|
-
<svg
|
|
14211
|
-
siChevronDownIcon
|
|
14212
|
-
class="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
|
|
14213
|
-
></svg>
|
|
14214
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SiChevronDownIcon, selector: "svg[siChevronDownIcon]", inputs: ["width", "height", "viewBox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
14215
|
-
}
|
|
14216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuTrigger, decorators: [{
|
|
14217
|
-
type: Component,
|
|
14218
|
-
args: [{
|
|
14219
|
-
selector: 'button[scNavigationMenuTrigger]',
|
|
14220
|
-
imports: [SiChevronDownIcon],
|
|
14221
|
-
hostDirectives: [CdkOverlayOrigin],
|
|
14222
|
-
template: `
|
|
14223
|
-
<ng-content />
|
|
14224
|
-
<svg
|
|
14225
|
-
siChevronDownIcon
|
|
14226
|
-
class="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
|
|
14227
|
-
></svg>
|
|
14228
|
-
`,
|
|
14229
|
-
host: {
|
|
14230
|
-
'data-slot': 'navigation-menu-trigger',
|
|
14231
|
-
type: 'button',
|
|
14232
|
-
'[class]': 'class()',
|
|
14233
|
-
'[attr.aria-expanded]': 'menuItem.open()',
|
|
14234
|
-
'[attr.data-state]': 'menuItem.open() ? "open" : "closed"',
|
|
14235
|
-
},
|
|
14236
|
-
encapsulation: ViewEncapsulation.None,
|
|
14237
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14238
|
-
}]
|
|
14239
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
14240
|
-
|
|
14241
|
-
class ScNavigationMenuItem {
|
|
14242
|
-
navigationMenu = inject(ScNavigationMenu);
|
|
14243
|
-
router = inject(Router);
|
|
14244
|
-
destroyRef = inject(DestroyRef);
|
|
14245
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14246
|
-
itemId = inject(_IdGenerator).getId('sc-navigation-menu-item-');
|
|
14247
|
-
/** Whether this item's content is open */
|
|
14248
|
-
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
14249
|
-
triggerChild = contentChild(ScNavigationMenuTrigger, ...(ngDevMode ? [{ debugName: "triggerChild" }] : []));
|
|
14250
|
-
origin = computed(() => this.triggerChild()?.overlayOrigin, ...(ngDevMode ? [{ debugName: "origin" }] : []));
|
|
14251
|
-
class = computed(() => cn('relative', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14252
|
-
hideTimeout = null;
|
|
14253
|
-
ngOnInit() {
|
|
14254
|
-
// Close the menu when navigation starts
|
|
14255
|
-
this.router.events
|
|
14256
|
-
.pipe(filter((event) => event instanceof NavigationStart), takeUntilDestroyed(this.destroyRef))
|
|
14257
|
-
.subscribe(() => {
|
|
14258
|
-
this.open.set(false);
|
|
14259
|
-
if (this.navigationMenu.activeItem() === this.itemId) {
|
|
14260
|
-
this.navigationMenu.setActiveItem(null);
|
|
14261
|
-
}
|
|
14262
|
-
});
|
|
14263
|
-
}
|
|
14264
|
-
onMouseEnter() {
|
|
14265
|
-
this.cancelHide();
|
|
14266
|
-
this.open.set(true);
|
|
14267
|
-
this.navigationMenu.setActiveItem(this.itemId);
|
|
14268
|
-
}
|
|
14269
|
-
onMouseLeave() {
|
|
14270
|
-
this.scheduleHide();
|
|
14271
|
-
}
|
|
14272
|
-
scheduleHide() {
|
|
14273
|
-
this.cancelHide();
|
|
14274
|
-
this.hideTimeout = setTimeout(() => {
|
|
14275
|
-
this.open.set(false);
|
|
14276
|
-
if (this.navigationMenu.activeItem() === this.itemId) {
|
|
14277
|
-
this.navigationMenu.setActiveItem(null);
|
|
14278
|
-
}
|
|
14279
|
-
}, 100);
|
|
14280
|
-
}
|
|
14281
|
-
cancelHide() {
|
|
14282
|
-
if (this.hideTimeout) {
|
|
14283
|
-
clearTimeout(this.hideTimeout);
|
|
14284
|
-
this.hideTimeout = null;
|
|
14285
|
-
}
|
|
14286
|
-
}
|
|
14287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14288
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.5", type: ScNavigationMenuItem, isStandalone: true, selector: "li[scNavigationMenuItem]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-item" }, listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" }, properties: { "class": "class()" } }, queries: [{ propertyName: "triggerChild", first: true, predicate: ScNavigationMenuTrigger, descendants: true, isSignal: true }], ngImport: i0 });
|
|
14289
|
-
}
|
|
14290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuItem, decorators: [{
|
|
14291
|
-
type: Directive,
|
|
14292
|
-
args: [{
|
|
14293
|
-
selector: 'li[scNavigationMenuItem]',
|
|
14294
|
-
host: {
|
|
14295
|
-
'data-slot': 'navigation-menu-item',
|
|
14296
|
-
'[class]': 'class()',
|
|
14297
|
-
'(mouseenter)': 'onMouseEnter()',
|
|
14298
|
-
'(mouseleave)': 'onMouseLeave()',
|
|
14299
|
-
},
|
|
14300
|
-
}]
|
|
14301
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], triggerChild: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ScNavigationMenuTrigger), { isSignal: true }] }] } });
|
|
14302
|
-
|
|
14303
|
-
const position = {
|
|
14304
|
-
originX: 'start',
|
|
14305
|
-
originY: 'bottom',
|
|
14306
|
-
overlayX: 'start',
|
|
14307
|
-
overlayY: 'top',
|
|
14308
|
-
offsetY: 4,
|
|
14309
|
-
};
|
|
14310
|
-
class ScNavigationMenuContent {
|
|
14311
|
-
menuItem = inject(ScNavigationMenuItem);
|
|
14312
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14313
|
-
position = position;
|
|
14314
|
-
origin = computed(() => this.menuItem.origin(), ...(ngDevMode ? [{ debugName: "origin" }] : []));
|
|
14315
|
-
class = computed(() => cn('', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14316
|
-
contentClass = computed(() => cn('left-0 top-0 w-full md:absolute md:w-auto', 'bg-popover text-popover-foreground', 'rounded-md border shadow-lg', 'overflow-hidden', 'data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out', 'data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out', 'data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52', 'data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52', '**:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none'), ...(ngDevMode ? [{ debugName: "contentClass" }] : []));
|
|
14317
|
-
onMouseEnter() {
|
|
14318
|
-
this.menuItem.cancelHide();
|
|
14319
|
-
}
|
|
14320
|
-
onMouseLeave() {
|
|
14321
|
-
this.menuItem.onMouseLeave();
|
|
14322
|
-
}
|
|
14323
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14324
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ScNavigationMenuContent, isStandalone: true, selector: "div[scNavigationMenuContent]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-content" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
14325
|
-
@if (origin(); as origin) {
|
|
14326
|
-
<ng-template
|
|
14327
|
-
cdkConnectedOverlay
|
|
14328
|
-
[cdkConnectedOverlayOrigin]="origin"
|
|
14329
|
-
[cdkConnectedOverlayOpen]="menuItem.open()"
|
|
14330
|
-
[cdkConnectedOverlayPositions]="[position]"
|
|
14331
|
-
>
|
|
14332
|
-
<div
|
|
14333
|
-
[class]="contentClass()"
|
|
14334
|
-
(mouseenter)="onMouseEnter()"
|
|
14335
|
-
(mouseleave)="onMouseLeave()"
|
|
14336
|
-
>
|
|
14337
|
-
<ng-content />
|
|
14338
|
-
</div>
|
|
14339
|
-
</ng-template>
|
|
14340
|
-
}
|
|
14341
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
14342
|
-
}
|
|
14343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuContent, decorators: [{
|
|
14344
|
-
type: Component,
|
|
14345
|
-
args: [{
|
|
14346
|
-
selector: 'div[scNavigationMenuContent]',
|
|
14347
|
-
imports: [OverlayModule],
|
|
14348
|
-
template: `
|
|
14349
|
-
@if (origin(); as origin) {
|
|
14350
|
-
<ng-template
|
|
14351
|
-
cdkConnectedOverlay
|
|
14352
|
-
[cdkConnectedOverlayOrigin]="origin"
|
|
14353
|
-
[cdkConnectedOverlayOpen]="menuItem.open()"
|
|
14354
|
-
[cdkConnectedOverlayPositions]="[position]"
|
|
14355
|
-
>
|
|
14356
|
-
<div
|
|
14357
|
-
[class]="contentClass()"
|
|
14358
|
-
(mouseenter)="onMouseEnter()"
|
|
14359
|
-
(mouseleave)="onMouseLeave()"
|
|
14360
|
-
>
|
|
14361
|
-
<ng-content />
|
|
14362
|
-
</div>
|
|
14363
|
-
</ng-template>
|
|
14364
|
-
}
|
|
14365
|
-
`,
|
|
14366
|
-
host: {
|
|
14367
|
-
'data-slot': 'navigation-menu-content',
|
|
14368
|
-
'[class]': 'class()',
|
|
14369
|
-
},
|
|
14370
|
-
encapsulation: ViewEncapsulation.None,
|
|
14371
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14372
|
-
}]
|
|
14373
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
14374
|
-
|
|
14375
|
-
class ScNavigationMenuIndicator {
|
|
14376
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14377
|
-
class = computed(() => cn('data-[state=visible]:animate-in data-[state=hidden]:animate-out', 'data-[state=hidden]:fade-out data-[state=visible]:fade-in', 'top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14378
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14379
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScNavigationMenuIndicator, isStandalone: true, selector: "div[scNavigationMenuIndicator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-indicator" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
14380
|
-
<div
|
|
14381
|
-
class="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"
|
|
14382
|
-
></div>
|
|
14383
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
14384
|
-
}
|
|
14385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuIndicator, decorators: [{
|
|
14386
|
-
type: Component,
|
|
14387
|
-
args: [{
|
|
14388
|
-
selector: 'div[scNavigationMenuIndicator]',
|
|
14389
|
-
template: `
|
|
14390
|
-
<div
|
|
14391
|
-
class="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"
|
|
14392
|
-
></div>
|
|
14393
|
-
`,
|
|
14394
|
-
host: {
|
|
14395
|
-
'data-slot': 'navigation-menu-indicator',
|
|
14396
|
-
'[class]': 'class()',
|
|
14397
|
-
},
|
|
14398
|
-
encapsulation: ViewEncapsulation.None,
|
|
14399
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14400
|
-
}]
|
|
14401
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
14402
|
-
|
|
14403
|
-
class ScNavigationMenuLink {
|
|
14404
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14405
|
-
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
14406
|
-
class = computed(() => cn('data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground', 'hover:bg-accent hover:text-accent-foreground', 'focus:bg-accent focus:text-accent-foreground', 'focus-visible:ring-ring/50', '[&_svg:not([class*="text-"])]:text-muted-foreground', 'flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none', 'focus-visible:ring-[3px] focus-visible:outline-1', '[&_svg:not([class*="size-"])]:size-4', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14407
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14408
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNavigationMenuLink, isStandalone: true, selector: "a[scNavigationMenuLink]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-link" }, properties: { "attr.data-active": "active()", "class": "class()" } }, ngImport: i0 });
|
|
14409
|
-
}
|
|
14410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuLink, decorators: [{
|
|
14411
|
-
type: Directive,
|
|
14412
|
-
args: [{
|
|
14413
|
-
selector: 'a[scNavigationMenuLink]',
|
|
14414
|
-
host: {
|
|
14415
|
-
'data-slot': 'navigation-menu-link',
|
|
14416
|
-
'[attr.data-active]': 'active()',
|
|
14417
|
-
'[class]': 'class()',
|
|
14418
|
-
},
|
|
14419
|
-
}]
|
|
14420
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
14421
|
-
|
|
14422
|
-
class ScNavigationMenuList {
|
|
14423
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14424
|
-
class = computed(() => cn('group flex flex-1 list-none items-center justify-center gap-1', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14425
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14426
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScNavigationMenuList, isStandalone: true, selector: "ul[scNavigationMenuList]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-list" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
14427
|
-
}
|
|
14428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuList, decorators: [{
|
|
14429
|
-
type: Directive,
|
|
14430
|
-
args: [{
|
|
14431
|
-
selector: 'ul[scNavigationMenuList]',
|
|
14432
|
-
host: {
|
|
14433
|
-
'data-slot': 'navigation-menu-list',
|
|
14434
|
-
'[class]': 'class()',
|
|
14435
|
-
},
|
|
14436
|
-
}]
|
|
14437
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
14438
|
-
|
|
14439
|
-
class ScNavigationMenuViewport {
|
|
14440
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
14441
|
-
class = computed(() => cn('origin-top-center bg-popover text-popover-foreground', 'data-[state=open]:animate-in data-[state=closed]:animate-out', 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90', 'relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow', 'md:w-[var(--radix-navigation-menu-viewport-width)]', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
14442
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuViewport, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14443
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScNavigationMenuViewport, isStandalone: true, selector: "div[scNavigationMenuViewport]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-viewport" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
14444
|
-
<ng-content />
|
|
14445
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
14446
|
-
}
|
|
14447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavigationMenuViewport, decorators: [{
|
|
14448
|
-
type: Component,
|
|
13582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScNavbarMobileLink, decorators: [{
|
|
13583
|
+
type: Directive,
|
|
14449
13584
|
args: [{
|
|
14450
|
-
selector: '
|
|
14451
|
-
template: `
|
|
14452
|
-
<ng-content />
|
|
14453
|
-
`,
|
|
13585
|
+
selector: 'a[scNavbarMobileLink], button[scNavbarMobileLink]',
|
|
14454
13586
|
host: {
|
|
14455
|
-
'data-slot': '
|
|
13587
|
+
'data-slot': 'navbar-mobile-link',
|
|
14456
13588
|
'[class]': 'class()',
|
|
14457
13589
|
},
|
|
14458
|
-
encapsulation: ViewEncapsulation.None,
|
|
14459
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14460
13590
|
}]
|
|
14461
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
13591
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
14462
13592
|
|
|
14463
13593
|
const SC_NOTIFICATION_CENTER = new InjectionToken('SC_NOTIFICATION_CENTER');
|
|
14464
13594
|
class ScNotificationCenterDirective {
|
|
@@ -22215,595 +21345,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
22215
21345
|
args: [{
|
|
22216
21346
|
selector: 'button[scSignaturePadPenColor]',
|
|
22217
21347
|
template: '<ng-content />',
|
|
22218
|
-
host: {
|
|
22219
|
-
type: 'button',
|
|
22220
|
-
'[class]': 'class()',
|
|
22221
|
-
'[attr.aria-label]': 'ariaLabel()',
|
|
22222
|
-
'[attr.data-active]': 'isActive() || null',
|
|
22223
|
-
'[disabled]': 'signaturePad.disabled() || null',
|
|
22224
|
-
'(click)': 'onClick()',
|
|
22225
|
-
},
|
|
22226
|
-
encapsulation: ViewEncapsulation.None,
|
|
22227
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22228
|
-
}]
|
|
22229
|
-
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
22230
|
-
|
|
22231
|
-
class ScSignaturePadWidthButton {
|
|
22232
|
-
signaturePad = inject(SC_SIGNATURE_PAD);
|
|
22233
|
-
width = input.required(...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
22234
|
-
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
22235
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
22236
|
-
isActive = computed(() => this.signaturePad.penWidth() === this.width(), ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
22237
|
-
class = computed(() => cn('inline-flex items-center justify-center size-8 rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground transition-colors', 'disabled:pointer-events-none disabled:opacity-50', 'data-[active]:border-primary data-[active]:bg-primary/10', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
22238
|
-
onClick() {
|
|
22239
|
-
if (this.signaturePad.disabled())
|
|
22240
|
-
return;
|
|
22241
|
-
this.signaturePad.penWidth.set(this.width());
|
|
22242
|
-
}
|
|
22243
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSignaturePadWidthButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22244
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSignaturePadWidthButton, isStandalone: true, selector: "button[scSignaturePadPenWidth]", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "class": "class()", "attr.aria-label": "ariaLabel()", "attr.data-active": "isActive() || null", "disabled": "signaturePad.disabled() || null" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22245
|
-
}
|
|
22246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSignaturePadWidthButton, decorators: [{
|
|
22247
|
-
type: Component,
|
|
22248
|
-
args: [{
|
|
22249
|
-
selector: 'button[scSignaturePadPenWidth]',
|
|
22250
|
-
template: '<ng-content />',
|
|
22251
|
-
host: {
|
|
22252
|
-
type: 'button',
|
|
22253
|
-
'[class]': 'class()',
|
|
22254
|
-
'[attr.aria-label]': 'ariaLabel()',
|
|
22255
|
-
'[attr.data-active]': 'isActive() || null',
|
|
22256
|
-
'[disabled]': 'signaturePad.disabled() || null',
|
|
22257
|
-
'(click)': 'onClick()',
|
|
22258
|
-
},
|
|
22259
|
-
encapsulation: ViewEncapsulation.None,
|
|
22260
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22261
|
-
}]
|
|
22262
|
-
}], propDecorators: { width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
22263
|
-
|
|
22264
|
-
class ScSliderTrack {
|
|
22265
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
22266
|
-
class = computed(() => cn('relative h-2 w-full grow overflow-hidden rounded-full bg-secondary', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
22267
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22268
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSliderTrack, isStandalone: true, selector: "div[scSliderTrack]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "slider-track" }, properties: { "class": "class()" } }, ngImport: i0, template: `
|
|
22269
|
-
<ng-content />
|
|
22270
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22271
|
-
}
|
|
22272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSliderTrack, decorators: [{
|
|
22273
|
-
type: Component,
|
|
22274
|
-
args: [{
|
|
22275
|
-
selector: 'div[scSliderTrack]',
|
|
22276
|
-
host: {
|
|
22277
|
-
'data-slot': 'slider-track',
|
|
22278
|
-
'[class]': 'class()',
|
|
22279
|
-
},
|
|
22280
|
-
template: `
|
|
22281
|
-
<ng-content />
|
|
22282
|
-
`,
|
|
22283
|
-
encapsulation: ViewEncapsulation.None,
|
|
22284
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22285
|
-
}]
|
|
22286
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
22287
|
-
|
|
22288
|
-
class ScSliderRange {
|
|
22289
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
22290
|
-
percentage = input.required(...(ngDevMode ? [{ debugName: "percentage" }] : []));
|
|
22291
|
-
class = computed(() => cn('absolute h-full bg-primary', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
22292
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSliderRange, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22293
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSliderRange, isStandalone: true, selector: "div[scSliderRange]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, percentage: { classPropertyName: "percentage", publicName: "percentage", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-slot": "slider-range" }, properties: { "class": "class()", "style.width.%": "percentage()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22294
|
-
}
|
|
22295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSliderRange, decorators: [{
|
|
22296
|
-
type: Component,
|
|
22297
|
-
args: [{
|
|
22298
|
-
selector: 'div[scSliderRange]',
|
|
22299
|
-
host: {
|
|
22300
|
-
'data-slot': 'slider-range',
|
|
22301
|
-
'[class]': 'class()',
|
|
22302
|
-
'[style.width.%]': 'percentage()',
|
|
22303
|
-
},
|
|
22304
|
-
template: '',
|
|
22305
|
-
encapsulation: ViewEncapsulation.None,
|
|
22306
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22307
|
-
}]
|
|
22308
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], percentage: [{ type: i0.Input, args: [{ isSignal: true, alias: "percentage", required: true }] }] } });
|
|
22309
|
-
|
|
22310
|
-
class ScSliderThumb {
|
|
22311
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
22312
|
-
percentage = input.required(...(ngDevMode ? [{ debugName: "percentage" }] : []));
|
|
22313
|
-
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
22314
|
-
min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
22315
|
-
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
22316
|
-
step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
22317
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
22318
|
-
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
22319
|
-
ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : {}), alias: 'aria-labelledby' });
|
|
22320
|
-
keydown = output();
|
|
22321
|
-
mouseDown = output();
|
|
22322
|
-
touchStart = output();
|
|
22323
|
-
class = computed(() => cn('absolute block size-5 -translate-x-1/2 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', this.disabled()
|
|
22324
|
-
? 'cursor-not-allowed'
|
|
22325
|
-
: 'cursor-grab active:cursor-grabbing', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
22326
|
-
onKeydown(event) {
|
|
22327
|
-
this.keydown.emit(event);
|
|
22328
|
-
}
|
|
22329
|
-
onMouseDown(event) {
|
|
22330
|
-
this.mouseDown.emit(event);
|
|
22331
|
-
}
|
|
22332
|
-
onTouchStart(event) {
|
|
22333
|
-
this.touchStart.emit(event);
|
|
22334
|
-
}
|
|
22335
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22336
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSliderThumb, isStandalone: true, selector: "div[scSliderThumb]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, percentage: { classPropertyName: "percentage", publicName: "percentage", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keydown: "keydown", mouseDown: "mouseDown", touchStart: "touchStart" }, host: { attributes: { "data-slot": "slider-thumb" }, listeners: { "keydown": "onKeydown($event)", "mousedown": "onMouseDown($event)", "touchstart": "onTouchStart($event)" }, properties: { "class": "class()", "style.left.%": "percentage()", "attr.tabindex": "disabled() ? -1 : 0", "attr.role": "\"slider\"", "attr.aria-valuemin": "min()", "attr.aria-valuemax": "max()", "attr.aria-valuenow": "value()", "attr.aria-disabled": "disabled() || null", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "ariaLabelledby() ?? null" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22337
|
-
}
|
|
22338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSliderThumb, decorators: [{
|
|
22339
|
-
type: Component,
|
|
22340
|
-
args: [{
|
|
22341
|
-
selector: 'div[scSliderThumb]',
|
|
22342
|
-
host: {
|
|
22343
|
-
'data-slot': 'slider-thumb',
|
|
22344
|
-
'[class]': 'class()',
|
|
22345
|
-
'[style.left.%]': 'percentage()',
|
|
22346
|
-
'[attr.tabindex]': 'disabled() ? -1 : 0',
|
|
22347
|
-
'[attr.role]': '"slider"',
|
|
22348
|
-
'[attr.aria-valuemin]': 'min()',
|
|
22349
|
-
'[attr.aria-valuemax]': 'max()',
|
|
22350
|
-
'[attr.aria-valuenow]': 'value()',
|
|
22351
|
-
'[attr.aria-disabled]': 'disabled() || null',
|
|
22352
|
-
'[attr.aria-label]': 'ariaLabel() ?? null',
|
|
22353
|
-
'[attr.aria-labelledby]': 'ariaLabelledby() ?? null',
|
|
22354
|
-
'(keydown)': 'onKeydown($event)',
|
|
22355
|
-
'(mousedown)': 'onMouseDown($event)',
|
|
22356
|
-
'(touchstart)': 'onTouchStart($event)',
|
|
22357
|
-
},
|
|
22358
|
-
template: '',
|
|
22359
|
-
encapsulation: ViewEncapsulation.None,
|
|
22360
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22361
|
-
}]
|
|
22362
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], percentage: [{ type: i0.Input, args: [{ isSignal: true, alias: "percentage", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], keydown: [{ type: i0.Output, args: ["keydown"] }], mouseDown: [{ type: i0.Output, args: ["mouseDown"] }], touchStart: [{ type: i0.Output, args: ["touchStart"] }] } });
|
|
22363
|
-
|
|
22364
|
-
class ScSlider {
|
|
22365
|
-
elementRef = inject((ElementRef));
|
|
22366
|
-
destroyRef = inject(DestroyRef);
|
|
22367
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
22368
|
-
value = model(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
22369
|
-
min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
22370
|
-
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
22371
|
-
step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
22372
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
22373
|
-
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
22374
|
-
ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : {}), alias: 'aria-labelledby' });
|
|
22375
|
-
isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
22376
|
-
percentage = computed(() => {
|
|
22377
|
-
const minVal = this.min() ?? 0;
|
|
22378
|
-
const maxVal = this.max() ?? 100;
|
|
22379
|
-
const val = this.value();
|
|
22380
|
-
if (maxVal === minVal)
|
|
22381
|
-
return 0;
|
|
22382
|
-
return ((val - minVal) / (maxVal - minVal)) * 100;
|
|
22383
|
-
}, ...(ngDevMode ? [{ debugName: "percentage" }] : []));
|
|
22384
|
-
class = computed(() => cn('relative flex w-full touch-none select-none items-center', this.disabled() && 'opacity-50 cursor-not-allowed', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
22385
|
-
ngOnInit() {
|
|
22386
|
-
merge(fromEvent(document, 'mousemove'), fromEvent(document, 'mouseup'), fromEvent(document, 'touchmove'), fromEvent(document, 'touchend'))
|
|
22387
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
22388
|
-
.subscribe((event) => {
|
|
22389
|
-
if (!this.isDragging())
|
|
22390
|
-
return;
|
|
22391
|
-
if (event.type === 'mouseup' || event.type === 'touchend') {
|
|
22392
|
-
this.isDragging.set(false);
|
|
22393
|
-
return;
|
|
22394
|
-
}
|
|
22395
|
-
if (event.type === 'mousemove') {
|
|
22396
|
-
this.updateValueFromPosition(event.clientX);
|
|
22397
|
-
}
|
|
22398
|
-
else if (event.type === 'touchmove') {
|
|
22399
|
-
const touch = event.touches[0];
|
|
22400
|
-
if (touch) {
|
|
22401
|
-
this.updateValueFromPosition(touch.clientX);
|
|
22402
|
-
}
|
|
22403
|
-
}
|
|
22404
|
-
});
|
|
22405
|
-
}
|
|
22406
|
-
onThumbMouseDown(event) {
|
|
22407
|
-
if (this.disabled())
|
|
22408
|
-
return;
|
|
22409
|
-
event.preventDefault();
|
|
22410
|
-
this.isDragging.set(true);
|
|
22411
|
-
}
|
|
22412
|
-
onThumbTouchStart(event) {
|
|
22413
|
-
if (this.disabled())
|
|
22414
|
-
return;
|
|
22415
|
-
event.preventDefault();
|
|
22416
|
-
this.isDragging.set(true);
|
|
22417
|
-
}
|
|
22418
|
-
onKeydown(event) {
|
|
22419
|
-
if (this.disabled())
|
|
22420
|
-
return;
|
|
22421
|
-
const stepVal = this.step();
|
|
22422
|
-
const minVal = this.min() ?? 0;
|
|
22423
|
-
const maxVal = this.max() ?? 100;
|
|
22424
|
-
let newValue = this.value();
|
|
22425
|
-
switch (event.key) {
|
|
22426
|
-
case 'ArrowRight':
|
|
22427
|
-
case 'ArrowUp':
|
|
22428
|
-
event.preventDefault();
|
|
22429
|
-
newValue = Math.min(newValue + stepVal, maxVal);
|
|
22430
|
-
break;
|
|
22431
|
-
case 'ArrowLeft':
|
|
22432
|
-
case 'ArrowDown':
|
|
22433
|
-
event.preventDefault();
|
|
22434
|
-
newValue = Math.max(newValue - stepVal, minVal);
|
|
22435
|
-
break;
|
|
22436
|
-
case 'Home':
|
|
22437
|
-
event.preventDefault();
|
|
22438
|
-
newValue = minVal;
|
|
22439
|
-
break;
|
|
22440
|
-
case 'End':
|
|
22441
|
-
event.preventDefault();
|
|
22442
|
-
newValue = maxVal;
|
|
22443
|
-
break;
|
|
22444
|
-
case 'PageUp':
|
|
22445
|
-
event.preventDefault();
|
|
22446
|
-
newValue = Math.min(newValue + stepVal * 10, maxVal);
|
|
22447
|
-
break;
|
|
22448
|
-
case 'PageDown':
|
|
22449
|
-
event.preventDefault();
|
|
22450
|
-
newValue = Math.max(newValue - stepVal * 10, minVal);
|
|
22451
|
-
break;
|
|
22452
|
-
default:
|
|
22453
|
-
return;
|
|
22454
|
-
}
|
|
22455
|
-
this.value.set(newValue);
|
|
22456
|
-
}
|
|
22457
|
-
updateValueFromPosition(clientX) {
|
|
22458
|
-
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
22459
|
-
const percentage = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
22460
|
-
const minVal = this.min() ?? 0;
|
|
22461
|
-
const maxVal = this.max() ?? 100;
|
|
22462
|
-
const stepVal = this.step();
|
|
22463
|
-
let newValue = minVal + percentage * (maxVal - minVal);
|
|
22464
|
-
newValue = Math.round(newValue / stepVal) * stepVal;
|
|
22465
|
-
newValue = Math.max(minVal, Math.min(maxVal, newValue));
|
|
22466
|
-
this.value.set(newValue);
|
|
22467
|
-
}
|
|
22468
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSlider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22469
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSlider, isStandalone: true, selector: "div[scSlider]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "data-slot": "slider" }, properties: { "class": "class()", "attr.data-disabled": "disabled() || null" } }, ngImport: i0, template: `
|
|
22470
|
-
<div scSliderTrack>
|
|
22471
|
-
<div scSliderRange [percentage]="percentage()"></div>
|
|
22472
|
-
</div>
|
|
22473
|
-
<div
|
|
22474
|
-
scSliderThumb
|
|
22475
|
-
[percentage]="percentage()"
|
|
22476
|
-
[value]="value()"
|
|
22477
|
-
[min]="min()"
|
|
22478
|
-
[max]="max()"
|
|
22479
|
-
[step]="step()"
|
|
22480
|
-
[disabled]="disabled()"
|
|
22481
|
-
[aria-label]="ariaLabel()"
|
|
22482
|
-
[aria-labelledby]="ariaLabelledby()"
|
|
22483
|
-
(keydown)="onKeydown($event)"
|
|
22484
|
-
(mouseDown)="onThumbMouseDown($event)"
|
|
22485
|
-
(touchStart)="onThumbTouchStart($event)"
|
|
22486
|
-
></div>
|
|
22487
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ScSliderTrack, selector: "div[scSliderTrack]", inputs: ["class"] }, { kind: "component", type: ScSliderRange, selector: "div[scSliderRange]", inputs: ["class", "percentage"] }, { kind: "component", type: ScSliderThumb, selector: "div[scSliderThumb]", inputs: ["class", "percentage", "value", "min", "max", "step", "disabled", "aria-label", "aria-labelledby"], outputs: ["keydown", "mouseDown", "touchStart"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22488
|
-
}
|
|
22489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSlider, decorators: [{
|
|
22490
|
-
type: Component,
|
|
22491
|
-
args: [{
|
|
22492
|
-
selector: 'div[scSlider]',
|
|
22493
|
-
imports: [ScSliderTrack, ScSliderRange, ScSliderThumb],
|
|
22494
|
-
host: {
|
|
22495
|
-
'data-slot': 'slider',
|
|
22496
|
-
'[class]': 'class()',
|
|
22497
|
-
'[attr.data-disabled]': 'disabled() || null',
|
|
22498
|
-
},
|
|
22499
|
-
template: `
|
|
22500
|
-
<div scSliderTrack>
|
|
22501
|
-
<div scSliderRange [percentage]="percentage()"></div>
|
|
22502
|
-
</div>
|
|
22503
|
-
<div
|
|
22504
|
-
scSliderThumb
|
|
22505
|
-
[percentage]="percentage()"
|
|
22506
|
-
[value]="value()"
|
|
22507
|
-
[min]="min()"
|
|
22508
|
-
[max]="max()"
|
|
22509
|
-
[step]="step()"
|
|
22510
|
-
[disabled]="disabled()"
|
|
22511
|
-
[aria-label]="ariaLabel()"
|
|
22512
|
-
[aria-labelledby]="ariaLabelledby()"
|
|
22513
|
-
(keydown)="onKeydown($event)"
|
|
22514
|
-
(mouseDown)="onThumbMouseDown($event)"
|
|
22515
|
-
(touchStart)="onThumbTouchStart($event)"
|
|
22516
|
-
></div>
|
|
22517
|
-
`,
|
|
22518
|
-
encapsulation: ViewEncapsulation.None,
|
|
22519
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22520
|
-
}]
|
|
22521
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }] } });
|
|
22522
|
-
|
|
22523
|
-
class ScRangeSlider {
|
|
22524
|
-
elementRef = inject((ElementRef));
|
|
22525
|
-
destroyRef = inject(DestroyRef);
|
|
22526
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
22527
|
-
minValue = model(0, ...(ngDevMode ? [{ debugName: "minValue" }] : []));
|
|
22528
|
-
maxValue = model(100, ...(ngDevMode ? [{ debugName: "maxValue" }] : []));
|
|
22529
|
-
min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
22530
|
-
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
22531
|
-
step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
22532
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
22533
|
-
minAriaLabel = input(undefined, { ...(ngDevMode ? { debugName: "minAriaLabel" } : {}), alias: 'min-aria-label' });
|
|
22534
|
-
maxAriaLabel = input(undefined, { ...(ngDevMode ? { debugName: "maxAriaLabel" } : {}), alias: 'max-aria-label' });
|
|
22535
|
-
minAriaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "minAriaLabelledby" } : {}), alias: 'min-aria-labelledby' });
|
|
22536
|
-
maxAriaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "maxAriaLabelledby" } : {}), alias: 'max-aria-labelledby' });
|
|
22537
|
-
isDraggingMin = signal(false, ...(ngDevMode ? [{ debugName: "isDraggingMin" }] : []));
|
|
22538
|
-
isDraggingMax = signal(false, ...(ngDevMode ? [{ debugName: "isDraggingMax" }] : []));
|
|
22539
|
-
minPercentage = computed(() => {
|
|
22540
|
-
const minVal = this.min();
|
|
22541
|
-
const maxVal = this.max();
|
|
22542
|
-
const val = this.minValue();
|
|
22543
|
-
if (maxVal === minVal)
|
|
22544
|
-
return 0;
|
|
22545
|
-
return ((val - minVal) / (maxVal - minVal)) * 100;
|
|
22546
|
-
}, ...(ngDevMode ? [{ debugName: "minPercentage" }] : []));
|
|
22547
|
-
maxPercentage = computed(() => {
|
|
22548
|
-
const minVal = this.min();
|
|
22549
|
-
const maxVal = this.max();
|
|
22550
|
-
const val = this.maxValue();
|
|
22551
|
-
if (maxVal === minVal)
|
|
22552
|
-
return 0;
|
|
22553
|
-
return ((val - minVal) / (maxVal - minVal)) * 100;
|
|
22554
|
-
}, ...(ngDevMode ? [{ debugName: "maxPercentage" }] : []));
|
|
22555
|
-
rangeStart = computed(() => this.minPercentage(), ...(ngDevMode ? [{ debugName: "rangeStart" }] : []));
|
|
22556
|
-
rangeWidth = computed(() => {
|
|
22557
|
-
return this.maxPercentage() - this.minPercentage();
|
|
22558
|
-
}, ...(ngDevMode ? [{ debugName: "rangeWidth" }] : []));
|
|
22559
|
-
class = computed(() => cn('relative flex w-full touch-none select-none items-center', this.disabled() && 'opacity-50 cursor-not-allowed', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
22560
|
-
ngOnInit() {
|
|
22561
|
-
merge(fromEvent(document, 'mousemove'), fromEvent(document, 'mouseup'), fromEvent(document, 'touchmove'), fromEvent(document, 'touchend'))
|
|
22562
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
22563
|
-
.subscribe((event) => {
|
|
22564
|
-
if (!this.isDraggingMin() && !this.isDraggingMax())
|
|
22565
|
-
return;
|
|
22566
|
-
if (event.type === 'mouseup' || event.type === 'touchend') {
|
|
22567
|
-
this.isDraggingMin.set(false);
|
|
22568
|
-
this.isDraggingMax.set(false);
|
|
22569
|
-
return;
|
|
22570
|
-
}
|
|
22571
|
-
if (event.type === 'mousemove') {
|
|
22572
|
-
const clientX = event.clientX;
|
|
22573
|
-
if (this.isDraggingMin()) {
|
|
22574
|
-
this.updateMinValueFromPosition(clientX);
|
|
22575
|
-
}
|
|
22576
|
-
else if (this.isDraggingMax()) {
|
|
22577
|
-
this.updateMaxValueFromPosition(clientX);
|
|
22578
|
-
}
|
|
22579
|
-
}
|
|
22580
|
-
else if (event.type === 'touchmove') {
|
|
22581
|
-
const touch = event.touches[0];
|
|
22582
|
-
if (touch) {
|
|
22583
|
-
if (this.isDraggingMin()) {
|
|
22584
|
-
this.updateMinValueFromPosition(touch.clientX);
|
|
22585
|
-
}
|
|
22586
|
-
else if (this.isDraggingMax()) {
|
|
22587
|
-
this.updateMaxValueFromPosition(touch.clientX);
|
|
22588
|
-
}
|
|
22589
|
-
}
|
|
22590
|
-
}
|
|
22591
|
-
});
|
|
22592
|
-
}
|
|
22593
|
-
onMinThumbMouseDown(event) {
|
|
22594
|
-
if (this.disabled())
|
|
22595
|
-
return;
|
|
22596
|
-
event.preventDefault();
|
|
22597
|
-
this.isDraggingMin.set(true);
|
|
22598
|
-
}
|
|
22599
|
-
onMinThumbTouchStart(event) {
|
|
22600
|
-
if (this.disabled())
|
|
22601
|
-
return;
|
|
22602
|
-
event.preventDefault();
|
|
22603
|
-
this.isDraggingMin.set(true);
|
|
22604
|
-
}
|
|
22605
|
-
onMaxThumbMouseDown(event) {
|
|
22606
|
-
if (this.disabled())
|
|
22607
|
-
return;
|
|
22608
|
-
event.preventDefault();
|
|
22609
|
-
this.isDraggingMax.set(true);
|
|
22610
|
-
}
|
|
22611
|
-
onMaxThumbTouchStart(event) {
|
|
22612
|
-
if (this.disabled())
|
|
22613
|
-
return;
|
|
22614
|
-
event.preventDefault();
|
|
22615
|
-
this.isDraggingMax.set(true);
|
|
22616
|
-
}
|
|
22617
|
-
onMinKeydown(event) {
|
|
22618
|
-
if (this.disabled())
|
|
22619
|
-
return;
|
|
22620
|
-
const stepVal = this.step();
|
|
22621
|
-
const minVal = this.min();
|
|
22622
|
-
const maxVal = this.maxValue(); // Min thumb can't go beyond max thumb
|
|
22623
|
-
let newValue = this.minValue();
|
|
22624
|
-
switch (event.key) {
|
|
22625
|
-
case 'ArrowRight':
|
|
22626
|
-
case 'ArrowUp':
|
|
22627
|
-
event.preventDefault();
|
|
22628
|
-
newValue = Math.min(newValue + stepVal, maxVal);
|
|
22629
|
-
break;
|
|
22630
|
-
case 'ArrowLeft':
|
|
22631
|
-
case 'ArrowDown':
|
|
22632
|
-
event.preventDefault();
|
|
22633
|
-
newValue = Math.max(newValue - stepVal, minVal);
|
|
22634
|
-
break;
|
|
22635
|
-
case 'Home':
|
|
22636
|
-
event.preventDefault();
|
|
22637
|
-
newValue = minVal;
|
|
22638
|
-
break;
|
|
22639
|
-
case 'End':
|
|
22640
|
-
event.preventDefault();
|
|
22641
|
-
newValue = maxVal;
|
|
22642
|
-
break;
|
|
22643
|
-
case 'PageUp':
|
|
22644
|
-
event.preventDefault();
|
|
22645
|
-
newValue = Math.min(newValue + stepVal * 10, maxVal);
|
|
22646
|
-
break;
|
|
22647
|
-
case 'PageDown':
|
|
22648
|
-
event.preventDefault();
|
|
22649
|
-
newValue = Math.max(newValue - stepVal * 10, minVal);
|
|
22650
|
-
break;
|
|
22651
|
-
default:
|
|
22652
|
-
return;
|
|
22653
|
-
}
|
|
22654
|
-
this.minValue.set(newValue);
|
|
22655
|
-
}
|
|
22656
|
-
onMaxKeydown(event) {
|
|
22657
|
-
if (this.disabled())
|
|
21348
|
+
host: {
|
|
21349
|
+
type: 'button',
|
|
21350
|
+
'[class]': 'class()',
|
|
21351
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
21352
|
+
'[attr.data-active]': 'isActive() || null',
|
|
21353
|
+
'[disabled]': 'signaturePad.disabled() || null',
|
|
21354
|
+
'(click)': 'onClick()',
|
|
21355
|
+
},
|
|
21356
|
+
encapsulation: ViewEncapsulation.None,
|
|
21357
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21358
|
+
}]
|
|
21359
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
21360
|
+
|
|
21361
|
+
class ScSignaturePadWidthButton {
|
|
21362
|
+
signaturePad = inject(SC_SIGNATURE_PAD);
|
|
21363
|
+
width = input.required(...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
21364
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
21365
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
21366
|
+
isActive = computed(() => this.signaturePad.penWidth() === this.width(), ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
21367
|
+
class = computed(() => cn('inline-flex items-center justify-center size-8 rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground transition-colors', 'disabled:pointer-events-none disabled:opacity-50', 'data-[active]:border-primary data-[active]:bg-primary/10', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
21368
|
+
onClick() {
|
|
21369
|
+
if (this.signaturePad.disabled())
|
|
22658
21370
|
return;
|
|
22659
|
-
|
|
22660
|
-
const minVal = this.minValue(); // Max thumb can't go below min thumb
|
|
22661
|
-
const maxVal = this.max();
|
|
22662
|
-
let newValue = this.maxValue();
|
|
22663
|
-
switch (event.key) {
|
|
22664
|
-
case 'ArrowRight':
|
|
22665
|
-
case 'ArrowUp':
|
|
22666
|
-
event.preventDefault();
|
|
22667
|
-
newValue = Math.min(newValue + stepVal, maxVal);
|
|
22668
|
-
break;
|
|
22669
|
-
case 'ArrowLeft':
|
|
22670
|
-
case 'ArrowDown':
|
|
22671
|
-
event.preventDefault();
|
|
22672
|
-
newValue = Math.max(newValue - stepVal, minVal);
|
|
22673
|
-
break;
|
|
22674
|
-
case 'Home':
|
|
22675
|
-
event.preventDefault();
|
|
22676
|
-
newValue = minVal;
|
|
22677
|
-
break;
|
|
22678
|
-
case 'End':
|
|
22679
|
-
event.preventDefault();
|
|
22680
|
-
newValue = maxVal;
|
|
22681
|
-
break;
|
|
22682
|
-
case 'PageUp':
|
|
22683
|
-
event.preventDefault();
|
|
22684
|
-
newValue = Math.min(newValue + stepVal * 10, maxVal);
|
|
22685
|
-
break;
|
|
22686
|
-
case 'PageDown':
|
|
22687
|
-
event.preventDefault();
|
|
22688
|
-
newValue = Math.max(newValue - stepVal * 10, minVal);
|
|
22689
|
-
break;
|
|
22690
|
-
default:
|
|
22691
|
-
return;
|
|
22692
|
-
}
|
|
22693
|
-
this.maxValue.set(newValue);
|
|
21371
|
+
this.signaturePad.penWidth.set(this.width());
|
|
22694
21372
|
}
|
|
22695
|
-
|
|
22696
|
-
|
|
22697
|
-
const percentage = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
22698
|
-
const minVal = this.min();
|
|
22699
|
-
const maxVal = this.maxValue(); // Min thumb can't go beyond max thumb
|
|
22700
|
-
const stepVal = this.step();
|
|
22701
|
-
let newValue = minVal + percentage * (this.max() - minVal);
|
|
22702
|
-
newValue = Math.round(newValue / stepVal) * stepVal;
|
|
22703
|
-
newValue = Math.max(minVal, Math.min(maxVal, newValue));
|
|
22704
|
-
this.minValue.set(newValue);
|
|
22705
|
-
}
|
|
22706
|
-
updateMaxValueFromPosition(clientX) {
|
|
22707
|
-
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
22708
|
-
const percentage = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
22709
|
-
const minVal = this.minValue(); // Max thumb can't go below min thumb
|
|
22710
|
-
const maxVal = this.max();
|
|
22711
|
-
const stepVal = this.step();
|
|
22712
|
-
let newValue = this.min() + percentage * (maxVal - this.min());
|
|
22713
|
-
newValue = Math.round(newValue / stepVal) * stepVal;
|
|
22714
|
-
newValue = Math.max(minVal, Math.min(maxVal, newValue));
|
|
22715
|
-
this.maxValue.set(newValue);
|
|
22716
|
-
}
|
|
22717
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScRangeSlider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22718
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScRangeSlider, isStandalone: true, selector: "div[scRangeSlider]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minAriaLabel: { classPropertyName: "minAriaLabel", publicName: "min-aria-label", isSignal: true, isRequired: false, transformFunction: null }, maxAriaLabel: { classPropertyName: "maxAriaLabel", publicName: "max-aria-label", isSignal: true, isRequired: false, transformFunction: null }, minAriaLabelledby: { classPropertyName: "minAriaLabelledby", publicName: "min-aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, maxAriaLabelledby: { classPropertyName: "maxAriaLabelledby", publicName: "max-aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { minValue: "minValueChange", maxValue: "maxValueChange" }, host: { attributes: { "data-slot": "range-slider" }, properties: { "class": "class()", "attr.data-disabled": "disabled() || null" } }, ngImport: i0, template: `
|
|
22719
|
-
<div scSliderTrack>
|
|
22720
|
-
<div
|
|
22721
|
-
scSliderRange
|
|
22722
|
-
[percentage]="rangeWidth()"
|
|
22723
|
-
[style.left.%]="rangeStart()"
|
|
22724
|
-
></div>
|
|
22725
|
-
</div>
|
|
22726
|
-
<div
|
|
22727
|
-
scSliderThumb
|
|
22728
|
-
[percentage]="minPercentage()"
|
|
22729
|
-
[value]="minValue()"
|
|
22730
|
-
[min]="min()"
|
|
22731
|
-
[max]="max()"
|
|
22732
|
-
[step]="step()"
|
|
22733
|
-
[disabled]="disabled()"
|
|
22734
|
-
[aria-label]="minAriaLabel()"
|
|
22735
|
-
[aria-labelledby]="minAriaLabelledby()"
|
|
22736
|
-
(keydown)="onMinKeydown($event)"
|
|
22737
|
-
(mouseDown)="onMinThumbMouseDown($event)"
|
|
22738
|
-
(touchStart)="onMinThumbTouchStart($event)"
|
|
22739
|
-
></div>
|
|
22740
|
-
<div
|
|
22741
|
-
scSliderThumb
|
|
22742
|
-
[percentage]="maxPercentage()"
|
|
22743
|
-
[value]="maxValue()"
|
|
22744
|
-
[min]="min()"
|
|
22745
|
-
[max]="max()"
|
|
22746
|
-
[step]="step()"
|
|
22747
|
-
[disabled]="disabled()"
|
|
22748
|
-
[aria-label]="maxAriaLabel()"
|
|
22749
|
-
[aria-labelledby]="maxAriaLabelledby()"
|
|
22750
|
-
(keydown)="onMaxKeydown($event)"
|
|
22751
|
-
(mouseDown)="onMaxThumbMouseDown($event)"
|
|
22752
|
-
(touchStart)="onMaxThumbTouchStart($event)"
|
|
22753
|
-
></div>
|
|
22754
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ScSliderTrack, selector: "div[scSliderTrack]", inputs: ["class"] }, { kind: "component", type: ScSliderRange, selector: "div[scSliderRange]", inputs: ["class", "percentage"] }, { kind: "component", type: ScSliderThumb, selector: "div[scSliderThumb]", inputs: ["class", "percentage", "value", "min", "max", "step", "disabled", "aria-label", "aria-labelledby"], outputs: ["keydown", "mouseDown", "touchStart"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
21373
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSignaturePadWidthButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21374
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSignaturePadWidthButton, isStandalone: true, selector: "button[scSignaturePadPenWidth]", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "class": "class()", "attr.aria-label": "ariaLabel()", "attr.data-active": "isActive() || null", "disabled": "signaturePad.disabled() || null" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22755
21375
|
}
|
|
22756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type:
|
|
21376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSignaturePadWidthButton, decorators: [{
|
|
22757
21377
|
type: Component,
|
|
22758
21378
|
args: [{
|
|
22759
|
-
selector: '
|
|
22760
|
-
|
|
21379
|
+
selector: 'button[scSignaturePadPenWidth]',
|
|
21380
|
+
template: '<ng-content />',
|
|
22761
21381
|
host: {
|
|
22762
|
-
|
|
21382
|
+
type: 'button',
|
|
22763
21383
|
'[class]': 'class()',
|
|
22764
|
-
'[attr.
|
|
21384
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
21385
|
+
'[attr.data-active]': 'isActive() || null',
|
|
21386
|
+
'[disabled]': 'signaturePad.disabled() || null',
|
|
21387
|
+
'(click)': 'onClick()',
|
|
22765
21388
|
},
|
|
22766
|
-
template: `
|
|
22767
|
-
<div scSliderTrack>
|
|
22768
|
-
<div
|
|
22769
|
-
scSliderRange
|
|
22770
|
-
[percentage]="rangeWidth()"
|
|
22771
|
-
[style.left.%]="rangeStart()"
|
|
22772
|
-
></div>
|
|
22773
|
-
</div>
|
|
22774
|
-
<div
|
|
22775
|
-
scSliderThumb
|
|
22776
|
-
[percentage]="minPercentage()"
|
|
22777
|
-
[value]="minValue()"
|
|
22778
|
-
[min]="min()"
|
|
22779
|
-
[max]="max()"
|
|
22780
|
-
[step]="step()"
|
|
22781
|
-
[disabled]="disabled()"
|
|
22782
|
-
[aria-label]="minAriaLabel()"
|
|
22783
|
-
[aria-labelledby]="minAriaLabelledby()"
|
|
22784
|
-
(keydown)="onMinKeydown($event)"
|
|
22785
|
-
(mouseDown)="onMinThumbMouseDown($event)"
|
|
22786
|
-
(touchStart)="onMinThumbTouchStart($event)"
|
|
22787
|
-
></div>
|
|
22788
|
-
<div
|
|
22789
|
-
scSliderThumb
|
|
22790
|
-
[percentage]="maxPercentage()"
|
|
22791
|
-
[value]="maxValue()"
|
|
22792
|
-
[min]="min()"
|
|
22793
|
-
[max]="max()"
|
|
22794
|
-
[step]="step()"
|
|
22795
|
-
[disabled]="disabled()"
|
|
22796
|
-
[aria-label]="maxAriaLabel()"
|
|
22797
|
-
[aria-labelledby]="maxAriaLabelledby()"
|
|
22798
|
-
(keydown)="onMaxKeydown($event)"
|
|
22799
|
-
(mouseDown)="onMaxThumbMouseDown($event)"
|
|
22800
|
-
(touchStart)="onMaxThumbTouchStart($event)"
|
|
22801
|
-
></div>
|
|
22802
|
-
`,
|
|
22803
21389
|
encapsulation: ViewEncapsulation.None,
|
|
22804
21390
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22805
21391
|
}]
|
|
22806
|
-
}], propDecorators: {
|
|
21392
|
+
}], propDecorators: { width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
22807
21393
|
|
|
22808
21394
|
// Token for sortable list context
|
|
22809
21395
|
const SC_SORTABLE_LIST = new InjectionToken('SC_SORTABLE_LIST');
|
|
@@ -24805,68 +23391,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
24805
23391
|
}]
|
|
24806
23392
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
24807
23393
|
|
|
24808
|
-
// Token for time picker context
|
|
24809
|
-
const SC_TIME_PICKER = new InjectionToken('SC_TIME_PICKER');
|
|
24810
|
-
// ============================================================================
|
|
24811
|
-
// TimePicker
|
|
24812
|
-
// ============================================================================
|
|
24813
|
-
class ScTimePicker {
|
|
24814
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
24815
|
-
format = input('12h', ...(ngDevMode ? [{ debugName: "format" }] : []));
|
|
24816
|
-
showSeconds = input(false, ...(ngDevMode ? [{ debugName: "showSeconds" }] : []));
|
|
24817
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
24818
|
-
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
24819
|
-
class = computed(() => cn('inline-flex items-center gap-1', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
24820
|
-
setHours(hours) {
|
|
24821
|
-
const current = this.value() || { hours: 0, minutes: 0 };
|
|
24822
|
-
this.value.set({ ...current, hours });
|
|
24823
|
-
}
|
|
24824
|
-
setMinutes(minutes) {
|
|
24825
|
-
const current = this.value() || { hours: 0, minutes: 0 };
|
|
24826
|
-
this.value.set({ ...current, minutes });
|
|
24827
|
-
}
|
|
24828
|
-
setSeconds(seconds) {
|
|
24829
|
-
const current = this.value() || { hours: 0, minutes: 0 };
|
|
24830
|
-
this.value.set({ ...current, seconds });
|
|
24831
|
-
}
|
|
24832
|
-
setPeriod(period) {
|
|
24833
|
-
const current = this.value() || { hours: 0, minutes: 0 };
|
|
24834
|
-
this.value.set({ ...current, period });
|
|
24835
|
-
}
|
|
24836
|
-
getFormattedTime() {
|
|
24837
|
-
const val = this.value();
|
|
24838
|
-
if (!val)
|
|
24839
|
-
return '';
|
|
24840
|
-
const hours = this.format() === '12h' ? val.hours % 12 || 12 : val.hours;
|
|
24841
|
-
const hoursStr = hours.toString().padStart(2, '0');
|
|
24842
|
-
const minutesStr = val.minutes.toString().padStart(2, '0');
|
|
24843
|
-
let time = `${hoursStr}:${minutesStr}`;
|
|
24844
|
-
if (this.showSeconds() && val.seconds !== undefined) {
|
|
24845
|
-
time += `:${val.seconds.toString().padStart(2, '0')}`;
|
|
24846
|
-
}
|
|
24847
|
-
if (this.format() === '12h' && val.period) {
|
|
24848
|
-
time += ` ${val.period}`;
|
|
24849
|
-
}
|
|
24850
|
-
return time;
|
|
24851
|
-
}
|
|
24852
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
24853
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePicker, isStandalone: true, selector: "[scTimePicker]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "data-slot": "time-picker" }, properties: { "class": "class()" } }, providers: [{ provide: SC_TIME_PICKER, useExisting: ScTimePicker }], ngImport: i0 });
|
|
24854
|
-
}
|
|
24855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePicker, decorators: [{
|
|
24856
|
-
type: Directive,
|
|
24857
|
-
args: [{
|
|
24858
|
-
selector: '[scTimePicker]',
|
|
24859
|
-
providers: [{ provide: SC_TIME_PICKER, useExisting: ScTimePicker }],
|
|
24860
|
-
host: {
|
|
24861
|
-
'data-slot': 'time-picker',
|
|
24862
|
-
'[class]': 'class()',
|
|
24863
|
-
},
|
|
24864
|
-
}]
|
|
24865
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
24866
|
-
|
|
24867
|
-
// ============================================================================
|
|
24868
|
-
// TimePickerClock (visual clock selector)
|
|
24869
|
-
// ============================================================================
|
|
24870
23394
|
class ScTimePickerClock {
|
|
24871
23395
|
timePicker = inject(SC_TIME_PICKER);
|
|
24872
23396
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
@@ -24875,17 +23399,16 @@ class ScTimePickerClock {
|
|
|
24875
23399
|
class = computed(() => cn('inline-block', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
24876
23400
|
markers = computed(() => {
|
|
24877
23401
|
const isHours = this.mode() === 'hours';
|
|
24878
|
-
const count = isHours ? 12 : 12; // Show 12 markers for both
|
|
24879
23402
|
const step = isHours ? 1 : 5;
|
|
24880
23403
|
const radius = 70;
|
|
24881
23404
|
const markers = [];
|
|
24882
|
-
for (let i = 0; i <
|
|
23405
|
+
for (let i = 0; i < 12; i++) {
|
|
24883
23406
|
const value = isHours ? (i === 0 ? 12 : i) : i * step;
|
|
24884
23407
|
const angle = (i * 30 - 90) * (Math.PI / 180);
|
|
24885
23408
|
const x = 100 + radius * Math.cos(angle);
|
|
24886
23409
|
const y = 100 + radius * Math.sin(angle);
|
|
24887
23410
|
markers.push({
|
|
24888
|
-
value
|
|
23411
|
+
value,
|
|
24889
23412
|
label: value.toString().padStart(2, '0'),
|
|
24890
23413
|
x,
|
|
24891
23414
|
y,
|
|
@@ -24893,20 +23416,29 @@ class ScTimePickerClock {
|
|
|
24893
23416
|
}
|
|
24894
23417
|
return markers;
|
|
24895
23418
|
}, ...(ngDevMode ? [{ debugName: "markers" }] : []));
|
|
23419
|
+
selectedValue = computed(() => {
|
|
23420
|
+
const val = this.timePicker.value();
|
|
23421
|
+
if (!val)
|
|
23422
|
+
return null;
|
|
23423
|
+
if (this.mode() === 'hours') {
|
|
23424
|
+
const hours = this.timePicker.format() === '12h'
|
|
23425
|
+
? val.hours % 12 || 12
|
|
23426
|
+
: val.hours % 12;
|
|
23427
|
+
return hours;
|
|
23428
|
+
}
|
|
23429
|
+
return val.minutes;
|
|
23430
|
+
}, ...(ngDevMode ? [{ debugName: "selectedValue" }] : []));
|
|
24896
23431
|
selectedAngle = computed(() => {
|
|
24897
23432
|
const val = this.timePicker.value();
|
|
24898
23433
|
if (!val)
|
|
24899
23434
|
return null;
|
|
24900
|
-
|
|
24901
|
-
if (isHours) {
|
|
23435
|
+
if (this.mode() === 'hours') {
|
|
24902
23436
|
const hours = this.timePicker.format() === '12h'
|
|
24903
23437
|
? val.hours % 12 || 12
|
|
24904
23438
|
: val.hours % 12;
|
|
24905
23439
|
return (hours * 30 - 90) * (Math.PI / 180);
|
|
24906
23440
|
}
|
|
24907
|
-
|
|
24908
|
-
return (val.minutes * 6 - 90) * (Math.PI / 180);
|
|
24909
|
-
}
|
|
23441
|
+
return (val.minutes * 6 - 90) * (Math.PI / 180);
|
|
24910
23442
|
}, ...(ngDevMode ? [{ debugName: "selectedAngle" }] : []));
|
|
24911
23443
|
handX = computed(() => {
|
|
24912
23444
|
const angle = this.selectedAngle();
|
|
@@ -24920,21 +23452,6 @@ class ScTimePickerClock {
|
|
|
24920
23452
|
return 100;
|
|
24921
23453
|
return 100 + 55 * Math.sin(angle);
|
|
24922
23454
|
}, ...(ngDevMode ? [{ debugName: "handY" }] : []));
|
|
24923
|
-
isSelected(value) {
|
|
24924
|
-
const val = this.timePicker.value();
|
|
24925
|
-
if (!val)
|
|
24926
|
-
return false;
|
|
24927
|
-
const isHours = this.mode() === 'hours';
|
|
24928
|
-
if (isHours) {
|
|
24929
|
-
const hours = this.timePicker.format() === '12h'
|
|
24930
|
-
? val.hours % 12 || 12
|
|
24931
|
-
: val.hours % 12;
|
|
24932
|
-
return hours === value || (value === 12 && hours === 0);
|
|
24933
|
-
}
|
|
24934
|
-
else {
|
|
24935
|
-
return val.minutes === value;
|
|
24936
|
-
}
|
|
24937
|
-
}
|
|
24938
23455
|
selectValue(value) {
|
|
24939
23456
|
if (this.mode() === 'hours') {
|
|
24940
23457
|
const val = this.timePicker.value();
|
|
@@ -24980,13 +23497,15 @@ class ScTimePickerClock {
|
|
|
24980
23497
|
[attr.cx]="marker.x"
|
|
24981
23498
|
[attr.cy]="marker.y"
|
|
24982
23499
|
r="14"
|
|
24983
|
-
[class.fill-primary]="
|
|
24984
|
-
[class.text-primary-foreground]="
|
|
23500
|
+
[class.fill-primary]="selectedValue() === marker.value"
|
|
23501
|
+
[class.text-primary-foreground]="selectedValue() === marker.value"
|
|
24985
23502
|
[class.fill-accent]="
|
|
24986
|
-
hoveredValue() === marker.value &&
|
|
23503
|
+
hoveredValue() === marker.value &&
|
|
23504
|
+
selectedValue() !== marker.value
|
|
24987
23505
|
"
|
|
24988
23506
|
[class.fill-transparent]="
|
|
24989
|
-
hoveredValue() !== marker.value &&
|
|
23507
|
+
hoveredValue() !== marker.value &&
|
|
23508
|
+
selectedValue() !== marker.value
|
|
24990
23509
|
"
|
|
24991
23510
|
class="transition-colors"
|
|
24992
23511
|
/>
|
|
@@ -24996,8 +23515,8 @@ class ScTimePickerClock {
|
|
|
24996
23515
|
text-anchor="middle"
|
|
24997
23516
|
dominant-baseline="central"
|
|
24998
23517
|
class="text-sm select-none"
|
|
24999
|
-
[class.fill-primary-foreground]="
|
|
25000
|
-
[class.fill-foreground]="
|
|
23518
|
+
[class.fill-primary-foreground]="selectedValue() === marker.value"
|
|
23519
|
+
[class.fill-foreground]="selectedValue() !== marker.value"
|
|
25001
23520
|
>
|
|
25002
23521
|
{{ marker.label }}
|
|
25003
23522
|
</text>
|
|
@@ -25057,13 +23576,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
25057
23576
|
[attr.cx]="marker.x"
|
|
25058
23577
|
[attr.cy]="marker.y"
|
|
25059
23578
|
r="14"
|
|
25060
|
-
[class.fill-primary]="
|
|
25061
|
-
[class.text-primary-foreground]="
|
|
23579
|
+
[class.fill-primary]="selectedValue() === marker.value"
|
|
23580
|
+
[class.text-primary-foreground]="selectedValue() === marker.value"
|
|
25062
23581
|
[class.fill-accent]="
|
|
25063
|
-
hoveredValue() === marker.value &&
|
|
23582
|
+
hoveredValue() === marker.value &&
|
|
23583
|
+
selectedValue() !== marker.value
|
|
25064
23584
|
"
|
|
25065
23585
|
[class.fill-transparent]="
|
|
25066
|
-
hoveredValue() !== marker.value &&
|
|
23586
|
+
hoveredValue() !== marker.value &&
|
|
23587
|
+
selectedValue() !== marker.value
|
|
25067
23588
|
"
|
|
25068
23589
|
class="transition-colors"
|
|
25069
23590
|
/>
|
|
@@ -25073,8 +23594,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
25073
23594
|
text-anchor="middle"
|
|
25074
23595
|
dominant-baseline="central"
|
|
25075
23596
|
class="text-sm select-none"
|
|
25076
|
-
[class.fill-primary-foreground]="
|
|
25077
|
-
[class.fill-foreground]="
|
|
23597
|
+
[class.fill-primary-foreground]="selectedValue() === marker.value"
|
|
23598
|
+
[class.fill-foreground]="selectedValue() !== marker.value"
|
|
25078
23599
|
>
|
|
25079
23600
|
{{ marker.label }}
|
|
25080
23601
|
</text>
|
|
@@ -25112,276 +23633,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
25112
23633
|
}]
|
|
25113
23634
|
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }] } });
|
|
25114
23635
|
|
|
25115
|
-
// ============================================================================
|
|
25116
|
-
// TimePickerInput
|
|
25117
|
-
// ============================================================================
|
|
25118
|
-
class ScTimePickerInput {
|
|
25119
|
-
timePicker = inject(SC_TIME_PICKER);
|
|
25120
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
25121
|
-
type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
25122
|
-
ariaLabel = input('', { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
25123
|
-
focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : []));
|
|
25124
|
-
class = computed(() => cn('w-10 rounded-md border border-input bg-background px-2 py-1.5 text-center text-sm tabular-nums', 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', 'disabled:cursor-not-allowed disabled:opacity-50', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
25125
|
-
min = computed(() => {
|
|
25126
|
-
return 0;
|
|
25127
|
-
}, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
25128
|
-
max = computed(() => {
|
|
25129
|
-
const type = this.type();
|
|
25130
|
-
if (type === 'hours') {
|
|
25131
|
-
return this.timePicker.format() === '12h' ? 12 : 23;
|
|
25132
|
-
}
|
|
25133
|
-
return 59;
|
|
25134
|
-
}, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
25135
|
-
displayValue = computed(() => {
|
|
25136
|
-
const val = this.timePicker.value();
|
|
25137
|
-
if (!val)
|
|
25138
|
-
return '00';
|
|
25139
|
-
const type = this.type();
|
|
25140
|
-
let num;
|
|
25141
|
-
if (type === 'hours') {
|
|
25142
|
-
num =
|
|
25143
|
-
this.timePicker.format() === '12h' ? val.hours % 12 || 12 : val.hours;
|
|
25144
|
-
}
|
|
25145
|
-
else if (type === 'minutes') {
|
|
25146
|
-
num = val.minutes;
|
|
25147
|
-
}
|
|
25148
|
-
else {
|
|
25149
|
-
num = val.seconds ?? 0;
|
|
25150
|
-
}
|
|
25151
|
-
return num.toString().padStart(2, '0');
|
|
25152
|
-
}, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
|
|
25153
|
-
onInput(event) {
|
|
25154
|
-
const input = event.target;
|
|
25155
|
-
const value = input.value.replace(/\D/g, '');
|
|
25156
|
-
const num = parseInt(value, 10);
|
|
25157
|
-
if (!isNaN(num)) {
|
|
25158
|
-
this.updateValue(Math.min(num, this.max()));
|
|
25159
|
-
}
|
|
25160
|
-
}
|
|
25161
|
-
onBlur() {
|
|
25162
|
-
this.focused.set(false);
|
|
25163
|
-
// Ensure value is within bounds
|
|
25164
|
-
const val = this.timePicker.value();
|
|
25165
|
-
if (val) {
|
|
25166
|
-
const type = this.type();
|
|
25167
|
-
if (type === 'hours') {
|
|
25168
|
-
const max = this.timePicker.format() === '12h' ? 12 : 23;
|
|
25169
|
-
const min = this.timePicker.format() === '12h' ? 1 : 0;
|
|
25170
|
-
const clamped = Math.max(min, Math.min(val.hours, max));
|
|
25171
|
-
if (clamped !== val.hours) {
|
|
25172
|
-
this.timePicker.setHours(clamped);
|
|
25173
|
-
}
|
|
25174
|
-
}
|
|
25175
|
-
}
|
|
25176
|
-
}
|
|
25177
|
-
onFocus(event) {
|
|
25178
|
-
this.focused.set(true);
|
|
25179
|
-
event.target.select();
|
|
25180
|
-
}
|
|
25181
|
-
onKeydown(event) {
|
|
25182
|
-
if (event.key === 'ArrowUp') {
|
|
25183
|
-
event.preventDefault();
|
|
25184
|
-
this.increment();
|
|
25185
|
-
}
|
|
25186
|
-
else if (event.key === 'ArrowDown') {
|
|
25187
|
-
event.preventDefault();
|
|
25188
|
-
this.decrement();
|
|
25189
|
-
}
|
|
25190
|
-
}
|
|
25191
|
-
increment() {
|
|
25192
|
-
const val = this.timePicker.value() || { hours: 0, minutes: 0 };
|
|
25193
|
-
const type = this.type();
|
|
25194
|
-
const max = this.max();
|
|
25195
|
-
if (type === 'hours') {
|
|
25196
|
-
const min = this.timePicker.format() === '12h' ? 1 : 0;
|
|
25197
|
-
const newVal = val.hours >= max ? min : val.hours + 1;
|
|
25198
|
-
this.timePicker.setHours(newVal);
|
|
25199
|
-
}
|
|
25200
|
-
else if (type === 'minutes') {
|
|
25201
|
-
const newVal = val.minutes >= max ? 0 : val.minutes + 1;
|
|
25202
|
-
this.timePicker.setMinutes(newVal);
|
|
25203
|
-
}
|
|
25204
|
-
else {
|
|
25205
|
-
const newVal = (val.seconds ?? 0) >= max ? 0 : (val.seconds ?? 0) + 1;
|
|
25206
|
-
this.timePicker.setSeconds(newVal);
|
|
25207
|
-
}
|
|
25208
|
-
}
|
|
25209
|
-
decrement() {
|
|
25210
|
-
const val = this.timePicker.value() || { hours: 0, minutes: 0 };
|
|
25211
|
-
const type = this.type();
|
|
25212
|
-
const max = this.max();
|
|
25213
|
-
if (type === 'hours') {
|
|
25214
|
-
const min = this.timePicker.format() === '12h' ? 1 : 0;
|
|
25215
|
-
const newVal = val.hours <= min ? max : val.hours - 1;
|
|
25216
|
-
this.timePicker.setHours(newVal);
|
|
25217
|
-
}
|
|
25218
|
-
else if (type === 'minutes') {
|
|
25219
|
-
const newVal = val.minutes <= 0 ? max : val.minutes - 1;
|
|
25220
|
-
this.timePicker.setMinutes(newVal);
|
|
25221
|
-
}
|
|
25222
|
-
else {
|
|
25223
|
-
const newVal = (val.seconds ?? 0) <= 0 ? max : (val.seconds ?? 0) - 1;
|
|
25224
|
-
this.timePicker.setSeconds(newVal);
|
|
25225
|
-
}
|
|
25226
|
-
}
|
|
25227
|
-
updateValue(num) {
|
|
25228
|
-
const type = this.type();
|
|
25229
|
-
if (type === 'hours') {
|
|
25230
|
-
this.timePicker.setHours(num);
|
|
25231
|
-
}
|
|
25232
|
-
else if (type === 'minutes') {
|
|
25233
|
-
this.timePicker.setMinutes(num);
|
|
25234
|
-
}
|
|
25235
|
-
else {
|
|
25236
|
-
this.timePicker.setSeconds(num);
|
|
25237
|
-
}
|
|
25238
|
-
}
|
|
25239
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25240
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePickerInput, isStandalone: true, selector: "input[scTimePickerInput]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "time-picker-input", "type": "text", "inputmode": "numeric" }, listeners: { "input": "onInput($event)", "blur": "onBlur()", "keydown": "onKeydown($event)", "focus": "onFocus($event)" }, properties: { "class": "class()", "value": "displayValue()", "disabled": "timePicker.disabled()", "attr.min": "min()", "attr.max": "max()", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
25241
|
-
}
|
|
25242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerInput, decorators: [{
|
|
25243
|
-
type: Component,
|
|
25244
|
-
args: [{
|
|
25245
|
-
selector: 'input[scTimePickerInput]',
|
|
25246
|
-
template: ``,
|
|
25247
|
-
host: {
|
|
25248
|
-
'data-slot': 'time-picker-input',
|
|
25249
|
-
type: 'text',
|
|
25250
|
-
inputmode: 'numeric',
|
|
25251
|
-
'[class]': 'class()',
|
|
25252
|
-
'[value]': 'displayValue()',
|
|
25253
|
-
'[disabled]': 'timePicker.disabled()',
|
|
25254
|
-
'[attr.min]': 'min()',
|
|
25255
|
-
'[attr.max]': 'max()',
|
|
25256
|
-
'[attr.aria-label]': 'ariaLabel()',
|
|
25257
|
-
'(input)': 'onInput($event)',
|
|
25258
|
-
'(blur)': 'onBlur()',
|
|
25259
|
-
'(keydown)': 'onKeydown($event)',
|
|
25260
|
-
'(focus)': 'onFocus($event)',
|
|
25261
|
-
},
|
|
25262
|
-
encapsulation: ViewEncapsulation.None,
|
|
25263
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25264
|
-
}]
|
|
25265
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
|
|
25266
|
-
|
|
25267
|
-
// ============================================================================
|
|
25268
|
-
// TimePickerPeriod
|
|
25269
|
-
// ============================================================================
|
|
25270
|
-
class ScTimePickerPeriod {
|
|
25271
|
-
timePicker = inject(SC_TIME_PICKER);
|
|
25272
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
25273
|
-
class = computed(() => cn('ml-2 inline-flex rounded-md border border-input bg-background p-0.5', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
25274
|
-
isAM = computed(() => {
|
|
25275
|
-
const val = this.timePicker.value();
|
|
25276
|
-
return val?.period === 'AM' || (!val?.period && (val?.hours ?? 0) < 12);
|
|
25277
|
-
}, ...(ngDevMode ? [{ debugName: "isAM" }] : []));
|
|
25278
|
-
isPM = computed(() => {
|
|
25279
|
-
const val = this.timePicker.value();
|
|
25280
|
-
return val?.period === 'PM' || (!val?.period && (val?.hours ?? 0) >= 12);
|
|
25281
|
-
}, ...(ngDevMode ? [{ debugName: "isPM" }] : []));
|
|
25282
|
-
selectAM() {
|
|
25283
|
-
this.timePicker.setPeriod('AM');
|
|
25284
|
-
const val = this.timePicker.value();
|
|
25285
|
-
if (val && val.hours >= 12) {
|
|
25286
|
-
this.timePicker.setHours(val.hours - 12);
|
|
25287
|
-
}
|
|
25288
|
-
}
|
|
25289
|
-
selectPM() {
|
|
25290
|
-
this.timePicker.setPeriod('PM');
|
|
25291
|
-
const val = this.timePicker.value();
|
|
25292
|
-
if (val && val.hours < 12) {
|
|
25293
|
-
this.timePicker.setHours(val.hours + 12);
|
|
25294
|
-
}
|
|
25295
|
-
}
|
|
25296
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriod, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25297
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePickerPeriod, isStandalone: true, selector: "[scTimePickerPeriod]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "time-picker-period", "role": "group" }, properties: { "class": "class()", "attr.aria-label": "\"Select AM or PM\"" } }, ngImport: i0, template: `
|
|
25298
|
-
<button
|
|
25299
|
-
type="button"
|
|
25300
|
-
class="rounded-md px-2 py-1.5 text-sm font-medium transition-colors"
|
|
25301
|
-
[class.bg-primary]="isAM()"
|
|
25302
|
-
[class.text-primary-foreground]="isAM()"
|
|
25303
|
-
[class.text-muted-foreground]="!isAM()"
|
|
25304
|
-
[class.hover:bg-accent]="!isAM()"
|
|
25305
|
-
[disabled]="timePicker.disabled()"
|
|
25306
|
-
(click)="selectAM()"
|
|
25307
|
-
>
|
|
25308
|
-
AM
|
|
25309
|
-
</button>
|
|
25310
|
-
<button
|
|
25311
|
-
type="button"
|
|
25312
|
-
class="rounded-md px-2 py-1.5 text-sm font-medium transition-colors"
|
|
25313
|
-
[class.bg-primary]="isPM()"
|
|
25314
|
-
[class.text-primary-foreground]="isPM()"
|
|
25315
|
-
[class.text-muted-foreground]="!isPM()"
|
|
25316
|
-
[class.hover:bg-accent]="!isPM()"
|
|
25317
|
-
[disabled]="timePicker.disabled()"
|
|
25318
|
-
(click)="selectPM()"
|
|
25319
|
-
>
|
|
25320
|
-
PM
|
|
25321
|
-
</button>
|
|
25322
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
25323
|
-
}
|
|
25324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriod, decorators: [{
|
|
25325
|
-
type: Component,
|
|
25326
|
-
args: [{
|
|
25327
|
-
selector: '[scTimePickerPeriod]',
|
|
25328
|
-
template: `
|
|
25329
|
-
<button
|
|
25330
|
-
type="button"
|
|
25331
|
-
class="rounded-md px-2 py-1.5 text-sm font-medium transition-colors"
|
|
25332
|
-
[class.bg-primary]="isAM()"
|
|
25333
|
-
[class.text-primary-foreground]="isAM()"
|
|
25334
|
-
[class.text-muted-foreground]="!isAM()"
|
|
25335
|
-
[class.hover:bg-accent]="!isAM()"
|
|
25336
|
-
[disabled]="timePicker.disabled()"
|
|
25337
|
-
(click)="selectAM()"
|
|
25338
|
-
>
|
|
25339
|
-
AM
|
|
25340
|
-
</button>
|
|
25341
|
-
<button
|
|
25342
|
-
type="button"
|
|
25343
|
-
class="rounded-md px-2 py-1.5 text-sm font-medium transition-colors"
|
|
25344
|
-
[class.bg-primary]="isPM()"
|
|
25345
|
-
[class.text-primary-foreground]="isPM()"
|
|
25346
|
-
[class.text-muted-foreground]="!isPM()"
|
|
25347
|
-
[class.hover:bg-accent]="!isPM()"
|
|
25348
|
-
[disabled]="timePicker.disabled()"
|
|
25349
|
-
(click)="selectPM()"
|
|
25350
|
-
>
|
|
25351
|
-
PM
|
|
25352
|
-
</button>
|
|
25353
|
-
`,
|
|
25354
|
-
host: {
|
|
25355
|
-
'data-slot': 'time-picker-period',
|
|
25356
|
-
'[class]': 'class()',
|
|
25357
|
-
role: 'group',
|
|
25358
|
-
'[attr.aria-label]': '"Select AM or PM"',
|
|
25359
|
-
},
|
|
25360
|
-
encapsulation: ViewEncapsulation.None,
|
|
25361
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25362
|
-
}]
|
|
25363
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
25364
|
-
|
|
25365
|
-
// ============================================================================
|
|
25366
|
-
// TimePickerSeparator
|
|
25367
|
-
// ============================================================================
|
|
25368
|
-
class ScTimePickerSeparator {
|
|
25369
|
-
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
25370
|
-
class = computed(() => cn('text-lg font-medium text-muted-foreground', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
25371
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
25372
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePickerSeparator, isStandalone: true, selector: "[scTimePickerSeparator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "time-picker-separator" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
25373
|
-
}
|
|
25374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerSeparator, decorators: [{
|
|
25375
|
-
type: Directive,
|
|
25376
|
-
args: [{
|
|
25377
|
-
selector: '[scTimePickerSeparator]',
|
|
25378
|
-
host: {
|
|
25379
|
-
'data-slot': 'time-picker-separator',
|
|
25380
|
-
'[class]': 'class()',
|
|
25381
|
-
},
|
|
25382
|
-
}]
|
|
25383
|
-
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
25384
|
-
|
|
25385
23636
|
class ScTimeline {
|
|
25386
23637
|
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
25387
23638
|
class = computed(() => cn('relative space-y-0', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
@@ -28809,5 +27060,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
28809
27060
|
* Generated bundle index. Do not edit.
|
|
28810
27061
|
*/
|
|
28811
27062
|
|
|
28812
|
-
export { AuthLayout, CHART_COLORS, COUNTRIES, DEFAULT_BREAKPOINTS, DEFAULT_CONFETTI_OPTIONS, DEFAULT_CONFIG, DEFAULT_COUNTER_OPTIONS, DEFAULT_DOCK_OPTIONS, DEFAULT_SEARCH_OPTIONS, DEFAULT_TOOLBAR_CONFIG, SC_AUDIO_PLAYER, SC_CHART, SC_COLOR_PICKER, SC_DATA_TABLE,
|
|
27063
|
+
export { AuthLayout, CHART_COLORS, COUNTRIES, DEFAULT_BREAKPOINTS, DEFAULT_CONFETTI_OPTIONS, DEFAULT_CONFIG, DEFAULT_COUNTER_OPTIONS, DEFAULT_DOCK_OPTIONS, DEFAULT_SEARCH_OPTIONS, DEFAULT_TOOLBAR_CONFIG, SC_AUDIO_PLAYER, SC_CHART, SC_COLOR_PICKER, SC_DATA_TABLE, SC_IMAGE_COMPARE, SC_IMAGE_CROPPER, SC_LANGUAGE_CONFIG, SC_LIGHTBOX, SC_NOTIFICATION_CENTER, SC_NUMBER_FIELD, SC_PASSWORD_FIELD, SC_PDF_VIEWER, SC_RATING_FIELD, SC_RATING_ITEM_GROUP, SC_SIGNATURE_PAD, SC_SORTABLE_ITEM, SC_SORTABLE_LIST, SC_STEPPER, SC_STEPPER_ITEM, SC_TAG_INPUT, SC_TIMEZONE_CONFIG, SC_TREE_ITEM, ScAnimatedCounter, ScAudioPlayer, ScAudioPlayerCover, ScAudioPlayerInfo, ScAudioPlayerNext, ScAudioPlayerPlayButton, ScAudioPlayerPrevious, ScAudioPlayerProgress, ScAudioPlayerRepeat, ScAudioPlayerShuffle, ScAudioPlayerVolume, ScAutoMarquee, ScBarChart, ScBarcodeScanner, ScBarcodeScannerSimple, ScChartContainer, ScChartLegend, ScChartTooltip, ScColorPicker, ScColorPickerArea, ScColorPickerEyeDropper, ScColorPickerHue, ScColorPickerInput, ScColorPickerPreview, ScColorPickerSwatches, ScCombobox, ScComboboxEmpty, ScComboboxIcon, ScComboboxInput, ScComboboxItem, ScComboboxItemIndicator, ScComboboxList, ScComboboxPortal, ScComboboxTrigger, ScCommand, ScCommandEmpty, ScCommandGroup, ScCommandGroupHeading, ScCommandInput, ScCommandItem, ScCommandList, ScCommandSeparator, ScCommandShortcut, ScConfetti, ScContextMenu, ScContextMenuContent, ScContextMenuItem, ScContextMenuLabel, ScContextMenuSeparator, ScContextMenuShortcut, ScContextMenuSub, ScContextMenuSubContent, ScContextMenuSubTrigger, ScContextMenuTrigger, ScCopyButton, ScCopyButtonWithText, ScCopyCode, ScCopyInput, ScCountdown, ScCountdownSimple, ScDataTable, ScDataTableBody, ScDataTableCell, ScDataTableColumnToggle, ScDataTableFilter, ScDataTableHead, ScDataTableHeader, ScDataTablePagination, ScDataTableRow, ScDateRangePicker, ScDiffViewer, ScDock, ScDockBadge, ScDockItem, ScDockItems, ScDonutChart, ScEmojiPicker, ScEmojiPickerTrigger, ScImageAnnotator, ScImageCompareDirective as ScImageCompare, ScImageCompareAfter, ScImageCompareBefore, ScImageCompareContainer, ScImageCompareDirective, ScImageCompareLabel, ScImageCompareSlider, ScImageCropperDirective as ScImageCropper, ScImageCropperAspectRatio, ScImageCropperContainer, ScImageCropperControls, ScImageCropperDirective, ScImageCropperPreview, ScInfiniteScroll, ScInfiniteScrollEnd, ScInfiniteScrollLoader, ScKanbanBoard, ScKanbanCard, ScKanbanColumn, ScLanguageButton, ScLanguageSelect, ScLanguageService, ScLanguageToggle, ScLightboxDirective as ScLightbox, ScLightboxContainer, ScLightboxDirective, ScLightboxGallery, ScLightboxTrigger, ScLineChart, ScMarquee, ScMarqueeClone, ScMarqueeFade, ScMarqueeItem, ScMarqueeText, ScMasonryGrid, ScMasonryItem, ScMentionInput, ScMultiSelect, ScNativeCheckbox, ScNavbar, ScNavbarActions, ScNavbarBrand, ScNavbarGroup, ScNavbarMobileLink, ScNavbarMobileMenu, ScNavbarMobilePortal, ScNavbarMobileTrigger, ScNavbarProvider, ScNotificationCenterDirective as ScNotificationCenter, ScNotificationCenterContainer, ScNotificationCenterDirective, ScNotificationGroup, ScNotificationItem, ScNumberField, ScNumberFieldDecrement, ScNumberFieldIncrement, ScNumberFieldInput, ScNumberFieldInputGroup, ScNumberFieldScrubArea, ScOptField, ScOptFieldSeparator, ScOptFieldSlot, ScOptFieldSlotCaret, ScOptFieldSlotChar, ScOptFieldSlotGroup, ScOptFieldSlotInput, ScOrgChart, ScOrgChartNode, ScPasswordField, ScPasswordFieldInput, ScPasswordFieldInputGroup, ScPasswordFieldRequirements, ScPasswordFieldStrength, ScPasswordFieldStrengthBar, ScPasswordFieldToggle, ScPdfViewer, ScPdfViewerContainer, ScPdfViewerContent, ScPdfViewerDownload, ScPdfViewerEmpty, ScPdfViewerError, ScPdfViewerFullscreen, ScPdfViewerLoading, ScPdfViewerNav, ScPdfViewerNextPage, ScPdfViewerPageInfo, ScPdfViewerPrevPage, ScPdfViewerPrint, ScPdfViewerRetry, ScPdfViewerRoot, ScPdfViewerRotateLeft, ScPdfViewerRotateRight, ScPdfViewerSeparator, ScPdfViewerSpacer, ScPdfViewerToolbar$1 as ScPdfViewerToolbar, ScPdfViewerToolbar as ScPdfViewerToolbarLegacy, ScPdfViewerZoom, ScPdfViewerZoomIn, ScPdfViewerZoomOut, ScPdfViewerZoomSelect, ScPhoneInput, ScPhoneInputSimple, ScPieChart, ScQrCode, ScQrCodeDownload, ScRatingField, ScRatingFieldItem, ScRatingItemGroup, ScResizableHandle, ScResizablePanel, ScResizablePanelGroup, ScScrollArea, ScScrollBar, ScSearchInput, ScSidebar, ScSidebarBody, ScSidebarFooter, ScSidebarGroup, ScSidebarGroupAction, ScSidebarGroupContent, ScSidebarGroupLabel, ScSidebarHeader, ScSidebarInput, ScSidebarInset, ScSidebarLayout, ScSidebarMenu, ScSidebarMenuAction, ScSidebarMenuBadge, ScSidebarMenuButton, ScSidebarMenuItem, ScSidebarMenuSkeleton, ScSidebarMenuSub, ScSidebarMenuSubButton, ScSidebarMenuSubItem, ScSidebarProvider, ScSidebarRail, ScSidebarSeparator, ScSidebarState, ScSidebarTrigger, ScSignaturePad, ScSignaturePadCanvas, ScSignaturePadClearButton, ScSignaturePadColorButton, ScSignaturePadControls, ScSignaturePadToolbar, ScSignaturePadUndoButton, ScSignaturePadWidthButton, ScSortableHandle, ScSortableItem, ScSortableList, ScSortableOverlay, ScSpeedDial, ScSpeedDialAction, ScSplitButton, ScSpotlight, ScSpotlightActions, ScSpotlightDescription, ScSpotlightTitle, ScStackedLayout, ScStatCard, ScStatCardChange, ScStatCardDescription, ScStatCardIcon, ScStatCardLabel, ScStatCardValue, ScStepper, ScStepperContent, ScStepperDescription, ScStepperItem, ScStepperList, ScStepperNext, ScStepperPrevious, ScStepperSeparator, ScStepperTitle, ScStepperTrigger, ScTagInput, ScTagInputClear, ScTagInputCount, ScTagInputField, ScTagInputTag, ScTheme, ScThemeField, ScThemeSelect, ScThemeToggle, ScTimePickerClock, ScTimeline, ScTimelineConnector, ScTimelineContent, ScTimelineDescription, ScTimelineDot, ScTimelineItem, ScTimelineTime, ScTimelineTitle, ScTimezoneBadge, ScTimezoneButton, ScTimezoneDisplay, ScTimezoneSelect, ScTimezoneService, ScTourGuide, ScTransferList, ScTree, ScTreeItem, ScTreeItemGroup, ScTreeItemIcon, ScTreeItemTrigger, ScTreeItemTriggerIcon, ScVideoPlayer, ScVideoPlayerBigPlayButton, ScVideoPlayerBuffering, ScVideoPlayerControls, ScVideoPlayerFullscreenButton, ScVideoPlayerPipButton, ScVideoPlayerPlayButton, ScVideoPlayerProgress, ScVideoPlayerSkipButton, ScVideoPlayerSpeedButton, ScVideoPlayerTime, ScVideoPlayerVideo, ScVideoPlayerVolume, ScVirtualList, ScVirtualScroll, TourService, ZOOM_LEVELS, computeDiff, computeWordDiff, createScDateRangePresets, createUnifiedDiff, getCountryByCode, getCountryByDialCode, sizeStyles$1 as sizeStyles, variantStyles$1 as variantStyles };
|
|
28813
27064
|
//# sourceMappingURL=semantic-components-ui-lab.mjs.map
|