@besaitech/ng-design-system 0.0.26 → 0.0.32

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.
@@ -29,6 +29,9 @@ const SDS_ICONS = {
29
29
  'user-plus': '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><line x1="19" x2="19" y1="8" y2="14"/><line x1="22" x2="16" y1="11" y2="11"/>',
30
30
  hand: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hand-icon lucide-hand"><path d="M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>',
31
31
  users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
32
+ // Couriers. The back-office and the courier-facing screens both name a rider, and every Belvigo
33
+ // surface that does should draw the same one.
34
+ bike: '<circle cx="18.5" cy="17.5" r="3.5"/><circle cx="5.5" cy="17.5" r="3.5"/><circle cx="15" cy="5" r="1"/><path d="M12 17.5V14l-3-3 4-3 2 3h2"/>',
32
35
  'building-2': '<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/>',
33
36
  package: '<path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"/><path d="M12 22V12"/><polyline points="3.29 7 12 12 20.71 7"/><path d="m7.5 4.27 9 5.15"/>',
34
37
  'package-plus': '<path d="M16 16h6"/><path d="M19 13v6"/><path d="M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0"/><path d="m7.5 4.27 9 5.15"/><polyline points="3.29 7 12 12 20.71 7"/><path d="M12 22V12"/>',
@@ -138,7 +141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
138
141
  }]
139
142
  }], 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 }] }] } });
140
143
 
141
- const BASE = 'inline-flex items-center justify-center gap-2 font-medium rounded-control ' +
144
+ const BASE = 'inline-flex items-center justify-center gap-2 font-medium ' +
142
145
  'transition-colors duration-150 select-none whitespace-nowrap cursor-pointer ' +
143
146
  'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ' +
144
147
  'focus-visible:ring-brand-500 disabled:opacity-50 disabled:pointer-events-none';
@@ -169,6 +172,13 @@ const ICON_ONLY = {
169
172
  class SdsButton {
170
173
  variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : []));
171
174
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
175
+ /**
176
+ * `pill` fully rounds the button. It is the shape a consumer-facing surface tends to want for its
177
+ * primary action, and the same axis {@link SdsInput} exposes — a design system with pill inputs and
178
+ * no pill buttons would force any app that wants one back onto hand-rolled classes for its single
179
+ * most important control.
180
+ */
181
+ shape = input('control', ...(ngDevMode ? [{ debugName: "shape" }] : []));
172
182
  type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
173
183
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
174
184
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
@@ -200,6 +210,7 @@ class SdsButton {
200
210
  const size = this.size();
201
211
  return [
202
212
  BASE,
213
+ this.shape() === 'pill' ? 'rounded-full' : 'rounded-control',
203
214
  VARIANTS$2[this.variant()],
204
215
  SIZES$9[size],
205
216
  this.iconOnly() ? ICON_ONLY[size] : '',
@@ -209,7 +220,7 @@ class SdsButton {
209
220
  .join(' ');
210
221
  }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
211
222
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
212
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsButton, isStandalone: true, selector: "sds-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", 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 }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "hostClass()", "attr.aria-disabled": "(disabled() || loading()) ? \"true\" : null", "style.pointer-events": "(disabled() || loading()) ? \"none\" : null" } }, ngImport: i0, template: `
223
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsButton, isStandalone: true, selector: "sds-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", 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 }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "hostClass()", "attr.aria-disabled": "(disabled() || loading()) ? \"true\" : null", "style.pointer-events": "(disabled() || loading()) ? \"none\" : null" } }, ngImport: i0, template: `
213
224
  <button
214
225
  [type]="type()"
215
226
  [disabled]="disabled() || loading()"
@@ -251,7 +262,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
251
262
  <ng-content select="[sdsIconTrailing]" />
252
263
  </button>
