@sixbell-telco/sdk 4.1.2 → 4.3.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 +102 -1
- package/README.md +98 -66
- package/_index.css +2 -1498
- package/components/accordion/accordion-item/accordion-item.component.d.ts +1 -1
- package/components/alert/README.md +27 -0
- package/components/alert/index.d.ts +5 -0
- package/components/alert/public-api.d.ts +1 -0
- package/components/alert/src/alert.component.d.ts +85 -0
- package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +1 -1
- package/components/audio-player/button-play/button-play.component.d.ts +7 -7
- package/components/audio-player/src/audio-player.component.d.ts +2 -2
- package/components/audio-player/volume-control/volume-control.component.d.ts +1 -1
- package/components/avatar/README.md +1 -0
- package/components/avatar/src/avatar.component.d.ts +2 -2
- package/components/badge/src/badge.component.d.ts +4 -4
- package/components/button/README.md +5 -4
- package/components/button/src/button.component.d.ts +38 -16
- package/components/card/README.md +2 -0
- package/components/card/card-footer/card-footer.component.d.ts +37 -2
- package/components/card/card-section-group/card-section-group.component.d.ts +1 -1
- package/components/card/src/card.component.d.ts +6 -6
- package/components/countdown/src/countdown.component.d.ts +4 -4
- package/components/data-table/README.md +26 -0
- package/components/data-table/expandable/expandable.component.d.ts +4 -4
- package/components/data-table/sortable-header/sortable-header.component.d.ts +1 -1
- package/components/data-table/src/data-table.component.d.ts +15 -8
- package/components/data-table/sub-component-toggle/sub-component-toggle.component.d.ts +1 -1
- package/components/description-list/README.md +27 -0
- package/components/description-list/index.d.ts +5 -0
- package/components/description-list/public-api.d.ts +1 -0
- package/components/description-list/src/description-list.component.d.ts +90 -0
- package/components/dialog/README.md +10 -6
- package/components/dialog/dialog-actions/dialog-actions.component.d.ts +4 -0
- package/components/dialog/src/dialog.component.d.ts +27 -6
- package/components/dialog/src/fullscreen-block-scroll-strategy.d.ts +31 -0
- package/components/divider/src/divider.component.d.ts +1 -1
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +1 -1
- package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +4 -4
- package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +5 -5
- package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +5 -5
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/README.md +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +3 -3
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +4 -4
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +4 -4
- package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +1 -1
- package/components/dropdown-menu/dropdown-menu-chevron/dropdown-menu-chevron.component.d.ts +1 -1
- package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +3 -3
- package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +1 -1
- package/components/empty-state/README.md +40 -0
- package/components/empty-state/index.d.ts +5 -0
- package/components/empty-state/public-api.d.ts +1 -0
- package/components/empty-state/src/empty-state.component.d.ts +73 -0
- package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +4 -4
- package/components/file-upload/file-uploader/file-uploader.component.d.ts +2 -2
- package/components/forms/checkbox/src/checkbox.component.d.ts +1 -1
- package/components/forms/combobox/README.md +1 -0
- package/components/forms/combobox/src/combobox.component.d.ts +29 -7
- package/components/forms/date-picker/src/date-picker.component.d.ts +21 -9
- package/components/forms/form-hint/README.md +29 -0
- package/components/forms/form-hint/index.d.ts +5 -0
- package/components/forms/form-hint/public-api.d.ts +1 -0
- package/components/forms/form-hint/src/form-hint.component.d.ts +38 -0
- package/components/forms/form-item/src/form-item.component.d.ts +45 -1
- package/components/forms/input/README.md +2 -0
- package/components/forms/input/src/input.component.d.ts +41 -7
- package/components/forms/radio/src/radio.component.d.ts +1 -1
- package/components/forms/range/src/range.component.d.ts +26 -4
- package/components/forms/select/README.md +1 -0
- package/components/forms/select/src/select.component.d.ts +28 -5
- package/components/forms/switch/src/switch.component.d.ts +1 -1
- package/components/forms/textarea/src/textarea.component.d.ts +20 -5
- package/components/forms/toggle/src/toggle.component.d.ts +1 -1
- package/components/notification/src/notification.component.d.ts +1 -1
- package/components/overlay/README.md +1 -1
- package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +1 -1
- package/components/overlay/src/overlay.component.d.ts +1 -1
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +3 -3
- package/components/progress/src/progress.component.d.ts +1 -1
- package/components/segmented-button/README.md +57 -0
- package/components/segmented-button/index.d.ts +5 -0
- package/components/segmented-button/public-api.d.ts +1 -0
- package/components/segmented-button/src/segmented-button.component.d.ts +110 -0
- package/components/sonner/toaster/src/toaster.component.d.ts +3 -3
- package/components/tab/src/tab.component.d.ts +2 -2
- package/components/table/README.md +51 -3
- package/components/table/public-api.d.ts +1 -0
- package/components/table/src/table.component.d.ts +20 -13
- package/components/table/table-action/table-action.component.d.ts +14 -3
- package/components/table/table-actions/table-actions.component.d.ts +12 -1
- package/components/table/tokens/README.md +7 -0
- package/components/table/tokens/index.d.ts +5 -0
- package/components/table/tokens/public-api.d.ts +1 -0
- package/components/table/tokens/table-empty-state.d.ts +6 -0
- package/components/tooltip/README.md +22 -5
- package/components/tooltip/src/tooltip.component.d.ts +36 -4
- package/components/tree/README.md +73 -0
- package/components/tree/index.d.ts +5 -0
- package/components/tree/public-api.d.ts +1 -0
- package/components/tree/src/tree.component.d.ts +180 -0
- package/components/wizard/README.md +9 -0
- package/components/wizard/wizard-content/wizard-content.component.d.ts +1 -1
- package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +15 -6
- package/directives/auto-focus/src/auto-focus.directive.d.ts +1 -1
- package/directives/only-numbers/src/only-numbers.directive.d.ts +1 -1
- package/directives/truncate/README.md +49 -0
- package/directives/truncate/index.d.ts +5 -0
- package/directives/truncate/public-api.d.ts +1 -0
- package/directives/truncate/src/truncate-popover.component.d.ts +11 -0
- package/directives/truncate/src/truncate.directive.d.ts +96 -0
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs +152 -0
- package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +15 -15
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +53 -19
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +61 -14
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +34 -33
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-description-list.mjs +200 -0
- package/fesm2022/sixbell-telco-sdk-components-description-list.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +128 -17
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +16 -16
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +6 -6
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +17 -17
- package/fesm2022/sixbell-telco-sdk-components-dropdown.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-empty-state.mjs +131 -0
- package/fesm2022/sixbell-telco-sdk-components-empty-state.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +80 -25
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +28 -12
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-hint.mjs +81 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-hint.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +45 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +62 -13
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +38 -7
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +60 -15
- 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 +36 -22
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs +329 -0
- package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table-tokens.mjs +14 -0
- package/fesm2022/sixbell-telco-sdk-components-table-tokens.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +63 -32
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +156 -25
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tree.mjs +478 -0
- package/fesm2022/sixbell-telco-sdk-components-tree.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +18 -9
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs +339 -0
- package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +43 -35
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs +15 -2
- package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs +87 -2
- package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +242 -4
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation-testing.mjs +203 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation-testing.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-unsaved-changes.mjs +150 -0
- package/fesm2022/sixbell-telco-sdk-utils-unsaved-changes.mjs.map +1 -0
- package/i18n/sdk/en.json +224 -0
- package/i18n/sdk/es.json +224 -0
- package/i18n/sdk/pt.json +224 -0
- package/layouts/README.md +11 -10
- package/layouts/src/app-layout/app-layout.component.d.ts +11 -8
- package/layouts/src/layout.config.d.ts +1 -1
- package/layouts/src/navbar/navbar.component.d.ts +5 -5
- package/layouts/src/page-banner/page-banner.component.d.ts +6 -1
- package/layouts/src/side-menu/side-menu.component.d.ts +2 -2
- package/layouts/src/user-menu/user-menu.component.d.ts +5 -5
- package/package.json +63 -23
- package/src/_index.css +1616 -0
- package/utils/mfe/README.md +1 -0
- package/utils/mfe/src/hoist-property-rules.d.ts +13 -0
- package/utils/mfe/src/mfe-shadow-shell.component.d.ts +3 -0
- package/utils/theme/README.md +94 -1
- package/utils/theme/public-api.d.ts +2 -1
- package/utils/theme/src/models/theme.d.ts +32 -0
- package/utils/theme/src/overlay/theme-overlay.d.ts +33 -0
- package/utils/theme/src/providers/theme.provider.types.d.ts +7 -0
- package/utils/translation/README.md +61 -0
- package/utils/translation/testing/index.d.ts +5 -0
- package/utils/translation/testing/public-api.d.ts +2 -0
- package/utils/translation/testing/src/translation-testing.d.ts +96 -0
- package/utils/unsaved-changes/README.md +33 -0
- package/utils/unsaved-changes/index.d.ts +5 -0
- package/utils/unsaved-changes/public-api.d.ts +1 -0
- package/utils/unsaved-changes/src/unsaved-changes-dialog.component.d.ts +24 -0
- package/utils/unsaved-changes/src/unsaved-changes.d.ts +50 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Segmented Button
|
|
2
|
+
|
|
3
|
+
Import: `@sixbell-telco/sdk/components/segmented-button`
|
|
4
|
+
|
|
5
|
+
Selector: `st-segmented-button`
|
|
6
|
+
|
|
7
|
+
Single-choice control styled as a compact button bar, for picking a value such
|
|
8
|
+
as a period, an export format or a view mode.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<st-segmented-button ariaLabel="Period" [options]="periods" [(value)]="period" />
|
|
14
|
+
|
|
15
|
+
<st-segmented-button ariaLabel="Format" variant="primary" fullWidth [options]="formats" formControlName="format" />
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
periods: SegmentedButtonOption[] = [
|
|
20
|
+
{ value: 'day', label: 'Day' },
|
|
21
|
+
{ value: 'month', label: 'Month' },
|
|
22
|
+
{ value: 'list', icon: heroListBullet, ariaLabel: 'List' },
|
|
23
|
+
];
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
| Input | Default | Purpose |
|
|
27
|
+
| ---------------- | ------- | ------------------------------------------------------------- |
|
|
28
|
+
| `options` | `[]` | `{ value, label?, icon?, ariaLabel?, disabled? }` per segment |
|
|
29
|
+
| `value` (model) | `null` | Selected value, two-way with `[(value)]` |
|
|
30
|
+
| `variant` | `base` | Selected segment color (`primary`, `secondary`, …) |
|
|
31
|
+
| `size` | `md` | `xs`–`xl`, same scale as `st-button` |
|
|
32
|
+
| `fullWidth` | `false` | Stretch to the parent; segments share the width |
|
|
33
|
+
| `disabled` | `false` | Disable every segment |
|
|
34
|
+
| `ariaLabel` | `''` | Accessible name of the group |
|
|
35
|
+
| `ariaLabelledby` | `''` | Id of a visible label naming the group |
|
|
36
|
+
| `class` | `''` | Extra classes merged onto the track |
|
|
37
|
+
|
|
38
|
+
Implements `ControlValueAccessor` (`formControlName`, `formControl`, `ngModel`),
|
|
39
|
+
including `disable()`; the control is marked touched when focus leaves the group.
|
|
40
|
+
|
|
41
|
+
## Accessibility
|
|
42
|
+
|
|
43
|
+
- WAI-ARIA APG radio group: the host is `role="radiogroup"`, each segment is a
|
|
44
|
+
native `button` with `role="radio"` and `aria-checked`.
|
|
45
|
+
- One tab stop (roving tabindex): the checked segment, or the first enabled one.
|
|
46
|
+
- Arrow Right/Down and Left/Up move focus and select, wrapping and skipping
|
|
47
|
+
disabled segments (Left/Right flip in RTL). Home/End go to the first/last
|
|
48
|
+
segment. Space and Enter select the focused segment.
|
|
49
|
+
- Always name the group (`ariaLabel` or `ariaLabelledby`). Icon-only segments
|
|
50
|
+
need their own `ariaLabel`; icons are `aria-hidden`.
|
|
51
|
+
|
|
52
|
+
## When to use something else
|
|
53
|
+
|
|
54
|
+
- `st-tab`: switches between content panels (tablist semantics), not a form value.
|
|
55
|
+
- `st-radio`: long or descriptive choices, or more than about five options.
|
|
56
|
+
- `st-toggle` / `st-switch`: a single on/off value.
|
|
57
|
+
- DaisyUI `join` only groups buttons visually; it has no selection or keyboard model.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/segmented-button.component';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** Value carried by a segment */
|
|
4
|
+
export type SegmentedButtonValue = string | number | boolean;
|
|
5
|
+
/** One segment of `st-segmented-button` */
|
|
6
|
+
export type SegmentedButtonOption = {
|
|
7
|
+
value: SegmentedButtonValue;
|
|
8
|
+
/** Visible text. Optional when `icon` is set, but then `ariaLabel` is required. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Icon SVG (same format as `st-icon` `icon`) rendered before the label. */
|
|
11
|
+
icon?: string;
|
|
12
|
+
/** Accessible name for icon-only segments. */
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Possible segmented button color variants (selected segment) */
|
|
17
|
+
export type SegmentedButtonVariantProps = 'base' | 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | null | undefined;
|
|
18
|
+
/** Possible segmented button sizes (same scale as `st-button`) */
|
|
19
|
+
export type SegmentedButtonSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* Track (radiogroup) classes
|
|
23
|
+
*/
|
|
24
|
+
export declare const segmentedButtonTrack: (props?: ({
|
|
25
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
26
|
+
fullWidth?: boolean | null | undefined;
|
|
27
|
+
disabled?: boolean | null | undefined;
|
|
28
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* Segment (radio) classes
|
|
32
|
+
*/
|
|
33
|
+
export declare const segmentedButtonSegment: (props?: ({
|
|
34
|
+
variant?: "base" | "primary" | "secondary" | "tertiary" | "accent" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
35
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
36
|
+
selected?: boolean | null | undefined;
|
|
37
|
+
fullWidth?: boolean | null | undefined;
|
|
38
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
39
|
+
/**
|
|
40
|
+
* A single-choice segmented control: a compact, keyboard-accessible radio group styled like a button bar.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* - WAI-ARIA radio group pattern: `role="radiogroup"` with `role="radio"` segments, a single tab stop
|
|
44
|
+
* (roving tabindex), arrow keys move focus and select (wrapping, disabled segments skipped), Home/End
|
|
45
|
+
* jump to the first/last segment.
|
|
46
|
+
* - Two-way binding through `[(value)]`, and a `ControlValueAccessor` for reactive and template forms
|
|
47
|
+
* (`formControlName`, `ngModel`), including the disabled state.
|
|
48
|
+
* - Name the group with `ariaLabel` or `ariaLabelledby`; icon-only segments need their own `ariaLabel`.
|
|
49
|
+
* - Use it to pick a value. To switch between content panels, use `st-tab`.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```html
|
|
53
|
+
* <st-segmented-button ariaLabel="Period" [options]="periods" [(value)]="period" />
|
|
54
|
+
* <st-segmented-button ariaLabel="Format" variant="primary" fullWidth [options]="formats" formControlName="format" />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare class SegmentedButtonComponent implements ControlValueAccessor {
|
|
58
|
+
/** Segments to render, in order. */
|
|
59
|
+
readonly options: import("@angular/core").InputSignal<SegmentedButtonOption[]>;
|
|
60
|
+
/** Selected value (two-way: `[(value)]`). `null` selects nothing. */
|
|
61
|
+
readonly value: import("@angular/core").ModelSignal<SegmentedButtonValue | null>;
|
|
62
|
+
/**
|
|
63
|
+
* Color of the selected segment.
|
|
64
|
+
* @defaultValue 'base'
|
|
65
|
+
*/
|
|
66
|
+
readonly variant: import("@angular/core").InputSignal<SegmentedButtonVariantProps>;
|
|
67
|
+
/**
|
|
68
|
+
* Size, on the same scale as `st-button`.
|
|
69
|
+
* @defaultValue 'md'
|
|
70
|
+
*/
|
|
71
|
+
readonly size: import("@angular/core").InputSignal<SegmentedButtonSizeProps>;
|
|
72
|
+
/** Stretch to the parent width; segments share the space equally. */
|
|
73
|
+
readonly fullWidth: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
74
|
+
/** Disables every segment. */
|
|
75
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
76
|
+
/** Accessible name of the group. */
|
|
77
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
78
|
+
/** Id(s) of the element(s) naming the group, such as a visible label. */
|
|
79
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
80
|
+
/** Extra classes merged onto the track. */
|
|
81
|
+
readonly class: import("@angular/core").InputSignal<string>;
|
|
82
|
+
private readonly formDisabled;
|
|
83
|
+
private readonly segments;
|
|
84
|
+
private readonly host;
|
|
85
|
+
private onChange;
|
|
86
|
+
private onTouched;
|
|
87
|
+
/** @internal */
|
|
88
|
+
readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
89
|
+
/** @internal Index of the segment that holds the single tab stop. */
|
|
90
|
+
readonly tabStopIndex: import("@angular/core").Signal<number>;
|
|
91
|
+
/** @internal */
|
|
92
|
+
readonly trackClass: import("@angular/core").Signal<string>;
|
|
93
|
+
/** @internal */
|
|
94
|
+
isSelected(option: SegmentedButtonOption): boolean;
|
|
95
|
+
/** @internal */
|
|
96
|
+
segmentClass(option: SegmentedButtonOption): string;
|
|
97
|
+
/** Selects a segment, as a click or arrow key does. Ignored for disabled segments. */
|
|
98
|
+
select(option: SegmentedButtonOption): void;
|
|
99
|
+
/** @internal */
|
|
100
|
+
onKeydown(event: KeyboardEvent, index: number): void;
|
|
101
|
+
/** @internal */
|
|
102
|
+
onFocusOut(event: FocusEvent): void;
|
|
103
|
+
writeValue(value: SegmentedButtonValue | null): void;
|
|
104
|
+
registerOnChange(fn: (value: SegmentedButtonValue | null) => void): void;
|
|
105
|
+
registerOnTouched(fn: () => void): void;
|
|
106
|
+
setDisabledState(isDisabled: boolean): void;
|
|
107
|
+
private findEnabled;
|
|
108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedButtonComponent, never>;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedButtonComponent, "st-segmented-button", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
110
|
+
}
|
|
@@ -25,12 +25,12 @@ export declare class SonnerToasterComponent {
|
|
|
25
25
|
* (semantic border and text color on the base-200 surface, applied through the SDK classes).
|
|
26
26
|
* @defaultValue false
|
|
27
27
|
*/
|
|
28
|
-
richColors: import("@angular/core").
|
|
28
|
+
richColors: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
29
29
|
/**
|
|
30
30
|
* Whether to expand the toast on hover
|
|
31
31
|
* @defaultValue false
|
|
32
32
|
*/
|
|
33
|
-
expand: import("@angular/core").
|
|
33
|
+
expand: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
34
34
|
/**
|
|
35
35
|
* Maximum number of visible toasts
|
|
36
36
|
* @defaultValue 3
|
|
@@ -50,7 +50,7 @@ export declare class SonnerToasterComponent {
|
|
|
50
50
|
* Whether to show close button
|
|
51
51
|
* @defaultValue false
|
|
52
52
|
*/
|
|
53
|
-
closeButton: import("@angular/core").
|
|
53
|
+
closeButton: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
54
54
|
/**
|
|
55
55
|
* Duration for the toast in milliseconds
|
|
56
56
|
* @defaultValue 4000
|
|
@@ -18,8 +18,8 @@ export type TabProps = {
|
|
|
18
18
|
export declare class TabComponent {
|
|
19
19
|
variant: import("@angular/core").InputSignal<TabVariantProps>;
|
|
20
20
|
size: import("@angular/core").InputSignal<TabSizeProps>;
|
|
21
|
-
disabled: import("@angular/core").
|
|
22
|
-
active: import("@angular/core").
|
|
21
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
22
|
+
active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
23
23
|
componentClass: import("@angular/core").Signal<string>;
|
|
24
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabComponent, never>;
|
|
25
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "st-tab", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
@@ -9,17 +9,47 @@ Data table with optional pagination, footer, and row actions.
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<st-table [data]="
|
|
13
|
-
<
|
|
12
|
+
<st-table [data]="users" [pagination]="pagination">
|
|
13
|
+
<tbody>
|
|
14
|
+
@for (user of users; track user.id) {
|
|
15
|
+
<tr>
|
|
16
|
+
<td>{{ user.name }}</td>
|
|
17
|
+
<td>
|
|
18
|
+
<st-table-actions
|
|
19
|
+
[actions]="actions"
|
|
20
|
+
mode="dropdown"
|
|
21
|
+
size="sm"
|
|
22
|
+
[contextLabel]="'usuario ' + user.name"
|
|
23
|
+
(actionTriggered)="handleAction($event, user)"
|
|
24
|
+
/>
|
|
25
|
+
</td>
|
|
26
|
+
</tr>
|
|
27
|
+
}
|
|
28
|
+
</tbody>
|
|
14
29
|
</st-table>
|
|
15
30
|
```
|
|
16
31
|
|
|
32
|
+
```ts
|
|
33
|
+
actions: TableActionConfig[] = [
|
|
34
|
+
{ id: 'view', icon: viewIcon, label: 'Ver', tooltip: 'Ver', variant: 'primary' },
|
|
35
|
+
{ id: 'edit', icon: editIcon, label: 'Editar', tooltip: 'Editar', variant: 'warning' },
|
|
36
|
+
{ id: 'delete', icon: deleteIcon, label: 'Eliminar', tooltip: 'Eliminar', variant: 'error' },
|
|
37
|
+
];
|
|
38
|
+
```
|
|
39
|
+
|
|
17
40
|
## Notes
|
|
18
41
|
|
|
42
|
+
- Row actions keep their role colors: view `primary`, edit `warning`, delete `error`. Give every action a `tooltip` and set `contextLabel` to the row's name. With three or more actions per row, use `mode="dropdown"` (the kebab menu).
|
|
19
43
|
- `st-table-actions` supports `inline` or `dropdown` modes, or projected `st-table-action` children.
|
|
20
|
-
- `st-table-action` default `variant` is `base
|
|
44
|
+
- `st-table-action` default `variant` is `base`; always set the role variant on row actions. Prefer `(triggered)` or `(clicked)`.
|
|
21
45
|
- `st-table-action` tooltip default `tooltipVariant` is `base`; override per action when needed.
|
|
22
46
|
- Accessible names: an `st-table-action` uses its translated `tooltip` as the button's `aria-label`, so give icon-only actions a `tooltip` (or a `tooltip` in each `TableActionConfig`). The `dropdown` mode trigger is named by the `sdk.table.actions` key.
|
|
47
|
+
- Row context: set `contextLabel` (on `st-table-action` or `st-table-actions`) to the row's name so each row's actions are told apart. The accessible name becomes "<tooltip> <contextLabel>" ("Editar producto ABC"), starting with the visible tooltip as WCAG 2.5.3 requires, while the tooltip still shows "Editar". In `dropdown` mode the trigger becomes "<actions label> <contextLabel>".
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<st-table-action variant="warning" [icon]="editIcon" tooltip="Editar" [contextLabel]="'producto ' + row.name" (triggered)="edit(row)" />
|
|
51
|
+
```
|
|
52
|
+
|
|
23
53
|
- `height` presets: `auto` (default), `full`, `sm` (18rem), `md` (20rem), `lg` (24rem), `xl` (36rem). The height container is the only scroll container, so `pinRows` keeps the header in view.
|
|
24
54
|
- `pinColumns` pins the first column, whether its cells are `th` or `td`.
|
|
25
55
|
|
|
@@ -44,3 +74,21 @@ Data table with optional pagination, footer, and row actions.
|
|
|
44
74
|
## Row hover
|
|
45
75
|
|
|
46
76
|
`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.
|
|
77
|
+
|
|
78
|
+
## Empty state
|
|
79
|
+
|
|
80
|
+
Project an `st-empty-state` (from `@sixbell-telco/sdk/components/empty-state`) into `st-table` to replace the built-in "no data" and "no results" blocks. Use `size="sm"` and at most one CTA. It is never shown while `loading`.
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<st-table [data]="rows()" [totalItems]="total()">
|
|
84
|
+
<thead>
|
|
85
|
+
…
|
|
86
|
+
</thead>
|
|
87
|
+
<tbody>
|
|
88
|
+
…
|
|
89
|
+
</tbody>
|
|
90
|
+
<st-empty-state size="sm" heading="No tables yet" description="Create a table to store lookup values." />
|
|
91
|
+
</st-table>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The table finds the projected component through the `TABLE_EMPTY_STATE` injection token. The token lives in the dependency-free entry `@sixbell-telco/sdk/components/table/tokens` (re-exported from `@sixbell-telco/sdk/components/table`), so `st-table` and `st-empty-state` do not load each other's shared bundle in Native Federation. A custom empty-state component can provide it: `providers: [{ provide: TABLE_EMPTY_STATE, useExisting: MyEmptyStateComponent }]`.
|
|
@@ -102,35 +102,35 @@ export declare class TableComponent {
|
|
|
102
102
|
* Enable sticky header row
|
|
103
103
|
* @defaultValue false
|
|
104
104
|
*/
|
|
105
|
-
pinRows: import("@angular/core").
|
|
105
|
+
pinRows: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
106
106
|
/**
|
|
107
107
|
* Enable sticky first column
|
|
108
108
|
* @defaultValue false
|
|
109
109
|
*/
|
|
110
|
-
pinColumns: import("@angular/core").
|
|
110
|
+
pinColumns: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
111
111
|
/**
|
|
112
112
|
* Apply zebra-striping to rows
|
|
113
113
|
* @defaultValue false
|
|
114
114
|
*/
|
|
115
|
-
zebra: import("@angular/core").
|
|
115
|
+
zebra: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
116
116
|
/**
|
|
117
117
|
* Show row dividers (borders) between rows
|
|
118
118
|
* @defaultValue false
|
|
119
119
|
*/
|
|
120
|
-
bordered: import("@angular/core").
|
|
120
|
+
bordered: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
121
121
|
/**
|
|
122
122
|
* Highlight body rows on hover with the `--color-table-row-hover` tint (12% `base-content` by default)
|
|
123
123
|
* layered over each cell's own background, so zebra rows and pinned first-column cells follow it
|
|
124
124
|
* @defaultValue true
|
|
125
125
|
*/
|
|
126
|
-
rowHover: import("@angular/core").
|
|
126
|
+
rowHover: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
127
127
|
/**
|
|
128
128
|
* Show a loading state: the projected header and the table frame stay in place and the body
|
|
129
129
|
* shows skeleton rows. The table is marked `aria-busy` and a status message is announced.
|
|
130
130
|
* The empty states are not shown while loading.
|
|
131
131
|
* @defaultValue false
|
|
132
132
|
*/
|
|
133
|
-
loading: import("@angular/core").
|
|
133
|
+
loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
134
134
|
/**
|
|
135
135
|
* Number of skeleton rows shown while loading. Defaults to the page size (`pagination.itemsPerPage`).
|
|
136
136
|
* @defaultValue null
|
|
@@ -176,30 +176,31 @@ export declare class TableComponent {
|
|
|
176
176
|
/** Event emitted when page size changes */
|
|
177
177
|
pageSizeChanged: import("@angular/core").OutputEmitterRef<number>;
|
|
178
178
|
readonly ENTRIES: readonly [5, 10, 20, 50, 100];
|
|
179
|
+
private readonly translateLabel;
|
|
179
180
|
readonly entriesPerPageOptions: import("@angular/core").Signal<{
|
|
180
181
|
value: 10 | 5 | 20 | 50 | 100;
|
|
181
|
-
text:
|
|
182
|
+
text: string;
|
|
182
183
|
}[]>;
|
|
183
184
|
/**
|
|
184
185
|
* Show items per page selector
|
|
185
186
|
* @defaultValue true
|
|
186
187
|
*/
|
|
187
|
-
showItemsPerPage: import("@angular/core").
|
|
188
|
+
showItemsPerPage: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
188
189
|
/**
|
|
189
190
|
* Show entries count display
|
|
190
191
|
* @defaultValue true
|
|
191
192
|
*/
|
|
192
|
-
showEntries: import("@angular/core").
|
|
193
|
+
showEntries: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
193
194
|
/**
|
|
194
195
|
* Show pagination controls
|
|
195
196
|
* @defaultValue true
|
|
196
197
|
*/
|
|
197
|
-
showPagination: import("@angular/core").
|
|
198
|
+
showPagination: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
198
199
|
/**
|
|
199
200
|
* Show footer with additional information
|
|
200
201
|
* @defaultValue true
|
|
201
202
|
*/
|
|
202
|
-
showFooter: import("@angular/core").
|
|
203
|
+
showFooter: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
203
204
|
/**
|
|
204
205
|
* Function to determine if any filters are currently active
|
|
205
206
|
* This allows the parent component to define what constitutes an "active filter"
|
|
@@ -210,7 +211,7 @@ export declare class TableComponent {
|
|
|
210
211
|
* or wrap text normally (false)
|
|
211
212
|
* @defaultValue false
|
|
212
213
|
*/
|
|
213
|
-
allowHeaderOverflow: import("@angular/core").
|
|
214
|
+
allowHeaderOverflow: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
214
215
|
/**
|
|
215
216
|
* Computed total number of pages for the internal paginator.
|
|
216
217
|
* Calculated from totalItems and itemsPerPage.
|
|
@@ -281,6 +282,12 @@ export declare class TableComponent {
|
|
|
281
282
|
footerWrapperClass: import("@angular/core").Signal<string>;
|
|
282
283
|
footerDividerClass: import("@angular/core").Signal<string>;
|
|
283
284
|
footerContentClass: import("@angular/core").Signal<string>;
|
|
285
|
+
/**
|
|
286
|
+
* @internal
|
|
287
|
+
* A projected `st-empty-state` replaces the built-in "no data" and "no results" blocks.
|
|
288
|
+
* Only a direct child counts, the same nodes `<ng-content select="st-empty-state">` projects.
|
|
289
|
+
*/
|
|
290
|
+
readonly customEmptyState: import("@angular/core").Signal<unknown>;
|
|
284
291
|
/** @internal Reference to header checkbox component */
|
|
285
292
|
header: import("@angular/core").Signal<TableHeaderCheckboxComponent | undefined>;
|
|
286
293
|
/** @internal List of row checkbox components */
|
|
@@ -304,5 +311,5 @@ export declare class TableComponent {
|
|
|
304
311
|
/** @internal Clear all selections */
|
|
305
312
|
private clearList;
|
|
306
313
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
307
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "st-table", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "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; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingRows": { "alias": "loadingRows"; "required": false; "isSignal": true; }; "paginatorType": { "alias": "paginatorType"; "required": false; "isSignal": true; }; "noDataIcon": { "alias": "noDataIcon"; "required": false; "isSignal": true; }; "noResultsIcon": { "alias": "noResultsIcon"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "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; }; "showItemsPerPage": { "alias": "showItemsPerPage"; "required": false; "isSignal": true; }; "showEntries": { "alias": "showEntries"; "required": false; "isSignal": true; }; "showPagination": { "alias": "showPagination"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "hasActiveFiltersCallback": { "alias": "hasActiveFiltersCallback"; "required": false; "isSignal": true; }; "allowHeaderOverflow": { "alias": "allowHeaderOverflow"; "required": false; "isSignal": true; }; }, { "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; "checkedItems": "checkedItems"; }, ["header", "rows"], ["st-table-empty-actions", "thead", "tbody", "tfoot"], true, never>;
|
|
314
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "st-table", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "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; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingRows": { "alias": "loadingRows"; "required": false; "isSignal": true; }; "paginatorType": { "alias": "paginatorType"; "required": false; "isSignal": true; }; "noDataIcon": { "alias": "noDataIcon"; "required": false; "isSignal": true; }; "noResultsIcon": { "alias": "noResultsIcon"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "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; }; "showItemsPerPage": { "alias": "showItemsPerPage"; "required": false; "isSignal": true; }; "showEntries": { "alias": "showEntries"; "required": false; "isSignal": true; }; "showPagination": { "alias": "showPagination"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "hasActiveFiltersCallback": { "alias": "hasActiveFiltersCallback"; "required": false; "isSignal": true; }; "allowHeaderOverflow": { "alias": "allowHeaderOverflow"; "required": false; "isSignal": true; }; }, { "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; "checkedItems": "checkedItems"; }, ["customEmptyState", "header", "rows"], ["st-empty-state", "st-table-empty-actions", "thead", "tbody", "tfoot"], true, never>;
|
|
308
315
|
}
|
|
@@ -27,6 +27,12 @@ export declare class TableActionComponent {
|
|
|
27
27
|
* Tooltip text (optional).
|
|
28
28
|
*/
|
|
29
29
|
tooltip: import("@angular/core").InputSignal<string | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* What the action applies to, such as the row's name ("producto ABC"). When set with `tooltip`, the
|
|
32
|
+
* accessible name becomes "<tooltip> <contextLabel>" ("Editar producto ABC") while the tooltip still
|
|
33
|
+
* shows only "Editar", so the name starts with the visible label (WCAG 2.5.3).
|
|
34
|
+
*/
|
|
35
|
+
contextLabel: import("@angular/core").InputSignal<string | null | undefined>;
|
|
30
36
|
/**
|
|
31
37
|
* Tooltip color variant.
|
|
32
38
|
* @defaultValue 'base'
|
|
@@ -45,12 +51,12 @@ export declare class TableActionComponent {
|
|
|
45
51
|
* Disabled state forwarded to the inner button.
|
|
46
52
|
* @defaultValue false
|
|
47
53
|
*/
|
|
48
|
-
disabled: import("@angular/core").
|
|
54
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
49
55
|
/**
|
|
50
56
|
* Stop event propagation for activation events.
|
|
51
57
|
* @defaultValue false
|
|
52
58
|
*/
|
|
53
|
-
stopPropagation: import("@angular/core").
|
|
59
|
+
stopPropagation: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
54
60
|
/**
|
|
55
61
|
* Event emitted on click of the inner button.
|
|
56
62
|
*/
|
|
@@ -64,11 +70,16 @@ export declare class TableActionComponent {
|
|
|
64
70
|
*/
|
|
65
71
|
tableActionClass: import("@angular/core").Signal<string>;
|
|
66
72
|
textPreset: import("@angular/core").Signal<TextPreset>;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* The visible tooltip text, followed by the context when one is set.
|
|
76
|
+
*/
|
|
77
|
+
accessibleName(label: string): string;
|
|
67
78
|
/**
|
|
68
79
|
* @internal
|
|
69
80
|
* Forward inner button click as SDK activation outputs.
|
|
70
81
|
*/
|
|
71
82
|
onClicked(event: MouseEvent): void;
|
|
72
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableActionComponent, never>;
|
|
73
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionComponent, "st-table-action", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipVariant": { "alias": "tooltipVariant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "triggered": "triggered"; }, never, ["*"], true, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionComponent, "st-table-action", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "contextLabel": { "alias": "contextLabel"; "required": false; "isSignal": true; }; "tooltipVariant": { "alias": "tooltipVariant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "stopPropagation": { "alias": "stopPropagation"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "triggered": "triggered"; }, never, ["*"], true, never>;
|
|
74
85
|
}
|
|
@@ -46,11 +46,22 @@ export declare class TableActionsComponent {
|
|
|
46
46
|
* @defaultValue matMoreVert (Material vertical dots icon)
|
|
47
47
|
*/
|
|
48
48
|
triggerIcon: import("@angular/core").InputSignal<string>;
|
|
49
|
+
/**
|
|
50
|
+
* What the actions apply to, such as the row's name ("producto ABC"). Inline buttons are named
|
|
51
|
+
* "<tooltip> <contextLabel>" and the dropdown trigger "<actions label> <contextLabel>"; the visible
|
|
52
|
+
* tooltips and item labels stay unchanged.
|
|
53
|
+
*/
|
|
54
|
+
contextLabel: import("@angular/core").InputSignal<string | null | undefined>;
|
|
49
55
|
/**
|
|
50
56
|
* Emitted when a data-driven action is triggered/clicked.
|
|
51
57
|
* Emits the full `TableActionConfig` of the triggered action.
|
|
52
58
|
*/
|
|
53
59
|
actionTriggered: import("@angular/core").OutputEmitterRef<TableActionConfig>;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* The trigger's own name, followed by the context when one is set.
|
|
63
|
+
*/
|
|
64
|
+
triggerName(label: string): string;
|
|
54
65
|
/**
|
|
55
66
|
* @internal
|
|
56
67
|
* Computed class string for the table actions container (inline mode and ng-content fallback).
|
|
@@ -67,5 +78,5 @@ export declare class TableActionsComponent {
|
|
|
67
78
|
*/
|
|
68
79
|
onActionClick(action: TableActionConfig): void;
|
|
69
80
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableActionsComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionsComponent, "st-table-actions", never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "triggerIcon": { "alias": "triggerIcon"; "required": false; "isSignal": true; }; }, { "actionTriggered": "actionTriggered"; }, never, ["*"], true, never>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionsComponent, "st-table-actions", never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "triggerIcon": { "alias": "triggerIcon"; "required": false; "isSignal": true; }; "contextLabel": { "alias": "contextLabel"; "required": false; "isSignal": true; }; }, { "actionTriggered": "actionTriggered"; }, never, ["*"], true, never>;
|
|
71
82
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Table tokens
|
|
2
|
+
|
|
3
|
+
Import: `@sixbell-telco/sdk/components/table/tokens`
|
|
4
|
+
|
|
5
|
+
Dependency-free injection tokens shared by `st-table` and the components it projects.
|
|
6
|
+
|
|
7
|
+
- `TABLE_EMPTY_STATE`: provided by `st-empty-state`; `st-table` queries it to replace its built-in "no data" / "no results" blocks. Also re-exported from `@sixbell-telco/sdk/components/table`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './table-empty-state';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Marker an empty-state component provides so `st-table` can project it in place of its built-in
|
|
4
|
+
* "no data" / "no results" blocks without importing that component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TABLE_EMPTY_STATE: InjectionToken<unknown>;
|
|
@@ -10,19 +10,36 @@ Hover or focus hint backed by direct CDK connected-overlay positioning. Use
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```html
|
|
13
|
-
<st-tooltip label="
|
|
14
|
-
<st-button>
|
|
13
|
+
<st-tooltip label="Ctrl+K opens search" position="top">
|
|
14
|
+
<st-button variant="tertiary" [outline]="true">Show shortcut</st-button>
|
|
15
15
|
</st-tooltip>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Behavior
|
|
19
19
|
|
|
20
|
+
- It shows on pointer hover and on keyboard focus (`:focus-visible`), not on the
|
|
21
|
+
focus a mouse click leaves behind. It hides on pointer leave, blur and Escape
|
|
22
|
+
(Escape works while hovered, wherever focus is). The tooltip is hoverable: it
|
|
23
|
+
waits `closeDelay` ms (default 120, `0` hides at once) after the pointer leaves,
|
|
24
|
+
so the pointer can move onto it. Pressing or activating the
|
|
25
|
+
trigger (mouse, Enter or Space) hides it until the next hover or keyboard
|
|
26
|
+
focus, even when the projected control stops propagation, so a click never
|
|
27
|
+
leaves it pinned (WCAG 1.4.13, APG tooltip pattern).
|
|
20
28
|
- `position` selects the primary side; CDK repositions through the opposite and
|
|
21
29
|
orthogonal sides when the viewport requires it, and closes when the origin is
|
|
22
30
|
outside the view.
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
- Escape comes through the CDK overlay keyboard stack, so it reaches the tooltip
|
|
32
|
+
only while it is the top layer: inside `st-dialog` the first Escape closes the
|
|
33
|
+
tooltip and the next one the dialog.
|
|
34
|
+
- The tooltip portal inherits the trigger's `data-theme`. A `hidden`
|
|
35
|
+
`role="tooltip"` element next to the trigger carries the text at all times. It
|
|
36
|
+
stays out of the reading order, but the trigger's `aria-describedby` still
|
|
37
|
+
resolves it, also while the tooltip is closed (for example after a mouse
|
|
38
|
+
click). The visible portaled pane is `aria-hidden`, so the text is announced
|
|
39
|
+
once. Focused triggers receive the `aria-describedby` reference, and it is
|
|
40
|
+
removed on blur. A trigger whose accessible name already contains the tooltip
|
|
41
|
+
text (an icon button with its own label, `st-table-action` with `contextLabel`)
|
|
42
|
+
is not described, so the text is not read twice.
|
|
26
43
|
- Rich content is descriptive and portal-only. Keep interactive controls in the
|
|
27
44
|
trigger or use a component designed for interactive overlays.
|
|
28
45
|
- Open and close states settle after the directional animation. The shared
|