@taiga-ui/core 2.23.0 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/abstract/abstract-dropdown.d.ts +1 -1
- package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +21 -7
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +24 -23
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +15 -39
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +5 -5
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +29 -22
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +10 -23
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +5 -4
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +2 -2
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +3 -3
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +2 -15
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +4 -4
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +18 -15
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +4 -4
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +61 -61
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +53 -43
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +2 -2
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components.umd.js +8 -8
- package/bundles/taiga-ui-core-components.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +11 -3
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-border.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-border.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +9 -3
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.js +8 -8
- package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
- package/bundles/taiga-ui-core-enums.umd.js +1 -0
- package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.min.js +1 -1
- package/bundles/taiga-ui-core-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.js +25 -25
- package/bundles/taiga-ui-core-modules-notifications.umd.js.map +1 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.min.js +1 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes.umd.js +12 -12
- package/bundles/taiga-ui-core-pipes.umd.min.js +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +9 -9
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
- package/bundles/taiga-ui-core-services.umd.js +1 -1
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +25 -25
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +27 -8
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/components/button/button-options.d.ts +10 -0
- package/components/button/button.component.d.ts +8 -7
- package/components/button/index.d.ts +1 -0
- package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
- package/components/calendar/taiga-ui-core-components-calendar.metadata.json +1 -1
- package/components/data-list/data-list.component.d.ts +4 -4
- package/components/data-list/index.d.ts +1 -1
- package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
- package/components/dialog/dialog.directive.d.ts +2 -11
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/dropdown-box/dropdown-box.component.d.ts +2 -2
- package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/error/taiga-ui-core-components-error.metadata.json +1 -1
- package/components/expand/expand.component.d.ts +2 -2
- package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
- package/components/group/taiga-ui-core-components-group.metadata.json +1 -1
- package/components/hints-host/hint-box/hint-box.component.d.ts +5 -3
- package/components/hints-host/index.d.ts +2 -2
- package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
- package/components/hosted-dropdown/hosted-dropdown.component.d.ts +4 -6
- package/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.metadata.json +1 -1
- package/components/index.d.ts +1 -1
- package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
- package/components/link/link.component.d.ts +1 -0
- package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
- package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
- package/components/notification/taiga-ui-core-components-notification.metadata.json +1 -1
- package/components/primitive-calendar/primitive-calendar.component.d.ts +3 -3
- package/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.metadata.json +1 -1
- package/components/primitive-checkbox/primitive-checkbox.component.d.ts +1 -3
- package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.metadata.json +1 -1
- package/components/primitive-spin-button/primitive-spin-button.component.d.ts +1 -1
- package/components/primitive-spin-button/taiga-ui-core-components-primitive-spin-button.metadata.json +1 -1
- package/components/primitive-textfield/primitive-textfield.component.d.ts +2 -3
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +2 -1
- package/components/primitive-year-picker/primitive-year-picker.component.d.ts +3 -3
- package/components/primitive-year-picker/taiga-ui-core-components-primitive-year-picker.metadata.json +1 -1
- package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
- package/components/scroll-controls/index.d.ts +1 -1
- package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
- package/components/scrollbar/index.d.ts +1 -1
- package/components/scrollbar/scrollable.directive.d.ts +5 -1
- package/components/scrollbar/scrollbar.component.d.ts +5 -4
- package/components/scrollbar/taiga-ui-core-components-scrollbar.metadata.json +1 -1
- package/components/svg/svg.component.d.ts +3 -3
- package/components/svg/taiga-ui-core-components-svg.metadata.json +1 -1
- package/components/taiga-ui-core-components.metadata.json +1 -1
- package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
- package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
- package/components/tooltip/tooltip.component.d.ts +1 -1
- package/components/wrapper/taiga-ui-core-components-wrapper.metadata.json +1 -1
- package/constants/events.d.ts +5 -0
- package/constants/index.d.ts +1 -1
- package/constants/regexp.d.ts +1 -0
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/border/taiga-ui-core-directives-border.metadata.json +1 -1
- package/directives/color/index.d.ts +1 -1
- package/directives/color/taiga-ui-core-directives-color.metadata.json +1 -1
- package/directives/described-by/taiga-ui-core-directives-described-by.metadata.json +1 -1
- package/directives/dropdown-controller/taiga-ui-core-directives-dropdown-controller.metadata.json +1 -1
- package/directives/hint/hint.directive.d.ts +1 -1
- package/directives/hint/taiga-ui-core-directives-hint.metadata.json +1 -1
- package/directives/hint-controller/taiga-ui-core-directives-hint-controller.metadata.json +1 -1
- package/directives/index.d.ts +1 -1
- package/directives/manual-hint/taiga-ui-core-directives-manual-hint.metadata.json +1 -1
- package/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.metadata.json +1 -1
- package/directives/mode/taiga-ui-core-directives-mode.metadata.json +1 -1
- package/directives/pointer-hint/pointer-hint.directive.d.ts +1 -1
- package/directives/pointer-hint/taiga-ui-core-directives-pointer-hint.metadata.json +1 -1
- package/directives/scroll-into-view/taiga-ui-core-directives-scroll-into-view.metadata.json +1 -1
- package/directives/table-mode/taiga-ui-core-directives-table-mode.metadata.json +1 -1
- package/directives/taiga-ui-core-directives.metadata.json +1 -1
- package/directives/textfield-controller/index.d.ts +2 -2
- package/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.metadata.json +1 -1
- package/directives/textfield-controller/textfield-controller.provider.d.ts +1 -1
- package/enums/appearance.d.ts +1 -0
- package/enums/taiga-ui-core-enums.metadata.json +1 -1
- package/esm2015/abstract/abstract-dropdown.js +1 -1
- package/esm2015/components/button/button-options.js +10 -0
- package/esm2015/components/button/button.component.js +12 -8
- package/esm2015/components/button/button.module.js +1 -1
- package/esm2015/components/button/index.js +2 -1
- package/esm2015/components/calendar/calendar.component.js +2 -2
- package/esm2015/components/data-list/data-list.component.js +19 -18
- package/esm2015/components/data-list/data-list.module.js +2 -2
- package/esm2015/components/data-list/index.js +2 -2
- package/esm2015/components/data-list/option/option.component.js +3 -3
- package/esm2015/components/dialog/dialog.component.js +2 -2
- package/esm2015/components/dialog/dialog.directive.js +14 -36
- package/esm2015/components/dialog/dialog.module.js +1 -1
- package/esm2015/components/dialog/dialog.service.js +1 -1
- package/esm2015/components/dropdown-box/dropdown-box.component.js +2 -2
- package/esm2015/components/dropdown-box/dropdown-box.module.js +1 -1
- package/esm2015/components/error/error.component.js +2 -2
- package/esm2015/components/error/error.module.js +1 -1
- package/esm2015/components/expand/expand.component.js +6 -6
- package/esm2015/components/expand/expand.module.js +2 -2
- package/esm2015/components/group/group.component.js +1 -1
- package/esm2015/components/group/group.module.js +1 -1
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +17 -13
- package/esm2015/components/hints-host/hint-box/hint-box.module.js +1 -1
- package/esm2015/components/hints-host/hints-host.component.js +2 -2
- package/esm2015/components/hints-host/hints-host.module.js +1 -1
- package/esm2015/components/hints-host/index.js +3 -3
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +12 -21
- package/esm2015/components/hosted-dropdown/hosted-dropdown.module.js +2 -2
- package/esm2015/components/index.js +2 -2
- package/esm2015/components/label/label.component.js +2 -2
- package/esm2015/components/label/label.module.js +1 -1
- package/esm2015/components/link/link.component.js +5 -3
- package/esm2015/components/loader/loader.component.js +3 -3
- package/esm2015/components/loader/loader.module.js +1 -1
- package/esm2015/components/notification/notification.component.js +1 -1
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +4 -4
- package/esm2015/components/primitive-calendar/primitive-calendar.module.js +1 -1
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +4 -13
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +5 -5
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +7 -10
- package/esm2015/components/primitive-textfield/primitive-textfield.module.js +1 -1
- package/esm2015/components/primitive-textfield/primitive-textfield.providers.js +1 -1
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +10 -4
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +5 -5
- package/esm2015/components/root/root.module.js +1 -1
- package/esm2015/components/scroll-controls/index.js +2 -2
- package/esm2015/components/scroll-controls/scroll-controls.component.js +1 -1
- package/esm2015/components/scroll-controls/scroll-controls.module.js +2 -2
- package/esm2015/components/scrollbar/index.js +2 -2
- package/esm2015/components/scrollbar/scrollable.directive.js +18 -4
- package/esm2015/components/scrollbar/scrollbar.component.js +21 -19
- package/esm2015/components/scrollbar/scrollbar.module.js +1 -1
- package/esm2015/components/svg/svg.component.js +2 -2
- package/esm2015/components/svg/svg.module.js +1 -1
- package/esm2015/components/theme-night/theme-night.module.js +1 -1
- package/esm2015/components/tooltip/tooltip.component.js +3 -3
- package/esm2015/components/wrapper/wrapper.module.js +1 -1
- package/esm2015/constants/events.js +6 -1
- package/esm2015/constants/index.js +2 -2
- package/esm2015/constants/regexp.js +2 -1
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/border/border.module.js +1 -1
- package/esm2015/directives/color/color.module.js +1 -1
- package/esm2015/directives/color/index.js +2 -2
- package/esm2015/directives/described-by/described-by.module.js +1 -1
- package/esm2015/directives/dropdown-controller/dropdown-controller.directive.js +1 -1
- package/esm2015/directives/dropdown-controller/dropdown-controller.module.js +1 -1
- package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +1 -1
- package/esm2015/directives/dropdown-controller/dropdown-controller.token.js +1 -1
- package/esm2015/directives/hint/hint.directive.js +2 -2
- package/esm2015/directives/hint/hint.module.js +1 -1
- package/esm2015/directives/hint-controller/hint-controller.directive.js +1 -1
- package/esm2015/directives/hint-controller/hint-controller.module.js +1 -1
- package/esm2015/directives/hint-controller/hint-controller.provider.js +1 -1
- package/esm2015/directives/hint-controller/hint-controller.token.js +1 -1
- package/esm2015/directives/index.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint.module.js +1 -1
- package/esm2015/directives/mask-accessor/mask-accessor.module.js +1 -1
- package/esm2015/directives/mode/mode.module.js +1 -1
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +2 -2
- package/esm2015/directives/pointer-hint/pointer-hint.module.js +1 -1
- package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +1 -1
- package/esm2015/directives/table-mode/table-mode.module.js +1 -1
- package/esm2015/directives/textfield-controller/index.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -2
- package/esm2015/directives/textfield-controller/textfield-controller.module.js +1 -1
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +4 -2
- package/esm2015/directives/textfield-controller/textfield-type.directive.js +4 -2
- package/esm2015/directives/textfield-controller/textfield.controller.js +1 -1
- package/esm2015/enums/appearance.js +2 -1
- package/esm2015/interfaces/dialog-context.js +1 -1
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
- package/esm2015/internal/svg-defs-host/svg-defs-host.module.js +1 -1
- package/esm2015/mask/index.js +1 -1
- package/esm2015/modules/notifications/index.js +3 -3
- package/esm2015/modules/notifications/notification-alert/Notification-alert.js +1 -1
- package/esm2015/modules/notifications/notification-alert/notification-alert.component.js +2 -2
- package/esm2015/modules/notifications/notifications-host/notifications-host.component.js +2 -2
- package/esm2015/modules/notifications/notifications.module.js +1 -1
- package/esm2015/modules/notifications/notifications.service.js +1 -1
- package/esm2015/pipes/calendar-sheet/calendar-sheet.module.js +1 -1
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
- package/esm2015/pipes/calendar-sheet/index.js +2 -2
- package/esm2015/pipes/format-number/format-number.pipe.js +1 -1
- package/esm2015/pipes/index.js +2 -2
- package/esm2015/pipes/month/month.module.js +1 -1
- package/esm2015/pipes/pluralize/pluralize.module.js +1 -1
- package/esm2015/providers/index.js +2 -2
- package/esm2015/services/hint.service.js +1 -1
- package/esm2015/services/svg.service.js +2 -2
- package/esm2015/tokens/animation-options.js +1 -1
- package/esm2015/tokens/index.js +5 -5
- package/esm2015/tokens/ordered-short-week-days.js +1 -1
- package/esm2015/types/marker-handler.js +1 -1
- package/esm2015/utils/mask/create-number-mask.js +27 -10
- package/esm5/abstract/abstract-dropdown.js +1 -1
- package/esm5/components/button/button-options.js +10 -0
- package/esm5/components/button/button.component.js +12 -8
- package/esm5/components/button/button.module.js +1 -1
- package/esm5/components/button/index.js +2 -1
- package/esm5/components/calendar/calendar.component.js +2 -2
- package/esm5/components/data-list/data-list.component.js +23 -22
- package/esm5/components/data-list/data-list.module.js +2 -2
- package/esm5/components/data-list/index.js +2 -2
- package/esm5/components/data-list/option/option.component.js +3 -3
- package/esm5/components/dialog/dialog.component.js +2 -2
- package/esm5/components/dialog/dialog.directive.js +18 -43
- package/esm5/components/dialog/dialog.module.js +1 -1
- package/esm5/components/dialog/dialog.service.js +1 -1
- package/esm5/components/dropdown-box/dropdown-box.component.js +2 -2
- package/esm5/components/dropdown-box/dropdown-box.module.js +1 -1
- package/esm5/components/error/error.component.js +2 -2
- package/esm5/components/error/error.module.js +1 -1
- package/esm5/components/expand/expand.component.js +6 -6
- package/esm5/components/expand/expand.module.js +2 -2
- package/esm5/components/group/group.component.js +1 -1
- package/esm5/components/group/group.module.js +1 -1
- package/esm5/components/hints-host/hint-box/hint-box.component.js +21 -13
- package/esm5/components/hints-host/hint-box/hint-box.module.js +1 -1
- package/esm5/components/hints-host/hints-host.component.js +2 -2
- package/esm5/components/hints-host/hints-host.module.js +1 -1
- package/esm5/components/hints-host/index.js +3 -3
- package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +12 -25
- package/esm5/components/hosted-dropdown/hosted-dropdown.module.js +2 -2
- package/esm5/components/index.js +2 -2
- package/esm5/components/label/label.component.js +2 -2
- package/esm5/components/label/label.module.js +1 -1
- package/esm5/components/link/link.component.js +5 -3
- package/esm5/components/loader/loader.component.js +3 -3
- package/esm5/components/loader/loader.module.js +1 -1
- package/esm5/components/notification/notification.component.js +1 -1
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +4 -4
- package/esm5/components/primitive-calendar/primitive-calendar.module.js +1 -1
- package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +4 -17
- package/esm5/components/primitive-spin-button/primitive-spin-button.component.js +5 -5
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +7 -14
- package/esm5/components/primitive-textfield/primitive-textfield.module.js +1 -1
- package/esm5/components/primitive-textfield/primitive-textfield.providers.js +1 -1
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +14 -4
- package/esm5/components/primitive-year-picker/primitive-year-picker.component.js +5 -5
- package/esm5/components/root/root.module.js +1 -1
- package/esm5/components/scroll-controls/index.js +2 -2
- package/esm5/components/scroll-controls/scroll-controls.component.js +1 -1
- package/esm5/components/scroll-controls/scroll-controls.module.js +2 -2
- package/esm5/components/scrollbar/index.js +2 -2
- package/esm5/components/scrollbar/scrollable.directive.js +17 -5
- package/esm5/components/scrollbar/scrollbar.component.js +21 -23
- package/esm5/components/scrollbar/scrollbar.module.js +1 -1
- package/esm5/components/svg/svg.component.js +2 -2
- package/esm5/components/svg/svg.module.js +1 -1
- package/esm5/components/theme-night/theme-night.module.js +1 -1
- package/esm5/components/tooltip/tooltip.component.js +3 -3
- package/esm5/components/wrapper/wrapper.module.js +1 -1
- package/esm5/constants/events.js +6 -1
- package/esm5/constants/index.js +2 -2
- package/esm5/constants/regexp.js +2 -1
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/border/border.module.js +1 -1
- package/esm5/directives/color/color.module.js +1 -1
- package/esm5/directives/color/index.js +2 -2
- package/esm5/directives/described-by/described-by.module.js +1 -1
- package/esm5/directives/dropdown-controller/dropdown-controller.directive.js +1 -1
- package/esm5/directives/dropdown-controller/dropdown-controller.module.js +1 -1
- package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +1 -1
- package/esm5/directives/dropdown-controller/dropdown-controller.token.js +1 -1
- package/esm5/directives/hint/hint.directive.js +2 -2
- package/esm5/directives/hint/hint.module.js +1 -1
- package/esm5/directives/hint-controller/hint-controller.directive.js +1 -1
- package/esm5/directives/hint-controller/hint-controller.module.js +1 -1
- package/esm5/directives/hint-controller/hint-controller.provider.js +1 -1
- package/esm5/directives/hint-controller/hint-controller.token.js +1 -1
- package/esm5/directives/index.js +2 -2
- package/esm5/directives/manual-hint/manual-hint.module.js +1 -1
- package/esm5/directives/mask-accessor/mask-accessor.module.js +1 -1
- package/esm5/directives/mode/mode.module.js +1 -1
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +2 -2
- package/esm5/directives/pointer-hint/pointer-hint.module.js +1 -1
- package/esm5/directives/scroll-into-view/scroll-into-view.module.js +1 -1
- package/esm5/directives/table-mode/table-mode.module.js +1 -1
- package/esm5/directives/textfield-controller/index.js +3 -3
- package/esm5/directives/textfield-controller/textfield-cleaner.directive.js +4 -2
- package/esm5/directives/textfield-controller/textfield-controller.module.js +1 -1
- package/esm5/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm5/directives/textfield-controller/textfield-size.directive.js +4 -2
- package/esm5/directives/textfield-controller/textfield-type.directive.js +4 -2
- package/esm5/directives/textfield-controller/textfield.controller.js +1 -1
- package/esm5/enums/appearance.js +2 -1
- package/esm5/interfaces/dialog-context.js +1 -1
- package/esm5/interfaces/index.js +1 -1
- package/esm5/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
- package/esm5/internal/svg-defs-host/svg-defs-host.module.js +1 -1
- package/esm5/mask/index.js +1 -1
- package/esm5/modules/notifications/index.js +3 -3
- package/esm5/modules/notifications/notification-alert/Notification-alert.js +1 -1
- package/esm5/modules/notifications/notification-alert/notification-alert.component.js +2 -2
- package/esm5/modules/notifications/notifications-host/notifications-host.component.js +2 -2
- package/esm5/modules/notifications/notifications.module.js +1 -1
- package/esm5/modules/notifications/notifications.service.js +1 -1
- package/esm5/pipes/calendar-sheet/calendar-sheet.module.js +1 -1
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
- package/esm5/pipes/calendar-sheet/index.js +2 -2
- package/esm5/pipes/format-number/format-number.pipe.js +1 -1
- package/esm5/pipes/index.js +2 -2
- package/esm5/pipes/month/month.module.js +1 -1
- package/esm5/pipes/pluralize/pluralize.module.js +1 -1
- package/esm5/providers/index.js +2 -2
- package/esm5/services/hint.service.js +1 -1
- package/esm5/services/svg.service.js +2 -2
- package/esm5/tokens/animation-options.js +1 -1
- package/esm5/tokens/index.js +5 -5
- package/esm5/tokens/ordered-short-week-days.js +1 -1
- package/esm5/types/marker-handler.js +1 -1
- package/esm5/utils/mask/create-number-mask.js +29 -10
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +21 -9
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +21 -20
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +15 -36
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +1 -1
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +6 -6
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +22 -19
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +12 -21
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +1 -1
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +4 -2
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +2 -2
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +4 -4
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +3 -12
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +15 -12
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +4 -4
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +56 -56
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +50 -34
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +2 -2
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-components.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js +10 -4
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-border.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +9 -3
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives.js +1 -1
- package/fesm2015/taiga-ui-core-enums.js +1 -0
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-modules-notifications.js +24 -24
- package/fesm2015/taiga-ui-core-modules-notifications.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes.js +1 -1
- package/fesm2015/taiga-ui-core-providers.js +7 -7
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +1 -1
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +25 -25
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +26 -9
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js +21 -9
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-calendar.js +1 -1
- package/fesm5/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +25 -24
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +19 -43
- package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-error.js +1 -1
- package/fesm5/taiga-ui-core-components-error.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +6 -6
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-group.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +26 -19
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js +12 -25
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +1 -1
- package/fesm5/taiga-ui-core-components-label.js.map +1 -1
- package/fesm5/taiga-ui-core-components-link.js +4 -2
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +2 -2
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-notification.js +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +4 -4
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js +3 -16
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js +5 -5
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +19 -16
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js +4 -4
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +63 -63
- package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scrollbar.js +52 -42
- package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-svg.js +1 -1
- package/fesm5/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm5/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +2 -2
- package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm5/taiga-ui-core-components-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-core-components.js +1 -1
- package/fesm5/taiga-ui-core-constants.js +10 -4
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-border.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-textfield-controller.js +9 -3
- package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives.js +1 -1
- package/fesm5/taiga-ui-core-enums.js +1 -0
- package/fesm5/taiga-ui-core-enums.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
- package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm5/taiga-ui-core-modules-notifications.js +25 -25
- package/fesm5/taiga-ui-core-modules-notifications.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes.js +1 -1
- package/fesm5/taiga-ui-core-providers.js +7 -7
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js +1 -1
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +25 -25
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +29 -10
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/interfaces/index.d.ts +2 -2
- package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
- package/internal/primitive-year-month-pagination/taiga-ui-core-internal-primitive-year-month-pagination.metadata.json +1 -1
- package/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.metadata.json +1 -1
- package/mask/index.d.ts +1 -1
- package/mask/taiga-ui-core-mask.metadata.json +1 -1
- package/modules/notifications/index.d.ts +2 -2
- package/modules/notifications/taiga-ui-core-modules-notifications.metadata.json +1 -1
- package/package.json +6 -4
- package/pipes/calendar-sheet/index.d.ts +1 -1
- package/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.metadata.json +1 -1
- package/pipes/index.d.ts +1 -1
- package/pipes/month/taiga-ui-core-pipes-month.metadata.json +1 -1
- package/pipes/pluralize/taiga-ui-core-pipes-pluralize.metadata.json +1 -1
- package/pipes/taiga-ui-core-pipes.metadata.json +1 -1
- package/providers/index.d.ts +1 -1
- package/providers/taiga-ui-core-providers.metadata.json +1 -1
- package/services/hint.service.d.ts +3 -3
- package/services/svg.service.d.ts +1 -1
- package/services/taiga-ui-core-services.metadata.json +1 -1
- package/styles/mixins/textfield.less +1 -0
- package/styles/theme/variables.less +1 -1
- package/styles/theme/wrapper/accent.less +31 -0
- package/styles/theme/wrapper/icon.less +1 -0
- package/styles/theme/wrapper/outline.less +1 -0
- package/styles/theme/wrapper/primary.less +1 -0
- package/styles/theme/wrapper/secondary.less +1 -0
- package/styles/theme/wrapper/whiteblock.less +2 -0
- package/styles/theme/wrapper.less +1 -0
- package/tokens/index.d.ts +4 -4
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-root.js","sources":["ng://@taiga-ui/core/components/root/root.component.ts","ng://@taiga-ui/core/components/root/root.module.ts","ng://@taiga-ui/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Optional,\n} from '@angular/core';\nimport {TUI_DIALOGS, TUI_IS_MOBILE, tuiAssert} from '@taiga-ui/cdk';\nimport {VERSION} from '@taiga-ui/core/constants';\nimport {TuiNotificationsHostComponent} from '@taiga-ui/core/modules/notifications';\nimport {TUI_ANIMATIONS_DURATION, TUI_ASSERT_ENABLED} from '@taiga-ui/core/tokens';\nimport {merge, Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-root',\n templateUrl: 'root.template.html',\n styleUrls: ['./root.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-tui-version': VERSION,\n '[style.--tui-duration]': 'duration + \"ms\"',\n },\n})\nexport class TuiRootComponent {\n readonly scrollbars$ =\n this.dialogs && !this.isMobile\n ? merge(...this.dialogs).pipe(map(({length}) => !length))\n : of(!this.isMobile);\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) readonly duration: number,\n @Inject(ElementRef) readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DIALOGS)\n readonly dialogs: readonly Observable<readonly unknown[]>[] | null,\n @Optional()\n @Inject(TuiNotificationsHostComponent)\n readonly notificationsHost: TuiNotificationsHostComponent,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_ASSERT_ENABLED) enabled: boolean,\n ) {\n tuiAssert.enabled = enabled;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiDialogHostModule, TuiDragModule, TuiPortalHostModule} from '@taiga-ui/cdk';\nimport {TuiHintsHostModule} from '@taiga-ui/core/components/hints-host';\nimport {TuiScrollControlsModule} from '@taiga-ui/core/components/scroll-controls';\nimport {TuiSvgDefsHostModule} from '@taiga-ui/core/internal/svg-defs-host';\nimport {EventPluginsModule} from '@tinkoff/ng-event-plugins';\nimport {TuiRootComponent} from './root.component';\n\n@NgModule({\n imports: [\n CommonModule,\n EventPluginsModule,\n TuiDragModule,\n TuiPortalHostModule,\n TuiSvgDefsHostModule,\n TuiHintsHostModule,\n TuiDialogHostModule,\n TuiScrollControlsModule,\n ],\n declarations: [TuiRootComponent],\n exports: [TuiRootComponent],\n})\nexport class TuiRootModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAcA;IAWa,gBAAgB,GAA7B,MAAa,gBAAgB;IAMzB,YAC8C,QAAgB,EAC7B,UAAmC,EAGvD,OAAyD,EAGzD,iBAAgD,EACjB,QAAiB,EAC7B,OAAgB;QAT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tB,gBAAgB,CAoB5B;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-root.js","sources":["ng://@taiga-ui/core/components/root/root.component.ts","ng://@taiga-ui/core/components/root/root.module.ts","ng://@taiga-ui/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Optional,\n} from '@angular/core';\nimport {TUI_DIALOGS, TUI_IS_MOBILE, tuiAssert} from '@taiga-ui/cdk';\nimport {VERSION} from '@taiga-ui/core/constants';\nimport {TuiNotificationsHostComponent} from '@taiga-ui/core/modules/notifications';\nimport {TUI_ANIMATIONS_DURATION, TUI_ASSERT_ENABLED} from '@taiga-ui/core/tokens';\nimport {merge, Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-root',\n templateUrl: 'root.template.html',\n styleUrls: ['./root.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-tui-version': VERSION,\n '[style.--tui-duration]': 'duration + \"ms\"',\n },\n})\nexport class TuiRootComponent {\n readonly scrollbars$ =\n this.dialogs && !this.isMobile\n ? merge(...this.dialogs).pipe(map(({length}) => !length))\n : of(!this.isMobile);\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) readonly duration: number,\n @Inject(ElementRef) readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DIALOGS)\n readonly dialogs: readonly Observable<readonly unknown[]>[] | null,\n @Optional()\n @Inject(TuiNotificationsHostComponent)\n readonly notificationsHost: TuiNotificationsHostComponent,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_ASSERT_ENABLED) enabled: boolean,\n ) {\n tuiAssert.enabled = enabled;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiDialogHostModule, TuiDragModule, TuiPortalHostModule} from '@taiga-ui/cdk';\nimport {TuiHintsHostModule} from '@taiga-ui/core/components/hints-host';\nimport {TuiScrollControlsModule} from '@taiga-ui/core/components/scroll-controls';\nimport {TuiSvgDefsHostModule} from '@taiga-ui/core/internal/svg-defs-host';\nimport {EventPluginsModule} from '@tinkoff/ng-event-plugins';\n\nimport {TuiRootComponent} from './root.component';\n\n@NgModule({\n imports: [\n CommonModule,\n EventPluginsModule,\n TuiDragModule,\n TuiPortalHostModule,\n TuiSvgDefsHostModule,\n TuiHintsHostModule,\n TuiDialogHostModule,\n TuiScrollControlsModule,\n ],\n declarations: [TuiRootComponent],\n exports: [TuiRootComponent],\n})\nexport class TuiRootModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAcA;IAWa,gBAAgB,GAA7B,MAAa,gBAAgB;IAMzB,YAC8C,QAAgB,EAC7B,UAAmC,EAGvD,OAAyD,EAGzD,iBAAgD,EACjB,QAAiB,EAC7B,OAAgB;QATF,aAAQ,GAAR,QAAQ,CAAQ;QAC7B,eAAU,GAAV,UAAU,CAAyB;QAGvD,YAAO,GAAP,OAAO,CAAkD;QAGzD,sBAAiB,GAAjB,iBAAiB,CAA+B;QACjB,aAAQ,GAAR,QAAQ,CAAS;QAdpD,gBAAW,GAChB,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ;cACxB,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;cACvD,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAczB,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;KAC/B;EACJ;;yCAbQ,MAAM,SAAC,uBAAuB;YACU,UAAU,uBAAlD,MAAM,SAAC,UAAU;4CACjB,QAAQ,YACR,MAAM,SAAC,WAAW;YAIS,6BAA6B,uBAFxD,QAAQ,YACR,MAAM,SAAC,6BAA6B;0CAEpC,MAAM,SAAC,aAAa;0CACpB,MAAM,SAAC,kBAAkB;;AAhBrB,gBAAgB;IAV5B,SAAS,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,6xBAAiC;QAEjC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,IAAI,EAAE;YACF,kBAAkB,EAAE,OAAO;YAC3B,wBAAwB,EAAE,iBAAiB;SAC9C;;KACJ,CAAC;IAQO,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;IAC/B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,WAAW,CAAC,CAAA;IAEnB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;IAErC,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IACrB,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;GAhBtB,gBAAgB,CAoB5B;;ICrBY,aAAa,GAA1B,MAAa,aAAa;EAAG;AAAhB,aAAa;IAdzB,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,aAAa;YACb,mBAAmB;YACnB,oBAAoB;YACpB,kBAAkB;YAClB,mBAAmB;YACnB,uBAAuB;SAC1B;QACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;QAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;KAC9B,CAAC;GACW,aAAa,CAAG;;ACxB7B;;;;;;"}
|
|
@@ -1,13 +1,64 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { DOCUMENT, ViewportScroller, CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
3
|
+
import { Inject, NgZone, ElementRef, Optional, Component, ChangeDetectionStrategy, Renderer2, Input, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import { ANIMATION_FRAME, WINDOW } from '@ng-web-apis/common';
|
|
5
|
-
import { typedFromEvent, preventDefault, stopPropagation, tuiZonefree, POLLING_TIME, TuiDestroyService,
|
|
6
|
-
import { TUI_ELEMENT_REF, TUI_SCROLL_REF, TUI_ANIMATION_OPTIONS, TUI_MODE } from '@taiga-ui/core/tokens';
|
|
7
|
-
import { merge, fromEvent, Observable } from 'rxjs';
|
|
8
|
-
import { map, switchMap, takeUntil, throttleTime, startWith, distinctUntilChanged } from 'rxjs/operators';
|
|
5
|
+
import { tuiZoneOptimized, typedFromEvent, preventDefault, stopPropagation, tuiZonefree, POLLING_TIME, TuiDestroyService, TuiLetModule } from '@taiga-ui/cdk';
|
|
9
6
|
import { tuiFadeIn } from '@taiga-ui/core/animations';
|
|
10
7
|
import { MODE_PROVIDER } from '@taiga-ui/core/providers';
|
|
8
|
+
import { TUI_ANIMATION_OPTIONS, TUI_SCROLL_REF, TUI_MODE, TUI_ELEMENT_REF } from '@taiga-ui/core/tokens';
|
|
9
|
+
import { Observable, merge, fromEvent } from 'rxjs';
|
|
10
|
+
import { throttleTime, map, startWith, distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators';
|
|
11
|
+
|
|
12
|
+
// @dynamic
|
|
13
|
+
let TuiScrollControlsComponent = class TuiScrollControlsComponent {
|
|
14
|
+
constructor(options, ngZone, documentRef, scrollRef, animationFrame$, mode$) {
|
|
15
|
+
this.options = options;
|
|
16
|
+
this.ngZone = ngZone;
|
|
17
|
+
this.documentRef = documentRef;
|
|
18
|
+
this.scrollRef = scrollRef;
|
|
19
|
+
this.animationFrame$ = animationFrame$;
|
|
20
|
+
this.mode$ = mode$;
|
|
21
|
+
this.refresh$ = this.animationFrame$.pipe(throttleTime(300), map(() => this.scrollbars), startWith([false, false]), distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]), tuiZoneOptimized(this.ngZone));
|
|
22
|
+
this.animation = Object.assign({ value: '' }, this.options);
|
|
23
|
+
}
|
|
24
|
+
get scrollbars() {
|
|
25
|
+
const { clientHeight, scrollHeight, clientWidth, scrollWidth } = this.scrollRef
|
|
26
|
+
? this.scrollRef.nativeElement
|
|
27
|
+
: this.documentRef.documentElement;
|
|
28
|
+
return [
|
|
29
|
+
Math.ceil((clientHeight / scrollHeight) * 100) < 100,
|
|
30
|
+
Math.ceil((clientWidth / scrollWidth) * 100) < 100,
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
TuiScrollControlsComponent.ctorParameters = () => [
|
|
35
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
|
|
36
|
+
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
37
|
+
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
38
|
+
{ type: ElementRef, decorators: [{ type: Optional }, { type: Inject, args: [TUI_SCROLL_REF,] }] },
|
|
39
|
+
{ type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
|
|
40
|
+
{ type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] }
|
|
41
|
+
];
|
|
42
|
+
TuiScrollControlsComponent = __decorate([
|
|
43
|
+
Component({
|
|
44
|
+
selector: 'tui-scroll-controls',
|
|
45
|
+
template: "<ng-container *tuiLet=\"refresh$ | async as bars\">\n <div\n *ngIf=\"bars[0]\"\n tuiScrollbarWrapper\n class=\"bar bar_vertical\"\n [@tuiFadeIn]=\"animation\"\n [class.bar_has-horizontal]=\"bars[1]\"\n >\n <div tuiScrollbar=\"vertical\" class=\"thumb\"></div>\n </div>\n <div\n *ngIf=\"bars[1]\"\n tuiScrollbarWrapper\n class=\"bar bar_horizontal\"\n [@tuiFadeIn]=\"animation\"\n [class.bar_has-vertical]=\"bars[0]\"\n >\n <div tuiScrollbar=\"horizontal\" class=\"thumb\"></div>\n </div>\n</ng-container>\n",
|
|
46
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
47
|
+
animations: [tuiFadeIn],
|
|
48
|
+
providers: [MODE_PROVIDER],
|
|
49
|
+
host: {
|
|
50
|
+
'($.data-mode.attr)': 'mode$',
|
|
51
|
+
},
|
|
52
|
+
styles: [":host{position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);float:left;margin-right:calc(-100% + 1px);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.bar{position:absolute;right:0;bottom:0;pointer-events:auto}.bar_vertical{top:0;width:.875rem}.bar_horizontal{left:0;height:.875rem}.bar_has-horizontal{bottom:.5rem}.bar_has-vertical{right:.5rem}.thumb{transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;background:var(--tui-text-01);background-clip:content-box;box-sizing:border-box;transition-property:width,height;opacity:.2}.thumb:hover{opacity:.24}.thumb:active{opacity:.48}:host[data-mode=onDark] .thumb{background-color:var(--tui-text-01-night)}.bar_vertical .thumb{right:0;width:.75rem;min-height:1.25rem}.bar_vertical .thumb:active,.bar_vertical:hover .thumb{width:.875rem}.bar_horizontal .thumb{bottom:0;height:.75rem;min-width:1.25rem}.bar_horizontal .thumb:active,.bar_horizontal:hover .thumb{height:.875rem}"]
|
|
53
|
+
}),
|
|
54
|
+
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
55
|
+
__param(1, Inject(NgZone)),
|
|
56
|
+
__param(2, Inject(DOCUMENT)),
|
|
57
|
+
__param(3, Optional()),
|
|
58
|
+
__param(3, Inject(TUI_SCROLL_REF)),
|
|
59
|
+
__param(4, Inject(ANIMATION_FRAME)),
|
|
60
|
+
__param(5, Inject(TUI_MODE))
|
|
61
|
+
], TuiScrollControlsComponent);
|
|
11
62
|
|
|
12
63
|
const MIN_WIDTH = 24;
|
|
13
64
|
// @dynamic
|
|
@@ -143,57 +194,6 @@ function getOffsetHorizontal({ clientX }, { left, width }) {
|
|
|
143
194
|
return (clientX - left) / width;
|
|
144
195
|
}
|
|
145
196
|
|
|
146
|
-
// @dynamic
|
|
147
|
-
let TuiScrollControlsComponent = class TuiScrollControlsComponent {
|
|
148
|
-
constructor(options, ngZone, documentRef, scrollRef, animationFrame$, mode$) {
|
|
149
|
-
this.options = options;
|
|
150
|
-
this.ngZone = ngZone;
|
|
151
|
-
this.documentRef = documentRef;
|
|
152
|
-
this.scrollRef = scrollRef;
|
|
153
|
-
this.animationFrame$ = animationFrame$;
|
|
154
|
-
this.mode$ = mode$;
|
|
155
|
-
this.refresh$ = this.animationFrame$.pipe(throttleTime(300), map(() => this.scrollbars), startWith([false, false]), distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]), tuiZoneOptimized(this.ngZone));
|
|
156
|
-
this.animation = Object.assign({ value: '' }, this.options);
|
|
157
|
-
}
|
|
158
|
-
get scrollbars() {
|
|
159
|
-
const { clientHeight, scrollHeight, clientWidth, scrollWidth } = this.scrollRef
|
|
160
|
-
? this.scrollRef.nativeElement
|
|
161
|
-
: this.documentRef.documentElement;
|
|
162
|
-
return [
|
|
163
|
-
Math.ceil((clientHeight / scrollHeight) * 100) < 100,
|
|
164
|
-
Math.ceil((clientWidth / scrollWidth) * 100) < 100,
|
|
165
|
-
];
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
TuiScrollControlsComponent.ctorParameters = () => [
|
|
169
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
|
|
170
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
171
|
-
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
172
|
-
{ type: ElementRef, decorators: [{ type: Optional }, { type: Inject, args: [TUI_SCROLL_REF,] }] },
|
|
173
|
-
{ type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
|
|
174
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] }
|
|
175
|
-
];
|
|
176
|
-
TuiScrollControlsComponent = __decorate([
|
|
177
|
-
Component({
|
|
178
|
-
selector: 'tui-scroll-controls',
|
|
179
|
-
template: "<ng-container *tuiLet=\"refresh$ | async as bars\">\n <div\n *ngIf=\"bars[0]\"\n tuiScrollbarWrapper\n class=\"bar bar_vertical\"\n [class.bar_has-horizontal]=\"bars[1]\"\n [@tuiFadeIn]=\"animation\"\n >\n <div tuiScrollbar=\"vertical\" class=\"thumb\"></div>\n </div>\n <div\n *ngIf=\"bars[1]\"\n tuiScrollbarWrapper\n class=\"bar bar_horizontal\"\n [class.bar_has-vertical]=\"bars[0]\"\n [@tuiFadeIn]=\"animation\"\n >\n <div tuiScrollbar=\"horizontal\" class=\"thumb\"></div>\n </div>\n</ng-container>\n",
|
|
180
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
181
|
-
animations: [tuiFadeIn],
|
|
182
|
-
providers: [MODE_PROVIDER],
|
|
183
|
-
host: {
|
|
184
|
-
'($.data-mode.attr)': 'mode$',
|
|
185
|
-
},
|
|
186
|
-
styles: [":host{position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);float:left;margin-right:calc(-100% + 1px);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.bar{position:absolute;right:0;bottom:0;pointer-events:auto}.bar_vertical{top:0;width:.875rem}.bar_horizontal{left:0;height:.875rem}.bar_has-horizontal{bottom:.5rem}.bar_has-vertical{right:.5rem}.thumb{transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;background:var(--tui-text-01);background-clip:content-box;box-sizing:border-box;transition-property:width,height;opacity:.2}.thumb:hover{opacity:.24}.thumb:active{opacity:.48}:host[data-mode=onDark] .thumb{background-color:var(--tui-text-01-night)}.bar_vertical .thumb{right:0;width:.75rem;min-height:1.25rem}.bar_vertical .thumb:active,.bar_vertical:hover .thumb{width:.875rem}.bar_horizontal .thumb{bottom:0;height:.75rem;min-width:1.25rem}.bar_horizontal .thumb:active,.bar_horizontal:hover .thumb{height:.875rem}"]
|
|
187
|
-
}),
|
|
188
|
-
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
189
|
-
__param(1, Inject(NgZone)),
|
|
190
|
-
__param(2, Inject(DOCUMENT)),
|
|
191
|
-
__param(3, Optional()),
|
|
192
|
-
__param(3, Inject(TUI_SCROLL_REF)),
|
|
193
|
-
__param(4, Inject(ANIMATION_FRAME)),
|
|
194
|
-
__param(5, Inject(TUI_MODE))
|
|
195
|
-
], TuiScrollControlsComponent);
|
|
196
|
-
|
|
197
197
|
let TuiScrollbarWrapperDirective = class TuiScrollbarWrapperDirective {
|
|
198
198
|
};
|
|
199
199
|
TuiScrollbarWrapperDirective = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-scroll-controls.js","sources":["ng://@taiga-ui/core/components/scroll-controls/scrollbar.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scroll-controls.component.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar-wrapper.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scroll-controls.module.ts","ng://@taiga-ui/core/components/scroll-controls/taiga-ui-core-components-scroll-controls.ts"],"sourcesContent":["import {DOCUMENT, ViewportScroller} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n Renderer2,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n POLLING_TIME,\n preventDefault,\n stopPropagation,\n TuiDestroyService,\n tuiZonefree,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiOrientationT} from '@taiga-ui/core/types';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {map, switchMap, takeUntil, throttleTime} from 'rxjs/operators';\n\nconst MIN_WIDTH = 24;\n\n// @dynamic\n@Directive({\n selector: '[tuiScrollbar]',\n providers: [TuiDestroyService],\n})\nexport class TuiScrollbarDirective {\n @Input()\n tuiScrollbar: TuiOrientationT = 'vertical';\n\n constructor(\n @Inject(NgZone) ngZone: NgZone,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TUI_ELEMENT_REF) private readonly wrapper: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly container: ElementRef<HTMLElement> | null,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(ViewportScroller) private readonly viewportScroller: ViewportScroller,\n ) {\n const {nativeElement} = this.elementRef;\n const mousedown$ = typedFromEvent(nativeElement, 'mousedown');\n const mousemove$ = typedFromEvent(this.documentRef, 'mousemove');\n const mouseup$ = typedFromEvent(this.documentRef, 'mouseup');\n const mousedownWrapper$ = typedFromEvent(wrapper.nativeElement, 'mousedown');\n\n merge(\n mousedownWrapper$.pipe(\n preventDefault(),\n map(event => this.getScrolled(event, 0.5, 0.5)),\n ),\n mousedown$.pipe(\n preventDefault(),\n stopPropagation(),\n switchMap(event => {\n const rect = nativeElement.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n\n return mousemove$.pipe(\n map(event => this.getScrolled(event, vertical, horizontal)),\n takeUntil(mouseup$),\n );\n }),\n ),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(([scrollTop, scrollLeft]) => {\n const [x, y] = this.viewportScroller.getScrollPosition();\n\n if (!this.container) {\n this.viewportScroller.scrollToPosition([\n this.tuiScrollbar === 'vertical' ? x : scrollLeft,\n this.tuiScrollbar === 'vertical' ? scrollTop : y,\n ]);\n\n return;\n }\n\n if (this.tuiScrollbar === 'vertical') {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollTop',\n scrollTop,\n );\n } else {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollLeft',\n scrollLeft,\n );\n }\n });\n\n merge(\n fromEvent(\n this.container ? this.container.nativeElement : this.windowRef,\n 'scroll',\n ),\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(() => {\n if (this.tuiScrollbar === 'vertical') {\n renderer.setStyle(nativeElement, 'top', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'height', `${this.view * 100}%`);\n } else {\n renderer.setStyle(nativeElement, 'left', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'width', `${this.view * 100}%`);\n }\n });\n }\n\n private get scrolled(): number {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth,\n } = this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? scrollTop / (scrollHeight - clientHeight)\n : scrollLeft / (scrollWidth - clientWidth);\n }\n\n private get compensation(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n if (\n ((clientHeight * clientHeight) / scrollHeight > MIN_WIDTH &&\n this.tuiScrollbar === 'vertical') ||\n ((clientWidth * clientWidth) / scrollWidth > MIN_WIDTH &&\n this.tuiScrollbar === 'horizontal')\n ) {\n return 0;\n }\n\n return this.tuiScrollbar === 'vertical'\n ? MIN_WIDTH / clientHeight\n : MIN_WIDTH / clientWidth;\n }\n\n private get thumb(): number {\n const compensation = this.compensation || this.view;\n\n return this.scrolled * (1 - compensation);\n }\n\n private get view(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? Math.ceil((clientHeight / scrollHeight) * 100) / 100\n : Math.ceil((clientWidth / scrollWidth) * 100) / 100;\n }\n\n private get computedContainer(): Element {\n return this.container\n ? this.container.nativeElement\n : this.documentRef.scrollingElement!;\n }\n\n private getScrolled(\n {clientY, clientX}: MouseEvent,\n offsetVertical: number,\n offsetHorizontal: number,\n ): [number, number] {\n const {offsetHeight, offsetWidth} = this.elementRef.nativeElement;\n const {top, left, width, height} =\n this.wrapper.nativeElement.getBoundingClientRect();\n\n const maxTop = this.computedContainer.scrollHeight - height;\n const maxLeft = this.computedContainer.scrollWidth - width;\n const scrolledTop =\n (clientY - top - offsetHeight * offsetVertical) / (height - offsetHeight);\n const scrolledLeft =\n (clientX - left - offsetWidth * offsetHorizontal) / (width - offsetWidth);\n\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n}\n\nfunction getOffsetVertical({clientY}: MouseEvent, {top, height}: ClientRect): number {\n return (clientY - top) / height;\n}\n\nfunction getOffsetHorizontal({clientX}: MouseEvent, {left, width}: ClientRect): number {\n return (clientX - left) / width;\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_ANIMATION_OPTIONS, TUI_MODE, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, throttleTime} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-scroll-controls',\n templateUrl: './scroll-controls.template.html',\n styleUrls: ['./scroll-controls.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn],\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiScrollControlsComponent {\n readonly refresh$ = this.animationFrame$.pipe(\n throttleTime(300),\n map(() => this.scrollbars),\n startWith([false, false]),\n distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]),\n tuiZoneOptimized(this.ngZone),\n );\n\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n private get scrollbars(): [boolean, boolean] {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} = this.scrollRef\n ? this.scrollRef.nativeElement\n : this.documentRef.documentElement;\n\n return [\n Math.ceil((clientHeight / scrollHeight) * 100) < 100,\n Math.ceil((clientWidth / scrollWidth) * 100) < 100,\n ];\n }\n}\n","import {Directive, ElementRef} from '@angular/core';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiScrollbarWrapper]',\n providers: [\n {\n provide: TUI_ELEMENT_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiScrollbarWrapperDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\nimport {TuiScrollControlsComponent} from './scroll-controls.component';\nimport {TuiScrollbarWrapperDirective} from './scrollbar-wrapper.directive';\nimport {TuiScrollbarDirective} from './scrollbar.directive';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [\n TuiScrollbarDirective,\n TuiScrollbarWrapperDirective,\n TuiScrollControlsComponent,\n ],\n exports: [TuiScrollControlsComponent],\n})\nexport class TuiScrollControlsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiScrollbarWrapperDirective as ɵa} from './scrollbar-wrapper.directive';"],"names":[],"mappings":";;;;;;;;;;;AAwBA,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;IAKa,qBAAqB,GAAlC,MAAa,qBAAqB;IAI9B,YACoB,MAAc,EACX,QAAmB,EACX,QAA0B,EAC5B,eAAmC,EAClB,OAAgC,EAGzD,SAAyC,EACvB,WAAqB,EACvB,SAAiB,EACb,UAAmC,EAC7B,gBAAkC;QAPnC,YAAO,GAAP,OAAO,CAAyB;QAGzD,cAAS,GAAT,SAAS,CAAgC;QACvB,gBAAW,GAAX,WAAW,CAAU;QACvB,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAC7B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAdjF,iBAAY,GAAoB,UAAU,CAAC;QAgBvC,MAAM,EAAC,aAAa,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QACxC,MAAM,UAAU,GAAG,cAAc,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAC9D,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAC7D,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAE7E,KAAK,CACD,iBAAiB,CAAC,IAAI,CAClB,cAAc,EAAE,EAChB,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAClD,EACD,UAAU,CAAC,IAAI,CACX,cAAc,EAAE,EAChB,eAAe,EAAE,EACjB,SAAS,CAAC,KAAK;YACX,MAAM,IAAI,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC;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zC,MAAa,4BAA4B;EAAG;AAA/B,4BAA4B;IATxC,SAAS,CAAC;QACP,QAAQ,EAAE,uBAAuB;QACjC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,UAAU;aAC1B;SACJ;KACJ,CAAC;GACW,4BAA4B,CAAG;;ICI/B,uBAAuB,GAApC,MAAa,uBAAuB;EAAG;AAA1B,uBAAuB;IATnC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE;YACV,qBAAqB;YACrB,4BAA4B;YAC5B,0BAA0B;SAC7B;QACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;KACxC,CAAC;GACW,uBAAuB,CAAG;;AChBvC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-scroll-controls.js","sources":["ng://@taiga-ui/core/components/scroll-controls/scroll-controls.component.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar-wrapper.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scroll-controls.module.ts","ng://@taiga-ui/core/components/scroll-controls/taiga-ui-core-components-scroll-controls.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_ANIMATION_OPTIONS, TUI_MODE, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, throttleTime} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-scroll-controls',\n templateUrl: './scroll-controls.template.html',\n styleUrls: ['./scroll-controls.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn],\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiScrollControlsComponent {\n readonly refresh$ = this.animationFrame$.pipe(\n throttleTime(300),\n map(() => this.scrollbars),\n startWith([false, false]),\n distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]),\n tuiZoneOptimized(this.ngZone),\n );\n\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n private get scrollbars(): [boolean, boolean] {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} = this.scrollRef\n ? this.scrollRef.nativeElement\n : this.documentRef.documentElement;\n\n return [\n Math.ceil((clientHeight / scrollHeight) * 100) < 100,\n Math.ceil((clientWidth / scrollWidth) * 100) < 100,\n ];\n }\n}\n","import {DOCUMENT, ViewportScroller} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n Renderer2,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n POLLING_TIME,\n preventDefault,\n stopPropagation,\n TuiDestroyService,\n tuiZonefree,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiOrientationT} from '@taiga-ui/core/types';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {map, switchMap, takeUntil, throttleTime} from 'rxjs/operators';\n\nconst MIN_WIDTH = 24;\n\n// @dynamic\n@Directive({\n selector: '[tuiScrollbar]',\n providers: [TuiDestroyService],\n})\nexport class TuiScrollbarDirective {\n @Input()\n tuiScrollbar: TuiOrientationT = 'vertical';\n\n constructor(\n @Inject(NgZone) ngZone: NgZone,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TUI_ELEMENT_REF) private readonly wrapper: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly container: ElementRef<HTMLElement> | null,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(ViewportScroller) private readonly viewportScroller: ViewportScroller,\n ) {\n const {nativeElement} = this.elementRef;\n const mousedown$ = typedFromEvent(nativeElement, 'mousedown');\n const mousemove$ = typedFromEvent(this.documentRef, 'mousemove');\n const mouseup$ = typedFromEvent(this.documentRef, 'mouseup');\n const mousedownWrapper$ = typedFromEvent(wrapper.nativeElement, 'mousedown');\n\n merge(\n mousedownWrapper$.pipe(\n preventDefault(),\n map(event => this.getScrolled(event, 0.5, 0.5)),\n ),\n mousedown$.pipe(\n preventDefault(),\n stopPropagation(),\n switchMap(event => {\n const rect = nativeElement.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n\n return mousemove$.pipe(\n map(event => this.getScrolled(event, vertical, horizontal)),\n takeUntil(mouseup$),\n );\n }),\n ),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(([scrollTop, scrollLeft]) => {\n const [x, y] = this.viewportScroller.getScrollPosition();\n\n if (!this.container) {\n this.viewportScroller.scrollToPosition([\n this.tuiScrollbar === 'vertical' ? x : scrollLeft,\n this.tuiScrollbar === 'vertical' ? scrollTop : y,\n ]);\n\n return;\n }\n\n if (this.tuiScrollbar === 'vertical') {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollTop',\n scrollTop,\n );\n } else {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollLeft',\n scrollLeft,\n );\n }\n });\n\n merge(\n fromEvent(\n this.container ? this.container.nativeElement : this.windowRef,\n 'scroll',\n ),\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(() => {\n if (this.tuiScrollbar === 'vertical') {\n renderer.setStyle(nativeElement, 'top', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'height', `${this.view * 100}%`);\n } else {\n renderer.setStyle(nativeElement, 'left', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'width', `${this.view * 100}%`);\n }\n });\n }\n\n private get scrolled(): number {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth,\n } = this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? scrollTop / (scrollHeight - clientHeight)\n : scrollLeft / (scrollWidth - clientWidth);\n }\n\n private get compensation(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n if (\n ((clientHeight * clientHeight) / scrollHeight > MIN_WIDTH &&\n this.tuiScrollbar === 'vertical') ||\n ((clientWidth * clientWidth) / scrollWidth > MIN_WIDTH &&\n this.tuiScrollbar === 'horizontal')\n ) {\n return 0;\n }\n\n return this.tuiScrollbar === 'vertical'\n ? MIN_WIDTH / clientHeight\n : MIN_WIDTH / clientWidth;\n }\n\n private get thumb(): number {\n const compensation = this.compensation || this.view;\n\n return this.scrolled * (1 - compensation);\n }\n\n private get view(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? Math.ceil((clientHeight / scrollHeight) * 100) / 100\n : Math.ceil((clientWidth / scrollWidth) * 100) / 100;\n }\n\n private get computedContainer(): Element {\n return this.container\n ? this.container.nativeElement\n : this.documentRef.scrollingElement!;\n }\n\n private getScrolled(\n {clientY, clientX}: MouseEvent,\n offsetVertical: number,\n offsetHorizontal: number,\n ): [number, number] {\n const {offsetHeight, offsetWidth} = this.elementRef.nativeElement;\n const {top, left, width, height} =\n this.wrapper.nativeElement.getBoundingClientRect();\n\n const maxTop = this.computedContainer.scrollHeight - height;\n const maxLeft = this.computedContainer.scrollWidth - width;\n const scrolledTop =\n (clientY - top - offsetHeight * offsetVertical) / (height - offsetHeight);\n const scrolledLeft =\n (clientX - left - offsetWidth * offsetHorizontal) / (width - offsetWidth);\n\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n}\n\nfunction getOffsetVertical({clientY}: MouseEvent, {top, height}: ClientRect): number {\n return (clientY - top) / height;\n}\n\nfunction getOffsetHorizontal({clientX}: MouseEvent, {left, width}: ClientRect): number {\n return (clientX - left) / width;\n}\n","import {Directive, ElementRef} from '@angular/core';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiScrollbarWrapper]',\n providers: [\n {\n provide: TUI_ELEMENT_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiScrollbarWrapperDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\nimport {TuiScrollControlsComponent} from './scroll-controls.component';\nimport {TuiScrollbarDirective} from './scrollbar.directive';\nimport {TuiScrollbarWrapperDirective} from './scrollbar-wrapper.directive';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [\n TuiScrollbarDirective,\n TuiScrollbarWrapperDirective,\n TuiScrollControlsComponent,\n ],\n exports: [TuiScrollControlsComponent],\n})\nexport class TuiScrollControlsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {Tu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S,CAAC;QACP,QAAQ,EAAE,uBAAuB;QACjC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,UAAU;aAC1B;SACJ;KACJ,CAAC;GACW,4BAA4B,CAAG;;ICK/B,uBAAuB,GAApC,MAAa,uBAAuB;EAAG;AAA1B,uBAAuB;IATnC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE;YACV,qBAAqB;YACrB,4BAA4B;YAC5B,0BAA0B;SAC7B;QACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;KACxC,CAAC;GACW,uBAAuB,CAAG;;ACjBvC;;;;;;"}
|
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Directive,
|
|
2
|
+
import { Directive, ElementRef, Inject, Input, HostBinding, HostListener, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
|
|
4
|
+
import { TUI_SCROLLABLE, TUI_SCROLL_INTO_VIEW } from '@taiga-ui/core/constants';
|
|
3
5
|
import { CSS, USER_AGENT } from '@ng-web-apis/common';
|
|
4
6
|
import { isFirefox, getElementOffset, TUI_IS_IOS, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
5
|
-
import { TUI_SCROLL_INTO_VIEW } from '@taiga-ui/core/constants';
|
|
6
|
-
import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import { TuiScrollControlsModule } from '@taiga-ui/core/components/scroll-controls';
|
|
9
9
|
|
|
10
|
+
const SCROLL_REF_SELECTOR = '[tuiScrollRef]';
|
|
11
|
+
let TuiScrollRefDirective = class TuiScrollRefDirective {
|
|
12
|
+
};
|
|
13
|
+
TuiScrollRefDirective = __decorate([
|
|
14
|
+
Directive({
|
|
15
|
+
selector: SCROLL_REF_SELECTOR,
|
|
16
|
+
providers: [
|
|
17
|
+
{
|
|
18
|
+
provide: TUI_SCROLL_REF,
|
|
19
|
+
useExisting: ElementRef,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
})
|
|
23
|
+
], TuiScrollRefDirective);
|
|
24
|
+
|
|
10
25
|
let TuiScrollableDirective = class TuiScrollableDirective {
|
|
26
|
+
constructor(elementRef) {
|
|
27
|
+
this.elementRef = elementRef;
|
|
28
|
+
}
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
this.elementRef.nativeElement.dispatchEvent(new CustomEvent(TUI_SCROLLABLE, {
|
|
31
|
+
bubbles: true,
|
|
32
|
+
detail: this.elementRef.nativeElement,
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
11
35
|
};
|
|
36
|
+
TuiScrollableDirective.ctorParameters = () => [
|
|
37
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
38
|
+
];
|
|
12
39
|
TuiScrollableDirective = __decorate([
|
|
13
40
|
Directive({
|
|
14
41
|
selector: '[tuiScrollable]',
|
|
15
|
-
})
|
|
42
|
+
}),
|
|
43
|
+
__param(0, Inject(ElementRef))
|
|
16
44
|
], TuiScrollableDirective);
|
|
17
45
|
|
|
18
46
|
var TuiScrollbarComponent_1;
|
|
@@ -30,23 +58,27 @@ let TuiScrollbarComponent = TuiScrollbarComponent_1 = class TuiScrollbarComponen
|
|
|
30
58
|
this.elementRef = elementRef;
|
|
31
59
|
this.userAgent = userAgent;
|
|
32
60
|
this.isIos = isIos;
|
|
33
|
-
this.
|
|
61
|
+
this.delegated = false;
|
|
34
62
|
this.isLegacy = !this.cssRef.supports('position', 'sticky') ||
|
|
35
63
|
(isFirefox(this.userAgent) && !this.cssRef.supports('scrollbar-width', 'none'));
|
|
64
|
+
this.hidden = false;
|
|
65
|
+
this.browserScrollRef = new ElementRef(this.elementRef.nativeElement);
|
|
36
66
|
}
|
|
37
67
|
get showScrollbars() {
|
|
38
|
-
return !this.hidden && !this.isIos && (!this.isLegacy ||
|
|
39
|
-
}
|
|
40
|
-
get browserScrollRef() {
|
|
41
|
-
return this.scrollable || this.elementRef;
|
|
68
|
+
return !this.hidden && !this.isIos && (!this.isLegacy || this.delegated);
|
|
42
69
|
}
|
|
43
70
|
get showNative() {
|
|
44
|
-
return this.isLegacy && !this.hidden && !this.
|
|
71
|
+
return this.isLegacy && !this.hidden && !this.delegated;
|
|
72
|
+
}
|
|
73
|
+
onScrollable(element) {
|
|
74
|
+
this.delegated = true;
|
|
75
|
+
this.browserScrollRef.nativeElement = element;
|
|
45
76
|
}
|
|
46
|
-
scrollIntoView(
|
|
47
|
-
|
|
77
|
+
scrollIntoView(detail) {
|
|
78
|
+
if (this.delegated) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
48
81
|
const { nativeElement } = this.browserScrollRef;
|
|
49
|
-
event.stopPropagation();
|
|
50
82
|
const { offsetTop, offsetLeft } = getElementOffset(nativeElement, detail);
|
|
51
83
|
nativeElement.scrollTop =
|
|
52
84
|
offsetTop + detail.offsetHeight / 2 - nativeElement.clientHeight / 2;
|
|
@@ -64,15 +96,14 @@ __decorate([
|
|
|
64
96
|
Input(),
|
|
65
97
|
tuiDefaultProp()
|
|
66
98
|
], TuiScrollbarComponent.prototype, "hidden", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
HostBinding('class._container'),
|
|
69
|
-
ContentChild(TuiScrollableDirective, { read: ElementRef })
|
|
70
|
-
], TuiScrollbarComponent.prototype, "scrollable", void 0);
|
|
71
99
|
__decorate([
|
|
72
100
|
HostBinding('class._legacy')
|
|
73
101
|
], TuiScrollbarComponent.prototype, "showNative", null);
|
|
74
102
|
__decorate([
|
|
75
|
-
HostListener(
|
|
103
|
+
HostListener(`${TUI_SCROLLABLE}.stop`, ['$event.detail'])
|
|
104
|
+
], TuiScrollbarComponent.prototype, "onScrollable", null);
|
|
105
|
+
__decorate([
|
|
106
|
+
HostListener(`${TUI_SCROLL_INTO_VIEW}.stop`, ['$event.detail'])
|
|
76
107
|
], TuiScrollbarComponent.prototype, "scrollIntoView", null);
|
|
77
108
|
TuiScrollbarComponent = TuiScrollbarComponent_1 = __decorate([
|
|
78
109
|
Component({
|
|
@@ -86,7 +117,7 @@ TuiScrollbarComponent = TuiScrollbarComponent_1 = __decorate([
|
|
|
86
117
|
useFactory: scrollRefFactory,
|
|
87
118
|
},
|
|
88
119
|
],
|
|
89
|
-
styles: [":host{z-index:0;position:relative;display:flex;overflow:auto}:host:not(._legacy){scrollbar-width:none;-ms-overflow-style:none}:host:not(._legacy)::-webkit-scrollbar,:host:not(._legacy)::-webkit-scrollbar-thumb{background:0 0;width:0;height:0}:host._legacy{overflow:overlay}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){:host._legacy::-webkit-scrollbar,:host._legacy::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:6px solid transparent}:host._legacy::-webkit-scrollbar{background-color:transparent}:host._legacy::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}:host._legacy::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}:host._legacy::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}
|
|
120
|
+
styles: [":host{z-index:0;position:relative;display:flex;overflow:auto}:host:not(._legacy){scrollbar-width:none;-ms-overflow-style:none}:host:not(._legacy)::-webkit-scrollbar,:host:not(._legacy)::-webkit-scrollbar-thumb{background:0 0;width:0;height:0}:host._legacy{overflow:overlay}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){:host._legacy::-webkit-scrollbar,:host._legacy::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:6px solid transparent}:host._legacy::-webkit-scrollbar{background-color:transparent}:host._legacy::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}:host._legacy::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}:host._legacy::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}.content{position:relative;z-index:0;flex:1;flex-basis:auto;width:100%;height:-webkit-max-content;height:-moz-max-content;height:max-content}"]
|
|
90
121
|
}),
|
|
91
122
|
__param(0, Inject(CSS)),
|
|
92
123
|
__param(1, Inject(ElementRef)),
|
|
@@ -94,21 +125,6 @@ TuiScrollbarComponent = TuiScrollbarComponent_1 = __decorate([
|
|
|
94
125
|
__param(3, Inject(TUI_IS_IOS))
|
|
95
126
|
], TuiScrollbarComponent);
|
|
96
127
|
|
|
97
|
-
const SCROLL_REF_SELECTOR = '[tuiScrollRef]';
|
|
98
|
-
let TuiScrollRefDirective = class TuiScrollRefDirective {
|
|
99
|
-
};
|
|
100
|
-
TuiScrollRefDirective = __decorate([
|
|
101
|
-
Directive({
|
|
102
|
-
selector: SCROLL_REF_SELECTOR,
|
|
103
|
-
providers: [
|
|
104
|
-
{
|
|
105
|
-
provide: TUI_SCROLL_REF,
|
|
106
|
-
useExisting: ElementRef,
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
})
|
|
110
|
-
], TuiScrollRefDirective);
|
|
111
|
-
|
|
112
128
|
let TuiScrollbarModule = class TuiScrollbarModule {
|
|
113
129
|
};
|
|
114
130
|
TuiScrollbarModule = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-scrollbar.js","sources":["ng://@taiga-ui/core/components/scrollbar/
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-scrollbar.js","sources":["ng://@taiga-ui/core/components/scrollbar/scroll-ref.directive.ts","ng://@taiga-ui/core/components/scrollbar/scrollable.directive.ts","ng://@taiga-ui/core/components/scrollbar/scrollbar.component.ts","ng://@taiga-ui/core/components/scrollbar/scrollbar.module.ts","ng://@taiga-ui/core/components/scrollbar/taiga-ui-core-components-scrollbar.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\n\nexport const SCROLL_REF_SELECTOR = '[tuiScrollRef]';\n\n@Directive({\n selector: SCROLL_REF_SELECTOR,\n providers: [\n {\n provide: TUI_SCROLL_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiScrollRefDirective {}\n","import {Directive, ElementRef, Inject, OnInit} from '@angular/core';\nimport {TUI_SCROLLABLE} from '@taiga-ui/core/constants';\n\n@Directive({\n selector: '[tuiScrollable]',\n})\nexport class TuiScrollableDirective implements OnInit {\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n\n ngOnInit() {\n this.elementRef.nativeElement.dispatchEvent(\n new CustomEvent(TUI_SCROLLABLE, {\n bubbles: true,\n detail: this.elementRef.nativeElement,\n }),\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {CSS, USER_AGENT} from '@ng-web-apis/common';\nimport {getElementOffset, isFirefox, TUI_IS_IOS, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TUI_SCROLL_INTO_VIEW, TUI_SCROLLABLE} from '@taiga-ui/core/constants';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\n\nexport function scrollRefFactory({\n browserScrollRef,\n}: TuiScrollbarComponent): ElementRef<HTMLElement> {\n return browserScrollRef;\n}\n\n// @dynamic\n@Component({\n selector: 'tui-scrollbar',\n templateUrl: './scrollbar.template.html',\n styleUrls: ['./scrollbar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_SCROLL_REF,\n deps: [TuiScrollbarComponent],\n useFactory: scrollRefFactory,\n },\n ],\n})\nexport class TuiScrollbarComponent {\n private delegated = false;\n\n private readonly isLegacy: boolean =\n !this.cssRef.supports('position', 'sticky') ||\n (isFirefox(this.userAgent) && !this.cssRef.supports('scrollbar-width', 'none'));\n\n @Input()\n @tuiDefaultProp()\n hidden = false;\n\n readonly browserScrollRef = new ElementRef(this.elementRef.nativeElement);\n\n constructor(\n /**\n * TODO: remove \"any\" in new TS version; https://github.com/ng-web-apis/common/pull/6\n */\n @Inject(CSS) private readonly cssRef: any,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n ) {}\n\n get showScrollbars(): boolean {\n return !this.hidden && !this.isIos && (!this.isLegacy || this.delegated);\n }\n\n @HostBinding('class._legacy')\n get showNative(): boolean {\n return this.isLegacy && !this.hidden && !this.delegated;\n }\n\n @HostListener(`${TUI_SCROLLABLE}.stop`, ['$event.detail'])\n onScrollable(element: HTMLElement) {\n this.delegated = true;\n this.browserScrollRef.nativeElement = element;\n }\n\n @HostListener(`${TUI_SCROLL_INTO_VIEW}.stop`, ['$event.detail'])\n scrollIntoView(detail: HTMLElement) {\n if (this.delegated) {\n return;\n }\n\n const {nativeElement} = this.browserScrollRef;\n const {offsetTop, offsetLeft} = getElementOffset(nativeElement, detail);\n\n nativeElement.scrollTop =\n offsetTop + detail.offsetHeight / 2 - nativeElement.clientHeight / 2;\n nativeElement.scrollLeft =\n offsetLeft + detail.offsetWidth / 2 - nativeElement.clientWidth / 2;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiScrollControlsModule} from '@taiga-ui/core/components/scroll-controls';\n\nimport {TuiScrollRefDirective} from './scroll-ref.directive';\nimport {TuiScrollableDirective} from './scrollable.directive';\nimport {TuiScrollbarComponent} from './scrollbar.component';\n\n@NgModule({\n imports: [CommonModule, TuiScrollControlsModule],\n declarations: [TuiScrollbarComponent, TuiScrollRefDirective, TuiScrollableDirective],\n exports: [TuiScrollbarComponent, TuiScrollRefDirective, TuiScrollableDirective],\n})\nexport class TuiScrollbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAGa,mBAAmB,GAAG,iBAAiB;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e,CAAC;uDAG5B;AAGD;IADC,YAAY,CAAC,GAAG,cAAc,OAAO,EAAE,CAAC,eAAe,CAAC,CAAC;yDAIzD;AAGD;IADC,YAAY,CAAC,GAAG,oBAAoB,OAAO,EAAE,CAAC,eAAe,CAAC,CAAC;2DAa/D;AAnDQ,qBAAqB;IAbjC,SAAS,CAAC;QACP,QAAQ,EAAE,eAAe;QACzB,kJAAwC;QAExC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,CAAC,uBAAqB,CAAC;gBAC7B,UAAU,EAAE,gBAAgB;aAC/B;SACJ;;KACJ,CAAC;IAkBO,WAAA,MAAM,CAAC,GAAG,CAAC,CAAA;IACX,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GApBd,qBAAqB,CAoDjC;;ICzEY,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAL9B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,uBAAuB,CAAC;QAChD,YAAY,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,CAAC;QACpF,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,CAAC;KAClF,CAAC;GACW,kBAAkB,CAAG;;ACblC;;;;;;"}
|
|
@@ -27,9 +27,9 @@ let TuiSvgComponent = class TuiSvgComponent {
|
|
|
27
27
|
this.sanitizer = sanitizer;
|
|
28
28
|
this.elementRef = elementRef;
|
|
29
29
|
this.userAgent = userAgent;
|
|
30
|
-
this.icon = '';
|
|
31
30
|
this.src$ = new ReplaySubject(1);
|
|
32
31
|
this.isIE = isIE(this.userAgent);
|
|
32
|
+
this.icon = '';
|
|
33
33
|
this.innerHTML$ = this.src$.pipe(switchMap(() => this.isExternal
|
|
34
34
|
? this.getExternalIcon(this.icon)
|
|
35
35
|
: of(this.getSafeHtml(this.icon))), startWith(''));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-svg.js","sources":["ng://@taiga-ui/core/components/svg/svg.component.ts","ng://@taiga-ui/core/components/svg/svg.module.ts","ng://@taiga-ui/core/components/svg/taiga-ui-core-components-svg.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Input,\n Optional,\n Sanitizer,\n SecurityContext,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {USER_AGENT, WINDOW} from '@ng-web-apis/common';\nimport {\n getDocumentOrShadowRoot,\n isIE,\n tuiAssert,\n tuiCustomEvent,\n tuiPure,\n tuiRequiredSetter,\n TuiStaticRequestService,\n TuiStringHandler,\n} from '@taiga-ui/cdk';\nimport {TUI_ICON_ERROR} from '@taiga-ui/core/constants';\nimport {TuiIconError} from '@taiga-ui/core/interfaces';\nimport {TuiSvgService} from '@taiga-ui/core/services';\nimport {TUI_ICONS_PATH, TUI_SANITIZER} from '@taiga-ui/core/tokens';\nimport {isPresumedHTMLString} from '@taiga-ui/core/utils/miscellaneous';\nimport {Observable, of, ReplaySubject} from 'rxjs';\nimport {catchError, map, startWith, switchMap} from 'rxjs/operators';\n\nconst UNDEFINED_NAMED_ICON = 'Attempted to use undefined named icon';\nconst MISSING_EXTERNAL_ICON = 'External icon is missing on the given URL';\nconst FAILED_EXTERNAL_ICON = 'Failed to load external SVG';\n\n// TODO: Consider moving to CDK along with SvgService and SvgDefsHostComponent\n// @dynamic\n@Component({\n selector: 'tui-svg',\n templateUrl: './svg.template.html',\n styleUrls: ['./svg.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSvgComponent {\n @Input()\n @tuiRequiredSetter()\n set src(src: string) {\n this.icon = src;\n this.src$.next();\n }\n\n readonly innerHTML$: Observable<SafeHtml>;\n\n private icon = '';\n private readonly src$ = new ReplaySubject<void>(1);\n private readonly isIE = isIE(this.userAgent);\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_ICONS_PATH) private readonly iconsPath: TuiStringHandler<string>,\n @Optional()\n @Inject(TUI_SANITIZER)\n private readonly tuiSanitizer: Sanitizer | null,\n @Inject(TuiSvgService) private readonly svgService: TuiSvgService,\n @Inject(TuiStaticRequestService)\n private readonly staticRequestService: TuiStaticRequestService,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(ElementRef) private readonly elementRef: ElementRef<Element>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n this.innerHTML$ = this.src$.pipe(\n switchMap(() =>\n this.isExternal\n ? this.getExternalIcon(this.icon)\n : of(this.getSafeHtml(this.icon)),\n ),\n startWith(''),\n );\n }\n\n get use(): string {\n return this.icon.includes('.svg#')\n ? this.icon\n : this.resolveName(this.icon, this.iconsPath);\n }\n\n get isInnerHTML(): boolean {\n return this.isSrc || this.isExternal || (this.isName && this.isShadowDOM);\n }\n\n private get isShadowDOM(): boolean {\n return (\n getDocumentOrShadowRoot(this.elementRef.nativeElement) !== this.documentRef\n );\n }\n\n private get isUse(): boolean {\n return this.use.includes('.svg#');\n }\n\n private get isExternal(): boolean {\n return this.isUrl || (this.isIE && this.isUse) || this.isCrossDomain;\n }\n\n private get isUrl(): boolean {\n return this.icon.endsWith('.svg');\n }\n\n private get isSrc(): boolean {\n return isPresumedHTMLString(this.icon);\n }\n\n private get isName(): boolean {\n return !this.isUrl && !this.isUse && !this.isSrc;\n }\n\n private get isCrossDomain(): boolean {\n const {use, isUse, windowRef} = this;\n\n return (\n isUse &&\n use.startsWith('http') &&\n !!windowRef.origin &&\n !use.startsWith(windowRef.origin)\n );\n }\n\n onError(message: string = MISSING_EXTERNAL_ICON) {\n const {icon} = this;\n const event = tuiCustomEvent<TuiIconError>(\n TUI_ICON_ERROR,\n {\n bubbles: true,\n detail: {\n message,\n icon,\n },\n },\n this.documentRef,\n );\n\n tuiAssert.assert(false, message, icon);\n this.elementRef.nativeElement.dispatchEvent(event);\n }\n\n @tuiPure\n private resolveName(name: string, iconsPath: TuiStringHandler<string>): string {\n return iconsPath(name);\n }\n\n private getSafeHtml(src: string): SafeHtml {\n return this.isSrc ? this.sanitize(src) : this.process(src);\n }\n\n private process(src: string): SafeHtml {\n const icon = this.svgService.getOriginal(src);\n\n if (this.isName && !icon && !!src) {\n this.onError(UNDEFINED_NAMED_ICON);\n }\n\n // Empty line for innerHTML when icon is shown through USE tag\n return !this.isShadowDOM || !this.isName ? '' : this.sanitize(icon || '');\n }\n\n private sanitize(src: string): SafeHtml | string {\n return this.tuiSanitizer\n ? this.sanitizer.bypassSecurityTrustHtml(\n this.tuiSanitizer.sanitize(SecurityContext.HTML, src) || '',\n )\n : src;\n }\n\n // @bad TODO: Create a simple XMLHttpRequest to Observable service\n private getExternalIcon(src: string): Observable<SafeHtml> {\n const url = src.includes('.svg') ? src : this.use;\n\n return this.staticRequestService.request(url).pipe(\n catchError(() => {\n this.onError(FAILED_EXTERNAL_ICON);\n\n return of('');\n }),\n map(response =>\n this.sanitize(response.replace('<svg', '<svg focusable=\"false\"')),\n ),\n );\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\nimport {TuiSvgComponent} from './svg.component';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [TuiSvgComponent],\n exports: [TuiSvgComponent],\n})\nexport class TuiSvgModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BA,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,MAAM,qBAAqB,GAAG,2CAA2C,CAAC;AAC1E,MAAM,oBAAoB,GAAG,6BAA6B,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;;ICnLY,YAAY,GAAzB,MAAa,YAAY;EAAG;AAAf,YAAY;IALxB,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,eAAe,CAAC;QAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;KAC7B,CAAC;GACW,YAAY,CAAG;;ACV5B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-svg.js","sources":["ng://@taiga-ui/core/components/svg/svg.component.ts","ng://@taiga-ui/core/components/svg/svg.module.ts","ng://@taiga-ui/core/components/svg/taiga-ui-core-components-svg.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Input,\n Optional,\n Sanitizer,\n SecurityContext,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {USER_AGENT, WINDOW} from '@ng-web-apis/common';\nimport {\n getDocumentOrShadowRoot,\n isIE,\n tuiAssert,\n tuiCustomEvent,\n tuiPure,\n tuiRequiredSetter,\n TuiStaticRequestService,\n TuiStringHandler,\n} from '@taiga-ui/cdk';\nimport {TUI_ICON_ERROR} from '@taiga-ui/core/constants';\nimport {TuiIconError} from '@taiga-ui/core/interfaces';\nimport {TuiSvgService} from '@taiga-ui/core/services';\nimport {TUI_ICONS_PATH, TUI_SANITIZER} from '@taiga-ui/core/tokens';\nimport {isPresumedHTMLString} from '@taiga-ui/core/utils/miscellaneous';\nimport {Observable, of, ReplaySubject} from 'rxjs';\nimport {catchError, map, startWith, switchMap} from 'rxjs/operators';\n\nconst UNDEFINED_NAMED_ICON = 'Attempted to use undefined named icon';\nconst MISSING_EXTERNAL_ICON = 'External icon is missing on the given URL';\nconst FAILED_EXTERNAL_ICON = 'Failed to load external SVG';\n\n// TODO: Consider moving to CDK along with SvgService and SvgDefsHostComponent\n// @dynamic\n@Component({\n selector: 'tui-svg',\n templateUrl: './svg.template.html',\n styleUrls: ['./svg.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSvgComponent {\n private readonly src$ = new ReplaySubject<void>(1);\n private readonly isIE = isIE(this.userAgent);\n private icon = '';\n\n @Input()\n @tuiRequiredSetter()\n set src(src: string) {\n this.icon = src;\n this.src$.next();\n }\n\n readonly innerHTML$: Observable<SafeHtml>;\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_ICONS_PATH) private readonly iconsPath: TuiStringHandler<string>,\n @Optional()\n @Inject(TUI_SANITIZER)\n private readonly tuiSanitizer: Sanitizer | null,\n @Inject(TuiSvgService) private readonly svgService: TuiSvgService,\n @Inject(TuiStaticRequestService)\n private readonly staticRequestService: TuiStaticRequestService,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(ElementRef) private readonly elementRef: ElementRef<Element>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n ) {\n this.innerHTML$ = this.src$.pipe(\n switchMap(() =>\n this.isExternal\n ? this.getExternalIcon(this.icon)\n : of(this.getSafeHtml(this.icon)),\n ),\n startWith(''),\n );\n }\n\n get use(): string {\n return this.icon.includes('.svg#')\n ? this.icon\n : this.resolveName(this.icon, this.iconsPath);\n }\n\n get isInnerHTML(): boolean {\n return this.isSrc || this.isExternal || (this.isName && this.isShadowDOM);\n }\n\n private get isShadowDOM(): boolean {\n return (\n getDocumentOrShadowRoot(this.elementRef.nativeElement) !== this.documentRef\n );\n }\n\n private get isUse(): boolean {\n return this.use.includes('.svg#');\n }\n\n private get isExternal(): boolean {\n return this.isUrl || (this.isIE && this.isUse) || this.isCrossDomain;\n }\n\n private get isUrl(): boolean {\n return this.icon.endsWith('.svg');\n }\n\n private get isSrc(): boolean {\n return isPresumedHTMLString(this.icon);\n }\n\n private get isName(): boolean {\n return !this.isUrl && !this.isUse && !this.isSrc;\n }\n\n private get isCrossDomain(): boolean {\n const {use, isUse, windowRef} = this;\n\n return (\n isUse &&\n use.startsWith('http') &&\n !!windowRef.origin &&\n !use.startsWith(windowRef.origin)\n );\n }\n\n onError(message: string = MISSING_EXTERNAL_ICON) {\n const {icon} = this;\n const event = tuiCustomEvent<TuiIconError>(\n TUI_ICON_ERROR,\n {\n bubbles: true,\n detail: {\n message,\n icon,\n },\n },\n this.documentRef,\n );\n\n tuiAssert.assert(false, message, icon);\n this.elementRef.nativeElement.dispatchEvent(event);\n }\n\n @tuiPure\n private resolveName(name: string, iconsPath: TuiStringHandler<string>): string {\n return iconsPath(name);\n }\n\n private getSafeHtml(src: string): SafeHtml {\n return this.isSrc ? this.sanitize(src) : this.process(src);\n }\n\n private process(src: string): SafeHtml {\n const icon = this.svgService.getOriginal(src);\n\n if (this.isName && !icon && !!src) {\n this.onError(UNDEFINED_NAMED_ICON);\n }\n\n // Empty line for innerHTML when icon is shown through USE tag\n return !this.isShadowDOM || !this.isName ? '' : this.sanitize(icon || '');\n }\n\n private sanitize(src: string): SafeHtml | string {\n return this.tuiSanitizer\n ? this.sanitizer.bypassSecurityTrustHtml(\n this.tuiSanitizer.sanitize(SecurityContext.HTML, src) || '',\n )\n : src;\n }\n\n // @bad TODO: Create a simple XMLHttpRequest to Observable service\n private getExternalIcon(src: string): Observable<SafeHtml> {\n const url = src.includes('.svg') ? src : this.use;\n\n return this.staticRequestService.request(url).pipe(\n catchError(() => {\n this.onError(FAILED_EXTERNAL_ICON);\n\n return of('');\n }),\n map(response =>\n this.sanitize(response.replace('<svg', '<svg focusable=\"false\"')),\n ),\n );\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\nimport {TuiSvgComponent} from './svg.component';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [TuiSvgComponent],\n exports: [TuiSvgComponent],\n})\nexport class TuiSvgModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"m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,MAAM,CAAC,YAAY,CAAC,CAAA;IACpB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GA1Bd,eAAe,CAkJ3B;;IClLY,YAAY,GAAzB,MAAa,YAAY;EAAG;AAAf,YAAY;IALxB,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,eAAe,CAAC;QAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;KAC7B,CAAC;GACW,YAAY,CAAG;;ACX5B;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-theme-night.js","sources":["ng://@taiga-ui/core/components/theme-night/theme-night.component.ts","ng://@taiga-ui/core/components/theme-night/theme-night.module.ts","ng://@taiga-ui/core/components/theme-night/taiga-ui-core-components-theme-night.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\nimport {AbstractTuiThemeSwitcher} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector: 'tui-theme-night',\n template: '',\n styleUrls: ['./theme-night.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiThemeNightComponent extends AbstractTuiThemeSwitcher {}\n","import {NgModule} from '@angular/core';\nimport {TuiThemeNightComponent} from './theme-night.component';\n\n@NgModule({\n declarations: [TuiThemeNightComponent],\n exports: [TuiThemeNightComponent],\n})\nexport class TuiThemeNightModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;IAOa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,wBAAwB;EAAG;AAA1D,sBAAsB;IANlC,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,EAAE;QAEZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;;KACxC,CAAC;GACW,sBAAsB,CAAoC;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-theme-night.js","sources":["ng://@taiga-ui/core/components/theme-night/theme-night.component.ts","ng://@taiga-ui/core/components/theme-night/theme-night.module.ts","ng://@taiga-ui/core/components/theme-night/taiga-ui-core-components-theme-night.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\nimport {AbstractTuiThemeSwitcher} from '@taiga-ui/cdk';\n\n// @dynamic\n@Component({\n selector: 'tui-theme-night',\n template: '',\n styleUrls: ['./theme-night.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiThemeNightComponent extends AbstractTuiThemeSwitcher {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiThemeNightComponent} from './theme-night.component';\n\n@NgModule({\n declarations: [TuiThemeNightComponent],\n exports: [TuiThemeNightComponent],\n})\nexport class TuiThemeNightModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;IAOa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,wBAAwB;EAAG;AAA1D,sBAAsB;IANlC,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,EAAE;QAEZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;;KACxC,CAAC;GACW,sBAAsB,CAAoC;;ICF1D,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IAJ/B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,sBAAsB,CAAC;QACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;KACpC,CAAC;GACW,mBAAmB,CAAG;;ACRnC;;;;;;"}
|
|
@@ -12,13 +12,13 @@ import { TuiHintModule } from '@taiga-ui/core/directives/hint';
|
|
|
12
12
|
let TuiTooltipComponent = class TuiTooltipComponent {
|
|
13
13
|
constructor(destroy$, mode$, isMobile) {
|
|
14
14
|
this.isMobile = isMobile;
|
|
15
|
+
this.globalMode = null;
|
|
15
16
|
this.content = '';
|
|
16
17
|
this.mode = null;
|
|
17
18
|
this.direction = 'bottom-left';
|
|
18
19
|
this.showDelay = 500;
|
|
19
20
|
this.hideDelay = 200;
|
|
20
21
|
this.describeId = '';
|
|
21
|
-
this.globalMode = null;
|
|
22
22
|
mode$.pipe(takeUntil(destroy$)).subscribe(mode => {
|
|
23
23
|
this.globalMode = mode;
|
|
24
24
|
});
|
|
@@ -73,7 +73,7 @@ __decorate([
|
|
|
73
73
|
TuiTooltipComponent = __decorate([
|
|
74
74
|
Component({
|
|
75
75
|
selector: 'tui-tooltip',
|
|
76
|
-
template: "<tui-svg\n
|
|
76
|
+
template: "<tui-svg\n src=\"tuiIconTooltipLarge\"\n automation-id=\"tui-tooltip__icon\"\n class=\"icon\"\n [tuiHintId]=\"describeId\"\n [tuiHint]=\"content\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintMode]=\"computedMode\"\n></tui-svg>\n",
|
|
77
77
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
78
|
providers: [TuiDestroyService, MODE_PROVIDER],
|
|
79
79
|
styles: [":host{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-03)}:host:hover{color:var(--tui-text-02)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-mode=onLight]{color:var(--tui-text-01)}:host[data-mode=error]{color:var(--tui-error-fill)}.icon{transition-property:opacity,color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:100%;height:100%}:host:not([data-mode]) .icon._hint_hovered{color:var(--tui-text-02)}:host[data-mode=onDark] .icon,:host[data-mode=onLight] .icon{opacity:var(--tui-disabled-opacity)}:host[data-mode=onDark] .icon._hint_hovered,:host[data-mode=onDark] .icon:hover,:host[data-mode=onLight] .icon._hint_hovered,:host[data-mode=onLight] .icon:hover{opacity:1}"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["ng://@taiga-ui/core/components/tooltip/tooltip.component.ts","ng://@taiga-ui/core/components/tooltip/tooltip.module.ts","ng://@taiga-ui/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n})\nexport class TuiTooltipComponent {\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n mode: TuiHintModeT | null = null;\n\n @Input()\n @tuiDefaultProp()\n direction: TuiDirection = 'bottom-left';\n\n @Input()\n @tuiDefaultProp()\n showDelay = 500;\n\n @Input()\n @tuiDefaultProp()\n hideDelay = 200;\n\n @Input()\n @tuiDefaultProp()\n describeId = '';\n\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["ng://@taiga-ui/core/components/tooltip/tooltip.component.ts","ng://@taiga-ui/core/components/tooltip/tooltip.module.ts","ng://@taiga-ui/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n})\nexport class TuiTooltipComponent {\n private globalMode: TuiBrightness | null = null;\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n mode: TuiHintModeT | null = null;\n\n @Input()\n @tuiDefaultProp()\n direction: TuiDirection = 'bottom-left';\n\n @Input()\n @tuiDefaultProp()\n showDelay = 500;\n\n @Input()\n @tuiDefaultProp()\n hideDelay = 200;\n\n @Input()\n @tuiDefaultProp()\n describeId = '';\n\n constructor(\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TUI_MODE) mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n ) {\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.globalMode = mode;\n });\n }\n\n // TODO: Simplify\n @HostBinding('attr.data-mode')\n get computedMode(): TuiHintModeT | TuiBrightness | null {\n return this.mode || this.globalMode;\n }\n\n @HostListener('mousedown', ['$event'])\n @HostListener('click', ['$event'])\n stopOnMobile(event: MouseEvent) {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiHintModule} from '@taiga-ui/core/directives/hint';\n\nimport {TuiTooltipComponent} from './tooltip.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiHintModule],\n declarations: [TuiTooltipComponent],\n exports: [TuiTooltipComponent],\n})\nexport class TuiTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;IAuBa,mBAAmB,GAAhC,MAAa,mBAAmB;IA2B5B,YAC+B,QAA6B,EACtC,KAAuC,EACjB,QAAiB;QAAjB,aAAQ,GAAR,QAAQ,CAAS;QA7BrD,eAAU,GAAyB,IAAI,CAAC;QAIhD,YAAO,GAAwB,EAAE,CAAC;QAIlC,SAAI,GAAwB,IAAI,CAAC;QAIjC,cAAS,GAAiB,aAAa,CAAC;QAIxC,cAAS,GAAG,GAAG,CAAC;QAIhB,cAAS,GAAG,GAAG,CAAC;QAIhB,eAAU,GAAG,EAAE,CAAC;QAOZ,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI;YAC1C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SAC1B,CAAC,CAAC;KACN;;IAID,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC;KACvC;IAID,YAAY,CAAC,KAAiB;QAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;SAC3B;KACJ;EACJ;;YAvB4C,UAAU,uBAA9C,MAAM,SAAC,iBAAiB;YACA,UAAU,uBAAlC,MAAM,SAAC,QAAQ;0CACf,MAAM,SAAC,aAAa;;AAzBzB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;oDACiB;AAIlC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;iDACgB;AAIjC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;sDACuB;AAIxC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;sDACD;AAIhB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;sDACD;AAIhB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;uDACD;AAchB;IADC,WAAW,CAAC,gBAAgB,CAAC;uDAG7B;AAID;IAFC,YAAY,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC;IACrC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;uDAMjC;AAlDQ,mBAAmB;IAP/B,SAAS,CAAC;QACP,QAAQ,EAAE,aAAa;QACvB,kVAAsC;QAEtC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC;;KAChD,CAAC;IA6BO,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;GA9BjB,mBAAmB,CAmD/B;;IC9DY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAL5B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;QACpD,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,gBAAgB,CAAG;;ACZhC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-wrapper.js","sources":["ng://@taiga-ui/core/components/wrapper/wrapper.component.ts","ng://@taiga-ui/core/components/wrapper/wrapper.module.ts","ng://@taiga-ui/core/components/wrapper/taiga-ui-core-components-wrapper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk';\nimport {TuiInteractiveState} from '@taiga-ui/core/enums';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'tui-wrapper',\n template: '<ng-content></ng-content>',\n styleUrls: ['./wrapper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiWrapperComponent {\n @Input()\n disabled = false;\n\n @Input()\n readOnly = false;\n\n @Input()\n hovered = false;\n\n @Input()\n pressed = false;\n\n @Input()\n focused = false;\n\n @Input()\n invalid = false;\n\n @Input()\n @HostBinding('attr.data-appearance')\n appearance = '';\n\n constructor(\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.disabled && !this.readOnly && this.invalid;\n }\n\n @HostBinding('class._focused')\n get computedFocused(): boolean {\n return this.focused && !this.disabled;\n }\n\n @HostBinding('attr.data-state')\n get interactiveState(): TuiInteractiveState | null {\n if (this.disabled) {\n return TuiInteractiveState.Disabled;\n }\n\n if (this.readOnly) {\n return TuiInteractiveState.Readonly;\n }\n\n if (this.pressed && !this.isMobile) {\n return TuiInteractiveState.Pressed;\n }\n\n if (this.hovered && !this.isMobile) {\n return TuiInteractiveState.Hovered;\n }\n\n return null;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiWrapperComponent} from './wrapper.component';\n\n@NgModule({\n declarations: [TuiWrapperComponent],\n exports: [TuiWrapperComponent],\n})\nexport class TuiWrapperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAwBa,mBAAmB,GAAhC,MAAa,mBAAmB;IAuB5B,YAC4C,QAAiB,EAC9B,KAAuC;QAD1B,aAAQ,GAAR,QAAQ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7B;AAGD;IADC,WAAW,CAAC,iBAAiB,CAAC;2DAmB9B;AAzDQ,mBAAmB;IAV/B,SAAS,CAAC;QACP,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,2BAA2B;QAErC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAyBO,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IACrB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;GAzBZ,mBAAmB,CA0D/B;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-wrapper.js","sources":["ng://@taiga-ui/core/components/wrapper/wrapper.component.ts","ng://@taiga-ui/core/components/wrapper/wrapper.module.ts","ng://@taiga-ui/core/components/wrapper/taiga-ui-core-components-wrapper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk';\nimport {TuiInteractiveState} from '@taiga-ui/core/enums';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'tui-wrapper',\n template: '<ng-content></ng-content>',\n styleUrls: ['./wrapper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiWrapperComponent {\n @Input()\n disabled = false;\n\n @Input()\n readOnly = false;\n\n @Input()\n hovered = false;\n\n @Input()\n pressed = false;\n\n @Input()\n focused = false;\n\n @Input()\n invalid = false;\n\n @Input()\n @HostBinding('attr.data-appearance')\n appearance = '';\n\n constructor(\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.disabled && !this.readOnly && this.invalid;\n }\n\n @HostBinding('class._focused')\n get computedFocused(): boolean {\n return this.focused && !this.disabled;\n }\n\n @HostBinding('attr.data-state')\n get interactiveState(): TuiInteractiveState | null {\n if (this.disabled) {\n return TuiInteractiveState.Disabled;\n }\n\n if (this.readOnly) {\n return TuiInteractiveState.Readonly;\n }\n\n if (this.pressed && !this.isMobile) {\n return TuiInteractiveState.Pressed;\n }\n\n if (this.hovered && !this.isMobile) {\n return TuiInteractiveState.Hovered;\n }\n\n return null;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiWrapperComponent} from './wrapper.component';\n\n@NgModule({\n declarations: [TuiWrapperComponent],\n exports: [TuiWrapperComponent],\n})\nexport class TuiWrapperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAwBa,mBAAmB,GAAhC,MAAa,mBAAmB;IAuB5B,YAC4C,QAAiB,EAC9B,KAAuC;QAD1B,aAAQ,GAAR,QAAQ,CAAS;QAC9B,UAAK,GAAL,KAAK,CAAkC;QAvBtE,aAAQ,GAAG,KAAK,CAAC;QAGjB,aAAQ,GAAG,KAAK,CAAC;QAGjB,YAAO,GAAG,KAAK,CAAC;QAGhB,YAAO,GAAG,KAAK,CAAC;QAGhB,YAAO,GAAG,KAAK,CAAC;QAGhB,YAAO,GAAG,KAAK,CAAC;QAIhB,eAAU,GAAG,EAAE,CAAC;KAKZ;IAGJ,IAAI,eAAe;QACf,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC;KAC3D;IAGD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;KACzC;IAGD,IAAI,gBAAgB;QAChB,IAAI,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AO,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,gBAAgB,CAAG;;ACRhC;;;;;;"}
|
|
@@ -18,8 +18,8 @@ export * from '@taiga-ui/core/components/primitive-spin-button';
|
|
|
18
18
|
export * from '@taiga-ui/core/components/primitive-textfield';
|
|
19
19
|
export * from '@taiga-ui/core/components/primitive-year-picker';
|
|
20
20
|
export * from '@taiga-ui/core/components/root';
|
|
21
|
-
export * from '@taiga-ui/core/components/scrollbar';
|
|
22
21
|
export * from '@taiga-ui/core/components/scroll-controls';
|
|
22
|
+
export * from '@taiga-ui/core/components/scrollbar';
|
|
23
23
|
export * from '@taiga-ui/core/components/svg';
|
|
24
24
|
export * from '@taiga-ui/core/components/theme-night';
|
|
25
25
|
export * from '@taiga-ui/core/components/tooltip';
|