yukit-web 1.0.2 → 1.0.4

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.2",
4
+ "version": "1.0.4",
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
 
@@ -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;