@seniorsistemas/scala-ng 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/autocomplete/README.md +5 -1
- package/autocomplete/public-api.d.ts +2 -2
- package/autocomplete/src/autocomplete/autocomplete.component.d.ts +6 -6
- package/autocomplete/src/autocomplete/autocomplete.models.d.ts +2 -2
- package/autocomplete/src/autocomplete/panel/autocomplete-panel.component.d.ts +1 -1
- package/avatar-summary/README.md +1 -1
- package/avatar-summary/public-api.d.ts +2 -2
- package/avatar-summary/src/avatar-summary/avatar-summary.component.d.ts +1 -1
- package/avatar-summary/src/avatar-summary/avatar-summary.models.d.ts +3 -3
- package/avatar-summary/src/avatar-summary/avatar-summary.tokens.d.ts +1 -1
- package/avatar-summary/src/avatar-summary/avatar-summary.utils.d.ts +1 -1
- package/badge/README.md +1 -1
- package/badge/public-api.d.ts +1 -1
- package/badge/src/badge/badge.component.d.ts +1 -1
- package/banner/README.md +1 -1
- package/banner/public-api.d.ts +3 -3
- package/banner/src/banner/banner.component.d.ts +2 -2
- package/banner/src/banner/banner.models.d.ts +1 -1
- package/banner/src/banner-trigger/banner-trigger.directive.d.ts +2 -2
- package/breadcrumb/README.md +7 -7
- package/breadcrumb/public-api.d.ts +5 -5
- package/breadcrumb/src/breadcrumb/breadcrumb.component.d.ts +2 -2
- package/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.d.ts +2 -2
- package/breadcrumb/src/breadcrumb-truncator/breadcrumb-truncator.component.d.ts +3 -3
- package/button/README.md +5 -1
- package/button/public-api.d.ts +1 -1
- package/button/src/button/button.component.d.ts +1 -1
- package/card/README.md +1 -1
- package/card/public-api.d.ts +1 -1
- package/card/src/card/card.component.d.ts +4 -4
- package/checkbox/README.md +5 -5
- package/checkbox/public-api.d.ts +1 -1
- package/checkbox/src/checkbox/checkbox.component.d.ts +1 -1
- package/content-lifecycle/README.md +2 -2
- package/content-lifecycle/public-api.d.ts +2 -2
- package/content-lifecycle/src/content-lifecycle/content-lifecycle.component.d.ts +2 -2
- package/content-lifecycle/src/content-lifecycle/content-lifecycle.models.d.ts +2 -2
- package/date-picker/README.md +6 -6
- package/date-picker/public-api.d.ts +3 -3
- package/date-picker/src/date-picker/date-format.utils.d.ts +2 -2
- package/date-picker/src/date-picker/datepicker.component.d.ts +7 -7
- package/display-tag/README.md +2 -2
- package/display-tag/public-api.d.ts +2 -2
- package/display-tag/src/display-tag/display-tag.component.d.ts +5 -5
- package/drawer/README.md +9 -9
- package/drawer/public-api.d.ts +1 -1
- package/drawer/src/drawer/drawer.component.d.ts +4 -4
- package/empty-state/README.md +1 -1
- package/empty-state/public-api.d.ts +2 -2
- package/empty-state/src/empty-state/empty-state.component.d.ts +1 -1
- package/empty-state/src/empty-state/empty-state.models.d.ts +2 -2
- package/esm2022/autocomplete/public-api.mjs +2 -2
- package/esm2022/autocomplete/src/autocomplete/autocomplete.component.mjs +55 -55
- package/esm2022/autocomplete/src/autocomplete/autocomplete.models.mjs +1 -1
- package/esm2022/autocomplete/src/autocomplete/panel/autocomplete-panel.component.mjs +12 -12
- package/esm2022/avatar-summary/public-api.mjs +2 -2
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.component.mjs +24 -24
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.models.mjs +1 -1
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.tokens.mjs +46 -46
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.utils.mjs +4 -4
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/badge/src/badge/badge.component.mjs +25 -25
- package/esm2022/banner/public-api.mjs +3 -3
- package/esm2022/banner/src/banner/banner.component.mjs +33 -33
- package/esm2022/banner/src/banner/banner.models.mjs +1 -1
- package/esm2022/banner/src/banner-trigger/banner-trigger.directive.mjs +11 -11
- package/esm2022/breadcrumb/public-api.mjs +3 -3
- package/esm2022/breadcrumb/src/breadcrumb/breadcrumb.component.mjs +13 -13
- package/esm2022/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.mjs +13 -13
- package/esm2022/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.mjs +11 -11
- package/esm2022/breadcrumb/src/breadcrumb-truncator/breadcrumb-truncator.component.mjs +24 -24
- package/esm2022/button/public-api.mjs +2 -2
- package/esm2022/button/src/button/button.component.mjs +23 -23
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/card/src/card/card.component.mjs +37 -37
- package/esm2022/checkbox/public-api.mjs +2 -2
- package/esm2022/checkbox/src/checkbox/checkbox.component.mjs +5 -5
- package/esm2022/content-lifecycle/public-api.mjs +2 -2
- package/esm2022/content-lifecycle/src/content-lifecycle/content-lifecycle.component.mjs +15 -15
- package/esm2022/content-lifecycle/src/content-lifecycle/content-lifecycle.models.mjs +1 -1
- package/esm2022/date-picker/public-api.mjs +3 -3
- package/esm2022/date-picker/src/date-picker/date-format.utils.mjs +39 -39
- package/esm2022/date-picker/src/date-picker/date.utils.mjs +15 -15
- package/esm2022/date-picker/src/date-picker/datepicker.component.mjs +122 -122
- package/esm2022/display-tag/public-api.mjs +2 -2
- package/esm2022/display-tag/src/display-tag/display-tag.component.mjs +36 -36
- package/esm2022/drawer/public-api.mjs +2 -2
- package/esm2022/drawer/src/drawer/drawer.component.mjs +37 -37
- package/esm2022/empty-state/public-api.mjs +2 -2
- package/esm2022/empty-state/src/empty-state/empty-state.component.mjs +26 -26
- package/esm2022/empty-state/src/empty-state/empty-state.models.mjs +1 -1
- package/esm2022/filter-tag/public-api.mjs +2 -2
- package/esm2022/filter-tag/src/filter-tag/filter-tag.component.mjs +12 -12
- package/esm2022/form-field/public-api.mjs +2 -2
- package/esm2022/form-field/src/form-field/form-field.component.mjs +26 -26
- package/esm2022/input/public-api.mjs +2 -2
- package/esm2022/input/src/input/input.component.mjs +55 -44
- package/esm2022/input-feedback/public-api.mjs +2 -2
- package/esm2022/input-feedback/src/input-feedback/input-feedback.component.mjs +12 -12
- package/esm2022/item-strip/public-api.mjs +2 -2
- package/esm2022/item-strip/src/item-strip/item-strip.component.mjs +14 -14
- package/esm2022/item-strip/src/item-strip-item/item-strip-item.component.mjs +37 -37
- package/esm2022/item-strip/src/item-strip-item/item-strip-item.mjs +1 -1
- package/esm2022/lib/a11y/focusable-item.utils.mjs +2 -2
- package/esm2022/lib/chip/chip.utils.mjs +15 -15
- package/esm2022/lib/combobox/combobox.utils.mjs +8 -8
- package/esm2022/lib/forms/control-state.utils.mjs +4 -4
- package/esm2022/lib/overlay/aria-hide.utils.mjs +10 -10
- package/esm2022/lib/overlay/exclusive-dialog.utils.mjs +22 -0
- package/esm2022/lib/overlay/scroll-lock.utils.mjs +5 -5
- package/esm2022/lib/overlay/scrollable-region.utils.mjs +34 -0
- package/esm2022/lib/theme/create-theme.mjs +7 -7
- package/esm2022/lib/theme/semantic-tokens.mjs +1 -1
- package/esm2022/lib/theme/theme.service.mjs +15 -15
- package/esm2022/list/public-api.mjs +2 -2
- package/esm2022/list/src/list/list-id-generator.mjs +4 -4
- package/esm2022/list/src/list/list.component.mjs +16 -16
- package/esm2022/list/src/list/list.models.mjs +2 -2
- package/esm2022/list/src/list/list.tokens.mjs +30 -30
- package/esm2022/list/src/list-group/list-group.component.mjs +7 -7
- package/esm2022/list/src/list-item/list-item-title.utils.mjs +3 -3
- package/esm2022/list/src/list-item/list-item.component.mjs +47 -47
- package/esm2022/loading-state/public-api.mjs +4 -0
- package/esm2022/loading-state/seniorsistemas-scala-ng-loading-state.mjs +5 -0
- package/esm2022/loading-state/src/loading-state/loading-state.directive.mjs +203 -0
- package/esm2022/loading-state/src/loading-state/loading-state.types.mjs +2 -0
- package/esm2022/loading-state/src/loading-state/loading-visibility.utils.mjs +60 -0
- package/esm2022/loading-state/src/pulse/pulse.component.mjs +71 -0
- package/esm2022/loading-state/src/pulse/senior-isotype.component.mjs +11 -0
- package/esm2022/loading-state/src/spinner/loading-spinner.component.mjs +13 -0
- package/esm2022/locale/fallback.mjs +135 -129
- package/esm2022/locale/public-api.mjs +2 -2
- package/esm2022/mask/public-api.mjs +5 -5
- package/esm2022/mask/src/mask/mask.directive.mjs +67 -67
- package/esm2022/mask/src/mask/mask.pipe.mjs +10 -10
- package/esm2022/mask/src/mask/mask.tokens.mjs +16 -16
- package/esm2022/mask/src/mask/mask.utils.mjs +25 -25
- package/esm2022/modal/public-api.mjs +4 -0
- package/esm2022/modal/seniorsistemas-scala-ng-modal.mjs +5 -0
- package/esm2022/modal/src/modal/modal-ref.mjs +84 -0
- package/esm2022/modal/src/modal/modal.component.mjs +262 -0
- package/esm2022/modal/src/modal/modal.service.mjs +119 -0
- package/esm2022/page-header/public-api.mjs +2 -2
- package/esm2022/page-header/src/page-header/page-header.component.mjs +14 -14
- package/esm2022/paginator/public-api.mjs +2 -2
- package/esm2022/paginator/src/paginator/paginator.component.mjs +29 -29
- package/esm2022/panel/public-api.mjs +2 -2
- package/esm2022/panel/src/panel/panel.component.mjs +21 -21
- package/esm2022/progress-bar/public-api.mjs +3 -3
- package/esm2022/progress-bar/src/progress-bar/progress-bar.component.mjs +33 -33
- package/esm2022/progress-bar/src/progress-bar/progress-bar.utils.mjs +5 -5
- package/esm2022/public-api.mjs +11 -9
- package/esm2022/radio-button/public-api.mjs +3 -3
- package/esm2022/radio-button/src/radio-button/radio-button.component.mjs +7 -7
- package/esm2022/radio-button/src/radio-button-group/radio-button-group-error.token.mjs +3 -3
- package/esm2022/radio-button/src/radio-button-group/radio-button-group.component.mjs +7 -7
- package/esm2022/radio-button/src/services/radio-button-registry.service.mjs +4 -4
- package/esm2022/select/public-api.mjs +2 -2
- package/esm2022/select/src/select/select.component.mjs +89 -89
- package/esm2022/select-button/public-api.mjs +2 -2
- package/esm2022/select-button/src/select-button/select-button.component.mjs +131 -131
- package/esm2022/selection-chip/public-api.mjs +2 -2
- package/esm2022/selection-chip/src/selection-chip/selection-chip.component.mjs +24 -24
- package/esm2022/slider/public-api.mjs +2 -2
- package/esm2022/slider/src/slider/slider.component.mjs +82 -82
- package/esm2022/slider/src/slider/slider.types.mjs +1 -1
- package/esm2022/spinner/public-api.mjs +2 -2
- package/esm2022/spinner/src/spinner/spinner.component.mjs +6 -3
- package/esm2022/split-button/public-api.mjs +2 -0
- package/esm2022/split-button/seniorsistemas-scala-ng-split-button.mjs +5 -0
- package/esm2022/split-button/src/split-button/split-button.component.mjs +71 -0
- package/esm2022/stats-card/public-api.mjs +2 -2
- package/esm2022/stats-card/src/stats-card/stats-card.component.mjs +63 -63
- package/esm2022/stats-card/src/stats-card/stats-card.models.mjs +1 -1
- package/esm2022/switch/public-api.mjs +2 -2
- package/esm2022/switch/src/switch/switch.component.mjs +8 -8
- package/esm2022/table/public-api.mjs +3 -3
- package/esm2022/table/src/components/actions-cell/table-actions-cell.component.mjs +7 -7
- package/esm2022/table/src/components/expand-cell/table-expand-cell.component.mjs +4 -4
- package/esm2022/table/src/components/fields/avatar-summary-field-table/avatar-summary-field-table.component.mjs +4 -4
- package/esm2022/table/src/components/fields/base-table-field-config.mjs +1 -1
- package/esm2022/table/src/components/fields/date-field-table/date-field-table.component.mjs +11 -11
- package/esm2022/table/src/components/fields/number-field-table/number-field-table.component.mjs +3 -3
- package/esm2022/table/src/components/fields/rich-field-table/rich-field-table.component.mjs +9 -9
- package/esm2022/table/src/components/fields/string-field-table/string-field-table.component.mjs +3 -3
- package/esm2022/table/src/components/filter-row/table-filter-row.component.mjs +10 -10
- package/esm2022/table/src/components/row-group-header/table-row-group-header.component.mjs +6 -6
- package/esm2022/table/src/components/selection-cell/table-selection-cell.component.mjs +10 -10
- package/esm2022/table/src/components/toolbar/table-toolbar.component.mjs +18 -18
- package/esm2022/table/src/directives/table-actions-column.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-body.directive.mjs +3 -3
- package/esm2022/table/src/directives/table-cell.directive.mjs +9 -9
- package/esm2022/table/src/directives/table-container.directive.mjs +5 -5
- package/esm2022/table/src/directives/table-field.directive.mjs +10 -10
- package/esm2022/table/src/directives/table-grid.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-header-cell.directive.mjs +17 -17
- package/esm2022/table/src/directives/table-header-row.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-paginator-container.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-row-detail-cell.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-row.directive.mjs +10 -10
- package/esm2022/table/src/fields/avatar-summary-table-header.mjs +1 -1
- package/esm2022/table/src/fields/date-table-header.mjs +1 -1
- package/esm2022/table/src/fields/date-utc.utils.mjs +6 -6
- package/esm2022/table/src/fields/number-table-header.mjs +1 -1
- package/esm2022/table/src/fields/rich-table-header.mjs +1 -1
- package/esm2022/table/src/fields/string-table-header.mjs +1 -1
- package/esm2022/table/src/fields/table-header.mjs +1 -1
- package/esm2022/table/src/registry/built-in-field-types.mjs +11 -11
- package/esm2022/table/src/registry/table-field-registry.mjs +7 -7
- package/esm2022/table/src/table/table-toolbar.models.mjs +1 -1
- package/esm2022/table/src/table/table.component.mjs +58 -58
- package/esm2022/table/src/table/table.models.mjs +1 -1
- package/esm2022/table/src/utils/table-filter.utils.mjs +7 -7
- package/esm2022/table/src/utils/table-group.utils.mjs +6 -6
- package/esm2022/table/src/utils/table-lazy-event.utils.mjs +2 -2
- package/esm2022/table/src/utils/table-selection.utils.mjs +4 -4
- package/esm2022/table/src/utils/table-sort.utils.mjs +9 -9
- package/esm2022/tiered-menu/public-api.mjs +2 -2
- package/esm2022/tiered-menu/src/tiered-menu-item-row/tiered-menu-item-row.directive.mjs +8 -8
- package/esm2022/tiered-menu/src/tiered-menu-panel/tiered-menu-panel.component.mjs +16 -16
- package/esm2022/tiered-menu/src/tiered-menu-panel-host/tiered-menu-panel-host.component.mjs +10 -10
- package/esm2022/tiered-menu/src/tiered-menu-trigger/tiered-menu-trigger.directive.mjs +18 -18
- package/esm2022/toast/public-api.mjs +3 -3
- package/esm2022/toast/src/toast/toast.component.mjs +16 -16
- package/esm2022/toast/src/toast/toast.models.mjs +1 -1
- package/esm2022/toast/src/toast-container/toast-container.component.mjs +20 -20
- package/esm2022/toast/src/toast.service.mjs +31 -31
- package/esm2022/tooltip/public-api.mjs +2 -2
- package/esm2022/tooltip/src/tooltip/tooltip-collision-registry.service.mjs +4 -4
- package/esm2022/tooltip/src/tooltip/tooltip-focus-origin.service.mjs +5 -5
- package/esm2022/tooltip/src/tooltip/tooltip.types.mjs +1 -1
- package/esm2022/tooltip/src/tooltip-panel/tooltip-panel.component.mjs +23 -23
- package/esm2022/tooltip/src/tooltip-trigger/tooltip-trigger.directive.mjs +93 -93
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs +51 -51
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs +64 -64
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-badge.mjs +22 -22
- package/fesm2022/seniorsistemas-scala-ng-badge.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs +32 -32
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs +33 -33
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-button.mjs +21 -21
- package/fesm2022/seniorsistemas-scala-ng-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-card.mjs +30 -30
- package/fesm2022/seniorsistemas-scala-ng-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-content-lifecycle.mjs +12 -12
- package/fesm2022/seniorsistemas-scala-ng-content-lifecycle.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs +159 -159
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-display-tag.mjs +33 -33
- package/fesm2022/seniorsistemas-scala-ng-display-tag.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs +29 -29
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs +23 -23
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-filter-tag.mjs +7 -7
- package/fesm2022/seniorsistemas-scala-ng-filter-tag.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-form-field.mjs +22 -22
- package/fesm2022/seniorsistemas-scala-ng-form-field.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input-feedback.mjs +10 -10
- package/fesm2022/seniorsistemas-scala-ng-input-feedback.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input.mjs +49 -38
- package/fesm2022/seniorsistemas-scala-ng-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs +39 -39
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-list.mjs +84 -84
- package/fesm2022/seniorsistemas-scala-ng-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-loading-state.mjs +354 -0
- package/fesm2022/seniorsistemas-scala-ng-loading-state.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs +134 -128
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-mask.mjs +106 -106
- package/fesm2022/seniorsistemas-scala-ng-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-modal.mjs +466 -0
- package/fesm2022/seniorsistemas-scala-ng-modal.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs +9 -9
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs +20 -20
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs +14 -14
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-progress-bar.mjs +31 -31
- package/fesm2022/seniorsistemas-scala-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs +6 -6
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs +122 -122
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select.mjs +76 -76
- package/fesm2022/seniorsistemas-scala-ng-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-selection-chip.mjs +19 -19
- package/fesm2022/seniorsistemas-scala-ng-selection-chip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-slider.mjs +72 -72
- package/fesm2022/seniorsistemas-scala-ng-slider.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-spinner.mjs +4 -1
- package/fesm2022/seniorsistemas-scala-ng-spinner.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-split-button.mjs +78 -0
- package/fesm2022/seniorsistemas-scala-ng-split-button.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs +58 -58
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs +4 -4
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs.map +1 -1
- package/fesm2022/{seniorsistemas-scala-ng-table-table-actions-cell.component-DTzDhrMk.mjs → seniorsistemas-scala-ng-table-table-actions-cell.component-D_eZKncd.mjs} +2 -2
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-D_eZKncd.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-C0Y1KaWD.mjs +27 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-C0Y1KaWD.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-C9s1ObGb.mjs +68 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-C9s1ObGb.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-table.mjs +138 -138
- package/fesm2022/seniorsistemas-scala-ng-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-tiered-menu.mjs +35 -35
- package/fesm2022/seniorsistemas-scala-ng-tiered-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-toast.mjs +54 -54
- package/fesm2022/seniorsistemas-scala-ng-toast.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs +110 -110
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng.mjs +110 -54
- package/fesm2022/seniorsistemas-scala-ng.mjs.map +1 -1
- package/filter-tag/README.md +1 -1
- package/filter-tag/public-api.d.ts +1 -1
- package/filter-tag/src/filter-tag/filter-tag.component.d.ts +1 -1
- package/form-field/public-api.d.ts +2 -2
- package/form-field/src/form-field/form-field.component.d.ts +14 -14
- package/input/README.md +13 -10
- package/input/public-api.d.ts +1 -1
- package/input/src/input/input.component.d.ts +8 -5
- package/input-feedback/README.md +7 -7
- package/input-feedback/public-api.d.ts +1 -1
- package/input-feedback/src/input-feedback/input-feedback.component.d.ts +2 -2
- package/item-strip/README.md +1 -1
- package/item-strip/public-api.d.ts +2 -2
- package/item-strip/src/item-strip/item-strip.component.d.ts +1 -1
- package/item-strip/src/item-strip-item/item-strip-item.component.d.ts +27 -27
- package/item-strip/src/item-strip-item/item-strip-item.d.ts +1 -1
- package/lib/a11y/focusable-item.utils.d.ts +1 -1
- package/lib/chip/chip.utils.d.ts +3 -3
- package/lib/combobox/combobox.utils.d.ts +2 -2
- package/lib/forms/control-state.utils.d.ts +2 -2
- package/lib/overlay/exclusive-dialog.utils.d.ts +7 -0
- package/lib/overlay/scrollable-region.utils.d.ts +5 -0
- package/lib/theme/create-theme.d.ts +2 -2
- package/lib/theme/semantic-tokens.d.ts +1 -1
- package/lib/theme/theme.service.d.ts +1 -1
- package/list/README.md +1 -1
- package/list/public-api.d.ts +2 -2
- package/list/src/list/list.component.d.ts +1 -1
- package/list/src/list/list.models.d.ts +5 -5
- package/list/src/list/list.tokens.d.ts +1 -1
- package/list/src/list-group/list-group.component.d.ts +1 -1
- package/list/src/list-item/list-item.component.d.ts +11 -11
- package/loading-state/README.md +60 -0
- package/loading-state/index.d.ts +5 -0
- package/loading-state/package.json +3 -0
- package/loading-state/public-api.d.ts +5 -0
- package/loading-state/src/loading-state/loading-state.directive.d.ts +37 -0
- package/loading-state/src/loading-state/loading-state.types.d.ts +3 -0
- package/loading-state/src/loading-state/loading-visibility.utils.d.ts +11 -0
- package/loading-state/src/pulse/pulse.component.d.ts +27 -0
- package/loading-state/src/pulse/senior-isotype.component.d.ts +5 -0
- package/loading-state/src/spinner/loading-spinner.component.d.ts +8 -0
- package/locale/public-api.d.ts +1 -1
- package/mask/README.md +1 -1
- package/mask/public-api.d.ts +4 -4
- package/mask/src/mask/mask.directive.d.ts +2 -2
- package/mask/src/mask/mask.pipe.d.ts +2 -2
- package/mask/src/mask/mask.utils.d.ts +1 -1
- package/modal/README.md +435 -0
- package/modal/index.d.ts +5 -0
- package/modal/package.json +3 -0
- package/modal/public-api.d.ts +3 -0
- package/modal/src/modal/modal-ref.d.ts +51 -0
- package/modal/src/modal/modal.component.d.ts +82 -0
- package/modal/src/modal/modal.service.d.ts +62 -0
- package/package.json +22 -1
- package/page-header/README.md +1 -1
- package/page-header/public-api.d.ts +1 -1
- package/page-header/src/page-header/page-header.component.d.ts +2 -2
- package/paginator/public-api.d.ts +2 -2
- package/paginator/src/paginator/paginator.component.d.ts +3 -3
- package/panel/README.md +1 -1
- package/panel/public-api.d.ts +1 -1
- package/panel/src/panel/panel.component.d.ts +3 -3
- package/progress-bar/README.md +4 -4
- package/progress-bar/public-api.d.ts +4 -4
- package/progress-bar/src/progress-bar/progress-bar.component.d.ts +3 -3
- package/progress-bar/src/progress-bar/progress-bar.utils.d.ts +1 -1
- package/public-api.d.ts +11 -9
- package/radio-button/README.md +1 -1
- package/radio-button/public-api.d.ts +3 -3
- package/radio-button/src/radio-button/radio-button.component.d.ts +2 -2
- package/radio-button/src/radio-button-group/radio-button-group-error.token.d.ts +1 -1
- package/radio-button/src/radio-button-group/radio-button-group.component.d.ts +3 -3
- package/radio-button/src/services/radio-button-registry.service.d.ts +1 -1
- package/schematics/migrate-spinner-to-loading-state/index.js +75 -0
- package/schematics/migrate-spinner-to-loading-state/index.js.map +1 -0
- package/schematics/migrations.json +10 -0
- package/schematics/ng-add/index.js +29 -29
- package/select/README.md +19 -15
- package/select/public-api.d.ts +2 -2
- package/select/src/select/select.component.d.ts +11 -11
- package/select-button/README.md +1 -1
- package/select-button/public-api.d.ts +2 -2
- package/select-button/src/select-button/select-button.component.d.ts +7 -7
- package/selection-chip/README.md +1 -1
- package/selection-chip/public-api.d.ts +1 -1
- package/selection-chip/src/selection-chip/selection-chip.component.d.ts +3 -3
- package/slider/README.md +6 -6
- package/slider/public-api.d.ts +2 -2
- package/slider/src/slider/slider.component.d.ts +3 -3
- package/slider/src/slider/slider.types.d.ts +3 -3
- package/spinner/README.md +9 -1
- package/spinner/public-api.d.ts +1 -1
- package/spinner/src/spinner/spinner.component.d.ts +3 -0
- package/split-button/README.md +208 -0
- package/split-button/index.d.ts +5 -0
- package/split-button/package.json +3 -0
- package/split-button/public-api.d.ts +1 -0
- package/split-button/src/split-button/split-button.component.d.ts +29 -0
- package/stats-card/README.md +1 -1
- package/stats-card/public-api.d.ts +2 -2
- package/stats-card/src/stats-card/stats-card.component.d.ts +415 -415
- package/stats-card/src/stats-card/stats-card.models.d.ts +3 -3
- package/styles/tailwind-preset.js +30 -13
- package/styles/tailwind-tokens.js +286 -286
- package/styles/tokens/index.scss +7 -7
- package/styles/tokens/semantic-colors.scss +4 -2
- package/styles.scss +7 -7
- package/switch/README.md +5 -5
- package/switch/public-api.d.ts +1 -1
- package/switch/src/switch/switch.component.d.ts +1 -1
- package/table/README.md +21 -21
- package/table/public-api.d.ts +12 -12
- package/table/src/components/actions-cell/table-actions-cell.component.d.ts +2 -2
- package/table/src/components/fields/avatar-summary-field-table/avatar-summary-field-table.component.d.ts +2 -2
- package/table/src/components/fields/base-table-field-config.d.ts +2 -2
- package/table/src/components/fields/date-field-table/date-field-table.component.d.ts +2 -2
- package/table/src/components/fields/number-field-table/number-field-table.component.d.ts +2 -2
- package/table/src/components/fields/rich-field-table/rich-field-table.component.d.ts +2 -2
- package/table/src/components/fields/string-field-table/string-field-table.component.d.ts +2 -2
- package/table/src/components/filter-row/table-filter-row.component.d.ts +1 -1
- package/table/src/components/selection-cell/table-selection-cell.component.d.ts +2 -2
- package/table/src/components/toolbar/table-toolbar.component.d.ts +3 -3
- package/table/src/directives/table-field.directive.d.ts +1 -1
- package/table/src/fields/avatar-summary-table-header.d.ts +4 -4
- package/table/src/fields/date-table-header.d.ts +3 -3
- package/table/src/fields/number-table-header.d.ts +3 -3
- package/table/src/fields/rich-table-header.d.ts +4 -4
- package/table/src/fields/string-table-header.d.ts +4 -4
- package/table/src/fields/table-header.d.ts +2 -2
- package/table/src/registry/built-in-field-types.d.ts +1 -1
- package/table/src/registry/table-field-registry.d.ts +4 -4
- package/table/src/table/table-toolbar.models.d.ts +1 -1
- package/table/src/table/table.component.d.ts +11 -11
- package/table/src/table/table.models.d.ts +2 -2
- package/table/src/utils/table-filter.utils.d.ts +1 -1
- package/table/src/utils/table-group.utils.d.ts +4 -4
- package/table/src/utils/table-lazy-event.utils.d.ts +3 -3
- package/table/src/utils/table-selection.utils.d.ts +2 -2
- package/table/src/utils/table-sort.utils.d.ts +2 -2
- package/tiered-menu/README.md +2 -2
- package/tiered-menu/public-api.d.ts +2 -2
- package/tiered-menu/src/tiered-menu-panel/tiered-menu-panel.component.d.ts +2 -2
- package/tiered-menu/src/tiered-menu-panel-host/tiered-menu-panel-host.component.d.ts +2 -2
- package/tiered-menu/src/tiered-menu-trigger/tiered-menu-trigger.directive.d.ts +2 -2
- package/toast/README.md +17 -17
- package/toast/public-api.d.ts +3 -3
- package/toast/src/toast/toast.component.d.ts +1 -1
- package/toast/src/toast/toast.models.d.ts +3 -3
- package/toast/src/toast-container/toast-container.component.d.ts +1 -1
- package/toast/src/toast.service.d.ts +5 -5
- package/tooltip/README.md +1 -1
- package/tooltip/public-api.d.ts +2 -2
- package/tooltip/src/tooltip/tooltip-focus-origin.service.d.ts +2 -2
- package/tooltip/src/tooltip/tooltip.types.d.ts +3 -3
- package/tooltip/src/tooltip-panel/tooltip-panel.component.d.ts +4 -4
- package/tooltip/src/tooltip-trigger/tooltip-trigger.directive.d.ts +2 -2
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-DTzDhrMk.mjs.map +0 -1
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-BgdQk6tM.mjs +0 -27
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-BgdQk6tM.mjs.map +0 -1
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs +0 -68
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs.map +0 -1
|
@@ -12,21 +12,21 @@ import { SdsTooltipDirective } from '@seniorsistemas/scala-ng/tooltip';
|
|
|
12
12
|
|
|
13
13
|
const PAGE_STEP_MULTIPLIER = 10;
|
|
14
14
|
const NAVIGATION_KEYS = new Set([
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
'ArrowRight',
|
|
16
|
+
'ArrowUp',
|
|
17
|
+
'ArrowLeft',
|
|
18
|
+
'ArrowDown',
|
|
19
|
+
'PageUp',
|
|
20
|
+
'PageDown',
|
|
21
|
+
'Home',
|
|
22
|
+
'End',
|
|
23
23
|
]);
|
|
24
24
|
// The native range input is invisible and only receives pointer events on its thumb, so the
|
|
25
25
|
// custom visuals underneath stay in charge of the look while the browser drives semantics,
|
|
26
26
|
// keyboard and touch.
|
|
27
|
-
const THUMB_INPUT_BASE_CLASS =
|
|
28
|
-
const THUMB_INPUT_INTERACTIVE_CLASS =
|
|
29
|
-
const FOCUS_RING_CLASS =
|
|
27
|
+
const THUMB_INPUT_BASE_CLASS = 'absolute -left-3 top-1/2 m-0 h-6 w-[calc(100%+24px)] -translate-y-1/2 appearance-none bg-transparent opacity-0 outline-none pointer-events-none';
|
|
28
|
+
const THUMB_INPUT_INTERACTIVE_CLASS = 'cursor-pointer [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:size-6 [&::-webkit-slider-thumb]:appearance-none [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:size-6 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:border-0';
|
|
29
|
+
const FOCUS_RING_CLASS = 'outline outline-2 outline-offset-2 outline-color-border-focused';
|
|
30
30
|
class SdsSliderComponent {
|
|
31
31
|
static idCounter = 0;
|
|
32
32
|
static nextId() {
|
|
@@ -36,15 +36,15 @@ class SdsSliderComponent {
|
|
|
36
36
|
/** Text shown above (or beside) the control; used as `aria-label` when `showLabel` is `false`. */
|
|
37
37
|
label = input.required();
|
|
38
38
|
/** Secondary text shown below the label. */
|
|
39
|
-
description = input(
|
|
39
|
+
description = input('');
|
|
40
40
|
/** Shows the label text; when `false`, the label is kept as the accessible name. */
|
|
41
41
|
showLabel = input(true);
|
|
42
42
|
/** Shows the description when `description` is non-empty. */
|
|
43
43
|
showDescription = input(true);
|
|
44
44
|
/** `"stacked"`: text above the control. `"row"`: text on the left, control on the right. */
|
|
45
|
-
layout = input(
|
|
45
|
+
layout = input('stacked');
|
|
46
46
|
/** `"single"`: one value (`number`). `"range"`: two thumbs (`[start, end]`). */
|
|
47
|
-
type = input(
|
|
47
|
+
type = input('single');
|
|
48
48
|
/** Lowest selectable value. */
|
|
49
49
|
min = input(0);
|
|
50
50
|
/** Highest selectable value. */
|
|
@@ -52,7 +52,7 @@ class SdsSliderComponent {
|
|
|
52
52
|
/** Increment applied by the pointer, the keyboard and the numeric field. */
|
|
53
53
|
step = input(1);
|
|
54
54
|
/** Unit shown after the numeric field and in `aria-valuetext` (e.g. `"%"`). */
|
|
55
|
-
unit = input(
|
|
55
|
+
unit = input('%');
|
|
56
56
|
/** Shows the synchronized numeric field(s); recommended whenever the exact number matters. */
|
|
57
57
|
showInput = input(true);
|
|
58
58
|
/** Shows the min and max labels below the track. */
|
|
@@ -76,10 +76,10 @@ class SdsSliderComponent {
|
|
|
76
76
|
host = inject(ElementRef);
|
|
77
77
|
destroyRef = inject(DestroyRef);
|
|
78
78
|
ngControl;
|
|
79
|
-
startControl = new FormControl(
|
|
80
|
-
endControl = new FormControl(
|
|
81
|
-
startText = toSignal(this.startControl.valueChanges, { initialValue:
|
|
82
|
-
endText = toSignal(this.endControl.valueChanges, { initialValue:
|
|
79
|
+
startControl = new FormControl('', { nonNullable: true });
|
|
80
|
+
endControl = new FormControl('', { nonNullable: true });
|
|
81
|
+
startText = toSignal(this.startControl.valueChanges, { initialValue: '' });
|
|
82
|
+
endText = toSignal(this.endControl.valueChanges, { initialValue: '' });
|
|
83
83
|
formDisabled = signal(false);
|
|
84
84
|
isControlInvalid = signal(false);
|
|
85
85
|
isControlTouched = signal(false);
|
|
@@ -94,22 +94,22 @@ class SdsSliderComponent {
|
|
|
94
94
|
customDragging = false;
|
|
95
95
|
rawStart = signal(null);
|
|
96
96
|
rawEnd = signal(null);
|
|
97
|
-
isRange = computed(() => this.type() ===
|
|
98
|
-
isRow = computed(() => this.layout() ===
|
|
97
|
+
isRange = computed(() => this.type() === 'range');
|
|
98
|
+
isRow = computed(() => this.layout() === 'row');
|
|
99
99
|
isDisabled = computed(() => this.disabled() || this.formDisabled());
|
|
100
100
|
isReadonly = computed(() => this.readonly() && !this.isDisabled());
|
|
101
101
|
isInteractive = computed(() => !this.isDisabled() && !this.isReadonly());
|
|
102
102
|
// Same trigger as `sds-input-feedback`, so the message and the ARIA/visual error never disagree.
|
|
103
103
|
isError = computed(() => this.isControlInvalid() && (this.isControlTouched() || this.isControlDirty()));
|
|
104
|
-
hasDescription = computed(() => this.showDescription() && this.description() !==
|
|
104
|
+
hasDescription = computed(() => this.showDescription() && this.description() !== '');
|
|
105
105
|
hasErrorMessage = computed(() => this.isError() && !!this.errorMessages());
|
|
106
|
-
thumbKeys = computed(() => this.isRange() ? [
|
|
106
|
+
thumbKeys = computed(() => this.isRange() ? ['start', 'end'] : ['end']);
|
|
107
107
|
decimalPlaces = computed(() => {
|
|
108
108
|
const stepText = String(this.step());
|
|
109
|
-
const separatorIndex = stepText.indexOf(
|
|
109
|
+
const separatorIndex = stepText.indexOf('.');
|
|
110
110
|
return separatorIndex === -1 ? 0 : stepText.length - separatorIndex - 1;
|
|
111
111
|
});
|
|
112
|
-
inputMode = computed(() => (this.decimalPlaces() > 0 ?
|
|
112
|
+
inputMode = computed(() => (this.decimalPlaces() > 0 ? 'decimal' : 'numeric'));
|
|
113
113
|
endValue = computed(() => {
|
|
114
114
|
const fallback = this.isRange() ? this.max() : this.min();
|
|
115
115
|
return this.normalize(this.rawEnd() ?? fallback);
|
|
@@ -121,18 +121,18 @@ class SdsSliderComponent {
|
|
|
121
121
|
resolvedMaxLabel = computed(() => this.maxLabel() ?? `${this.max()}${this.unit()}`);
|
|
122
122
|
fieldState = computed(() => {
|
|
123
123
|
if (this.isError()) {
|
|
124
|
-
return
|
|
124
|
+
return 'invalid';
|
|
125
125
|
}
|
|
126
|
-
return this.isReadonly() ?
|
|
126
|
+
return this.isReadonly() ? 'readOnly' : undefined;
|
|
127
127
|
});
|
|
128
128
|
/** Clicking the visible label focuses the first thumb, which is a native, labelable input. */
|
|
129
129
|
labelFor = computed(() => this.thumbInputId(this.thumbKeys()[0]));
|
|
130
130
|
thumbInputClasses = computed(() => {
|
|
131
|
-
const interactive = this.isInteractive() ? ` ${THUMB_INPUT_INTERACTIVE_CLASS}` :
|
|
131
|
+
const interactive = this.isInteractive() ? ` ${THUMB_INPUT_INTERACTIVE_CLASS}` : '';
|
|
132
132
|
// When both thumbs overlap near the end, the start thumb must stay reachable.
|
|
133
133
|
const startOnTop = this.percentOf(this.startValue()) > 50;
|
|
134
134
|
return {
|
|
135
|
-
start: `${THUMB_INPUT_BASE_CLASS}${interactive} ${startOnTop ?
|
|
135
|
+
start: `${THUMB_INPUT_BASE_CLASS}${interactive} ${startOnTop ? 'z-30' : 'z-20'}`,
|
|
136
136
|
end: `${THUMB_INPUT_BASE_CLASS}${interactive} z-20`,
|
|
137
137
|
};
|
|
138
138
|
});
|
|
@@ -148,50 +148,50 @@ class SdsSliderComponent {
|
|
|
148
148
|
});
|
|
149
149
|
describedBy = computed(() => {
|
|
150
150
|
const ids = this.describedByIds();
|
|
151
|
-
return ids.length > 0 ? ids.join(
|
|
151
|
+
return ids.length > 0 ? ids.join(' ') : null;
|
|
152
152
|
});
|
|
153
153
|
/** The numeric field also reads the visible unit, which sits outside the native `<input>`. */
|
|
154
154
|
fieldAttrs = computed(() => {
|
|
155
155
|
const build = (thumb) => {
|
|
156
156
|
const ids = this.unit() ? [`${this.sliderId()}-unit-${thumb}`] : [];
|
|
157
157
|
ids.push(...this.describedByIds());
|
|
158
|
-
return {
|
|
158
|
+
return { 'aria-describedby': ids.length > 0 ? ids.join(' ') : null };
|
|
159
159
|
};
|
|
160
|
-
return { start: build(
|
|
160
|
+
return { start: build('start'), end: build('end') };
|
|
161
161
|
});
|
|
162
162
|
railClass = computed(() => {
|
|
163
163
|
if (this.isDisabled()) {
|
|
164
|
-
return
|
|
164
|
+
return 'bg-color-background-disable';
|
|
165
165
|
}
|
|
166
166
|
if (this.isReadonly()) {
|
|
167
|
-
return
|
|
167
|
+
return 'border border-solid border-color-border-disable';
|
|
168
168
|
}
|
|
169
169
|
if (this.isDragging()) {
|
|
170
|
-
return
|
|
170
|
+
return 'bg-color-background-interactive-secondary-bold-pressed';
|
|
171
171
|
}
|
|
172
172
|
if (this.isTrackHovered()) {
|
|
173
|
-
return
|
|
173
|
+
return 'bg-color-background-interactive-secondary-bold-hovered';
|
|
174
174
|
}
|
|
175
|
-
return
|
|
175
|
+
return 'bg-color-background-interactive-secondary-bold';
|
|
176
176
|
});
|
|
177
177
|
fillClass = computed(() => {
|
|
178
178
|
if (this.isDisabled()) {
|
|
179
|
-
return
|
|
179
|
+
return 'bg-color-icon-disable';
|
|
180
180
|
}
|
|
181
181
|
if (this.isReadonly()) {
|
|
182
|
-
return
|
|
182
|
+
return 'bg-color-border-bold';
|
|
183
183
|
}
|
|
184
184
|
if (this.isDragging()) {
|
|
185
|
-
return
|
|
185
|
+
return 'bg-color-background-selected-bold-pressed';
|
|
186
186
|
}
|
|
187
187
|
if (this.isTrackHovered()) {
|
|
188
|
-
return
|
|
188
|
+
return 'bg-color-background-selected-bold-hovered';
|
|
189
189
|
}
|
|
190
|
-
return
|
|
190
|
+
return 'bg-color-background-selected-bold';
|
|
191
191
|
});
|
|
192
192
|
thumbVisuals = computed(() => ({
|
|
193
|
-
start: this.buildThumbVisual(
|
|
194
|
-
end: this.buildThumbVisual(
|
|
193
|
+
start: this.buildThumbVisual('start'),
|
|
194
|
+
end: this.buildThumbVisual('end'),
|
|
195
195
|
}));
|
|
196
196
|
thumbPercents = computed(() => ({
|
|
197
197
|
start: this.percentOf(this.startValue()),
|
|
@@ -215,10 +215,10 @@ class SdsSliderComponent {
|
|
|
215
215
|
// The field being edited keeps the user's text until it is committed.
|
|
216
216
|
untracked(() => {
|
|
217
217
|
const editing = this.focusedField();
|
|
218
|
-
if (editing !==
|
|
218
|
+
if (editing !== 'start') {
|
|
219
219
|
this.startControl.setValue(startText);
|
|
220
220
|
}
|
|
221
|
-
if (editing !==
|
|
221
|
+
if (editing !== 'end') {
|
|
222
222
|
this.endControl.setValue(endText);
|
|
223
223
|
}
|
|
224
224
|
});
|
|
@@ -261,7 +261,7 @@ class SdsSliderComponent {
|
|
|
261
261
|
}
|
|
262
262
|
if (event.target instanceof HTMLInputElement) {
|
|
263
263
|
// The browser drives the drag of a native thumb; only the visual state is tracked here.
|
|
264
|
-
this.activeThumb.set(event.target.dataset[
|
|
264
|
+
this.activeThumb.set(event.target.dataset['sliderThumb']);
|
|
265
265
|
this.isDragging.set(true);
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
@@ -322,27 +322,27 @@ class SdsSliderComponent {
|
|
|
322
322
|
let next;
|
|
323
323
|
// Plain arrows, Home and End are native; only the ten-step keys are handled here.
|
|
324
324
|
switch (event.key) {
|
|
325
|
-
case
|
|
326
|
-
case
|
|
325
|
+
case 'ArrowRight':
|
|
326
|
+
case 'ArrowUp': {
|
|
327
327
|
if (!event.shiftKey) {
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
330
|
next = current + largeStep;
|
|
331
331
|
break;
|
|
332
332
|
}
|
|
333
|
-
case
|
|
334
|
-
case
|
|
333
|
+
case 'ArrowLeft':
|
|
334
|
+
case 'ArrowDown': {
|
|
335
335
|
if (!event.shiftKey) {
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
next = current - largeStep;
|
|
339
339
|
break;
|
|
340
340
|
}
|
|
341
|
-
case
|
|
341
|
+
case 'PageUp': {
|
|
342
342
|
next = current + largeStep;
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
case
|
|
345
|
+
case 'PageDown': {
|
|
346
346
|
next = current - largeStep;
|
|
347
347
|
break;
|
|
348
348
|
}
|
|
@@ -358,7 +358,7 @@ class SdsSliderComponent {
|
|
|
358
358
|
if (this.isDragging()) {
|
|
359
359
|
return;
|
|
360
360
|
}
|
|
361
|
-
if (event.target.matches(
|
|
361
|
+
if (event.target.matches(':focus-visible')) {
|
|
362
362
|
this.focusedThumb.set(thumb);
|
|
363
363
|
}
|
|
364
364
|
}
|
|
@@ -372,18 +372,18 @@ class SdsSliderComponent {
|
|
|
372
372
|
this.onTouched();
|
|
373
373
|
}
|
|
374
374
|
onFieldKeydown(event, thumb) {
|
|
375
|
-
if (event.key ===
|
|
375
|
+
if (event.key === 'Enter') {
|
|
376
376
|
this.commitField(thumb);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
clearField(thumb) {
|
|
380
|
-
this.controlOf(thumb).setValue(
|
|
380
|
+
this.controlOf(thumb).setValue('');
|
|
381
381
|
this.host.nativeElement
|
|
382
382
|
.querySelector(`[data-slider-field="${thumb}"] input`)
|
|
383
383
|
?.focus();
|
|
384
384
|
}
|
|
385
385
|
hasFieldText(thumb) {
|
|
386
|
-
return (thumb ===
|
|
386
|
+
return (thumb === 'start' ? this.startText() : this.endText()) !== '';
|
|
387
387
|
}
|
|
388
388
|
get control() {
|
|
389
389
|
return this.ngControl?.control ?? null;
|
|
@@ -395,12 +395,12 @@ class SdsSliderComponent {
|
|
|
395
395
|
return this.fieldAttrs()[thumb];
|
|
396
396
|
}
|
|
397
397
|
controlOf(thumb) {
|
|
398
|
-
return thumb ===
|
|
398
|
+
return thumb === 'start' ? this.startControl : this.endControl;
|
|
399
399
|
}
|
|
400
400
|
commitField(thumb) {
|
|
401
401
|
const control = this.controlOf(thumb);
|
|
402
|
-
const text = control.value.trim().replace(
|
|
403
|
-
const parsed = text ===
|
|
402
|
+
const text = control.value.trim().replace(',', '.');
|
|
403
|
+
const parsed = text === '' ? Number.NaN : Number(text);
|
|
404
404
|
if (Number.isFinite(parsed)) {
|
|
405
405
|
this.setThumbValue(thumb, parsed);
|
|
406
406
|
}
|
|
@@ -411,7 +411,7 @@ class SdsSliderComponent {
|
|
|
411
411
|
const normalized = this.normalize(rawValue);
|
|
412
412
|
const previousStart = this.startValue();
|
|
413
413
|
const previousEnd = this.endValue();
|
|
414
|
-
if (thumb ===
|
|
414
|
+
if (thumb === 'start') {
|
|
415
415
|
this.rawStart.set(Math.min(normalized, previousEnd));
|
|
416
416
|
}
|
|
417
417
|
else {
|
|
@@ -428,15 +428,15 @@ class SdsSliderComponent {
|
|
|
428
428
|
}
|
|
429
429
|
nearestThumb(pointerValue) {
|
|
430
430
|
if (!this.isRange()) {
|
|
431
|
-
return
|
|
431
|
+
return 'end';
|
|
432
432
|
}
|
|
433
433
|
const startDistance = Math.abs(pointerValue - this.startValue());
|
|
434
434
|
const endDistance = Math.abs(pointerValue - this.endValue());
|
|
435
435
|
if (startDistance !== endDistance) {
|
|
436
|
-
return startDistance < endDistance ?
|
|
436
|
+
return startDistance < endDistance ? 'start' : 'end';
|
|
437
437
|
}
|
|
438
438
|
// Both thumbs overlap: pick the one that can move toward the pointer.
|
|
439
|
-
return pointerValue < this.startValue() ?
|
|
439
|
+
return pointerValue < this.startValue() ? 'start' : 'end';
|
|
440
440
|
}
|
|
441
441
|
valueFromClientX(trackElement, clientX) {
|
|
442
442
|
const { left, width } = trackElement.getBoundingClientRect();
|
|
@@ -467,26 +467,26 @@ class SdsSliderComponent {
|
|
|
467
467
|
}
|
|
468
468
|
buildThumbVisual(thumb) {
|
|
469
469
|
if (this.isDisabled()) {
|
|
470
|
-
return { halo: null, face:
|
|
470
|
+
return { halo: null, face: 'bg-color-icon-disable' };
|
|
471
471
|
}
|
|
472
472
|
if (this.isReadonly()) {
|
|
473
|
-
return { halo: null, face:
|
|
473
|
+
return { halo: null, face: 'bg-color-border-bold' };
|
|
474
474
|
}
|
|
475
|
-
const face =
|
|
475
|
+
const face = 'border-2 border-solid border-color-border-selected bg-color-icon-interactive-primary';
|
|
476
476
|
if (this.isDragging() && this.activeThumb() === thumb) {
|
|
477
|
-
return { halo:
|
|
477
|
+
return { halo: 'bg-color-background-selected-pressed', face };
|
|
478
478
|
}
|
|
479
479
|
if (this.hoveredThumb() === thumb) {
|
|
480
|
-
return { halo:
|
|
480
|
+
return { halo: 'bg-color-background-selected-hovered', face };
|
|
481
481
|
}
|
|
482
482
|
return { halo: null, face };
|
|
483
483
|
}
|
|
484
484
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsSliderComponent, isStandalone: true, selector: "sds-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showDescription: { classPropertyName: "showDescription", publicName: "showDescription", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, showInput: { classPropertyName: "showInput", publicName: "showInput", isSignal: true, isRequired: false, transformFunction: null }, showRangeLabels: { classPropertyName: "showRangeLabels", publicName: "showRangeLabels", isSignal: true, isRequired: false, transformFunction: null }, minLabel: { classPropertyName: "minLabel", publicName: "minLabel", isSignal: true, isRequired: false, transformFunction: null }, maxLabel: { classPropertyName: "maxLabel", publicName: "maxLabel", isSignal: true, isRequired: false, transformFunction: null }, showValueTooltip: { classPropertyName: "showValueTooltip", publicName: "showValueTooltip", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, sliderId: { classPropertyName: "sliderId", publicName: "sliderId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, ngImport: i0, template: "<div\n class=\"flex w-full\"\n [ngClass]=\"isRow() ? 'items-center gap-space-4' : 'flex-col gap-space-1'\"\n>\n @if (showLabel() || hasDescription()) {\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n >\n @if (showLabel()) {\n <label\n class=\"select-none text-font-size-2 font-font-weight-medium leading-line-height-125\"\n [id]=\"sliderId() + '-label'\"\n [attr.for]=\"labelFor()\"\n [class.cursor-pointer]=\"!isDisabled()\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-primary'\"\n >{{ label() }}</label\n >\n }\n @if (hasDescription()) {\n <span\n class=\"select-none text-font-size-2 font-font-weight-regular leading-line-height-150\"\n [id]=\"sliderId() + '-description'\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\"\n >{{ description() }}</span\n >\n }\n </div>\n }\n\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n [class.w-full]=\"!isRow()\"\n >\n <div class=\"flex items-start gap-space-2\">\n @if (showInput() && isRange()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'start' }\" />\n }\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-space-0-50 pt-space-1-5\">\n <div\n class=\"relative flex h-4 touch-none items-center\"\n [class.cursor-pointer]=\"isInteractive()\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerEnd($event)\"\n (pointercancel)=\"onTrackPointerEnd($event)\"\n (pointerenter)=\"isTrackHovered.set(isInteractive())\"\n (pointerleave)=\"isTrackHovered.set(false)\"\n >\n <div\n class=\"absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"railClass()\"\n ></div>\n <div\n class=\"absolute top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"fillClass()\"\n [style.left.%]=\"fillStartPercent()\"\n [style.width.%]=\"fillWidthPercent()\"\n ></div>\n\n @for (thumb of thumbKeys(); track thumb) {\n @let visual = thumbVisuals()[thumb];\n @let thumbLabel =\n isRange()\n ? thumb === \"start\"\n ? (\"platform.scala-ng.slider_range_start\" | translate: { label: label() })\n : (\"platform.scala-ng.slider_range_end\" | translate: { label: label() })\n : label();\n <div\n class=\"pointer-events-none absolute top-1/2 z-10 flex size-6 -translate-x-1/2 -translate-y-1/2 items-center justify-center\"\n aria-hidden=\"true\"\n [style.left.%]=\"thumbPercents()[thumb]\"\n >\n @if (visual.halo) {\n <span\n class=\"absolute size-8 rounded-radius-full\"\n [ngClass]=\"visual.halo\"\n ></span>\n }\n <span\n #thumbCircle\n class=\"relative size-4 rounded-radius-full bg-surface-default\"\n [ngClass]=\"focusedThumb() === thumb ? focusRingClass : ''\"\n >\n <span\n class=\"absolute inset-0 rounded-radius-full\"\n [ngClass]=\"visual.face\"\n ></span>\n </span>\n </div>\n\n <input\n type=\"range\"\n [id]=\"thumbInputId(thumb)\"\n [ngClass]=\"thumbInputClasses()[thumb]\"\n [attr.data-slider-thumb]=\"thumb\"\n [attr.aria-label]=\"thumbLabel\"\n [attr.aria-valuetext]=\"thumbValues()[thumb] + unit()\"\n [attr.aria-readonly]=\"isReadonly() ? 'true' : null\"\n [attr.aria-invalid]=\"isError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [sdsTooltip]=\"thumbValues()[thumb] + unit()\"\n [sdsTooltipAnchor]=\"thumbCircle\"\n sdsTooltipPosition=\"top\"\n [sdsTooltipDisabled]=\"!showValueTooltip() || !isInteractive()\"\n [sdsTooltipKeepOpenOnPress]=\"true\"\n [sdsTooltipDescribeHost]=\"false\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [disabled]=\"isDisabled()\"\n [value]=\"thumbValues()[thumb]\"\n (input)=\"onThumbInput($event, thumb)\"\n (change)=\"onThumbChange()\"\n (keydown)=\"onThumbKeydown($event, thumb)\"\n (focus)=\"onThumbFocus($event, thumb)\"\n (blur)=\"onThumbBlur()\"\n (pointerenter)=\"hoveredThumb.set(thumb)\"\n (pointerleave)=\"hoveredThumb.set(null)\"\n />\n }\n </div>\n\n @if (showRangeLabels()) {\n <div\n class=\"flex select-none items-start justify-between text-font-size-1 leading-line-height-150\"\n aria-hidden=\"true\"\n [ngClass]=\"\n isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\n \"\n >\n <span>{{ resolvedMinLabel() }}</span>\n <span>{{ resolvedMaxLabel() }}</span>\n </div>\n }\n </div>\n\n @if (showInput()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'end' }\" />\n }\n </div>\n\n @if (errorMessages(); as messages) {\n @if (control; as errorControl) {\n <div [id]=\"sliderId() + '-error'\">\n <sds-input-feedback\n [control]=\"errorControl\"\n [errorMessages]=\"messages\"\n />\n </div>\n }\n }\n </div>\n</div>\n\n<ng-template\n #fieldTemplate\n let-thumb\n>\n @let fieldLabel =\n isRange()\n ? thumb === \"start\"\n ? (\"platform.scala-ng.slider_range_start\" | translate: { label: label() })\n : (\"platform.scala-ng.slider_range_end\" | translate: { label: label() })\n : label();\n <div\n class=\"w-[104px] shrink-0\"\n [attr.data-slider-field]=\"thumb\"\n >\n <sds-input\n inputClassName=\"text-right\"\n [label]=\"fieldLabel\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [inputId]=\"sliderId() + '-' + thumb\"\n [inputMode]=\"inputMode()\"\n [formControl]=\"controlOf(thumb)\"\n [readonly]=\"isReadonly()\"\n [state]=\"fieldState()\"\n [nativeInputAttrs]=\"fieldAttrsOf(thumb)\"\n (focusIn)=\"focusedField.set(thumb)\"\n (focusOut)=\"onFieldBlur(thumb)\"\n (inputKeydown)=\"onFieldKeydown($event, thumb)\"\n >\n @if (unit()) {\n <span\n class=\"shrink-0 select-none text-font-size-3 leading-line-height-150 text-color-text-neutral-secondary\"\n sdsInputTrailing\n [id]=\"sliderId() + '-unit-' + thumb\"\n >{{ unit() }}</span\n >\n }\n @if (isInteractive() && hasFieldText(thumb)) {\n <button\n type=\"button\"\n sdsInputTrailing\n tabindex=\"-1\"\n class=\"shrink-0 cursor-pointer rounded-radius-small p-0 text-[14px] text-color-text-neutral-secondary outline-none hover:text-color-text-neutral-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-color-border-focused\"\n [attr.aria-label]=\"'platform.scala-ng.slider_clear_value' | translate\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearField(thumb)\"\n >\n <i\n class=\"fa-solid fa-xmark\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </sds-input>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SdsInputComponent, selector: "sds-input", inputs: ["label", "subtitle", "icon", "type", "placeholder", "size", "readonly", "showDefaultIcon", "showNativeDropdown", "errorMessages", "validMessage", "adviceMessage", "inputClassName", "containerClassName", "showLabel", "showHelper", "required", "state", "nativeInputAttrs", "inputId", "mask", "unmask", "maskPatterns", "showMaskTyped", "placeHolderCharacter", "prefix", "suffix", "clearIfNotMatch", "leadZeroDateTime", "hiddenInput", "inputMode", "maskHint", "separator", "thousandSeparator", "decimalDigits"], outputs: ["focusIn", "focusOut", "inputClick", "inputKeydown", "maskFilled"] }, { kind: "component", type: SdsInputFeedbackComponent, selector: "sds-input-feedback", inputs: ["control", "errorMessages", "validMessage", "adviceMessage"] }, { kind: "directive", type: SdsTooltipDirective, selector: "[sdsTooltip]", inputs: ["sdsTooltip", "sdsTooltipContext", "sdsTooltipTitle", "sdsTooltipPosition", "sdsTooltipShowArrow", "sdsTooltipOpenDelay", "sdsTooltipTouchDismiss", "sdsTooltipDisabled", "sdsTooltipCheckTruncatedText", "sdsTooltipFocusable", "sdsTooltipDescribeHost", "sdsTooltipAnchor", "sdsTooltipKeepOpenOnPress"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
485
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsSliderComponent, isStandalone: true, selector: "sds-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showDescription: { classPropertyName: "showDescription", publicName: "showDescription", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, showInput: { classPropertyName: "showInput", publicName: "showInput", isSignal: true, isRequired: false, transformFunction: null }, showRangeLabels: { classPropertyName: "showRangeLabels", publicName: "showRangeLabels", isSignal: true, isRequired: false, transformFunction: null }, minLabel: { classPropertyName: "minLabel", publicName: "minLabel", isSignal: true, isRequired: false, transformFunction: null }, maxLabel: { classPropertyName: "maxLabel", publicName: "maxLabel", isSignal: true, isRequired: false, transformFunction: null }, showValueTooltip: { classPropertyName: "showValueTooltip", publicName: "showValueTooltip", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, sliderId: { classPropertyName: "sliderId", publicName: "sliderId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, ngImport: i0, template: "<div\n class=\"flex w-full\"\n [ngClass]=\"isRow() ? 'items-center gap-space-4' : 'flex-col gap-space-1'\"\n>\n @if (showLabel() || hasDescription()) {\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n >\n @if (showLabel()) {\n <label\n class=\"select-none text-font-size-2 font-font-weight-medium leading-line-height-125\"\n [id]=\"sliderId() + '-label'\"\n [attr.for]=\"labelFor()\"\n [class.cursor-pointer]=\"!isDisabled()\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-primary'\"\n >{{ label() }}</label\n >\n }\n @if (hasDescription()) {\n <span\n class=\"select-none text-font-size-2 font-font-weight-regular leading-line-height-150\"\n [id]=\"sliderId() + '-description'\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\"\n >{{ description() }}</span\n >\n }\n </div>\n }\n\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n [class.w-full]=\"!isRow()\"\n >\n <div class=\"flex items-start gap-space-2\">\n @if (showInput() && isRange()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'start' }\" />\n }\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-space-0-50 pt-space-1-5\">\n <div\n class=\"relative flex h-4 touch-none items-center\"\n [class.cursor-pointer]=\"isInteractive()\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerEnd($event)\"\n (pointercancel)=\"onTrackPointerEnd($event)\"\n (pointerenter)=\"isTrackHovered.set(isInteractive())\"\n (pointerleave)=\"isTrackHovered.set(false)\"\n >\n <div\n class=\"absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"railClass()\"\n ></div>\n <div\n class=\"absolute top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"fillClass()\"\n [style.left.%]=\"fillStartPercent()\"\n [style.width.%]=\"fillWidthPercent()\"\n ></div>\n\n @for (thumb of thumbKeys(); track thumb) {\n @let visual = thumbVisuals()[thumb];\n @let thumbLabel =\n isRange()\n ? thumb === 'start'\n ? ('platform.scala-ng.slider_range_start' | translate: { label: label() })\n : ('platform.scala-ng.slider_range_end' | translate: { label: label() })\n : label();\n <div\n class=\"pointer-events-none absolute top-1/2 z-10 flex size-6 -translate-x-1/2 -translate-y-1/2 items-center justify-center\"\n aria-hidden=\"true\"\n [style.left.%]=\"thumbPercents()[thumb]\"\n >\n @if (visual.halo) {\n <span\n class=\"absolute size-8 rounded-radius-full\"\n [ngClass]=\"visual.halo\"\n ></span>\n }\n <span\n #thumbCircle\n class=\"relative size-4 rounded-radius-full bg-surface-default\"\n [ngClass]=\"focusedThumb() === thumb ? focusRingClass : ''\"\n >\n <span\n class=\"absolute inset-0 rounded-radius-full\"\n [ngClass]=\"visual.face\"\n ></span>\n </span>\n </div>\n\n <input\n type=\"range\"\n [id]=\"thumbInputId(thumb)\"\n [ngClass]=\"thumbInputClasses()[thumb]\"\n [attr.data-slider-thumb]=\"thumb\"\n [attr.aria-label]=\"thumbLabel\"\n [attr.aria-valuetext]=\"thumbValues()[thumb] + unit()\"\n [attr.aria-readonly]=\"isReadonly() ? 'true' : null\"\n [attr.aria-invalid]=\"isError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [sdsTooltip]=\"thumbValues()[thumb] + unit()\"\n [sdsTooltipAnchor]=\"thumbCircle\"\n sdsTooltipPosition=\"top\"\n [sdsTooltipDisabled]=\"!showValueTooltip() || !isInteractive()\"\n [sdsTooltipKeepOpenOnPress]=\"true\"\n [sdsTooltipDescribeHost]=\"false\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [disabled]=\"isDisabled()\"\n [value]=\"thumbValues()[thumb]\"\n (input)=\"onThumbInput($event, thumb)\"\n (change)=\"onThumbChange()\"\n (keydown)=\"onThumbKeydown($event, thumb)\"\n (focus)=\"onThumbFocus($event, thumb)\"\n (blur)=\"onThumbBlur()\"\n (pointerenter)=\"hoveredThumb.set(thumb)\"\n (pointerleave)=\"hoveredThumb.set(null)\"\n />\n }\n </div>\n\n @if (showRangeLabels()) {\n <div\n class=\"flex select-none items-start justify-between text-font-size-1 leading-line-height-150\"\n aria-hidden=\"true\"\n [ngClass]=\"\n isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\n \"\n >\n <span>{{ resolvedMinLabel() }}</span>\n <span>{{ resolvedMaxLabel() }}</span>\n </div>\n }\n </div>\n\n @if (showInput()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'end' }\" />\n }\n </div>\n\n @if (errorMessages(); as messages) {\n @if (control; as errorControl) {\n <div [id]=\"sliderId() + '-error'\">\n <sds-input-feedback\n [control]=\"errorControl\"\n [errorMessages]=\"messages\"\n />\n </div>\n }\n }\n </div>\n</div>\n\n<ng-template\n #fieldTemplate\n let-thumb\n>\n @let fieldLabel =\n isRange()\n ? thumb === 'start'\n ? ('platform.scala-ng.slider_range_start' | translate: { label: label() })\n : ('platform.scala-ng.slider_range_end' | translate: { label: label() })\n : label();\n <div\n class=\"w-[104px] shrink-0\"\n [attr.data-slider-field]=\"thumb\"\n >\n <sds-input\n inputClassName=\"text-right\"\n [label]=\"fieldLabel\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [inputId]=\"sliderId() + '-' + thumb\"\n [inputMode]=\"inputMode()\"\n [formControl]=\"controlOf(thumb)\"\n [readonly]=\"isReadonly()\"\n [state]=\"fieldState()\"\n [nativeInputAttrs]=\"fieldAttrsOf(thumb)\"\n (focusIn)=\"focusedField.set(thumb)\"\n (focusOut)=\"onFieldBlur(thumb)\"\n (inputKeydown)=\"onFieldKeydown($event, thumb)\"\n >\n @if (unit()) {\n <span\n class=\"shrink-0 select-none text-font-size-3 leading-line-height-150 text-color-text-neutral-secondary\"\n sdsInputTrailing\n [id]=\"sliderId() + '-unit-' + thumb\"\n >{{ unit() }}</span\n >\n }\n @if (isInteractive() && hasFieldText(thumb)) {\n <button\n type=\"button\"\n sdsInputTrailing\n tabindex=\"-1\"\n class=\"shrink-0 cursor-pointer rounded-radius-small p-0 text-[14px] text-color-text-neutral-secondary outline-none hover:text-color-text-neutral-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-color-border-focused\"\n [attr.aria-label]=\"'platform.scala-ng.slider_clear_value' | translate\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearField(thumb)\"\n >\n <i\n class=\"fa-solid fa-xmark\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </sds-input>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SdsInputComponent, selector: "sds-input", inputs: ["label", "subtitle", "icon", "type", "placeholder", "size", "readonly", "showDefaultIcon", "showNativeDropdown", "errorMessages", "validMessage", "adviceMessage", "inputClassName", "containerClassName", "showLabel", "showHelper", "required", "loading", "state", "nativeInputAttrs", "inputId", "mask", "unmask", "maskPatterns", "showMaskTyped", "placeHolderCharacter", "prefix", "suffix", "clearIfNotMatch", "leadZeroDateTime", "hiddenInput", "inputMode", "maskHint", "separator", "thousandSeparator", "decimalDigits"], outputs: ["focusIn", "focusOut", "inputClick", "inputKeydown", "maskFilled"] }, { kind: "component", type: SdsInputFeedbackComponent, selector: "sds-input-feedback", inputs: ["control", "errorMessages", "validMessage", "adviceMessage"] }, { kind: "directive", type: SdsTooltipDirective, selector: "[sdsTooltip]", inputs: ["sdsTooltip", "sdsTooltipContext", "sdsTooltipTitle", "sdsTooltipPosition", "sdsTooltipShowArrow", "sdsTooltipOpenDelay", "sdsTooltipTouchDismiss", "sdsTooltipDisabled", "sdsTooltipCheckTruncatedText", "sdsTooltipFocusable", "sdsTooltipDescribeHost", "sdsTooltipAnchor", "sdsTooltipKeepOpenOnPress"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
486
486
|
}
|
|
487
487
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsSliderComponent, decorators: [{
|
|
488
488
|
type: Component,
|
|
489
|
-
args: [{ selector:
|
|
489
|
+
args: [{ selector: 'sds-slider', standalone: true, imports: [
|
|
490
490
|
NgClass,
|
|
491
491
|
NgTemplateOutlet,
|
|
492
492
|
ReactiveFormsModule,
|
|
@@ -494,7 +494,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
494
494
|
SdsInputFeedbackComponent,
|
|
495
495
|
SdsTooltipDirective,
|
|
496
496
|
TranslatePipe,
|
|
497
|
-
], template: "<div\n class=\"flex w-full\"\n [ngClass]=\"isRow() ? 'items-center gap-space-4' : 'flex-col gap-space-1'\"\n>\n @if (showLabel() || hasDescription()) {\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n >\n @if (showLabel()) {\n <label\n class=\"select-none text-font-size-2 font-font-weight-medium leading-line-height-125\"\n [id]=\"sliderId() + '-label'\"\n [attr.for]=\"labelFor()\"\n [class.cursor-pointer]=\"!isDisabled()\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-primary'\"\n >{{ label() }}</label\n >\n }\n @if (hasDescription()) {\n <span\n class=\"select-none text-font-size-2 font-font-weight-regular leading-line-height-150\"\n [id]=\"sliderId() + '-description'\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\"\n >{{ description() }}</span\n >\n }\n </div>\n }\n\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n [class.w-full]=\"!isRow()\"\n >\n <div class=\"flex items-start gap-space-2\">\n @if (showInput() && isRange()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'start' }\" />\n }\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-space-0-50 pt-space-1-5\">\n <div\n class=\"relative flex h-4 touch-none items-center\"\n [class.cursor-pointer]=\"isInteractive()\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerEnd($event)\"\n (pointercancel)=\"onTrackPointerEnd($event)\"\n (pointerenter)=\"isTrackHovered.set(isInteractive())\"\n (pointerleave)=\"isTrackHovered.set(false)\"\n >\n <div\n class=\"absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"railClass()\"\n ></div>\n <div\n class=\"absolute top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"fillClass()\"\n [style.left.%]=\"fillStartPercent()\"\n [style.width.%]=\"fillWidthPercent()\"\n ></div>\n\n @for (thumb of thumbKeys(); track thumb) {\n @let visual = thumbVisuals()[thumb];\n @let thumbLabel =\n isRange()\n ? thumb ===
|
|
497
|
+
], template: "<div\n class=\"flex w-full\"\n [ngClass]=\"isRow() ? 'items-center gap-space-4' : 'flex-col gap-space-1'\"\n>\n @if (showLabel() || hasDescription()) {\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n >\n @if (showLabel()) {\n <label\n class=\"select-none text-font-size-2 font-font-weight-medium leading-line-height-125\"\n [id]=\"sliderId() + '-label'\"\n [attr.for]=\"labelFor()\"\n [class.cursor-pointer]=\"!isDisabled()\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-primary'\"\n >{{ label() }}</label\n >\n }\n @if (hasDescription()) {\n <span\n class=\"select-none text-font-size-2 font-font-weight-regular leading-line-height-150\"\n [id]=\"sliderId() + '-description'\"\n [ngClass]=\"isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\"\n >{{ description() }}</span\n >\n }\n </div>\n }\n\n <div\n class=\"flex min-w-0 flex-col gap-space-0-50\"\n [class.flex-1]=\"isRow()\"\n [class.w-full]=\"!isRow()\"\n >\n <div class=\"flex items-start gap-space-2\">\n @if (showInput() && isRange()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'start' }\" />\n }\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-space-0-50 pt-space-1-5\">\n <div\n class=\"relative flex h-4 touch-none items-center\"\n [class.cursor-pointer]=\"isInteractive()\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerEnd($event)\"\n (pointercancel)=\"onTrackPointerEnd($event)\"\n (pointerenter)=\"isTrackHovered.set(isInteractive())\"\n (pointerleave)=\"isTrackHovered.set(false)\"\n >\n <div\n class=\"absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"railClass()\"\n ></div>\n <div\n class=\"absolute top-1/2 h-1 -translate-y-1/2 rounded-radius-full\"\n aria-hidden=\"true\"\n [ngClass]=\"fillClass()\"\n [style.left.%]=\"fillStartPercent()\"\n [style.width.%]=\"fillWidthPercent()\"\n ></div>\n\n @for (thumb of thumbKeys(); track thumb) {\n @let visual = thumbVisuals()[thumb];\n @let thumbLabel =\n isRange()\n ? thumb === 'start'\n ? ('platform.scala-ng.slider_range_start' | translate: { label: label() })\n : ('platform.scala-ng.slider_range_end' | translate: { label: label() })\n : label();\n <div\n class=\"pointer-events-none absolute top-1/2 z-10 flex size-6 -translate-x-1/2 -translate-y-1/2 items-center justify-center\"\n aria-hidden=\"true\"\n [style.left.%]=\"thumbPercents()[thumb]\"\n >\n @if (visual.halo) {\n <span\n class=\"absolute size-8 rounded-radius-full\"\n [ngClass]=\"visual.halo\"\n ></span>\n }\n <span\n #thumbCircle\n class=\"relative size-4 rounded-radius-full bg-surface-default\"\n [ngClass]=\"focusedThumb() === thumb ? focusRingClass : ''\"\n >\n <span\n class=\"absolute inset-0 rounded-radius-full\"\n [ngClass]=\"visual.face\"\n ></span>\n </span>\n </div>\n\n <input\n type=\"range\"\n [id]=\"thumbInputId(thumb)\"\n [ngClass]=\"thumbInputClasses()[thumb]\"\n [attr.data-slider-thumb]=\"thumb\"\n [attr.aria-label]=\"thumbLabel\"\n [attr.aria-valuetext]=\"thumbValues()[thumb] + unit()\"\n [attr.aria-readonly]=\"isReadonly() ? 'true' : null\"\n [attr.aria-invalid]=\"isError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [sdsTooltip]=\"thumbValues()[thumb] + unit()\"\n [sdsTooltipAnchor]=\"thumbCircle\"\n sdsTooltipPosition=\"top\"\n [sdsTooltipDisabled]=\"!showValueTooltip() || !isInteractive()\"\n [sdsTooltipKeepOpenOnPress]=\"true\"\n [sdsTooltipDescribeHost]=\"false\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [disabled]=\"isDisabled()\"\n [value]=\"thumbValues()[thumb]\"\n (input)=\"onThumbInput($event, thumb)\"\n (change)=\"onThumbChange()\"\n (keydown)=\"onThumbKeydown($event, thumb)\"\n (focus)=\"onThumbFocus($event, thumb)\"\n (blur)=\"onThumbBlur()\"\n (pointerenter)=\"hoveredThumb.set(thumb)\"\n (pointerleave)=\"hoveredThumb.set(null)\"\n />\n }\n </div>\n\n @if (showRangeLabels()) {\n <div\n class=\"flex select-none items-start justify-between text-font-size-1 leading-line-height-150\"\n aria-hidden=\"true\"\n [ngClass]=\"\n isDisabled() ? 'text-color-text-disable' : 'text-color-text-neutral-secondary'\n \"\n >\n <span>{{ resolvedMinLabel() }}</span>\n <span>{{ resolvedMaxLabel() }}</span>\n </div>\n }\n </div>\n\n @if (showInput()) {\n <ng-container *ngTemplateOutlet=\"fieldTemplate; context: { $implicit: 'end' }\" />\n }\n </div>\n\n @if (errorMessages(); as messages) {\n @if (control; as errorControl) {\n <div [id]=\"sliderId() + '-error'\">\n <sds-input-feedback\n [control]=\"errorControl\"\n [errorMessages]=\"messages\"\n />\n </div>\n }\n }\n </div>\n</div>\n\n<ng-template\n #fieldTemplate\n let-thumb\n>\n @let fieldLabel =\n isRange()\n ? thumb === 'start'\n ? ('platform.scala-ng.slider_range_start' | translate: { label: label() })\n : ('platform.scala-ng.slider_range_end' | translate: { label: label() })\n : label();\n <div\n class=\"w-[104px] shrink-0\"\n [attr.data-slider-field]=\"thumb\"\n >\n <sds-input\n inputClassName=\"text-right\"\n [label]=\"fieldLabel\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [inputId]=\"sliderId() + '-' + thumb\"\n [inputMode]=\"inputMode()\"\n [formControl]=\"controlOf(thumb)\"\n [readonly]=\"isReadonly()\"\n [state]=\"fieldState()\"\n [nativeInputAttrs]=\"fieldAttrsOf(thumb)\"\n (focusIn)=\"focusedField.set(thumb)\"\n (focusOut)=\"onFieldBlur(thumb)\"\n (inputKeydown)=\"onFieldKeydown($event, thumb)\"\n >\n @if (unit()) {\n <span\n class=\"shrink-0 select-none text-font-size-3 leading-line-height-150 text-color-text-neutral-secondary\"\n sdsInputTrailing\n [id]=\"sliderId() + '-unit-' + thumb\"\n >{{ unit() }}</span\n >\n }\n @if (isInteractive() && hasFieldText(thumb)) {\n <button\n type=\"button\"\n sdsInputTrailing\n tabindex=\"-1\"\n class=\"shrink-0 cursor-pointer rounded-radius-small p-0 text-[14px] text-color-text-neutral-secondary outline-none hover:text-color-text-neutral-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-color-border-focused\"\n [attr.aria-label]=\"'platform.scala-ng.slider_clear_value' | translate\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearField(thumb)\"\n >\n <i\n class=\"fa-solid fa-xmark\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </sds-input>\n </div>\n</ng-template>\n" }]
|
|
498
498
|
}], ctorParameters: () => [] });
|
|
499
499
|
|
|
500
500
|
/**
|