@taiga-ui/kit 4.52.0-canary.e10b718 → 4.52.0-canary.e53e79e
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/accordion/accordion.component.d.ts +13 -0
- package/components/accordion/accordion.d.ts +4 -4
- package/components/accordion/accordion.directive.d.ts +11 -10
- package/components/accordion/index.d.ts +1 -3
- package/components/action-bar/action-bar.component.d.ts +5 -7
- package/components/action-bar/index.d.ts +0 -2
- package/components/avatar/avatar-outline.directive.d.ts +3 -3
- package/components/badge/badge.directive.d.ts +2 -2
- package/components/badge/badge.options.d.ts +1 -3
- package/components/badge-notification/badge-notification.options.d.ts +1 -3
- package/components/block/block.directive.d.ts +4 -4
- package/components/block/block.options.d.ts +2 -4
- package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +1 -2
- package/components/chip/chip.directive.d.ts +2 -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 +5 -5
- package/components/combo-box/index.d.ts +1 -0
- package/components/comment/comment.directive.d.ts +2 -2
- package/components/confirm/confirm.component.d.ts +5 -3
- package/components/confirm/confirm.service.d.ts +3 -2
- package/{directives → components}/copy/copy.component.d.ts +2 -2
- package/{directives → components}/copy/copy.directive.d.ts +3 -4
- package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -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/elastic-container/elastic-container.component.d.ts +1 -1
- package/components/files/file/file.options.d.ts +1 -1
- package/components/files/files/files.component.d.ts +2 -2
- package/components/files/input-files/input-files.options.d.ts +1 -3
- package/components/floating-container/floating-container.directive.d.ts +3 -2
- package/components/fullscreen/fullscreen.component.d.ts +14 -0
- package/components/fullscreen/index.d.ts +1 -0
- package/components/index.d.ts +3 -1
- 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 +10 -12
- 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-time/input-date-time.d.ts +4 -1
- package/components/input-date-time/input-date-time.directive.d.ts +6 -6
- package/components/input-month/input-month.d.ts +4 -1
- package/components/input-month/input-month.directive.d.ts +5 -4
- package/components/input-month-range/input-month-range.d.ts +4 -1
- package/components/input-month-range/input-month-range.directive.d.ts +5 -4
- package/components/input-number/input-number.d.ts +4 -1
- package/components/input-number/input-number.directive.d.ts +7 -11
- package/components/input-number/quantum.directive.d.ts +1 -1
- package/components/input-number/step/input-number-step.component.d.ts +1 -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 +26 -32
- 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 +4 -4
- package/components/input-pin/input-pin.d.ts +5 -0
- package/components/input-range/input-range.component.d.ts +9 -12
- package/components/input-slider/input-slider.d.ts +4 -1
- package/components/input-slider/input-slider.directive.d.ts +3 -5
- 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 +8 -10
- package/components/input-year/input-year.d.ts +4 -1
- package/components/input-year/input-year.directive.d.ts +5 -5
- package/components/like/like.component.d.ts +2 -2
- package/components/like/like.options.d.ts +1 -1
- package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
- package/components/line-clamp/line-clamp.component.d.ts +8 -10
- package/components/line-clamp/line-clamp.options.d.ts +1 -3
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +6 -8
- package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
- 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/index.d.ts +1 -0
- package/components/pagination/pagination.component.d.ts +25 -54
- package/components/pagination/pagination.options.d.ts +7 -0
- package/components/pin/pin.directive.d.ts +2 -2
- 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/pagination/preview-pagination.component.d.ts +1 -1
- package/components/preview/preview.component.d.ts +1 -1
- package/components/preview/preview.d.ts +2 -1
- package/components/preview/zoom/preview-zoom.component.d.ts +2 -1
- package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
- package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
- package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
- package/components/progress/progress.options.d.ts +1 -3
- package/components/push/push-alert.component.d.ts +4 -3
- package/components/push/push.component.d.ts +1 -1
- package/components/push/push.directive.d.ts +4 -6
- package/components/push/push.options.d.ts +5 -8
- package/components/push/push.service.d.ts +6 -2
- package/components/radio/radio.component.d.ts +1 -1
- package/components/radio-list/radio-list.component.d.ts +5 -3
- package/components/range/range-change.directive.d.ts +1 -2
- package/components/range/range.component.d.ts +16 -24
- package/components/rating/rating.component.d.ts +5 -5
- package/components/rating/rating.options.d.ts +6 -6
- 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/key-steps.d.ts +1 -2
- package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
- package/components/slider/slider.options.d.ts +1 -6
- package/components/slides/slides.directive.d.ts +4 -4
- package/components/status/status.directive.d.ts +2 -2
- 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-with-more.component.d.ts +1 -1
- 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/index.d.ts +5 -0
- package/components/toast/toast.component.d.ts +18 -0
- package/components/toast/toast.d.ts +3 -0
- package/components/toast/toast.directive.d.ts +7 -0
- package/components/toast/toast.options.d.ts +10 -0
- package/components/toast/toast.service.d.ts +17 -0
- package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
- package/components/tree/misc/tree.constants.d.ts +0 -3
- package/components/tree/misc/tree.tokens.d.ts +1 -6
- package/directives/button-close/button-close.directive.d.ts +2 -1
- package/directives/button-select/button-select.directive.d.ts +4 -4
- package/directives/chevron/chevron.directive.d.ts +2 -3
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
- package/directives/fade/fade.directive.d.ts +2 -2
- package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
- package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
- package/directives/index.d.ts +0 -2
- package/directives/password/password.directive.d.ts +1 -1
- package/directives/sensitive/sensitive.directive.d.ts +2 -2
- package/directives/shimmer/shimmer.directive.d.ts +3 -3
- package/directives/skeleton/skeleton.directive.d.ts +3 -3
- package/directives/tooltip/tooltip.directive.d.ts +3 -3
- package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
- package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs +24 -40
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +33 -44
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +7 -12
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +16 -27
- package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -7
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +20 -31
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +12 -18
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -8
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -23
- 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 +18 -34
- package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs +42 -32
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-comment.mjs +13 -20
- package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-compass.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +14 -17
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-copy.mjs +113 -0
- package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-drawer.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +8 -12
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +43 -50
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs +16 -19
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +63 -0
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs +69 -74
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -14
- package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +34 -51
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +27 -32
- 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 +44 -47
- package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +4 -5
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +24 -18
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month.mjs +27 -21
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +60 -77
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +122 -138
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +32 -23
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs +20 -11
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-range.mjs +33 -29
- package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs +36 -45
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-time.mjs +64 -70
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +26 -18
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +14 -16
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +38 -82
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs +9 -12
- package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs +37 -48
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +37 -33
- 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 +69 -140
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pin.mjs +15 -19
- package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +59 -50
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +76 -81
- package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +49 -57
- 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 +41 -85
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +19 -28
- 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 +82 -62
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +74 -82
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slides.mjs +16 -24
- package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-status.mjs +12 -16
- package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
- 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 +36 -47
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +54 -62
- 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 +164 -0
- package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-components-tree.mjs +59 -63
- package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +3 -1
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs +15 -7
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs +9 -12
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -19
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs +16 -22
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs +9 -15
- 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 +15 -17
- 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 +3 -4
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +12 -14
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -4
- package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +13 -18
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +24 -34
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +28 -38
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +17 -22
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +6 -8
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +4 -5
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives.mjs +0 -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 +12 -25
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-flag.mjs +31 -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 +5 -5
- 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 -1
- package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-tokens.mjs +7 -25
- package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-utils.mjs +2 -8
- package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
- package/package.json +54 -46
- 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 -1
- package/pipes/initials/index.d.ts +1 -0
- package/pipes/initials/initials.pipe.d.ts +7 -0
- package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
- package/styles/components/badge.less +1 -0
- package/styles/components/checkbox.less +1 -1
- package/styles/components/chip.less +12 -1
- package/styles/components/pin.less +0 -1
- package/styles/components/radio.less +1 -1
- package/styles/components/switch.less +1 -1
- package/styles/components/toast.less +44 -0
- package/tokens/i18n.d.ts +25 -26
- package/tokens/index.d.ts +0 -1
- package/tokens/items-handlers.d.ts +1 -7
- package/tokens/preview-icons.d.ts +1 -3
- package/utils/index.d.ts +0 -1
- package/components/accordion/accordion-item-content.directive.d.ts +0 -6
- package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
- package/components/accordion/accordion-item.component.d.ts +0 -25
- package/components/action-bar/action-bar.d.ts +0 -3
- package/components/action-bar/action-bar.directive.d.ts +0 -6
- package/components/pdf-viewer/index.d.ts +0 -4
- package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
- package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
- package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
- package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
- package/components/textarea/textarea-limit.directive.d.ts +0 -27
- 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-pdf-viewer.mjs +0 -83
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.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-directives-copy.mjs +0 -119
- package/fesm2022/taiga-ui-kit-directives-copy.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/fesm2022/taiga-ui-kit-pipes-field-error.mjs +0 -147
- package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +0 -1
- package/pipes/field-error/field-error-content-pipe.d.ts +0 -14
- package/pipes/field-error/field-error-pipe.d.ts +0 -29
- package/pipes/field-error/index.d.ts +0 -2
- package/tokens/validation-errors.d.ts +0 -5
- package/utils/phone.d.ts +0 -3
- /package/{directives → components}/copy/copy.d.ts +0 -0
- /package/{directives → components}/copy/copy.options.d.ts +0 -0
- /package/{directives → components}/copy/index.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-connected.mjs","sources":["../../../projects/kit/directives/connected/connected.directive.ts","../../../projects/kit/directives/connected/taiga-ui-kit-directives-connected.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-connected.mjs","sources":["../../../projects/kit/directives/connected/connected.directive.ts","../../../projects/kit/directives/connected/taiga-ui-kit-directives-connected.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styleUrl: './connected.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-connected'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiConnected]',\n})\nexport class TuiConnected {\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAQA,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,mHANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,67DAAA,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,eAAe,EAAC,EAAA,MAAA,EAAA,CAAA,67DAAA,CAAA,EAAA;;MAOrB,YAAY,CAAA;AAHzB,IAAA,WAAA,GAAA;AAIuB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AACrD;+GAFY,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gBAAgB;AAC7B,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, DestroyRef,
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import {
|
|
6
|
-
import { tuiTypedFromEvent, tuiQueryListChanges, tuiPreventDefault } from '@taiga-ui/cdk/observables';
|
|
2
|
+
import { inject, DestroyRef, contentChildren, ElementRef, Directive } from '@angular/core';
|
|
3
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { tuiTypedFromEvent, tuiPreventDefault } from '@taiga-ui/cdk/observables';
|
|
7
5
|
import { tuiGetClosestFocusable } from '@taiga-ui/cdk/utils/focus';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { merge, switchMap, EMPTY, take, filter, tap, map, shareReplay, debounceTime } from 'rxjs';
|
|
6
|
+
import { TuiDropdownDirective } from '@taiga-ui/core/portals/dropdown';
|
|
7
|
+
import { map, shareReplay, switchMap, merge, filter, debounceTime, EMPTY, take, tap } from 'rxjs';
|
|
11
8
|
|
|
12
9
|
class TuiDataListDropdownManager {
|
|
13
10
|
constructor() {
|
|
14
|
-
this.dropdowns = EMPTY_QUERY;
|
|
15
|
-
this.els = EMPTY_QUERY;
|
|
16
11
|
this.destroyRef = inject(DestroyRef);
|
|
12
|
+
this.dropdowns = contentChildren(TuiDropdownDirective, {
|
|
13
|
+
descendants: true,
|
|
14
|
+
});
|
|
15
|
+
this.els = contentChildren(TuiDropdownDirective, {
|
|
16
|
+
read: ElementRef,
|
|
17
|
+
descendants: true,
|
|
18
|
+
});
|
|
19
|
+
this.elements$ = toObservable(this.els).pipe(map((array) => array.map(({ nativeElement }) => nativeElement)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
20
|
+
this.right$ = this.elements$.pipe(switchMap((elements) => merge(...elements.map((element, index) => tuiTypedFromEvent(element, 'keydown').pipe(filter(({ key }) => key === 'ArrowRight'), tuiPreventDefault(), map(() => index))))));
|
|
21
|
+
this.immediate$ = this.elements$.pipe(switchMap((elements) => merge(...elements.map((element, index) => tuiTypedFromEvent(element, 'click').pipe(map(() => index))))));
|
|
22
|
+
this.debounce$ = this.elements$.pipe(switchMap((elements) => merge(...elements.map((element, index) => merge(tuiTypedFromEvent(element, 'focus'), tuiTypedFromEvent(element, 'blur')).pipe(filter(({ relatedTarget }) => this.notInDropdown(relatedTarget, index)), map(({ type }) => (type === 'focus' ? index : NaN)))))), debounceTime(300));
|
|
17
23
|
}
|
|
18
24
|
ngAfterViewInit() {
|
|
19
25
|
this.right$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((index) => {
|
|
@@ -21,11 +27,11 @@ class TuiDataListDropdownManager {
|
|
|
21
27
|
});
|
|
22
28
|
merge(this.immediate$, this.debounce$)
|
|
23
29
|
.pipe(switchMap((active) => {
|
|
24
|
-
this.dropdowns.forEach((dropdown, index) => {
|
|
30
|
+
this.dropdowns().forEach((dropdown, index) => {
|
|
25
31
|
dropdown.toggle(index === active);
|
|
26
32
|
});
|
|
27
|
-
const element = this.els
|
|
28
|
-
const dropdown = this.dropdowns
|
|
33
|
+
const element = this.els()[active];
|
|
34
|
+
const dropdown = this.dropdowns()[active];
|
|
29
35
|
const ref = dropdown?.ref();
|
|
30
36
|
if (!element || !dropdown || !ref) {
|
|
31
37
|
return EMPTY;
|
|
@@ -43,26 +49,11 @@ class TuiDataListDropdownManager {
|
|
|
43
49
|
}), takeUntilDestroyed(this.destroyRef))
|
|
44
50
|
.subscribe();
|
|
45
51
|
}
|
|
46
|
-
get elements$() {
|
|
47
|
-
return tuiQueryListChanges(this.els).pipe(map((array) => array.map(({ nativeElement }) => nativeElement)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
48
|
-
}
|
|
49
|
-
get right$() {
|
|
50
|
-
return this.elements$.pipe(switchMap((elements) => merge(...elements.map((element, index) => tuiTypedFromEvent(element, 'keydown').pipe(filter(({ key }) => key === 'ArrowRight'), tuiPreventDefault(), map(() => index))))));
|
|
51
|
-
}
|
|
52
|
-
get immediate$() {
|
|
53
|
-
return this.elements$.pipe(switchMap((elements) => merge(...elements.map((element, index) => tuiTypedFromEvent(element, 'click').pipe(map(() => index))))));
|
|
54
|
-
}
|
|
55
|
-
get debounce$() {
|
|
56
|
-
return this.elements$.pipe(switchMap((elements) => merge(...elements.map((element, index) => merge(tuiTypedFromEvent(element, 'focus'), tuiTypedFromEvent(element, 'blur')).pipe(filter(({ relatedTarget }) => this.notInDropdown(relatedTarget, index)), map(({ type }) => (type === 'focus' ? index : NaN)))))), debounceTime(300));
|
|
57
|
-
}
|
|
58
52
|
notInDropdown(element, index) {
|
|
59
|
-
return !this.dropdowns
|
|
60
|
-
.get(index)
|
|
61
|
-
?.ref()
|
|
62
|
-
?.location.nativeElement.contains(element);
|
|
53
|
+
return !this.dropdowns()[index]?.ref()?.location.nativeElement.contains(element);
|
|
63
54
|
}
|
|
64
55
|
tryToFocus(index) {
|
|
65
|
-
const content = this.dropdowns
|
|
56
|
+
const content = this.dropdowns()[index]?.ref()?.location.nativeElement;
|
|
66
57
|
if (!content) {
|
|
67
58
|
return;
|
|
68
59
|
}
|
|
@@ -74,34 +65,15 @@ class TuiDataListDropdownManager {
|
|
|
74
65
|
});
|
|
75
66
|
item?.focus();
|
|
76
67
|
}
|
|
77
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
78
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiDataListDropdownManager, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
69
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.16", type: TuiDataListDropdownManager, isStandalone: true, selector: "tui-data-list[tuiDataListDropdownManager]", queries: [{ propertyName: "dropdowns", predicate: TuiDropdownDirective, descendants: true, isSignal: true }, { propertyName: "els", predicate: TuiDropdownDirective, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0 }); }
|
|
79
70
|
}
|
|
80
|
-
|
|
81
|
-
tuiPure
|
|
82
|
-
], TuiDataListDropdownManager.prototype, "elements$", null);
|
|
83
|
-
__decorate([
|
|
84
|
-
tuiPure
|
|
85
|
-
], TuiDataListDropdownManager.prototype, "right$", null);
|
|
86
|
-
__decorate([
|
|
87
|
-
tuiPure
|
|
88
|
-
], TuiDataListDropdownManager.prototype, "immediate$", null);
|
|
89
|
-
__decorate([
|
|
90
|
-
tuiPure
|
|
91
|
-
], TuiDataListDropdownManager.prototype, "debounce$", null);
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDataListDropdownManager, decorators: [{
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiDataListDropdownManager, decorators: [{
|
|
93
72
|
type: Directive,
|
|
94
73
|
args: [{
|
|
95
|
-
standalone: true,
|
|
96
74
|
selector: 'tui-data-list[tuiDataListDropdownManager]',
|
|
97
75
|
}]
|
|
98
|
-
}]
|
|
99
|
-
type: ContentChildren,
|
|
100
|
-
args: [TuiDropdownDirective, { descendants: true }]
|
|
101
|
-
}], els: [{
|
|
102
|
-
type: ContentChildren,
|
|
103
|
-
args: [TuiDropdownDirective, { read: ElementRef, descendants: true }]
|
|
104
|
-
}], elements$: [], right$: [], immediate$: [], debounce$: [] } });
|
|
76
|
+
}] });
|
|
105
77
|
|
|
106
78
|
/**
|
|
107
79
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-data-list-dropdown-manager.mjs","sources":["../../../projects/kit/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.ts","../../../projects/kit/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n type QueryList,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {\n tuiPreventDefault,\n tuiQueryListChanges,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk/observables';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n debounceTime,\n EMPTY,\n filter,\n map,\n merge,\n type Observable,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManager implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly els: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly destroyRef = inject(DestroyRef);\n\n public ngAfterViewInit(): void {\n this.right$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((index) => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap((active) => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.toggle(index === active);\n });\n\n const element = this.els.get(active);\n const dropdown = this.dropdowns.get(active);\n const ref = dropdown?.ref();\n\n if (!element || !dropdown || !ref) {\n return EMPTY;\n }\n\n const {nativeElement} = ref.location;\n const mouseEnter$ = tuiTypedFromEvent(\n nativeElement,\n 'mouseenter',\n ).pipe(take(1));\n const esc$ = merge(\n tuiTypedFromEvent(element.nativeElement, 'keydown'),\n tuiTypedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({key}) => key === 'Escape'));\n\n return merge(mouseEnter$, esc$).pipe(\n tap((event) => {\n if (dropdown.ref()) {\n event.stopPropagation();\n }\n\n element.nativeElement.focus();\n dropdown.toggle('offsetX' in event);\n }),\n );\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return tuiQueryListChanges(this.els).pipe(\n map((array) => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'keydown').pipe(\n filter(({key}) => key === 'ArrowRight'),\n tuiPreventDefault(),\n map(() => index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'click').pipe(map(() => index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n merge(\n tuiTypedFromEvent(element, 'focus'),\n tuiTypedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n return !this.dropdowns\n .get(index)\n ?.ref()\n ?.location.nativeElement.contains(element);\n }\n\n private tryToFocus(index: number): void {\n const content = this.dropdowns.get(index)?.ref()?.location.nativeElement;\n\n if (!content) {\n return;\n }\n\n // First item is focus trap\n const focusTrap = tuiGetClosestFocusable({initial: content, root: content});\n const item = tuiGetClosestFocusable({\n initial: focusTrap || content,\n root: content,\n });\n\n item?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAoCa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;QAMqB,IAAS,CAAA,SAAA,GAAoC,WAAW;QAGxD,IAAG,CAAA,GAAA,GAAuC,WAAW;AAErD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAmInD;IAjIU,eAAe,GAAA;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AACtE,YAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AAC1B,SAAC,CAAC;QAEF,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS;AAChC,aAAA,IAAI,CACD,SAAS,CAAC,CAAC,MAAM,KAAI;YACjB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,K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A,EAAA,YAAA,EAAA,WAAA,EAAA,SAAA,EAAA,oBAAoB,EAGpB,WAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,KAAA,EAAA,SAAA,EAAA,oBAAoB,2BAAS,UAAU,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;AAoDxD,UAAA,CAAA;IADC;AAMA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,WAAA,EAAA,IAAA,CAAA;AAGD,UAAA,CAAA;IADC;AAeA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;AAGD,UAAA,CAAA;IADC;AAWA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,YAAA,EAAA,IAAA,CAAA;AAGD,UAAA,CAAA;IADC;AAoBA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,WAAA,EAAA,IAAA,CAAA;4FAjHQ,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,2CAA2C;AACxD,iBAAA;8BAGoB,SAAS,EAAA,CAAA;sBADzB,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,oBAAoB,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC;gBAIzC,GAAG,EAAA,CAAA;sBADnB,eAAe;uBAAC,oBAAoB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC;AAoDhE,aAAA,CAAA,EAAA,SAAS,EAQT,EAAA,EAAA,MAAM,EAiBN,EAAA,EAAA,UAAU,MAaV,SAAS,EAAA,EAAA,EAAA,EAAA,CAAA;;AClIzB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-data-list-dropdown-manager.mjs","sources":["../../../projects/kit/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.ts","../../../projects/kit/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.ts"],"sourcesContent":["import {\n type AfterViewInit,\n contentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n} from '@angular/core';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {tuiPreventDefault, tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {\n debounceTime,\n EMPTY,\n filter,\n map,\n merge,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs';\n\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManager implements AfterViewInit {\n private readonly destroyRef = inject(DestroyRef);\n private readonly dropdowns = contentChildren(TuiDropdownDirective, {\n descendants: true,\n });\n\n private readonly els = contentChildren(TuiDropdownDirective, {\n read: ElementRef,\n descendants: true,\n });\n\n private readonly elements$ = toObservable(this.els).pipe(\n map((array) => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n\n private readonly right$ = this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'keydown').pipe(\n filter(({key}) => key === 'ArrowRight'),\n tuiPreventDefault(),\n map(() => index),\n ),\n ),\n ),\n ),\n );\n\n private readonly immediate$ = this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'click').pipe(map(() => index)),\n ),\n ),\n ),\n );\n\n private readonly debounce$ = this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n merge(\n tuiTypedFromEvent(element, 'focus'),\n tuiTypedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n\n public ngAfterViewInit(): void {\n this.right$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((index) => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap((active) => {\n this.dropdowns().forEach((dropdown, index) => {\n dropdown.toggle(index === active);\n });\n\n const element = this.els()[active];\n const dropdown = this.dropdowns()[active];\n const ref = dropdown?.ref();\n\n if (!element || !dropdown || !ref) {\n return EMPTY;\n }\n\n const {nativeElement} = ref.location;\n const mouseEnter$ = tuiTypedFromEvent(\n nativeElement,\n 'mouseenter',\n ).pipe(take(1));\n const esc$ = merge(\n tuiTypedFromEvent(element.nativeElement, 'keydown'),\n tuiTypedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({key}) => key === 'Escape'));\n\n return merge(mouseEnter$, esc$).pipe(\n tap((event) => {\n if (dropdown.ref()) {\n event.stopPropagation();\n }\n\n element.nativeElement.focus();\n dropdown.toggle('offsetX' in event);\n }),\n );\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n return !this.dropdowns()[index]?.ref()?.location.nativeElement.contains(element);\n }\n\n private tryToFocus(index: number): void {\n const content = this.dropdowns()[index]?.ref()?.location.nativeElement;\n\n if (!content) {\n return;\n }\n\n // First item is focus trap\n const focusTrap = tuiGetClosestFocusable({initial: content, root: content});\n const item = tuiGetClosestFocusable({\n initial: focusTrap || content,\n root: content,\n });\n\n item?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,SAAS,GAAG,eAAe,CAAC,oBAAoB,EAAE;AAC/D,YAAA,WAAW,E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AAO,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,sBAAsB,CAAC;YAChC,OAAO,EAAE,SAAS,IAAI,OAAO;AAC7B,YAAA,IAAI,EAAE,OAAO;AAChB,SAAA,CAAC;QAEF,IAAI,EAAE,KAAK,EAAE;;+GA3HR,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,0BAA0B,EAEU,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,WAAA,EAAA,SAAA,EAAA,oBAAoB,EAI1B,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,KAAA,EAAA,SAAA,EAAA,oBAAoB,2BACjD,UAAU,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAPX,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2CAA2C;AACxD,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, Input, Directive } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, afterNextRender, inject, Input, Directive } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { MutationObserverService, WA_MUTATION_OBSERVER_INIT } from '@ng-web-apis/mutation-observer';
|
|
5
5
|
import { ResizeObserverService } from '@ng-web-apis/resize-observer';
|
|
6
|
-
import * as i1 from '@taiga-ui/cdk/directives/transitioned';
|
|
7
|
-
import { TuiTransitioned } from '@taiga-ui/cdk/directives/transitioned';
|
|
8
6
|
import { tuiZonefree } from '@taiga-ui/cdk/observables';
|
|
9
7
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
10
8
|
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
11
9
|
import { merge, fromEvent, filter } from 'rxjs';
|
|
12
10
|
|
|
13
11
|
const BUFFER = 1; // buffer for rounding issues
|
|
14
|
-
class
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
12
|
+
class Styles {
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.16", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-fade" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiFade]{scrollbar-width:none;-ms-overflow-style:none;transition-property:mask-position;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;overflow:auto;text-overflow:unset!important;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}[tuiFade]::-webkit-scrollbar,[tuiFade]::-webkit-scrollbar-thumb{display:none}[tuiFade]:not([data-orientation=vertical]){overflow-y:hidden;-webkit-mask-image:linear-gradient(to right,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to left,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(#000,#000);mask-image:linear-gradient(to right,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to left,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(#000,#000);-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;-webkit-mask-size:calc(51% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),calc(50% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),100% calc(100% - var(--t-line-height, 100%));mask-size:calc(51% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),calc(50% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),100% calc(100% - var(--t-line-height, 100%))}[tuiFade]:not([data-orientation=vertical])._start{-webkit-mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top}[tuiFade]:not([data-orientation=vertical])._end{-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top}[tuiFade]:not([data-orientation=vertical])._start._end{-webkit-mask-position:left bottom,right bottom,top;mask-position:left bottom,right bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._end{-webkit-mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._start{-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._start._end{-webkit-mask-position:left bottom,right bottom,top;mask-position:left bottom,right bottom,top}[tuiFade][data-orientation=vertical]{overflow-x:hidden;-webkit-mask-image:linear-gradient(to bottom,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to top,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset)));mask-image:linear-gradient(to bottom,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to top,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset)));-webkit-mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left calc(100% + var(--t-fade-size) + var(--t-fade-offset));mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left calc(100% + var(--t-fade-size) + var(--t-fade-offset));-webkit-mask-size:100% calc(51% + var(--t-fade-size) + var(--t-fade-offset));mask-size:100% calc(51% + var(--t-fade-size) + var(--t-fade-offset))}[tuiFade][data-orientation=vertical]._start{-webkit-mask-position:left top,left calc(100% + var(--t-fade-size) + var(--t-fade-offset));mask-position:left top,left calc(100% + var(--t-fade-size) + var(--t-fade-offset))}[tuiFade][data-orientation=vertical]._end{-webkit-mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left bottom;mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left bottom}[tuiFade][data-orientation=vertical]._start._end{-webkit-mask-position:left top,left bottom;mask-position:left top,left bottom}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
17
15
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Styles, decorators: [{
|
|
19
17
|
type: Component,
|
|
20
|
-
args: [{
|
|
21
|
-
class: 'tui-fade-styles',
|
|
22
|
-
}, styles: ["[tuiFade]{scrollbar-width:none;-ms-overflow-style:none;transition-property:mask-position;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;overflow:auto;text-overflow:unset!important;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}[tuiFade]::-webkit-scrollbar,[tuiFade]::-webkit-scrollbar-thumb{display:none}[tuiFade]:not([data-orientation=vertical]){overflow-y:hidden;-webkit-mask-image:linear-gradient(to right,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to left,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(#000,#000);mask-image:linear-gradient(to right,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to left,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(#000,#000);-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;-webkit-mask-size:calc(51% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),calc(50% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),100% calc(100% - var(--t-line-height, 100%));mask-size:calc(51% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),calc(50% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),100% calc(100% - var(--t-line-height, 100%))}[tuiFade]:not([data-orientation=vertical])._start{-webkit-mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top}[tuiFade]:not([data-orientation=vertical])._end{-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top}[tuiFade]:not([data-orientation=vertical])._start._end{-webkit-mask-position:left bottom,right bottom,top;mask-position:left bottom,right bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._end{-webkit-mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._start{-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._start._end{-webkit-mask-position:left bottom,right bottom,top;mask-position:left bottom,right bottom,top}[tuiFade][data-orientation=vertical]{overflow-x:hidden;-webkit-mask-image:linear-gradient(to bottom,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to top,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset)));mask-image:linear-gradient(to bottom,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to top,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset)));-webkit-mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left calc(100% + var(--t-fade-size) + var(--t-fade-offset));mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left calc(100% + var(--t-fade-size) + var(--t-fade-offset));-webkit-mask-size:100% calc(51% + var(--t-fade-size) + var(--t-fade-offset));mask-size:100% calc(51% + var(--t-fade-size) + var(--t-fade-offset))}[tuiFade][data-orientation=vertical]._start{-webkit-mask-position:left top,left calc(100% + var(--t-fade-size) + var(--t-fade-offset));mask-position:left top,left calc(100% + var(--t-fade-size) + var(--t-fade-offset))}[tuiFade][data-orientation=vertical]._end{-webkit-mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left bottom;mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left bottom}[tuiFade][data-orientation=vertical]._start._end{-webkit-mask-position:left top,left bottom;mask-position:left top,left bottom}\n"] }]
|
|
18
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-fade' }, styles: ["[tuiFade]{scrollbar-width:none;-ms-overflow-style:none;transition-property:mask-position;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;overflow:auto;text-overflow:unset!important;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}[tuiFade]::-webkit-scrollbar,[tuiFade]::-webkit-scrollbar-thumb{display:none}[tuiFade]:not([data-orientation=vertical]){overflow-y:hidden;-webkit-mask-image:linear-gradient(to right,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to left,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(#000,#000);mask-image:linear-gradient(to right,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to left,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(#000,#000);-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;-webkit-mask-size:calc(51% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),calc(50% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),100% calc(100% - var(--t-line-height, 100%));mask-size:calc(51% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),calc(50% + var(--t-fade-size) + var(--t-fade-offset)) var(--t-line-height, 100%),100% calc(100% - var(--t-line-height, 100%))}[tuiFade]:not([data-orientation=vertical])._start{-webkit-mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top}[tuiFade]:not([data-orientation=vertical])._end{-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top}[tuiFade]:not([data-orientation=vertical])._start._end{-webkit-mask-position:left bottom,right bottom,top;mask-position:left bottom,right bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._end{-webkit-mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top;mask-position:left bottom,calc(100% + var(--t-fade-size) + var(--t-fade-offset)) bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._start{-webkit-mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top;mask-position:calc(-1 * var(--t-fade-size) - var(--t-fade-offset)) bottom,right bottom,top}[dir=rtl] [tuiFade]:not([data-orientation=vertical])._start._end{-webkit-mask-position:left bottom,right bottom,top;mask-position:left bottom,right bottom,top}[tuiFade][data-orientation=vertical]{overflow-x:hidden;-webkit-mask-image:linear-gradient(to bottom,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to top,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset)));mask-image:linear-gradient(to bottom,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset))),linear-gradient(to top,transparent var(--t-fade-offset),#000 calc(var(--t-fade-size) + var(--t-fade-offset)));-webkit-mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left calc(100% + var(--t-fade-size) + var(--t-fade-offset));mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left calc(100% + var(--t-fade-size) + var(--t-fade-offset));-webkit-mask-size:100% calc(51% + var(--t-fade-size) + var(--t-fade-offset));mask-size:100% calc(51% + var(--t-fade-size) + var(--t-fade-offset))}[tuiFade][data-orientation=vertical]._start{-webkit-mask-position:left top,left calc(100% + var(--t-fade-size) + var(--t-fade-offset));mask-position:left top,left calc(100% + var(--t-fade-size) + var(--t-fade-offset))}[tuiFade][data-orientation=vertical]._end{-webkit-mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left bottom;mask-position:left calc(-1 * var(--t-fade-size) - var(--t-fade-offset)),left bottom}[tuiFade][data-orientation=vertical]._start._end{-webkit-mask-position:left top,left bottom;mask-position:left top,left bottom}\n"] }]
|
|
23
19
|
}] });
|
|
24
20
|
class TuiFade {
|
|
25
21
|
constructor() {
|
|
22
|
+
this.nothing = tuiWithStyles(Styles);
|
|
26
23
|
// TODO: Remove when lh CSS units are supported: https://caniuse.com/mdn-css_types_length_lh
|
|
27
24
|
this.lineHeight = null;
|
|
28
25
|
this.size = '1.5em';
|
|
29
26
|
this.offset = '0em';
|
|
30
27
|
this.orientation = 'horizontal';
|
|
31
28
|
const el = tuiInjectElement();
|
|
32
|
-
|
|
29
|
+
// TODO: Replace with TuiTransitioned when fixed:
|
|
30
|
+
// https://github.com/angular/angular/issues/57846
|
|
31
|
+
afterNextRender(() => el.style.setProperty('transition', ''));
|
|
33
32
|
merge(inject(ResizeObserverService, { self: true }), inject(MutationObserverService, { self: true }), fromEvent(el, 'scroll'))
|
|
34
33
|
.pipe(filter(() => !!el.scrollWidth), tuiZonefree(), takeUntilDestroyed())
|
|
35
34
|
.subscribe(() => {
|
|
@@ -44,20 +43,19 @@ class TuiFade {
|
|
|
44
43
|
// horizontal multiline fade can kick in early due to hanging elements of fonts so using bigger buffer
|
|
45
44
|
scrollHeight > clientHeight + 4 * BUFFER;
|
|
46
45
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
48
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
46
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiFade, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
47
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiFade, isStandalone: true, selector: "[tuiFade]", inputs: { lineHeight: ["tuiFadeHeight", "lineHeight"], size: ["tuiFadeSize", "size"], offset: ["tuiFadeOffset", "offset"], orientation: ["tuiFade", "orientation"] }, host: { properties: { "style.line-height": "lineHeight", "style.--t-line-height": "lineHeight", "style.--t-fade-size": "size", "style.--t-fade-offset": "offset", "attr.data-orientation": "orientation", "style.transition": "\"none\"" } }, providers: [
|
|
49
48
|
ResizeObserverService,
|
|
50
49
|
MutationObserverService,
|
|
51
50
|
{
|
|
52
51
|
provide: WA_MUTATION_OBSERVER_INIT,
|
|
53
52
|
useValue: { characterData: true, subtree: true },
|
|
54
53
|
},
|
|
55
|
-
],
|
|
54
|
+
], ngImport: i0 }); }
|
|
56
55
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiFade, decorators: [{
|
|
58
57
|
type: Directive,
|
|
59
58
|
args: [{
|
|
60
|
-
standalone: true,
|
|
61
59
|
selector: '[tuiFade]',
|
|
62
60
|
providers: [
|
|
63
61
|
ResizeObserverService,
|
|
@@ -67,13 +65,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
67
65
|
useValue: { characterData: true, subtree: true },
|
|
68
66
|
},
|
|
69
67
|
],
|
|
70
|
-
hostDirectives: [TuiTransitioned],
|
|
71
68
|
host: {
|
|
72
69
|
'[style.line-height]': 'lineHeight',
|
|
73
70
|
'[style.--t-line-height]': 'lineHeight',
|
|
74
71
|
'[style.--t-fade-size]': 'size',
|
|
75
72
|
'[style.--t-fade-offset]': 'offset',
|
|
76
73
|
'[attr.data-orientation]': 'orientation',
|
|
74
|
+
'[style.transition]': '"none"',
|
|
77
75
|
},
|
|
78
76
|
}]
|
|
79
77
|
}], ctorParameters: () => [], propDecorators: { lineHeight: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-fade.mjs","sources":["../../../projects/kit/directives/fade/fade.directive.ts","../../../projects/kit/directives/fade/taiga-ui-kit-directives-fade.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {\n MutationObserverService,\n WA_MUTATION_OBSERVER_INIT,\n} from '@ng-web-apis/mutation-observer';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-fade.mjs","sources":["../../../projects/kit/directives/fade/fade.directive.ts","../../../projects/kit/directives/fade/taiga-ui-kit-directives-fade.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {\n MutationObserverService,\n WA_MUTATION_OBSERVER_INIT,\n} from '@ng-web-apis/mutation-observer';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\nimport {filter, fromEvent, merge} from 'rxjs';\n\nconst BUFFER = 1; // buffer for rounding issues\n\n@Component({\n template: '',\n styleUrl: './fade.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-fade'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiFade]',\n providers: [\n ResizeObserverService,\n MutationObserverService,\n {\n provide: WA_MUTATION_OBSERVER_INIT,\n useValue: {characterData: true, subtree: true},\n },\n ],\n host: {\n '[style.line-height]': 'lineHeight',\n '[style.--t-line-height]': 'lineHeight',\n '[style.--t-fade-size]': 'size',\n '[style.--t-fade-offset]': 'offset',\n '[attr.data-orientation]': 'orientation',\n '[style.transition]': '\"none\"',\n },\n})\nexport class TuiFade {\n protected readonly nothing = tuiWithStyles(Styles);\n\n // TODO: Remove when lh CSS units are supported: https://caniuse.com/mdn-css_types_length_lh\n @Input('tuiFadeHeight')\n public lineHeight: string | null = null;\n\n @Input('tuiFadeSize')\n public size = '1.5em';\n\n @Input('tuiFadeOffset')\n public offset = '0em';\n\n @Input('tuiFade')\n public orientation: TuiOrientation | '' = 'horizontal';\n\n constructor() {\n const el = tuiInjectElement();\n\n // TODO: Replace with TuiTransitioned when fixed:\n // https://github.com/angular/angular/issues/57846\n afterNextRender(() => el.style.setProperty('transition', ''));\n\n merge(\n inject(ResizeObserverService, {self: true}),\n inject(MutationObserverService, {self: true}),\n fromEvent(el, 'scroll'),\n )\n .pipe(\n filter(() => !!el.scrollWidth),\n tuiZonefree(),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n el.classList.toggle('_end', this.isEnd(el));\n el.classList.toggle(\n '_start',\n !!Math.floor(el.scrollLeft) || !!Math.floor(el.scrollTop),\n );\n });\n }\n\n private isEnd({\n scrollTop,\n scrollLeft,\n scrollHeight,\n scrollWidth,\n clientHeight,\n clientWidth,\n }: HTMLElement): boolean {\n return this.orientation === 'vertical'\n ? Math.round(scrollTop) < scrollHeight - clientHeight - BUFFER\n : Math.ceil(Math.abs(scrollLeft)) < scrollWidth - clientWidth - BUFFER ||\n // horizontal multiline fade can kick in early due to hanging elements of fonts so using bigger buffer\n scrollHeight > clientHeight + 4 * BUFFER;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAqBA,MAAM,MAAM,GAAG,CAAC,CAAC;AAEjB,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,8GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,u3IAAA,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,UAAU,EAAC,EAAA,MAAA,EAAA,CAAA,u3IAAA,CAAA,EAAA;;MAuBhB,OAAO,CAAA;AAgBhB,IAAA,WAAA,GAAA;AAfmB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;;QAI3C,IAAU,CAAA,UAAA,GAAkB,IAAI;QAGhC,IAAI,CAAA,IAAA,GAAG,OAAO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EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;AACjD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,yBAAyB,EAAE,YAAY;AACvC,wBAAA,uBAAuB,EAAE,MAAM;AAC/B,wBAAA,yBAAyB,EAAE,QAAQ;AACnC,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,oBAAoB,EAAE,QAAQ;AACjC,qBAAA;AACJ,iBAAA;wDAMU,UAAU,EAAA,CAAA;sBADhB,KAAK;uBAAC,eAAe;gBAIf,IAAI,EAAA,CAAA;sBADV,KAAK;uBAAC,aAAa;gBAIb,MAAM,EAAA,CAAA;sBADZ,KAAK;uBAAC,eAAe;gBAIf,WAAW,EAAA,CAAA;sBADjB,KAAK;uBAAC,SAAS;;;AChEpB;;AAEG;;;;"}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { inject, input, Directive } from '@angular/core';
|
|
3
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { MutationObserverService, WA_MUTATION_OBSERVER_INIT } from '@ng-web-apis/mutation-observer';
|
|
5
5
|
import { ResizeObserverService } from '@ng-web-apis/resize-observer';
|
|
6
6
|
import { tuiZonefree } from '@taiga-ui/cdk/observables';
|
|
7
7
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { merge, fromEvent } from 'rxjs';
|
|
9
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
10
10
|
|
|
11
11
|
const TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS = {
|
|
12
12
|
min: 0.625,
|
|
13
13
|
max: 1.25,
|
|
14
14
|
};
|
|
15
|
-
const TUI_FLUID_TYPOGRAPHY_OPTIONS =
|
|
16
|
-
factory: () => TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS,
|
|
17
|
-
});
|
|
18
|
-
function tuiFluidTypographyOptionsProvider(options) {
|
|
19
|
-
return tuiProvideOptions(TUI_FLUID_TYPOGRAPHY_OPTIONS, options, TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS);
|
|
20
|
-
}
|
|
15
|
+
const [TUI_FLUID_TYPOGRAPHY_OPTIONS, tuiFluidTypographyOptionsProvider] = tuiCreateOptions(TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS);
|
|
21
16
|
|
|
22
17
|
const STEP = 1 / 16;
|
|
23
18
|
class TuiFluidTypography {
|
|
24
19
|
constructor() {
|
|
25
|
-
// TODO: refactor to signal inputs after Angular update
|
|
26
|
-
this.changes$ = new Subject();
|
|
27
20
|
this.el = tuiInjectElement();
|
|
28
21
|
this.options = inject(TUI_FLUID_TYPOGRAPHY_OPTIONS);
|
|
29
|
-
this.
|
|
22
|
+
this.tuiFluidTypography = input('');
|
|
23
|
+
this.sub = merge(toObservable(this.tuiFluidTypography), inject(ResizeObserverService, { self: true }), inject(MutationObserverService, { self: true }), fromEvent(this.el, 'input'))
|
|
30
24
|
.pipe(tuiZonefree(), takeUntilDestroyed())
|
|
31
25
|
.subscribe(() => {
|
|
32
|
-
const min = Number(this.tuiFluidTypography[0] || this.options.min);
|
|
33
|
-
const max = Number(this.tuiFluidTypography[1] || this.options.max);
|
|
26
|
+
const min = Number(this.tuiFluidTypography()[0] || this.options.min);
|
|
27
|
+
const max = Number(this.tuiFluidTypography()[1] || this.options.max);
|
|
34
28
|
for (let i = max; i >= min; i -= STEP) {
|
|
35
29
|
this.el.style.fontSize = `${i}rem`;
|
|
36
30
|
if (this.el.scrollWidth <= this.el.clientWidth) {
|
|
@@ -38,25 +32,20 @@ class TuiFluidTypography {
|
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
});
|
|
41
|
-
this.tuiFluidTypography = '';
|
|
42
|
-
}
|
|
43
|
-
ngOnChanges() {
|
|
44
|
-
this.changes$.next();
|
|
45
35
|
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
47
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiFluidTypography, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
37
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.16", type: TuiFluidTypography, isStandalone: true, selector: "[tuiFluidTypography]", inputs: { tuiFluidTypography: { classPropertyName: "tuiFluidTypography", publicName: "tuiFluidTypography", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiFluidTypography": "" } }, providers: [
|
|
48
38
|
ResizeObserverService,
|
|
49
39
|
MutationObserverService,
|
|
50
40
|
{
|
|
51
41
|
provide: WA_MUTATION_OBSERVER_INIT,
|
|
52
42
|
useValue: { characterData: true, subtree: true },
|
|
53
43
|
},
|
|
54
|
-
],
|
|
44
|
+
], ngImport: i0 }); }
|
|
55
45
|
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiFluidTypography, decorators: [{
|
|
57
47
|
type: Directive,
|
|
58
48
|
args: [{
|
|
59
|
-
standalone: true,
|
|
60
49
|
selector: '[tuiFluidTypography]',
|
|
61
50
|
providers: [
|
|
62
51
|
ResizeObserverService,
|
|
@@ -68,9 +57,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
68
57
|
],
|
|
69
58
|
host: { tuiFluidTypography: '' },
|
|
70
59
|
}]
|
|
71
|
-
}]
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
60
|
+
}] });
|
|
74
61
|
|
|
75
62
|
/**
|
|
76
63
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-fluid-typography.mjs","sources":["../../../projects/kit/directives/fluid-typography/fluid-typography.options.ts","../../../projects/kit/directives/fluid-typography/fluid-typography.directive.ts","../../../projects/kit/directives/fluid-typography/taiga-ui-kit-directives-fluid-typography.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-fluid-typography.mjs","sources":["../../../projects/kit/directives/fluid-typography/fluid-typography.options.ts","../../../projects/kit/directives/fluid-typography/fluid-typography.directive.ts","../../../projects/kit/directives/fluid-typography/taiga-ui-kit-directives-fluid-typography.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiFluidTypographyOptions {\n readonly min: number;\n readonly max: number;\n}\n\nexport const TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS: TuiFluidTypographyOptions = {\n min: 0.625,\n max: 1.25,\n};\n\nexport const [TUI_FLUID_TYPOGRAPHY_OPTIONS, tuiFluidTypographyOptionsProvider] =\n tuiCreateOptions(TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS);\n","import {Directive, inject, input} from '@angular/core';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {\n MutationObserverService,\n WA_MUTATION_OBSERVER_INIT,\n} from '@ng-web-apis/mutation-observer';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {fromEvent, merge} from 'rxjs';\n\nimport {TUI_FLUID_TYPOGRAPHY_OPTIONS} from './fluid-typography.options';\n\nconst STEP = 1 / 16;\n\n@Directive({\n selector: '[tuiFluidTypography]',\n providers: [\n ResizeObserverService,\n MutationObserverService,\n {\n provide: WA_MUTATION_OBSERVER_INIT,\n useValue: {characterData: true, subtree: true},\n },\n ],\n host: {tuiFluidTypography: ''},\n})\nexport class TuiFluidTypography {\n private readonly el = tuiInjectElement();\n private readonly options = inject(TUI_FLUID_TYPOGRAPHY_OPTIONS);\n\n public readonly tuiFluidTypography = input<readonly [min: number, max: number] | ''>(\n '',\n );\n\n protected readonly sub = merge(\n toObservable(this.tuiFluidTypography),\n inject(ResizeObserverService, {self: true}),\n inject(MutationObserverService, {self: true}),\n fromEvent(this.el, 'input'),\n )\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n const min = Number(this.tuiFluidTypography()[0] || this.options.min);\n const max = Number(this.tuiFluidTypography()[1] || this.options.max);\n\n for (let i = max; i >= min; i -= STEP) {\n this.el.style.fontSize = `${i}rem`;\n\n if (this.el.scrollWidth <= this.el.clientWidth) {\n break;\n }\n }\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAOa,MAAA,oCAAoC,GAA8B;AAC3E,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,IAAI;;AAGN,MAAM,CAAC,4BAA4B,EAAE,iCAAiC,CAAC,GAC1E,gBAAgB,CAAC,oCAAoC;;ACAzD,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE;MAcN,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;QAaqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAE/C,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CACtC,EAAE,CACL;AAEkB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAC1B,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,EACrC,MAAM,CAAC,qBAAqB,EAAE,EA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A,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,SAAA,EAAA;YACP,qBAAqB;YACrB,uBAAuB;AACvB,YAAA;AACI,gBAAA,OAAO,EAAE,yBAAyB;gBAClC,QAAQ,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;AACjD,aAAA;AACJ,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAGQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,SAAS,EAAE;wBACP,qBAAqB;wBACrB,uBAAuB;AACvB,wBAAA;AACI,4BAAA,OAAO,EAAE,yBAAyB;4BAClC,QAAQ,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;AACjD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC;AACjC,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -70,13 +70,12 @@ class TuiHighlight {
|
|
|
70
70
|
this.renderer.appendChild(this.el, highlight);
|
|
71
71
|
return highlight;
|
|
72
72
|
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
74
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiHighlight, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
74
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiHighlight, isStandalone: true, selector: "[tuiHighlight]", inputs: { tuiHighlight: "tuiHighlight", tuiHighlightColor: "tuiHighlightColor" }, host: { properties: { "style.position": "\"relative\"", "style.zIndex": "0" } }, providers: [ResizeObserverService], usesOnChanges: true, ngImport: i0 }); }
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiHighlight, decorators: [{
|
|
77
77
|
type: Directive,
|
|
78
78
|
args: [{
|
|
79
|
-
standalone: true,
|
|
80
79
|
selector: '[tuiHighlight]',
|
|
81
80
|
providers: [ResizeObserverService],
|
|
82
81
|
host: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-highlight.mjs","sources":["../../../projects/kit/directives/highlight/highlight.directive.ts","../../../projects/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input, type OnChanges, Renderer2} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const [TUI_HIGHLIGHT_OPTIONS, tuiHighlightOptionsProvider] = tuiCreateOptions({\n highlightColor: 'var(--tui-service-selection-background)',\n});\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-highlight.mjs","sources":["../../../projects/kit/directives/highlight/highlight.directive.ts","../../../projects/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input, type OnChanges, Renderer2} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const [TUI_HIGHLIGHT_OPTIONS, tuiHighlightOptionsProvider] = tuiCreateOptions({\n highlightColor: 'var(--tui-service-selection-background)',\n});\n\n@Directive({\n selector: '[tuiHighlight]',\n providers: [ResizeObserverService],\n host: {\n '[style.position]': '\"relative\"',\n '[style.zIndex]': '0',\n },\n})\nexport class TuiHighlight implements OnChanges {\n private readonly el = tuiInjectElement();\n private readonly renderer = inject(Renderer2);\n private readonly doc = inject(DOCUMENT);\n\n private readonly highlight: HTMLElement = this.setUpHighlight();\n private readonly treeWalker = this.doc.createTreeWalker(\n this.el,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n @Input()\n public tuiHighlight = '';\n\n @Input()\n public tuiHighlightColor = inject(TUI_HIGHLIGHT_OPTIONS).highlightColor;\n\n constructor() {\n inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.updateStyles());\n }\n\n public ngOnChanges(): void {\n this.updateStyles();\n }\n\n protected get match(): boolean {\n return this.indexOf(this.el.textContent) !== -1;\n }\n\n private updateStyles(): void {\n this.highlight.style.display = 'none';\n\n if (!this.match) {\n return;\n }\n\n this.treeWalker.currentNode = this.el;\n\n do {\n const index = this.indexOf(this.treeWalker.currentNode.nodeValue);\n\n if (index === -1) {\n continue;\n }\n\n const range = this.doc.createRange();\n\n range.setStart(this.treeWalker.currentNode, index);\n range.setEnd(this.treeWalker.currentNode, index + this.tuiHighlight.length);\n\n const hostRect = this.el.getBoundingClientRect();\n const {left, top, width, height} = range.getBoundingClientRect();\n const {style} = this.highlight;\n\n style.background = this.tuiHighlightColor;\n style.left = tuiPx(left - hostRect.left);\n style.top = tuiPx(top - hostRect.top);\n style.width = tuiPx(width);\n style.height = tuiPx(height);\n style.display = 'block';\n\n return;\n } while (this.treeWalker.nextNode());\n }\n\n private indexOf(source: string | null): number {\n return !source || !this.tuiHighlight\n ? -1\n : source.toLowerCase().indexOf(this.tuiHighlight.toLowerCase());\n }\n\n private setUpHighlight(): HTMLElement {\n const highlight = this.renderer.createElement('div');\n const {style} = highlight;\n\n style.background = this.tuiHighlightColor;\n style.zIndex = '-1';\n style.position = 'absolute';\n this.renderer.appendChild(this.el, highlight);\n\n return highlight;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MASa,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CAAC;AACjF,IAAA,cAAc,EAAE,yCAAyC;AAC5D,CAAA;MAUY,YAAY,CAAA;AAkBrB,IAAA,WAAA,GAAA;QAjBiB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEtB,QAAA,IAAA,CAAA,SAAS,GAAgB,IAAI,CAAC,cAAc,EAAE;AAC9C,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CACnD,IAAI,CAAC,EAAE,EACP,UAAU,CAAC,SAAS,EACpB,aAAa,CAChB;QAGM,IAAY,CAAA,YAAA,GAAG,EAAE;AAGjB,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,cAAc;QAGnE,MAAM,CAAC,qBAAqB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC;aACrC,IAAI,CAAC,kBAAkB,EAAE;aACzB,SAAS,CAAC,MAAM,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V,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMzB,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,qBAAqB,CAAC;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,gBAAgB,EAAE,GAAG;AACxB,qBAAA;AACJ,iBAAA;wDAcU,YAAY,EAAA,CAAA;sBADlB;gBAIM,iBAAiB,EAAA,CAAA;sBADvB;;;ACpCL;;AAEG;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, signal, computed, Directive } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { tuiIsString
|
|
3
|
+
import { tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
|
|
4
|
+
import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
5
5
|
import { TuiTextfieldComponent } from '@taiga-ui/core/components/textfield';
|
|
6
6
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
7
7
|
import { TUI_APPEARANCE_OPTIONS, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
|
|
8
|
-
import * as i2 from '@taiga-ui/core/directives/hint';
|
|
9
|
-
import { TuiHintDirective } from '@taiga-ui/core/directives/hint';
|
|
10
8
|
import { tuiIconStart } from '@taiga-ui/core/directives/icons';
|
|
9
|
+
import * as i2 from '@taiga-ui/core/portals/hint';
|
|
10
|
+
import { TuiHintDirective } from '@taiga-ui/core/portals/hint';
|
|
11
11
|
import { TUI_PASSWORD_TEXTS } from '@taiga-ui/kit/tokens';
|
|
12
|
-
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
13
12
|
|
|
14
13
|
const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] = tuiCreateOptions({
|
|
15
14
|
icons: {
|
|
@@ -21,9 +20,7 @@ const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] = tuiCreateOptions({
|
|
|
21
20
|
class TuiPassword {
|
|
22
21
|
constructor() {
|
|
23
22
|
this.options = inject(TUI_PASSWORD_OPTIONS);
|
|
24
|
-
this.texts =
|
|
25
|
-
initialValue: ['', ''],
|
|
26
|
-
});
|
|
23
|
+
this.texts = inject(TUI_PASSWORD_TEXTS);
|
|
27
24
|
this.textfield = inject(TuiTextfieldComponent);
|
|
28
25
|
this.hidden = signal(true);
|
|
29
26
|
this.icon = tuiIconStart(computed((size = this.textfield.options.size()) => {
|
|
@@ -32,24 +29,25 @@ class TuiPassword {
|
|
|
32
29
|
: this.options.icons.hide;
|
|
33
30
|
return tuiIsString(icon) ? icon : icon(size);
|
|
34
31
|
}));
|
|
35
|
-
this.hint = tuiDirectiveBinding(TuiHintDirective, '
|
|
32
|
+
this.hint = tuiDirectiveBinding(TuiHintDirective, 'content', computed(() => (this.hidden() ? this.texts()[0] : this.texts()[1])));
|
|
36
33
|
}
|
|
37
34
|
toggle() {
|
|
38
35
|
this.hidden.set(!this.hidden());
|
|
39
|
-
this.textfield
|
|
36
|
+
this.textfield
|
|
37
|
+
.input()
|
|
38
|
+
?.nativeElement.setAttribute('type', this.hidden() ? 'password' : 'text');
|
|
40
39
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiPassword, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
41
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TuiPassword, isStandalone: true, selector: "tui-icon[tuiPassword]", host: { listeners: { "click": "toggle()" }, properties: { "style.border": "textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null" }, styleAttribute: "cursor: pointer" }, providers: [
|
|
43
42
|
{
|
|
44
43
|
provide: TUI_APPEARANCE_OPTIONS,
|
|
45
44
|
useValue: { appearance: 'icon' },
|
|
46
45
|
},
|
|
47
46
|
], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance", "tuiHintContext", "tuiHintContext"] }], ngImport: i0 }); }
|
|
48
47
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiPassword, decorators: [{
|
|
50
49
|
type: Directive,
|
|
51
50
|
args: [{
|
|
52
|
-
standalone: true,
|
|
53
51
|
selector: 'tui-icon[tuiPassword]',
|
|
54
52
|
providers: [
|
|
55
53
|
{
|