@sixbell-telco/sdk 4.3.0 → 4.5.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/CHANGELOG.md +35 -1
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/dropdown-chevron/dropdown-chevron.component.d.ts +1 -1
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +10 -13
- package/components/dropdown-menu/README.md +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +5 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +2 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +2 -0
- package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +1 -0
- package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +2 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +2 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +1 -0
- package/components/dropdown-menu/src/dropdown-menu-trigger/dropdown-menu-trigger.component.d.ts +1 -0
- package/components/forms/combobox/README.md +1 -1
- package/components/forms/combobox/src/combobox.component.d.ts +10 -11
- package/components/forms/select/README.md +1 -1
- package/components/forms/select/src/select.component.d.ts +10 -11
- package/components/overlay/README.md +6 -1
- package/components/overlay/src/overlay.component.d.ts +9 -8
- package/components/tooltip/README.md +3 -2
- package/components/tooltip/src/tooltip.component.d.ts +8 -8
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +18 -9
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +5 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +20 -9
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +26 -55
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +35 -49
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +35 -43
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +39 -77
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +33 -52
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +35 -13
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-popover-motion.mjs +186 -0
- package/fesm2022/sixbell-telco-sdk-utils-popover-motion.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +129 -14
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/layouts/README.md +15 -1
- package/layouts/public-api.d.ts +2 -2
- package/layouts/src/layout-account.d.ts +16 -0
- package/layouts/src/menu/menu-active.d.ts +2 -1
- package/layouts/src/menu/menu-url.d.ts +2 -0
- package/layouts/src/page-banner/page-banner.component.d.ts +13 -1
- package/layouts/src/user-menu/user-menu.component.d.ts +4 -2
- package/package.json +41 -37
- package/src/_index.css +85 -0
- package/utils/popover-motion/README.md +38 -0
- package/utils/popover-motion/index.d.ts +5 -0
- package/utils/popover-motion/public-api.d.ts +2 -0
- package/utils/popover-motion/src/popover-menu-motion.d.ts +37 -0
- package/utils/popover-motion/src/popover-motion.d.ts +31 -0
- package/utils/translation/README.md +2 -0
- package/utils/translation/src/translation.service.d.ts +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.5.0] - 2026-10-28
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Layouts**: `actions` on `LayoutAccount` (type `LayoutAccountAction`: `id`, `labelKey`, optional `icon`, `run`). `st-user-menu` lists them in the Account group after change password, in order, and the group now shows when there is change password or at least one action. Pass a computed signal to show an option only when it applies, for example switching tenant when the user has several
|
|
15
|
+
|
|
16
|
+
## [4.4.0] - 2026-10-23
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **Layouts**: `backQueryParams` input on `st-page-banner` (type `PageBannerBackQueryParams`): the query params of the current URL that the back button keeps. Defaults to `['menu']`; `'all'` keeps every param, `[]` keeps none. Params written in `backLink` win
|
|
21
|
+
- **Styling**: shared popover motion. The `popover-motion` utility, the `st-popover-in` / `st-popover-out` keyframes and the tokens `--popover-in-duration` (160ms), `--popover-out-duration` (110ms), `--ease-popover-in` (`cubic-bezier(0.16, 1, 0.3, 1)`), `--ease-popover-out` (`cubic-bezier(0.4, 0, 1, 1)`), `--popover-distance` (4px) and `--popover-scale` (0.96) in `_index.css`. Opening fades in from 4px toward the trigger and scales from 0.96 with `transform-origin` on the placement side and alignment; closing fades out with the same small travel and no scale. Under `prefers-reduced-motion` there is no travel or scale, and the global 0.01ms backstop keeps `animationend` firing
|
|
22
|
+
- **Popover Motion**: new `@sixbell-telco/sdk/utils/popover-motion` entry point with `popoverPlacement()` (CDK connection pair to `{ side, align }`), `isPopoverMotionAnimation()`, `mirrorPopoverOffset()`, `POPOVER_MOTION_ANIMATIONS`, `PopoverMenuMotionDirective` (`stPopoverMenuMotion`, for `cdkMenu` panels, with `stPopoverMenuMotionTheme` for the theme source), `popoverMenuPositions()` and `popoverContextMenuPositions()`
|
|
23
|
+
- **Dropdown Menu**: open and close animation. Menus, submenus, context menus and menu-bar menus use the shared popover motion; the closing menu plays its exit on an inert, `aria-hidden` snapshot while the CDK detaches the real menu at once, so focus return and the menu stack are unchanged. Root and menu-bar menus now open 4px below (or above) their trigger
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **Dropdown**, **Overlay**, **Tooltip**, **Select**, **Combobox**: panels use the shared popover motion instead of the 20px `tailwind-animations` fade with `ease-in-out`. The panel carries `data-side` / `data-align` from the position the CDK actually applied (a panel below the trigger is `data-side="bottom"`), and the entrance waits for that first position, so a flip no longer restarts it. The panel no longer gets `overflow-hidden` while animating, so shadows and rings are never clipped
|
|
28
|
+
- **Dropdown**: `offsetY` on `st-dropdown-trigger` defaults to `4` (was `0`), the same gap as `st-select` and `st-combobox`. Generated fallbacks that anchor the opposite edge mirror the offset (a flip above uses `-4`), so the gap stays a gap; pass `[offsetY]="0"` for the previous flush placement
|
|
29
|
+
- **Overlay**: `offsetY` on `st-overlay` defaults to `4` (was `0`), the same gap as `st-dropdown`, `st-select` and `st-combobox`, mirrored on the generated flip fallbacks; pass `[offsetY]="0"` for the previous flush placement
|
|
30
|
+
- **Dropdown**, **Select**, **Combobox**: `animationDirection` now reports the real placement side (`'bottom'` for a panel below the trigger) and `animationClasses` returns `popover-motion`; both are deprecated in favor of the panel's `data-side`
|
|
31
|
+
- **Dropdown Menu**: `dataState` and `onAnimationEnd` on `st-dropdown-menu-bar-content` are deprecated and no longer bound; the panel's `data-state` comes from the shared motion
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **Translation**: `TranslationService.setRuntimeConfig` no longer empties translations on a refresh after the first load. It used to set `ready()` to `false` and call `reloadLang`, which deleted the active bundle until the refetch finished, so a host adding a remote's i18n path on the first visit showed keys and emptied menus built from `isReady()` for about 850 ms. Once translations are ready, the new bundle is fetched first and merged over the loaded one: `ready()` stays `true`, `instant()` keeps the previous values, `onLangChange` (`onLanguageChange$`) emits once and `changes()` and `onLanguageChange` tick once when the bundle is in, and a failed fetch keeps the loaded translations and logs an error. A `setLanguage()` made during the fetch is kept and that language is refetched with the new paths, and when refreshes (or `refreshInactiveLanguages()` calls) overlap only the latest bundle is applied. The first load is unchanged. Bootstrap cache validation and `refreshTranslation()` refresh the same way, and the duplicate background reload on a path change is gone
|
|
36
|
+
- **Select**, **Combobox**: Escape closes with the exit animation instead of the CDK detaching the panel at once, then returns focus to the trigger; `blurred` is emitted once per close, whether it closes with Escape, the trigger, a selection or a click outside (neither the outside click nor the detach after the exit animation repeats it). A click outside during the entrance animation closes the panel too, with the exit animation (it used to emit `blurred` and leave the panel open), and the entrance no longer moves focus into a panel that is already closing
|
|
37
|
+
- **Dropdown Menu**: menus, submenus, context menus and menu-bar menus (and their exit snapshot) take the theme of the place they are declared, as `st-dropdown` does; a menu opened inside a dark-scheme section no longer renders light
|
|
38
|
+
- **Layouts**: in `route` mode the side menu treats an entry whose route is `/` as the shortest prefix of every URL, so it is active when no longer route matches (it was only active on `/` itself). `findRouteTrail` / `resolveActiveMenu` change accordingly; longest prefix still wins and `menu-id` mode is unchanged
|
|
39
|
+
- **Layouts**: no `transition-all` left in the kit. The `st-layout-switcher` preview cards transition `border-color`, `box-shadow` and `scale`, and the `st-user-menu` trigger transitions its colors, shadow, transform, width, min-width, padding and gap, so nothing else (layout, inherited values, focus outlines) animates. `npm run theme:test` now fails on any `transition-all`, `transition-[all]` or CSS `transition: all` in `projects/sdk` (`scripts/no-transition-all.check.mjs`)
|
|
40
|
+
- **Layouts**: the `st-page-banner` back button no longer drops the host's `?menu=` param (MFE_NAV_001), so the side menu keeps its active entry in `menu-id` mode after going back. Page-specific params are still dropped
|
|
41
|
+
|
|
10
42
|
## [4.3.0] - 2026-10-15
|
|
11
43
|
|
|
12
44
|
### Added
|
|
@@ -1044,7 +1076,9 @@ Each MFE (SBP host, aux-tables, audit, Herald, guas, ddt, bulkload) does the fol
|
|
|
1044
1076
|
- **ngx-pagination**: Removed dependency after migrating to internal PaginationPipe
|
|
1045
1077
|
- **Unused Exports**: Removed unused components and exports from public API
|
|
1046
1078
|
|
|
1047
|
-
[Unreleased]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.
|
|
1079
|
+
[Unreleased]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.5.0...HEAD
|
|
1080
|
+
[4.5.0]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.4.0...4.5.0
|
|
1081
|
+
[4.4.0]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.3.0...4.4.0
|
|
1048
1082
|
[4.3.0]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.2.0...4.3.0
|
|
1049
1083
|
[4.2.0]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.1.2...4.2.0
|
|
1050
1084
|
[4.1.2]: https://github.com/EnghouseGlobal/NW-SX-web-libs-ui-kit/compare/4.1.1...4.1.2
|
|
@@ -4,7 +4,7 @@ Import: `@sixbell-telco/sdk/components/dropdown`
|
|
|
4
4
|
|
|
5
5
|
Selectors: `st-dropdown`, `st-dropdown-trigger`, `st-dropdown-content`, `st-dropdown-item`, `st-dropdown-chevron`
|
|
6
6
|
|
|
7
|
-
Menu attached to a trigger.
|
|
7
|
+
Menu attached to a trigger. Opens and closes with the shared popover motion (`popover-motion` in `_index.css`); the panel's `data-side` is the side the CDK placed it on. `offsetY` defaults to a 4px gap (mirrored when a fallback flips the panel); pass `[offsetY]="0"` for a flush panel.
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ export declare class DropdownChevronComponent {
|
|
|
30
30
|
/**
|
|
31
31
|
* Position relative to content
|
|
32
32
|
*/
|
|
33
|
-
position: import("@angular/core").InputSignal<"
|
|
33
|
+
position: import("@angular/core").InputSignal<"right" | "left">;
|
|
34
34
|
/**
|
|
35
35
|
* Whether the chevron is open (rotated)
|
|
36
36
|
* Derives from the parent trigger's isOpen signal
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConnectedOverlayPositionChange, ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
2
|
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { PopoverPlacement, PopoverSide } from '@sixbell-telco/sdk/utils/popover-motion';
|
|
3
4
|
import { ThemeDomService } from '@sixbell-telco/sdk/utils/theme';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/** Animation states for the dropdown */
|
|
@@ -54,7 +55,7 @@ export declare class DropdownTriggerComponent {
|
|
|
54
55
|
private readonly pendingFocus;
|
|
55
56
|
/** Offset X in pixels */
|
|
56
57
|
offsetX: import("@angular/core").InputSignal<number>;
|
|
57
|
-
/**
|
|
58
|
+
/** Gap in pixels between the trigger and the panel; flipped fallbacks mirror it */
|
|
58
59
|
offsetY: import("@angular/core").InputSignal<number>;
|
|
59
60
|
/** Origin X position */
|
|
60
61
|
originX: import("@angular/core").InputSignal<DropdownXPosition>;
|
|
@@ -111,22 +112,18 @@ export declare class DropdownTriggerComponent {
|
|
|
111
112
|
/** @internal aria-controls value: the menu id while the menu is expanded */
|
|
112
113
|
readonly controls: import("@angular/core").Signal<string | null>;
|
|
113
114
|
constructor();
|
|
114
|
-
/**
|
|
115
|
+
/** Position the CDK applied for the current open cycle; null until the first `positionChange` */
|
|
115
116
|
currentPosition: import("@angular/core").WritableSignal<ConnectedPosition | null>;
|
|
117
|
+
/** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
|
|
118
|
+
readonly placement: import("@angular/core").Signal<PopoverPlacement | null>;
|
|
116
119
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
120
|
+
* Side of the trigger the panel opened on (`'bottom'` until the CDK places it)
|
|
121
|
+
* @deprecated Read `data-side` on the panel instead; kept for compatibility
|
|
119
122
|
*/
|
|
120
|
-
animationDirection: import("@angular/core").Signal<
|
|
123
|
+
animationDirection: import("@angular/core").Signal<PopoverSide>;
|
|
121
124
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* All class names are static and detectable by Tailwind at build time
|
|
125
|
-
*/
|
|
126
|
-
private readonly animationClassMap;
|
|
127
|
-
/**
|
|
128
|
-
* Computed class string for animations
|
|
129
|
-
* Applies the correct animation based on position using static class names
|
|
125
|
+
* Class of the panel: the shared `popover-motion` utility driven by `data-state` and `data-side`
|
|
126
|
+
* @deprecated Kept for compatibility; the motion lives in the `popover-motion` utility
|
|
130
127
|
*/
|
|
131
128
|
animationClasses: import("@angular/core").Signal<string>;
|
|
132
129
|
/** Content template reference */
|
|
@@ -4,7 +4,7 @@ Import: `@sixbell-telco/sdk/components/dropdown-menu`
|
|
|
4
4
|
|
|
5
5
|
Selector: `st-dropdown-menu`
|
|
6
6
|
|
|
7
|
-
Nested menu system (trigger, content, items, submenus).
|
|
7
|
+
Nested menu system (trigger, content, items, submenus). Menus open and close with the shared popover motion (`popover-motion` in `_index.css`). Root and menu-bar menus open 4px from their trigger. A closing menu detaches at once, so focus and the menu stack are unchanged, and its exit plays on an inert, `aria-hidden` snapshot.
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -8,6 +8,8 @@ type AnimationState = 'closed' | 'opening' | 'open' | 'closing';
|
|
|
8
8
|
* DropdownMenuBarContent - Container for menu bar dropdown content
|
|
9
9
|
*/
|
|
10
10
|
export declare class DropdownMenuBarContentComponent {
|
|
11
|
+
/** @internal Where the menu is declared; its portaled panel takes this element's theme */
|
|
12
|
+
protected readonly host: HTMLElement;
|
|
11
13
|
private readonly menuStack;
|
|
12
14
|
private readonly templateRef;
|
|
13
15
|
get template(): TemplateRef<unknown>;
|
|
@@ -32,7 +34,8 @@ export declare class DropdownMenuBarContentComponent {
|
|
|
32
34
|
*/
|
|
33
35
|
closed: import("@angular/core").OutputEmitterRef<void>;
|
|
34
36
|
/**
|
|
35
|
-
* Computed data state
|
|
37
|
+
* Computed data state
|
|
38
|
+
* @deprecated The panel's `data-state` now comes from the shared popover motion; this value is no longer bound
|
|
36
39
|
*/
|
|
37
40
|
dataState: import("@angular/core").Signal<AnimationState>;
|
|
38
41
|
/**
|
|
@@ -49,6 +52,7 @@ export declare class DropdownMenuBarContentComponent {
|
|
|
49
52
|
onMenuClosed(): void;
|
|
50
53
|
/**
|
|
51
54
|
* Handle animation end
|
|
55
|
+
* @deprecated The shared popover motion settles the panel; this handler is no longer bound
|
|
52
56
|
*/
|
|
53
57
|
onAnimationEnd(event: AnimationEvent): void;
|
|
54
58
|
/**
|
|
@@ -5,6 +5,8 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class DropdownMenuBarSubTriggerComponent {
|
|
7
7
|
private readonly elementRef;
|
|
8
|
+
/** @internal Placements tagged for the shared popover motion */
|
|
9
|
+
protected readonly menuPositions: import("@angular/cdk/overlay").ConnectedPosition[];
|
|
8
10
|
private readonly isOpen;
|
|
9
11
|
private hoverTimeout;
|
|
10
12
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -5,6 +5,8 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class DropdownMenuBarTriggerComponent {
|
|
7
7
|
private readonly elementRef;
|
|
8
|
+
/** @internal Placements tagged for the shared popover motion */
|
|
9
|
+
protected readonly menuPositions: import("@angular/cdk/overlay").ConnectedPosition[];
|
|
8
10
|
private readonly isOpen;
|
|
9
11
|
private hoverTimeout;
|
|
10
12
|
/**
|
package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* DropdownMenuContent - Container for dropdown menu items
|
|
5
5
|
*/
|
|
6
6
|
export declare class DropdownMenuContentComponent {
|
|
7
|
+
/** @internal Where the menu is declared; its portaled panel takes this element's theme */
|
|
8
|
+
protected readonly host: HTMLElement;
|
|
7
9
|
private readonly menuStack;
|
|
8
10
|
private readonly templateRef;
|
|
9
11
|
get template(): TemplateRef<unknown>;
|
|
@@ -4,6 +4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* DropdownMenuSubContent - Container for submenu items
|
|
5
5
|
*/
|
|
6
6
|
export declare class DropdownMenuSubContentComponent {
|
|
7
|
+
/** @internal Where the menu is declared; its portaled panel takes this element's theme */
|
|
8
|
+
protected readonly host: HTMLElement;
|
|
7
9
|
private readonly menuStack;
|
|
8
10
|
private readonly templateRef;
|
|
9
11
|
get template(): TemplateRef<unknown>;
|
|
@@ -5,6 +5,7 @@ import * as i1 from "@angular/cdk/menu";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class DropdownMenuSubTriggerComponent {
|
|
7
7
|
private readonly dropdownMenuService;
|
|
8
|
+
constructor();
|
|
8
9
|
readonly iconChevronRight = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z\"></path></svg>";
|
|
9
10
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
10
11
|
readonly className: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -4,7 +4,7 @@ Import: `@sixbell-telco/sdk/components/forms/combobox`
|
|
|
4
4
|
|
|
5
5
|
Selector: `st-combobox`
|
|
6
6
|
|
|
7
|
-
Searchable select. Clear is a sibling of the trigger; the chevron is a custom icon that rotates in place.
|
|
7
|
+
Searchable select. Clear is a sibling of the trigger; the chevron is a custom icon that rotates in place. The panel opens 4px from the field with the shared popover motion (`popover-motion`), toward the side the CDK placed it on.
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -16,6 +16,7 @@ import { ElementRef } from '@angular/core';
|
|
|
16
16
|
import { ControlValueAccessor, FormGroup } from '@angular/forms';
|
|
17
17
|
import { TranslateService } from '@ngx-translate/core';
|
|
18
18
|
import { BadgeSizeProps } from '@sixbell-telco/sdk/components/badge';
|
|
19
|
+
import { PopoverPlacement, PopoverSide } from '@sixbell-telco/sdk/utils/popover-motion';
|
|
19
20
|
import { ThemeDomService } from '@sixbell-telco/sdk/utils/theme';
|
|
20
21
|
import * as i0 from "@angular/core";
|
|
21
22
|
/**
|
|
@@ -262,6 +263,8 @@ export declare class ComboboxComponent implements ControlValueAccessor {
|
|
|
262
263
|
private readonly searchSubject;
|
|
263
264
|
/** Current animation state of the overlay */
|
|
264
265
|
private readonly animationState;
|
|
266
|
+
/** Set when the exit animation already ran the close cleanup, so the detach that follows does not repeat it */
|
|
267
|
+
private exitSettled;
|
|
265
268
|
/** Trigger for blur events in form validation */
|
|
266
269
|
private readonly blurTrigger;
|
|
267
270
|
/** Active option index for keyboard navigation */
|
|
@@ -282,20 +285,16 @@ export declare class ComboboxComponent implements ControlValueAccessor {
|
|
|
282
285
|
private readonly currentPosition;
|
|
283
286
|
/** Overlay positions with a symmetric 4px trigger gap (below first, flip above) */
|
|
284
287
|
readonly overlayPositions: ConnectedPosition[];
|
|
288
|
+
/** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
|
|
289
|
+
readonly placement: import("@angular/core").Signal<PopoverPlacement | null>;
|
|
285
290
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* All class names are static and detectable by Tailwind at build time
|
|
291
|
+
* Side of the field the panel opened on (`'bottom'` until the CDK places it)
|
|
292
|
+
* @deprecated Read `data-side` on the panel instead; kept for compatibility
|
|
289
293
|
*/
|
|
290
|
-
|
|
294
|
+
animationDirection: import("@angular/core").Signal<PopoverSide>;
|
|
291
295
|
/**
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*/
|
|
295
|
-
animationDirection: import("@angular/core").Signal<"bottom" | "top" | "left" | "right">;
|
|
296
|
-
/**
|
|
297
|
-
* Computed class string for animations
|
|
298
|
-
* Applies the correct animation based on position using static class names
|
|
296
|
+
* Class of the panel: the shared `popover-motion` utility driven by `data-state` and `data-side`
|
|
297
|
+
* @deprecated Kept for compatibility; the motion lives in the `popover-motion` utility
|
|
299
298
|
*/
|
|
300
299
|
animationClasses: import("@angular/core").Signal<string>;
|
|
301
300
|
/** Form control reference for reactive forms */
|
|
@@ -14,6 +14,6 @@ List picker. Clear is a sibling of the trigger; the chevron is a custom icon tha
|
|
|
14
14
|
|
|
15
15
|
## Notes
|
|
16
16
|
|
|
17
|
-
- `allowClear` defaults to `true`.
|
|
17
|
+
- `allowClear` defaults to `true`. The panel opens 4px from the field with the shared popover motion (`popover-motion`), toward the side the CDK placed it on.
|
|
18
18
|
- Do not nest the clear button inside the trigger.
|
|
19
19
|
- Async options: a value written through the form (`writeValue`) before its option exists is kept and resolved to the matching option, with its label, as soon as one arrives (first load or a replaced list), without calling `onChange` (the control stays pristine). A user selection, clear or `writeValue(null)` replaces it. While no option matches the select shows the placeholder and its value is `null`; the form control still holds the written value.
|
|
@@ -3,6 +3,7 @@ import { ControlValueAccessor, FormGroup } from '@angular/forms';
|
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { CdkListbox } from '@angular/cdk/listbox';
|
|
5
5
|
import { ConnectedOverlayPositionChange, ConnectedPosition } from '@angular/cdk/overlay';
|
|
6
|
+
import { PopoverPlacement, PopoverSide } from '@sixbell-telco/sdk/utils/popover-motion';
|
|
6
7
|
import { ThemeDomService } from '@sixbell-telco/sdk/utils/theme';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/** Possible select dropdown style variants */
|
|
@@ -178,6 +179,8 @@ export declare class SelectComponent implements ControlValueAccessor {
|
|
|
178
179
|
protected readonly clearSelectionLabel: import("@angular/core").Signal<string>;
|
|
179
180
|
/** Current animation state of the overlay */
|
|
180
181
|
private readonly animationState;
|
|
182
|
+
/** Set when the exit animation already ran the close cleanup, so the detach that follows does not repeat it */
|
|
183
|
+
private exitSettled;
|
|
181
184
|
/** Trigger for blur events in form validation */
|
|
182
185
|
private readonly blurTrigger;
|
|
183
186
|
/** Active option index for keyboard navigation */
|
|
@@ -196,20 +199,16 @@ export declare class SelectComponent implements ControlValueAccessor {
|
|
|
196
199
|
private readonly currentPosition;
|
|
197
200
|
/** Overlay positions with a symmetric 4px trigger gap (below first, flip above) */
|
|
198
201
|
readonly overlayPositions: ConnectedPosition[];
|
|
202
|
+
/** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
|
|
203
|
+
readonly placement: import("@angular/core").Signal<PopoverPlacement | null>;
|
|
199
204
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
* All class names are static and detectable by Tailwind at build time
|
|
205
|
+
* Side of the field the panel opened on (`'bottom'` until the CDK places it)
|
|
206
|
+
* @deprecated Read `data-side` on the panel instead; kept for compatibility
|
|
203
207
|
*/
|
|
204
|
-
|
|
208
|
+
animationDirection: import("@angular/core").Signal<PopoverSide>;
|
|
205
209
|
/**
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*/
|
|
209
|
-
animationDirection: import("@angular/core").Signal<"bottom" | "top" | "left" | "right">;
|
|
210
|
-
/**
|
|
211
|
-
* Computed class string for animations
|
|
212
|
-
* Applies the correct animation based on position using static class names
|
|
210
|
+
* Class of the panel: the shared `popover-motion` utility driven by `data-state` and `data-side`
|
|
211
|
+
* @deprecated Kept for compatibility; the motion lives in the `popover-motion` utility
|
|
213
212
|
*/
|
|
214
213
|
animationClasses: import("@angular/core").Signal<string>;
|
|
215
214
|
/** Form control reference for reactive forms */
|
|
@@ -22,10 +22,15 @@ match the trigger.
|
|
|
22
22
|
## Notes
|
|
23
23
|
|
|
24
24
|
- Position via `originX` / `originY` / `overlayX` / `overlayY` and `fallbacks`.
|
|
25
|
+
- `offsetY` defaults to a 4px gap, like `st-dropdown`, `st-select` and
|
|
26
|
+
`st-combobox`; generated fallbacks that flip to the opposite edge mirror it.
|
|
27
|
+
Pass `[offsetY]="0"` for a flush panel.
|
|
25
28
|
- The primary connection is attempted first, followed by configured fallback
|
|
26
29
|
positions or the built-in Y flip, X flip, both-axis flip, and standard
|
|
27
30
|
placements. CDK push keeps the selected pane inside the viewport.
|
|
28
|
-
-
|
|
31
|
+
- Motion is the shared `popover-motion`: the entrance starts once the CDK
|
|
32
|
+
placed the pane (`data-side`), so a flip never restarts it.
|
|
33
|
+
- Opening and closing remain mounted until the animation settles;
|
|
29
34
|
`opened` and `closed` reflect the settled lifecycle. Escape and outside clicks
|
|
30
35
|
dismiss the overlay, while programmatic and Escape closes restore the captured
|
|
31
36
|
trigger focus.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConnectedOverlayPositionChange, ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
|
+
import { PopoverMotionState, PopoverPlacement } from '@sixbell-telco/sdk/utils/popover-motion';
|
|
2
3
|
import { ThemeDomService } from '@sixbell-telco/sdk/utils/theme';
|
|
3
4
|
import { OverlayContentComponent } from '../overlay-content/overlay-content.component';
|
|
4
5
|
import { OverlayTriggerComponent } from '../overlay-trigger/overlay-trigger.component';
|
|
@@ -14,7 +15,6 @@ export interface OverlayFallbackPositions {
|
|
|
14
15
|
/** Custom fallback positions - if not provided, default fallbacks will be used */
|
|
15
16
|
positions?: ConnectedPosition[];
|
|
16
17
|
}
|
|
17
|
-
type OverlayPhase = 'closed' | 'opening' | 'open' | 'closing';
|
|
18
18
|
/**
|
|
19
19
|
* Overlay - Shell component for creating custom overlays with positioning
|
|
20
20
|
*
|
|
@@ -71,7 +71,7 @@ export declare class OverlayComponent {
|
|
|
71
71
|
private readonly animatedRoot;
|
|
72
72
|
/** Offset X in pixels */
|
|
73
73
|
offsetX: import("@angular/core").InputSignal<number>;
|
|
74
|
-
/**
|
|
74
|
+
/** Gap in pixels between the trigger and the panel; flipped fallbacks mirror it */
|
|
75
75
|
offsetY: import("@angular/core").InputSignal<number>;
|
|
76
76
|
/** Origin X position */
|
|
77
77
|
originX: import("@angular/core").InputSignal<OverlayXPosition>;
|
|
@@ -90,7 +90,7 @@ export declare class OverlayComponent {
|
|
|
90
90
|
/** Internal signal to keep the portal rendered during exit animation */
|
|
91
91
|
readonly renderedOpen: import("@angular/core").WritableSignal<boolean>;
|
|
92
92
|
/** Current animation lifecycle phase */
|
|
93
|
-
readonly phase: import("@angular/core").WritableSignal<
|
|
93
|
+
readonly phase: import("@angular/core").WritableSignal<PopoverMotionState>;
|
|
94
94
|
private transitionToken;
|
|
95
95
|
private closeReason;
|
|
96
96
|
private restoreTarget;
|
|
@@ -99,8 +99,10 @@ export declare class OverlayComponent {
|
|
|
99
99
|
private animationFallbackHandle;
|
|
100
100
|
/** Internal signal to track the synced width */
|
|
101
101
|
readonly _syncedWidth: import("@angular/core").WritableSignal<string | null>;
|
|
102
|
-
/**
|
|
102
|
+
/** Position the CDK applied for the current open cycle; null until the first `positionChange` */
|
|
103
103
|
currentPosition: import("@angular/core").WritableSignal<ConnectedPosition | null>;
|
|
104
|
+
/** Real placement of the open panel, bound to `data-side` / `data-align`; null until the CDK places it */
|
|
105
|
+
readonly placement: import("@angular/core").Signal<PopoverPlacement | null>;
|
|
104
106
|
/** Event emitted when overlay is opened */
|
|
105
107
|
opened: import("@angular/core").OutputEmitterRef<void>;
|
|
106
108
|
/** Event emitted when overlay is closed */
|
|
@@ -152,6 +154,8 @@ export declare class OverlayComponent {
|
|
|
152
154
|
*/
|
|
153
155
|
toggle(): void;
|
|
154
156
|
private requestState;
|
|
157
|
+
/** Measure the fallback once the next render applied the phase, so the computed animation is the real one */
|
|
158
|
+
private deferAnimationFallback;
|
|
155
159
|
private settleOpening;
|
|
156
160
|
private settleClosing;
|
|
157
161
|
private scheduleAnimationFallback;
|
|
@@ -159,9 +163,6 @@ export declare class OverlayComponent {
|
|
|
159
163
|
private captureFocusTarget;
|
|
160
164
|
private restoreFocus;
|
|
161
165
|
private isFocusable;
|
|
162
|
-
private expectedAnimationName;
|
|
163
|
-
private sideFromPair;
|
|
164
|
-
protected animationClass(): string;
|
|
165
166
|
/**
|
|
166
167
|
* Update the synced width based on trigger element width
|
|
167
168
|
*/
|
|
@@ -170,6 +171,7 @@ export declare class OverlayComponent {
|
|
|
170
171
|
* Handle position changes from CDK overlay
|
|
171
172
|
*/
|
|
172
173
|
onAttach(): void;
|
|
174
|
+
/** The first position of an open cycle starts the entrance (`data-side`), so its fallback is measured then */
|
|
173
175
|
onPositionChange(position: ConnectedOverlayPositionChange): void;
|
|
174
176
|
onAnimationEnd(event: AnimationEvent): void;
|
|
175
177
|
onAnimationCancel(event: AnimationEvent): void;
|
|
@@ -188,4 +190,3 @@ export declare class OverlayComponent {
|
|
|
188
190
|
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayComponent, never>;
|
|
189
191
|
static ɵcmp: i0.ɵɵComponentDeclaration<OverlayComponent, "st-overlay", ["stOverlay"], { "offsetX": { "alias": "offsetX"; "required": false; "isSignal": true; }; "offsetY": { "alias": "offsetY"; "required": false; "isSignal": true; }; "originX": { "alias": "originX"; "required": false; "isSignal": true; }; "originY": { "alias": "originY"; "required": false; "isSignal": true; }; "overlayX": { "alias": "overlayX"; "required": false; "isSignal": true; }; "overlayY": { "alias": "overlayY"; "required": false; "isSignal": true; }; "fallbacks": { "alias": "fallbacks"; "required": false; "isSignal": true; }; "syncWidth": { "alias": "syncWidth"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, ["trigger", "content"], ["st-overlay-trigger"], true, never>;
|
|
190
192
|
}
|
|
191
|
-
export {};
|
|
@@ -42,5 +42,6 @@ Hover or focus hint backed by direct CDK connected-overlay positioning. Use
|
|
|
42
42
|
is not described, so the text is not read twice.
|
|
43
43
|
- Rich content is descriptive and portal-only. Keep interactive controls in the
|
|
44
44
|
trigger or use a component designed for interactive overlays.
|
|
45
|
-
- Open and close states settle after the
|
|
46
|
-
|
|
45
|
+
- Open and close states settle after the shared popover motion
|
|
46
|
+
(`popover-motion`), which starts once the CDK placed the pane. Under reduced
|
|
47
|
+
motion the pane only fades, without changing tooltip semantics.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectedPosition, FlexibleConnectedPositionStrategy, ScrollStrategy } from '@angular/cdk/overlay';
|
|
2
|
+
import { PopoverMotionState, PopoverPlacement } from '@sixbell-telco/sdk/utils/popover-motion';
|
|
2
3
|
import { ThemeDomService } from '@sixbell-telco/sdk/utils/theme';
|
|
3
4
|
import { TooltipContentComponent } from '../tooltip-content/tooltip-content.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
@@ -19,8 +20,6 @@ export type TooltipProps = {
|
|
|
19
20
|
variant?: TooltipVariantProps;
|
|
20
21
|
position?: TooltipPositionProps;
|
|
21
22
|
};
|
|
22
|
-
type TooltipSide = 'top' | 'bottom' | 'right' | 'left';
|
|
23
|
-
type TooltipPhase = 'closed' | 'opening' | 'open' | 'closing';
|
|
24
23
|
/**
|
|
25
24
|
* A customizable tooltip component with multiple variants and content options
|
|
26
25
|
*
|
|
@@ -111,9 +110,9 @@ export declare class TooltipComponent {
|
|
|
111
110
|
/** Set by a press, an activation or Escape; only a fresh pointer enter or keyboard focus clears it. */
|
|
112
111
|
private readonly dismissed;
|
|
113
112
|
protected readonly renderedOpen: import("@angular/core").WritableSignal<boolean>;
|
|
114
|
-
protected readonly phase: import("@angular/core").WritableSignal<
|
|
113
|
+
protected readonly phase: import("@angular/core").WritableSignal<PopoverMotionState>;
|
|
115
114
|
private readonly activePosition;
|
|
116
|
-
private readonly
|
|
115
|
+
private readonly closingPlacement;
|
|
117
116
|
private transitionToken;
|
|
118
117
|
protected readonly tooltipId: string;
|
|
119
118
|
protected readonly paneId: string;
|
|
@@ -136,11 +135,10 @@ export declare class TooltipComponent {
|
|
|
136
135
|
private oppositeSide;
|
|
137
136
|
private orthogonalSides;
|
|
138
137
|
private sideFromPair;
|
|
139
|
-
|
|
138
|
+
/** Real placement of the pane, bound to `data-side` / `data-align`; null until the CDK places it */
|
|
139
|
+
protected readonly placement: import("@angular/core").Signal<PopoverPlacement | null>;
|
|
140
140
|
protected readonly tooltipClasses: import("@angular/core").Signal<string>;
|
|
141
|
-
protected readonly transformOrigin: import("@angular/core").Signal<string>;
|
|
142
141
|
protected tooltipAnimationClass(): string;
|
|
143
|
-
private expectedTooltipAnimationName;
|
|
144
142
|
private hasFocusableDescendant;
|
|
145
143
|
protected resolveFocusTarget(event: FocusEvent): HTMLElement | null;
|
|
146
144
|
protected syncDescribedBy(target: HTMLElement | null): void;
|
|
@@ -167,6 +165,7 @@ export declare class TooltipComponent {
|
|
|
167
165
|
* keeps its own Escape for the next press, and a menu opened above the tooltip keeps this one.
|
|
168
166
|
*/
|
|
169
167
|
protected onOverlayKeydown(event: KeyboardEvent): void;
|
|
168
|
+
/** The first position of an open cycle starts the entrance (`data-side`), so its fallback is measured then */
|
|
170
169
|
protected onTooltipPositionChange(event: ConnectedOverlayPositionChange): void;
|
|
171
170
|
protected tooltipPositionStrategy(): FlexibleConnectedPositionStrategy;
|
|
172
171
|
private isOriginOutsideView;
|
|
@@ -175,9 +174,10 @@ export declare class TooltipComponent {
|
|
|
175
174
|
protected onTooltipDetach(): void;
|
|
176
175
|
private settleTooltipOpening;
|
|
177
176
|
private settleTooltipClosing;
|
|
177
|
+
/** Measure the fallback once the next render applied the phase (and `data-side`), so the computed animation is the real one */
|
|
178
|
+
private deferTooltipAnimationFallback;
|
|
178
179
|
private scheduleTooltipAnimationFallback;
|
|
179
180
|
private clearTooltipAnimationFallback;
|
|
180
181
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
181
182
|
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "st-tooltip", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; }, {}, ["customContent", "richContentElement"], ["st-tooltip-content", "*"], true, never>;
|
|
182
183
|
}
|
|
183
|
-
export {};
|