@sixbell-telco/sdk 4.8.0 → 4.10.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 +53 -0
- package/components/accordion/README.md +1 -1
- package/components/accordion/src/accordion.component.d.ts +4 -0
- package/components/alert/src/alert.component.d.ts +8 -1
- package/components/data-table/README.md +1 -0
- package/components/data-table/src/data-table.component.d.ts +2 -24
- package/components/dialog/README.md +4 -3
- package/components/dialog/dialog-actions/dialog-actions.component.d.ts +2 -1
- package/components/dialog/src/dialog.component.d.ts +10 -5
- package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +1 -1
- package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +3 -2
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +12 -0
- package/components/file-upload/file-uploader/file-uploader.component.d.ts +6 -0
- package/components/forms/combobox/README.md +49 -0
- package/components/forms/combobox/src/combobox.component.d.ts +178 -3
- package/components/forms/date-picker/README.md +3 -1
- package/components/forms/date-picker/src/date-picker.component.d.ts +8 -1
- package/components/forms/form-error/README.md +2 -0
- package/components/forms/form-error/src/form-error.component.d.ts +17 -0
- package/components/forms/form-hint/README.md +2 -2
- package/components/forms/form-item/README.md +1 -0
- package/components/forms/form-item/src/form-item.component.d.ts +38 -6
- package/components/forms/input/README.md +7 -0
- package/components/forms/input/src/input.component.d.ts +11 -1
- package/components/forms/select/README.md +48 -0
- package/components/forms/select/src/select.component.d.ts +157 -2
- package/components/forms/textarea/README.md +1 -0
- package/components/forms/textarea/src/textarea.component.d.ts +6 -1
- package/components/paginator/README.md +3 -0
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +8 -3
- package/components/paginator/src/paginator.component.d.ts +2 -1
- package/components/progress/src/progress.component.d.ts +17 -3
- package/components/table/README.md +2 -0
- package/components/table/src/table.component.d.ts +16 -23
- package/directives/only-numbers/src/only-numbers.directive.d.ts +27 -1
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +6 -1
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs +12 -5
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +5 -2
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +30 -13
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +2 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +10 -4
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +32 -6
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +272 -23
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +17 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +32 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +74 -10
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +13 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +258 -18
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +11 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +15 -11
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +22 -4
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +42 -5
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +49 -4
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/i18n/sdk/en.json +14 -4
- package/i18n/sdk/es.json +14 -4
- package/i18n/sdk/pt.json +14 -4
- package/manifest.json +185 -19
- package/package.json +1 -1
- package/src/_index.css +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.10.0] - 2026-12-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **st-select, st-combobox**: `panelWidth="content"` sizes the list to its widest option (capped, one line per option, ellipsis and title past the cap; searching never resizes it) and `fitOptions` sizes the closed control to its widest option; the trigger width is measured without rounding down, so an option that exactly fills the control no longer wraps
|
|
15
|
+
- **st-select, st-combobox**: `groupKey` lists options under non-selectable group headers, `checkedKey` shows a dimmed check on already-taken options without adding them to the value, and the option panel fades its scroll edges (`scroll-fade-y`)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **st-select, st-combobox**: option descriptions sit inline, right-aligned before the check (the label keeps whole words, the description truncates); group headers use the dropdown section-label look with a separator line between sections
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **st-select, st-combobox**: the selected option is the active row when the panel opens; cut-off options show their full text on keyboard focus too. **st-table, st-data-table**: the items-per-page select keeps each option on one line; st-table's horizontal scroll area fades its edges and becomes a focusable, named region while it overflows
|
|
24
|
+
- **File upload**: `st-file-dropzone` is a named button (`sdk.fileUpload.dropzone.chooseFiles`) described by its size, type or error text; `st-file-uploader` adds a real "Choose file" button (`sdk.fileUpload.fileUploader.chooseFile`) that opens the picker. New keys in es/en/pt
|
|
25
|
+
- **Alert**: `st-alert-actions` moves to its own row under the text when the alert is narrower than 28rem (container query); the wide layout is unchanged
|
|
26
|
+
- **Progress**: new `ariaLabel` input (default `sdk.progress.label`); a determinate bar exposes `aria-valuenow`/`min`/`max`/`valuetext`, and the printed label is the percentage of `max` (rounded) instead of the raw value
|
|
27
|
+
- **Textarea**: with `maxCharacters` set, the textarea is described by its character counter and gets a native `maxlength`, so typing stops at the limit
|
|
28
|
+
|
|
29
|
+
### Consumer upgrade
|
|
30
|
+
|
|
31
|
+
- Move a host and every remote it loads to 4.10.0 together: the SDK is a strict federation singleton. No `ng update` migration runs for 4.10.0
|
|
32
|
+
- Select and combobox options that sat in sections or showed "already added" through label tricks: use `groupKey` and `checkedKey`
|
|
33
|
+
- A hidden sizer next to a select or combobox (a `<span>` copying kit padding and text size to widen the control or its list): remove it and use `panelWidth="content"` or `fitOptions` (SBP-104)
|
|
34
|
+
- `st-textarea` with `maxCharacters` now sets a native `maxlength`, so typing stops at the limit instead of going past it with a red counter
|
|
35
|
+
- `st-progress` prints the percentage of `max` (value/max*100, rounded) instead of the raw value; a bar with `max` other than 100 shows a different number. Name bars that sit without a visible label through `ariaLabel`
|
|
36
|
+
- New i18n keys (es/en/pt): `sdk.fileUpload.dropzone.chooseFiles`, `sdk.fileUpload.fileUploader.chooseFile`, `sdk.progress.label`. Apps that override the SDK bundle add them
|
|
37
|
+
- sdk-tools 0.1.6 with eslint-plugin-sdk 0.1.2 adds the warnings `scroll-fade` (DS_SCROLL_FADE) and `dialog-content-scroll` (UI_DIALOG_SCROLL_001), and `check --baseline`/`--since` to fail CI only on new findings
|
|
38
|
+
|
|
39
|
+
## [4.9.0] - 2026-12-02
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- **Date picker**: `mode="single"` with `[showTimePicker]="true"` shows a time input (`HH:mm`, or `HH:mm:ss` with `[showSeconds]`) below the calendar, bound to `startTimeValue` / `startTimeChanged`, so one field picks a date and a time. A day click keeps the popover open while the time picker is shown. New key `sdk.datePicker.time` (es/en/pt) names the input. Pickers without `showTimePicker` and range mode are unchanged
|
|
44
|
+
- **Only numbers**: `stOnlyNumbers` takes opt-in `stOnlyNumbersAllowNegative` and `stOnlyNumbersAllowDecimal` (`st-input`: `onlyNumbersAllowNegative`, `onlyNumbersAllowDecimal`); each keypress and paste is judged by the resulting value, dot as separator. The defaults stay digits only (NSU-147)
|
|
45
|
+
- **Theme**: `rounded-inner` utility and `--radius-inner` variable, a concentric radius for a surface inside a card (`max(--radius-selector, --radius-box − --card-p)`) that follows card size and theme with no app CSS (NSU-146)
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- **Forms**: field errors reach assistive tech: kit controls get `aria-invalid` and their `aria-describedby` includes the `st-form-errors` message, shown as `role="alert"`; `st-select` and `st-combobox` get generated listbox ids, a named listbox and `aria-haspopup="listbox"`, and the combobox search input announces the active option. New key `sdk.select.noOptions` (es/en/pt) (NSU-149, NSU-152)
|
|
50
|
+
- **Paginator**: one Enter or Space press changes the page once (`triggered` fires once); the paginator is a `<nav>` labelled from `sdk.pagination.label`, the ellipsis is announced as `sdk.pagination.more`, and first/last hide below `sm` so the bar fits a phone. New keys in es/en/pt (NSU-150)
|
|
51
|
+
- **Accessibility**: disabled `st-dropdown-menu` items get `aria-disabled` and no longer fire, and long menus cap their height and scroll with the kit scroll fade; `st-accordion` gets a unique default `name`; `st-switch` has `role="switch"`; `st-table` and `st-data-table` name their items-per-page select; `st-table` projects `caption` and `colgroup` (NSU-151)
|
|
52
|
+
- **Combobox and select**: disabled options through `disabledKey` (dimmed, `aria-disabled`, skipped by the arrow keys, never selected, still found by search) and an optional second line through `descriptionKey`. `st-select` also moves with Home and End (NSU-143)
|
|
53
|
+
- **Dialog**: `st-dialog` never grows past the viewport: the body scrolls while the title and actions stay visible (also inside an MFE shadow root), with the kit scroll fade on its top and bottom edges, shown only while there is more to scroll, long titles and single long words wrap before the close button, actions stack full width on phones, and the close button is an icon at the inline end. Local `max-h-* overflow-y-auto` wrappers on `st-dialog-content` can be removed (NSU-148)
|
|
54
|
+
|
|
55
|
+
### Consumer upgrade
|
|
56
|
+
|
|
57
|
+
- Move a host and every remote it loads to 4.9.0 together: the SDK is a strict federation singleton. No `ng update` migration runs for 4.9.0
|
|
58
|
+
- `st-dialog` now caps itself to the viewport and scrolls its body (also inside an MFE shadow root): remove local `max-h-* overflow-y-auto` wrappers on `st-dialog-content` (aux-tables, DDT)
|
|
59
|
+
- Disabled options: pass `disabledKey` (and optionally `descriptionKey`) to `st-select` / `st-combobox` instead of label tricks such as «· ya agregado»
|
|
60
|
+
- `st-accordion` without a `name` now gets a unique one per instance (was `'accordion'`): code that relied on two single accordions sharing a group must pass the same `name` explicitly
|
|
61
|
+
- New i18n keys in the `sdk` bundle (es/en/pt): `sdk.select.noOptions`, `sdk.pagination.label`, `sdk.pagination.more`; apps that ship their own copy of the bundle should add them
|
|
62
|
+
|
|
10
63
|
## [4.8.0] - 2026-11-18
|
|
11
64
|
|
|
12
65
|
### Changed
|
|
@@ -16,5 +16,5 @@ Expandable sections. Use `type="single"` to keep only one item open.
|
|
|
16
16
|
|
|
17
17
|
## Notes
|
|
18
18
|
|
|
19
|
-
- `st-accordion` `name` groups items; `type` is `'default'` or `'single'`.
|
|
19
|
+
- `st-accordion` `name` groups items (default: a name unique to each accordion); `type` is `'default'` or `'single'`.
|
|
20
20
|
- `st-accordion-item` takes `header`, `opened`, and `variant` (`default` | `arrow` | `plus`).
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class AccordionComponent {
|
|
3
|
+
/**
|
|
4
|
+
* Group name shared by the item inputs. Defaults to a name unique to this accordion, so two
|
|
5
|
+
* `type="single"` accordions on one page do not close each other's items.
|
|
6
|
+
*/
|
|
3
7
|
name: import("@angular/core").InputSignal<string>;
|
|
4
8
|
type: import("@angular/core").InputSignal<"default" | "single">;
|
|
5
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionComponent, never>;
|
|
@@ -78,8 +78,15 @@ export declare class AlertComponent {
|
|
|
78
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
79
79
|
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "st-alert", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "showIcon": { "alias": "showIcon"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "assertive": { "alias": "assertive"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "dismissed": "dismissed"; }, never, ["*", "st-alert-actions"], true, never>;
|
|
80
80
|
}
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Action area of `st-alert`. From a 28rem wide alert up it sits after the body on the same row;
|
|
83
|
+
* below that it wraps to its own row under the text, so the text keeps its width on phones.
|
|
84
|
+
*/
|
|
82
85
|
export declare class AlertActionsComponent {
|
|
86
|
+
/** @internal */
|
|
87
|
+
private readonly alert;
|
|
88
|
+
/** @internal Under the text on narrow alerts (indented past the icon), after it from `@md`. */
|
|
89
|
+
protected readonly componentClass: import("@angular/core").Signal<string>;
|
|
83
90
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertActionsComponent, never>;
|
|
84
91
|
static ɵcmp: i0.ɵɵComponentDeclaration<AlertActionsComponent, "st-alert-actions", never, {}, {}, never, ["*"], true, never>;
|
|
85
92
|
}
|
|
@@ -90,6 +90,7 @@ The data table finds the projected component through the `TABLE_EMPTY_STATE` inj
|
|
|
90
90
|
|
|
91
91
|
## Accessibility
|
|
92
92
|
|
|
93
|
+
- Items per page: the footer `st-select` uses `fitOptions`, so it is as wide as its longest option ("100 / página") and the chosen value never wraps.
|
|
93
94
|
- `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.
|
|
94
95
|
- To manage the attribute yourself, set `syncHeaderAriaSort` to `false` and bind the helper on the `th`:
|
|
95
96
|
|
|
@@ -18,30 +18,6 @@ export type DataTableVariantProps = {
|
|
|
18
18
|
export declare const dataTableContent: (props?: ({
|
|
19
19
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
-
/**
|
|
22
|
-
* A styled container component for data tables - provides styling shell only
|
|
23
|
-
*
|
|
24
|
-
* This component is similar to st-table but with additional data table specific styling.
|
|
25
|
-
* Users should compose their own table structure using TanStack Table and SDK components.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```html
|
|
29
|
-
* <st-data-table size="md" height="lg">
|
|
30
|
-
* <table>
|
|
31
|
-
* <thead>
|
|
32
|
-
* <tr>
|
|
33
|
-
* <th><st-data-table-sortable-header>Name</st-data-table-sortable-header></th>
|
|
34
|
-
* </tr>
|
|
35
|
-
* </thead>
|
|
36
|
-
* <tbody>
|
|
37
|
-
* <tr>
|
|
38
|
-
* <td>John Doe</td>
|
|
39
|
-
* </tr>
|
|
40
|
-
* </tbody>
|
|
41
|
-
* </table>
|
|
42
|
-
* </st-data-table>
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
21
|
export declare class DataTableContainerComponent {
|
|
46
22
|
readonly translationService: TranslateService;
|
|
47
23
|
readonly dataTableContext: DataTableContextService;
|
|
@@ -150,6 +126,8 @@ export declare class DataTableContainerComponent {
|
|
|
150
126
|
pageSizeChanged: import("@angular/core").OutputEmitterRef<number>;
|
|
151
127
|
readonly ENTRIES: readonly [5, 10, 20, 50, 100];
|
|
152
128
|
private readonly translateLabel;
|
|
129
|
+
/** @internal Id of the items-per-page select, named by its visually hidden label */
|
|
130
|
+
protected readonly pageSizeSelectId: string;
|
|
153
131
|
readonly entriesPerPageOptions: import("@angular/core").Signal<{
|
|
154
132
|
value: 10 | 5 | 20 | 50 | 100;
|
|
155
133
|
text: string;
|
|
@@ -22,8 +22,9 @@ Modal overlay with title, content, and actions.
|
|
|
22
22
|
## Notes
|
|
23
23
|
|
|
24
24
|
- `width` is `'xs'` | `'sm'` | `'md'` | `'lg'` | `'xl'` | `'2xl'` | `'3xl'` | `'4xl'` | `'5xl'` (16rem to 64rem), default `'lg'` (32rem). Set it by purpose: form or action `lg`, delete confirm `xl` (or `2xl` with a full-row table), upload `xl`. The dialog never grows wider than the viewport minus 2rem. Outputs: `closed`, `clickOutside`.
|
|
25
|
-
- `st-dialog-actions` aligns right by default: put the dismiss action first and the confirm action last.
|
|
26
|
-
-
|
|
27
|
-
-
|
|
25
|
+
- `st-dialog-actions` aligns right by default: put the dismiss action first and the confirm action last. Below `sm` the actions stack full width with the confirm on top.
|
|
26
|
+
- The dialog never grows taller than the viewport (1rem gap per edge when centered, 2rem at the top or bottom position): the content scrolls, and the title and actions stay visible. This holds on every width, with or without `fullscreenOnMobile`, and inside an MFE shadow root. Drop local `max-h-* overflow-y-auto` wrappers on `st-dialog-content`.
|
|
27
|
+
- `fullscreenOnMobile` (default `true`): below the `sm` breakpoint (640px) the dialog fills the screen (full width and `100dvh`, no radius). Set `[fullscreenOnMobile]="false"` for a short confirm that should stay a centered card on phones. While full-screen, the page behind is scroll-locked (CDK block strategy); wider viewports and opted-out dialogs keep the page scroll so a sticky navbar does not jump. The lock sets `position: fixed`, `width: 100%` and `overflow-y: scroll` inline on `<html>` as well as the `cdk-global-scrollblock` class, so it also works when the host page does not load the SDK stylesheet (for example a host that loads it only inside an MFE child's shadow root); the previous inline values come back on close. The focus trap and `prefers-reduced-motion` handling are unchanged.
|
|
28
|
+
- The title and subtitle keep clear of the close button (an icon button), so long titles wrap before it, and a single long word breaks inside the panel; no local `pe-*` padding is needed.
|
|
28
29
|
- Prefer `(triggered)` on close controls.
|
|
29
30
|
- 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.
|
|
@@ -2,7 +2,8 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export type ModalActionsAligmentProps = 'left' | 'right' | 'center';
|
|
3
3
|
export declare class DialogActionsComponent {
|
|
4
4
|
/**
|
|
5
|
-
* Horizontal alignment of the actions. Dialog actions sit at the bottom right, dismiss first and
|
|
5
|
+
* Horizontal alignment of the actions from `sm` up. Dialog actions sit at the bottom right, dismiss first and
|
|
6
|
+
* confirm last. Below `sm` they stack full width with the last one (the confirm) on top.
|
|
6
7
|
* @defaultValue 'right'
|
|
7
8
|
*/
|
|
8
9
|
alignment: import("@angular/core").InputSignal<ModalActionsAligmentProps>;
|
|
@@ -12,6 +12,7 @@ export type DialogYPosition = 'top' | 'center' | 'bottom';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const dialogComponent: (props?: ({
|
|
14
14
|
width?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | null | undefined;
|
|
15
|
+
yPosition?: "center" | "top" | "bottom" | null | undefined;
|
|
15
16
|
fullscreenOnMobile?: boolean | null | undefined;
|
|
16
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
18
|
/** Possible width values for the dialog component */
|
|
@@ -60,6 +61,8 @@ export declare class DialogComponent {
|
|
|
60
61
|
private readonly translateLabel;
|
|
61
62
|
/** @internal Close button name from `sdk.dialog.close`, in English when no translation is loaded. */
|
|
62
63
|
protected readonly closeLabel: import("@angular/core").Signal<string>;
|
|
64
|
+
/** @internal Close button icon; the button carries the accessible name. */
|
|
65
|
+
protected readonly iconClose = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z\"></path></svg>";
|
|
63
66
|
private readonly contentEffect;
|
|
64
67
|
/**
|
|
65
68
|
* Specifies the width of the dialog
|
|
@@ -67,9 +70,9 @@ export declare class DialogComponent {
|
|
|
67
70
|
*/
|
|
68
71
|
width: import("@angular/core").InputSignal<DialogWidthProps>;
|
|
69
72
|
/**
|
|
70
|
-
* Below the `sm` breakpoint (640px) the dialog fills the screen: full width and height, no radius
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
+
* Below the `sm` breakpoint (640px) the dialog fills the screen: full width and height, no radius.
|
|
74
|
+
* Set it to `false` for a short confirm that should stay a centered card on phones. Either way the
|
|
75
|
+
* dialog never grows past the viewport: the content scrolls and the title and actions stay visible.
|
|
73
76
|
* @defaultValue true
|
|
74
77
|
*/
|
|
75
78
|
fullscreenOnMobile: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -148,10 +151,12 @@ export declare class DialogComponent {
|
|
|
148
151
|
*/
|
|
149
152
|
componentClass: import("@angular/core").Signal<string>;
|
|
150
153
|
/**
|
|
151
|
-
* Classes for the content region: it takes the free height and scrolls
|
|
154
|
+
* Classes for the content region: it takes the free height and scrolls when the dialog reaches the viewport.
|
|
155
|
+
* The 0.25rem padding, offset by a negative margin, keeps focus rings inside the scroll box from being clipped.
|
|
156
|
+
* `scroll-fade-y` fades the top and bottom edges only while there is more content to scroll to.
|
|
152
157
|
* @internal
|
|
153
158
|
*/
|
|
154
|
-
contentClass: import("@angular/core").Signal<
|
|
159
|
+
contentClass: import("@angular/core").Signal<string>;
|
|
155
160
|
/** @internal Handles open/close state changes */
|
|
156
161
|
openedEffect: import("@angular/core").EffectRef;
|
|
157
162
|
/**
|
package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts
CHANGED
|
@@ -65,5 +65,5 @@ export declare class DropdownMenuBarItemComponent {
|
|
|
65
65
|
*/
|
|
66
66
|
itemClass: () => string;
|
|
67
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuBarItemComponent, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuBarItemComponent, "st-dropdown-menu-bar-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "triggered": "triggered"; "clicked": "clicked"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; }, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: {}; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuBarItemComponent, "st-dropdown-menu-bar-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "triggered": "triggered"; "clicked": "clicked"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; }, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: { "cdkMenuItemDisabled": "disabled"; }; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
|
|
69
69
|
}
|
|
@@ -6,7 +6,8 @@ import * as i1 from "@angular/cdk/menu";
|
|
|
6
6
|
export declare class DropdownMenuItemComponent {
|
|
7
7
|
private readonly menuStack;
|
|
8
8
|
/**
|
|
9
|
-
* Whether the menu item is disabled
|
|
9
|
+
* Whether the menu item is disabled. The CDK menu item gets it too, so the item has
|
|
10
|
+
* `aria-disabled`, keyboard navigation skips it and it never fires `triggered`.
|
|
10
11
|
*/
|
|
11
12
|
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
13
|
/**
|
|
@@ -66,5 +67,5 @@ export declare class DropdownMenuItemComponent {
|
|
|
66
67
|
*/
|
|
67
68
|
itemClass: () => string;
|
|
68
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuItemComponent, never>;
|
|
69
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuItemComponent, "st-dropdown-menu-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "triggered": "triggered"; "clicked": "clicked"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; }, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: {}; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuItemComponent, "st-dropdown-menu-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "triggered": "triggered"; "clicked": "clicked"; "keyDownEnter": "keyDownEnter"; "keyDownSpace": "keyDownSpace"; }, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: { "cdkMenuItemDisabled": "disabled"; }; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
|
|
70
71
|
}
|
|
@@ -146,6 +146,18 @@ export declare class DropzoneComponent implements ControlValueAccessor {
|
|
|
146
146
|
iconDelete: string;
|
|
147
147
|
iconDownload: string;
|
|
148
148
|
private readonly translateLabel;
|
|
149
|
+
/** @internal Accessible name of the dropzone, which acts as a button that opens the file picker. */
|
|
150
|
+
protected readonly dropzoneLabel: import("@angular/core").Signal<string>;
|
|
151
|
+
/** @internal */
|
|
152
|
+
private readonly idPrefix;
|
|
153
|
+
/** @internal Id of the max size hint. */
|
|
154
|
+
protected readonly maxSizeId: string;
|
|
155
|
+
/** @internal Id of the allowed types hint. */
|
|
156
|
+
protected readonly allowedTypesId: string;
|
|
157
|
+
/** @internal Id of the error message. */
|
|
158
|
+
protected readonly errorId: string;
|
|
159
|
+
/** @internal Ids of the visible error, or of the size and type hints, that describe the dropzone button. */
|
|
160
|
+
protected readonly hintIds: import("@angular/core").Signal<string | null>;
|
|
149
161
|
/** @internal Names of the icon-only file action buttons. */
|
|
150
162
|
protected readonly fileActionLabels: import("@angular/core").Signal<{
|
|
151
163
|
download: string;
|
|
@@ -115,6 +115,12 @@ export declare class FileUploaderComponent implements ControlValueAccessor {
|
|
|
115
115
|
* @internal
|
|
116
116
|
*/
|
|
117
117
|
formattedExtensions: import("@angular/core").Signal<string>;
|
|
118
|
+
/** @internal */
|
|
119
|
+
private readonly translateLabel;
|
|
120
|
+
/** @internal Accessible name of the button that opens the file picker. */
|
|
121
|
+
protected readonly triggerLabel: import("@angular/core").Signal<string>;
|
|
122
|
+
/** @internal Icon of the file picker button. */
|
|
123
|
+
protected readonly iconUpload = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9 16h6v-6h4l-7-7l-7 7h4zm-4 2h14v2H5z\"></path></svg>";
|
|
118
124
|
/**
|
|
119
125
|
* Reference to the hidden file input
|
|
120
126
|
* @internal
|
|
@@ -19,9 +19,58 @@ Searchable select. Clear is a sibling of the trigger; the chevron is a custom ic
|
|
|
19
19
|
></st-combobox>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
## Width
|
|
23
|
+
|
|
24
|
+
The control's width is measured with `getBoundingClientRect()` and rounded up, so a panel that copies it is never a fraction of a pixel narrower than the control (an option that exactly fills the control no longer wraps).
|
|
25
|
+
|
|
26
|
+
- `panelWidth` (`'trigger' | 'content'`, default `'trigger'`). `'trigger'` keeps the panel as wide as the control, as before; a long option wraps. `'content'` makes the panel at least as wide as the control and wider when an option needs it, up to `min(28rem, 100vw - 2rem)`. The width is measured over every option, not the filtered list, so typing in the search never resizes the panel. Options stay on one line, with the check slot reserved on every row. Past the cap the description is cut first, then the label, both with an ellipsis; hovering a cut-off row, or making it the keyboard-active row, shows its full text (`Label, Description`) as a `title`. The accessible name and keyboard navigation do not change. Near the viewport edge the panel aligns to the control's end instead of overflowing, and it still flips above the control when there is no room below.
|
|
27
|
+
- `fitOptions` (boolean, default `false`) sizes the closed control to its widest option or its placeholder. A hidden sizer in the component's own template stacks every option row with the option row's classes and the menu size of the current `size` (label, description and check slot), plus every label in the control's own font, so CSS takes the widest in real pixels. The room of the clear button is kept while nothing is chosen, so the control keeps its width between selections and a chosen value is never cut off. In `multiple` mode the `+N` badge next to the first value is not counted. The sizer is capped like the panel (`min(28rem, 100vw - 2rem)`), so one very long option cannot widen the control past the panel. The element becomes `inline-block align-top shrink-0`: it shrinks to that width in a block, `align-top` keeps it from sitting on the text baseline (no stray gap below it in a line box) and does not shrink in a flex row that scrolls (`overflow-x-auto`). `min-w-*` and `w-*` classes on the element still apply; a narrower `w-*` cuts the value with an ellipsis.
|
|
28
|
+
- How they combine: `fitOptions` implies `panelWidth="content"`, so setting both is the same as `fitOptions` alone. With a fitted control the panel ends up as wide as the control; it only grows past it when a `w-*` or `max-w-*` class makes the control narrower than its options.
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<!-- A short filter whose panel shows every option on one line -->
|
|
32
|
+
<st-combobox
|
|
33
|
+
class="min-w-28"
|
|
34
|
+
size="sm"
|
|
35
|
+
panelWidth="content"
|
|
36
|
+
[options]="['All', 'OC_ACN_MISMATCH', 'WHITELIST_GTO', 'BLACKLIST_MSISDN']"
|
|
37
|
+
[(value)]="filter"
|
|
38
|
+
></st-combobox>
|
|
39
|
+
|
|
40
|
+
<!-- A control as wide as its widest option, in a scrolling filter bar -->
|
|
41
|
+
<div class="flex gap-4 overflow-x-auto">
|
|
42
|
+
<st-combobox size="sm" fitOptions [options]="refreshOptions" displayKey="label" valueKey="seconds" [(value)]="refresh"></st-combobox>
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
22
46
|
## Notes
|
|
23
47
|
|
|
24
48
|
- `allowClear` keeps the clear control in tab order after the trigger. Do not nest a button in the trigger.
|
|
25
49
|
- Overlay animation follows CDK position with a 4px gap above or below.
|
|
26
50
|
- `selectionType` is `'single'` or `'multiple'`.
|
|
27
51
|
- Async options: a value written through the form (`writeValue`) before its options exist is kept and resolved, with its label, once a matching option arrives, without calling `onChange` (the control stays pristine). It is resolved again whenever `options` is replaced, so a list that is filtered or reloaded later still shows the label. A user selection, clear or `writeValue(null)` replaces it (clear is ignored while disabled). In `multiple` mode the values that match show right away and the ones without an option stay pending in the form, showing when their option arrives; a user toggle emits the visible values plus the still-pending ones, so nothing the form holds is silently dropped. Pending values are cleared by `writeValue`, a reset or a user clear.
|
|
52
|
+
- Disabled options: `disabledKey` names the option property that disables it when truthy. The option stays in the list and in search results, is dimmed with the kit's disabled colors (`--color-disabled-content`), carries `aria-disabled="true"` and cannot be chosen by click, Enter or Space. The arrow keys skip them; Home and End stay on the search text. In `multiple` mode a disabled option is never added, by click or Enter. Without `disabledKey` every option is enabled.
|
|
53
|
+
- Secondary text: `descriptionKey` names an option property shown on the same row as the label, right-aligned in the muted colour before the check (for example why the option is disabled). A long label wraps first; a long description is cut with an ellipsis rather than pushed under the label. It is part of the option's accessible name (read as "Label, Description").
|
|
54
|
+
- Option groups: `groupKey` names an option property holding its group. Options that share a value are listed under one header showing that value, styled like the dropdown section label (`st-dropdown-label`) with a separator line before it unless it opens the list, groups in the order they first appear; options without the property are listed first, ungrouped. Each group is a `role="group"` with `aria-labelledby` pointing at its header (ids unique per instance). Headers cannot be chosen. The arrow keys and `aria-activedescendant` follow the listed order and skip headers; disabled options stay skipped. A group whose options are all filtered out by the search hides its header. Without `groupKey` the list is flat, in the given order.
|
|
55
|
+
- Already-taken options: `checkedKey` names an option property that, when truthy, shows the check icon on the option without making it part of the value: it never appears in the trigger or counts as selected. Pair it with `disabledKey` so the check is dimmed with the option text (`--color-disabled-content`), the option carries `aria-disabled="true"` and it cannot be chosen again; use `descriptionKey` to say why. Without `disabledKey` the check is only a marker and the option can still be chosen.
|
|
56
|
+
- Scrolling: the option list fades its top and bottom edges while there is more to scroll to (`scroll-fade-y`) and contains its overscroll.
|
|
57
|
+
- Validation errors: inside `st-form-item` with `st-form-errors`, the `role="combobox"` trigger gets `aria-invalid="true"` while its control is invalid and touched or dirty, and the error message id joins the hint ids in its `aria-describedby`. See [Form Error](../form-error/README.md).
|
|
58
|
+
- Listbox: the trigger has `aria-haspopup="listbox"` and `aria-controls` pointing at the listbox's generated id (unique per instance). The listbox is named by the `label`, or by the trigger when there is no `label`. With no matches it shows `noResultsText`, else `sdk.combobox.noResultsFound` ("No results found" when no translation is loaded).
|
|
59
|
+
- Search input: while the panel is open it has focus and is the combobox: `role="combobox"`, `aria-autocomplete="list"`, `aria-expanded`, `aria-controls` (the listbox id) and `aria-activedescendant`, the id of the option the arrow keys made active (disabled options are skipped), so screen readers announce it.
|
|
60
|
+
- When the panel opens in `single` mode with a value, the selected option (the one with the check) is the active row, so the highlight and the check sit on the same option. Without a value, in `multiple` mode, or when the selected option is disabled, the first enabled option is active. Typing a search moves the active row to the first match.
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<st-combobox [options]="countries" displayKey="name" valueKey="code" disabledKey="added" descriptionKey="note" [(value)]="country"></st-combobox>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<st-combobox
|
|
68
|
+
[options]="countries"
|
|
69
|
+
displayKey="name"
|
|
70
|
+
valueKey="code"
|
|
71
|
+
groupKey="group"
|
|
72
|
+
disabledKey="added"
|
|
73
|
+
checkedKey="added"
|
|
74
|
+
[(value)]="country"
|
|
75
|
+
></st-combobox>
|
|
76
|
+
```
|