@sixbell-telco/sdk 3.3.1 → 4.1.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 +137 -1
- package/README.md +47 -47
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/_index.css +673 -76
- package/components/audio-player/README.md +1 -0
- package/components/audio-player/button-play/button-play.component.d.ts +3 -0
- package/components/audio-player/src/audio-player.component.d.ts +8 -0
- package/components/audio-player/volume-control/volume-control.component.d.ts +3 -0
- package/components/button/README.md +13 -0
- package/components/button/src/button.component.d.ts +30 -5
- package/components/data-table/README.md +53 -3
- package/components/data-table/expandable/expandable.component.d.ts +15 -2
- package/components/data-table/public-api.d.ts +2 -0
- package/components/data-table/sortable-header/sortable-header.component.d.ts +15 -1
- package/components/data-table/src/aria-sort.d.ts +22 -0
- package/components/data-table/src/data-table-context.service.d.ts +11 -3
- package/components/data-table/src/data-table.component.d.ts +39 -3
- package/components/data-table/src/sort-icon.component.d.ts +22 -0
- package/components/data-table/src/toggle-size.d.ts +7 -0
- package/components/data-table/sub-component-toggle/sub-component-toggle.component.d.ts +13 -0
- package/components/dialog/README.md +1 -0
- package/components/dialog/src/dialog.component.d.ts +9 -2
- package/components/divider/src/divider.component.d.ts +5 -0
- package/components/dropdown/README.md +21 -0
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +4 -0
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +36 -0
- package/components/dropdown/src/dropdown-item-focus.d.ts +6 -0
- package/components/dropdown/src/dropdown.component.d.ts +5 -2
- package/components/dual-list/src/dual-list.component.d.ts +6 -0
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +6 -0
- package/components/forms/combobox/src/combobox.component.d.ts +7 -0
- package/components/forms/date-picker/README.md +2 -0
- package/components/forms/date-picker/src/date-picker.component.d.ts +6 -0
- package/components/forms/select/src/select.component.d.ts +3 -0
- package/components/icon/README.md +8 -1
- package/components/icon/src/icon.component.d.ts +9 -1
- package/components/notification/README.md +8 -0
- package/components/notification/src/notification.component.d.ts +8 -1
- package/components/paginator/README.md +1 -0
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +7 -1
- package/components/paginator/src/paginator.component.d.ts +10 -0
- package/components/sonner/toaster/src/toaster.component.d.ts +2 -1
- package/components/table/README.md +25 -0
- package/components/table/public-api.d.ts +1 -0
- package/components/table/src/table-loading.d.ts +18 -0
- package/components/table/src/table.component.d.ts +32 -4
- package/components/text/README.md +1 -0
- package/components/tooltip/src/tooltip.component.d.ts +2 -0
- package/directives/text/src/text.directive.d.ts +2 -2
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +48 -10
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +83 -4
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +34 -33
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +429 -361
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +42 -22
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs +8 -2
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +7 -7
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +247 -47
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +10 -3
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +16 -8
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +13 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +9 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +8 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +3 -15
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +2 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +12 -4
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs +17 -8
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +24 -5
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +2 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +2 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +99 -22
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +21 -3
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +944 -0
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-cn.mjs +2 -3
- package/fesm2022/sixbell-telco-sdk-utils-cn.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-http.mjs +39 -0
- package/fesm2022/sixbell-telco-sdk-utils-http.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs +150 -0
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +103 -4
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +71 -2
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/layouts/README.md +278 -0
- package/layouts/index.d.ts +5 -0
- package/layouts/public-api.d.ts +23 -0
- package/layouts/src/app-layout/app-layout.component.d.ts +83 -0
- package/layouts/src/layout-account.d.ts +16 -0
- package/layouts/src/layout-logo.d.ts +10 -0
- package/layouts/src/layout-switcher/layout-switcher.component.d.ts +13 -0
- package/layouts/src/layout.config.d.ts +22 -0
- package/layouts/src/layout.service.d.ts +17 -0
- package/layouts/src/menu/menu-active.d.ts +24 -0
- package/layouts/src/menu/menu-animation.d.ts +34 -0
- package/layouts/src/menu/menu-search.d.ts +13 -0
- package/layouts/src/menu/menu-sections.d.ts +23 -0
- package/layouts/src/menu/menu-url.d.ts +12 -0
- package/layouts/src/menu/menu.model.d.ts +15 -0
- package/layouts/src/navbar/navbar.component.d.ts +33 -0
- package/layouts/src/page-banner/page-banner.component.d.ts +40 -0
- package/layouts/src/side-menu/side-menu.component.d.ts +89 -0
- package/layouts/src/user-menu/user-menu.component.d.ts +91 -0
- package/package.json +26 -15
- package/utils/cn/src/cn.d.ts +1 -1
- package/utils/http/README.md +26 -0
- package/utils/http/index.d.ts +5 -0
- package/utils/http/public-api.d.ts +3 -0
- package/utils/http/src/bearer-token.interceptor.d.ts +19 -0
- package/utils/http/src/http-context.d.ts +3 -0
- package/utils/mfe/README.md +35 -0
- package/utils/mfe/index.d.ts +5 -0
- package/utils/mfe/public-api.d.ts +5 -0
- package/utils/mfe/src/mfe-shadow-root.d.ts +23 -0
- package/utils/mfe/src/mfe-shadow-shell.component.d.ts +20 -0
- package/utils/mfe/src/provide-mfe-shadow-shell.d.ts +20 -0
- package/utils/mfe/src/shadow-root-overlay-container.d.ts +13 -0
- package/utils/theme/README.md +14 -0
- package/utils/theme/public-api.d.ts +3 -1
- package/utils/theme/src/models/theme.d.ts +18 -0
- package/utils/theme/src/scheme-favicon/scheme-favicon.d.ts +26 -0
- package/utils/theme/src/theme-assets/theme-assets.service.d.ts +31 -1
- package/utils/theme/src/theme-assets/theme-assets.types.d.ts +6 -0
- package/utils/translation/README.md +12 -0
- package/utils/translation/public-api.d.ts +4 -0
- package/utils/translation/src/title-strategy/translated-title-strategy.d.ts +27 -0
- package/utils/translation/src/translated-label/translated-label.d.ts +21 -0
|
@@ -16,3 +16,4 @@ Playback chrome for a track list. Children include `st-timeline`, `st-button-pla
|
|
|
16
16
|
|
|
17
17
|
- Bind `tracks` and optionally `[(opened)]` / `[(currentTrackIndex)]`.
|
|
18
18
|
- Prefer `(triggered)` on timeline and volume for intent-driven handling.
|
|
19
|
+
- Accessibility: the icon-only controls are named from `sdk.audioPlayer.*` (English when no translation is loaded). Play/pause and mute name the action they perform and change with state ("Play" / "Pause", "Mute" / "Unmute"), so they do not use `aria-pressed`. Track list buttons include the track title ("Play Intro"). The fixed player's close button is named `sdk.audioPlayer.close`.
|
|
@@ -26,6 +26,9 @@ export declare class ButtonPlayComponent {
|
|
|
26
26
|
waveBarsClass: import("@angular/core").Signal<string>;
|
|
27
27
|
iconClass: import("@angular/core").Signal<string>;
|
|
28
28
|
icon: import("@angular/core").Signal<string>;
|
|
29
|
+
private readonly translateLabel;
|
|
30
|
+
/** @internal Name of the button: the action it performs, with the track title when the track is known. */
|
|
31
|
+
protected readonly label: import("@angular/core").Signal<string>;
|
|
29
32
|
handleHover(isHovered: boolean): void;
|
|
30
33
|
handleTogglePlay(): Promise<void>;
|
|
31
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonPlayComponent, never>;
|
|
@@ -22,6 +22,14 @@ export declare class AudioPlayerComponent {
|
|
|
22
22
|
iconPause: string;
|
|
23
23
|
iconMusicNote: string;
|
|
24
24
|
offScreen: import("@angular/core").WritableSignal<boolean>;
|
|
25
|
+
private readonly translateLabel;
|
|
26
|
+
/** @internal Names of the icon-only controls; play/pause names the action the button performs. */
|
|
27
|
+
protected readonly labels: import("@angular/core").Signal<{
|
|
28
|
+
previous: string;
|
|
29
|
+
next: string;
|
|
30
|
+
playPause: string;
|
|
31
|
+
close: string;
|
|
32
|
+
}>;
|
|
25
33
|
playerClass: import("@angular/core").Signal<string>;
|
|
26
34
|
constructor();
|
|
27
35
|
entering: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -26,6 +26,9 @@ export declare class VolumeControlComponent {
|
|
|
26
26
|
iconVolumeUp: string;
|
|
27
27
|
iconVolumeDown: string;
|
|
28
28
|
iconVolumeMute: string;
|
|
29
|
+
private readonly translateLabel;
|
|
30
|
+
/** @internal Name of the mute button: the action it performs. */
|
|
31
|
+
protected readonly muteLabel: import("@angular/core").Signal<string>;
|
|
29
32
|
volumeTimelineClass: import("@angular/core").Signal<string>;
|
|
30
33
|
volumeTimelineCircleClass: import("@angular/core").Signal<string>;
|
|
31
34
|
handleVolumeHover(isHovered: boolean): void;
|
|
@@ -16,3 +16,16 @@ Primary action control. Default color role is `base`; use `primary` for the main
|
|
|
16
16
|
|
|
17
17
|
- Style flags: `ghost`, `outline`, `link`, `soft`, `dash`, `wide`, `circle`, `square`, `glass`, `block`, `loader`, `shadow`.
|
|
18
18
|
- Activation outputs: `clicked`, `pointerDown`, `keyDownEnter`, `keyDownSpace`, `triggered`. Prefer `(triggered)`.
|
|
19
|
+
- ARIA forwarding: `ariaLabel`, `ariaExpanded` and `ariaPressed` are set on the inner `<button>`. Attributes bound on the `st-button` host (`[attr.aria-*]`) do not reach the button, so use these inputs for icon-only buttons and disclosure toggles.
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<st-button [square]="true" [ghost]="true" [ariaLabel]="'Show details'" [ariaExpanded]="open()" (triggered)="toggle()">
|
|
23
|
+
<st-icon [icon]="chevron" />
|
|
24
|
+
</st-button>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- Icon-only buttons: the icon (from `icon` or a projected `st-icon`) is decorative and hidden from assistive technology. Name the button with `ariaLabel` or projected `<span class="sr-only">` text. In dev mode, an `st-button` with `icon` that is still unnamed two seconds after its last DOM change logs one console warning; names that arrive late (translations, projected text) do not warn.
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<st-button [icon]="trash" [square]="true" [ghost]="true" [ariaLabel]="'Delete row'" (triggered)="remove()" />
|
|
31
|
+
```
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Generates base button classes with style variants
|
|
5
|
-
*/
|
|
6
2
|
export declare const buttonComponent: (props?: ({
|
|
7
3
|
variant?: "base" | "primary" | "secondary" | "tertiary" | "accent" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
8
4
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
@@ -42,6 +38,10 @@ export type HTMLButtonType = 'button' | 'submit' | 'reset';
|
|
|
42
38
|
* ```
|
|
43
39
|
*/
|
|
44
40
|
export declare class ButtonComponent {
|
|
41
|
+
private readonly host;
|
|
42
|
+
private readonly zone;
|
|
43
|
+
private unnamedIconWarned;
|
|
44
|
+
private nameWatch;
|
|
45
45
|
/**
|
|
46
46
|
* Button style variant
|
|
47
47
|
* @defaultValue 'base'
|
|
@@ -141,6 +141,21 @@ export declare class ButtonComponent {
|
|
|
141
141
|
* @defaultValue false
|
|
142
142
|
*/
|
|
143
143
|
stopPropagation: import("@angular/core").InputSignal<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* Accessible name forwarded to the inner `<button>` as `aria-label`.
|
|
146
|
+
* Use it for icon-only buttons. Attributes bound on the `st-button` host are not forwarded.
|
|
147
|
+
*/
|
|
148
|
+
ariaLabel: import("@angular/core").InputSignal<string | null | undefined>;
|
|
149
|
+
/**
|
|
150
|
+
* Forwarded to the inner `<button>` as `aria-expanded`.
|
|
151
|
+
* Set it only when the button shows or hides another region; leave it unset otherwise.
|
|
152
|
+
*/
|
|
153
|
+
ariaExpanded: import("@angular/core").InputSignal<boolean | null | undefined>;
|
|
154
|
+
/**
|
|
155
|
+
* Forwarded to the inner `<button>` as `aria-pressed` for toggle buttons.
|
|
156
|
+
* Leave it unset for ordinary buttons.
|
|
157
|
+
*/
|
|
158
|
+
ariaPressed: import("@angular/core").InputSignal<boolean | "mixed" | null | undefined>;
|
|
144
159
|
/**
|
|
145
160
|
* Event emitted on click
|
|
146
161
|
*/
|
|
@@ -167,6 +182,16 @@ export declare class ButtonComponent {
|
|
|
167
182
|
*/
|
|
168
183
|
containerClass: import("@angular/core").Signal<string>;
|
|
169
184
|
linkClass: import("@angular/core").Signal<string>;
|
|
185
|
+
constructor();
|
|
186
|
+
/**
|
|
187
|
+
* @internal
|
|
188
|
+
* Dev mode only: watches the inner button until its accessible name has settled
|
|
189
|
+
* (no DOM change for UNNAMED_ICON_SETTLE_MS), then warns once if an icon-only button is still unnamed.
|
|
190
|
+
* Names that arrive late, such as translations or projected text, do not warn.
|
|
191
|
+
*/
|
|
192
|
+
private watchAccessibleName;
|
|
193
|
+
private checkAccessibleName;
|
|
194
|
+
private stopNameWatch;
|
|
170
195
|
/**
|
|
171
196
|
* @internal
|
|
172
197
|
* Handle click events
|
|
@@ -188,5 +213,5 @@ export declare class ButtonComponent {
|
|
|
188
213
|
*/
|
|
189
214
|
handleKeyDownSpace(event: Event): void;
|
|
190
215
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
191
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "st-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "soft": { "alias": "soft"; "required": false; "isSignal": true; }; "dash": { "alias": "dash"; "required": false; "isSignal": true; }; "wide": { "alias": "wide"; "required": false; "isSignal": true; }; "circle": { "alias": "circle"; "required": false; "isSignal": true; }; "square": { "alias": "square"; "required": false; "isSignal": true; }; "glass": { "alias": "glass"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "loader": { "alias": "loader"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "focusable": { "alias": "focusable"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "pointerDown": "pointerDown"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; "triggered": "triggered"; }, never, ["*"], true, never>;
|
|
216
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "st-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "soft": { "alias": "soft"; "required": false; "isSignal": true; }; "dash": { "alias": "dash"; "required": false; "isSignal": true; }; "wide": { "alias": "wide"; "required": false; "isSignal": true; }; "circle": { "alias": "circle"; "required": false; "isSignal": true; }; "square": { "alias": "square"; "required": false; "isSignal": true; }; "glass": { "alias": "glass"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "loader": { "alias": "loader"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "focusable": { "alias": "focusable"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaPressed": { "alias": "ariaPressed"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "pointerDown": "pointerDown"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; "triggered": "triggered"; }, never, ["*"], true, never>;
|
|
192
217
|
}
|
|
@@ -17,9 +17,9 @@ TanStack table shell. You compose `<thead>` / `<tbody>` and cell renderers; ther
|
|
|
17
17
|
</thead>
|
|
18
18
|
<tbody>
|
|
19
19
|
@for (row of table().getRowModel().rows; track row.id) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<tr>
|
|
21
|
+
<td>{{ row.original.firstName }}</td>
|
|
22
|
+
</tr>
|
|
23
23
|
}
|
|
24
24
|
</tbody>
|
|
25
25
|
</st-data-table>
|
|
@@ -29,3 +29,53 @@ TanStack table shell. You compose `<thead>` / `<tbody>` and cell renderers; ther
|
|
|
29
29
|
|
|
30
30
|
- Helpers: `st-data-table-actions`, sortable header, row/head selection, expandable cells.
|
|
31
31
|
- Re-exports TanStack helpers such as `createAngularTable` and `flexRenderComponent`.
|
|
32
|
+
|
|
33
|
+
## Loading
|
|
34
|
+
|
|
35
|
+
- `[loading]="true"` keeps the projected `<thead>` and the table frame and replaces only the body with skeleton rows, so the header and column layout do not jump. The empty states are not shown while loading.
|
|
36
|
+
- The skeleton has one row per page entry (`pagination.itemsPerPage`) unless `loadingRows` sets the count, and one cell per header column (`colspan` counted) of the first `<thead>` row.
|
|
37
|
+
- The table gets `aria-busy="true"`, the skeleton is `aria-hidden`, and a polite status announces `sdk.dataTable.loading`. The skeleton pulse stops under reduced motion.
|
|
38
|
+
- Project `<thead>` (and any `<caption>` or `<colgroup>`) as direct children of `st-data-table`. Other content, such as `<tbody>`, is hidden while loading.
|
|
39
|
+
- `st-table` has the same `loading`, `loadingRows` and `rowHover` inputs.
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<st-data-table [loading]="isLoading()" [totalItems]="total()" [pagination]="pagination()">
|
|
43
|
+
<thead>
|
|
44
|
+
...
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody>
|
|
47
|
+
...
|
|
48
|
+
</tbody>
|
|
49
|
+
</st-data-table>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Row hover
|
|
53
|
+
|
|
54
|
+
`rowHover` (default `true`) tints the hovered body row with `--color-table-row-hover`, layered over each cell's own background, so zebra rows and the pinned first column follow it. The default tint is `color-mix(in oklch, var(--color-base-content) 12%, transparent)`: it darkens rows in light schemes and lightens them in dark ones, whichever base step is lighter, and keeps at least 1.2:1 between hovered and resting rows with body text above 4.5:1 in the shipped themes. Override `--color-table-row-hover` in a theme to change it. Set `[rowHover]="false"` to turn it off. Remove per-row `hover:bg-*` workarounds.
|
|
55
|
+
|
|
56
|
+
## Size
|
|
57
|
+
|
|
58
|
+
`size` applies from the first render: sortable headers, expand toggles, selection checkboxes and actions read it through the data table context, and follow runtime changes.
|
|
59
|
+
|
|
60
|
+
## Height and pinning
|
|
61
|
+
|
|
62
|
+
- `height` takes the `st-table` presets: `auto` (default), `full`, `sm`, `md`, `lg`, `xl`. The table container is the only scroll container, so `pinRows` keeps the header in view once a preset limits the height. With `auto` the header scrolls with the page.
|
|
63
|
+
- `pinColumns` pins the first column, whether its cells are `th` or `td`. Other cells scroll horizontally under it.
|
|
64
|
+
|
|
65
|
+
## Accessibility
|
|
66
|
+
|
|
67
|
+
- `st-data-table-sortable-header` (and the sort button of `st-data-table-expandable-header-cell`) sets `aria-sort="ascending"` or `"descending"` on its closest `th` (or `[role=columnheader]`) and removes it while the column is unsorted. Render the header inside the `th` for this to work.
|
|
68
|
+
- To manage the attribute yourself, set `syncHeaderAriaSort` to `false` and bind the helper on the `th`:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { getDataTableAriaSort } from '@sixbell-telco/sdk/components/data-table';
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```html
|
|
75
|
+
<th [attr.aria-sort]="getDataTableAriaSort(header.column.getIsSorted())">...</th>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- Sort, expand and details toggles are icon-only buttons named through the `sdk.dataTable.sortBy`, `expandRow`, `expandAllRows`, `showDetails` and `detailsUnavailable` translation keys. Their state is exposed with `aria-expanded` on the button itself.
|
|
79
|
+
- `st-data-table-sub-toggle-cell` and `st-data-table-sub-component-toggle-cell` are the same toggle (the first renders the second). The press does not reach the row, so row click handlers do not fire.
|
|
80
|
+
- Rows that cannot expand keep an invisible, unfocusable copy of the expand toggle, so values stay aligned with expandable rows.
|
|
81
|
+
- The sort glyph cross-fades between the neutral icon and the arrow, and the arrow rotates for descending. Transitions are off under reduced motion.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonSizeProps } from '@sixbell-telco/sdk/components/button';
|
|
2
2
|
import { IconSizeProps } from '@sixbell-telco/sdk/components/icon';
|
|
3
|
+
import { TextPreset } from '@sixbell-telco/sdk/directives/text';
|
|
3
4
|
import { RowData, type CellContext, type HeaderContext, type Row } from '@tanstack/angular-table';
|
|
4
5
|
import { DataTableContextService } from '../src/data-table-context.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -62,6 +63,12 @@ export declare class DataTableExpandableHeaderCellComponent<T extends RowData> {
|
|
|
62
63
|
* Event emitted when sort toggle is requested
|
|
63
64
|
*/
|
|
64
65
|
readonly sortToggle: import("@angular/core").OutputEmitterRef<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Set `aria-sort` on the closest column header while the column is sorted
|
|
68
|
+
* @defaultValue true
|
|
69
|
+
*/
|
|
70
|
+
readonly syncHeaderAriaSort: import("@angular/core").InputSignal<boolean>;
|
|
71
|
+
constructor();
|
|
65
72
|
/**
|
|
66
73
|
* Get the table instance from context
|
|
67
74
|
*/
|
|
@@ -82,6 +89,11 @@ export declare class DataTableExpandableHeaderCellComponent<T extends RowData> {
|
|
|
82
89
|
* Computes icon size based on data table size
|
|
83
90
|
*/
|
|
84
91
|
readonly iconSize: import("@angular/core").Signal<IconSizeProps>;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
* Typography preset of the column label, matching the table header cells
|
|
95
|
+
*/
|
|
96
|
+
readonly labelPreset: import("@angular/core").Signal<TextPreset>;
|
|
85
97
|
/**
|
|
86
98
|
* @internal
|
|
87
99
|
* Computes the appropriate icon based on current sort state
|
|
@@ -93,10 +105,11 @@ export declare class DataTableExpandableHeaderCellComponent<T extends RowData> {
|
|
|
93
105
|
*/
|
|
94
106
|
readonly computedAriaSortAttribute: import("@angular/core").Signal<"ascending" | "descending" | "none">;
|
|
95
107
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableExpandableHeaderCellComponent<any>, never>;
|
|
96
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableExpandableHeaderCellComponent<any>, "st-data-table-expandable-header-cell", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "canSort": { "alias": "canSort"; "required": false; "isSignal": true; }; "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; }, { "sortToggle": "sortToggle"; }, never, never, true, never>;
|
|
108
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableExpandableHeaderCellComponent<any>, "st-data-table-expandable-header-cell", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "canSort": { "alias": "canSort"; "required": false; "isSignal": true; }; "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; "syncHeaderAriaSort": { "alias": "syncHeaderAriaSort"; "required": false; "isSignal": true; }; }, { "sortToggle": "sortToggle"; }, never, never, true, never>;
|
|
97
109
|
}
|
|
98
110
|
/**
|
|
99
|
-
* Sub-component toggle cell for controlling custom sub-component visibility
|
|
111
|
+
* Sub-component toggle cell for controlling custom sub-component visibility.
|
|
112
|
+
* Renders `st-data-table-sub-component-toggle-cell`; both selectors behave the same.
|
|
100
113
|
*/
|
|
101
114
|
export declare class DataTableSubToggleCellComponent {
|
|
102
115
|
/**
|
|
@@ -5,6 +5,8 @@ export * from './data-table-empty-actions/data-table-empty-actions.component';
|
|
|
5
5
|
export * from './expandable/expandable.component';
|
|
6
6
|
export * from './selection/selection.component';
|
|
7
7
|
export * from './sortable-header/sortable-header.component';
|
|
8
|
+
export { getDataTableAriaSort } from './src/aria-sort';
|
|
9
|
+
export type { DataTableAriaSort, DataTableSortState } from './src/aria-sort';
|
|
8
10
|
export * from './src/data-table.component';
|
|
9
11
|
export * from './src/models';
|
|
10
12
|
export * from './sub-component-toggle/sub-component-toggle.component';
|
|
@@ -6,6 +6,14 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
/**
|
|
7
7
|
* Sortable header component for data table columns
|
|
8
8
|
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Render it inside the column's `th`. It sets `aria-sort` on that closest `th` (or `[role=columnheader]`)
|
|
11
|
+
* while the column is sorted and removes it when the column is unsorted. Set `syncHeaderAriaSort` to `false`
|
|
12
|
+
* to manage the attribute yourself with {@link getDataTableAriaSort}.
|
|
13
|
+
*
|
|
14
|
+
* The icon cross-fades between the neutral sort glyph (unsorted) and an arrow that points up for ascending
|
|
15
|
+
* and rotates to point down for descending. The transitions are skipped under `prefers-reduced-motion`.
|
|
16
|
+
*
|
|
9
17
|
* @example
|
|
10
18
|
* ```typescript
|
|
11
19
|
* flexRenderComponent(DataTableSortableHeaderComponent, {
|
|
@@ -33,6 +41,12 @@ export declare class DataTableSortableHeaderComponent {
|
|
|
33
41
|
* Event emitted when sort toggle is requested
|
|
34
42
|
*/
|
|
35
43
|
readonly sortToggle: import("@angular/core").OutputEmitterRef<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Set `aria-sort` on the closest column header while the column is sorted
|
|
46
|
+
* @defaultValue true
|
|
47
|
+
*/
|
|
48
|
+
readonly syncHeaderAriaSort: import("@angular/core").InputSignal<boolean>;
|
|
49
|
+
constructor();
|
|
36
50
|
/** @internal */
|
|
37
51
|
readonly iconDefaultSort = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z\"></path></svg>";
|
|
38
52
|
/** @internal */
|
|
@@ -59,5 +73,5 @@ export declare class DataTableSortableHeaderComponent {
|
|
|
59
73
|
*/
|
|
60
74
|
readonly computedAriaSortAttribute: import("@angular/core").Signal<"ascending" | "descending" | "none">;
|
|
61
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableSortableHeaderComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableSortableHeaderComponent, "st-data-table-sortable-header", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; }, { "sortToggle": "sortToggle"; }, never, never, true, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableSortableHeaderComponent, "st-data-table-sortable-header", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; "syncHeaderAriaSort": { "alias": "syncHeaderAriaSort"; "required": false; "isSignal": true; }; }, { "sortToggle": "sortToggle"; }, never, never, true, never>;
|
|
63
77
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
/** Sort state of a TanStack column, as returned by `column.getIsSorted()`. */
|
|
3
|
+
export type DataTableSortState = 'asc' | 'desc' | false;
|
|
4
|
+
/** Value for the `aria-sort` attribute of a column header. */
|
|
5
|
+
export type DataTableAriaSort = 'ascending' | 'descending';
|
|
6
|
+
/**
|
|
7
|
+
* Maps a TanStack sort state to the `aria-sort` value of its column header.
|
|
8
|
+
*
|
|
9
|
+
* Returns `null` for an unsorted column so `[attr.aria-sort]` removes the attribute:
|
|
10
|
+
* ARIA asks for `aria-sort` on the sorted header only.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <th [attr.aria-sort]="getDataTableAriaSort(header.column.getIsSorted())">...</th>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function getDataTableAriaSort(state: DataTableSortState | null | undefined): DataTableAriaSort | null;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* Keeps `aria-sort` on the closest column header (`th` or `[role=columnheader]`) of the host element in sync.
|
|
21
|
+
*/
|
|
22
|
+
export declare function syncClosestHeaderAriaSort(state: Signal<DataTableSortState>, enabled: Signal<boolean>): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
1
2
|
import { TableContentSizeProps } from '@sixbell-telco/sdk/components/table';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
@@ -5,12 +6,19 @@ import * as i0 from "@angular/core";
|
|
|
5
6
|
* This allows sub-components to automatically sync their sizes with the parent data table
|
|
6
7
|
*/
|
|
7
8
|
export declare class DataTableContextService {
|
|
9
|
+
private readonly sizeSource;
|
|
10
|
+
private readonly fallbackSize;
|
|
8
11
|
/**
|
|
9
|
-
* Current table size that sub-components
|
|
12
|
+
* Current table size that sub-components read. It follows the bound data table size from the
|
|
13
|
+
* first read on, so sub-components never render a default size before the table input applies.
|
|
10
14
|
*/
|
|
11
|
-
readonly size:
|
|
15
|
+
readonly size: Signal<TableContentSizeProps>;
|
|
12
16
|
/**
|
|
13
|
-
*
|
|
17
|
+
* Bind the size to a signal, read lazily - called by the main data table component
|
|
18
|
+
*/
|
|
19
|
+
bindSize(size: Signal<TableContentSizeProps>): void;
|
|
20
|
+
/**
|
|
21
|
+
* Set a fixed size, replacing any bound size
|
|
14
22
|
*/
|
|
15
23
|
setSize(size: TableContentSizeProps): void;
|
|
16
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableContextService, never>;
|
|
@@ -26,7 +26,7 @@ export declare const dataTableContent: (props?: ({
|
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* ```html
|
|
29
|
-
* <st-data-table
|
|
29
|
+
* <st-data-table size="md" height="lg">
|
|
30
30
|
* <table>
|
|
31
31
|
* <thead>
|
|
32
32
|
* <tr>
|
|
@@ -39,7 +39,7 @@ export declare const dataTableContent: (props?: ({
|
|
|
39
39
|
* </tr>
|
|
40
40
|
* </tbody>
|
|
41
41
|
* </table>
|
|
42
|
-
* </st-data-table
|
|
42
|
+
* </st-data-table>
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
export declare class DataTableContainerComponent {
|
|
@@ -61,7 +61,43 @@ export declare class DataTableContainerComponent {
|
|
|
61
61
|
* @defaultValue 'sm'
|
|
62
62
|
*/
|
|
63
63
|
size: import("@angular/core").InputSignal<TableContentSizeProps>;
|
|
64
|
+
/**
|
|
65
|
+
* Table container height preset, shared with `st-table`.
|
|
66
|
+
* The container is the only scroll container, so `pinRows` keeps the header in view
|
|
67
|
+
* when a fixed preset (`sm`, `md`, `lg`, `xl`) or `full` inside a sized parent limits the height.
|
|
68
|
+
* @defaultValue 'auto'
|
|
69
|
+
*/
|
|
70
|
+
height: import("@angular/core").InputSignal<TableContainerHeightProps>;
|
|
64
71
|
constructor();
|
|
72
|
+
/**
|
|
73
|
+
* Show a loading state: the projected header and the table frame stay in place and the body
|
|
74
|
+
* shows skeleton rows. The table is marked `aria-busy` and a status message is announced.
|
|
75
|
+
* The empty states are not shown while loading.
|
|
76
|
+
* @defaultValue false
|
|
77
|
+
*/
|
|
78
|
+
loading: import("@angular/core").InputSignal<boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* Number of skeleton rows shown while loading. Defaults to the page size (`pagination.itemsPerPage`).
|
|
81
|
+
* @defaultValue null
|
|
82
|
+
*/
|
|
83
|
+
loadingRows: import("@angular/core").InputSignal<number | null>;
|
|
84
|
+
/**
|
|
85
|
+
* Highlight body rows on hover with the `--color-table-row-hover` tint (12% `base-content` by default)
|
|
86
|
+
* layered over each cell's own background, so zebra rows and pinned first-column cells follow it
|
|
87
|
+
* @defaultValue true
|
|
88
|
+
*/
|
|
89
|
+
rowHover: import("@angular/core").InputSignal<boolean>;
|
|
90
|
+
private readonly skeleton;
|
|
91
|
+
/** @internal */
|
|
92
|
+
readonly skeletonRows: import("@angular/core").Signal<number[]>;
|
|
93
|
+
/** @internal */
|
|
94
|
+
readonly skeletonColumns: import("@angular/core").Signal<number[]>;
|
|
95
|
+
/** @internal */
|
|
96
|
+
readonly skeletonClass: import("@angular/core").Signal<string>;
|
|
97
|
+
/** @internal */
|
|
98
|
+
readonly showNoData: import("@angular/core").Signal<boolean>;
|
|
99
|
+
/** @internal */
|
|
100
|
+
readonly showNoResults: import("@angular/core").Signal<boolean>;
|
|
65
101
|
/**
|
|
66
102
|
* Enable sticky header row
|
|
67
103
|
* @defaultValue false
|
|
@@ -176,5 +212,5 @@ export declare class DataTableContainerComponent {
|
|
|
176
212
|
*/
|
|
177
213
|
readonly containerClass: import("@angular/core").Signal<string>;
|
|
178
214
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableContainerComponent, never>;
|
|
179
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableContainerComponent, "st-data-table", never, { "noDataIcon": { "alias": "noDataIcon"; "required": false; "isSignal": true; }; "noResultsIcon": { "alias": "noResultsIcon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "pinRows": { "alias": "pinRows"; "required": false; "isSignal": true; }; "pinColumns": { "alias": "pinColumns"; "required": false; "isSignal": true; }; "zebra": { "alias": "zebra"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "paginatorType": { "alias": "paginatorType"; "required": false; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "hasActiveFiltersCallback": { "alias": "hasActiveFiltersCallback"; "required": false; "isSignal": true; }; }, { "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; }, never, ["st-data-table-empty-actions", "*"], true, never>;
|
|
215
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableContainerComponent, "st-data-table", never, { "noDataIcon": { "alias": "noDataIcon"; "required": false; "isSignal": true; }; "noResultsIcon": { "alias": "noResultsIcon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingRows": { "alias": "loadingRows"; "required": false; "isSignal": true; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "pinRows": { "alias": "pinRows"; "required": false; "isSignal": true; }; "pinColumns": { "alias": "pinColumns"; "required": false; "isSignal": true; }; "zebra": { "alias": "zebra"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "paginatorType": { "alias": "paginatorType"; "required": false; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "hasActiveFiltersCallback": { "alias": "hasActiveFiltersCallback"; "required": false; "isSignal": true; }; }, { "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; }, never, ["st-data-table-empty-actions", "caption, colgroup", "thead", "*"], true, never>;
|
|
180
216
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IconSizeProps } from '@sixbell-telco/sdk/components/icon';
|
|
2
|
+
import { DataTableSortState } from './aria-sort';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Sort glyph shared by the sortable headers. The neutral glyph and the arrow are stacked boxes that
|
|
7
|
+
* cross-fade, and the arrow rotates to point down for descending. The `st-icon` host is `display: contents`,
|
|
8
|
+
* so the transitions run on wrapping spans. The arrow keeps its last direction while it fades out.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DataTableSortIconComponent {
|
|
11
|
+
readonly sortState: import("@angular/core").InputSignal<DataTableSortState>;
|
|
12
|
+
readonly size: import("@angular/core").InputSignal<IconSizeProps>;
|
|
13
|
+
readonly iconDefaultSort = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z\"></path></svg>";
|
|
14
|
+
readonly iconAscending = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8l-8 8z\"></path></svg>";
|
|
15
|
+
private lastDirection;
|
|
16
|
+
private readonly direction;
|
|
17
|
+
readonly dataSort: import("@angular/core").Signal<"ascending" | "descending" | "none">;
|
|
18
|
+
readonly neutralClass: import("@angular/core").Signal<string>;
|
|
19
|
+
readonly arrowClass: import("@angular/core").Signal<string>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableSortIconComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableSortIconComponent, "st-data-table-sort-icon", never, { "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonSizeProps } from '@sixbell-telco/sdk/components/button';
|
|
2
|
+
import { IconSizeProps } from '@sixbell-telco/sdk/components/icon';
|
|
3
|
+
import { TableContentSizeProps } from '@sixbell-telco/sdk/components/table';
|
|
4
|
+
/** @internal Button size of the expand toggles for a data table size */
|
|
5
|
+
export declare function getToggleButtonSize(size: TableContentSizeProps): ButtonSizeProps;
|
|
6
|
+
/** @internal Icon size of the expand and sort toggles for a data table size */
|
|
7
|
+
export declare function getToggleIconSize(size: TableContentSizeProps): IconSizeProps;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { Row, RowData } from '@tanstack/angular-table';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Toggle cell that shows or hides a custom sub-component (detail row) for its row.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Rows that can show details get an icon-only toggle named by `sdk.dataTable.showDetails`, with
|
|
8
|
+
* `aria-expanded` on the inner button. Other rows get a disabled info button named by
|
|
9
|
+
* `sdk.dataTable.detailsUnavailable`. The click does not reach the row, so row click handlers do not fire.
|
|
10
|
+
* `st-data-table-sub-toggle-cell` renders this component.
|
|
11
|
+
*/
|
|
3
12
|
export declare class DataTableSubComponentToggleCellComponent<T extends RowData> {
|
|
13
|
+
/** The table row instance */
|
|
4
14
|
readonly row: import("@angular/core").InputSignal<Row<T>>;
|
|
15
|
+
/** Whether the sub-component of this row is shown */
|
|
5
16
|
readonly isExpanded: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
/** Emits the row id when the toggle is pressed */
|
|
6
18
|
readonly toggled: import("@angular/core").OutputEmitterRef<string>;
|
|
19
|
+
/** Whether this row has a sub-component to show */
|
|
7
20
|
readonly canToggleSubComponent: import("@angular/core").InputSignal<boolean>;
|
|
8
21
|
readonly iconChevronDown = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z\"></path></svg>";
|
|
9
22
|
readonly iconInfo = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\"></path></svg>";
|
|
@@ -22,3 +22,4 @@ Modal overlay with title, content, and actions.
|
|
|
22
22
|
|
|
23
23
|
- `width` is `'sm'` | `'md'` | `'lg'` | `'xl'`. Outputs: `closed`, `clickOutside`.
|
|
24
24
|
- Prefer `(triggered)` on close controls.
|
|
25
|
+
- The close button is named by the `sdk.dialog.close` translation key, and falls back to "Close dialog" when no translation service or key is available.
|
|
@@ -56,6 +56,9 @@ export declare class DialogComponent {
|
|
|
56
56
|
private readonly destroyRef;
|
|
57
57
|
protected readonly elementRef: ElementRef<HTMLElement>;
|
|
58
58
|
protected readonly themeDomService: ThemeDomService;
|
|
59
|
+
private readonly translateLabel;
|
|
60
|
+
/** @internal Close button name from `sdk.dialog.close`, in English when no translation is loaded. */
|
|
61
|
+
protected readonly closeLabel: import("@angular/core").Signal<string>;
|
|
59
62
|
private readonly contentEffect;
|
|
60
63
|
/**
|
|
61
64
|
* Specifies the maximum width of the dialog content
|
|
@@ -120,6 +123,8 @@ export declare class DialogComponent {
|
|
|
120
123
|
private readonly animationState;
|
|
121
124
|
/** @internal Flag to track if we're in the process of closing */
|
|
122
125
|
private isClosing;
|
|
126
|
+
/** @internal Closes the dialog if the exit animation never reports its end */
|
|
127
|
+
private closeFallback;
|
|
123
128
|
/**
|
|
124
129
|
* Computes the data-state attribute value for CSS animations
|
|
125
130
|
* @returns Current animation state
|
|
@@ -151,17 +156,19 @@ export declare class DialogComponent {
|
|
|
151
156
|
*/
|
|
152
157
|
close(): void;
|
|
153
158
|
/**
|
|
154
|
-
*
|
|
159
|
+
* Plays the exit animation; the CDK dialog is closed when it ends
|
|
155
160
|
* @internal
|
|
156
161
|
*/
|
|
157
162
|
private closeDialog;
|
|
163
|
+
/** @internal Closes the CDK dialog once the exit animation is done */
|
|
164
|
+
private finishClose;
|
|
158
165
|
/**
|
|
159
166
|
* Handles animation end events to trigger the actual dialog close
|
|
160
167
|
* @internal
|
|
161
168
|
*/
|
|
162
169
|
onAnimationEnd(event: AnimationEvent): void;
|
|
163
170
|
/**
|
|
164
|
-
* Clean up CDK subscriptions and
|
|
171
|
+
* Clean up CDK subscriptions and animate the overlay out when the component is destroyed
|
|
165
172
|
*/
|
|
166
173
|
private readonly destroyEffect;
|
|
167
174
|
/**
|
|
@@ -3,6 +3,11 @@ export type DividerVariant = 'neutral' | 'primary' | 'secondary' | 'accent' | 's
|
|
|
3
3
|
export type DividerOrientation = 'vertical' | 'horizontal';
|
|
4
4
|
export type DividerPlacement = 'start' | 'center' | 'end';
|
|
5
5
|
export declare class DividerComponent {
|
|
6
|
+
/**
|
|
7
|
+
* Layout direction of the content the divider separates (DaisyUI naming).
|
|
8
|
+
* `'vertical'` (default) separates stacked content and draws a horizontal rule;
|
|
9
|
+
* `'horizontal'` separates side-by-side content and draws a vertical rule.
|
|
10
|
+
*/
|
|
6
11
|
orientation: import("@angular/core").InputSignal<DividerOrientation>;
|
|
7
12
|
placement: import("@angular/core").InputSignal<DividerPlacement>;
|
|
8
13
|
variant: import("@angular/core").InputSignal<DividerVariant>;
|
|
@@ -23,3 +23,24 @@ Menu attached to a trigger. Overlay animation follows CDK position.
|
|
|
23
23
|
## Notes
|
|
24
24
|
|
|
25
25
|
- Prefer `(triggered)` on items. `st-dropdown-chevron` is `display: contents` so it centers in buttons and rotates from `[aria-expanded]`.
|
|
26
|
+
|
|
27
|
+
## Keyboard and ARIA
|
|
28
|
+
|
|
29
|
+
WAI-ARIA menu button pattern.
|
|
30
|
+
|
|
31
|
+
- The first focusable element projected into `st-dropdown-trigger` (an `st-button`, a `<button>`, a link) is the menu button and carries `aria-haspopup="menu"`, `aria-expanded` and, while open, `aria-controls`. The wrapper adds no role, so there is no nested button. Without focusable content the wrapper is the button (`role="button"`, `tabindex` from `triggerTabIndex`).
|
|
32
|
+
- `st-dropdown-content` renders `role="menu"`, labelled by the trigger. Items are `menuitem`, `menuitemcheckbox` and `menuitemradio`; `st-dropdown-separator` is `role="separator"`.
|
|
33
|
+
|
|
34
|
+
| Key | Trigger | Menu |
|
|
35
|
+
| ------------- | ---------------------- | --------------------------------------------------- |
|
|
36
|
+
| Enter / Space | Open, focus first item | Activate item; closing returns focus to the trigger |
|
|
37
|
+
| ArrowDown | Open, focus first item | Next item, wraps |
|
|
38
|
+
| ArrowUp | Open, focus last item | Previous item, wraps |
|
|
39
|
+
| Home / End | | First / last item |
|
|
40
|
+
| Escape | Close | Close, focus the trigger |
|
|
41
|
+
| Tab | | Close; focus moves on from the trigger |
|
|
42
|
+
| Letter | | Next item starting with it |
|
|
43
|
+
|
|
44
|
+
Disabled items are skipped. Items use a roving focus: every item has `tabindex="-1"`, so Tab never walks the menu, and the keys above move focus. A focused item shows a 2px `base-content` outline just outside its edge, which keeps 3:1 against the menu surface in every theme and scheme.
|
|
45
|
+
|
|
46
|
+
Opening through `[(open)]` does not move focus. Focus is resolved from the overlay's own root, so this works in MFE shadow roots.
|
|
@@ -18,6 +18,10 @@ import * as i0 from "@angular/core";
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
export declare class DropdownContentComponent {
|
|
21
|
+
/** @internal Id of the rendered `role="menu"` element, referenced by the trigger's aria-controls */
|
|
22
|
+
readonly menuId: string;
|
|
23
|
+
/** @internal Id of the trigger that names the menu, set by the parent dropdown */
|
|
24
|
+
readonly labelledBy: import("@angular/core").WritableSignal<string | null>;
|
|
21
25
|
private readonly templateRef;
|
|
22
26
|
get template(): TemplateRef<unknown>;
|
|
23
27
|
/** Custom CSS classes */
|