@ids-group-ltd/ids-design-system 0.14.3 → 0.14.5
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 +279 -0
- package/components.md +16 -16
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/column-series-component.md +1 -1
- package/docs/agent/charts/ds-bar-chart.md +1 -1
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +1 -1
- package/docs/agent/charts/ds-funnel-chart.md +1 -1
- package/docs/agent/charts/ds-heatmap-chart.md +1 -1
- package/docs/agent/charts/ds-line-chart.md +1 -1
- package/docs/agent/charts/ds-pie-chart.md +3 -3
- package/docs/agent/charts/ds-scatter-chart.md +1 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/charts/line-series-component.md +1 -1
- package/docs/agent/navigation/ds-breadcrumbs.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +58 -163
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +21 -34
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +34 -105
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +22 -48
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +6 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +28 -131
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +11 -29
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +10 -28
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +16 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +42 -69
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +15 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +6 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +3 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +12 -28
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +109 -105
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +190 -439
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +8 -22
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +28 -124
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +45 -116
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +4 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +7 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +7 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +16 -45
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +10 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +19 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +48 -164
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +29 -84
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +17 -25
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +21 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +3 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +55 -169
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +6 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +19 -36
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +30 -57
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +37 -103
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +5 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +9 -15
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +9 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +32 -121
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +14 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +15 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +9 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +64 -96
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +16 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +8 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +18 -52
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +30 -49
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +8 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +6 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +163 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +8 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +5 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +5 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +11 -23
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +7 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +9 -43
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +167 -353
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +33 -86
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +7 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +23 -47
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +21 -49
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +35 -63
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +38 -50
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +3 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +28 -82
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +325 -571
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +51 -85
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -21
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +4 -13
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +1 -2
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.14.4.json +231 -0
- package/migrations/0.14.5.json +311 -0
- package/package.json +9 -1
- package/schematics/check-overrides/surface.json +30 -2
- package/styles/_breakpoints.scss +6 -23
- package/styles/_chart-data-table.scss +3 -11
- package/styles/_chart-frame.scss +14 -65
- package/styles/_chart-interactive.scss +8 -36
- package/styles/_chart-motion.scss +11 -39
- package/styles/_check-box.scss +7 -26
- package/styles/_check-mark.scss +7 -23
- package/styles/_chip-row.scss +3 -14
- package/styles/_clear-button.scss +2 -7
- package/styles/_control-label.scss +2 -13
- package/styles/_control-line.scss +2 -6
- package/styles/_dropdown-overlay.scss +8 -33
- package/styles/_ds-color.scss +9 -28
- package/styles/_field-box.scss +4 -16
- package/styles/_field-group-segment.scss +6 -6
- package/styles/_field-label.scss +3 -14
- package/styles/_field-state.scss +5 -10
- package/styles/_focus.scss +20 -60
- package/styles/_icon-base.scss +0 -2
- package/styles/_layout-utils.scss +0 -3
- package/styles/_link.scss +4 -18
- package/styles/_overlay-motion.scss +15 -38
- package/styles/_page-grid.scss +4 -29
- package/styles/_press.scss +5 -18
- package/styles/_reset.scss +1 -14
- package/styles/_scrollbar.scss +0 -2
- package/styles/_skeleton-shimmer.scss +3 -14
- package/styles/_status.scss +5 -13
- package/styles/_surface-motion.scss +7 -34
- package/styles/_table-controls.scss +3 -6
- package/styles/_text-clip.scss +2 -6
- package/styles/_theme-activation.scss +7 -20
- package/styles/_toast-overlay.scss +8 -3
- package/styles/_tokens-charts.scss +31 -90
- package/styles/_tokens.scss +115 -154
- package/styles/_typography.scss +6 -13
- package/styles/_visually-hidden.scss +2 -3
- package/styles/ds.scss +2 -10
- package/themes/_base-palette.scss +12 -35
- package/themes/_semantic.scss +29 -98
- package/themes/dark/_palette.scss +15 -29
- package/themes/dark/_theme.scss +14 -32
- package/themes/light/_palette.scss +2 -17
- package/themes/light/_theme.scss +1 -7
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +2 -6
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +45 -119
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +19 -32
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +29 -92
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +23 -46
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +5 -5
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -8
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +27 -136
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +13 -32
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +6 -12
- package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +6 -9
- package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +36 -55
- package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +13 -18
- package/types/ids-group-ltd-ids-design-system-components-card.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +5 -11
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +10 -26
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +31 -49
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +165 -382
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +6 -10
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +5 -14
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +29 -125
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +23 -70
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +3 -7
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +1 -3
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +6 -8
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +17 -50
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +8 -12
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +13 -28
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +25 -113
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +19 -83
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +15 -23
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +18 -37
- package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +54 -163
- package/types/ids-group-ltd-ids-design-system-components-list.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +4 -9
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +13 -21
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +15 -28
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +27 -83
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +5 -6
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +5 -7
- package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +6 -10
- package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +8 -22
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +18 -102
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +7 -11
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +14 -25
- package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +7 -12
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +25 -94
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +12 -33
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +6 -7
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +12 -41
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +8 -15
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +23 -40
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +3 -5
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-sparkline.d.ts +58 -0
- package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +6 -7
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +2 -15
- package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +4 -6
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +5 -9
- package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +3 -7
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +4 -8
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +9 -43
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +160 -369
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +21 -49
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +5 -5
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +17 -34
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +17 -38
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +20 -37
- package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +2 -3
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +17 -36
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +21 -67
- package/types/ids-group-ltd-ids-design-system-components.d.ts +266 -410
- package/types/ids-group-ltd-ids-design-system-core.d.ts +134 -259
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +2 -24
- package/types/ids-group-ltd-ids-design-system-overlay.d.ts +4 -13
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -6
- package/types/ids-group-ltd-ids-design-system.d.ts +1 -0
|
@@ -5,40 +5,27 @@ import { DsMessageBase, nextControlId, resolveFieldMessage } from '@ids-group-lt
|
|
|
5
5
|
import { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Provided by `ds-field-group`, injected `{ optional: true }` by every control
|
|
9
|
-
* that can be a segment.
|
|
8
|
+
* Provided by `ds-field-group`, injected `{ optional: true }` by every control that can be a segment.
|
|
10
9
|
*
|
|
11
|
-
* DI rather than
|
|
12
|
-
* and one segment where it was forgotten renders its own border and radius in
|
|
13
|
-
* the middle of a glued row — a broken control that still looks deliberate.
|
|
14
|
-
* Presence of the token IS the fact the child needs, and the consumer already
|
|
15
|
-
* declared it by wrapping them.
|
|
10
|
+
* DI rather than an input on each child: a segment with a forgotten input would render its own border mid-row.
|
|
16
11
|
*/
|
|
17
12
|
const DS_FIELD_GROUP = new InjectionToken('DS_FIELD_GROUP');
|
|
18
13
|
/**
|
|
19
|
-
* Whether this control is a segment of a `ds-field-group
|
|
20
|
-
* component and bind the result to a host `.in-group` class; the component's own
|
|
21
|
-
* `.in-group` block then strips the chrome the group has taken over.
|
|
22
|
-
*
|
|
23
|
-
* A function so the six supported controls share one line instead of six copies
|
|
24
|
-
* of the same optional inject — and so the contract has one place to change.
|
|
14
|
+
* Whether this control is a segment of a `ds-field-group`; bind it to a host `.in-group` class.
|
|
25
15
|
* @internal
|
|
26
16
|
*/
|
|
27
17
|
function inFieldGroup() {
|
|
28
18
|
return !!inject(DS_FIELD_GROUP, { optional: true });
|
|
29
19
|
}
|
|
30
20
|
/**
|
|
31
|
-
* The enclosing group, or `null`.
|
|
32
|
-
* group's error state and the id of its message.
|
|
21
|
+
* The enclosing group, or `null`. For where the boolean is not enough: the group's error state and message id.
|
|
33
22
|
* @internal
|
|
34
23
|
*/
|
|
35
24
|
function fieldGroupContext() {
|
|
36
25
|
return inject(DS_FIELD_GROUP, { optional: true });
|
|
37
26
|
}
|
|
38
27
|
/**
|
|
39
|
-
* A segment's own error state, ORed with the enclosing group's.
|
|
40
|
-
* every segment announces it: a reader who tabs straight to the second one has to hear it too,
|
|
41
|
-
* and the group's border is not something a screen reader can see.
|
|
28
|
+
* A segment's own error state, ORed with the enclosing group's.
|
|
42
29
|
* @internal
|
|
43
30
|
*/
|
|
44
31
|
function groupInvalid(own) {
|
|
@@ -46,8 +33,7 @@ function groupInvalid(own) {
|
|
|
46
33
|
return computed(() => own() || (group?.invalidResolved() ?? false));
|
|
47
34
|
}
|
|
48
35
|
/**
|
|
49
|
-
* The id of the enclosing group's message, for a segment's `aria-describedby
|
|
50
|
-
* describing every control it covers.
|
|
36
|
+
* The id of the enclosing group's message, for a segment's `aria-describedby`.
|
|
51
37
|
* @internal
|
|
52
38
|
*/
|
|
53
39
|
function groupMessageId() {
|
|
@@ -61,12 +47,10 @@ function describedByIds(...ids) {
|
|
|
61
47
|
}
|
|
62
48
|
|
|
63
49
|
/**
|
|
64
|
-
* One bordered control out of several: `select + input`, `search + button`,
|
|
65
|
-
*
|
|
66
|
-
* the divider between segments; the controls inside render "naked".
|
|
50
|
+
* One bordered control out of several: `select + input`, `search + button`, `button + select`. The group owns the border, radius,
|
|
51
|
+
* focus ring and segment dividers; the controls inside render "naked".
|
|
67
52
|
*
|
|
68
|
-
* Segments are the direct children. Each hugs its content by default; mark the
|
|
69
|
-
* one that should take the slack with `grow`:
|
|
53
|
+
* Segments are the direct children. Each hugs its content by default; mark the one that should take the slack with `grow`:
|
|
70
54
|
*
|
|
71
55
|
* ```html
|
|
72
56
|
* <ds-field-group error="Введите сумму больше нуля">
|
|
@@ -75,33 +59,20 @@ function describedByIds(...ids) {
|
|
|
75
59
|
* </ds-field-group>
|
|
76
60
|
* ```
|
|
77
61
|
*
|
|
78
|
-
* A control knows it is a segment by injecting `DS_FIELD_GROUP
|
|
79
|
-
*
|
|
80
|
-
* suppressed: they would break the glued line, which is why the group carries
|
|
81
|
-
* the pair every field has — `error` for state WITH text, `invalid` for state
|
|
82
|
-
* whose text lives elsewhere.
|
|
62
|
+
* A control knows it is a segment by injecting `DS_FIELD_GROUP`. A segment's own label and message stay suppressed; the group
|
|
63
|
+
* carries them: `error` for state with text, `invalid` for state whose text lives elsewhere.
|
|
83
64
|
*/
|
|
84
65
|
class FieldGroupComponent extends DsMessageBase {
|
|
85
|
-
/** Segment height
|
|
86
|
-
* plain field beside it.
|
|
87
|
-
* Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */
|
|
66
|
+
/** Segment height; falls back to `DS_CONFIG.control.size`, then `'md'`. */
|
|
88
67
|
size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
89
68
|
sizeResolved = resolveWithConfig(this.size, (config) => config.control?.size, 'md');
|
|
90
|
-
/** Paints the error state
|
|
91
|
-
* lives in a form-level summary. Use `error` to show text; binding either one
|
|
92
|
-
* is enough, exactly as on a field.
|
|
93
|
-
*
|
|
94
|
-
* Segments read `invalidResolved`, not this, so an `error` string announces
|
|
95
|
-
* itself without the flag beside it. */
|
|
69
|
+
/** Paints the error state without a message, for when the text lives elsewhere. Use `error` to show text; either one is enough. */
|
|
96
70
|
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
97
|
-
/** Dims the group
|
|
98
|
-
* interactivity. */
|
|
71
|
+
/** Dims the group's chrome; disable the controls too. */
|
|
99
72
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
100
73
|
/** Fills the container instead of hugging its segments. */
|
|
101
74
|
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
102
75
|
uid = nextControlId('ds-field-group');
|
|
103
|
-
// No `errors`/`touched` here: a group has no form control of its own, so its
|
|
104
|
-
// state is only ever what the consumer bound.
|
|
105
76
|
fieldMessage = resolveFieldMessage({
|
|
106
77
|
hint: this.hint,
|
|
107
78
|
warning: this.warning,
|
|
@@ -118,7 +89,7 @@ class FieldGroupComponent extends DsMessageBase {
|
|
|
118
89
|
provide: DS_FIELD_GROUP,
|
|
119
90
|
useExisting: forwardRef(() => FieldGroupComponent),
|
|
120
91
|
},
|
|
121
|
-
], usesInheritance: true, ngImport: i0, template: "<!--
|
|
92
|
+
], usesInheritance: true, ngImport: i0, template: "<!-- Border, radius and focus ring live on `.row`, not the host: the message must sit OUTSIDE the bordered box, and the host stacks the two. -->\n<div class=\"row\">\n <ng-content></ng-content>\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"messageId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: [":host{--_field-group-bg-color: var(--ds-field-group-bg-color, var(--surface-default));--_field-group-border-color: var(--ds-field-group-border-color, var(--border-default));--_field-group-border-color-focus: var(--ds-field-group-border-color-focus, var(--accent));--_field-group-border-color-error: var(--ds-field-group-border-color-error, var(--error));--_field-group-radius: var(--ds-field-group-radius, var(--ds-radius-control));--_field-group-focus-shadow: var(--ds-field-group-focus-shadow, var(--ds-field-focus-shadow));--_field-group-focus-shadow-error: var(--ds-field-group-focus-shadow-error, var(--ds-field-focus-shadow-error));--_field-group-divider-color: var(--ds-field-group-divider-color, var(--border-divider));display:inline-flex;flex-direction:column;width:fit-content;max-width:100%}:host(.full-width){display:flex;width:100%}.row{display:flex;align-items:stretch;background-color:var(--_field-group-bg-color);border:var(--border-width-default) solid var(--_field-group-border-color);border-radius:var(--_field-group-radius);overflow:hidden;transition:border-color var(--duration-fast) var(--ease-standard);--_field-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-height)}:host(.sm) .row{--_field-height: var(--ds-field-height, var(--field-h-sm));height:var(--_field-height)}:host(.lg) .row{--_field-height: var(--ds-field-height, var(--field-h-lg));height:var(--_field-height)}:host(:not(.disabled,.invalid)) .row:hover{border-color:var(--border-strong)}:host(:not(.disabled,.invalid)) .row:focus-within{border-color:var(--_field-group-border-color-focus);box-shadow:var(--_field-group-focus-shadow)}:host(.invalid:not(.disabled)) .row{border-color:var(--_field-group-border-color-error)}:host(.invalid:not(.disabled)) .row:focus-within{box-shadow:var(--_field-group-focus-shadow-error)}:host(.disabled) .row{background-color:var(--surface-disabled);border-color:var(--border-disabled)}.row ::ng-deep>*{flex:0 0 auto;min-width:0}.row ::ng-deep>[grow]{flex:1 1 0;min-width:0}.row ::ng-deep>*+*{border-left:var(--border-width-default) solid var(--_field-group-divider-color)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
122
93
|
}
|
|
123
94
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FieldGroupComponent, decorators: [{
|
|
124
95
|
type: Component,
|
|
@@ -133,7 +104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
133
104
|
provide: DS_FIELD_GROUP,
|
|
134
105
|
useExisting: forwardRef(() => FieldGroupComponent),
|
|
135
106
|
},
|
|
136
|
-
], template: "<!--
|
|
107
|
+
], template: "<!-- Border, radius and focus ring live on `.row`, not the host: the message must sit OUTSIDE the bordered box, and the host stacks the two. -->\n<div class=\"row\">\n <ng-content></ng-content>\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"messageId()\"\n [reserve]=\"reserveMessageResolved()\" />\n", styles: [":host{--_field-group-bg-color: var(--ds-field-group-bg-color, var(--surface-default));--_field-group-border-color: var(--ds-field-group-border-color, var(--border-default));--_field-group-border-color-focus: var(--ds-field-group-border-color-focus, var(--accent));--_field-group-border-color-error: var(--ds-field-group-border-color-error, var(--error));--_field-group-radius: var(--ds-field-group-radius, var(--ds-radius-control));--_field-group-focus-shadow: var(--ds-field-group-focus-shadow, var(--ds-field-focus-shadow));--_field-group-focus-shadow-error: var(--ds-field-group-focus-shadow-error, var(--ds-field-focus-shadow-error));--_field-group-divider-color: var(--ds-field-group-divider-color, var(--border-divider));display:inline-flex;flex-direction:column;width:fit-content;max-width:100%}:host(.full-width){display:flex;width:100%}.row{display:flex;align-items:stretch;background-color:var(--_field-group-bg-color);border:var(--border-width-default) solid var(--_field-group-border-color);border-radius:var(--_field-group-radius);overflow:hidden;transition:border-color var(--duration-fast) var(--ease-standard);--_field-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-height)}:host(.sm) .row{--_field-height: var(--ds-field-height, var(--field-h-sm));height:var(--_field-height)}:host(.lg) .row{--_field-height: var(--ds-field-height, var(--field-h-lg));height:var(--_field-height)}:host(:not(.disabled,.invalid)) .row:hover{border-color:var(--border-strong)}:host(:not(.disabled,.invalid)) .row:focus-within{border-color:var(--_field-group-border-color-focus);box-shadow:var(--_field-group-focus-shadow)}:host(.invalid:not(.disabled)) .row{border-color:var(--_field-group-border-color-error)}:host(.invalid:not(.disabled)) .row:focus-within{box-shadow:var(--_field-group-focus-shadow-error)}:host(.disabled) .row{background-color:var(--surface-disabled);border-color:var(--border-disabled)}.row ::ng-deep>*{flex:0 0 auto;min-width:0}.row ::ng-deep>[grow]{flex:1 1 0;min-width:0}.row ::ng-deep>*+*{border-left:var(--border-width-default) solid var(--_field-group-divider-color)}\n"] }]
|
|
137
108
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] } });
|
|
138
109
|
|
|
139
110
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-field-group.mjs","sources":["../../../src/lib/components/field-group/field-group.token.ts","../../../src/lib/components/field-group/field-group.component.ts","../../../src/lib/components/field-group/field-group.component.html","../../../src/lib/components/field-group/ids-group-ltd-ids-design-system-components-field-group.ts"],"sourcesContent":["import { InjectionToken, computed, inject, type Signal } from '@angular/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\n\n/** What a grouped control can read off the group that encloses it. */\nexport interface DsFieldGroupContext {\n /** The group's size, so a segment matches its neighbours without being told.\n * Resolved, not the raw input: `size` is unset by default and falls back to\n * `DS_CONFIG.control.size`, which a segment must not have to resolve again. */\n readonly sizeResolved: () => DsSize;\n /** Whether the GROUP is in error — RESOLVED, so an `error` string counts and not only the\n * `invalid` flag. A segment ORs it into its own state, so focusing any of them announces the\n * error: the pair is invalid, and a reader who tabs to the second segment must hear it too.\n * Named for the resolved value so it cannot be confused with the group's raw `invalid` input. */\n readonly invalidResolved: () => boolean;\n /** A segment adds this to its `aria-describedby`, which is what connects the\n * group's one sentence to every control it describes. */\n readonly messageId: () => string | null;\n}\n\n/**\n * Provided by `ds-field-group`, injected `{ optional: true }` by every control\n * that can be a segment.\n *\n * DI rather than a `[grouped]` input on each child: the alternative is manual,\n * and one segment where it was forgotten renders its own border and radius in\n * the middle of a glued row — a broken control that still looks deliberate.\n * Presence of the token IS the fact the child needs, and the consumer already\n * declared it by wrapping them.\n */\nexport const DS_FIELD_GROUP = new InjectionToken<DsFieldGroupContext>(\n 'DS_FIELD_GROUP',\n);\n\n/**\n * Whether this control is a segment of a `ds-field-group`. Call it in a field\n * component and bind the result to a host `.in-group` class; the component's own\n * `.in-group` block then strips the chrome the group has taken over.\n *\n * A function so the six supported controls share one line instead of six copies\n * of the same optional inject — and so the contract has one place to change.\n * @internal\n */\nexport function inFieldGroup(): boolean {\n return !!inject(DS_FIELD_GROUP, { optional: true });\n}\n\n/**\n * The enclosing group, or `null`. Use it where the boolean is not enough — the\n * group's error state and the id of its message.\n * @internal\n */\nexport function fieldGroupContext(): DsFieldGroupContext | null {\n return inject(DS_FIELD_GROUP, { optional: true });\n}\n\n/**\n * A segment's own error state, ORed with the enclosing group's. The pair is what is invalid, so\n * every segment announces it: a reader who tabs straight to the second one has to hear it too,\n * and the group's border is not something a screen reader can see.\n * @internal\n */\nexport function groupInvalid(own: Signal<boolean>): Signal<boolean> {\n const group = fieldGroupContext();\n\n return computed(() => own() || (group?.invalidResolved() ?? false));\n}\n\n/**\n * The id of the enclosing group's message, for a segment's `aria-describedby` — one sentence\n * describing every control it covers.\n * @internal\n */\nexport function groupMessageId(): Signal<string | null> {\n const group = fieldGroupContext();\n\n return computed(() => group?.messageId() ?? null);\n}\n\n/** @internal */\nexport function describedByIds(\n ...ids: readonly (string | null | undefined)[]\n): string | null {\n const present = ids.filter(Boolean);\n\n return present.length ? present.join(' ') : null;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n} from '@angular/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { DS_FIELD_GROUP, type DsFieldGroupContext } from './field-group.token';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n nextControlId,\n resolveFieldMessage,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\n\n/**\n * One bordered control out of several: `select + input`, `search + button`,\n * `button + select`. The group owns the border, the radius, the focus ring and\n * the divider between segments; the controls inside render \"naked\".\n *\n * Segments are the direct children. Each hugs its content by default; mark the\n * one that should take the slack with `grow`:\n *\n * ```html\n * <ds-field-group error=\"Введите сумму больше нуля\">\n * <ds-select [options]=\"currencies\" />\n * <ds-input grow [(value)]=\"amount\" />\n * </ds-field-group>\n * ```\n *\n * A control knows it is a segment by injecting `DS_FIELD_GROUP` — see the token\n * for why that is DI and not an input. A segment's own label and message stay\n * suppressed: they would break the glued line, which is why the group carries\n * the pair every field has — `error` for state WITH text, `invalid` for state\n * whose text lives elsewhere.\n */\n@Component({\n selector: 'ds-field-group',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './field-group.component.html',\n styleUrl: './field-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'group',\n '[class]': 'sizeResolved()',\n '[class.invalid]': 'invalidResolved()',\n '[class.disabled]': 'disabled()',\n '[class.full-width]': 'fullWidth()',\n },\n providers: [\n {\n provide: DS_FIELD_GROUP,\n useExisting: forwardRef(() => FieldGroupComponent),\n },\n ],\n})\nexport class FieldGroupComponent\n extends DsMessageBase\n implements DsFieldGroupContext\n{\n /** Segment height — the field family's scale, so a group lines up with a\n * plain field beside it.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Paints the error state WITHOUT a message of its own — for when the text\n * lives in a form-level summary. Use `error` to show text; binding either one\n * is enough, exactly as on a field.\n *\n * Segments read `invalidResolved`, not this, so an `error` string announces\n * itself without the flag beside it. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Dims the group. Disable the CONTROLS too — this is the chrome, not their\n * interactivity. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Fills the container instead of hugging its segments. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n private readonly uid = nextControlId('ds-field-group');\n // No `errors`/`touched` here: a group has no form control of its own, so its\n // state is only ever what the consumer bound.\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: computed(() => []),\n invalid: this.invalid,\n });\n protected readonly message = this.fieldMessage.message;\n readonly invalidResolved = this.fieldMessage.invalid;\n readonly messageId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n}\n","<!-- The border, radius and focus ring live on `.row`, not on the host: the message has to sit\n OUTSIDE the bordered box, and the host is what stacks the two. -->\n<div class=\"row\">\n <ng-content></ng-content>\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"messageId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAmBA;;;;;;;;;AASG;MACU,cAAc,GAAG,IAAI,cAAc,CAC9C,gBAAgB;AAGlB;;;;;;;;AAQG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrD;AAEA;;;;AAIG;SACa,iBAAiB,GAAA;IAC/B,OAAO,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACnD;AAEA;;;;;AAKG;AACG,SAAU,YAAY,CAAC,GAAoB,EAAA;AAC/C,IAAA,MAAM,KAAK,GAAG,iBAAiB,EAAE;AAEjC,IAAA,OAAO,QAAQ,CAAC,MAAM,GAAG,EAAE,KAAK,KAAK,EAAE,eAAe,EAAE,IAAI,KAAK,CAAC,CAAC;AACrE;AAEA;;;;AAIG;SACa,cAAc,GAAA;AAC5B,IAAA,MAAM,KAAK,GAAG,iBAAiB,EAAE;AAEjC,IAAA,OAAO,QAAQ,CAAC,MAAM,KAAK,EAAE,SAAS,EAAE,IAAI,IAAI,CAAC;AACnD;AAEA;AACM,SAAU,cAAc,CAC5B,GAAG,GAA2C,EAAA;IAE9C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;AAEnC,IAAA,OAAO,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI;AAClD;;AClEA;;;;;;;;;;;;;;;;;;;;AAoBG;AAuBG,MAAO,mBACX,SAAQ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AAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAmBpB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAtB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAGjB,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;AAC3B,wBAAA,iBAAiB,EAAE,mBAAmB;AACtC,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,oBAAoB,EAAE,aAAa;qBACpC,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,cAAc;AACvB,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AACnD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,8ZAAA,EAAA,MAAA,EAAA,CAAA,0lEAAA,CAAA,EAAA;;;AE5DH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-field-group.mjs","sources":["../../../src/lib/components/field-group/field-group.token.ts","../../../src/lib/components/field-group/field-group.component.ts","../../../src/lib/components/field-group/field-group.component.html","../../../src/lib/components/field-group/ids-group-ltd-ids-design-system-components-field-group.ts"],"sourcesContent":["import { InjectionToken, computed, inject, type Signal } from '@angular/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\n\n/** What a grouped control can read off the group that encloses it. */\nexport interface DsFieldGroupContext {\n /** The group's size, already resolved against `DS_CONFIG.control.size`. */\n readonly sizeResolved: () => DsSize;\n /** Whether the group is in error, counting an `error` string as well as the `invalid` flag. */\n readonly invalidResolved: () => boolean;\n /** Id a segment adds to its `aria-describedby`. */\n readonly messageId: () => string | null;\n}\n\n/**\n * Provided by `ds-field-group`, injected `{ optional: true }` by every control that can be a segment.\n *\n * DI rather than an input on each child: a segment with a forgotten input would render its own border mid-row.\n */\nexport const DS_FIELD_GROUP = new InjectionToken<DsFieldGroupContext>(\n 'DS_FIELD_GROUP',\n);\n\n/**\n * Whether this control is a segment of a `ds-field-group`; bind it to a host `.in-group` class.\n * @internal\n */\nexport function inFieldGroup(): boolean {\n return !!inject(DS_FIELD_GROUP, { optional: true });\n}\n\n/**\n * The enclosing group, or `null`. For where the boolean is not enough: the group's error state and message id.\n * @internal\n */\nexport function fieldGroupContext(): DsFieldGroupContext | null {\n return inject(DS_FIELD_GROUP, { optional: true });\n}\n\n/**\n * A segment's own error state, ORed with the enclosing group's.\n * @internal\n */\nexport function groupInvalid(own: Signal<boolean>): Signal<boolean> {\n const group = fieldGroupContext();\n\n return computed(() => own() || (group?.invalidResolved() ?? false));\n}\n\n/**\n * The id of the enclosing group's message, for a segment's `aria-describedby`.\n * @internal\n */\nexport function groupMessageId(): Signal<string | null> {\n const group = fieldGroupContext();\n\n return computed(() => group?.messageId() ?? null);\n}\n\n/** @internal */\nexport function describedByIds(\n ...ids: readonly (string | null | undefined)[]\n): string | null {\n const present = ids.filter(Boolean);\n\n return present.length ? present.join(' ') : null;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n} from '@angular/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { DS_FIELD_GROUP, type DsFieldGroupContext } from './field-group.token';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n nextControlId,\n resolveFieldMessage,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\n\n/**\n * One bordered control out of several: `select + input`, `search + button`, `button + select`. The group owns the border, radius,\n * focus ring and segment dividers; the controls inside render \"naked\".\n *\n * Segments are the direct children. Each hugs its content by default; mark the one that should take the slack with `grow`:\n *\n * ```html\n * <ds-field-group error=\"Введите сумму больше нуля\">\n * <ds-select [options]=\"currencies\" />\n * <ds-input grow [(value)]=\"amount\" />\n * </ds-field-group>\n * ```\n *\n * A control knows it is a segment by injecting `DS_FIELD_GROUP`. A segment's own label and message stay suppressed; the group\n * carries them: `error` for state with text, `invalid` for state whose text lives elsewhere.\n */\n@Component({\n selector: 'ds-field-group',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './field-group.component.html',\n styleUrl: './field-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'group',\n '[class]': 'sizeResolved()',\n '[class.invalid]': 'invalidResolved()',\n '[class.disabled]': 'disabled()',\n '[class.full-width]': 'fullWidth()',\n },\n providers: [\n {\n provide: DS_FIELD_GROUP,\n useExisting: forwardRef(() => FieldGroupComponent),\n },\n ],\n})\nexport class FieldGroupComponent\n extends DsMessageBase\n implements DsFieldGroupContext\n{\n /** Segment height; falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Paints the error state without a message, for when the text lives elsewhere. Use `error` to show text; either one is enough. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Dims the group's chrome; disable the controls too. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Fills the container instead of hugging its segments. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n private readonly uid = nextControlId('ds-field-group');\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: computed(() => []),\n invalid: this.invalid,\n });\n protected readonly message = this.fieldMessage.message;\n readonly invalidResolved = this.fieldMessage.invalid;\n readonly messageId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n}\n","<!-- Border, radius and focus ring live on `.row`, not the host: the message must sit OUTSIDE the bordered box, and the host stacks the two. -->\n<div class=\"row\">\n <ng-content></ng-content>\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"messageId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaA;;;;AAIG;MACU,cAAc,GAAG,IAAI,cAAc,CAC9C,gBAAgB;AAGlB;;;AAGG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrD;AAEA;;;AAGG;SACa,iBAAiB,GAAA;IAC/B,OAAO,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACnD;AAEA;;;AAGG;AACG,SAAU,YAAY,CAAC,GAAoB,EAAA;AAC/C,IAAA,MAAM,KAAK,GAAG,iBAAiB,EAAE;AAEjC,IAAA,OAAO,QAAQ,CAAC,MAAM,GAAG,EAAE,KAAK,KAAK,EAAE,eAAe,EAAE,IAAI,KAAK,CAAC,CAAC;AACrE;AAEA;;;AAGG;SACa,cAAc,GAAA;AAC5B,IAAA,MAAM,KAAK,GAAG,iBAAiB,EAAE;AAEjC,IAAA,OAAO,QAAQ,CAAC,MAAM,KAAK,EAAE,SAAS,EAAE,IAAI,IAAI,CAAC;AACnD;AAEA;AACM,SAAU,cAAc,CAC5B,GAAG,GAA2C,EAAA;IAE9C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;AAEnC,IAAA,OAAO,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAA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,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAmBpB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAtB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAGjB,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;AAC3B,wBAAA,iBAAiB,EAAE,mBAAmB;AACtC,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,oBAAoB,EAAE,aAAa;qBACpC,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,cAAc;AACvB,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AACnD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,uYAAA,EAAA,MAAA,EAAA,CAAA,ukEAAA,CAAA,EAAA;;;AEvDH;;AAEG;;;;"}
|
|
@@ -3,29 +3,25 @@ import { input, booleanAttribute, inject, computed, ViewEncapsulation, Component
|
|
|
3
3
|
import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
|
|
4
4
|
import { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* and passes `messageId`; this only renders the element that carries it.
|
|
6
|
+
/** Helper/error line for form fields. Renders nothing when `text` is empty. The host field owns
|
|
7
|
+
* the `aria-describedby` relationship and passes `messageId`.
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
10
|
class FieldMessageComponent {
|
|
12
11
|
/** The one line under a field. Empty renders nothing (or reserved space, if the field asks). */
|
|
13
12
|
text = input('', ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
14
|
-
/**
|
|
13
|
+
/** Hint, error, warning or success; decides the colour. */
|
|
15
14
|
state = input('default', ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
16
|
-
/** Id the field
|
|
15
|
+
/** Id the field's `aria-describedby` points at. */
|
|
17
16
|
messageId = input(null, ...(ngDevMode ? [{ debugName: "messageId" }] : /* istanbul ignore next */ []));
|
|
18
|
-
/** Leading glyph. Unset resolves from the state
|
|
19
|
-
*
|
|
20
|
-
* the hint line does not. A name here overrides that for this message; `false`
|
|
17
|
+
/** Leading glyph. Unset resolves from the state via `DS_CONFIG.field.stateIcons` (error,
|
|
18
|
+
* warning and success carry one by default, hint does not). A name overrides it; `false`
|
|
21
19
|
* removes it. */
|
|
22
20
|
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
23
|
-
/**
|
|
24
|
-
* gains/loses a message doesn't shift the layout below it. */
|
|
21
|
+
/** Reserves one line of height with no `text`, so the layout below does not shift. */
|
|
25
22
|
reserve = input(false, { ...(ngDevMode ? { debugName: "reserve" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
26
23
|
config = inject(DS_CONFIG);
|
|
27
|
-
/** `hint`
|
|
28
|
-
* and `default` would read as "the default icon". */
|
|
24
|
+
/** Keyed `hint` in the config, not `default`, which would read as "the default icon". */
|
|
29
25
|
static BUILT_IN = {
|
|
30
26
|
error: 'error',
|
|
31
27
|
warning: 'warn',
|
|
@@ -47,11 +43,11 @@ class FieldMessageComponent {
|
|
|
47
43
|
return resolved === false ? null : resolved;
|
|
48
44
|
}, ...(ngDevMode ? [{ debugName: "iconResolved" }] : /* istanbul ignore next */ []));
|
|
49
45
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FieldMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: FieldMessageComponent, isStandalone: true, selector: "ds-field-message", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, messageId: { classPropertyName: "messageId", publicName: "messageId", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, reserve: { classPropertyName: "reserve", publicName: "reserve", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!--
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: FieldMessageComponent, isStandalone: true, selector: "ds-field-message", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, messageId: { classPropertyName: "messageId", publicName: "messageId", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, reserve: { classPropertyName: "reserve", publicName: "reserve", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- Error is a separate branch so it mounts as a fresh node with role=\"alert\" already set; screen\n readers announce a live region on insertion, not when the role is toggled onto an existing node. -->\n@if (text()) {\n @if (state() === 'error') {\n <span\n class=\"field-message error\"\n role=\"alert\"\n [id]=\"messageId()\">\n @if (iconResolved(); as glyph) {\n <ds-icon\n class=\"message-icon\"\n [name]=\"glyph\"\n [size]=\"14\" />\n }\n {{ text() }}\n </span>\n } @else {\n <span\n class=\"field-message {{ state() }}\"\n [id]=\"messageId()\">\n @if (iconResolved(); as glyph) {\n <ds-icon\n class=\"message-icon\"\n [name]=\"glyph\"\n [size]=\"14\" />\n }\n {{ text() }}\n </span>\n }\n} @else if (reserve()) {\n <span\n class=\"field-message reserve-placeholder\"\n aria-hidden=\"true\">\n </span>\n}\n", styles: ["@charset \"UTF-8\";:host{display:contents}.field-message{--_field-message-color: var(--ds-field-message-color, var(--text-tertiary));--_field-message-font-size: var(--ds-field-message-font-size, var(--font-size-xs));--_field-message-icon-gap: var(--ds-field-message-icon-gap, var(--space-1));--_field-message-icon-offset: var(--ds-field-message-icon-offset, calc((var(--_field-message-font-size) * var(--line-height-base) - var(--icon-sm)) / 2));display:flex;align-items:flex-start;gap:var(--_field-message-icon-gap);font:var(--font-weight-regular) var(--_field-message-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-message-color)}.field-message .message-icon{margin-top:var(--_field-message-icon-offset)}.field-message.error{color:var(--error-text)}.field-message.warning{color:var(--warning-text)}.field-message.success{color:var(--success-text)}.field-message.reserve-placeholder:before{content:\"\\a0\"}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
51
47
|
}
|
|
52
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FieldMessageComponent, decorators: [{
|
|
53
49
|
type: Component,
|
|
54
|
-
args: [{ selector: 'ds-field-message', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<!--
|
|
50
|
+
args: [{ selector: 'ds-field-message', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<!-- Error is a separate branch so it mounts as a fresh node with role=\"alert\" already set; screen\n readers announce a live region on insertion, not when the role is toggled onto an existing node. -->\n@if (text()) {\n @if (state() === 'error') {\n <span\n class=\"field-message error\"\n role=\"alert\"\n [id]=\"messageId()\">\n @if (iconResolved(); as glyph) {\n <ds-icon\n class=\"message-icon\"\n [name]=\"glyph\"\n [size]=\"14\" />\n }\n {{ text() }}\n </span>\n } @else {\n <span\n class=\"field-message {{ state() }}\"\n [id]=\"messageId()\">\n @if (iconResolved(); as glyph) {\n <ds-icon\n class=\"message-icon\"\n [name]=\"glyph\"\n [size]=\"14\" />\n }\n {{ text() }}\n </span>\n }\n} @else if (reserve()) {\n <span\n class=\"field-message reserve-placeholder\"\n aria-hidden=\"true\">\n </span>\n}\n", styles: ["@charset \"UTF-8\";:host{display:contents}.field-message{--_field-message-color: var(--ds-field-message-color, var(--text-tertiary));--_field-message-font-size: var(--ds-field-message-font-size, var(--font-size-xs));--_field-message-icon-gap: var(--ds-field-message-icon-gap, var(--space-1));--_field-message-icon-offset: var(--ds-field-message-icon-offset, calc((var(--_field-message-font-size) * var(--line-height-base) - var(--icon-sm)) / 2));display:flex;align-items:flex-start;gap:var(--_field-message-icon-gap);font:var(--font-weight-regular) var(--_field-message-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-message-color)}.field-message .message-icon{margin-top:var(--_field-message-icon-offset)}.field-message.error{color:var(--error-text)}.field-message.warning{color:var(--warning-text)}.field-message.success{color:var(--success-text)}.field-message.reserve-placeholder:before{content:\"\\a0\"}\n"] }]
|
|
55
51
|
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], messageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "messageId", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], reserve: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserve", required: false }] }] } });
|
|
56
52
|
|
|
57
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-field-message.mjs","sources":["../../../src/lib/components/field-message/field-message.component.ts","../../../src/lib/components/field-message/field-message.component.html","../../../src/lib/components/field-message/ids-group-ltd-ids-design-system-components-field-message.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/** @internal */\nexport type FieldMessageState = 'default' | 'error' | 'warning' | 'success';\n\n/**
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-field-message.mjs","sources":["../../../src/lib/components/field-message/field-message.component.ts","../../../src/lib/components/field-message/field-message.component.html","../../../src/lib/components/field-message/ids-group-ltd-ids-design-system-components-field-message.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/** @internal */\nexport type FieldMessageState = 'default' | 'error' | 'warning' | 'success';\n\n/** Helper/error line for form fields. Renders nothing when `text` is empty. The host field owns\n * the `aria-describedby` relationship and passes `messageId`.\n * @internal\n */\n@Component({\n selector: 'ds-field-message',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './field-message.component.html',\n styleUrl: './field-message.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class FieldMessageComponent {\n /** The one line under a field. Empty renders nothing (or reserved space, if the field asks). */\n readonly text = input<string>('');\n /** Hint, error, warning or success; decides the colour. */\n readonly state = input<FieldMessageState>('default');\n /** Id the field's `aria-describedby` points at. */\n readonly messageId = input<string | null>(null);\n /** Leading glyph. Unset resolves from the state via `DS_CONFIG.field.stateIcons` (error,\n * warning and success carry one by default, hint does not). A name overrides it; `false`\n * removes it. */\n readonly icon = input<IconName | false | null>(null);\n /** Reserves one line of height with no `text`, so the layout below does not shift. */\n readonly reserve = input(false, { transform: booleanAttribute });\n\n private readonly config = inject(DS_CONFIG);\n\n /** Keyed `hint` in the config, not `default`, which would read as \"the default icon\". */\n private static readonly BUILT_IN: Record<\n FieldMessageState,\n IconName | false\n > = {\n error: 'error',\n warning: 'warn',\n success: 'success',\n default: false,\n };\n\n protected readonly iconResolved = computed<IconName | null>(() => {\n const own = this.icon();\n if (own !== null) {\n return own === false ? null : own;\n }\n const configured = this.config.field?.stateIcons;\n if (configured === false) {\n return null;\n }\n const state = this.state();\n const key = state === 'default' ? 'hint' : state;\n const resolved = configured?.[key] ?? FieldMessageComponent.BUILT_IN[state];\n\n return resolved === false ? null : resolved;\n });\n}\n","<!-- Error is a separate branch so it mounts as a fresh node with role=\"alert\" already set; screen\n readers announce a live region on insertion, not when the role is toggled onto an existing node. -->\n@if (text()) {\n @if (state() === 'error') {\n <span\n class=\"field-message error\"\n role=\"alert\"\n [id]=\"messageId()\">\n @if (iconResolved(); as glyph) {\n <ds-icon\n class=\"message-icon\"\n [name]=\"glyph\"\n [size]=\"14\" />\n }\n {{ text() }}\n </span>\n } @else {\n <span\n class=\"field-message {{ state() }}\"\n [id]=\"messageId()\">\n @if (iconResolved(); as glyph) {\n <ds-icon\n class=\"message-icon\"\n [name]=\"glyph\"\n [size]=\"14\" />\n }\n {{ text() }}\n </span>\n }\n} @else if (reserve()) {\n <span\n class=\"field-message reserve-placeholder\"\n aria-hidden=\"true\">\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAeA;;;AAGG;MASU,qBAAqB,CAAA;;AAEvB,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,IAAA,KAAK,GAAG,KAAK,CAAoB,SAAS,4EAAC;;AAE3C,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAC/C;;AAEkB;AACT,IAAA,IAAI,GAAG,KAAK,CAA0B,IAAI,2EAAC;;IAE3C,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE/C,IAAA,MAAM,GAAG,MAAM,C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AA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC3BlC,q8BAmCA,EAAA,MAAA,EAAA,CAAA,w6BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDbY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,q8BAAA,EAAA,MAAA,EAAA,CAAA,w6BAAA,CAAA,EAAA;;;AEzB3C;;AAEG;;;;"}
|
|
@@ -6,7 +6,6 @@ import { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/po
|
|
|
6
6
|
import { ProjectionDroppedDirective } from '@ids-group-ltd/ids-design-system/components';
|
|
7
7
|
import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
|
|
8
8
|
|
|
9
|
-
/** Width assumed for a filter that declares none — roughly a `ds-select`. */
|
|
10
9
|
const DEFAULT_ITEM_WIDTH = 180;
|
|
11
10
|
function toWidth(value) {
|
|
12
11
|
const width = Number(value);
|
|
@@ -16,16 +15,11 @@ function toWidth(value) {
|
|
|
16
15
|
* One filter inside `ds-filter-bar`, with the width it should occupy:
|
|
17
16
|
* `<ng-template [dsFilterItem]="220"> <ds-date-picker … /> </ng-template>`.
|
|
18
17
|
*
|
|
19
|
-
* A template
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* destroys and re-creates the view, so a control's internal state (an open panel,
|
|
23
|
-
* focus) does not survive a resize that collapses it. Its VALUE does: that lives
|
|
24
|
-
* in the consumer's own signal or form control.
|
|
18
|
+
* A template, because projected DOM cannot be relocated into the overflow panel. Crossing the
|
|
19
|
+
* boundary destroys and re-creates the view, so a control's internal state (open panel, focus)
|
|
20
|
+
* is lost on collapse; its value survives in the consumer's own signal or form control.
|
|
25
21
|
*
|
|
26
|
-
* The width is a contract, not a hint
|
|
27
|
-
* and decides the split from it, so a control that would render wider is
|
|
28
|
-
* narrowed rather than allowed to break the row.
|
|
22
|
+
* The width is a contract, not a hint: a wider control is narrowed to fit the slot.
|
|
29
23
|
*/
|
|
30
24
|
class FilterItemDirective {
|
|
31
25
|
template = inject(TemplateRef);
|
|
@@ -43,28 +37,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
43
37
|
}]
|
|
44
38
|
}], propDecorators: { width: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsFilterItem", required: false }] }] } });
|
|
45
39
|
|
|
46
|
-
// Room
|
|
47
|
-
//
|
|
48
|
-
// its width then feeds back into the count that decides whether it renders at
|
|
49
|
-
// all — a loop. A constant costs nothing: inline slots may shrink, so a longer
|
|
50
|
-
// translation of the label takes space from them instead of breaking the row.
|
|
40
|
+
// Room for the "+N more" trigger. Measuring it would loop (its width feeds the count that decides
|
|
41
|
+
// whether it renders); inline slots may shrink, so a longer translation takes space from them.
|
|
51
42
|
const MORE_TRIGGER_WIDTH = 132;
|
|
52
43
|
/**
|
|
53
|
-
* Priority+ filter row: renders as many filters as fit and collapses the rest
|
|
54
|
-
*
|
|
55
|
-
* — the row wraps to a second line on a laptop, or the consumer hand-rolls this.
|
|
44
|
+
* Priority+ filter row: renders as many filters as fit and collapses the rest into a "+N more"
|
|
45
|
+
* panel.
|
|
56
46
|
*
|
|
57
|
-
* The split
|
|
58
|
-
* on the row, never
|
|
59
|
-
* the DOM to be measured, so anything that did not fit would flash before being
|
|
60
|
-
* taken away. `[dsFilterItem]` carries the width.
|
|
47
|
+
* The split comes from each item's declared width (`[dsFilterItem]`) plus one `ResizeObserver`
|
|
48
|
+
* on the row, never from measuring the filters (they would flash before being removed).
|
|
61
49
|
*
|
|
62
|
-
* Anything marked `dsFilterBarTrailing`
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* plain block whose children stack. The trailing group is outside the measured
|
|
66
|
-
* row, so flexbox subtracts its width before the row is measured and the
|
|
67
|
-
* arithmetic needs no allowance for it.
|
|
50
|
+
* Anything marked `dsFilterBarTrailing` (search, a Clear button) sits at the trailing edge and
|
|
51
|
+
* never collapses. Mark each control rather than wrapping them: a projected wrapper is a plain
|
|
52
|
+
* block whose children stack.
|
|
68
53
|
*
|
|
69
54
|
* ```html
|
|
70
55
|
* <ds-filter-bar>
|
|
@@ -82,7 +67,7 @@ const MORE_TRIGGER_WIDTH = 132;
|
|
|
82
67
|
*/
|
|
83
68
|
class FilterBarComponent {
|
|
84
69
|
intl = inject(DS_INTL);
|
|
85
|
-
/** Trailing word of the trigger, after the count
|
|
70
|
+
/** Trailing word of the trigger, after the count ("+2 filters"). Unset falls back to
|
|
86
71
|
* `DS_INTL.filterBar.more`. */
|
|
87
72
|
moreLabel = input(null, ...(ngDevMode ? [{ debugName: "moreLabel" }] : /* istanbul ignore next */ []));
|
|
88
73
|
moreLabelResolved = computed(() => this.moreLabel() ?? this.intl().filterBar.more, ...(ngDevMode ? [{ debugName: "moreLabelResolved" }] : /* istanbul ignore next */ []));
|
|
@@ -90,19 +75,14 @@ class FilterBarComponent {
|
|
|
90
75
|
* `DS_INTL.filterBar.panelLabel`. */
|
|
91
76
|
panelLabel = input(null, ...(ngDevMode ? [{ debugName: "panelLabel" }] : /* istanbul ignore next */ []));
|
|
92
77
|
panelLabelResolved = computed(() => this.panelLabel() ?? this.intl().filterBar.panelLabel, ...(ngDevMode ? [{ debugName: "panelLabelResolved" }] : /* istanbul ignore next */ []));
|
|
93
|
-
/** Height of the "+N" trigger
|
|
94
|
-
* infer this: `dsFilterItem` carries a WIDTH, and the filters are arbitrary
|
|
95
|
-
* projected controls whose own `size` it never sees — so a row of `sm` filters
|
|
96
|
-
* got an `md` trigger standing 8px taller under `align-items: flex-end`. */
|
|
78
|
+
/** Height of the "+N" trigger; set it to match the filters beside it. */
|
|
97
79
|
triggerSize = input('md', ...(ngDevMode ? [{ debugName: "triggerSize" }] : /* istanbul ignore next */ []));
|
|
98
80
|
devMode = isDevMode();
|
|
99
|
-
// descendants:
|
|
100
|
-
// put it in an embedded view, which a direct-children query does not reach.
|
|
81
|
+
// descendants: a filter inside @if or @for lives in an embedded view that a direct-children query misses.
|
|
101
82
|
items = contentChildren(FilterItemDirective, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
|
|
102
83
|
row = viewChild('row', ...(ngDevMode ? [{ debugName: "row" }] : /* istanbul ignore next */ []));
|
|
103
84
|
rowWidth = signal(0, ...(ngDevMode ? [{ debugName: "rowWidth" }] : /* istanbul ignore next */ []));
|
|
104
|
-
// Read off the row
|
|
105
|
-
// cannot silently desynchronise the arithmetic from what is rendered.
|
|
85
|
+
// Read off the row so retuning --ds-filter-bar-gap cannot desynchronise the arithmetic.
|
|
106
86
|
gap = signal(0, ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
107
87
|
inlineCount = computed(() => {
|
|
108
88
|
const items = this.items();
|
|
@@ -115,7 +95,6 @@ class FilterBarComponent {
|
|
|
115
95
|
if (total <= available) {
|
|
116
96
|
return items.length;
|
|
117
97
|
}
|
|
118
|
-
// Only now is the trigger certain to render, so only now does it cost room.
|
|
119
98
|
const budget = available - MORE_TRIGGER_WIDTH - gap;
|
|
120
99
|
let used = 0;
|
|
121
100
|
let count = 0;
|
|
@@ -129,7 +108,6 @@ class FilterBarComponent {
|
|
|
129
108
|
return count;
|
|
130
109
|
}, ...(ngDevMode ? [{ debugName: "inlineCount" }] : /* istanbul ignore next */ []));
|
|
131
110
|
inline = computed(() => this.items().slice(0, this.inlineCount()), ...(ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []));
|
|
132
|
-
/** The filters currently in the overflow panel. */
|
|
133
111
|
collapsed = computed(() => this.items().slice(this.inlineCount()), ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
134
112
|
constructor() {
|
|
135
113
|
effect((onCleanup) => {
|
|
@@ -148,7 +126,7 @@ class FilterBarComponent {
|
|
|
148
126
|
});
|
|
149
127
|
}
|
|
150
128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: FilterBarComponent, isStandalone: true, selector: "ds-filter-bar", inputs: { moreLabel: { classPropertyName: "moreLabel", publicName: "moreLabel", isSignal: true, isRequired: false, transformFunction: null }, panelLabel: { classPropertyName: "panelLabel", publicName: "panelLabel", isSignal: true, isRequired: false, transformFunction: null }, triggerSize: { classPropertyName: "triggerSize", publicName: "triggerSize", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: FilterItemDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "row", first: true, predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n", styles: ["
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: FilterBarComponent, isStandalone: true, selector: "ds-filter-bar", inputs: { moreLabel: { classPropertyName: "moreLabel", publicName: "moreLabel", isSignal: true, isRequired: false, transformFunction: null }, panelLabel: { classPropertyName: "panelLabel", publicName: "panelLabel", isSignal: true, isRequired: false, transformFunction: null }, triggerSize: { classPropertyName: "triggerSize", publicName: "triggerSize", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: FilterItemDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "row", first: true, predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n", styles: [":host{--_filter-bar-gap: var(--ds-filter-bar-gap, var(--space-3));--_filter-bar-panel-gap: var(--ds-filter-bar-panel-gap, var(--space-4));display:flex;align-items:flex-end;gap:var(--_filter-bar-gap)}.row{display:flex;flex:1 1 auto;align-items:flex-end;gap:var(--_filter-bar-gap);min-width:0;overflow:clip;overflow-clip-margin:4px}.row:not(:has(*)){display:none}.item{flex:0 1 auto;min-width:0}.more{flex:0 0 auto}.panel{display:flex;flex-direction:column;gap:var(--_filter-bar-panel-gap)}.trailing{display:flex;flex:0 0 auto;align-items:flex-end;gap:var(--_filter-bar-gap);margin-left:auto}.trailing:not(:has(*)){display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }, { kind: "directive", type: ProjectionDroppedDirective, selector: "[dsProjectionDropped]", inputs: ["dsProjectionDropped", "reason"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
152
130
|
}
|
|
153
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FilterBarComponent, decorators: [{
|
|
154
132
|
type: Component,
|
|
@@ -157,7 +135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
157
135
|
ButtonComponent,
|
|
158
136
|
PopoverComponent,
|
|
159
137
|
ProjectionDroppedDirective,
|
|
160
|
-
], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n", styles: ["
|
|
138
|
+
], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n", styles: [":host{--_filter-bar-gap: var(--ds-filter-bar-gap, var(--space-3));--_filter-bar-panel-gap: var(--ds-filter-bar-panel-gap, var(--space-4));display:flex;align-items:flex-end;gap:var(--_filter-bar-gap)}.row{display:flex;flex:1 1 auto;align-items:flex-end;gap:var(--_filter-bar-gap);min-width:0;overflow:clip;overflow-clip-margin:4px}.row:not(:has(*)){display:none}.item{flex:0 1 auto;min-width:0}.more{flex:0 0 auto}.panel{display:flex;flex-direction:column;gap:var(--_filter-bar-panel-gap)}.trailing{display:flex;flex:0 0 auto;align-items:flex-end;gap:var(--_filter-bar-gap);margin-left:auto}.trailing:not(:has(*)){display:none}\n"] }]
|
|
161
139
|
}], ctorParameters: () => [], propDecorators: { moreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreLabel", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }], triggerSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerSize", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FilterItemDirective), { ...{
|
|
162
140
|
descendants: true,
|
|
163
141
|
}, isSignal: true }] }], row: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-filter-bar.mjs","sources":["../../../src/lib/components/filter-bar/filter-item.directive.ts","../../../src/lib/components/filter-bar/filter-bar.component.ts","../../../src/lib/components/filter-bar/filter-bar.component.html","../../../src/lib/components/filter-bar/ids-group-ltd-ids-design-system-components-filter-bar.ts"],"sourcesContent":["import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/** Width assumed for a filter that declares none — roughly a `ds-select`. */\nconst DEFAULT_ITEM_WIDTH = 180;\n\nfunction toWidth(value: unknown): number {\n const width = Number(value);\n\n return Number.isFinite(width) && width > 0 ? width : DEFAULT_ITEM_WIDTH;\n}\n\n/**\n * One filter inside `ds-filter-bar`, with the width it should occupy:\n * `<ng-template [dsFilterItem]=\"220\"> <ds-date-picker … /> </ng-template>`.\n *\n * A template rather than plain projection because the bar has to MOVE the filters\n * that do not fit into its overflow panel, and projected DOM cannot be relocated\n * — it renders where it was projected. The cost is that crossing the boundary\n * destroys and re-creates the view, so a control's internal state (an open panel,\n * focus) does not survive a resize that collapses it. Its VALUE does: that lives\n * in the consumer's own signal or form control.\n *\n * The width is a contract, not a hint — the bar sizes the slot to exactly this\n * and decides the split from it, so a control that would render wider is\n * narrowed rather than allowed to break the row.\n */\n@Directive({\n selector: 'ng-template[dsFilterItem]',\n standalone: true,\n})\nexport class FilterItemDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Slot width in px. Bare `dsFilterItem` (or a non-positive value) means 180. */\n readonly width = input(DEFAULT_ITEM_WIDTH, {\n alias: 'dsFilterItem',\n transform: toWidth,\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n isDevMode,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport { ProjectionDroppedDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FilterItemDirective } from './filter-item.directive';\n\n// Room kept for the \"+N more\" trigger, which only exists once something has\n// already collapsed. Measuring the real button would need it rendered first, and\n// its width then feeds back into the count that decides whether it renders at\n// all — a loop. A constant costs nothing: inline slots may shrink, so a longer\n// translation of the label takes space from them instead of breaking the row.\nconst MORE_TRIGGER_WIDTH = 132;\n\n/**\n * Priority+ filter row: renders as many filters as fit and collapses the rest\n * into a \"+N more\" panel. Every admin list past three filters hits the same wall\n * — the row wraps to a second line on a laptop, or the consumer hand-rolls this.\n *\n * The split is decided from each item's declared width plus one `ResizeObserver`\n * on the row, never by measuring the filters themselves: they would have to be in\n * the DOM to be measured, so anything that did not fit would flash before being\n * taken away. `[dsFilterItem]` carries the width.\n *\n * Anything marked `dsFilterBarTrailing` — search, a Clear button — sits at the\n * trailing edge and never collapses. Mark each control rather than wrapping them:\n * the bar owns that row's gap and alignment, and a projected wrapper would be a\n * plain block whose children stack. The trailing group is outside the measured\n * row, so flexbox subtracts its width before the row is measured and the\n * arithmetic needs no allowance for it.\n *\n * ```html\n * <ds-filter-bar>\n * <ng-template [dsFilterItem]=\"180\">\n * <ds-select label=\"Status\" … />\n * </ng-template>\n * <ng-template [dsFilterItem]=\"220\">\n * <ds-date-picker label=\"Opened\" … />\n * </ng-template>\n *\n * <ds-search dsFilterBarTrailing … />\n * <ds-button dsFilterBarTrailing variant=\"text\">Clear</ds-button>\n * </ds-filter-bar>\n * ```\n */\n@Component({\n selector: 'ds-filter-bar',\n standalone: true,\n imports: [\n NgTemplateOutlet,\n ButtonComponent,\n PopoverComponent,\n ProjectionDroppedDirective,\n ],\n templateUrl: './filter-bar.component.html',\n styleUrl: './filter-bar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FilterBarComponent {\n private readonly intl = inject(DS_INTL);\n\n /** Trailing word of the trigger, after the count: \"+2 filters\". Unset falls back to\n * `DS_INTL.filterBar.more`. */\n readonly moreLabel = input<string | null>(null);\n protected readonly moreLabelResolved = computed(\n () => this.moreLabel() ?? this.intl().filterBar.more,\n );\n /** Accessible name of the overflow panel. Unset falls back to\n * `DS_INTL.filterBar.panelLabel`. */\n readonly panelLabel = input<string | null>(null);\n protected readonly panelLabelResolved = computed(\n () => this.panelLabel() ?? this.intl().filterBar.panelLabel,\n );\n /** Height of the \"+N\" trigger, to match the filters beside it. The bar cannot\n * infer this: `dsFilterItem` carries a WIDTH, and the filters are arbitrary\n * projected controls whose own `size` it never sees — so a row of `sm` filters\n * got an `md` trigger standing 8px taller under `align-items: flex-end`. */\n readonly triggerSize = input<DsSize>('md');\n\n protected readonly devMode = isDevMode();\n\n // descendants: true so a filter wrapped in @if or @for is still found — those\n // put it in an embedded view, which a direct-children query does not reach.\n protected readonly items = contentChildren(FilterItemDirective, {\n descendants: true,\n });\n\n private readonly row = viewChild<ElementRef<HTMLElement>>('row');\n private readonly rowWidth = signal(0);\n // Read off the row rather than hard-coded, so retuning --ds-filter-bar-gap\n // cannot silently desynchronise the arithmetic from what is rendered.\n private readonly gap = signal(0);\n\n protected readonly inlineCount = computed<number>(() => {\n const items = this.items();\n const available = this.rowWidth();\n if (!available) {\n return items.length;\n }\n\n const gap = this.gap();\n const total = items.reduce(\n (sum, item, index) => sum + (index > 0 ? gap : 0) + item.width(),\n 0,\n );\n if (total <= available) {\n return items.length;\n }\n\n // Only now is the trigger certain to render, so only now does it cost room.\n const budget = available - MORE_TRIGGER_WIDTH - gap;\n let used = 0;\n let count = 0;\n for (const item of items) {\n used += (count > 0 ? gap : 0) + item.width();\n if (used > budget) {\n break;\n }\n count++;\n }\n\n return count;\n });\n\n protected readonly inline = computed(() =>\n this.items().slice(0, this.inlineCount()),\n );\n\n /** The filters currently in the overflow panel. */\n readonly collapsed = computed(() => this.items().slice(this.inlineCount()));\n\n constructor() {\n effect((onCleanup) => {\n const row = this.row()?.nativeElement;\n if (!row) {\n return;\n }\n\n const measure = (): void => {\n this.rowWidth.set(row.clientWidth);\n this.gap.set(parseFloat(getComputedStyle(row).columnGap) || 0);\n };\n\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(row);\n onCleanup(() => observer.disconnect());\n });\n }\n}\n","<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA;AACA,MAAM,kBAAkB,GAAG,GAAG;AAE9B,SAAS,OAAO,CAAC,KAAc,EAAA;AAC7B,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAE3B,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,kBAAkB;AACzE;AAEA;;;;;;;;;;;;;;AAcG;MAKU,mBAAmB,CAAA;AACrB,IAAA,QAAQ,GAAG,MAAM,CAAuB,WAAW,CAAC;;AAGpD,IAAA,KAAK,GAAG,KAAK,CAAC,kBAAkB,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EACvC,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,OAAO,EAAA,CA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A,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,mBAAmB,CAAA,EAAA,EAAA,GAAE;AAC9D,4BAAA,WAAW,EAAE,IAAI;AAClB,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEyD,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvGjE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-filter-bar.mjs","sources":["../../../src/lib/components/filter-bar/filter-item.directive.ts","../../../src/lib/components/filter-bar/filter-bar.component.ts","../../../src/lib/components/filter-bar/filter-bar.component.html","../../../src/lib/components/filter-bar/ids-group-ltd-ids-design-system-components-filter-bar.ts"],"sourcesContent":["import { Directive, TemplateRef, inject, input } from '@angular/core';\n\nconst DEFAULT_ITEM_WIDTH = 180;\n\nfunction toWidth(value: unknown): number {\n const width = Number(value);\n\n return Number.isFinite(width) && width > 0 ? width : DEFAULT_ITEM_WIDTH;\n}\n\n/**\n * One filter inside `ds-filter-bar`, with the width it should occupy:\n * `<ng-template [dsFilterItem]=\"220\"> <ds-date-picker … /> </ng-template>`.\n *\n * A template, because projected DOM cannot be relocated into the overflow panel. Crossing the\n * boundary destroys and re-creates the view, so a control's internal state (open panel, focus)\n * is lost on collapse; its value survives in the consumer's own signal or form control.\n *\n * The width is a contract, not a hint: a wider control is narrowed to fit the slot.\n */\n@Directive({\n selector: 'ng-template[dsFilterItem]',\n standalone: true,\n})\nexport class FilterItemDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Slot width in px. Bare `dsFilterItem` (or a non-positive value) means 180. */\n readonly width = input(DEFAULT_ITEM_WIDTH, {\n alias: 'dsFilterItem',\n transform: toWidth,\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n isDevMode,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport { ProjectionDroppedDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FilterItemDirective } from './filter-item.directive';\n\n// Room for the \"+N more\" trigger. Measuring it would loop (its width feeds the count that decides\n// whether it renders); inline slots may shrink, so a longer translation takes space from them.\nconst MORE_TRIGGER_WIDTH = 132;\n\n/**\n * Priority+ filter row: renders as many filters as fit and collapses the rest into a \"+N more\"\n * panel.\n *\n * The split comes from each item's declared width (`[dsFilterItem]`) plus one `ResizeObserver`\n * on the row, never from measuring the filters (they would flash before being removed).\n *\n * Anything marked `dsFilterBarTrailing` (search, a Clear button) sits at the trailing edge and\n * never collapses. Mark each control rather than wrapping them: a projected wrapper is a plain\n * block whose children stack.\n *\n * ```html\n * <ds-filter-bar>\n * <ng-template [dsFilterItem]=\"180\">\n * <ds-select label=\"Status\" … />\n * </ng-template>\n * <ng-template [dsFilterItem]=\"220\">\n * <ds-date-picker label=\"Opened\" … />\n * </ng-template>\n *\n * <ds-search dsFilterBarTrailing … />\n * <ds-button dsFilterBarTrailing variant=\"text\">Clear</ds-button>\n * </ds-filter-bar>\n * ```\n */\n@Component({\n selector: 'ds-filter-bar',\n standalone: true,\n imports: [\n NgTemplateOutlet,\n ButtonComponent,\n PopoverComponent,\n ProjectionDroppedDirective,\n ],\n templateUrl: './filter-bar.component.html',\n styleUrl: './filter-bar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FilterBarComponent {\n private readonly intl = inject(DS_INTL);\n\n /** Trailing word of the trigger, after the count (\"+2 filters\"). Unset falls back to\n * `DS_INTL.filterBar.more`. */\n readonly moreLabel = input<string | null>(null);\n protected readonly moreLabelResolved = computed(\n () => this.moreLabel() ?? this.intl().filterBar.more,\n );\n /** Accessible name of the overflow panel. Unset falls back to\n * `DS_INTL.filterBar.panelLabel`. */\n readonly panelLabel = input<string | null>(null);\n protected readonly panelLabelResolved = computed(\n () => this.panelLabel() ?? this.intl().filterBar.panelLabel,\n );\n /** Height of the \"+N\" trigger; set it to match the filters beside it. */\n readonly triggerSize = input<DsSize>('md');\n\n protected readonly devMode = isDevMode();\n\n // descendants: a filter inside @if or @for lives in an embedded view that a direct-children query misses.\n protected readonly items = contentChildren(FilterItemDirective, {\n descendants: true,\n });\n\n private readonly row = viewChild<ElementRef<HTMLElement>>('row');\n private readonly rowWidth = signal(0);\n // Read off the row so retuning --ds-filter-bar-gap cannot desynchronise the arithmetic.\n private readonly gap = signal(0);\n\n protected readonly inlineCount = computed<number>(() => {\n const items = this.items();\n const available = this.rowWidth();\n if (!available) {\n return items.length;\n }\n\n const gap = this.gap();\n const total = items.reduce(\n (sum, item, index) => sum + (index > 0 ? gap : 0) + item.width(),\n 0,\n );\n if (total <= available) {\n return items.length;\n }\n\n const budget = available - MORE_TRIGGER_WIDTH - gap;\n let used = 0;\n let count = 0;\n for (const item of items) {\n used += (count > 0 ? gap : 0) + item.width();\n if (used > budget) {\n break;\n }\n count++;\n }\n\n return count;\n });\n\n protected readonly inline = computed(() =>\n this.items().slice(0, this.inlineCount()),\n );\n\n readonly collapsed = computed(() => this.items().slice(this.inlineCount()));\n\n constructor() {\n effect((onCleanup) => {\n const row = this.row()?.nativeElement;\n if (!row) {\n return;\n }\n\n const measure = (): void => {\n this.rowWidth.set(row.clientWidth);\n this.gap.set(parseFloat(getComputedStyle(row).columnGap) || 0);\n };\n\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(row);\n onCleanup(() => observer.disconnect());\n });\n }\n}\n","<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA,MAAM,kBAAkB,GAAG,GAAG;AAE9B,SAAS,OAAO,CAAC,KAAc,EAAA;AAC7B,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAE3B,IAAA,OAAO,MAAM,CAAC,QAA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