@besaitech/ng-design-system 0.0.49 → 0.0.50
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,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, computed, ChangeDetectionStrategy, Component, booleanAttribute, isDevMode, effect, output, signal, forwardRef, viewChild,
|
|
2
|
+
import { inject, input, computed, ChangeDetectionStrategy, Component, booleanAttribute, isDevMode, effect, numberAttribute, output, signal, forwardRef, viewChild, viewChildren, afterRenderEffect, ElementRef, model, Injector, afterNextRender, TemplateRef, Directive, contentChild, Injectable, contentChildren, untracked, DestroyRef } from '@angular/core';
|
|
3
3
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
@@ -62,7 +62,10 @@ const SDS_ICONS = {
|
|
|
62
62
|
copy: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
|
|
63
63
|
type: '<polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/>',
|
|
64
64
|
tag: '<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"/><circle cx="7.5" cy="7.5" r=".5" fill="currentColor"/>',
|
|
65
|
+
ticket: '<path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/><path d="M13 5v2"/><path d="M13 17v2"/><path d="M13 11v2"/>',
|
|
65
66
|
square: '<rect width="18" height="18" x="3" y="3" rx="2"/>',
|
|
67
|
+
'square-check': '<rect width="18" height="18" x="3" y="3" rx="2"/><path d="m9 12 2 2 4-4"/>',
|
|
68
|
+
'circle-dot': '<circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="1"/>',
|
|
66
69
|
'circle-user': '<circle cx="12" cy="12" r="10"/><circle cx="12" cy="10" r="3"/><path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662"/>',
|
|
67
70
|
'layout-grid': '<rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/>',
|
|
68
71
|
'panels-top-left': '<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/>',
|
|
@@ -280,7 +283,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
280
283
|
`, styles: [".sds-spinner{width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:9999px;animation:sds-spin .6s linear infinite}@keyframes sds-spin{to{transform:rotate(360deg)}}\n"] }]
|
|
281
284
|
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
282
285
|
|
|
283
|
-
let nextId$
|
|
286
|
+
let nextId$f = 0;
|
|
284
287
|
const SIZES$a = {
|
|
285
288
|
sm: 'h-9 text-sm',
|
|
286
289
|
md: 'h-10 text-sm',
|
|
@@ -293,7 +296,7 @@ const SIZES$a = {
|
|
|
293
296
|
* sidebar search field).
|
|
294
297
|
*/
|
|
295
298
|
class SdsInput {
|
|
296
|
-
inputId = `sds-input-${nextId$
|
|
299
|
+
inputId = `sds-input-${nextId$f++}`;
|
|
297
300
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
298
301
|
/** Accessible name used when no visible [label] is provided. */
|
|
299
302
|
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
@@ -321,6 +324,14 @@ class SdsInput {
|
|
|
321
324
|
shape = input('control', ...(ngDevMode ? [{ debugName: "shape" }] : []));
|
|
322
325
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
323
326
|
clearable = input(false, ...(ngDevMode ? [{ debugName: "clearable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
327
|
+
/**
|
|
328
|
+
* The native `autocomplete` token (`name`, `tel`, `email`, `new-password`, `one-time-code`…). Empty
|
|
329
|
+
* leaves the browser's default. Checkout and sign-up fields need it: browsers autofill from it, and
|
|
330
|
+
* password managers only offer a generated password for `new-password`.
|
|
331
|
+
*/
|
|
332
|
+
autocomplete = input('', ...(ngDevMode ? [{ debugName: "autocomplete" }] : []));
|
|
333
|
+
/** Hard character cap on the native field; 0 means no limit. */
|
|
334
|
+
maxLength = input(0, ...(ngDevMode ? [{ debugName: "maxLength", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
324
335
|
/**
|
|
325
336
|
* Accessible name for the clear button. French default so existing consumers are unchanged, but an
|
|
326
337
|
* app serving more than one language MUST translate it — it is an icon-only control, so this string
|
|
@@ -421,7 +432,7 @@ class SdsInput {
|
|
|
421
432
|
this.onTouched();
|
|
422
433
|
}
|
|
423
434
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsInput, isStandalone: true, selector: "sds-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, leadingIcon: { classPropertyName: "leadingIcon", publicName: "leadingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingAction: { classPropertyName: "trailingAction", publicName: "trailingAction", isSignal: true, isRequired: false, transformFunction: null }, trailingActionLabel: { classPropertyName: "trailingActionLabel", publicName: "trailingActionLabel", isSignal: true, isRequired: false, transformFunction: null }, trailingActionPressed: { classPropertyName: "trailingActionPressed", publicName: "trailingActionPressed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { trailingActionClick: "trailingActionClick" }, host: { classAttribute: "block" }, providers: [
|
|
435
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsInput, isStandalone: true, selector: "sds-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, leadingIcon: { classPropertyName: "leadingIcon", publicName: "leadingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingAction: { classPropertyName: "trailingAction", publicName: "trailingAction", isSignal: true, isRequired: false, transformFunction: null }, trailingActionLabel: { classPropertyName: "trailingActionLabel", publicName: "trailingActionLabel", isSignal: true, isRequired: false, transformFunction: null }, trailingActionPressed: { classPropertyName: "trailingActionPressed", publicName: "trailingActionPressed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { trailingActionClick: "trailingActionClick" }, host: { classAttribute: "block" }, providers: [
|
|
425
436
|
{
|
|
426
437
|
provide: NG_VALUE_ACCESSOR,
|
|
427
438
|
useExisting: forwardRef(() => SdsInput),
|
|
@@ -459,6 +470,8 @@ class SdsInput {
|
|
|
459
470
|
[placeholder]="placeholder()"
|
|
460
471
|
[disabled]="isDisabled()"
|
|
461
472
|
[value]="value()"
|
|
473
|
+
[attr.autocomplete]="autocomplete() || null"
|
|
474
|
+
[attr.maxlength]="maxLength() || null"
|
|
462
475
|
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
463
476
|
[attr.aria-invalid]="error() ? 'true' : null"
|
|
464
477
|
[attr.aria-describedby]="describedBy()"
|
|
@@ -556,6 +569,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
556
569
|
[placeholder]="placeholder()"
|
|
557
570
|
[disabled]="isDisabled()"
|
|
558
571
|
[value]="value()"
|
|
572
|
+
[attr.autocomplete]="autocomplete() || null"
|
|
573
|
+
[attr.maxlength]="maxLength() || null"
|
|
559
574
|
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
560
575
|
[attr.aria-invalid]="error() ? 'true' : null"
|
|
561
576
|
[attr.aria-describedby]="describedBy()"
|
|
@@ -612,9 +627,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
612
627
|
</p>
|
|
613
628
|
}
|
|
614
629
|
`, styles: ["input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 100000s ease-in-out 0s;-webkit-text-fill-color:currentColor;caret-color:currentColor}\n"] }]
|
|
615
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], leadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIcon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], trailingAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingAction", required: false }] }], trailingActionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActionLabel", required: false }] }], trailingActionPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActionPressed", required: false }] }], trailingActionClick: [{ type: i0.Output, args: ["trailingActionClick"] }] } });
|
|
630
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], leadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIcon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], trailingAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingAction", required: false }] }], trailingActionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActionLabel", required: false }] }], trailingActionPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActionPressed", required: false }] }], trailingActionClick: [{ type: i0.Output, args: ["trailingActionClick"] }] } });
|
|
616
631
|
|
|
617
|
-
let nextId$
|
|
632
|
+
let nextId$e = 0;
|
|
618
633
|
const HEIGHTS = {
|
|
619
634
|
sm: 'h-9',
|
|
620
635
|
md: 'h-10',
|
|
@@ -637,7 +652,7 @@ const TEXT = {
|
|
|
637
652
|
* {@link min}/{@link max} on blur and on every spinner step; ArrowUp / ArrowDown also step it.
|
|
638
653
|
*/
|
|
639
654
|
class SdsInputNumber {
|
|
640
|
-
inputId = `sds-input-number-${nextId$
|
|
655
|
+
inputId = `sds-input-number-${nextId$e++}`;
|
|
641
656
|
fieldRef = viewChild('field', ...(ngDevMode ? [{ debugName: "fieldRef" }] : []));
|
|
642
657
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
643
658
|
/** Accessible name used when no visible [label] is provided. */
|
|
@@ -1344,7 +1359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1344
1359
|
}]
|
|
1345
1360
|
}], ctorParameters: () => [], propDecorators: { fieldRef: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], currencyDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyDisplay", required: false }] }], useGrouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "useGrouping", required: false }] }], minFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minFractionDigits", required: false }] }], maxFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFractionDigits", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], showButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtons", required: false }] }], buttonLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonLayout", required: false }] }], incrementIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementIcon", required: false }] }], decrementIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementIcon", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], incrementLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementLabel", required: false }] }], decrementLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementLabel", required: false }] }] } });
|
|
1346
1361
|
|
|
1347
|
-
let nextId$
|
|
1362
|
+
let nextId$d = 0;
|
|
1348
1363
|
const SIZES$9 = {
|
|
1349
1364
|
sm: 'min-h-9 text-sm',
|
|
1350
1365
|
md: 'min-h-10 text-sm',
|
|
@@ -1364,7 +1379,7 @@ const SIZES$9 = {
|
|
|
1364
1379
|
* `<sds-localized-input [languages]="['fr','nl','en']" [(ngModel)]="title" />`.
|
|
1365
1380
|
*/
|
|
1366
1381
|
class SdsLocalizedInput {
|
|
1367
|
-
inputId = `sds-localized-input-${nextId$
|
|
1382
|
+
inputId = `sds-localized-input-${nextId$d++}`;
|
|
1368
1383
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1369
1384
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
1370
1385
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
@@ -1620,7 +1635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1620
1635
|
}]
|
|
1621
1636
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], languages: [{ type: i0.Input, args: [{ isSignal: true, alias: "languages", required: false }] }], currentLanguage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentLanguage", required: false }] }], multiline: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiline", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], languageSwitcherLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "languageSwitcherLabel", required: false }] }], untranslatedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "untranslatedLabel", required: false }] }] } });
|
|
1622
1637
|
|
|
1623
|
-
let nextId$
|
|
1638
|
+
let nextId$c = 0;
|
|
1624
1639
|
const SIZES$8 = {
|
|
1625
1640
|
md: 'h-12 w-11 text-lg',
|
|
1626
1641
|
lg: 'h-14 w-12 text-xl',
|
|
@@ -1637,7 +1652,7 @@ const SIZES$8 = {
|
|
|
1637
1652
|
* first box and have it land correctly.
|
|
1638
1653
|
*/
|
|
1639
1654
|
class SdsOtpInput {
|
|
1640
|
-
groupId = `sds-otp-${nextId$
|
|
1655
|
+
groupId = `sds-otp-${nextId$c++}`;
|
|
1641
1656
|
/** How many boxes / characters the code has. */
|
|
1642
1657
|
length = input(6, ...(ngDevMode ? [{ debugName: "length", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
1643
1658
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
@@ -1937,7 +1952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1937
1952
|
}]
|
|
1938
1953
|
}], ctorParameters: () => [], propDecorators: { length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputMode", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], cellLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellLabel", required: false }] }], completed: [{ type: i0.Output, args: ["completed"] }], cells: [{ type: i0.ViewChildren, args: ['cell', { isSignal: true }] }] } });
|
|
1939
1954
|
|
|
1940
|
-
let nextId$
|
|
1955
|
+
let nextId$b = 0;
|
|
1941
1956
|
const SIZES$7 = {
|
|
1942
1957
|
sm: 'text-sm px-3 py-2',
|
|
1943
1958
|
md: 'text-sm px-3.5 py-2.5',
|
|
@@ -1949,7 +1964,7 @@ const SIZES$7 = {
|
|
|
1949
1964
|
* [(ngModel)].
|
|
1950
1965
|
*/
|
|
1951
1966
|
class SdsTextarea {
|
|
1952
|
-
fieldId = `sds-textarea-${nextId$
|
|
1967
|
+
fieldId = `sds-textarea-${nextId$b++}`;
|
|
1953
1968
|
field = viewChild('field', ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1954
1969
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1955
1970
|
/** Accessible name used when no visible [label] is provided. */
|
|
@@ -1958,6 +1973,11 @@ class SdsTextarea {
|
|
|
1958
1973
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
1959
1974
|
error = input('', ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1960
1975
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
1976
|
+
/**
|
|
1977
|
+
* `filled` is a borderless field on a muted ground — the textarea counterpart of `sds-input`'s
|
|
1978
|
+
* `filled`, so a form that uses filled inputs keeps one look down to its notes field.
|
|
1979
|
+
*/
|
|
1980
|
+
appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
1961
1981
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1962
1982
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1963
1983
|
required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
@@ -1992,14 +2012,24 @@ class SdsTextarea {
|
|
|
1992
2012
|
}, ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
|
|
1993
2013
|
fieldClasses = computed(() => {
|
|
1994
2014
|
const parts = [
|
|
1995
|
-
'block w-full rounded-control border
|
|
2015
|
+
'block w-full rounded-control border text-ink outline-none transition-colors placeholder:text-ink-faint',
|
|
1996
2016
|
SIZES$7[this.size()],
|
|
1997
2017
|
];
|
|
1998
2018
|
if (this.autoResize())
|
|
1999
2019
|
parts.push('overflow-hidden');
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2020
|
+
if (this.appearance() === 'filled') {
|
|
2021
|
+
// border-transparent, not border-0, for the same reason as sds-input's filled: one box model.
|
|
2022
|
+
parts.push('bg-muted');
|
|
2023
|
+
parts.push(this.error()
|
|
2024
|
+
? 'border-danger focus:ring-2 focus:ring-danger/30'
|
|
2025
|
+
: 'border-transparent focus:ring-2 focus:ring-brand-500/25');
|
|
2026
|
+
}
|
|
2027
|
+
else {
|
|
2028
|
+
parts.push('bg-surface');
|
|
2029
|
+
parts.push(this.error()
|
|
2030
|
+
? 'border-danger focus:border-danger focus:ring-2 focus:ring-danger/25'
|
|
2031
|
+
: 'border-border focus:border-brand-500 focus:ring-2 focus:ring-brand-500/25');
|
|
2032
|
+
}
|
|
2003
2033
|
if (this.isDisabled())
|
|
2004
2034
|
parts.push('opacity-60 cursor-not-allowed');
|
|
2005
2035
|
return parts.join(' ');
|
|
@@ -2046,7 +2076,7 @@ class SdsTextarea {
|
|
|
2046
2076
|
el.style.height = `${el.scrollHeight}px`;
|
|
2047
2077
|
}
|
|
2048
2078
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTextarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2049
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsTextarea, isStandalone: true, selector: "sds-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showCount: { classPropertyName: "showCount", publicName: "showCount", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, providers: [
|
|
2079
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsTextarea, isStandalone: true, selector: "sds-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showCount: { classPropertyName: "showCount", publicName: "showCount", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, providers: [
|
|
2050
2080
|
{
|
|
2051
2081
|
provide: NG_VALUE_ACCESSOR,
|
|
2052
2082
|
useExisting: forwardRef(() => SdsTextarea),
|
|
@@ -2185,9 +2215,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2185
2215
|
}
|
|
2186
2216
|
`,
|
|
2187
2217
|
}]
|
|
2188
|
-
}], ctorParameters: () => [], propDecorators: { field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], showCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCount", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }] } });
|
|
2218
|
+
}], ctorParameters: () => [], propDecorators: { field: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], showCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCount", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }] } });
|
|
2189
2219
|
|
|
2190
|
-
let nextId$
|
|
2220
|
+
let nextId$a = 0;
|
|
2191
2221
|
const SIZES$6 = {
|
|
2192
2222
|
sm: { track: 'h-5 w-9', knob: 'h-4 w-4', on: 'translate-x-4', icon: 11 },
|
|
2193
2223
|
md: { track: 'h-6 w-11', knob: 'h-5 w-5', on: 'translate-x-5', icon: 13 },
|
|
@@ -2200,7 +2230,7 @@ const SIZES$6 = {
|
|
|
2200
2230
|
* states.
|
|
2201
2231
|
*/
|
|
2202
2232
|
class SdsToggleSwitch {
|
|
2203
|
-
fieldId = `sds-toggle-switch-${nextId$
|
|
2233
|
+
fieldId = `sds-toggle-switch-${nextId$a++}`;
|
|
2204
2234
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
2205
2235
|
/** Accessible name used when no visible [label] is provided. */
|
|
2206
2236
|
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
@@ -2236,14 +2266,21 @@ class SdsToggleSwitch {
|
|
|
2236
2266
|
return `${this.fieldId}-hint`;
|
|
2237
2267
|
return null;
|
|
2238
2268
|
}, ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
|
|
2269
|
+
/**
|
|
2270
|
+
* On/off must read at a glance in both modes. In light mode the brand track against a pale grey one does
|
|
2271
|
+
* it. In dark mode a monochrome brand's 600 step is a mid-dark grey, as dim as the off track, so there
|
|
2272
|
+
* "on" flips to a light track with a dark knob and "off" keeps a dim track with a muted knob. `ink` (not
|
|
2273
|
+
* black) tints the off track so it stays visible on dark surfaces too.
|
|
2274
|
+
*/
|
|
2239
2275
|
trackClasses = computed(() => {
|
|
2240
2276
|
const parts = [this.sizing().track];
|
|
2241
|
-
parts.push(this.checked() ? 'bg-brand-600' : 'bg-
|
|
2277
|
+
parts.push(this.checked() ? 'bg-brand-600 dark:bg-ink' : 'bg-ink/15');
|
|
2242
2278
|
return parts.join(' ');
|
|
2243
2279
|
}, ...(ngDevMode ? [{ debugName: "trackClasses" }] : []));
|
|
2244
2280
|
knobClasses = computed(() => {
|
|
2245
2281
|
const parts = [this.sizing().knob];
|
|
2246
2282
|
parts.push(this.checked() ? this.sizing().on : 'translate-x-0.5');
|
|
2283
|
+
parts.push(this.checked() ? 'bg-white dark:bg-surface' : 'bg-white dark:bg-ink-soft');
|
|
2247
2284
|
return parts.join(' ');
|
|
2248
2285
|
}, ...(ngDevMode ? [{ debugName: "knobClasses" }] : []));
|
|
2249
2286
|
constructor() {
|
|
@@ -2316,20 +2353,20 @@ class SdsToggleSwitch {
|
|
|
2316
2353
|
(keydown.space)="onSpace($event)"
|
|
2317
2354
|
>
|
|
2318
2355
|
<span
|
|
2319
|
-
class="pointer-events-none inline-flex items-center justify-center rounded-full
|
|
2356
|
+
class="pointer-events-none inline-flex items-center justify-center rounded-full shadow-sm transition-[transform,background-color]"
|
|
2320
2357
|
[class]="knobClasses()"
|
|
2321
2358
|
>
|
|
2322
2359
|
@if (checked() && onIcon()) {
|
|
2323
2360
|
<sds-icon
|
|
2324
2361
|
[name]="onIcon()!"
|
|
2325
2362
|
[size]="sizing().icon"
|
|
2326
|
-
class="text-brand-600"
|
|
2363
|
+
class="text-brand-600 dark:text-ink"
|
|
2327
2364
|
/>
|
|
2328
2365
|
} @else if (!checked() && offIcon()) {
|
|
2329
2366
|
<sds-icon
|
|
2330
2367
|
[name]="offIcon()!"
|
|
2331
2368
|
[size]="sizing().icon"
|
|
2332
|
-
class="text-ink-faint"
|
|
2369
|
+
class="text-ink-faint dark:text-surface"
|
|
2333
2370
|
/>
|
|
2334
2371
|
}
|
|
2335
2372
|
</span>
|
|
@@ -2392,20 +2429,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2392
2429
|
(keydown.space)="onSpace($event)"
|
|
2393
2430
|
>
|
|
2394
2431
|
<span
|
|
2395
|
-
class="pointer-events-none inline-flex items-center justify-center rounded-full
|
|
2432
|
+
class="pointer-events-none inline-flex items-center justify-center rounded-full shadow-sm transition-[transform,background-color]"
|
|
2396
2433
|
[class]="knobClasses()"
|
|
2397
2434
|
>
|
|
2398
2435
|
@if (checked() && onIcon()) {
|
|
2399
2436
|
<sds-icon
|
|
2400
2437
|
[name]="onIcon()!"
|
|
2401
2438
|
[size]="sizing().icon"
|
|
2402
|
-
class="text-brand-600"
|
|
2439
|
+
class="text-brand-600 dark:text-ink"
|
|
2403
2440
|
/>
|
|
2404
2441
|
} @else if (!checked() && offIcon()) {
|
|
2405
2442
|
<sds-icon
|
|
2406
2443
|
[name]="offIcon()!"
|
|
2407
2444
|
[size]="sizing().icon"
|
|
2408
|
-
class="text-ink-faint"
|
|
2445
|
+
class="text-ink-faint dark:text-surface"
|
|
2409
2446
|
/>
|
|
2410
2447
|
}
|
|
2411
2448
|
</span>
|
|
@@ -2437,17 +2474,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2437
2474
|
}]
|
|
2438
2475
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], trueValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "trueValue", required: false }] }], falseValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "falseValue", required: false }] }], onIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "onIcon", required: false }] }], offIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "offIcon", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }] } });
|
|
2439
2476
|
|
|
2440
|
-
let nextId$
|
|
2477
|
+
let nextId$9 = 0;
|
|
2441
2478
|
/**
|
|
2442
2479
|
* Boolean checkbox. Implements ControlValueAccessor — use with reactive forms
|
|
2443
2480
|
* or `[(ngModel)]`. Renders a styled box (brand-filled with a check when on)
|
|
2444
|
-
* and an optional inline label.
|
|
2481
|
+
* and an optional inline label. Without a visible `label` it renders no `<label>`
|
|
2482
|
+
* of its own, so it can sit inside the consumer's `<label>` (a whole clickable
|
|
2483
|
+
* row), whose text then names it.
|
|
2445
2484
|
*
|
|
2446
2485
|
* @example
|
|
2447
2486
|
* <sds-checkbox label="Fusion automatique" [(ngModel)]="autoMerge" />
|
|
2448
2487
|
*/
|
|
2449
2488
|
class SdsCheckbox {
|
|
2450
|
-
id = `sds-checkbox-${nextId$
|
|
2489
|
+
id = `sds-checkbox-${nextId$9++}`;
|
|
2451
2490
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
2452
2491
|
/** Accessible name used when no visible [label] is provided. */
|
|
2453
2492
|
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
@@ -2457,6 +2496,7 @@ class SdsCheckbox {
|
|
|
2457
2496
|
cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : []));
|
|
2458
2497
|
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
2459
2498
|
iconSize = computed(() => (this.size() === 'sm' ? 11 : 13), ...(ngDevMode ? [{ debugName: "iconSize" }] : []));
|
|
2499
|
+
stateClasses = computed(() => this.isDisabled() ? 'cursor-not-allowed opacity-60' : 'cursor-pointer', ...(ngDevMode ? [{ debugName: "stateClasses" }] : []));
|
|
2460
2500
|
boxClasses = computed(() => {
|
|
2461
2501
|
const size = this.size() === 'sm' ? 'h-4 w-4' : 'h-5 w-5';
|
|
2462
2502
|
const state = this.checked()
|
|
@@ -2493,10 +2533,20 @@ class SdsCheckbox {
|
|
|
2493
2533
|
multi: true,
|
|
2494
2534
|
},
|
|
2495
2535
|
], ngImport: i0, template: `
|
|
2496
|
-
<label
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2536
|
+
<!-- With a visible label the whole thing is a <label>. Without one it is a plain span, so the box can
|
|
2537
|
+
sit inside the consumer's own <label> (a clickable row, say) without nesting labels. -->
|
|
2538
|
+
@if (label()) {
|
|
2539
|
+
<label class="inline-flex select-none items-center gap-2" [class]="stateClasses()">
|
|
2540
|
+
<ng-container [ngTemplateOutlet]="box" />
|
|
2541
|
+
<span class="text-sm text-ink">{{ label() }}</span>
|
|
2542
|
+
</label>
|
|
2543
|
+
} @else {
|
|
2544
|
+
<span class="inline-flex select-none items-center" [class]="stateClasses()">
|
|
2545
|
+
<ng-container [ngTemplateOutlet]="box" />
|
|
2546
|
+
</span>
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
<ng-template #box>
|
|
2500
2550
|
<span
|
|
2501
2551
|
class="relative inline-flex shrink-0 items-center justify-center rounded-control border transition-colors"
|
|
2502
2552
|
[class]="boxClasses()"
|
|
@@ -2515,18 +2565,15 @@ class SdsCheckbox {
|
|
|
2515
2565
|
<sds-icon name="check" [size]="iconSize()" [strokeWidth]="3" />
|
|
2516
2566
|
}
|
|
2517
2567
|
</span>
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
}
|
|
2521
|
-
</label>
|
|
2522
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2568
|
+
</ng-template>
|
|
2569
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2523
2570
|
}
|
|
2524
2571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsCheckbox, decorators: [{
|
|
2525
2572
|
type: Component,
|
|
2526
2573
|
args: [{
|
|
2527
2574
|
selector: 'sds-checkbox',
|
|
2528
2575
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2529
|
-
imports: [SdsIcon],
|
|
2576
|
+
imports: [SdsIcon, NgTemplateOutlet],
|
|
2530
2577
|
providers: [
|
|
2531
2578
|
{
|
|
2532
2579
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -2536,10 +2583,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2536
2583
|
],
|
|
2537
2584
|
host: { class: 'inline-flex' },
|
|
2538
2585
|
template: `
|
|
2539
|
-
<label
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2586
|
+
<!-- With a visible label the whole thing is a <label>. Without one it is a plain span, so the box can
|
|
2587
|
+
sit inside the consumer's own <label> (a clickable row, say) without nesting labels. -->
|
|
2588
|
+
@if (label()) {
|
|
2589
|
+
<label class="inline-flex select-none items-center gap-2" [class]="stateClasses()">
|
|
2590
|
+
<ng-container [ngTemplateOutlet]="box" />
|
|
2591
|
+
<span class="text-sm text-ink">{{ label() }}</span>
|
|
2592
|
+
</label>
|
|
2593
|
+
} @else {
|
|
2594
|
+
<span class="inline-flex select-none items-center" [class]="stateClasses()">
|
|
2595
|
+
<ng-container [ngTemplateOutlet]="box" />
|
|
2596
|
+
</span>
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
<ng-template #box>
|
|
2543
2600
|
<span
|
|
2544
2601
|
class="relative inline-flex shrink-0 items-center justify-center rounded-control border transition-colors"
|
|
2545
2602
|
[class]="boxClasses()"
|
|
@@ -2558,14 +2615,214 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2558
2615
|
<sds-icon name="check" [size]="iconSize()" [strokeWidth]="3" />
|
|
2559
2616
|
}
|
|
2560
2617
|
</span>
|
|
2561
|
-
|
|
2562
|
-
<span class="text-sm text-ink">{{ label() }}</span>
|
|
2563
|
-
}
|
|
2564
|
-
</label>
|
|
2618
|
+
</ng-template>
|
|
2565
2619
|
`,
|
|
2566
2620
|
}]
|
|
2567
2621
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
2568
2622
|
|
|
2623
|
+
let nextId$8 = 0;
|
|
2624
|
+
/**
|
|
2625
|
+
* Mounted radios by group name. A pick updates the rest of its group, because a native radio says
|
|
2626
|
+
* nothing when the browser unchecks it — without this a reactive form would leave the old choice drawn.
|
|
2627
|
+
*/
|
|
2628
|
+
const groups = new Map();
|
|
2629
|
+
/**
|
|
2630
|
+
* One option of a single-choice group: a styled circle (brand-filled with a dot when on) over a native
|
|
2631
|
+
* radio input, so grouping and keyboard behaviour stay the browser's — radios that share a `name`
|
|
2632
|
+
* move with the arrow keys and only one of them is on.
|
|
2633
|
+
*
|
|
2634
|
+
* Two ways to bind it:
|
|
2635
|
+
* - with forms: every radio of the group gets the same `[(ngModel)]` / `formControlName`, the same
|
|
2636
|
+
* `name` and its own `[value]`; the control holds the value of the selected radio
|
|
2637
|
+
* (ControlValueAccessor, like a native radio);
|
|
2638
|
+
* - without forms: drive `[checked]` yourself and update it from `(selected)`, which emits this radio's
|
|
2639
|
+
* value when the user picks it.
|
|
2640
|
+
*
|
|
2641
|
+
* Like `sds-checkbox`, without a visible `label` it renders no `<label>` of its own, so it can sit
|
|
2642
|
+
* inside the consumer's `<label>` (a whole clickable row), whose text then names it.
|
|
2643
|
+
*
|
|
2644
|
+
* @example
|
|
2645
|
+
* <sds-radio name="size" value="small" label="Petit" [(ngModel)]="size" />
|
|
2646
|
+
* <sds-radio name="size" value="large" label="Grand" [(ngModel)]="size" />
|
|
2647
|
+
*/
|
|
2648
|
+
class SdsRadio {
|
|
2649
|
+
id = `sds-radio-${nextId$8++}`;
|
|
2650
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
2651
|
+
/** Accessible name used when no visible [label] is provided. */
|
|
2652
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
2653
|
+
/** The group's name, shared by all its radios (native grouping, arrow keys, and form syncing). */
|
|
2654
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
2655
|
+
/** What this option stands for: a form control bound to the group holds it while this radio is on. */
|
|
2656
|
+
value = input(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
2657
|
+
/** On/off when used without forms. Ignored once a form control is bound. */
|
|
2658
|
+
checked = input(false, ...(ngDevMode ? [{ debugName: "checked", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
2659
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
2660
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
2661
|
+
/** Emits this radio's value when the user picks it. */
|
|
2662
|
+
selected = output();
|
|
2663
|
+
/** The group's current value, once a form control is bound (see {@link registerOnChange}). */
|
|
2664
|
+
modelValue = signal(undefined, ...(ngDevMode ? [{ debugName: "modelValue" }] : []));
|
|
2665
|
+
formBound = signal(false, ...(ngDevMode ? [{ debugName: "formBound" }] : []));
|
|
2666
|
+
cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : []));
|
|
2667
|
+
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
2668
|
+
isChecked = computed(() => this.formBound() ? Object.is(this.modelValue(), this.value()) : this.checked(), ...(ngDevMode ? [{ debugName: "isChecked" }] : []));
|
|
2669
|
+
stateClasses = computed(() => this.isDisabled() ? 'cursor-not-allowed opacity-60' : 'cursor-pointer', ...(ngDevMode ? [{ debugName: "stateClasses" }] : []));
|
|
2670
|
+
circleClasses = computed(() => {
|
|
2671
|
+
const size = this.size() === 'sm' ? 'h-4 w-4' : 'h-5 w-5';
|
|
2672
|
+
const state = this.isChecked() ? 'border-brand-600 bg-brand-600' : 'border-border bg-surface';
|
|
2673
|
+
const focus = 'focus-within:ring-2 focus-within:ring-brand-500/30 focus-within:border-brand-500';
|
|
2674
|
+
return `${size} ${state} ${focus}`;
|
|
2675
|
+
}, ...(ngDevMode ? [{ debugName: "circleClasses" }] : []));
|
|
2676
|
+
dotClasses = computed(() => this.size() === 'sm' ? 'h-1.5 w-1.5' : 'h-2 w-2', ...(ngDevMode ? [{ debugName: "dotClasses" }] : []));
|
|
2677
|
+
constructor() {
|
|
2678
|
+
effect((onCleanup) => {
|
|
2679
|
+
const name = this.name();
|
|
2680
|
+
if (!name) {
|
|
2681
|
+
return;
|
|
2682
|
+
}
|
|
2683
|
+
let group = groups.get(name);
|
|
2684
|
+
if (!group) {
|
|
2685
|
+
group = new Set();
|
|
2686
|
+
groups.set(name, group);
|
|
2687
|
+
}
|
|
2688
|
+
group.add(this);
|
|
2689
|
+
onCleanup(() => {
|
|
2690
|
+
group.delete(this);
|
|
2691
|
+
if (group.size === 0) {
|
|
2692
|
+
groups.delete(name);
|
|
2693
|
+
}
|
|
2694
|
+
});
|
|
2695
|
+
});
|
|
2696
|
+
}
|
|
2697
|
+
// --- ControlValueAccessor -------------------------------------------------
|
|
2698
|
+
onChange = () => { };
|
|
2699
|
+
onTouched = () => { };
|
|
2700
|
+
writeValue(value) {
|
|
2701
|
+
this.modelValue.set(value);
|
|
2702
|
+
}
|
|
2703
|
+
registerOnChange(fn) {
|
|
2704
|
+
this.onChange = fn;
|
|
2705
|
+
this.formBound.set(true);
|
|
2706
|
+
}
|
|
2707
|
+
registerOnTouched(fn) {
|
|
2708
|
+
this.onTouched = fn;
|
|
2709
|
+
}
|
|
2710
|
+
setDisabledState(isDisabled) {
|
|
2711
|
+
this.cvaDisabled.set(isDisabled);
|
|
2712
|
+
}
|
|
2713
|
+
/** A native radio only fires `change` when it turns on. */
|
|
2714
|
+
onPick() {
|
|
2715
|
+
const value = this.value();
|
|
2716
|
+
if (this.formBound()) {
|
|
2717
|
+
const name = this.name();
|
|
2718
|
+
for (const radio of (name && groups.get(name)) || [this]) {
|
|
2719
|
+
radio.modelValue.set(value);
|
|
2720
|
+
}
|
|
2721
|
+
this.onChange(value);
|
|
2722
|
+
}
|
|
2723
|
+
this.selected.emit(value);
|
|
2724
|
+
}
|
|
2725
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2726
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsRadio, isStandalone: true, selector: "sds-radio", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { classAttribute: "inline-flex" }, providers: [
|
|
2727
|
+
{
|
|
2728
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2729
|
+
useExisting: forwardRef(() => SdsRadio),
|
|
2730
|
+
multi: true,
|
|
2731
|
+
},
|
|
2732
|
+
], ngImport: i0, template: `
|
|
2733
|
+
@if (label()) {
|
|
2734
|
+
<label class="inline-flex select-none items-center gap-2" [class]="stateClasses()">
|
|
2735
|
+
<ng-container [ngTemplateOutlet]="circle" />
|
|
2736
|
+
<span class="text-sm text-ink">{{ label() }}</span>
|
|
2737
|
+
</label>
|
|
2738
|
+
} @else {
|
|
2739
|
+
<span class="inline-flex select-none items-center" [class]="stateClasses()">
|
|
2740
|
+
<ng-container [ngTemplateOutlet]="circle" />
|
|
2741
|
+
</span>
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
<ng-template #circle>
|
|
2745
|
+
<span
|
|
2746
|
+
class="relative inline-flex shrink-0 items-center justify-center rounded-full border transition-colors"
|
|
2747
|
+
[class]="circleClasses()"
|
|
2748
|
+
>
|
|
2749
|
+
<input
|
|
2750
|
+
type="radio"
|
|
2751
|
+
class="absolute inset-0 m-0 cursor-[inherit] opacity-0"
|
|
2752
|
+
[id]="id"
|
|
2753
|
+
[attr.name]="name() || null"
|
|
2754
|
+
[checked]="isChecked()"
|
|
2755
|
+
[disabled]="isDisabled()"
|
|
2756
|
+
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
2757
|
+
(change)="onPick()"
|
|
2758
|
+
(blur)="onTouched()"
|
|
2759
|
+
/>
|
|
2760
|
+
@if (isChecked()) {
|
|
2761
|
+
<span
|
|
2762
|
+
class="pointer-events-none rounded-full bg-white"
|
|
2763
|
+
[class]="dotClasses()"
|
|
2764
|
+
aria-hidden="true"
|
|
2765
|
+
></span>
|
|
2766
|
+
}
|
|
2767
|
+
</span>
|
|
2768
|
+
</ng-template>
|
|
2769
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2770
|
+
}
|
|
2771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsRadio, decorators: [{
|
|
2772
|
+
type: Component,
|
|
2773
|
+
args: [{
|
|
2774
|
+
selector: 'sds-radio',
|
|
2775
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2776
|
+
imports: [NgTemplateOutlet],
|
|
2777
|
+
providers: [
|
|
2778
|
+
{
|
|
2779
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2780
|
+
useExisting: forwardRef(() => SdsRadio),
|
|
2781
|
+
multi: true,
|
|
2782
|
+
},
|
|
2783
|
+
],
|
|
2784
|
+
host: { class: 'inline-flex' },
|
|
2785
|
+
template: `
|
|
2786
|
+
@if (label()) {
|
|
2787
|
+
<label class="inline-flex select-none items-center gap-2" [class]="stateClasses()">
|
|
2788
|
+
<ng-container [ngTemplateOutlet]="circle" />
|
|
2789
|
+
<span class="text-sm text-ink">{{ label() }}</span>
|
|
2790
|
+
</label>
|
|
2791
|
+
} @else {
|
|
2792
|
+
<span class="inline-flex select-none items-center" [class]="stateClasses()">
|
|
2793
|
+
<ng-container [ngTemplateOutlet]="circle" />
|
|
2794
|
+
</span>
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
<ng-template #circle>
|
|
2798
|
+
<span
|
|
2799
|
+
class="relative inline-flex shrink-0 items-center justify-center rounded-full border transition-colors"
|
|
2800
|
+
[class]="circleClasses()"
|
|
2801
|
+
>
|
|
2802
|
+
<input
|
|
2803
|
+
type="radio"
|
|
2804
|
+
class="absolute inset-0 m-0 cursor-[inherit] opacity-0"
|
|
2805
|
+
[id]="id"
|
|
2806
|
+
[attr.name]="name() || null"
|
|
2807
|
+
[checked]="isChecked()"
|
|
2808
|
+
[disabled]="isDisabled()"
|
|
2809
|
+
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
2810
|
+
(change)="onPick()"
|
|
2811
|
+
(blur)="onTouched()"
|
|
2812
|
+
/>
|
|
2813
|
+
@if (isChecked()) {
|
|
2814
|
+
<span
|
|
2815
|
+
class="pointer-events-none rounded-full bg-white"
|
|
2816
|
+
[class]="dotClasses()"
|
|
2817
|
+
aria-hidden="true"
|
|
2818
|
+
></span>
|
|
2819
|
+
}
|
|
2820
|
+
</span>
|
|
2821
|
+
</ng-template>
|
|
2822
|
+
`,
|
|
2823
|
+
}]
|
|
2824
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
2825
|
+
|
|
2569
2826
|
const STATUS_COLOR = {
|
|
2570
2827
|
online: 'bg-success',
|
|
2571
2828
|
offline: 'bg-ink-faint',
|
|
@@ -9334,6 +9591,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9334
9591
|
* for the slow drifting brand blobs behind the page. Both read the brand ramp, so they follow the active
|
|
9335
9592
|
* theme and dark mode, and the decorations respect prefers-reduced-motion.
|
|
9336
9593
|
*
|
|
9594
|
+
* Page overlays (drawers, dialogs) can be rendered anywhere in the page: `<main>` is not a stacking
|
|
9595
|
+
* context, so a `fixed` overlay with a z-index above the top bar's (z-30) covers the top bar too.
|
|
9596
|
+
*
|
|
9337
9597
|
* @example
|
|
9338
9598
|
* <sds-shell background="gradient" decorations>
|
|
9339
9599
|
* <sds-topbar appearance="glass" sdsTopbar … />
|
|
@@ -9345,27 +9605,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9345
9605
|
class SdsShell {
|
|
9346
9606
|
/** `plain` flat canvas (default) or a soft brand-tinted `gradient` wash. */
|
|
9347
9607
|
background = input('plain', ...(ngDevMode ? [{ debugName: "background" }] : []));
|
|
9348
|
-
/** Add slow-drifting brand-tinted blobs behind the page content (opt-in). */
|
|
9608
|
+
/** Add slow-drifting brand-tinted blobs behind the page content (opt-in). They stay in place while the page scrolls. */
|
|
9349
9609
|
decorations = input(false, ...(ngDevMode ? [{ debugName: "decorations", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
9350
|
-
|
|
9610
|
+
areaClass = computed(() => this.background() === 'gradient'
|
|
9351
9611
|
? 'bg-linear-to-br from-brand-50/50 via-canvas to-brand-100/40'
|
|
9352
|
-
: 'bg-canvas', ...(ngDevMode ? [{ debugName: "
|
|
9612
|
+
: 'bg-canvas', ...(ngDevMode ? [{ debugName: "areaClass" }] : []));
|
|
9353
9613
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsShell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9354
9614
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsShell, isStandalone: true, selector: "sds-shell", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, decorations: { classPropertyName: "decorations", publicName: "decorations", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
9355
9615
|
<div class="flex h-screen flex-col overflow-hidden">
|
|
9356
9616
|
<ng-content select="[sdsTopbar]" />
|
|
9357
9617
|
<div class="flex min-h-0 flex-1">
|
|
9358
9618
|
<ng-content select="[sdsSidebar]" />
|
|
9359
|
-
|
|
9619
|
+
<!--
|
|
9620
|
+
The content area carries the background and the ambient blobs; the scrolling <main> sits on top,
|
|
9621
|
+
transparent. <main> is positioned but never a stacking context (no isolate, no z-index): one would
|
|
9622
|
+
trap a page's own overlays — drawers, dialogs, fixed popovers — under the top bar (z-30) however
|
|
9623
|
+
high their z-index. Same pattern as the top bar and sidebar decorations: the blob layer comes first
|
|
9624
|
+
with no z-index, so the positioned <main> after it paints above it.
|
|
9625
|
+
-->
|
|
9626
|
+
<div class="relative flex min-w-0 flex-1" [class]="areaClass()">
|
|
9360
9627
|
@if (decorations()) {
|
|
9361
|
-
<div class="pointer-events-none absolute inset-0
|
|
9628
|
+
<div class="pointer-events-none absolute inset-0 overflow-hidden" aria-hidden="true">
|
|
9362
9629
|
<div class="absolute -left-32 top-10 h-96 w-96 rounded-full bg-brand-300/15 blur-3xl animate-sds-ambient"></div>
|
|
9363
9630
|
<div class="absolute -right-40 top-1/3 h-[28rem] w-[28rem] rounded-full bg-brand-400/12 blur-3xl animate-sds-ambient [animation-delay:4s]"></div>
|
|
9364
9631
|
<div class="absolute bottom-10 left-1/4 h-80 w-80 rounded-full bg-brand-200/20 blur-3xl animate-sds-ambient [animation-delay:7s]"></div>
|
|
9365
9632
|
</div>
|
|
9366
9633
|
}
|
|
9367
|
-
<
|
|
9368
|
-
|
|
9634
|
+
<main class="relative min-w-0 flex-1 overflow-y-auto">
|
|
9635
|
+
<ng-content />
|
|
9636
|
+
</main>
|
|
9637
|
+
</div>
|
|
9369
9638
|
</div>
|
|
9370
9639
|
</div>
|
|
9371
9640
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -9381,16 +9650,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9381
9650
|
<ng-content select="[sdsTopbar]" />
|
|
9382
9651
|
<div class="flex min-h-0 flex-1">
|
|
9383
9652
|
<ng-content select="[sdsSidebar]" />
|
|
9384
|
-
|
|
9653
|
+
<!--
|
|
9654
|
+
The content area carries the background and the ambient blobs; the scrolling <main> sits on top,
|
|
9655
|
+
transparent. <main> is positioned but never a stacking context (no isolate, no z-index): one would
|
|
9656
|
+
trap a page's own overlays — drawers, dialogs, fixed popovers — under the top bar (z-30) however
|
|
9657
|
+
high their z-index. Same pattern as the top bar and sidebar decorations: the blob layer comes first
|
|
9658
|
+
with no z-index, so the positioned <main> after it paints above it.
|
|
9659
|
+
-->
|
|
9660
|
+
<div class="relative flex min-w-0 flex-1" [class]="areaClass()">
|
|
9385
9661
|
@if (decorations()) {
|
|
9386
|
-
<div class="pointer-events-none absolute inset-0
|
|
9662
|
+
<div class="pointer-events-none absolute inset-0 overflow-hidden" aria-hidden="true">
|
|
9387
9663
|
<div class="absolute -left-32 top-10 h-96 w-96 rounded-full bg-brand-300/15 blur-3xl animate-sds-ambient"></div>
|
|
9388
9664
|
<div class="absolute -right-40 top-1/3 h-[28rem] w-[28rem] rounded-full bg-brand-400/12 blur-3xl animate-sds-ambient [animation-delay:4s]"></div>
|
|
9389
9665
|
<div class="absolute bottom-10 left-1/4 h-80 w-80 rounded-full bg-brand-200/20 blur-3xl animate-sds-ambient [animation-delay:7s]"></div>
|
|
9390
9666
|
</div>
|
|
9391
9667
|
}
|
|
9392
|
-
<
|
|
9393
|
-
|
|
9668
|
+
<main class="relative min-w-0 flex-1 overflow-y-auto">
|
|
9669
|
+
<ng-content />
|
|
9670
|
+
</main>
|
|
9671
|
+
</div>
|
|
9394
9672
|
</div>
|
|
9395
9673
|
</div>
|
|
9396
9674
|
`,
|
|
@@ -11259,5 +11537,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
11259
11537
|
* Generated bundle index. Do not edit.
|
|
11260
11538
|
*/
|
|
11261
11539
|
|
|
11262
|
-
export { SDS_ICONS, SDS_PHONE_COUNTRIES, SdsAccordion, SdsAccordionContent, SdsAccordionHeader, SdsAccordionPanel, SdsAccordionStore, SdsAvatar, SdsBadge, SdsButton, SdsCalendar, SdsCard, SdsCheckbox, SdsDatePicker, SdsIcon, SdsInput, SdsInputNumber, SdsLanguageSwitcher, SdsLocalizedInput, SdsMenuItem, SdsMultiSelect, SdsNavGroup, SdsNavItem, SdsOtpInput, SdsPaginator, SdsPhoneInput, SdsSearchCommand, SdsSelect, SdsSelectEmpty, SdsSelectFooter, SdsSelectOption, SdsShell, SdsSidebar, SdsTab, SdsTabList, SdsTabPanel, SdsTabPanels, SdsTable, SdsTableCell, SdsTableRowExpansion, SdsTabs, SdsTabsStore, SdsTextarea, SdsThemeService, SdsThemeToggle, SdsToastHost, SdsToastService, SdsToggleSwitch, SdsTopbar, SdsUserMenu, SidebarStore, addDays, addMonths, addMonthsKeepDay, formatDdMmYyyy, formatHhMm, isOutOfRange, isSameDay, isoDay, pad2, sdsFormatNational, sdsMatchDialCode, sdsNormalizeSignificant, startOfDay, startOfMonth };
|
|
11540
|
+
export { SDS_ICONS, SDS_PHONE_COUNTRIES, SdsAccordion, SdsAccordionContent, SdsAccordionHeader, SdsAccordionPanel, SdsAccordionStore, SdsAvatar, SdsBadge, SdsButton, SdsCalendar, SdsCard, SdsCheckbox, SdsDatePicker, SdsIcon, SdsInput, SdsInputNumber, SdsLanguageSwitcher, SdsLocalizedInput, SdsMenuItem, SdsMultiSelect, SdsNavGroup, SdsNavItem, SdsOtpInput, SdsPaginator, SdsPhoneInput, SdsRadio, SdsSearchCommand, SdsSelect, SdsSelectEmpty, SdsSelectFooter, SdsSelectOption, SdsShell, SdsSidebar, SdsTab, SdsTabList, SdsTabPanel, SdsTabPanels, SdsTable, SdsTableCell, SdsTableRowExpansion, SdsTabs, SdsTabsStore, SdsTextarea, SdsThemeService, SdsThemeToggle, SdsToastHost, SdsToastService, SdsToggleSwitch, SdsTopbar, SdsUserMenu, SidebarStore, addDays, addMonths, addMonthsKeepDay, formatDdMmYyyy, formatHhMm, isOutOfRange, isSameDay, isoDay, pad2, sdsFormatNational, sdsMatchDialCode, sdsNormalizeSignificant, startOfDay, startOfMonth };
|
|
11263
11541
|
//# sourceMappingURL=besaitech-ng-design-system.mjs.map
|