@taiga-ui/kit 4.52.0-canary.bf9131e → 4.52.0-canary.c8448e0
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 -3
- 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-month/calendar-month.component.d.ts +5 -5
- package/components/calendar-range/calendar-range.component.d.ts +1 -3
- package/components/calendar-range/day-range-period.d.ts +2 -1
- package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
- package/components/carousel/carousel-scroll.directive.d.ts +1 -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 -12
- 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 +9 -13
- package/components/input-color/input-color.d.ts +5 -0
- package/components/input-date/input-date.component.d.ts +2 -2
- package/components/input-date/input-date.d.ts +4 -1
- package/components/input-date/input-date.directive.d.ts +21 -22
- 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 +9 -10
- 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 +14 -14
- package/components/input-date-time/input-date-time.options.d.ts +2 -2
- package/components/input-inline/input-inline.component.d.ts +3 -2
- package/components/input-month/input-month.component.d.ts +3 -5
- 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/index.d.ts +3 -0
- package/components/input-number/input-number.d.ts +7 -2
- package/components/input-number/input-number.directive.d.ts +11 -28
- package/components/input-number/input-number.options.d.ts +4 -7
- package/components/input-number/number-mask.directive.d.ts +42 -0
- package/components/input-number/quantum.directive.d.ts +10 -8
- package/components/input-number/step/input-number-step.component.d.ts +10 -9
- package/components/input-number/transformers/bigint.value-transformer.d.ts +11 -0
- package/components/input-number/transformers/number.value-transformer.d.ts +11 -0
- 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 +12 -14
- package/components/input-phone-international/index.d.ts +1 -0
- package/components/input-phone-international/input-phone-international.component.d.ts +14 -16
- package/components/input-phone-international/input-phone-international.d.ts +5 -0
- package/components/input-phone-international/input-phone-international.options.d.ts +2 -3
- package/components/input-pin/index.d.ts +1 -0
- package/components/input-pin/input-pin.component.d.ts +5 -6
- 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 +23 -53
- package/components/input-slider/input-slider.d.ts +4 -1
- package/components/input-slider/input-slider.directive.d.ts +4 -3
- 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 +5 -5
- package/components/input-year/input-year.d.ts +4 -1
- package/components/input-year/input-year.directive.d.ts +8 -10
- package/components/input-year/input-year.options.d.ts +2 -2
- package/components/items-with-more/items-with-more.component.d.ts +6 -6
- package/components/items-with-more/items-with-more.directive.d.ts +6 -6
- 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/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
- 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/pager/pager.component.d.ts +12 -12
- package/components/pagination/index.d.ts +1 -0
- package/components/pagination/pagination.component.d.ts +24 -54
- package/components/pagination/pagination.options.d.ts +7 -0
- 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 +6 -10
- package/components/preview/preview.component.d.ts +6 -6
- 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 +11 -17
- package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
- package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
- package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
- 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.component.d.ts +6 -7
- 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 +11 -9
- package/components/range/range.component.d.ts +3 -4
- 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 +7 -8
- package/components/select/select.d.ts +4 -1
- package/components/select/select.directive.d.ts +4 -3
- package/components/slider/helpers/slider-key-steps.directive.d.ts +10 -7
- package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
- package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
- package/components/slider/slider.component.d.ts +4 -7
- package/components/slider/slider.options.d.ts +1 -6
- package/components/stepper/step.component.d.ts +14 -9
- package/components/stepper/stepper.component.d.ts +5 -12
- package/components/switch/switch.component.d.ts +1 -0
- package/components/tabs/tabs-horizontal.directive.d.ts +4 -5
- package/components/tabs/tabs-vertical.directive.d.ts +2 -2
- package/components/tabs/tabs-with-more.component.d.ts +12 -16
- package/components/tabs/tabs.directive.d.ts +5 -7
- package/components/tabs/tabs.options.d.ts +1 -6
- package/components/textarea/index.d.ts +2 -1
- package/components/textarea/textarea.component.d.ts +10 -11
- package/components/textarea/textarea.d.ts +6 -0
- package/components/textarea/textarea.directive.d.ts +13 -0
- package/components/tiles/tile-handle.directive.d.ts +2 -1
- package/components/tiles/tile.component.d.ts +7 -10
- package/components/tiles/tile.service.d.ts +1 -1
- package/components/tiles/tiles.component.d.ts +4 -7
- 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/tree.component.d.ts +7 -7
- package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
- package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +7 -0
- package/components/tree/directives/tree-children.directive.d.ts +2 -2
- package/components/tree/directives/tree-controller.directive.d.ts +4 -5
- package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
- package/components/tree/directives/tree-node.directive.d.ts +5 -4
- 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.directive.d.ts +3 -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 -2
- 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 +35 -49
- 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 +13 -35
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +26 -35
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +70 -123
- 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-comment.mjs.map +1 -1
- 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 +11 -32
- package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +112 -240
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -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 +31 -32
- 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 +37 -37
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +41 -57
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date.mjs +55 -68
- package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -13
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
- 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 +39 -46
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +266 -211
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +64 -74
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +38 -43
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs +24 -22
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
- package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs +27 -17
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-time.mjs +39 -41
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +31 -37
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -72
- 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 +38 -53
- 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 +30 -44
- package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +75 -149
- 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 +97 -157
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +81 -92
- 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 +27 -40
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
- 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 +20 -33
- 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 +57 -45
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +56 -88
- 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 +61 -88
- 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 +90 -157
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +60 -73
- package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +54 -99
- 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 +90 -125
- 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-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 +20 -12
- 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 +7 -8
- 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 +14 -27
- 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 -2
- package/fesm2022/taiga-ui-kit-directives.mjs.map +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 +22 -36
- 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 +23 -27
- 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 +75 -80
- 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 +5 -2
- package/pipes/flag/flag.pipe.d.ts +13 -0
- package/pipes/flag/index.d.ts +1 -0
- package/pipes/hide-selected/hide-selected.pipe.d.ts +2 -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 +4 -4
- package/styles/components/comment.less +15 -17
- package/styles/components/message.less +1 -1
- package/styles/components/pin.less +3 -3
- package/styles/components/switch.less +3 -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/utils/maskito.binding.d.ts +1 -1
- 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/button-close/button-close.directive.d.ts +0 -5
- package/directives/button-close/index.d.ts +0 -1
- 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-button-close.mjs +0 -39
- package/fesm2022/taiga-ui-kit-directives-button-close.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,55 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { contentChildren, forwardRef, ElementRef, inject, input, model, ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { RouterLinkActive } from '@angular/router';
|
|
5
|
+
import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
|
|
5
6
|
import { tuiInjectElement, tuiIsElement } from '@taiga-ui/cdk/utils/dom';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import * as i1 from '@taiga-ui/core/components/cell';
|
|
8
|
+
import { TuiCell } from '@taiga-ui/core/components/cell';
|
|
9
|
+
import * as i2 from '@taiga-ui/core/directives/appearance';
|
|
10
|
+
import { tuiAppearance, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
|
|
11
|
+
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
12
|
+
import { TuiAvatar } from '@taiga-ui/kit/components/avatar';
|
|
13
|
+
import { EMPTY, filter } from 'rxjs';
|
|
11
14
|
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
15
|
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
16
|
|
|
19
17
|
class TuiStepperComponent {
|
|
20
18
|
constructor() {
|
|
21
|
-
this.steps = EMPTY_QUERY;
|
|
22
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
23
19
|
this.el = tuiInjectElement();
|
|
24
|
-
this.
|
|
25
|
-
this.speed = inject(TUI_ANIMATIONS_SPEED);
|
|
26
|
-
this.destroyRef = inject(DestroyRef);
|
|
20
|
+
this.steps = contentChildren(forwardRef(() => TuiStep), { read: ElementRef });
|
|
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);
|
|
50
|
-
this.cdr.markForCheck();
|
|
41
|
+
this.activeItemIndex.set(index);
|
|
51
42
|
this.scrollIntoView(index);
|
|
52
43
|
}
|
|
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
44
|
onHorizontal(event, step) {
|
|
59
|
-
if (this.orientation !== 'horizontal' || !event.target) {
|
|
45
|
+
if (this.orientation() !== 'horizontal' || !event.target) {
|
|
60
46
|
return;
|
|
61
47
|
}
|
|
62
48
|
event.preventDefault();
|
|
63
49
|
this.moveFocus(event.target, step);
|
|
64
50
|
}
|
|
65
51
|
onVertical(event, step) {
|
|
66
|
-
if (this.orientation !== 'vertical' || !event.target) {
|
|
52
|
+
if (this.orientation() !== 'vertical' || !event.target) {
|
|
67
53
|
return;
|
|
68
54
|
}
|
|
69
55
|
event.preventDefault();
|
|
@@ -73,12 +59,12 @@ class TuiStepperComponent {
|
|
|
73
59
|
if (!tuiIsElement(current)) {
|
|
74
60
|
return;
|
|
75
61
|
}
|
|
76
|
-
const stepElements = this.steps
|
|
62
|
+
const stepElements = this.steps().map(({ nativeElement }) => nativeElement);
|
|
77
63
|
const index = stepElements.findIndex((element) => element === current);
|
|
78
64
|
tuiMoveFocus(index, stepElements, step);
|
|
79
65
|
}
|
|
80
66
|
scrollIntoView(index) {
|
|
81
|
-
const step = this.steps
|
|
67
|
+
const step = this.steps()[index]?.nativeElement;
|
|
82
68
|
if (!step) {
|
|
83
69
|
return;
|
|
84
70
|
}
|
|
@@ -86,57 +72,50 @@ class TuiStepperComponent {
|
|
|
86
72
|
const { offsetHeight, offsetWidth, offsetTop: stepOffsetTop, offsetLeft: stepOffsetLeft, } = step;
|
|
87
73
|
const top = stepOffsetTop - offsetTop - clientHeight / 2 + offsetHeight / 2;
|
|
88
74
|
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();
|
|
75
|
+
this.el.scrollTo?.({ left: Math.max(0, left), top: Math.max(0, top) });
|
|
93
76
|
}
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.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: `
|
|
79
|
+
<ng-content />
|
|
80
|
+
`, 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"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
96
81
|
}
|
|
97
|
-
|
|
98
|
-
tuiPure
|
|
99
|
-
], TuiStepperComponent.prototype, "changes$", null);
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStepperComponent, decorators: [{
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStepperComponent, decorators: [{
|
|
101
83
|
type: Component,
|
|
102
|
-
args: [{ selector: 'tui-stepper, nav[tuiStepper]',
|
|
103
|
-
|
|
84
|
+
args: [{ selector: 'tui-stepper, nav[tuiStepper]', template: `
|
|
85
|
+
<ng-content />
|
|
86
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService], host: {
|
|
87
|
+
'[attr.data-orientation]': 'orientation()',
|
|
104
88
|
'(keydown.arrowRight)': 'onHorizontal($event, 1)',
|
|
105
89
|
'(keydown.arrowLeft)': 'onHorizontal($event, -1)',
|
|
106
90
|
'(keydown.arrowDown)': 'onVertical($event, 1)',
|
|
107
91
|
'(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$: [] } });
|
|
92
|
+
}, 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"] }]
|
|
93
|
+
}] });
|
|
119
94
|
|
|
120
95
|
class TuiStep {
|
|
121
96
|
constructor() {
|
|
122
|
-
this.stepper = inject(TuiStepperComponent);
|
|
123
97
|
this.el = tuiInjectElement();
|
|
98
|
+
this.icons = inject(TUI_COMMON_ICONS);
|
|
99
|
+
this.appearance = tuiAppearance(computed(() => (this.isActive() ? 'none' : 'action')));
|
|
100
|
+
this.size = tuiDirectiveBinding(TuiCell, 'size', 'm');
|
|
101
|
+
this.stepper = inject(TuiStepperComponent);
|
|
124
102
|
this.$ = (inject(RouterLinkActive, { optional: true })?.isActiveChange.asObservable() ?? EMPTY)
|
|
125
103
|
.pipe(filter(Boolean), takeUntilDestroyed())
|
|
126
104
|
.subscribe(() => this.activate());
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
105
|
+
this.stepState = input('normal');
|
|
106
|
+
this.icon = input('');
|
|
107
|
+
this.isActive = computed(() => this.stepper.activeItemIndex() === this.index);
|
|
108
|
+
this.avatarAppearance = computed(() => {
|
|
109
|
+
if (this.isActive()) {
|
|
110
|
+
return 'primary';
|
|
111
|
+
}
|
|
112
|
+
return this.stepState() === 'error' ? 'negative' : 'secondary';
|
|
113
|
+
});
|
|
114
|
+
this.avatarContent = computed(() => this.isActive() || (this.stepState() === 'normal' && !this.icon())
|
|
115
|
+
? `${this.index + 1}`
|
|
116
|
+
: this.avatarIcon());
|
|
117
|
+
this.avatarIcon = computed(() => this.icon() ||
|
|
118
|
+
(this.stepState() === 'error' ? this.icons.error : this.icons.check));
|
|
140
119
|
}
|
|
141
120
|
get index() {
|
|
142
121
|
return this.stepper.indexOf(this.el);
|
|
@@ -144,25 +123,19 @@ class TuiStep {
|
|
|
144
123
|
activate() {
|
|
145
124
|
this.stepper.activate(this.index);
|
|
146
125
|
}
|
|
147
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.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: { "tabIndex": "isActive() ? 0 : -1", "class._active": "isActive()", "class._vertical": "stepper.orientation() === \"vertical\"" } }, hostDirectives: [{ directive: i1.TuiCell }, { directive: i2.TuiWithAppearance }], ngImport: i0, template: "<div\n [appearance]=\"avatarAppearance()\"\n [tuiAvatar]=\"avatarContent()\"\n></div>\n<ng-content />\n", styles: [":host{min-inline-size:fit-content}:host:hover{background:unset!important}:host._active._active:not(:disabled){cursor:unset}:host:not(._vertical):first-of-type{padding-inline-start:0}:host:not(._vertical):last-of-type{padding-inline-end:0}:host._vertical{padding-inline:0;margin-block-end:.5rem}[tuiAvatar][data-size]:before{transition:none}[tuiAvatar][data-size]._initials:before{font-weight:400}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
149
128
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiStep, decorators: [{
|
|
151
130
|
type: Component,
|
|
152
|
-
args: [{ selector: 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]', imports: [
|
|
131
|
+
args: [{ selector: 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]', imports: [TuiAvatar], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiCell, TuiWithAppearance], host: {
|
|
153
132
|
type: 'button',
|
|
154
|
-
'[
|
|
155
|
-
'[class.
|
|
156
|
-
'[class.
|
|
157
|
-
'[class._active]': 'isActive',
|
|
158
|
-
'[tabIndex]': 'tabIndex',
|
|
133
|
+
'[tabIndex]': 'isActive() ? 0 : -1',
|
|
134
|
+
'[class._active]': 'isActive()',
|
|
135
|
+
'[class._vertical]': 'stepper.orientation() === "vertical"',
|
|
159
136
|
'(click)': 'activate()',
|
|
160
|
-
}, template: "
|
|
161
|
-
}]
|
|
162
|
-
type: Input
|
|
163
|
-
}], icon: [{
|
|
164
|
-
type: Input
|
|
165
|
-
}] } });
|
|
137
|
+
}, template: "<div\n [appearance]=\"avatarAppearance()\"\n [tuiAvatar]=\"avatarContent()\"\n></div>\n<ng-content />\n", styles: [":host{min-inline-size:fit-content}:host:hover{background:unset!important}:host._active._active:not(:disabled){cursor:unset}:host:not(._vertical):first-of-type{padding-inline-start:0}:host:not(._vertical):last-of-type{padding-inline-end:0}:host._vertical{padding-inline:0;margin-block-end:.5rem}[tuiAvatar][data-size]:before{transition:none}[tuiAvatar][data-size]._initials:before{font-weight:400}\n"] }]
|
|
138
|
+
}] });
|
|
166
139
|
|
|
167
140
|
const TuiStepper = [TuiStepperComponent, TuiStep];
|
|
168
141
|
|
|
@@ -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":";;;;;;;;;;;;;;;;;;MAiDa,mBAAmB,CAAA;AAfhC,IAAA,WAAA,GAAA;QAiBqB,IAAK,CAAA,KAAA,GAAuC,WAAW;AAEvD,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAC/B,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,KAAK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epper.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 {\n ChangeDetectionStrategy,\n Component,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n type OnChanges,\n} from '@angular/core';\nimport {takeUntilDestroyed} 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';\n\nimport {TuiStep} from './step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n template: `\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 el = tuiInjectElement();\n private readonly steps = contentChildren(\n forwardRef(() => TuiStep),\n {read: ElementRef},\n );\n\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.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, computed, inject, input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiCell} from '@taiga-ui/core/components/cell';\nimport {tuiAppearance, TuiWithAppearance} from '@taiga-ui/core/directives/appearance';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TuiAvatar} from '@taiga-ui/kit/components/avatar';\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: [TuiAvatar],\n templateUrl: './step.template.html',\n styleUrl: './step.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiCell, TuiWithAppearance],\n host: {\n type: 'button',\n '[tabIndex]': 'isActive() ? 0 : -1',\n '[class._active]': 'isActive()',\n '[class._vertical]': 'stepper.orientation() === \"vertical\"',\n '(click)': 'activate()',\n },\n})\nexport class TuiStep {\n private readonly el = tuiInjectElement();\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly appearance = tuiAppearance(\n computed(() => (this.isActive() ? 'none' : 'action')),\n );\n\n protected readonly size = tuiDirectiveBinding(TuiCell, 'size', 'm');\n\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 readonly isActive = computed(\n () => this.stepper.activeItemIndex() === this.index,\n );\n\n protected avatarAppearance = computed(() => {\n if (this.isActive()) {\n return 'primary';\n }\n\n return this.stepState() === 'error' ? 'negative' : 'secondary';\n });\n\n protected readonly avatarContent = computed(() =>\n this.isActive() || (this.stepState() === 'normal' && !this.icon())\n ? `${this.index + 1}`\n : this.avatarIcon(),\n );\n\n protected readonly avatarIcon = computed(\n () =>\n this.icon() ||\n (this.stepState() === 'error' ? this.icons.error : this.icons.check),\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","<div\n [appearance]=\"avatarAppearance()\"\n [tuiAvatar]=\"avatarContent()\"\n></div>\n<ng-content />\n","import {TuiStep} from './step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\nexport const TuiStepper = [TuiStepperComponent, TuiStep] as const;\n","/**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AAO,EAAA,UAAA,EAAA,CAAA;kBAhBnB,SAAS;AAEF,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yFAAyF,EACpF,OAAA,EAAA,CAAC,SAAS,CAAC,mBAGH,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,OAAO,EAAE,iBAAiB,CAAC,EACtC,IAAA,EAAA;AACF,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,YAAY,EAAE,qBAAqB;AACnC,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,mBAAmB,EAAE,sCAAsC;AAC3D,wBAAA,SAAS,EAAE,YAAY;AAC1B,qBAAA,EAAA,QAAA,EAAA,+GAAA,EAAA,MAAA,EAAA,CAAA,gZAAA,CAAA,EAAA;;;MExBQ,UAAU,GAAG,CAAC,mBAAmB,EAAE,OAAO;;ACHvD;;AAEG;;;;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
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;display:inline-block;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;display:inline-block;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,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAC3E;QAEe,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5D;+GAPY,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qCAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAA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