yukit-web 1.0.3 → 1.1.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yukit-web",
3
3
  "description": "Angular UI component library for Yurest web applications.",
4
- "version": "1.0.3",
4
+ "version": "1.1.0",
5
5
  "author": {
6
6
  "name": "Yurest Solutions",
7
7
  "email": "develop@yurest.com"
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Below `sm`, floating dialogs open as a bottom sheet over the `yuw-layout` body box, rounded like it and sliding up;
3
+ * with no layout, 4px off the viewport edges.
4
+ * The CDK writes the overlay's alignment as inline styles, so overriding it needs `!important`.
5
+ */
6
+ @media (width < 40rem) {
7
+ .cdk-global-overlay-wrapper:has(
8
+ > .cdk-overlay-pane :is([data-slot='dialog-content'], [data-slot='alert-dialog-content'])
9
+ ) {
10
+ align-items: flex-end !important;
11
+ justify-content: flex-start !important;
12
+ padding: var(--yuw-layout-body-top, 0.25rem) var(--yuw-layout-body-right, 0.25rem)
13
+ var(--yuw-layout-body-bottom, 0.25rem) var(--yuw-layout-body-left, 0.25rem);
14
+ }
15
+
16
+ .cdk-overlay-pane:has(:is([data-slot='dialog-content'], [data-slot='alert-dialog-content'])) {
17
+ width: 100% !important;
18
+ max-width: 100% !important;
19
+ margin: 0 !important;
20
+ }
21
+
22
+ :is([data-slot='dialog-content'], [data-slot='alert-dialog-content']) {
23
+ --tw-enter-scale: 1;
24
+ --tw-exit-scale: 1;
25
+ --tw-enter-translate-y: 100%;
26
+ --tw-exit-translate-y: 100%;
27
+
28
+ width: 100%;
29
+ max-width: none;
30
+ margin-inline: 0;
31
+ border-radius: var(--radius-4xl, 2rem);
32
+ padding-bottom: max(1rem, env(safe-area-inset-bottom));
33
+ animation-duration: 200ms;
34
+ }
35
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Modal backdrops dim only the `yuw-layout` body, never the sidebar frame around it, and take its radius.
3
+ * The CDK inserts the backdrop right before the pane, inside the overlay wrapper, which is what the sibling selector reads.
4
+ * With no layout the body variables are unset and the backdrop covers the viewport.
5
+ *
6
+ * No blur: a backdrop filter samples past the box it is clipped to, so it smears the sidebar into the
7
+ * rounded corners and they stop matching the body's.
8
+ */
9
+ .cdk-overlay-backdrop:has(
10
+ + .cdk-overlay-pane :is([data-slot='dialog-content'], [data-slot='alert-dialog-content'], [data-slot='sheet-content'])
11
+ ) {
12
+ top: var(--yuw-layout-body-top, 0px);
13
+ right: var(--yuw-layout-body-right, 0px);
14
+ bottom: var(--yuw-layout-body-bottom, 0px);
15
+ left: var(--yuw-layout-body-left, 0px);
16
+ border-radius: var(--radius-4xl, 2rem);
17
+ backdrop-filter: none;
18
+ }
@@ -17,6 +17,8 @@
17
17
  @import './components/sidebar.css';
18
18
  @import './components/layout.css';
19
19
  @import './spartan-overwrites/accordion.css';
20
+ @import './spartan-overwrites/dialog.css';
21
+ @import './spartan-overwrites/overlay.css';
20
22
  @import './spartan-overwrites/sheet.css';
21
23
  @import './spartan-overwrites/sonner.css';
22
24
 
@@ -23,7 +23,6 @@
23
23
  --primary-border: var(--primary-4);
24
24
  --primary-subtle: var(--primary-1);
25
25
  --primary-subtle-hover: var(--primary-2);
26
- --primary-on-subtle-overlay: var(--primary-8);
27
26
  --primary-on-subtle: var(--primary-8);
28
27
  --primary-on-fill: var(--neutrals-on-fill);
29
28
  --primary-tonal: var(--primary-2);
@@ -63,40 +62,38 @@
63
62
 
64
63
  /** || neutrals || */
65
64
  --neutrals-white: #fdfdfe;
66
- --gray-1: #f9f9fa;
67
- --gray-2: #f6f6f7;
68
- --gray-3: #f2f2f4;
69
- --gray-4: #ededef;
70
- --gray-5: #e7e7ea;
71
- --gray-6: #d7d7db;
65
+ --gray-1: #fafafb;
66
+ --gray-2: #f4f4f5;
67
+ --gray-3: #efeff1;
68
+ --gray-4: #e9e9ec;
69
+ --gray-5: #e4e4e7;
70
+ --gray-6: #d4d4d8;
72
71
  --gray-7: #b5b5ba;
73
72
  --gray-8: #93939a;
74
- --gray-9: #717178;
73
+ --gray-9: #68686f;
75
74
  --gray-10: #56565d;
76
75
  --gray-11: #37373d;
77
76
  --gray-12: #1a1a20;
78
77
  --neutrals-dark: #131319;
79
78
  --neutrals-on-fill: #ffffff;
80
79
  --neutrals-on-fill-dark: #131319;
81
- --neutrals-background: var(--gray-1);
82
- --neutrals-sidebar: var(--neutrals-white);
80
+ --neutrals-background: var(--gray-2);
83
81
  --neutrals-surface: var(--neutrals-white);
84
82
  --neutrals-surface-inset: var(--gray-1);
85
- --neutrals-surface-footer: var(--gray-2);
86
83
  --neutrals-surface-accent: var(--gray-3);
87
84
  --neutrals-overlay: var(--neutrals-white);
88
85
  --neutrals-element-mid-inverse: var(--gray-6);
89
- --neutrals-element-low: var(--gray-10);
90
- --neutrals-element-mid: var(--gray-11);
91
- --neutrals-element-high: var(--gray-12);
86
+ --neutrals-element-low: var(--gray-9);
87
+ --neutrals-element-mid: var(--gray-10);
88
+ --neutrals-element-high: var(--gray-11);
92
89
  --neutrals-outline: var(--gray-5);
93
90
  --neutrals-outline-accent: var(--gray-6);
94
- --neutrals-outline-hover: var(--gray-8);
95
- --neutrals-fill-tile-hover: var(--neutrals-white);
91
+ --neutrals-outline-hover: var(--gray-9);
96
92
  --neutrals-fill: var(--gray-4);
97
93
  --neutrals-fill-hover: var(--gray-5);
98
- --neutrals-fill-active: var(--gray-6);
99
- --neutrals-fill-track: var(--gray-7);
94
+ --neutrals-fill-pressed: var(--gray-6);
95
+ --neutrals-fill-input: var(--gray-1);
96
+ --neutrals-fill-strong: var(--gray-9);
100
97
  --neutrals-fill-inverse: var(--neutrals-white-16);
101
98
  --neutrals-subtle-hover: var(--neutrals-black-6);
102
99
  --neutrals-subtle-pressed: var(--neutrals-black-18);
@@ -121,7 +118,7 @@
121
118
  --red-2: #ffdfdc;
122
119
  --red-3: #ffbfb7;
123
120
  --red-4: #f9776e;
124
- --red-5: #de0b22;
121
+ --red-5: #d9001d;
125
122
  --red-6: #bb0222;
126
123
  --red-7: #940118;
127
124
  --red-subtle: var(--red-1);
@@ -159,7 +156,7 @@
159
156
  --green-2: #d1f0d4;
160
157
  --green-3: #a6e3ae;
161
158
  --green-4: #52b766;
162
- --green-5: #008628;
159
+ --green-5: #007d1e;
163
160
  --green-6: #14702f;
164
161
  --green-subtle: var(--green-1);
165
162
  --green-border-light: var(--green-4);
@@ -173,7 +170,7 @@
173
170
  --blue-2: #d2e9ff;
174
171
  --blue-3: #acd6ff;
175
172
  --blue-4: #67a5ea;
176
- --blue-5: #0d74ce;
173
+ --blue-5: #006cc5;
177
174
  --blue-6: #195daa;
178
175
  --blue-subtle: var(--blue-1);
179
176
  --blue-border-light: var(--blue-4);
@@ -272,7 +269,7 @@
272
269
  --ring-secondary: var(--secondary-6);
273
270
  --ring-destructive: var(--red-6);
274
271
  --ring-primary: var(--primary-7);
275
- --ring-neutral-halo: rgb(113 113 120 / 0.5);
272
+ --ring-neutral-halo: rgb(104 104 111 / 0.5);
276
273
  --ring-primary-halo: rgb(205 51 59 / 0.5);
277
274
  --ring-secondary-halo: rgb(95 106 180 / 0.5);
278
275
  --ring-destructive-halo: rgb(187 2 34 / 0.5);
@@ -332,7 +329,7 @@
332
329
  --secondary-foreground: var(--secondary-on-subtle);
333
330
 
334
331
  /** || Neutral fills || */
335
- --muted: var(--neutrals-surface-footer);
332
+ --muted: var(--neutrals-surface-accent);
336
333
  --muted-foreground: var(--neutrals-element-mid);
337
334
  --accent: var(--neutrals-subtle-hover);
338
335
  --accent-foreground: var(--neutrals-element-high);
@@ -419,27 +416,26 @@
419
416
  --secondary-subtle-pressed: var(--secondary-5);
420
417
 
421
418
  /** || neutrals || */
422
- --gray-1: #111114;
423
- --gray-2: #161619;
424
- --gray-3: #1a1a1d;
425
- --gray-4: #1f1f23;
426
- --gray-5: #232327;
427
- --gray-6: #2f2f34;
419
+ --gray-1: #121214;
420
+ --gray-2: #18181b;
421
+ --gray-3: #1f1f22;
422
+ --gray-4: #27272a;
423
+ --gray-5: #2f2f33;
424
+ --gray-6: #3f3f46;
428
425
  --gray-7: #404046;
429
426
  --gray-8: #606067;
430
- --gray-9: #7f7f86;
427
+ --gray-9: #909097;
431
428
  --gray-10: #a1a1a7;
432
429
  --gray-11: #c9c9ce;
433
430
  --gray-12: #eeeef1;
434
431
  --neutrals-dark: #0c0c10;
435
- --neutrals-sidebar: var(--gray-2);
432
+ --neutrals-background: var(--neutrals-dark);
436
433
  --neutrals-surface: var(--gray-2);
437
- --neutrals-surface-footer: var(--gray-1);
438
- --neutrals-surface-accent: var(--neutrals-dark);
434
+ --neutrals-surface-accent: var(--gray-4);
439
435
  --neutrals-overlay: var(--gray-3);
440
- --neutrals-outline: var(--gray-6);
441
- --neutrals-outline-accent: var(--gray-7);
442
- --neutrals-fill-tile-hover: var(--gray-4);
436
+ --neutrals-outline: var(--gray-5);
437
+ --neutrals-outline-accent: var(--gray-6);
438
+ --neutrals-fill-input: var(--gray-3);
443
439
  --neutrals-fill-inverse: var(--neutrals-black-16);
444
440
  --neutrals-subtle-hover: var(--neutrals-white-4);
445
441
  --neutrals-subtle-pressed: var(--neutrals-white-12);
@@ -458,10 +454,10 @@
458
454
  --neutrals-black-18: rgb(4 4 6 / 0.18);
459
455
 
460
456
  /** || red || */
461
- --red-1: rgb(222 11 34 / 0.08);
462
- --red-2: rgb(222 11 34 / 0.16);
463
- --red-3: rgb(222 11 34 / 0.24);
464
- --red-4: rgb(222 11 34 / 0.36);
457
+ --red-1: rgb(217 0 29 / 0.08);
458
+ --red-2: rgb(217 0 29 / 0.16);
459
+ --red-3: rgb(217 0 29 / 0.24);
460
+ --red-4: rgb(217 0 29 / 0.36);
465
461
  --red-6: #fd736a;
466
462
  --red-7: #ffbfb7;
467
463
  --red-fill-hover: var(--red-5);
@@ -477,22 +473,22 @@
477
473
  --yellow-4: rgb(245 158 11 / 0.36);
478
474
  --yellow-6: #eec469;
479
475
  --yellow-7: #f7e7bb;
480
- --yellow-on-inverse: var(--orange-5);
476
+ --yellow-on-inverse: #9f4800;
481
477
 
482
478
  /** || green || */
483
- --green-1: rgb(0 134 40 / 0.08);
484
- --green-2: rgb(0 134 40 / 0.16);
485
- --green-3: rgb(0 134 40 / 0.24);
486
- --green-4: rgb(0 134 40 / 0.36);
479
+ --green-1: rgb(0 125 30 / 0.08);
480
+ --green-2: rgb(0 125 30 / 0.16);
481
+ --green-3: rgb(0 125 30 / 0.24);
482
+ --green-4: rgb(0 125 30 / 0.36);
487
483
  --green-6: #73d885;
488
484
  --green-7: #bbedc0;
489
485
  --green-on-inverse: var(--green-5);
490
486
 
491
487
  /** || blue || */
492
- --blue-1: rgb(13 116 206 / 0.08);
493
- --blue-2: rgb(13 116 206 / 0.16);
494
- --blue-3: rgb(13 116 206 / 0.24);
495
- --blue-4: rgb(13 116 206 / 0.36);
488
+ --blue-1: rgb(0 108 197 / 0.08);
489
+ --blue-2: rgb(0 108 197 / 0.16);
490
+ --blue-3: rgb(0 108 197 / 0.24);
491
+ --blue-4: rgb(0 108 197 / 0.36);
496
492
  --blue-6: #8dc1ff;
497
493
  --blue-7: #c6e1ff;
498
494
  --blue-on-inverse: var(--blue-5);
@@ -539,7 +535,7 @@
539
535
 
540
536
  /** || focus || */
541
537
  --ring-secondary: var(--secondary-7);
542
- --ring-neutral-halo: rgb(127 127 134 / 0.5);
538
+ --ring-neutral-halo: rgb(144 144 151 / 0.5);
543
539
  --ring-primary-halo: rgb(255 122 119 / 0.5);
544
540
  --ring-secondary-halo: rgb(110 123 195 / 0.5);
545
541
  --ring-destructive-halo: rgb(253 115 106 / 0.5);
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  [data-yuw-color='neutral'] button.bg-primary:not(:disabled):hover {
34
- background: var(--gray-11);
34
+ background: var(--neutrals-element-mid);
35
35
  }
36
36
 
37
37
  [data-yuw-color='destructive'] {
@@ -4339,12 +4339,11 @@ export type YuwSheetLayoutInsetDto = 'left' | 'right';
4339
4339
  * - `layoutInset`: Fits the panel to the frame `yuw-layout` draws (`YuwSheetLayoutInsetDto`).
4340
4340
  * `'left'` leaves the layout's gap above and below (4px, 8px from `lg`), for a panel docked to the
4341
4341
  * sidebar side; `'right'` also leaves it to the right and rounds the panel like the body, so it reads
4342
- * as coming out of it. Either clips the backdrop to the body box `yuw-layout` publishes, so the gap
4343
- * is not dimmed. Absent, the sheet covers the viewport. Classes in `panelClass` and `overlayClass`
4344
- * win over it.
4342
+ * as coming out of it. Absent, the sheet covers the viewport. Classes in `panelClass` win over it.
4345
4343
  * - `open`: Two-way open/closed state (`boolean`). Drive directly via `[(open)]` to open/close programmatically.
4346
4344
  * - `showTrigger`: Whether to render the trigger button. Set `false` when opening only via `[(open)]`.
4347
4345
  * - `side`: Edge of the screen the panel slides in from (`'top'`, `'bottom'`, `'left'`, `'right'`). Default is `'right'`.
4346
+ * A `'bottom'` panel spans the viewport minus 4px on each side and below (8px from `lg`), rounded.
4348
4347
  * - `title`: Optional header title text. User-facing text the consuming app is responsible for translating.
4349
4348
  * - `description`: Optional header description text. User-facing text the consuming app is responsible for translating.
4350
4349
  * - `note`: Optional second muted line under `description`. User-facing text the consuming app is responsible for translating.
@@ -4378,6 +4377,8 @@ export type YuwSheetLayoutInsetDto = 'left' | 'right';
4378
4377
  * A `yuwSheetHeader` element renders as a padded row above the body; with `closeLabel` set, the close
4379
4378
  * button sits inline at its end rather than in the panel corner.
4380
4379
  *
4380
+ * The backdrop covers only the `yuw-layout` body, never the sidebar frame around it (`overlay.css`).
4381
+ *
4381
4382
  * While open, the component adds `yuw-sheet-open` to `<html>`; `theme.css` uses it to hide page
4382
4383
  * scrollbars. The class is removed on close and on destroy.
4383
4384
  *
@@ -4417,7 +4418,6 @@ export declare class YuwSheetComponent {
4417
4418
  readonly triggerSize: import("@angular/core").InputSignal<"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined>;
4418
4419
  readonly triggerVariant: import("@angular/core").InputSignal<"link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined>;
4419
4420
  protected readonly _bodyClass: import("@angular/core").Signal<string>;
4420
- protected readonly _overlayClass: import("@angular/core").Signal<string | undefined>;
4421
4421
  protected readonly _panelClass: import("@angular/core").Signal<string>;
4422
4422
  protected readonly _sheetState: import("@angular/core").Signal<"open" | "closed">;
4423
4423
  constructor();
@@ -6956,8 +6956,9 @@ export declare class YuwsActiveStatusCellComponent {
6956
6956
  }, {}, never, never, true, never>;
6957
6957
  }
6958
6958
  /**
6959
- * Avatar size of the cell: `sm` for entity listings, `base` (36x36) as tall as the name and its second line, so a
6960
- * bigger image does not grow the row, and `md` for the 45x45 thumbnails of catalog listings.
6959
+ * Avatar size of the cell: `base` (36x36), the default for entity listings, as tall as the name and its second line, so
6960
+ * a bigger image does not grow the row; `sm` where a smaller one is wanted, and `md` for the 45x45 thumbnails of
6961
+ * catalog listings.
6961
6962
  */
6962
6963
  export type YuwsAvatarNameCellSize = 'sm' | 'base' | 'md';
6963
6964
  /** Avatar shape of the cell: `square` by default, `circle` where a round avatar is wanted, such as people. */
@@ -6977,7 +6978,7 @@ export declare const YUWS_AVATAR_NAME_HEADER_CLASS: Readonly<Record<YuwsAvatarNa
6977
6978
  * - `name` (required): Visible name; also the avatar's alternative text.
6978
6979
  * - `description`: Second line under the name; omitted when empty. Default is `undefined`.
6979
6980
  * - `shape`: Avatar shape (`'circle'`, `'square'`). Default is `'square'`.
6980
- * - `size`: Avatar size (`'sm'`, `'base'`, `'md'`). Default is `'sm'`.
6981
+ * - `size`: Avatar size (`'sm'`, `'base'`, `'md'`). Default is `'base'`.
6981
6982
  */
6982
6983
  export declare class YuwsAvatarNameCellComponent {
6983
6984
  readonly description: import("@angular/core").InputSignal<string | undefined>;
@@ -7019,6 +7020,31 @@ export declare class YuwsAvatarNameCellComponent {
7019
7020
  };
7020
7021
  }, {}, never, never, true, never>;
7021
7022
  }
7023
+ /**
7024
+ * Table cell showing every one of a row's `items` as a badge, wrapping onto as many lines as they need. With no items
7025
+ * it shows nothing.
7026
+ *
7027
+ * Inputs:
7028
+ * - `items` (required): Texts of the badges, already translated.
7029
+ * - `color`: Color of every badge (any `YuwColorDto` value). Default is `'neutral'`.
7030
+ */
7031
+ export declare class YuwsBadgeListCellComponent {
7032
+ readonly color: import("@angular/core").InputSignal<YuwColorDto>;
7033
+ readonly items: import("@angular/core").InputSignal<readonly string[]>;
7034
+ static ɵfac: i0.ɵɵFactoryDeclaration<YuwsBadgeListCellComponent, never>;
7035
+ static ɵcmp: i0.ɵɵComponentDeclaration<YuwsBadgeListCellComponent, "yuws-badge-list-cell", never, {
7036
+ "color": {
7037
+ "alias": "color";
7038
+ "required": false;
7039
+ "isSignal": true;
7040
+ };
7041
+ "items": {
7042
+ "alias": "items";
7043
+ "required": true;
7044
+ "isSignal": true;
7045
+ };
7046
+ }, {}, never, never, true, never>;
7047
+ }
7022
7048
  /**
7023
7049
  * Table cell that clamps its text to two lines, breaking anywhere, for long values with no spaces such as tokens. The
7024
7050
  * full text stays in the `title`.
@@ -7224,6 +7250,10 @@ export declare class YuwsMenuActionsCellComponent {
7224
7250
  };
7225
7251
  }, {}, never, never, true, never>;
7226
7252
  }
7253
+ interface OverflowListEntry {
7254
+ readonly label: string;
7255
+ readonly imageUrl?: string;
7256
+ }
7227
7257
  /**
7228
7258
  * Table cell with the first of a row's `items` and a `+N` badge counting the rest. The whole cell is the trigger of a
7229
7259
  * popover centred under it that lists every item; with a single item it is plain text with no popover. The trigger's
@@ -7236,12 +7266,16 @@ export declare class YuwsMenuActionsCellComponent {
7236
7266
  *
7237
7267
  * Inputs:
7238
7268
  * - `items` (required): Texts of the row, already translated; the first one is shown in the cell.
7269
+ * - `imageUrls`: Image of each item, by position, shown as a round avatar before its text in the cell and the popover.
7270
+ * An item without one shows no avatar.
7239
7271
  */
7240
7272
  export declare class YuwsOverflowListCellComponent {
7273
+ readonly imageUrls: import("@angular/core").InputSignal<readonly (string | undefined)[]>;
7241
7274
  readonly items: import("@angular/core").InputSignal<readonly string[]>;
7242
7275
  private _closeTimer;
7243
7276
  protected readonly open: import("@angular/core").WritableSignal<boolean>;
7244
- protected readonly first: import("@angular/core").Signal<string>;
7277
+ protected readonly entries: import("@angular/core").Signal<OverflowListEntry[]>;
7278
+ protected readonly first: import("@angular/core").Signal<OverflowListEntry>;
7245
7279
  protected readonly hiddenCount: import("@angular/core").Signal<string>;
7246
7280
  protected readonly overflows: import("@angular/core").Signal<boolean>;
7247
7281
  constructor();
@@ -7251,6 +7285,11 @@ export declare class YuwsOverflowListCellComponent {
7251
7285
  private _cancelClose;
7252
7286
  static ɵfac: i0.ɵɵFactoryDeclaration<YuwsOverflowListCellComponent, never>;
7253
7287
  static ɵcmp: i0.ɵɵComponentDeclaration<YuwsOverflowListCellComponent, "yuws-overflow-list-cell", never, {
7288
+ "imageUrls": {
7289
+ "alias": "imageUrls";
7290
+ "required": false;
7291
+ "isSignal": true;
7292
+ };
7254
7293
  "items": {
7255
7294
  "alias": "items";
7256
7295
  "required": true;