yukit-web 1.1.0 → 1.1.2

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.1.0",
4
+ "version": "1.1.2",
5
5
  "author": {
6
6
  "name": "Yurest Solutions",
7
7
  "email": "develop@yurest.com"
@@ -78,6 +78,16 @@ export declare class YuwClassDirective {
78
78
  };
79
79
  }, {}, never, never, true, never>;
80
80
  }
81
+ /**
82
+ * Spacing of every floating panel that lists options (context menus, combobox panels, popover menus): the panel pads
83
+ * 8px and each row another 8px, so text sits 16px from the edge everywhere. Helm ships each family with its own
84
+ * numbers, and these override them from the `yuw-*` layer.
85
+ */
86
+ export declare const YUW_MENU_PANEL_CLASS = "p-2";
87
+ export declare const YUW_MENU_ITEM_CLASS = "gap-2.5 px-2 py-2";
88
+ export declare const YUW_MENU_INDICATOR_ITEM_CLASS = "gap-2.5 py-2 ps-2";
89
+ export declare const YUW_MENU_LABEL_CLASS = "block px-2 pt-1 pb-2 text-sm font-normal text-muted-foreground";
90
+ export declare const YUW_MENU_SEPARATOR_CLASS = "-mx-2 my-1.5";
81
91
  /** Scroll axes the mouse-scroll directives drag along. */
82
92
  type YuwScrollAxisDto = 'x' | 'y';
83
93
  /**
@@ -527,7 +537,8 @@ export type YuwComboboxValue = string | string[] | undefined;
527
537
  *
528
538
  * Content marked `yuwComboboxFooter` is projected at the bottom of the option list, for actions
529
539
  * that belong with it (a "clear all", say); content marked `yuwComboboxHeader` is projected at the top
530
- * of the panel, for a title. The consumer renders and styles both.
540
+ * of the panel, for a title. The panel spaces both: the header reads as a menu label, the footer sits
541
+ * under a separator.
531
542
  *
532
543
  * `multiple` takes precedence over `readonlyTrigger`: when both are set the multi-select
533
544
  * chips shape renders and `readonlyTrigger` is ignored.
@@ -569,14 +580,17 @@ export declare class YuwComboboxComponent<TData = unknown> extends YuwValueAcces
569
580
  readonly triggerVariant: import("@angular/core").InputSignal<"link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined>;
570
581
  readonly value: import("@angular/core").ModelSignal<YuwComboboxValue>;
571
582
  protected readonly _focusSelectors: string[];
583
+ protected readonly _footerClass = "-mx-2 mt-1.5 border-t px-2 pt-1.5 empty:hidden";
572
584
  private readonly _generatedId;
585
+ protected readonly _headerClass: string;
573
586
  protected readonly _itemToString: (value: string) => string;
587
+ protected readonly _listClass = "max-h-none! min-h-0 p-0!";
574
588
  protected readonly _chipsClass: import("@angular/core").Signal<string>;
575
589
  protected readonly _clearVisible: import("@angular/core").Signal<boolean>;
576
- protected readonly _contentClass: import("@angular/core").Signal<"" | "w-auto min-w-56 max-w-80">;
590
+ protected readonly _contentClass: import("@angular/core").Signal<string>;
577
591
  protected readonly _controlId: import("@angular/core").Signal<string>;
578
592
  protected readonly _fieldClass: import("@angular/core").Signal<string>;
579
- protected readonly _itemClass: import("@angular/core").Signal<"" | "cursor-pointer! gap-3! pe-1.5! [&>ng-icon]:hidden!">;
593
+ protected readonly _itemClass: import("@angular/core").Signal<string>;
580
594
  private readonly _labelByValue;
581
595
  protected readonly _multipleValue: import("@angular/core").Signal<string[]>;
582
596
  protected readonly _searchInPanel: import("@angular/core").Signal<boolean>;
@@ -2846,6 +2860,11 @@ export declare class YuwContextMenuSubIndicatorComponent {
2846
2860
  * with an isolated `ngc` compile. Own inputs of the helm classes (`disabled`/`align`/`side` on
2847
2861
  * the trigger, `inset`/`variant` on items, `sideOffset` on the panel) *are* forwarded
2848
2862
  * declaratively.
2863
+ *
2864
+ * `triggered` is the exception, and it must NOT be bridged: the helm items already expose
2865
+ * `cdkMenuItemTriggered` as `triggered` on the element, and Angular binds a `(triggered)` listener to
2866
+ * every directive on the element with an output of that name. A second `triggered` here ran every
2867
+ * listener twice per click — two downloads, and a checkbox toggled back to where it was.
2849
2868
  */
