@besaitech/ng-design-system 0.0.55 → 0.0.57
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 +390 -115
- package/fesm2022/besaitech-ng-design-system.mjs.map +1 -1
- package/index.d.ts +118 -31
- 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,13 @@ 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
|
+
*
|
|
6874
|
+
* `appearance="button"` drops the zone and renders only the Browse button (files can still be dropped
|
|
6875
|
+
* on it) — for a "Replace photo" / "Upload logo" / "Add document" action next to a preview, with the
|
|
6876
|
+
* same accept/size/count checks and error messages. `browse()` opens the picker from your own control.
|
|
6877
|
+
*
|
|
6737
6878
|
* @example
|
|
6738
6879
|
* <sds-file-drop accept="image/jpeg,image/png,image/webp" multiple [maxSize]="10_000_000"
|
|
6739
6880
|
* label="Drop photos here" browseLabel="Choose photos"
|
|
@@ -6750,12 +6891,28 @@ class SdsFileDrop {
|
|
|
6750
6891
|
/** Most files accepted in one pick/drop. Null = no limit (1 when not [multiple]). */
|
|
6751
6892
|
maxFiles = input(null, ...(ngDevMode ? [{ debugName: "maxFiles" }] : []));
|
|
6752
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 }]));
|
|
6753
6899
|
/** Icon in the zone at rest. */
|
|
6754
6900
|
icon = input('upload', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
6901
|
+
/** `zone` (default): the dashed drop zone with a Browse button. `button`: the Browse button alone. */
|
|
6902
|
+
appearance = input('zone', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
6903
|
+
/** `button` appearance: size of the button. */
|
|
6904
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
6755
6905
|
label = input('Drag and drop files here', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
6756
6906
|
/** Shown while files are dragged over the zone. */
|
|
6757
6907
|
dropLabel = input('Drop to add', ...(ngDevMode ? [{ debugName: "dropLabel" }] : []));
|
|
6758
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" }] : []));
|
|
6759
6916
|
/** Extra line under the label, e.g. "JPEG or PNG, up to 10 MB". */
|
|
6760
6917
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
6761
6918
|
/** Tokens: `{name}`. */
|
|
@@ -6771,6 +6928,8 @@ class SdsFileDrop {
|
|
|
6771
6928
|
dragging = signal(false, ...(ngDevMode ? [{ debugName: "dragging" }] : []));
|
|
6772
6929
|
errors = signal([], ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
6773
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" }] : []));
|
|
6774
6933
|
describedBy = computed(() => {
|
|
6775
6934
|
const ids = [`${this.zoneId}-label`];
|
|
6776
6935
|
if (this.hint())
|
|
@@ -6782,16 +6941,28 @@ class SdsFileDrop {
|
|
|
6782
6941
|
zoneClass = computed(() => {
|
|
6783
6942
|
const base = 'flex flex-col items-center justify-center gap-2 rounded-card border-2 border-dashed px-6 py-8 ' +
|
|
6784
6943
|
'text-center transition-colors';
|
|
6944
|
+
if (this.loading())
|
|
6945
|
+
return `${base} cursor-progress border-border bg-muted/50`;
|
|
6785
6946
|
if (this.disabled())
|
|
6786
6947
|
return `${base} cursor-not-allowed border-border bg-muted opacity-60`;
|
|
6787
6948
|
return this.dragging()
|
|
6788
|
-
? `${base} cursor-copy border-brand-500 bg-brand-50
|
|
6949
|
+
? `${base} cursor-copy border-brand-500 bg-brand-50 ${DARK_TINT_BG}`
|
|
6789
6950
|
: `${base} cursor-pointer border-border bg-muted/50 hover:border-ink-faint`;
|
|
6790
6951
|
}, ...(ngDevMode ? [{ debugName: "zoneClass" }] : []));
|
|
6952
|
+
buttonClass = computed(() => {
|
|
6953
|
+
const size = this.size() === 'sm' ? 'h-8 px-3' : 'h-9 px-3.5';
|
|
6954
|
+
const drag = this.dragging()
|
|
6955
|
+
? ` border-brand-500 bg-brand-50 ${DARK_TINT_BG}`
|
|
6956
|
+
: ' border-border bg-surface hover:bg-muted';
|
|
6957
|
+
return (`inline-flex ${size} items-center gap-1.5 rounded-control border text-sm font-semibold text-ink shadow-sm ` +
|
|
6958
|
+
'transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 ' +
|
|
6959
|
+
(this.loading() ? 'cursor-progress' : 'disabled:cursor-not-allowed disabled:opacity-60') +
|
|
6960
|
+
drag);
|
|
6961
|
+
}, ...(ngDevMode ? [{ debugName: "buttonClass" }] : []));
|
|
6791
6962
|
/** Open the native file picker. */
|
|
6792
6963
|
browse(event) {
|
|
6793
6964
|
event?.stopPropagation();
|
|
6794
|
-
if (this.
|
|
6965
|
+
if (this.isDisabled())
|
|
6795
6966
|
return;
|
|
6796
6967
|
this.fileInput()?.nativeElement.click();
|
|
6797
6968
|
}
|
|
@@ -6801,28 +6972,28 @@ class SdsFileDrop {
|
|
|
6801
6972
|
this.browse();
|
|
6802
6973
|
}
|
|
6803
6974
|
onDragEnter(event) {
|
|
6804
|
-
if (this.
|
|
6975
|
+
if (this.isDisabled() || !this.hasFiles(event))
|
|
6805
6976
|
return;
|
|
6806
6977
|
event.preventDefault();
|
|
6807
6978
|
this.dragDepth++;
|
|
6808
6979
|
this.dragging.set(true);
|
|
6809
6980
|
}
|
|
6810
6981
|
onDragOver(event) {
|
|
6811
|
-
if (this.
|
|
6982
|
+
if (this.isDisabled() || !this.hasFiles(event))
|
|
6812
6983
|
return;
|
|
6813
6984
|
event.preventDefault();
|
|
6814
6985
|
if (event.dataTransfer)
|
|
6815
6986
|
event.dataTransfer.dropEffect = 'copy';
|
|
6816
6987
|
}
|
|
6817
6988
|
onDragLeave(event) {
|
|
6818
|
-
if (this.
|
|
6989
|
+
if (this.isDisabled() || !this.hasFiles(event))
|
|
6819
6990
|
return;
|
|
6820
6991
|
this.dragDepth = Math.max(0, this.dragDepth - 1);
|
|
6821
6992
|
if (this.dragDepth === 0)
|
|
6822
6993
|
this.dragging.set(false);
|
|
6823
6994
|
}
|
|
6824
6995
|
onDrop(event) {
|
|
6825
|
-
if (this.
|
|
6996
|
+
if (this.isDisabled())
|
|
6826
6997
|
return;
|
|
6827
6998
|
event.preventDefault();
|
|
6828
6999
|
this.dragDepth = 0;
|
|
@@ -6881,10 +7052,45 @@ class SdsFileDrop {
|
|
|
6881
7052
|
this.errors.set([]);
|
|
6882
7053
|
}
|
|
6883
7054
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFileDrop, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6884
|
-
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 }, 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: `
|
|
7056
|
+
@if (appearance() === 'button') {
|
|
7057
|
+
<button
|
|
7058
|
+
type="button"
|
|
7059
|
+
[class]="buttonClass()"
|
|
7060
|
+
[disabled]="isDisabled()"
|
|
7061
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
7062
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
7063
|
+
[attr.aria-describedby]="errors().length ? zoneId + '-errors' : null"
|
|
7064
|
+
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
7065
|
+
(click)="browse($event)"
|
|
7066
|
+
(dragenter)="onDragEnter($event)"
|
|
7067
|
+
(dragover)="onDragOver($event)"
|
|
7068
|
+
(dragleave)="onDragLeave($event)"
|
|
7069
|
+
(drop)="onDrop($event)"
|
|
7070
|
+
>
|
|
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() }}
|
|
7077
|
+
</button>
|
|
7078
|
+
<input
|
|
7079
|
+
#fileInput
|
|
7080
|
+
type="file"
|
|
7081
|
+
class="sr-only"
|
|
7082
|
+
tabindex="-1"
|
|
7083
|
+
aria-hidden="true"
|
|
7084
|
+
[accept]="accept()"
|
|
7085
|
+
[multiple]="multiple()"
|
|
7086
|
+
[disabled]="isDisabled()"
|
|
7087
|
+
(change)="onInputChange($event)"
|
|
7088
|
+
/>
|
|
7089
|
+
} @else {
|
|
6885
7090
|
<div
|
|
6886
7091
|
[class]="zoneClass()"
|
|
6887
|
-
[attr.aria-disabled]="
|
|
7092
|
+
[attr.aria-disabled]="isDisabled() ? 'true' : null"
|
|
7093
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
6888
7094
|
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
6889
7095
|
(click)="onZoneClick($event)"
|
|
6890
7096
|
(dragenter)="onDragEnter($event)"
|
|
@@ -6896,7 +7102,11 @@ class SdsFileDrop {
|
|
|
6896
7102
|
class="grid h-11 w-11 place-items-center rounded-full bg-surface text-ink-soft shadow-sm ring-1 ring-border"
|
|
6897
7103
|
aria-hidden="true"
|
|
6898
7104
|
>
|
|
6899
|
-
|
|
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
|
+
}
|
|
6900
7110
|
</span>
|
|
6901
7111
|
<p class="text-sm font-semibold text-ink" [id]="zoneId + '-label'">
|
|
6902
7112
|
{{ dragging() ? dropLabel() : label() }}
|
|
@@ -6907,12 +7117,13 @@ class SdsFileDrop {
|
|
|
6907
7117
|
<button
|
|
6908
7118
|
type="button"
|
|
6909
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"
|
|
6910
|
-
[disabled]="
|
|
7120
|
+
[disabled]="isDisabled()"
|
|
7121
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
6911
7122
|
[attr.aria-describedby]="describedBy()"
|
|
6912
7123
|
(click)="browse($event)"
|
|
6913
7124
|
>
|
|
6914
7125
|
<sds-icon name="upload" [size]="16" />
|
|
6915
|
-
{{
|
|
7126
|
+
{{ buttonText() }}
|
|
6916
7127
|
</button>
|
|
6917
7128
|
<input
|
|
6918
7129
|
#fileInput
|
|
@@ -6922,10 +7133,11 @@ class SdsFileDrop {
|
|
|
6922
7133
|
aria-hidden="true"
|
|
6923
7134
|
[accept]="accept()"
|
|
6924
7135
|
[multiple]="multiple()"
|
|
6925
|
-
[disabled]="
|
|
7136
|
+
[disabled]="isDisabled()"
|
|
6926
7137
|
(change)="onInputChange($event)"
|
|
6927
7138
|
/>
|
|
6928
7139
|
</div>
|
|
7140
|
+
}
|
|
6929
7141
|
|
|
6930
7142
|
<div aria-live="polite" aria-atomic="true">
|
|
6931
7143
|
@if (errors().length) {
|
|
@@ -6939,7 +7151,7 @@ class SdsFileDrop {
|
|
|
6939
7151
|
</ul>
|
|
6940
7152
|
}
|
|
6941
7153
|
</div>
|
|
6942
|
-
`, 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 });
|
|
6943
7155
|
}
|
|
6944
7156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFileDrop, decorators: [{
|
|
6945
7157
|
type: Component,
|
|
@@ -6949,9 +7161,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6949
7161
|
imports: [SdsIcon],
|
|
6950
7162
|
host: { class: 'block' },
|
|
6951
7163
|
template: `
|
|
7164
|
+
@if (appearance() === 'button') {
|
|
7165
|
+
<button
|
|
7166
|
+
type="button"
|
|
7167
|
+
[class]="buttonClass()"
|
|
7168
|
+
[disabled]="isDisabled()"
|
|
7169
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
7170
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
7171
|
+
[attr.aria-describedby]="errors().length ? zoneId + '-errors' : null"
|
|
7172
|
+
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
7173
|
+
(click)="browse($event)"
|
|
7174
|
+
(dragenter)="onDragEnter($event)"
|
|
7175
|
+
(dragover)="onDragOver($event)"
|
|
7176
|
+
(dragleave)="onDragLeave($event)"
|
|
7177
|
+
(drop)="onDrop($event)"
|
|
7178
|
+
>
|
|
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() }}
|
|
7185
|
+
</button>
|
|
7186
|
+
<input
|
|
7187
|
+
#fileInput
|
|
7188
|
+
type="file"
|
|
7189
|
+
class="sr-only"
|
|
7190
|
+
tabindex="-1"
|
|
7191
|
+
aria-hidden="true"
|
|
7192
|
+
[accept]="accept()"
|
|
7193
|
+
[multiple]="multiple()"
|
|
7194
|
+
[disabled]="isDisabled()"
|
|
7195
|
+
(change)="onInputChange($event)"
|
|
7196
|
+
/>
|
|
7197
|
+
} @else {
|
|
6952
7198
|
<div
|
|
6953
7199
|
[class]="zoneClass()"
|
|
6954
|
-
[attr.aria-disabled]="
|
|
7200
|
+
[attr.aria-disabled]="isDisabled() ? 'true' : null"
|
|
7201
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
6955
7202
|
[attr.data-dragging]="dragging() ? 'true' : null"
|
|
6956
7203
|
(click)="onZoneClick($event)"
|
|
6957
7204
|
(dragenter)="onDragEnter($event)"
|
|
@@ -6963,7 +7210,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6963
7210
|
class="grid h-11 w-11 place-items-center rounded-full bg-surface text-ink-soft shadow-sm ring-1 ring-border"
|
|
6964
7211
|
aria-hidden="true"
|
|
6965
7212
|
>
|
|
6966
|
-
|
|
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
|
+
}
|
|
6967
7218
|
</span>
|
|
6968
7219
|
<p class="text-sm font-semibold text-ink" [id]="zoneId + '-label'">
|
|
6969
7220
|
{{ dragging() ? dropLabel() : label() }}
|
|
@@ -6974,12 +7225,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6974
7225
|
<button
|
|
6975
7226
|
type="button"
|
|
6976
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"
|
|
6977
|
-
[disabled]="
|
|
7228
|
+
[disabled]="isDisabled()"
|
|
7229
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
6978
7230
|
[attr.aria-describedby]="describedBy()"
|
|
6979
7231
|
(click)="browse($event)"
|
|
6980
7232
|
>
|
|
6981
7233
|
<sds-icon name="upload" [size]="16" />
|
|
6982
|
-
{{
|
|
7234
|
+
{{ buttonText() }}
|
|
6983
7235
|
</button>
|
|
6984
7236
|
<input
|
|
6985
7237
|
#fileInput
|
|
@@ -6989,10 +7241,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6989
7241
|
aria-hidden="true"
|
|
6990
7242
|
[accept]="accept()"
|
|
6991
7243
|
[multiple]="multiple()"
|
|
6992
|
-
[disabled]="
|
|
7244
|
+
[disabled]="isDisabled()"
|
|
6993
7245
|
(change)="onInputChange($event)"
|
|
6994
7246
|
/>
|
|
6995
7247
|
</div>
|
|
7248
|
+
}
|
|
6996
7249
|
|
|
6997
7250
|
<div aria-live="polite" aria-atomic="true">
|
|
6998
7251
|
@if (errors().length) {
|
|
@@ -7008,7 +7261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
7008
7261
|
</div>
|
|
7009
7262
|
`,
|
|
7010
7263
|
}]
|
|
7011
|
-
}], 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 }] }], 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"] }] } });
|
|
7012
7265
|
|
|
7013
7266
|
let nextId$8 = 0;
|
|
7014
7267
|
/**
|
|
@@ -7422,7 +7675,7 @@ class SdsImageCropper {
|
|
|
7422
7675
|
<sds-icon name="zoom-in" [size]="18" />
|
|
7423
7676
|
</button>
|
|
7424
7677
|
</div>
|
|
7425
|
-
`, 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 });
|
|
7426
7679
|
}
|
|
7427
7680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsImageCropper, decorators: [{
|
|
7428
7681
|
type: Component,
|
|
@@ -7647,7 +7900,7 @@ class SdsCalendar {
|
|
|
7647
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';
|
|
7648
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';
|
|
7649
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';
|
|
7650
|
-
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`;
|
|
7651
7904
|
timeInput = 'w-8 bg-transparent py-1 text-center text-sm text-ink outline-none disabled:cursor-not-allowed disabled:opacity-40';
|
|
7652
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';
|
|
7653
7906
|
// --- labels ---
|
|
@@ -7903,7 +8156,7 @@ class SdsCalendar {
|
|
|
7903
8156
|
dayClass(cell) {
|
|
7904
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';
|
|
7905
8158
|
if (cell.selected)
|
|
7906
|
-
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}`;
|
|
7907
8160
|
let cls = `${base} hover:bg-brand-50`;
|
|
7908
8161
|
if (cell.otherMonth)
|
|
7909
8162
|
cls += ' text-ink-faint';
|
|
@@ -7916,7 +8169,7 @@ class SdsCalendar {
|
|
|
7916
8169
|
cellClass(selected, current, disabled) {
|
|
7917
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';
|
|
7918
8171
|
if (selected)
|
|
7919
|
-
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}`;
|
|
7920
8173
|
let cls = `${base} text-ink hover:bg-brand-50`;
|
|
7921
8174
|
if (current)
|
|
7922
8175
|
cls += ' font-semibold text-brand-600';
|
|
@@ -8143,7 +8396,7 @@ class SdsCalendar {
|
|
|
8143
8396
|
</div>
|
|
8144
8397
|
}
|
|
8145
8398
|
</div>
|
|
8146
|
-
`, 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 });
|
|
8147
8400
|
}
|
|
8148
8401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsCalendar, decorators: [{
|
|
8149
8402
|
type: Component,
|
|
@@ -8772,7 +9025,7 @@ class SdsDatePicker {
|
|
|
8772
9025
|
@if (error()) {
|
|
8773
9026
|
<p class="mt-1.5 text-xs font-medium text-danger">{{ error() }}</p>
|
|
8774
9027
|
}
|
|
8775
|
-
`, 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 });
|
|
8776
9029
|
}
|
|
8777
9030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsDatePicker, decorators: [{
|
|
8778
9031
|
type: Component,
|
|
@@ -9553,7 +9806,7 @@ class SdsSelect {
|
|
|
9553
9806
|
@if (error()) {
|
|
9554
9807
|
<p class="mt-1.5 text-xs font-medium text-danger">{{ error() }}</p>
|
|
9555
9808
|
}
|
|
9556
|
-
`, 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 });
|
|
9809
|
+
`, 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 });
|
|
9557
9810
|
}
|
|
9558
9811
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSelect, decorators: [{
|
|
9559
9812
|
type: Component,
|
|
@@ -9785,6 +10038,14 @@ class SdsMultiSelect {
|
|
|
9785
10038
|
filterLabel = input('Search', ...(ngDevMode ? [{ debugName: "filterLabel" }] : []));
|
|
9786
10039
|
/** Visible text of the "select all" row (see {@link showToggleAll}). */
|
|
9787
10040
|
selectAllLabel = input('Select all', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : []));
|
|
10041
|
+
/** The panel opened. */
|
|
10042
|
+
opened = output();
|
|
10043
|
+
/**
|
|
10044
|
+
* The panel closed (Escape, Tab, an outside click, a re-click on the field, a footer `close()`), with
|
|
10045
|
+
* the selection at that moment. For "apply on close": take the value here instead of on every
|
|
10046
|
+
* `ngModelChange`. Not emitted when the component is destroyed with the panel open.
|
|
10047
|
+
*/
|
|
10048
|
+
closed = output();
|
|
9788
10049
|
/** Optional projected `<ng-template sdsSelectOption>` — custom option-row rendering. */
|
|
9789
10050
|
optionTpl = contentChild(SdsSelectOption, ...(ngDevMode ? [{ debugName: "optionTpl" }] : []));
|
|
9790
10051
|
/** Optional projected `<ng-template sdsSelectEmpty>` — custom no-results content. */
|
|
@@ -9916,6 +10177,7 @@ class SdsMultiSelect {
|
|
|
9916
10177
|
return;
|
|
9917
10178
|
this.filterText.set('');
|
|
9918
10179
|
this.open.set(true);
|
|
10180
|
+
this.opened.emit();
|
|
9919
10181
|
this.onTouched();
|
|
9920
10182
|
this.initHighlight();
|
|
9921
10183
|
afterNextRender(() => {
|
|
@@ -9940,6 +10202,7 @@ class SdsMultiSelect {
|
|
|
9940
10202
|
this.open.set(false);
|
|
9941
10203
|
if (returnFocus)
|
|
9942
10204
|
this.trigger()?.nativeElement.focus();
|
|
10205
|
+
this.closed.emit([...this.value()]);
|
|
9943
10206
|
}
|
|
9944
10207
|
clear(event) {
|
|
9945
10208
|
event.stopPropagation();
|
|
@@ -10184,7 +10447,7 @@ class SdsMultiSelect {
|
|
|
10184
10447
|
this.close();
|
|
10185
10448
|
}
|
|
10186
10449
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMultiSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10187
|
-
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: [
|
|
10450
|
+
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: [
|
|
10188
10451
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SdsMultiSelect), multi: true },
|
|
10189
10452
|
], 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: `
|
|
10190
10453
|
@if (label()) {
|
|
@@ -10362,7 +10625,7 @@ class SdsMultiSelect {
|
|
|
10362
10625
|
@if (error()) {
|
|
10363
10626
|
<p class="mt-1.5 text-xs font-medium text-danger">{{ error() }}</p>
|
|
10364
10627
|
}
|
|
10365
|
-
`, 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 });
|
|
10628
|
+
`, 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 });
|
|
10366
10629
|
}
|
|
10367
10630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMultiSelect, decorators: [{
|
|
10368
10631
|
type: Component,
|
|
@@ -10555,7 +10818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
10555
10818
|
}
|
|
10556
10819
|
`,
|
|
10557
10820
|
}]
|
|
10558
|
-
}], 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 }] }] } });
|
|
10821
|
+
}], 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 }] }] } });
|
|
10559
10822
|
|
|
10560
10823
|
const SDS_PHONE_COUNTRIES = [
|
|
10561
10824
|
{ iso2: 'BE', name: 'Belgium', dialCode: '32', lengths: [9], format: '### ## ## ##', example: '470123456' },
|
|
@@ -11214,7 +11477,7 @@ class SdsPhoneInput {
|
|
|
11214
11477
|
{{ hint() || autoHint() }}
|
|
11215
11478
|
</p>
|
|
11216
11479
|
}
|
|
11217
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11480
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11218
11481
|
}
|
|
11219
11482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsPhoneInput, decorators: [{
|
|
11220
11483
|
type: Component,
|
|
@@ -11477,7 +11740,7 @@ class SdsPaginator {
|
|
|
11477
11740
|
if (this.disabled())
|
|
11478
11741
|
return `${cls} text-ink-faint opacity-50 cursor-not-allowed`;
|
|
11479
11742
|
return active
|
|
11480
|
-
? `${cls} bg-brand-600 text-white hover:bg-brand-700 cursor-pointer`
|
|
11743
|
+
? `${cls} bg-brand-600 text-white hover:bg-brand-700 ${DARK_BRAND_FILL_HOVER} cursor-pointer`
|
|
11481
11744
|
: `${cls} text-ink-soft hover:bg-muted cursor-pointer`;
|
|
11482
11745
|
}
|
|
11483
11746
|
firstPage() {
|
|
@@ -11633,7 +11896,7 @@ class SdsPaginator {
|
|
|
11633
11896
|
</label>
|
|
11634
11897
|
}
|
|
11635
11898
|
</div>
|
|
11636
|
-
`, 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 });
|
|
11899
|
+
`, 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 });
|
|
11637
11900
|
}
|
|
11638
11901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsPaginator, decorators: [{
|
|
11639
11902
|
type: Component,
|
|
@@ -11887,10 +12150,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
11887
12150
|
* Container (role="tablist") for the <sds-tab> headers. Renders the bottom rule
|
|
11888
12151
|
* and handles roving-focus keyboard navigation (Arrow keys, Home, End) with
|
|
11889
12152
|
* automatic activation.
|
|
12153
|
+
*
|
|
12154
|
+
* Name the tab set with [ariaLabel] (or [ariaLabelledby] pointing at a visible heading) when the page has
|
|
12155
|
+
* more than one, or when the tabs alone do not say what they switch.
|
|
12156
|
+
*
|
|
12157
|
+
* @example
|
|
12158
|
+
* <sds-tab-list [ariaLabel]="'Order status'">…</sds-tab-list>
|
|
11890
12159
|
*/
|
|
11891
12160
|
class SdsTabList {
|
|
11892
12161
|
host = inject(ElementRef);
|
|
11893
12162
|
store = inject(SdsTabsStore);
|
|
12163
|
+
/** Accessible name of the tablist. */
|
|
12164
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
12165
|
+
/** Id of a visible element that names the tablist (takes precedence over [ariaLabel] for AT). */
|
|
12166
|
+
ariaLabelledby = input('', ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : []));
|
|
11894
12167
|
listClass = computed(() => {
|
|
11895
12168
|
const base = 'relative flex border-b border-border';
|
|
11896
12169
|
return this.store.scrollable() ? `${base} overflow-x-auto` : base;
|
|
@@ -11924,7 +12197,7 @@ class SdsTabList {
|
|
|
11924
12197
|
el.click(); // automatic activation
|
|
11925
12198
|
}
|
|
11926
12199
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTabList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11927
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
12200
|
+
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 });
|
|
11928
12201
|
}
|
|
11929
12202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTabList, decorators: [{
|
|
11930
12203
|
type: Component,
|
|
@@ -11934,11 +12207,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
11934
12207
|
host: {
|
|
11935
12208
|
role: 'tablist',
|
|
11936
12209
|
'[class]': 'listClass()',
|
|
12210
|
+
'[attr.aria-label]': 'ariaLabel() || null',
|
|
12211
|
+
'[attr.aria-labelledby]': 'ariaLabelledby() || null',
|
|
11937
12212
|
'(keydown)': 'onKeydown($event)',
|
|
11938
12213
|
},
|
|
11939
12214
|
template: `<ng-content />`,
|
|
11940
12215
|
}]
|
|
11941
|
-
}] });
|
|
12216
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }] } });
|
|
11942
12217
|
|
|
11943
12218
|
/**
|
|
11944
12219
|
* A single tab header (role="tab"). Project the label and, optionally, an
|
|
@@ -12284,7 +12559,7 @@ class SdsAccordionHeader {
|
|
|
12284
12559
|
[class.rotate-180]="panel.open()"
|
|
12285
12560
|
/>
|
|
12286
12561
|
</button>
|
|
12287
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12562
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12288
12563
|
}
|
|
12289
12564
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsAccordionHeader, decorators: [{
|
|
12290
12565
|
type: Component,
|
|
@@ -13985,7 +14260,7 @@ class SdsTable {
|
|
|
13985
14260
|
</div>
|
|
13986
14261
|
}
|
|
13987
14262
|
</div>
|
|
13988
|
-
`, 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 });
|
|
14263
|
+
`, 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 });
|
|
13989
14264
|
}
|
|
13990
14265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTable, decorators: [{
|
|
13991
14266
|
type: Component,
|
|
@@ -14539,7 +14814,7 @@ class SdsToastHost {
|
|
|
14539
14814
|
</button>
|
|
14540
14815
|
</div>
|
|
14541
14816
|
</ng-template>
|
|
14542
|
-
`, 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 });
|
|
14817
|
+
`, 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 });
|
|
14543
14818
|
}
|
|
14544
14819
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsToastHost, decorators: [{
|
|
14545
14820
|
type: Component,
|
|
@@ -14702,7 +14977,7 @@ class SdsThemeToggle {
|
|
|
14702
14977
|
>
|
|
14703
14978
|
<sds-icon [name]="isDark() ? 'sun' : 'moon'" [size]="iconSize()" />
|
|
14704
14979
|
</button>
|
|
14705
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14980
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14706
14981
|
}
|
|
14707
14982
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsThemeToggle, decorators: [{
|
|
14708
14983
|
type: Component,
|
|
@@ -14945,7 +15220,7 @@ class SdsTopbar {
|
|
|
14945
15220
|
</div>
|
|
14946
15221
|
</div>
|
|
14947
15222
|
</header>
|
|
14948
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15223
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14949
15224
|
}
|
|
14950
15225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsTopbar, decorators: [{
|
|
14951
15226
|
type: Component,
|
|
@@ -15340,7 +15615,7 @@ class SdsSidebar {
|
|
|
15340
15615
|
<ng-content select="[sdsFooter]" />
|
|
15341
15616
|
</div>
|
|
15342
15617
|
</aside>
|
|
15343
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15618
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15344
15619
|
}
|
|
15345
15620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSidebar, decorators: [{
|
|
15346
15621
|
type: Component,
|
|
@@ -15583,7 +15858,7 @@ class SdsNavGroup {
|
|
|
15583
15858
|
<ng-content />
|
|
15584
15859
|
</div>
|
|
15585
15860
|
</div>
|
|
15586
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15861
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15587
15862
|
}
|
|
15588
15863
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsNavGroup, decorators: [{
|
|
15589
15864
|
type: Component,
|
|
@@ -15701,7 +15976,7 @@ class SdsNavItem {
|
|
|
15701
15976
|
: this.badgeTone() === 'neutral'
|
|
15702
15977
|
? 'bg-muted text-ink-soft border border-border'
|
|
15703
15978
|
: this.store.appearance() === 'surface'
|
|
15704
|
-
?
|
|
15979
|
+
? `bg-brand-600 text-white ${DARK_PRIMARY_BG} ${DARK_ON_PRIMARY}`
|
|
15705
15980
|
: 'bg-white text-brand-800';
|
|
15706
15981
|
const base = 'ml-auto inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-1.5 ' +
|
|
15707
15982
|
'text-[11px] font-bold tabular-nums leading-none';
|
|
@@ -15786,7 +16061,7 @@ class SdsNavItem {
|
|
|
15786
16061
|
<span class="sr-only">, {{ text }}</span>
|
|
15787
16062
|
}
|
|
15788
16063
|
</ng-template>
|
|
15789
|
-
`, 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 });
|
|
16064
|
+
`, 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 });
|
|
15790
16065
|
}
|
|
15791
16066
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsNavItem, decorators: [{
|
|
15792
16067
|
type: Component,
|
|
@@ -15993,7 +16268,7 @@ class SdsUserMenu {
|
|
|
15993
16268
|
</div>
|
|
15994
16269
|
</div>
|
|
15995
16270
|
}
|
|
15996
|
-
`, 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 });
|
|
16271
|
+
`, 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 });
|
|
15997
16272
|
}
|
|
15998
16273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsUserMenu, decorators: [{
|
|
15999
16274
|
type: Component,
|
|
@@ -16144,7 +16419,7 @@ class SdsMenuItem {
|
|
|
16144
16419
|
<span class="flex-1 truncate text-left">{{ label() }}</span>
|
|
16145
16420
|
<ng-content />
|
|
16146
16421
|
</ng-template>
|
|
16147
|
-
`, 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 });
|
|
16422
|
+
`, 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 });
|
|
16148
16423
|
}
|
|
16149
16424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsMenuItem, decorators: [{
|
|
16150
16425
|
type: Component,
|
|
@@ -16532,7 +16807,7 @@ class SdsSearchCommand {
|
|
|
16532
16807
|
</div>
|
|
16533
16808
|
</div>
|
|
16534
16809
|
}
|
|
16535
|
-
`, 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 });
|
|
16810
|
+
`, 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 });
|
|
16536
16811
|
}
|
|
16537
16812
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsSearchCommand, decorators: [{
|
|
16538
16813
|
type: Component,
|
|
@@ -16980,7 +17255,7 @@ class SdsLanguageSwitcher {
|
|
|
16980
17255
|
</div>
|
|
16981
17256
|
</div>
|
|
16982
17257
|
}
|
|
16983
|
-
`, 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 });
|
|
17258
|
+
`, 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 });
|
|
16984
17259
|
}
|
|
16985
17260
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsLanguageSwitcher, decorators: [{
|
|
16986
17261
|
type: Component,
|