codexly-ui 0.11.9 → 0.12.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/fesm2022/codexly-ui.mjs +187 -61
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +18 -3
package/package.json
CHANGED
package/types/codexly-ui.d.ts
CHANGED
|
@@ -2641,14 +2641,20 @@ type ClxToastType = ClxColor;
|
|
|
2641
2641
|
interface ClxToastAction {
|
|
2642
2642
|
label: string;
|
|
2643
2643
|
onClick: () => void;
|
|
2644
|
-
/** Visual weight for this action button.
|
|
2645
|
-
variant?: '
|
|
2644
|
+
/** Visual weight for this action button. First action in the list defaults to 'primary', the rest to 'ghost'. */
|
|
2645
|
+
variant?: 'primary' | 'ghost';
|
|
2646
2646
|
}
|
|
2647
2647
|
interface ClxToastOptions {
|
|
2648
2648
|
type?: ClxToastType;
|
|
2649
2649
|
message: string;
|
|
2650
2650
|
title?: string;
|
|
2651
2651
|
icon?: string;
|
|
2652
|
+
/** Small uppercase label above the title (e.g. event source: "Inventario") — pairs with `timestamp`. */
|
|
2653
|
+
category?: string;
|
|
2654
|
+
/** Relative time shown next to `category` (e.g. "hace 2 min"). Ignored when `category` is unset. */
|
|
2655
|
+
timestamp?: Date;
|
|
2656
|
+
/** Small pill next to the title (e.g. "Crítico") for toasts that need extra visual weight. */
|
|
2657
|
+
badgeLabel?: string;
|
|
2652
2658
|
position?: ClxToastPosition;
|
|
2653
2659
|
duration?: number;
|
|
2654
2660
|
showProgress?: boolean;
|
|
@@ -2661,10 +2667,13 @@ interface ClxToastOptions {
|
|
|
2661
2667
|
/** Multiple action buttons (e.g. Approve/Reject). Takes precedence over `action` when both are set. */
|
|
2662
2668
|
actions?: ClxToastAction[];
|
|
2663
2669
|
}
|
|
2664
|
-
interface ClxToastEntry extends Required<Omit<ClxToastOptions, 'title' | 'action' | 'actions' | 'icon'>> {
|
|
2670
|
+
interface ClxToastEntry extends Required<Omit<ClxToastOptions, 'title' | 'action' | 'actions' | 'icon' | 'category' | 'timestamp' | 'badgeLabel'>> {
|
|
2665
2671
|
id: string;
|
|
2666
2672
|
title?: string;
|
|
2667
2673
|
icon?: string;
|
|
2674
|
+
category?: string;
|
|
2675
|
+
timestamp?: Date;
|
|
2676
|
+
badgeLabel?: string;
|
|
2668
2677
|
action?: ClxToastAction;
|
|
2669
2678
|
actions?: ClxToastAction[];
|
|
2670
2679
|
removing: boolean;
|
|
@@ -2683,11 +2692,14 @@ declare class ClxToastComponent implements OnInit, OnDestroy {
|
|
|
2683
2692
|
private _elapsed;
|
|
2684
2693
|
private _destroyed;
|
|
2685
2694
|
protected readonly _icon: _angular_core.Signal<string>;
|
|
2695
|
+
protected readonly _bgClass: _angular_core.Signal<string>;
|
|
2686
2696
|
protected readonly _borderClass: _angular_core.Signal<string>;
|
|
2697
|
+
protected readonly _iconBgClass: _angular_core.Signal<string>;
|
|
2687
2698
|
protected readonly _colorClass: _angular_core.Signal<string>;
|
|
2688
2699
|
protected readonly _progressColor: _angular_core.Signal<string>;
|
|
2689
2700
|
protected readonly _buttonColor: _angular_core.Signal<codexly_ui.ClxColorInput>;
|
|
2690
2701
|
protected readonly _actions: _angular_core.Signal<ClxToastAction[]>;
|
|
2702
|
+
protected readonly _relativeTime: _angular_core.Signal<string>;
|
|
2691
2703
|
private get _card();
|
|
2692
2704
|
ngOnInit(): void;
|
|
2693
2705
|
ngOnDestroy(): void;
|
|
@@ -4056,6 +4068,9 @@ declare class ClxToastService {
|
|
|
4056
4068
|
error(message: string, opts?: Partial<ClxToastOptions>): void;
|
|
4057
4069
|
warning(message: string, opts?: Partial<ClxToastOptions>): void;
|
|
4058
4070
|
info(message: string, opts?: Partial<ClxToastOptions>): void;
|
|
4071
|
+
/** Shows a toast built straight from a live ClxNotificationItem (e.g. on SSE arrival) — the same
|
|
4072
|
+
* object already driving the notification panel/bell, no manual field mapping at the call site. */
|
|
4073
|
+
fromNotification(item: ClxNotificationItem, opts?: Partial<ClxToastOptions>): void;
|
|
4059
4074
|
dismissAll(): void;
|
|
4060
4075
|
private _getOrCreateContainer;
|
|
4061
4076
|
private _uid;
|