@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,89 +1,70 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { computed, inject, input, model, ElementRef, ViewChildren, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
4
|
-
import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
|
|
5
4
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
6
5
|
import { tuiIsFocusedIn } from '@taiga-ui/cdk/utils/focus';
|
|
7
6
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
8
7
|
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
9
|
-
import {
|
|
8
|
+
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
10
9
|
import { TUI_PAGINATION_TEXTS } from '@taiga-ui/kit/tokens';
|
|
11
10
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
12
11
|
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
13
12
|
|
|
14
13
|
const [TUI_PAGINATION_OPTIONS, tuiPaginationOptionsProvider] = tuiCreateOptions({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return isActive ? 'primary' : fallback;
|
|
18
|
-
},
|
|
19
|
-
defaultSize: 'l',
|
|
14
|
+
size: 'l',
|
|
15
|
+
appearance: (isActive) => (isActive ? 'primary' : 'flat'),
|
|
20
16
|
});
|
|
21
17
|
|
|
22
|
-
const
|
|
18
|
+
const ELLIPSIS_ITEM_LENGTH = 1;
|
|
23
19
|
const ACTIVE_ITEM_LENGTH = 1;
|
|
24
20
|
class TuiPagination {
|
|
25
21
|
constructor() {
|
|
26
22
|
this.els = EMPTY_QUERY;
|
|
27
23
|
this.el = tuiInjectElement();
|
|
24
|
+
this.maxHalfLength = computed(() => this.sidePadding() + ELLIPSIS_ITEM_LENGTH + this.activePadding());
|
|
25
|
+
this.maxElementsLength = computed(() => this.maxHalfLength() * 2 + ACTIVE_ITEM_LENGTH);
|
|
26
|
+
this.lastElementIndex = computed(() => this.elementsLength() - 1);
|
|
27
|
+
this.itemsFit = computed(() => this.length() <= this.maxElementsLength());
|
|
28
|
+
this.lastIndex = computed(() => this.length() - 1);
|
|
29
|
+
this.reverseIndex = computed(() => this.lastIndex() - this.index());
|
|
28
30
|
this.texts = inject(TUI_PAGINATION_TEXTS);
|
|
29
|
-
this.icons = inject(
|
|
31
|
+
this.icons = inject(TUI_COMMON_ICONS);
|
|
30
32
|
this.options = inject(TUI_PAGINATION_OPTIONS);
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.index = 0;
|
|
47
|
-
this.indexChange = new EventEmitter();
|
|
48
|
-
}
|
|
49
|
-
get nativeFocusableElement() {
|
|
50
|
-
if (this.disabled) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
let activeElementIndex = 0;
|
|
54
|
-
const { elementsLength } = this;
|
|
55
|
-
for (let i = 0; i < elementsLength; i++) {
|
|
56
|
-
const itemIndex = this.getItemIndexByElementIndex(i);
|
|
57
|
-
if (itemIndex) {
|
|
58
|
-
activeElementIndex++;
|
|
33
|
+
this.buttonSize = computed(() => (this.size() === 'm' ? 'xs' : 's'));
|
|
34
|
+
this.elementsLength = computed(() => this.itemsFit() ? this.length() : this.maxElementsLength());
|
|
35
|
+
this.length = input(1);
|
|
36
|
+
this.focusable = input(true);
|
|
37
|
+
this.size = input(this.options.size);
|
|
38
|
+
this.disabled = input(false);
|
|
39
|
+
this.activePadding = input(1);
|
|
40
|
+
this.sidePadding = input(1);
|
|
41
|
+
this.content = input();
|
|
42
|
+
this.index = model(0);
|
|
43
|
+
this.arrowIsDisabledRight = computed(() => this.reverseIndex() === 0);
|
|
44
|
+
this.arrowIsDisabledLeft = computed(() => this.index() === 0);
|
|
45
|
+
this.nativeFocusableElement = computed(() => {
|
|
46
|
+
if (this.disabled()) {
|
|
47
|
+
return null;
|
|
59
48
|
}
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
let activeElementIndex = 0;
|
|
50
|
+
for (let i = 0; i < this.elementsLength(); i++) {
|
|
51
|
+
const itemIndex = this.getItemIndexByElementIndex(i);
|
|
52
|
+
if (itemIndex) {
|
|
53
|
+
activeElementIndex++;
|
|
54
|
+
}
|
|
55
|
+
if (itemIndex === this.index()) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
62
58
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
return (this.els.find((_, index) => index === activeElementIndex)?.nativeElement ??
|
|
60
|
+
null);
|
|
61
|
+
});
|
|
66
62
|
}
|
|
67
63
|
get focused() {
|
|
68
64
|
return tuiIsFocusedIn(this.el);
|
|
69
65
|
}
|
|
70
|
-
get arrowIsDisabledLeft() {
|
|
71
|
-
return this.index === 0;
|
|
72
|
-
}
|
|
73
|
-
get arrowIsDisabledRight() {
|
|
74
|
-
return this.reverseIndex === 0;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Number of items in a container.
|
|
78
|
-
*/
|
|
79
|
-
get elementsLength() {
|
|
80
|
-
return this.itemsFit ? this.length : this.maxElementsLength;
|
|
81
|
-
}
|
|
82
|
-
get buttonSize() {
|
|
83
|
-
return this.size === 'm' ? 'xs' : 's';
|
|
84
|
-
}
|
|
85
66
|
elementIsFocusable(index) {
|
|
86
|
-
return this.index === index && !this.focused;
|
|
67
|
+
return this.index() === index && !this.focused;
|
|
87
68
|
}
|
|
88
69
|
/**
|
|
89
70
|
* Get index by element index
|
|
@@ -91,31 +72,25 @@ class TuiPagination {
|
|
|
91
72
|
* @returns index or null (for '…')
|
|
92
73
|
*/
|
|
93
74
|
getItemIndexByElementIndex(elementIndex) {
|
|
94
|
-
|
|
75
|
+
const reverseElementIndex = this.lastElementIndex() - elementIndex;
|
|
76
|
+
if (elementIndex < this.sidePadding()) {
|
|
95
77
|
return elementIndex;
|
|
96
78
|
}
|
|
97
|
-
if (
|
|
98
|
-
return
|
|
79
|
+
if (reverseElementIndex < this.sidePadding()) {
|
|
80
|
+
return this.lastIndex() - reverseElementIndex;
|
|
99
81
|
}
|
|
100
|
-
if (elementIndex === this.sidePadding && this.hasCollapsedItems(this.index)) {
|
|
82
|
+
if (elementIndex === this.sidePadding() && this.hasCollapsedItems(this.index())) {
|
|
101
83
|
return null;
|
|
102
84
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
this.hasCollapsedItems(this.reverseIndex)) {
|
|
85
|
+
if (reverseElementIndex === this.sidePadding() &&
|
|
86
|
+
this.hasCollapsedItems(this.reverseIndex())) {
|
|
106
87
|
return null;
|
|
107
88
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
const computedIndex = this.index - this.maxHalfLength + elementIndex;
|
|
112
|
-
return tuiClamp(computedIndex, elementIndex, this.lastIndex - reverseElementIndex);
|
|
89
|
+
const computedIndex = this.index() - this.maxHalfLength() + elementIndex;
|
|
90
|
+
return tuiClamp(computedIndex, elementIndex, this.lastIndex() - reverseElementIndex);
|
|
113
91
|
}
|
|
114
92
|
getElementMode(index = -1) {
|
|
115
|
-
return this.options.appearance(
|
|
116
|
-
isActive: this.index === index,
|
|
117
|
-
size: this.size,
|
|
118
|
-
});
|
|
93
|
+
return this.options.appearance(this.index() === index);
|
|
119
94
|
}
|
|
120
95
|
onElementClick(index) {
|
|
121
96
|
this.updateIndex(index);
|
|
@@ -136,37 +111,7 @@ class TuiPagination {
|
|
|
136
111
|
}
|
|
137
112
|
onArrowClick(direction) {
|
|
138
113
|
this.tryChangeTo(direction);
|
|
139
|
-
this.
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Active index from the end
|
|
143
|
-
*/
|
|
144
|
-
get reverseIndex() {
|
|
145
|
-
return this.lastIndex - this.index;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Max number of elements in half (not counting the middle one).
|
|
149
|
-
*/
|
|
150
|
-
get maxHalfLength() {
|
|
151
|
-
return this.sidePadding + DOTS_LENGTH + this.activePadding;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Is there '...' anywhere
|
|
155
|
-
*/
|
|
156
|
-
get itemsFit() {
|
|
157
|
-
return this.length <= this.maxElementsLength;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Max number of elements
|
|
161
|
-
*/
|
|
162
|
-
get maxElementsLength() {
|
|
163
|
-
return this.maxHalfLength * 2 + ACTIVE_ITEM_LENGTH;
|
|
164
|
-
}
|
|
165
|
-
get lastIndex() {
|
|
166
|
-
return this.length - 1;
|
|
167
|
-
}
|
|
168
|
-
get lastElementIndex() {
|
|
169
|
-
return this.elementsLength - 1;
|
|
114
|
+
this.nativeFocusableElement()?.focus();
|
|
170
115
|
}
|
|
171
116
|
/**
|
|
172
117
|
* Are there collapsed items at that index
|
|
@@ -174,51 +119,25 @@ class TuiPagination {
|
|
|
174
119
|
* @returns there are collapsed items
|
|
175
120
|
*/
|
|
176
121
|
hasCollapsedItems(index) {
|
|
177
|
-
return !this.itemsFit && index > this.maxHalfLength;
|
|
122
|
+
return !this.itemsFit() && index > this.maxHalfLength();
|
|
178
123
|
}
|
|
179
124
|
tryChangeTo(direction) {
|
|
180
|
-
this.updateIndex(tuiClamp(this.index + (direction === 'right' ? 1 : -1), 0, this.lastIndex));
|
|
181
|
-
}
|
|
182
|
-
focusActive() {
|
|
183
|
-
const { nativeFocusableElement } = this;
|
|
184
|
-
if (nativeFocusableElement) {
|
|
185
|
-
nativeFocusableElement.focus();
|
|
186
|
-
}
|
|
125
|
+
this.updateIndex(tuiClamp(this.index() + (direction === 'right' ? 1 : -1), 0, this.lastIndex()));
|
|
187
126
|
}
|
|
188
127
|
updateIndex(index) {
|
|
189
|
-
if (this.index
|
|
190
|
-
|
|
128
|
+
if (this.index() !== index) {
|
|
129
|
+
this.index.set(index);
|
|
191
130
|
}
|
|
192
|
-
this.index = index;
|
|
193
|
-
this.indexChange.emit(index);
|
|
194
131
|
}
|
|
195
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
196
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPagination, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
133
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiPagination, isStandalone: true, selector: "tui-pagination", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, focusable: { classPropertyName: "focusable", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, activePadding: { classPropertyName: "activePadding", publicName: "activePadding", isSignal: true, isRequired: false, transformFunction: null }, sidePadding: { classPropertyName: "sidePadding", publicName: "sidePadding", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { index: "indexChange" }, viewQueries: [{ propertyName: "els", predicate: ["element"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"t-content\">\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledLeft()\"\n [iconStart]=\"icons.decrement\"\n [size]=\"buttonSize()\"\n (click)=\"onArrowClick('left')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[0] }}\n </button>\n @for (_ of '-'.repeat(elementsLength()); track $index) {\n @let index = getItemIndexByElementIndex($index);\n @if (index !== null) {\n <button\n #element\n automation-id=\"tui-pagination__element\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode(index)\"\n [disabled]=\"disabled()\"\n [size]=\"buttonSize()\"\n [tabIndex]=\"elementIsFocusable(index) ? 0 : -1\"\n (click)=\"onElementClick(index)\"\n (keydown.arrowLeft.prevent)=\"onElementKeyDownArrowLeft(element)\"\n (keydown.arrowRight.prevent)=\"onElementKeyDownArrowRight(element)\"\n >\n <ng-container *polymorpheusOutlet=\"content() || index + 1 as text; context: {$implicit: index}\">\n {{ text }}\n </ng-container>\n </button>\n } @else {\n <div\n automation-id=\"tui-pagination__element\"\n class=\"t-ellipsis\"\n [class.t-ellipsis_small]=\"size() === 'm'\"\n ></div>\n }\n }\n\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledRight()\"\n [iconStart]=\"icons.increment\"\n [size]=\"buttonSize()\"\n (click)=\"onArrowClick('right')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[1] }}\n </button>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-body-s);color:var(--tui-text-primary);text-align:center}.t-content{display:flex;justify-content:center}.t-button{margin:0 .125rem;flex-shrink:0}.t-button[tuiButton]:not(.t-button_small){min-inline-size:var(--tui-height-s);padding:0 .5rem}.t-button[tuiButton]:not(.t-button_small)[data-size=xs]{min-inline-size:var(--tui-height-xs);padding:0 .375rem}.t-button:first-child{transform:scaleX(var(--tui-inline));margin-inline-start:0}.t-button:last-child{transform:scaleX(var(--tui-inline));margin-inline-end:0}.t-ellipsis{inline-size:var(--tui-height-s);block-size:var(--tui-height-s);line-height:var(--tui-height-s);margin:0 .125rem;flex-shrink:0;color:var(--tui-text-action);text-align:center;cursor:default}.t-ellipsis_small{inline-size:var(--tui-height-xs);block-size:var(--tui-height-xs);line-height:var(--tui-height-xs)}.t-ellipsis:before{content:\"\\2026\"}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
197
134
|
}
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPagination, decorators: [{
|
|
199
136
|
type: Component,
|
|
200
|
-
args: [{ selector: 'tui-pagination', imports: [PolymorpheusOutlet, TuiButton
|
|
137
|
+
args: [{ selector: 'tui-pagination', imports: [PolymorpheusOutlet, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"t-content\">\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledLeft()\"\n [iconStart]=\"icons.decrement\"\n [size]=\"buttonSize()\"\n (click)=\"onArrowClick('left')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[0] }}\n </button>\n @for (_ of '-'.repeat(elementsLength()); track $index) {\n @let index = getItemIndexByElementIndex($index);\n @if (index !== null) {\n <button\n #element\n automation-id=\"tui-pagination__element\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode(index)\"\n [disabled]=\"disabled()\"\n [size]=\"buttonSize()\"\n [tabIndex]=\"elementIsFocusable(index) ? 0 : -1\"\n (click)=\"onElementClick(index)\"\n (keydown.arrowLeft.prevent)=\"onElementKeyDownArrowLeft(element)\"\n (keydown.arrowRight.prevent)=\"onElementKeyDownArrowRight(element)\"\n >\n <ng-container *polymorpheusOutlet=\"content() || index + 1 as text; context: {$implicit: index}\">\n {{ text }}\n </ng-container>\n </button>\n } @else {\n <div\n automation-id=\"tui-pagination__element\"\n class=\"t-ellipsis\"\n [class.t-ellipsis_small]=\"size() === 'm'\"\n ></div>\n }\n }\n\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledRight()\"\n [iconStart]=\"icons.increment\"\n [size]=\"buttonSize()\"\n (click)=\"onArrowClick('right')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[1] }}\n </button>\n</div>\n", styles: [":host{display:block;font:var(--tui-font-body-s);color:var(--tui-text-primary);text-align:center}.t-content{display:flex;justify-content:center}.t-button{margin:0 .125rem;flex-shrink:0}.t-button[tuiButton]:not(.t-button_small){min-inline-size:var(--tui-height-s);padding:0 .5rem}.t-button[tuiButton]:not(.t-button_small)[data-size=xs]{min-inline-size:var(--tui-height-xs);padding:0 .375rem}.t-button:first-child{transform:scaleX(var(--tui-inline));margin-inline-start:0}.t-button:last-child{transform:scaleX(var(--tui-inline));margin-inline-end:0}.t-ellipsis{inline-size:var(--tui-height-s);block-size:var(--tui-height-s);line-height:var(--tui-height-s);margin:0 .125rem;flex-shrink:0;color:var(--tui-text-action);text-align:center;cursor:default}.t-ellipsis_small{inline-size:var(--tui-height-xs);block-size:var(--tui-height-xs);line-height:var(--tui-height-xs)}.t-ellipsis:before{content:\"\\2026\"}\n"] }]
|
|
201
138
|
}], propDecorators: { els: [{
|
|
202
139
|
type: ViewChildren,
|
|
203
140
|
args: ['element', { read: ElementRef }]
|
|
204
|
-
}], length: [{
|
|
205
|
-
type: Input
|
|
206
|
-
}], focusable: [{
|
|
207
|
-
type: Input
|
|
208
|
-
}], size: [{
|
|
209
|
-
type: Input
|
|
210
|
-
}], disabled: [{
|
|
211
|
-
type: Input
|
|
212
|
-
}], activePadding: [{
|
|
213
|
-
type: Input
|
|
214
|
-
}], sidePadding: [{
|
|
215
|
-
type: Input
|
|
216
|
-
}], content: [{
|
|
217
|
-
type: Input
|
|
218
|
-
}], index: [{
|
|
219
|
-
type: Input
|
|
220
|
-
}], indexChange: [{
|
|
221
|
-
type: Output
|
|
222
141
|
}] } });
|
|
223
142
|
|
|
224
143
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-pagination.mjs","sources":["../../../projects/kit/components/pagination/pagination.options.ts","../../../projects/kit/components/pagination/pagination.component.ts","../../../projects/kit/components/pagination/pagination.template.html","../../../projects/kit/components/pagination/taiga-ui-kit-components-pagination.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPaginationOptions {\n readonly appearance: TuiStringHandler<{\n isActive: boolean;\n size: TuiSizeL | TuiSizeS;\n }>;\n readonly defaultSize: TuiSizeL | TuiSizeS;\n}\n\nexport const [TUI_PAGINATION_OPTIONS, tuiPaginationOptionsProvider] =\n tuiCreateOptions<TuiPaginationOptions>({\n appearance: ({isActive, size}) => {\n const fallback = size === 's' ? 'secondary' : 'flat';\n\n return isActive ? 'primary' : fallback;\n },\n defaultSize: 'l',\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n Output,\n type QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocusedIn} from '@taiga-ui/cdk/utils/focus';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TUI_SPIN_ICONS} from '@taiga-ui/core/tokens';\nimport {\n type TuiHorizontalDirection,\n type TuiSizeL,\n type TuiSizeS,\n type TuiSizeXS,\n} from '@taiga-ui/core/types';\nimport {TUI_PAGINATION_TEXTS} from '@taiga-ui/kit/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PAGINATION_OPTIONS} from './pagination.options';\n\nconst DOTS_LENGTH = 1;\nconst ACTIVE_ITEM_LENGTH = 1;\n\n@Component({\n selector: 'tui-pagination',\n imports: [PolymorpheusOutlet, TuiButton, TuiRepeatTimes],\n templateUrl: './pagination.template.html',\n styleUrl: './pagination.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPagination {\n @ViewChildren('element', {read: ElementRef})\n private readonly els: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n\n protected readonly texts = inject(TUI_PAGINATION_TEXTS);\n protected readonly icons = inject(TUI_SPIN_ICONS);\n protected readonly options = inject(TUI_PAGINATION_OPTIONS);\n\n @Input()\n public length = 1;\n\n @Input()\n public focusable = true;\n\n @Input()\n public size: TuiSizeL | TuiSizeS = this.options.defaultSize;\n\n @Input()\n public readonly disabled = false;\n\n /**\n * Amount of visible pages around active page\n */\n @Input()\n public activePadding = 1;\n\n /**\n * Amount of visible pages at the edges\n */\n @Input()\n public sidePadding = 1;\n\n /**\n * Customization for page number display.\n */\n @Input()\n public content: PolymorpheusContent<TuiContext<number>>;\n\n /**\n * Active page index\n */\n @Input()\n public index = 0;\n\n @Output()\n public readonly indexChange = new EventEmitter<number>();\n\n public get nativeFocusableElement(): HTMLElement | null {\n if (this.disabled) {\n return null;\n }\n\n let activeElementIndex = 0;\n const {elementsLength} = this;\n\n for (let i = 0; i < elementsLength; i++) {\n const itemIndex = this.getItemIndexByElementIndex(i);\n\n if (itemIndex) {\n activeElementIndex++;\n }\n\n if (itemIndex === this.index) {\n break;\n }\n }\n\n return (\n this.els.find((_, index) => index === activeElementIndex)?.nativeElement ??\n null\n );\n }\n\n public get focused(): boolean {\n return tuiIsFocusedIn(this.el);\n }\n\n public get arrowIsDisabledLeft(): boolean {\n return this.index === 0;\n }\n\n public get arrowIsDisabledRight(): boolean {\n return this.reverseIndex === 0;\n }\n\n /**\n * Number of items in a container.\n */\n protected get elementsLength(): number {\n return this.itemsFit ? this.length : this.maxElementsLength;\n }\n\n protected get buttonSize(): TuiSizeXS {\n return this.size === 'm' ? 'xs' : 's';\n }\n\n protected elementIsFocusable(index: number): boolean {\n return this.index === index && !this.focused;\n }\n\n /**\n * Get index by element index\n * @param elementIndex\n * @returns index or null (for '…')\n */\n protected getItemIndexByElementIndex(elementIndex: number): number | null {\n if (this.size === 's') {\n return elementIndex;\n }\n\n if (elementIndex < this.sidePadding) {\n return elementIndex;\n }\n\n if (elementIndex === this.sidePadding && this.hasCollapsedItems(this.index)) {\n return null;\n }\n\n const reverseElementIndex = this.lastElementIndex - elementIndex;\n\n if (\n reverseElementIndex === this.sidePadding &&\n this.hasCollapsedItems(this.reverseIndex)\n ) {\n return null;\n }\n\n if (reverseElementIndex < this.sidePadding) {\n return this.lastIndex - reverseElementIndex;\n }\n\n const computedIndex = this.index - this.maxHalfLength + elementIndex;\n\n return tuiClamp(\n computedIndex,\n elementIndex,\n this.lastIndex - reverseElementIndex,\n );\n }\n\n protected getElementMode(index = -1): string {\n return this.options.appearance({\n isActive: this.index === index,\n size: this.size,\n });\n }\n\n protected onElementClick(index: number): void {\n this.updateIndex(index);\n }\n\n protected onElementKeyDownArrowLeft(element: HTMLElement): void {\n if (element === this.els.first.nativeElement) {\n return;\n }\n\n const previous = this.els.find(\n (_, index, array) => array[index + 1]?.nativeElement === element,\n );\n\n previous?.nativeElement.focus();\n }\n\n protected onElementKeyDownArrowRight(element: HTMLElement): void {\n if (element === this.els.last.nativeElement) {\n return;\n }\n\n const next = this.els.find(\n (_, index, array) => array[index - 1]?.nativeElement === element,\n );\n\n next?.nativeElement.focus();\n }\n\n protected onArrowClick(direction: TuiHorizontalDirection): void {\n this.tryChangeTo(direction);\n this.focusActive();\n }\n\n /**\n * Active index from the end\n */\n private get reverseIndex(): number {\n return this.lastIndex - this.index;\n }\n\n /**\n * Max number of elements in half (not counting the middle one).\n */\n private get maxHalfLength(): number {\n return this.sidePadding + DOTS_LENGTH + this.activePadding;\n }\n\n /**\n * Is there '...' anywhere\n */\n private get itemsFit(): boolean {\n return this.length <= this.maxElementsLength;\n }\n\n /**\n * Max number of elements\n */\n private get maxElementsLength(): number {\n return this.maxHalfLength * 2 + ACTIVE_ITEM_LENGTH;\n }\n\n private get lastIndex(): number {\n return this.length - 1;\n }\n\n private get lastElementIndex(): number {\n return this.elementsLength - 1;\n }\n\n /**\n * Are there collapsed items at that index\n * @param index\n * @returns there are collapsed items\n */\n private hasCollapsedItems(index: number): boolean {\n return !this.itemsFit && index > this.maxHalfLength;\n }\n\n private tryChangeTo(direction: TuiHorizontalDirection): void {\n this.updateIndex(\n tuiClamp(this.index + (direction === 'right' ? 1 : -1), 0, this.lastIndex),\n );\n }\n\n private focusActive(): void {\n const {nativeFocusableElement} = this;\n\n if (nativeFocusableElement) {\n nativeFocusableElement.focus();\n }\n }\n\n private updateIndex(index: number): void {\n if (this.index === index) {\n return;\n }\n\n this.index = index;\n this.indexChange.emit(index);\n }\n}\n","<div class=\"t-content\">\n @if (size !== 's') {\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledLeft\"\n [iconStart]=\"icons.decrement\"\n [size]=\"buttonSize\"\n (click)=\"onArrowClick('left')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[0] }}\n </button>\n <ng-container *tuiRepeatTimes=\"let elementIndex of elementsLength\">\n @let index = getItemIndexByElementIndex(elementIndex);\n @if (index !== null) {\n <button\n #element\n automation-id=\"tui-pagination__element\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode(index)\"\n [disabled]=\"disabled\"\n [size]=\"buttonSize\"\n [tabIndex]=\"elementIsFocusable(index) ? 0 : -1\"\n (click)=\"onElementClick(index)\"\n (keydown.arrowLeft.prevent)=\"onElementKeyDownArrowLeft(element)\"\n (keydown.arrowRight.prevent)=\"onElementKeyDownArrowRight(element)\"\n >\n <ng-container *polymorpheusOutlet=\"content || index + 1 as text; context: {$implicit: index}\">\n {{ text }}\n </ng-container>\n </button>\n } @else {\n <div\n automation-id=\"tui-pagination__element\"\n class=\"t-dots\"\n [class.t-dots_small]=\"size === 'm'\"\n ></div>\n }\n </ng-container>\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledRight\"\n [iconStart]=\"icons.increment\"\n [size]=\"buttonSize\"\n (click)=\"onArrowClick('right')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[1] }}\n </button>\n } @else {\n <button\n *tuiRepeatTimes=\"let indexItem of length\"\n #element\n tuiButton\n type=\"button\"\n class=\"t-button t-button_small\"\n [appearance]=\"getElementMode(indexItem)\"\n [disabled]=\"disabled\"\n [tabIndex]=\"elementIsFocusable(indexItem) ? 0 : -1\"\n (click)=\"onElementClick(indexItem)\"\n (keydown.arrowLeft.prevent)=\"onElementKeyDownArrowLeft(element)\"\n (keydown.arrowRight.prevent)=\"onElementKeyDownArrowRight(element)\"\n >\n {{ indexItem + 1 }}\n </button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EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,w8FA6EA,qrCD1Cc,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,SAAS,EAAA,QAAA,EAAA,uEAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,cAAc,EAAA,QAAA,EAAA,oCAAA,EAAA,MAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAK9C,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;+BACI,gBAAgB,EAAA,OAAA,EACjB,CAAC,kBAAkB,EAAE,SAAS,EAAE,cAAc,CAAC,EAAA,eAAA,EAGvC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,w8FAAA,EAAA,MAAA,EAAA,CAAA,6nCAAA,CAAA,EAAA;8BAI9B,GAAG,EAAA,CAAA;sBADnB,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,SAAS,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC;gBAUpC,MAAM,EAAA,CAAA;sBADZ;gBAIM,SAAS,EAAA,CAAA;sBADf;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIe,QAAQ,EAAA,CAAA;sBADvB;gBAOM,aAAa,EAAA,CAAA;sBADnB;gBAOM,WAAW,EAAA,CAAA;sBADjB;gBAOM,OAAO,EAAA,CAAA;sBADb;gBAOM,KAAK,EAAA,CAAA;sBADX;gBAIe,WAAW,EAAA,CAAA;sBAD1B;;;AEtFL;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-pagination.mjs","sources":["../../../projects/kit/components/pagination/pagination.options.ts","../../../projects/kit/components/pagination/pagination.component.ts","../../../projects/kit/components/pagination/pagination.template.html","../../../projects/kit/components/pagination/taiga-ui-kit-components-pagination.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL} from '@taiga-ui/core/types';\n\nexport interface TuiPaginationOptions {\n readonly size: TuiSizeL;\n readonly appearance: TuiStringHandler<boolean>;\n}\n\nexport const [TUI_PAGINATION_OPTIONS, tuiPaginationOptionsProvider] =\n tuiCreateOptions<TuiPaginationOptions>({\n size: 'l',\n appearance: (isActive) => (isActive ? 'primary' : 'flat'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n type QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocusedIn} from '@taiga-ui/cdk/utils/focus';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {TUI_PAGINATION_TEXTS} from '@taiga-ui/kit/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PAGINATION_OPTIONS} from './pagination.options';\n\nconst ELLIPSIS_ITEM_LENGTH = 1;\nconst ACTIVE_ITEM_LENGTH = 1;\n\n@Component({\n selector: 'tui-pagination',\n imports: [PolymorpheusOutlet, TuiButton],\n templateUrl: './pagination.template.html',\n styleUrl: './pagination.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPagination {\n @ViewChildren('element', {read: ElementRef})\n private readonly els: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n\n private readonly maxHalfLength = computed(\n () => this.sidePadding() + ELLIPSIS_ITEM_LENGTH + this.activePadding(),\n );\n\n private readonly maxElementsLength = computed(\n () => this.maxHalfLength() * 2 + ACTIVE_ITEM_LENGTH,\n );\n\n private readonly lastElementIndex = computed(() => this.elementsLength() - 1);\n private readonly itemsFit = computed(() => this.length() <= this.maxElementsLength());\n private readonly lastIndex = computed(() => this.length() - 1);\n\n private readonly reverseIndex = computed(\n (): number => this.lastIndex() - this.index(),\n );\n\n protected readonly texts = inject(TUI_PAGINATION_TEXTS);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly options = inject(TUI_PAGINATION_OPTIONS);\n\n protected readonly buttonSize = computed(() => (this.size() === 'm' ? 'xs' : 's'));\n\n protected readonly elementsLength = computed(() =>\n this.itemsFit() ? this.length() : this.maxElementsLength(),\n );\n\n public readonly length = input(1);\n public readonly focusable = input(true);\n public readonly size = input(this.options.size);\n public readonly disabled = input(false);\n public readonly activePadding = input(1);\n public readonly sidePadding = input(1);\n public readonly content = input<PolymorpheusContent<TuiContext<number>>>();\n public readonly index = model(0);\n public readonly arrowIsDisabledRight = computed(() => this.reverseIndex() === 0);\n public readonly arrowIsDisabledLeft = computed(() => this.index() === 0);\n public readonly nativeFocusableElement = computed((): HTMLElement | null => {\n if (this.disabled()) {\n return null;\n }\n\n let activeElementIndex = 0;\n\n for (let i = 0; i < this.elementsLength(); i++) {\n const itemIndex = this.getItemIndexByElementIndex(i);\n\n if (itemIndex) {\n activeElementIndex++;\n }\n\n if (itemIndex === this.index()) {\n break;\n }\n }\n\n return (\n this.els.find((_, index) => index === activeElementIndex)?.nativeElement ??\n null\n );\n });\n\n public get focused(): boolean {\n return tuiIsFocusedIn(this.el);\n }\n\n protected elementIsFocusable(index: number): boolean {\n return this.index() === index && !this.focused;\n }\n\n /**\n * Get index by element index\n * @param elementIndex\n * @returns index or null (for '…')\n */\n protected getItemIndexByElementIndex(elementIndex: number): number | null {\n const reverseElementIndex = this.lastElementIndex() - elementIndex;\n\n if (elementIndex < this.sidePadding()) {\n return elementIndex;\n }\n\n if (reverseElementIndex < this.sidePadding()) {\n return this.lastIndex() - reverseElementIndex;\n }\n\n if (elementIndex === this.sidePadding() && this.hasCollapsedItems(this.index())) {\n return null;\n }\n\n if (\n reverseElementIndex === this.sidePadding() &&\n this.hasCollapsedItems(this.reverseIndex())\n ) {\n return null;\n }\n\n const computedIndex = this.index() - this.maxHalfLength() + elementIndex;\n\n return tuiClamp(\n computedIndex,\n elementIndex,\n this.lastIndex() - reverseElementIndex,\n );\n }\n\n protected getElementMode(index = -1): string {\n return this.options.appearance(this.index() === index);\n }\n\n protected onElementClick(index: number): void {\n this.updateIndex(index);\n }\n\n protected onElementKeyDownArrowLeft(element: HTMLElement): void {\n if (element === this.els.first.nativeElement) {\n return;\n }\n\n const previous = this.els.find(\n (_, index, array) => array[index + 1]?.nativeElement === element,\n );\n\n previous?.nativeElement.focus();\n }\n\n protected onElementKeyDownArrowRight(element: HTMLElement): void {\n if (element === this.els.last.nativeElement) {\n return;\n }\n\n const next = this.els.find(\n (_, index, array) => array[index - 1]?.nativeElement === element,\n );\n\n next?.nativeElement.focus();\n }\n\n protected onArrowClick(direction: TuiHorizontalDirection): void {\n this.tryChangeTo(direction);\n this.nativeFocusableElement()?.focus();\n }\n\n /**\n * Are there collapsed items at that index\n * @param index\n * @returns there are collapsed items\n */\n private hasCollapsedItems(index: number): boolean {\n return !this.itemsFit() && index > this.maxHalfLength();\n }\n\n private tryChangeTo(direction: TuiHorizontalDirection): void {\n this.updateIndex(\n tuiClamp(\n this.index() + (direction === 'right' ? 1 : -1),\n 0,\n this.lastIndex(),\n ),\n );\n }\n\n private updateIndex(index: number): void {\n if (this.index() !== index) {\n this.index.set(index);\n }\n }\n}\n","<div class=\"t-content\">\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledLeft()\"\n [iconStart]=\"icons.decrement\"\n [size]=\"buttonSize()\"\n (click)=\"onArrowClick('left')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[0] }}\n </button>\n @for (_ of '-'.repeat(elementsLength()); track $index) {\n @let index = getItemIndexByElementIndex($index);\n @if (index !== null) {\n <button\n #element\n automation-id=\"tui-pagination__element\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode(index)\"\n [disabled]=\"disabled()\"\n [size]=\"buttonSize()\"\n [tabIndex]=\"elementIsFocusable(index) ? 0 : -1\"\n (click)=\"onElementClick(index)\"\n (keydown.arrowLeft.prevent)=\"onElementKeyDownArrowLeft(element)\"\n (keydown.arrowRight.prevent)=\"onElementKeyDownArrowRight(element)\"\n >\n <ng-container *polymorpheusOutlet=\"content() || index + 1 as text; context: {$implicit: index}\">\n {{ text }}\n </ng-container>\n </button>\n } @else {\n <div\n automation-id=\"tui-pagination__element\"\n class=\"t-ellipsis\"\n [class.t-ellipsis_small]=\"size() === 'm'\"\n ></div>\n }\n }\n\n <button\n tabIndex=\"-1\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"getElementMode()\"\n [disabled]=\"arrowIsDisabledRight()\"\n [iconStart]=\"icons.increment\"\n [size]=\"buttonSize()\"\n (click)=\"onArrowClick('right')\"\n (mousedown.zoneless.prevent)=\"(0)\"\n >\n {{ texts()[1] }}\n </button>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MASa,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,GAC/D,gBAAgB,CAAuB;AACnC,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,UAAU,EAAE,CAAC,QAAQ,MAAM,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAC5D,CAAA;;ACWL,MAAM,oBAAoB,GAAG,CAAC;AAC9B,MAAM,kBAAkB,GAAG,C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,EAAC;;;AEnC/C;;AAEG;;;;"}
|
|
@@ -3,22 +3,22 @@ import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive
|
|
|
3
3
|
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
4
|
|
|
5
5
|
class Styles {
|
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
7
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-pin" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiPin]{--t-size: 2rem;transition-property:width,height,border,margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;inline-size:var(--t-size);block-size:var(--t-size);align-items:stretch;flex-direction:column;justify-content:center;text-align:center;border-radius:100%;font:var(--tui-font-body-s);font-weight:700;box-sizing:border-box;color:var(--tui-text-primary-on-accent-2);background:var(--tui-background-accent-2);box-shadow:0 0 0 .125rem var(--tui-background-elevation-2);border:0 solid var(--tui-background-accent-2);transform:translate(-50%,-50%)}[tuiPin]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiPin]:empty{--t-size: .75rem}[tuiPin]:empty:before{display:none}[tuiPin]>input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;border-radius:100%}[tuiPin]>img{max-block-size:100%;box-sizing:border-box;border-radius:100%;background:var(--tui-background-base)}[tuiPin]>tui-icon{transition-property:width,height;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font-size:1.25rem;align-self:center}[tuiPin]:has(:checked){--t-size: 3.5rem;font:var(--tui-font-body-m);font-weight:700;border-width:0;margin-block-start:-2.75rem}[tuiPin]:has(:checked)>img{padding:.125rem}[tuiPin]:has(:checked)>tui-icon{font-size:2.125rem}[tuiPin]:has(:checked):before{transform:scale(.99) translate(-1.875rem,-1.875rem);opacity:1}[tuiPin]:has(:checked):after{top:4.5rem;opacity:1}[tuiPin]._open{--t-size: 3.5rem;font:var(--tui-font-body-m);font-weight:700;border-width:0;margin-block-start:-2.75rem}[tuiPin]._open>img{padding:.125rem}[tuiPin]._open>tui-icon{font-size:2.125rem}[tuiPin]._open:before{transform:scale(.99) translate(-1.875rem,-1.875rem);opacity:1}[tuiPin]._open:after{top:4.5rem;opacity:1}[tuiPin]:before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:50%;left:50%;right:-.25rem;bottom:-.625rem;box-sizing:border-box;border-width:2.2rem 2rem;border-style:solid;border-color:inherit;opacity:0;transform:scale(.57) translate(-1.875rem,-1.875rem);transform-origin:top left;pointer-events:none;mask:url('data:image/svg+xml,<svg width=\"60\" height=\"66\" viewBox=\"0 0 60 66\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 30.0917C0 13.4726 13.4313 0 30.0002 0C46.5687 0 60 13.4726 60 30.0917C60 44.2105 50.4927 56.0529 37.4162 59.2986C32.5552 60.5551 31.0408 65.275 31.0408 65.275C30.8892 65.697 30.4909 66 30.0183 66C29.5453 66 29.147 65.697 28.9938 65.275C28.9938 65.275 27.481 60.5551 22.6199 59.2986C9.46433 56.0206 0 43.5901 0 30.0917ZM30 57.75C45.3259 57.75 57.75 45.3259 57.75 30C57.75 14.6741 45.3259 2.25 30 2.25C14.6741 2.25 2.25 14.6741 2.25 30C2.25 45.3259 14.6741 57.75 30 57.75Z\" /></svg>') no-repeat}[tuiPin]:after{transition-property:top,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:50%;left:50%;border:.1875rem solid currentColor;border-color:inherit;border-radius:100%;box-sizing:border-box;box-shadow:inherit;transform:translate(-50%,-50%);opacity:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
|
-
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-pin' }, styles: ["[tuiPin]{--t-size: 2rem;transition-property:width,height,border,margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;inline-size:var(--t-size);block-size:var(--t-size);align-items:stretch;flex-direction:column;justify-content:center;text-align:center;border-radius:100%;font:var(--tui-font-
|
|
11
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-pin' }, styles: ["[tuiPin]{--t-size: 2rem;transition-property:width,height,border,margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;inline-size:var(--t-size);block-size:var(--t-size);align-items:stretch;flex-direction:column;justify-content:center;text-align:center;border-radius:100%;font:var(--tui-font-body-s);font-weight:700;box-sizing:border-box;color:var(--tui-text-primary-on-accent-2);background:var(--tui-background-accent-2);box-shadow:0 0 0 .125rem var(--tui-background-elevation-2);border:0 solid var(--tui-background-accent-2);transform:translate(-50%,-50%)}[tuiPin]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiPin]:empty{--t-size: .75rem}[tuiPin]:empty:before{display:none}[tuiPin]>input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;border-radius:100%}[tuiPin]>img{max-block-size:100%;box-sizing:border-box;border-radius:100%;background:var(--tui-background-base)}[tuiPin]>tui-icon{transition-property:width,height;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font-size:1.25rem;align-self:center}[tuiPin]:has(:checked){--t-size: 3.5rem;font:var(--tui-font-body-m);font-weight:700;border-width:0;margin-block-start:-2.75rem}[tuiPin]:has(:checked)>img{padding:.125rem}[tuiPin]:has(:checked)>tui-icon{font-size:2.125rem}[tuiPin]:has(:checked):before{transform:scale(.99) translate(-1.875rem,-1.875rem);opacity:1}[tuiPin]:has(:checked):after{top:4.5rem;opacity:1}[tuiPin]._open{--t-size: 3.5rem;font:var(--tui-font-body-m);font-weight:700;border-width:0;margin-block-start:-2.75rem}[tuiPin]._open>img{padding:.125rem}[tuiPin]._open>tui-icon{font-size:2.125rem}[tuiPin]._open:before{transform:scale(.99) translate(-1.875rem,-1.875rem);opacity:1}[tuiPin]._open:after{top:4.5rem;opacity:1}[tuiPin]:before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:50%;left:50%;right:-.25rem;bottom:-.625rem;box-sizing:border-box;border-width:2.2rem 2rem;border-style:solid;border-color:inherit;opacity:0;transform:scale(.57) translate(-1.875rem,-1.875rem);transform-origin:top left;pointer-events:none;mask:url('data:image/svg+xml,<svg width=\"60\" height=\"66\" viewBox=\"0 0 60 66\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 30.0917C0 13.4726 13.4313 0 30.0002 0C46.5687 0 60 13.4726 60 30.0917C60 44.2105 50.4927 56.0529 37.4162 59.2986C32.5552 60.5551 31.0408 65.275 31.0408 65.275C30.8892 65.697 30.4909 66 30.0183 66C29.5453 66 29.147 65.697 28.9938 65.275C28.9938 65.275 27.481 60.5551 22.6199 59.2986C9.46433 56.0206 0 43.5901 0 30.0917ZM30 57.75C45.3259 57.75 57.75 45.3259 57.75 30C57.75 14.6741 45.3259 2.25 30 2.25C14.6741 2.25 2.25 14.6741 2.25 30C2.25 45.3259 14.6741 57.75 30 57.75Z\" /></svg>') no-repeat}[tuiPin]:after{transition-property:top,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:50%;left:50%;border:.1875rem solid currentColor;border-color:inherit;border-radius:100%;box-sizing:border-box;box-shadow:inherit;transform:translate(-50%,-50%);opacity:0}\n"] }]
|
|
12
12
|
}] });
|
|
13
13
|
class TuiPin {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.nothing = tuiWithStyles(Styles);
|
|
16
16
|
this.open = input('', { alias: 'tuiPin' });
|
|
17
17
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
19
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPin, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiPin, isStandalone: true, selector: "[tuiPin]", inputs: { open: { classPropertyName: "open", publicName: "tuiPin", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiPin": "" }, properties: { "class._open": "open()" } }, ngImport: i0 }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiPin, decorators: [{
|
|
22
22
|
type: Directive,
|
|
23
23
|
args: [{
|
|
24
24
|
selector: '[tuiPin]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-pin.mjs","sources":["../../../projects/kit/components/pin/pin.directive.ts","../../../projects/kit/components/pin/taiga-ui-kit-components-pin.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/pin.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-pin'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiPin]',\n host: {\n tuiPin: '',\n '[class._open]': 'open()',\n },\n})\nexport class TuiPin {\n protected readonly nothing = tuiWithStyles(Styles);\n\n public readonly open = input<boolean | ''>('', {alias: 'tuiPin'});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,6GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-pin.mjs","sources":["../../../projects/kit/components/pin/pin.directive.ts","../../../projects/kit/components/pin/taiga-ui-kit-components-pin.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/pin.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-pin'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiPin]',\n host: {\n tuiPin: '',\n '[class._open]': 'open()',\n },\n})\nexport class TuiPin {\n protected readonly nothing = tuiWithStyles(Styles);\n\n public readonly open = input<boolean | ''>('', {alias: 'tuiPin'});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,6GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,20GAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,SAAS,EAAC,EAAA,MAAA,EAAA,CAAA,20GAAA,CAAA,EAAA;;MAWf,MAAM,CAAA;AAPnB,IAAA,WAAA,GAAA;AAQuB,QAAA,IAAA,CAAA,OAAO,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