@taiga-ui/kit 3.0.0-rc.0 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-kit-components-accordion.umd.js +5 -17
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +3 -9
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js +3 -6
- package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +0 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +12 -8
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +4 -5
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +7 -10
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +21 -41
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +5 -26
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +1 -2
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +21 -36
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +12 -35
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +19 -42
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +18 -42
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +17 -41
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +4 -17
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +2 -8
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +19 -37
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +19 -37
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +14 -37
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +29 -56
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +38 -51
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +30 -57
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +17 -13
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +14 -12
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +33 -50
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +8 -15
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +16 -33
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +108 -18
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +34 -69
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +10 -23
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +2 -15
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +5 -15
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +7 -10
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +5 -10
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +40 -86
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js +4 -8
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +5 -5
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +20 -40
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +40 -38
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +9 -7
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +40 -40
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +6 -17
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +18 -31
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +2 -8
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +334 -3
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/{taiga-ui-kit-directives-dropdown-context.umd.js → taiga-ui-kit-directives-data-list-dropdown-manager.umd.js} +117 -141
- package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-directives-highlight.umd.js +0 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-project-class.umd.js +0 -3
- package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives.umd.js +6 -18
- package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +4 -4
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +0 -2
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +3 -3
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-providers.umd.js +11 -42
- package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +17 -12
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.js +3 -15
- package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.js +1 -5
- package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +3 -9
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -5
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils.umd.js +4 -10
- package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
- package/components/badge/badge.component.d.ts +2 -2
- package/components/badged-content/badged-content.component.d.ts +2 -2
- package/components/combo-box/index.d.ts +0 -1
- package/components/filter/filter.component.d.ts +1 -1
- package/components/input/index.d.ts +0 -1
- package/components/input-copy/index.d.ts +0 -1
- package/components/input-copy/input-copy.component.d.ts +4 -4
- package/components/input-date/index.d.ts +0 -1
- package/components/input-date-range/index.d.ts +0 -1
- package/components/input-date-time/index.d.ts +0 -1
- package/components/input-month/index.d.ts +0 -1
- package/components/input-month-range/index.d.ts +0 -1
- package/components/input-password/input-password.component.d.ts +2 -2
- package/components/input-password/input-password.module.d.ts +2 -3
- package/components/input-phone/index.d.ts +0 -1
- package/components/input-phone/input-phone.component.d.ts +2 -2
- package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -5
- package/components/input-range/input-range.component.d.ts +1 -0
- package/components/input-slider/input-slider.component.d.ts +1 -0
- package/components/input-tag/input-tag-options.d.ts +4 -1
- package/components/input-tag/input-tag.component.d.ts +3 -5
- package/components/line-clamp/index.d.ts +1 -0
- package/components/line-clamp/line-clamp-box.component.d.ts +7 -0
- package/components/line-clamp/line-clamp-position.directive.d.ts +9 -0
- package/components/line-clamp/line-clamp.module.d.ts +7 -5
- package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -3
- package/components/pagination/pagination.component.d.ts +0 -1
- package/components/progress/progress-segmented/progress-segmented.component.d.ts +0 -2
- package/components/range/range.component.d.ts +7 -23
- package/components/select/index.d.ts +0 -1
- package/components/slider/helpers/slider-key-steps.directive.d.ts +1 -3
- package/components/slider/slider.component.d.ts +5 -3
- package/components/stepper/step/step.component.d.ts +2 -2
- package/components/tabs/tab/tab.providers.d.ts +1 -4
- package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -1
- package/components/tabs/tabs-with-more/tabs-with-more.providers.d.ts +3 -4
- package/components/tag/tag.component.d.ts +1 -3
- package/components/text-area/index.d.ts +0 -1
- package/components/tree/components/tree-item/tree-item.providers.d.ts +0 -1
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +15 -0
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.d.ts +7 -0
- package/directives/data-list-dropdown-manager/index.d.ts +2 -0
- package/directives/data-list-dropdown-manager/package.json +10 -0
- package/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.d.ts +5 -0
- package/directives/index.d.ts +1 -3
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +5 -17
- package/esm2015/components/accordion/accordion.component.js +5 -5
- package/esm2015/components/action/action.component.js +6 -12
- package/esm2015/components/arrow/arrow.component.js +3 -3
- package/esm2015/components/avatar/avatar.component.js +6 -6
- package/esm2015/components/badge/badge.component.js +6 -6
- package/esm2015/components/badged-content/badged-content.component.js +4 -7
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm2015/components/calendar-month/calendar-month.component.js +1 -2
- package/esm2015/components/calendar-range/calendar-range.component.js +12 -11
- package/esm2015/components/carousel/carousel-scroll.directive.js +3 -3
- package/esm2015/components/carousel/carousel.component.js +4 -5
- package/esm2015/components/carousel/carousel.directive.js +3 -3
- package/esm2015/components/checkbox/checkbox.component.js +8 -12
- package/esm2015/components/checkbox-block/checkbox-block.component.js +10 -13
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +8 -12
- package/esm2015/components/combo-box/combo-box.component.js +20 -8
- package/esm2015/components/combo-box/combo-box.directive.js +5 -15
- package/esm2015/components/combo-box/index.js +1 -2
- package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +5 -15
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +5 -15
- package/esm2015/components/data-list-wrapper/data-list-wrapper.js +3 -4
- package/esm2015/components/files/file/file.component.js +3 -4
- package/esm2015/components/filter/filter.component.js +2 -2
- package/esm2015/components/input/index.js +1 -2
- package/esm2015/components/input/input.component.js +18 -7
- package/esm2015/components/input/input.directive.js +5 -15
- package/esm2015/components/input-copy/index.js +1 -2
- package/esm2015/components/input-copy/input-copy.component.js +18 -10
- package/esm2015/components/input-copy/input-copy.directive.js +5 -15
- package/esm2015/components/input-count/input-count.component.js +14 -27
- package/esm2015/components/input-count/input-count.directive.js +5 -15
- package/esm2015/components/input-date/index.js +1 -2
- package/esm2015/components/input-date/input-date.component.js +15 -9
- package/esm2015/components/input-date/input-date.directive.js +5 -15
- package/esm2015/components/input-date-range/index.js +1 -2
- package/esm2015/components/input-date-range/input-date-range.component.js +18 -11
- package/esm2015/components/input-date-range/input-date-range.directive.js +5 -15
- package/esm2015/components/input-date-time/index.js +1 -2
- package/esm2015/components/input-date-time/input-date-time.component.js +16 -10
- package/esm2015/components/input-date-time/input-date-time.directive.js +5 -15
- package/esm2015/components/input-files/input-files.component.js +8 -21
- package/esm2015/components/input-inline/input-inline.component.js +5 -11
- package/esm2015/components/input-month/index.js +1 -2
- package/esm2015/components/input-month/input-month.component.js +17 -8
- package/esm2015/components/input-month/input-month.directive.js +5 -17
- package/esm2015/components/input-month-range/index.js +1 -2
- package/esm2015/components/input-month-range/input-month-range.component.js +17 -8
- package/esm2015/components/input-month-range/input-month-range.directive.js +5 -17
- package/esm2015/components/input-number/input-number.component.js +16 -29
- package/esm2015/components/input-number/input-number.directive.js +5 -15
- package/esm2015/components/input-password/input-password.component.js +18 -32
- package/esm2015/components/input-password/input-password.directive.js +5 -15
- package/esm2015/components/input-password/input-password.module.js +1 -5
- package/esm2015/components/input-phone/index.js +1 -2
- package/esm2015/components/input-phone/input-phone.component.js +28 -14
- package/esm2015/components/input-phone/input-phone.directive.js +5 -15
- package/esm2015/components/input-phone-international/input-phone-international.component.js +16 -22
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +5 -11
- package/esm2015/components/input-range/input-range.component.js +20 -16
- package/esm2015/components/input-slider/input-slider.component.js +13 -15
- package/esm2015/components/input-tag/input-tag-options.js +8 -1
- package/esm2015/components/input-tag/input-tag.component.js +24 -54
- package/esm2015/components/input-time/input-time.component.js +11 -18
- package/esm2015/components/line-clamp/index.js +2 -1
- package/esm2015/components/line-clamp/line-clamp-box.component.js +32 -0
- package/esm2015/components/line-clamp/line-clamp-position.directive.js +26 -0
- package/esm2015/components/line-clamp/line-clamp.component.js +22 -9
- package/esm2015/components/line-clamp/line-clamp.module.js +30 -6
- package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +11 -21
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.directive.js +17 -28
- package/esm2015/components/multi-select/multi-select.component.js +15 -30
- package/esm2015/components/multi-select-option/multi-select-option.component.js +6 -6
- package/esm2015/components/pagination/pagination.component.js +13 -25
- package/esm2015/components/pdf-viewer/pdf-viewer.module.js +4 -17
- package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +4 -4
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
- package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +3 -11
- package/esm2015/components/radio/radio.component.js +8 -13
- package/esm2015/components/radio-block/radio-block.component.js +10 -13
- package/esm2015/components/radio-labeled/radio-labeled.component.js +8 -12
- package/esm2015/components/radio-list/radio-list.component.js +8 -12
- package/esm2015/components/range/range-change.directive.js +10 -9
- package/esm2015/components/range/range.component.js +27 -79
- package/esm2015/components/rating/rating.component.js +7 -11
- package/esm2015/components/select/index.js +1 -2
- package/esm2015/components/select/select.component.js +19 -7
- package/esm2015/components/select/select.directive.js +5 -15
- package/esm2015/components/select-option/select-option.component.js +7 -7
- package/esm2015/components/slider/helpers/slider-key-steps.directive.js +14 -22
- package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -6
- package/esm2015/components/slider/slider.component.js +21 -10
- package/esm2015/components/stepper/step/step.component.js +5 -5
- package/esm2015/components/stepper/stepper.component.js +7 -5
- package/esm2015/components/tabs/tab/tab.providers.js +10 -10
- package/esm2015/components/tabs/tabs/tabs.component.js +1 -2
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +18 -17
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +9 -11
- package/esm2015/components/tag/tag.component.js +10 -20
- package/esm2015/components/text-area/index.js +1 -2
- package/esm2015/components/text-area/text-area.component.js +19 -8
- package/esm2015/components/text-area/text-area.directive.js +5 -15
- package/esm2015/components/toggle/toggle.component.js +8 -12
- package/esm2015/components/tree/components/tree-item/tree-item.providers.js +2 -6
- package/esm2015/components/tree/directives/tree-controller.directive.js +3 -3
- package/esm2015/components/tree/misc/tree.service.js +1 -2
- package/esm2015/constants/max-day-range-length-mapper.js +5 -4
- package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.js +100 -0
- package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.js +16 -0
- package/esm2015/directives/data-list-dropdown-manager/index.js +3 -0
- package/esm2015/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.js +5 -0
- package/esm2015/directives/highlight/highlight.directive.js +1 -2
- package/esm2015/directives/index.js +2 -4
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +2 -2
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +3 -3
- package/esm2015/directives/present/present.directive.js +4 -4
- package/esm2015/directives/project-class/project-class.directive.js +1 -4
- package/esm2015/interfaces/index.js +1 -2
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +7 -7
- package/esm2015/pipes/field-error/field-error-content-pipe.js +1 -2
- package/esm2015/pipes/field-error/field-error-pipe.js +1 -2
- package/esm2015/pipes/filter-by-input/filter-by-input.base.js +5 -5
- package/esm2015/providers/month-formatter.provider.js +8 -13
- package/esm2015/providers/specific-dropdown-controllers.js +6 -29
- package/esm2015/tokens/calendar-date-stream.js +15 -0
- package/esm2015/tokens/index.js +2 -3
- package/esm2015/utils/files/format-size.js +4 -9
- package/esm2015/utils/files/get-accept-array.js +2 -7
- package/esm2015/utils/format/string-hash-to-hsl.js +2 -5
- package/esm2015/utils/index.js +1 -2
- package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -8
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -3
- package/esm2015/utils/math/key-steps.js +3 -3
- package/esm2015/utils/miscellaneous/get-precision.js +2 -5
- package/fesm2015/taiga-ui-kit-components-accordion.js +7 -19
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +5 -11
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js +2 -2
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +5 -5
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +4 -4
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +3 -6
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +0 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +12 -11
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +5 -6
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +9 -12
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +7 -11
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +7 -11
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +22 -41
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +7 -28
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-files.js +2 -3
- package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +22 -36
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +15 -38
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +20 -44
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +19 -44
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +18 -43
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +7 -20
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +4 -10
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +20 -37
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +20 -37
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +17 -40
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +20 -47
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +18 -30
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +31 -57
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +19 -15
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +12 -14
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +33 -55
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +10 -17
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +20 -36
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +96 -14
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js +5 -5
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +37 -73
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +13 -25
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +3 -16
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +7 -15
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +9 -12
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +7 -11
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +7 -11
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +7 -12
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +38 -86
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +6 -10
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +6 -6
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +21 -40
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +34 -32
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +10 -8
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +33 -35
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +10 -20
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +22 -34
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +7 -11
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +4 -9
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +4 -3
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js +120 -0
- package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js.map +1 -0
- package/fesm2015/taiga-ui-kit-directives-highlight.js +0 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -3
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js +3 -3
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-project-class.js +0 -3
- package/fesm2015/taiga-ui-kit-directives-project-class.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives.js +1 -3
- package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +6 -6
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-field-error.js +0 -2
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-providers.js +13 -40
- package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +15 -8
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-files.js +5 -15
- package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js +2 -5
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +4 -9
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
- package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +2 -5
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils.js +0 -1
- package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
- package/interfaces/index.d.ts +0 -1
- package/package.json +5 -5
- package/providers/month-formatter.provider.d.ts +0 -7
- package/providers/specific-dropdown-controllers.d.ts +1 -6
- package/tokens/calendar-date-stream.d.ts +5 -0
- package/tokens/index.d.ts +1 -2
- package/tokens/validation-errors.d.ts +1 -1
- package/utils/files/format-size.d.ts +1 -5
- package/utils/files/get-accept-array.d.ts +1 -5
- package/utils/format/string-hash-to-hsl.d.ts +1 -3
- package/utils/index.d.ts +0 -1
- package/utils/mask/create-auto-corrected-date-pipe.d.ts +1 -5
- package/utils/miscellaneous/get-precision.d.ts +1 -3
- package/abstract/index.d.ts +0 -1
- package/abstract/package.json +0 -10
- package/abstract/slider/slider.d.ts +0 -69
- package/abstract/taiga-ui-kit-abstract.d.ts +0 -5
- package/bundles/taiga-ui-kit-abstract.umd.js +0 -651
- package/bundles/taiga-ui-kit-abstract.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js +0 -107
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +0 -643
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-utils-dom.umd.js +0 -124
- package/bundles/taiga-ui-kit-utils-dom.umd.js.map +0 -1
- package/components/combo-box/combo-box.providers.d.ts +0 -1
- package/components/input/input.providers.d.ts +0 -1
- package/components/input-copy/input-copy.providers.d.ts +0 -2
- package/components/input-date/input-date.providers.d.ts +0 -1
- package/components/input-date-range/input-date-range.providers.d.ts +0 -1
- package/components/input-date-time/input-date-time.providers.d.ts +0 -1
- package/components/input-month/input-month.providers.d.ts +0 -2
- package/components/input-month-range/input-month-range.providers.d.ts +0 -2
- package/components/input-phone/input-phone.providers.d.ts +0 -5
- package/components/select/select.providers.d.ts +0 -1
- package/components/text-area/text-area.providers.d.ts +0 -2
- package/directives/dropdown-context/dropdown-context.directive.d.ts +0 -30
- package/directives/dropdown-context/dropdown-context.module.d.ts +0 -8
- package/directives/dropdown-context/index.d.ts +0 -2
- package/directives/dropdown-context/package.json +0 -10
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +0 -5
- package/directives/dropdown-hover/dropdown-hover.directive.d.ts +0 -11
- package/directives/dropdown-hover/dropdown-hover.module.d.ts +0 -7
- package/directives/dropdown-hover/index.d.ts +0 -2
- package/directives/dropdown-hover/package.json +0 -10
- package/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.d.ts +0 -5
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +0 -46
- package/directives/dropdown-selection/dropdown-selection.module.d.ts +0 -8
- package/directives/dropdown-selection/index.d.ts +0 -2
- package/directives/dropdown-selection/package.json +0 -10
- package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.d.ts +0 -5
- package/esm2015/abstract/index.js +0 -2
- package/esm2015/abstract/slider/slider.js +0 -264
- package/esm2015/abstract/taiga-ui-kit-abstract.js +0 -5
- package/esm2015/components/combo-box/combo-box.providers.js +0 -26
- package/esm2015/components/input/input.providers.js +0 -22
- package/esm2015/components/input-copy/input-copy.providers.js +0 -16
- package/esm2015/components/input-date/input-date.providers.js +0 -27
- package/esm2015/components/input-date-range/input-date-range.providers.js +0 -27
- package/esm2015/components/input-date-time/input-date-time.providers.js +0 -27
- package/esm2015/components/input-month/input-month.providers.js +0 -19
- package/esm2015/components/input-month-range/input-month-range.providers.js +0 -19
- package/esm2015/components/input-phone/input-phone.providers.js +0 -35
- package/esm2015/components/select/select.providers.js +0 -26
- package/esm2015/components/text-area/text-area.providers.js +0 -18
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +0 -141
- package/esm2015/directives/dropdown-context/dropdown-context.module.js +0 -18
- package/esm2015/directives/dropdown-context/index.js +0 -3
- package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +0 -5
- package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +0 -56
- package/esm2015/directives/dropdown-hover/dropdown-hover.module.js +0 -16
- package/esm2015/directives/dropdown-hover/index.js +0 -3
- package/esm2015/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.js +0 -5
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +0 -252
- package/esm2015/directives/dropdown-selection/dropdown-selection.module.js +0 -18
- package/esm2015/directives/dropdown-selection/index.js +0 -3
- package/esm2015/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.js +0 -5
- package/esm2015/interfaces/bread-crumbs-item.js +0 -2
- package/esm2015/tokens/calendar-data-stream.js +0 -3
- package/esm2015/tokens/tag-status.js +0 -6
- package/esm2015/utils/dom/get-word-range.js +0 -53
- package/esm2015/utils/dom/index.js +0 -4
- package/esm2015/utils/dom/scroll-to-element.js +0 -23
- package/esm2015/utils/dom/set-range-offset.js +0 -29
- package/esm2015/utils/dom/taiga-ui-kit-utils-dom.js +0 -5
- package/fesm2015/taiga-ui-kit-abstract.js +0 -271
- package/fesm2015/taiga-ui-kit-abstract.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +0 -162
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js +0 -76
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +0 -273
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +0 -1
- package/fesm2015/taiga-ui-kit-utils-dom.js +0 -111
- package/fesm2015/taiga-ui-kit-utils-dom.js.map +0 -1
- package/interfaces/bread-crumbs-item.d.ts +0 -6
- package/tokens/calendar-data-stream.d.ts +0 -4
- package/tokens/tag-status.d.ts +0 -3
- package/utils/dom/get-word-range.d.ts +0 -9
- package/utils/dom/index.d.ts +0 -3
- package/utils/dom/package.json +0 -10
- package/utils/dom/scroll-to-element.d.ts +0 -5
- package/utils/dom/set-range-offset.d.ts +0 -6
- package/utils/dom/taiga-ui-kit-utils-dom.d.ts +0 -5
|
@@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Component, ChangeDetectionStrategy, Input, HostBinding, ElementRef, Directive, Inject, ViewChild, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1$1 from '@taiga-ui/cdk';
|
|
5
|
-
import { tuiDefaultProp, tuiIsEdgeOlderThan, CHROMIUM_EDGE_START_VERSION,
|
|
5
|
+
import { tuiDefaultProp, tuiIsEdgeOlderThan, CHROMIUM_EDGE_START_VERSION, TuiResizeService, TuiDestroyService, tuiPure, tuiIsString, TuiRepeatTimesModule } from '@taiga-ui/cdk';
|
|
6
6
|
import { __decorate } from 'tslib';
|
|
7
7
|
import { USER_AGENT, WINDOW } from '@ng-web-apis/common';
|
|
8
8
|
import { map } from 'rxjs/operators';
|
|
@@ -48,8 +48,8 @@ class TuiProgressColorSegmentsDirective {
|
|
|
48
48
|
this.elementRef = elementRef;
|
|
49
49
|
this.resize$ = resize$;
|
|
50
50
|
this.userAgent = userAgent;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// TODO: drop support of legacy Edge (EdgeHTML) in v4.x
|
|
52
|
+
this.isOldBrowsers = tuiIsEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent);
|
|
53
53
|
this.colors = [];
|
|
54
54
|
}
|
|
55
55
|
get calcSegments$() {
|
|
@@ -87,7 +87,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
87
87
|
args: [`tuiProgressColorSegments`]
|
|
88
88
|
}], calcSegments$: [] } });
|
|
89
89
|
|
|
90
|
-
// @dynamic
|
|
91
90
|
class TuiProgressCircleComponent {
|
|
92
91
|
constructor(userAgent, windowRef, elementRef) {
|
|
93
92
|
this.userAgent = userAgent;
|
|
@@ -101,6 +100,7 @@ class TuiProgressCircleComponent {
|
|
|
101
100
|
get progressPercentage() {
|
|
102
101
|
return this.value / this.max;
|
|
103
102
|
}
|
|
103
|
+
// TODO: drop support of legacy Edge (EdgeHTML) in v4.x
|
|
104
104
|
get oldEdgeRadiusFallback() {
|
|
105
105
|
if (!tuiIsEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent)) {
|
|
106
106
|
return null;
|
|
@@ -177,14 +177,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
177
177
|
}]
|
|
178
178
|
}] });
|
|
179
179
|
|
|
180
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
181
|
-
function nonNegativeInt(value) {
|
|
182
|
-
return Number.isInteger(value) && value >= 0;
|
|
183
|
-
}
|
|
184
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
185
|
-
function positiveInt(value) {
|
|
186
|
-
return Number.isInteger(value) && value > 0;
|
|
187
|
-
}
|
|
188
180
|
class TuiProgressSegmentedComponent {
|
|
189
181
|
constructor() {
|
|
190
182
|
this.value = 0;
|
|
@@ -201,10 +193,10 @@ class TuiProgressSegmentedComponent {
|
|
|
201
193
|
TuiProgressSegmentedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiProgressSegmentedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
202
194
|
TuiProgressSegmentedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiProgressSegmentedComponent, selector: "tui-progress-segmented", inputs: { value: "value", max: "max", size: "size", colors: "colors" }, host: { properties: { "attr.data-size": "this.size" } }, ngImport: i0, template: "<progress\n class=\"t-hidden-progress\"\n [value]=\"value\"\n [max]=\"max\"\n></progress>\n\n<span\n *tuiRepeatTimes=\"let index of max\"\n aria-hidden=\"true\"\n class=\"t-segment\"\n [style.background]=\"index < value ? getActiveColor(index) : null\"\n></span>\n", styles: [":host{display:flex}.t-segment{transition-property:background-color;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;flex:1 1 100%;border-radius:var(--tui-radius-xs);background-color:var(--tui-base-03)}.t-segment:not(:last-child){margin-right:.25rem}:host[data-size=s] .t-segment{height:.25rem}:host[data-size=m] .t-segment{height:.5rem}.t-hidden-progress{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0}\n"], directives: [{ type: i1$1.TuiRepeatTimesDirective, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
203
195
|
__decorate([
|
|
204
|
-
tuiDefaultProp(
|
|
196
|
+
tuiDefaultProp((value) => Number.isInteger(value) && value >= 0, `Must be non-negative integer between 0 and max`)
|
|
205
197
|
], TuiProgressSegmentedComponent.prototype, "value", void 0);
|
|
206
198
|
__decorate([
|
|
207
|
-
tuiDefaultProp(
|
|
199
|
+
tuiDefaultProp((value) => Number.isInteger(value) && value > 0, `Must be positive integer`)
|
|
208
200
|
], TuiProgressSegmentedComponent.prototype, "max", void 0);
|
|
209
201
|
__decorate([
|
|
210
202
|
tuiDefaultProp()
|
|
@@ -268,5 +260,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
268
260
|
* Generated bundle index. Do not edit.
|
|
269
261
|
*/
|
|
270
262
|
|
|
271
|
-
export { TuiProgressBarComponent, TuiProgressCircleComponent, TuiProgressColorSegmentsDirective, TuiProgressLabelComponent, TuiProgressModule, TuiProgressSegmentedComponent
|
|
263
|
+
export { TuiProgressBarComponent, TuiProgressCircleComponent, TuiProgressColorSegmentsDirective, TuiProgressLabelComponent, TuiProgressModule, TuiProgressSegmentedComponent };
|
|
272
264
|
//# sourceMappingURL=taiga-ui-kit-components-progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-progress.js","sources":["../../../projects/kit/components/progress/progress-bar/progress-bar.component.ts","../../../projects/kit/components/progress/progress-bar/progress-color-segments.directive.ts","../../../projects/kit/components/progress/progress-circle/progress-circle.component.ts","../../../projects/kit/components/progress/progress-circle/progress-circle.template.html","../../../projects/kit/components/progress/progress-label/progress-label.component.ts","../../../projects/kit/components/progress/progress-label/progress-label.template.html","../../../projects/kit/components/progress/progress-segmented/progress-segmented.component.ts","../../../projects/kit/components/progress/progress-segmented/progress-segmented.template.html","../../../projects/kit/components/progress/progress.module.ts","../../../projects/kit/components/progress/taiga-ui-kit-components-progress.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\n@Component({\n selector: `progress[tuiProgressBar]`,\n template: ``,\n styleUrls: [`./progress-bar.component.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressBarComponent {\n @Input()\n @HostBinding(`style.--tui-progress-color`)\n color?: string;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS = `m`;\n}\n","import {Directive, ElementRef, Inject, Input} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n TuiDestroyService,\n tuiIsEdgeOlderThan,\n tuiIsIE,\n tuiPure,\n TuiResizeService,\n} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nfunction calculateColorSegments(colors: string[], progressWidth: number): string {\n const segmentWidth = Math.ceil(progressWidth / colors.length);\n const colorsString = colors.reduce(\n (acc, color, i) =>\n `${acc}, ${color} ${i * segmentWidth}px ${(i + 1) * segmentWidth}px`,\n ``,\n );\n\n return `linear-gradient(to right ${colorsString})`;\n}\n\n@Directive({\n selector: `progress[tuiProgressBar][tuiProgressColorSegments]`,\n host: {\n '[$.style.--tui-progress-color]': `calcSegments$`,\n '($.style.--tui-progress-color)': `0`,\n },\n providers: [TuiDestroyService, TuiResizeService],\n})\nexport class TuiProgressColorSegmentsDirective {\n private readonly isOldBrowsers =\n tuiIsEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent) ||\n tuiIsIE(this.userAgent);\n\n @Input(`tuiProgressColorSegments`)\n colors: string[] = [];\n\n @tuiPure\n get calcSegments$(): Observable<string> {\n return this.resize$.pipe(\n map(() =>\n this.isOldBrowsers\n ? this.colors[0]\n : calculateColorSegments(\n this.colors,\n this.elementRef.nativeElement.offsetWidth,\n ),\n ),\n );\n }\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLProgressElement>,\n @Inject(TuiResizeService) private readonly resize$: Observable<unknown>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n ViewChild,\n} from '@angular/core';\nimport {USER_AGENT, WINDOW} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n tuiDefaultProp,\n tuiIsEdgeOlderThan,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS, TuiSizeXL} from '@taiga-ui/core';\n\n// @dynamic\n@Component({\n selector: `tui-progress-circle`,\n templateUrl: `./progress-circle.template.html`,\n styleUrls: [`./progress-circle.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressCircleComponent {\n @ViewChild(`progressCircle`, {static: true})\n private readonly progressCircle!: ElementRef<SVGCircleElement>;\n\n @Input()\n @tuiDefaultProp()\n value = 0;\n\n @Input()\n @tuiDefaultProp()\n max = 1;\n\n @Input()\n @HostBinding(`style.--tui-progress-color`)\n @tuiDefaultProp()\n color: string | null = null;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeXL = `m`;\n\n @HostBinding(`style.--progress-percentage`)\n get progressPercentage(): number {\n return this.value / this.max;\n }\n\n get oldEdgeRadiusFallback(): number | null {\n if (!tuiIsEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent)) {\n return null;\n }\n\n const strokeWidth = parseInt(\n this.windowRef.getComputedStyle(this.progressCircle.nativeElement)\n .strokeWidth,\n 10,\n );\n\n return (this.elementRef.nativeElement.offsetWidth - strokeWidth) / 2;\n }\n\n constructor(\n @Inject(USER_AGENT) private readonly userAgent: string,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n}\n","<progress\n class=\"t-hidden-progress\"\n [value]=\"value\"\n [max]=\"max\"\n></progress>\n\n<svg\n height=\"100%\"\n width=\"100%\"\n aria-hidden=\"true\"\n class=\"t-svg\"\n>\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-track\"\n [attr.r]=\"oldEdgeRadiusFallback\"\n ></circle>\n\n <circle\n #progressCircle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-progress\"\n [attr.r]=\"oldEdgeRadiusFallback\"\n ></circle>\n</svg>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: `label[tuiProgressLabel]`,\n templateUrl: `./progress-label.template.html`,\n styleUrls: [`./progress-label.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressLabelComponent {}\n","<ng-content select=\"progress\"></ng-content>\n<ng-content select=\"tui-progress-circle\"></ng-content>\n<span class=\"t-label\">\n <ng-content></ng-content>\n</span>\n","import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp, tuiIsString} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function nonNegativeInt(value: number): boolean {\n return Number.isInteger(value) && value >= 0;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function positiveInt(value: number): boolean {\n return Number.isInteger(value) && value > 0;\n}\n\n@Component({\n selector: `tui-progress-segmented`,\n templateUrl: `./progress-segmented.template.html`,\n styleUrls: [`./progress-segmented.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressSegmentedComponent {\n @Input()\n @tuiDefaultProp(nonNegativeInt, `Must be non-negative integer between 0 and max`)\n value = 0;\n\n @Input()\n @tuiDefaultProp(positiveInt, `Must be positive integer`)\n max = 1;\n\n @Input()\n @HostBinding(`attr.data-size`)\n size: TuiSizeS = `m`;\n\n @Input()\n @tuiDefaultProp()\n colors: string | readonly string[] = `var(--tui-primary)`;\n\n getActiveColor(index: number = 0): string | null {\n return tuiIsString(this.colors)\n ? this.colors\n : this.colors[index] || this.colors[this.colors.length - 1];\n }\n}\n","<progress\n class=\"t-hidden-progress\"\n [value]=\"value\"\n [max]=\"max\"\n></progress>\n\n<span\n *tuiRepeatTimes=\"let index of max\"\n aria-hidden=\"true\"\n class=\"t-segment\"\n [style.background]=\"index < value ? getActiveColor(index) : null\"\n></span>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiRepeatTimesModule} from '@taiga-ui/cdk';\n\nimport {TuiProgressBarComponent} from './progress-bar/progress-bar.component';\nimport {TuiProgressColorSegmentsDirective} from './progress-bar/progress-color-segments.directive';\nimport {TuiProgressCircleComponent} from './progress-circle/progress-circle.component';\nimport {TuiProgressLabelComponent} from './progress-label/progress-label.component';\nimport {TuiProgressSegmentedComponent} from './progress-segmented/progress-segmented.component';\n\n@NgModule({\n imports: [CommonModule, TuiRepeatTimesModule],\n declarations: [\n TuiProgressBarComponent,\n TuiProgressColorSegmentsDirective,\n TuiProgressCircleComponent,\n TuiProgressLabelComponent,\n TuiProgressSegmentedComponent,\n ],\n exports: [\n TuiProgressBarComponent,\n TuiProgressCircleComponent,\n TuiProgressColorSegmentsDirective,\n TuiProgressLabelComponent,\n TuiProgressSegmentedComponent,\n ],\n})\nexport class TuiProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;MAUa,uBAAuB,CAAA;AANpC,IAAA,WAAA,GAAA;QAcI,IAAI,CAAA,IAAA,GAAa,GAAG,CAAC;AACxB,KAAA;;qHATY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,+MAJtB,CAAE,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2pCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;AAYZ,UAAA,CAAA;AADC,IAAA,cAAc,EAAE;AACI,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;4FARZ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBANnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,CAA0B,wBAAA,CAAA;AACpC,oBAAA,QAAQ,EAA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version":3,"file":"taiga-ui-kit-components-progress.js","sources":["../../../projects/kit/components/progress/progress-bar/progress-bar.component.ts","../../../projects/kit/components/progress/progress-bar/progress-color-segments.directive.ts","../../../projects/kit/components/progress/progress-circle/progress-circle.component.ts","../../../projects/kit/components/progress/progress-circle/progress-circle.template.html","../../../projects/kit/components/progress/progress-label/progress-label.component.ts","../../../projects/kit/components/progress/progress-label/progress-label.template.html","../../../projects/kit/components/progress/progress-segmented/progress-segmented.component.ts","../../../projects/kit/components/progress/progress-segmented/progress-segmented.template.html","../../../projects/kit/components/progress/progress.module.ts","../../../projects/kit/components/progress/taiga-ui-kit-components-progress.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\n@Component({\n selector: `progress[tuiProgressBar]`,\n template: ``,\n styleUrls: [`./progress-bar.component.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressBarComponent {\n @Input()\n @HostBinding(`style.--tui-progress-color`)\n color?: string;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS = `m`;\n}\n","import {Directive, ElementRef, Inject, Input} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n TuiDestroyService,\n tuiIsEdgeOlderThan,\n tuiPure,\n TuiResizeService,\n} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nfunction calculateColorSegments(colors: string[], progressWidth: number): string {\n const segmentWidth = Math.ceil(progressWidth / colors.length);\n const colorsString = colors.reduce(\n (acc, color, i) =>\n `${acc}, ${color} ${i * segmentWidth}px ${(i + 1) * segmentWidth}px`,\n ``,\n );\n\n return `linear-gradient(to right ${colorsString})`;\n}\n\n@Directive({\n selector: `progress[tuiProgressBar][tuiProgressColorSegments]`,\n host: {\n '[$.style.--tui-progress-color]': `calcSegments$`,\n '($.style.--tui-progress-color)': `0`,\n },\n providers: [TuiDestroyService, TuiResizeService],\n})\nexport class TuiProgressColorSegmentsDirective {\n // TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n private readonly isOldBrowsers = tuiIsEdgeOlderThan(\n CHROMIUM_EDGE_START_VERSION,\n this.userAgent,\n );\n\n @Input(`tuiProgressColorSegments`)\n colors: string[] = [];\n\n @tuiPure\n get calcSegments$(): Observable<string> {\n return this.resize$.pipe(\n map(() =>\n this.isOldBrowsers\n ? this.colors[0]\n : calculateColorSegments(\n this.colors,\n this.elementRef.nativeElement.offsetWidth,\n ),\n ),\n );\n }\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLProgressElement>,\n @Inject(TuiResizeService) private readonly resize$: Observable<unknown>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {}\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n ViewChild,\n} from '@angular/core';\nimport {USER_AGENT, WINDOW} from '@ng-web-apis/common';\nimport {\n CHROMIUM_EDGE_START_VERSION,\n tuiDefaultProp,\n tuiIsEdgeOlderThan,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS, TuiSizeXL} from '@taiga-ui/core';\n\n@Component({\n selector: `tui-progress-circle`,\n templateUrl: `./progress-circle.template.html`,\n styleUrls: [`./progress-circle.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressCircleComponent {\n @ViewChild(`progressCircle`, {static: true})\n private readonly progressCircle!: ElementRef<SVGCircleElement>;\n\n @Input()\n @tuiDefaultProp()\n value = 0;\n\n @Input()\n @tuiDefaultProp()\n max = 1;\n\n @Input()\n @HostBinding(`style.--tui-progress-color`)\n @tuiDefaultProp()\n color: string | null = null;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeXL = `m`;\n\n @HostBinding(`style.--progress-percentage`)\n get progressPercentage(): number {\n return this.value / this.max;\n }\n\n // TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n get oldEdgeRadiusFallback(): number | null {\n if (!tuiIsEdgeOlderThan(CHROMIUM_EDGE_START_VERSION, this.userAgent)) {\n return null;\n }\n\n const strokeWidth = parseInt(\n this.windowRef.getComputedStyle(this.progressCircle.nativeElement)\n .strokeWidth,\n 10,\n );\n\n return (this.elementRef.nativeElement.offsetWidth - strokeWidth) / 2;\n }\n\n constructor(\n @Inject(USER_AGENT) private readonly userAgent: string,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n}\n","<progress\n class=\"t-hidden-progress\"\n [value]=\"value\"\n [max]=\"max\"\n></progress>\n\n<svg\n height=\"100%\"\n width=\"100%\"\n aria-hidden=\"true\"\n class=\"t-svg\"\n>\n <circle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-track\"\n [attr.r]=\"oldEdgeRadiusFallback\"\n ></circle>\n\n <circle\n #progressCircle\n cx=\"50%\"\n cy=\"50%\"\n class=\"t-progress\"\n [attr.r]=\"oldEdgeRadiusFallback\"\n ></circle>\n</svg>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: `label[tuiProgressLabel]`,\n templateUrl: `./progress-label.template.html`,\n styleUrls: [`./progress-label.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressLabelComponent {}\n","<ng-content select=\"progress\"></ng-content>\n<ng-content select=\"tui-progress-circle\"></ng-content>\n<span class=\"t-label\">\n <ng-content></ng-content>\n</span>\n","import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp, tuiIsString} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core';\n\n@Component({\n selector: `tui-progress-segmented`,\n templateUrl: `./progress-segmented.template.html`,\n styleUrls: [`./progress-segmented.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiProgressSegmentedComponent {\n @Input()\n @tuiDefaultProp(\n (value: number) => Number.isInteger(value) && value >= 0,\n `Must be non-negative integer between 0 and max`,\n )\n value = 0;\n\n @Input()\n @tuiDefaultProp(\n (value: number) => Number.isInteger(value) && value > 0,\n `Must be positive integer`,\n )\n max = 1;\n\n @Input()\n @HostBinding(`attr.data-size`)\n size: TuiSizeS = `m`;\n\n @Input()\n @tuiDefaultProp()\n colors: string | readonly string[] = `var(--tui-primary)`;\n\n getActiveColor(index: number = 0): string | null {\n return tuiIsString(this.colors)\n ? this.colors\n : this.colors[index] || this.colors[this.colors.length - 1];\n }\n}\n","<progress\n class=\"t-hidden-progress\"\n [value]=\"value\"\n [max]=\"max\"\n></progress>\n\n<span\n *tuiRepeatTimes=\"let index of max\"\n aria-hidden=\"true\"\n class=\"t-segment\"\n [style.background]=\"index < value ? getActiveColor(index) : null\"\n></span>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiRepeatTimesModule} from '@taiga-ui/cdk';\n\nimport {TuiProgressBarComponent} from './progress-bar/progress-bar.component';\nimport {TuiProgressColorSegmentsDirective} from './progress-bar/progress-color-segments.directive';\nimport {TuiProgressCircleComponent} from './progress-circle/progress-circle.component';\nimport {TuiProgressLabelComponent} from './progress-label/progress-label.component';\nimport {TuiProgressSegmentedComponent} from './progress-segmented/progress-segmented.component';\n\n@NgModule({\n imports: [CommonModule, TuiRepeatTimesModule],\n declarations: [\n TuiProgressBarComponent,\n TuiProgressColorSegmentsDirective,\n TuiProgressCircleComponent,\n TuiProgressLabelComponent,\n TuiProgressSegmentedComponent,\n ],\n exports: [\n TuiProgressBarComponent,\n TuiProgressCircleComponent,\n TuiProgressColorSegmentsDirective,\n TuiProgressLabelComponent,\n TuiProgressSegmentedComponent,\n ],\n})\nexport class TuiProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;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AA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAhBjB,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAgBpC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;AAC7C,oBAAA,YAAY,EAAE;wBACV,uBAAuB;wBACvB,iCAAiC;wBACjC,0BAA0B;wBAC1B,yBAAyB;wBACzB,6BAA6B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,uBAAuB;wBACvB,0BAA0B;wBAC1B,iCAAiC;wBACjC,yBAAyB;wBACzB,6BAA6B;AAChC,qBAAA;AACJ,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef,
|
|
3
|
+
import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
6
|
-
import { AbstractTuiNullableControl, TUI_DEFAULT_IDENTITY_MATCHER,
|
|
6
|
+
import { AbstractTuiNullableControl, TUI_DEFAULT_IDENTITY_MATCHER, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
7
7
|
import * as i2 from '@taiga-ui/core';
|
|
8
8
|
import { TuiModeDirective, TuiWrapperModule } from '@taiga-ui/core';
|
|
9
9
|
import * as i1 from '@taiga-ui/kit/components/radio';
|
|
@@ -35,7 +35,8 @@ class TuiRadioBlockComponent extends AbstractTuiNullableControl {
|
|
|
35
35
|
return this.size === `l` ? `l` : `m`;
|
|
36
36
|
}
|
|
37
37
|
get appearance() {
|
|
38
|
-
|
|
38
|
+
var _a;
|
|
39
|
+
if (!((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode)) {
|
|
39
40
|
return this.checked
|
|
40
41
|
? "whiteblock-active" /* WhiteblockActive */
|
|
41
42
|
: "whiteblock" /* Whiteblock */;
|
|
@@ -54,11 +55,9 @@ class TuiRadioBlockComponent extends AbstractTuiNullableControl {
|
|
|
54
55
|
}
|
|
55
56
|
TuiRadioBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRadioBlockComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TuiModeDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
56
57
|
TuiRadioBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRadioBlockComponent, selector: "tui-radio-block", inputs: { item: "item", identityMatcher: "identityMatcher", contentAlign: "contentAlign", size: "size", hideRadio: "hideRadio", pseudoDisabled: "pseudoDisabled" }, host: { properties: { "attr.data-tui-host-align": "this.contentAlign", "attr.data-size": "this.size", "class._hidden_radio": "this.hideRadio", "class._disabled": "this.computedDisabled", "class._active": "this.checked" } }, providers: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
], viewQueries: [{ propertyName: "radio", first: true, predicate: TuiRadioComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"content-wrapper\">\n <div class=\"content\">\n <tui-radio\n class=\"view\"\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [item]=\"item\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-radio>\n <div class=\"label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);display:inline-block;vertical-align:top;border-radius:var(--tui-radius-m)}:host[data-size=m],:host[data-size=l]{font:var(--tui-font-text-m)}:host._readonly{pointer-events:none}.wrapper{position:relative;border-radius:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host._disabled .wrapper{cursor:default}.content-wrapper{display:flex;flex-direction:column}:host[data-size=s] .content-wrapper{min-height:var(--tui-height-s)}:host[data-size=m] .content-wrapper{min-height:var(--tui-height-m)}:host[data-size=l] .content-wrapper{min-height:var(--tui-height-l)}.content{display:flex;align-items:center;min-height:inherit}:host[data-tui-host-align=right] .content{flex-direction:row-reverse}:host[data-size=s] .content{padding:0 1rem 0 .5rem}:host[data-size=s][data-tui-host-align=right] .content{padding:0 .5rem 0 1rem}:host[data-size=s]._hidden_radio .content{padding:0 1rem}:host[data-size=m] .content{padding:0 1rem 0 .75rem}:host[data-size=m][data-tui-host-align=right] .content{padding:0 .75rem 0 1rem}:host[data-size=m]._hidden_radio .content{padding:0 1.5rem}:host[data-size=l] .content{padding:0 1rem}:host[data-size=l]._hidden_radio .content{padding:0 2.25rem}.view{margin-top:.75rem;margin-right:.75rem;align-self:flex-start}:host[data-tui-host-align=right] .view{margin-left:.75rem;margin-right:0}:host[data-size=s] .view{margin-top:.5rem;margin-right:.5rem}:host[data-size=s][data-tui-host-align=right] .view{margin-left:.5rem}:host[data-size=m] .view{margin-top:.875rem}:host[data-size=l] .view{margin-top:1rem}:host[data-size=l][data-tui-host-align=right] .view{margin-left:1rem;margin-right:0}:host._hidden_radio .view{position:absolute;height:1px;width:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0,0,0,0);-webkit-clip-path:inset(0);clip-path:inset(0)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}:host._hidden_radio .label{text-align:center}\n"], components: [{ type: i1.TuiRadioComponent, selector: "tui-radio", inputs: ["item", "identityMatcher", "name", "size", "pseudoDisabled"] }], directives: [{ type: i2.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
58
|
+
tuiAsFocusableItemAccessor(TuiRadioBlockComponent),
|
|
59
|
+
tuiAsControl(TuiRadioBlockComponent),
|
|
60
|
+
], viewQueries: [{ propertyName: "radio", first: true, predicate: TuiRadioComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"t-wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"t-content-wrapper\">\n <div class=\"t-content\">\n <tui-radio\n class=\"t-view\"\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [item]=\"item\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-radio>\n <div class=\"t-label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);display:inline-block;vertical-align:top;border-radius:var(--tui-radius-m)}:host[data-size=m],:host[data-size=l]{font:var(--tui-font-text-m)}:host._readonly{pointer-events:none}.t-wrapper{position:relative;border-radius:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host._disabled .t-wrapper{cursor:default}.t-content-wrapper{display:flex;flex-direction:column}:host[data-size=s] .t-content-wrapper{min-height:var(--tui-height-s)}:host[data-size=m] .t-content-wrapper{min-height:var(--tui-height-m)}:host[data-size=l] .t-content-wrapper{min-height:var(--tui-height-l)}.t-content{display:flex;align-items:center;min-height:inherit}:host[data-tui-host-align=right] .t-content{flex-direction:row-reverse}:host[data-size=s] .t-content{padding:0 1rem 0 .5rem}:host[data-size=s][data-tui-host-align=right] .t-content{padding:0 .5rem 0 1rem}:host[data-size=s]._hidden_radio .t-content{padding:0 1rem}:host[data-size=m] .t-content{padding:0 1rem 0 .75rem}:host[data-size=m][data-tui-host-align=right] .t-content{padding:0 .75rem 0 1rem}:host[data-size=m]._hidden_radio .t-content{padding:0 1.5rem}:host[data-size=l] .t-content{padding:0 1rem}:host[data-size=l]._hidden_radio .t-content{padding:0 2.25rem}.t-view{margin-top:.75rem;margin-right:.75rem;align-self:flex-start}:host[data-tui-host-align=right] .t-view{margin-left:.75rem;margin-right:0}:host[data-size=s] .t-view{margin-top:.5rem;margin-right:.5rem}:host[data-size=s][data-tui-host-align=right] .t-view{margin-left:.5rem}:host[data-size=m] .t-view{margin-top:.875rem}:host[data-size=l] .t-view{margin-top:1rem}:host[data-size=l][data-tui-host-align=right] .t-view{margin-left:1rem;margin-right:0}:host._hidden_radio .t-view{position:absolute;height:1px;width:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0,0,0,0);-webkit-clip-path:inset(0);clip-path:inset(0)}.t-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}:host._hidden_radio .t-label{text-align:center}\n"], components: [{ type: i1.TuiRadioComponent, selector: "tui-radio", inputs: ["item", "identityMatcher", "name", "size", "pseudoDisabled"] }], directives: [{ type: i2.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
62
61
|
__decorate([
|
|
63
62
|
tuiDefaultProp()
|
|
64
63
|
], TuiRadioBlockComponent.prototype, "identityMatcher", void 0);
|
|
@@ -82,10 +81,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
82
81
|
styleUrls: [`./radio-block.style.less`],
|
|
83
82
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
84
83
|
providers: [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
useExisting: forwardRef(() => TuiRadioBlockComponent),
|
|
88
|
-
},
|
|
84
|
+
tuiAsFocusableItemAccessor(TuiRadioBlockComponent),
|
|
85
|
+
tuiAsControl(TuiRadioBlockComponent),
|
|
89
86
|
],
|
|
90
87
|
}]
|
|
91
88
|
}], ctorParameters: function () { return [{ type: i3.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-radio-block.js","sources":["../../../projects/kit/components/radio-block/radio-block.component.ts","../../../projects/kit/components/radio-block/radio-block.template.html","../../../projects/kit/components/radio-block/radio-block.module.ts","../../../projects/kit/components/radio-block/taiga-ui-kit-components-radio-block.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiIdentityMatcher,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiHorizontalDirection,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeS,\n} from '@taiga-ui/core';\nimport {TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\n@Component({\n selector: `tui-radio-block`,\n templateUrl: `./radio-block.template.html`,\n styleUrls: [`./radio-block.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiRadioBlockComponent),\n },\n ],\n})\nexport class TuiRadioBlockComponent<T>\n extends AbstractTuiNullableControl<T>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiRadioComponent)\n private readonly radio?: TuiRadioComponent<T>;\n\n @Input()\n item?: T;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @HostBinding(`attr.data-tui-host-align`)\n @tuiDefaultProp()\n contentAlign: TuiHorizontalDirection = `right`;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = `l`;\n\n @Input()\n @HostBinding(`class._hidden_radio`)\n @tuiDefaultProp()\n hideRadio = false;\n\n @Input()\n @tuiDefaultProp()\n pseudoDisabled = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.radio ? this.radio.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return !!this.radio && this.radio.focused;\n }\n\n @HostBinding(`class._disabled`)\n get computedDisabled(): boolean {\n return this.disabled || this.pseudoDisabled;\n }\n\n @HostBinding(`class._active`)\n get checked(): boolean {\n return this.value === this.item && this.hideRadio;\n }\n\n get checkboxSize(): TuiSizeL {\n return this.size === `l` ? `l` : `m`;\n }\n\n get appearance(): TuiAppearance {\n if (!this.modeDirective || !this.modeDirective.mode) {\n return this.checked\n ? TuiAppearance.WhiteblockActive\n : TuiAppearance.Whiteblock;\n }\n\n return this.checked ? TuiAppearance.Primary : TuiAppearance.Secondary;\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.updateFocusVisible(focusVisible);\n }\n\n onModelChange(value: T): void {\n this.updateValue(value);\n }\n}\n","<label class=\"wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"content-wrapper\">\n <div class=\"content\">\n <tui-radio\n class=\"view\"\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [item]=\"item\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-radio>\n <div class=\"label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n","import {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiRadioModule} from '@taiga-ui/kit/components/radio';\n\nimport {TuiRadioBlockComponent} from './radio-block.component';\n\n@NgModule({\n imports: [FormsModule, TuiRadioModule, TuiWrapperModule],\n declarations: [TuiRadioBlockComponent],\n exports: [TuiRadioBlockComponent],\n})\nexport class TuiRadioBlockModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA2CM,MAAO,sBACT,SAAQ,0BAA6B,CAAA;AAgCrC,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAAA;AAEvD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFjB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAyB;QA7B3D,IAAe,CAAA,eAAA,GAA0B,4BAA4B,CAAC;QAKtE,IAAY,CAAA,YAAA,GAA2B,OAAO,CAAC;QAK/C,IAAI,CAAA,IAAA,GAAwB,GAAG,CAAC;QAKhC,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;QAIlB,IAAc,CAAA,cAAA,GAAG,KAAK,CAAC;KAatB;AAED,IAAA,IAAI,sBAAsB,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC;KAChE;AAED,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,CAAC,CAA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c,EAAE,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAE7C,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAEvB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAJnB,CAAC,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAI/C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC;oBACxD,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACpC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-radio-block.js","sources":["../../../projects/kit/components/radio-block/radio-block.component.ts","../../../projects/kit/components/radio-block/radio-block.template.html","../../../projects/kit/components/radio-block/radio-block.module.ts","../../../projects/kit/components/radio-block/taiga-ui-kit-components-radio-block.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n TUI_DEFAULT_IDENTITY_MATCHER,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiIdentityMatcher,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiHorizontalDirection,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeS,\n} from '@taiga-ui/core';\nimport {TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\n@Component({\n selector: `tui-radio-block`,\n templateUrl: `./radio-block.template.html`,\n styleUrls: [`./radio-block.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiRadioBlockComponent),\n tuiAsControl(TuiRadioBlockComponent),\n ],\n})\nexport class TuiRadioBlockComponent<T>\n extends AbstractTuiNullableControl<T>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiRadioComponent)\n private readonly radio?: TuiRadioComponent<T>;\n\n @Input()\n item?: T;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @HostBinding(`attr.data-tui-host-align`)\n @tuiDefaultProp()\n contentAlign: TuiHorizontalDirection = `right`;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = `l`;\n\n @Input()\n @HostBinding(`class._hidden_radio`)\n @tuiDefaultProp()\n hideRadio = false;\n\n @Input()\n @tuiDefaultProp()\n pseudoDisabled = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.radio ? this.radio.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return !!this.radio && this.radio.focused;\n }\n\n @HostBinding(`class._disabled`)\n get computedDisabled(): boolean {\n return this.disabled || this.pseudoDisabled;\n }\n\n @HostBinding(`class._active`)\n get checked(): boolean {\n return this.value === this.item && this.hideRadio;\n }\n\n get checkboxSize(): TuiSizeL {\n return this.size === `l` ? `l` : `m`;\n }\n\n get appearance(): TuiAppearance {\n if (!this.modeDirective?.mode) {\n return this.checked\n ? TuiAppearance.WhiteblockActive\n : TuiAppearance.Whiteblock;\n }\n\n return this.checked ? TuiAppearance.Primary : TuiAppearance.Secondary;\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.updateFocusVisible(focusVisible);\n }\n\n onModelChange(value: T): void {\n this.updateValue(value);\n }\n}\n","<label class=\"t-wrapper\">\n <div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n >\n <div class=\"t-content-wrapper\">\n <div class=\"t-content\">\n <tui-radio\n class=\"t-view\"\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [item]=\"item\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"false\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"checkboxSize\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (focusVisibleChange)=\"onFocusVisible($event)\"\n ></tui-radio>\n <div class=\"t-label\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</label>\n","import {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiRadioModule} from '@taiga-ui/kit/components/radio';\n\nimport {TuiRadioBlockComponent} from './radio-block.component';\n\n@NgModule({\n imports: [FormsModule, TuiRadioModule, TuiWrapperModule],\n declarations: [TuiRadioBlockComponent],\n exports: [TuiRadioBlockComponent],\n})\nexport class TuiRadioBlockModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAyCM,MAAO,sBACT,SAAQ,0BAA6B,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import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef,
|
|
3
|
+
import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
6
|
-
import { AbstractTuiNullableControl, TUI_DEFAULT_IDENTITY_MATCHER,
|
|
6
|
+
import { AbstractTuiNullableControl, TUI_DEFAULT_IDENTITY_MATCHER, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, TuiFocusableModule, TuiFocusedModule } from '@taiga-ui/cdk';
|
|
7
7
|
import * as i3 from '@taiga-ui/core';
|
|
8
8
|
import { TuiModeDirective } from '@taiga-ui/core';
|
|
9
9
|
import * as i1 from '@taiga-ui/kit/components/radio';
|
|
@@ -39,11 +39,9 @@ class TuiRadioLabeledComponent extends AbstractTuiNullableControl {
|
|
|
39
39
|
}
|
|
40
40
|
TuiRadioLabeledComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRadioLabeledComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TuiModeDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
41
|
TuiRadioLabeledComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRadioLabeledComponent, selector: "tui-radio-labeled", inputs: { item: "item", size: "size", identityMatcher: "identityMatcher", pseudoDisabled: "pseudoDisabled" }, host: { properties: { "attr.data-size": "this.size", "class._disabled": "this.computedDisabled", "attr.data-mode": "this.mode" } }, providers: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
], viewQueries: [{ propertyName: "radio", first: true, predicate: TuiRadioComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"wrapper\">\n <tui-radio\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"size\"\n [item]=\"item\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n ></tui-radio>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</label>\n", styles: [":host{position:relative;display:block;font:var(--tui-font-text-s);line-height:1rem}:host._readonly{pointer-events:none}.wrapper{display:inline-flex;max-width:100%;cursor:pointer;vertical-align:top}:host._disabled .wrapper{cursor:default}:host[data-mode=onDark] .wrapper{color:var(--tui-text-01-night)}.content{word-wrap:break-word;min-width:0}:host[data-size=m] .content{margin-left:.5rem}:host[data-size=l] .content{font:var(--tui-font-text-m);margin-left:.75rem}\n"], components: [{ type: i1.TuiRadioComponent, selector: "tui-radio", inputs: ["item", "identityMatcher", "name", "size", "pseudoDisabled"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
|
+
tuiAsFocusableItemAccessor(TuiRadioLabeledComponent),
|
|
43
|
+
tuiAsControl(TuiRadioLabeledComponent),
|
|
44
|
+
], viewQueries: [{ propertyName: "radio", first: true, predicate: TuiRadioComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"t-wrapper\">\n <tui-radio\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"size\"\n [item]=\"item\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n ></tui-radio>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n</label>\n", styles: [":host{position:relative;display:block;font:var(--tui-font-text-s);line-height:1rem}:host._readonly{pointer-events:none}.t-wrapper{display:inline-flex;max-width:100%;cursor:pointer;vertical-align:top}:host._disabled .t-wrapper{cursor:default}:host[data-mode=onDark] .t-wrapper{color:var(--tui-text-01-night)}.t-content{word-wrap:break-word;min-width:0}:host[data-size=m] .t-content{margin-left:.5rem}:host[data-size=l] .t-content{font:var(--tui-font-text-m);margin-left:.75rem}\n"], components: [{ type: i1.TuiRadioComponent, selector: "tui-radio", inputs: ["item", "identityMatcher", "name", "size", "pseudoDisabled"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
45
|
__decorate([
|
|
48
46
|
tuiDefaultProp()
|
|
49
47
|
], TuiRadioLabeledComponent.prototype, "size", void 0);
|
|
@@ -61,10 +59,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
61
59
|
styleUrls: [`./radio-labeled.style.less`],
|
|
62
60
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
63
61
|
providers: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
useExisting: forwardRef(() => TuiRadioLabeledComponent),
|
|
67
|
-
},
|
|
62
|
+
tuiAsFocusableItemAccessor(TuiRadioLabeledComponent),
|
|
63
|
+
tuiAsControl(TuiRadioLabeledComponent),
|
|
68
64
|
],
|
|
69
65
|
}]
|
|
70
66
|
}], ctorParameters: function () { return [{ type: i2.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-radio-labeled.js","sources":["../../../projects/kit/components/radio-labeled/radio-labeled.component.ts","../../../projects/kit/components/radio-labeled/radio-labeled.template.html","../../../projects/kit/components/radio-labeled/radio-labeled.module.ts","../../../projects/kit/components/radio-labeled/taiga-ui-kit-components-radio-labeled.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-radio-labeled.js","sources":["../../../projects/kit/components/radio-labeled/radio-labeled.component.ts","../../../projects/kit/components/radio-labeled/radio-labeled.template.html","../../../projects/kit/components/radio-labeled/radio-labeled.module.ts","../../../projects/kit/components/radio-labeled/taiga-ui-kit-components-radio-labeled.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n TUI_DEFAULT_IDENTITY_MATCHER,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiIdentityMatcher,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TuiBrightness, TuiModeDirective, TuiSizeL} from '@taiga-ui/core';\nimport {TuiRadioComponent} from '@taiga-ui/kit/components/radio';\n\n@Component({\n selector: `tui-radio-labeled`,\n templateUrl: `./radio-labeled.template.html`,\n styleUrls: [`./radio-labeled.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiRadioLabeledComponent),\n tuiAsControl(TuiRadioLabeledComponent),\n ],\n})\nexport class TuiRadioLabeledComponent<T>\n extends AbstractTuiNullableControl<T>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiRadioComponent)\n private readonly radio?: TuiRadioComponent<T>;\n\n @Input()\n item?: T;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n pseudoDisabled = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.radio ? this.radio.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return !!this.radio && this.radio.focused;\n }\n\n @HostBinding(`class._disabled`)\n get computedDisabled(): boolean {\n return this.disabled || this.pseudoDisabled;\n }\n\n @HostBinding(`attr.data-mode`)\n get mode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onModelChange(value: T): void {\n this.updateValue(value);\n }\n}\n","<label class=\"t-wrapper\">\n <tui-radio\n [focusable]=\"focusable\"\n [identityMatcher]=\"identityMatcher\"\n [name]=\"computedName || ''\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [pseudoDisabled]=\"computedDisabled\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [size]=\"size\"\n [item]=\"item\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n ></tui-radio>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n</label>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule, TuiFocusedModule} from '@taiga-ui/cdk';\nimport {TuiRadioModule} from '@taiga-ui/kit/components/radio';\n\nimport {TuiRadioLabeledComponent} from './radio-labeled.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiRadioModule,\n ],\n declarations: [TuiRadioLabeledComponent],\n exports: [TuiRadioLabeledComponent],\n})\nexport class TuiRadioLabeledModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAmCM,MAAO,wBACT,SAAQ,0BAA6B,CAAA;AAsBrC,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAAA;AAEvD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFjB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAyB;QAlB3D,IAAI,CAAA,IAAA,GAAa,GAAG,CAAC;QAIrB,IAAe,CAAA,eAAA,GAA0B,4BAA4B,CAAC;QAItE,IAAc,CAAA,cAAA,GAAG,KAAK,CAAC;KAatB;AAED,IAAA,IAAI,sBAAsB,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC;KAChE;AAED,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;KAC7C;AAED,IAAA,IACI,gBAAgB,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC;KAC/C;AAED,IAAA,IACI,IAAI,GAAA;AACJ,QA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AAA,EAAA,qBAAqB,EAVrB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,gBAAgB;YAChB,cAAc;AACjB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAXjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,gBAAgB;wBAChB,cAAc;AACjB,qBAAA;oBACD,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef, ElementRef,
|
|
3
|
+
import { ChangeDetectorRef, ElementRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChildren, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i4 from '@angular/forms';
|
|
5
5
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
6
|
-
import { AbstractTuiNullableControl, EMPTY_QUERY, TUI_DEFAULT_IDENTITY_MATCHER, ALWAYS_FALSE_HANDLER, tuiIsNativeFocusedIn,
|
|
6
|
+
import { AbstractTuiNullableControl, EMPTY_QUERY, TUI_DEFAULT_IDENTITY_MATCHER, ALWAYS_FALSE_HANDLER, tuiIsNativeFocusedIn, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
7
7
|
import * as i2 from '@taiga-ui/kit/components/radio-labeled';
|
|
8
8
|
import { TuiRadioLabeledComponent, TuiRadioLabeledModule } from '@taiga-ui/kit/components/radio-labeled';
|
|
9
9
|
import * as i1 from '@taiga-ui/kit/components/radio-group';
|
|
@@ -50,11 +50,9 @@ class TuiRadioListComponent extends AbstractTuiNullableControl {
|
|
|
50
50
|
}
|
|
51
51
|
TuiRadioListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRadioListComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
52
52
|
TuiRadioListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRadioListComponent, selector: "tui-radio-list", inputs: { items: "items", size: "size", identityMatcher: "identityMatcher", orientation: "orientation", disabledItemHandler: "disabledItemHandler", itemContent: "itemContent" }, host: { properties: { "attr.data-size": "this.size", "attr.data-tui-host-orientation": "this.orientation" } }, providers: [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
], viewQueries: [{ propertyName: "radioButtons", predicate: TuiRadioLabeledComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-radio-group class=\"group\">\n <tui-radio-labeled\n *ngFor=\"let item of items; index as index\"\n class=\"item\"\n [readOnly]=\"readOnly\"\n [nativeId]=\"computeId(index)\"\n [disabled]=\"disabled\"\n [item]=\"item\"\n [size]=\"size\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoDisabled]=\"itemIsDisabled(item)\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n >\n <ng-container\n *polymorpheusOutlet=\"\n itemContent as text;\n context: {$implicit: item, index: index, active: itemIsActive(item)}\n \"\n >\n {{ text }}\n </ng-container>\n </tui-radio-labeled>\n</tui-radio-group>\n", styles: [":host{display:block}:host._readonly{pointer-events:none}:host[data-tui-host-orientation=horizontal] .group{display:flex;justify-content:inherit}:host[data-tui-host-orientation=horizontal] .item:nth-child(n + 2){margin-left:1.5rem}:host[data-tui-host-orientation=vertical] .item:nth-child(n + 2){margin-top:.75rem}:host[data-size=l][data-tui-host-orientation=horizontal] .item:nth-child(n + 2){margin-left:2.5rem}:host[data-size=l][data-tui-host-orientation=vertical] .item:nth-child(n + 2){margin-top:1rem}\n"], components: [{ type: i1.TuiRadioGroupComponent, selector: "tui-radio-group", inputs: ["name"] }, { type: i2.TuiRadioLabeledComponent, selector: "tui-radio-labeled", inputs: ["item", "size", "identityMatcher", "pseudoDisabled"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
+
tuiAsFocusableItemAccessor(TuiRadioListComponent),
|
|
54
|
+
tuiAsControl(TuiRadioListComponent),
|
|
55
|
+
], viewQueries: [{ propertyName: "radioButtons", predicate: TuiRadioLabeledComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-radio-group class=\"t-group\">\n <tui-radio-labeled\n *ngFor=\"let item of items; index as index\"\n class=\"t-item\"\n [readOnly]=\"readOnly\"\n [nativeId]=\"computeId(index)\"\n [disabled]=\"disabled\"\n [item]=\"item\"\n [size]=\"size\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoDisabled]=\"itemIsDisabled(item)\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n >\n <ng-container\n *polymorpheusOutlet=\"\n itemContent as text;\n context: {$implicit: item, index: index, active: itemIsActive(item)}\n \"\n >\n {{ text }}\n </ng-container>\n </tui-radio-labeled>\n</tui-radio-group>\n", styles: [":host{display:block}:host._readonly{pointer-events:none}:host[data-tui-host-orientation=horizontal] .t-group{display:flex;justify-content:inherit}:host[data-tui-host-orientation=horizontal] .t-item:nth-child(n + 2){margin-left:1.5rem}:host[data-tui-host-orientation=vertical] .t-item:nth-child(n + 2){margin-top:.75rem}:host[data-size=l][data-tui-host-orientation=horizontal] .t-item:nth-child(n + 2){margin-left:2.5rem}:host[data-size=l][data-tui-host-orientation=vertical] .t-item:nth-child(n + 2){margin-top:1rem}\n"], components: [{ type: i1.TuiRadioGroupComponent, selector: "tui-radio-group", inputs: ["name"] }, { type: i2.TuiRadioLabeledComponent, selector: "tui-radio-labeled", inputs: ["item", "size", "identityMatcher", "pseudoDisabled"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
58
56
|
__decorate([
|
|
59
57
|
tuiDefaultProp()
|
|
60
58
|
], TuiRadioListComponent.prototype, "items", void 0);
|
|
@@ -81,10 +79,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
81
79
|
styleUrls: [`./radio-list.style.less`],
|
|
82
80
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
83
81
|
providers: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
useExisting: forwardRef(() => TuiRadioListComponent),
|
|
87
|
-
},
|
|
82
|
+
tuiAsFocusableItemAccessor(TuiRadioListComponent),
|
|
83
|
+
tuiAsControl(TuiRadioListComponent),
|
|
88
84
|
],
|
|
89
85
|
}]
|
|
90
86
|
}], ctorParameters: function () { return [{ type: i4.NgControl, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-radio-list.js","sources":["../../../projects/kit/components/radio-list/radio-list.component.ts","../../../projects/kit/components/radio-list/radio-list.template.html","../../../projects/kit/components/radio-list/radio-list.module.ts","../../../projects/kit/components/radio-list/taiga-ui-kit-components-radio-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n QueryList,\n Self,\n ViewChildren,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n ALWAYS_FALSE_HANDLER,\n EMPTY_QUERY,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiBooleanHandler,\n tuiDefaultProp,\n TuiIdentityMatcher,\n tuiIsNativeFocusedIn,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TuiOrientation, TuiSizeL, TuiValueContentContext} from '@taiga-ui/core';\nimport {TuiRadioLabeledComponent} from '@taiga-ui/kit/components/radio-labeled';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: `tui-radio-list`,\n templateUrl: `./radio-list.template.html`,\n styleUrls: [`./radio-list.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiRadioListComponent),\n },\n ],\n})\nexport class TuiRadioListComponent<T> extends AbstractTuiNullableControl<T> {\n @ViewChildren(TuiRadioLabeledComponent)\n private readonly radioButtons: QueryList<TuiRadioLabeledComponent<unknown>> =\n EMPTY_QUERY;\n\n @Input()\n @tuiDefaultProp()\n items: readonly T[] = [];\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @HostBinding(`attr.data-tui-host-orientation`)\n @tuiDefaultProp()\n orientation: TuiOrientation = `vertical`;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<T> = ALWAYS_FALSE_HANDLER;\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<HTMLElement>,\n ) {\n super(control, changeDetectorRef);\n }\n\n // @bad TODO: Remove & { index: number }\n @Input()\n @tuiDefaultProp()\n itemContent: PolymorpheusContent<TuiValueContentContext<T> & {index: number}> = ({\n $implicit,\n }) => String($implicit);\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n const focusableRadioButton = this.radioButtons.find(\n radioButton => radioButton.nativeFocusableElement !== null,\n );\n\n return focusableRadioButton ? focusableRadioButton.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocusedIn(this.elementRef.nativeElement);\n }\n\n computeId(index: number): string {\n return `${this.id}-${index}`;\n }\n\n itemIsDisabled(item: T): boolean {\n return this.disabledItemHandler(item);\n }\n\n onModelChange(value: T): void {\n this.updateValue(value);\n }\n\n itemIsActive(item: T): boolean {\n return this.value === null\n ? item === null\n : this.identityMatcher(this.value, item);\n }\n}\n","<tui-radio-group class=\"group\">\n <tui-radio-labeled\n *ngFor=\"let item of items; index as index\"\n class=\"item\"\n [readOnly]=\"readOnly\"\n [nativeId]=\"computeId(index)\"\n [disabled]=\"disabled\"\n [item]=\"item\"\n [size]=\"size\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoDisabled]=\"itemIsDisabled(item)\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n >\n <ng-container\n *polymorpheusOutlet=\"\n itemContent as text;\n context: {$implicit: item, index: index, active: itemIsActive(item)}\n \"\n >\n {{ text }}\n </ng-container>\n </tui-radio-labeled>\n</tui-radio-group>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiRadioGroupModule} from '@taiga-ui/kit/components/radio-group';\nimport {TuiRadioLabeledModule} from '@taiga-ui/kit/components/radio-labeled';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiRadioListComponent} from './radio-list.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiRadioGroupModule,\n TuiRadioLabeledModule,\n ],\n declarations: [TuiRadioListComponent],\n exports: [TuiRadioListComponent],\n})\nexport class TuiRadioListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA2CM,MAAO,qBAAyB,SAAQ,0BAA6B,CAAA;AA2BvE,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAC1B,UAAmC,EAAA;AAExE,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFG,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QA/B3D,IAAY,CAAA,YAAA,GACzB,WAAW,CAAC;QAIhB,IAAK,CAAA,KAAA,GAAiB,EAAE,CAAC;QAKzB,IAAI,CAAA,IAAA,GAAa,GAAG,CAAC;QAIrB,IAAe,CAAA,eAAA,GAA0B,4BAA4B,CAAC;QAKtE,IAAW,CAAA,WAAA,GAAmB,UAAU,CAAC;QAIzC,IAAmB,CAAA,mBAAA,GAAyB,oBAAoB,CAAC;;AAgBjE,QAAA,IAAA,CAAA,WAAW,GAAqE,CAAC,EAC7E,SAAS,GACZ,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC;KAPvB;AASD,IAAA,IAAI,sBAAsB,GAAA;AACtB,QAAA,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAC/C,WAAW,IAAI,WAA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;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,mBAAmB;YACnB,qBAAqB;AACxB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,mBAAmB;wBACnB,qBAAqB;AACxB,qBAAA;oBACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-radio-list.js","sources":["../../../projects/kit/components/radio-list/radio-list.component.ts","../../../projects/kit/components/radio-list/radio-list.template.html","../../../projects/kit/components/radio-list/radio-list.module.ts","../../../projects/kit/components/radio-list/taiga-ui-kit-components-radio-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n QueryList,\n Self,\n ViewChildren,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n ALWAYS_FALSE_HANDLER,\n EMPTY_QUERY,\n TUI_DEFAULT_IDENTITY_MATCHER,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n TuiBooleanHandler,\n tuiDefaultProp,\n TuiIdentityMatcher,\n tuiIsNativeFocusedIn,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TuiOrientation, TuiSizeL, TuiValueContentContext} from '@taiga-ui/core';\nimport {TuiRadioLabeledComponent} from '@taiga-ui/kit/components/radio-labeled';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: `tui-radio-list`,\n templateUrl: `./radio-list.template.html`,\n styleUrls: [`./radio-list.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiRadioListComponent),\n tuiAsControl(TuiRadioListComponent),\n ],\n})\nexport class TuiRadioListComponent<T> extends AbstractTuiNullableControl<T> {\n @ViewChildren(TuiRadioLabeledComponent)\n private readonly radioButtons: QueryList<TuiRadioLabeledComponent<unknown>> =\n EMPTY_QUERY;\n\n @Input()\n @tuiDefaultProp()\n items: readonly T[] = [];\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @HostBinding(`attr.data-tui-host-orientation`)\n @tuiDefaultProp()\n orientation: TuiOrientation = `vertical`;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<T> = ALWAYS_FALSE_HANDLER;\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<HTMLElement>,\n ) {\n super(control, changeDetectorRef);\n }\n\n // @bad TODO: Remove & { index: number }\n @Input()\n @tuiDefaultProp()\n itemContent: PolymorpheusContent<TuiValueContentContext<T> & {index: number}> = ({\n $implicit,\n }) => String($implicit);\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n const focusableRadioButton = this.radioButtons.find(\n radioButton => radioButton.nativeFocusableElement !== null,\n );\n\n return focusableRadioButton ? focusableRadioButton.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocusedIn(this.elementRef.nativeElement);\n }\n\n computeId(index: number): string {\n return `${this.id}-${index}`;\n }\n\n itemIsDisabled(item: T): boolean {\n return this.disabledItemHandler(item);\n }\n\n onModelChange(value: T): void {\n this.updateValue(value);\n }\n\n itemIsActive(item: T): boolean {\n return this.value === null\n ? item === null\n : this.identityMatcher(this.value, item);\n }\n}\n","<tui-radio-group class=\"t-group\">\n <tui-radio-labeled\n *ngFor=\"let item of items; index as index\"\n class=\"t-item\"\n [readOnly]=\"readOnly\"\n [nativeId]=\"computeId(index)\"\n [disabled]=\"disabled\"\n [item]=\"item\"\n [size]=\"size\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoDisabled]=\"itemIsDisabled(item)\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n >\n <ng-container\n *polymorpheusOutlet=\"\n itemContent as text;\n context: {$implicit: item, index: index, active: itemIsActive(item)}\n \"\n >\n {{ text }}\n </ng-container>\n </tui-radio-labeled>\n</tui-radio-group>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiRadioGroupModule} from '@taiga-ui/kit/components/radio-group';\nimport {TuiRadioLabeledModule} from '@taiga-ui/kit/components/radio-labeled';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiRadioListComponent} from './radio-list.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiRadioGroupModule,\n TuiRadioLabeledModule,\n ],\n declarations: [TuiRadioListComponent],\n exports: [TuiRadioListComponent],\n})\nexport class TuiRadioListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyCM,MAAO,qBAAyB,SAAQ,0BAA6B,CAAA;AA2BvE,IAAA,WAAA,CAII,OAAyB,EACE,iBAAoC,EAC1B,UAAmC,EAAA;AAExE,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFG,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QA/B3D,IAAY,CAAA,YAAA,GACzB,WAAW,CAAC;QAIhB,IAAK,CAAA,KAAA,GAAiB,EAAE,CAAC;QAKzB,IAAI,CAAA,IAAA,GAAa,GAAG,CAAC;Q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,CANhC,YAAY;QACZ,WAAW;QACX,kBAAkB;QAClB,mBAAmB;AACnB,QAAA,qBAAqB,aAGf,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEtB,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAVlB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,mBAAmB;YACnB,qBAAqB;AACxB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,mBAAmB;wBACnB,qBAAqB;AACxB,qBAAA;oBACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, ChangeDetectorRef,
|
|
3
|
+
import { InjectionToken, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import * as i4 from '@angular/forms';
|
|
5
5
|
import { NgControl } from '@angular/forms';
|
|
6
6
|
import * as i3 from '@taiga-ui/cdk';
|
|
7
|
-
import { AbstractTuiNullableControl, TUI_DEFAULT_IDENTITY_MATCHER, tuiIsNativeFocused,
|
|
7
|
+
import { AbstractTuiNullableControl, TUI_DEFAULT_IDENTITY_MATCHER, tuiIsNativeFocused, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, TuiCheckedModule, TuiFocusableModule, TuiFocusedModule, TuiFocusVisibleModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1 from '@taiga-ui/core';
|
|
9
9
|
import { TUI_ANIMATION_OPTIONS, tuiScaleIn, TuiWrapperModule } from '@taiga-ui/core';
|
|
10
10
|
import * as i5 from '@taiga-ui/kit/components/radio-group';
|
|
@@ -28,7 +28,6 @@ const tuiRadioOptionsProvider = (options) => ({
|
|
|
28
28
|
useValue: Object.assign(Object.assign({}, TUI_RADIO_DEFAULT_OPTIONS), options),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
// @dynamic
|
|
32
31
|
class TuiRadioComponent extends AbstractTuiNullableControl {
|
|
33
32
|
constructor(control, changeDetectorRef, animationOptions, options, radioGroup) {
|
|
34
33
|
super(control, changeDetectorRef);
|
|
@@ -87,11 +86,9 @@ class TuiRadioComponent extends AbstractTuiNullableControl {
|
|
|
87
86
|
}
|
|
88
87
|
TuiRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRadioComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_ANIMATION_OPTIONS }, { token: TUI_RADIO_OPTIONS }, { token: TuiRadioGroupComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
89
88
|
TuiRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRadioComponent, selector: "tui-radio", inputs: { item: "item", identityMatcher: "identityMatcher", name: "name", size: "size", pseudoDisabled: "pseudoDisabled" }, host: { properties: { "attr.data-size": "this.size", "class._disabled": "this.computedDisabled" } }, providers: [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"checked\"\n class=\"mark\"\n [@tuiScaleIn]=\"animation\"\n ></div>\n <input\n #focusableElement\n type=\"radio\"\n class=\"native\"\n [id]=\"id\"\n [attr.name]=\"computedName\"\n [disabled]=\"computedDisabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"isFocusable\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0;border-radius:100%}:host[data-size=m]{width:1rem;height:1rem}:host[data-size=l]{width:1.5rem;height:1.5rem}:host._readonly{pointer-events:none}.mark{position:absolute;background-color:currentColor;border-radius:100%}:host[data-size=m] .mark{margin:.25rem;width:.5rem;height:.5rem}:host[data-size=l] .mark{margin:.4375rem;width:.625rem;height:.625rem}.native{padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.native:-webkit-autofill,.native:-webkit-autofill:hover,.native:-webkit-autofill:focus{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host._disabled .native{cursor:default}\n"], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.TuiCheckedDirective, selector: "input[tuiChecked], input[tuiCheckedChange]", inputs: ["tuiChecked"], outputs: ["tuiCheckedChange"] }, { type: i3.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i3.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }], animations: [tuiScaleIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
89
|
+
tuiAsFocusableItemAccessor(TuiRadioComponent),
|
|
90
|
+
tuiAsControl(TuiRadioComponent),
|
|
91
|
+
], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n [appearance]=\"appearance\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n>\n <div\n *ngIf=\"checked\"\n class=\"t-mark\"\n [@tuiScaleIn]=\"animation\"\n ></div>\n <input\n #focusableElement\n type=\"radio\"\n class=\"t-native\"\n [id]=\"id\"\n [attr.name]=\"computedName\"\n [disabled]=\"computedDisabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"isFocusable\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n />\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0;border-radius:100%}:host[data-size=m]{width:1rem;height:1rem}:host[data-size=l]{width:1.5rem;height:1.5rem}:host._readonly{pointer-events:none}.t-mark{position:absolute;background-color:currentColor;border-radius:100%}:host[data-size=m] .t-mark{margin:.25rem;width:.5rem;height:.5rem}:host[data-size=l] .t-mark{margin:.4375rem;width:.625rem;height:.625rem}.t-native{padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.t-native:-webkit-autofill,.t-native:-webkit-autofill:hover,.t-native:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host._disabled .t-native{cursor:default}\n"], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.TuiCheckedDirective, selector: "input[tuiChecked], input[tuiCheckedChange]", inputs: ["tuiChecked"], outputs: ["tuiCheckedChange"] }, { type: i3.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i3.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i3.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }], animations: [tuiScaleIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
95
92
|
__decorate([
|
|
96
93
|
tuiDefaultProp()
|
|
97
94
|
], TuiRadioComponent.prototype, "identityMatcher", void 0);
|
|
@@ -112,10 +109,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
112
109
|
styleUrls: [`./radio.style.less`],
|
|
113
110
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
111
|
providers: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
useExisting: forwardRef(() => TuiRadioComponent),
|
|
118
|
-
},
|
|
112
|
+
tuiAsFocusableItemAccessor(TuiRadioComponent),
|
|
113
|
+
tuiAsControl(TuiRadioComponent),
|
|
119
114
|
],
|
|
120
115
|
animations: [tuiScaleIn],
|
|
121
116
|
}]
|