@taiga-ui/kit 4.52.0-canary.ec0802b → 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/components/avatar/avatar-labeled.component.d.ts +3 -3
- package/components/avatar/avatar-stack.component.d.ts +2 -2
- package/components/badge-notification/badge-notification.component.d.ts +2 -3
- package/components/badged-content/badged-content.directive.d.ts +2 -2
- package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
- 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/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 +3 -2
- package/components/confirm/confirm.service.d.ts +1 -1
- package/components/copy/copy.component.d.ts +2 -3
- 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/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/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-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 +4 -3
- 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/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
- package/components/notification-middle/notification-middle.service.d.ts +1 -1
- package/components/pagination/pagination.component.d.ts +22 -52
- package/components/pagination/pagination.options.d.ts +3 -6
- package/components/preview/dialog/preview-dialog.service.d.ts +1 -1
- 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/zoom/preview-zoom.component.d.ts +3 -1
- package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
- package/components/pulse/pulse.component.d.ts +2 -2
- package/components/push/push-alert.component.d.ts +1 -1
- package/components/push/push.options.d.ts +4 -3
- package/components/push/push.service.d.ts +1 -1
- 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/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/switch/switch.component.d.ts +1 -0
- 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 +1 -1
- package/components/toast/toast.options.d.ts +4 -3
- package/components/toast/toast.service.d.ts +1 -1
- 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 +1 -1
- 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/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 -8
- 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 +33 -47
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +8 -10
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -11
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +16 -30
- 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 +63 -107
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +4 -5
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-chip.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -44
- 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 +7 -9
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +9 -10
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -32
- 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 +110 -230
- 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 -75
- 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 +34 -46
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +30 -35
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +31 -27
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date.mjs +42 -38
- 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 -22
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month.mjs +32 -22
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +47 -40
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +48 -36
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +29 -18
- 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 -39
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +27 -18
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +12 -12
- package/fesm2022/taiga-ui-kit-components-like.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +14 -14
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs +29 -39
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +12 -12
- 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-preview.mjs +48 -36
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +31 -35
- 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 +20 -21
- 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 +6 -6
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-segmented.mjs +31 -57
- package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-select.mjs +50 -26
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +18 -18
- 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 +8 -8
- 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 +24 -22
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +51 -50
- package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +12 -12
- package/fesm2022/taiga-ui-kit-components-toast.mjs +23 -24
- package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tree.mjs +26 -25
- 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 -3
- 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 +6 -6
- 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 -6
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -52
- 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 +3 -3
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -20
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -8
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -17
- 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 +8 -8
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -10
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -14
- 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 -3
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -24
- 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 -4
- 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 -8
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
- 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 -108
- 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 +62 -62
- 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 -77
- 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-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 -80
- 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 -20
- 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
- /package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as i1 from '@angular/cdk/clipboard';
|
|
2
2
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject,
|
|
4
|
+
import { inject, input, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
5
5
|
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
7
|
-
import { tuiIsString
|
|
7
|
+
import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
8
8
|
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
9
9
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
10
10
|
import { TUI_NOTIFICATION_OPTIONS } from '@taiga-ui/core/components/notification';
|
|
11
|
-
import * as i2 from '@taiga-ui/core/
|
|
12
|
-
import { TuiHint, TuiHintDirective } from '@taiga-ui/core/
|
|
11
|
+
import * as i2 from '@taiga-ui/core/portals/hint';
|
|
12
|
+
import { TuiHint, TuiHintDirective } from '@taiga-ui/core/portals/hint';
|
|
13
13
|
import { TUI_COPY_TEXTS } from '@taiga-ui/kit/tokens';
|
|
14
14
|
import { BehaviorSubject, switchMap, timer, map, startWith, Subject } from 'rxjs';
|
|
15
|
-
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
15
|
+
import { tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
|
|
16
16
|
import { DOCUMENT } from '@angular/common';
|
|
17
17
|
import { TuiTextfieldComponent, tuiTextfieldIcon } from '@taiga-ui/core/components/textfield';
|
|
18
18
|
import * as i1$1 from '@taiga-ui/core/directives/appearance';
|
|
@@ -27,30 +27,23 @@ class TuiCopyComponent {
|
|
|
27
27
|
this.copied$ = new BehaviorSubject(false);
|
|
28
28
|
this.texts = inject(TUI_COPY_TEXTS);
|
|
29
29
|
this.hint = toSignal(this.copied$.pipe(switchMap((copied) => timer(2000).pipe(map(TUI_FALSE_HANDLER), startWith(copied)))));
|
|
30
|
-
this.size = 'm';
|
|
31
|
-
}
|
|
32
|
-
get icon() {
|
|
33
|
-
return tuiIsString(this.options.icon)
|
|
34
|
-
? this.options.icon
|
|
35
|
-
: this.options.icon(this.size);
|
|
30
|
+
this.size = input('m');
|
|
36
31
|
}
|
|
37
32
|
get check() {
|
|
38
33
|
return tuiIsString(this.notification.icon)
|
|
39
34
|
? this.notification.icon
|
|
40
35
|
: this.notification.icon('positive');
|
|
41
36
|
}
|
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCopyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiCopyComponent, isStandalone: true, selector: "tui-copy", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerdown": "copied$.next(false)" }, properties: { "attr.data-size": "size()" } }, ngImport: i0, template: "<span\n #content\n tuiHintAppearance=\"dark\"\n tuiHintDirection=\"top\"\n class=\"t-content\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [tuiHint]=\"template\"\n [tuiHintManual]=\"!!hint()\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n>\n <ng-content />\n</span>\n<button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [attr.aria-label]=\"texts()[0]\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [iconStart]=\"options.icon(size())\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n></button>\n<ng-template #template>\n <tui-icon\n class=\"t-icon\"\n [icon]=\"check\"\n />\n {{ texts()[1] }}\n</ng-template>\n", styles: [":host{cursor:pointer}:host[data-size=m]{--t-size: min( calc(1em + 1px) , 1rem)}:host[data-size=l]{--t-size: max(calc(1em / 1.57), min(max(calc(1em / 1.18), 1.25rem), 1.5rem))}@media (hover: hover) and (pointer: fine){:host:hover .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}:host:hover .t-button{opacity:1}}:host:has(.t-button:focus-visible) .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}.t-content{transition-property:opacity,mask;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;mask:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))) no-repeat,linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size))) no-repeat;-webkit-mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0;mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0}.t-button{position:sticky;inset-inline-start:0;opacity:0;border-radius:0;font-size:inherit!important;margin-inline-start:calc(-1 * var(--t-size));--t-size: inherit}.t-button:before{font-size:var(--t-size)}.t-button:focus-visible{opacity:1}.t-icon{font-size:1rem;margin-inline-end:.25rem;vertical-align:sub;color:var(--tui-text-positive)}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: i2.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i2.TuiHintManual, selector: "[tuiHint][tuiHintManual]", inputs: ["tuiHintManual"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
39
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCopyComponent, decorators: [{
|
|
46
41
|
type: Component,
|
|
47
42
|
args: [{ selector: 'tui-copy', imports: [ClipboardModule, TuiButton, TuiHint, TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
48
|
-
'[attr.data-size]': 'size',
|
|
43
|
+
'[attr.data-size]': 'size()',
|
|
49
44
|
'(pointerdown)': 'copied$.next(false)',
|
|
50
|
-
}, template: "<span\n #content\n tuiHintAppearance=\"dark\"\n tuiHintDirection=\"top\"\n class=\"t-content\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [tuiHint]=\"template\"\n [tuiHintManual]=\"!!hint()\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n>\n <ng-content />\n</span>\n<button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [attr.aria-label]=\"texts()[0]\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [iconStart]=\"icon\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n></button>\n<ng-template #template>\n <tui-icon\n class=\"t-icon\"\n [icon]=\"check\"\n />\n {{ texts()[1] }}\n</ng-template>\n", styles: [":host{cursor:pointer}:host[data-size=m]{--t-size: min( calc(1em + 1px) , 1rem)}:host[data-size=l]{--t-size: max(calc(1em / 1.57), min(max(calc(1em / 1.18), 1.25rem), 1.5rem))}@media (hover: hover) and (pointer: fine){:host:hover .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}:host:hover .t-button{opacity:1}}:host:has(.t-button:focus-visible) .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}.t-content{transition-property:opacity,mask;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;mask:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))) no-repeat,linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size))) no-repeat;-webkit-mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0;mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0}.t-button{opacity:0;border-radius:0;font-size:inherit!important;margin-inline-start:calc(-1 * var(--t-size));--t-size: inherit}.t-button:before{font-size:var(--t-size)}.t-button:focus-visible{opacity:1}.t-icon{font-size:1rem;margin-inline-end:.25rem;vertical-align:sub;color:var(--tui-text-positive)}\n"] }]
|
|
51
|
-
}]
|
|
52
|
-
type: Input
|
|
53
|
-
}] } });
|
|
45
|
+
}, template: "<span\n #content\n tuiHintAppearance=\"dark\"\n tuiHintDirection=\"top\"\n class=\"t-content\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [tuiHint]=\"template\"\n [tuiHintManual]=\"!!hint()\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n>\n <ng-content />\n</span>\n<button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [attr.aria-label]=\"texts()[0]\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [iconStart]=\"options.icon(size())\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n></button>\n<ng-template #template>\n <tui-icon\n class=\"t-icon\"\n [icon]=\"check\"\n />\n {{ texts()[1] }}\n</ng-template>\n", styles: [":host{cursor:pointer}:host[data-size=m]{--t-size: min( calc(1em + 1px) , 1rem)}:host[data-size=l]{--t-size: max(calc(1em / 1.57), min(max(calc(1em / 1.18), 1.25rem), 1.5rem))}@media (hover: hover) and (pointer: fine){:host:hover .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}:host:hover .t-button{opacity:1}}:host:has(.t-button:focus-visible) .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}.t-content{transition-property:opacity,mask;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;mask:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))) no-repeat,linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size))) no-repeat;-webkit-mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0;mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0}.t-button{position:sticky;inset-inline-start:0;opacity:0;border-radius:0;font-size:inherit!important;margin-inline-start:calc(-1 * var(--t-size));--t-size: inherit}.t-button:before{font-size:var(--t-size)}.t-button:focus-visible{opacity:1}.t-icon{font-size:1rem;margin-inline-end:.25rem;vertical-align:sub;color:var(--tui-text-positive)}\n"] }]
|
|
46
|
+
}] });
|
|
54
47
|
|
|
55
48
|
class TuiCopyDirective {
|
|
56
49
|
constructor() {
|
|
@@ -60,25 +53,21 @@ class TuiCopyDirective {
|
|
|
60
53
|
this.icons = tuiTextfieldIcon(TUI_COPY_OPTIONS);
|
|
61
54
|
this.copyTexts = inject(TUI_COPY_TEXTS);
|
|
62
55
|
this.hint = tuiDirectiveBinding(TuiHintDirective, 'content', toSignal(toObservable(inject(TUI_COPY_TEXTS)).pipe(switchMap(([copy, copied]) => this.copied$.pipe(switchMap(() => timer(3000).pipe(map(() => copy), startWith(copied))), startWith(copy)))), { initialValue: '' }));
|
|
63
|
-
this.tuiCopy = '';
|
|
64
|
-
}
|
|
65
|
-
get disabled() {
|
|
66
|
-
return !this.textfield.input?.nativeElement.value;
|
|
67
56
|
}
|
|
68
57
|
copy() {
|
|
69
|
-
this.textfield.input?.nativeElement.select();
|
|
58
|
+
this.textfield.input()?.nativeElement.select();
|
|
70
59
|
this.doc.execCommand('copy');
|
|
71
60
|
this.copied$.next();
|
|
72
61
|
}
|
|
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.
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCopyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiCopyDirective, isStandalone: true, selector: "tui-icon[tuiCopy]", host: { listeners: { "click": "copy()" }, properties: { "style.pointer-events": "textfield.value() ? null : \"none\"", "style.opacity": "textfield.value() ? null : \"var(--tui-disabled-opacity)\"", "style.border-width.rem": "textfield.options.size() === \"l\" ? null : 0.25" }, styleAttribute: "cursor: pointer" }, providers: [
|
|
75
64
|
{
|
|
76
65
|
provide: TUI_APPEARANCE_OPTIONS,
|
|
77
66
|
useValue: { appearance: 'icon' },
|
|
78
67
|
},
|
|
79
68
|
], hostDirectives: [{ directive: i1$1.TuiWithAppearance }, { directive: i2.TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance", "tuiHintContext", "tuiHintContext"] }], ngImport: i0 }); }
|
|
80
69
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiCopyDirective, decorators: [{
|
|
82
71
|
type: Directive,
|
|
83
72
|
args: [{
|
|
84
73
|
selector: 'tui-icon[tuiCopy]',
|
|
@@ -98,14 +87,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
98
87
|
host: {
|
|
99
88
|
style: 'cursor: pointer',
|
|
100
89
|
'(click)': 'copy()',
|
|
101
|
-
'[style.pointer-events]': '
|
|
102
|
-
'[style.opacity]': '
|
|
90
|
+
'[style.pointer-events]': 'textfield.value() ? null : "none"',
|
|
91
|
+
'[style.opacity]': 'textfield.value() ? null : "var(--tui-disabled-opacity)"',
|
|
103
92
|
'[style.border-width.rem]': 'textfield.options.size() === "l" ? null : 0.25',
|
|
104
93
|
},
|
|
105
94
|
}]
|
|
106
|
-
}]
|
|
107
|
-
type: Input
|
|
108
|
-
}] } });
|
|
95
|
+
}] });
|
|
109
96
|
|
|
110
97
|
const TuiCopy = [TuiCopyComponent, TuiCopyDirective];
|
|
111
98
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-copy.mjs","sources":["../../../projects/kit/components/copy/copy.options.ts","../../../projects/kit/components/copy/copy.component.ts","../../../projects/kit/components/copy/copy.template.html","../../../projects/kit/components/copy/copy.directive.ts","../../../projects/kit/components/copy/copy.ts","../../../projects/kit/components/copy/index.ts","../../../projects/kit/components/copy/taiga-ui-kit-components-copy.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiCopyOptions {\n readonly icon: TuiStringHandler<TuiSizeL | TuiSizeS>;\n}\n\nexport const [TUI_COPY_OPTIONS, tuiCopyOptionsProvider] =\n tuiCreateOptions<TuiCopyOptions>({icon: () => '@tui.copy'});\n","import {ClipboardModule} from '@angular/cdk/clipboard';\nimport {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {TuiHint} from '@taiga-ui/core/directives/hint';\nimport {type TuiSizeL} from '@taiga-ui/core/types';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {BehaviorSubject, map, startWith, switchMap, timer} from 'rxjs';\n\nimport {TUI_COPY_OPTIONS} from './copy.options';\n\n@Component({\n selector: 'tui-copy',\n imports: [ClipboardModule, TuiButton, TuiHint, TuiIcon],\n templateUrl: './copy.template.html',\n styleUrl: './copy.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '(pointerdown)': 'copied$.next(false)',\n },\n})\nexport class TuiCopyComponent {\n protected readonly notification = inject(TUI_NOTIFICATION_OPTIONS);\n protected readonly options = inject(TUI_COPY_OPTIONS);\n protected readonly copied$ = new BehaviorSubject<boolean>(false);\n protected readonly texts = inject(TUI_COPY_TEXTS);\n protected readonly hint = toSignal(\n this.copied$.pipe(\n switchMap((copied) =>\n timer(2000).pipe(map(TUI_FALSE_HANDLER), startWith(copied)),\n ),\n ),\n );\n\n @Input()\n public size: TuiSizeL = 'm';\n\n protected get icon(): string {\n return tuiIsString(this.options.icon)\n ? this.options.icon\n : this.options.icon(this.size);\n }\n\n protected get check(): string {\n return tuiIsString(this.notification.icon)\n ? this.notification.icon\n : this.notification.icon('positive');\n }\n}\n","<span\n #content\n tuiHintAppearance=\"dark\"\n tuiHintDirection=\"top\"\n class=\"t-content\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [tuiHint]=\"template\"\n [tuiHintManual]=\"!!hint()\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n>\n <ng-content />\n</span>\n<button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [attr.aria-label]=\"texts()[0]\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [iconStart]=\"icon\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n></button>\n<ng-template #template>\n <tui-icon\n class=\"t-icon\"\n [icon]=\"check\"\n />\n {{ texts()[1] }}\n</ng-template>\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TuiTextfieldComponent,\n tuiTextfieldIcon,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {map, startWith, Subject, switchMap, timer} from 'rxjs';\n\nimport {TUI_COPY_OPTIONS} from './copy.options';\n\n@Directive({\n selector: 'tui-icon[tuiCopy]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'copy()',\n '[style.pointer-events]': 'disabled ? \"none\" : null',\n '[style.opacity]': 'disabled ? \"var(--tui-disabled-opacity)\" : null',\n '[style.border-width.rem]': 'textfield.options.size() === \"l\" ? null : 0.25',\n },\n})\nexport class TuiCopyDirective {\n private readonly copied$ = new Subject<void>();\n private readonly doc = inject(DOCUMENT);\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly icons = tuiTextfieldIcon(TUI_COPY_OPTIONS);\n protected readonly copyTexts = inject(TUI_COPY_TEXTS);\n\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'content',\n toSignal(\n toObservable(inject(TUI_COPY_TEXTS)).pipe(\n switchMap(([copy, copied]) =>\n this.copied$.pipe(\n switchMap(() =>\n timer(3000).pipe(\n map(() => copy),\n startWith(copied),\n ),\n ),\n startWith(copy),\n ),\n ),\n ),\n {initialValue: ''},\n ),\n );\n\n @Input()\n public tuiCopy = '';\n\n protected get disabled(): boolean {\n return !this.textfield.input?.nativeElement.value;\n }\n\n protected copy(): void {\n this.textfield.input?.nativeElement.select();\n this.doc.execCommand('copy');\n this.copied$.next();\n }\n}\n","import {TuiCopyComponent} from './copy.component';\nimport {TuiCopyDirective} from './copy.directive';\n\nexport const TuiCopy = [TuiCopyComponent, TuiCopyDirective] as const;\n","// TODO: Move to components in v5\nexport * from './copy';\nexport * from './copy.component';\nexport * from './copy.directive';\nexport * from './copy.options';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQa,MAAA,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB,EAAC,IAAI,EAAE,MAAM,WAAW,EAAC;;MCiBjD,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC/C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAClC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;AAC7C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CACb,SAAS,CAAC,CAAC,MAAM,KACb,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAC9D,CACJ,CACJ;QAGM,IAAI,CAAA,I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AAA;;4FAgBQ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAvB5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,QAAQ,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC;AACjC,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;AAClD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,wBAAwB,EAAE,0BAA0B;AACpD,wBAAA,iBAAiB,EAAE,iDAAiD;AACpE,wBAAA,0BAA0B,EAAE,gDAAgD;AAC/E,qBAAA;AACJ,iBAAA;8BA+BU,OAAO,EAAA,CAAA;sBADb;;;MCnEQ,OAAO,GAAG,CAAC,gBAAgB,EAAE,gBAAgB;;ACH1D;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-copy.mjs","sources":["../../../projects/kit/components/copy/copy.options.ts","../../../projects/kit/components/copy/copy.component.ts","../../../projects/kit/components/copy/copy.template.html","../../../projects/kit/components/copy/copy.directive.ts","../../../projects/kit/components/copy/copy.ts","../../../projects/kit/components/copy/index.ts","../../../projects/kit/components/copy/taiga-ui-kit-components-copy.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiCopyOptions {\n readonly icon: TuiStringHandler<TuiSizeL | TuiSizeS>;\n}\n\nexport const [TUI_COPY_OPTIONS, tuiCopyOptionsProvider] =\n tuiCreateOptions<TuiCopyOptions>({icon: () => '@tui.copy'});\n","import {ClipboardModule} from '@angular/cdk/clipboard';\nimport {ChangeDetectionStrategy, Component, inject, input} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {TuiHint} from '@taiga-ui/core/portals/hint';\nimport {type TuiSizeL} from '@taiga-ui/core/types';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {BehaviorSubject, map, startWith, switchMap, timer} from 'rxjs';\n\nimport {TUI_COPY_OPTIONS} from './copy.options';\n\n@Component({\n selector: 'tui-copy',\n imports: [ClipboardModule, TuiButton, TuiHint, TuiIcon],\n templateUrl: './copy.template.html',\n styleUrl: './copy.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size()',\n '(pointerdown)': 'copied$.next(false)',\n },\n})\nexport class TuiCopyComponent {\n protected readonly notification = inject(TUI_NOTIFICATION_OPTIONS);\n protected readonly options = inject(TUI_COPY_OPTIONS);\n protected readonly copied$ = new BehaviorSubject<boolean>(false);\n protected readonly texts = inject(TUI_COPY_TEXTS);\n protected readonly hint = toSignal(\n this.copied$.pipe(\n switchMap((copied) =>\n timer(2000).pipe(map(TUI_FALSE_HANDLER), startWith(copied)),\n ),\n ),\n );\n\n public readonly size = input<TuiSizeL>('m');\n\n protected get check(): string {\n return tuiIsString(this.notification.icon)\n ? this.notification.icon\n : this.notification.icon('positive');\n }\n}\n","<span\n #content\n tuiHintAppearance=\"dark\"\n tuiHintDirection=\"top\"\n class=\"t-content\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [tuiHint]=\"template\"\n [tuiHintManual]=\"!!hint()\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n>\n <ng-content />\n</span>\n<button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [attr.aria-label]=\"texts()[0]\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [iconStart]=\"options.icon(size())\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n></button>\n<ng-template #template>\n <tui-icon\n class=\"t-icon\"\n [icon]=\"check\"\n />\n {{ texts()[1] }}\n</ng-template>\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, inject} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {\n TuiTextfieldComponent,\n tuiTextfieldIcon,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/portals/hint';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {map, startWith, Subject, switchMap, timer} from 'rxjs';\n\nimport {TUI_COPY_OPTIONS} from './copy.options';\n\n@Directive({\n selector: 'tui-icon[tuiCopy]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'copy()',\n '[style.pointer-events]': 'textfield.value() ? null : \"none\"',\n '[style.opacity]': 'textfield.value() ? null : \"var(--tui-disabled-opacity)\"',\n '[style.border-width.rem]': 'textfield.options.size() === \"l\" ? null : 0.25',\n },\n})\nexport class TuiCopyDirective {\n private readonly copied$ = new Subject<void>();\n private readonly doc = inject(DOCUMENT);\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly icons = tuiTextfieldIcon(TUI_COPY_OPTIONS);\n protected readonly copyTexts = inject(TUI_COPY_TEXTS);\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'content',\n toSignal(\n toObservable(inject(TUI_COPY_TEXTS)).pipe(\n switchMap(([copy, copied]) =>\n this.copied$.pipe(\n switchMap(() =>\n timer(3000).pipe(\n map(() => copy),\n startWith(copied),\n ),\n ),\n startWith(copy),\n ),\n ),\n ),\n {initialValue: ''},\n ),\n );\n\n protected copy(): void {\n this.textfield.input()?.nativeElement.select();\n this.doc.execCommand('copy');\n this.copied$.next();\n }\n}\n","import {TuiCopyComponent} from './copy.component';\nimport {TuiCopyDirective} from './copy.directive';\n\nexport const TuiCopy = [TuiCopyComponent, TuiCopyDirective] as const;\n","// TODO: Move to components in v5\nexport * from './copy';\nexport * from './copy.component';\nexport * from './copy.directive';\nexport * from './copy.options';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQa,MAAA,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB,EAAC,IAAI,EAAE,MAAM,WAAW,EAAC;;MCiBjD,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC/C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAClC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;AAC7C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CACb,SAAS,CAAC,CAAC,MAAM,KAC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,EAAE,MAAM,EAAC;AACjC,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;AAClD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,wBAAwB,EAAE,mCAAmC;AAC7D,wBAAA,iBAAiB,EAAE,0DAA0D;AAC7E,wBAAA,0BAA0B,EAAE,gDAAgD;AAC/E,qBAAA;AACJ,iBAAA;;;MCrCY,OAAO,GAAG,CAAC,gBAAgB,EAAE,gBAAgB;;ACH1D;;ACAA;;AAEG;;;;"}
|
|
@@ -1,115 +1,54 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { TuiElement } from '@taiga-ui/cdk/directives/element';
|
|
2
|
+
import { inject, viewChild, computed, input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
3
|
import * as i1 from '@taiga-ui/core/components/data-list';
|
|
5
|
-
import {
|
|
4
|
+
import { TuiDataListComponent, tuiInjectDataListSize, TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
6
5
|
import { TuiLoader } from '@taiga-ui/core/components/loader';
|
|
7
|
-
import {
|
|
6
|
+
import { tuiAsAuxiliary } from '@taiga-ui/core/tokens';
|
|
7
|
+
import * as i2 from '@taiga-ui/kit/components/multi-select';
|
|
8
|
+
import { TuiMultiSelectGroupDirective, TuiMultiSelect } from '@taiga-ui/kit/components/multi-select';
|
|
8
9
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
9
|
-
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
10
|
-
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
11
|
-
import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
12
|
-
import { tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
13
10
|
import { TUI_ITEMS_HANDLERS } from '@taiga-ui/core/directives/items-handlers';
|
|
14
|
-
import { TUI_ITEMS_HANDLERS as TUI_ITEMS_HANDLERS$1 } from '@taiga-ui/kit/tokens';
|
|
15
11
|
|
|
16
12
|
class TuiDataListWrapperComponent {
|
|
17
13
|
constructor() {
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
|
|
21
|
-
this.itemsHandlersLegacy = inject(TUI_ITEMS_HANDLERS$1);
|
|
22
|
-
// TODO(v5): delete
|
|
23
|
-
this.legacyOptionsQuery = EMPTY_QUERY;
|
|
24
|
-
// TODO(v5): delete
|
|
25
|
-
this.optionsQuery = EMPTY_QUERY;
|
|
26
|
-
this.newOptionMode = tuiInjectElement().hasAttribute('new');
|
|
27
|
-
this.items = [];
|
|
28
|
-
this.disabledItemHandler = this.newOptionMode
|
|
29
|
-
? this.itemsHandlers?.disabledItemHandler()
|
|
30
|
-
: this.itemsHandlersLegacy.disabledItemHandler;
|
|
31
|
-
this.size = tuiInjectDataListSize();
|
|
32
|
-
this.itemClick = new EventEmitter();
|
|
14
|
+
this.handlers = inject(TUI_ITEMS_HANDLERS);
|
|
15
|
+
this.datalist = viewChild((TuiDataListComponent));
|
|
16
|
+
this.content = computed(() => this.itemContent() ?? (({ $implicit }) => this.handlers.stringify()($implicit)));
|
|
33
17
|
this.options = computed(() => this.datalist()?.options() ?? []);
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return { $implicit, active: tuiIsFocused(nativeElement) };
|
|
40
|
-
}
|
|
41
|
-
// TODO(v5): delete
|
|
42
|
-
getOptions(includeDisabled = false) {
|
|
43
|
-
return [
|
|
44
|
-
...this.legacyOptionsQuery, // TODO(v5): delete
|
|
45
|
-
...this.optionsQuery,
|
|
46
|
-
]
|
|
47
|
-
.filter(({ disabled }) => includeDisabled || !disabled)
|
|
48
|
-
.map(({ value }) => (isSignal(value) ? value() : value))
|
|
49
|
-
.filter(tuiIsPresent);
|
|
50
|
-
}
|
|
51
|
-
// TODO(v5): use signal `viewChild`
|
|
52
|
-
set datalistSetter(x) {
|
|
53
|
-
this.datalist.set(x);
|
|
18
|
+
this.items = input([]);
|
|
19
|
+
this.emptyContent = input();
|
|
20
|
+
this.size = input(tuiInjectDataListSize());
|
|
21
|
+
this.itemContent = input();
|
|
22
|
+
this.itemClick = output();
|
|
54
23
|
}
|
|
55
24
|
$cast(items) {
|
|
56
25
|
return items;
|
|
57
26
|
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDataListWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiDataListWrapperComponent, isStandalone: true, selector: "tui-data-list-wrapper:not([labels])", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, emptyContent: { classPropertyName: "emptyContent", publicName: "emptyContent", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, itemContent: { classPropertyName: "itemContent", publicName: "itemContent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, providers: [tuiAsAuxiliary(TuiDataListWrapperComponent)], viewQueries: [{ propertyName: "datalist", first: true, predicate: (TuiDataListComponent), descendants: true, isSignal: true }], ngImport: i0, template: "@if (items()) {\n <tui-data-list\n [emptyContent]=\"emptyContent()\"\n [size]=\"size()\"\n >\n @for (item of $cast(items()); track item) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n", styles: [":host{display:block}.t-content{flex:1;min-inline-size:0}.t-loader{margin:.75rem 0}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i1.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
60
29
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDataListWrapperComponent, decorators: [{
|
|
62
31
|
type: Component,
|
|
63
|
-
args: [{ selector: 'tui-data-list-wrapper:not([labels])
|
|
64
|
-
}]
|
|
65
|
-
type: ViewChildren,
|
|
66
|
-
args: [forwardRef(() => TuiOption)]
|
|
67
|
-
}], optionsQuery: [{
|
|
68
|
-
type: ViewChildren,
|
|
69
|
-
args: [forwardRef(() => TuiOptionWithValue)]
|
|
70
|
-
}], items: [{
|
|
71
|
-
type: Input
|
|
72
|
-
}], disabledItemHandler: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], emptyContent: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], size: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], itemClick: [{
|
|
79
|
-
type: Output
|
|
80
|
-
}], itemContent: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}], datalistSetter: [{
|
|
83
|
-
type: ViewChild,
|
|
84
|
-
args: [TuiDataListComponent]
|
|
85
|
-
}] } });
|
|
32
|
+
args: [{ selector: 'tui-data-list-wrapper:not([labels])', imports: [PolymorpheusOutlet, TuiDataList, TuiLoader], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiDataListWrapperComponent)], template: "@if (items()) {\n <tui-data-list\n [emptyContent]=\"emptyContent()\"\n [size]=\"size()\"\n >\n @for (item of $cast(items()); track item) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n", styles: [":host{display:block}.t-content{flex:1;min-inline-size:0}.t-loader{margin:.75rem 0}\n"] }]
|
|
33
|
+
}] });
|
|
86
34
|
|
|
87
35
|
class TuiDataListGroupWrapperComponent extends TuiDataListWrapperComponent {
|
|
88
36
|
constructor() {
|
|
89
37
|
super(...arguments);
|
|
90
38
|
this.multi = inject(TuiMultiSelectGroupDirective, { optional: true });
|
|
91
|
-
this.labels = [];
|
|
39
|
+
this.labels = input([]);
|
|
92
40
|
}
|
|
93
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDataListGroupWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiDataListGroupWrapperComponent, isStandalone: true, selector: "tui-data-list-wrapper[labels]", inputs: { labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsAuxiliary(TuiDataListGroupWrapperComponent)], usesInheritance: true, ngImport: i0, template: "@if (items()) {\n <tui-data-list\n [emptyContent]=\"emptyContent()\"\n [size]=\"size()\"\n >\n @for (group of items(); track group) {\n @if (multi) {\n <tui-opt-group\n tuiMultiSelectGroup\n [label]=\"labels()[$index] || ''\"\n >\n @for (item of group; track $index) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-opt-group>\n } @else {\n <tui-opt-group [label]=\"labels()[$index]\">\n @for (item of group; track item) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-opt-group>\n }\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n", styles: [":host{display:block}.t-content{flex:1;min-inline-size:0}.t-loader{margin:.75rem 0}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i1.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i1.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i1.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "component", type: i2.TuiMultiSelectGroupComponent, selector: "tui-opt-group[tuiMultiSelectGroup]", inputs: ["label"] }, { kind: "directive", type: i2.TuiMultiSelectGroupDirective, selector: "[tuiMultiSelectGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
43
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDataListGroupWrapperComponent, decorators: [{
|
|
97
45
|
type: Component,
|
|
98
|
-
args: [{ selector: 'tui-data-list-wrapper[labels]', imports: [
|
|
99
|
-
|
|
100
|
-
TuiDataList,
|
|
101
|
-
TuiElement,
|
|
102
|
-
TuiLoader,
|
|
103
|
-
TuiMultiSelectGroupComponent,
|
|
104
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsDataListAccessor(TuiDataListGroupWrapperComponent)], template: "@if (items) {\n <tui-data-list\n [emptyContent]=\"emptyContent\"\n [size]=\"size\"\n >\n @for (group of items; track group) {\n @if (multi) {\n <tui-opt-group\n tuiMultiSelectGroup\n [label]=\"labels[$index] || ''\"\n >\n @if (newOptionMode) {\n @for (item of group; track $index) {\n <button\n #elementRef=\"elementRef\"\n new\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n <!-- TODO(v5): delete fallback -->\n } @else {\n @for (item of group; track $index) {\n <button\n #elementRef=\"elementRef\"\n automation-id=\"tui-data-list-wrapper__option\"\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n }\n </tui-opt-group>\n } @else {\n <tui-opt-group [label]=\"labels[$index]\">\n @if (newOptionMode) {\n @for (item of group; track item) {\n <button\n #elementRef=\"elementRef\"\n new\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n <!-- TODO(v5): delete fallback -->\n } @else {\n @for (item of group; track $index) {\n <button\n #elementRef=\"elementRef\"\n automation-id=\"tui-data-list-wrapper__option\"\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n }\n </tui-opt-group>\n }\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n", styles: [":host{display:block}.t-content{flex:1;min-inline-size:0}.t-loader{margin:.75rem 0}\n"] }]
|
|
105
|
-
}], propDecorators: { labels: [{
|
|
106
|
-
type: Input
|
|
107
|
-
}] } });
|
|
46
|
+
args: [{ selector: 'tui-data-list-wrapper[labels]', imports: [PolymorpheusOutlet, TuiDataList, TuiLoader, TuiMultiSelect], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiDataListGroupWrapperComponent)], template: "@if (items()) {\n <tui-data-list\n [emptyContent]=\"emptyContent()\"\n [size]=\"size()\"\n >\n @for (group of items(); track group) {\n @if (multi) {\n <tui-opt-group\n tuiMultiSelectGroup\n [label]=\"labels()[$index] || ''\"\n >\n @for (item of group; track $index) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-opt-group>\n } @else {\n <tui-opt-group [label]=\"labels()[$index]\">\n @for (item of group; track item) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-opt-group>\n }\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n", styles: [":host{display:block}.t-content{flex:1;min-inline-size:0}.t-loader{margin:.75rem 0}\n"] }]
|
|
47
|
+
}] });
|
|
108
48
|
|
|
109
49
|
const TuiDataListWrapper = [
|
|
110
50
|
TuiDataListWrapperComponent,
|
|
111
51
|
TuiDataListGroupWrapperComponent,
|
|
112
|
-
TuiDataListDirective,
|
|
113
52
|
];
|
|
114
53
|
|
|
115
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-data-list-wrapper.mjs","sources":["../../../projects/kit/components/data-list-wrapper/data-list-wrapper.component.ts","../../../projects/kit/components/data-list-wrapper/data-list-wrapper.template.html","../../../projects/kit/components/data-list-wrapper/data-list-group-wrapper.component.ts","../../../projects/kit/components/data-list-wrapper/data-list-group-wrapper.template.html","../../../projects/kit/components/data-list-wrapper/data-list-wrapper.module.ts","../../../projects/kit/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n type ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n isSignal,\n Output,\n type QueryList,\n signal,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiElement} from '@taiga-ui/cdk/directives/element';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAsDataListAccessor,\n TuiDataList,\n type TuiDataListAccessor,\n TuiDataListComponent,\n tuiInjectDataListSize,\n TuiOption,\n TuiOptionWithValue,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {type TuiValueContentContext} from '@taiga-ui/core/types';\nimport {\n TUI_ITEMS_HANDLERS as TUI_ITEMS_HANDLERS_LEGACY,\n type TuiItemsHandlers as TuiItemsHandlersLegacy,\n} from '@taiga-ui/kit/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector:\n 'tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]', // TODO(v5): remove [new]\n imports: [PolymorpheusOutlet, TuiDataList, TuiElement, TuiLoader],\n templateUrl: './data-list-wrapper.template.html',\n styleUrl: './data-list-wrapper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsDataListAccessor(TuiDataListWrapperComponent)],\n})\nexport class TuiDataListWrapperComponent<T, K = T> implements TuiDataListAccessor<T> {\n private readonly datalist = signal<TuiDataListComponent<T> | null>(null);\n private readonly itemsHandlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n // TODO(v5): delete\n private readonly itemsHandlersLegacy: TuiItemsHandlersLegacy<T> = inject(\n TUI_ITEMS_HANDLERS_LEGACY,\n );\n\n // TODO(v5): delete\n @ViewChildren(forwardRef(() => TuiOption))\n protected readonly legacyOptionsQuery: QueryList<TuiOption<T>> = EMPTY_QUERY;\n\n // TODO(v5): delete\n @ViewChildren(forwardRef(() => TuiOptionWithValue))\n protected readonly optionsQuery: QueryList<TuiOptionWithValue<T>> = EMPTY_QUERY;\n\n protected readonly newOptionMode = tuiInjectElement().hasAttribute('new');\n\n @Input()\n public items: readonly K[] | null = [];\n\n @Input()\n public disabledItemHandler: TuiBooleanHandler<T> = this.newOptionMode\n ? this.itemsHandlers?.disabledItemHandler()\n : this.itemsHandlersLegacy.disabledItemHandler;\n\n @Input()\n public emptyContent: PolymorpheusContent;\n\n @Input()\n public size = tuiInjectDataListSize();\n\n @Output()\n public readonly itemClick = new EventEmitter<T>();\n\n public readonly options = computed(() => this.datalist()?.options() ?? []);\n\n @Input()\n public itemContent: PolymorpheusContent<TuiValueContentContext<T>> = ({$implicit}) =>\n this.newOptionMode\n ? this.itemsHandlers.stringify()($implicit)\n : this.itemsHandlersLegacy.stringify($implicit);\n\n public getContext(\n $implicit: T,\n {nativeElement}: ElementRef<HTMLElement>,\n ): TuiValueContentContext<T> {\n return {$implicit, active: tuiIsFocused(nativeElement)};\n }\n\n // TODO(v5): delete\n public getOptions(includeDisabled = false): readonly T[] {\n return [\n ...this.legacyOptionsQuery, // TODO(v5): delete\n ...this.optionsQuery,\n ]\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => (isSignal(value) ? value() : value))\n .filter(tuiIsPresent);\n }\n\n // TODO(v5): use signal `viewChild`\n @ViewChild(TuiDataListComponent)\n protected set datalistSetter(x: TuiDataListComponent<T>) {\n this.datalist.set(x);\n }\n\n protected $cast(items: readonly K[]): readonly T[] {\n return items as unknown as readonly T[];\n }\n}\n","@if (items) {\n <tui-data-list\n [emptyContent]=\"emptyContent\"\n [size]=\"size\"\n >\n @if (newOptionMode) {\n @for (item of $cast(items); track item) {\n <button\n #elementRef=\"elementRef\"\n automation-id=\"tui-data-list-wrapper__option\"\n new\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\">\n {{ text }}\n </ng-container>\n </button>\n }\n } @else {\n @for (item of $cast(items); track item) {\n <button\n #elementRef=\"elementRef\"\n automation-id=\"tui-data-list-wrapper__option\"\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click)=\"itemClick.emit(item)\"\n >\n <span class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\">\n {{ text }}\n </ng-container>\n </span>\n </button>\n }\n }\n <!-- TODO(v5): delete fallback -->\n </tui-data-list>\n} @else {\n <tui-loader\n automation-id=\"tui-data-list-wrapper__loader\"\n class=\"t-loader\"\n />\n}\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {TuiElement} from '@taiga-ui/cdk/directives/element';\nimport {tuiAsDataListAccessor, TuiDataList} from '@taiga-ui/core/components/data-list';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {\n TuiMultiSelectGroupComponent,\n TuiMultiSelectGroupDirective,\n} from '@taiga-ui/kit/components/multi-select';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDataListWrapperComponent} from './data-list-wrapper.component';\n\n@Component({\n selector: 'tui-data-list-wrapper[labels]',\n imports: [\n PolymorpheusOutlet,\n TuiDataList,\n TuiElement,\n TuiLoader,\n TuiMultiSelectGroupComponent,\n ],\n templateUrl: './data-list-group-wrapper.template.html',\n styleUrl: './data-list-wrapper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsDataListAccessor(TuiDataListGroupWrapperComponent)],\n})\nexport class TuiDataListGroupWrapperComponent<T> extends TuiDataListWrapperComponent<\n T,\n readonly T[]\n> {\n protected readonly multi = inject(TuiMultiSelectGroupDirective, {optional: true});\n\n @Input()\n public labels: readonly string[] = [];\n}\n","@if (items) {\n <tui-data-list\n [emptyContent]=\"emptyContent\"\n [size]=\"size\"\n >\n @for (group of items; track group) {\n @if (multi) {\n <tui-opt-group\n tuiMultiSelectGroup\n [label]=\"labels[$index] || ''\"\n >\n @if (newOptionMode) {\n @for (item of group; track $index) {\n <button\n #elementRef=\"elementRef\"\n new\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n <!-- TODO(v5): delete fallback -->\n } @else {\n @for (item of group; track $index) {\n <button\n #elementRef=\"elementRef\"\n automation-id=\"tui-data-list-wrapper__option\"\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n }\n </tui-opt-group>\n } @else {\n <tui-opt-group [label]=\"labels[$index]\">\n @if (newOptionMode) {\n @for (item of group; track item) {\n <button\n #elementRef=\"elementRef\"\n new\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n <!-- TODO(v5): delete fallback -->\n } @else {\n @for (item of group; track $index) {\n <button\n #elementRef=\"elementRef\"\n automation-id=\"tui-data-list-wrapper__option\"\n tuiElement\n tuiOption\n type=\"button\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n (click)=\"itemClick.emit(item)\"\n >\n <ng-container\n *polymorpheusOutlet=\"itemContent as text; context: getContext(item, elementRef)\"\n >\n {{ text }}\n </ng-container>\n </button>\n }\n }\n </tui-opt-group>\n }\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n","import {TuiDataListDirective} from '@taiga-ui/core/components/data-list';\n\nimport {TuiDataListGroupWrapperComponent} from './data-list-group-wrapper.component';\nimport {TuiDataListWrapperComponent} from './data-list-wrapper.component';\n\nexport const TuiDataListWrapper = [\n TuiDataListWrapperComponent,\n TuiDataListGroupWrapperComponent,\n TuiDataListDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TUI_ITEMS_HANDLERS_LEGACY"],"mappings":";;;;;;;;;;;;;;;MAoDa,2BAA2B,CAAA;AATxC,IAAA,WAAA,GAAA;AAUqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAiC,IAAI,CAAC;AACvD,QAAA,IAAA,CAAA,aAAa,GAAwB,MAAM,CAAC,kBAAkB,CAAC;;AAE/D,QAAA,IAAA,CAAA,mBAAmB,GAA8B,MAAM,CACpEA,oBAAyB,CAC5B;;QAIkB,IAAkB,CAAA,kBAAA,GAA4B,WAAW;;QAIzD,IAAY,CAAA,YAAA,GAAqC,WAAW;QAE5D,IAAa,CAAA,aAAA,GAAG,gBAAgB,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;QAGlE,IAAK,CAAA,KAAA,GAAwB,EAAE;QAG/B,IAAmB,CAAA,mBAAA,GAAyB,IAAI,CAAC;AACpD,cAAE,IAAI,CAAC,aAAa,EAAE,mBAAmB;AACzC,cAAE,IAAI,CAAC,mBAAmB,CAAC,mBAAmB;QAM3C,I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IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,EACV,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,SAAS,8HACT,4BAA4B,EAAA,QAAA,EAAA,oCAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAOvB,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAd5C,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+BAA+B,EAChC,OAAA,EAAA;wBACL,kBAAkB;wBAClB,WAAW;wBACX,UAAU;wBACV,SAAS;wBACT,4BAA4B;AAC/B,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,aACpC,CAAC,qBAAqB,kCAAkC,CAAC,EAAA,QAAA,EAAA,6jJAAA,EAAA,MAAA,EAAA,CAAA,sFAAA,CAAA,EAAA;8BAS7D,MAAM,EAAA,CAAA;sBADZ;;;AE3BQ,MAAA,kBAAkB,GAAG;IAC9B,2BAA2B;IAC3B,gCAAgC;IAChC,oBAAoB;;;ACRxB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-data-list-wrapper.mjs","sources":["../../../projects/kit/components/data-list-wrapper/data-list-wrapper.component.ts","../../../projects/kit/components/data-list-wrapper/data-list-wrapper.template.html","../../../projects/kit/components/data-list-wrapper/data-list-group-wrapper.component.ts","../../../projects/kit/components/data-list-wrapper/data-list-group-wrapper.template.html","../../../projects/kit/components/data-list-wrapper/data-list-wrapper.ts","../../../projects/kit/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {\n TuiDataList,\n type TuiDataListAccessor,\n TuiDataListComponent,\n tuiInjectDataListSize,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-data-list-wrapper:not([labels])',\n imports: [PolymorpheusOutlet, TuiDataList, TuiLoader],\n templateUrl: './data-list-wrapper.template.html',\n styleUrl: './data-list-wrapper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsAuxiliary(TuiDataListWrapperComponent)],\n})\nexport class TuiDataListWrapperComponent<T, K = T> implements TuiDataListAccessor<T> {\n protected readonly handlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n protected readonly datalist = viewChild(TuiDataListComponent<T>);\n protected readonly content = computed<PolymorpheusContent<TuiContext<T>>>(\n () =>\n this.itemContent() ?? (({$implicit}) => this.handlers.stringify()($implicit)),\n );\n\n public readonly options = computed(() => this.datalist()?.options() ?? []);\n\n public readonly items = input<readonly K[] | null>([]);\n public readonly emptyContent = input<PolymorpheusContent>();\n public readonly size = input(tuiInjectDataListSize());\n public readonly itemContent = input<PolymorpheusContent<TuiContext<T>>>();\n public readonly itemClick = output<T>();\n\n protected $cast(items: readonly K[] | null): readonly T[] {\n return items as unknown as readonly T[];\n }\n}\n","@if (items()) {\n <tui-data-list\n [emptyContent]=\"emptyContent()\"\n [size]=\"size()\"\n >\n @for (item of $cast(items()); track item) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n","import {ChangeDetectionStrategy, Component, inject, input} from '@angular/core';\nimport {TuiDataList} from '@taiga-ui/core/components/data-list';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {\n TuiMultiSelect,\n TuiMultiSelectGroupDirective,\n} from '@taiga-ui/kit/components/multi-select';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDataListWrapperComponent} from './data-list-wrapper.component';\n\n@Component({\n selector: 'tui-data-list-wrapper[labels]',\n imports: [PolymorpheusOutlet, TuiDataList, TuiLoader, TuiMultiSelect],\n templateUrl: './data-list-group-wrapper.template.html',\n styleUrl: './data-list-wrapper.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsAuxiliary(TuiDataListGroupWrapperComponent)],\n})\nexport class TuiDataListGroupWrapperComponent<T> extends TuiDataListWrapperComponent<\n T,\n readonly T[]\n> {\n protected readonly multi = inject(TuiMultiSelectGroupDirective, {optional: true});\n\n public readonly labels = input<readonly string[]>([]);\n}\n","@if (items()) {\n <tui-data-list\n [emptyContent]=\"emptyContent()\"\n [size]=\"size()\"\n >\n @for (group of items(); track group) {\n @if (multi) {\n <tui-opt-group\n tuiMultiSelectGroup\n [label]=\"labels()[$index] || ''\"\n >\n @for (item of group; track $index) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-opt-group>\n } @else {\n <tui-opt-group [label]=\"labels()[$index]\">\n @for (item of group; track item) {\n <button\n tuiOption\n type=\"button\"\n [disabled]=\"handlers.disabledItemHandler()(item)\"\n [value]=\"item\"\n (click.capture)=\"itemClick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-opt-group>\n }\n }\n </tui-data-list>\n} @else {\n <tui-loader class=\"t-loader\" />\n}\n","import {TuiDataListGroupWrapperComponent} from './data-list-group-wrapper.component';\nimport {TuiDataListWrapperComponent} from './data-list-wrapper.component';\n\nexport const TuiDataListWrapper = [\n TuiDataListWrapperComponent,\n TuiDataListGroupWrapperComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgCa,2BAA2B,CAAA;AARxC,IAAA,WAAA,GAAA;AASuB,QAAA,IAAA,CAAA,QAAQ,GAAwB,MAAM,CAAC,kBAAkB,CAAC;AAC1D,QAAA,IAAA,CAAA,QAAQ,GAAG,SAAS,EAAC,oBAAuB,EAAC;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CACjC,MACI,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,EAAC,SAAS,EAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC,CACpF;AAEe,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAE1D,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAsB,EAAE,CAAC;QACtC,IAAY,CAAA,YAAA,GAAG,KAAK,EAAuB;AAC3C,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;QACrC,IAAW,CAAA,WAAA,GAAG,KAAK,EAAsC;QACzD,IAAS,CAAA,SAAA,GAAG,MAAM,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
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@taiga-ui/cdk/directives/animated';
|
|
4
4
|
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
5
5
|
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
@@ -7,40 +7,23 @@ import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
|
7
7
|
|
|
8
8
|
class TuiDrawer {
|
|
9
9
|
constructor() {
|
|
10
|
-
this.direction = 'right';
|
|
11
|
-
this.overlay = false;
|
|
10
|
+
this.direction = input('right');
|
|
11
|
+
this.overlay = input(false);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiDrawer, isStandalone: true, selector: "tui-drawer", inputs: { direction: "direction", overlay: "overlay" }, host: { properties: { "class._overlay": "overlay", "style.border-top-left-radius": "direction === \"left\" ? 0 : null", "style.border-top-right-radius": "direction === \"right\" ? 0 : null", "style.left": "direction === \"left\" ? 0 : null", "style.right": "direction === \"right\" ? 0 : null", "style.--tui-from": "from" } }, providers: [
|
|
18
|
-
tuiButtonOptionsProvider({
|
|
19
|
-
appearance: 'secondary',
|
|
20
|
-
size: 's',
|
|
21
|
-
}),
|
|
22
|
-
], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\">\n <ng-content />\n </div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n", styles: [":host{position:fixed;top:max(3rem,env(safe-area-inset-top));bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host._overlay{top:0;border-radius:0}:host._overlay>.t-aside{padding-block-start:env(safe-area-inset-top)}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit;box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiTitle]{font:var(--tui-font-text-xl);font-weight:700}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary);font:var(--tui-font-text-s)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}.t-footer ::ng-deep footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;min-inline-size:min-content;justify-content:flex-end;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-footer ::ng-deep footer::-webkit-scrollbar,.t-footer ::ng-deep footer::-webkit-scrollbar-thumb{display:none}\n"], dependencies: [{ kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiDrawer, isStandalone: true, selector: "tui-drawer", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, overlay: { classPropertyName: "overlay", publicName: "overlay", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._overlay": "overlay()", "style.border-top-left-radius": "direction() === \"left\" ? 0 : null", "style.border-top-right-radius": "direction() === \"right\" ? 0 : null", "style.left": "direction() === \"left\" ? 0 : null", "style.right": "direction() === \"right\" ? 0 : null", "style.--tui-from": "direction() === \"right\" ? \"translateX(100%)\" : \"translateX(-100%)\"" } }, providers: [tuiButtonOptionsProvider({ appearance: 'secondary', size: 's' })], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\">\n <ng-content />\n </div>\n </tui-scrollbar>\n <ng-content select=\"footer\" />\n</aside>\n", styles: [":host{position:fixed;top:max(3rem,env(safe-area-inset-top));bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host._overlay{top:0;border-radius:0}:host._overlay>.t-aside{padding-block-start:env(safe-area-inset-top)}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit;box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}.t-aside ::ng-deep>footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-aside ::ng-deep>footer::-webkit-scrollbar,.t-aside ::ng-deep>footer::-webkit-scrollbar-thumb{display:none}.t-aside ::ng-deep>footer:before{content:\"\";flex:1;margin-inline-end:-.75rem}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}\n"], dependencies: [{ kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23
15
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDrawer, decorators: [{
|
|
25
17
|
type: Component,
|
|
26
|
-
args: [{ selector: 'tui-drawer', imports: [TuiScrollbar], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'[
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'[style.left]': 'direction === "left" ? 0 : null',
|
|
36
|
-
'[style.right]': 'direction === "right" ? 0 : null',
|
|
37
|
-
'[style.--tui-from]': 'from',
|
|
38
|
-
}, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\">\n <ng-content />\n </div>\n </tui-scrollbar>\n <tui-scrollbar\n class=\"t-footer\"\n [hidden]=\"true\"\n >\n <ng-content select=\"footer\" />\n </tui-scrollbar>\n</aside>\n", styles: [":host{position:fixed;top:max(3rem,env(safe-area-inset-top));bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host._overlay{top:0;border-radius:0}:host._overlay>.t-aside{padding-block-start:env(safe-area-inset-top)}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit;box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiTitle]{font:var(--tui-font-text-xl);font-weight:700}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary);font:var(--tui-font-text-s)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}.t-footer ::ng-deep footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;min-inline-size:min-content;justify-content:flex-end;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-footer ::ng-deep footer::-webkit-scrollbar,.t-footer ::ng-deep footer::-webkit-scrollbar-thumb{display:none}\n"] }]
|
|
39
|
-
}], propDecorators: { direction: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], overlay: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}] } });
|
|
18
|
+
args: [{ selector: 'tui-drawer', imports: [TuiScrollbar], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiButtonOptionsProvider({ appearance: 'secondary', size: 's' })], hostDirectives: [TuiAnimated], host: {
|
|
19
|
+
'[class._overlay]': 'overlay()',
|
|
20
|
+
'[style.border-top-left-radius]': 'direction() === "left" ? 0 : null',
|
|
21
|
+
'[style.border-top-right-radius]': 'direction() === "right" ? 0 : null',
|
|
22
|
+
'[style.left]': 'direction() === "left" ? 0 : null',
|
|
23
|
+
'[style.right]': 'direction() === "right" ? 0 : null',
|
|
24
|
+
'[style.--tui-from]': 'direction() === "right" ? "translateX(100%)" : "translateX(-100%)"',
|
|
25
|
+
}, template: "<aside class=\"t-aside\">\n <tui-scrollbar class=\"t-scrollbar\">\n <ng-content select=\"header\" />\n <div class=\"t-content\">\n <ng-content />\n </div>\n </tui-scrollbar>\n <ng-content select=\"footer\" />\n</aside>\n", styles: [":host{position:fixed;top:max(3rem,env(safe-area-inset-top));bottom:0;inline-size:36.25rem;max-inline-size:calc(100vw - 3rem);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-medium);border-top-left-radius:1.25rem;border-top-right-radius:1.25rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host._overlay{top:0;border-radius:0}:host._overlay>.t-aside{padding-block-start:env(safe-area-inset-top)}:host._overlay:before{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:fixed;top:-100vh;left:-100vw;right:-100vw;bottom:-100vh;background:var(--tui-service-backdrop);transition-timing-function:ease-out}tui-root:has(tui-dialogs .t-overlay_visible) :host._overlay:before{opacity:0;transition-timing-function:ease-in}.t-aside{position:relative;display:flex;block-size:100%;flex-direction:column;border-radius:inherit;overflow:hidden;background:inherit;box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}.t-aside ::ng-deep>footer{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;gap:.75rem;padding:.5rem 1.5rem;box-shadow:inset 0 1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-aside ::ng-deep>footer::-webkit-scrollbar,.t-aside ::ng-deep>footer::-webkit-scrollbar-thumb{display:none}.t-aside ::ng-deep>footer:before{content:\"\";flex:1;margin-inline-end:-.75rem}.t-scrollbar{flex:1;overscroll-behavior:contain}.t-scrollbar ::ng-deep>.t-content>header{top:0;z-index:1;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.5rem .75rem;box-shadow:inset 0 -1px var(--tui-border-normal);background:var(--tui-background-elevation-1)}.t-scrollbar ::ng-deep>.t-content>header>*{display:flex;gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiSubtitle]{color:var(--tui-text-primary)}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories]{gap:.5rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child{margin-inline-start:.25rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiHeader] [tuiAccessories] [tuiIconButton][data-appearance=icon]:last-child:before{font-size:1rem}.t-scrollbar ::ng-deep>.t-content>header>[tuiNavigationNav]{min-block-size:var(--tui-height-m);margin-block-end:-.75rem;padding:0;border-image:none}.t-content{padding:1.25rem 1.5rem}\n"] }]
|
|
26
|
+
}] });
|
|
44
27
|
|
|
45
28
|
/**
|
|
46
29
|
* Generated bundle index. Do not edit.
|