253
264
  `, styles: [".sds-spinner{width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:9999px;animation:sds-spin .6s linear infinite}@keyframes sds-spin{to{transform:rotate(360deg)}}\n"] }]
254
- }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
265
+ }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
255
266
 
256
267
  let nextId$a = 0;
257
268
  const SIZES$8 = {
@@ -273,11 +284,33 @@ class SdsInput {
273
284
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
274
285
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
275
286
  error = input('', ...(ngDevMode ? [{ debugName: "error" }] : []));
287
+ /**
288
+ * `search` is the semantically right type for a search field, and the template strips the WebKit
289
+ * search decorations that come with it. Without that, a `search` field with {@link clearable} draws
290
+ * TWO clear buttons — the component's and the browser's own, which no stylesheet can reach and which
291
+ * sits outside the field's own padding.
292
+ */
276
293
  type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
277
294
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
295
+ /**
296
+ * `filled` is a borderless field on a muted ground, for a search box that has to sit inside a page
297
+ * rather than announce itself as a form control — a storefront's search pill above all.
298
+ * `on-brand` is the same field tuned for a dark surface.
299
+ */
278
300
  appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
301
+ /**
302
+ * `pill` fully rounds the field. Separate from {@link appearance} on purpose: a bordered pill and a
303
+ * filled box are both real designs, and folding the two axes into one enum would forbid half of them.
304
+ */
305
+ shape = input('control', ...(ngDevMode ? [{ debugName: "shape" }] : []));
279
306
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
280
307
  clearable = input(false, ...(ngDevMode ? [{ debugName: "clearable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
308
+ /**
309
+ * Accessible name for the clear button. French default so existing consumers are unchanged, but an
310
+ * app serving more than one language MUST translate it — it is an icon-only control, so this string
311
+ * is its only name.
312
+ */
313
+ clearLabel = input('Effacer', ...(ngDevMode ? [{ debugName: "clearLabel" }] : []));
281
314
  leadingIcon = input(null, ...(ngDevMode ? [{ debugName: "leadingIcon" }] : []));
282
315
  trailingIcon = input(null, ...(ngDevMode ? [{ debugName: "trailingIcon" }] : []));
283
316
  /**
@@ -299,6 +332,8 @@ class SdsInput {
299
332
  value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
300
333
  cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : []));
301
334
  onBrand = computed(() => this.appearance() === 'on-brand', ...(ngDevMode ? [{ debugName: "onBrand" }] : []));
335
+ filled = computed(() => this.appearance() === 'filled', ...(ngDevMode ? [{ debugName: "filled" }] : []));
336
+ pill = computed(() => this.shape() === 'pill', ...(ngDevMode ? [{ debugName: "pill" }] : []));
302
337
  isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
303
338
  describedBy = computed(() => {
304
339
  if (this.error())
@@ -308,15 +343,29 @@ class SdsInput {
308
343
  return null;
309
344
  }, ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
310
345
  fieldPadding = computed(() => {
311
- const left = this.leadingIcon() ? 'pl-10' : 'pl-3.5';
312
- const right = this.trailingIcon() || this.clearable() || this.trailingAction() ? 'pr-10' : 'pr-3.5';
346
+ const inset = this.pill() ? 'pl-11' : 'pl-10';
347
+ const bare = this.pill() ? 'pl-5' : 'pl-3.5';
348
+ const left = this.leadingIcon() ? inset : bare;
349
+ const right = this.trailingIcon() || this.clearable() || this.trailingAction()
350
+ ? 'pr-10'
351
+ : this.pill()
352
+ ? 'pr-5'
353
+ : 'pr-3.5';
313
354
  return `${left} ${right}`;
314
355
  }, ...(ngDevMode ? [{ debugName: "fieldPadding" }] : []));
315
356
  wrapperClasses = computed(() => {
316
- const parts = [SIZES$8[this.size()]];
357
+ const parts = [SIZES$8[this.size()], this.pill() ? 'rounded-full' : 'rounded-control'];
317
358
  if (this.isDisabled())
318
359
  parts.push('opacity-60 cursor-not-allowed');
319
- if (this.onBrand()) {
360
+ if (this.filled()) {
361
+ // border-transparent, not border-0: the border box is what keeps a filled field the same height
362
+ // as a bordered one, so the two sit level when a toolbar mixes them.
363
+ parts.push('border-transparent bg-muted text-ink');
364
+ parts.push(this.error()
365
+ ? 'border-danger focus-within:ring-2 focus-within:ring-danger/30'
366
+ : 'focus-within:ring-2 focus-within:ring-brand-500/25');
367
+ }
368
+ else if (this.onBrand()) {
320
369
  parts.push('bg-white/10 text-white');
321
370
  parts.push(this.error()
322
371
  ? 'border-danger focus-within:ring-2 focus-within:ring-danger/30'
@@ -356,7 +405,7 @@ class SdsInput {
356
405
  this.onTouched();
357
406
  }
358
407
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
359
- 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", 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: [
408
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsInput, isStandalone: true, selector: "sds-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, leadingIcon: { classPropertyName: "leadingIcon", publicName: "leadingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingAction: { classPropertyName: "trailingAction", publicName: "trailingAction", isSignal: true, isRequired: false, transformFunction: null }, trailingActionLabel: { classPropertyName: "trailingActionLabel", publicName: "trailingActionLabel", isSignal: true, isRequired: false, transformFunction: null }, trailingActionPressed: { classPropertyName: "trailingActionPressed", publicName: "trailingActionPressed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { trailingActionClick: "trailingActionClick" }, host: { classAttribute: "block" }, providers: [
360
409
  {
361
410
  provide: NG_VALUE_ACCESSOR,
362
411
  useExisting: forwardRef(() => SdsInput),
@@ -374,14 +423,17 @@ class SdsInput {
374
423
  }
375
424
 
376
425
  <div
377
- class="relative flex items-center rounded-control border transition-colors"
426
+ class="relative flex items-center border transition-colors"
378
427
  [class]="wrapperClasses()"
379
428
  >
380
429
  @if (leadingIcon()) {
430
+ <!-- A pill needs its icon further in: on a fully-rounded field an icon at left-3 sits over
431
+ the curve rather than inside the field. -->
381
432
  <sds-icon
382
433
  [name]="leadingIcon()!"
383
434
  [size]="18"
384
- class="pointer-events-none absolute left-3 opacity-70"
435
+ class="pointer-events-none absolute opacity-70"
436
+ [class]="pill() ? 'left-4' : 'left-3'"
385
437
  />
386
438
  }
387
439
 
@@ -394,7 +446,9 @@ class SdsInput {
394
446
  [attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
395
447
  [attr.aria-invalid]="error() ? 'true' : null"
396
448
  [attr.aria-describedby]="describedBy()"
397
- class="w-full bg-transparent outline-none placeholder:text-current/50 disabled:cursor-not-allowed"
449
+ class="w-full bg-transparent outline-none placeholder:text-current/50 disabled:cursor-not-allowed
450
+ [&::-webkit-search-cancel-button]:appearance-none
451
+ [&::-webkit-search-decoration]:appearance-none"
398
452
  [class]="fieldPadding()"
399
453
  (input)="onInput($event)"
400
454
  (blur)="onTouched()"
@@ -404,7 +458,7 @@ class SdsInput {
404
458
  <button
405
459
  type="button"
406
460
  tabindex="-1"
407
- aria-label="Effacer"
461
+ [attr.aria-label]="clearLabel()"
408
462
  class="absolute right-2.5 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-60 hover:opacity-100 hover:bg-black/5"
409
463
  (click)="clear()"
410
464
  >
@@ -444,23 +498,17 @@ class SdsInput {
444
498
  {{ hint() }}
445
499
  </p>
446
500
  }
447
- `, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
501
+ `, 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 });
448
502
  }
449
503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsInput, decorators: [{
450
504
  type: Component,
451
- args: [{
452
- selector: 'sds-input',
453
- changeDetection: ChangeDetectionStrategy.OnPush,
454
- imports: [SdsIcon],
455
- providers: [
505
+ args: [{ selector: 'sds-input', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdsIcon], providers: [
456
506
  {
457
507
  provide: NG_VALUE_ACCESSOR,
458
508
  useExisting: forwardRef(() => SdsInput),
459
509
  multi: true,
460
510
  },
461
- ],
462
- host: { class: 'block' },
463
- template: `
511
+ ], host: { class: 'block' }, template: `
464
512
  @if (label()) {
465
513
  <label
466
514
  [for]="inputId"
@@ -472,14 +520,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
472
520
  }
473
521
 
474
522
  <div
475
- class="relative flex items-center rounded-control border transition-colors"
523
+ class="relative flex items-center border transition-colors"
476
524
  [class]="wrapperClasses()"
477
525
  >
478
526
  @if (leadingIcon()) {
527
+ <!-- A pill needs its icon further in: on a fully-rounded field an icon at left-3 sits over
528
+ the curve rather than inside the field. -->
479
529
  <sds-icon
480
530
  [name]="leadingIcon()!"
481
531
  [size]="18"
482
- class="pointer-events-none absolute left-3 opacity-70"
532
+ class="pointer-events-none absolute opacity-70"
533
+ [class]="pill() ? 'left-4' : 'left-3'"
483
534
  />
484
535
  }
485
536
 
@@ -492,7 +543,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
492
543
  [attr.aria-label]="!label() && ariaLabel() ? ariaLabel() : null"
493
544
  [attr.aria-invalid]="error() ? 'true' : null"
494
545
  [attr.aria-describedby]="describedBy()"
495
- class="w-full bg-transparent outline-none placeholder:text-current/50 disabled:cursor-not-allowed"
546
+ class="w-full bg-transparent outline-none placeholder:text-current/50 disabled:cursor-not-allowed
547
+ [&::-webkit-search-cancel-button]:appearance-none
548
+ [&::-webkit-search-decoration]:appearance-none"
496
549
  [class]="fieldPadding()"
497
550
  (input)="onInput($event)"
498
551
  (blur)="onTouched()"
@@ -502,7 +555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
502
555
  <button
503
556
  type="button"
504
557
  tabindex="-1"
505
- aria-label="Effacer"
558
+ [attr.aria-label]="clearLabel()"
506
559
  class="absolute right-2.5 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-60 hover:opacity-100 hover:bg-black/5"
507
560
  (click)="clear()"
508
561
  >
@@ -542,9 +595,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
542
595
  {{ hint() }}
543
596
  </p>
544
597
  }
545
- `,
546
- }]
547
- }], 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", 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"] }] } });
598
+ `, 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"] }]
599
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], leadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadingIcon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], trailingAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingAction", required: false }] }], trailingActionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActionLabel", required: false }] }], trailingActionPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingActionPressed", required: false }] }], trailingActionClick: [{ type: i0.Output, args: ["trailingActionClick"] }] } });
548
600
 
549
601
  let nextId$9 = 0;
550
602
  const SIZES$7 = {
@@ -6632,9 +6684,19 @@ class SdsTopbar {
6632
6684
  </button>
6633
6685
  }
6634
6686
  <ng-content select="[sdsLogo]" />
6687
+ <!--
6688
+ shrink-0 + whitespace-nowrap, both required. The left block is a flex row, so without them a
6689
+ two-word app name wraps to a second line INSIDE a bar whose height is fixed at
6690
+ --sds-topbar-h, and the name is clipped by its own bar. It surfaced at 375px on a bar
6691
+ carrying a logo, a wordmark and a two-syllable name; it is wrong at every width.
6692
+
6693
+ The name never truncates and never hides: it is the answer to "which app am I in", which on a
6694
+ platform of five same-branded apps is the one thing the bar must not drop. An app whose left
6695
+ block is too crowded for a phone hides ITS OWN wordmark under sm and keeps the mark.
6696
+ -->
6635
6697
  @if (appName()) {
6636
- <span class="h-7 w-px" [class]="appearance() === 'brand' ? 'bg-white/30' : 'bg-border'"></span>
6637
- <span class="text-xl font-bold tracking-tight">{{ appName() }}</span>
6698
+ <span class="h-7 w-px shrink-0" [class]="appearance() === 'brand' ? 'bg-white/30' : 'bg-border'"></span>
6699
+ <span class="shrink-0 whitespace-nowrap text-xl font-bold tracking-tight">{{ appName() }}</span>
6638
6700
  }
6639
6701
  <ng-content select="[sdsLead]" />
6640
6702
  </div>
@@ -6721,9 +6783,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
6721
6783
  </button>
6722
6784
  }
6723
6785
  <ng-content select="[sdsLogo]" />
6786
+ <!--
6787
+ shrink-0 + whitespace-nowrap, both required. The left block is a flex row, so without them a
6788
+ two-word app name wraps to a second line INSIDE a bar whose height is fixed at
6789
+ --sds-topbar-h, and the name is clipped by its own bar. It surfaced at 375px on a bar
6790
+ carrying a logo, a wordmark and a two-syllable name; it is wrong at every width.
6791
+
6792
+ The name never truncates and never hides: it is the answer to "which app am I in", which on a
6793
+ platform of five same-branded apps is the one thing the bar must not drop. An app whose left
6794
+ block is too crowded for a phone hides ITS OWN wordmark under sm and keeps the mark.
6795
+ -->
6724
6796
  @if (appName()) {
6725
- <span class="h-7 w-px" [class]="appearance() === 'brand' ? 'bg-white/30' : 'bg-border'"></span>
6726
- <span class="text-xl font-bold tracking-tight">{{ appName() }}</span>
6797
+ <span class="h-7 w-px shrink-0" [class]="appearance() === 'brand' ? 'bg-white/30' : 'bg-border'"></span>
6798
+ <span class="shrink-0 whitespace-nowrap text-xl font-bold tracking-tight">{{ appName() }}</span>
6727
6799
  }
6728
6800
  <ng-content select="[sdsLead]" />
6729
6801
  </div>