@besaitech/ng-design-system 0.0.56 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/fesm2022/besaitech-ng-design-system.mjs +354 -133
- package/fesm2022/besaitech-ng-design-system.mjs.map +1 -1
- package/index.d.ts +112 -33
- package/package.json +1 -1
- package/themes/base.css +13 -0
- package/themes/belvigo-emerald.css +22 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, computed, ChangeDetectionStrategy, Component,
|
|
2
|
+
import { inject, input, booleanAttribute, computed, ChangeDetectionStrategy, Component, isDevMode, effect, numberAttribute, output, signal, forwardRef, viewChild, viewChildren, afterRenderEffect, model, ElementRef, Directive, Injector, contentChild, untracked, afterNextRender, TemplateRef, linkedSignal, DestroyRef, Injectable, contentChildren } 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';
|
|
@@ -81,6 +81,13 @@ const SDS_ICONS = {
|
|
|
81
81
|
'arrow-up': '<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',
|
|
82
82
|
'arrow-down': '<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',
|
|
83
83
|
'chevrons-up-down': '<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',
|
|
84
|
+
// Move to top / bottom (reorder menus).
|
|
85
|
+
'chevrons-up': '<path d="m17 11-5-5-5 5"/><path d="m17 18-5-5-5 5"/>',
|
|
86
|
+
'chevrons-down': '<path d="m7 6 5 5 5-5"/><path d="m7 13 5 5 5-5"/>',
|
|
87
|
+
// Ratings and reviews. A filled star: <sds-icon name="star" filled /> (the path is closed).
|
|
88
|
+
star: '<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>',
|
|
89
|
+
// Comments, messages to a customer.
|
|
90
|
+
'message-square': '<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"/>',
|
|
84
91
|
filter: '<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/>',
|
|
85
92
|
table: '<path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/>',
|
|
86
93
|
// Contactless ordering: every restaurant table gets its own QR code (Belvigo merchant nav).
|
|
@@ -165,6 +172,7 @@ function toIconPx(value) {
|
|
|
165
172
|
* @example
|
|
166
173
|
* <sds-icon name="search" />
|
|
167
174
|
* <sds-icon name="home" [size]="18" />
|
|
175
|
+
* <sds-icon name="star" filled class="text-accent-amber" />
|
|
168
176
|
*/
|
|
169
177
|
class SdsIcon {
|
|
170
178
|
sanitizer = inject(DomSanitizer);
|
|
@@ -174,16 +182,21 @@ class SdsIcon {
|
|
|
174
182
|
size = input(20, ...(ngDevMode ? [{ debugName: "size", transform: toIconPx }] : [{ transform: toIconPx }]));
|
|
175
183
|
/** Stroke width of the line icon. */
|
|
176
184
|
strokeWidth = input(2, ...(ngDevMode ? [{ debugName: "strokeWidth" }] : []));
|
|
185
|
+
/**
|
|
186
|
+
* Fill the shape with the current colour as well as stroking it — a filled rating star, a solid dot.
|
|
187
|
+
* Only closed shapes (star, circle…) read as filled; open line icons are unchanged.
|
|
188
|
+
*/
|
|
189
|
+
filled = input(false, ...(ngDevMode ? [{ debugName: "filled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
177
190
|
svg = computed(() => {
|
|
178
191
|
const inner = SDS_ICONS[this.name()] ?? '';
|
|
179
192
|
const markup = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ` +
|
|
180
|
-
`width="100%" height="100%" fill="none" stroke="currentColor" ` +
|
|
193
|
+
`width="100%" height="100%" fill="${this.filled() ? 'currentColor' : 'none'}" stroke="currentColor" ` +
|
|
181
194
|
`stroke-width="${this.strokeWidth()}" stroke-linecap="round" ` +
|
|
182
195
|
`stroke-linejoin="round">${inner}</svg>`;
|
|
183
196
|
return this.sanitizer.bypassSecurityTrustHtml(markup);
|
|
184
197
|
}, ...(ngDevMode ? [{ debugName: "svg" }] : []));
|
|
185
198
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SdsIcon, isStandalone: true, selector: "sds-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width.px": "size()", "style.height.px": "size()", "innerHTML": "svg()", "attr.aria-hidden": "\"true\"" }, classAttribute: "sds-icon inline-flex shrink-0 items-center justify-center" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SdsIcon, isStandalone: true, selector: "sds-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, filled: { classPropertyName: "filled", publicName: "filled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width.px": "size()", "style.height.px": "size()", "innerHTML": "svg()", "attr.aria-hidden": "\"true\"" }, classAttribute: "sds-icon inline-flex shrink-0 items-center justify-center" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
187
200
|
}
|
|
188
201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsIcon, decorators: [{
|
|
189
202
|
type: Component,
|
|
@@ -199,7 +212,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
199
212
|
'[attr.aria-hidden]': '"true"',
|
|
200
213
|
},
|
|
201
214
|
}]
|
|
202
|
-
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }] } });
|
|
215
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], filled: [{ type: i0.Input, args: [{ isSignal: true, alias: "filled", required: false }] }] } });
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Dark-mode fills a brand preset can take over. Internal to the library (not in public-api.ts).
|
|
219
|
+
*
|
|
220
|
+
* The monochrome presets (saitech.css, belvigo.css) have a dark 600 step that is a mid-dark grey: as a
|
|
221
|
+
* solid fill under white text it reads as disabled. So in dark mode the library's solid "primary" fills
|
|
222
|
+
* (primary button, toggle "on", tri-state "contains", the count badges) invert to `ink` on `surface`,
|
|
223
|
+
* and its selected tints (chip, tertiary button, drop zone) go neutral. A coloured brand does not need
|
|
224
|
+
* that: with the emerald preset every primary button turned WHITE in dark mode, next to green checkboxes
|
|
225
|
+
* and tabs.
|
|
226
|
+
*
|
|
227
|
+
* Each class below reads a `--sds-dark-*` custom property and falls back to the inverted/neutral value,
|
|
228
|
+
* so the monochrome presets keep their look and a preset opts in by setting the properties under
|
|
229
|
+
* `html.dark` (belvigo-emerald.css does):
|
|
230
|
+
*
|
|
231
|
+
* --sds-dark-primary solid fill (fallback: ink)
|
|
232
|
+
* --sds-dark-primary-hover solid fill, hover (fallback: ink 90 %)
|
|
233
|
+
* --sds-dark-primary-active solid fill, pressed (fallback: ink 80 %)
|
|
234
|
+
* --sds-dark-on-primary text / marks on the solid fill (fallback: surface)
|
|
235
|
+
* --sds-dark-tint selected tint background (fallback: muted, or white 10 % on buttons)
|
|
236
|
+
* --sds-dark-tint-hover tint, hover
|
|
237
|
+
* --sds-dark-tint-active tint, pressed
|
|
238
|
+
* --sds-dark-tint-border border of a selected tint (fallback: ink-soft)
|
|
239
|
+
* --sds-dark-on-tint text on the tint (fallback: ink)
|
|
240
|
+
*
|
|
241
|
+
* The strings are whole class literals on purpose: Tailwind finds them by scanning the published bundle.
|
|
242
|
+
*/
|
|
243
|
+
/** Solid primary fill in dark mode. */
|
|
244
|
+
const DARK_PRIMARY_BG = 'dark:bg-[color:var(--sds-dark-primary,var(--color-ink))]';
|
|
245
|
+
const DARK_PRIMARY_BORDER = 'dark:border-[color:var(--sds-dark-primary,var(--color-ink))]';
|
|
246
|
+
const DARK_PRIMARY_RING = 'dark:ring-[color:var(--sds-dark-primary,var(--color-ink))]';
|
|
247
|
+
/** The solid fill's colour used as a foreground (an icon inside a light knob). */
|
|
248
|
+
const DARK_PRIMARY_TEXT = 'dark:text-[color:var(--sds-dark-primary,var(--color-ink))]';
|
|
249
|
+
const DARK_PRIMARY_HOVER = 'dark:hover:bg-[color:var(--sds-dark-primary-hover,color-mix(in_oklab,var(--color-ink)_90%,transparent))]';
|
|
250
|
+
const DARK_PRIMARY_ACTIVE = 'dark:active:bg-[color:var(--sds-dark-primary-active,color-mix(in_oklab,var(--color-ink)_80%,transparent))]';
|
|
251
|
+
/** Text and marks on the solid fill. */
|
|
252
|
+
const DARK_ON_PRIMARY = 'dark:text-[color:var(--sds-dark-on-primary,var(--color-surface))]';
|
|
253
|
+
/** A light element sitting on the solid fill (the toggle's knob). */
|
|
254
|
+
const DARK_ON_PRIMARY_BG = 'dark:bg-[color:var(--sds-dark-on-primary,var(--color-surface))]';
|
|
255
|
+
/** Secondary text on the solid fill (a caption at 85 %). */
|
|
256
|
+
const DARK_ON_PRIMARY_SOFT = 'dark:text-[color:color-mix(in_oklab,var(--sds-dark-on-primary,var(--color-surface))_85%,transparent)]';
|
|
257
|
+
/**
|
|
258
|
+
* Hover of a fill that keeps `bg-brand-600` in dark mode (selected day, current page). Falls back to the
|
|
259
|
+
* light hover step; a coloured preset whose dark 700 is a light TEXT green points it at its fill hover.
|
|
260
|
+
*/
|
|
261
|
+
const DARK_BRAND_FILL_HOVER = 'dark:hover:bg-[color:var(--sds-dark-primary-hover,var(--color-brand-700))]';
|
|
262
|
+
/** Selected tint in dark mode (chip, drop zone). */
|
|
263
|
+
const DARK_TINT_BG = 'dark:bg-[color:var(--sds-dark-tint,var(--color-muted))]';
|
|
264
|
+
const DARK_TINT_BORDER = 'dark:border-[color:var(--sds-dark-tint-border,var(--color-ink-soft))]';
|
|
265
|
+
const DARK_ON_TINT = 'dark:text-[color:var(--sds-dark-on-tint,var(--color-ink))]';
|
|
203
266
|
|
|
204
267
|
const BASE = 'inline-flex items-center justify-center gap-2 font-medium ' +
|
|
205
268
|
'transition-colors duration-150 select-none whitespace-nowrap cursor-pointer ' +
|
|
@@ -208,16 +271,22 @@ const BASE = 'inline-flex items-center justify-center gap-2 font-medium ' +
|
|
|
208
271
|
'disabled:opacity-50 disabled:pointer-events-none';
|
|
209
272
|
/**
|
|
210
273
|
* Dark mode has its own fills. A monochrome brand's dark 600 step is a mid-dark grey: as a primary fill
|
|
211
|
-
* it read as disabled, and at `disabled:opacity-50` the real disabled state looked the same. So
|
|
212
|
-
* primary is the inverted light fill (`ink` on `surface`); tertiary and ghost swap their
|
|
213
|
-
* tints for white ones, which show on a dark surface.
|
|
274
|
+
* it read as disabled, and at `disabled:opacity-50` the real disabled state looked the same. So by default
|
|
275
|
+
* the dark primary is the inverted light fill (`ink` on `surface`); tertiary and ghost swap their
|
|
276
|
+
* black/brand-50 tints for white ones, which show on a dark surface.
|
|
277
|
+
*
|
|
278
|
+
* A coloured brand keeps its colour: the preset sets `--sds-dark-primary*` / `--sds-dark-tint*` under
|
|
279
|
+
* `html.dark` (belvigo-emerald.css does) and the dark primary and tertiary take them. See theme/dark-fills.ts.
|
|
214
280
|
*/
|
|
215
281
|
const VARIANTS$2 = {
|
|
216
282
|
primary: 'bg-brand-600 text-white shadow-sm hover:bg-brand-700 active:bg-brand-800 ' +
|
|
217
|
-
|
|
283
|
+
`${DARK_PRIMARY_BG} ${DARK_ON_PRIMARY} ${DARK_PRIMARY_HOVER} ${DARK_PRIMARY_ACTIVE}`,
|
|
218
284
|
secondary: 'bg-surface text-ink border border-border shadow-sm hover:bg-muted active:bg-brand-50',
|
|
219
285
|
tertiary: 'bg-brand-50 text-brand-700 hover:bg-brand-100 active:bg-brand-200/70 ' +
|
|
220
|
-
'dark:bg-
|
|
286
|
+
'dark:bg-[color:var(--sds-dark-tint,rgb(255_255_255/0.1))] ' +
|
|
287
|
+
'dark:text-[color:var(--sds-dark-on-tint,var(--color-ink))] ' +
|
|
288
|
+
'dark:hover:bg-[color:var(--sds-dark-tint-hover,rgb(255_255_255/0.15))] ' +
|
|
289
|
+
'dark:active:bg-[color:var(--sds-dark-tint-active,rgb(255_255_255/0.2))]',
|
|
221
290
|
ghost: 'bg-transparent text-ink-soft hover:bg-black/5 active:bg-black/10 ' +
|
|
222
291
|
'dark:hover:bg-white/10 dark:active:bg-white/15',
|
|
223
292
|
danger: 'bg-danger text-white shadow-sm hover:brightness-95 active:brightness-90',
|
|
@@ -347,13 +416,32 @@ const SIZES$b = {
|
|
|
347
416
|
* sidebar search field).
|
|
348
417
|
*/
|
|
349
418
|
class SdsInput {
|
|
350
|
-
|
|
419
|
+
autoId = `sds-input-${nextId$n++}`;
|
|
420
|
+
/**
|
|
421
|
+
* `id` of the native `<input>` — for a `<label for>` outside the component, or to focus the field with
|
|
422
|
+
* `document.getElementById(id).focus()` (after adding a row, say). Empty (default) generates one. Set it
|
|
423
|
+
* here rather than as an `id` on the host: the host is not the focusable element.
|
|
424
|
+
*/
|
|
425
|
+
inputId = input('', ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
426
|
+
/** The native field's id: {@link inputId} or the generated one. */
|
|
427
|
+
fieldId = computed(() => this.inputId() || this.autoId, ...(ngDevMode ? [{ debugName: "fieldId" }] : []));
|
|
351
428
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
352
429
|
/** Accessible name used when no visible [label] is provided. */
|
|
353
430
|
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
354
431
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
355
432
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
356
433
|
error = input('', ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
434
|
+
/**
|
|
435
|
+
* Mark the field invalid (danger frame + `aria-invalid`) without showing an [error] message — for a
|
|
436
|
+
* form that reports its problems once, in a summary or a single message under a group of fields.
|
|
437
|
+
*/
|
|
438
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
439
|
+
/**
|
|
440
|
+
* Mark the field required: an asterisk after the [label] (hidden from screen readers) and
|
|
441
|
+
* `aria-required` on the field. It does not validate — keep `Validators.required` (or your own check)
|
|
442
|
+
* for that; this is the visible and announced half.
|
|
443
|
+
*/
|
|
444
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
357
445
|
/**
|
|
358
446
|
* `search` is the semantically right type for a search field, and the template strips the WebKit
|
|
359
447
|
* search decorations that come with it. Without that, a `search` field with {@link clearable} draws
|
|
@@ -414,9 +502,9 @@ class SdsInput {
|
|
|
414
502
|
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
415
503
|
describedBy = computed(() => {
|
|
416
504
|
if (this.error())
|
|
417
|
-
return `${this.
|
|
505
|
+
return `${this.fieldId()}-err`;
|
|
418
506
|
if (this.hint())
|
|
419
|
-
return `${this.
|
|
507
|
+
return `${this.fieldId()}-hint`;
|
|
420
508
|
return null;
|
|
421
509
|
}, ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
|
|
422
510
|
fieldPadding = computed(() => {
|
|
@@ -431,6 +519,7 @@ class SdsInput {
|
|
|
431
519
|
return `${left} ${right}`;
|
|
432
520
|
}, ...(ngDevMode ? [{ debugName: "fieldPadding" }] : []));
|
|
433
521
|
wrapperClasses = computed(() => {
|
|
522
|
+
const danger = !!this.error() || this.invalid();
|
|
434
523
|
const parts = [SIZES$b[this.size()], this.pill() ? 'rounded-full' : 'rounded-control'];
|
|
435
524
|
if (this.isDisabled())
|
|
436
525
|
parts.push('opacity-60 cursor-not-allowed');
|
|
@@ -438,19 +527,19 @@ class SdsInput {
|
|
|
438
527
|
// border-transparent, not border-0: the border box is what keeps a filled field the same height
|
|
439
528
|
// as a bordered one, so the two sit level when a toolbar mixes them.
|
|
440
529
|
parts.push('border-transparent bg-muted text-ink');
|
|
441
|
-
parts.push(
|
|
530
|
+
parts.push(danger
|
|
442
531
|
? 'border-danger focus-within:ring-2 focus-within:ring-danger/30'
|
|
443
532
|
: 'focus-within:ring-2 focus-within:ring-brand-500/25');
|
|
444
533
|
}
|
|
445
534
|
else if (this.onBrand()) {
|
|
446
535
|
parts.push('bg-white/10 text-white');
|
|
447
|
-
parts.push(
|
|
536
|
+
parts.push(danger
|
|
448
537
|
? 'border-danger focus-within:ring-2 focus-within:ring-danger/30'
|
|
449
538
|
: 'border-white/15 focus-within:border-white/40 focus-within:ring-2 focus-within:ring-white/20');
|
|
450
539
|
}
|
|
451
540
|
else {
|
|
452
541
|
parts.push('bg-surface text-ink');
|
|
453
|
-
parts.push(
|
|
542
|
+
parts.push(danger
|
|
454
543
|
? 'border-danger focus-within:border-danger focus-within:ring-2 focus-within:ring-danger/25'
|
|
455
544
|
: 'border-border focus-within:border-brand-500 focus-within:ring-2 focus-within:ring-brand-500/25');
|
|
456
545
|
}
|
|
@@ -482,7 +571,7 @@ class SdsInput {
|
|
|
482
571
|
this.onTouched();
|
|
483
572
|
}
|
|
484
573
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
-
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: [
|
|
574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsInput, isStandalone: true, selector: "sds-input", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, 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 }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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: [
|
|
486
575
|
{
|
|
487
576
|
provide: NG_VALUE_ACCESSOR,
|
|
488
577
|
useExisting: forwardRef(() => SdsInput),
|
|
@@ -491,11 +580,14 @@ class SdsInput {
|
|
|
491
580
|
], ngImport: i0, template: `
|
|
492
581
|
@if (label()) {
|
|
493
582
|
<label
|
|
494
|
-
[for]="
|
|
583
|
+
[for]="fieldId()"
|
|
495
584
|
class="mb-1.5 block text-sm font-medium"
|
|
496
585
|
[class]="onBrand() ? 'text-white/90' : 'text-ink'"
|
|
497
586
|
>
|
|
498
587
|
{{ label() }}
|
|
588
|
+
@if (required()) {
|
|
589
|
+
<span class="ml-0.5" [class]="onBrand() ? 'text-white/70' : 'text-danger'" aria-hidden="true">*</span>
|
|
590
|
+
}
|
|
499
591
|
</label>
|
|
500
592
|
}
|
|
501
593
|
|
|
@@ -515,7 +607,7 @@ class SdsInput {
|
|
|
515
607
|
}
|
|
516
608
|
|
|
517
609
|
<input
|
|
518
|
-
[id]="
|
|
610
|
+
[id]="fieldId()"
|
|
519
611
|
[type]="type()"
|
|
520
612
|
[placeholder]="placeholder()"
|
|
521
613
|
[disabled]="isDisabled()"
|
|
@@ -523,7 +615,8 @@ class SdsInput {
|
|
|
523
615
|
[attr.autocomplete]="autocomplete() || null"
|
|
524
616
|
[attr.maxlength]="maxLength() || null"
|
|
525
617
|
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
526
|
-
[attr.aria-invalid]="error() ? 'true' : null"
|
|
618
|
+
[attr.aria-invalid]="error() || invalid() ? 'true' : null"
|
|
619
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
527
620
|
[attr.aria-describedby]="describedBy()"
|
|
528
621
|
class="w-full bg-transparent outline-none placeholder:text-current/50 disabled:cursor-not-allowed
|
|
529
622
|
[&::-webkit-search-cancel-button]:appearance-none
|
|
@@ -548,7 +641,7 @@ class SdsInput {
|
|
|
548
641
|
type="button"
|
|
549
642
|
[attr.aria-label]="trailingActionLabel() || null"
|
|
550
643
|
[attr.aria-pressed]="trailingActionPressed()"
|
|
551
|
-
[attr.aria-controls]="
|
|
644
|
+
[attr.aria-controls]="fieldId()"
|
|
552
645
|
class="absolute right-2.5 inline-flex h-7 w-7 items-center justify-center rounded-full
|
|
553
646
|
opacity-70 hover:opacity-100 hover:bg-black/5"
|
|
554
647
|
(click)="trailingActionClick.emit()"
|
|
@@ -565,19 +658,19 @@ class SdsInput {
|
|
|
565
658
|
</div>
|
|
566
659
|
|
|
567
660
|
@if (error()) {
|
|
568
|
-
<p [id]="
|
|
661
|
+
<p [id]="fieldId() + '-err'" class="mt-1.5 text-xs font-medium text-danger">
|
|
569
662
|
{{ error() }}
|
|
570
663
|
</p>
|
|
571
664
|
} @else if (hint()) {
|
|
572
665
|
<p
|
|
573
|
-
[id]="
|
|
666
|
+
[id]="fieldId() + '-hint'"
|
|
574
667
|
class="mt-1.5 text-xs"
|
|
575
668
|
[class]="onBrand() ? 'text-white/60' : 'text-ink-faint'"
|
|
576
669
|
>
|
|
577
670
|
{{ hint() }}
|
|
578
671
|
</p>
|
|
579
672
|
}
|
|
580
|
-
`, isInline: true, 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"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
673
|
+
`, isInline: true, 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"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
581
674
|
}
|
|
582
675
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInput, decorators: [{
|
|
583
676
|
type: Component,
|
|
@@ -590,11 +683,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
590
683
|
], host: { class: 'block' }, template: `
|
|
591
684
|
@if (label()) {
|
|
592
685
|
<label
|
|
593
|
-
[for]="
|
|
686
|
+
[for]="fieldId()"
|
|
594
687
|
class="mb-1.5 block text-sm font-medium"
|
|
595
688
|
[class]="onBrand() ? 'text-white/90' : 'text-ink'"
|
|
596
689
|
>
|
|
597
690
|
{{ label() }}
|
|
691
|
+
@if (required()) {
|
|
692
|
+
<span class="ml-0.5" [class]="onBrand() ? 'text-white/70' : 'text-danger'" aria-hidden="true">*</span>
|
|
693
|
+
}
|
|
598
694
|
</label>
|
|
599
695
|
}
|
|
600
696
|
|
|
@@ -614,7 +710,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
614
710
|
}
|
|
615
711
|
|
|
616
712
|
<input
|
|
617
|
-
[id]="
|
|
713
|
+
[id]="fieldId()"
|
|
618
714
|
[type]="type()"
|
|
619
715
|
[placeholder]="placeholder()"
|
|
620
716
|
[disabled]="isDisabled()"
|
|
@@ -622,7 +718,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
622
718
|
[attr.autocomplete]="autocomplete() || null"
|
|
623
719
|
[attr.maxlength]="maxLength() || null"
|
|
624
720
|
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
625
|
-
[attr.aria-invalid]="error() ? 'true' : null"
|
|
721
|
+
[attr.aria-invalid]="error() || invalid() ? 'true' : null"
|
|
722
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
626
723
|
[attr.aria-describedby]="describedBy()"
|
|
627
724
|
class="w-full bg-transparent outline-none placeholder:text-current/50 disabled:cursor-not-allowed
|
|
628
725
|
[&::-webkit-search-cancel-button]:appearance-none
|
|
@@ -647,7 +744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
647
744
|
type="button"
|
|
648
745
|
[attr.aria-label]="trailingActionLabel() || null"
|
|
649
746
|
[attr.aria-pressed]="trailingActionPressed()"
|
|
650
|
-
[attr.aria-controls]="
|
|
747
|
+
[attr.aria-controls]="fieldId()"
|
|
651
748
|
class="absolute right-2.5 inline-flex h-7 w-7 items-center justify-center rounded-full
|
|
652
749
|
opacity-70 hover:opacity-100 hover:bg-black/5"
|
|
653
750
|
(click)="trailingActionClick.emit()"
|
|
@@ -664,12 +761,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
664
761
|
</div>
|
|
665
762
|
|
|
666
763
|
@if (error()) {
|
|
667
|
-
<p [id]="
|
|
764
|
+
<p [id]="fieldId() + '-err'" class="mt-1.5 text-xs font-medium text-danger">
|
|
668
765
|
{{ error() }}
|
|
669
766
|
</p>
|
|
670
767
|
} @else if (hint()) {
|
|
671
768
|
<p
|
|
672
|
-
[id]="
|
|
769
|
+
[id]="fieldId() + '-hint'"
|
|
673
770
|
class="mt-1.5 text-xs"
|
|
674
771
|
[class]="onBrand() ? 'text-white/60' : 'text-ink-faint'"
|
|
675
772
|
>
|
|
@@ -677,7 +774,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
677
774
|
</p>
|
|
678
775
|
}
|
|
679
776
|
`, 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"] }]
|
|
680
|
-
}], 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"] }] } });
|
|
777
|
+
}], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], 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 }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", 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"] }] } });
|
|
681
778
|
|
|
682
779
|
let nextId$m = 0;
|
|
683
780
|
const HEIGHTS = {
|
|
@@ -720,6 +817,11 @@ class SdsInputNumber {
|
|
|
720
817
|
* host that renders the message itself, e.g. an editable table cell.
|
|
721
818
|
*/
|
|
722
819
|
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
820
|
+
/**
|
|
821
|
+
* Mark the field required: an asterisk after the [label] (hidden from screen readers) and
|
|
822
|
+
* `aria-required` on the field. It does not validate — same contract as sds-input's [required].
|
|
823
|
+
*/
|
|
824
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
723
825
|
/** Extra id(s) for the field's `aria-describedby`, added to its own hint/error message id. */
|
|
724
826
|
ariaDescribedby = input('', ...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : []));
|
|
725
827
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
@@ -1170,7 +1272,7 @@ class SdsInputNumber {
|
|
|
1170
1272
|
this.cvaDisabled.set(isDisabled);
|
|
1171
1273
|
}
|
|
1172
1274
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInputNumber, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1173
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsInputNumber, isStandalone: true, selector: "sds-input-number", 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 }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", 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 }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", 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 }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, buttonLayout: { classPropertyName: "buttonLayout", publicName: "buttonLayout", isSignal: true, isRequired: false, transformFunction: null }, incrementIcon: { classPropertyName: "incrementIcon", publicName: "incrementIcon", isSignal: true, isRequired: false, transformFunction: null }, decrementIcon: { classPropertyName: "decrementIcon", publicName: "decrementIcon", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", 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 }, incrementLabel: { classPropertyName: "incrementLabel", publicName: "incrementLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementLabel: { classPropertyName: "decrementLabel", publicName: "decrementLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, providers: [
|
|
1275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsInputNumber, isStandalone: true, selector: "sds-input-number", 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 }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", 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 }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", 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 }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, buttonLayout: { classPropertyName: "buttonLayout", publicName: "buttonLayout", isSignal: true, isRequired: false, transformFunction: null }, incrementIcon: { classPropertyName: "incrementIcon", publicName: "incrementIcon", isSignal: true, isRequired: false, transformFunction: null }, decrementIcon: { classPropertyName: "decrementIcon", publicName: "decrementIcon", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", 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 }, incrementLabel: { classPropertyName: "incrementLabel", publicName: "incrementLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementLabel: { classPropertyName: "decrementLabel", publicName: "decrementLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, providers: [
|
|
1174
1276
|
{
|
|
1175
1277
|
provide: NG_VALUE_ACCESSOR,
|
|
1176
1278
|
useExisting: forwardRef(() => SdsInputNumber),
|
|
@@ -1178,7 +1280,12 @@ class SdsInputNumber {
|
|
|
1178
1280
|
},
|
|
1179
1281
|
], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1180
1282
|
@if (label()) {
|
|
1181
|
-
<label [for]="inputId" class="mb-1.5 block text-sm font-medium text-ink">
|
|
1283
|
+
<label [for]="inputId" class="mb-1.5 block text-sm font-medium text-ink">
|
|
1284
|
+
{{ label() }}
|
|
1285
|
+
@if (required()) {
|
|
1286
|
+
<span class="ml-0.5 text-danger" aria-hidden="true">*</span>
|
|
1287
|
+
}
|
|
1288
|
+
</label>
|
|
1182
1289
|
}
|
|
1183
1290
|
|
|
1184
1291
|
<div class="relative border transition-colors" [class]="wrapperClasses()">
|
|
@@ -1224,6 +1331,7 @@ class SdsInputNumber {
|
|
|
1224
1331
|
[readOnly]="readonly()"
|
|
1225
1332
|
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
1226
1333
|
[attr.aria-invalid]="error() || invalid() ? 'true' : null"
|
|
1334
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
1227
1335
|
[attr.aria-describedby]="describedBy()"
|
|
1228
1336
|
[attr.aria-valuenow]="value()"
|
|
1229
1337
|
[attr.aria-valuemin]="min()"
|
|
@@ -1315,7 +1423,7 @@ class SdsInputNumber {
|
|
|
1315
1423
|
} @else if (hint()) {
|
|
1316
1424
|
<p [id]="inputId + '-hint'" class="mt-1.5 text-xs text-ink-faint">{{ hint() }}</p>
|
|
1317
1425
|
}
|
|
1318
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1426
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1319
1427
|
}
|
|
1320
1428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInputNumber, decorators: [{
|
|
1321
1429
|
type: Component,
|
|
@@ -1333,7 +1441,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1333
1441
|
host: { class: 'block' },
|
|
1334
1442
|
template: `
|
|
1335
1443
|
@if (label()) {
|
|
1336
|
-
<label [for]="inputId" class="mb-1.5 block text-sm font-medium text-ink">
|
|
1444
|
+
<label [for]="inputId" class="mb-1.5 block text-sm font-medium text-ink">
|
|
1445
|
+
{{ label() }}
|
|
1446
|
+
@if (required()) {
|
|
1447
|
+
<span class="ml-0.5 text-danger" aria-hidden="true">*</span>
|
|
1448
|
+
}
|
|
1449
|
+
</label>
|
|
1337
1450
|
}
|
|
1338
1451
|
|
|
1339
1452
|
<div class="relative border transition-colors" [class]="wrapperClasses()">
|
|
@@ -1379,6 +1492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1379
1492
|
[readOnly]="readonly()"
|
|
1380
1493
|
[attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
|
|
1381
1494
|
[attr.aria-invalid]="error() || invalid() ? 'true' : null"
|
|
1495
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
1382
1496
|
[attr.aria-describedby]="describedBy()"
|
|
1383
1497
|
[attr.aria-valuenow]="value()"
|
|
1384
1498
|
[attr.aria-valuemin]="min()"
|
|
@@ -1472,7 +1586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1472
1586
|
}
|
|
1473
1587
|
`,
|
|
1474
1588
|
}]
|
|
1475
|
-
}], 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 }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", 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 }] }] } });
|
|
1589
|
+
}], 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 }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", 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 }] }] } });
|
|
1476
1590
|
|
|
1477
1591
|
let nextId$l = 0;
|
|
1478
1592
|
const SIZES$a = {
|
|
@@ -1930,7 +2044,7 @@ class SdsTimeInput {
|
|
|
1930
2044
|
} @else if (hint()) {
|
|
1931
2045
|
<p [id]="fieldId + '-hint'" class="mt-1.5 text-xs text-ink-faint">{{ hint() }}</p>
|
|
1932
2046
|
}
|
|
1933
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2047
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1934
2048
|
}
|
|
1935
2049
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTimeInput, decorators: [{
|
|
1936
2050
|
type: Component,
|
|
@@ -2665,6 +2779,7 @@ class SdsTextarea {
|
|
|
2665
2779
|
appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
2666
2780
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
2667
2781
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
2782
|
+
/** Asterisk after the [label] (hidden from screen readers) + `aria-required`. It does not validate. */
|
|
2668
2783
|
required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
2669
2784
|
/** Minimum visible rows. */
|
|
2670
2785
|
rows = input(3, ...(ngDevMode ? [{ debugName: "rows", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
@@ -2778,6 +2893,9 @@ class SdsTextarea {
|
|
|
2778
2893
|
@if (label()) {
|
|
2779
2894
|
<label [for]="fieldId" class="mb-1.5 block text-sm font-medium text-ink">
|
|
2780
2895
|
{{ label() }}
|
|
2896
|
+
@if (required()) {
|
|
2897
|
+
<span class="ml-0.5 text-danger" aria-hidden="true">*</span>
|
|
2898
|
+
}
|
|
2781
2899
|
</label>
|
|
2782
2900
|
}
|
|
2783
2901
|
|
|
@@ -2851,6 +2969,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2851
2969
|
@if (label()) {
|
|
2852
2970
|
<label [for]="fieldId" class="mb-1.5 block text-sm font-medium text-ink">
|
|
2853
2971
|
{{ label() }}
|
|
2972
|
+
@if (required()) {
|
|
2973
|
+
<span class="ml-0.5 text-danger" aria-hidden="true">*</span>
|
|
2974
|
+
}
|
|
2854
2975
|
</label>
|
|
2855
2976
|
}
|
|
2856
2977
|
|
|
@@ -2958,21 +3079,24 @@ class SdsToggleSwitch {
|
|
|
2958
3079
|
return `${this.fieldId}-hint`;
|
|
2959
3080
|
return null;
|
|
2960
3081
|
}, ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
|
|
3082
|
+
/** The "on" icon takes the track's colour, so it reads as cut out of the knob. */
|
|
3083
|
+
onIconClass = `text-brand-600 ${DARK_PRIMARY_TEXT}`;
|
|
2961
3084
|
/**
|
|
2962
3085
|
* On/off must read at a glance in both modes. In light mode the brand track against a pale grey one does
|
|
2963
3086
|
* it. In dark mode a monochrome brand's 600 step is a mid-dark grey, as dim as the off track, so there
|
|
2964
3087
|
* "on" flips to a light track with a dark knob and "off" keeps a dim track with a muted knob. `ink` (not
|
|
2965
|
-
* black) tints the off track so it stays visible on dark surfaces too.
|
|
3088
|
+
* black) tints the off track so it stays visible on dark surfaces too. A coloured brand preset keeps
|
|
3089
|
+
* its own "on" track in dark via --sds-dark-primary / --sds-dark-on-primary (see theme/dark-fills.ts).
|
|
2966
3090
|
*/
|
|
2967
3091
|
trackClasses = computed(() => {
|
|
2968
3092
|
const parts = [this.sizing().track];
|
|
2969
|
-
parts.push(this.checked() ?
|
|
3093
|
+
parts.push(this.checked() ? `bg-brand-600 ${DARK_PRIMARY_BG}` : 'bg-ink/15');
|
|
2970
3094
|
return parts.join(' ');
|
|
2971
3095
|
}, ...(ngDevMode ? [{ debugName: "trackClasses" }] : []));
|
|
2972
3096
|
knobClasses = computed(() => {
|
|
2973
3097
|
const parts = [this.sizing().knob];
|
|
2974
3098
|
parts.push(this.checked() ? this.sizing().on : 'translate-x-0.5');
|
|
2975
|
-
parts.push(this.checked() ?
|
|
3099
|
+
parts.push(this.checked() ? `bg-white ${DARK_ON_PRIMARY_BG}` : 'bg-white dark:bg-ink-soft');
|
|
2976
3100
|
return parts.join(' ');
|
|
2977
3101
|
}, ...(ngDevMode ? [{ debugName: "knobClasses" }] : []));
|
|
2978
3102
|
constructor() {
|
|
@@ -3052,7 +3176,7 @@ class SdsToggleSwitch {
|
|
|
3052
3176
|
<sds-icon
|
|
3053
3177
|
[name]="onIcon()!"
|
|
3054
3178
|
[size]="sizing().icon"
|
|
3055
|
-
class="
|
|
3179
|
+
[class]="onIconClass"
|
|
3056
3180
|
/>
|
|
3057
3181
|
} @else if (!checked() && offIcon()) {
|
|
3058
3182
|
<sds-icon
|
|
@@ -3086,7 +3210,7 @@ class SdsToggleSwitch {
|
|
|
3086
3210
|
{{ hint() }}
|
|
3087
3211
|
</p>
|
|
3088
3212
|
}
|
|
3089
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3213
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3090
3214
|
}
|
|
3091
3215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsToggleSwitch, decorators: [{
|
|
3092
3216
|
type: Component,
|
|
@@ -3128,7 +3252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3128
3252
|
<sds-icon
|
|
3129
3253
|
[name]="onIcon()!"
|
|
3130
3254
|
[size]="sizing().icon"
|
|
3131
|
-
class="
|
|
3255
|
+
[class]="onIconClass"
|
|
3132
3256
|
/>
|
|
3133
3257
|
} @else if (!checked() && offIcon()) {
|
|
3134
3258
|
<sds-icon
|
|
@@ -3270,7 +3394,7 @@ class SdsCheckbox {
|
|
|
3270
3394
|
}
|
|
3271
3395
|
</span>
|
|
3272
3396
|
</ng-template>
|
|
3273
|
-
`, 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 });
|
|
3397
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3274
3398
|
}
|
|
3275
3399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsCheckbox, decorators: [{
|
|
3276
3400
|
type: Component,
|
|
@@ -3659,7 +3783,7 @@ class SdsAvatar {
|
|
|
3659
3783
|
></span>
|
|
3660
3784
|
}
|
|
3661
3785
|
</div>
|
|
3662
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3786
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3663
3787
|
}
|
|
3664
3788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsAvatar, decorators: [{
|
|
3665
3789
|
type: Component,
|
|
@@ -3906,7 +4030,7 @@ class SdsAllergenIcon {
|
|
|
3906
4030
|
@if (iconName(); as name) {
|
|
3907
4031
|
<sds-icon [name]="name" [size]="size()" [strokeWidth]="strokeWidth()" />
|
|
3908
4032
|
}
|
|
3909
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4033
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3910
4034
|
}
|
|
3911
4035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsAllergenIcon, decorators: [{
|
|
3912
4036
|
type: Component,
|
|
@@ -3986,13 +4110,16 @@ class SdsTriStateChip {
|
|
|
3986
4110
|
switch (this.value()) {
|
|
3987
4111
|
case 'contains':
|
|
3988
4112
|
// Filled + solid thick border + check. In dark mode a monochrome brand-600 is a dim grey, so the
|
|
3989
|
-
// fill inverts to ink/surface (the same rule as sds-toggle-switch and sds-button primary)
|
|
3990
|
-
|
|
3991
|
-
|
|
4113
|
+
// fill inverts to ink/surface (the same rule as sds-toggle-switch and sds-button primary) unless
|
|
4114
|
+
// the brand preset supplies its own dark fill (--sds-dark-primary*, see theme/dark-fills.ts).
|
|
4115
|
+
return (`${base} border-brand-600 bg-brand-600 text-white hover:bg-brand-700 ` +
|
|
4116
|
+
`${DARK_PRIMARY_BORDER} ${DARK_PRIMARY_BG} ${DARK_ON_PRIMARY} ` +
|
|
4117
|
+
'dark:hover:bg-[color:var(--sds-dark-primary-hover,var(--color-ink-soft))]');
|
|
3992
4118
|
case 'may-contain':
|
|
3993
4119
|
// Unfilled + DASHED thick border + question mark.
|
|
3994
|
-
return (`${base} border-dashed border-brand-600 bg-brand-50 text-ink ` +
|
|
3995
|
-
|
|
4120
|
+
return (`${base} border-dashed border-brand-600 bg-brand-50 text-ink hover:bg-brand-100 ` +
|
|
4121
|
+
`${DARK_TINT_BORDER} ${DARK_TINT_BG} ` +
|
|
4122
|
+
'dark:hover:bg-[color:var(--sds-dark-tint-hover,var(--color-surface))]');
|
|
3996
4123
|
default:
|
|
3997
4124
|
return `${base} border-border bg-surface text-ink-soft hover:border-ink-faint hover:text-ink`;
|
|
3998
4125
|
}
|
|
@@ -4000,7 +4127,7 @@ class SdsTriStateChip {
|
|
|
4000
4127
|
captionClass = computed(() => {
|
|
4001
4128
|
switch (this.value()) {
|
|
4002
4129
|
case 'contains':
|
|
4003
|
-
return
|
|
4130
|
+
return `text-white/85 ${DARK_ON_PRIMARY_SOFT}`;
|
|
4004
4131
|
case 'may-contain':
|
|
4005
4132
|
return 'text-ink-soft';
|
|
4006
4133
|
default:
|
|
@@ -4104,7 +4231,7 @@ class SdsTriStateChip {
|
|
|
4104
4231
|
<span [id]="chipId + '-hint'" class="sr-only">{{ hint() }}</span>
|
|
4105
4232
|
}
|
|
4106
4233
|
<span class="sr-only" aria-live="polite" aria-atomic="true">{{ announcement() }}</span>
|
|
4107
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4234
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4108
4235
|
}
|
|
4109
4236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTriStateChip, decorators: [{
|
|
4110
4237
|
type: Component,
|
|
@@ -4321,7 +4448,7 @@ class SdsSegmented {
|
|
|
4321
4448
|
</button>
|
|
4322
4449
|
}
|
|
4323
4450
|
</div>
|
|
4324
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4451
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4325
4452
|
}
|
|
4326
4453
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSegmented, decorators: [{
|
|
4327
4454
|
type: Component,
|
|
@@ -4374,7 +4501,8 @@ const SIZE = {
|
|
|
4374
4501
|
/**
|
|
4375
4502
|
* Chip look shared by sds-chip and sds-chip-group. Selected is more than a tint — a brand border, bolder
|
|
4376
4503
|
* text and (by default) a check — so it reads in greyscale too. In dark mode the brand text/tint are
|
|
4377
|
-
* swapped for ink/muted (the library's rule for a monochrome brand's dark ramp)
|
|
4504
|
+
* swapped for ink/muted (the library's rule for a monochrome brand's dark ramp), unless the brand preset
|
|
4505
|
+
* supplies its own dark tint (--sds-dark-tint*, see theme/dark-fills.ts).
|
|
4378
4506
|
*/
|
|
4379
4507
|
function chipClass(size, selected) {
|
|
4380
4508
|
const base = 'inline-flex shrink-0 select-none items-center whitespace-nowrap rounded-full border font-medium ' +
|
|
@@ -4383,7 +4511,7 @@ function chipClass(size, selected) {
|
|
|
4383
4511
|
SIZE[size];
|
|
4384
4512
|
return selected
|
|
4385
4513
|
? `${base} cursor-pointer border-brand-600 bg-brand-50 font-semibold text-brand-700 ` +
|
|
4386
|
-
|
|
4514
|
+
`${DARK_TINT_BORDER} ${DARK_TINT_BG} ${DARK_ON_TINT}`
|
|
4387
4515
|
: `${base} cursor-pointer border-border bg-surface text-ink-soft hover:border-ink-faint hover:text-ink`;
|
|
4388
4516
|
}
|
|
4389
4517
|
const COUNT_CLASS = 'inline-flex min-w-5 items-center justify-center rounded-full bg-ink/5 px-1.5 text-[11px] font-semibold tabular-nums dark:bg-white/10';
|
|
@@ -4431,7 +4559,7 @@ class SdsChip {
|
|
|
4431
4559
|
<span [class]="countClass">{{ count() }}</span>
|
|
4432
4560
|
}
|
|
4433
4561
|
</button>
|
|
4434
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4562
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4435
4563
|
}
|
|
4436
4564
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsChip, decorators: [{
|
|
4437
4565
|
type: Component,
|
|
@@ -4678,7 +4806,7 @@ class SdsChipGroup {
|
|
|
4678
4806
|
</button>
|
|
4679
4807
|
}
|
|
4680
4808
|
</div>
|
|
4681
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4809
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4682
4810
|
}
|
|
4683
4811
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsChipGroup, decorators: [{
|
|
4684
4812
|
type: Component,
|
|
@@ -4835,7 +4963,7 @@ class SdsChecklistRow {
|
|
|
4835
4963
|
}
|
|
4836
4964
|
</div>
|
|
4837
4965
|
</div>
|
|
4838
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4966
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4839
4967
|
}
|
|
4840
4968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsChecklistRow, decorators: [{
|
|
4841
4969
|
type: Component,
|
|
@@ -5037,7 +5165,7 @@ class SdsScore {
|
|
|
5037
5165
|
</div>
|
|
5038
5166
|
}
|
|
5039
5167
|
</div>
|
|
5040
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5168
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5041
5169
|
}
|
|
5042
5170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsScore, decorators: [{
|
|
5043
5171
|
type: Component,
|
|
@@ -5216,9 +5344,12 @@ class SdsStatusTile {
|
|
|
5216
5344
|
hatch = computed(() => this.state() === 'sold-out'
|
|
5217
5345
|
? 'repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in srgb, var(--color-danger) 10%, transparent) 12px 24px)'
|
|
5218
5346
|
: null, ...(ngDevMode ? [{ debugName: "hatch" }] : []));
|
|
5347
|
+
/** The selected check: brand fill, inverted in dark unless the brand preset supplies a dark fill. */
|
|
5348
|
+
checkBadgeClass = 'absolute right-2 top-2 grid h-7 w-7 place-items-center rounded-full bg-brand-600 text-white shadow ring-2 ring-surface ' +
|
|
5349
|
+
`${DARK_PRIMARY_BG} ${DARK_ON_PRIMARY}`;
|
|
5219
5350
|
tileClass = computed(() => {
|
|
5220
5351
|
const ring = this.selected()
|
|
5221
|
-
?
|
|
5352
|
+
? ` ring-2 ring-brand-500 ring-offset-2 ring-offset-canvas ${DARK_PRIMARY_RING}`
|
|
5222
5353
|
: '';
|
|
5223
5354
|
return ('relative flex aspect-square w-full min-h-32 cursor-pointer select-none flex-col overflow-hidden ' +
|
|
5224
5355
|
'rounded-card border-2 text-left shadow-sm transition-[transform,box-shadow] duration-100 ' +
|
|
@@ -5285,7 +5416,7 @@ class SdsStatusTile {
|
|
|
5285
5416
|
|
|
5286
5417
|
@if (selected()) {
|
|
5287
5418
|
<span
|
|
5288
|
-
class="
|
|
5419
|
+
[class]="checkBadgeClass"
|
|
5289
5420
|
aria-hidden="true"
|
|
5290
5421
|
>
|
|
5291
5422
|
<sds-icon name="check" [size]="16" [strokeWidth]="3" />
|
|
@@ -5303,7 +5434,7 @@ class SdsStatusTile {
|
|
|
5303
5434
|
</span>
|
|
5304
5435
|
}
|
|
5305
5436
|
</button>
|
|
5306
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5437
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5307
5438
|
}
|
|
5308
5439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsStatusTile, decorators: [{
|
|
5309
5440
|
type: Component,
|
|
@@ -5366,7 +5497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
5366
5497
|
|
|
5367
5498
|
@if (selected()) {
|
|
5368
5499
|
<span
|
|
5369
|
-
class="
|
|
5500
|
+
[class]="checkBadgeClass"
|
|
5370
5501
|
aria-hidden="true"
|
|
5371
5502
|
>
|
|
5372
5503
|
<sds-icon name="check" [size]="16" [strokeWidth]="3" />
|
|
@@ -5795,7 +5926,7 @@ class SdsMenu {
|
|
|
5795
5926
|
}
|
|
5796
5927
|
</div>
|
|
5797
5928
|
}
|
|
5798
|
-
`, isInline: true, styles: [".animate-sds-menu{animation:sds-menu-pop .12s ease-out}@keyframes sds-menu-pop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-menu{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5929
|
+
`, isInline: true, styles: [".animate-sds-menu{animation:sds-menu-pop .12s ease-out}@keyframes sds-menu-pop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-menu{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5799
5930
|
}
|
|
5800
5931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMenu, decorators: [{
|
|
5801
5932
|
type: Component,
|
|
@@ -5893,6 +6024,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
5893
6024
|
* </sds-bulk-bar>
|
|
5894
6025
|
*/
|
|
5895
6026
|
class SdsBulkBar {
|
|
6027
|
+
/** The selection count: brand fill, inverted in dark unless the preset supplies a dark fill. */
|
|
6028
|
+
countClass = 'inline-flex h-6 min-w-6 items-center justify-center rounded-full bg-brand-600 px-1.5 text-xs font-bold tabular-nums text-white ' +
|
|
6029
|
+
`${DARK_PRIMARY_BG} ${DARK_ON_PRIMARY}`;
|
|
5896
6030
|
/** Number of selected things. The bar is hidden at 0. */
|
|
5897
6031
|
count = input(0, ...(ngDevMode ? [{ debugName: "count", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
5898
6032
|
/** "{count} selected" — `{count}` is replaced. Pass a translated string. */
|
|
@@ -5920,7 +6054,7 @@ class SdsBulkBar {
|
|
|
5920
6054
|
>
|
|
5921
6055
|
<span class="inline-flex items-center gap-2 pr-1 text-sm font-semibold text-ink">
|
|
5922
6056
|
<span
|
|
5923
|
-
class="
|
|
6057
|
+
[class]="countClass"
|
|
5924
6058
|
>{{ count() }}</span
|
|
5925
6059
|
>
|
|
5926
6060
|
{{ countWords() }}
|
|
@@ -5942,7 +6076,7 @@ class SdsBulkBar {
|
|
|
5942
6076
|
</button>
|
|
5943
6077
|
</div>
|
|
5944
6078
|
}
|
|
5945
|
-
`, isInline: true, styles: [".animate-sds-bulk{animation:sds-bulk-in .16s ease-out}@keyframes sds-bulk-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-bulk{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6079
|
+
`, isInline: true, styles: [".animate-sds-bulk{animation:sds-bulk-in .16s ease-out}@keyframes sds-bulk-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-bulk{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5946
6080
|
}
|
|
5947
6081
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsBulkBar, decorators: [{
|
|
5948
6082
|
type: Component,
|
|
@@ -5964,7 +6098,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
5964
6098
|
>
|
|
5965
6099
|
<span class="inline-flex items-center gap-2 pr-1 text-sm font-semibold text-ink">
|
|
5966
6100
|
<span
|
|
5967
|
-
class="
|
|
6101
|
+
[class]="countClass"
|
|
5968
6102
|
>{{ count() }}</span
|
|
5969
6103
|
>
|
|
5970
6104
|
{{ countWords() }}
|
|
@@ -6621,7 +6755,7 @@ class SdsSortableList {
|
|
|
6621
6755
|
|
|
6622
6756
|
<p [id]="instructionsId" class="sr-only">{{ instructions() }}</p>
|
|
6623
6757
|
<div class="sr-only" aria-live="assertive" aria-atomic="true">{{ liveMessage() }}</div>
|
|
6624
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6758
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6625
6759
|
}
|
|
6626
6760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSortableList, decorators: [{
|
|
6627
6761
|
type: Component,
|
|
@@ -6734,6 +6868,9 @@ function sdsFileMatchesAccept(file, accept) {
|
|
|
6734
6868
|
* affordance); clicking anywhere on the zone opens the picker too. All text is set through inputs with
|
|
6735
6869
|
* English defaults.
|
|
6736
6870
|
*
|
|
6871
|
+
* `[loading]` shows a spinner and disables the control while an upload runs; `[ariaLabel]` names the Browse
|
|
6872
|
+
* button when the visible text is shared by several rows ("Upload" beside each document).
|
|
6873
|
+
*
|
|
6737
6874
|
* `appearance="button"` drops the zone and renders only the Browse button (files can still be dropped
|
|
6738
6875
|
* on it) — for a "Replace photo" / "Upload logo" / "Add document" action next to a preview, with the
|
|
6739
6876
|
* same accept/size/count checks and error messages. `browse()` opens the picker from your own control.
|
|
@@ -6754,6 +6891,11 @@ class SdsFileDrop {
|
|
|
6754
6891
|
/** Most files accepted in one pick/drop. Null = no limit (1 when not [multiple]). */
|
|
6755
6892
|
maxFiles = input(null, ...(ngDevMode ? [{ debugName: "maxFiles" }] : []));
|
|
6756
6893
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
6894
|
+
/**
|
|
6895
|
+
* Work in progress (an upload running): a spinner replaces the icon, the control is disabled and marked
|
|
6896
|
+
* `aria-busy`. The host keeps showing its own result/error afterwards.
|
|
6897
|
+
*/
|
|
6898
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
6757
6899
|
/** Icon in the zone at rest. */
|
|
6758
6900
|
icon = input('upload', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
6759
6901
|
/** `zone` (default): the dashed drop zone with a Browse button. `button`: the Browse button alone. */
|
|
@@ -6764,6 +6906,13 @@ class SdsFileDrop {
|
|
|
6764
6906
|
/** Shown while files are dragged over the zone. */
|
|
6765
6907
|
dropLabel = input('Drop to add', ...(ngDevMode ? [{ debugName: "dropLabel" }] : []));
|
|
6766
6908
|
browseLabel = input('Browse files', ...(ngDevMode ? [{ debugName: "browseLabel" }] : []));
|
|
6909
|
+
/** Button text while [loading]. Empty keeps [browseLabel]. */
|
|
6910
|
+
loadingLabel = input('', ...(ngDevMode ? [{ debugName: "loadingLabel" }] : []));
|
|
6911
|
+
/**
|
|
6912
|
+
* Accessible name of the Browse button when its visible text is not enough — several upload buttons in
|
|
6913
|
+
* a list each need to say WHAT they upload ("Upload — VAT certificate"). Empty uses the visible text.
|
|
6914
|
+
*/
|
|
6915
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
6767
6916
|
/** Extra line under the label, e.g. "JPEG or PNG, up to 10 MB". */
|
|
6768
6917
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
6769
6918
|
/** Tokens: `{name}`. */
|
|
@@ -6779,6 +6928,8 @@ class SdsFileDrop {
|
|
|
6779
6928
|
dragging = signal(false, ...(ngDevMode ? [{ debugName: "dragging" }] : []));
|
|
6780
6929
|
errors = signal([], ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
6781
6930
|
dragDepth = 0;
|
|
6931
|
+
isDisabled = computed(() => this.disabled() || this.loading(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
6932
|
+
buttonText = computed(() => this.loading() && this.loadingLabel() ? this.loadingLabel() : this.browseLabel(), ...(ngDevMode ? [{ debugName: "buttonText" }] : []));
|
|
6782
6933
|
describedBy = computed(() => {
|
|
6783
6934
|
const ids = [`${this.zoneId}-label`];
|
|
6784
6935
|
if (this.hint())
|
|
@@ -6790,24 +6941,28 @@ class SdsFileDrop {
|
|
|
6790
6941
|
zoneClass = computed(() => {
|
|
6791
6942
|
const base = 'flex flex-col items-center justify-center gap-2 rounded-card border-2 border-dashed px-6 py-8 ' +
|
|
6792
6943
|
'text-center transition-colors';
|
|
6944
|
+
if (this.loading())
|
|
6945
|
+
return `${base} cursor-progress border-border bg-muted/50`;
|
|
6793
6946
|
if (this.disabled())
|
|
6794
6947
|
return `${base} cursor-not-allowed border-border bg-muted opacity-60`;
|
|
6795
6948
|
return this.dragging()
|
|
6796
|
-
? `${base} cursor-copy border-brand-500 bg-brand-50
|
|
6949
|
+
? `${base} cursor-copy border-brand-500 bg-brand-50 ${DARK_TINT_BG}`
|
|
6797
6950
|
: `${base} cursor-pointer border-border bg-muted/50 hover:border-ink-faint`;
|
|
6798
6951
|
}, ...(ngDevMode ? [{ debugName: "zoneClass" }] : []));
|
|
6799
6952
|
buttonClass = computed(() => {
|
|
6800
6953
|
const size = this.size() === 'sm' ? 'h-8 px-3' : 'h-9 px-3.5';
|
|
6801
|
-
const drag = this.dragging()
|
|
6954
|
+
const drag = this.dragging()
|
|
6955
|
+
? ` border-brand-500 bg-brand-50 ${DARK_TINT_BG}`
|
|
6956
|
+
: ' border-border bg-surface hover:bg-muted';
|
|
6802
6957
|
return (`inline-flex ${size} items-center gap-1.5 rounded-control border text-sm font-semibold text-ink shadow-sm ` +
|
|
6803
6958
|
'transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 ' +
|
|
6804
|
-
'disabled:cursor-not-allowed disabled:opacity-60' +
|
|
6959
|
+
(this.loading() ? 'cursor-progress' : 'disabled:cursor-not-allowed disabled:opacity-60') +
|
|
6805
6960
|
drag);
|
|
6806
6961
|
}, ...(ngDevMode ? [{ debugName: "buttonClass" }] : []));
|
|
6807
6962
|
/** Open the native file picker. */
|
|
6808
6963
|
browse(event) {
|
|
6809
6964
|
event?.stopPropagation();
|
|
6810
|
-
if (this.
|
|
6965
|
+
if (this.isDisabled())
|
|
6811
6966
|
return;
|
|
6812
6967
|
this.fileInput()?.nativeElement.click();
|
|
6813
6968
|
}
|
|
@@ -6817,28 +6972,28 @@ class SdsFileDrop {
|
|
|
6817
6972
|
this.browse();
|
|
6818
6973
|
}
|
|
6819
6974
|
onDragEnter(event) {
|
|
6820
|
-
if (this.
|
|
6975
|
+
if (this.isDisabled() || !this.hasFiles(event))
|
|
6821
6976
|
return;
|
|
6822
6977
|
event.preventDefault();
|
|
6823
6978
|
this.dragDepth++;
|
|
6824
6979
|
this.dragging.set(true);
|
|
6825
6980
|
}
|
|
6826
6981
|
onDragOver(event) {
|
|
6827
|
-
if (this.
|
|
6982
|
+
if (this.isDisabled() || !this.hasFiles(event))
|
|
6828
6983
|
return;
|
|
6829
6984
|
event.preventDefault();
|
|
6830
6985
|
if (event.dataTransfer)
|
|
6831
6986
|
event.dataTransfer.dropEffect = 'copy';
|
|
6832
6987
|
}
|
|
6833
6988
|
onDragLeave(event) {
|
|
6834
|
-
if (this.
|
|
6989
|
+
if (this.isDisabled() || !this.hasFiles(event))
|
|
6835
6990
|
return;
|
|
6836
6991
|
this.dragDepth = Math.max(0, this.dragDepth - 1);
|
|
6837
6992
|
if (this.dragDepth === 0)
|
|
6838
6993
|
this.dragging.set(false);
|
|
6839
6994
|
}
|
|
6840
6995
|
onDrop(event) {
|
|
6841
|
-
if (this.
|
|
6996
|
+
if (this.isDisabled())
|
|
6842
6997
|
return;
|
|
6843
6998
|
event.preventDefault();
|
|
6844
6999
|
this.dragDepth = 0;
|
|
@@ -6897,12 +7052,14 @@ class SdsFileDrop {
|
|
|
6897
7052
|
this.errors.set([]);
|
|
6898
7053
|
}
|
|
6899
7054
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFileDrop, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6900
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsFileDrop, isStandalone: true, selector: "sds-file-drop", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, dropLabel: { classPropertyName: "dropLabel", publicName: "dropLabel", isSignal: true, isRequired: false, transformFunction: null }, browseLabel: { classPropertyName: "browseLabel", publicName: "browseLabel", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, wrongTypeMessage: { classPropertyName: "wrongTypeMessage", publicName: "wrongTypeMessage", isSignal: true, isRequired: false, transformFunction: null }, tooLargeMessage: { classPropertyName: "tooLargeMessage", publicName: "tooLargeMessage", isSignal: true, isRequired: false, transformFunction: null }, tooManyMessage: { classPropertyName: "tooManyMessage", publicName: "tooManyMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "files", rejected: "rejected" }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
7055
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsFileDrop, isStandalone: true, selector: "sds-file-drop", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", 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 }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, dropLabel: { classPropertyName: "dropLabel", publicName: "dropLabel", isSignal: true, isRequired: false, transformFunction: null }, browseLabel: { classPropertyName: "browseLabel", publicName: "browseLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, wrongTypeMessage: { classPropertyName: "wrongTypeMessage", publicName: "wrongTypeMessage", isSignal: true, isRequired: false, transformFunction: null }, tooLargeMessage: { classPropertyName: "tooLargeMessage", publicName: "tooLargeMessage", isSignal: true, isRequired: false, transformFunction: null }, tooManyMessage: { classPropertyName: "tooManyMessage", publicName: "tooManyMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "files", rejected: "rejected" }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
6901
7056
|
@if (appearance() === 'button') {
|
|
6902
7057
|
<button
|
|
6903
7058
|
type="button"
|
|
6904
7059
|
[class]="buttonClass()"
|
|
6905
|
-
[disabled]="
|
|
7060
|
+
[disabled]="isDisabled()"
|
|
7061
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
7062
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
6906
7063
|
[attr.aria-describedby]="errors().length ? zoneId + '-errors' : null"
|
|
6907
7064
|
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
6908
7065
|
(click)="browse($event)"
|
|
@@ -6911,8 +7068,12 @@ class SdsFileDrop {
|
|
|
6911
7068
|
(dragleave)="onDragLeave($event)"
|
|
6912
7069
|
(drop)="onDrop($event)"
|
|
6913
7070
|
>
|
|
6914
|
-
|
|
6915
|
-
|
|
7071
|
+
@if (loading()) {
|
|
7072
|
+
<sds-icon name="loader-circle" [size]="16" class="animate-spin" />
|
|
7073
|
+
} @else {
|
|
7074
|
+
<sds-icon [name]="dragging() ? 'upload' : icon()" [size]="16" />
|
|
7075
|
+
}
|
|
7076
|
+
{{ dragging() ? dropLabel() : buttonText() }}
|
|
6916
7077
|
</button>
|
|
6917
7078
|
<input
|
|
6918
7079
|
#fileInput
|
|
@@ -6922,13 +7083,14 @@ class SdsFileDrop {
|
|
|
6922
7083
|
aria-hidden="true"
|
|
6923
7084
|
[accept]="accept()"
|
|
6924
7085
|
[multiple]="multiple()"
|
|
6925
|
-
[disabled]="
|
|
7086
|
+
[disabled]="isDisabled()"
|
|
6926
7087
|
(change)="onInputChange($event)"
|
|
6927
7088
|
/>
|
|
6928
7089
|
} @else {
|
|
6929
7090
|
<div
|
|
6930
7091
|
[class]="zoneClass()"
|
|
6931
|
-
[attr.aria-disabled]="
|
|
7092
|
+
[attr.aria-disabled]="isDisabled() ? 'true' : null"
|
|
7093
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
6932
7094
|
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
6933
7095
|
(click)="onZoneClick($event)"
|
|
6934
7096
|
(dragenter)="onDragEnter($event)"
|
|
@@ -6940,7 +7102,11 @@ class SdsFileDrop {
|
|
|
6940
7102
|
class="grid h-11 w-11 place-items-center rounded-full bg-surface text-ink-soft shadow-sm ring-1 ring-border"
|
|
6941
7103
|
aria-hidden="true"
|
|
6942
7104
|
>
|
|
6943
|
-
|
|
7105
|
+
@if (loading()) {
|
|
7106
|
+
<sds-icon name="loader-circle" [size]="22" class="animate-spin" />
|
|
7107
|
+
} @else {
|
|
7108
|
+
<sds-icon [name]="dragging() ? 'upload' : icon()" [size]="22" />
|
|
7109
|
+
}
|
|
6944
7110
|
</span>
|
|
6945
7111
|
<p class="text-sm font-semibold text-ink" [id]="zoneId + '-label'">
|
|
6946
7112
|
{{ dragging() ? dropLabel() : label() }}
|
|
@@ -6951,12 +7117,13 @@ class SdsFileDrop {
|
|
|
6951
7117
|
<button
|
|
6952
7118
|
type="button"
|
|
6953
7119
|
class="mt-1 inline-flex h-9 items-center gap-1.5 rounded-control border border-border bg-surface px-3.5 text-sm font-semibold text-ink shadow-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 disabled:cursor-not-allowed disabled:opacity-60"
|
|
6954
|
-
[disabled]="
|
|
7120
|
+
[disabled]="isDisabled()"
|
|
7121
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
6955
7122
|
[attr.aria-describedby]="describedBy()"
|
|
6956
7123
|
(click)="browse($event)"
|
|
6957
7124
|
>
|
|
6958
7125
|
<sds-icon name="upload" [size]="16" />
|
|
6959
|
-
{{
|
|
7126
|
+
{{ buttonText() }}
|
|
6960
7127
|
</button>
|
|
6961
7128
|
<input
|
|
6962
7129
|
#fileInput
|
|
@@ -6966,7 +7133,7 @@ class SdsFileDrop {
|
|
|
6966
7133
|
aria-hidden="true"
|
|
6967
7134
|
[accept]="accept()"
|
|
6968
7135
|
[multiple]="multiple()"
|
|
6969
|
-
[disabled]="
|
|
7136
|
+
[disabled]="isDisabled()"
|
|
6970
7137
|
(change)="onInputChange($event)"
|
|
6971
7138
|
/>
|
|
6972
7139
|
</div>
|
|
@@ -6984,7 +7151,7 @@ class SdsFileDrop {
|
|
|
6984
7151
|
</ul>
|
|
6985
7152
|
}
|
|
6986
7153
|
</div>
|
|
6987
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7154
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6988
7155
|
}
|
|
6989
7156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFileDrop, decorators: [{
|
|
6990
7157
|
type: Component,
|
|
@@ -6998,7 +7165,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6998
7165
|
<button
|
|
6999
7166
|
type="button"
|
|
7000
7167
|
[class]="buttonClass()"
|
|
7001
|
-
[disabled]="
|
|
7168
|
+
[disabled]="isDisabled()"
|
|
7169
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
7170
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
7002
7171
|
[attr.aria-describedby]="errors().length ? zoneId + '-errors' : null"
|
|
7003
7172
|
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
7004
7173
|
(click)="browse($event)"
|
|
@@ -7007,8 +7176,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7007
7176
|
(dragleave)="onDragLeave($event)"
|
|
7008
7177
|
(drop)="onDrop($event)"
|
|
7009
7178
|
>
|
|
7010
|
-
|
|
7011
|
-
|
|
7179
|
+
@if (loading()) {
|
|
7180
|
+
<sds-icon name="loader-circle" [size]="16" class="animate-spin" />
|
|
7181
|
+
} @else {
|
|
7182
|
+
<sds-icon [name]="dragging() ? 'upload' : icon()" [size]="16" />
|
|
7183
|
+
}
|
|
7184
|
+
{{ dragging() ? dropLabel() : buttonText() }}
|
|
7012
7185
|
</button>
|
|
7013
7186
|
<input
|
|
7014
7187
|
#fileInput
|
|
@@ -7018,13 +7191,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7018
7191
|
aria-hidden="true"
|
|
7019
7192
|
[accept]="accept()"
|
|
7020
7193
|
[multiple]="multiple()"
|
|
7021
|
-
[disabled]="
|
|
7194
|
+
[disabled]="isDisabled()"
|
|
7022
7195
|
(change)="onInputChange($event)"
|
|
7023
7196
|
/>
|
|
7024
7197
|
} @else {
|
|
7025
7198
|
<div
|
|
7026
7199
|
[class]="zoneClass()"
|
|
7027
|
-
[attr.aria-disabled]="
|
|
7200
|
+
[attr.aria-disabled]="isDisabled() ? 'true' : null"
|
|
7201
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
7028
7202
|
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
7029
7203
|
(click)="onZoneClick($event)"
|
|
7030
7204
|
(dragenter)="onDragEnter($event)"
|
|
@@ -7036,7 +7210,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7036
7210
|
class="grid h-11 w-11 place-items-center rounded-full bg-surface text-ink-soft shadow-sm ring-1 ring-border"
|
|
7037
7211
|
aria-hidden="true"
|
|
7038
7212
|
>
|
|
7039
|
-
|
|
7213
|
+
@if (loading()) {
|
|
7214
|
+
<sds-icon name="loader-circle" [size]="22" class="animate-spin" />
|
|
7215
|
+
} @else {
|
|
7216
|
+
<sds-icon [name]="dragging() ? 'upload' : icon()" [size]="22" />
|
|
7217
|
+
}
|
|
7040
7218
|
</span>
|
|
7041
7219
|
<p class="text-sm font-semibold text-ink" [id]="zoneId + '-label'">
|
|
7042
7220
|
{{ dragging() ? dropLabel() : label() }}
|
|
@@ -7047,12 +7225,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7047
7225
|
<button
|
|
7048
7226
|
type="button"
|
|
7049
7227
|
class="mt-1 inline-flex h-9 items-center gap-1.5 rounded-control border border-border bg-surface px-3.5 text-sm font-semibold text-ink shadow-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 disabled:cursor-not-allowed disabled:opacity-60"
|
|
7050
|
-
[disabled]="
|
|
7228
|
+
[disabled]="isDisabled()"
|
|
7229
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
7051
7230
|
[attr.aria-describedby]="describedBy()"
|
|
7052
7231
|
(click)="browse($event)"
|
|
7053
7232
|
>
|
|
7054
7233
|
<sds-icon name="upload" [size]="16" />
|
|
7055
|
-
{{
|
|
7234
|
+
{{ buttonText() }}
|
|
7056
7235
|
</button>
|
|
7057
7236
|
<input
|
|
7058
7237
|
#fileInput
|
|
@@ -7062,7 +7241,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7062
7241
|
aria-hidden="true"
|
|
7063
7242
|
[accept]="accept()"
|
|
7064
7243
|
[multiple]="multiple()"
|
|
7065
|
-
[disabled]="
|
|
7244
|
+
[disabled]="isDisabled()"
|
|
7066
7245
|
(change)="onInputChange($event)"
|
|
7067
7246
|
/>
|
|
7068
7247
|
</div>
|
|
@@ -7082,7 +7261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7082
7261
|
</div>
|
|
7083
7262
|
`,
|
|
7084
7263
|
}]
|
|
7085
|
-
}], propDecorators: { fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", 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 }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], dropLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropLabel", required: false }] }], browseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseLabel", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], wrongTypeMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrongTypeMessage", required: false }] }], tooLargeMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooLargeMessage", required: false }] }], tooManyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooManyMessage", required: false }] }], files: [{ type: i0.Output, args: ["files"] }], rejected: [{ type: i0.Output, args: ["rejected"] }] } });
|
|
7264
|
+
}], propDecorators: { fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", 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 }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], dropLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropLabel", required: false }] }], browseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], wrongTypeMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrongTypeMessage", required: false }] }], tooLargeMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooLargeMessage", required: false }] }], tooManyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooManyMessage", required: false }] }], files: [{ type: i0.Output, args: ["files"] }], rejected: [{ type: i0.Output, args: ["rejected"] }] } });
|
|
7086
7265
|
|
|
7087
7266
|
let nextId$8 = 0;
|
|
7088
7267
|
/**
|
|
@@ -7496,7 +7675,7 @@ class SdsImageCropper {
|
|
|
7496
7675
|
<sds-icon name="zoom-in" [size]="18" />
|
|
7497
7676
|
</button>
|
|
7498
7677
|
</div>
|
|
7499
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7678
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7500
7679
|
}
|
|
7501
7680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsImageCropper, decorators: [{
|
|
7502
7681
|
type: Component,
|
|
@@ -7721,7 +7900,7 @@ class SdsCalendar {
|
|
|
7721
7900
|
navBtn = 'inline-flex h-8 w-8 items-center justify-center rounded-control text-ink-soft hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500';
|
|
7722
7901
|
titleBtn = 'rounded-control px-2 py-1 capitalize hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500';
|
|
7723
7902
|
actionBtn = 'rounded-control px-2 py-1 text-xs font-medium text-brand-700 hover:bg-brand-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 disabled:cursor-not-allowed disabled:opacity-40';
|
|
7724
|
-
doneBtn =
|
|
7903
|
+
doneBtn = `rounded-control bg-brand-600 px-3 py-1 text-xs font-semibold text-white hover:bg-brand-700 ${DARK_BRAND_FILL_HOVER} focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500`;
|
|
7725
7904
|
timeInput = 'w-8 bg-transparent py-1 text-center text-sm text-ink outline-none disabled:cursor-not-allowed disabled:opacity-40';
|
|
7726
7905
|
stepBtn = 'flex h-3.5 w-5 items-center justify-center text-ink-faint transition-colors hover:text-ink focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-30';
|
|
7727
7906
|
// --- labels ---
|
|
@@ -7977,7 +8156,7 @@ class SdsCalendar {
|
|
|
7977
8156
|
dayClass(cell) {
|
|
7978
8157
|
const base = 'inline-flex h-9 w-9 items-center justify-center rounded-full text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 disabled:cursor-not-allowed disabled:opacity-40';
|
|
7979
8158
|
if (cell.selected)
|
|
7980
|
-
return `${base} bg-brand-600 font-semibold text-white hover:bg-brand-700`;
|
|
8159
|
+
return `${base} bg-brand-600 font-semibold text-white hover:bg-brand-700 ${DARK_BRAND_FILL_HOVER}`;
|
|
7981
8160
|
let cls = `${base} hover:bg-brand-50`;
|
|
7982
8161
|
if (cell.otherMonth)
|
|
7983
8162
|
cls += ' text-ink-faint';
|
|
@@ -7990,7 +8169,7 @@ class SdsCalendar {
|
|
|
7990
8169
|
cellClass(selected, current, disabled) {
|
|
7991
8170
|
const base = 'h-10 rounded-control text-sm capitalize transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 disabled:cursor-not-allowed disabled:opacity-40';
|
|
7992
8171
|
if (selected)
|
|
7993
|
-
return `${base} bg-brand-600 font-semibold text-white hover:bg-brand-700`;
|
|
8172
|
+
return `${base} bg-brand-600 font-semibold text-white hover:bg-brand-700 ${DARK_BRAND_FILL_HOVER}`;
|
|
7994
8173
|
let cls = `${base} text-ink hover:bg-brand-50`;
|
|
7995
8174
|
if (current)
|
|
7996
8175
|
cls += ' font-semibold text-brand-600';
|
|
@@ -8217,7 +8396,7 @@ class SdsCalendar {
|
|
|
8217
8396
|
</div>
|
|
8218
8397
|
}
|
|
8219
8398
|
</div>
|
|
8220
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8399
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8221
8400
|
}
|
|
8222
8401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsCalendar, decorators: [{
|
|
8223
8402
|
type: Component,
|
|
@@ -8846,7 +9025,7 @@ class SdsDatePicker {
|
|
|
8846
9025
|
@if (error()) {
|
|
8847
9026
|
<p class="mt-1.5 text-xs font-medium text-danger">{{ error() }}</p>
|
|
8848
9027
|
}
|
|
8849
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }, { kind: "component", type: SdsCalendar, selector: "sds-calendar", inputs: ["value", "min", "max", "firstDayOfWeek", "locale", "showActions", "showTime", "showDone", "timeLabel", "hoursLabel", "minutesLabel", "doneLabel", "calendarLabel", "previousLabel", "nextLabel", "todayActionLabel", "clearActionLabel"], outputs: ["valueChange", "dateSelect", "done"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9028
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "component", type: SdsCalendar, selector: "sds-calendar", inputs: ["value", "min", "max", "firstDayOfWeek", "locale", "showActions", "showTime", "showDone", "timeLabel", "hoursLabel", "minutesLabel", "doneLabel", "calendarLabel", "previousLabel", "nextLabel", "todayActionLabel", "clearActionLabel"], outputs: ["valueChange", "dateSelect", "done"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8850
9029
|
}
|
|
8851
9030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsDatePicker, decorators: [{
|
|
8852
9031
|
type: Component,
|
|
@@ -9145,6 +9324,14 @@ class SdsSelect {
|
|
|
9145
9324
|
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
9146
9325
|
filled = computed(() => this.appearance() === 'filled', ...(ngDevMode ? [{ debugName: "filled" }] : []));
|
|
9147
9326
|
onBrand = computed(() => this.appearance() === 'on-brand', ...(ngDevMode ? [{ debugName: "onBrand" }] : []));
|
|
9327
|
+
/** The trigger's value / placeholder colour: on the dark `on-brand` surface it stays white in light mode too. */
|
|
9328
|
+
valueTextClass = computed(() => {
|
|
9329
|
+
const selected = !!this.selectedOption();
|
|
9330
|
+
if (this.onBrand()) {
|
|
9331
|
+
return selected ? 'text-white' : 'text-white/60';
|
|
9332
|
+
}
|
|
9333
|
+
return selected ? 'text-ink' : 'text-ink-faint';
|
|
9334
|
+
}, ...(ngDevMode ? [{ debugName: "valueTextClass" }] : []));
|
|
9148
9335
|
normalizedOptions = computed(() => this.options().map((o) => this.norm(o)), ...(ngDevMode ? [{ debugName: "normalizedOptions" }] : []));
|
|
9149
9336
|
filteredOptions = computed(() => {
|
|
9150
9337
|
const f = this.filterText().trim().toLowerCase();
|
|
@@ -9510,7 +9697,10 @@ class SdsSelect {
|
|
|
9510
9697
|
(keydown)="onTriggerKeydown($event)"
|
|
9511
9698
|
>
|
|
9512
9699
|
@if (optionTpl() && selectedOption()) {
|
|
9513
|
-
<span
|
|
9700
|
+
<span
|
|
9701
|
+
class="flex flex-1 items-center gap-2 truncate pl-3.5"
|
|
9702
|
+
[class]="onBrand() ? 'text-white' : 'text-ink'"
|
|
9703
|
+
>
|
|
9514
9704
|
<ng-container
|
|
9515
9705
|
[ngTemplateOutlet]="optionTpl()!.template"
|
|
9516
9706
|
[ngTemplateOutletContext]="triggerContext()!"
|
|
@@ -9519,7 +9709,7 @@ class SdsSelect {
|
|
|
9519
9709
|
} @else {
|
|
9520
9710
|
<span
|
|
9521
9711
|
class="flex-1 truncate pl-3.5"
|
|
9522
|
-
[class]="
|
|
9712
|
+
[class]="valueTextClass()"
|
|
9523
9713
|
>
|
|
9524
9714
|
{{ selectedOption() ? selectedOption()!.label : placeholder() }}
|
|
9525
9715
|
</span>
|
|
@@ -9530,7 +9720,8 @@ class SdsSelect {
|
|
|
9530
9720
|
type="button"
|
|
9531
9721
|
tabindex="-1"
|
|
9532
9722
|
[attr.aria-label]="clearLabel()"
|
|
9533
|
-
class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full
|
|
9723
|
+
class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full"
|
|
9724
|
+
[class]="onBrand() ? 'text-white/60 hover:bg-white/10 hover:text-white' : 'text-ink-faint hover:bg-black/5 hover:text-ink-soft'"
|
|
9534
9725
|
(click)="clear($event)"
|
|
9535
9726
|
>
|
|
9536
9727
|
<sds-icon name="x" [size]="15" />
|
|
@@ -9538,7 +9729,9 @@ class SdsSelect {
|
|
|
9538
9729
|
}
|
|
9539
9730
|
|
|
9540
9731
|
<span
|
|
9541
|
-
class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center
|
|
9732
|
+
class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center transition-transform duration-150"
|
|
9733
|
+
[class.text-ink-soft]="!onBrand()"
|
|
9734
|
+
[class.text-white/70]="onBrand()"
|
|
9542
9735
|
[class.rotate-180]="open()"
|
|
9543
9736
|
>
|
|
9544
9737
|
<sds-icon name="chevron-down" [size]="18" />
|
|
@@ -9627,7 +9820,7 @@ class SdsSelect {
|
|
|
9627
9820
|
@if (error()) {
|
|
9628
9821
|
<p class="mt-1.5 text-xs font-medium text-danger">{{ error() }}</p>
|
|
9629
9822
|
}
|
|
9630
|
-
`, 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 });
|
|
9823
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9631
9824
|
}
|
|
9632
9825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSelect, decorators: [{
|
|
9633
9826
|
type: Component,
|
|
@@ -9666,7 +9859,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9666
9859
|
(keydown)="onTriggerKeydown($event)"
|
|
9667
9860
|
>
|
|
9668
9861
|
@if (optionTpl() && selectedOption()) {
|
|
9669
|
-
<span
|
|
9862
|
+
<span
|
|
9863
|
+
class="flex flex-1 items-center gap-2 truncate pl-3.5"
|
|
9864
|
+
[class]="onBrand() ? 'text-white' : 'text-ink'"
|
|
9865
|
+
>
|
|
9670
9866
|
<ng-container
|
|
9671
9867
|
[ngTemplateOutlet]="optionTpl()!.template"
|
|
9672
9868
|
[ngTemplateOutletContext]="triggerContext()!"
|
|
@@ -9675,7 +9871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9675
9871
|
} @else {
|
|
9676
9872
|
<span
|
|
9677
9873
|
class="flex-1 truncate pl-3.5"
|
|
9678
|
-
[class]="
|
|
9874
|
+
[class]="valueTextClass()"
|
|
9679
9875
|
>
|
|
9680
9876
|
{{ selectedOption() ? selectedOption()!.label : placeholder() }}
|
|
9681
9877
|
</span>
|
|
@@ -9686,7 +9882,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9686
9882
|
type="button"
|
|
9687
9883
|
tabindex="-1"
|
|
9688
9884
|
[attr.aria-label]="clearLabel()"
|
|
9689
|
-
class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full
|
|
9885
|
+
class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full"
|
|
9886
|
+
[class]="onBrand() ? 'text-white/60 hover:bg-white/10 hover:text-white' : 'text-ink-faint hover:bg-black/5 hover:text-ink-soft'"
|
|
9690
9887
|
(click)="clear($event)"
|
|
9691
9888
|
>
|
|
9692
9889
|
<sds-icon name="x" [size]="15" />
|
|
@@ -9694,7 +9891,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9694
9891
|
}
|
|
9695
9892
|
|
|
9696
9893
|
<span
|
|
9697
|
-
class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center
|
|
9894
|
+
class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center transition-transform duration-150"
|
|
9895
|
+
[class.text-ink-soft]="!onBrand()"
|
|
9896
|
+
[class.text-white/70]="onBrand()"
|
|
9698
9897
|
[class.rotate-180]="open()"
|
|
9699
9898
|
>
|
|
9700
9899
|
<sds-icon name="chevron-down" [size]="18" />
|
|
@@ -9859,6 +10058,14 @@ class SdsMultiSelect {
|
|
|
9859
10058
|
filterLabel = input('Search', ...(ngDevMode ? [{ debugName: "filterLabel" }] : []));
|
|
9860
10059
|
/** Visible text of the "select all" row (see {@link showToggleAll}). */
|
|
9861
10060
|
selectAllLabel = input('Select all', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : []));
|
|
10061
|
+
/** The panel opened. */
|
|
10062
|
+
opened = output();
|
|
10063
|
+
/**
|
|
10064
|
+
* The panel closed (Escape, Tab, an outside click, a re-click on the field, a footer `close()`), with
|
|
10065
|
+
* the selection at that moment. For "apply on close": take the value here instead of on every
|
|
10066
|
+
* `ngModelChange`. Not emitted when the component is destroyed with the panel open.
|
|
10067
|
+
*/
|
|
10068
|
+
closed = output();
|
|
9862
10069
|
/** Optional projected `<ng-template sdsSelectOption>` — custom option-row rendering. */
|
|
9863
10070
|
optionTpl = contentChild(SdsSelectOption, ...(ngDevMode ? [{ debugName: "optionTpl" }] : []));
|
|
9864
10071
|
/** Optional projected `<ng-template sdsSelectEmpty>` — custom no-results content. */
|
|
@@ -9990,6 +10197,7 @@ class SdsMultiSelect {
|
|
|
9990
10197
|
return;
|
|
9991
10198
|
this.filterText.set('');
|
|
9992
10199
|
this.open.set(true);
|
|
10200
|
+
this.opened.emit();
|
|
9993
10201
|
this.onTouched();
|
|
9994
10202
|
this.initHighlight();
|
|
9995
10203
|
afterNextRender(() => {
|
|
@@ -10014,6 +10222,7 @@ class SdsMultiSelect {
|
|
|
10014
10222
|
this.open.set(false);
|
|
10015
10223
|
if (returnFocus)
|
|
10016
10224
|
this.trigger()?.nativeElement.focus();
|
|
10225
|
+
this.closed.emit([...this.value()]);
|
|
10017
10226
|
}
|
|
10018
10227
|
clear(event) {
|
|
10019
10228
|
event.stopPropagation();
|
|
@@ -10258,7 +10467,7 @@ class SdsMultiSelect {
|
|
|
10258
10467
|
this.close();
|
|
10259
10468
|
}
|
|
10260
10469
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMultiSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10261
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsMultiSelect, isStandalone: true, selector: "sds-multi-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", 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 }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", 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 }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, classAttribute: "block" }, providers: [
|
|
10470
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsMultiSelect, isStandalone: true, selector: "sds-multi-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", 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 }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", 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 }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, classAttribute: "block" }, providers: [
|
|
10262
10471
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SdsMultiSelect), multi: true },
|
|
10263
10472
|
], queries: [{ propertyName: "optionTpl", first: true, predicate: SdsSelectOption, descendants: true, isSignal: true }, { propertyName: "emptyTpl", first: true, predicate: SdsSelectEmpty, descendants: true, isSignal: true }, { propertyName: "footerTpl", first: true, predicate: SdsSelectFooter, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
10264
10473
|
@if (label()) {
|
|
@@ -10436,7 +10645,7 @@ class SdsMultiSelect {
|
|
|
10436
10645
|
@if (error()) {
|
|
10437
10646
|
<p class="mt-1.5 text-xs font-medium text-danger">{{ error() }}</p>
|
|
10438
10647
|
}
|
|
10439
|
-
`, 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 });
|
|
10648
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10440
10649
|
}
|
|
10441
10650
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMultiSelect, decorators: [{
|
|
10442
10651
|
type: Component,
|
|
@@ -10629,7 +10838,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
10629
10838
|
}
|
|
10630
10839
|
`,
|
|
10631
10840
|
}]
|
|
10632
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", 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 }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectedItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsLabel", required: false }] }], showToggleAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAll", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], optionTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdsSelectOption), { isSignal: true }] }], emptyTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdsSelectEmpty), { isSignal: true }] }], footerTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdsSelectFooter), { isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
10841
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", 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 }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], selectedItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItemsLabel", required: false }] }], showToggleAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAll", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], optionTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdsSelectOption), { isSignal: true }] }], emptyTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdsSelectEmpty), { isSignal: true }] }], footerTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdsSelectFooter), { isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
10633
10842
|
|
|
10634
10843
|
const SDS_PHONE_COUNTRIES = [
|
|
10635
10844
|
{ iso2: 'BE', name: 'Belgium', dialCode: '32', lengths: [9], format: '### ## ## ##', example: '470123456' },
|
|
@@ -11288,7 +11497,7 @@ class SdsPhoneInput {
|
|
|
11288
11497
|
{{ hint() || autoHint() }}
|
|
11289
11498
|
</p>
|
|
11290
11499
|
}
|
|
11291
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11500
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11292
11501
|
}
|
|
11293
11502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsPhoneInput, decorators: [{
|
|
11294
11503
|
type: Component,
|
|
@@ -11551,7 +11760,7 @@ class SdsPaginator {
|
|
|
11551
11760
|
if (this.disabled())
|
|
11552
11761
|
return `${cls} text-ink-faint opacity-50 cursor-not-allowed`;
|
|
11553
11762
|
return active
|
|
11554
|
-
? `${cls} bg-brand-600 text-white hover:bg-brand-700 cursor-pointer`
|
|
11763
|
+
? `${cls} bg-brand-600 text-white hover:bg-brand-700 ${DARK_BRAND_FILL_HOVER} cursor-pointer`
|
|
11555
11764
|
: `${cls} text-ink-soft hover:bg-muted cursor-pointer`;
|
|
11556
11765
|
}
|
|
11557
11766
|
firstPage() {
|
|
@@ -11707,7 +11916,7 @@ class SdsPaginator {
|
|
|
11707
11916
|
</label>
|
|
11708
11917
|
}
|
|
11709
11918
|
</div>
|
|
11710
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }, { kind: "component", type: SdsSelect, selector: "sds-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "label", "ariaLabel", "hint", "error", "size", "appearance", "disabled", "clearable", "filter", "filterPlaceholder", "emptyMessage", "clearLabel", "filterLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11919
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "component", type: SdsSelect, selector: "sds-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "label", "ariaLabel", "hint", "error", "size", "appearance", "disabled", "clearable", "filter", "filterPlaceholder", "emptyMessage", "clearLabel", "filterLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11711
11920
|
}
|
|
11712
11921
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsPaginator, decorators: [{
|
|
11713
11922
|
type: Component,
|
|
@@ -11961,10 +12170,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
11961
12170
|
* Container (role="tablist") for the <sds-tab> headers. Renders the bottom rule
|
|
11962
12171
|
* and handles roving-focus keyboard navigation (Arrow keys, Home, End) with
|
|
11963
12172
|
* automatic activation.
|
|
12173
|
+
*
|
|
12174
|
+
* Name the tab set with [ariaLabel] (or [ariaLabelledby] pointing at a visible heading) when the page has
|
|
12175
|
+
* more than one, or when the tabs alone do not say what they switch.
|
|
12176
|
+
*
|
|
12177
|
+
* @example
|
|
12178
|
+
* <sds-tab-list [ariaLabel]="'Order status'">…</sds-tab-list>
|
|
11964
12179
|
*/
|
|
11965
12180
|
class SdsTabList {
|
|
11966
12181
|
host = inject(ElementRef);
|
|
11967
12182
|
store = inject(SdsTabsStore);
|
|
12183
|
+
/** Accessible name of the tablist. */
|
|
12184
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
12185
|
+
/** Id of a visible element that names the tablist (takes precedence over [ariaLabel] for AT). */
|
|
12186
|
+
ariaLabelledby = input('', ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : []));
|
|
11968
12187
|
listClass = computed(() => {
|
|
11969
12188
|
const base = 'relative flex border-b border-border';
|
|
11970
12189
|
return this.store.scrollable() ? `${base} overflow-x-auto` : base;
|
|
@@ -11998,7 +12217,7 @@ class SdsTabList {
|
|
|
11998
12217
|
el.click(); // automatic activation
|
|
11999
12218
|
}
|
|
12000
12219
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTabList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12001
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
12220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SdsTabList, isStandalone: true, selector: "sds-tab-list", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tablist" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "listClass()", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "ariaLabelledby() || null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12002
12221
|
}
|
|
12003
12222
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTabList, decorators: [{
|
|
12004
12223
|
type: Component,
|
|
@@ -12008,11 +12227,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
12008
12227
|
host: {
|
|
12009
12228
|
role: 'tablist',
|
|
12010
12229
|
'[class]': 'listClass()',
|
|
12230
|
+
'[attr.aria-label]': 'ariaLabel() || null',
|
|
12231
|
+
'[attr.aria-labelledby]': 'ariaLabelledby() || null',
|
|
12011
12232
|
'(keydown)': 'onKeydown($event)',
|
|
12012
12233
|
},
|
|
12013
12234
|
template: `<ng-content />`,
|
|
12014
12235
|
}]
|
|
12015
|
-
}] });
|
|
12236
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }] } });
|
|
12016
12237
|
|
|
12017
12238
|
/**
|
|
12018
12239
|
* A single tab header (role="tab"). Project the label and, optionally, an
|
|
@@ -12358,7 +12579,7 @@ class SdsAccordionHeader {
|
|
|
12358
12579
|
[class.rotate-180]="panel.open()"
|
|
12359
12580
|
/>
|
|
12360
12581
|
</button>
|
|
12361
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12582
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12362
12583
|
}
|
|
12363
12584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsAccordionHeader, decorators: [{
|
|
12364
12585
|
type: Component,
|
|
@@ -14059,7 +14280,7 @@ class SdsTable {
|
|
|
14059
14280
|
</div>
|
|
14060
14281
|
}
|
|
14061
14282
|
</div>
|
|
14062
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }, { kind: "component", type: SdsPaginator, selector: "sds-paginator", inputs: ["totalRecords", "first", "rows", "rowsPerPageOptions", "pageLinkSize", "showFirstLastIcon", "showPageLinks", "showCurrentPageReport", "currentPageReportTemplate", "showJumpToPageInput", "rowsPerPageLabel", "jumpToPageLabel", "paginationLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "pageLinkLabel", "jumpToPageAriaLabel", "size", "disabled"], outputs: ["firstChange", "rowsChange", "pageChange"] }, { kind: "component", type: SdsInputNumber, selector: "sds-input-number", inputs: ["label", "ariaLabel", "placeholder", "hint", "error", "invalid", "ariaDescribedby", "size", "appearance", "disabled", "readonly", "mode", "locale", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "min", "max", "step", "showButtons", "buttonLayout", "incrementIcon", "decrementIcon", "allowEmpty", "clearable", "clearLabel", "incrementLabel", "decrementLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14283
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "component", type: SdsPaginator, selector: "sds-paginator", inputs: ["totalRecords", "first", "rows", "rowsPerPageOptions", "pageLinkSize", "showFirstLastIcon", "showPageLinks", "showCurrentPageReport", "currentPageReportTemplate", "showJumpToPageInput", "rowsPerPageLabel", "jumpToPageLabel", "paginationLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "pageLinkLabel", "jumpToPageAriaLabel", "size", "disabled"], outputs: ["firstChange", "rowsChange", "pageChange"] }, { kind: "component", type: SdsInputNumber, selector: "sds-input-number", inputs: ["label", "ariaLabel", "placeholder", "hint", "error", "invalid", "required", "ariaDescribedby", "size", "appearance", "disabled", "readonly", "mode", "locale", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "min", "max", "step", "showButtons", "buttonLayout", "incrementIcon", "decrementIcon", "allowEmpty", "clearable", "clearLabel", "incrementLabel", "decrementLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14063
14284
|
}
|
|
14064
14285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTable, decorators: [{
|
|
14065
14286
|
type: Component,
|
|
@@ -14613,7 +14834,7 @@ class SdsToastHost {
|
|
|
14613
14834
|
</button>
|
|
14614
14835
|
</div>
|
|
14615
14836
|
</ng-template>
|
|
14616
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14837
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14617
14838
|
}
|
|
14618
14839
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsToastHost, decorators: [{
|
|
14619
14840
|
type: Component,
|
|
@@ -14776,7 +14997,7 @@ class SdsThemeToggle {
|
|
|
14776
14997
|
>
|
|
14777
14998
|
<sds-icon [name]="isDark() ? 'sun' : 'moon'" [size]="iconSize()" />
|
|
14778
14999
|
</button>
|
|
14779
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15000
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14780
15001
|
}
|
|
14781
15002
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsThemeToggle, decorators: [{
|
|
14782
15003
|
type: Component,
|
|
@@ -15019,7 +15240,7 @@ class SdsTopbar {
|
|
|
15019
15240
|
</div>
|
|
15020
15241
|
</div>
|
|
15021
15242
|
</header>
|
|
15022
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15243
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15023
15244
|
}
|
|
15024
15245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTopbar, decorators: [{
|
|
15025
15246
|
type: Component,
|
|
@@ -15414,7 +15635,7 @@ class SdsSidebar {
|
|
|
15414
15635
|
<ng-content select="[sdsFooter]" />
|
|
15415
15636
|
</div>
|
|
15416
15637
|
</aside>
|
|
15417
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15638
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15418
15639
|
}
|
|
15419
15640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSidebar, decorators: [{
|
|
15420
15641
|
type: Component,
|
|
@@ -15657,7 +15878,7 @@ class SdsNavGroup {
|
|
|
15657
15878
|
<ng-content />
|
|
15658
15879
|
</div>
|
|
15659
15880
|
</div>
|
|
15660
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15881
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15661
15882
|
}
|
|
15662
15883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsNavGroup, decorators: [{
|
|
15663
15884
|
type: Component,
|
|
@@ -15775,7 +15996,7 @@ class SdsNavItem {
|
|
|
15775
15996
|
: this.badgeTone() === 'neutral'
|
|
15776
15997
|
? 'bg-muted text-ink-soft border border-border'
|
|
15777
15998
|
: this.store.appearance() === 'surface'
|
|
15778
|
-
?
|
|
15999
|
+
? `bg-brand-600 text-white ${DARK_PRIMARY_BG} ${DARK_ON_PRIMARY}`
|
|
15779
16000
|
: 'bg-white text-brand-800';
|
|
15780
16001
|
const base = 'ml-auto inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-1.5 ' +
|
|
15781
16002
|
'text-[11px] font-bold tabular-nums leading-none';
|
|
@@ -15860,7 +16081,7 @@ class SdsNavItem {
|
|
|
15860
16081
|
<span class="sr-only">, {{ text }}</span>
|
|
15861
16082
|
}
|
|
15862
16083
|
</ng-template>
|
|
15863
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16084
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15864
16085
|
}
|
|
15865
16086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsNavItem, decorators: [{
|
|
15866
16087
|
type: Component,
|
|
@@ -16067,7 +16288,7 @@ class SdsUserMenu {
|
|
|
16067
16288
|
</div>
|
|
16068
16289
|
</div>
|
|
16069
16290
|
}
|
|
16070
|
-
`, isInline: true, styles: [".animate-sds-menu{animation:sds-menu-in .14s ease-out}@keyframes sds-menu-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-menu{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsAvatar, selector: "sds-avatar", inputs: ["name", "initials", "src", "size", "status", "shape", "bgClass", "fallbackIcon", "placeholderClass", "decorative", "lazy"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16291
|
+
`, isInline: true, styles: [".animate-sds-menu{animation:sds-menu-in .14s ease-out}@keyframes sds-menu-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-menu{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsAvatar, selector: "sds-avatar", inputs: ["name", "initials", "src", "size", "status", "shape", "bgClass", "fallbackIcon", "placeholderClass", "decorative", "lazy"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16071
16292
|
}
|
|
16072
16293
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsUserMenu, decorators: [{
|
|
16073
16294
|
type: Component,
|
|
@@ -16218,7 +16439,7 @@ class SdsMenuItem {
|
|
|
16218
16439
|
<span class="flex-1 truncate text-left">{{ label() }}</span>
|
|
16219
16440
|
<ng-content />
|
|
16220
16441
|
</ng-template>
|
|
16221
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16442
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16222
16443
|
}
|
|
16223
16444
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMenuItem, decorators: [{
|
|
16224
16445
|
type: Component,
|
|
@@ -16606,7 +16827,7 @@ class SdsSearchCommand {
|
|
|
16606
16827
|
</div>
|
|
16607
16828
|
</div>
|
|
16608
16829
|
}
|
|
16609
|
-
`, isInline: true, styles: [".animate-sds-cmd{animation:sds-cmd-in .16s ease-out}@keyframes sds-cmd-in{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.animate-sds-cmd{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16830
|
+
`, isInline: true, styles: [".animate-sds-cmd{animation:sds-cmd-in .16s ease-out}@keyframes sds-cmd-in{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.animate-sds-cmd{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16610
16831
|
}
|
|
16611
16832
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSearchCommand, decorators: [{
|
|
16612
16833
|
type: Component,
|
|
@@ -17054,7 +17275,7 @@ class SdsLanguageSwitcher {
|
|
|
17054
17275
|
</div>
|
|
17055
17276
|
</div>
|
|
17056
17277
|
}
|
|
17057
|
-
`, isInline: true, styles: [".animate-sds-menu{animation:sds-menu-in .14s ease-out}@keyframes sds-menu-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-menu{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17278
|
+
`, isInline: true, styles: [".animate-sds-menu{animation:sds-menu-in .14s ease-out}@keyframes sds-menu-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-menu{animation:none}}\n"], dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17058
17279
|
}
|
|
17059
17280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsLanguageSwitcher, decorators: [{
|
|
17060
17281
|
type: Component,
|