@ids-group-ltd/ids-design-system 0.11.4 → 0.12.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 -3
- package/components/README.md +86 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +70 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +573 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +86 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +615 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +30 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +188 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +59 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +92 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +204 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +100 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +23 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +180 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +78 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +49 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +73 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +397 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +1231 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +51 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +35 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +109 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +111 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +52 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +92 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +62 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +164 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +223 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +63 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +53 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +286 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +329 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +612 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +69 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +191 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +23 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +240 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +41 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +235 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +62 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +173 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +123 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +461 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +107 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +185 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +32 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +204 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +25 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +53 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +99 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +26 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +74 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +76 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +1802 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +381 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +44 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +158 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +671 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +41 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +547 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +34 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +218 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +18 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +153 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +48 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +1338 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +325 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +101 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +56 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +37 -0
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +72 -14267
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.0.json +0 -2
- package/migrations/0.11.1.json +2 -1
- package/migrations/0.11.2.json +2 -1
- package/migrations/0.11.3.json +3 -2
- package/migrations/0.11.4.json +7 -1
- package/migrations/0.12.0.json +22 -0
- package/migrations/0.4.0.json +2 -1
- package/migrations/0.7.1.json +2 -1
- package/package.json +573 -1
- package/themes/README.md +4 -4
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +260 -0
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +75 -0
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +226 -0
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +99 -0
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +25 -0
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +61 -0
- package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +66 -0
- package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +10 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +90 -0
- package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-card.d.ts +24 -0
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +79 -0
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +251 -0
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +25 -0
- package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +38 -0
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +45 -0
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +73 -0
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +36 -0
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +83 -0
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +56 -0
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +121 -0
- package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +39 -0
- package/types/ids-group-ltd-ids-design-system-components-list.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +82 -0
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +124 -0
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +213 -0
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +52 -0
- package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +21 -0
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +80 -0
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +106 -0
- package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +33 -0
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +82 -0
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +152 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +92 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +131 -0
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +16 -0
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +51 -0
- package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +11 -0
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +38 -0
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +44 -0
- package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +12 -0
- package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +791 -0
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +118 -0
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +26 -0
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +85 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +188 -0
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +24 -0
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +167 -0
- package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +18 -0
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +66 -0
- package/types/ids-group-ltd-ids-design-system-components-topbar.d.ts +8 -0
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +46 -0
- package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +18 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +604 -0
- package/types/ids-group-ltd-ids-design-system-core.d.ts +428 -0
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +52 -0
- package/types/ids-group-ltd-ids-design-system-overlay.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +72 -5594
- package/LICENSE +0 -21
- package/README.md +0 -73
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal, ElementRef, TemplateRef, ModelSignal, WritableSignal } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { IconName } from '@ids-group-ltd/ids-design-system/core';
|
|
5
|
+
import { FieldMessageState } from '@ids-group-ltd/ids-design-system/components/field-message';
|
|
6
|
+
import { OverlayRef, Overlay, FlexibleConnectedPositionStrategy, OverlayConfig } from '@angular/cdk/overlay';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Resolve one brand string against the app-level default. `ds-sidenav` and
|
|
10
|
+
* `ds-auth-layout` ask the same three questions and an app answers them
|
|
11
|
+
* identically on every screen, so the answer belongs in one provider rather than
|
|
12
|
+
* in four bindings per template.
|
|
13
|
+
*
|
|
14
|
+
* Same `null`-means-unset shape as `resolveReserveMessage` — here `''` is an
|
|
15
|
+
* explicit "this screen has no brand", and each field resolves on its own.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
declare function resolveBrandValue(value: Signal<string | null>, key: 'name' | 'logoLetter' | 'tagline'): Signal<string>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
declare function chipFit(count: Signal<number>, chipRow: Signal<ElementRef<HTMLElement> | undefined>, enabled: Signal<boolean>,
|
|
22
|
+
/** The whole selection, which `count` may already cap. */
|
|
23
|
+
selectionSize?: Signal<number>): Signal<number>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Fills a selected chip's content in the trigger of `ds-multi-select` and
|
|
27
|
+
* `ds-autocomplete`, so a picker whose rows carry an avatar does not lose it the
|
|
28
|
+
* moment the option is chosen.
|
|
29
|
+
*
|
|
30
|
+
* The chip is still a `ds-tag` owned by the library: its close button, its
|
|
31
|
+
* accessible remove label and the measured overflow cap are not projected.
|
|
32
|
+
*/
|
|
33
|
+
declare class DsChipTemplateDirective {
|
|
34
|
+
readonly template: TemplateRef<unknown>;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsChipTemplateDirective, never>;
|
|
36
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsChipTemplateDirective, "[dsChipTemplate]", never, {}, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The inputs of anything that renders a `ds-field-message` line — the message half
|
|
41
|
+
* of a field, split out so `ds-button` can take it without also taking `errors`,
|
|
42
|
+
* `invalid` and `touched`, which describe a form control's validation state and
|
|
43
|
+
* mean nothing on a button.
|
|
44
|
+
*
|
|
45
|
+
* `@Directive()` is required, not decoration: Angular refuses to compile a base
|
|
46
|
+
* class that declares inputs without it.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
declare abstract class DsMessageBase {
|
|
50
|
+
/** Helper text shown below the control. */
|
|
51
|
+
readonly hint: i0.InputSignalWithTransform<string, string | null | undefined>;
|
|
52
|
+
/** Error text. Shown immediately — binding it says the consumer has already
|
|
53
|
+
* decided this is in error. Takes precedence over `errors`. */
|
|
54
|
+
readonly error: i0.InputSignalWithTransform<string, string | null | undefined>;
|
|
55
|
+
/** Advisory text, shown when there is no error. */
|
|
56
|
+
readonly warning: i0.InputSignalWithTransform<string, string | null | undefined>;
|
|
57
|
+
/** Reserve the message-row height even when empty, so the control doesn't shift
|
|
58
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
59
|
+
* `DS_CONFIG.field.reserveMessage`, then off. */
|
|
60
|
+
readonly reserveMessage: i0.InputSignalWithTransform<boolean | null, unknown>;
|
|
61
|
+
/** Glyph on the message line, overriding what the state resolves to. Unset
|
|
62
|
+
* follows `DS_CONFIG.field.stateIcons`; `false` removes the glyph here alone. */
|
|
63
|
+
readonly messageIcon: i0.InputSignal<false | IconName | null>;
|
|
64
|
+
readonly reserveMessageResolved: i0.Signal<boolean>;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsMessageBase, never>;
|
|
66
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsMessageBase, never, never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "reserveMessage": { "alias": "reserveMessage"; "required": false; "isSignal": true; }; "messageIcon": { "alias": "messageIcon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* One validation error, structurally identical to Angular's signal-forms
|
|
71
|
+
* `ValidationError`.
|
|
72
|
+
*
|
|
73
|
+
* Declared here rather than imported from `@angular/forms/signals` on purpose:
|
|
74
|
+
* that module is `@experimental`, and a public DS type must not carry a
|
|
75
|
+
* dependency that can be renamed out from under consumers. Structural
|
|
76
|
+
* compatibility is all the interop needs — signal forms binds by input NAME and
|
|
77
|
+
* assigns its own `ValidationError[]`, which this shape accepts.
|
|
78
|
+
*/
|
|
79
|
+
interface DsFieldError {
|
|
80
|
+
/** Identifies the kind of error, e.g. `required`, `minlength`, `server`. */
|
|
81
|
+
readonly kind: string;
|
|
82
|
+
/** Human-readable text. Authored by the consumer, at the validator. */
|
|
83
|
+
readonly message?: string;
|
|
84
|
+
}
|
|
85
|
+
/** What a field's `errors` input accepts before normalization. */
|
|
86
|
+
type DsFieldErrorsInput = string | DsFieldError | readonly DsFieldError[] | null | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* The one reserved `DsFieldError.kind`. An error carrying it is advisory: it shows
|
|
89
|
+
* in the warning state and does NOT make the control invalid, which is how a form
|
|
90
|
+
* model can raise a non-blocking remark — Angular's own `AbstractControl` has no
|
|
91
|
+
* channel for one, only `errors` and the validity derived from it.
|
|
92
|
+
*/
|
|
93
|
+
declare const DS_FIELD_WARNING_KIND = "warning";
|
|
94
|
+
/** @internal */
|
|
95
|
+
declare function trimmedText(value: string | null | undefined): string;
|
|
96
|
+
/** The single line a field shows below itself, already resolved.
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
interface DsFieldMessage {
|
|
100
|
+
readonly text: string;
|
|
101
|
+
readonly state: FieldMessageState;
|
|
102
|
+
}
|
|
103
|
+
interface DsFieldMessageSources {
|
|
104
|
+
hint: Signal<string>;
|
|
105
|
+
warning: Signal<string>;
|
|
106
|
+
error: Signal<string>;
|
|
107
|
+
errors: Signal<readonly DsFieldError[]>;
|
|
108
|
+
invalid: Signal<boolean>;
|
|
109
|
+
success?: Signal<string>;
|
|
110
|
+
/** The field's own touched state, if it tracks one (CVA blur). */
|
|
111
|
+
touchedSelf?: Signal<boolean>;
|
|
112
|
+
/** Bound by signal forms as part of the `FormUiControl` contract. */
|
|
113
|
+
touched?: Signal<boolean>;
|
|
114
|
+
}
|
|
115
|
+
interface DsFieldMessageResolution {
|
|
116
|
+
/** Text + state for `ds-field-message`. */
|
|
117
|
+
readonly message: Signal<DsFieldMessage>;
|
|
118
|
+
/** `invalid` folded together with whatever the control reports. */
|
|
119
|
+
readonly invalid: Signal<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* The state the CONTROL paints, for `[attr.data-field-state]`. Deliberately not
|
|
122
|
+
* `message().state`: a field can be in a state with nothing to say, and can have
|
|
123
|
+
* text in a state the box does not paint.
|
|
124
|
+
*/
|
|
125
|
+
readonly controlState: Signal<FieldMessageState | null>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Resolve the one message a field shows, from every source that can supply one.
|
|
129
|
+
*
|
|
130
|
+
* Precedence, highest first — the ladder Carbon uses (`invalidText` →
|
|
131
|
+
* `warnText` → `helperText`) and Material's subscript follows, so only ONE line
|
|
132
|
+
* ever shows and the field's height does not depend on how many sources are
|
|
133
|
+
* populated:
|
|
134
|
+
*
|
|
135
|
+
* 1. `error` — an explicit string. Shown immediately: the consumer decided.
|
|
136
|
+
* 2. `errors` — validation errors. Shown once the user has interacted, so a
|
|
137
|
+
* `required` error does not greet an untouched form.
|
|
138
|
+
* 3. `warning` — advisory, not blocking.
|
|
139
|
+
* 4. `errors` whose kind is `DS_FIELD_WARNING_KIND` — the same, raised by the form model.
|
|
140
|
+
* 5. `success` — confirmation.
|
|
141
|
+
* 6. `hint` — helper text.
|
|
142
|
+
*
|
|
143
|
+
* Both form systems feed step 2 and neither needs the other. Signal forms binds
|
|
144
|
+
* `errors` and `touched` by input name (`FormUiControl`); reactive and
|
|
145
|
+
* template-driven forms expose the same through `NgControl`, read here. A given
|
|
146
|
+
* field instance is driven by exactly one of them, so they cannot disagree.
|
|
147
|
+
*
|
|
148
|
+
* Every rung carries its OWN text, and `hint` is never recoloured into somebody
|
|
149
|
+
* else's state. `invalid` is the one input with no text on purpose: it paints the
|
|
150
|
+
* control and sets `aria-invalid` for when the message lives elsewhere — a
|
|
151
|
+
* form-level error summary, or one message for a whole field group.
|
|
152
|
+
*
|
|
153
|
+
* Call from a field initializer (an injection context).
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
declare function resolveFieldMessage(sources: DsFieldMessageSources): DsFieldMessageResolution;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The inputs every DS form field has, declared once.
|
|
160
|
+
*
|
|
161
|
+
* Only the UNIVERSAL ones belong here. `success`, `label`, `required` and
|
|
162
|
+
* `optional` stay on the components: they exist on some fields and not others, so
|
|
163
|
+
* lifting them would hand a checkbox a `success` or a slider a `label` it never
|
|
164
|
+
* had — a silent public-API addition.
|
|
165
|
+
*
|
|
166
|
+
* The message half lives one level up in `DsMessageBase`, which anything with a
|
|
167
|
+
* message line can take. What stays here is the validation state a form control
|
|
168
|
+
* has and a plain control does not.
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
declare abstract class DsFieldBase extends DsMessageBase {
|
|
172
|
+
/** Validation errors, shown once the user has interacted. Bound automatically
|
|
173
|
+
* by signal forms; reactive and template-driven forms are read through
|
|
174
|
+
* `NgControl` and need nothing here. Accepts a string, one error, or an array. */
|
|
175
|
+
readonly errors: i0.InputSignalWithTransform<readonly DsFieldError[], DsFieldErrorsInput>;
|
|
176
|
+
/** Paints the error state and sets `aria-invalid`, WITHOUT a message of its own
|
|
177
|
+
* — for when the text lives elsewhere, such as a form-level error summary or
|
|
178
|
+
* one message covering a whole field group. Use `error` to show text. */
|
|
179
|
+
readonly invalid: i0.InputSignalWithTransform<boolean, unknown>;
|
|
180
|
+
/** Whether the user has interacted with the field. Bound by signal forms; gates
|
|
181
|
+
* `errors`, so a `required` error does not greet an untouched form. */
|
|
182
|
+
readonly touched: i0.InputSignalWithTransform<boolean, unknown>;
|
|
183
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsFieldBase, never>;
|
|
184
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsFieldBase, never, never, { "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The `ControlValueAccessor` half of a DS value control, with no message API
|
|
189
|
+
* attached. `DsControlValueAccessor` is this plus `DsFieldBase`; a control that
|
|
190
|
+
* holds a value and renders no message row — `ds-search`, a toolbar filter rather
|
|
191
|
+
* than a validated field — takes this directly and gets no message inputs with it.
|
|
192
|
+
*
|
|
193
|
+
* The model arrives as a THUNK, not a signal: on a base class `value` is abstract
|
|
194
|
+
* and on a component it is a field initialiser, so it does not exist yet when this
|
|
195
|
+
* runs. Every read defers to call time, which is also when the effect first runs.
|
|
196
|
+
*
|
|
197
|
+
* Must be called from an injection context (it owns an `effect`).
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
200
|
+
declare function valueControlBridge<T>(model: () => ModelSignal<T>): {
|
|
201
|
+
readonly formDisabled: WritableSignal<boolean>;
|
|
202
|
+
readonly touchedSelf: WritableSignal<boolean>;
|
|
203
|
+
markTouched(): void;
|
|
204
|
+
writeValue(next: T): void;
|
|
205
|
+
registerOnChange(fn: (next: T) => void): void;
|
|
206
|
+
registerOnTouched(fn: () => void): void;
|
|
207
|
+
setDisabledState(isDisabled: boolean): void;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Shared `ControlValueAccessor` for DS form controls whose value is a signal
|
|
211
|
+
* `model()`. Bridges that model with Angular forms (reactive `formControl` /
|
|
212
|
+
* `formControlName` and template `ngModel`) in both directions, WITHOUT
|
|
213
|
+
* touching the existing `[(value)]` signal API — both keep working.
|
|
214
|
+
*
|
|
215
|
+
* A subclass must expose the `value` model and OR `formDisabled()` into its
|
|
216
|
+
* effective disabled state so `FormControl.disable()` actually reaches the
|
|
217
|
+
* control; it should also call `markTouched()` from a blur handler.
|
|
218
|
+
* @internal
|
|
219
|
+
*/
|
|
220
|
+
declare abstract class DsControlValueAccessor<T> extends DsFieldBase implements ControlValueAccessor {
|
|
221
|
+
/** The component's two-way value model. */
|
|
222
|
+
abstract readonly value: ModelSignal<T>;
|
|
223
|
+
/**
|
|
224
|
+
* Hides the control. On the base so signal forms reaches every control at once.
|
|
225
|
+
* Inline `display`, not the `hidden` attribute — each control sets its own
|
|
226
|
+
* `:host` display, which the attribute's weaker UA rule would lose to.
|
|
227
|
+
*/
|
|
228
|
+
readonly hidden: i0.InputSignalWithTransform<boolean, unknown>;
|
|
229
|
+
private readonly hostElement;
|
|
230
|
+
/**
|
|
231
|
+
* Signal forms calls this through `focusBoundControl()` — typically to reach
|
|
232
|
+
* the first invalid field after a failed submit. Without it the default is to
|
|
233
|
+
* focus the HOST, and a `<ds-*>` element is not focusable, so focus went
|
|
234
|
+
* nowhere. A control with a more precise target overrides this.
|
|
235
|
+
*/
|
|
236
|
+
focus(options?: FocusOptions): void;
|
|
237
|
+
private readonly bridge;
|
|
238
|
+
/** Driven by the forms API via `setDisabledState`. */
|
|
239
|
+
protected readonly formDisabled: WritableSignal<boolean>;
|
|
240
|
+
protected readonly touchedSelf: WritableSignal<boolean>;
|
|
241
|
+
/** Call from a blur handler so the control reports `ng-touched`. */
|
|
242
|
+
protected markTouched(): void;
|
|
243
|
+
writeValue(value: T): void;
|
|
244
|
+
registerOnChange(fn: (value: T) => void): void;
|
|
245
|
+
registerOnTouched(fn: () => void): void;
|
|
246
|
+
setDisabledState(isDisabled: boolean): void;
|
|
247
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsControlValueAccessor<any>, never>;
|
|
248
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsControlValueAccessor<any>, never, never, { "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Shared `ControlValueAccessor` for DS boolean controls (checkbox, switch)
|
|
252
|
+
* whose state lives in a `checked` model signal rather than `value`. Bridges
|
|
253
|
+
* with Angular forms in both directions without affecting the `[(checked)]`
|
|
254
|
+
* signal API. Subclasses must OR `formDisabled()` into their effective disabled
|
|
255
|
+
* state and call `markTouched()` from a blur handler.
|
|
256
|
+
* @internal
|
|
257
|
+
*/
|
|
258
|
+
declare abstract class DsBooleanControlValueAccessor extends DsFieldBase implements ControlValueAccessor {
|
|
259
|
+
/** The component's two-way checked model. */
|
|
260
|
+
abstract readonly checked: ModelSignal<boolean>;
|
|
261
|
+
/** Hides the control — see the note on `DsControlValueAccessor.hidden`. */
|
|
262
|
+
readonly hidden: i0.InputSignalWithTransform<boolean, unknown>;
|
|
263
|
+
private readonly hostElement;
|
|
264
|
+
/**
|
|
265
|
+
* Signal forms calls this through `focusBoundControl()` — typically to reach
|
|
266
|
+
* the first invalid field after a failed submit. Without it the default is to
|
|
267
|
+
* focus the HOST, and a `<ds-*>` element is not focusable, so focus went
|
|
268
|
+
* nowhere. A control with a more precise target overrides this.
|
|
269
|
+
*/
|
|
270
|
+
focus(options?: FocusOptions): void;
|
|
271
|
+
/** Driven by the forms API via `setDisabledState`. */
|
|
272
|
+
protected readonly formDisabled: WritableSignal<boolean>;
|
|
273
|
+
protected readonly touchedSelf: WritableSignal<boolean>;
|
|
274
|
+
private onChange;
|
|
275
|
+
private onTouched;
|
|
276
|
+
private synced;
|
|
277
|
+
private hasSynced;
|
|
278
|
+
constructor();
|
|
279
|
+
/** Call from a blur handler so the control reports `ng-touched`. */
|
|
280
|
+
protected markTouched(): void;
|
|
281
|
+
writeValue(value: boolean): void;
|
|
282
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
283
|
+
registerOnTouched(fn: () => void): void;
|
|
284
|
+
setDisabledState(isDisabled: boolean): void;
|
|
285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsBooleanControlValueAccessor, never>;
|
|
286
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsBooleanControlValueAccessor, never, never, { "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Replaces `ds-autocomplete`'s "Create «…»" row.
|
|
291
|
+
*
|
|
292
|
+
* Context: `query` is the typed text the row would create.
|
|
293
|
+
*
|
|
294
|
+
* The row stays a `role="option"` the keyboard can reach, and picking it still
|
|
295
|
+
* emits `create` — the template fills the row, it does not become the action.
|
|
296
|
+
*/
|
|
297
|
+
declare class DsCreateTemplateDirective {
|
|
298
|
+
readonly template: TemplateRef<unknown>;
|
|
299
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsCreateTemplateDirective, never>;
|
|
300
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsCreateTemplateDirective, "[dsCreateTemplate]", never, {}, {}, never, never, true, never>;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Replaces a picker panel's "no matches" row — an icon, a sentence in the app's
|
|
305
|
+
* own language, a "clear the filter" button.
|
|
306
|
+
*
|
|
307
|
+
* Context: `query` is the text that matched nothing.
|
|
308
|
+
*
|
|
309
|
+
* The row keeps `role="status"`, so a reader is told the list emptied whatever
|
|
310
|
+
* the template puts inside it.
|
|
311
|
+
*/
|
|
312
|
+
declare class DsEmptyTemplateDirective {
|
|
313
|
+
readonly template: TemplateRef<unknown>;
|
|
314
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsEmptyTemplateDirective, never>;
|
|
315
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsEmptyTemplateDirective, "[dsEmptyTemplate]", never, {}, {}, never, never, true, never>;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Focuses the field's inner `input`/`textarea` when the click lands on the
|
|
320
|
+
* frame chrome — padding, a leading/trailing icon, an addon slot — instead of
|
|
321
|
+
* the control itself. Applied to a field's wrapper element.
|
|
322
|
+
*
|
|
323
|
+
* `preventDefault` on that mousedown stops focus from bouncing off the
|
|
324
|
+
* non-focusable chrome; clicks that land on the control, or on a nested
|
|
325
|
+
* button/link/other input, are left untouched so caret placement, toggles and
|
|
326
|
+
* projected controls keep working.
|
|
327
|
+
*/
|
|
328
|
+
declare class FieldClickFocusDirective {
|
|
329
|
+
private readonly host;
|
|
330
|
+
protected onMousedown(event: MouseEvent): void;
|
|
331
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldClickFocusDirective, never>;
|
|
332
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldClickFocusDirective, "[dsFieldClickFocus]", never, {}, {}, never, never, true, never>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** Process-wide counter for stable, SSR-safe control ids (no DOM dependency).
|
|
336
|
+
* Replaces the per-component `let nextId = 0` pattern.
|
|
337
|
+
* @internal
|
|
338
|
+
*/
|
|
339
|
+
declare function nextControlId(prefix: string): string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Fills an option group's heading — a count beside the name, a team glyph, a
|
|
343
|
+
* secondary line.
|
|
344
|
+
*
|
|
345
|
+
* Context: `$implicit` and `group` are the group itself, `count` how many of its
|
|
346
|
+
* options survived the filter.
|
|
347
|
+
*
|
|
348
|
+
* The heading element stays the library's: it keeps the id that the group's
|
|
349
|
+
* `aria-labelledby` points at, so replacing the text cannot detach a group from
|
|
350
|
+
* its name.
|
|
351
|
+
*/
|
|
352
|
+
declare class DsGroupLabelTemplateDirective {
|
|
353
|
+
readonly template: TemplateRef<unknown>;
|
|
354
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsGroupLabelTemplateDirective, never>;
|
|
355
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsGroupLabelTemplateDirective, "[dsGroupLabelTemplate]", never, {}, {}, never, never, true, never>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Fills an option row's LABEL AREA in `ds-select`, `ds-multi-select` and
|
|
360
|
+
* `ds-autocomplete` — an avatar, a colour dot, a second line of metadata.
|
|
361
|
+
*
|
|
362
|
+
* ```html
|
|
363
|
+
* <ds-multi-select [options]="assignees()">
|
|
364
|
+
* <ng-template dsOptionTemplate let-option>
|
|
365
|
+
* <ds-avatar size="xs" [seed]="option.label" /> {{ option.label }}
|
|
366
|
+
* </ng-template>
|
|
367
|
+
* </ds-multi-select>
|
|
368
|
+
* ```
|
|
369
|
+
*
|
|
370
|
+
* The row itself stays library-owned: `role="option"`, `aria-selected`, the
|
|
371
|
+
* active-row class, the checkbox and the check glyph are not projected, so a
|
|
372
|
+
* template cannot take the listbox semantics with it.
|
|
373
|
+
*/
|
|
374
|
+
declare class DsOptionTemplateDirective {
|
|
375
|
+
readonly template: TemplateRef<unknown>;
|
|
376
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsOptionTemplateDirective, never>;
|
|
377
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsOptionTemplateDirective, "[dsOptionTemplate]", never, {}, {}, never, never, true, never>;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/** Where a connected panel sits relative to its trigger. `_overlay-motion.scss`
|
|
381
|
+
* maps this onto the enter direction, so the panel moves in FROM the trigger. */
|
|
382
|
+
type DsOverlayPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
383
|
+
/**
|
|
384
|
+
* Why a panel is closing. `'select'` is a deliberate action that produced a
|
|
385
|
+
* result — an option chosen, a date picked, the trigger pressed again, Tab moving
|
|
386
|
+
* on; `'dismiss'` is ambient — Escape, a press outside, the page scrolling away.
|
|
387
|
+
* @internal
|
|
388
|
+
*/
|
|
389
|
+
type DsOverlayCloseCause = 'select' | 'dismiss';
|
|
390
|
+
/**
|
|
391
|
+
* The geometry every DS dropdown shares. Width is deliberately NOT set here —
|
|
392
|
+
* each caller has its own policy (the exact trigger width, or the trigger as a
|
|
393
|
+
* floor).
|
|
394
|
+
* @internal
|
|
395
|
+
*/
|
|
396
|
+
declare function dropdownOverlay(overlay: Overlay, trigger: HTMLElement, panelClass?: string | string[]): {
|
|
397
|
+
positionStrategy: FlexibleConnectedPositionStrategy;
|
|
398
|
+
config: OverlayConfig;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* Close a DS overlay panel — instantly on a `'select'`, with a short fade on a
|
|
402
|
+
* `'dismiss'`. A fade after a deliberate pick reads as the panel lagging behind a
|
|
403
|
+
* decision already made; on a dismissal nothing was chosen, so the same fade reads
|
|
404
|
+
* as the panel backing out.
|
|
405
|
+
*
|
|
406
|
+
* NOTE: teardown paths dispose directly instead — a destroyed host has no time to
|
|
407
|
+
* animate, and `ModalService` owns its own scrim-and-card leave.
|
|
408
|
+
* @internal
|
|
409
|
+
*/
|
|
410
|
+
declare function disposeWithLeave(overlayRef: OverlayRef | null | undefined, cause?: DsOverlayCloseCause): void;
|
|
411
|
+
/**
|
|
412
|
+
* Forward a portaled panel's public `--ds-*` override tokens from the component
|
|
413
|
+
* host onto the overlay pane. The pane is portaled into `document.body`, outside
|
|
414
|
+
* `:host`, so custom properties a consumer sets via `ds-x { … }` never inherit
|
|
415
|
+
* down to it. Only non-empty values are set, so an unset token still falls
|
|
416
|
+
* through to the panel's own `var(--ds-*, <default>)`. Call once per open, right
|
|
417
|
+
* after `overlay.create()`.
|
|
418
|
+
* @internal
|
|
419
|
+
*/
|
|
420
|
+
declare function forwardOverlayTokens(overlayRef: OverlayRef, host: HTMLElement, tokens: readonly string[]): void;
|
|
421
|
+
/** Read a CDK connection pair as the panel's placement. `overlayY` is the panel
|
|
422
|
+
* edge pinned to the trigger, so `top` means the panel hangs BELOW the trigger.
|
|
423
|
+
* @internal
|
|
424
|
+
*/
|
|
425
|
+
declare function overlayPlacementOf(overlayY: string, overlayX: string): DsOverlayPlacement;
|
|
426
|
+
/**
|
|
427
|
+
* Prime a `ds-overlay-pane` for its enter animation. Call right after
|
|
428
|
+
* `overlay.create()` — CDK applies the position in `afterNextRender`, so the
|
|
429
|
+
* placement stamp still lands before the first painted frame. Until it does (or
|
|
430
|
+
* with no strategy passed) the CSS default applies: entering from above.
|
|
431
|
+
*
|
|
432
|
+
* The subscription needs no teardown — disposing the overlay disposes the
|
|
433
|
+
* strategy, which completes `positionChanges`.
|
|
434
|
+
* @internal
|
|
435
|
+
*/
|
|
436
|
+
declare function prepareOverlayEnter(overlayRef: OverlayRef, host: HTMLElement, positionStrategy?: FlexibleConnectedPositionStrategy): void;
|
|
437
|
+
/** Close a non-modal overlay on a pointer press outside it, EXCEPT when the press
|
|
438
|
+
* lands on its trigger — so the trigger stays interactive (caret, re-focus) while
|
|
439
|
+
* open. Use with `hasBackdrop: false` so hover/cursor/pointer reach the live page.
|
|
440
|
+
* @internal
|
|
441
|
+
*/
|
|
442
|
+
declare function closeOnOutsidePointer(overlayRef: OverlayRef, isInsideTrigger: (target: Node) => boolean, close: () => void): void;
|
|
443
|
+
/** Close a non-modal overlay when the page scrolls. CDK's scroll strategies only
|
|
444
|
+
* observe `window` + registered `cdkScrollable`s, so they miss a plain
|
|
445
|
+
* `overflow:auto` container (e.g. an app's scrolling `<main>`); this listens on
|
|
446
|
+
* the document in the CAPTURE phase, which catches the non-bubbling `scroll`
|
|
447
|
+
* event from ANY nested container. A scroll inside the panel itself is ignored.
|
|
448
|
+
* @internal
|
|
449
|
+
*/
|
|
450
|
+
declare function closeOnScroll(overlayRef: OverlayRef, close: () => void): () => void;
|
|
451
|
+
/** True when keyboard focus currently sits inside the overlay pane. Read it
|
|
452
|
+
* BEFORE disposing, to decide whether the close has to refocus the trigger
|
|
453
|
+
* rather than strand focus on `<body>`. An outside-pointer close leaves focus on
|
|
454
|
+
* the clicked element (mousedown moved it out of the pane first), so this
|
|
455
|
+
* returns false there and focus is correctly left alone.
|
|
456
|
+
* @internal
|
|
457
|
+
*/
|
|
458
|
+
declare function focusIsInside(overlayRef: OverlayRef): boolean;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Fills a strip below a picker panel's option list — a "create new" affordance
|
|
462
|
+
* of your own, a count, a link, an apply button for a panel the user batches
|
|
463
|
+
* choices in.
|
|
464
|
+
*
|
|
465
|
+
* Context: the same as the header slot — `count`, `total`, `query`.
|
|
466
|
+
*
|
|
467
|
+
* Like the header it sits OUTSIDE the `listbox` and does not scroll with the
|
|
468
|
+
* options. Anything focusable you put here is reached by Tab from the panel, so
|
|
469
|
+
* give it an accessible name.
|
|
470
|
+
*/
|
|
471
|
+
declare class DsPanelFooterTemplateDirective {
|
|
472
|
+
readonly template: TemplateRef<unknown>;
|
|
473
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsPanelFooterTemplateDirective, never>;
|
|
474
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsPanelFooterTemplateDirective, "[dsPanelFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Fills a strip above a picker panel's option list — "3 of 40 selected", a
|
|
479
|
+
* "clear all" button, a hint, a link to a fuller search.
|
|
480
|
+
*
|
|
481
|
+
* Context: `count` is how many options are visible after filtering, `total` how
|
|
482
|
+
* many were given, and `query` the text that narrowed them.
|
|
483
|
+
*
|
|
484
|
+
* It sits OUTSIDE the `listbox`, so whatever you put here is not counted as an
|
|
485
|
+
* option and does not break a screen reader's "N of M" position reporting. It
|
|
486
|
+
* also stays put while the list scrolls under it — the panel clips and the list
|
|
487
|
+
* is the scroller.
|
|
488
|
+
*/
|
|
489
|
+
declare class DsPanelHeaderTemplateDirective {
|
|
490
|
+
readonly template: TemplateRef<unknown>;
|
|
491
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsPanelHeaderTemplateDirective, never>;
|
|
492
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsPanelHeaderTemplateDirective, "[dsPanelHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Announces how many options survived the filter.
|
|
497
|
+
*
|
|
498
|
+
* Deliberately NOT a row inside the listbox. A live region there is an invalid
|
|
499
|
+
* child and, worse, a region created together with its text is the case screen
|
|
500
|
+
* readers reliably do not announce — there is no content CHANGE to fire on. The
|
|
501
|
+
* node here is created once, empty, and only its text changes.
|
|
502
|
+
*
|
|
503
|
+
* The text is English, which is the same debt every other library-invented string
|
|
504
|
+
* in this package carries (see the localization item in `docs/todo.md`). It is a
|
|
505
|
+
* count, so it is the cheapest of them to swap once a provider lands.
|
|
506
|
+
* @internal
|
|
507
|
+
*/
|
|
508
|
+
declare function announceOptionCount(count: Signal<number>, active: Signal<boolean>): void;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Replaces the CONTENTS of a picker's trigger — the chips, the value, the
|
|
512
|
+
* placeholder — with your own markup. The trigger ELEMENT stays library-owned,
|
|
513
|
+
* so `aria-haspopup`, `aria-expanded`, `aria-controls`, the roving
|
|
514
|
+
* `aria-activedescendant` and the Enter/Space/ArrowDown/Escape handling cannot
|
|
515
|
+
* be lost with it.
|
|
516
|
+
*
|
|
517
|
+
* ```html
|
|
518
|
+
* <ds-multi-select [options]="labels()" [(value)]="picked">
|
|
519
|
+
* <ng-template dsPickerTrigger let-count="count">
|
|
520
|
+
* Labels @if (count) { <ds-badge [count]="count" /> }
|
|
521
|
+
* </ng-template>
|
|
522
|
+
* </ds-multi-select>
|
|
523
|
+
* ```
|
|
524
|
+
*
|
|
525
|
+
* Context: `$implicit` and `selected` are the selected options, `count` their
|
|
526
|
+
* number, `open` whether the panel is showing, `disabled` the control's state.
|
|
527
|
+
*
|
|
528
|
+
* A projected template WINS over `triggerDisplay` — that input is then not read
|
|
529
|
+
* at all, so there is no "compact plus a template" combination to explain.
|
|
530
|
+
*/
|
|
531
|
+
declare class DsPickerTriggerDirective {
|
|
532
|
+
readonly template: TemplateRef<unknown>;
|
|
533
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsPickerTriggerDirective, never>;
|
|
534
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsPickerTriggerDirective, "[dsPickerTrigger]", never, {}, {}, never, never, true, never>;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Dev-only guard for a component that DROPS whatever is projected into it, so the
|
|
539
|
+
* author gets a warning instead of silence — there is no compile-time signal for
|
|
540
|
+
* content a component chooses to ignore. Put it on a probe around the
|
|
541
|
+
* `<ng-content>`, gated on dev mode so production renders no extra node:
|
|
542
|
+
*
|
|
543
|
+
* ```html
|
|
544
|
+
* @if (devMode) {
|
|
545
|
+
* <span dsProjectionDropped="ds-filter-bar"><ng-content></ng-content></span>
|
|
546
|
+
* }
|
|
547
|
+
* ```
|
|
548
|
+
*
|
|
549
|
+
* It is NOT projection support: the probe exists so the warning can see that
|
|
550
|
+
* content arrived, and then hides it.
|
|
551
|
+
*
|
|
552
|
+
* `ds-filter-bar` is the only host today.
|
|
553
|
+
*
|
|
554
|
+
* `reason` replaces the default `[label]` wording for a host that drops content
|
|
555
|
+
* for a different reason — `ds-filter-bar` drops anything that carries neither of
|
|
556
|
+
* its slot attributes.
|
|
557
|
+
* @internal
|
|
558
|
+
*/
|
|
559
|
+
declare class ProjectionDroppedDirective {
|
|
560
|
+
/** The host component's selector, named in the warning. */
|
|
561
|
+
readonly dsProjectionDropped: i0.InputSignal<string>;
|
|
562
|
+
/** Overrides the `[label]` explanation for a host that drops content for
|
|
563
|
+
* another reason. Ends up after "renders nothing — ". */
|
|
564
|
+
readonly reason: i0.InputSignal<string>;
|
|
565
|
+
private readonly probe;
|
|
566
|
+
constructor();
|
|
567
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProjectionDroppedDirective, never>;
|
|
568
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ProjectionDroppedDirective, "[dsProjectionDropped]", never, { "dsProjectionDropped": { "alias": "dsProjectionDropped"; "required": true; "isSignal": true; }; "reason": { "alias": "reason"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Keeps the keyboard cursor's row visible inside a scrolling panel.
|
|
573
|
+
*
|
|
574
|
+
* KEYBOARD ONLY, and that is the load-bearing part. The option rows also set the
|
|
575
|
+
* active index on `mouseenter`, so a version that reacted to every change pulled
|
|
576
|
+
* a partially visible row up under the pointer while the user was reading with
|
|
577
|
+
* the mouse.
|
|
578
|
+
*
|
|
579
|
+
* Rows are looked up by id rather than through a `viewChildren` query because they
|
|
580
|
+
* live in a portaled template — and the id is the one `aria-activedescendant`
|
|
581
|
+
* already points at, so a failed lookup means that reference is broken too.
|
|
582
|
+
* @internal
|
|
583
|
+
*/
|
|
584
|
+
declare function scrollActiveOptionIntoView(activeDescendantId: Signal<string | null>, enabled: Signal<boolean>, armed: Signal<boolean>): void;
|
|
585
|
+
|
|
586
|
+
/** Showcase-only: renders the component's open/overlay surface inline in normal
|
|
587
|
+
* flow instead of its real overlay mechanics (for static docs specimens).
|
|
588
|
+
* Not part of the production contract. */
|
|
589
|
+
declare class DsStaticPreview {
|
|
590
|
+
readonly staticPreview: i0.InputSignalWithTransform<boolean, unknown>;
|
|
591
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsStaticPreview, never>;
|
|
592
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DsStaticPreview, never, never, { "staticPreview": { "alias": "staticPreview"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
interface DsTypeAhead {
|
|
596
|
+
/** Feed it a keypress. Returns the index to move to, or -1 when the key is not
|
|
597
|
+
* a character or nothing matches. */
|
|
598
|
+
match: (key: string, labels: readonly string[], from: number) => number;
|
|
599
|
+
}
|
|
600
|
+
/** @internal */
|
|
601
|
+
declare function createTypeAhead(): DsTypeAhead;
|
|
602
|
+
|
|
603
|
+
export { DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, chipFit, closeOnOutsidePointer, closeOnScroll, createTypeAhead, disposeWithLeave, dropdownOverlay, focusIsInside, forwardOverlayTokens, nextControlId, overlayPlacementOf, prepareOverlayEnter, resolveBrandValue, resolveFieldMessage, scrollActiveOptionIntoView, trimmedText, valueControlBridge };
|
|
604
|
+
export type { DsFieldError, DsFieldErrorsInput, DsFieldMessage, DsOverlayCloseCause };
|