@taiga-ui/kit 4.52.0-canary.ece97e9 → 4.52.0-canary.efbd0d4
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 +1 -1
- package/components/avatar/avatar-labeled.component.d.ts +3 -3
- package/components/avatar/avatar-stack.component.d.ts +2 -2
- package/components/badge/badge.options.d.ts +1 -3
- package/components/badge-notification/badge-notification.component.d.ts +2 -3
- package/components/badge-notification/badge-notification.options.d.ts +1 -3
- package/components/badged-content/badged-content.directive.d.ts +2 -2
- package/components/block/block.options.d.ts +1 -3
- package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
- package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
- package/components/button-loading/button-loading.component.d.ts +5 -5
- package/components/calendar-range/calendar-range.component.d.ts +0 -1
- package/components/calendar-range/day-range-period.d.ts +2 -1
- package/components/carousel/carousel.component.d.ts +15 -18
- package/components/carousel/carousel.directive.d.ts +5 -4
- package/components/chip/chip.options.d.ts +1 -3
- package/components/combo-box/combo-box.d.ts +5 -0
- package/components/combo-box/combo-box.directive.d.ts +7 -9
- package/components/combo-box/index.d.ts +1 -0
- package/components/compass/compass.component.d.ts +2 -2
- package/components/confirm/confirm.component.d.ts +4 -3
- package/components/confirm/confirm.service.d.ts +1 -1
- package/components/copy/copy.component.d.ts +3 -4
- package/components/copy/copy.directive.d.ts +2 -4
- package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
- package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
- package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
- package/components/data-list-wrapper/index.d.ts +1 -1
- package/components/drawer/drawer.component.d.ts +3 -4
- package/components/files/file/file.component.d.ts +16 -29
- package/components/files/file/file.options.d.ts +1 -1
- package/components/files/files/files.component.d.ts +5 -8
- package/components/files/input-files/input-files.component.d.ts +2 -2
- package/components/files/input-files/input-files.content.d.ts +7 -8
- package/components/files/input-files/input-files.directive.d.ts +2 -2
- package/components/files/input-files/input-files.options.d.ts +1 -3
- package/components/filter/filter.component.d.ts +9 -11
- package/components/fullscreen/fullscreen.component.d.ts +5 -8
- package/components/index.d.ts +0 -3
- package/components/input-chip/input-chip.component.d.ts +9 -8
- package/components/input-chip/input-chip.d.ts +5 -1
- package/components/input-chip/input-chip.directive.d.ts +7 -12
- package/components/input-color/index.d.ts +1 -0
- package/components/input-color/input-color.component.d.ts +4 -4
- package/components/input-color/input-color.d.ts +5 -0
- package/components/input-date/input-date.d.ts +4 -1
- package/components/input-date/input-date.directive.d.ts +12 -14
- package/components/input-date/input-date.options.d.ts +3 -3
- package/components/input-date-multi/input-date-multi.d.ts +1 -2
- package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
- package/components/input-date-range/input-date-range.d.ts +4 -1
- package/components/input-date-range/input-date-range.directive.d.ts +5 -8
- package/components/input-date-range/input-date-range.options.d.ts +2 -2
- package/components/input-date-time/input-date-time.d.ts +4 -1
- package/components/input-date-time/input-date-time.directive.d.ts +6 -6
- package/components/input-date-time/input-date-time.options.d.ts +2 -2
- package/components/input-month/input-month.d.ts +4 -1
- package/components/input-month/input-month.directive.d.ts +6 -5
- package/components/input-month-range/input-month-range.d.ts +4 -1
- package/components/input-month-range/input-month-range.directive.d.ts +6 -5
- package/components/input-number/input-number.d.ts +4 -1
- package/components/input-number/input-number.directive.d.ts +5 -7
- package/components/input-number/input-number.options.d.ts +2 -3
- package/components/input-number/step/input-number-step.component.d.ts +2 -1
- package/components/input-phone/index.d.ts +1 -0
- package/components/input-phone/input-phone.d.ts +5 -0
- package/components/input-phone/input-phone.directive.d.ts +7 -7
- package/components/input-phone-international/index.d.ts +1 -0
- package/components/input-phone-international/input-phone-international.component.d.ts +9 -8
- package/components/input-phone-international/input-phone-international.d.ts +5 -0
- package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
- package/components/input-pin/index.d.ts +1 -0
- package/components/input-pin/input-pin.component.d.ts +3 -3
- package/components/input-pin/input-pin.d.ts +5 -0
- package/components/input-range/index.d.ts +0 -1
- package/components/input-range/input-range.component.d.ts +5 -4
- package/components/input-slider/input-slider.d.ts +4 -1
- package/components/input-slider/input-slider.directive.d.ts +1 -1
- package/components/input-time/input-time.component.d.ts +1 -3
- package/components/input-time/input-time.d.ts +4 -1
- package/components/input-time/input-time.directive.d.ts +4 -4
- package/components/input-year/input-year.d.ts +4 -1
- package/components/input-year/input-year.directive.d.ts +5 -5
- package/components/input-year/input-year.options.d.ts +2 -2
- package/components/like/like.options.d.ts +1 -1
- package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
- package/components/line-clamp/line-clamp.options.d.ts +1 -3
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
- package/components/notification-middle/notification-middle.component.d.ts +2 -2
- package/components/notification-middle/notification-middle.directive.d.ts +4 -3
- package/components/notification-middle/notification-middle.service.d.ts +7 -3
- package/components/pagination/pagination.component.d.ts +22 -52
- package/components/pagination/pagination.options.d.ts +3 -6
- package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
- package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
- package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
- package/components/preview/index.d.ts +1 -0
- package/components/preview/pagination/preview-pagination.component.d.ts +2 -1
- package/components/preview/preview.component.d.ts +1 -1
- package/components/preview/preview.d.ts +2 -1
- package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
- package/components/preview/zoom/preview-zoom.component.d.ts +3 -1
- package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
- package/components/progress/progress.options.d.ts +1 -3
- package/components/pulse/pulse.component.d.ts +2 -2
- package/components/push/push-alert.component.d.ts +2 -2
- package/components/push/push.options.d.ts +4 -3
- package/components/push/push.service.d.ts +2 -2
- package/components/radio/radio.component.d.ts +1 -1
- package/components/radio-list/radio-list.component.d.ts +5 -3
- package/components/rating/rating.component.d.ts +1 -1
- package/components/rating/rating.options.d.ts +1 -3
- package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
- package/components/segmented/segmented.component.d.ts +4 -6
- package/components/segmented/segmented.directive.d.ts +6 -7
- package/components/select/native-select/native-select.component.d.ts +4 -4
- package/components/select/select.d.ts +4 -1
- package/components/select/select.directive.d.ts +4 -3
- package/components/slider/slider.options.d.ts +1 -6
- package/components/stepper/step.component.d.ts +6 -8
- package/components/stepper/stepper.component.d.ts +6 -11
- package/components/switch/switch.component.d.ts +1 -0
- package/components/tabs/tabs.options.d.ts +1 -6
- package/components/textarea/index.d.ts +2 -1
- package/components/textarea/textarea.component.d.ts +4 -4
- package/components/textarea/textarea.d.ts +6 -0
- package/components/textarea/textarea.directive.d.ts +13 -0
- package/components/toast/toast.component.d.ts +4 -4
- package/components/toast/toast.options.d.ts +4 -3
- package/components/toast/toast.service.d.ts +2 -2
- package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +7 -0
- package/components/tree/misc/tree.constants.d.ts +0 -3
- package/components/tree/misc/tree.tokens.d.ts +1 -6
- package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
- package/directives/appearance-proxy/index.d.ts +1 -0
- package/directives/button-select/button-select.directive.d.ts +3 -2
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
- package/directives/fade/fade.directive.d.ts +5 -6
- package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
- package/directives/highlight/highlight.directive.d.ts +4 -4
- package/directives/index.d.ts +1 -1
- package/directives/password/password.directive.d.ts +1 -1
- package/directives/present/present.directive.d.ts +2 -4
- package/directives/tooltip/tooltip.directive.d.ts +1 -1
- package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
- package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
- package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -9
- package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +34 -48
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +11 -18
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
- package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -12
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +11 -15
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +18 -37
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +5 -13
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +23 -23
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +64 -114
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
- package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -45
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-compass.mjs +9 -11
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +10 -12
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -33
- package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
- package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +111 -239
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs +20 -34
- package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -77
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -13
- package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +35 -51
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +30 -36
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +32 -29
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date.mjs +45 -48
- package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +26 -23
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month.mjs +32 -23
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +53 -50
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +50 -42
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +29 -19
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs +18 -9
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-range.mjs +18 -16
- package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs +15 -10
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-time.mjs +38 -40
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +27 -19
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +12 -14
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +18 -23
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs +7 -8
- package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs +30 -40
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -26
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -8
- package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +59 -140
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +68 -48
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +36 -45
- package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
- package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +22 -23
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +8 -11
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
- package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
- package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-select.mjs +52 -29
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +23 -33
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-stepper.mjs +45 -79
- package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
- package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tabs.mjs +28 -36
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +51 -52
- package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +14 -15
- package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-toast.mjs +27 -28
- package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tree.mjs +55 -58
- package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +0 -3
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
- package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -4
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs +18 -10
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -7
- package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
- package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +6 -12
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -21
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -9
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -18
- package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +9 -9
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -11
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -15
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives.mjs +1 -1
- package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
- package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -25
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
- package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -5
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
- package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -9
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
- package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-tokens.mjs +4 -123
- package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
- package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
- package/package.json +66 -67
- package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
- package/pipes/auto-color/index.d.ts +1 -0
- package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
- package/pipes/flag/flag.pipe.d.ts +14 -0
- package/pipes/flag/index.d.ts +1 -0
- package/pipes/index.d.ts +3 -0
- package/pipes/initials/index.d.ts +1 -0
- package/pipes/initials/initials.pipe.d.ts +7 -0
- package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
- package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
- package/styles/components/avatar.less +14 -14
- package/styles/components/badge.less +3 -3
- package/styles/components/block.less +4 -4
- package/styles/components/chip.less +3 -3
- package/styles/components/comment.less +1 -1
- package/styles/components/message.less +1 -1
- package/styles/components/pin.less +3 -3
- package/styles/components/switch.less +2 -2
- package/styles/components/toast.less +1 -1
- package/tokens/i18n.d.ts +1 -0
- package/tokens/index.d.ts +0 -7
- package/utils/index.d.ts +0 -2
- package/components/elastic-container/elastic-container.component.d.ts +0 -8
- package/components/elastic-container/elastic-container.directive.d.ts +0 -7
- package/components/elastic-container/index.d.ts +0 -2
- package/components/floating-container/floating-container.directive.d.ts +0 -7
- package/components/floating-container/index.d.ts +0 -1
- package/components/input-range/input-range.d.ts +0 -3
- package/components/slides/index.d.ts +0 -1
- package/components/slides/slides.directive.d.ts +0 -11
- package/components/textarea/textarea-limit.directive.d.ts +0 -26
- package/directives/lazy-loading/index.d.ts +0 -2
- package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
- package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
- package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
- package/tokens/calendar-date-stream.d.ts +0 -10
- package/tokens/date-inputs-value-transformers.d.ts +0 -19
- package/tokens/input-date-options.d.ts +0 -15
- package/tokens/items-handlers.d.ts +0 -26
- package/tokens/mobile-calendar.d.ts +0 -6
- package/tokens/month-formatter.d.ts +0 -5
- package/utils/phone.d.ts +0 -3
- package/utils/toggle-day.d.ts +0 -2
|
@@ -1,69 +1,56 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef,
|
|
3
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { inject, ChangeDetectorRef, contentChildren, forwardRef, ElementRef, input, model, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { RouterLinkActive } from '@angular/router';
|
|
5
5
|
import { tuiInjectElement, tuiIsElement } from '@taiga-ui/cdk/utils/dom';
|
|
6
6
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
7
|
-
import {
|
|
7
|
+
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
8
8
|
import { delay, EMPTY, filter } from 'rxjs';
|
|
9
|
-
import { __decorate } from 'tslib';
|
|
10
9
|
import { AsyncPipe } from '@angular/common';
|
|
11
10
|
import { ResizeObserverService } from '@ng-web-apis/resize-observer';
|
|
12
|
-
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
13
|
-
import { tuiQueryListChanges } from '@taiga-ui/cdk/observables';
|
|
14
|
-
import { TuiScrollService } from '@taiga-ui/cdk/services';
|
|
15
11
|
import { tuiMoveFocus } from '@taiga-ui/cdk/utils/focus';
|
|
16
|
-
import { tuiGetOriginalArrayFromQueryList, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
17
|
-
import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
|
|
18
12
|
|
|
19
13
|
class TuiStepperComponent {
|
|
20
14
|
constructor() {
|
|
21
|
-
this.steps = EMPTY_QUERY;
|
|
22
15
|
this.cdr = inject(ChangeDetectorRef);
|
|
23
16
|
this.el = tuiInjectElement();
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
this.steps = contentChildren(forwardRef(() => TuiStep), { read: ElementRef });
|
|
18
|
+
// Delay is required to trigger change detection after steps are rendered,
|
|
19
|
+
// so they can update their "active" status
|
|
20
|
+
this.changes$ = toObservable(this.steps).pipe(delay(0));
|
|
27
21
|
this.$ = inject(ResizeObserverService, { self: true })
|
|
28
22
|
.pipe(takeUntilDestroyed())
|
|
29
|
-
.subscribe(() => this.scrollIntoView(this.activeItemIndex));
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.activeItemIndexChange = new EventEmitter();
|
|
23
|
+
.subscribe(() => this.scrollIntoView(this.activeItemIndex()));
|
|
24
|
+
this.orientation = input('horizontal');
|
|
25
|
+
this.activeItemIndex = model(0);
|
|
33
26
|
}
|
|
34
27
|
ngOnChanges() {
|
|
35
|
-
this.scrollIntoView(this.activeItemIndex);
|
|
28
|
+
this.scrollIntoView(this.activeItemIndex());
|
|
36
29
|
}
|
|
37
30
|
indexOf(step) {
|
|
38
|
-
const index =
|
|
31
|
+
const index = this.steps().findIndex(({ nativeElement }) => nativeElement === step);
|
|
39
32
|
return index < 0 ? NaN : index;
|
|
40
33
|
}
|
|
41
34
|
isActive(index) {
|
|
42
|
-
return index === this.activeItemIndex;
|
|
35
|
+
return index === this.activeItemIndex();
|
|
43
36
|
}
|
|
44
37
|
activate(index) {
|
|
45
|
-
if (this.activeItemIndex === index) {
|
|
38
|
+
if (this.activeItemIndex() === index) {
|
|
46
39
|
return;
|
|
47
40
|
}
|
|
48
|
-
this.activeItemIndex
|
|
49
|
-
this.activeItemIndexChange.emit(index);
|
|
41
|
+
this.activeItemIndex.set(index);
|
|
50
42
|
this.cdr.markForCheck();
|
|
51
43
|
this.scrollIntoView(index);
|
|
52
44
|
}
|
|
53
|
-
get changes$() {
|
|
54
|
-
// Delay is required to trigger change detection after steps are rendered,
|
|
55
|
-
// so they can update their "active" status
|
|
56
|
-
return tuiQueryListChanges(this.steps).pipe(delay(0));
|
|
57
|
-
}
|
|
58
45
|
onHorizontal(event, step) {
|
|
59
|
-
if (this.orientation !== 'horizontal' || !event.target) {
|
|
46
|
+
if (this.orientation() !== 'horizontal' || !event.target) {
|
|
60
47
|
return;
|
|
61
48
|
}
|
|
62
49
|
event.preventDefault();
|
|
63
50
|
this.moveFocus(event.target, step);
|
|
64
51
|
}
|
|
65
52
|
onVertical(event, step) {
|
|
66
|
-
if (this.orientation !== 'vertical' || !event.target) {
|
|
53
|
+
if (this.orientation() !== 'vertical' || !event.target) {
|
|
67
54
|
return;
|
|
68
55
|
}
|
|
69
56
|
event.preventDefault();
|
|
@@ -73,12 +60,12 @@ class TuiStepperComponent {
|
|
|
73
60
|
if (!tuiIsElement(current)) {
|
|
74
61
|
return;
|
|
75
62
|
}
|
|
76
|
-
const stepElements = this.steps
|
|
63
|
+
const stepElements = this.steps().map(({ nativeElement }) => nativeElement);
|
|
77
64
|
const index = stepElements.findIndex((element) => element === current);
|
|
78
65
|
tuiMoveFocus(index, stepElements, step);
|
|
79
66
|
}
|
|
80
67
|
scrollIntoView(index) {
|
|
81
|
-
const step = this.steps
|
|
68
|
+
const step = this.steps()[index]?.nativeElement;
|
|
82
69
|
if (!step) {
|
|
83
70
|
return;
|
|
84
71
|
}
|
|
@@ -86,83 +73,62 @@ class TuiStepperComponent {
|
|
|
86
73
|
const { offsetHeight, offsetWidth, offsetTop: stepOffsetTop, offsetLeft: stepOffsetLeft, } = step;
|
|
87
74
|
const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;
|
|
88
75
|
const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;
|
|
89
|
-
this.
|
|
90
|
-
.scroll$(this.el, Math.max(0, top), Math.max(0, left), tuiGetDuration(this.speed) / 3)
|
|
91
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
92
|
-
.subscribe();
|
|
76
|
+
this.el.scrollTo?.({ left: Math.max(0, left), top: Math.max(0, top) });
|
|
93
77
|
}
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiStepperComponent, isStandalone: true, selector: "tui-stepper, nav[tuiStepper]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, host: { listeners: { "keydown.arrowRight": "onHorizontal($event, 1)", "keydown.arrowLeft": "onHorizontal($event, -1)", "keydown.arrowDown": "onVertical($event, 1)", "keydown.arrowUp": "onVertical($event, -1)" }, properties: { "attr.data-orientation": "orientation()" } }, providers: [ResizeObserverService], queries: [{ propertyName: "steps", predicate: i0.forwardRef(() => TuiStep), read: ElementRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
80
|
+
@if (changes$ | async) {}
|
|
81
|
+
<ng-content />
|
|
82
|
+
`, isInline: true, styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;scroll-behavior:var(--tui-scroll-behavior);overflow:auto;counter-reset:steps;font:var(--tui-font-body-m)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host[data-orientation=vertical]{flex-direction:column}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
96
83
|
}
|
|
97
|
-
|
|
98
|
-
tuiPure
|
|
99
|
-
], TuiStepperComponent.prototype, "changes$", null);
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStepperComponent, decorators: [{
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, decorators: [{
|
|
101
85
|
type: Component,
|
|
102
|
-
args: [{ selector: 'tui-stepper, nav[tuiStepper]', imports: [AsyncPipe],
|
|
103
|
-
|
|
86
|
+
args: [{ selector: 'tui-stepper, nav[tuiStepper]', imports: [AsyncPipe], template: `
|
|
87
|
+
@if (changes$ | async) {}
|
|
88
|
+
<ng-content />
|
|
89
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService], host: {
|
|
90
|
+
'[attr.data-orientation]': 'orientation()',
|
|
104
91
|
'(keydown.arrowRight)': 'onHorizontal($event, 1)',
|
|
105
92
|
'(keydown.arrowLeft)': 'onHorizontal($event, -1)',
|
|
106
93
|
'(keydown.arrowDown)': 'onVertical($event, 1)',
|
|
107
94
|
'(keydown.arrowUp)': 'onVertical($event, -1)',
|
|
108
|
-
},
|
|
109
|
-
}]
|
|
110
|
-
type: ContentChildren,
|
|
111
|
-
args: [forwardRef(() => TuiStep), { read: ElementRef }]
|
|
112
|
-
}], activeItemIndex: [{
|
|
113
|
-
type: Input
|
|
114
|
-
}], orientation: [{
|
|
115
|
-
type: Input
|
|
116
|
-
}], activeItemIndexChange: [{
|
|
117
|
-
type: Output
|
|
118
|
-
}], changes$: [] } });
|
|
95
|
+
}, styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;scroll-behavior:var(--tui-scroll-behavior);overflow:auto;counter-reset:steps;font:var(--tui-font-body-m)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host[data-orientation=vertical]{flex-direction:column}\n"] }]
|
|
96
|
+
}] });
|
|
119
97
|
|
|
120
98
|
class TuiStep {
|
|
121
99
|
constructor() {
|
|
122
|
-
this.stepper = inject(TuiStepperComponent);
|
|
123
100
|
this.el = tuiInjectElement();
|
|
101
|
+
this.icons = inject(TUI_COMMON_ICONS);
|
|
102
|
+
this.stepper = inject(TuiStepperComponent);
|
|
124
103
|
this.$ = (inject(RouterLinkActive, { optional: true })?.isActiveChange.asObservable() ?? EMPTY)
|
|
125
104
|
.pipe(filter(Boolean), takeUntilDestroyed())
|
|
126
105
|
.subscribe(() => this.activate());
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
129
|
-
this.stepState = 'normal';
|
|
130
|
-
this.icon = '';
|
|
106
|
+
this.stepState = input('normal');
|
|
107
|
+
this.icon = input('');
|
|
131
108
|
}
|
|
132
109
|
get isActive() {
|
|
133
110
|
return this.stepper.isActive(this.index);
|
|
134
111
|
}
|
|
135
|
-
get isVertical() {
|
|
136
|
-
return this.stepper.orientation === 'vertical';
|
|
137
|
-
}
|
|
138
|
-
get tabIndex() {
|
|
139
|
-
return this.isActive ? 0 : -1;
|
|
140
|
-
}
|
|
141
112
|
get index() {
|
|
142
113
|
return this.stepper.indexOf(this.el);
|
|
143
114
|
}
|
|
144
115
|
activate() {
|
|
145
116
|
this.stepper.activate(this.index);
|
|
146
117
|
}
|
|
147
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiStep, isStandalone: true, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: { stepState: { classPropertyName: "stepState", publicName: "stepState", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "activate()" }, properties: { "attr.data-state": "stepState()", "class._vertical": "stepper.orientation() === \"vertical\"", "class._active": "isActive", "tabIndex": "isActive ? 0 : -1" } }, ngImport: i0, template: "@if (icon()) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon()\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-inline-end:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-block-end:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-block-start:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-inline-end:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);box-sizing:border-box}.t-marker:before{font-size:1rem}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"], dependencies: [{ kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
149
120
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, decorators: [{
|
|
151
122
|
type: Component,
|
|
152
123
|
args: [{ selector: 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]', imports: [TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
153
124
|
type: 'button',
|
|
154
|
-
'[attr.data-state]': 'stepState',
|
|
155
|
-
'[class._vertical]': '
|
|
156
|
-
'[class._focus-visible]': 'focusVisible',
|
|
125
|
+
'[attr.data-state]': 'stepState()',
|
|
126
|
+
'[class._vertical]': 'stepper.orientation() === "vertical"',
|
|
157
127
|
'[class._active]': 'isActive',
|
|
158
|
-
'[tabIndex]': '
|
|
128
|
+
'[tabIndex]': 'isActive ? 0 : -1',
|
|
159
129
|
'(click)': 'activate()',
|
|
160
|
-
}, template: "@if (icon) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-inline-end:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-block-end:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-block-start:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-inline-end:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);box-sizing:border-box}.t-marker:before{font-size:1rem}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"] }]
|
|
161
|
-
}]
|
|
162
|
-
type: Input
|
|
163
|
-
}], icon: [{
|
|
164
|
-
type: Input
|
|
165
|
-
}] } });
|
|
130
|
+
}, template: "@if (icon()) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon()\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-inline-end:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-block-end:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-block-start:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-inline-end:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);box-sizing:border-box}.t-marker:before{font-size:1rem}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"] }]
|
|
131
|
+
}] });
|
|
166
132
|
|
|
167
133
|
const TuiStepper = [TuiStepperComponent, TuiStep];
|
|
168
134
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-stepper.mjs","sources":["../../../projects/kit/components/stepper/stepper.component.ts","../../../projects/kit/components/stepper/stepper.template.html","../../../projects/kit/components/stepper/step.component.ts","../../../projects/kit/components/stepper/step.template.html","../../../projects/kit/components/stepper/stepper.ts","../../../projects/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n type OnChanges,\n Output,\n type QueryList,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiQueryListChanges} from '@taiga-ui/cdk/observables';\nimport {TuiScrollService} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {\n tuiGetOriginalArrayFromQueryList,\n tuiPure,\n} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {delay, type Observable} from 'rxjs';\n\nimport {TuiStep} from './step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n imports: [AsyncPipe],\n templateUrl: './stepper.template.html',\n styleUrl: './stepper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ResizeObserverService],\n host: {\n '[attr.data-orientation]': 'orientation',\n '(keydown.arrowRight)': 'onHorizontal($event, 1)',\n '(keydown.arrowLeft)': 'onHorizontal($event, -1)',\n '(keydown.arrowDown)': 'onVertical($event, 1)',\n '(keydown.arrowUp)': 'onVertical($event, -1)',\n },\n})\nexport class TuiStepperComponent implements OnChanges {\n @ContentChildren(forwardRef(() => TuiStep), {read: ElementRef})\n private readonly steps: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly el = tuiInjectElement();\n private readonly scrollService = inject(TuiScrollService);\n private readonly speed = inject(TUI_ANIMATIONS_SPEED);\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly $ = inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.scrollIntoView(this.activeItemIndex));\n\n @Input()\n public activeItemIndex = 0;\n\n @Input()\n public orientation: TuiOrientation = 'horizontal';\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n public ngOnChanges(): void {\n this.scrollIntoView(this.activeItemIndex);\n }\n\n public indexOf(step: HTMLElement): number {\n const index = tuiGetOriginalArrayFromQueryList(this.steps).findIndex(\n ({nativeElement}) => nativeElement === step,\n );\n\n return index < 0 ? NaN : index;\n }\n\n public isActive(index: number): boolean {\n return index === this.activeItemIndex;\n }\n\n public activate(index: number): void {\n if (this.activeItemIndex === index) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n this.cdr.markForCheck();\n this.scrollIntoView(index);\n }\n\n @tuiPure\n protected get changes$(): Observable<unknown> {\n // Delay is required to trigger change detection after steps are rendered,\n // so they can update their \"active\" status\n return tuiQueryListChanges(this.steps).pipe(delay(0));\n }\n\n protected onHorizontal(event: Event, step: number): void {\n if (this.orientation !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n protected onVertical(event: Event, step: number): void {\n if (this.orientation !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n private moveFocus(current: EventTarget, step: number): void {\n if (!tuiIsElement(current)) {\n return;\n }\n\n const stepElements = this.steps.toArray().map(({nativeElement}) => nativeElement);\n const index = stepElements.findIndex((element) => element === current);\n\n tuiMoveFocus(index, stepElements, step);\n }\n\n private scrollIntoView(index: number): void {\n const step = this.steps.get(index)?.nativeElement;\n\n if (!step) {\n return;\n }\n\n const {clientHeight, clientWidth, offsetTop, offsetLeft} = this.el;\n const {\n offsetHeight,\n offsetWidth,\n offsetTop: stepOffsetTop,\n offsetLeft: stepOffsetLeft,\n } = step;\n const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;\n const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;\n\n this.scrollService\n .scroll$(\n this.el,\n Math.max(0, top),\n Math.max(0, left),\n tuiGetDuration(this.speed) / 3,\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe();\n }\n}\n","@if (changes$ | async) {}\n<ng-content />\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {EMPTY, filter} from 'rxjs';\n\nimport {TuiStepperComponent} from './stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n imports: [TuiIcon],\n templateUrl: './step.template.html',\n styleUrl: './step.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n type: 'button',\n '[attr.data-state]': 'stepState',\n '[class._vertical]': 'isVertical',\n '[class._focus-visible]': 'focusVisible',\n '[class._active]': 'isActive',\n '[tabIndex]': 'tabIndex',\n '(click)': 'activate()',\n },\n})\nexport class TuiStep {\n private readonly stepper = inject(TuiStepperComponent);\n private readonly el = tuiInjectElement();\n protected readonly $ = (\n inject(RouterLinkActive, {optional: true})?.isActiveChange.asObservable() ?? EMPTY\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => this.activate());\n\n protected focusVisible = false;\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n\n @Input()\n public stepState: 'error' | 'normal' | 'pass' = 'normal';\n\n @Input()\n public icon = '';\n\n protected get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n protected get isVertical(): boolean {\n return this.stepper.orientation === 'vertical';\n }\n\n protected get tabIndex(): number {\n return this.isActive ? 0 : -1;\n }\n\n protected get index(): number {\n return this.stepper.indexOf(this.el);\n }\n\n protected activate(): void {\n this.stepper.activate(this.index);\n }\n}\n","@if (icon) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n","import {TuiStep} from './step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\nexport const TuiStepper = [TuiStepperComponent, TuiStep] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MA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,wBAAA,SAAS,EAAE,YAAY;AAC1B,qBAAA,EAAA,QAAA,EAAA,iVAAA,EAAA,MAAA,EAAA,CAAA,wuEAAA,CAAA,EAAA;8BAgBM,SAAS,EAAA,CAAA;sBADf;gBAIM,IAAI,EAAA,CAAA;sBADV;;;MExCQ,UAAU,GAAG,CAAC,mBAAmB,EAAE,OAAO;;ACHvD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-stepper.mjs","sources":["../../../projects/kit/components/stepper/stepper.component.ts","../../../projects/kit/components/stepper/step.component.ts","../../../projects/kit/components/stepper/step.template.html","../../../projects/kit/components/stepper/stepper.ts","../../../projects/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n type OnChanges,\n} from '@angular/core';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\nimport {delay} from 'rxjs';\n\nimport {TuiStep} from './step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n imports: [AsyncPipe],\n template: `\n @if (changes$ | async) {}\n <ng-content />\n `,\n styleUrl: './stepper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ResizeObserverService],\n host: {\n '[attr.data-orientation]': 'orientation()',\n '(keydown.arrowRight)': 'onHorizontal($event, 1)',\n '(keydown.arrowLeft)': 'onHorizontal($event, -1)',\n '(keydown.arrowDown)': 'onVertical($event, 1)',\n '(keydown.arrowUp)': 'onVertical($event, -1)',\n },\n})\nexport class TuiStepperComponent implements OnChanges {\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly el = tuiInjectElement();\n private readonly steps = contentChildren(\n forwardRef(() => TuiStep),\n {read: ElementRef},\n );\n\n // Delay is required to trigger change detection after steps are rendered,\n // so they can update their \"active\" status\n protected readonly changes$ = toObservable(this.steps).pipe(delay(0));\n protected readonly $ = inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.scrollIntoView(this.activeItemIndex()));\n\n public readonly orientation = input<TuiOrientation>('horizontal');\n public readonly activeItemIndex = model(0);\n\n public ngOnChanges(): void {\n this.scrollIntoView(this.activeItemIndex());\n }\n\n public indexOf(step: HTMLElement): number {\n const index = this.steps().findIndex(({nativeElement}) => nativeElement === step);\n\n return index < 0 ? NaN : index;\n }\n\n public isActive(index: number): boolean {\n return index === this.activeItemIndex();\n }\n\n public activate(index: number): void {\n if (this.activeItemIndex() === index) {\n return;\n }\n\n this.activeItemIndex.set(index);\n this.cdr.markForCheck();\n this.scrollIntoView(index);\n }\n\n protected onHorizontal(event: Event, step: number): void {\n if (this.orientation() !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n protected onVertical(event: Event, step: number): void {\n if (this.orientation() !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n private moveFocus(current: EventTarget, step: number): void {\n if (!tuiIsElement(current)) {\n return;\n }\n\n const stepElements = this.steps().map(({nativeElement}) => nativeElement);\n const index = stepElements.findIndex((element) => element === current);\n\n tuiMoveFocus(index, stepElements, step);\n }\n\n private scrollIntoView(index: number): void {\n const step = this.steps()[index]?.nativeElement;\n\n if (!step) {\n return;\n }\n\n const {clientHeight, clientWidth, offsetTop, offsetLeft} = this.el;\n const {\n offsetHeight,\n offsetWidth,\n offsetTop: stepOffsetTop,\n offsetLeft: stepOffsetLeft,\n } = step;\n const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;\n const left = stepOffsetLeft - offsetLeft - clientWidth / 2 + offsetWidth / 2;\n\n this.el.scrollTo?.({left: Math.max(0, left), top: Math.max(0, top)});\n }\n}\n","import {ChangeDetectionStrategy, Component, inject, input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {EMPTY, filter} from 'rxjs';\n\nimport {TuiStepperComponent} from './stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n imports: [TuiIcon],\n templateUrl: './step.template.html',\n styleUrl: './step.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n type: 'button',\n '[attr.data-state]': 'stepState()',\n '[class._vertical]': 'stepper.orientation() === \"vertical\"',\n '[class._active]': 'isActive',\n '[tabIndex]': 'isActive ? 0 : -1',\n '(click)': 'activate()',\n },\n})\nexport class TuiStep {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly stepper = inject(TuiStepperComponent);\n protected readonly $ = (\n inject(RouterLinkActive, {optional: true})?.isActiveChange.asObservable() ?? EMPTY\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => this.activate());\n\n public readonly stepState = input<'error' | 'normal' | 'pass'>('normal');\n public readonly icon = input('');\n\n protected get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n protected get index(): number {\n return this.stepper.indexOf(this.el);\n }\n\n protected activate(): void {\n this.stepper.activate(this.index);\n }\n}\n","@if (icon()) {\n <tui-icon\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon()\"\n />\n}\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n","import {TuiStep} from './step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\nexport const TuiStepper = [TuiStepperComponent, TuiStep] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAwCa,mBAAmB,CAAA;AAlBhC,IAAA,WAAA,GAAA;AAmBqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAC/B,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CACpC,UAAU,CAAC,MAAM,OAAO,CAAC,EACzB,EAAC,IAAI,EAAE,UAAU,EAAC,CACrB;;;AAIkB,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClD,IAAC,CAAA,CAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC;aAC5D,IAAI,CAAC,kBAAkB,EAAE;AACzB,aAAA,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;AAEjD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAiB,YAAY,CAAC;AACjD,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC;AA0E7C;IAxEU,WAAW,GAAA;QACd,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;;AAGxC,IAAA,OAAO,CAAC,IAAiB,EAAA;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,EAAC,aAAa,EAAC,KAAK,aAAa,KAAK,IAAI,CAAC;QAEjF,OAAO,KAAK,GAAG,CAAC,GAAG,GAAG,G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|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { computed, input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
-
import { tuiProvide } from '@taiga-ui/cdk/utils/
|
|
3
|
+
import { tuiCreateOptions, tuiProvide } from '@taiga-ui/cdk/utils/di';
|
|
4
4
|
import * as i1 from '@taiga-ui/core/directives/icons';
|
|
5
5
|
import { tuiIconStart, TuiIcons } from '@taiga-ui/core/directives/icons';
|
|
6
6
|
import { TuiRadioComponent, TUI_RADIO_OPTIONS } from '@taiga-ui/kit/components/radio';
|
|
7
|
-
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
8
7
|
|
|
9
8
|
const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] = tuiCreateOptions({
|
|
10
9
|
showIcons: true,
|
|
@@ -16,15 +15,20 @@ const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] = tuiCreateOptions({
|
|
|
16
15
|
class TuiSwitch extends TuiRadioComponent {
|
|
17
16
|
constructor() {
|
|
18
17
|
super(...arguments);
|
|
18
|
+
this.native = 'switch' in this.el;
|
|
19
19
|
this.icon = tuiIconStart(computed(() => (this.showIcons() ? this.options.icon(this.size()) : '')));
|
|
20
20
|
this.showIcons = input(this.options.showIcons);
|
|
21
21
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSwitch, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiSwitch, isStandalone: true, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: { showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "switch": "", "role": "switch" }, properties: { "class._native": "native" } }, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)], usesInheritance: true, hostDirectives: [{ directive: i1.TuiIcons }], ngImport: i0, template: '', isInline: true, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1rem;transform:translate(-1rem);font-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem var(--tui-background-base);outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{position:absolute;block-size:100%;inline-size:1.5rem;transition-property:transform}[tuiSwitch]:before{left:.125rem;font-size:1rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;display:block;border-radius:100%;background:none;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem var(--tui-background-base);outline:.375rem solid var(--tui-background-neutral-2-pressed)}[tuiSwitch]:not([data-icon-start]):after{outline-offset:20rem}[tuiSwitch]:invalid:not([data-mode]),[tuiSwitch][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSwitch, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
|
-
args: [{
|
|
27
|
+
args: [{ selector: 'input[type="checkbox"][tuiSwitch]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)], hostDirectives: [TuiIcons], host: {
|
|
28
|
+
switch: '',
|
|
29
|
+
role: 'switch',
|
|
30
|
+
'[class._native]': 'native',
|
|
31
|
+
}, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1rem;transform:translate(-1rem);font-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem var(--tui-background-base);outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{position:absolute;block-size:100%;inline-size:1.5rem;transition-property:transform}[tuiSwitch]:before{left:.125rem;font-size:1rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;display:block;border-radius:100%;background:none;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem var(--tui-background-base);outline:.375rem solid var(--tui-background-neutral-2-pressed)}[tuiSwitch]:not([data-icon-start]):after{outline-offset:20rem}[tuiSwitch]:invalid:not([data-mode]),[tuiSwitch][data-mode~=invalid]{color:#fff}\n"] }]
|
|
28
32
|
}] });
|
|
29
33
|
|
|
30
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-switch.mjs","sources":["../../../projects/kit/components/switch/switch.options.ts","../../../projects/kit/components/switch/switch.component.ts","../../../projects/kit/components/switch/taiga-ui-kit-components-switch.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {type TuiRadioOptions} from '@taiga-ui/kit/components/radio';\n\nexport interface TuiSwitchOptions extends TuiRadioOptions {\n readonly showIcons: boolean;\n readonly icon: TuiStringHandler<TuiSizeS>;\n}\n\nexport const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] =\n tuiCreateOptions<TuiSwitchOptions>({\n showIcons: true,\n size: 'm',\n icon: () => '@tui.check',\n appearance: ({checked}) => (checked ? 'primary' : 'secondary'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-switch.mjs","sources":["../../../projects/kit/components/switch/switch.options.ts","../../../projects/kit/components/switch/switch.component.ts","../../../projects/kit/components/switch/taiga-ui-kit-components-switch.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {type TuiRadioOptions} from '@taiga-ui/kit/components/radio';\n\nexport interface TuiSwitchOptions extends TuiRadioOptions {\n readonly showIcons: boolean;\n readonly icon: TuiStringHandler<TuiSizeS>;\n}\n\nexport const [TUI_SWITCH_OPTIONS, tuiSwitchOptionsProvider] =\n tuiCreateOptions<TuiSwitchOptions>({\n showIcons: true,\n size: 'm',\n icon: () => '@tui.check',\n appearance: ({checked}) => (checked ? 'primary' : 'secondary'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {TuiIcons, tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_RADIO_OPTIONS, TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\nimport {TUI_SWITCH_OPTIONS, type TuiSwitchOptions} from './switch.options';\n\n@Component({\n selector: 'input[type=\"checkbox\"][tuiSwitch]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/switch.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_RADIO_OPTIONS, TUI_SWITCH_OPTIONS)],\n hostDirectives: [TuiIcons],\n host: {\n switch: '',\n role: 'switch',\n '[class._native]': 'native',\n },\n})\nexport class TuiSwitch extends TuiRadioComponent<TuiSwitchOptions> {\n protected readonly native = 'switch' in this.el;\n protected readonly icon = tuiIconStart(\n computed(() => (this.showIcons() ? this.options.icon(this.size()) : '')),\n );\n\n public readonly showIcons = input(this.options.showIcons);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,GACvD,gBAAgB,CAAmB;AAC/B,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,UAAU,EAAE,CAAC,EAAC,OAAO,EAAC,MAAM,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACjE,CAAA;;ACWC,MAAO,SAAU,SAAQ,iBAAmC,CAAA;AAdlE,IAAA,WAAA,GAAA;;AAeuB,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,EAAE;AAC5B,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAClC,QAAQ,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE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