@taiga-ui/kit 3.0.0-rc.0 → 3.0.0-rc.1
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/bundles/taiga-ui-kit-components-accordion.umd.js +5 -17
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +3 -9
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js +3 -6
- package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +0 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +12 -8
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +4 -5
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +7 -10
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +21 -41
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +5 -26
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +1 -2
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +21 -36
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +12 -35
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +19 -42
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +18 -42
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +17 -41
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +4 -17
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +2 -8
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +19 -37
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +19 -37
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +14 -37
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +29 -56
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +38 -51
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +30 -57
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +17 -13
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +14 -12
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +33 -50
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +8 -15
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +16 -33
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +108 -18
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +34 -69
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +10 -23
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +2 -15
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +5 -15
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +7 -10
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +5 -10
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +40 -86
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js +4 -8
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +5 -5
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +20 -40
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +40 -38
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +9 -7
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +40 -40
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +6 -17
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +18 -31
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +2 -8
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +334 -3
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/{taiga-ui-kit-directives-dropdown-context.umd.js → taiga-ui-kit-directives-data-list-dropdown-manager.umd.js} +117 -141
- package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-directives-highlight.umd.js +0 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-project-class.umd.js +0 -3
- package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives.umd.js +6 -18
- package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +4 -4
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +0 -2
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +3 -3
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-providers.umd.js +11 -42
- package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +17 -12
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.js +3 -15
- package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.js +1 -5
- package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +3 -9
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -5
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils.umd.js +4 -10
- package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
- package/components/badge/badge.component.d.ts +2 -2
- package/components/badged-content/badged-content.component.d.ts +2 -2
- package/components/combo-box/index.d.ts +0 -1
- package/components/filter/filter.component.d.ts +1 -1
- package/components/input/index.d.ts +0 -1
- package/components/input-copy/index.d.ts +0 -1
- package/components/input-copy/input-copy.component.d.ts +4 -4
- package/components/input-date/index.d.ts +0 -1
- package/components/input-date-range/index.d.ts +0 -1
- package/components/input-date-time/index.d.ts +0 -1
- package/components/input-month/index.d.ts +0 -1
- package/components/input-month-range/index.d.ts +0 -1
- package/components/input-password/input-password.component.d.ts +2 -2
- package/components/input-password/input-password.module.d.ts +2 -3
- package/components/input-phone/index.d.ts +0 -1
- package/components/input-phone/input-phone.component.d.ts +2 -2
- package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -5
- package/components/input-range/input-range.component.d.ts +1 -0
- package/components/input-slider/input-slider.component.d.ts +1 -0
- package/components/input-tag/input-tag-options.d.ts +4 -1
- package/components/input-tag/input-tag.component.d.ts +3 -5
- package/components/line-clamp/index.d.ts +1 -0
- package/components/line-clamp/line-clamp-box.component.d.ts +7 -0
- package/components/line-clamp/line-clamp-position.directive.d.ts +9 -0
- package/components/line-clamp/line-clamp.module.d.ts +7 -5
- package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -3
- package/components/pagination/pagination.component.d.ts +0 -1
- package/components/progress/progress-segmented/progress-segmented.component.d.ts +0 -2
- package/components/range/range.component.d.ts +7 -23
- package/components/select/index.d.ts +0 -1
- package/components/slider/helpers/slider-key-steps.directive.d.ts +1 -3
- package/components/slider/slider.component.d.ts +5 -3
- package/components/stepper/step/step.component.d.ts +2 -2
- package/components/tabs/tab/tab.providers.d.ts +1 -4
- package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -1
- package/components/tabs/tabs-with-more/tabs-with-more.providers.d.ts +3 -4
- package/components/tag/tag.component.d.ts +1 -3
- package/components/text-area/index.d.ts +0 -1
- package/components/tree/components/tree-item/tree-item.providers.d.ts +0 -1
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +15 -0
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.d.ts +7 -0
- package/directives/data-list-dropdown-manager/index.d.ts +2 -0
- package/directives/data-list-dropdown-manager/package.json +10 -0
- package/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.d.ts +5 -0
- package/directives/index.d.ts +1 -3
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +5 -17
- package/esm2015/components/accordion/accordion.component.js +5 -5
- package/esm2015/components/action/action.component.js +6 -12
- package/esm2015/components/arrow/arrow.component.js +3 -3
- package/esm2015/components/avatar/avatar.component.js +6 -6
- package/esm2015/components/badge/badge.component.js +6 -6
- package/esm2015/components/badged-content/badged-content.component.js +4 -7
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm2015/components/calendar-month/calendar-month.component.js +1 -2
- package/esm2015/components/calendar-range/calendar-range.component.js +12 -11
- package/esm2015/components/carousel/carousel-scroll.directive.js +3 -3
- package/esm2015/components/carousel/carousel.component.js +4 -5
- package/esm2015/components/carousel/carousel.directive.js +3 -3
- package/esm2015/components/checkbox/checkbox.component.js +8 -12
- package/esm2015/components/checkbox-block/checkbox-block.component.js +10 -13
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +8 -12
- package/esm2015/components/combo-box/combo-box.component.js +20 -8
- package/esm2015/components/combo-box/combo-box.directive.js +5 -15
- package/esm2015/components/combo-box/index.js +1 -2
- package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +5 -15
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +5 -15
- package/esm2015/components/data-list-wrapper/data-list-wrapper.js +3 -4
- package/esm2015/components/files/file/file.component.js +3 -4
- package/esm2015/components/filter/filter.component.js +2 -2
- package/esm2015/components/input/index.js +1 -2
- package/esm2015/components/input/input.component.js +18 -7
- package/esm2015/components/input/input.directive.js +5 -15
- package/esm2015/components/input-copy/index.js +1 -2
- package/esm2015/components/input-copy/input-copy.component.js +18 -10
- package/esm2015/components/input-copy/input-copy.directive.js +5 -15
- package/esm2015/components/input-count/input-count.component.js +14 -27
- package/esm2015/components/input-count/input-count.directive.js +5 -15
- package/esm2015/components/input-date/index.js +1 -2
- package/esm2015/components/input-date/input-date.component.js +15 -9
- package/esm2015/components/input-date/input-date.directive.js +5 -15
- package/esm2015/components/input-date-range/index.js +1 -2
- package/esm2015/components/input-date-range/input-date-range.component.js +18 -11
- package/esm2015/components/input-date-range/input-date-range.directive.js +5 -15
- package/esm2015/components/input-date-time/index.js +1 -2
- package/esm2015/components/input-date-time/input-date-time.component.js +16 -10
- package/esm2015/components/input-date-time/input-date-time.directive.js +5 -15
- package/esm2015/components/input-files/input-files.component.js +8 -21
- package/esm2015/components/input-inline/input-inline.component.js +5 -11
- package/esm2015/components/input-month/index.js +1 -2
- package/esm2015/components/input-month/input-month.component.js +17 -8
- package/esm2015/components/input-month/input-month.directive.js +5 -17
- package/esm2015/components/input-month-range/index.js +1 -2
- package/esm2015/components/input-month-range/input-month-range.component.js +17 -8
- package/esm2015/components/input-month-range/input-month-range.directive.js +5 -17
- package/esm2015/components/input-number/input-number.component.js +16 -29
- package/esm2015/components/input-number/input-number.directive.js +5 -15
- package/esm2015/components/input-password/input-password.component.js +18 -32
- package/esm2015/components/input-password/input-password.directive.js +5 -15
- package/esm2015/components/input-password/input-password.module.js +1 -5
- package/esm2015/components/input-phone/index.js +1 -2
- package/esm2015/components/input-phone/input-phone.component.js +28 -14
- package/esm2015/components/input-phone/input-phone.directive.js +5 -15
- package/esm2015/components/input-phone-international/input-phone-international.component.js +16 -22
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +5 -11
- package/esm2015/components/input-range/input-range.component.js +20 -16
- package/esm2015/components/input-slider/input-slider.component.js +13 -15
- package/esm2015/components/input-tag/input-tag-options.js +8 -1
- package/esm2015/components/input-tag/input-tag.component.js +24 -54
- package/esm2015/components/input-time/input-time.component.js +11 -18
- package/esm2015/components/line-clamp/index.js +2 -1
- package/esm2015/components/line-clamp/line-clamp-box.component.js +32 -0
- package/esm2015/components/line-clamp/line-clamp-position.directive.js +26 -0
- package/esm2015/components/line-clamp/line-clamp.component.js +22 -9
- package/esm2015/components/line-clamp/line-clamp.module.js +30 -6
- package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +11 -21
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.directive.js +17 -28
- package/esm2015/components/multi-select/multi-select.component.js +15 -30
- package/esm2015/components/multi-select-option/multi-select-option.component.js +6 -6
- package/esm2015/components/pagination/pagination.component.js +13 -25
- package/esm2015/components/pdf-viewer/pdf-viewer.module.js +4 -17
- package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +4 -4
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
- package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +3 -11
- package/esm2015/components/radio/radio.component.js +8 -13
- package/esm2015/components/radio-block/radio-block.component.js +10 -13
- package/esm2015/components/radio-labeled/radio-labeled.component.js +8 -12
- package/esm2015/components/radio-list/radio-list.component.js +8 -12
- package/esm2015/components/range/range-change.directive.js +10 -9
- package/esm2015/components/range/range.component.js +27 -79
- package/esm2015/components/rating/rating.component.js +7 -11
- package/esm2015/components/select/index.js +1 -2
- package/esm2015/components/select/select.component.js +19 -7
- package/esm2015/components/select/select.directive.js +5 -15
- package/esm2015/components/select-option/select-option.component.js +7 -7
- package/esm2015/components/slider/helpers/slider-key-steps.directive.js +14 -22
- package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -6
- package/esm2015/components/slider/slider.component.js +21 -10
- package/esm2015/components/stepper/step/step.component.js +5 -5
- package/esm2015/components/stepper/stepper.component.js +7 -5
- package/esm2015/components/tabs/tab/tab.providers.js +10 -10
- package/esm2015/components/tabs/tabs/tabs.component.js +1 -2
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +18 -17
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +9 -11
- package/esm2015/components/tag/tag.component.js +10 -20
- package/esm2015/components/text-area/index.js +1 -2
- package/esm2015/components/text-area/text-area.component.js +19 -8
- package/esm2015/components/text-area/text-area.directive.js +5 -15
- package/esm2015/components/toggle/toggle.component.js +8 -12
- package/esm2015/components/tree/components/tree-item/tree-item.providers.js +2 -6
- package/esm2015/components/tree/directives/tree-controller.directive.js +3 -3
- package/esm2015/components/tree/misc/tree.service.js +1 -2
- package/esm2015/constants/max-day-range-length-mapper.js +5 -4
- package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.js +100 -0
- package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.js +16 -0
- package/esm2015/directives/data-list-dropdown-manager/index.js +3 -0
- package/esm2015/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.js +5 -0
- package/esm2015/directives/highlight/highlight.directive.js +1 -2
- package/esm2015/directives/index.js +2 -4
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +2 -2
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +3 -3
- package/esm2015/directives/present/present.directive.js +4 -4
- package/esm2015/directives/project-class/project-class.directive.js +1 -4
- package/esm2015/interfaces/index.js +1 -2
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +7 -7
- package/esm2015/pipes/field-error/field-error-content-pipe.js +1 -2
- package/esm2015/pipes/field-error/field-error-pipe.js +1 -2
- package/esm2015/pipes/filter-by-input/filter-by-input.base.js +5 -5
- package/esm2015/providers/month-formatter.provider.js +8 -13
- package/esm2015/providers/specific-dropdown-controllers.js +6 -29
- package/esm2015/tokens/calendar-date-stream.js +15 -0
- package/esm2015/tokens/index.js +2 -3
- package/esm2015/utils/files/format-size.js +4 -9
- package/esm2015/utils/files/get-accept-array.js +2 -7
- package/esm2015/utils/format/string-hash-to-hsl.js +2 -5
- package/esm2015/utils/index.js +1 -2
- package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -8
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -3
- package/esm2015/utils/math/key-steps.js +3 -3
- package/esm2015/utils/miscellaneous/get-precision.js +2 -5
- package/fesm2015/taiga-ui-kit-components-accordion.js +7 -19
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +5 -11
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js +2 -2
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +5 -5
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +4 -4
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +3 -6
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +0 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +12 -11
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +5 -6
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +9 -12
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +7 -11
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +7 -11
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +22 -41
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +7 -28
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-files.js +2 -3
- package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +22 -36
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +15 -38
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +20 -44
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +19 -44
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +18 -43
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +7 -20
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +4 -10
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +20 -37
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +20 -37
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +17 -40
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +20 -47
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +18 -30
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +31 -57
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +19 -15
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +12 -14
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +33 -55
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +10 -17
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +20 -36
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +96 -14
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js +5 -5
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +37 -73
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +13 -25
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +3 -16
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +7 -15
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +9 -12
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +7 -11
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +7 -11
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +7 -12
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +38 -86
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +6 -10
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +6 -6
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +21 -40
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +34 -32
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +10 -8
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +33 -35
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +10 -20
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +22 -34
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +7 -11
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +4 -9
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +4 -3
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js +120 -0
- package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js.map +1 -0
- package/fesm2015/taiga-ui-kit-directives-highlight.js +0 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -3
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js +3 -3
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-project-class.js +0 -3
- package/fesm2015/taiga-ui-kit-directives-project-class.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives.js +1 -3
- package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +6 -6
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-field-error.js +0 -2
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-providers.js +13 -40
- package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +15 -8
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-files.js +5 -15
- package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js +2 -5
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +4 -9
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
- package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +2 -5
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils.js +0 -1
- package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
- package/interfaces/index.d.ts +0 -1
- package/package.json +5 -5
- package/providers/month-formatter.provider.d.ts +0 -7
- package/providers/specific-dropdown-controllers.d.ts +1 -6
- package/tokens/calendar-date-stream.d.ts +5 -0
- package/tokens/index.d.ts +1 -2
- package/tokens/validation-errors.d.ts +1 -1
- package/utils/files/format-size.d.ts +1 -5
- package/utils/files/get-accept-array.d.ts +1 -5
- package/utils/format/string-hash-to-hsl.d.ts +1 -3
- package/utils/index.d.ts +0 -1
- package/utils/mask/create-auto-corrected-date-pipe.d.ts +1 -5
- package/utils/miscellaneous/get-precision.d.ts +1 -3
- package/abstract/index.d.ts +0 -1
- package/abstract/package.json +0 -10
- package/abstract/slider/slider.d.ts +0 -69
- package/abstract/taiga-ui-kit-abstract.d.ts +0 -5
- package/bundles/taiga-ui-kit-abstract.umd.js +0 -651
- package/bundles/taiga-ui-kit-abstract.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js +0 -107
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +0 -643
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-utils-dom.umd.js +0 -124
- package/bundles/taiga-ui-kit-utils-dom.umd.js.map +0 -1
- package/components/combo-box/combo-box.providers.d.ts +0 -1
- package/components/input/input.providers.d.ts +0 -1
- package/components/input-copy/input-copy.providers.d.ts +0 -2
- package/components/input-date/input-date.providers.d.ts +0 -1
- package/components/input-date-range/input-date-range.providers.d.ts +0 -1
- package/components/input-date-time/input-date-time.providers.d.ts +0 -1
- package/components/input-month/input-month.providers.d.ts +0 -2
- package/components/input-month-range/input-month-range.providers.d.ts +0 -2
- package/components/input-phone/input-phone.providers.d.ts +0 -5
- package/components/select/select.providers.d.ts +0 -1
- package/components/text-area/text-area.providers.d.ts +0 -2
- package/directives/dropdown-context/dropdown-context.directive.d.ts +0 -30
- package/directives/dropdown-context/dropdown-context.module.d.ts +0 -8
- package/directives/dropdown-context/index.d.ts +0 -2
- package/directives/dropdown-context/package.json +0 -10
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +0 -5
- package/directives/dropdown-hover/dropdown-hover.directive.d.ts +0 -11
- package/directives/dropdown-hover/dropdown-hover.module.d.ts +0 -7
- package/directives/dropdown-hover/index.d.ts +0 -2
- package/directives/dropdown-hover/package.json +0 -10
- package/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.d.ts +0 -5
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +0 -46
- package/directives/dropdown-selection/dropdown-selection.module.d.ts +0 -8
- package/directives/dropdown-selection/index.d.ts +0 -2
- package/directives/dropdown-selection/package.json +0 -10
- package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.d.ts +0 -5
- package/esm2015/abstract/index.js +0 -2
- package/esm2015/abstract/slider/slider.js +0 -264
- package/esm2015/abstract/taiga-ui-kit-abstract.js +0 -5
- package/esm2015/components/combo-box/combo-box.providers.js +0 -26
- package/esm2015/components/input/input.providers.js +0 -22
- package/esm2015/components/input-copy/input-copy.providers.js +0 -16
- package/esm2015/components/input-date/input-date.providers.js +0 -27
- package/esm2015/components/input-date-range/input-date-range.providers.js +0 -27
- package/esm2015/components/input-date-time/input-date-time.providers.js +0 -27
- package/esm2015/components/input-month/input-month.providers.js +0 -19
- package/esm2015/components/input-month-range/input-month-range.providers.js +0 -19
- package/esm2015/components/input-phone/input-phone.providers.js +0 -35
- package/esm2015/components/select/select.providers.js +0 -26
- package/esm2015/components/text-area/text-area.providers.js +0 -18
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +0 -141
- package/esm2015/directives/dropdown-context/dropdown-context.module.js +0 -18
- package/esm2015/directives/dropdown-context/index.js +0 -3
- package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +0 -5
- package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +0 -56
- package/esm2015/directives/dropdown-hover/dropdown-hover.module.js +0 -16
- package/esm2015/directives/dropdown-hover/index.js +0 -3
- package/esm2015/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.js +0 -5
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +0 -252
- package/esm2015/directives/dropdown-selection/dropdown-selection.module.js +0 -18
- package/esm2015/directives/dropdown-selection/index.js +0 -3
- package/esm2015/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.js +0 -5
- package/esm2015/interfaces/bread-crumbs-item.js +0 -2
- package/esm2015/tokens/calendar-data-stream.js +0 -3
- package/esm2015/tokens/tag-status.js +0 -6
- package/esm2015/utils/dom/get-word-range.js +0 -53
- package/esm2015/utils/dom/index.js +0 -4
- package/esm2015/utils/dom/scroll-to-element.js +0 -23
- package/esm2015/utils/dom/set-range-offset.js +0 -29
- package/esm2015/utils/dom/taiga-ui-kit-utils-dom.js +0 -5
- package/fesm2015/taiga-ui-kit-abstract.js +0 -271
- package/fesm2015/taiga-ui-kit-abstract.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +0 -162
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js +0 -76
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +0 -273
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +0 -1
- package/fesm2015/taiga-ui-kit-utils-dom.js +0 -111
- package/fesm2015/taiga-ui-kit-utils-dom.js.map +0 -1
- package/interfaces/bread-crumbs-item.d.ts +0 -6
- package/tokens/calendar-data-stream.d.ts +0 -4
- package/tokens/tag-status.d.ts +0 -3
- package/utils/dom/get-word-range.d.ts +0 -9
- package/utils/dom/index.d.ts +0 -3
- package/utils/dom/package.json +0 -10
- package/utils/dom/scroll-to-element.d.ts +0 -5
- package/utils/dom/set-range-offset.d.ts +0 -6
- package/utils/dom/taiga-ui-kit-utils-dom.d.ts +0 -5
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ChangeDetectorRef, ElementRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, ContentChild, Input, HostBinding, HostListener, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
6
6
|
import * as i4 from '@taiga-ui/cdk';
|
|
7
|
-
import {
|
|
7
|
+
import { AbstractTuiControl, tuiIsNativeFocused, TUI_IS_IOS, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, TuiFocusableModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1 from '@taiga-ui/core';
|
|
9
|
-
import {
|
|
9
|
+
import { tuiGetBorder, TUI_TEXTFIELD_APPEARANCE, TUI_MODE, TUI_TEXTFIELD_WATCHED_CONTROLLER, TUI_HINT_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER, HINT_CONTROLLER_PROVIDER, MODE_PROVIDER, TuiTextfieldComponent, TuiAbstractTextfieldHost, tuiAsTextfieldHost, TuiScrollbarModule, TuiTooltipModule, TuiWrapperModule, TuiDescribedByModule, TuiSvgModule, TuiPrimitiveTextfieldModule } from '@taiga-ui/core';
|
|
10
10
|
import * as i2 from '@angular/common';
|
|
11
11
|
import { CommonModule } from '@angular/common';
|
|
12
12
|
import * as i5 from 'rxjs';
|
|
13
13
|
|
|
14
|
-
const TUI_TEXT_AREA_PROVIDERS = [
|
|
15
|
-
{
|
|
16
|
-
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
17
|
-
useExisting: forwardRef(() => TuiTextAreaComponent),
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
provide: AbstractTuiControl,
|
|
21
|
-
useExisting: forwardRef(() => TuiTextAreaComponent),
|
|
22
|
-
},
|
|
23
|
-
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
24
|
-
HINT_CONTROLLER_PROVIDER,
|
|
25
|
-
MODE_PROVIDER,
|
|
26
|
-
];
|
|
27
|
-
|
|
28
14
|
const DEFAULT_ROWS = 20;
|
|
29
15
|
const LINE_HEIGHT_M = 20;
|
|
30
16
|
const LINE_HEIGHT_L = 24;
|
|
@@ -56,7 +42,7 @@ class TuiTextAreaComponent extends AbstractTuiControl {
|
|
|
56
42
|
return this.controller.size;
|
|
57
43
|
}
|
|
58
44
|
get border() {
|
|
59
|
-
return
|
|
45
|
+
return tuiGetBorder(false, this.hasCleaner, this.hasTooltip);
|
|
60
46
|
}
|
|
61
47
|
get hasCleaner() {
|
|
62
48
|
return this.controller.cleaner && this.hasValue && this.interactive;
|
|
@@ -103,7 +89,7 @@ class TuiTextAreaComponent extends AbstractTuiControl {
|
|
|
103
89
|
}
|
|
104
90
|
event.preventDefault();
|
|
105
91
|
if (this.nativeFocusableElement) {
|
|
106
|
-
|
|
92
|
+
this.nativeFocusableElement.focus();
|
|
107
93
|
}
|
|
108
94
|
}
|
|
109
95
|
getFallbackValue() {
|
|
@@ -114,7 +100,13 @@ class TuiTextAreaComponent extends AbstractTuiControl {
|
|
|
114
100
|
}
|
|
115
101
|
}
|
|
116
102
|
TuiTextAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTextAreaComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_TEXTFIELD_APPEARANCE }, { token: TUI_IS_IOS }, { token: TUI_MODE }, { token: TUI_TEXTFIELD_WATCHED_CONTROLLER }, { token: TUI_HINT_WATCHED_CONTROLLER }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
-
TuiTextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTextAreaComponent, selector: "tui-text-area", inputs: { rows: "rows", expandable: "expandable" }, host: { listeners: { "$.data-mode.attr": "mode$", "focusin": "onFocused(true)", "focusout": "onFocused(false)" }, properties: { "class._ios": "isIOS", "class._expandable": "this.expandable", "class._label-outside": "this.labelOutside", "attr.data-size": "this.size", "style.--border-end.rem": "this.border", "class._has-tooltip": "this.hasTooltip", "class._has-value": "this.hasValue", "class._has-counter": "this.hasCounter" } }, providers: TUI_TEXT_AREA_PROVIDERS, queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n automation-id=\"tui-text-area__wrapper\"\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ controller.maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || controller.exampleText\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n \n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [placeholder]=\"controller.exampleText\"\n [id]=\"id\"\n [tuiDescribedBy]=\"id\"\n [tuiFocusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"t-cleaner\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"id\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [content]=\"hintController.content || ''\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;font:var(--tui-font-text-m);flex-direction:column;min-height:6.75rem;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size=m]{font:var(--tui-font-text-s);min-height:5.5rem}:host[data-size=m]._has-counter{min-height:6.625rem}:host[data-size=l]._has-counter{min-height:7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;padding-bottom:.4375rem;box-sizing:border-box}:host[data-size=m]._label-outside .t-wrapper{padding-top:.75rem}:host[data-size=l]._label-outside .t-wrapper{padding-top:1rem}:host[data-size=m]:not(._label-outside) .t-wrapper{padding-top:1.375rem}:host[data-size=l]:not(._label-outside) .t-wrapper{padding-top:1.625rem}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:100%;width:100%}:host:not(._expandable) .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0)}:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:not(:last-of-type){display:none}.t-input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:read-only)::-ms-input-placeholder{opacity:1}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=m] .t-input{padding:0 .75rem}:host[data-size=l] .t-input{padding:0 1rem}:host._ios .t-input{padding-left:.8125rem}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;left:0;max-width:100%;padding:0 1rem;border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0);box-sizing:border-box}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font-size:.9375rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size=l][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size=m][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size=l][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}:host[data-size=m] .t-placeholder{top:.75rem;padding:0 .75rem}:host[data-size=l] .t-placeholder{top:1rem}:host._label-outside .t-placeholder{overflow:visible;overflow:initial;height:auto;white-space:normal;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:1rem .75rem}:host[data-size=m] .t-icons{padding:.75rem}.t-cleaner{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform;pointer-events:auto}.t-cleaner:hover{color:var(--tui-text-02)}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-tooltip{pointer-events:auto}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}\n"], components: [{ type: i1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "mode", "direction", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.TuiDescribedByDirective, selector: "[tuiDescribedBy]:not(ng-container)", inputs: ["tuiDescribedBy"] }, { type: i4.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
103
|
+
TuiTextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTextAreaComponent, selector: "tui-text-area", inputs: { rows: "rows", expandable: "expandable" }, host: { listeners: { "$.data-mode.attr": "mode$", "focusin": "onFocused(true)", "focusout": "onFocused(false)" }, properties: { "class._ios": "isIOS", "class._expandable": "this.expandable", "class._label-outside": "this.labelOutside", "attr.data-size": "this.size", "style.--border-end.rem": "this.border", "class._has-tooltip": "this.hasTooltip", "class._has-value": "this.hasValue", "class._has-counter": "this.hasCounter" } }, providers: [
|
|
104
|
+
tuiAsFocusableItemAccessor(TuiTextAreaComponent),
|
|
105
|
+
tuiAsControl(TuiTextAreaComponent),
|
|
106
|
+
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
107
|
+
HINT_CONTROLLER_PROVIDER,
|
|
108
|
+
MODE_PROVIDER,
|
|
109
|
+
], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n automation-id=\"tui-text-area__wrapper\"\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ controller.maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || controller.exampleText\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n \n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [placeholder]=\"controller.exampleText\"\n [id]=\"id\"\n [tuiDescribedBy]=\"id\"\n [tuiFocusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"t-cleaner\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"id\"\n [direction]=\"hintController.direction\"\n [appearance]=\"hintController.appearance\"\n [content]=\"hintController.content || ''\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;font:var(--tui-font-text-m);flex-direction:column;min-height:6.75rem;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size=m]{font:var(--tui-font-text-s);min-height:5.5rem}:host[data-size=m]._has-counter{min-height:6.625rem}:host[data-size=l]._has-counter{min-height:7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;padding-bottom:.4375rem;box-sizing:border-box}:host[data-size=m]._label-outside .t-wrapper{padding-top:.75rem}:host[data-size=l]._label-outside .t-wrapper{padding-top:1rem}:host[data-size=m]:not(._label-outside) .t-wrapper{padding-top:1.375rem}:host[data-size=l]:not(._label-outside) .t-wrapper{padding-top:1.625rem}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:100%;width:100%}:host:not(._expandable) .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0)}:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:not(:last-of-type){display:none}.t-input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:read-only)::-ms-input-placeholder{opacity:1}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=m] .t-input{padding:0 .75rem}:host[data-size=l] .t-input{padding:0 1rem}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-left:.8125rem}}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;left:0;max-width:100%;padding:0 1rem;border:solid transparent;border-width:0 0 0 0;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:0;border-inline-start-width:var(--border-start, 0);border-inline-end-width:0;border-inline-end-width:var(--border-end, 0);box-sizing:border-box}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font-size:.9375rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size=l][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size=m][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size=l][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}:host[data-size=m] .t-placeholder{top:.75rem;padding:0 .75rem}:host[data-size=l] .t-placeholder{top:1rem}:host._label-outside .t-placeholder{overflow:visible;overflow:initial;height:auto;white-space:normal;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:1rem .75rem}:host[data-size=m] .t-icons{padding:.75rem}.t-cleaner{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform;pointer-events:auto}.t-cleaner:hover{color:var(--tui-text-02)}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-tooltip{pointer-events:auto}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}\n"], components: [{ type: i1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.TuiDescribedByDirective, selector: "[tuiDescribedBy]:not(ng-container)", inputs: ["tuiDescribedBy"] }, { type: i4.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
118
110
|
__decorate([
|
|
119
111
|
tuiDefaultProp()
|
|
120
112
|
], TuiTextAreaComponent.prototype, "rows", void 0);
|
|
@@ -128,7 +120,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
128
120
|
templateUrl: `./text-area.template.html`,
|
|
129
121
|
styleUrls: [`./text-area.style.less`],
|
|
130
122
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
131
|
-
providers:
|
|
123
|
+
providers: [
|
|
124
|
+
tuiAsFocusableItemAccessor(TuiTextAreaComponent),
|
|
125
|
+
tuiAsControl(TuiTextAreaComponent),
|
|
126
|
+
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
127
|
+
HINT_CONTROLLER_PROVIDER,
|
|
128
|
+
MODE_PROVIDER,
|
|
129
|
+
],
|
|
132
130
|
host: {
|
|
133
131
|
'($.data-mode.attr)': `mode$`,
|
|
134
132
|
'[class._ios]': `isIOS`,
|
|
@@ -204,22 +202,12 @@ class TuiTextAreaDirective extends TuiAbstractTextfieldHost {
|
|
|
204
202
|
}
|
|
205
203
|
}
|
|
206
204
|
TuiTextAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTextAreaDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
207
|
-
TuiTextAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTextAreaDirective, selector: "tui-text-area", providers: [
|
|
208
|
-
{
|
|
209
|
-
provide: TUI_TEXTFIELD_HOST,
|
|
210
|
-
useExisting: forwardRef(() => TuiTextAreaDirective),
|
|
211
|
-
},
|
|
212
|
-
], usesInheritance: true, ngImport: i0 });
|
|
205
|
+
TuiTextAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTextAreaDirective, selector: "tui-text-area", providers: [tuiAsTextfieldHost(TuiTextAreaDirective)], usesInheritance: true, ngImport: i0 });
|
|
213
206
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTextAreaDirective, decorators: [{
|
|
214
207
|
type: Directive,
|
|
215
208
|
args: [{
|
|
216
209
|
selector: `tui-text-area`,
|
|
217
|
-
providers: [
|
|
218
|
-
{
|
|
219
|
-
provide: TUI_TEXTFIELD_HOST,
|
|
220
|
-
useExisting: forwardRef(() => TuiTextAreaDirective),
|
|
221
|
-
},
|
|
222
|
-
],
|
|
210
|
+
providers: [tuiAsTextfieldHost(TuiTextAreaDirective)],
|
|
223
211
|
}]
|
|
224
212
|
}] });
|
|
225
213
|
|
|
@@ -269,5 +257,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
269
257
|
* Generated bundle index. Do not edit.
|
|
270
258
|
*/
|
|
271
259
|
|
|
272
|
-
export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M,
|
|
260
|
+
export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TuiTextAreaComponent, TuiTextAreaDirective, TuiTextAreaModule };
|
|
273
261
|
//# sourceMappingURL=taiga-ui-kit-components-text-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-text-area.js","sources":["../../../projects/kit/components/text-area/text-area.providers.ts","../../../projects/kit/components/text-area/text-area.component.ts","../../../projects/kit/components/text-area/text-area.template.html","../../../projects/kit/components/text-area/text-area.directive.ts","../../../projects/kit/components/text-area/text-area.module.ts","../../../projects/kit/components/text-area/taiga-ui-kit-components-text-area.ts"],"sourcesContent":["import {forwardRef, Provider} from '@angular/core';\nimport {AbstractTuiControl, TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\nexport const TUI_TEXT_AREA_PROVIDERS: Provider[] = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n setNativeFocused,\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {\n getBorder,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldComponent,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {TUI_TEXT_AREA_PROVIDERS} from './text-area.providers';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n@Component({\n selector: `tui-text-area`,\n templateUrl: `./text-area.template.html`,\n styleUrls: [`./text-area.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TEXT_AREA_PROVIDERS,\n host: {\n '($.data-mode.attr)': `mode$`,\n '[class._ios]': `isIOS`,\n },\n})\nexport class TuiTextAreaComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`focusableElement`)\n private readonly focusableElement?: ElementRef<HTMLTextAreaElement>;\n\n @ContentChild(TuiTextfieldComponent, {read: ElementRef})\n private readonly textfield?: ElementRef<HTMLTextAreaElement>;\n\n @Input()\n @tuiDefaultProp()\n rows = DEFAULT_ROWS;\n\n @Input()\n @HostBinding(`class._expandable`)\n @tuiDefaultProp()\n expandable = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding(`class._label-outside`)\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n get nativeFocusableElement(): HTMLTextAreaElement | null {\n if (this.computedDisabled) {\n return null;\n }\n\n return (\n this.textfield?.nativeElement || this.focusableElement?.nativeElement || null\n );\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding(`attr.data-size`)\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding(`style.--border-end.rem`)\n get border(): number {\n return getBorder(false, this.hasCleaner, this.hasTooltip);\n }\n\n get hasCleaner(): boolean {\n return this.controller.cleaner && this.hasValue && this.interactive;\n }\n\n @HostBinding(`class._has-tooltip`)\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding(`class._has-value`)\n get hasValue(): boolean {\n return this.value !== ``;\n }\n\n @HostBinding(`class._has-counter`)\n get hasCounter(): boolean {\n return !!this.controller.maxLength && this.interactive;\n }\n\n get hasPlaceholder(): boolean {\n return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get hasExampleText(): boolean {\n const text =\n this.controller.exampleText || this.textfield?.nativeElement.placeholder;\n\n return !!text && this.focused && !this.hasValue && !this.readOnly;\n }\n\n get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.controller.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get fittedContent(): string {\n return this.value.slice(0, this.controller.maxLength || Infinity);\n }\n\n get extraContent(): string {\n return this.value.slice(this.controller.maxLength || Infinity);\n }\n\n @HostListener(`focusin`, [`true`])\n @HostListener(`focusout`, [`false`])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onValueChange(value: string): void {\n this.updateValue(value);\n }\n\n onMouseDown(event: MouseEvent): void {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement);\n }\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n\n private get lineHeight(): number {\n return this.controller.size === `m` ? LINE_HEIGHT_M : LINE_HEIGHT_L;\n }\n}\n","<div\n tuiWrapper\n automation-id=\"tui-text-area__wrapper\"\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ controller.maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || controller.exampleText\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n \n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [placeholder]=\"controller.exampleText\"\n [id]=\"id\"\n [tuiDescribedBy]=\"id\"\n [tuiFocusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"t-cleaner\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"id\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [content]=\"hintController.content || ''\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n </div>\n </label>\n</div>\n","import {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\n@Directive({\n selector: `tui-text-area`,\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiTextAreaDirective),\n },\n ],\n})\nexport class TuiTextAreaDirective extends TuiAbstractTextfieldHost<TuiTextAreaComponent> {\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule} from '@taiga-ui/cdk';\nimport {\n TuiDescribedByModule,\n TuiPrimitiveTextfieldModule,\n TuiScrollbarModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTooltipModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\nimport {TuiTextAreaDirective} from './text-area.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiWrapperModule,\n TuiDescribedByModule,\n TuiSvgModule,\n TuiPrimitiveTextfieldModule,\n ],\n declarations: [TuiTextAreaComponent, TuiTextAreaDirective],\n exports: [TuiTextAreaComponent, TuiTextAreaDirective, TuiTextfieldComponent],\n})\nexport class TuiTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAUa,MAAA,uBAAuB,GAAe;AAC/C,IAAA;AACI,QAAA,OAAO,EAAE,2BAA2B;AACpC,QAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACtD,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACtD,KAAA;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ACmBV,MAAM,YAAY,GAAG,GAAG;AACxB,MAAM,aAAa,GAAG,GAAG;AACzB,MAAM,aAAa,GAAG,GAAG;AAa1B,MAAO,oBACT,SAAQ,kBAA0B,CAAA;AAkBlC,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C,EAAA;AAEnD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QARS,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;QAChC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAS;QAChB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAkC;QAEzD,IAAU,CAAA,UAAA,GAAV,UAAU,CAAwB;QAElC,IAAc,CAAA,cAAA,GAAd,cAAc,CAA4B;QAnBvD,IAAI,CAAA,IAAA,GAAG,YAAY,CAAC;QAKpB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;KAiBlB;AAED,IAAA,IACI,YAAY,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,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EAAE,oBAAoB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAElE,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAdjB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,oBAAoB;YACpB,YAAY;YACZ,2BAA2B;AAC9B,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,kBAAkB;wBAClB,gBAAgB;wBAChB,gBAAgB;wBAChB,oBAAoB;wBACpB,YAAY;wBACZ,2BAA2B;AAC9B,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;AAC1D,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;AAC/E,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-text-area.js","sources":["../../../projects/kit/components/text-area/text-area.component.ts","../../../projects/kit/components/text-area/text-area.template.html","../../../projects/kit/components/text-area/text-area.directive.ts","../../../projects/kit/components/text-area/text-area.module.ts","../../../projects/kit/components/text-area/taiga-ui-kit-components-text-area.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n TUI_IS_IOS,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiBrightness,\n tuiGetBorder,\n TuiHintControllerDirective,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldComponent,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n@Component({\n selector: `tui-text-area`,\n templateUrl: `./text-area.template.html`,\n styleUrls: [`./text-area.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiTextAreaComponent),\n tuiAsControl(TuiTextAreaComponent),\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n ],\n host: {\n '($.data-mode.attr)': `mode$`,\n '[class._ios]': `isIOS`,\n },\n})\nexport class TuiTextAreaComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`focusableElement`)\n private readonly focusableElement?: ElementRef<HTMLTextAreaElement>;\n\n @ContentChild(TuiTextfieldComponent, {read: ElementRef})\n private readonly textfield?: ElementRef<HTMLTextAreaElement>;\n\n @Input()\n @tuiDefaultProp()\n rows = DEFAULT_ROWS;\n\n @Input()\n @HostBinding(`class._expandable`)\n @tuiDefaultProp()\n expandable = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding(`class._label-outside`)\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n get nativeFocusableElement(): HTMLTextAreaElement | null {\n if (this.computedDisabled) {\n return null;\n }\n\n return (\n this.textfield?.nativeElement || this.focusableElement?.nativeElement || null\n );\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding(`attr.data-size`)\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding(`style.--border-end.rem`)\n get border(): number {\n return tuiGetBorder(false, this.hasCleaner, this.hasTooltip);\n }\n\n get hasCleaner(): boolean {\n return this.controller.cleaner && this.hasValue && this.interactive;\n }\n\n @HostBinding(`class._has-tooltip`)\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding(`class._has-value`)\n get hasValue(): boolean {\n return this.value !== ``;\n }\n\n @HostBinding(`class._has-counter`)\n get hasCounter(): boolean {\n return !!this.controller.maxLength && this.interactive;\n }\n\n get hasPlaceholder(): boolean {\n return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get hasExampleText(): boolean {\n const text =\n this.controller.exampleText || this.textfield?.nativeElement.placeholder;\n\n return !!text && this.focused && !this.hasValue && !this.readOnly;\n }\n\n get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.controller.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get fittedContent(): string {\n return this.value.slice(0, this.controller.maxLength || Infinity);\n }\n\n get extraContent(): string {\n return this.value.slice(this.controller.maxLength || Infinity);\n }\n\n @HostListener(`focusin`, [`true`])\n @HostListener(`focusout`, [`false`])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onValueChange(value: string): void {\n this.updateValue(value);\n }\n\n onMouseDown(event: MouseEvent): void {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.focus();\n }\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n\n private get lineHeight(): number {\n return this.controller.size === `m` ? LINE_HEIGHT_M : LINE_HEIGHT_L;\n }\n}\n","<div\n tuiWrapper\n automation-id=\"tui-text-area__wrapper\"\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"hasCounter\"\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ controller.maxLength }}\n </div>\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || controller.exampleText\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n \n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [placeholder]=\"controller.exampleText\"\n [id]=\"id\"\n [tuiDescribedBy]=\"id\"\n [tuiFocusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [ngModel]=\"value\"\n [readOnly]=\"readOnly\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n <ng-content select=\"textarea\"></ng-content>\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n src=\"tuiIconCloseLarge\"\n class=\"t-cleaner\"\n (click.stop)=\"onValueChange('')\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-text-area__tooltip\"\n class=\"t-tooltip\"\n [describeId]=\"id\"\n [direction]=\"hintController.direction\"\n [appearance]=\"hintController.appearance\"\n [content]=\"hintController.content || ''\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n </div>\n </label>\n</div>\n","import {Directive} from '@angular/core';\nimport {TuiAbstractTextfieldHost, tuiAsTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\n\n@Directive({\n selector: `tui-text-area`,\n providers: [tuiAsTextfieldHost(TuiTextAreaDirective)],\n})\nexport class TuiTextAreaDirective extends TuiAbstractTextfieldHost<TuiTextAreaComponent> {\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule} from '@taiga-ui/cdk';\nimport {\n TuiDescribedByModule,\n TuiPrimitiveTextfieldModule,\n TuiScrollbarModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTooltipModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\n\nimport {TuiTextAreaComponent} from './text-area.component';\nimport {TuiTextAreaDirective} from './text-area.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiWrapperModule,\n TuiDescribedByModule,\n TuiSvgModule,\n TuiPrimitiveTextfieldModule,\n ],\n declarations: [TuiTextAreaComponent, TuiTextAreaDirective],\n exports: [TuiTextAreaComponent, TuiTextAreaDirective, TuiTextfieldComponent],\n})\nexport class TuiTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA0CO,MAAM,YAAY,GAAG,GAAG;AACxB,MAAM,aAAa,GAAG,GAAG;AACzB,MAAM,aAAa,GAAG,GAAG;AAmB1B,MAAO,oBACT,SAAQ,kBAA0B,CAAA;AAkBlC,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C,EAAA;AAEnD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QARS,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;QAChC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAS;QAChB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAkC;QAEzD,IAAU,CAAA,UAAA,GAAV,UAAU,CAAwB;QAElC,IAAc,CAAA,cAAA,GAAd,cAAc,CAA4B;QAnBvD,IAAI,CAAA,IAAA,GAAG,YAAY,CAAC;QAKpB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;KAiBlB;AAED,IAAA,IACI,YAAY,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;KACvC;AAED,IAAA,IAAI,sBAAsB,GAAA;;QACtB,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACvB,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AAED,QAAA,QACI,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,SAAS,0CAAE,aAAa,MAAI,MAAA,IAAI,CAAC,gBAAgB,MAAE,IAAA,IAAA,EAAA,KAAA,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C;AAC/E,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, ChangeDetectorRef,
|
|
3
|
+
import { InjectionToken, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i5 from '@angular/forms';
|
|
5
5
|
import { NgControl } from '@angular/forms';
|
|
6
6
|
import * as i4 from '@taiga-ui/cdk';
|
|
7
|
-
import { AbstractTuiControl, tuiIsNativeFocused,
|
|
7
|
+
import { AbstractTuiControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, TuiFocusedModule, TuiFocusableModule, TuiPressedModule, TuiFocusVisibleModule, TuiCheckedModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1 from '@taiga-ui/core';
|
|
9
9
|
import { TuiModeDirective, TuiWrapperModule, TuiSvgModule, TuiLoaderModule } from '@taiga-ui/core';
|
|
10
10
|
import * as i2 from '@angular/common';
|
|
@@ -88,11 +88,9 @@ class TuiToggleComponent extends AbstractTuiControl {
|
|
|
88
88
|
}
|
|
89
89
|
TuiToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiToggleComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TuiModeDirective, optional: true }, { token: TUI_TOGGLE_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
90
90
|
TuiToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiToggleComponent, selector: "tui-toggle", inputs: { singleColor: "singleColor", showIcons: "showIcons", showLoader: "showLoader", size: "size" }, host: { properties: { "attr.data-size": "this.size", "class._checked": "this.checked", "attr.data-mode": "this.hostMode" } }, providers: [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n>\n <div class=\"toggle\">\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOn as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__check-icon\"\n class=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <div class=\"circle\"></div>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"!checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOff as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__cancel-icon\"\n class=\"icon icon_off\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n </div>\n <input\n #focusableElement\n type=\"checkbox\"\n role=\"switch\"\n automation-id=\"tui-toggle__checkbox\"\n class=\"checkbox\"\n [attr.aria-checked]=\"value\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"focusable\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</div>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}:host[data-size=m]{width:2rem;height:1rem}:host[data-size=l]{width:3rem;height:1.5rem}.checkbox{padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.checkbox:-webkit-autofill,.checkbox:-webkit-autofill:hover,.checkbox:-webkit-autofill:focus{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host._disabled .checkbox{pointer-events:none;cursor:default}.toggle{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}:host[data-size=m] .toggle{width:3rem;height:1rem;transform:translate(-1rem)}:host[data-size=l] .toggle{width:4.5rem;height:1.5rem;transform:translate(-1.5rem)}:host._checked .toggle{transform:translate(0)}.circle{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}:host._disabled .circle_light{opacity:.24}:host[data-size=m] .circle{width:.75rem;height:.75rem}:host[data-size=l] .circle{width:1rem;height:1rem}:host._disabled .circle{background-color:var(--tui-base-01)}:host:not(._checked) .loader{color:var(--tui-base-06)}:host:not(._checked)._disabled .loader{color:var(--tui-base-05)}:host:not(._checked)[data-mode=onDark] .loader{color:var(--tui-text-03-night)}:host:not(._checked)[data-mode=onDark]._disabled .loader{color:var(--tui-clear-inverse-active)}:host:not(._checked)[data-mode=onLight] .loader{color:var(--tui-text-03)}:host:not(._checked)[data-mode=onLight]._disabled .loader{color:var(--tui-clear-active)}:host[data-size=m] .loader{width:.75rem;margin:0 .2rem;transform:scale(.75)}:host[data-size=l] .loader{width:1rem;margin:0 .25rem}.icon-wrapper{display:flex}.icon{opacity:.8}.icon_off{color:var(--tui-base-06)}:host._disabled .icon_off{color:var(--tui-base-05)}:host[data-mode=onDark] .icon_off{color:var(--tui-text-03-night)}:host[data-mode=onDark]._disabled .icon_off{color:var(--tui-clear-inverse-active)}:host[data-mode=onLight] .icon_off{color:var(--tui-text-03)}:host[data-mode=onLight]._disabled .icon_off{color:var(--tui-clear-active)}:host[data-size=m] .icon{width:1rem;height:1rem;transform:scale(.75)}:host[data-size=l] .icon{margin:0 .125rem;width:1.5rem;height:1.5rem}:host:hover .icon{opacity:1}\n"], components: [{ type: i1.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.TuiCheckedDirective, selector: "input[tuiChecked], input[tuiCheckedChange]", inputs: ["tuiChecked"], outputs: ["tuiCheckedChange"] }, { type: i4.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i4.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i4.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
91
|
+
tuiAsFocusableItemAccessor(TuiToggleComponent),
|
|
92
|
+
tuiAsControl(TuiToggleComponent),
|
|
93
|
+
], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n>\n <div class=\"t-toggle\">\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"t-icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOn as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__check-icon\"\n class=\"t-icon\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <div class=\"t-circle\"></div>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"!checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"t-icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOff as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__cancel-icon\"\n class=\"t-icon t-icon_off\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n </div>\n <input\n #focusableElement\n type=\"checkbox\"\n role=\"switch\"\n automation-id=\"tui-toggle__checkbox\"\n class=\"t-checkbox\"\n [attr.aria-checked]=\"value\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"focusable\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</div>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}:host[data-size=m]{width:2rem;height:1rem}:host[data-size=l]{width:3rem;height:1.5rem}.t-checkbox{padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.t-checkbox:-webkit-autofill,.t-checkbox:-webkit-autofill:hover,.t-checkbox:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host._disabled .t-checkbox{pointer-events:none;cursor:default}.t-toggle{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}:host[data-size=m] .t-toggle{width:3rem;height:1rem;transform:translate(-1rem)}:host[data-size=l] .t-toggle{width:4.5rem;height:1.5rem;transform:translate(-1.5rem)}:host._checked .t-toggle{transform:translate(0)}.t-circle{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}:host._disabled .t-circle_light{opacity:.24}:host[data-size=m] .t-circle{width:.75rem;height:.75rem}:host[data-size=l] .t-circle{width:1rem;height:1rem}:host._disabled .t-circle{background-color:var(--tui-base-01)}:host:not(._checked) .t-loader{color:var(--tui-base-06)}:host:not(._checked)._disabled .t-loader{color:var(--tui-base-05)}:host:not(._checked)[data-mode=onDark] .t-loader{color:var(--tui-text-03-night)}:host:not(._checked)[data-mode=onDark]._disabled .t-loader{color:var(--tui-clear-inverse-active)}:host:not(._checked)[data-mode=onLight] .t-loader{color:var(--tui-text-03)}:host:not(._checked)[data-mode=onLight]._disabled .t-loader{color:var(--tui-clear-active)}:host[data-size=m] .t-loader{width:.75rem;margin:0 .2rem;transform:scale(.75)}:host[data-size=l] .t-loader{width:1rem;margin:0 .25rem}.t-icon-wrapper{display:flex}.t-icon{opacity:.8}.t-icon_off{color:var(--tui-base-06)}:host._disabled .t-icon_off{color:var(--tui-base-05)}:host[data-mode=onDark] .t-icon_off{color:var(--tui-text-03-night)}:host[data-mode=onDark]._disabled .t-icon_off{color:var(--tui-clear-inverse-active)}:host[data-mode=onLight] .t-icon_off{color:var(--tui-text-03)}:host[data-mode=onLight]._disabled .t-icon_off{color:var(--tui-clear-active)}:host[data-size=m] .t-icon{width:1rem;height:1rem;transform:scale(.75)}:host[data-size=l] .t-icon{margin:0 .125rem;width:1.5rem;height:1.5rem}:host:hover .t-icon{opacity:1}\n"], components: [{ type: i1.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.TuiCheckedDirective, selector: "input[tuiChecked], input[tuiCheckedChange]", inputs: ["tuiChecked"], outputs: ["tuiCheckedChange"] }, { type: i4.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i4.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i4.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
96
94
|
__decorate([
|
|
97
95
|
tuiDefaultProp()
|
|
98
96
|
], TuiToggleComponent.prototype, "singleColor", void 0);
|
|
@@ -113,10 +111,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
113
111
|
styleUrls: [`./toggle.style.less`],
|
|
114
112
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
115
113
|
providers: [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
useExisting: forwardRef(() => TuiToggleComponent),
|
|
119
|
-
},
|
|
114
|
+
tuiAsFocusableItemAccessor(TuiToggleComponent),
|
|
115
|
+
tuiAsControl(TuiToggleComponent),
|
|
120
116
|
],
|
|
121
117
|
}]
|
|
122
118
|
}], ctorParameters: function () { return [{ type: i5.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-toggle.js","sources":["../../../projects/kit/components/toggle/toggle-options.ts","../../../projects/kit/components/toggle/toggle.component.ts","../../../projects/kit/components/toggle/toggle.template.html","../../../projects/kit/components/toggle/toggle.module.ts","../../../projects/kit/components/toggle/taiga-ui-kit-components-toggle.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiToggleOptions {\n readonly icons: Readonly<{\n toggleOff: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n toggleOn: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n readonly singleColor: boolean;\n readonly showIcons: boolean;\n readonly size: TuiSizeL;\n}\n\n/** Default values for the toggle options. */\nexport const TUI_TOGGLE_DEFAULT_OPTIONS: TuiToggleOptions = {\n icons: {\n toggleOff({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === `m` ? `tuiIconToggleOff` : `tuiIconToggleOffLarge`;\n },\n toggleOn({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === `m` ? `tuiIconToggleOn` : `tuiIconToggleOnLarge`;\n },\n },\n singleColor: false,\n showIcons: false,\n size: `m`,\n};\n\nexport const TUI_TOGGLE_OPTIONS = new InjectionToken<TuiToggleOptions>(\n `Default parameters for toggle component`,\n {\n factory: () => TUI_TOGGLE_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiToggleOptionsProvider: (\n options: Partial<TuiToggleOptions>,\n) => ValueProvider = (options: Partial<TuiToggleOptions>) => ({\n provide: TUI_TOGGLE_OPTIONS,\n useValue: {...TUI_TOGGLE_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiBrightness,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_TOGGLE_OPTIONS, TuiToggleOptions} from './toggle-options';\n\n@Component({\n selector: `tui-toggle`,\n templateUrl: `./toggle.template.html`,\n styleUrls: [`./toggle.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiToggleComponent),\n },\n ],\n})\nexport class TuiToggleComponent\n extends AbstractTuiControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`focusableElement`)\n private readonly focusableElement?: ElementRef<TuiNativeFocusableElement>;\n\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n @Input()\n @tuiDefaultProp()\n showIcons = this.options.showIcons;\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TOGGLE_OPTIONS)\n readonly options: TuiToggleOptions,\n ) {\n super(control, changeDetectorRef);\n }\n\n get iconOn(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOn;\n }\n\n get iconOff(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOff;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.focusableElement ? this.focusableElement.nativeElement : null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n return this.singleColor || this.checked\n ? TuiAppearance.Primary\n : TuiAppearance.Secondary;\n }\n\n get sizeM(): boolean {\n return this.size === `m`;\n }\n\n @HostBinding(`class._checked`)\n get checked(): boolean {\n return this.value;\n }\n\n get loaderSize(): TuiSizeXS {\n return this.sizeM ? `xs` : `s`;\n }\n\n @HostBinding(`attr.data-mode`)\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onChecked(checked: boolean): void {\n this.updateValue(checked);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.updateFocusVisible(focusVisible);\n }\n\n protected getFallbackValue(): boolean {\n return false;\n }\n}\n","<div\n tuiWrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n>\n <div class=\"toggle\">\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOn as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__check-icon\"\n class=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <div class=\"circle\"></div>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"!checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOff as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__cancel-icon\"\n class=\"icon icon_off\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n </div>\n <input\n #focusableElement\n type=\"checkbox\"\n role=\"switch\"\n automation-id=\"tui-toggle__checkbox\"\n class=\"checkbox\"\n [attr.aria-checked]=\"value\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"focusable\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiToggleComponent} from './toggle.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiFocusedModule,\n TuiFocusableModule,\n TuiPressedModule,\n TuiFocusVisibleModule,\n TuiCheckedModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiToggleComponent],\n exports: [TuiToggleComponent],\n})\nexport class TuiToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAeA;AACa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,KAAK,EAAE;QACH,SAAS,CAAC,EAAC,SAAS,EAAmC,EAAA;YACnD,OAAO,SAAS,KAAK,CAAA,CAAA,CAAG,GAAG,CAAA,gBAAA,CAAkB,GAAG,CAAA,qBAAA,CAAuB,CAAC;SAC3E;QACD,QAAQ,CAAC,EAAC,SAAS,EAAmC,EAAA;YAClD,OAAO,SAAS,KAAK,CAAA,CAAA,CAAG,GAAG,CAAA,eAAA,CAAiB,GAAG,CAAA,oBAAA,CAAsB,CAAC;SACzE;AACJ,KAAA;AACD,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;EACX;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;AAC1D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,0BAA0B,CAAK,EAAA,OAAO,CAAC;AACxD,CAAA;;ACIK,MAAO,kBACT,SAAQ,kBAA2B,CAAA;AAuBnC,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAE9C,OAAyB,EAAA;AAElC,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAJjB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAyB;QAE9C,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;AAzBtC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,C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B,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,gBAAgB;wBAChB,kBAAkB;wBAClB,gBAAgB;wBAChB,qBAAqB;wBACrB,gBAAgB;wBAChB,gBAAgB;wBAChB,YAAY;wBACZ,eAAe;wBACf,kBAAkB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-toggle.js","sources":["../../../projects/kit/components/toggle/toggle-options.ts","../../../projects/kit/components/toggle/toggle.component.ts","../../../projects/kit/components/toggle/toggle.template.html","../../../projects/kit/components/toggle/toggle.module.ts","../../../projects/kit/components/toggle/taiga-ui-kit-components-toggle.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiToggleOptions {\n readonly icons: Readonly<{\n toggleOff: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n toggleOn: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n readonly singleColor: boolean;\n readonly showIcons: boolean;\n readonly size: TuiSizeL;\n}\n\n/** Default values for the toggle options. */\nexport const TUI_TOGGLE_DEFAULT_OPTIONS: TuiToggleOptions = {\n icons: {\n toggleOff({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === `m` ? `tuiIconToggleOff` : `tuiIconToggleOffLarge`;\n },\n toggleOn({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === `m` ? `tuiIconToggleOn` : `tuiIconToggleOnLarge`;\n },\n },\n singleColor: false,\n showIcons: false,\n size: `m`,\n};\n\nexport const TUI_TOGGLE_OPTIONS = new InjectionToken<TuiToggleOptions>(\n `Default parameters for toggle component`,\n {\n factory: () => TUI_TOGGLE_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiToggleOptionsProvider: (\n options: Partial<TuiToggleOptions>,\n) => ValueProvider = (options: Partial<TuiToggleOptions>) => ({\n provide: TUI_TOGGLE_OPTIONS,\n useValue: {...TUI_TOGGLE_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiBrightness,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_TOGGLE_OPTIONS, TuiToggleOptions} from './toggle-options';\n\n@Component({\n selector: `tui-toggle`,\n templateUrl: `./toggle.template.html`,\n styleUrls: [`./toggle.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiToggleComponent),\n tuiAsControl(TuiToggleComponent),\n ],\n})\nexport class TuiToggleComponent\n extends AbstractTuiControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`focusableElement`)\n private readonly focusableElement?: ElementRef<TuiNativeFocusableElement>;\n\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n @Input()\n @tuiDefaultProp()\n showIcons = this.options.showIcons;\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TOGGLE_OPTIONS)\n readonly options: TuiToggleOptions,\n ) {\n super(control, changeDetectorRef);\n }\n\n get iconOn(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOn;\n }\n\n get iconOff(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOff;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.focusableElement ? this.focusableElement.nativeElement : null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n return this.singleColor || this.checked\n ? TuiAppearance.Primary\n : TuiAppearance.Secondary;\n }\n\n get sizeM(): boolean {\n return this.size === `m`;\n }\n\n @HostBinding(`class._checked`)\n get checked(): boolean {\n return this.value;\n }\n\n get loaderSize(): TuiSizeXS {\n return this.sizeM ? `xs` : `s`;\n }\n\n @HostBinding(`attr.data-mode`)\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onChecked(checked: boolean): void {\n this.updateValue(checked);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.updateFocusVisible(focusVisible);\n }\n\n protected getFallbackValue(): boolean {\n return false;\n }\n}\n","<div\n tuiWrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n>\n <div class=\"t-toggle\">\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"t-icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOn as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__check-icon\"\n class=\"t-icon\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <div class=\"t-circle\"></div>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"!checked\"\n ></tui-loader>\n <span\n *ngIf=\"showIcons && !showLoader\"\n class=\"t-icon-wrapper\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconOff as src; context: {$implicit: size}\"\n automation-id=\"tui-toggle__cancel-icon\"\n class=\"t-icon t-icon_off\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n </div>\n <input\n #focusableElement\n type=\"checkbox\"\n role=\"switch\"\n automation-id=\"tui-toggle__checkbox\"\n class=\"t-checkbox\"\n [attr.aria-checked]=\"value\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"focusable\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiToggleComponent} from './toggle.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiFocusedModule,\n TuiFocusableModule,\n TuiPressedModule,\n TuiFocusVisibleModule,\n TuiCheckedModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiToggleComponent],\n exports: [TuiToggleComponent],\n})\nexport class TuiToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAeA;AACa,MAAA,0BAA0B,GAAqB;AACxD,IAAA,KAAK,EAAE;QACH,SAAS,CAAC,EAAC,SAAS,EAAmC,EAAA;YACnD,OAAO,SAAS,KAAK,CAAA,CAAA,CAAG,GAAG,CAAA,gBAAA,CAAkB,GAAG,CAAA,qBAAA,CAAuB,CAAC;SAC3E;QACD,QAAQ,CAAC,EAAC,SAAS,EAAmC,EAAA;YAClD,OAAO,SAAS,KAAK,CAAA,CAAA,CAAG,GAAG,CAAA,eAAA,CAAiB,GAAG,CAAA,oBAAA,CAAsB,CAAC;SACzE;AACJ,KAAA;AACD,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;EACX;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;AAC1D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,0BAA0B,CAAK,EAAA,OAAO,CAAC;AACxD,CAAA;;ACEK,MAAO,kBACT,SAAQ,kBAA2B,CAAA;AAuBnC,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAs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,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAff,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,gBAAgB;YAChB,kBAAkB;YAClB,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,gBAAgB;wBAChB,kBAAkB;wBAClB,gBAAgB;wBAChB,qBAAqB;wBACrB,gBAAgB;wBAChB,gBAAgB;wBAChB,YAAY;wBACZ,eAAe;wBACf,kBAAkB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
|
@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
|
|
|
4
4
|
import { startWith, map, distinctUntilChanged, switchMap, tap, mapTo } from 'rxjs/operators';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import * as i2$1 from '@taiga-ui/cdk';
|
|
7
|
-
import { EMPTY_ARRAY, tuiDefaultProp, ALWAYS_TRUE_HANDLER, EMPTY_FUNCTION, EMPTY_QUERY,
|
|
7
|
+
import { EMPTY_ARRAY, tuiDefaultProp, ALWAYS_TRUE_HANDLER, EMPTY_FUNCTION, EMPTY_QUERY, tuiIsPresent, TuiLetModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i2 from '@tinkoff/ng-polymorpheus';
|
|
9
9
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
10
10
|
import * as i1 from '@taiga-ui/core';
|
|
@@ -96,17 +96,13 @@ const TUI_TREE_ITEM_PROVIDERS = [
|
|
|
96
96
|
{
|
|
97
97
|
provide: TUI_TREE_LEVEL,
|
|
98
98
|
deps: [[new SkipSelf(), TUI_TREE_LEVEL]],
|
|
99
|
-
useFactory:
|
|
99
|
+
useFactory: (level) => ++level,
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
provide: TUI_TREE_NODE,
|
|
103
103
|
useExisting: forwardRef(() => TuiTreeItemComponent),
|
|
104
104
|
},
|
|
105
105
|
];
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
107
|
-
function treeLevelFactory(level) {
|
|
108
|
-
return ++level;
|
|
109
|
-
}
|
|
110
106
|
|
|
111
107
|
class TuiTreeItemComponent {
|
|
112
108
|
constructor(elementRef, controller, level, content) {
|
|
@@ -277,7 +273,7 @@ class TuiTreeControllerDirective {
|
|
|
277
273
|
toggle(item) {
|
|
278
274
|
const value = this.items.get(item);
|
|
279
275
|
const expanded = this.isExpanded(item);
|
|
280
|
-
if (!
|
|
276
|
+
if (!tuiIsPresent(value)) {
|
|
281
277
|
return;
|
|
282
278
|
}
|
|
283
279
|
this.toggled.emit(value);
|
|
@@ -366,7 +362,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
366
362
|
args: [`tuiTreeController`]
|
|
367
363
|
}] } });
|
|
368
364
|
|
|
369
|
-
// @dynamic
|
|
370
365
|
class TuiTreeService {
|
|
371
366
|
constructor(loading, start, loader) {
|
|
372
367
|
this.loading = loading;
|
|
@@ -461,5 +456,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
461
456
|
* Generated bundle index. Do not edit.
|
|
462
457
|
*/
|
|
463
458
|
|
|
464
|
-
export { TUI_DEFAULT_TREE_CONTROLLER, TUI_TREE_ACCESSOR, TUI_TREE_CONTENT, TUI_TREE_CONTROLLER, TUI_TREE_ITEM_CONTENT, TUI_TREE_ITEM_PROVIDERS, TUI_TREE_LEVEL, TUI_TREE_LOADER, TUI_TREE_LOADING, TUI_TREE_NODE, TUI_TREE_START, TuiTreeChildrenDirective, TuiTreeComponent, TuiTreeControllerDirective, TuiTreeItemComponent, TuiTreeItemContentComponent, TuiTreeItemControllerDirective, TuiTreeModule, TuiTreeNodeDirective, TuiTreeService
|
|
459
|
+
export { TUI_DEFAULT_TREE_CONTROLLER, TUI_TREE_ACCESSOR, TUI_TREE_CONTENT, TUI_TREE_CONTROLLER, TUI_TREE_ITEM_CONTENT, TUI_TREE_ITEM_PROVIDERS, TUI_TREE_LEVEL, TUI_TREE_LOADER, TUI_TREE_LOADING, TUI_TREE_NODE, TUI_TREE_START, TuiTreeChildrenDirective, TuiTreeComponent, TuiTreeControllerDirective, TuiTreeItemComponent, TuiTreeItemContentComponent, TuiTreeItemControllerDirective, TuiTreeModule, TuiTreeNodeDirective, TuiTreeService };
|
|
465
460
|
//# sourceMappingURL=taiga-ui-kit-components-tree.js.map
|