@taiga-ui/kit 3.0.0-rc.0 → 3.0.0-rc.3
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
|
@@ -4,7 +4,7 @@ import { ElementRef, Directive, Inject, Output, Input, EventEmitter, ChangeDetec
|
|
|
4
4
|
import * as i3 from '@ng-web-apis/intersection-observer';
|
|
5
5
|
import { INTERSECTION_ROOT, IntersectionObserverModule } from '@ng-web-apis/intersection-observer';
|
|
6
6
|
import * as i4 from '@taiga-ui/cdk';
|
|
7
|
-
import {
|
|
7
|
+
import { tuiTypedFromEvent, EMPTY_QUERY, tuiClamp, TUI_IS_MOBILE, TuiItemDirective, tuiDefaultProp, tuiPure, TuiPanModule, TuiSwipeModule, TuiItemModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1$1 from '@angular/common';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
10
10
|
import { filter, throttleTime, map, tap, mapTo, switchMap } from 'rxjs/operators';
|
|
@@ -16,7 +16,7 @@ import { tuiButtonOptionsProvider } from '@taiga-ui/core';
|
|
|
16
16
|
class TuiCarouselScrollDirective {
|
|
17
17
|
constructor(elementRef) {
|
|
18
18
|
this.elementRef = elementRef;
|
|
19
|
-
this.tuiCarouselScroll =
|
|
19
|
+
this.tuiCarouselScroll = tuiTypedFromEvent(this.elementRef.nativeElement, `wheel`).pipe(filter(({ deltaX }) => Math.abs(deltaX) > 20), throttleTime(500), map(({ deltaX }) => Math.sign(deltaX)), tap(() => {
|
|
20
20
|
// So we always have space to scroll and overflow-behavior saves us from back nav
|
|
21
21
|
this.elementRef.nativeElement.scrollLeft = 10;
|
|
22
22
|
}));
|
|
@@ -42,7 +42,7 @@ class TuiCarouselDirective extends Observable {
|
|
|
42
42
|
this.elementRef = elementRef;
|
|
43
43
|
this.visible$ = visible$;
|
|
44
44
|
this.duration$ = new BehaviorSubject(0);
|
|
45
|
-
this.running$ = merge(
|
|
45
|
+
this.running$ = merge(tuiTypedFromEvent(this.elementRef.nativeElement, `mouseenter`).pipe(mapTo(false)), tuiTypedFromEvent(this.elementRef.nativeElement, `touchstart`).pipe(mapTo(false)), tuiTypedFromEvent(this.elementRef.nativeElement, `touchend`).pipe(mapTo(true)), tuiTypedFromEvent(this.elementRef.nativeElement, `mouseleave`).pipe(mapTo(true)), this.visible$);
|
|
46
46
|
this.output$ = combineLatest([this.duration$, this.running$]).pipe(switchMap(([duration, running]) => duration && running ? interval(duration) : EMPTY));
|
|
47
47
|
}
|
|
48
48
|
set duration(duration) {
|
|
@@ -84,7 +84,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
84
84
|
args: [TuiCarouselDirective]
|
|
85
85
|
}] }]; } });
|
|
86
86
|
|
|
87
|
-
// @dynamic
|
|
88
87
|
class TuiCarouselComponent {
|
|
89
88
|
constructor(changeDetectorRef, elementRef, isMobile) {
|
|
90
89
|
this.changeDetectorRef = changeDetectorRef;
|
|
@@ -141,7 +140,7 @@ class TuiCarouselComponent {
|
|
|
141
140
|
}
|
|
142
141
|
const { clientWidth } = this.elementRef.nativeElement;
|
|
143
142
|
const min = 1 - this.items.length / this.itemsCount;
|
|
144
|
-
this.translate =
|
|
143
|
+
this.translate = tuiClamp(x / clientWidth + this.translate, min, 0);
|
|
145
144
|
}
|
|
146
145
|
onSwipe(direction) {
|
|
147
146
|
if (Math.round(this.translate) !== -this.index || !this.computedDraggable) {
|
|
@@ -164,7 +163,7 @@ class TuiCarouselComponent {
|
|
|
164
163
|
return this.isMobile || this.draggable;
|
|
165
164
|
}
|
|
166
165
|
updateIndex(index) {
|
|
167
|
-
this.index =
|
|
166
|
+
this.index = tuiClamp(index, 0, this.items.length - 1);
|
|
168
167
|
this.indexChange.emit(this.index);
|
|
169
168
|
this.changeDetectorRef.markForCheck();
|
|
170
169
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-carousel.js","sources":["../../../projects/kit/components/carousel/carousel-scroll.directive.ts","../../../projects/kit/components/carousel/carousel.directive.ts","../../../projects/kit/components/carousel/carousel-autoscroll.directive.ts","../../../projects/kit/components/carousel/carousel.component.ts","../../../projects/kit/components/carousel/carousel.template.html","../../../projects/kit/components/carousel/carousel-buttons.directive.ts","../../../projects/kit/components/carousel/carousel.module.ts","../../../projects/kit/components/carousel/taiga-ui-kit-components-carousel.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {typedFromEvent} from '@taiga-ui/cdk';\nimport {filter, map, tap, throttleTime} from 'rxjs/operators';\n\n@Directive({\n selector: `[tuiCarouselScroll]`,\n})\nexport class TuiCarouselScrollDirective {\n @Output()\n readonly tuiCarouselScroll = typedFromEvent(\n this.elementRef.nativeElement,\n `wheel`,\n ).pipe(\n filter(({deltaX}) => Math.abs(deltaX) > 20),\n throttleTime(500),\n map(({deltaX}) => Math.sign(deltaX)),\n tap(() => {\n // So we always have space to scroll and overflow-behavior saves us from back nav\n this.elementRef.nativeElement.scrollLeft = 10;\n }),\n );\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n}\n","import {Directive, ElementRef, Inject, Input} from '@angular/core';\nimport {PAGE_VISIBILITY} from '@ng-web-apis/common';\nimport {typedFromEvent} from '@taiga-ui/cdk';\nimport {BehaviorSubject, combineLatest, EMPTY, interval, merge, Observable} from 'rxjs';\nimport {mapTo, switchMap} from 'rxjs/operators';\n\n@Directive({\n selector: `tui-carousel`,\n})\nexport class TuiCarouselDirective extends Observable<unknown> {\n private readonly duration$ = new BehaviorSubject(0);\n\n private readonly running$ = merge(\n typedFromEvent(this.elementRef.nativeElement, `mouseenter`).pipe(mapTo(false)),\n typedFromEvent(this.elementRef.nativeElement, `touchstart`).pipe(mapTo(false)),\n typedFromEvent(this.elementRef.nativeElement, `touchend`).pipe(mapTo(true)),\n typedFromEvent(this.elementRef.nativeElement, `mouseleave`).pipe(mapTo(true)),\n this.visible$,\n );\n\n private readonly output$ = combineLatest([this.duration$, this.running$]).pipe(\n switchMap(([duration, running]) =>\n duration && running ? interval(duration) : EMPTY,\n ),\n );\n\n @Input()\n set duration(duration: number) {\n this.duration$.next(duration);\n }\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(PAGE_VISIBILITY) private readonly visible$: Observable<boolean>,\n ) {\n super(subscriber => this.output$.subscribe(subscriber));\n }\n}\n","import {Directive, Inject} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {TuiCarouselDirective} from './carousel.directive';\n\n@Directive({\n selector: `[tuiCarouselAutoscroll]`,\n outputs: [`tuiCarouselAutoscroll`],\n})\nexport class TuiCarouselAutoscrollDirective {\n constructor(\n @Inject(TuiCarouselDirective) readonly tuiCarouselAutoscroll: Observable<unknown>,\n ) {}\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n QueryList,\n TemplateRef,\n} from '@angular/core';\nimport {INTERSECTION_ROOT} from '@ng-web-apis/intersection-observer';\nimport {\n clamp,\n EMPTY_QUERY,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiItemDirective,\n tuiPure,\n TuiSwipeDirection,\n} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector: `tui-carousel`,\n templateUrl: `carousel.template.html`,\n styleUrls: [`carousel.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: INTERSECTION_ROOT,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiCarouselComponent {\n private translate = 0;\n\n @Input()\n @HostBinding(`class._draggable`)\n @tuiDefaultProp()\n draggable = false;\n\n @Input()\n @tuiDefaultProp()\n itemsCount = 1;\n\n @Input()\n @tuiDefaultProp()\n index = 0;\n\n @Output()\n readonly indexChange = new EventEmitter<number>();\n\n @ContentChildren(TuiItemDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<Record<string, unknown>>> = EMPTY_QUERY;\n\n @HostBinding(`class._transitioned`)\n transitioned = true;\n\n constructor(\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n ) {}\n\n get transform(): string {\n const x = this.transitioned ? this.computedTranslate : this.translate;\n\n return `translateX(${100 * x}%)`;\n }\n\n @HostListener(`touchstart`, [`false`])\n @HostListener(`touchend`, [`true`])\n @HostListener(`mousedown`, [`false`])\n @HostListener(`document:mouseup.silent`, [`true`])\n onTransitioned(transitioned: boolean): void {\n this.transitioned = transitioned;\n\n if (!transitioned) {\n this.translate = this.computedTranslate;\n }\n }\n\n @tuiPure\n getStyle(itemsCount: number): Partial<CSSStyleDeclaration> {\n const percent = `${100 / itemsCount}%`;\n\n return {\n flexBasis: percent,\n minWidth: percent,\n maxWidth: percent,\n };\n }\n\n next(): void {\n this.updateIndex(this.index + 1);\n }\n\n prev(): void {\n this.updateIndex(this.index - 1);\n }\n\n isDisabled(index: number): boolean {\n return index < this.index || index > this.index + this.itemsCount;\n }\n\n onIntersection({intersectionRatio}: IntersectionObserverEntry, index: number): void {\n if (intersectionRatio && intersectionRatio !== 1 && !this.transitioned) {\n this.updateIndex(index - Math.floor(this.itemsCount / 2));\n }\n }\n\n onScroll(delta: number): void {\n if (!this.isMobile) {\n this.updateIndex(this.index + delta);\n }\n }\n\n onPan(x: number): void {\n if (!this.computedDraggable) {\n return;\n }\n\n const {clientWidth} = this.elementRef.nativeElement;\n const min = 1 - this.items.length / this.itemsCount;\n\n this.translate = clamp(x / clientWidth + this.translate, min, 0);\n }\n\n onSwipe(direction: TuiSwipeDirection): void {\n if (Math.round(this.translate) !== -this.index || !this.computedDraggable) {\n return;\n } else if (direction === `left`) {\n this.next();\n } else if (direction === `right`) {\n this.prev();\n }\n }\n\n onAutoscroll(): void {\n this.updateIndex(this.index === this.items.length - 1 ? 0 : this.index + 1);\n }\n\n private get computedTranslate(): number {\n return -this.index / this.itemsCount;\n }\n\n private get computedDraggable(): boolean {\n return this.isMobile || this.draggable;\n }\n\n private updateIndex(index: number): void {\n this.index = clamp(index, 0, this.items.length - 1);\n this.indexChange.emit(this.index);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div class=\"t-wrapper\">\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0,1\"\n waIntersectionRootMargin=\"100px 100000px 100px -51%\"\n class=\"t-items\"\n [style.transform]=\"transform\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n >\n <fieldset\n *ngFor=\"let item of items; let i = index\"\n class=\"t-item\"\n [disabled]=\"isDisabled(i)\"\n [ngStyle]=\"getStyle(itemsCount)\"\n (waIntersectionObservee)=\"onIntersection($event[0], i)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\"></ng-container>\n </fieldset>\n </div>\n </div>\n</div>\n","import {Directive} from '@angular/core';\nimport {TuiAppearance, tuiButtonOptionsProvider} from '@taiga-ui/core';\n\n@Directive({\n selector: `[tuiCarouselButtons]`,\n providers: [\n tuiButtonOptionsProvider({\n appearance: TuiAppearance.Secondary,\n shape: `rounded`,\n size: `m`,\n }),\n ],\n})\nexport class TuiCarouselButtonsDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {IntersectionObserverModule} from '@ng-web-apis/intersection-observer';\nimport {\n TuiItemDirective,\n TuiItemModule,\n TuiPanModule,\n TuiSwipeModule,\n} from '@taiga-ui/cdk';\n\nimport {TuiCarouselComponent} from './carousel.component';\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselAutoscrollDirective} from './carousel-autoscroll.directive';\nimport {TuiCarouselButtonsDirective} from './carousel-buttons.directive';\nimport {TuiCarouselScrollDirective} from './carousel-scroll.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n IntersectionObserverModule,\n TuiPanModule,\n TuiSwipeModule,\n TuiItemModule,\n ],\n declarations: [\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselButtonsDirective,\n TuiCarouselAutoscrollDirective,\n TuiCarouselScrollDirective,\n ],\n exports: [\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselButtonsDirective,\n TuiItemDirective,\n ],\n})\nexport class TuiCarouselModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.TuiCarouselScrollDirective","i5.TuiCarouselAutoscrollDirective"],"mappings":";;;;;;;;;;;;;;;MAOa,0BAA0B,CAAA;AAenC,IAAA,WAAA,CACyC,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAdnE,IAAiB,CAAA,iBAAA,GAAG,cAAc,CACvC,IAAI,CAAC,UAAU,CAAC,aAAa,EAC7B,CAAO,KAAA,CAAA,CACV,CAAC,IAAI,CACF,MAAM,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EAC3C,YAAY,CAAC,GAAG,CAAC,EACjB,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM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tB,oBAAoB;QACpB,oBAAoB;QACpB,2BAA2B;QAC3B,8BAA8B;AAC9B,QAAA,0BAA0B,aAX1B,YAAY;QACZ,0BAA0B;QAC1B,YAAY;QACZ,cAAc;AACd,QAAA,aAAa,aAUb,oBAAoB;QACpB,oBAAoB;QACpB,2BAA2B;QAC3B,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGX,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EArBjB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,0BAA0B;YAC1B,YAAY;YACZ,cAAc;YACd,aAAa;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAeQ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAtB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,0BAA0B;wBAC1B,YAAY;wBACZ,cAAc;wBACd,aAAa;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,oBAAoB;wBACpB,oBAAoB;wBACpB,2BAA2B;wBAC3B,8BAA8B;wBAC9B,0BAA0B;AAC7B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,oBAAoB;wBACpB,oBAAoB;wBACpB,2BAA2B;wBAC3B,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;ACrCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-carousel.js","sources":["../../../projects/kit/components/carousel/carousel-scroll.directive.ts","../../../projects/kit/components/carousel/carousel.directive.ts","../../../projects/kit/components/carousel/carousel-autoscroll.directive.ts","../../../projects/kit/components/carousel/carousel.component.ts","../../../projects/kit/components/carousel/carousel.template.html","../../../projects/kit/components/carousel/carousel-buttons.directive.ts","../../../projects/kit/components/carousel/carousel.module.ts","../../../projects/kit/components/carousel/taiga-ui-kit-components-carousel.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk';\nimport {filter, map, tap, throttleTime} from 'rxjs/operators';\n\n@Directive({\n selector: `[tuiCarouselScroll]`,\n})\nexport class TuiCarouselScrollDirective {\n @Output()\n readonly tuiCarouselScroll = tuiTypedFromEvent(\n this.elementRef.nativeElement,\n `wheel`,\n ).pipe(\n filter(({deltaX}) => Math.abs(deltaX) > 20),\n throttleTime(500),\n map(({deltaX}) => Math.sign(deltaX)),\n tap(() => {\n // So we always have space to scroll and overflow-behavior saves us from back nav\n this.elementRef.nativeElement.scrollLeft = 10;\n }),\n );\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n}\n","import {Directive, ElementRef, Inject, Input} from '@angular/core';\nimport {PAGE_VISIBILITY} from '@ng-web-apis/common';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk';\nimport {BehaviorSubject, combineLatest, EMPTY, interval, merge, Observable} from 'rxjs';\nimport {mapTo, switchMap} from 'rxjs/operators';\n\n@Directive({\n selector: `tui-carousel`,\n})\nexport class TuiCarouselDirective extends Observable<unknown> {\n private readonly duration$ = new BehaviorSubject(0);\n\n private readonly running$ = merge(\n tuiTypedFromEvent(this.elementRef.nativeElement, `mouseenter`).pipe(mapTo(false)),\n tuiTypedFromEvent(this.elementRef.nativeElement, `touchstart`).pipe(mapTo(false)),\n tuiTypedFromEvent(this.elementRef.nativeElement, `touchend`).pipe(mapTo(true)),\n tuiTypedFromEvent(this.elementRef.nativeElement, `mouseleave`).pipe(mapTo(true)),\n this.visible$,\n );\n\n private readonly output$ = combineLatest([this.duration$, this.running$]).pipe(\n switchMap(([duration, running]) =>\n duration && running ? interval(duration) : EMPTY,\n ),\n );\n\n @Input()\n set duration(duration: number) {\n this.duration$.next(duration);\n }\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(PAGE_VISIBILITY) private readonly visible$: Observable<boolean>,\n ) {\n super(subscriber => this.output$.subscribe(subscriber));\n }\n}\n","import {Directive, Inject} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {TuiCarouselDirective} from './carousel.directive';\n\n@Directive({\n selector: `[tuiCarouselAutoscroll]`,\n outputs: [`tuiCarouselAutoscroll`],\n})\nexport class TuiCarouselAutoscrollDirective {\n constructor(\n @Inject(TuiCarouselDirective) readonly tuiCarouselAutoscroll: Observable<unknown>,\n ) {}\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n QueryList,\n TemplateRef,\n} from '@angular/core';\nimport {INTERSECTION_ROOT} from '@ng-web-apis/intersection-observer';\nimport {\n EMPTY_QUERY,\n TUI_IS_MOBILE,\n tuiClamp,\n tuiDefaultProp,\n TuiItemDirective,\n tuiPure,\n TuiSwipeDirection,\n} from '@taiga-ui/cdk';\n\n@Component({\n selector: `tui-carousel`,\n templateUrl: `carousel.template.html`,\n styleUrls: [`carousel.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: INTERSECTION_ROOT,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiCarouselComponent {\n private translate = 0;\n\n @Input()\n @HostBinding(`class._draggable`)\n @tuiDefaultProp()\n draggable = false;\n\n @Input()\n @tuiDefaultProp()\n itemsCount = 1;\n\n @Input()\n @tuiDefaultProp()\n index = 0;\n\n @Output()\n readonly indexChange = new EventEmitter<number>();\n\n @ContentChildren(TuiItemDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<Record<string, unknown>>> = EMPTY_QUERY;\n\n @HostBinding(`class._transitioned`)\n transitioned = true;\n\n constructor(\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n ) {}\n\n get transform(): string {\n const x = this.transitioned ? this.computedTranslate : this.translate;\n\n return `translateX(${100 * x}%)`;\n }\n\n @HostListener(`touchstart`, [`false`])\n @HostListener(`touchend`, [`true`])\n @HostListener(`mousedown`, [`false`])\n @HostListener(`document:mouseup.silent`, [`true`])\n onTransitioned(transitioned: boolean): void {\n this.transitioned = transitioned;\n\n if (!transitioned) {\n this.translate = this.computedTranslate;\n }\n }\n\n @tuiPure\n getStyle(itemsCount: number): Partial<CSSStyleDeclaration> {\n const percent = `${100 / itemsCount}%`;\n\n return {\n flexBasis: percent,\n minWidth: percent,\n maxWidth: percent,\n };\n }\n\n next(): void {\n this.updateIndex(this.index + 1);\n }\n\n prev(): void {\n this.updateIndex(this.index - 1);\n }\n\n isDisabled(index: number): boolean {\n return index < this.index || index > this.index + this.itemsCount;\n }\n\n onIntersection({intersectionRatio}: IntersectionObserverEntry, index: number): void {\n if (intersectionRatio && intersectionRatio !== 1 && !this.transitioned) {\n this.updateIndex(index - Math.floor(this.itemsCount / 2));\n }\n }\n\n onScroll(delta: number): void {\n if (!this.isMobile) {\n this.updateIndex(this.index + delta);\n }\n }\n\n onPan(x: number): void {\n if (!this.computedDraggable) {\n return;\n }\n\n const {clientWidth} = this.elementRef.nativeElement;\n const min = 1 - this.items.length / this.itemsCount;\n\n this.translate = tuiClamp(x / clientWidth + this.translate, min, 0);\n }\n\n onSwipe(direction: TuiSwipeDirection): void {\n if (Math.round(this.translate) !== -this.index || !this.computedDraggable) {\n return;\n } else if (direction === `left`) {\n this.next();\n } else if (direction === `right`) {\n this.prev();\n }\n }\n\n onAutoscroll(): void {\n this.updateIndex(this.index === this.items.length - 1 ? 0 : this.index + 1);\n }\n\n private get computedTranslate(): number {\n return -this.index / this.itemsCount;\n }\n\n private get computedDraggable(): boolean {\n return this.isMobile || this.draggable;\n }\n\n private updateIndex(index: number): void {\n this.index = tuiClamp(index, 0, this.items.length - 1);\n this.indexChange.emit(this.index);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div\n class=\"t-scroller\"\n (tuiCarouselScroll)=\"onScroll($event)\"\n>\n <div class=\"t-wrapper\">\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"0,1\"\n waIntersectionRootMargin=\"100px 100000px 100px -51%\"\n class=\"t-items\"\n [style.transform]=\"transform\"\n (tuiPan)=\"onPan($event[0])\"\n (tuiSwipe)=\"onSwipe($event.direction)\"\n (tuiCarouselAutoscroll)=\"onAutoscroll()\"\n >\n <fieldset\n *ngFor=\"let item of items; let i = index\"\n class=\"t-item\"\n [disabled]=\"isDisabled(i)\"\n [ngStyle]=\"getStyle(itemsCount)\"\n (waIntersectionObservee)=\"onIntersection($event[0], i)\"\n >\n <ng-container [ngTemplateOutlet]=\"item\"></ng-container>\n </fieldset>\n </div>\n </div>\n</div>\n","import {Directive} from '@angular/core';\nimport {TuiAppearance, tuiButtonOptionsProvider} from '@taiga-ui/core';\n\n@Directive({\n selector: `[tuiCarouselButtons]`,\n providers: [\n tuiButtonOptionsProvider({\n appearance: TuiAppearance.Secondary,\n shape: `rounded`,\n size: `m`,\n }),\n ],\n})\nexport class TuiCarouselButtonsDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {IntersectionObserverModule} from '@ng-web-apis/intersection-observer';\nimport {\n TuiItemDirective,\n TuiItemModule,\n TuiPanModule,\n TuiSwipeModule,\n} from '@taiga-ui/cdk';\n\nimport {TuiCarouselComponent} from './carousel.component';\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselAutoscrollDirective} from './carousel-autoscroll.directive';\nimport {TuiCarouselButtonsDirective} from './carousel-buttons.directive';\nimport {TuiCarouselScrollDirective} from './carousel-scroll.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n IntersectionObserverModule,\n TuiPanModule,\n TuiSwipeModule,\n TuiItemModule,\n ],\n declarations: [\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselButtonsDirective,\n TuiCarouselAutoscrollDirective,\n TuiCarouselScrollDirective,\n ],\n exports: [\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselButtonsDirective,\n TuiItemDirective,\n ],\n})\nexport class TuiCarouselModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.TuiCarouselScrollDirective","i5.TuiCarouselAutoscrollDirective"],"mappings":";;;;;;;;;;;;;;;MAOa,0BAA0B,CAAA;AAenC,IAAA,WAAA,CACyC,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAdnE,IAAiB,CAAA,iBAAA,GAAG,iBAAiB,CAC1C,IAAI,CAAC,UAAU,CAAC,aAAa,EAC7B,CAAO,KAAA,CAAA,CACV,CAAC,IAAI,CACF,MAAM,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EAC3C,YAAY,CAAC,GAAG,CAAC,EACjB,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EACpC,GAAG,CAAC,MAAK;;YAEL,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,GAAG,EAAE,CAAC;SACjD,CAAC,CACL,CAAC;KAIE;;AAjBK,0BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,kBAgBvB,UAAU,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;4GAhBb,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA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Ac;YACd,aAAa;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAeQ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAtB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,0BAA0B;wBAC1B,YAAY;wBACZ,cAAc;wBACd,aAAa;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,oBAAoB;wBACpB,oBAAoB;wBACpB,2BAA2B;wBAC3B,8BAA8B;wBAC9B,0BAA0B;AAC7B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,oBAAoB;wBACpB,oBAAoB;wBACpB,2BAA2B;wBAC3B,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;ACrCD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef,
|
|
3
|
+
import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
6
|
-
import { AbstractTuiNullableControl, tuiIsNativeFocused,
|
|
6
|
+
import { AbstractTuiNullableControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, TuiHoveredModule, TuiPressedModule } from '@taiga-ui/cdk';
|
|
7
7
|
import * as i2 from '@taiga-ui/core';
|
|
8
8
|
import { TuiModeDirective, TuiWrapperModule } from '@taiga-ui/core';
|
|
9
9
|
import * as i1 from '@taiga-ui/kit/components/checkbox';
|
|
@@ -30,7 +30,8 @@ class TuiCheckboxBlockComponent extends AbstractTuiNullableControl {
|
|
|
30
30
|
return tuiIsNativeFocused(this.nativeFocusableElement);
|
|
31
31
|
}
|
|
32
32
|
get appearance() {
|
|
33
|
-
|
|
33
|
+
var _a;
|
|
34
|
+
if (!((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode)) {
|
|
34
35
|
return this.checked
|
|
35
36
|
? "whiteblock-active" /* WhiteblockActive */
|
|
36
37
|
: "whiteblock" /* Whiteblock */;
|
|
@@ -49,11 +50,9 @@ class TuiCheckboxBlockComponent extends AbstractTuiNullableControl {
|
|
|
49
50
|
}
|
|
50
51
|
TuiCheckboxBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCheckboxBlockComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TuiModeDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
51
52
|
TuiCheckboxBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiCheckboxBlockComponent, selector: "tui-checkbox-block", inputs: { contentAlign: "contentAlign", hideCheckbox: "hideCheckbox", size: "size" }, host: { properties: { "attr.data-tui-host-align": "this.contentAlign", "class._hidden_checkbox": "this.hideCheckbox", "attr.data-size": "this.size", "class._active": "this.checked" } }, providers: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
], viewQueries: [{ propertyName: "checkbox", first: true, predicate: TuiCheckboxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"content-wrapper\">\n <div class=\"content\">\n <tui-checkbox\n class=\"view\"\n [disabled]=\"computedDisabled || readOnly\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [focusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-checkbox>\n <div class=\"label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);display:inline-block;vertical-align:top;border-radius:var(--tui-radius-m)}:host[data-size=m],:host[data-size=l]{font:var(--tui-font-text-m)}:host._disabled,:host._readonly{pointer-events:none}.wrapper{position:relative;border-radius:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.content-wrapper{display:flex;flex-direction:column}:host[data-size=s] .content-wrapper{min-height:var(--tui-height-s)}:host[data-size=m] .content-wrapper{min-height:var(--tui-height-m)}:host[data-size=l] .content-wrapper{min-height:var(--tui-height-l)}.content{display:flex;align-items:center;min-height:inherit}:host[data-tui-host-align=right] .content{flex-direction:row-reverse}:host[data-size=s] .content{padding:0 1rem 0 .5rem}:host[data-size=s][data-tui-host-align=right] .content{padding:0 .5rem 0 1rem}:host[data-size=s]._hidden_checkbox .content{padding:0 1rem}:host[data-size=m] .content{padding:0 1rem 0 .75rem}:host[data-size=m][data-tui-host-align=right] .content{padding:0 .75rem 0 1rem}:host[data-size=m]._hidden_checkbox .content{padding:0 1.5rem}:host[data-size=l] .content{padding:0 1rem}:host[data-size=l]._hidden_checkbox .content{padding:0 2.25rem}.view{margin-top:.75rem;margin-right:.75rem;align-self:flex-start}:host[data-tui-host-align=right] .view{margin-left:.75rem;margin-right:0}:host[data-size=s] .view{margin-top:.5rem;margin-right:.5rem}:host[data-size=s][data-tui-host-align=right] .view{margin-left:.5rem}:host[data-size=m] .view{margin-top:.875rem}:host[data-size=l] .view{margin-top:1rem}:host._hidden_checkbox .view{position:absolute;height:1px;width:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0,0,0,0);-webkit-clip-path:inset(0);clip-path:inset(0)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}:host._hidden_checkbox .label{text-align:center}\n"], components: [{ type: i1.TuiCheckboxComponent, selector: "tui-checkbox", inputs: ["size"] }], directives: [{ type: i2.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { 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 });
|
|
53
|
+
tuiAsFocusableItemAccessor(TuiCheckboxBlockComponent),
|
|
54
|
+
tuiAsControl(TuiCheckboxBlockComponent),
|
|
55
|
+
], viewQueries: [{ propertyName: "checkbox", first: true, predicate: TuiCheckboxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"t-wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"t-content-wrapper\">\n <div class=\"t-content\">\n <tui-checkbox\n class=\"t-view\"\n [disabled]=\"computedDisabled || readOnly\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [focusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-checkbox>\n <div class=\"t-label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);display:inline-block;vertical-align:top;border-radius:var(--tui-radius-m)}:host[data-size=m],:host[data-size=l]{font:var(--tui-font-text-m)}:host._disabled,:host._readonly{pointer-events:none}.t-wrapper{position:relative;border-radius:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.t-content-wrapper{display:flex;flex-direction:column}:host[data-size=s] .t-content-wrapper{min-height:var(--tui-height-s)}:host[data-size=m] .t-content-wrapper{min-height:var(--tui-height-m)}:host[data-size=l] .t-content-wrapper{min-height:var(--tui-height-l)}.t-content{display:flex;align-items:center;min-height:inherit}:host[data-tui-host-align=right] .t-content{flex-direction:row-reverse}:host[data-size=s] .t-content{padding:0 1rem 0 .5rem}:host[data-size=s][data-tui-host-align=right] .t-content{padding:0 .5rem 0 1rem}:host[data-size=s]._hidden_checkbox .t-content{padding:0 1rem}:host[data-size=m] .t-content{padding:0 1rem 0 .75rem}:host[data-size=m][data-tui-host-align=right] .t-content{padding:0 .75rem 0 1rem}:host[data-size=m]._hidden_checkbox .t-content{padding:0 1.5rem}:host[data-size=l] .t-content{padding:0 1rem}:host[data-size=l]._hidden_checkbox .t-content{padding:0 2.25rem}.t-view{margin-top:.75rem;margin-right:.75rem;align-self:flex-start}:host[data-tui-host-align=right] .t-view{margin-left:.75rem;margin-right:0}:host[data-size=s] .t-view{margin-top:.5rem;margin-right:.5rem}:host[data-size=s][data-tui-host-align=right] .t-view{margin-left:.5rem}:host[data-size=m] .t-view{margin-top:.875rem}:host[data-size=l] .t-view{margin-top:1rem}:host._hidden_checkbox .t-view{position:absolute;height:1px;width:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0,0,0,0);-webkit-clip-path:inset(0);clip-path:inset(0)}.t-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}:host._hidden_checkbox .t-label{text-align:center}\n"], components: [{ type: i1.TuiCheckboxComponent, selector: "tui-checkbox", inputs: ["size"] }], directives: [{ type: i2.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { 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 });
|
|
57
56
|
__decorate([
|
|
58
57
|
tuiDefaultProp()
|
|
59
58
|
], TuiCheckboxBlockComponent.prototype, "contentAlign", void 0);
|
|
@@ -71,10 +70,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
71
70
|
styleUrls: [`./checkbox-block.style.less`],
|
|
72
71
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
73
72
|
providers: [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
useExisting: forwardRef(() => TuiCheckboxBlockComponent),
|
|
77
|
-
},
|
|
73
|
+
tuiAsFocusableItemAccessor(TuiCheckboxBlockComponent),
|
|
74
|
+
tuiAsControl(TuiCheckboxBlockComponent),
|
|
78
75
|
],
|
|
79
76
|
}]
|
|
80
77
|
}], ctorParameters: function () { return [{ type: i3.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-checkbox-block.js","sources":["../../../projects/kit/components/checkbox-block/checkbox-block.component.ts","../../../projects/kit/components/checkbox-block/checkbox-block.template.html","../../../projects/kit/components/checkbox-block/checkbox-block.module.ts","../../../projects/kit/components/checkbox-block/taiga-ui-kit-components-checkbox-block.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\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 AbstractTuiNullableControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiHorizontalDirection,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeS,\n} from '@taiga-ui/core';\nimport {TuiCheckboxComponent} from '@taiga-ui/kit/components/checkbox';\n\n@Component({\n selector: `tui-checkbox-block`,\n templateUrl: `./checkbox-block.template.html`,\n styleUrls: [`./checkbox-block.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiCheckboxBlockComponent),\n },\n ],\n})\nexport class TuiCheckboxBlockComponent\n extends AbstractTuiNullableControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiCheckboxComponent)\n private readonly checkbox?: TuiCheckboxComponent;\n\n @Input()\n @HostBinding(`attr.data-tui-host-align`)\n @tuiDefaultProp()\n contentAlign: TuiHorizontalDirection = `right`;\n\n @Input()\n @HostBinding(`class._hidden_checkbox`)\n @tuiDefaultProp()\n hideCheckbox = false;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = `l`;\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 ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.checkbox ? this.checkbox.nativeFocusableElement : null;\n }\n\n @HostBinding(`class._active`)\n get checked(): boolean {\n return this.value !== false && this.hideCheckbox;\n }\n\n get checkboxSize(): TuiSizeL {\n return this.size === `l` ? `l` : `m`;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n if (!this.modeDirective || !this.modeDirective.mode) {\n return this.checked\n ? TuiAppearance.WhiteblockActive\n : TuiAppearance.Whiteblock;\n }\n\n return this.checked ? TuiAppearance.Primary : TuiAppearance.Secondary;\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 onModelChange(value: boolean): void {\n this.updateValue(value);\n }\n}\n","<label class=\"wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"content-wrapper\">\n <div class=\"content\">\n <tui-checkbox\n class=\"view\"\n [disabled]=\"computedDisabled || readOnly\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [focusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-checkbox>\n <div class=\"label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n","import {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiHoveredModule, TuiPressedModule} from '@taiga-ui/cdk';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiCheckboxModule} from '@taiga-ui/kit/components/checkbox';\n\nimport {TuiCheckboxBlockComponent} from './checkbox-block.component';\n\n@NgModule({\n imports: [\n FormsModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiCheckboxModule,\n TuiWrapperModule,\n ],\n declarations: [TuiCheckboxBlockComponent],\n exports: [TuiCheckboxBlockComponent],\n})\nexport class TuiCheckboxBlockModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA0CM,MAAO,yBACT,SAAQ,0BAAmC,CAAA;AAqB3C,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAAA;AAEvD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFjB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAyB;QApB3D,IAAY,CAAA,YAAA,GAA2B,OAAO,CAAC;QAK/C,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;QAKrB,IAAI,CAAA,IAAA,GAAwB,GAAG,CAAC;KAa/B;AAED,IAAA,IAAI,sBAAsB,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;KACtE;AAED,IAAA,IACI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC;KACpD;AAED,IAAA,IAAI,YAAY,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,IAAI,KAAK,CAAG,CAAA,CAAA,GAAG,CAAG,CAAA,CAAA,GAAG,GAAG,CAAC;KACxC;AAED,IAAA,IAAI,OAAO,GAAA;AACP,QAAA,OAAO,kBAAkB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KAC1D;AAED,IAAA,IAAI,UAAU,GAAA;QACV,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;YACjD,OAAO,IAAI,CAAC,OAAO;kBACd,mBAAA;AACD,gDAA2B;AAClC,SAAA;QAED,OAAO,IAAI,CAAC,OAAO,GAAyB,SAAA,6CAA0B;KACzE;AAED,IAAA,SAAS,CAAC,OAAgB,EAAA;AACtB,QAAA,IAAI,CAAC,aAAa,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AAA,CAAA;AAE1B,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAVtB,OAAA,EAAA,CAAA;YACL,WAAW;YACX,gBAAgB;YAChB,gBAAgB;YAChB,iBAAiB;YACjB,gBAAgB;AACnB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,gBAAgB;wBAChB,gBAAgB;wBAChB,iBAAiB;wBACjB,gBAAgB;AACnB,qBAAA;oBACD,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-checkbox-block.js","sources":["../../../projects/kit/components/checkbox-block/checkbox-block.component.ts","../../../projects/kit/components/checkbox-block/checkbox-block.template.html","../../../projects/kit/components/checkbox-block/checkbox-block.module.ts","../../../projects/kit/components/checkbox-block/taiga-ui-kit-components-checkbox-block.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiHorizontalDirection,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeS,\n} from '@taiga-ui/core';\nimport {TuiCheckboxComponent} from '@taiga-ui/kit/components/checkbox';\n\n@Component({\n selector: `tui-checkbox-block`,\n templateUrl: `./checkbox-block.template.html`,\n styleUrls: [`./checkbox-block.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiCheckboxBlockComponent),\n tuiAsControl(TuiCheckboxBlockComponent),\n ],\n})\nexport class TuiCheckboxBlockComponent\n extends AbstractTuiNullableControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiCheckboxComponent)\n private readonly checkbox?: TuiCheckboxComponent;\n\n @Input()\n @HostBinding(`attr.data-tui-host-align`)\n @tuiDefaultProp()\n contentAlign: TuiHorizontalDirection = `right`;\n\n @Input()\n @HostBinding(`class._hidden_checkbox`)\n @tuiDefaultProp()\n hideCheckbox = false;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = `l`;\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 ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.checkbox ? this.checkbox.nativeFocusableElement : null;\n }\n\n @HostBinding(`class._active`)\n get checked(): boolean {\n return this.value !== false && this.hideCheckbox;\n }\n\n get checkboxSize(): TuiSizeL {\n return this.size === `l` ? `l` : `m`;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n if (!this.modeDirective?.mode) {\n return this.checked\n ? TuiAppearance.WhiteblockActive\n : TuiAppearance.Whiteblock;\n }\n\n return this.checked ? TuiAppearance.Primary : TuiAppearance.Secondary;\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 onModelChange(value: boolean): void {\n this.updateValue(value);\n }\n}\n","<label class=\"t-wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"t-content-wrapper\">\n <div class=\"t-content\">\n <tui-checkbox\n class=\"t-view\"\n [disabled]=\"computedDisabled || readOnly\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [focusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-checkbox>\n <div class=\"t-label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n","import {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiHoveredModule, TuiPressedModule} from '@taiga-ui/cdk';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiCheckboxModule} from '@taiga-ui/kit/components/checkbox';\n\nimport {TuiCheckboxBlockComponent} from './checkbox-block.component';\n\n@NgModule({\n imports: [\n FormsModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiCheckboxModule,\n TuiWrapperModule,\n ],\n declarations: [TuiCheckboxBlockComponent],\n exports: [TuiCheckboxBlockComponent],\n})\nexport class TuiCheckboxBlockModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAwCM,MAAO,yBACT,SAAQ,0BAAmC,CAAA;AAqB3C,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAAA;AAEvD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,C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SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,gBAAgB;wBAChB,gBAAgB;wBAChB,iBAAiB;wBACjB,gBAAgB;AACnB,qBAAA;oBACD,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef,
|
|
3
|
+
import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
6
|
-
import { AbstractTuiNullableControl, tuiIsNativeFocused,
|
|
6
|
+
import { AbstractTuiNullableControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
7
7
|
import * as i3 from '@taiga-ui/core';
|
|
8
8
|
import { TuiModeDirective } from '@taiga-ui/core';
|
|
9
9
|
import * as i1 from '@taiga-ui/kit/components/checkbox';
|
|
@@ -34,11 +34,9 @@ class TuiCheckboxLabeledComponent extends AbstractTuiNullableControl {
|
|
|
34
34
|
}
|
|
35
35
|
TuiCheckboxLabeledComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCheckboxLabeledComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TuiModeDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
36
36
|
TuiCheckboxLabeledComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: { size: "size" }, host: { properties: { "attr.data-size": "this.size", "attr.data-mode": "this.hostMode" } }, providers: [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
], viewQueries: [{ propertyName: "checkbox", first: true, predicate: TuiCheckboxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"wrapper\">\n <tui-checkbox\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"size\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n ></tui-checkbox>\n <div\n class=\"content\"\n [class.content_disabled]=\"computedDisabled\"\n >\n <ng-content></ng-content>\n </div>\n</label>\n", styles: [":host{position:relative;display:block;line-height:0}:host._disabled,:host._readonly{pointer-events:none}.wrapper{display:inline-flex;max-width:100%;cursor:pointer}:host._disabled .wrapper{cursor:default}:host[data-mode=onDark] .wrapper{color:var(--tui-text-01-night)}.content{font:var(--tui-font-text-s);line-height:1rem;word-wrap:break-word;min-width:0}.content_disabled{opacity:var(--tui-disabled-opacity)}:host[data-size=m] .content{margin-left:.5rem}:host[data-size=l] .content{font:var(--tui-font-text-m);margin-left:.75rem}\n"], components: [{ type: i1.TuiCheckboxComponent, selector: "tui-checkbox", inputs: ["size"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
37
|
+
tuiAsFocusableItemAccessor(TuiCheckboxLabeledComponent),
|
|
38
|
+
tuiAsControl(TuiCheckboxLabeledComponent),
|
|
39
|
+
], viewQueries: [{ propertyName: "checkbox", first: true, predicate: TuiCheckboxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"t-wrapper\">\n <tui-checkbox\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"size\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n ></tui-checkbox>\n <div\n class=\"t-content\"\n [class.t-content_disabled]=\"computedDisabled\"\n >\n <ng-content></ng-content>\n </div>\n</label>\n", styles: [":host{position:relative;display:block;line-height:0}:host._disabled,:host._readonly{pointer-events:none}.t-wrapper{display:inline-flex;max-width:100%;cursor:pointer}:host._disabled .t-wrapper{cursor:default}:host[data-mode=onDark] .t-wrapper{color:var(--tui-text-01-night)}.t-content{font:var(--tui-font-text-s);line-height:1rem;word-wrap:break-word;min-width:0}.t-content_disabled{opacity:var(--tui-disabled-opacity)}:host[data-size=m] .t-content{margin-left:.5rem}:host[data-size=l] .t-content{font:var(--tui-font-text-m);margin-left:.75rem}\n"], components: [{ type: i1.TuiCheckboxComponent, selector: "tui-checkbox", inputs: ["size"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
40
|
__decorate([
|
|
43
41
|
tuiDefaultProp()
|
|
44
42
|
], TuiCheckboxLabeledComponent.prototype, "size", void 0);
|
|
@@ -50,10 +48,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
50
48
|
styleUrls: [`./checkbox-labeled.style.less`],
|
|
51
49
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
52
50
|
providers: [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
useExisting: forwardRef(() => TuiCheckboxLabeledComponent),
|
|
56
|
-
},
|
|
51
|
+
tuiAsFocusableItemAccessor(TuiCheckboxLabeledComponent),
|
|
52
|
+
tuiAsControl(TuiCheckboxLabeledComponent),
|
|
57
53
|
],
|
|
58
54
|
}]
|
|
59
55
|
}], ctorParameters: function () { return [{ type: i2.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-checkbox-labeled.js","sources":["../../../projects/kit/components/checkbox-labeled/checkbox-labeled.component.ts","../../../projects/kit/components/checkbox-labeled/checkbox-labeled.template.html","../../../projects/kit/components/checkbox-labeled/checkbox-labeled.module.ts","../../../projects/kit/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-checkbox-labeled.js","sources":["../../../projects/kit/components/checkbox-labeled/checkbox-labeled.component.ts","../../../projects/kit/components/checkbox-labeled/checkbox-labeled.template.html","../../../projects/kit/components/checkbox-labeled/checkbox-labeled.module.ts","../../../projects/kit/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TuiBrightness, TuiModeDirective, TuiSizeL} from '@taiga-ui/core';\nimport {TuiCheckboxComponent} from '@taiga-ui/kit/components/checkbox';\n\n@Component({\n selector: `tui-checkbox-labeled`,\n templateUrl: `./checkbox-labeled.template.html`,\n styleUrls: [`./checkbox-labeled.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiCheckboxLabeledComponent),\n tuiAsControl(TuiCheckboxLabeledComponent),\n ],\n})\nexport class TuiCheckboxLabeledComponent\n extends AbstractTuiNullableControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiCheckboxComponent)\n private readonly checkbox?: TuiCheckboxComponent;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\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 ) {\n super(control, changeDetectorRef);\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.checkbox ? this.checkbox.nativeFocusableElement : null;\n }\n\n @HostBinding(`attr.data-mode`)\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onModelChange(value: boolean): void {\n this.updateValue(value);\n }\n}\n","<label class=\"t-wrapper\">\n <tui-checkbox\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"size\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n ></tui-checkbox>\n <div\n class=\"t-content\"\n [class.t-content_disabled]=\"computedDisabled\"\n >\n <ng-content></ng-content>\n </div>\n</label>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiCheckboxModule} from '@taiga-ui/kit/components/checkbox';\n\nimport {TuiCheckboxLabeledComponent} from './checkbox-labeled.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, TuiCheckboxModule],\n declarations: [TuiCheckboxLabeledComponent],\n exports: [TuiCheckboxLabeledComponent],\n})\nexport class TuiCheckboxLabeledModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCM,MAAO,2BACT,SAAQ,0BAAmC,CAAA;AAW3C,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAAA;AAEvD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFjB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAyB;QAV3D,IAAI,CAAA,IAAA,GAAa,GAAG,CAAC;KAapB;AAED,IAAA,IAAI,OAAO,GAAA;AACP,QAAA,OAAO,kBAAkB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KAC1D;AAED,IAAA,IAAI,sBAAsB,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;KACtE;AAED,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC;KAC9D;AAED,IAAA,SAAS,CAAC,OAAgB,EAAA;AACtB,QAAA,IAAI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,EAAA,CAAA;sBADX,WAAW;uBAAC,CAAgB,cAAA,CAAA,CAAA;;;MEvDpB,wBAAwB,CAAA;;sHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;uHAAxB,wBAAwB,EAAA,YAAA,EAAA,CAHlB,2BAA2B,CADhC,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAE5C,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAE5B,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAJxB,CAAC,YAAY,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAI9C,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,iBAAiB,CAAC;oBACvD,YAAY,EAAE,CAAC,2BAA2B,CAAC;oBAC3C,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACzC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef,
|
|
3
|
+
import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { NgControl } from '@angular/forms';
|
|
6
6
|
import * as i2 from '@taiga-ui/cdk';
|
|
7
|
-
import { AbstractTuiNullableControl, tuiIsNativeFocused,
|
|
7
|
+
import { AbstractTuiNullableControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, TuiCheckedModule, TuiFocusableModule, TuiFocusedModule, TuiFocusVisibleModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1 from '@taiga-ui/core';
|
|
9
9
|
import { TUI_CHECKBOX_OPTIONS, TuiPrimitiveCheckboxModule } from '@taiga-ui/core';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
@@ -38,11 +38,9 @@ class TuiCheckboxComponent extends AbstractTuiNullableControl {
|
|
|
38
38
|
}
|
|
39
39
|
TuiCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCheckboxComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: TUI_CHECKBOX_OPTIONS }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
40
40
|
TuiCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiCheckboxComponent, selector: "tui-checkbox", inputs: { size: "size" }, host: { properties: { "attr.data-size": "this.size" } }, providers: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-primitive-checkbox\n [size]=\"size\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocusVisible\"\n [hovered]=\"pseudoHover\"\n [pressed]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [value]=\"value\"\n>\n <input\n #focusableElement\n type=\"checkbox\"\n automation-id=\"tui-checkbox__native\"\n class=\"native\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [tuiChecked]=\"value\"\n [tuiFocusable]=\"computedFocusable\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</tui-primitive-checkbox>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0}:host[data-size=m]{width:1rem;height:1rem}:host[data-size=l]{width:1.5rem;height:1.5rem}:host._disabled,:host._readonly{pointer-events:none}.native{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;width:100%;height:100%;opacity:0;cursor:pointer}.native:-webkit-autofill,.native:-webkit-autofill:hover,.native:-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}\n"], components: [{ type: i1.TuiPrimitiveCheckboxComponent, selector: "tui-primitive-checkbox", inputs: ["size", "disabled", "focused", "hovered", "pressed", "invalid", "value"] }], directives: [{ type: i2.TuiCheckedDirective, selector: "input[tuiChecked], input[tuiCheckedChange]", inputs: ["tuiChecked"], outputs: ["tuiCheckedChange"] }, { type: i2.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i2.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i2.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
41
|
+
tuiAsFocusableItemAccessor(TuiCheckboxComponent),
|
|
42
|
+
tuiAsControl(TuiCheckboxComponent),
|
|
43
|
+
], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-primitive-checkbox\n [size]=\"size\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocusVisible\"\n [hovered]=\"pseudoHover\"\n [pressed]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [value]=\"value\"\n>\n <input\n #focusableElement\n type=\"checkbox\"\n automation-id=\"tui-checkbox__native\"\n class=\"t-native\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [tuiChecked]=\"value\"\n [tuiFocusable]=\"computedFocusable\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</tui-primitive-checkbox>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0}:host[data-size=m]{width:1rem;height:1rem}:host[data-size=l]{width:1.5rem;height:1.5rem}:host._disabled,:host._readonly{pointer-events:none}.t-native{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;width:100%;height:100%;opacity:0;cursor:pointer}.t-native:-webkit-autofill,.t-native:-webkit-autofill:hover,.t-native:-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}\n"], components: [{ type: i1.TuiPrimitiveCheckboxComponent, selector: "tui-primitive-checkbox", inputs: ["size", "disabled", "focused", "hovered", "pressed", "invalid", "value"] }], directives: [{ type: i2.TuiCheckedDirective, selector: "input[tuiChecked], input[tuiCheckedChange]", inputs: ["tuiChecked"], outputs: ["tuiCheckedChange"] }, { type: i2.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i2.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i2.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
44
|
__decorate([
|
|
47
45
|
tuiDefaultProp()
|
|
48
46
|
], TuiCheckboxComponent.prototype, "size", void 0);
|
|
@@ -54,10 +52,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
54
52
|
styleUrls: [`./checkbox.style.less`],
|
|
55
53
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
56
54
|
providers: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
useExisting: forwardRef(() => TuiCheckboxComponent),
|
|
60
|
-
},
|
|
55
|
+
tuiAsFocusableItemAccessor(TuiCheckboxComponent),
|
|
56
|
+
tuiAsControl(TuiCheckboxComponent),
|
|
61
57
|
],
|
|
62
58
|
}]
|
|
63
59
|
}], ctorParameters: function () { return [{ type: i3.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-checkbox.js","sources":["../../../projects/kit/components/checkbox/checkbox.component.ts","../../../projects/kit/components/checkbox/checkbox.template.html","../../../projects/kit/components/checkbox/checkbox.module.ts","../../../projects/kit/components/checkbox/taiga-ui-kit-components-checkbox.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-checkbox.js","sources":["../../../projects/kit/components/checkbox/checkbox.component.ts","../../../projects/kit/components/checkbox/checkbox.template.html","../../../projects/kit/components/checkbox/checkbox.module.ts","../../../projects/kit/components/checkbox/taiga-ui-kit-components-checkbox.ts"],"sourcesContent":["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 AbstractTuiNullableControl,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {TUI_CHECKBOX_OPTIONS, TuiCheckboxOptions, TuiSizeL} from '@taiga-ui/core';\n\n@Component({\n selector: `tui-checkbox`,\n templateUrl: `./checkbox.template.html`,\n styleUrls: [`./checkbox.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiCheckboxComponent),\n tuiAsControl(TuiCheckboxComponent),\n ],\n})\nexport class TuiCheckboxComponent\n extends AbstractTuiNullableControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`focusableElement`)\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\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(TUI_CHECKBOX_OPTIONS)\n private readonly options: TuiCheckboxOptions,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.focusableElement || this.computedDisabled\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get computedFocusable(): boolean {\n return this.interactive && this.focusable;\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","<tui-primitive-checkbox\n [size]=\"size\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocusVisible\"\n [hovered]=\"pseudoHover\"\n [pressed]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [value]=\"value\"\n>\n <input\n #focusableElement\n type=\"checkbox\"\n automation-id=\"tui-checkbox__native\"\n class=\"t-native\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [tuiChecked]=\"value\"\n [tuiFocusable]=\"computedFocusable\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</tui-primitive-checkbox>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n} from '@taiga-ui/cdk';\nimport {TuiPrimitiveCheckboxModule} from '@taiga-ui/core';\n\nimport {TuiCheckboxComponent} from './checkbox.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPrimitiveCheckboxModule,\n ],\n declarations: [TuiCheckboxComponent],\n exports: [TuiCheckboxComponent],\n})\nexport class TuiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAiCM,MAAO,oBACT,SAAQ,0BAAmC,CAAA;AAW3C,IAAA,WAAA,CAII,OAAyB,EAER,OAA2B,EACjB,iBAAoC,EAAA;AAE/D,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAHjB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAoB;AARhD,QAAA,IAAA,CAAA,IAAI,GAAa,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;KAYlC;AAED,IAAA,IAAI,sBAAsB,GAAA;AACtB,QAAA,OAAO,CAAC,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;AAClD,cAAE,IAAI;AACN,cAAE,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;KAC7C;AAED,IAAA,IAAI,OAAO,GAAA;AACP,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