@brickclay-org/ui 0.1.86 → 0.1.87
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/brickclay-org-ui.mjs +44 -28
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +17 -6
- package/package.json +1 -1
- package/src/lib/input/input.css +1 -1
- package/src/lib/toastr/toastr.css +14 -29
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { EventEmitter, OnInit, OnDestroy, OnChanges, ElementRef, Renderer2, SimpleChanges, AfterViewInit, QueryList, ComponentRef, Type, InjectionToken, NgZone,
|
|
2
|
+
import { EventEmitter, OnInit, OnDestroy, OnChanges, ElementRef, Renderer2, SimpleChanges, AfterViewInit, QueryList, ComponentRef, Type, InjectionToken, NgZone, ChangeDetectorRef, TemplateRef, WritableSignal } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, NgControl, NgModel } from '@angular/forms';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -1067,7 +1067,7 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1067
1067
|
dropdownView: _angular_core.InputSignal<"list" | "grid">;
|
|
1068
1068
|
gridColumns: _angular_core.InputSignal<BkSelectGridColumn[]>;
|
|
1069
1069
|
/** Grid density. `inherit` follows the trigger's existing `variation`. */
|
|
1070
|
-
gridVariation: _angular_core.InputSignal<"
|
|
1070
|
+
gridVariation: _angular_core.InputSignal<"default" | "sm" | "inherit">;
|
|
1071
1071
|
/** Stage multi-grid changes until Apply is clicked. */
|
|
1072
1072
|
gridSelectionActions: _angular_core.InputSignal<boolean>;
|
|
1073
1073
|
gridMinWidth: _angular_core.InputSignal<string>;
|
|
@@ -2658,15 +2658,26 @@ interface ToastMessage extends ToastConfig {
|
|
|
2658
2658
|
readonly inline?: boolean;
|
|
2659
2659
|
leaving: boolean;
|
|
2660
2660
|
}
|
|
2661
|
+
/**
|
|
2662
|
+
* Renders through Angular CDK's Overlay (same primitive `bk-select` / `bk-dialog` / `bk-popover`
|
|
2663
|
+
* already use), positioned with a `GlobalPositionStrategy` rather than a connected one — a toast
|
|
2664
|
+
* has no trigger element to anchor to, it docks to a viewport corner, which is exactly what the
|
|
2665
|
+
* global strategy is for (Angular Material's own snack bar is built the same way).
|
|
2666
|
+
*
|
|
2667
|
+
* The win over the old `document.body.appendChild()` approach isn't just consistency: CDK sets
|
|
2668
|
+
* top/left/right/bottom as inline styles from JS at runtime, via its own prebuilt overlay CSS
|
|
2669
|
+
* (`@angular/cdk/overlay-prebuilt.css`, already imported by consumers) — positioning no longer
|
|
2670
|
+
* depends on this library's own Tailwind `@apply` classes surviving the build pipeline at all.
|
|
2671
|
+
*/
|
|
2661
2672
|
declare class BkToastrService {
|
|
2662
|
-
private readonly
|
|
2663
|
-
private readonly injector;
|
|
2673
|
+
private readonly overlay;
|
|
2664
2674
|
private readonly _toasts;
|
|
2665
2675
|
readonly toasts: _angular_core.Signal<ToastMessage[]>;
|
|
2666
2676
|
private readonly _position;
|
|
2667
2677
|
readonly position: _angular_core.Signal<ToastPosition>;
|
|
2678
|
+
private overlayRef;
|
|
2668
2679
|
private componentRef;
|
|
2669
|
-
|
|
2680
|
+
private buildPositionStrategy;
|
|
2670
2681
|
private initializeContainer;
|
|
2671
2682
|
/** Show a toast with full config */
|
|
2672
2683
|
show(config: ToastConfig): string;
|
|
@@ -4101,7 +4112,7 @@ declare class BkTd extends BkCellBase implements AfterViewInit, OnDestroy {
|
|
|
4101
4112
|
*/
|
|
4102
4113
|
protected readonly truncatedTooltip: _angular_core.WritableSignal<string>;
|
|
4103
4114
|
/** Forwarded to the content wrapper's `bkTooltip`. Override on a column whose default 'right' would run into its neighbour. */
|
|
4104
|
-
tooltipPosition: _angular_core.InputSignal<"
|
|
4115
|
+
tooltipPosition: _angular_core.InputSignal<"top" | "bottom" | "left" | "right">;
|
|
4105
4116
|
/** Only present when `ellipsis()` is true — see the `@else` branch in the template. */
|
|
4106
4117
|
private ellipsisTextRef?;
|
|
4107
4118
|
checkbox: _angular_core.InputSignal<boolean>;
|
package/package.json
CHANGED
package/src/lib/input/input.css
CHANGED
|
@@ -3,36 +3,21 @@
|
|
|
3
3
|
═══════════════════════════════════════════════════════════════════════════ */
|
|
4
4
|
|
|
5
5
|
/* ─── Container ───────────────────────────────────────────────────────────── */
|
|
6
|
+
/*
|
|
7
|
+
* Positioning (fixed + top/left/right/bottom/centering per corner) is owned entirely by CDK's
|
|
8
|
+
* GlobalPositionStrategy now (see toastr.service.ts) — it sets those as inline styles on the
|
|
9
|
+
* `.cdk-global-overlay-wrapper` it creates around this component, from its own prebuilt CSS.
|
|
10
|
+
* This class only lays out the toast stack *within* that wrapper.
|
|
11
|
+
*/
|
|
6
12
|
.toast-container {
|
|
7
|
-
@apply
|
|
8
|
-
/* Make sure nothing in the app sits above the toast + allow only toast items to capture clicks */
|
|
9
|
-
z-index: 2147483647 !important;
|
|
13
|
+
@apply flex flex-col gap-3 max-w-[calc(100vw-2rem)];
|
|
10
14
|
pointer-events: none;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
/*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.toast-container[data-position="top-left"] {
|
|
19
|
-
@apply top-4 left-4;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.toast-container[data-position="top-center"] {
|
|
23
|
-
@apply top-4 left-1/2 -translate-x-1/2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.toast-container[data-position="bottom-right"] {
|
|
27
|
-
@apply bottom-4 right-4;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.toast-container[data-position="bottom-left"] {
|
|
31
|
-
@apply bottom-4 left-4;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.toast-container[data-position="bottom-center"] {
|
|
35
|
-
@apply bottom-4 left-1/2 -translate-x-1/2;
|
|
17
|
+
/* Guarantee toasts stack above dialogs/popovers/etc. that also use CDK overlays — CDK's own
|
|
18
|
+
z-index otherwise just reflects creation order. Targets the pane CDK wraps this panel in. */
|
|
19
|
+
.cdk-overlay-pane.bk-toastr-panel {
|
|
20
|
+
z-index: 2147483647 !important;
|
|
36
21
|
}
|
|
37
22
|
|
|
38
23
|
/* ─── Toast item (base) ───────────────────────────────────────────────────── */
|
|
@@ -208,11 +193,11 @@
|
|
|
208
193
|
max-width: 100%;
|
|
209
194
|
}
|
|
210
195
|
|
|
196
|
+
/* Center positions hug their own content width and float centered rather than stretching
|
|
197
|
+
full-bleed like the corner positions — CDK only owns the container's outer placement,
|
|
198
|
+
this inner alignment is still ours to keep. */
|
|
211
199
|
.toast-container[data-position="top-center"],
|
|
212
200
|
.toast-container[data-position="bottom-center"] {
|
|
213
|
-
left: 50% !important;
|
|
214
|
-
right: auto !important;
|
|
215
|
-
transform: translateX(-50%) !important;
|
|
216
201
|
align-items: center;
|
|
217
202
|
}
|
|
218
203
|
|