@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,36 +1,32 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, LOCALE_ID,
|
|
5
|
-
import { toObservable } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
2
|
+
import { inject, LOCALE_ID, computed, input, output, ChangeDetectionStrategy, Component, contentChildren, TemplateRef, model, ViewEncapsulation, Directive, forwardRef, contentChild, Pipe } from '@angular/core';
|
|
7
3
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
8
|
-
import { tuiPure, tuiProvideOptions, tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
9
4
|
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
10
5
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
11
6
|
import { TuiLoader } from '@taiga-ui/core/components/loader';
|
|
12
7
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
13
8
|
import { tuiAppearanceOptionsProvider, TuiAppearance, tuiAppearanceMode, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
|
|
14
|
-
import { TuiHintOverflow } from '@taiga-ui/core/
|
|
15
|
-
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
9
|
+
import { TuiHintOverflow } from '@taiga-ui/core/portals/hint';
|
|
10
|
+
import { TUI_COMMON_ICONS, TUI_BREAKPOINT } from '@taiga-ui/core/tokens';
|
|
16
11
|
import { TUI_DIGITAL_INFORMATION_UNITS, TUI_FILE_TEXTS, TUI_HIDE_TEXT, TUI_SHOW_ALL_TEXT, TUI_INPUT_FILE_TEXTS } from '@taiga-ui/kit/tokens';
|
|
17
12
|
import { PolymorpheusOutlet, injectContext, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
|
|
18
|
-
import {
|
|
19
|
-
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
13
|
+
import { tuiCreateOptions, tuiProvide } from '@taiga-ui/cdk/utils/di';
|
|
20
14
|
import { coerceArray } from '@angular/cdk/coercion';
|
|
21
15
|
import { tuiRound } from '@taiga-ui/cdk/utils/math';
|
|
22
16
|
import { TuiItem } from '@taiga-ui/cdk/directives/item';
|
|
23
|
-
import {
|
|
17
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
24
18
|
import { TuiExpand } from '@taiga-ui/core/components/expand';
|
|
25
19
|
import * as i1$1 from '@taiga-ui/core/directives/group';
|
|
26
20
|
import { TuiGroup, tuiGroupOptionsProvider } from '@taiga-ui/core/directives/group';
|
|
27
21
|
import { TuiLink } from '@taiga-ui/core/components/link';
|
|
28
|
-
import {
|
|
22
|
+
import { outputFromObservable, toObservable } from '@angular/core/rxjs-interop';
|
|
29
23
|
import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
|
|
24
|
+
import { EMPTY_ARRAY, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
30
25
|
import * as i1$2 from '@taiga-ui/cdk/directives/native-validator';
|
|
31
26
|
import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
|
|
32
27
|
import { tuiZonefreeScheduler, tuiControlValue } from '@taiga-ui/cdk/observables';
|
|
33
28
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
29
|
+
import { timer, switchMap, map, filter, combineLatest } from 'rxjs';
|
|
34
30
|
import { Validators, NG_VALIDATORS, FormControl } from '@angular/forms';
|
|
35
31
|
import { TuiValidator } from '@taiga-ui/cdk/directives/validator';
|
|
36
32
|
|
|
@@ -108,224 +104,114 @@ const [TUI_FILE_OPTIONS, tuiFileOptionsProvider] = tuiCreateOptions(TUI_FILE_DEF
|
|
|
108
104
|
|
|
109
105
|
class TuiFile {
|
|
110
106
|
constructor() {
|
|
111
|
-
this.sanitizer = inject(DomSanitizer);
|
|
112
107
|
this.options = inject(TUI_FILE_OPTIONS);
|
|
113
108
|
this.locale = inject(LOCALE_ID);
|
|
114
|
-
this.units
|
|
109
|
+
this.units = inject(TUI_DIGITAL_INFORMATION_UNITS);
|
|
115
110
|
this.win = inject(WA_WINDOW);
|
|
116
111
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
117
|
-
this.fileTexts
|
|
118
|
-
this.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
112
|
+
this.fileTexts = inject(TUI_FILE_TEXTS);
|
|
113
|
+
this.content = computed(() => this.state() === 'error' && !this.file().content
|
|
114
|
+
? this.fileTexts().loadingError
|
|
115
|
+
: this.file().content || '');
|
|
116
|
+
this.fileSize = computed(() => this.options.formatSize(this.units(), this.file().size, this.locale));
|
|
117
|
+
this.preview = computed(() => this.size() === 'l' ? this.createPreview(this.file()) : '');
|
|
118
|
+
this.name = computed(() => {
|
|
119
|
+
const dot = this.file().name.lastIndexOf('.');
|
|
120
|
+
// a dot at position 0 means a “hidden” file, not an extension
|
|
121
|
+
return dot > 0 ? this.file().name.slice(0, dot) : this.file().name;
|
|
122
|
+
});
|
|
123
|
+
this.type = computed(() => {
|
|
124
|
+
const dot = this.file().name.lastIndexOf('.');
|
|
125
|
+
// only return an extension when there is one
|
|
126
|
+
return dot > 0 ? this.file().name.slice(dot) : '';
|
|
127
|
+
});
|
|
128
|
+
this.icon = computed((state = this.state()) => state === 'loading' ? '' : this.options.icons[state]);
|
|
129
|
+
this.file = input({ name: '' });
|
|
130
|
+
this.state = input('normal');
|
|
131
|
+
this.size = input('m');
|
|
132
|
+
this.showDelete = input(true);
|
|
133
|
+
this.showSize = input(true);
|
|
134
|
+
this.leftContent = input();
|
|
135
|
+
this.remove = output();
|
|
139
136
|
}
|
|
140
137
|
get allowDelete() {
|
|
141
|
-
return this.showDelete && this.remove
|
|
142
|
-
}
|
|
143
|
-
get icon() {
|
|
144
|
-
return this.state === 'loading' ? '' : this.options.icons[this.state];
|
|
145
|
-
}
|
|
146
|
-
get name() {
|
|
147
|
-
return this.getName(this.file);
|
|
148
|
-
}
|
|
149
|
-
get type() {
|
|
150
|
-
return this.getType(this.file);
|
|
151
|
-
}
|
|
152
|
-
get content$() {
|
|
153
|
-
return this.calculateContent$(this.state, this.file, this.fileTexts$);
|
|
154
|
-
}
|
|
155
|
-
get fileSize$() {
|
|
156
|
-
return this.calculateFileSize$(this.file, this.units$);
|
|
157
|
-
}
|
|
158
|
-
calculateContent$(state, file, fileTexts$) {
|
|
159
|
-
return state === 'error' && !file.content
|
|
160
|
-
? fileTexts$.pipe(map((texts) => texts.loadingError))
|
|
161
|
-
: of(this.file.content || '');
|
|
162
|
-
}
|
|
163
|
-
calculateFileSize$(file, units$) {
|
|
164
|
-
return units$.pipe(map((units) => this.options.formatSize(units, file.size, this.locale)));
|
|
138
|
+
return this.showDelete() && !!this.remove['listeners']?.length;
|
|
165
139
|
}
|
|
166
140
|
createPreview(file) {
|
|
167
141
|
if (file.src) {
|
|
168
142
|
return file.src;
|
|
169
143
|
}
|
|
170
|
-
|
|
144
|
+
return this.win.File &&
|
|
171
145
|
file instanceof this.win.File &&
|
|
172
|
-
file.type?.startsWith('image/')
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return '';
|
|
146
|
+
file.type?.startsWith('image/')
|
|
147
|
+
? URL.createObjectURL(file)
|
|
148
|
+
: '';
|
|
176
149
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
// a dot at position 0 means a “hidden” file, not an extension
|
|
180
|
-
return dot > 0 ? file.name.slice(0, dot) : file.name;
|
|
181
|
-
}
|
|
182
|
-
getType(file) {
|
|
183
|
-
const dot = file.name.lastIndexOf('.');
|
|
184
|
-
// only return an extension when there is one
|
|
185
|
-
return dot > 0 ? file.name.slice(dot) : '';
|
|
186
|
-
}
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
188
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiFile, isStandalone: true, selector: "tui-file,a[tuiFile],button[tuiFile]", inputs: { file: "file", state: "state", size: "size", showDelete: "showDelete", showSize: "showSize", leftContent: "leftContent" }, outputs: { remove: "remove" }, host: { properties: { "attr.data-delete": "showDelete" } }, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [{ directive: i1.TuiAppearance }], ngImport: i0, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div class=\"t-type\">{{ type }}</div>\n @if (showSize && (fileSize$ | async); as fileSize) {\n <div class=\"t-size\">\n {{ fileSize }}\n </div>\n }\n </div>\n @if (content$ | async; as content) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts$ | async; as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview\"\n />\n } @else {\n @if (isLoading) {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: size}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"isBig || isDeleted\"\n [class.t-icon_error]=\"isError\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-text-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;top:0;left:0;bottom:0;right:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-text-negative)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiHintOverflow, selector: "[tuiHintOverflow]", inputs: ["tuiHintOverflow"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiFile, isStandalone: true, selector: "tui-file,a[tuiFile],button[tuiFile]", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showDelete: { classPropertyName: "showDelete", publicName: "showDelete", isSignal: true, isRequired: false, transformFunction: null }, showSize: { classPropertyName: "showSize", publicName: "showSize", isSignal: true, isRequired: false, transformFunction: null }, leftContent: { classPropertyName: "leftContent", publicName: "leftContent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, host: { properties: { "attr.data-delete": "showDelete()" } }, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [{ directive: i1.TuiAppearance }], ngImport: i0, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"size() === 'l'\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent() || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name() }}\n </div>\n <div class=\"t-type\">{{ type() }}</div>\n @if (showSize() && fileSize()) {\n <div class=\"t-size\">\n {{ fileSize() }}\n </div>\n }\n </div>\n @if (content(); as text) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts(); as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview()) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview()\"\n />\n } @else {\n @if (state() === 'loading') {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"size() === 'l'\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon() as src; context: {$implicit: size()}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"size() === 'l' || state() === 'deleted'\"\n [class.t-icon_error]=\"state() === 'error'\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-body-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;inset:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-body-s);color:var(--tui-text-negative)}\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"] }, { kind: "directive", type: TuiHintOverflow, selector: "[tuiHintOverflow]", inputs: ["tuiHintOverflow"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
189
152
|
}
|
|
190
|
-
|
|
191
|
-
tuiPure
|
|
192
|
-
], TuiFile.prototype, "calculateContent$", null);
|
|
193
|
-
__decorate([
|
|
194
|
-
tuiPure
|
|
195
|
-
], TuiFile.prototype, "calculateFileSize$", null);
|
|
196
|
-
__decorate([
|
|
197
|
-
tuiPure
|
|
198
|
-
], TuiFile.prototype, "createPreview", null);
|
|
199
|
-
__decorate([
|
|
200
|
-
tuiPure
|
|
201
|
-
], TuiFile.prototype, "getName", null);
|
|
202
|
-
__decorate([
|
|
203
|
-
tuiPure
|
|
204
|
-
], TuiFile.prototype, "getType", null);
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFile, decorators: [{
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFile, decorators: [{
|
|
206
154
|
type: Component,
|
|
207
|
-
args: [{ selector: 'tui-file,a[tuiFile],button[tuiFile]', imports: [
|
|
208
|
-
|
|
209
|
-
PolymorpheusOutlet,
|
|
210
|
-
TuiButton,
|
|
211
|
-
TuiHintOverflow,
|
|
212
|
-
TuiIcon,
|
|
213
|
-
TuiLoader,
|
|
214
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [TuiAppearance], host: {
|
|
215
|
-
'[attr.data-delete]': 'showDelete',
|
|
216
|
-
}, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div class=\"t-type\">{{ type }}</div>\n @if (showSize && (fileSize$ | async); as fileSize) {\n <div class=\"t-size\">\n {{ fileSize }}\n </div>\n }\n </div>\n @if (content$ | async; as content) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts$ | async; as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview\"\n />\n } @else {\n @if (isLoading) {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: size}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"isBig || isDeleted\"\n [class.t-icon_error]=\"isError\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-text-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;top:0;left:0;bottom:0;right:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-text-negative)}\n"] }]
|
|
217
|
-
}], propDecorators: { file: [{
|
|
218
|
-
type: Input
|
|
219
|
-
}], state: [{
|
|
220
|
-
type: Input
|
|
221
|
-
}], size: [{
|
|
222
|
-
type: Input
|
|
223
|
-
}], showDelete: [{
|
|
224
|
-
type: Input
|
|
225
|
-
}], showSize: [{
|
|
226
|
-
type: Input
|
|
227
|
-
}], leftContent: [{
|
|
228
|
-
type: Input
|
|
229
|
-
}], remove: [{
|
|
230
|
-
type: Output
|
|
231
|
-
}], calculateContent$: [], calculateFileSize$: [], createPreview: [], getName: [], getType: [] } });
|
|
155
|
+
args: [{ selector: 'tui-file,a[tuiFile],button[tuiFile]', imports: [PolymorpheusOutlet, TuiButton, TuiHintOverflow, TuiIcon, TuiLoader], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAppearanceOptionsProvider(TUI_FILE_OPTIONS)], hostDirectives: [TuiAppearance], host: { '[attr.data-delete]': 'showDelete()' }, template: "<div\n class=\"t-preview\"\n [class.t-preview_big]=\"size() === 'l'\"\n>\n <ng-container *polymorpheusOutlet=\"leftContent() || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n</div>\n<div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n tuiHintOverflow\n class=\"t-name\"\n >\n {{ name() }}\n </div>\n <div class=\"t-type\">{{ type() }}</div>\n @if (showSize() && fileSize()) {\n <div class=\"t-size\">\n {{ fileSize() }}\n </div>\n }\n </div>\n @if (content(); as text) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <ng-content />\n</div>\n@if (allowDelete) {\n @if (fileTexts(); as texts) {\n <button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-remove\"\n [iconStart]=\"icons.close\"\n (click.prevent)=\"remove.emit()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ texts.remove }}\n </button>\n }\n}\n\n<ng-template #defaultLeftContent>\n @if (preview()) {\n <img\n alt=\"file preview\"\n class=\"t-image\"\n [src]=\"preview()\"\n />\n } @else {\n @if (state() === 'loading') {\n <tui-loader\n class=\"t-loader\"\n [inheritColor]=\"size() === 'l'\"\n />\n } @else {\n <tui-icon\n *polymorpheusOutlet=\"icon() as src; context: {$implicit: size()}\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"size() === 'l' || state() === 'deleted'\"\n [class.t-icon_error]=\"state() === 'error'\"\n [icon]=\"src.toString()\"\n />\n }\n }\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-body-m);padding:.625rem;padding-inline-end:2.25rem;text-decoration:none;border-radius:var(--tui-radius-m)}:host:hover .t-remove,:host[data-delete=always] .t-remove{opacity:1}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;inline-size:1.5rem;block-size:1.5rem;margin-inline-end:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-text-tertiary)}.t-preview_big{inline-size:4rem;block-size:4rem;margin-inline-end:1rem}.t-preview_big:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-neutral-1)}.t-image{max-inline-size:100%;max-block-size:100%}.t-loader{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}.t-icon{position:absolute;inset:0;color:var(--tui-status-positive);margin:auto}.t-icon_blank{color:var(--tui-text-tertiary)}.t-icon_error{color:var(--tui-text-negative)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}@supports (inset-inline-end: 0){.t-remove{right:unset;inset-inline-end:.625rem}}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-border-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;color:var(--tui-text-primary)}.t-text{display:flex;inline-size:100%}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-inline-start:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-body-s);color:var(--tui-text-negative)}\n"] }]
|
|
156
|
+
}] });
|
|
232
157
|
|
|
233
158
|
class TuiFilesComponent {
|
|
234
159
|
constructor() {
|
|
235
|
-
this.items = EMPTY_QUERY;
|
|
236
160
|
this.hideText = inject(TUI_HIDE_TEXT);
|
|
237
161
|
this.showAllText = inject(TUI_SHOW_ALL_TEXT);
|
|
238
|
-
this.
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
241
|
-
}
|
|
242
|
-
get hasExtraItems() {
|
|
243
|
-
return !!this.max && this.items.length > this.max;
|
|
162
|
+
this.items = contentChildren(TuiItem, { read: TemplateRef });
|
|
163
|
+
this.max = input(0);
|
|
164
|
+
this.expanded = model(false);
|
|
244
165
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.expandedChange.emit(this.expanded);
|
|
248
|
-
}
|
|
249
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
250
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiFilesComponent, isStandalone: true, selector: "tui-files", inputs: { max: "max", expanded: "expanded" }, outputs: { expandedChange: "expandedChange" }, providers: [
|
|
166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiFilesComponent, isStandalone: true, selector: "tui-files", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, providers: [
|
|
251
168
|
tuiGroupOptionsProvider({ size: 'm', collapsed: true, orientation: 'vertical' }),
|
|
252
|
-
], queries: [{ propertyName: "items", predicate: TuiItem, read: TemplateRef }], hostDirectives: [{ directive: i1$1.TuiGroup }], ngImport: i0, template: "
|
|
169
|
+
], queries: [{ propertyName: "items", predicate: TuiItem, read: TemplateRef, isSignal: true }], hostDirectives: [{ directive: i1$1.TuiGroup }], ngImport: i0, template: "<ng-content />\n@for (item of items(); track $index) {\n @if (!max() || $index < max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n}\n@if (max() && items().length > max()) {\n <tui-expand [expanded]=\"expanded()\">\n <div\n tuiGroup\n class=\"t-extra-items\"\n >\n @for (item of items(); track $index) {\n @if (max() && $index >= max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n }\n </div>\n </tui-expand>\n <div\n class=\"t-bottom\"\n [class.t-bottom_collapsed]=\"!expanded()\"\n >\n <button\n appearance=\"outline\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n (click)=\"expanded.set(!expanded())\"\n >\n {{ expanded() ? hideText() : showAllText() }}\n </button>\n </div>\n}\n", styles: ["tui-files{inline-size:100%;overflow:hidden;border-radius:var(--tui-radius-m)}tui-files:empty:empty{display:none}tui-files .t-files{position:relative;display:block;inline-size:100%;block-size:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{inline-size:100%;border-radius:inherit}tui-files .t-bottom{z-index:3;inline-size:100%;background:var(--tui-background-base);mask:none!important}tui-files .t-bottom_collapsed{box-shadow:var(--tui-shadow-popup);margin-block-start:-1.5rem}tui-files .t-extra-items{inline-size:100%}tui-files .t-extra-items>*{border-radius:0!important}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
253
170
|
}
|
|
254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFilesComponent, decorators: [{
|
|
255
172
|
type: Component,
|
|
256
|
-
args: [{ selector: 'tui-files', imports: [
|
|
173
|
+
args: [{ selector: 'tui-files', imports: [NgTemplateOutlet, TuiButton, TuiExpand, TuiGroup], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
257
174
|
tuiGroupOptionsProvider({ size: 'm', collapsed: true, orientation: 'vertical' }),
|
|
258
|
-
], hostDirectives: [TuiGroup], template: "
|
|
259
|
-
}]
|
|
260
|
-
type: ContentChildren,
|
|
261
|
-
args: [TuiItem, { read: TemplateRef }]
|
|
262
|
-
}], max: [{
|
|
263
|
-
type: Input
|
|
264
|
-
}], expanded: [{
|
|
265
|
-
type: Input
|
|
266
|
-
}], expandedChange: [{
|
|
267
|
-
type: Output
|
|
268
|
-
}] } });
|
|
175
|
+
], hostDirectives: [TuiGroup], template: "<ng-content />\n@for (item of items(); track $index) {\n @if (!max() || $index < max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n}\n@if (max() && items().length > max()) {\n <tui-expand [expanded]=\"expanded()\">\n <div\n tuiGroup\n class=\"t-extra-items\"\n >\n @for (item of items(); track $index) {\n @if (max() && $index >= max()) {\n <ng-container [ngTemplateOutlet]=\"item\" />\n }\n }\n </div>\n </tui-expand>\n <div\n class=\"t-bottom\"\n [class.t-bottom_collapsed]=\"!expanded()\"\n >\n <button\n appearance=\"outline\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n (click)=\"expanded.set(!expanded())\"\n >\n {{ expanded() ? hideText() : showAllText() }}\n </button>\n </div>\n}\n", styles: ["tui-files{inline-size:100%;overflow:hidden;border-radius:var(--tui-radius-m)}tui-files:empty:empty{display:none}tui-files .t-files{position:relative;display:block;inline-size:100%;block-size:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{inline-size:100%;border-radius:inherit}tui-files .t-bottom{z-index:3;inline-size:100%;background:var(--tui-background-base);mask:none!important}tui-files .t-bottom_collapsed{box-shadow:var(--tui-shadow-popup);margin-block-start:-1.5rem}tui-files .t-extra-items{inline-size:100%}tui-files .t-extra-items>*{border-radius:0!important}\n"] }]
|
|
176
|
+
}] });
|
|
269
177
|
|
|
270
178
|
class TuiInputFilesContent {
|
|
271
179
|
constructor() {
|
|
272
|
-
this.
|
|
273
|
-
this.text$ = toObservable(inject(TUI_INPUT_FILE_TEXTS));
|
|
274
|
-
this.context = injectContext();
|
|
180
|
+
this.texts = inject(TUI_INPUT_FILE_TEXTS);
|
|
275
181
|
this.component = inject(TuiInputFiles);
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
?
|
|
286
|
-
: this.
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}))
|
|
296
|
-
: combineLatest([this.breakpoint$, this.text$]).pipe(map(([breakpoint, text]) => {
|
|
297
|
-
if (breakpoint === 'mobile') {
|
|
298
|
-
return '';
|
|
299
|
-
}
|
|
300
|
-
return multiple
|
|
301
|
-
? text.defaultLabelMultiple
|
|
302
|
-
: text.defaultLabelSingle;
|
|
303
|
-
}));
|
|
304
|
-
}
|
|
305
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
306
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputFilesContent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
307
|
-
<a tuiLink>{{ link$ | async }}</a>
|
|
308
|
-
{{ label$ | async }}
|
|
309
|
-
`, isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
182
|
+
this.breakpoint = inject(TUI_BREAKPOINT);
|
|
183
|
+
this.context = injectContext();
|
|
184
|
+
this.link = computed(() => this.component.input()?.el.multiple
|
|
185
|
+
? this.texts().defaultLinkMultiple
|
|
186
|
+
: this.texts().defaultLinkSingle);
|
|
187
|
+
this.label = computed(() => this.component.input()?.el.multiple
|
|
188
|
+
? this.texts().defaultLabelMultiple
|
|
189
|
+
: this.texts().defaultLabelSingle);
|
|
190
|
+
this.dragged = computed(() => this.component.input()?.el.multiple
|
|
191
|
+
? this.texts().dropMultiple
|
|
192
|
+
: this.texts().drop);
|
|
193
|
+
}
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputFilesContent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
196
|
+
<a tuiLink>{{ context.$implicit ? '' : link() }}</a>
|
|
197
|
+
@if (breakpoint() !== 'mobile') {
|
|
198
|
+
{{ context.$implicit ? dragged() : label() }}
|
|
199
|
+
}
|
|
200
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
310
201
|
}
|
|
311
|
-
|
|
312
|
-
tuiPure
|
|
313
|
-
], TuiInputFilesContent.prototype, "computeLink$", null);
|
|
314
|
-
__decorate([
|
|
315
|
-
tuiPure
|
|
316
|
-
], TuiInputFilesContent.prototype, "computeLabel$", null);
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputFilesContent, decorators: [{
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesContent, decorators: [{
|
|
318
203
|
type: Component,
|
|
319
204
|
args: [{
|
|
320
|
-
imports: [
|
|
205
|
+
imports: [TuiLink],
|
|
321
206
|
template: `
|
|
322
|
-
<a tuiLink>{{
|
|
323
|
-
|
|
207
|
+
<a tuiLink>{{ context.$implicit ? '' : link() }}</a>
|
|
208
|
+
@if (breakpoint() !== 'mobile') {
|
|
209
|
+
{{ context.$implicit ? dragged() : label() }}
|
|
210
|
+
}
|
|
324
211
|
`,
|
|
325
|
-
|
|
326
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
|
212
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
327
213
|
}]
|
|
328
|
-
}]
|
|
214
|
+
}] });
|
|
329
215
|
|
|
330
216
|
const TUI_INPUT_FILES_DEFAULT_OPTIONS = {
|
|
331
217
|
appearance: 'file',
|
|
@@ -337,12 +223,7 @@ const TUI_INPUT_FILES_DEFAULT_OPTIONS = {
|
|
|
337
223
|
/**
|
|
338
224
|
* Default parameters for input files component
|
|
339
225
|
*/
|
|
340
|
-
const TUI_INPUT_FILES_OPTIONS =
|
|
341
|
-
factory: () => TUI_INPUT_FILES_DEFAULT_OPTIONS,
|
|
342
|
-
});
|
|
343
|
-
function tuiInputFilesOptionsProvider(options) {
|
|
344
|
-
return tuiProvideOptions(TUI_INPUT_FILES_OPTIONS, options, TUI_INPUT_FILES_DEFAULT_OPTIONS);
|
|
345
|
-
}
|
|
226
|
+
const [TUI_INPUT_FILES_OPTIONS, tuiInputFilesOptionsProvider] = tuiCreateOptions(TUI_INPUT_FILES_DEFAULT_OPTIONS);
|
|
346
227
|
|
|
347
228
|
class TuiInputFilesValidator extends TuiValidator {
|
|
348
229
|
constructor() {
|
|
@@ -365,13 +246,12 @@ class TuiInputFilesValidator extends TuiValidator {
|
|
|
365
246
|
]) || Validators.nullValidator;
|
|
366
247
|
this.onChange();
|
|
367
248
|
}
|
|
368
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
369
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
250
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputFilesValidator, isStandalone: true, inputs: { accept: "accept", maxFileSize: "maxFileSize" }, host: { properties: { "accept": "accept" } }, providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)], exportAs: ["tuiInputFilesValidator"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
370
251
|
}
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesValidator, decorators: [{
|
|
372
253
|
type: Directive,
|
|
373
254
|
args: [{
|
|
374
|
-
standalone: true,
|
|
375
255
|
inputs: ['accept', 'maxFileSize'],
|
|
376
256
|
providers: [tuiProvide(NG_VALIDATORS, TuiInputFilesValidator, true)],
|
|
377
257
|
exportAs: 'tuiInputFilesValidator',
|
|
@@ -385,12 +265,12 @@ class TuiInputFilesDirective extends TuiControl {
|
|
|
385
265
|
constructor() {
|
|
386
266
|
super(...arguments);
|
|
387
267
|
this.host = inject(forwardRef(() => TuiInputFiles));
|
|
388
|
-
this.m = tuiAppearanceMode(this.mode
|
|
389
|
-
this.
|
|
390
|
-
this.
|
|
268
|
+
this.m = tuiAppearanceMode(this.mode);
|
|
269
|
+
this.el = tuiInjectElement();
|
|
270
|
+
this.reject = outputFromObservable(timer(0, tuiZonefreeScheduler()).pipe(switchMap(() => tuiControlValue(this.control.control)), map(() => tuiFilesRejected(this.control.control)), filter(({ length }) => !!length)));
|
|
391
271
|
}
|
|
392
272
|
process(files) {
|
|
393
|
-
const fileOrFiles = this.
|
|
273
|
+
const fileOrFiles = this.el.multiple
|
|
394
274
|
? [...toArray(this.value()), ...Array.from(files)]
|
|
395
275
|
: files[0];
|
|
396
276
|
if (fileOrFiles) {
|
|
@@ -398,20 +278,19 @@ class TuiInputFilesDirective extends TuiControl {
|
|
|
398
278
|
}
|
|
399
279
|
}
|
|
400
280
|
onClick(event) {
|
|
401
|
-
if (this.
|
|
281
|
+
if (this.el.readOnly) {
|
|
402
282
|
event.preventDefault();
|
|
403
283
|
}
|
|
404
284
|
}
|
|
405
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
406
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
286
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputFilesDirective, isStandalone: true, selector: "input[tuiInputFiles]", outputs: { reject: "reject" }, host: { attributes: { "title": "", "type": "file" }, listeners: { "blur": "onTouched()", "click": "onClick($event)" }, properties: { "disabled": "disabled()" } }, providers: [
|
|
407
287
|
tuiAsControl(TuiInputFilesDirective),
|
|
408
288
|
tuiAppearanceOptionsProvider(TUI_INPUT_FILES_OPTIONS),
|
|
409
289
|
], usesInheritance: true, hostDirectives: [{ directive: i1$2.TuiNativeValidator }, { directive: i1.TuiWithAppearance }, { directive: TuiInputFilesValidator, inputs: ["accept", "accept", "maxFileSize", "maxFileSize"] }], ngImport: i0 }); }
|
|
410
290
|
}
|
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFilesDirective, decorators: [{
|
|
412
292
|
type: Directive,
|
|
413
293
|
args: [{
|
|
414
|
-
standalone: true,
|
|
415
294
|
selector: 'input[tuiInputFiles]',
|
|
416
295
|
providers: [
|
|
417
296
|
tuiAsControl(TuiInputFilesDirective),
|
|
@@ -433,9 +312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
433
312
|
'(click)': 'onClick($event)',
|
|
434
313
|
},
|
|
435
314
|
}]
|
|
436
|
-
}]
|
|
437
|
-
type: Output
|
|
438
|
-
}] } });
|
|
315
|
+
}] });
|
|
439
316
|
function toArray(value) {
|
|
440
317
|
return value ? coerceArray(value) : EMPTY_ARRAY;
|
|
441
318
|
}
|
|
@@ -443,46 +320,48 @@ function toArray(value) {
|
|
|
443
320
|
class TuiInputFiles {
|
|
444
321
|
constructor() {
|
|
445
322
|
this.content = new PolymorpheusComponent(TuiInputFilesContent);
|
|
323
|
+
this.template = contentChild(TemplateRef);
|
|
324
|
+
this.input = contentChild(TuiInputFilesDirective);
|
|
446
325
|
}
|
|
447
326
|
get fileDragged() {
|
|
448
|
-
return !!this.files && !this.input?.disabled();
|
|
327
|
+
return !!this.files && !this.input()?.disabled();
|
|
449
328
|
}
|
|
450
329
|
onFilesSelected(input) {
|
|
451
330
|
if (!input?.files) {
|
|
452
331
|
return;
|
|
453
332
|
}
|
|
454
|
-
this.input?.process(input.files);
|
|
333
|
+
this.input()?.process(input.files);
|
|
455
334
|
input.value = '';
|
|
456
335
|
}
|
|
457
336
|
onDropped({ dataTransfer }) {
|
|
458
337
|
this.files = null;
|
|
459
|
-
if (dataTransfer?.files && !this.input?.disabled()) {
|
|
460
|
-
this.input?.process(dataTransfer.files);
|
|
338
|
+
if (dataTransfer?.files && !this.input()?.disabled()) {
|
|
339
|
+
this.input()?.process(dataTransfer.files);
|
|
461
340
|
}
|
|
462
341
|
}
|
|
463
342
|
onDrag(dataTransfer) {
|
|
464
343
|
this.files = dataTransfer?.files;
|
|
465
344
|
}
|
|
466
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
467
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFiles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
346
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.17", type: TuiInputFiles, isStandalone: true, selector: "label[tuiInputFiles]", host: { listeners: { "dragover.prevent.zoneless": "0", "drop.prevent": "onDropped($event)", "dragenter": "onDrag($event.dataTransfer)", "dragleave": "onDrag(null)", "change": "onFilesSelected($event.target)" }, properties: { "class._dragged": "fileDragged" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: TuiInputFilesDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
468
347
|
<ng-content />
|
|
469
348
|
<span
|
|
470
349
|
*polymorpheusOutlet="
|
|
471
|
-
template || content as text;
|
|
350
|
+
template() || content as text;
|
|
472
351
|
context: {$implicit: fileDragged}
|
|
473
352
|
"
|
|
474
353
|
>
|
|
475
354
|
{{ text }}
|
|
476
355
|
</span>
|
|
477
|
-
`, isInline: true, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-
|
|
356
|
+
`, isInline: true, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-body-m);overflow-wrap:break-word;padding:0 .5rem}label[tuiInputFiles]>:not(input){position:relative;pointer-events:none}label[tuiInputFiles] input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;color:transparent;cursor:pointer}label[tuiInputFiles] input:disabled~*{opacity:var(--tui-disabled-opacity)}label[tuiInputFiles] input::-webkit-file-upload-button{display:none}label[tuiInputFiles] input::file-selector-button{display:none}*:disabled label[tuiInputFiles]{pointer-events:none}[tuiAppearance][data-appearance=file]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;border-radius:inherit;box-sizing:border-box;border:1px dashed var(--tui-text-action);outline:none}tui-root._mobile [tuiAppearance][data-appearance=file]{border-style:solid}[tuiInputFiles]._dragged [tuiAppearance][data-appearance=file]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][data-state=active]{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file]:focus-visible:not([data-focus=false]){border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][data-focus=true]{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file]:not(:disabled)[data-mode~=invalid],[tuiAppearance][data-appearance=file]:invalid:not(:disabled):not([data-mode]){border-color:var(--tui-status-negative)!important}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
478
357
|
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputFiles, decorators: [{
|
|
480
359
|
type: Component,
|
|
481
360
|
args: [{ selector: 'label[tuiInputFiles]', imports: [PolymorpheusOutlet], template: `
|
|
482
361
|
<ng-content />
|
|
483
362
|
<span
|
|
484
363
|
*polymorpheusOutlet="
|
|
485
|
-
template || content as text;
|
|
364
|
+
template() || content as text;
|
|
486
365
|
context: {$implicit: fileDragged}
|
|
487
366
|
"
|
|
488
367
|
>
|
|
@@ -495,14 +374,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
495
374
|
'(dragleave)': 'onDrag(null)',
|
|
496
375
|
'[class._dragged]': 'fileDragged',
|
|
497
376
|
'(change)': 'onFilesSelected($event.target)',
|
|
498
|
-
}, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-
|
|
499
|
-
}]
|
|
500
|
-
type: ContentChild,
|
|
501
|
-
args: [TemplateRef]
|
|
502
|
-
}], input: [{
|
|
503
|
-
type: ContentChild,
|
|
504
|
-
args: [TuiInputFilesDirective]
|
|
505
|
-
}] } });
|
|
377
|
+
}, styles: ["label[tuiInputFiles]{position:relative;display:flex;min-block-size:var(--tui-height-l);justify-content:center;align-items:center;text-align:center;border-radius:var(--tui-radius-m);font:var(--tui-font-body-m);overflow-wrap:break-word;padding:0 .5rem}label[tuiInputFiles]>:not(input){position:relative;pointer-events:none}label[tuiInputFiles] input{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;color:transparent;cursor:pointer}label[tuiInputFiles] input:disabled~*{opacity:var(--tui-disabled-opacity)}label[tuiInputFiles] input::-webkit-file-upload-button{display:none}label[tuiInputFiles] input::file-selector-button{display:none}*:disabled label[tuiInputFiles]{pointer-events:none}[tuiAppearance][data-appearance=file]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;border-radius:inherit;box-sizing:border-box;border:1px dashed var(--tui-text-action);outline:none}tui-root._mobile [tuiAppearance][data-appearance=file]{border-style:solid}[tuiInputFiles]._dragged [tuiAppearance][data-appearance=file]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}}[tuiAppearance][data-appearance=file][data-state=hover]{background:var(--tui-background-neutral-1);border-color:var(--tui-text-action-hover)}[tuiAppearance][data-appearance=file]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file][data-state=active]{background:var(--tui-background-neutral-1-hover)}[tuiAppearance][data-appearance=file]:disabled:not([data-state]),[tuiAppearance][data-appearance=file][data-state=disabled]{background:transparent;border-color:var(--tui-text-tertiary)}[tuiAppearance][data-appearance=file]:focus-visible:not([data-focus=false]){border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file][data-focus=true]{border:.125rem solid var(--tui-border-focus)}[tuiAppearance][data-appearance=file]:not(:disabled)[data-mode~=invalid],[tuiAppearance][data-appearance=file]:invalid:not(:disabled):not([data-mode]){border-color:var(--tui-status-negative)!important}\n"] }]
|
|
378
|
+
}] });
|
|
506
379
|
|
|
507
380
|
class TuiFileRejectedPipe {
|
|
508
381
|
constructor() {
|
|
@@ -534,13 +407,12 @@ class TuiFileRejectedPipe {
|
|
|
534
407
|
return null;
|
|
535
408
|
}));
|
|
536
409
|
}
|
|
537
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
538
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFileRejectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
411
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiFileRejectedPipe, isStandalone: true, name: "tuiFileRejected" }); }
|
|
539
412
|
}
|
|
540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiFileRejectedPipe, decorators: [{
|
|
541
414
|
type: Pipe,
|
|
542
415
|
args: [{
|
|
543
|
-
standalone: true,
|
|
544
416
|
name: 'tuiFileRejected',
|
|
545
417
|
}]
|
|
546
418
|
}] });
|