@thalassic/ui 22.16.0 → 22.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3312,6 +3312,7 @@ const DEFAULT_CONFIRM_CONFIG = {
|
|
|
3312
3312
|
confirmButton: { label: 'Confirm' },
|
|
3313
3313
|
cancelButton: { label: 'Cancel', variant: 'text' },
|
|
3314
3314
|
actionsAlign: 'end',
|
|
3315
|
+
size: 'md',
|
|
3315
3316
|
};
|
|
3316
3317
|
|
|
3317
3318
|
const CONFIRM_CONFIG = new InjectionToken('CONFIRM_CONFIG', {
|
|
@@ -3346,6 +3347,8 @@ class ConfirmPanel {
|
|
|
3346
3347
|
...(ngDevMode ? [{ debugName: "modal" }] : /* istanbul ignore next */ []));
|
|
3347
3348
|
actionsAlign = input(this._config.actionsAlign, /* @ts-ignore */
|
|
3348
3349
|
...(ngDevMode ? [{ debugName: "actionsAlign" }] : /* istanbul ignore next */ []));
|
|
3350
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3351
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3349
3352
|
// Outputs
|
|
3350
3353
|
confirmed = output();
|
|
3351
3354
|
cancelled = output();
|
|
@@ -3358,6 +3361,8 @@ class ConfirmPanel {
|
|
|
3358
3361
|
...(ngDevMode ? [{ debugName: "resolvedConfirm" }] : /* istanbul ignore next */ []));
|
|
3359
3362
|
resolvedCancel = computed(() => this._resolve(this.cancel(), this._config.cancelButton), /* @ts-ignore */
|
|
3360
3363
|
...(ngDevMode ? [{ debugName: "resolvedCancel" }] : /* istanbul ignore next */ []));
|
|
3364
|
+
sizeClass = computed(() => `tls-confirm--${this.size()}`, /* @ts-ignore */
|
|
3365
|
+
...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
|
|
3361
3366
|
actionsClasses = computed(() => [
|
|
3362
3367
|
'tls-confirm__actions',
|
|
3363
3368
|
`tls-confirm__actions--${this.actionsAlign()}`,
|
|
@@ -3391,7 +3396,7 @@ class ConfirmPanel {
|
|
|
3391
3396
|
confirmButton.focus();
|
|
3392
3397
|
}
|
|
3393
3398
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3394
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ConfirmPanel, isStandalone: true, selector: "tls-confirm-panel", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null }, cancel: { classPropertyName: "cancel", publicName: "cancel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { attributes: { "role": "alertdialog", "animate.enter": "tls-confirm--enter", "animate.leave": "tls-confirm--leave" }, properties: { "attr.aria-modal": "modal() ? \"true\" : \"false\"", "id": "id", "attr.aria-labelledby": "title() ? titleId : null", "attr.aria-describedby": "messageId", "attr.aria-label": "ariaLabel() ?? null" }, classAttribute: "tls-confirm" }, ngImport: i0, template: `
|
|
3399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ConfirmPanel, isStandalone: true, selector: "tls-confirm-panel", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null }, cancel: { classPropertyName: "cancel", publicName: "cancel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { attributes: { "role": "alertdialog", "animate.enter": "tls-confirm--enter", "animate.leave": "tls-confirm--leave" }, properties: { "class": "sizeClass()", "attr.aria-modal": "modal() ? \"true\" : \"false\"", "id": "id", "attr.aria-labelledby": "title() ? titleId : null", "attr.aria-describedby": "messageId", "attr.aria-label": "ariaLabel() ?? null" }, classAttribute: "tls-confirm" }, ngImport: i0, template: `
|
|
3395
3400
|
@if (title()) {
|
|
3396
3401
|
<h2 class="tls-confirm__title" [id]="titleId">{{ title() }}</h2>
|
|
3397
3402
|
}
|
|
@@ -3465,6 +3470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3465
3470
|
`,
|
|
3466
3471
|
host: {
|
|
3467
3472
|
class: 'tls-confirm',
|
|
3473
|
+
'[class]': 'sizeClass()',
|
|
3468
3474
|
role: 'alertdialog',
|
|
3469
3475
|
'[attr.aria-modal]': 'modal() ? "true" : "false"',
|
|
3470
3476
|
'[id]': 'id',
|
|
@@ -3475,7 +3481,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3475
3481
|
'animate.leave': 'tls-confirm--leave',
|
|
3476
3482
|
},
|
|
3477
3483
|
}]
|
|
3478
|
-
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], confirm: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirm", required: false }] }], cancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], actionsAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsAlign", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
|
|
3484
|
+
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], confirm: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirm", required: false }] }], cancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], actionsAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsAlign", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
|
|
3479
3485
|
|
|
3480
3486
|
/**
|
|
3481
3487
|
* Declarative confirm dialog anchored to a trigger. Sits in the template
|
|
@@ -3500,6 +3506,8 @@ class Confirm {
|
|
|
3500
3506
|
...(ngDevMode ? [{ debugName: "cancel" }] : /* istanbul ignore next */ []));
|
|
3501
3507
|
actionsAlign = input(this._config.actionsAlign, /* @ts-ignore */
|
|
3502
3508
|
...(ngDevMode ? [{ debugName: "actionsAlign" }] : /* istanbul ignore next */ []));
|
|
3509
|
+
size = input(this._config.size, /* @ts-ignore */
|
|
3510
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3503
3511
|
ariaLabel = input(undefined, /* @ts-ignore */
|
|
3504
3512
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3505
3513
|
position = input(this._config.position, /* @ts-ignore */
|
|
@@ -3563,7 +3571,7 @@ class Confirm {
|
|
|
3563
3571
|
this.cancelled.emit();
|
|
3564
3572
|
}
|
|
3565
3573
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Confirm, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3566
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Confirm, isStandalone: true, selector: "tls-confirm", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null }, cancel: { classPropertyName: "cancel", publicName: "cancel", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, viewQueries: [{ propertyName: "_templateRef", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: Confirm, isStandalone: true, selector: "tls-confirm", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null }, cancel: { classPropertyName: "cancel", publicName: "cancel", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, viewQueries: [{ propertyName: "_templateRef", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3567
3575
|
<ng-template #content>
|
|
3568
3576
|
<tls-confirm-panel
|
|
3569
3577
|
[title]="title()"
|
|
@@ -3571,12 +3579,13 @@ class Confirm {
|
|
|
3571
3579
|
[confirm]="confirm()"
|
|
3572
3580
|
[cancel]="cancel()"
|
|
3573
3581
|
[actionsAlign]="actionsAlign()"
|
|
3582
|
+
[size]="size()"
|
|
3574
3583
|
[ariaLabel]="ariaLabel()"
|
|
3575
3584
|
(confirmed)="onConfirm()"
|
|
3576
3585
|
(cancelled)="onCancel()"
|
|
3577
3586
|
></tls-confirm-panel>
|
|
3578
3587
|
</ng-template>
|
|
3579
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ConfirmPanel, selector: "tls-confirm-panel", inputs: ["title", "message", "confirm", "cancel", "ariaLabel", "modal", "actionsAlign"], outputs: ["confirmed", "cancelled"] }] });
|
|
3588
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ConfirmPanel, selector: "tls-confirm-panel", inputs: ["title", "message", "confirm", "cancel", "ariaLabel", "modal", "actionsAlign", "size"], outputs: ["confirmed", "cancelled"] }] });
|
|
3580
3589
|
}
|
|
3581
3590
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Confirm, decorators: [{
|
|
3582
3591
|
type: Component,
|
|
@@ -3591,6 +3600,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3591
3600
|
[confirm]="confirm()"
|
|
3592
3601
|
[cancel]="cancel()"
|
|
3593
3602
|
[actionsAlign]="actionsAlign()"
|
|
3603
|
+
[size]="size()"
|
|
3594
3604
|
[ariaLabel]="ariaLabel()"
|
|
3595
3605
|
(confirmed)="onConfirm()"
|
|
3596
3606
|
(cancelled)="onCancel()"
|
|
@@ -3598,7 +3608,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3598
3608
|
</ng-template>
|
|
3599
3609
|
`,
|
|
3600
3610
|
}]
|
|
3601
|
-
}], propDecorators: { _templateRef: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], confirm: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirm", required: false }] }], cancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancel", required: false }] }], actionsAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsAlign", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
|
|
3611
|
+
}], propDecorators: { _templateRef: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], confirm: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirm", required: false }] }], cancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancel", required: false }] }], actionsAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsAlign", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
|
|
3602
3612
|
|
|
3603
3613
|
// Dimmed backdrop behind a centered modal confirm. Shared with `tls-dialog` so
|
|
3604
3614
|
// the two modal surfaces render an identical scrim.
|
|
@@ -3660,6 +3670,7 @@ class ConfirmService {
|
|
|
3660
3670
|
panelRef.setInput('confirm', options.confirm);
|
|
3661
3671
|
panelRef.setInput('cancel', options.cancel);
|
|
3662
3672
|
panelRef.setInput('actionsAlign', options.actionsAlign ?? this._config.actionsAlign);
|
|
3673
|
+
panelRef.setInput('size', options.size ?? this._config.size);
|
|
3663
3674
|
panelRef.setInput('ariaLabel', options.ariaLabel);
|
|
3664
3675
|
panelRef.setInput('modal', modal);
|
|
3665
3676
|
}
|