2850
2869
  /**
2851
2870
  * Attach to an element to open a context menu upon right-clicking.
@@ -2911,12 +2930,8 @@ export declare class YuwContextMenuDirective {
2911
2930
  }
2912
2931
  /** Interactive action item within a context menu. Place on a `<button>` element. */
2913
2932
  export declare class YuwContextMenuItemDirective {
2914
- private readonly _item;
2915
- readonly triggered: import("@angular/core").OutputRef<void>;
2916
2933
  static ɵfac: i0.ɵɵFactoryDeclaration<YuwContextMenuItemDirective, never>;
2917
- static ɵdir: i0.ɵɵDirectiveDeclaration<YuwContextMenuItemDirective, "[yuwContextMenuItem]", never, {}, {
2918
- "triggered": "triggered";
2919
- }, never, never, true, [{
2934
+ static ɵdir: i0.ɵɵDirectiveDeclaration<YuwContextMenuItemDirective, "[yuwContextMenuItem]", never, {}, {}, never, never, true, [{
2920
2935
  directive: typeof i2.HlmDropdownMenuItem;
2921
2936
  inputs: {
2922
2937
  "disabled": "disabled";
@@ -2949,7 +2964,6 @@ export declare class YuwContextMenuCheckboxDirective {
2949
2964
  private readonly _item;
2950
2965
  readonly checked: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2951
2966
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2952
- readonly triggered: import("@angular/core").OutputRef<void>;
2953
2967
  constructor();
2954
2968
  static ɵfac: i0.ɵɵFactoryDeclaration<YuwContextMenuCheckboxDirective, never>;
2955
2969
  static ɵdir: i0.ɵɵDirectiveDeclaration<YuwContextMenuCheckboxDirective, "[yuwContextMenuCheckbox]", never, {
@@ -2963,9 +2977,7 @@ export declare class YuwContextMenuCheckboxDirective {
2963
2977
  "required": false;
2964
2978
  "isSignal": true;
2965
2979
  };
2966
- }, {
2967
- "triggered": "triggered";
2968
- }, never, never, true, [{
2980
+ }, {}, never, never, true, [{
2969
2981
  directive: typeof i2.HlmDropdownMenuCheckbox;
2970
2982
  inputs: {
2971
2983
  "inset": "inset";
@@ -2999,7 +3011,6 @@ export declare class YuwContextMenuRadioDirective {
2999
3011
  private readonly _item;
3000
3012
  readonly checked: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3001
3013
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3002
- readonly triggered: import("@angular/core").OutputRef<void>;
3003
3014
  constructor();
3004
3015
  static ɵfac: i0.ɵɵFactoryDeclaration<YuwContextMenuRadioDirective, never>;
3005
3016
  static ɵdir: i0.ɵɵDirectiveDeclaration<YuwContextMenuRadioDirective, "[yuwContextMenuRadio]", never, {
@@ -3013,9 +3024,7 @@ export declare class YuwContextMenuRadioDirective {
3013
3024
  "required": false;
3014
3025
  "isSignal": true;
3015
3026
  };
3016
- }, {
3017
- "triggered": "triggered";
3018
- }, never, never, true, [{
3027
+ }, {}, never, never, true, [{
3019
3028
  directive: typeof i2.HlmDropdownMenuRadio;
3020
3029
  inputs: {};
3021
3030
  outputs: {};
@@ -4560,7 +4569,8 @@ export type YuwPopoverAlignDto = 'start' | 'center' | 'end';
4560
4569
  * - `title`: Optional header title text. User-facing text the consuming app is responsible for translating.
4561
4570
  * - `description`: Optional header description text. User-facing text the consuming app is responsible for translating.
4562
4571
  * - `panelClass`: Extra classes merged onto the popover panel (e.g. `w-80` to widen it). They win
4563
- * over the library defaults via `twMerge`.
4572
+ * over the library defaults via `twMerge`. The panel pads 8px like every menu, and the header reads as a
4573
+ * menu label, so projected content places itself.
4564
4574
  * - `triggerVariant`: Button style variant for the trigger button.
4565
4575
  * - `triggerColor`: Brand color theme for the trigger button (any `YuwColorDto` value). Default is
4566
4576
  * `'neutral'`.
@@ -4600,6 +4610,7 @@ export declare class YuwPopoverComponent {
4600
4610
  readonly triggerSize: import("@angular/core").InputSignal<"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined>;
4601
4611
  readonly triggerTransparent: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4602
4612
  readonly triggerVariant: import("@angular/core").InputSignal<"link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined>;
4613
+ protected readonly _panelClass: import("@angular/core").Signal<string>;
4603
4614
  protected readonly _popoverState: import("@angular/core").Signal<"open" | "closed">;
4604
4615
  protected onOpenChange(state: 'open' | 'closed'): void;
4605
4616
  static ɵfac: i0.ɵɵFactoryDeclaration<YuwPopoverComponent, never>;
@@ -7668,7 +7679,7 @@ export interface YuwsFormSheetLabels {
7668
7679
  * - `saveColor`: Color of the save button (any `YuwColorDto` value). Default is `'primary'`.
7669
7680
  * - `saveDisabled`: Disables the save button. Default is `false`.
7670
7681
  * - `saveIcon`: ng-icon name of the save button's icon, registered by the consumer with `provideIcons` unless it is the
7671
- * default. Default is `'lucideSave'`.
7682
+ * default. Default is `'lucideSaveCheck'`.
7672
7683
  * - `saving`: Disables the footer actions while the host's write is in flight. Default is `false`.
7673
7684
  * - `title` (required): Panel title.
7674
7685
  * - `open` (model): Whether the panel is open.
@@ -8216,6 +8227,88 @@ export declare class YuwsPageHeaderComponent {
8216
8227
  "secondaryClicked": "secondaryClicked";
8217
8228
  }, never, never, true, never>;
8218
8229
  }
8230
+ /**
8231
+ * A figure in a card: label, value and, below it, whatever is projected. With `actionLabel` the label becomes a button
8232
+ * stretched over the whole card, so the help icon stays a sibling of it and not a control nested inside.
8233
+ *
8234
+ * Inputs:
8235
+ * - `actionLabel`: Turns the card into a button and is its hint (`title` and accessible description); a plain card
8236
+ * when unset. Default is `undefined`.
8237
+ * - `disabled`: Disables the button of an action card. Default is `false`.
8238
+ * - `errorText`: Shown as an alert instead of the value; the card has failed while it is set. Default is `undefined`.
8239
+ * - `help`: Tooltip and accessible name of an info icon after the label; no icon when unset. Default is `undefined`.
8240
+ * - `icon`: Icon name before the label, registered by the consumer. Default is `undefined`.
8241
+ * - `label` (required): The figure's name. The consuming app translates it.
8242
+ * - `loading`: Shows a skeleton instead of the value. Default is `false`.
8243
+ * - `pressed`: `aria-pressed` of an action card that toggles something; not a toggle when unset. Default is
8244
+ * `undefined`.
8245
+ * - `value`: The figure, already formatted. Default is `undefined`.
8246
+ *
8247
+ * Outputs:
8248
+ * - `activated`: Emitted when an action card is clicked.
8249
+ */
8250
+ export declare class YuwsStatCardComponent {
8251
+ readonly actionLabel: import("@angular/core").InputSignal<string | undefined>;
8252
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
8253
+ readonly errorText: import("@angular/core").InputSignal<string | undefined>;
8254
+ readonly help: import("@angular/core").InputSignal<string | undefined>;
8255
+ readonly icon: import("@angular/core").InputSignal<string | undefined>;
8256
+ readonly label: import("@angular/core").InputSignal<string>;
8257
+ readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
8258
+ readonly pressed: import("@angular/core").InputSignal<boolean | undefined>;
8259
+ readonly value: import("@angular/core").InputSignal<string | number | undefined>;
8260
+ readonly activated: import("@angular/core").OutputEmitterRef<void>;
8261
+ static ɵfac: i0.ɵɵFactoryDeclaration<YuwsStatCardComponent, never>;
8262
+ static ɵcmp: i0.ɵɵComponentDeclaration<YuwsStatCardComponent, "yuws-stat-card", never, {
8263
+ "actionLabel": {
8264
+ "alias": "actionLabel";
8265
+ "required": false;
8266
+ "isSignal": true;
8267
+ };
8268
+ "disabled": {
8269
+ "alias": "disabled";
8270
+ "required": false;
8271
+ "isSignal": true;
8272
+ };
8273
+ "errorText": {
8274
+ "alias": "errorText";
8275
+ "required": false;
8276
+ "isSignal": true;
8277
+ };
8278
+ "help": {
8279
+ "alias": "help";
8280
+ "required": false;
8281
+ "isSignal": true;
8282
+ };
8283
+ "icon": {
8284
+ "alias": "icon";
8285
+ "required": false;
8286
+ "isSignal": true;
8287
+ };
8288
+ "label": {
8289
+ "alias": "label";
8290
+ "required": true;
8291
+ "isSignal": true;
8292
+ };
8293
+ "loading": {
8294
+ "alias": "loading";
8295
+ "required": false;
8296
+ "isSignal": true;
8297
+ };
8298
+ "pressed": {
8299
+ "alias": "pressed";
8300
+ "required": false;
8301
+ "isSignal": true;
8302
+ };
8303
+ "value": {
8304
+ "alias": "value";
8305
+ "required": false;
8306
+ "isSignal": true;
8307
+ };
8308
+ }, {
8309
+ "activated": "activated";
8310
+ }, never, ["*"], true, never>;
8311
+ }
8219
8312
  /**
8220
8313
  * Grid of projected cards, usually `yuws-card-grid-item`s in an `@for`. `loading` shows
8221
8314
  * `skeletonCount` placeholders shaped by `skeletonClass`; `empty` shows `emptyText`; `columnsClass`
@@ -8519,7 +8612,7 @@ export declare class YuwsFilterContentDirective {
8519
8612
  * `showExport`, `shareSource`, `hideableColumns`, `viewMode`. Setting `viewMode` adds a list/block switch bound
8520
8613
  * two-way to it (`viewModeChange` is the click listener); its names come from `labels.viewMode`. Saved filter sets need `filterSets` and `labels.filters.sets`;
8521
8614
  * the toolbar emits `setSaved`, `setRenamed` and `setDeleted` and the consumer persists them. `labels` holds every text and the consumer translates it;
8522
- * `idleColor` is the tone of the filter row's outline controls (filters, add button, star). Each active
8615
+ * `idleColor` is the tone of the filter row's outline controls (filters, add button). Each active
8523
8616
  * group renders a combobox opened from an outline button; a projected `<ng-template yuwsFilterContent="groupId">` replaces it (see
8524
8617
  * `YuwsFilterContentDirective`). `selection` may be set from outside at any time, e.g. restored from
8525
8618
  * IndexedDB, and the row shows a filter for every group it holds.