@taiga-ui/kit 2.26.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/abstract/input-slider.d.ts +5 -5
- package/abstract/slider/slider.d.ts +5 -5
- package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +10 -10
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js +23 -7
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +189 -243
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +18 -19
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.js +20 -8
- package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +8 -8
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +26 -18
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +40 -22
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +26 -18
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +7 -6
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +4 -3
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +4 -3
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +20 -34
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +30 -28
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +6 -6
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +31 -31
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +16 -16
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.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-marker-icon.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +18 -18
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +13 -21
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-group.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +11 -14
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +18 -18
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +22 -22
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +5 -5
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +8 -0
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js +2 -4
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +7 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +2 -2
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +42 -11
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js.map +1 -1
- package/components/accordion/accordion-item/accordion-item-eager-content.directive.d.ts +2 -0
- package/components/accordion/accordion-item/accordion-item.component.d.ts +4 -2
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/action/action.component.d.ts +1 -1
- package/components/action/taiga-ui-kit-components-action.metadata.json +1 -1
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +1 -1
- package/components/calendar-range/taiga-ui-kit-components-calendar-range.metadata.json +1 -1
- package/components/carousel/carousel-autoscroll.directive.d.ts +5 -0
- package/components/carousel/carousel-scroll.directive.d.ts +6 -0
- package/components/carousel/carousel.component.d.ts +22 -11
- package/components/carousel/carousel.directive.d.ts +3 -10
- package/components/carousel/index.d.ts +2 -2
- package/components/carousel/taiga-ui-kit-components-carousel.metadata.json +1 -1
- package/components/checkbox/checkbox.component.d.ts +1 -1
- package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
- package/components/checkbox-block/checkbox-block.component.d.ts +1 -1
- package/components/checkbox-block/taiga-ui-kit-components-checkbox-block.metadata.json +1 -1
- package/components/checkbox-labeled/checkbox-labeled.component.d.ts +1 -1
- package/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.metadata.json +1 -1
- package/components/combo-box/combo-box.component.d.ts +5 -5
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/data-list-wrapper/data-list-wrapper.component.d.ts +2 -2
- package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
- package/components/field-error/field-error.component.d.ts +3 -2
- package/components/field-error/taiga-ui-kit-components-field-error.metadata.json +1 -1
- package/components/filter/filter.component.d.ts +2 -2
- package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
- package/components/input/input.component.d.ts +3 -3
- package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
- package/components/input-copy/input-copy.component.d.ts +2 -2
- package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
- package/components/input-count/input-count.component.d.ts +2 -2
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/input-date.component.d.ts +6 -5
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/input-date-range.component.d.ts +5 -4
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/input-date-time.component.d.ts +6 -5
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-file/input-file.component.d.ts +1 -1
- package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
- package/components/input-inline/input-inline.component.d.ts +1 -1
- package/components/input-inline/taiga-ui-kit-components-input-inline.metadata.json +1 -1
- package/components/input-month/input-month.component.d.ts +1 -1
- package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +1 -1
- package/components/input-month-range/input-month-range.component.d.ts +1 -1
- package/components/input-month-range/taiga-ui-kit-components-input-month-range.metadata.json +1 -1
- package/components/input-number/input-number.component.d.ts +3 -4
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/input-password.component.d.ts +2 -2
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/input-phone.component.d.ts +3 -3
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-phone-international/country-iso-code.d.ts +1 -1
- package/components/input-phone-international/input-phone-international.component.d.ts +6 -6
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/components/input-slider/input-slider.component.d.ts +1 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/input-tag.component.d.ts +12 -12
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/input-time.component.d.ts +4 -4
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/line-clamp/line-clamp.component.d.ts +4 -4
- package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
- package/components/marker-icon/marker-icon.component.d.ts +1 -1
- package/components/marker-icon/taiga-ui-kit-components-marker-icon.metadata.json +1 -1
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
- package/components/multi-select/multi-select.component.d.ts +7 -7
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/pagination/pagination.component.d.ts +1 -1
- package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
- package/components/pdf-viewer/pdf-viewer.component.d.ts +1 -4
- package/components/pdf-viewer/pdf-viewer.service.d.ts +7 -2
- package/components/pdf-viewer/taiga-ui-kit-components-pdf-viewer.metadata.json +1 -1
- package/components/progress/progress-circle/progress-circle.component.d.ts +1 -1
- package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
- package/components/radio/radio.component.d.ts +1 -1
- package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
- package/components/radio-block/radio-block.component.d.ts +1 -1
- package/components/radio-block/taiga-ui-kit-components-radio-block.metadata.json +1 -1
- package/components/radio-group/radio-group.component.d.ts +1 -1
- package/components/radio-group/taiga-ui-kit-components-radio-group.metadata.json +1 -1
- package/components/radio-labeled/radio-labeled.component.d.ts +1 -1
- package/components/radio-labeled/taiga-ui-kit-components-radio-labeled.metadata.json +1 -1
- package/components/radio-list/radio-list.component.d.ts +3 -3
- package/components/radio-list/taiga-ui-kit-components-radio-list.metadata.json +1 -1
- package/components/select/select.component.d.ts +3 -3
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/stepper/stepper.component.d.ts +3 -3
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/tabs/tabs.component.d.ts +2 -2
- package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -2
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tabs/underline/underline.component.d.ts +2 -2
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/text-area/text-area.component.d.ts +1 -1
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/components/toggle/toggle.component.d.ts +1 -1
- package/components/tree/components/tree/tree.component.d.ts +1 -1
- package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
- package/components/tree/directives/tree-item-controller.directive.d.ts +1 -1
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -1
- package/constants/masks.d.ts +8 -0
- package/constants/taiga-ui-kit-constants.metadata.json +1 -1
- package/directives/dropdown-context/dropdown-context.directive.d.ts +1 -1
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.metadata.json +1 -1
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +3 -3
- package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.metadata.json +1 -1
- package/directives/highlight/highlight.directive.d.ts +2 -2
- package/directives/highlight/taiga-ui-kit-directives-highlight.metadata.json +1 -1
- package/directives/lazy-loading/lazy-loading.directive.d.ts +1 -1
- package/directives/lazy-loading/lazy-loading.service.d.ts +1 -1
- package/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.metadata.json +1 -1
- package/directives/present/present.directive.d.ts +1 -1
- package/directives/present/taiga-ui-kit-directives-present.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +3 -3
- package/esm2015/abstract/slider/slider.js +9 -9
- package/esm2015/components/accordion/accordion-item/accordion-item-content.directive.js +2 -3
- package/esm2015/components/accordion/accordion-item/accordion-item-eager-content.directive.js +11 -0
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +10 -6
- package/esm2015/components/accordion/accordion.module.js +4 -1
- package/esm2015/components/accordion/index.js +2 -1
- package/esm2015/components/action/action.component.js +4 -4
- package/esm2015/components/calendar-month/calendar-month.component.js +6 -6
- package/esm2015/components/calendar-range/calendar-range.component.js +1 -1
- package/esm2015/components/carousel/carousel-autoscroll.directive.js +21 -0
- package/esm2015/components/carousel/carousel-scroll.directive.js +26 -0
- package/esm2015/components/carousel/carousel.component.js +90 -33
- package/esm2015/components/carousel/carousel.directive.js +10 -40
- package/esm2015/components/carousel/carousel.module.js +13 -9
- package/esm2015/components/carousel/index.js +3 -3
- package/esm2015/components/checkbox/checkbox.component.js +4 -4
- package/esm2015/components/checkbox-block/checkbox-block.component.js +4 -4
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +4 -4
- package/esm2015/components/combo-box/combo-box.component.js +19 -20
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +8 -8
- package/esm2015/components/field-error/field-error.component.js +15 -6
- package/esm2015/components/filter/filter.component.js +9 -9
- package/esm2015/components/input/input.component.js +8 -8
- package/esm2015/components/input-copy/input-copy.component.js +5 -5
- package/esm2015/components/input-count/input-count.component.js +4 -4
- package/esm2015/components/input-date/input-date.component.js +30 -22
- package/esm2015/components/input-date-range/input-date-range.component.js +30 -22
- package/esm2015/components/input-date-time/input-date-time.component.js +45 -25
- package/esm2015/components/input-file/input-file.component.js +2 -2
- package/esm2015/components/input-inline/input-inline.component.js +8 -7
- package/esm2015/components/input-month/input-month.component.js +5 -4
- package/esm2015/components/input-month-range/input-month-range.component.js +5 -4
- package/esm2015/components/input-number/input-number.component.js +21 -31
- package/esm2015/components/input-password/input-password.component.js +4 -4
- package/esm2015/components/input-phone/input-phone.component.js +7 -7
- package/esm2015/components/input-phone-international/const/countries.js +8 -6
- package/esm2015/components/input-phone-international/country-iso-code.js +2 -2
- package/esm2015/components/input-phone-international/input-phone-international.component.js +20 -20
- package/esm2015/components/input-slider/input-slider.component.js +4 -4
- package/esm2015/components/input-tag/input-tag.component.js +32 -32
- package/esm2015/components/input-time/input-time.component.js +17 -17
- package/esm2015/components/line-clamp/line-clamp.component.js +8 -8
- package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +5 -5
- package/esm2015/components/multi-select/multi-select.component.js +15 -15
- package/esm2015/components/pagination/pagination.component.js +5 -5
- package/esm2015/components/pdf-viewer/pdf-viewer.component.js +6 -20
- package/esm2015/components/pdf-viewer/pdf-viewer.service.js +4 -1
- package/esm2015/components/progress/pipes/abstract-color-segments.js +1 -1
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +4 -4
- package/esm2015/components/radio/radio.component.js +4 -4
- package/esm2015/components/radio-block/radio-block.component.js +4 -4
- package/esm2015/components/radio-group/radio-group.component.js +1 -1
- package/esm2015/components/radio-labeled/radio-labeled.component.js +4 -4
- package/esm2015/components/radio-list/radio-list.component.js +8 -8
- package/esm2015/components/select/select.component.js +12 -15
- package/esm2015/components/stepper/stepper.component.js +18 -18
- package/esm2015/components/tabs/tabs/tabs.component.js +16 -16
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +5 -5
- package/esm2015/components/tabs/underline/underline.component.js +3 -3
- package/esm2015/components/text-area/text-area.component.js +5 -5
- package/esm2015/components/toggle/toggle.component.js +4 -4
- package/esm2015/components/tree/components/tree/tree.component.js +4 -4
- package/esm2015/components/tree/components/tree-item/tree-item.component.js +2 -2
- package/esm2015/components/tree/directives/tree-item-controller.directive.js +2 -2
- package/esm2015/constants/masks.js +9 -1
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +3 -5
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +2 -2
- package/esm2015/directives/highlight/highlight.directive.js +3 -3
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +4 -2
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +1 -1
- package/esm2015/directives/present/present.directive.js +1 -1
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm2015/pipes/stringify/stringify.pipe.js +1 -1
- package/esm2015/tokens/validation-errors.js +1 -1
- package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +6 -4
- package/esm2015/utils/mask/create-auto-corrected-date-range-pipe.js +9 -6
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +5 -5
- package/esm2015/utils/mask/create-date-mask.js +16 -0
- package/esm2015/utils/mask/create-date-range-mask.js +14 -0
- package/esm2015/utils/mask/index.js +3 -1
- package/esm5/abstract/input-slider.js +3 -3
- package/esm5/abstract/slider/slider.js +9 -9
- package/esm5/components/accordion/accordion-item/accordion-item-content.directive.js +2 -3
- package/esm5/components/accordion/accordion-item/accordion-item-eager-content.directive.js +14 -0
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +10 -6
- package/esm5/components/accordion/accordion.module.js +4 -1
- package/esm5/components/accordion/index.js +2 -1
- package/esm5/components/action/action.component.js +4 -4
- package/esm5/components/calendar-month/calendar-month.component.js +8 -8
- package/esm5/components/calendar-range/calendar-range.component.js +1 -1
- package/esm5/components/carousel/carousel-autoscroll.directive.js +22 -0
- package/esm5/components/carousel/carousel-scroll.directive.js +34 -0
- package/esm5/components/carousel/carousel.component.js +102 -34
- package/esm5/components/carousel/carousel.directive.js +13 -50
- package/esm5/components/carousel/carousel.module.js +13 -9
- package/esm5/components/carousel/index.js +3 -3
- package/esm5/components/checkbox/checkbox.component.js +4 -4
- package/esm5/components/checkbox-block/checkbox-block.component.js +4 -4
- package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +4 -4
- package/esm5/components/combo-box/combo-box.component.js +19 -20
- package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +8 -8
- package/esm5/components/field-error/field-error.component.js +19 -6
- package/esm5/components/filter/filter.component.js +9 -9
- package/esm5/components/input/input.component.js +8 -8
- package/esm5/components/input-copy/input-copy.component.js +5 -5
- package/esm5/components/input-count/input-count.component.js +4 -4
- package/esm5/components/input-date/input-date.component.js +30 -22
- package/esm5/components/input-date-range/input-date-range.component.js +30 -22
- package/esm5/components/input-date-time/input-date-time.component.js +44 -26
- package/esm5/components/input-file/input-file.component.js +2 -2
- package/esm5/components/input-inline/input-inline.component.js +8 -7
- package/esm5/components/input-month/input-month.component.js +5 -4
- package/esm5/components/input-month-range/input-month-range.component.js +5 -4
- package/esm5/components/input-number/input-number.component.js +21 -35
- package/esm5/components/input-password/input-password.component.js +4 -4
- package/esm5/components/input-phone/input-phone.component.js +7 -7
- package/esm5/components/input-phone-international/const/countries.js +8 -6
- package/esm5/components/input-phone-international/country-iso-code.js +2 -2
- package/esm5/components/input-phone-international/input-phone-international.component.js +23 -23
- package/esm5/components/input-slider/input-slider.component.js +4 -4
- package/esm5/components/input-tag/input-tag.component.js +32 -32
- package/esm5/components/input-time/input-time.component.js +17 -17
- package/esm5/components/line-clamp/line-clamp.component.js +8 -8
- package/esm5/components/marker-icon/marker-icon.component.js +2 -2
- package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +5 -5
- package/esm5/components/multi-select/multi-select.component.js +15 -15
- package/esm5/components/pagination/pagination.component.js +5 -5
- package/esm5/components/pdf-viewer/pdf-viewer.component.js +6 -20
- package/esm5/components/pdf-viewer/pdf-viewer.service.js +5 -1
- package/esm5/components/progress/pipes/abstract-color-segments.js +1 -1
- package/esm5/components/progress/progress-circle/progress-circle.component.js +4 -4
- package/esm5/components/radio/radio.component.js +4 -4
- package/esm5/components/radio-block/radio-block.component.js +4 -4
- package/esm5/components/radio-group/radio-group.component.js +1 -1
- package/esm5/components/radio-labeled/radio-labeled.component.js +4 -4
- package/esm5/components/radio-list/radio-list.component.js +8 -8
- package/esm5/components/select/select.component.js +12 -15
- package/esm5/components/stepper/stepper.component.js +19 -19
- package/esm5/components/tabs/tabs/tabs.component.js +17 -17
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +5 -5
- package/esm5/components/tabs/underline/underline.component.js +3 -3
- package/esm5/components/text-area/text-area.component.js +5 -5
- package/esm5/components/toggle/toggle.component.js +4 -4
- package/esm5/components/tree/components/tree/tree.component.js +4 -4
- package/esm5/components/tree/components/tree-item/tree-item.component.js +2 -2
- package/esm5/components/tree/directives/tree-item-controller.directive.js +2 -2
- package/esm5/constants/masks.js +9 -1
- package/esm5/directives/dropdown-context/dropdown-context.directive.js +3 -5
- package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +2 -2
- package/esm5/directives/highlight/highlight.directive.js +3 -3
- package/esm5/directives/lazy-loading/lazy-loading.directive.js +8 -2
- package/esm5/directives/lazy-loading/lazy-loading.service.js +1 -1
- package/esm5/directives/present/present.directive.js +1 -1
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +3 -3
- package/esm5/pipes/stringify/stringify.pipe.js +1 -1
- package/esm5/tokens/validation-errors.js +1 -1
- package/esm5/utils/mask/create-auto-corrected-date-pipe.js +6 -4
- package/esm5/utils/mask/create-auto-corrected-date-range-pipe.js +9 -6
- package/esm5/utils/mask/create-auto-corrected-date-time-pipe.js +5 -5
- package/esm5/utils/mask/create-date-mask.js +17 -0
- package/esm5/utils/mask/create-date-range-mask.js +13 -0
- package/esm5/utils/mask/index.js +3 -1
- package/fesm2015/taiga-ui-kit-abstract.js +10 -10
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js +21 -9
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +4 -4
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +5 -5
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +158 -214
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +4 -4
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +4 -4
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +4 -4
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +20 -21
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +9 -9
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-field-error.js +14 -5
- package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +9 -9
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +5 -5
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +30 -22
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +45 -25
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +30 -22
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +8 -7
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +5 -4
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +5 -4
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +21 -31
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +3 -3
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +28 -26
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +8 -8
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +34 -34
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +17 -17
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +9 -9
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +8 -8
- 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.js +20 -20
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +6 -6
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +9 -19
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +3 -3
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +4 -4
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-group.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +4 -4
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +9 -9
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +4 -4
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +13 -16
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +18 -18
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +22 -22
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +5 -5
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +4 -4
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +5 -5
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +8 -0
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +2 -4
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js +2 -2
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +44 -13
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +10 -10
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +24 -9
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-action.js +4 -4
- package/fesm5/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +7 -7
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js +190 -245
- package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-block.js +4 -4
- package/fesm5/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js +4 -4
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js +4 -4
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +20 -21
- package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +9 -9
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-field-error.js +18 -5
- package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js +9 -9
- package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +5 -5
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +30 -22
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +44 -26
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +30 -22
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +8 -7
- package/fesm5/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +5 -4
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +5 -4
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +21 -35
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +3 -3
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +31 -29
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +8 -8
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +34 -34
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +17 -17
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js +9 -9
- package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +8 -8
- package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-marker-icon.js +1 -1
- package/fesm5/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +20 -20
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pagination.js +6 -6
- package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js +10 -19
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +3 -3
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js +4 -4
- package/fesm5/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-group.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js +4 -4
- package/fesm5/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-list.js +9 -9
- package/fesm5/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js +4 -4
- package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +13 -16
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +19 -19
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +23 -23
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +5 -5
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +4 -4
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +5 -5
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm5/taiga-ui-kit-constants.js +8 -0
- package/fesm5/taiga-ui-kit-constants.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js +2 -4
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-highlight.js +2 -2
- package/fesm5/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js +7 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js +2 -2
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-mask.js +42 -13
- package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
- package/internal/primitive-calendar-range/primitive-calendar-range.component.d.ts +1 -1
- package/internal/primitive-calendar-range/taiga-ui-kit-internal-primitive-calendar-range.metadata.json +1 -1
- package/package.json +6 -6
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/tokens/validation-errors.d.ts +2 -1
- package/utils/mask/create-auto-corrected-date-pipe.d.ts +7 -3
- package/utils/mask/create-auto-corrected-date-range-pipe.d.ts +7 -2
- package/utils/mask/create-auto-corrected-date-time-pipe.d.ts +8 -3
- package/utils/mask/create-date-mask.d.ts +3 -0
- package/utils/mask/create-date-range-mask.d.ts +3 -0
- package/utils/mask/index.d.ts +2 -0
- package/utils/mask/taiga-ui-kit-utils-mask.metadata.json +1 -1
- package/components/carousel/carousel-draggable.directive.d.ts +0 -16
- package/components/carousel/carousel-scroller.directive.d.ts +0 -17
- package/esm2015/components/carousel/carousel-draggable.directive.js +0 -67
- package/esm2015/components/carousel/carousel-scroller.directive.js +0 -76
- package/esm5/components/carousel/carousel-draggable.directive.js +0 -73
- package/esm5/components/carousel/carousel-scroller.directive.js +0 -82
|
@@ -1,143 +1,36 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Inject, ElementRef, Input,
|
|
2
|
+
import { EventEmitter, ChangeDetectorRef, Inject, ElementRef, Input, HostBinding, Output, ContentChildren, TemplateRef, HostListener, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { INTERSECTION_ROOT, IntersectionObserverModule } from '@ng-web-apis/intersection-observer';
|
|
4
|
-
import {
|
|
5
|
-
import { Observable, BehaviorSubject, merge, combineLatest, interval, of, EMPTY, Subject } from 'rxjs';
|
|
6
|
-
import { mapTo, takeUntil, shareReplay, filter, switchMap, withLatestFrom, scan, startWith, distinctUntilChanged, delay, map, endWith, repeat } from 'rxjs/operators';
|
|
4
|
+
import { EMPTY_QUERY, clamp, TUI_IS_MOBILE, tuiDefaultProp, TuiItemDirective, tuiPure, typedFromEvent, TuiPanModule, TuiSwipeModule, TuiItemModule } from '@taiga-ui/cdk';
|
|
7
5
|
import { PAGE_VISIBILITY } from '@ng-web-apis/common';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { Observable, BehaviorSubject, merge, combineLatest, interval, EMPTY } from 'rxjs';
|
|
7
|
+
import { mapTo, switchMap, filter, throttleTime, map, tap } from 'rxjs/operators';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
10
9
|
import { TUI_BUTTON_OPTIONS } from '@taiga-ui/core';
|
|
11
|
-
import { shouldCall } from '@tinkoff/ng-event-plugins';
|
|
12
|
-
|
|
13
|
-
let TuiCarouselDirective = class TuiCarouselDirective extends Observable {
|
|
14
|
-
constructor(destroy$, elementRef, visible$) {
|
|
15
|
-
super(subscriber => this.output$.subscribe(subscriber));
|
|
16
|
-
this.destroy$ = destroy$;
|
|
17
|
-
this.elementRef = elementRef;
|
|
18
|
-
this.visible$ = visible$;
|
|
19
|
-
this.index$ = new BehaviorSubject(NaN);
|
|
20
|
-
this.duration$ = new BehaviorSubject(0);
|
|
21
|
-
this.running$ = merge(typedFromEvent(this.elementRef.nativeElement, 'mouseenter').pipe(mapTo(false)), typedFromEvent(this.elementRef.nativeElement, 'mouseleave').pipe(mapTo(true)), this.visible$).pipe(takeUntil(this.destroy$), shareReplay(1));
|
|
22
|
-
this.output$ = combineLatest([
|
|
23
|
-
this.index$.pipe(filter(v => !isNaN(v))),
|
|
24
|
-
this.duration$,
|
|
25
|
-
]).pipe(switchMap(([index, duration]) => duration
|
|
26
|
-
? interval(duration).pipe(withLatestFrom(this.running$), filter(([_, running]) => running), scan(acc => ++acc, index), startWith(index))
|
|
27
|
-
: of(index)), distinctUntilChanged());
|
|
28
|
-
// So that initial position is scrolled to instantly
|
|
29
|
-
this.inited = false;
|
|
30
|
-
}
|
|
31
|
-
set index(index) {
|
|
32
|
-
this.index$.next(index);
|
|
33
|
-
}
|
|
34
|
-
set duration(duration) {
|
|
35
|
-
this.duration$.next(duration);
|
|
36
|
-
}
|
|
37
|
-
ngOnInit() {
|
|
38
|
-
if (isNaN(this.index$.value)) {
|
|
39
|
-
this.index$.next(0);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
prev() {
|
|
43
|
-
this.index$.next(this.index$.value - 1);
|
|
44
|
-
}
|
|
45
|
-
next() {
|
|
46
|
-
this.index$.next(this.index$.value + 1);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
TuiCarouselDirective.ctorParameters = () => [
|
|
50
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
51
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
52
|
-
{ type: Observable, decorators: [{ type: Inject, args: [PAGE_VISIBILITY,] }] }
|
|
53
|
-
];
|
|
54
|
-
__decorate([
|
|
55
|
-
Input()
|
|
56
|
-
], TuiCarouselDirective.prototype, "index", null);
|
|
57
|
-
__decorate([
|
|
58
|
-
Input()
|
|
59
|
-
], TuiCarouselDirective.prototype, "duration", null);
|
|
60
|
-
TuiCarouselDirective = __decorate([
|
|
61
|
-
Directive({
|
|
62
|
-
selector: 'tui-carousel',
|
|
63
|
-
exportAs: 'tui-carousel',
|
|
64
|
-
providers: [TuiDestroyService],
|
|
65
|
-
}),
|
|
66
|
-
__param(0, Inject(TuiDestroyService)),
|
|
67
|
-
__param(1, Inject(ElementRef)),
|
|
68
|
-
__param(2, Inject(PAGE_VISIBILITY))
|
|
69
|
-
], TuiCarouselDirective);
|
|
70
10
|
|
|
71
11
|
// @dynamic
|
|
72
|
-
let TuiCarouselDraggableDirective = class TuiCarouselDraggableDirective extends Observable {
|
|
73
|
-
constructor(documentRef, isMobile, elementRef, pan$) {
|
|
74
|
-
super(subscriber => this.transform$.subscribe(subscriber));
|
|
75
|
-
this.documentRef = documentRef;
|
|
76
|
-
this.isMobile = isMobile;
|
|
77
|
-
this.elementRef = elementRef;
|
|
78
|
-
this.pan$ = pan$;
|
|
79
|
-
this.transform$ = this.isMobile
|
|
80
|
-
? EMPTY
|
|
81
|
-
: this.pan$.pipe(filter(() => this.draggable), scan((acc, [cur]) => acc + cur, 0), takeUntil(typedFromEvent(this.documentRef, 'mouseup').pipe(delay(0))), map(x => `translateX(${clamp(x, this.min, this.max)}px)`), endWith(null), repeat());
|
|
82
|
-
this.min = -Infinity;
|
|
83
|
-
this.max = Infinity;
|
|
84
|
-
this.draggable = true;
|
|
85
|
-
this.transitioned = false;
|
|
86
|
-
}
|
|
87
|
-
onMouseDown() {
|
|
88
|
-
const { scrollLeft, scrollWidth, clientWidth } = this.elementRef.nativeElement;
|
|
89
|
-
this.max = scrollLeft;
|
|
90
|
-
this.min = clientWidth - Math.round(scrollWidth) + Math.round(scrollLeft);
|
|
91
|
-
this.transitioned = true;
|
|
92
|
-
}
|
|
93
|
-
onTransitionEnd(target) {
|
|
94
|
-
if (this.elementRef.nativeElement.firstElementChild === target) {
|
|
95
|
-
this.transitioned = false;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
TuiCarouselDraggableDirective.ctorParameters = () => [
|
|
100
|
-
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
101
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
102
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [INTERSECTION_ROOT,] }] },
|
|
103
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TuiPanService,] }] }
|
|
104
|
-
];
|
|
105
|
-
__decorate([
|
|
106
|
-
Input(),
|
|
107
|
-
HostBinding('class._draggable'),
|
|
108
|
-
tuiDefaultProp()
|
|
109
|
-
], TuiCarouselDraggableDirective.prototype, "draggable", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
HostBinding('class._transitioned')
|
|
112
|
-
], TuiCarouselDraggableDirective.prototype, "transitioned", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
HostListener('mousedown.silent')
|
|
115
|
-
], TuiCarouselDraggableDirective.prototype, "onMouseDown", null);
|
|
116
|
-
__decorate([
|
|
117
|
-
HostListener('transitionend', ['$event.target'])
|
|
118
|
-
], TuiCarouselDraggableDirective.prototype, "onTransitionEnd", null);
|
|
119
|
-
TuiCarouselDraggableDirective = __decorate([
|
|
120
|
-
Directive({
|
|
121
|
-
selector: 'tui-carousel[draggable]',
|
|
122
|
-
providers: [TuiPanService],
|
|
123
|
-
}),
|
|
124
|
-
__param(0, Inject(DOCUMENT)),
|
|
125
|
-
__param(1, Inject(TUI_IS_MOBILE)),
|
|
126
|
-
__param(2, Inject(INTERSECTION_ROOT)),
|
|
127
|
-
__param(3, Inject(TuiPanService))
|
|
128
|
-
], TuiCarouselDraggableDirective);
|
|
129
|
-
|
|
130
12
|
let TuiCarouselComponent = class TuiCarouselComponent {
|
|
131
|
-
constructor(
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
13
|
+
constructor(changeDetectorRef, elementRef, isMobile) {
|
|
14
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
15
|
+
this.elementRef = elementRef;
|
|
16
|
+
this.isMobile = isMobile;
|
|
17
|
+
this.translate = 0;
|
|
18
|
+
this.draggable = false;
|
|
135
19
|
this.itemsCount = 1;
|
|
136
20
|
this.index = 0;
|
|
137
21
|
this.indexChange = new EventEmitter();
|
|
138
|
-
this.manual$ = this.index$.pipe(map(index => this.loopback(index)));
|
|
139
|
-
this.attached = false;
|
|
140
22
|
this.items = EMPTY_QUERY;
|
|
23
|
+
this.transitioned = true;
|
|
24
|
+
}
|
|
25
|
+
get transform() {
|
|
26
|
+
const x = this.transitioned ? this.computedTranslate : this.translate;
|
|
27
|
+
return `translateX(${100 * x}%)`;
|
|
28
|
+
}
|
|
29
|
+
onTransitioned(transitioned) {
|
|
30
|
+
this.transitioned = transitioned;
|
|
31
|
+
if (!transitioned) {
|
|
32
|
+
this.translate = this.computedTranslate;
|
|
33
|
+
}
|
|
141
34
|
}
|
|
142
35
|
getStyle(itemsCount) {
|
|
143
36
|
const percent = `${100 / itemsCount}%`;
|
|
@@ -147,29 +40,69 @@ let TuiCarouselComponent = class TuiCarouselComponent {
|
|
|
147
40
|
maxWidth: percent,
|
|
148
41
|
};
|
|
149
42
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
43
|
+
next() {
|
|
44
|
+
this.updateIndex(this.index + 1);
|
|
45
|
+
}
|
|
46
|
+
prev() {
|
|
47
|
+
this.updateIndex(this.index - 1);
|
|
48
|
+
}
|
|
49
|
+
isDisabled(index) {
|
|
50
|
+
return index < this.index || index > this.index + this.itemsCount;
|
|
51
|
+
}
|
|
52
|
+
onIntersection({ intersectionRatio }, index) {
|
|
53
|
+
if (intersectionRatio && intersectionRatio !== 1 && !this.transitioned) {
|
|
54
|
+
this.updateIndex(index - Math.floor(this.itemsCount / 2));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
onScroll(delta) {
|
|
58
|
+
if (!this.isMobile) {
|
|
59
|
+
this.updateIndex(this.index + delta);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
onPan(x) {
|
|
63
|
+
if (!this.computedDraggable) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const { clientWidth } = this.elementRef.nativeElement;
|
|
67
|
+
const min = 1 - this.items.length / this.itemsCount;
|
|
68
|
+
this.translate = clamp(x / clientWidth + this.translate, min, 0);
|
|
69
|
+
}
|
|
70
|
+
onSwipe(direction) {
|
|
71
|
+
if (Math.round(this.translate) !== -this.index || !this.computedDraggable) {
|
|
156
72
|
return;
|
|
157
73
|
}
|
|
158
|
-
|
|
74
|
+
else if (direction === 'left') {
|
|
75
|
+
this.next();
|
|
76
|
+
}
|
|
77
|
+
else if (direction === 'right') {
|
|
78
|
+
this.prev();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
onAutoscroll() {
|
|
82
|
+
this.updateIndex(this.index === this.items.length - 1 ? 0 : this.index + 1);
|
|
83
|
+
}
|
|
84
|
+
get computedTranslate() {
|
|
85
|
+
return -this.index / this.itemsCount;
|
|
159
86
|
}
|
|
160
|
-
|
|
161
|
-
this.
|
|
87
|
+
get computedDraggable() {
|
|
88
|
+
return this.isMobile || this.draggable;
|
|
162
89
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
90
|
+
updateIndex(index) {
|
|
91
|
+
this.index = clamp(index, 0, this.items.length - 1);
|
|
92
|
+
this.indexChange.emit(this.index);
|
|
93
|
+
this.changeDetectorRef.markForCheck();
|
|
167
94
|
}
|
|
168
95
|
};
|
|
169
96
|
TuiCarouselComponent.ctorParameters = () => [
|
|
170
|
-
{ type:
|
|
171
|
-
{ type:
|
|
97
|
+
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
98
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
99
|
+
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] }
|
|
172
100
|
];
|
|
101
|
+
__decorate([
|
|
102
|
+
Input(),
|
|
103
|
+
HostBinding('class._draggable'),
|
|
104
|
+
tuiDefaultProp()
|
|
105
|
+
], TuiCarouselComponent.prototype, "draggable", void 0);
|
|
173
106
|
__decorate([
|
|
174
107
|
Input(),
|
|
175
108
|
tuiDefaultProp()
|
|
@@ -184,13 +117,22 @@ __decorate([
|
|
|
184
117
|
__decorate([
|
|
185
118
|
ContentChildren(TuiItemDirective, { read: TemplateRef })
|
|
186
119
|
], TuiCarouselComponent.prototype, "items", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
HostBinding('class._transitioned')
|
|
122
|
+
], TuiCarouselComponent.prototype, "transitioned", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
HostListener('touchstart', ['false']),
|
|
125
|
+
HostListener('touchend', ['true']),
|
|
126
|
+
HostListener('mousedown', ['false']),
|
|
127
|
+
HostListener('document:mouseup.silent', ['true'])
|
|
128
|
+
], TuiCarouselComponent.prototype, "onTransitioned", null);
|
|
187
129
|
__decorate([
|
|
188
130
|
tuiPure
|
|
189
131
|
], TuiCarouselComponent.prototype, "getStyle", null);
|
|
190
132
|
TuiCarouselComponent = __decorate([
|
|
191
133
|
Component({
|
|
192
134
|
selector: 'tui-carousel',
|
|
193
|
-
template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div
|
|
135
|
+
template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div class=\"t-scroller\" (tuiCarouselScroll)=\"onScroll($event)\">\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",
|
|
194
136
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
195
137
|
providers: [
|
|
196
138
|
{
|
|
@@ -198,13 +140,57 @@ TuiCarouselComponent = __decorate([
|
|
|
198
140
|
useExisting: ElementRef,
|
|
199
141
|
},
|
|
200
142
|
],
|
|
201
|
-
styles: [":host{
|
|
143
|
+
styles: [":host{position:relative;display:block;overflow:hidden}:host._draggable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host._draggable:hover{cursor:-webkit-grab;cursor:grab}:host._draggable:active{cursor:-webkit-grabbing;cursor:grabbing}.t-items{display:flex;align-items:center}:host._transitioned .t-items{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out}.t-item{padding:0 1.25rem;flex:1;min-width:100%;max-width:100%;box-sizing:border-box;border:none;margin:0}.t-wrapper{position:sticky;left:0;right:0;min-width:100%;overflow:hidden}.t-scroller{scrollbar-width:none;-ms-overflow-style:none;display:flex;overflow:auto;overscroll-behavior-x:none;padding-bottom:2rem;margin-bottom:-2rem}.t-scroller::-webkit-scrollbar,.t-scroller::-webkit-scrollbar-thumb{background:0 0;width:0;height:0}.t-scroller:after,.t-scroller:before{content:'';display:block;min-width:1rem}"]
|
|
202
144
|
}),
|
|
203
|
-
__param(0,
|
|
204
|
-
__param(
|
|
205
|
-
__param(
|
|
145
|
+
__param(0, Inject(ChangeDetectorRef)),
|
|
146
|
+
__param(1, Inject(ElementRef)),
|
|
147
|
+
__param(2, Inject(TUI_IS_MOBILE))
|
|
206
148
|
], TuiCarouselComponent);
|
|
207
149
|
|
|
150
|
+
let TuiCarouselDirective = class TuiCarouselDirective extends Observable {
|
|
151
|
+
constructor(elementRef, visible$) {
|
|
152
|
+
super(subscriber => this.output$.subscribe(subscriber));
|
|
153
|
+
this.elementRef = elementRef;
|
|
154
|
+
this.visible$ = visible$;
|
|
155
|
+
this.duration$ = new BehaviorSubject(0);
|
|
156
|
+
this.running$ = merge(typedFromEvent(this.elementRef.nativeElement, 'mouseenter').pipe(mapTo(false)), typedFromEvent(this.elementRef.nativeElement, 'touchstart').pipe(mapTo(false)), typedFromEvent(this.elementRef.nativeElement, 'touchend').pipe(mapTo(true)), typedFromEvent(this.elementRef.nativeElement, 'mouseleave').pipe(mapTo(true)), this.visible$);
|
|
157
|
+
this.output$ = combineLatest([this.duration$, this.running$]).pipe(switchMap(([duration, running]) => duration && running ? interval(duration) : EMPTY));
|
|
158
|
+
}
|
|
159
|
+
set duration(duration) {
|
|
160
|
+
this.duration$.next(duration);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
TuiCarouselDirective.ctorParameters = () => [
|
|
164
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
165
|
+
{ type: Observable, decorators: [{ type: Inject, args: [PAGE_VISIBILITY,] }] }
|
|
166
|
+
];
|
|
167
|
+
__decorate([
|
|
168
|
+
Input()
|
|
169
|
+
], TuiCarouselDirective.prototype, "duration", null);
|
|
170
|
+
TuiCarouselDirective = __decorate([
|
|
171
|
+
Directive({
|
|
172
|
+
selector: 'tui-carousel',
|
|
173
|
+
}),
|
|
174
|
+
__param(0, Inject(ElementRef)),
|
|
175
|
+
__param(1, Inject(PAGE_VISIBILITY))
|
|
176
|
+
], TuiCarouselDirective);
|
|
177
|
+
|
|
178
|
+
let TuiCarouselAutoscrollDirective = class TuiCarouselAutoscrollDirective {
|
|
179
|
+
constructor(tuiCarouselAutoscroll) {
|
|
180
|
+
this.tuiCarouselAutoscroll = tuiCarouselAutoscroll;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
TuiCarouselAutoscrollDirective.ctorParameters = () => [
|
|
184
|
+
{ type: Observable, decorators: [{ type: Inject, args: [TuiCarouselDirective,] }] }
|
|
185
|
+
];
|
|
186
|
+
TuiCarouselAutoscrollDirective = __decorate([
|
|
187
|
+
Directive({
|
|
188
|
+
selector: '[tuiCarouselAutoscroll]',
|
|
189
|
+
outputs: ['tuiCarouselAutoscroll'],
|
|
190
|
+
}),
|
|
191
|
+
__param(0, Inject(TuiCarouselDirective))
|
|
192
|
+
], TuiCarouselAutoscrollDirective);
|
|
193
|
+
|
|
208
194
|
// TODO: remove in ivy compilation
|
|
209
195
|
const CAROUSEL_BUTTON_OPTIONS = {
|
|
210
196
|
appearance: "secondary" /* Secondary */,
|
|
@@ -225,91 +211,49 @@ TuiCarouselButtonsDirective = __decorate([
|
|
|
225
211
|
})
|
|
226
212
|
], TuiCarouselButtonsDirective);
|
|
227
213
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return !this.isMobile && !!((_a = this.draggable) === null || _a === void 0 ? void 0 : _a.draggable) && this.index === this.current;
|
|
231
|
-
}
|
|
232
|
-
// @dynamic
|
|
233
|
-
let TuiCarouselScrollerDirective = class TuiCarouselScrollerDirective {
|
|
234
|
-
constructor(draggable, isMobile, directive, elementRef, root) {
|
|
235
|
-
this.draggable = draggable;
|
|
236
|
-
this.isMobile = isMobile;
|
|
237
|
-
this.directive = directive;
|
|
214
|
+
let TuiCarouselScrollDirective = class TuiCarouselScrollDirective {
|
|
215
|
+
constructor(elementRef) {
|
|
238
216
|
this.elementRef = elementRef;
|
|
239
|
-
this.
|
|
240
|
-
|
|
241
|
-
this.
|
|
242
|
-
}
|
|
243
|
-
set scroll(scroll) {
|
|
244
|
-
if (scroll) {
|
|
245
|
-
this.scrollTo(this.directive.inited ? 'smooth' : 'auto');
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
onMouseUp(_e) {
|
|
249
|
-
const { left } = this.root.nativeElement.getBoundingClientRect();
|
|
250
|
-
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
251
|
-
const { parentElement } = this.elementRef.nativeElement;
|
|
252
|
-
parentElement.style.transform = `translateX(${rect.left - left}px)`;
|
|
253
|
-
this.scrollTo();
|
|
254
|
-
}
|
|
255
|
-
scrollTo(behavior = 'auto') {
|
|
256
|
-
this.directive.inited = true;
|
|
257
|
-
this.root.nativeElement.scrollTo({
|
|
258
|
-
left: this.elementRef.nativeElement.offsetLeft,
|
|
259
|
-
behavior,
|
|
260
|
-
});
|
|
217
|
+
this.tuiCarouselScroll = typedFromEvent(this.elementRef.nativeElement, 'wheel').pipe(filter(({ deltaX }) => Math.abs(deltaX) > 20), throttleTime(500), map(({ deltaX }) => Math.sign(deltaX)),
|
|
218
|
+
// So we always have space to scroll and overflow-behavior saves us from back nav
|
|
219
|
+
tap(() => (this.elementRef.nativeElement.scrollLeft = 10)));
|
|
261
220
|
}
|
|
262
221
|
};
|
|
263
|
-
|
|
264
|
-
{ type:
|
|
265
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
266
|
-
{ type: TuiCarouselDirective, decorators: [{ type: Inject, args: [TuiCarouselDirective,] }] },
|
|
267
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
268
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [INTERSECTION_ROOT,] }] }
|
|
222
|
+
TuiCarouselScrollDirective.ctorParameters = () => [
|
|
223
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
269
224
|
];
|
|
270
225
|
__decorate([
|
|
271
|
-
|
|
272
|
-
],
|
|
273
|
-
__decorate([
|
|
274
|
-
Input()
|
|
275
|
-
], TuiCarouselScrollerDirective.prototype, "index", void 0);
|
|
276
|
-
__decorate([
|
|
277
|
-
Input()
|
|
278
|
-
], TuiCarouselScrollerDirective.prototype, "current", void 0);
|
|
279
|
-
__decorate([
|
|
280
|
-
HostListener('document:mouseup.init', ['$event']),
|
|
281
|
-
HostListener('document:mouseup.silent', ['$event']),
|
|
282
|
-
shouldCall(shouldScroll)
|
|
283
|
-
], TuiCarouselScrollerDirective.prototype, "onMouseUp", null);
|
|
284
|
-
TuiCarouselScrollerDirective = __decorate([
|
|
226
|
+
Output()
|
|
227
|
+
], TuiCarouselScrollDirective.prototype, "tuiCarouselScroll", void 0);
|
|
228
|
+
TuiCarouselScrollDirective = __decorate([
|
|
285
229
|
Directive({
|
|
286
|
-
selector: '[
|
|
230
|
+
selector: '[tuiCarouselScroll]',
|
|
287
231
|
}),
|
|
288
|
-
__param(0,
|
|
289
|
-
|
|
290
|
-
__param(1, Inject(TUI_IS_MOBILE)),
|
|
291
|
-
__param(2, Inject(TuiCarouselDirective)),
|
|
292
|
-
__param(3, Inject(ElementRef)),
|
|
293
|
-
__param(4, Inject(INTERSECTION_ROOT))
|
|
294
|
-
], TuiCarouselScrollerDirective);
|
|
232
|
+
__param(0, Inject(ElementRef))
|
|
233
|
+
], TuiCarouselScrollDirective);
|
|
295
234
|
|
|
296
235
|
let TuiCarouselModule = class TuiCarouselModule {
|
|
297
236
|
};
|
|
298
237
|
TuiCarouselModule = __decorate([
|
|
299
238
|
NgModule({
|
|
300
|
-
imports: [
|
|
239
|
+
imports: [
|
|
240
|
+
CommonModule,
|
|
241
|
+
IntersectionObserverModule,
|
|
242
|
+
TuiPanModule,
|
|
243
|
+
TuiSwipeModule,
|
|
244
|
+
TuiItemModule,
|
|
245
|
+
],
|
|
301
246
|
declarations: [
|
|
302
247
|
TuiCarouselComponent,
|
|
303
248
|
TuiCarouselDirective,
|
|
304
|
-
TuiCarouselScrollerDirective,
|
|
305
|
-
TuiCarouselDraggableDirective,
|
|
306
249
|
TuiCarouselButtonsDirective,
|
|
250
|
+
TuiCarouselAutoscrollDirective,
|
|
251
|
+
TuiCarouselScrollDirective,
|
|
307
252
|
],
|
|
308
253
|
exports: [
|
|
309
254
|
TuiCarouselComponent,
|
|
310
255
|
TuiCarouselDirective,
|
|
311
256
|
TuiCarouselButtonsDirective,
|
|
312
|
-
TuiCarouselDraggableDirective,
|
|
313
257
|
TuiItemDirective,
|
|
314
258
|
],
|
|
315
259
|
})
|
|
@@ -319,5 +263,5 @@ TuiCarouselModule = __decorate([
|
|
|
319
263
|
* Generated bundle index. Do not edit.
|
|
320
264
|
*/
|
|
321
265
|
|
|
322
|
-
export { CAROUSEL_BUTTON_OPTIONS, TuiCarouselButtonsDirective, TuiCarouselComponent, TuiCarouselDirective,
|
|
266
|
+
export { CAROUSEL_BUTTON_OPTIONS, TuiCarouselAutoscrollDirective, TuiCarouselButtonsDirective, TuiCarouselComponent, TuiCarouselDirective, TuiCarouselModule, TuiCarouselScrollDirective };
|
|
323
267
|
//# sourceMappingURL=taiga-ui-kit-components-carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-carousel.js","sources":["ng://@taiga-ui/kit/components/carousel/carousel.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel-draggable.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel.component.ts","ng://@taiga-ui/kit/components/carousel/carousel-buttons.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel-scroller.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel.module.ts","ng://@taiga-ui/kit/components/carousel/taiga-ui-kit-components-carousel.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Input, OnInit} from '@angular/core';\nimport {PAGE_VISIBILITY} from '@ng-web-apis/common';\nimport {TuiDestroyService, typedFromEvent} from '@taiga-ui/cdk';\nimport {BehaviorSubject, combineLatest, interval, merge, Observable, of} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n mapTo,\n scan,\n shareReplay,\n startWith,\n switchMap,\n takeUntil,\n withLatestFrom,\n} from 'rxjs/operators';\n\n@Directive({\n selector: 'tui-carousel',\n exportAs: 'tui-carousel',\n providers: [TuiDestroyService],\n})\nexport class TuiCarouselDirective extends Observable<number> implements OnInit {\n private readonly index$ = new BehaviorSubject<number>(NaN);\n\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, 'mouseleave').pipe(mapTo(true)),\n this.visible$,\n ).pipe(takeUntil(this.destroy$), shareReplay(1));\n\n private readonly output$ = combineLatest([\n this.index$.pipe(filter(v => !isNaN(v))),\n this.duration$,\n ]).pipe(\n switchMap(([index, duration]) =>\n duration\n ? interval(duration).pipe(\n withLatestFrom(this.running$),\n filter(([_, running]) => running),\n scan(acc => ++acc, index),\n startWith(index),\n )\n : of(index),\n ),\n distinctUntilChanged(),\n );\n\n @Input()\n set index(index: number) {\n this.index$.next(index);\n }\n\n @Input()\n set duration(duration: number) {\n this.duration$.next(duration);\n }\n\n // So that initial position is scrolled to instantly\n inited = false;\n\n constructor(\n @Inject(TuiDestroyService) private readonly destroy$: Observable<unknown>,\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 ngOnInit() {\n if (isNaN(this.index$.value)) {\n this.index$.next(0);\n }\n }\n\n prev() {\n this.index$.next(this.index$.value - 1);\n }\n\n next() {\n this.index$.next(this.index$.value + 1);\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {INTERSECTION_ROOT} from '@ng-web-apis/intersection-observer';\nimport {\n clamp,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiPanService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {delay, endWith, filter, map, repeat, scan, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: 'tui-carousel[draggable]',\n providers: [TuiPanService],\n})\nexport class TuiCarouselDraggableDirective extends Observable<string | null> {\n private readonly transform$ = this.isMobile\n ? EMPTY\n : this.pan$.pipe(\n filter(() => this.draggable),\n scan((acc, [cur]) => acc + cur, 0),\n takeUntil(typedFromEvent(this.documentRef, 'mouseup').pipe(delay(0))),\n map(x => `translateX(${clamp(x, this.min, this.max)}px)`),\n endWith(null),\n repeat(),\n );\n\n private min = -Infinity;\n private max = Infinity;\n\n @Input()\n @HostBinding('class._draggable')\n @tuiDefaultProp()\n draggable = true;\n\n @HostBinding('class._transitioned')\n transitioned = false;\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(INTERSECTION_ROOT) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiPanService)\n private readonly pan$: Observable<readonly [number, number]>,\n ) {\n super(subscriber => this.transform$.subscribe(subscriber));\n }\n\n @HostListener('mousedown.silent')\n onMouseDown() {\n const {scrollLeft, scrollWidth, clientWidth} = this.elementRef.nativeElement;\n\n this.max = scrollLeft;\n this.min = clientWidth - Math.round(scrollWidth) + Math.round(scrollLeft);\n this.transitioned = true;\n }\n\n @HostListener('transitionend', ['$event.target'])\n onTransitionEnd(target: HTMLElement) {\n if (this.elementRef.nativeElement.firstElementChild === target) {\n this.transitioned = false;\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n} from '@angular/core';\nimport {INTERSECTION_ROOT} from '@ng-web-apis/intersection-observer';\nimport {EMPTY_QUERY, tuiDefaultProp, TuiItemDirective, tuiPure} from '@taiga-ui/cdk';\nimport {Observable, Subject} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselDraggableDirective} from './carousel-draggable.directive';\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 readonly intersected$ = new Subject<number>();\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 readonly manual$ = this.index$.pipe(map(index => this.loopback(index)));\n\n attached = false;\n\n @ContentChildren(TuiItemDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<any>> = EMPTY_QUERY;\n\n constructor(\n @Optional()\n @Inject(TuiCarouselDraggableDirective)\n readonly transform$: Observable<string | null> | null,\n @Inject(TuiCarouselDirective) private readonly index$: Observable<number>,\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 onIntersection(\n {intersectionRatio, intersectionRect, rootBounds}: IntersectionObserverEntry,\n index: number,\n ) {\n if (\n !this.attached ||\n !intersectionRatio ||\n intersectionRatio === 1 ||\n // Phantom intersections due to width wobble on drag\n intersectionRect.left > Number(rootBounds?.left)\n ) {\n return;\n }\n\n this.indexChange.emit(index - Math.floor(this.itemsCount / 2));\n }\n\n onPresent(attached: boolean) {\n this.attached = attached;\n }\n\n private loopback(index: number) {\n const safe = this.items.length || index + 1;\n const remainder = index % safe;\n\n return remainder < 0 ? remainder + this.items.length : remainder;\n }\n}\n","import {Directive} from '@angular/core';\nimport {ButtonOptions, TUI_BUTTON_OPTIONS, TuiAppearance} from '@taiga-ui/core';\n\n// TODO: remove in ivy compilation\nexport const CAROUSEL_BUTTON_OPTIONS: ButtonOptions = {\n appearance: TuiAppearance.Secondary,\n shape: 'rounded',\n size: 'm',\n};\n\n@Directive({\n selector: '[tuiCarouselButtons]',\n providers: [\n {\n provide: TUI_BUTTON_OPTIONS,\n useValue: CAROUSEL_BUTTON_OPTIONS,\n },\n ],\n})\nexport class TuiCarouselButtonsDirective {}\n","import {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {INTERSECTION_ROOT} from '@ng-web-apis/intersection-observer';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\n\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselDraggableDirective} from './carousel-draggable.directive';\n\nexport function shouldScroll(this: TuiCarouselScrollerDirective): boolean {\n return !this.isMobile && !!this.draggable?.draggable && this.index === this.current;\n}\n\n// @dynamic\n@Directive({\n selector: '[tuiCarouselScroller]',\n})\nexport class TuiCarouselScrollerDirective {\n @Input()\n set scroll(scroll: boolean) {\n if (scroll) {\n this.scrollTo(this.directive.inited ? 'smooth' : 'auto');\n }\n }\n\n @Input()\n index = 0;\n\n @Input()\n current = 0;\n\n constructor(\n @Optional()\n @Inject(TuiCarouselDraggableDirective)\n readonly draggable: TuiCarouselDraggableDirective | null,\n @Inject(TUI_IS_MOBILE) readonly isMobile: boolean,\n @Inject(TuiCarouselDirective) private readonly directive: TuiCarouselDirective,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(INTERSECTION_ROOT) private readonly root: ElementRef<HTMLElement>,\n ) {}\n\n @HostListener('document:mouseup.init', ['$event'])\n @HostListener('document:mouseup.silent', ['$event'])\n @shouldCall(shouldScroll)\n onMouseUp(_e: unknown) {\n const {left} = this.root.nativeElement.getBoundingClientRect();\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\n const {parentElement} = this.elementRef.nativeElement;\n\n parentElement!.style.transform = `translateX(${rect.left - left}px)`;\n this.scrollTo();\n }\n\n private scrollTo(behavior: ScrollBehavior = 'auto') {\n this.directive.inited = true;\n this.root.nativeElement.scrollTo({\n left: this.elementRef.nativeElement.offsetLeft,\n behavior,\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {IntersectionObserverModule} from '@ng-web-apis/intersection-observer';\nimport {TuiItemDirective, TuiItemModule} from '@taiga-ui/cdk';\nimport {TuiPresentModule} from '@taiga-ui/kit/directives';\n\nimport {TuiCarouselComponent} from './carousel.component';\nimport {TuiCarouselDirective} from './carousel.directive';\nimport {TuiCarouselButtonsDirective} from './carousel-buttons.directive';\nimport {TuiCarouselDraggableDirective} from './carousel-draggable.directive';\nimport {TuiCarouselScrollerDirective} from './carousel-scroller.directive';\n\n@NgModule({\n imports: [CommonModule, IntersectionObserverModule, TuiItemModule, TuiPresentModule],\n declarations: [\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselScrollerDirective,\n TuiCarouselDraggableDirective,\n TuiCarouselButtonsDirective,\n ],\n exports: [\n TuiCarouselComponent,\n TuiCarouselDirective,\n TuiCarouselButtonsDirective,\n TuiCarouselDraggableDirective,\n TuiItemDirective,\n ],\n})\nexport class TuiCarouselModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;IAqBa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,UAAkB;IAyCxD,YACgD,QAA6B,EACpC,UAAmC,EAC9B,QAA6B;QAEvE,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QAJZ,aAAQ,GAAR,QAAQ,CAAqB;QACpC,eAAU,GAAV,UAAU,CAAyB;QAC9B,aAAQ,GAAR,QAAQ,CAAqB;QA3C1D,WAAM,GAAG,IAAI,eAAe,CAAS,GAAG,CAAC,CAAC;QAE1C,cAAS,GAAG,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;QAEnC,aAAQ,GAAG,KAAK,CAC7B,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAC9E,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,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B,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAjB7B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,0BAA0B,EAAE,aAAa,EAAE,gBAAgB,CAAC;QACpF,YAAY,EAAE;YACV,oBAAoB;YACpB,oBAAoB;YACpB,4BAA4B;YAC5B,6BAA6B;YAC7B,2BAA2B;SAC9B;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,oBAAoB;YACpB,2BAA2B;YAC3B,6BAA6B;YAC7B,gBAAgB;SACnB;KACJ,CAAC;GACW,iBAAiB,CAAG;;AC7BjC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-carousel.js","sources":["ng://@taiga-ui/kit/components/carousel/carousel.component.ts","ng://@taiga-ui/kit/components/carousel/carousel.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel-autoscroll.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel-buttons.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel-scroll.directive.ts","ng://@taiga-ui/kit/components/carousel/carousel.module.ts","ng://@taiga-ui/kit/components/carousel/taiga-ui-kit-components-carousel.ts"],"sourcesContent":["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<any>> = 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) {\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() {\n this.updateIndex(this.index + 1);\n }\n\n prev() {\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) {\n if (intersectionRatio && intersectionRatio !== 1 && !this.transitioned) {\n this.updateIndex(index - Math.floor(this.itemsCount / 2));\n }\n }\n\n onScroll(delta: number) {\n if (!this.isMobile) {\n this.updateIndex(this.index + delta);\n }\n }\n\n onPan(x: number) {\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) {\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() {\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) {\n this.index = clamp(index, 0, this.items.length - 1);\n this.indexChange.emit(this.index);\n this.changeDetectorRef.markForCheck();\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 {Directive} from '@angular/core';\nimport {ButtonOptions, TUI_BUTTON_OPTIONS, TuiAppearance} from '@taiga-ui/core';\n\n// TODO: remove in ivy compilation\nexport const CAROUSEL_BUTTON_OPTIONS: ButtonOptions = {\n appearance: TuiAppearance.Secondary,\n shape: 'rounded',\n size: 'm',\n};\n\n@Directive({\n selector: '[tuiCarouselButtons]',\n providers: [\n {\n provide: TUI_BUTTON_OPTIONS,\n useValue: CAROUSEL_BUTTON_OPTIONS,\n },\n ],\n})\nexport class TuiCarouselButtonsDirective {}\n","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 // So we always have space to scroll and overflow-behavior saves us from back nav\n tap(() => (this.elementRef.nativeElement.scrollLeft = 10)),\n );\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n}\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":[],"mappings":";;;;;;;;;;AA0BA;IAaa,oBAAoB,GAAjC,MAAa,oBAAoB;IAyB7B,YACgD,iBAAoC,EAC3C,UAAmC,EAChC,QAAiB;QAFb,sBAAiB,GAAjB,iBAAiB,CAAmB;QAC3C,eAAU,GAAV,UAAU,CAAyB;QAChC,aAAQ,GAAR,QAAQ,CAAS;QA3BrD,cAAS,GAAG,CAAC,CAAC;QAKtB,cAAS,GAAG,KAAK,CAAC;QAIlB,eAAU,GAAG,CAAC,CAAC;QAIf,UAAK,GAAG,CAAC,CAAC;QAGD,gBAAW,GAAG,IAAI,YAAY,EAAU,CAAC;QAGzC,UAAK,GAAgC,WAAW,CAAC;QAG1D,iBAAY,GAAG,IAAI,CAAC;KAMhB;IAEJ,IAAI,SAAS;QACT,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC;QAEtE,OAAO,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC;KACpC;IAMD,cAAc,CAAC,YAAqB;QAChC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QAEjC,IAAI,CAAC,YAAY,EAAE;YACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC;S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AAA,MAAM,CAAC,UAAU,CAAC,CAAA;GAdd,0BAA0B,CAgBtC;;ICeY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAtB7B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,0BAA0B;YAC1B,YAAY;YACZ,cAAc;YACd,aAAa;SAChB;QACD,YAAY,EAAE;YACV,oBAAoB;YACpB,oBAAoB;YACpB,2BAA2B;YAC3B,8BAA8B;YAC9B,0BAA0B;SAC7B;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,oBAAoB;YACpB,2BAA2B;YAC3B,gBAAgB;SACnB;KACJ,CAAC;GACW,iBAAiB,CAAG;;ACtCjC;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Optional, Self, Inject, ChangeDetectorRef, Input, HostBinding,
|
|
2
|
+
import { Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
4
4
|
import { AbstractTuiNullableControl, isNativeFocused, tuiDefaultProp, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiHoveredModule, TuiPressedModule } from '@taiga-ui/cdk';
|
|
5
5
|
import { TuiModeDirective, TuiWrapperModule } from '@taiga-ui/core';
|
|
@@ -55,6 +55,9 @@ TuiCheckboxBlockComponent.ctorParameters = () => [
|
|
|
55
55
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
56
56
|
{ type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] }
|
|
57
57
|
];
|
|
58
|
+
__decorate([
|
|
59
|
+
ViewChild(TuiCheckboxComponent)
|
|
60
|
+
], TuiCheckboxBlockComponent.prototype, "checkbox", void 0);
|
|
58
61
|
__decorate([
|
|
59
62
|
Input(),
|
|
60
63
|
HostBinding('attr.data-tui-host-align'),
|
|
@@ -70,9 +73,6 @@ __decorate([
|
|
|
70
73
|
HostBinding('attr.data-tui-host-size'),
|
|
71
74
|
tuiDefaultProp()
|
|
72
75
|
], TuiCheckboxBlockComponent.prototype, "size", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
ViewChild(TuiCheckboxComponent)
|
|
75
|
-
], TuiCheckboxBlockComponent.prototype, "checkbox", void 0);
|
|
76
76
|
__decorate([
|
|
77
77
|
HostBinding('class._active')
|
|
78
78
|
], TuiCheckboxBlockComponent.prototype, "checked", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-checkbox-block.js","sources":["ng://@taiga-ui/kit/components/checkbox-block/checkbox-block.component.ts","ng://@taiga-ui/kit/components/checkbox-block/checkbox-block.module.ts","ng://@taiga-ui/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 isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\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 @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-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = 'l';\n\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-checkbox-block.js","sources":["ng://@taiga-ui/kit/components/checkbox-block/checkbox-block.component.ts","ng://@taiga-ui/kit/components/checkbox-block/checkbox-block.module.ts","ng://@taiga-ui/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 isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\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-tui-host-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 isNativeFocused(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) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onFocusVisible(focusVisible: boolean) {\n this.updateFocusVisible(focusVisible);\n }\n\n onModelChange(value: boolean) {\n this.updateValue(value);\n }\n}\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":";;;;;;;;IA0Ca,yBAAyB,iCAAtC,MAAa,yBACT,SAAQ,0BAAmC;IAqB3C,YAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC;QAEvD,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFjB,kBAAa,GAAb,aAAa,CAAyB;QApB3D,iBAAY,GAA2B,OAAO,CAAC;QAK/C,iBAAY,GAAG,KAAK,CAAC;QAKrB,SAAI,GAAwB,GAAG,CAAC;KAa/B;IAED,IAAI,sBAAsB;QACtB,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;KACtE;IAGD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC;KACpD;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,IAAI,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;KACxC;IAED,IAAI,OAAO;QACP,OAAO,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KACvD;IAED,IAAI,UAAU;QACV,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;YACjD,OAAO,IAAI,CAAC,OAAO;;gDAEY;SAClC;QAED,OAAO,IAAI,CAAC,OAAO,yDAAmD;KACzE;IAED,SAAS,CAAC,OAAgB;QACtB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;KAC/B;IAED,SAAS,CAAC,OAAgB;QACtB,IAAI,CAAC,aAAa,CA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gB,CAAC,CAAA;GA7BpB,yBAAyB,CAiFrC;;ICxGY,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IAXlC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,WAAW;YACX,gBAAgB;YAChB,gBAAgB;YAChB,iBAAiB;YACjB,gBAAgB;SACnB;QACD,YAAY,EAAE,CAAC,yBAAyB,CAAC;QACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;KACvC,CAAC;GACW,sBAAsB,CAAG;;ACnBtC;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Optional, Self, Inject, ChangeDetectorRef, Input, HostBinding,
|
|
2
|
+
import { Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
4
4
|
import { AbstractTuiNullableControl, isNativeFocused, tuiDefaultProp, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiHoveredModule, TuiPressedModule } from '@taiga-ui/cdk';
|
|
5
5
|
import { TuiModeDirective } from '@taiga-ui/core';
|
|
@@ -40,14 +40,14 @@ TuiCheckboxLabeledComponent.ctorParameters = () => [
|
|
|
40
40
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
41
41
|
{ type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] }
|
|
42
42
|
];
|
|
43
|
+
__decorate([
|
|
44
|
+
ViewChild(TuiCheckboxComponent)
|
|
45
|
+
], TuiCheckboxLabeledComponent.prototype, "checkbox", void 0);
|
|
43
46
|
__decorate([
|
|
44
47
|
Input(),
|
|
45
48
|
HostBinding('attr.data-tui-host-size'),
|
|
46
49
|
tuiDefaultProp()
|
|
47
50
|
], TuiCheckboxLabeledComponent.prototype, "size", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
ViewChild(TuiCheckboxComponent)
|
|
50
|
-
], TuiCheckboxLabeledComponent.prototype, "checkbox", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
HostBinding('attr.data-mode')
|
|
53
53
|
], TuiCheckboxLabeledComponent.prototype, "hostMode", null);
|