@taiga-ui/kit 2.41.1 → 2.44.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/abstract/slider/slider.d.ts +3 -3
- package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +1 -0
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +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.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +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.map +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.map +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 +1 -10
- 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 +65 -45
- 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 +2 -2
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +49 -49
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +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.map +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.map +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 +3 -1
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +4 -2
- 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 +3 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +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.map +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 +1 -1
- 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 +3 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +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.map +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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +5 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +1 -1
- 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 +9 -8
- 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 +1 -1
- 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.map +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 -94
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +2 -2
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +1 -1
- 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-labeled.umd.js +1 -1
- 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.map +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 +4 -2
- 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-range.umd.js +67 -13
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +1 -7
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +52 -49
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +1 -0
- 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 +67 -24
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +1 -1
- 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-directives-dropdown-context.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.min.js.map +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.map +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +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.map +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-directives-project-class.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-project-class.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-enums.umd.js +2 -2
- package/bundles/taiga-ui-kit-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-enums.umd.min.js.map +1 -1
- 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.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js +253 -4
- package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.min.js +15 -1
- package/bundles/taiga-ui-kit-utils-math.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils.umd.js +12 -4
- package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils.umd.min.js +1 -1
- package/components/accordion/accordion-item/accordion-item-content.directive.d.ts +2 -2
- package/components/accordion/accordion-item/accordion-item.component.d.ts +2 -2
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
- package/components/breadcrumbs/breadcrumbs-wrapper.component.d.ts +1 -1
- package/components/combo-box/combo-box.component.d.ts +1 -2
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +5 -4
- package/components/data-list-wrapper/data-list-wrapper.component.d.ts +3 -13
- package/components/data-list-wrapper/data-list-wrapper.d.ts +15 -0
- package/components/data-list-wrapper/index.d.ts +1 -0
- package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
- package/components/files/files.component.d.ts +1 -1
- package/components/files/index.d.ts +1 -0
- package/components/files/taiga-ui-kit-components-files.d.ts +0 -1
- package/components/files/taiga-ui-kit-components-files.metadata.json +1 -1
- package/components/input-count/input-count-options.d.ts +2 -2
- package/components/input-count/input-count.component.d.ts +2 -2
- package/components/input-date/input-date.providers.d.ts +2 -1
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/input-date-range.providers.d.ts +2 -1
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/input-date-time.providers.d.ts +2 -1
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-file/file/file.component.d.ts +2 -2
- package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +1 -1
- package/components/input-number/input-number.component.d.ts +2 -2
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/input-password-options.d.ts +2 -2
- package/components/input-password/input-password.directive.d.ts +2 -1
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/input-phone.component.d.ts +2 -2
- package/components/input-range/input-range.component.d.ts +3 -2
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-tag/input-tag.component.d.ts +4 -7
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/input-time-options.d.ts +1 -1
- package/components/input-time/input-time.component.d.ts +2 -2
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/line-clamp/index.d.ts +0 -1
- package/components/line-clamp/line-clamp.component.d.ts +0 -1
- package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
- package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +3 -3
- package/components/multi-select/multi-select.component.d.ts +2 -2
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/radio/radio.component.d.ts +2 -2
- package/components/radio-block/taiga-ui-kit-components-radio-block.metadata.json +1 -1
- package/components/radio-labeled/taiga-ui-kit-components-radio-labeled.metadata.json +1 -1
- package/components/radio-list/taiga-ui-kit-components-radio-list.metadata.json +1 -1
- package/components/range/range.component.d.ts +11 -2
- package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
- package/components/select/select.component.d.ts +0 -1
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/select-option/select-option.component.d.ts +2 -2
- package/components/select-option/taiga-ui-kit-components-select-option.metadata.json +1 -1
- package/components/slider/slider-readonly.directive.d.ts +4 -1
- package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/index.d.ts +1 -0
- package/components/tabs/tab.directive.d.ts +2 -2
- package/components/tabs/tabs/tabs.component.d.ts +3 -1
- package/components/tabs/tabs-options.d.ts +9 -0
- package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +9 -4
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/tree/misc/tree.interfaces.d.ts +1 -1
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -1
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +1 -1
- package/enums/dropdown-position.d.ts +2 -1
- package/enums/step-state.d.ts +2 -1
- package/enums/taiga-ui-kit-enums.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +1 -1
- package/esm2015/abstract/slider/slider.js +3 -2
- package/esm2015/components/accordion/accordion-item/accordion-item-content.directive.js +1 -1
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +1 -1
- package/esm2015/components/accordion/accordion.component.js +1 -1
- package/esm2015/components/action/action.component.js +1 -1
- package/esm2015/components/avatar/avatar.component.js +2 -2
- package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +1 -1
- package/esm2015/components/calendar-month/calendar-month.component.js +1 -1
- package/esm2015/components/calendar-range/calendar-range.component.js +1 -1
- package/esm2015/components/carousel/carousel.component.js +1 -1
- package/esm2015/components/checkbox/checkbox.component.js +1 -1
- package/esm2015/components/checkbox-block/checkbox-block.component.js +1 -1
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +1 -1
- package/esm2015/components/combo-box/combo-box-strict.directive.js +1 -1
- package/esm2015/components/combo-box/combo-box.component.js +3 -12
- package/esm2015/components/combo-box/combo-box.directive.js +1 -1
- package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +15 -10
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +7 -40
- package/esm2015/components/data-list-wrapper/data-list-wrapper.js +51 -0
- package/esm2015/components/data-list-wrapper/index.js +2 -1
- package/esm2015/components/field-error/field-error.component.js +1 -1
- package/esm2015/components/files/file/file.component.js +1 -1
- package/esm2015/components/files/files.component.js +1 -1
- package/esm2015/components/files/index.js +2 -1
- package/esm2015/components/files/taiga-ui-kit-components-files.js +1 -2
- package/esm2015/components/filter/filter.component.js +1 -1
- package/esm2015/components/input/input.component.js +1 -1
- package/esm2015/components/input/input.directive.js +1 -1
- package/esm2015/components/input-copy/input-copy.component.js +1 -1
- package/esm2015/components/input-copy/input-copy.directive.js +1 -1
- package/esm2015/components/input-count/input-count-options.js +1 -1
- package/esm2015/components/input-count/input-count.component.js +1 -1
- package/esm2015/components/input-count/input-count.directive.js +1 -1
- package/esm2015/components/input-date/input-date.component.js +1 -1
- package/esm2015/components/input-date/input-date.directive.js +1 -1
- package/esm2015/components/input-date/input-date.providers.js +1 -1
- package/esm2015/components/input-date-range/input-date-range.component.js +1 -1
- package/esm2015/components/input-date-range/input-date-range.directive.js +1 -1
- package/esm2015/components/input-date-range/input-date-range.providers.js +1 -1
- package/esm2015/components/input-date-time/input-date-time.component.js +2 -2
- package/esm2015/components/input-date-time/input-date-time.directive.js +1 -1
- package/esm2015/components/input-date-time/input-date-time.providers.js +1 -1
- package/esm2015/components/input-file/file/file.component.js +1 -1
- package/esm2015/components/input-file/input-file.component.js +1 -1
- package/esm2015/components/input-files/input-files.component.js +1 -1
- package/esm2015/components/input-inline/input-inline.component.js +1 -1
- package/esm2015/components/input-month/input-month.component.js +2 -2
- package/esm2015/components/input-month/input-month.directive.js +1 -1
- package/esm2015/components/input-month-range/input-month-range.component.js +1 -1
- package/esm2015/components/input-month-range/input-month-range.directive.js +1 -1
- package/esm2015/components/input-number/input-number.component.js +6 -5
- package/esm2015/components/input-number/input-number.directive.js +1 -1
- package/esm2015/components/input-password/input-password-options.js +3 -3
- package/esm2015/components/input-password/input-password.component.js +1 -1
- package/esm2015/components/input-password/input-password.directive.js +1 -1
- package/esm2015/components/input-phone/input-phone.component.js +1 -1
- package/esm2015/components/input-phone/input-phone.directive.js +1 -1
- package/esm2015/components/input-phone-international/input-phone-international.component.js +1 -1
- package/esm2015/components/input-range/input-range.component.js +7 -3
- package/esm2015/components/input-slider/input-slider.component.js +3 -3
- package/esm2015/components/input-tag/input-tag.component.js +10 -9
- package/esm2015/components/input-time/input-time-options.js +1 -1
- package/esm2015/components/input-time/input-time.component.js +2 -2
- package/esm2015/components/line-clamp/index.js +1 -2
- package/esm2015/components/line-clamp/line-clamp.component.js +3 -6
- package/esm2015/components/line-clamp/line-clamp.module.js +2 -3
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +2 -2
- package/esm2015/components/multi-select/multi-select.component.js +2 -2
- package/esm2015/components/pagination/pagination.component.js +1 -1
- package/esm2015/components/radio/radio.component.js +5 -3
- package/esm2015/components/radio-block/radio-block.component.js +2 -2
- package/esm2015/components/radio-labeled/radio-labeled.component.js +2 -2
- package/esm2015/components/radio-list/radio-list.component.js +1 -1
- package/esm2015/components/range/range.component.js +70 -13
- package/esm2015/components/select/select.component.js +3 -9
- package/esm2015/components/select/select.directive.js +1 -1
- package/esm2015/components/select-option/select-option.component.js +1 -1
- package/esm2015/components/slider/slider-key-steps.directive.js +11 -28
- package/esm2015/components/slider/slider-old.component.js +1 -1
- package/esm2015/components/slider/slider-readonly.directive.js +38 -9
- package/esm2015/components/slider/slider.component.js +2 -2
- package/esm2015/components/stepper/step/step.component.js +1 -1
- package/esm2015/components/stepper/stepper.component.js +3 -2
- package/esm2015/components/tabs/index.js +2 -1
- package/esm2015/components/tabs/tab/tab.component.js +1 -1
- package/esm2015/components/tabs/tab.directive.js +1 -1
- package/esm2015/components/tabs/tabs/tabs.component.js +14 -10
- package/esm2015/components/tabs/tabs-options.js +14 -0
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +38 -17
- package/esm2015/components/tag/tag.component.js +1 -1
- package/esm2015/components/text-area/text-area.component.js +3 -3
- package/esm2015/components/text-area/text-area.directive.js +1 -1
- package/esm2015/components/toggle/toggle.component.js +1 -1
- package/esm2015/components/tree/components/tree/tree.component.js +2 -2
- package/esm2015/components/tree/components/tree-item/tree-item.component.js +1 -1
- package/esm2015/components/tree/components/tree-item-content/tree-item-content.component.js +1 -1
- package/esm2015/components/tree/directives/tree-controller.directive.js +1 -1
- package/esm2015/components/tree/directives/tree-item-controller.directive.js +1 -1
- package/esm2015/components/tree/directives/tree-node.directive.js +1 -1
- package/esm2015/components/tree/misc/tree.interfaces.js +1 -1
- package/esm2015/components/tree/misc/tree.service.js +1 -1
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +1 -1
- package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +1 -1
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +1 -1
- package/esm2015/directives/highlight/highlight.directive.js +1 -1
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +1 -1
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +1 -1
- package/esm2015/directives/present/present.directive.js +1 -1
- package/esm2015/directives/project-class/project-class.directive.js +1 -1
- package/esm2015/enums/dropdown-position.js +2 -2
- package/esm2015/enums/step-state.js +2 -2
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +1 -1
- package/esm2015/pipes/field-error/field-error-content-pipe.js +1 -1
- package/esm2015/pipes/field-error/field-error-pipe.js +1 -1
- package/esm2015/tokens/i18n.js +2 -2
- package/esm2015/types/handler-with-context.js +1 -1
- package/esm2015/utils/dom/scroll-to-element.js +1 -1
- package/esm2015/utils/dom/set-range-offset.js +1 -1
- package/esm2015/utils/index.js +2 -1
- package/esm2015/utils/math/index.js +2 -1
- package/esm2015/utils/math/key-steps.js +23 -0
- package/esm5/abstract/input-slider.js +1 -1
- package/esm5/abstract/slider/slider.js +3 -2
- package/esm5/components/accordion/accordion-item/accordion-item-content.directive.js +1 -1
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +1 -1
- package/esm5/components/accordion/accordion.component.js +1 -1
- package/esm5/components/action/action.component.js +1 -1
- package/esm5/components/avatar/avatar.component.js +2 -2
- package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +1 -1
- package/esm5/components/calendar-month/calendar-month.component.js +1 -1
- package/esm5/components/calendar-range/calendar-range.component.js +1 -1
- package/esm5/components/carousel/carousel.component.js +1 -1
- package/esm5/components/checkbox/checkbox.component.js +1 -1
- package/esm5/components/checkbox-block/checkbox-block.component.js +1 -1
- package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +1 -1
- package/esm5/components/combo-box/combo-box-strict.directive.js +1 -1
- package/esm5/components/combo-box/combo-box.component.js +3 -12
- package/esm5/components/combo-box/combo-box.directive.js +1 -1
- package/esm5/components/data-list-wrapper/data-list-group-wrapper.component.js +15 -10
- package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +12 -55
- package/esm5/components/data-list-wrapper/data-list-wrapper.js +64 -0
- package/esm5/components/data-list-wrapper/index.js +2 -1
- package/esm5/components/field-error/field-error.component.js +1 -1
- package/esm5/components/files/file/file.component.js +1 -1
- package/esm5/components/files/files.component.js +1 -1
- package/esm5/components/files/index.js +2 -1
- package/esm5/components/files/taiga-ui-kit-components-files.js +1 -2
- package/esm5/components/filter/filter.component.js +1 -1
- package/esm5/components/input/input.component.js +1 -1
- package/esm5/components/input/input.directive.js +1 -1
- package/esm5/components/input-copy/input-copy.component.js +1 -1
- package/esm5/components/input-copy/input-copy.directive.js +1 -1
- package/esm5/components/input-count/input-count-options.js +1 -1
- package/esm5/components/input-count/input-count.component.js +1 -1
- package/esm5/components/input-count/input-count.directive.js +1 -1
- package/esm5/components/input-date/input-date.component.js +1 -1
- package/esm5/components/input-date/input-date.directive.js +1 -1
- package/esm5/components/input-date/input-date.providers.js +4 -2
- package/esm5/components/input-date-range/input-date-range.component.js +1 -1
- package/esm5/components/input-date-range/input-date-range.directive.js +1 -1
- package/esm5/components/input-date-range/input-date-range.providers.js +4 -2
- package/esm5/components/input-date-time/input-date-time.component.js +2 -2
- package/esm5/components/input-date-time/input-date-time.directive.js +1 -1
- package/esm5/components/input-date-time/input-date-time.providers.js +4 -2
- package/esm5/components/input-file/file/file.component.js +1 -1
- package/esm5/components/input-file/input-file.component.js +1 -1
- package/esm5/components/input-files/input-files.component.js +1 -1
- package/esm5/components/input-inline/input-inline.component.js +1 -1
- package/esm5/components/input-month/input-month.component.js +2 -2
- package/esm5/components/input-month/input-month.directive.js +1 -1
- package/esm5/components/input-month-range/input-month-range.component.js +1 -1
- package/esm5/components/input-month-range/input-month-range.directive.js +1 -1
- package/esm5/components/input-number/input-number.component.js +6 -5
- package/esm5/components/input-number/input-number.directive.js +1 -1
- package/esm5/components/input-password/input-password-options.js +2 -2
- package/esm5/components/input-password/input-password.component.js +1 -1
- package/esm5/components/input-password/input-password.directive.js +1 -1
- package/esm5/components/input-phone/input-phone.component.js +1 -1
- package/esm5/components/input-phone/input-phone.directive.js +1 -1
- package/esm5/components/input-phone-international/input-phone-international.component.js +1 -1
- package/esm5/components/input-range/input-range.component.js +6 -2
- package/esm5/components/input-slider/input-slider.component.js +2 -2
- package/esm5/components/input-tag/input-tag.component.js +10 -9
- package/esm5/components/input-time/input-time-options.js +1 -1
- package/esm5/components/input-time/input-time.component.js +2 -2
- package/esm5/components/line-clamp/index.js +1 -2
- package/esm5/components/line-clamp/line-clamp.component.js +3 -10
- package/esm5/components/line-clamp/line-clamp.module.js +2 -3
- package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +2 -2
- package/esm5/components/multi-select/multi-select.component.js +2 -2
- package/esm5/components/pagination/pagination.component.js +1 -1
- package/esm5/components/radio/radio.component.js +5 -3
- package/esm5/components/radio-block/radio-block.component.js +2 -2
- package/esm5/components/radio-labeled/radio-labeled.component.js +2 -2
- package/esm5/components/radio-list/radio-list.component.js +1 -1
- package/esm5/components/range/range.component.js +68 -12
- package/esm5/components/select/select.component.js +3 -9
- package/esm5/components/select/select.directive.js +1 -1
- package/esm5/components/select-option/select-option.component.js +1 -1
- package/esm5/components/slider/slider-key-steps.directive.js +13 -43
- package/esm5/components/slider/slider-old.component.js +1 -1
- package/esm5/components/slider/slider-readonly.directive.js +45 -9
- package/esm5/components/slider/slider.component.js +2 -2
- package/esm5/components/stepper/step/step.component.js +1 -1
- package/esm5/components/stepper/stepper.component.js +3 -2
- package/esm5/components/tabs/index.js +2 -1
- package/esm5/components/tabs/tab/tab.component.js +1 -1
- package/esm5/components/tabs/tab.directive.js +1 -1
- package/esm5/components/tabs/tabs/tabs.component.js +14 -10
- package/esm5/components/tabs/tabs-options.js +15 -0
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +42 -17
- package/esm5/components/tag/tag.component.js +1 -1
- package/esm5/components/text-area/text-area.component.js +3 -3
- package/esm5/components/text-area/text-area.directive.js +1 -1
- package/esm5/components/toggle/toggle.component.js +1 -1
- package/esm5/components/tree/components/tree/tree.component.js +2 -2
- package/esm5/components/tree/components/tree-item/tree-item.component.js +1 -1
- package/esm5/components/tree/components/tree-item-content/tree-item-content.component.js +1 -1
- package/esm5/components/tree/directives/tree-controller.directive.js +1 -1
- package/esm5/components/tree/directives/tree-item-controller.directive.js +1 -1
- package/esm5/components/tree/directives/tree-node.directive.js +1 -1
- package/esm5/components/tree/misc/tree.interfaces.js +1 -1
- package/esm5/components/tree/misc/tree.service.js +1 -1
- package/esm5/directives/dropdown-context/dropdown-context.directive.js +1 -1
- package/esm5/directives/dropdown-hover/dropdown-hover.directive.js +1 -1
- package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +1 -1
- package/esm5/directives/highlight/highlight.directive.js +1 -1
- package/esm5/directives/lazy-loading/lazy-loading.directive.js +1 -1
- package/esm5/directives/lazy-loading/lazy-loading.service.js +1 -1
- package/esm5/directives/present/present.directive.js +1 -1
- package/esm5/directives/project-class/project-class.directive.js +1 -1
- package/esm5/enums/dropdown-position.js +2 -2
- package/esm5/enums/step-state.js +2 -2
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +1 -1
- package/esm5/pipes/field-error/field-error-content-pipe.js +1 -1
- package/esm5/pipes/field-error/field-error-pipe.js +1 -1
- package/esm5/tokens/i18n.js +2 -2
- package/esm5/types/handler-with-context.js +1 -1
- package/esm5/utils/dom/scroll-to-element.js +1 -1
- package/esm5/utils/dom/set-range-offset.js +1 -1
- package/esm5/utils/index.js +2 -1
- package/esm5/utils/math/index.js +2 -1
- package/esm5/utils/math/key-steps.js +30 -0
- package/fesm2015/taiga-ui-kit-abstract.js +2 -1
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- 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.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +2 -11
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +56 -38
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-files.js +47 -47
- package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +5 -4
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +6 -2
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +9 -8
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +9 -91
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +2 -2
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +4 -2
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +70 -14
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +2 -8
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +44 -35
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +2 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +62 -26
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +2 -2
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -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-directives-project-class.js.map +1 -1
- package/fesm2015/taiga-ui-kit-enums.js +2 -2
- package/fesm2015/taiga-ui-kit-enums.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-math.js +25 -1
- package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils.js +1 -0
- package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +2 -1
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- 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.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +2 -11
- package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +66 -45
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-files.js +52 -52
- package/fesm5/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +3 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +4 -2
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +3 -1
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +5 -4
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +5 -1
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +9 -8
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +9 -97
- package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +2 -2
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js +4 -2
- package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-range.js +68 -13
- package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +2 -8
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +52 -49
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +2 -1
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +67 -27
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +2 -2
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-hover.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-highlight.js.map +1 -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-directives-project-class.js.map +1 -1
- package/fesm5/taiga-ui-kit-enums.js +2 -2
- package/fesm5/taiga-ui-kit-enums.js.map +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js +1 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-math.js +32 -1
- package/fesm5/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils.js +1 -0
- package/fesm5/taiga-ui-kit-utils.js.map +1 -1
- package/package.json +7 -7
- package/tokens/i18n.d.ts +1 -5
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/types/handler-with-context.d.ts +2 -2
- package/utils/index.d.ts +1 -0
- package/utils/math/index.d.ts +1 -0
- package/utils/math/key-steps.d.ts +4 -0
- package/utils/math/taiga-ui-kit-utils-math.metadata.json +1 -1
- package/utils/taiga-ui-kit-utils.metadata.json +1 -1
- package/components/line-clamp/line-clamp.directive.d.ts +0 -11
- package/esm2015/components/line-clamp/line-clamp.directive.js +0 -87
- package/esm5/components/line-clamp/line-clamp.directive.js +0 -89
|
@@ -2,14 +2,14 @@ import { __decorate, __param } from 'tslib';
|
|
|
2
2
|
import { InjectionToken, Optional, Self, Inject, ChangeDetectorRef, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, Output, HostListener, Directive, Pipe, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import { NgModel, NgControl } from '@angular/forms';
|
|
4
4
|
import { USER_AGENT } from '@ng-web-apis/common';
|
|
5
|
-
import { watch, isEdgeOlderThan, CHROMIUM_EDGE_START_VERSION, tuiDefaultProp, AbstractTuiControl, typedFromEvent, isNativeFocused,
|
|
6
|
-
import { take, map } from 'rxjs/operators';
|
|
5
|
+
import { watch, isEdgeOlderThan, CHROMIUM_EDGE_START_VERSION, tuiDefaultProp, AbstractTuiControl, typedFromEvent, isNativeFocused, clamp, tuiAssert, TUI_FOCUSABLE_ITEM_ACCESSOR, tuiCoerceBooleanProperty, TuiDestroyService, TuiRepeatTimesModule, TuiFocusableModule, TuiFocusVisibleModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
|
|
6
|
+
import { take, map, tap, mapTo, filter, takeUntil } from 'rxjs/operators';
|
|
7
7
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
8
8
|
import { TuiFormatNumberPipeModule } from '@taiga-ui/core';
|
|
9
|
-
import {
|
|
9
|
+
import { tuiPercentageToKeyStepValue, tuiKeyStepValueToPercentage, tuiCheckKeyStepsHaveMinMaxPercents } from '@taiga-ui/kit/utils';
|
|
10
10
|
import { AbstractTuiSlider } from '@taiga-ui/kit/abstract';
|
|
11
11
|
import { TUI_FROM_TO_TEXTS } from '@taiga-ui/kit/tokens';
|
|
12
|
-
import { Observable } from 'rxjs';
|
|
12
|
+
import { Observable, merge, combineLatest } from 'rxjs';
|
|
13
13
|
|
|
14
14
|
const TUI_SLIDER_DEFAULT_OPTIONS = {
|
|
15
15
|
size: 'm',
|
|
@@ -58,7 +58,7 @@ let TuiSliderComponent = class TuiSliderComponent {
|
|
|
58
58
|
this.elementRef.nativeElement.value = `${newValue}`;
|
|
59
59
|
}
|
|
60
60
|
get valuePercentage() {
|
|
61
|
-
return (100 * (this.value - this.min)) / (this.max - this.min);
|
|
61
|
+
return (100 * (this.value - this.min)) / (this.max - this.min) || 0;
|
|
62
62
|
}
|
|
63
63
|
get segmentWidth() {
|
|
64
64
|
return 100 / Math.max(1, this.segments);
|
|
@@ -148,9 +148,7 @@ let TuiSliderKeyStepsDirective = class TuiSliderKeyStepsDirective extends Abstra
|
|
|
148
148
|
return ((_a = this.keySteps[this.keySteps.length - 1]) === null || _a === void 0 ? void 0 : _a[1]) || 100;
|
|
149
149
|
}
|
|
150
150
|
get controlValue() {
|
|
151
|
-
|
|
152
|
-
const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(this.keySteps, ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage);
|
|
153
|
-
return transformToControlValue(valuePercentage, lowerStep, upperStep);
|
|
151
|
+
return tuiPercentageToKeyStepValue(this.slider.valuePercentage, this.keySteps);
|
|
154
152
|
}
|
|
155
153
|
updateControlValue() {
|
|
156
154
|
this.updateValue(this.controlValue);
|
|
@@ -159,16 +157,16 @@ let TuiSliderKeyStepsDirective = class TuiSliderKeyStepsDirective extends Abstra
|
|
|
159
157
|
if (controlValue === null) {
|
|
160
158
|
return;
|
|
161
159
|
}
|
|
162
|
-
const
|
|
163
|
-
|
|
160
|
+
const clampedControlValue = clamp(controlValue, this.min, this.max);
|
|
161
|
+
tuiAssert.assert(controlValue === clampedControlValue, '\n[SliderKeySteps]: You cannot programmatically set value which is less/more than min/max');
|
|
162
|
+
this.slider.value = this.transformToNativeValue(clampedControlValue);
|
|
164
163
|
}
|
|
165
164
|
getFallbackValue() {
|
|
166
165
|
return 0;
|
|
167
166
|
}
|
|
168
|
-
transformToNativeValue(controlValue
|
|
167
|
+
transformToNativeValue(controlValue) {
|
|
169
168
|
const { min, max } = this.slider;
|
|
170
|
-
const
|
|
171
|
-
const newValuePercentage = (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;
|
|
169
|
+
const newValuePercentage = tuiKeyStepValueToPercentage(controlValue, this.keySteps);
|
|
172
170
|
return (newValuePercentage * (max - min)) / 100 + min;
|
|
173
171
|
}
|
|
174
172
|
};
|
|
@@ -180,7 +178,7 @@ TuiSliderKeyStepsDirective.ctorParameters = () => [
|
|
|
180
178
|
];
|
|
181
179
|
__decorate([
|
|
182
180
|
Input(),
|
|
183
|
-
tuiDefaultProp(
|
|
181
|
+
tuiDefaultProp(tuiCheckKeyStepsHaveMinMaxPercents, 'Should contain min and max values')
|
|
184
182
|
], TuiSliderKeyStepsDirective.prototype, "keySteps", void 0);
|
|
185
183
|
__decorate([
|
|
186
184
|
Output()
|
|
@@ -212,27 +210,12 @@ TuiSliderKeyStepsDirective = __decorate([
|
|
|
212
210
|
let TuiSliderTickLabelPipe = class TuiSliderTickLabelPipe {
|
|
213
211
|
transform(tickIndex, totalSegments, keySteps) {
|
|
214
212
|
const percentage = (100 / totalSegments) * tickIndex;
|
|
215
|
-
|
|
216
|
-
return transformToControlValue(percentage, upperStep, lowerStep);
|
|
213
|
+
return tuiPercentageToKeyStepValue(percentage, keySteps);
|
|
217
214
|
}
|
|
218
215
|
};
|
|
219
216
|
TuiSliderTickLabelPipe = __decorate([
|
|
220
217
|
Pipe({ name: 'tuiSliderTickLabel' })
|
|
221
218
|
], TuiSliderTickLabelPipe);
|
|
222
|
-
function checkHasMinMaxPercents(steps) {
|
|
223
|
-
return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);
|
|
224
|
-
}
|
|
225
|
-
function findKeyStepsBoundariesByFn(keySteps, fn) {
|
|
226
|
-
const keyStepUpperIndex = keySteps.findIndex((ketStep, i) => i && fn(ketStep));
|
|
227
|
-
const lowerStep = keySteps[keyStepUpperIndex - 1];
|
|
228
|
-
const upperStep = keySteps[keyStepUpperIndex];
|
|
229
|
-
return [lowerStep, upperStep];
|
|
230
|
-
}
|
|
231
|
-
function transformToControlValue(valuePercentage, [upperStepPercent, upperStepValue], [lowerStepPercent, lowerStepValue]) {
|
|
232
|
-
const ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);
|
|
233
|
-
const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;
|
|
234
|
-
return round(controlValue, TUI_FLOATING_PRECISION);
|
|
235
|
-
}
|
|
236
219
|
|
|
237
220
|
var TuiSliderOldComponent_1;
|
|
238
221
|
/**
|
|
@@ -316,12 +299,30 @@ const SLIDER_INTERACTION_KEYS = new Set([
|
|
|
316
299
|
* Native <input type='range' readonly> doesn't work.
|
|
317
300
|
* This directive imitates this native behaviour.
|
|
318
301
|
*/
|
|
302
|
+
// @dynamic
|
|
319
303
|
let TuiSliderReadonlyDirective = class TuiSliderReadonlyDirective {
|
|
320
|
-
constructor() {
|
|
304
|
+
constructor(elementRef, documentRef, destroy$) {
|
|
321
305
|
this.readonly = true;
|
|
306
|
+
const touchStart$ = typedFromEvent(elementRef.nativeElement, 'touchstart', {
|
|
307
|
+
passive: false,
|
|
308
|
+
});
|
|
309
|
+
const touchMove$ = typedFromEvent(documentRef, 'touchmove', {
|
|
310
|
+
passive: false,
|
|
311
|
+
});
|
|
312
|
+
const touchEnd$ = typedFromEvent(documentRef, 'touchend', {
|
|
313
|
+
passive: true,
|
|
314
|
+
});
|
|
315
|
+
const shouldPreventMove$ = merge(touchStart$.pipe(tap(e => this.preventEvent(e)), mapTo(true)), touchEnd$.pipe(mapTo(false)));
|
|
316
|
+
/**
|
|
317
|
+
* @bad TODO think about another solution.
|
|
318
|
+
* Keep in mind that preventing touch event (on slider) inside `@HostListener('touchstart')` doesn't work for mobile chrome.
|
|
319
|
+
*/
|
|
320
|
+
combineLatest([touchMove$, shouldPreventMove$])
|
|
321
|
+
.pipe(filter(([_, shouldPreventMove]) => shouldPreventMove), takeUntil(destroy$))
|
|
322
|
+
.subscribe(([moveEvent]) => this.preventEvent(moveEvent));
|
|
322
323
|
}
|
|
323
324
|
preventEvent(event) {
|
|
324
|
-
if (
|
|
325
|
+
if (event.cancelable && tuiCoerceBooleanProperty(this.readonly)) {
|
|
325
326
|
event.preventDefault();
|
|
326
327
|
}
|
|
327
328
|
}
|
|
@@ -331,13 +332,17 @@ let TuiSliderReadonlyDirective = class TuiSliderReadonlyDirective {
|
|
|
331
332
|
}
|
|
332
333
|
}
|
|
333
334
|
};
|
|
335
|
+
TuiSliderReadonlyDirective.ctorParameters = () => [
|
|
336
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
337
|
+
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
338
|
+
{ type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] }
|
|
339
|
+
];
|
|
334
340
|
__decorate([
|
|
335
341
|
Input(),
|
|
336
342
|
tuiDefaultProp()
|
|
337
343
|
], TuiSliderReadonlyDirective.prototype, "readonly", void 0);
|
|
338
344
|
__decorate([
|
|
339
|
-
HostListener('mousedown', ['$event'])
|
|
340
|
-
HostListener('touchstart', ['$event'])
|
|
345
|
+
HostListener('mousedown', ['$event'])
|
|
341
346
|
], TuiSliderReadonlyDirective.prototype, "preventEvent", null);
|
|
342
347
|
__decorate([
|
|
343
348
|
HostListener('keydown', ['$event'])
|
|
@@ -345,7 +350,11 @@ __decorate([
|
|
|
345
350
|
TuiSliderReadonlyDirective = __decorate([
|
|
346
351
|
Directive({
|
|
347
352
|
selector: 'input[tuiSlider][readonly]',
|
|
348
|
-
|
|
353
|
+
providers: [TuiDestroyService],
|
|
354
|
+
}),
|
|
355
|
+
__param(0, Inject(ElementRef)),
|
|
356
|
+
__param(1, Inject(DOCUMENT)),
|
|
357
|
+
__param(2, Inject(TuiDestroyService))
|
|
349
358
|
], TuiSliderReadonlyDirective);
|
|
350
359
|
|
|
351
360
|
let TuiSliderModule = class TuiSliderModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-slider.js","sources":["ng://@taiga-ui/kit/components/slider/slider-options.ts","ng://@taiga-ui/kit/components/slider/slider.component.ts","ng://@taiga-ui/kit/components/slider/slider-key-steps.directive.ts","ng://@taiga-ui/kit/components/slider/slider-old.component.ts","ng://@taiga-ui/kit/components/slider/slider-readonly.directive.ts","ng://@taiga-ui/kit/components/slider/slider.module.ts","ng://@taiga-ui/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiSliderOptions {\n readonly size: TuiSizeS;\n readonly trackColor: string;\n}\n\nexport const TUI_SLIDER_DEFAULT_OPTIONS: TuiSliderOptions = {\n size: 'm',\n trackColor: 'var(--tui-base-03)',\n};\n\nexport const TUI_SLIDER_OPTIONS = new InjectionToken<TuiSliderOptions>(\n 'Default parameters for Slider component',\n {factory: () => TUI_SLIDER_DEFAULT_OPTIONS},\n);\n\nexport function tuiSliderOptionsProvider(\n options: Partial<TuiSliderOptions>,\n): ValueProvider {\n return {\n provide: TUI_SLIDER_OPTIONS,\n useValue: {...TUI_SLIDER_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n isEdgeOlderThan,\n tuiDefaultProp,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\nimport {take} from 'rxjs/operators';\n\nimport {TUI_SLIDER_OPTIONS, TuiSliderOptions} from './slider-options';\n\n@Component({\n /**\n * We have to call our component as `<input tuiSlider type=\"range\" ... />`\n * because otherwise built-in angular\n * {@link https://github.com/angular/angular/blob/master/packages/forms/src/directives/range_value_accessor.ts#L45 RangeValueAccessor}\n * cannot be matched by its CSS selector.\n */\n selector: 'input[type=range][tuiSlider]',\n template: ``,\n styleUrls: ['./slider.style.less'],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for {@link valuePercentage} function) when we drag thumb of the input.\n */\n '(input)': '0',\n '[style.--tui-slider-track-color]': 'options.trackColor',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSliderComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n segments = 1;\n\n get min(): number {\n return Number(this.elementRef.nativeElement.min);\n }\n\n get max(): number {\n return Number(this.elementRef.nativeElement.max || 100);\n }\n\n get step(): number {\n return Number(this.elementRef.nativeElement.step) || 1;\n }\n\n get value(): number {\n return Number(this.elementRef.nativeElement.value) || 0;\n }\n\n set value(newValue: number) {\n this.elementRef.nativeElement.value = `${newValue}`;\n }\n\n @HostBinding('style.--tui-slider-fill-percentage.%')\n get valuePercentage(): number {\n return (100 * (this.value - this.min)) / (this.max - this.min);\n }\n\n @HostBinding('style.--tui-slider-segment-width.%')\n get segmentWidth(): number {\n return 100 / Math.max(1, this.segments);\n }\n\n @HostBinding('class._old-edge')\n get isOldEdge(): boolean {\n return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_SLIDER_OPTIONS) readonly options: TuiSliderOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n control.valueChanges?.pipe(watch(changeDetectorRef), take(1)).subscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Pipe,\n PipeTransform,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n round,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {map} from 'rxjs/operators';\n\nimport {TuiSliderComponent} from './slider.component';\n\n// @dynamic\n@Directive({\n selector: 'input[tuiSlider][keySteps]',\n host: {\n '[attr.aria-valuenow]': 'controlValue',\n '[attr.aria-valuemin]': 'min',\n '[attr.aria-valuemax]': 'max',\n },\n})\nexport class TuiSliderKeyStepsDirective\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp(checkHasMinMaxPercents, 'Should contain min and max values')\n keySteps: TuiKeySteps = [];\n\n @Output()\n keyStepsInput = typedFromEvent(this.elementRef.nativeElement, 'input').pipe(\n map(() => this.controlValue),\n );\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get min(): number {\n return this.keySteps[0]?.[1] || 0;\n }\n\n get max(): number {\n return this.keySteps[this.keySteps.length - 1]?.[1] || 100;\n }\n\n get controlValue(): number {\n const {valuePercentage} = this.slider;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n\n return transformToControlValue(valuePercentage, lowerStep, upperStep);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiSliderComponent) private readonly slider: TuiSliderComponent,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostListener('change')\n updateControlValue() {\n this.updateValue(this.controlValue);\n }\n\n writeValue(controlValue: number | null) {\n if (controlValue === null) {\n return;\n }\n\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n this.keySteps,\n ([_, keyStepValue]) => controlValue <= keyStepValue,\n );\n\n this.slider.value = this.transformToNativeValue(\n controlValue,\n lowerStep,\n upperStep,\n );\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private transformToNativeValue(\n controlValue: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n ): number {\n const {min, max} = this.slider;\n const ratio = (controlValue - lowerStepValue) / (upperStepValue - lowerStepValue);\n const newValuePercentage =\n (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n\n return (newValuePercentage * (max - min)) / 100 + min;\n }\n}\n\n/**\n * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.\n * TODO delete it in v3.0\n *\n */\n@Pipe({name: 'tuiSliderTickLabel'})\nexport class TuiSliderTickLabelPipe implements PipeTransform {\n transform(tickIndex: number, totalSegments: number, keySteps: TuiKeySteps): number {\n const percentage = (100 / totalSegments) * tickIndex;\n const [lowerStep, upperStep] = findKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => percentage <= keyStepPercentage,\n );\n\n return transformToControlValue(percentage, upperStep, lowerStep);\n }\n}\n\nfunction checkHasMinMaxPercents(steps: TuiKeySteps): boolean {\n return !steps.length || (steps[0][0] === 0 && steps[steps.length - 1][0] === 100);\n}\n\nfunction findKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((ketStep, i) => i && fn(ketStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nfunction transformToControlValue(\n valuePercentage: number,\n [upperStepPercent, upperStepValue]: [number, number],\n [lowerStepPercent, lowerStepValue]: [number, number],\n): number {\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return round(controlValue, TUI_FLOATING_PRECISION);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiSlider} from '@taiga-ui/kit/abstract';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated use {@link TuiSliderComponent} instead\n * TODO remove in 3.0\n */\n// @dynamic\n@Component({\n selector: 'tui-slider',\n templateUrl: '../../abstract/slider/slider.common.template.html',\n styleUrls: [\n '../../abstract/slider/slider.common.style.less',\n './slider-old.style.less',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiSliderOldComponent),\n },\n ],\n})\nexport class TuiSliderOldComponent\n extends AbstractTuiSlider<number>\n implements TuiFocusableElementAccessor\n{\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS) fromToTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef, documentRef, fromToTexts$);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.dotRight ? this.dotRight.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get left(): number {\n return 0;\n }\n\n get right(): number {\n return 100 - 100 * this.getFractionFromValue(this.value);\n }\n\n processValue(value: number) {\n this.updateValue(this.valueGuard(value));\n }\n\n decrement() {\n this.processStep(false);\n }\n\n increment() {\n this.processStep(true);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n protected processStep(increment: boolean) {\n const fraction = this.getFractionFromValue(this.value);\n const step = this.computedStep;\n const value = this.getValueFromFraction(\n increment ? fraction + step : fraction - step,\n );\n\n this.processValue(value);\n }\n}\n","import {Directive, HostListener, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\nconst SLIDER_INTERACTION_KEYS = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n]);\n\n/**\n * Native <input type='range' readonly> doesn't work.\n * This directive imitates this native behaviour.\n */\n@Directive({\n selector: 'input[tuiSlider][readonly]',\n})\nexport class TuiSliderReadonlyDirective {\n @Input()\n @tuiDefaultProp()\n readonly: '' | boolean = true;\n\n @HostListener('mousedown', ['$event'])\n @HostListener('touchstart', ['$event'])\n preventEvent(event: Event) {\n if (this.readonly === '' || this.readonly) {\n event.preventDefault();\n }\n }\n\n @HostListener('keydown', ['$event'])\n preventKeyboardInteraction(event: KeyboardEvent) {\n if (SLIDER_INTERACTION_KEYS.has(event.key)) {\n this.preventEvent(event);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiFormatNumberPipeModule} from '@taiga-ui/core';\n\nimport {TuiSliderComponent} from './slider.component';\nimport {\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n} from './slider-key-steps.directive';\nimport {TuiSliderOldComponent} from './slider-old.component';\nimport {TuiSliderReadonlyDirective} from './slider-readonly.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiRepeatTimesModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiActiveZoneModule,\n TuiFormatNumberPipeModule,\n ],\n declarations: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderReadonlyDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n exports: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderReadonlyDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n})\nexport class TuiSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,oBAAoB;EAClC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC,EAAC,OAAO,EAAE,MAAM,0BAA0B,EAAC,EAC7C;SAEc,wBAAwB,CACpC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E;YACV,kBAAkB;YAClB,0BAA0B;YAC1B,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;QACD,OAAO,EAAE;YACL,kBAAkB;YAClB,0BAA0B;YAC1B,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;KACJ,CAAC;GACW,eAAe,CAAG;;AC1C/B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-slider.js","sources":["ng://@taiga-ui/kit/components/slider/slider-options.ts","ng://@taiga-ui/kit/components/slider/slider.component.ts","ng://@taiga-ui/kit/components/slider/slider-key-steps.directive.ts","ng://@taiga-ui/kit/components/slider/slider-old.component.ts","ng://@taiga-ui/kit/components/slider/slider-readonly.directive.ts","ng://@taiga-ui/kit/components/slider/slider.module.ts","ng://@taiga-ui/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeS} from '@taiga-ui/core';\n\nexport interface TuiSliderOptions {\n readonly size: TuiSizeS;\n readonly trackColor: string;\n}\n\nexport const TUI_SLIDER_DEFAULT_OPTIONS: TuiSliderOptions = {\n size: 'm',\n trackColor: 'var(--tui-base-03)',\n};\n\nexport const TUI_SLIDER_OPTIONS = new InjectionToken<TuiSliderOptions>(\n 'Default parameters for Slider component',\n {factory: () => TUI_SLIDER_DEFAULT_OPTIONS},\n);\n\nexport function tuiSliderOptionsProvider(\n options: Partial<TuiSliderOptions>,\n): ValueProvider {\n return {\n provide: TUI_SLIDER_OPTIONS,\n useValue: {...TUI_SLIDER_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n isEdgeOlderThan,\n tuiDefaultProp,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\nimport {take} from 'rxjs/operators';\n\nimport {TUI_SLIDER_OPTIONS, TuiSliderOptions} from './slider-options';\n\n@Component({\n /**\n * We have to call our component as `<input tuiSlider type=\"range\" ... />`\n * because otherwise built-in angular\n * {@link https://github.com/angular/angular/blob/master/packages/forms/src/directives/range_value_accessor.ts#L45 RangeValueAccessor}\n * cannot be matched by its CSS selector.\n */\n selector: 'input[type=range][tuiSlider]',\n template: ``,\n styleUrls: ['./slider.style.less'],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for {@link valuePercentage} function) when we drag thumb of the input.\n */\n '(input)': '0',\n '[style.--tui-slider-track-color]': 'options.trackColor',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSliderComponent {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n segments = 1;\n\n get min(): number {\n return Number(this.elementRef.nativeElement.min);\n }\n\n get max(): number {\n return Number(this.elementRef.nativeElement.max || 100);\n }\n\n get step(): number {\n return Number(this.elementRef.nativeElement.step) || 1;\n }\n\n get value(): number {\n return Number(this.elementRef.nativeElement.value) || 0;\n }\n\n set value(newValue: number) {\n this.elementRef.nativeElement.value = `${newValue}`;\n }\n\n @HostBinding('style.--tui-slider-fill-percentage.%')\n get valuePercentage(): number {\n return (100 * (this.value - this.min)) / (this.max - this.min) || 0;\n }\n\n @HostBinding('style.--tui-slider-segment-width.%')\n get segmentWidth(): number {\n return 100 / Math.max(1, this.segments);\n }\n\n @HostBinding('class._old-edge')\n get isOldEdge(): boolean {\n return isEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_SLIDER_OPTIONS) readonly options: TuiSliderOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n if (control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n control.valueChanges?.pipe(watch(changeDetectorRef), take(1)).subscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Pipe,\n PipeTransform,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n clamp,\n isNativeFocused,\n tuiAssert,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {\n tuiCheckKeyStepsHaveMinMaxPercents,\n tuiKeyStepValueToPercentage,\n tuiPercentageToKeyStepValue,\n} from '@taiga-ui/kit/utils';\nimport {map} from 'rxjs/operators';\n\nimport {TuiSliderComponent} from './slider.component';\n\n// @dynamic\n@Directive({\n selector: 'input[tuiSlider][keySteps]',\n host: {\n '[attr.aria-valuenow]': 'controlValue',\n '[attr.aria-valuemin]': 'min',\n '[attr.aria-valuemax]': 'max',\n },\n})\nexport class TuiSliderKeyStepsDirective\n extends AbstractTuiControl<number>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp(\n tuiCheckKeyStepsHaveMinMaxPercents,\n 'Should contain min and max values',\n )\n keySteps: TuiKeySteps = [];\n\n @Output()\n keyStepsInput = typedFromEvent(this.elementRef.nativeElement, 'input').pipe(\n map(() => this.controlValue),\n );\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get min(): number {\n return this.keySteps[0]?.[1] || 0;\n }\n\n get max(): number {\n return this.keySteps[this.keySteps.length - 1]?.[1] || 100;\n }\n\n get controlValue(): number {\n return tuiPercentageToKeyStepValue(this.slider.valuePercentage, this.keySteps);\n }\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiSliderComponent) private readonly slider: TuiSliderComponent,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostListener('change')\n updateControlValue(): void {\n this.updateValue(this.controlValue);\n }\n\n writeValue(controlValue: number | null): void {\n if (controlValue === null) {\n return;\n }\n\n const clampedControlValue = clamp(controlValue, this.min, this.max);\n\n tuiAssert.assert(\n controlValue === clampedControlValue,\n '\\n[SliderKeySteps]: You cannot programmatically set value which is less/more than min/max',\n );\n\n this.slider.value = this.transformToNativeValue(clampedControlValue);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private transformToNativeValue(controlValue: number): number {\n const {min, max} = this.slider;\n const newValuePercentage = tuiKeyStepValueToPercentage(\n controlValue,\n this.keySteps,\n );\n\n return (newValuePercentage * (max - min)) / 100 + min;\n }\n}\n\n/**\n * @deprecated DONT USE IT! It is just temporary solution for internal purposes only. We will delete it in next major release.\n * TODO delete it in v3.0\n *\n */\n@Pipe({name: 'tuiSliderTickLabel'})\nexport class TuiSliderTickLabelPipe implements PipeTransform {\n transform(tickIndex: number, totalSegments: number, keySteps: TuiKeySteps): number {\n const percentage = (100 / totalSegments) * tickIndex;\n\n return tuiPercentageToKeyStepValue(percentage, keySteps);\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiSlider} from '@taiga-ui/kit/abstract';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated use {@link TuiSliderComponent} instead\n * TODO remove in 3.0\n */\n// @dynamic\n@Component({\n selector: 'tui-slider',\n templateUrl: '../../abstract/slider/slider.common.template.html',\n styleUrls: [\n '../../abstract/slider/slider.common.style.less',\n './slider-old.style.less',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiSliderOldComponent),\n },\n ],\n})\nexport class TuiSliderOldComponent\n extends AbstractTuiSlider<number>\n implements TuiFocusableElementAccessor\n{\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS) fromToTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef, documentRef, fromToTexts$);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.dotRight ? this.dotRight.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get left(): number {\n return 0;\n }\n\n get right(): number {\n return 100 - 100 * this.getFractionFromValue(this.value);\n }\n\n processValue(value: number): void {\n this.updateValue(this.valueGuard(value));\n }\n\n decrement(): void {\n this.processStep(false);\n }\n\n increment(): void {\n this.processStep(true);\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n protected processStep(increment: boolean): void {\n const fraction = this.getFractionFromValue(this.value);\n const step = this.computedStep;\n const value = this.getValueFromFraction(\n increment ? fraction + step : fraction - step,\n );\n\n this.processValue(value);\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, HostListener, Inject, Input} from '@angular/core';\nimport {\n tuiCoerceBooleanProperty,\n tuiDefaultProp,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {combineLatest, merge, Observable} from 'rxjs';\nimport {filter, mapTo, takeUntil, tap} from 'rxjs/operators';\n\nconst SLIDER_INTERACTION_KEYS = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n]);\n\n/**\n * Native <input type='range' readonly> doesn't work.\n * This directive imitates this native behaviour.\n */\n// @dynamic\n@Directive({\n selector: 'input[tuiSlider][readonly]',\n providers: [TuiDestroyService],\n})\nexport class TuiSliderReadonlyDirective {\n @Input()\n @tuiDefaultProp()\n readonly: string | boolean = true;\n\n constructor(\n @Inject(ElementRef) elementRef: ElementRef<HTMLInputElement>,\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TuiDestroyService)\n destroy$: Observable<unknown>,\n ) {\n const touchStart$ = typedFromEvent(elementRef.nativeElement, 'touchstart', {\n passive: false,\n });\n const touchMove$ = typedFromEvent(documentRef, 'touchmove', {\n passive: false,\n });\n const touchEnd$ = typedFromEvent(documentRef, 'touchend', {\n passive: true,\n });\n\n const shouldPreventMove$ = merge(\n touchStart$.pipe(\n tap(e => this.preventEvent(e)),\n mapTo(true),\n ),\n touchEnd$.pipe(mapTo(false)),\n );\n\n /**\n * @bad TODO think about another solution.\n * Keep in mind that preventing touch event (on slider) inside `@HostListener('touchstart')` doesn't work for mobile chrome.\n */\n combineLatest([touchMove$, shouldPreventMove$])\n .pipe(\n filter(([_, shouldPreventMove]) => shouldPreventMove),\n takeUntil(destroy$),\n )\n .subscribe(([moveEvent]) => this.preventEvent(moveEvent));\n }\n\n @HostListener('mousedown', ['$event'])\n preventEvent(event: Event): void {\n if (event.cancelable && tuiCoerceBooleanProperty(this.readonly)) {\n event.preventDefault();\n }\n }\n\n @HostListener('keydown', ['$event'])\n preventKeyboardInteraction(event: KeyboardEvent): void {\n if (SLIDER_INTERACTION_KEYS.has(event.key)) {\n this.preventEvent(event);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiFormatNumberPipeModule} from '@taiga-ui/core';\n\nimport {TuiSliderComponent} from './slider.component';\nimport {\n TuiSliderKeyStepsDirective,\n TuiSliderTickLabelPipe,\n} from './slider-key-steps.directive';\nimport {TuiSliderOldComponent} from './slider-old.component';\nimport {TuiSliderReadonlyDirective} from './slider-readonly.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiRepeatTimesModule,\n TuiFocusableModule,\n TuiFocusVisibleModule,\n TuiActiveZoneModule,\n TuiFormatNumberPipeModule,\n ],\n declarations: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderReadonlyDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n exports: [\n TuiSliderComponent,\n TuiSliderKeyStepsDirective,\n TuiSliderReadonlyDirective,\n TuiSliderTickLabelPipe,\n TuiSliderOldComponent,\n ],\n})\nexport class TuiSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,oBAAoB;EAClC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC,EAAC,OAAO,EAAE,MAAM,0BAA0B,EAAC,EAC7C;SAEc,wBAAwB,CACpC,OAAkC;IAElC,OAAO;QACH,OAAO,EAAE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AC,GAAG,CAAC,EAAE;YACxC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;KACJ;EACJ;;YAhDuC,UAAU,uBAAzC,MAAM,SAAC,UAAU;YACa,QAAQ,uBAAtC,MAAM,SAAC,QAAQ;YAEN,UAAU,uBADnB,MAAM,SAAC,iBAAiB;;AAL7B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;4DACiB;AAuClC;IADC,YAAY,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC;8DAKrC;AAGD;IADC,YAAY,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAC;4EAKnC;AArDQ,0BAA0B;IAJtC,SAAS,CAAC;QACP,QAAQ,EAAE,4BAA4B;QACtC,SAAS,EAAE,CAAC,iBAAiB,CAAC;KACjC,CAAC;IAOO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GARrB,0BAA0B,CAsDtC;;IC3CY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAxB3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,oBAAoB;YACpB,kBAAkB;YAClB,qBAAqB;YACrB,mBAAmB;YACnB,yBAAyB;SAC5B;QACD,YAAY,EAAE;YACV,kBAAkB;YAClB,0BAA0B;YAC1B,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;QACD,OAAO,EAAE;YACL,kBAAkB;YAClB,0BAA0B;YAC1B,0BAA0B;YAC1B,sBAAsB;YACtB,qBAAqB;SACxB;KACJ,CAAC;GACW,eAAe,CAAG;;AC1C/B;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { EventEmitter, ContentChildren, forwardRef, ElementRef, Input, HostBinding, Output, HostListener, Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';
|
|
3
|
-
import { EMPTY_QUERY, itemsQueryListObservable, getOriginalArrayFromQueryList, moveFocus, tuiDefaultProp, tuiPure, TuiFocusVisibleService, TuiDestroyService } from '@taiga-ui/cdk';
|
|
3
|
+
import { EMPTY_QUERY, itemsQueryListObservable, getOriginalArrayFromQueryList, tuiAssertIsHTMLElement, moveFocus, tuiDefaultProp, tuiPure, TuiFocusVisibleService, TuiDestroyService } from '@taiga-ui/cdk';
|
|
4
4
|
import { TuiRouterLinkActiveService, TuiSvgModule } from '@taiga-ui/core';
|
|
5
5
|
import { identity, Observable } from 'rxjs';
|
|
6
6
|
import { delay, filter } from 'rxjs/operators';
|
|
@@ -46,6 +46,7 @@ let TuiStepperComponent = class TuiStepperComponent {
|
|
|
46
46
|
this.activeItemIndexChange.emit(index);
|
|
47
47
|
}
|
|
48
48
|
moveFocus(current, step) {
|
|
49
|
+
tuiAssertIsHTMLElement(current);
|
|
49
50
|
const steps = getOriginalArrayFromQueryList(this.steps).map(({ nativeElement }) => nativeElement);
|
|
50
51
|
moveFocus(steps.indexOf(current), steps, step);
|
|
51
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-stepper.js","sources":["ng://@taiga-ui/kit/components/stepper/stepper.component.ts","ng://@taiga-ui/kit/components/stepper/step/step.component.ts","ng://@taiga-ui/kit/components/stepper/stepper.module.ts","ng://@taiga-ui/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getOriginalArrayFromQueryList,\n itemsQueryListObservable,\n moveFocus,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiOrientationT} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {delay} from 'rxjs/operators';\n\nimport {TuiStepComponent} from './step/step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n templateUrl: './stepper.template.html',\n styleUrls: ['./stepper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiStepperComponent {\n @ContentChildren(forwardRef(() => TuiStepComponent), {read: ElementRef})\n private readonly steps: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n @HostBinding('attr.data-orientation')\n @tuiDefaultProp()\n orientation: TuiOrientationT = 'horizontal';\n\n @Input()\n @tuiDefaultProp()\n activeItemIndex = 0;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n @tuiPure\n get changes$(): Observable<unknown> {\n // Delay is required to trigger change detection after steps are rendered\n // so they can update their \"active\" status\n return itemsQueryListObservable(this.steps).pipe(delay(0));\n }\n\n @HostListener('keydown.arrowRight', ['$event', '1'])\n @HostListener('keydown.arrowLeft', ['$event', '-1'])\n onHorizontal(event: Event, step: number) {\n if (this.orientation !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n @HostListener('keydown.arrowDown', ['$event', '1'])\n @HostListener('keydown.arrowUp', ['$event', '-1'])\n onVertical(event: Event, step: number) {\n if (this.orientation !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n indexOf(step: HTMLElement): number {\n return getOriginalArrayFromQueryList(this.steps).findIndex(\n ({nativeElement}) => nativeElement === step,\n );\n }\n\n isActive(index: number): boolean {\n return index === this.activeItemIndex;\n }\n\n activate(index: number) {\n if (this.activeItemIndex === index) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n\n private moveFocus(current: EventTarget, step: number) {\n const steps = getOriginalArrayFromQueryList(this.steps).map(\n ({nativeElement}) => nativeElement,\n );\n\n moveFocus(steps.indexOf(current as HTMLElement), steps, step);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {tuiDefaultProp, TuiDestroyService, TuiFocusVisibleService} from '@taiga-ui/cdk';\nimport {TuiRouterLinkActiveService} from '@taiga-ui/core';\nimport {identity, Observable} from 'rxjs';\nimport {filter} from 'rxjs/operators';\n\nimport {TuiStepperComponent} from '../stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n templateUrl: './step.template.html',\n styleUrls: ['./step.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, TuiRouterLinkActiveService, TuiFocusVisibleService],\n host: {\n type: 'button',\n },\n})\nexport class TuiStepComponent {\n @Input()\n @HostBinding('attr.data-state')\n @tuiDefaultProp()\n state: 'normal' | 'pass' | 'error' = 'normal';\n\n @Input()\n @tuiDefaultProp()\n icon = '';\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n constructor(\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiRouterLinkActiveService) routerLinkActive$: Observable<boolean>,\n @Inject(TuiStepperComponent) private readonly stepper: TuiStepperComponent,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n routerLinkActive$.pipe(filter(identity)).subscribe(() => {\n this.activate();\n });\n\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n @HostBinding('class._active')\n get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n @HostBinding('class._vertical')\n get isVertical(): boolean {\n return this.stepper.orientation === 'vertical';\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.isActive ? 0 : -1;\n }\n\n get index(): number {\n return this.stepper.indexOf(this.elementRef.nativeElement);\n }\n\n @HostListener('click')\n activate() {\n this.stepper.activate(this.index);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiStepComponent} from './step/step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiStepperComponent, TuiStepComponent],\n exports: [TuiStepperComponent, TuiStepComponent],\n})\nexport class TuiStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAiCa,mBAAmB,GAAhC,MAAa,mBAAmB;IAAhC;QAEqB,UAAK,GAAuC,WAAW,CAAC;QAKzE,gBAAW,GAAoB,YAAY,CAAC;QAI5C,oBAAe,GAAG,CAAC,CAAC;QAGX,0BAAqB,GAAG,IAAI,YAAY,EAAU,CAAC;KAyD/D;IAtDG,IAAI,QAAQ;;;QAGR,OAAO,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9D;IAID,YAAY,CAAC,KAAY,EAAE,IAAY;QACnC,IAAI,IAAI,CAAC,WAAW,KAAK,YAAY,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpD,OAAO;SACV;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACtC;IAID,UAAU,CAAC,KAAY,EAAE,IAAY;QACjC,IAAI,IAAI,CAAC,WAAW,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YAClD,OAAO;SACV;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACtC;IAED,OAAO,CAAC,IAAiB;QACrB,OAAO,6BAA6B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CACtD,CAAC,EAAC,aAAa,EAAC,KAAK,aAAa,KAA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D,MAAM,SAAC,UAAU;;AAbtB;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,iBAAiB,CAAC;IAC9B,cAAc,EAAE;+CAC6B;AAI9C;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;8CACP;AAGV;IADC,WAAW,CAAC,sBAAsB,CAAC;sDACf;AAkBrB;IADC,WAAW,CAAC,eAAe,CAAC;gDAG5B;AAGD;IADC,WAAW,CAAC,iBAAiB,CAAC;kDAG9B;AAGD;IADC,WAAW,CAAC,UAAU,CAAC;gDAGvB;AAOD;IADC,YAAY,CAAC,OAAO,CAAC;gDAGrB;AAlDQ,gBAAgB;IAX5B,SAAS,CAAC;QACP,QAAQ,EACJ,yFAAyF;QAC7F,wWAAmC;QAEnC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE,CAAC,iBAAiB,EAAE,0BAA0B,EAAE,sBAAsB,CAAC;QAClF,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;;KACJ,CAAC;IAeO,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;IAC9B,WAAA,MAAM,CAAC,0BAA0B,CAAC,CAAA;IAClC,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;IAC3B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GAjBd,gBAAgB,CAmD5B;;IClEY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAL5B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;QACrD,OAAO,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;KACnD,CAAC;GACW,gBAAgB,CAAG;;ACZhC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-stepper.js","sources":["ng://@taiga-ui/kit/components/stepper/stepper.component.ts","ng://@taiga-ui/kit/components/stepper/step/step.component.ts","ng://@taiga-ui/kit/components/stepper/stepper.module.ts","ng://@taiga-ui/kit/components/stepper/taiga-ui-kit-components-stepper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getOriginalArrayFromQueryList,\n itemsQueryListObservable,\n moveFocus,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiOrientationT} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {delay} from 'rxjs/operators';\n\nimport {TuiStepComponent} from './step/step.component';\n\n@Component({\n selector: 'tui-stepper, nav[tuiStepper]',\n templateUrl: './stepper.template.html',\n styleUrls: ['./stepper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiStepperComponent {\n @ContentChildren(forwardRef(() => TuiStepComponent), {read: ElementRef})\n private readonly steps: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n @HostBinding('attr.data-orientation')\n @tuiDefaultProp()\n orientation: TuiOrientationT = 'horizontal';\n\n @Input()\n @tuiDefaultProp()\n activeItemIndex = 0;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n @tuiPure\n get changes$(): Observable<unknown> {\n // Delay is required to trigger change detection after steps are rendered\n // so they can update their \"active\" status\n return itemsQueryListObservable(this.steps).pipe(delay(0));\n }\n\n @HostListener('keydown.arrowRight', ['$event', '1'])\n @HostListener('keydown.arrowLeft', ['$event', '-1'])\n onHorizontal(event: Event, step: number): void {\n if (this.orientation !== 'horizontal' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n @HostListener('keydown.arrowDown', ['$event', '1'])\n @HostListener('keydown.arrowUp', ['$event', '-1'])\n onVertical(event: Event, step: number): void {\n if (this.orientation !== 'vertical' || !event.target) {\n return;\n }\n\n event.preventDefault();\n this.moveFocus(event.target, step);\n }\n\n indexOf(step: HTMLElement): number {\n return getOriginalArrayFromQueryList(this.steps).findIndex(\n ({nativeElement}) => nativeElement === step,\n );\n }\n\n isActive(index: number): boolean {\n return index === this.activeItemIndex;\n }\n\n activate(index: number): void {\n if (this.activeItemIndex === index) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n\n private moveFocus(current: EventTarget, step: number): void {\n tuiAssertIsHTMLElement(current);\n\n const steps = getOriginalArrayFromQueryList(this.steps).map(\n ({nativeElement}) => nativeElement,\n );\n\n moveFocus(steps.indexOf(current), steps, step);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {tuiDefaultProp, TuiDestroyService, TuiFocusVisibleService} from '@taiga-ui/cdk';\nimport {TuiRouterLinkActiveService} from '@taiga-ui/core';\nimport {identity, Observable} from 'rxjs';\nimport {filter} from 'rxjs/operators';\n\nimport {TuiStepperComponent} from '../stepper.component';\n\n@Component({\n selector:\n 'button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]',\n templateUrl: './step.template.html',\n styleUrls: ['./step.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, TuiRouterLinkActiveService, TuiFocusVisibleService],\n host: {\n type: 'button',\n },\n})\nexport class TuiStepComponent {\n @Input()\n @HostBinding('attr.data-state')\n @tuiDefaultProp()\n state: 'normal' | 'pass' | 'error' = 'normal';\n\n @Input()\n @tuiDefaultProp()\n icon = '';\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n constructor(\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiRouterLinkActiveService) routerLinkActive$: Observable<boolean>,\n @Inject(TuiStepperComponent) private readonly stepper: TuiStepperComponent,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n routerLinkActive$.pipe(filter(identity)).subscribe(() => {\n this.activate();\n });\n\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n @HostBinding('class._active')\n get isActive(): boolean {\n return this.stepper.isActive(this.index);\n }\n\n @HostBinding('class._vertical')\n get isVertical(): boolean {\n return this.stepper.orientation === 'vertical';\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.isActive ? 0 : -1;\n }\n\n get index(): number {\n return this.stepper.indexOf(this.elementRef.nativeElement);\n }\n\n @HostListener('click')\n activate(): void {\n this.stepper.activate(this.index);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiStepComponent} from './step/step.component';\nimport {TuiStepperComponent} from './stepper.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiStepperComponent, TuiStepComponent],\n exports: [TuiStepperComponent, TuiStepComponent],\n})\nexport class TuiStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAkCa,mBAAmB,GAAhC,MAAa,mBAAmB;IAAhC;QAEqB,UAAK,GAAuC,WAAW,CAAC;QAKzE,gBAAW,GAAoB,YAAY,CAAC;QAI5C,oBAAe,GAAG,CAAC,CAAC;QAGX,0BAAqB,GAAG,IAAI,YAAY,EAAU,CAAC;KA2D/D;IAxDG,IAAI,QAAQ;;;QAGR,OAAO,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9D;IAID,YAAY,CAAC,KAAY,EAAE,IAAY;QACnC,IAAI,IAAI,CAAC,WAAW,KAAK,YAAY,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpD,OAAO;SACV;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAA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AA,MAAM,CAAC,UAAU,CAAC,CAAA;GAjBd,gBAAgB,CAmD5B;;IClEY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAL5B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;QACrD,OAAO,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;KACnD,CAAC;GACW,gBAAgB,CAAG;;ACZhC;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { TemplateRef, Inject, Directive, InjectionToken, ElementRef, Optional, HostBinding, Component, ChangeDetectionStrategy, EventEmitter, Renderer2, ChangeDetectorRef, ContentChildren, forwardRef, Input, Output, HostListener, ViewChild, NgZone, NgModule } from '@angular/core';
|
|
3
3
|
import { RouterLinkActive } from '@angular/router';
|
|
4
|
-
import { TuiDestroyService, TuiFocusVisibleService, typedFromEvent, tuiCustomEvent, isNativeFocused, setNativeFocused, TUI_IS_IOS, TUI_IS_ANDROID, EMPTY_QUERY, moveFocus, TuiResizeService, tuiDefaultProp, getClosestFocusable, toInt, tuiZonefree, px, TuiFocusableModule } from '@taiga-ui/cdk';
|
|
4
|
+
import { TuiDestroyService, TuiFocusVisibleService, typedFromEvent, tuiCustomEvent, isNativeFocused, setNativeFocused, TUI_IS_IOS, TUI_IS_ANDROID, EMPTY_QUERY, moveFocus, TuiResizeService, tuiDefaultProp, tuiAssertIsHTMLElement, getClosestFocusable, toInt, tuiZonefree, px, TuiFocusableModule } from '@taiga-ui/cdk';
|
|
5
5
|
import { TuiRouterLinkActiveService, MODE_PROVIDER, TUI_MODE, TuiHostedDropdownModule, TuiSvgModule } from '@taiga-ui/core';
|
|
6
6
|
import { TUI_TAB_MARGIN, TUI_MOBILE_AWARE, TUI_MORE_WORD } from '@taiga-ui/kit/tokens';
|
|
7
7
|
import { EMPTY, merge, identity, Observable, ReplaySubject, of } from 'rxjs';
|
|
@@ -124,6 +124,19 @@ TuiTabComponent = __decorate([
|
|
|
124
124
|
__param(8, Inject(TuiFocusVisibleService))
|
|
125
125
|
], TuiTabComponent);
|
|
126
126
|
|
|
127
|
+
const TUI_TABS_DEFAULT_OPTIONS = {
|
|
128
|
+
underline: true,
|
|
129
|
+
exposeActive: true,
|
|
130
|
+
itemsLimit: Infinity,
|
|
131
|
+
};
|
|
132
|
+
const TUI_TABS_OPTIONS = new InjectionToken('Default parameters for tabs component', {
|
|
133
|
+
factory: () => TUI_TABS_DEFAULT_OPTIONS,
|
|
134
|
+
});
|
|
135
|
+
const tuiTabsOptionsProvider = (options) => ({
|
|
136
|
+
provide: TUI_TABS_OPTIONS,
|
|
137
|
+
useValue: Object.assign(Object.assign({}, TUI_TABS_DEFAULT_OPTIONS), options),
|
|
138
|
+
});
|
|
139
|
+
|
|
127
140
|
const TAB_ACTIVE_CLASS = '_active';
|
|
128
141
|
// TODO: remove in ivy compilation
|
|
129
142
|
const OBSERVER_INIT = {
|
|
@@ -131,11 +144,12 @@ const OBSERVER_INIT = {
|
|
|
131
144
|
};
|
|
132
145
|
// @dynamic
|
|
133
146
|
let TuiTabsComponent = class TuiTabsComponent {
|
|
134
|
-
constructor(elementRef, renderer, changeDetectorRef, resize$, isIos, isAndroid, mobileAware) {
|
|
147
|
+
constructor(options, elementRef, renderer, changeDetectorRef, resize$, isIos, isAndroid, mobileAware) {
|
|
148
|
+
this.options = options;
|
|
135
149
|
this.elementRef = elementRef;
|
|
136
150
|
this.renderer = renderer;
|
|
137
151
|
this.children = EMPTY_QUERY;
|
|
138
|
-
this.underline =
|
|
152
|
+
this.underline = this.options.underline;
|
|
139
153
|
this.activeItemIndexChange = new EventEmitter();
|
|
140
154
|
this.activeItemIndex = 0;
|
|
141
155
|
this.isIos = mobileAware && isIos;
|
|
@@ -194,6 +208,7 @@ let TuiTabsComponent = class TuiTabsComponent {
|
|
|
194
208
|
}
|
|
195
209
|
};
|
|
196
210
|
TuiTabsComponent.ctorParameters = () => [
|
|
211
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_TABS_OPTIONS,] }] },
|
|
197
212
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
198
213
|
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
|
|
199
214
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
@@ -245,13 +260,14 @@ TuiTabsComponent = __decorate([
|
|
|
245
260
|
],
|
|
246
261
|
styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:relative;display:flex;font:var(--tui-font-text-m);height:var(--tui-height-l);color:var(--tui-text-02);box-shadow:inset 0 -1px var(--tui-base-03);overflow:auto}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{background:0 0;width:0;height:0}:host._android{height:auto}:host._ios{height:auto;border:2px solid transparent;border-radius:.5625rem;background:var(--tui-link);box-shadow:none}"]
|
|
247
262
|
}),
|
|
248
|
-
__param(0, Inject(
|
|
249
|
-
__param(1, Inject(
|
|
250
|
-
__param(2, Inject(
|
|
251
|
-
__param(3, Inject(
|
|
252
|
-
__param(4, Inject(
|
|
253
|
-
__param(5, Inject(
|
|
254
|
-
__param(6, Inject(
|
|
263
|
+
__param(0, Inject(TUI_TABS_OPTIONS)),
|
|
264
|
+
__param(1, Inject(ElementRef)),
|
|
265
|
+
__param(2, Inject(Renderer2)),
|
|
266
|
+
__param(3, Inject(ChangeDetectorRef)),
|
|
267
|
+
__param(4, Inject(TuiResizeService)),
|
|
268
|
+
__param(5, Inject(TUI_IS_IOS)),
|
|
269
|
+
__param(6, Inject(TUI_IS_ANDROID)),
|
|
270
|
+
__param(7, Inject(TUI_MOBILE_AWARE))
|
|
255
271
|
], TuiTabsComponent);
|
|
256
272
|
|
|
257
273
|
function tabsRefreshFactory(resize$, mutations$, destroy$, { body }, { nativeElement }, changeDetectorRef) {
|
|
@@ -289,7 +305,8 @@ const TABS_PROVIDERS = [
|
|
|
289
305
|
|
|
290
306
|
// @dynamic
|
|
291
307
|
let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
292
|
-
constructor(margin, refresh$, elementRef, changeDetectorRef, moreWord$) {
|
|
308
|
+
constructor(options, margin, refresh$, elementRef, changeDetectorRef, moreWord$) {
|
|
309
|
+
this.options = options;
|
|
293
310
|
this.margin = margin;
|
|
294
311
|
this.refresh$ = refresh$;
|
|
295
312
|
this.elementRef = elementRef;
|
|
@@ -298,9 +315,9 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
298
315
|
this.maxIndex = Infinity;
|
|
299
316
|
this.moreContent = '';
|
|
300
317
|
this.dropdownContent = '';
|
|
301
|
-
this.underline =
|
|
318
|
+
this.underline = this.options.underline;
|
|
302
319
|
this.activeItemIndex = 0;
|
|
303
|
-
this.itemsLimit =
|
|
320
|
+
this.itemsLimit = this.options.itemsLimit;
|
|
304
321
|
this.activeItemIndexChange = new EventEmitter();
|
|
305
322
|
this.items = EMPTY_QUERY;
|
|
306
323
|
this.open = false;
|
|
@@ -310,7 +327,10 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
310
327
|
return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiTab]'));
|
|
311
328
|
}
|
|
312
329
|
get activeElement() {
|
|
313
|
-
|
|
330
|
+
var _a;
|
|
331
|
+
return this.options.exposeActive || this.lastVisibleIndex >= this.activeItemIndex
|
|
332
|
+
? this.tabs[this.activeItemIndex] || null
|
|
333
|
+
: ((_a = this.moreButton) === null || _a === void 0 ? void 0 : _a.nativeElement) || null;
|
|
314
334
|
}
|
|
315
335
|
get isMoreVisible() {
|
|
316
336
|
return this.lastVisibleIndex < this.items.length - 1;
|
|
@@ -318,11 +338,17 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
318
338
|
get isMoreFocusable() {
|
|
319
339
|
return !!this.moreButton && isNativeFocused(this.moreButton.nativeElement);
|
|
320
340
|
}
|
|
341
|
+
get isMoreActive() {
|
|
342
|
+
return (this.open ||
|
|
343
|
+
(!this.options.exposeActive && this.lastVisibleIndex < this.activeItemIndex));
|
|
344
|
+
}
|
|
321
345
|
get lastVisibleIndex() {
|
|
322
346
|
if (this.itemsLimit + 1 >= this.items.length) {
|
|
323
347
|
return this.maxIndex;
|
|
324
348
|
}
|
|
325
|
-
const offset = this.itemsLimit - 1 > this.activeItemIndex
|
|
349
|
+
const offset = this.itemsLimit - 1 > this.activeItemIndex || !this.options.exposeActive
|
|
350
|
+
? 1
|
|
351
|
+
: 2;
|
|
326
352
|
return Math.min(this.itemsLimit - offset, this.maxIndex);
|
|
327
353
|
}
|
|
328
354
|
ngAfterViewInit() {
|
|
@@ -341,8 +367,9 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
341
367
|
this.focusMore();
|
|
342
368
|
this.updateActiveItemIndex(index);
|
|
343
369
|
}
|
|
344
|
-
onArrowRight(
|
|
345
|
-
|
|
370
|
+
onArrowRight(event) {
|
|
371
|
+
tuiAssertIsHTMLElement(event.target);
|
|
372
|
+
if (isNativeFocused(event.target)) {
|
|
346
373
|
this.focusMore();
|
|
347
374
|
}
|
|
348
375
|
}
|
|
@@ -357,12 +384,19 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
357
384
|
index--;
|
|
358
385
|
}
|
|
359
386
|
}
|
|
360
|
-
onWrapperArrow(
|
|
387
|
+
onWrapperArrow(event, wrapper, prev) {
|
|
388
|
+
const button = event.target;
|
|
361
389
|
const target = getClosestFocusable(button, prev, wrapper);
|
|
362
390
|
if (target) {
|
|
363
391
|
setNativeFocused(target);
|
|
364
392
|
}
|
|
365
393
|
}
|
|
394
|
+
isOverflown(index) {
|
|
395
|
+
return index !== this.activeItemIndex || !this.options.exposeActive;
|
|
396
|
+
}
|
|
397
|
+
shouldShow(index) {
|
|
398
|
+
return index > this.lastVisibleIndex && this.isOverflown(index);
|
|
399
|
+
}
|
|
366
400
|
focusMore() {
|
|
367
401
|
if (this.moreButton) {
|
|
368
402
|
setNativeFocused(this.moreButton.nativeElement);
|
|
@@ -386,7 +420,7 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
386
420
|
while (maxIndex) {
|
|
387
421
|
total -= tabs[maxIndex].scrollWidth + margin;
|
|
388
422
|
maxIndex--;
|
|
389
|
-
const activeDisplaced = activeItemIndex > maxIndex;
|
|
423
|
+
const activeDisplaced = this.options.exposeActive && activeItemIndex > maxIndex;
|
|
390
424
|
const activeOffset = activeDisplaced ? activeWidth + margin : 0;
|
|
391
425
|
const currentWidth = total + activeOffset + moreWidth + margin;
|
|
392
426
|
// Needed for different rounding of visible and hidden elements scrollWidth
|
|
@@ -407,6 +441,7 @@ let TuiTabsWithMoreComponent = class TuiTabsWithMoreComponent {
|
|
|
407
441
|
}
|
|
408
442
|
};
|
|
409
443
|
TuiTabsWithMoreComponent.ctorParameters = () => [
|
|
444
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_TABS_OPTIONS,] }] },
|
|
410
445
|
{ type: Number, decorators: [{ type: Inject, args: [TUI_TAB_MARGIN,] }] },
|
|
411
446
|
{ type: Observable, decorators: [{ type: Inject, args: [TABS_REFRESH,] }] },
|
|
412
447
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
@@ -446,16 +481,17 @@ __decorate([
|
|
|
446
481
|
TuiTabsWithMoreComponent = __decorate([
|
|
447
482
|
Component({
|
|
448
483
|
selector: 'tui-tabs-with-more, nav[tuiTabsWithMore]',
|
|
449
|
-
template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div class=\"t-wrapper\">\n <tui-tabs\n class=\"t-tabs\"\n [underline]=\"false\"\n [activeItemIndex]=\"activeItemIndex\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n (keydown.arrowRight)=\"onArrowRight($event
|
|
484
|
+
template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<div class=\"t-wrapper\">\n <tui-tabs\n class=\"t-tabs\"\n [underline]=\"false\"\n [activeItemIndex]=\"activeItemIndex\"\n (activeItemIndexChange)=\"onActiveItemIndexChange($event)\"\n (keydown.arrowRight)=\"onArrowRight($event)\"\n >\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"index <= lastVisibleIndex; else hidden\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n <ng-template #hidden>\n <div [class.t-overflown]=\"isOverflown(index)\">\n <ng-container *ngTemplateOutlet=\"item\"></ng-container>\n </div>\n </ng-template>\n </ng-container>\n </tui-tabs>\n <tui-hosted-dropdown\n class=\"t-more_wrapper\"\n [class.t-overflown]=\"!isMoreVisible\"\n [content]=\"dropdownContent || dropdown\"\n [(open)]=\"open\"\n >\n <button\n tuiTab\n class=\"t-more\"\n [class._active]=\"isMoreActive\"\n [tuiFocusable]=\"isMoreFocusable\"\n (keydown.arrowLeft.prevent)=\"onArrowLeft()\"\n >\n <span\n polymorpheus-outlet\n [content]=\"moreContent || more\"\n ></span>\n </button>\n <ng-template #more>\n {{ moreWord$ | async }}\n <tui-svg\n src=\"tuiIconChevronDown\"\n class=\"t-icon\"\n [class.t-icon_rotated]=\"open\"\n ></tui-svg>\n </ng-template>\n </tui-hosted-dropdown>\n <ng-template #dropdown>\n <div\n #element\n class=\"t-dropdown\"\n (keydown.arrowUp.prevent)=\"onWrapperArrow($event, element, true)\"\n (keydown.arrowDown.prevent)=\"onWrapperArrow($event, element, false)\"\n >\n <div\n *ngFor=\"let item of items; let index = index\"\n (tui-tab-activate)=\"onClick(index)\"\n >\n <ng-container\n *ngIf=\"shouldShow(index)\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </div>\n </div>\n </ng-template>\n <tui-underline\n *ngIf=\"underline\"\n [element]=\"activeElement\"\n ></tui-underline>\n</div>\n",
|
|
450
485
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
451
486
|
providers: TABS_PROVIDERS,
|
|
452
487
|
styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);height:var(--tui-height-l);box-sizing:border-box;color:var(--tui-text-02);box-shadow:inset 0 -1px var(--tui-base-03);overflow:hidden}.t-wrapper{position:relative;display:flex}.t-tabs{height:inherit;font-size:inherit;font-weight:inherit;overflow:visible;box-shadow:none;color:inherit}.t-overflown{display:flex;margin:0;width:0;max-width:0;overflow:hidden;visibility:hidden}.t-more_wrapper{height:100%}.t-more{margin:0}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-right:-.25rem;vertical-align:bottom}.t-icon_rotated{transform:rotate(180deg)}.t-dropdown{padding:.5rem 0}.t-dropdown ::ng-deep [tuiTab]{width:100%;height:2.75rem;justify-content:flex-start;margin:0;padding:0 1rem;color:var(--tui-text-02)}.t-dropdown ::ng-deep [tuiTab]:before{display:none}.t-dropdown ::ng-deep [tuiTab]._active,.t-dropdown ::ng-deep [tuiTab]:focus,.t-dropdown ::ng-deep [tuiTab]:hover{box-shadow:none;color:var(--tui-base-08);background:var(--tui-base-02)}"]
|
|
453
488
|
}),
|
|
454
|
-
__param(0, Inject(
|
|
455
|
-
__param(1, Inject(
|
|
456
|
-
__param(2, Inject(
|
|
457
|
-
__param(3, Inject(
|
|
458
|
-
__param(4, Inject(
|
|
489
|
+
__param(0, Inject(TUI_TABS_OPTIONS)),
|
|
490
|
+
__param(1, Inject(TUI_TAB_MARGIN)),
|
|
491
|
+
__param(2, Inject(TABS_REFRESH)),
|
|
492
|
+
__param(3, Inject(ElementRef)),
|
|
493
|
+
__param(4, Inject(ChangeDetectorRef)),
|
|
494
|
+
__param(5, Inject(TUI_MORE_WORD))
|
|
459
495
|
], TuiTabsWithMoreComponent);
|
|
460
496
|
|
|
461
497
|
let TuiUnderlineComponent = class TuiUnderlineComponent {
|
|
@@ -562,5 +598,5 @@ TuiTabsModule = __decorate([
|
|
|
562
598
|
* Generated bundle index. Do not edit.
|
|
563
599
|
*/
|
|
564
600
|
|
|
565
|
-
export { MUTATION_CONFIG, OBSERVER_INIT, TABS_PROVIDERS, TABS_REFRESH, TUI_TAB_ACTIVATE, TUI_TAB_EVENT, TUI_TAB_PROVIDERS, TuiTabComponent, TuiTabDirective, TuiTabsComponent, TuiTabsModule, TuiTabsWithMoreComponent, TuiUnderlineComponent, tabActiveFactory, tabsRefreshFactory };
|
|
601
|
+
export { MUTATION_CONFIG, OBSERVER_INIT, TABS_PROVIDERS, TABS_REFRESH, TUI_TABS_DEFAULT_OPTIONS, TUI_TABS_OPTIONS, TUI_TAB_ACTIVATE, TUI_TAB_EVENT, TUI_TAB_PROVIDERS, TuiTabComponent, TuiTabDirective, TuiTabsComponent, TuiTabsModule, TuiTabsWithMoreComponent, TuiUnderlineComponent, tabActiveFactory, tabsRefreshFactory, tuiTabsOptionsProvider };
|
|
566
602
|
//# sourceMappingURL=taiga-ui-kit-components-tabs.js.map
|