@taiga-ui/core 2.54.0 → 2.56.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/bundles/taiga-ui-core-abstract.umd.js +15 -15
- 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-animations.umd.js +138 -138
- package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +12 -12
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +17 -17
- 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.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +34 -34
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +24 -24
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +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 +38 -38
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +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 +4 -4
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +12 -12
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +19 -19
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js +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 +47 -47
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- 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 -10
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +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 +4 -4
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +11 -11
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +4 -4
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +8 -8
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +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 +7 -7
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +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 +2 -2
- 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.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +54 -54
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +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 +2 -2
- 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.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +4 -4
- 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 +26 -26
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +8 -8
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +15 -15
- package/bundles/taiga-ui-core-components-svg.umd.js.map +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 +2 -2
- 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 +7 -7
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +17 -17
- 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-color.umd.js +6 -6
- 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 +8 -8
- 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 +11 -11
- 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-dropdown.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +8 -8
- 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 +7 -7
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +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 +4 -4
- 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 +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 +2 -2
- 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 +5 -5
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +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 +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 +2 -2
- 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 +35 -35
- 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-wrapper.umd.js +9 -9
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js.map +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.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +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-observables.umd.js +2 -2
- package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +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 +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-format-phone.umd.js +3 -3
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +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 +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-providers.umd.js +2 -2
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +7 -7
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +40 -40
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +16 -16
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +17 -17
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +28 -28
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +12 -12
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.js +4 -4
- package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
- package/components/alert/taiga-ui-core-components-alert.metadata.json +1 -1
- package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
- package/components/group/taiga-ui-core-components-group.metadata.json +1 -1
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/dropdown-controller/taiga-ui-core-directives-dropdown-controller.metadata.json +1 -1
- package/esm2015/abstract/abstract-dropdown.js +12 -12
- package/esm2015/abstract/abstract-hint-options.js +2 -2
- package/esm2015/abstract/abstract-hint.js +4 -4
- package/esm2015/animations/animations.js +140 -140
- package/esm2015/components/alert/alert.component.js +11 -11
- package/esm2015/components/alert/alert.service.js +3 -3
- package/esm2015/components/button/button-options.js +3 -3
- package/esm2015/components/button/button.component.js +16 -16
- package/esm2015/components/calendar/calendar.component.js +2 -2
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +7 -7
- package/esm2015/components/data-list/data-list.component.js +12 -12
- package/esm2015/components/data-list/data-list.directive.js +2 -2
- package/esm2015/components/data-list/opt-group.directive.js +5 -5
- package/esm2015/components/data-list/option/option.component.js +12 -12
- package/esm2015/components/dialog/dialog.component.js +12 -12
- package/esm2015/components/dialog/dialog.directive.js +4 -4
- package/esm2015/components/dialog/dialog.providers.js +7 -7
- package/esm2015/components/dialog/dialog.service.js +5 -5
- package/esm2015/components/dropdown-box/dropdown-box.component.js +39 -39
- package/esm2015/components/error/error.component.js +5 -5
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +12 -12
- package/esm2015/components/group/group-styles.component.js +2 -2
- package/esm2015/components/group/group.component.js +7 -5
- package/esm2015/components/group/group.directive.js +15 -15
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +46 -46
- package/esm2015/components/hints-host/hints-host.component.js +3 -3
- package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
- package/esm2015/components/label/label.component.js +5 -5
- package/esm2015/components/link/link.component.js +12 -12
- package/esm2015/components/loader/loader-options.js +3 -3
- package/esm2015/components/loader/loader.component.js +3 -3
- package/esm2015/components/notification/notification.component.js +9 -9
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -5
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +4 -4
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +28 -28
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm2015/components/root/root.component.js +5 -5
- package/esm2015/components/scroll-controls/scroll-controls.component.js +4 -4
- package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +7 -7
- package/esm2015/components/svg/svg.component.js +16 -16
- package/esm2015/components/theme-night/theme-night.component.js +3 -3
- package/esm2015/components/tooltip/tooltip.component.js +8 -8
- package/esm2015/constants/decimal-symbols.js +2 -2
- package/esm2015/constants/default-icons-path.js +2 -2
- package/esm2015/constants/editing-keys.js +10 -10
- package/esm2015/constants/events.js +5 -5
- package/esm2015/constants/mask-caret-trap.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/color/color.directive.js +7 -7
- package/esm2015/directives/described-by/described-by.directive.js +5 -5
- package/esm2015/directives/described-by/described-by.providers.js +3 -3
- package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
- package/esm2015/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm2015/directives/dropdown-controller/dropdown-controller.token.js +2 -2
- package/esm2015/directives/hint/hint-options.js +3 -3
- package/esm2015/directives/hint/hint.directive.js +6 -6
- package/esm2015/directives/hint-controller/hint-controller.directive.js +7 -7
- package/esm2015/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.token.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint-options.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint.directive.js +4 -4
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm2015/directives/mode/mode.directive.js +3 -3
- package/esm2015/directives/pointer-hint/pointer-hint-options.js +2 -2
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +5 -5
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm2015/directives/table-mode/table-mode.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-example-text.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-max-length.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-type.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
- package/esm2015/enums/appearance.js +1 -1
- package/esm2015/enums/base-color.js +1 -1
- package/esm2015/enums/button-shape.js +1 -1
- package/esm2015/enums/decimal.js +1 -1
- package/esm2015/enums/dropdown-animation.js +1 -1
- package/esm2015/enums/dropdown-width.js +1 -1
- package/esm2015/enums/hint-mode.js +1 -1
- package/esm2015/enums/interactive-state.js +1 -1
- package/esm2015/enums/link-mode.js +1 -1
- package/esm2015/enums/notification.js +1 -1
- package/esm2015/enums/orientation.js +1 -1
- package/esm2015/enums/range-state.js +1 -1
- package/esm2015/enums/support-color.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.component.js +2 -2
- package/esm2015/observables/smart-search.js +3 -3
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm2015/pipes/format-number/format-number.pipe.js +2 -2
- package/esm2015/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm2015/pipes/month/month.pipe.js +2 -2
- package/esm2015/pipes/pluralize/pluralize.pipe.js +2 -2
- package/esm2015/providers/is-mobile-resolution.provider.js +2 -2
- package/esm2015/providers/mode.provider.js +2 -2
- package/esm2015/services/hint.service.js +2 -2
- package/esm2015/services/night-theme.service.js +4 -4
- package/esm2015/services/svg.service.js +4 -4
- package/esm2015/tokens/animation-options.js +2 -2
- package/esm2015/tokens/animations-duration.js +2 -2
- package/esm2015/tokens/assert-enabled.js +2 -2
- package/esm2015/tokens/data-list-accessor.js +2 -2
- package/esm2015/tokens/data-list-host.js +2 -2
- package/esm2015/tokens/document-or-shadow-root.js +2 -2
- package/esm2015/tokens/dropdown-directive.js +2 -2
- package/esm2015/tokens/element-ref.js +2 -2
- package/esm2015/tokens/first-day-of-week.js +2 -2
- package/esm2015/tokens/i18n.js +10 -10
- package/esm2015/tokens/icon-place.js +3 -3
- package/esm2015/tokens/icons-path.js +2 -2
- package/esm2015/tokens/icons.js +2 -2
- package/esm2015/tokens/is-mobile-resolution.js +3 -3
- package/esm2015/tokens/media.js +2 -2
- package/esm2015/tokens/mode.js +2 -2
- package/esm2015/tokens/notification-options.js +3 -3
- package/esm2015/tokens/number-format.js +3 -3
- package/esm2015/tokens/option-content.js +2 -2
- package/esm2015/tokens/ordered-short-week-days.js +2 -2
- package/esm2015/tokens/scroll-ref.js +2 -2
- package/esm2015/tokens/svg-content-processor.js +2 -2
- package/esm2015/tokens/svg-src-processor.js +2 -2
- package/esm2015/tokens/textfield-appearance.js +2 -2
- package/esm2015/tokens/textfield-host.js +2 -2
- package/esm2015/tokens/theme.js +3 -3
- package/esm2015/tokens/value-accessor.js +2 -2
- package/esm2015/utils/dom/are-css-vars-supported.js +2 -2
- package/esm2015/utils/dom/check-fixed-position.js +3 -3
- package/esm2015/utils/dom/get-safe-area-size.js +4 -4
- package/esm2015/utils/dom/process-icon.js +11 -11
- package/esm2015/utils/format/format-number.js +5 -5
- package/esm2015/utils/format/format-phone.js +9 -9
- package/esm2015/utils/format/get-fractional-part-padded.js +3 -3
- package/esm2015/utils/format/number-to-string-without-exp.js +3 -3
- package/esm2015/utils/format/other-decimal-symbol.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +11 -11
- package/esm2015/utils/mask/create-correction-mask.js +3 -3
- package/esm2015/utils/mask/create-number-mask.js +13 -13
- package/esm2015/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm2015/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm2015/utils/miscellaneous/color-fallback.js +8 -8
- package/esm2015/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm2015/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm2015/utils/miscellaneous/size-bigger.js +3 -3
- package/esm2015/utils/polyfills/inner-html.js +5 -5
- package/esm5/abstract/abstract-dropdown.js +12 -12
- package/esm5/abstract/abstract-hint-options.js +2 -2
- package/esm5/abstract/abstract-hint.js +4 -4
- package/esm5/animations/animations.js +140 -140
- package/esm5/components/alert/alert.component.js +11 -11
- package/esm5/components/alert/alert.service.js +3 -3
- package/esm5/components/button/button-options.js +3 -3
- package/esm5/components/button/button.component.js +16 -16
- package/esm5/components/calendar/calendar.component.js +2 -2
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +8 -8
- package/esm5/components/data-list/data-list.component.js +12 -12
- package/esm5/components/data-list/data-list.directive.js +2 -2
- package/esm5/components/data-list/opt-group.directive.js +5 -5
- package/esm5/components/data-list/option/option.component.js +12 -12
- package/esm5/components/dialog/dialog.component.js +12 -12
- package/esm5/components/dialog/dialog.directive.js +4 -4
- package/esm5/components/dialog/dialog.providers.js +7 -7
- package/esm5/components/dialog/dialog.service.js +5 -5
- package/esm5/components/dropdown-box/dropdown-box.component.js +39 -39
- package/esm5/components/error/error.component.js +5 -5
- package/esm5/components/expand/expand-content.directive.js +2 -2
- package/esm5/components/expand/expand.component.js +12 -12
- package/esm5/components/group/group-styles.component.js +2 -2
- package/esm5/components/group/group.component.js +5 -5
- package/esm5/components/group/group.directive.js +15 -15
- package/esm5/components/hints-host/hint-box/hint-box.component.js +46 -46
- package/esm5/components/hints-host/hints-host.component.js +3 -3
- package/esm5/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
- package/esm5/components/label/label.component.js +5 -5
- package/esm5/components/link/link.component.js +12 -12
- package/esm5/components/loader/loader-options.js +3 -3
- package/esm5/components/loader/loader.component.js +3 -3
- package/esm5/components/notification/notification.component.js +9 -9
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm5/components/primitive-checkbox/checkbox-options.js +5 -5
- package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
- package/esm5/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +4 -4
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +28 -28
- package/esm5/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
- package/esm5/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm5/components/root/root.component.js +5 -5
- package/esm5/components/scroll-controls/scroll-controls.component.js +4 -4
- package/esm5/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm5/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm5/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm5/components/scrollbar/scrollable.directive.js +2 -2
- package/esm5/components/scrollbar/scrollbar.component.js +7 -7
- package/esm5/components/svg/svg.component.js +16 -16
- package/esm5/components/theme-night/theme-night.component.js +3 -3
- package/esm5/components/tooltip/tooltip.component.js +8 -8
- package/esm5/constants/decimal-symbols.js +2 -2
- package/esm5/constants/default-icons-path.js +2 -2
- package/esm5/constants/editing-keys.js +10 -10
- package/esm5/constants/events.js +5 -5
- package/esm5/constants/mask-caret-trap.js +2 -2
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/color/color.directive.js +7 -7
- package/esm5/directives/described-by/described-by.directive.js +5 -5
- package/esm5/directives/described-by/described-by.providers.js +5 -5
- package/esm5/directives/dropdown/dropdown.directive.js +3 -3
- package/esm5/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm5/directives/dropdown-controller/dropdown-controller.token.js +2 -2
- package/esm5/directives/hint/hint-options.js +3 -3
- package/esm5/directives/hint/hint.directive.js +6 -6
- package/esm5/directives/hint-controller/hint-controller.directive.js +7 -7
- package/esm5/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.token.js +2 -2
- package/esm5/directives/manual-hint/manual-hint-options.js +2 -2
- package/esm5/directives/manual-hint/manual-hint.directive.js +4 -4
- package/esm5/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm5/directives/mode/mode.directive.js +3 -3
- package/esm5/directives/pointer-hint/pointer-hint-options.js +2 -2
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +5 -5
- package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm5/directives/table-mode/table-mode.directive.js +3 -3
- package/esm5/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-example-text.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-max-length.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-type.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm5/directives/wrapper/wrapper.directive.js +10 -10
- package/esm5/enums/appearance.js +1 -1
- package/esm5/enums/base-color.js +1 -1
- package/esm5/enums/button-shape.js +1 -1
- package/esm5/enums/decimal.js +1 -1
- package/esm5/enums/dropdown-animation.js +1 -1
- package/esm5/enums/dropdown-width.js +1 -1
- package/esm5/enums/hint-mode.js +1 -1
- package/esm5/enums/interactive-state.js +1 -1
- package/esm5/enums/link-mode.js +1 -1
- package/esm5/enums/notification.js +1 -1
- package/esm5/enums/orientation.js +1 -1
- package/esm5/enums/range-state.js +1 -1
- package/esm5/enums/support-color.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.component.js +2 -2
- package/esm5/observables/smart-search.js +3 -3
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm5/pipes/format-number/format-number.pipe.js +2 -2
- package/esm5/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm5/pipes/month/month.pipe.js +2 -2
- package/esm5/pipes/pluralize/pluralize.pipe.js +2 -2
- package/esm5/providers/is-mobile-resolution.provider.js +2 -2
- package/esm5/providers/mode.provider.js +2 -2
- package/esm5/services/hint.service.js +2 -2
- package/esm5/services/night-theme.service.js +4 -4
- package/esm5/services/svg.service.js +4 -4
- package/esm5/tokens/animation-options.js +2 -2
- package/esm5/tokens/animations-duration.js +2 -2
- package/esm5/tokens/assert-enabled.js +2 -2
- package/esm5/tokens/data-list-accessor.js +2 -2
- package/esm5/tokens/data-list-host.js +2 -2
- package/esm5/tokens/document-or-shadow-root.js +2 -2
- package/esm5/tokens/dropdown-directive.js +2 -2
- package/esm5/tokens/element-ref.js +2 -2
- package/esm5/tokens/first-day-of-week.js +2 -2
- package/esm5/tokens/i18n.js +10 -10
- package/esm5/tokens/icon-place.js +3 -3
- package/esm5/tokens/icons-path.js +2 -2
- package/esm5/tokens/icons.js +2 -2
- package/esm5/tokens/is-mobile-resolution.js +3 -3
- package/esm5/tokens/media.js +2 -2
- package/esm5/tokens/mode.js +2 -2
- package/esm5/tokens/notification-options.js +3 -3
- package/esm5/tokens/number-format.js +3 -3
- package/esm5/tokens/option-content.js +2 -2
- package/esm5/tokens/ordered-short-week-days.js +2 -2
- package/esm5/tokens/scroll-ref.js +2 -2
- package/esm5/tokens/svg-content-processor.js +2 -2
- package/esm5/tokens/svg-src-processor.js +2 -2
- package/esm5/tokens/textfield-appearance.js +2 -2
- package/esm5/tokens/textfield-host.js +2 -2
- package/esm5/tokens/theme.js +3 -3
- package/esm5/tokens/value-accessor.js +2 -2
- package/esm5/utils/dom/are-css-vars-supported.js +2 -2
- package/esm5/utils/dom/check-fixed-position.js +3 -3
- package/esm5/utils/dom/get-safe-area-size.js +4 -4
- package/esm5/utils/dom/process-icon.js +11 -11
- package/esm5/utils/format/format-number.js +5 -5
- package/esm5/utils/format/format-phone.js +9 -9
- package/esm5/utils/format/get-fractional-part-padded.js +3 -3
- package/esm5/utils/format/number-to-string-without-exp.js +3 -3
- package/esm5/utils/format/other-decimal-symbol.js +2 -2
- package/esm5/utils/mask/create-auto-corrected-money-pipe.js +12 -12
- package/esm5/utils/mask/create-correction-mask.js +3 -3
- package/esm5/utils/mask/create-number-mask.js +13 -13
- package/esm5/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm5/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm5/utils/miscellaneous/color-fallback.js +8 -8
- package/esm5/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm5/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm5/utils/miscellaneous/size-bigger.js +3 -3
- package/esm5/utils/polyfills/inner-html.js +5 -5
- package/fesm2015/taiga-ui-core-abstract.js +15 -15
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-animations.js +138 -138
- package/fesm2015/taiga-ui-core-animations.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +12 -12
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +17 -17
- 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 +33 -33
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +24 -24
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +38 -38
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +4 -4
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +12 -12
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +21 -19
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +47 -47
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +4 -4
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +11 -11
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +4 -4
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +8 -8
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +54 -54
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +4 -4
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +26 -26
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +8 -8
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +15 -15
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +2 -2
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +17 -17
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-color.js +6 -6
- package/fesm2015/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-described-by.js +6 -6
- package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +11 -11
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +2 -2
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +8 -8
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +7 -7
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js +4 -4
- package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +5 -5
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-table-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +35 -35
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- 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 +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-observables.js +2 -2
- package/fesm2015/taiga-ui-core-observables.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm2015/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +2 -2
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +7 -7
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +40 -40
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +16 -16
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +17 -17
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +27 -27
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js +12 -12
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-polyfills.js +4 -4
- package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +15 -15
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-animations.js +138 -138
- package/fesm5/taiga-ui-core-animations.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +12 -12
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js +17 -17
- 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 +34 -34
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +24 -24
- package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +38 -38
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-error.js +4 -4
- package/fesm5/taiga-ui-core-components-error.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +12 -12
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-group.js +19 -19
- package/fesm5/taiga-ui-core-components-group.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +47 -47
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +4 -4
- package/fesm5/taiga-ui-core-components-label.js.map +1 -1
- package/fesm5/taiga-ui-core-components-link.js +11 -11
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +4 -4
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-notification.js +8 -8
- package/fesm5/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +54 -54
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +4 -4
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +26 -26
- package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scrollbar.js +8 -8
- package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-svg.js +15 -15
- package/fesm5/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm5/taiga-ui-core-components-theme-night.js +2 -2
- package/fesm5/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +17 -17
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-color.js +6 -6
- package/fesm5/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-described-by.js +8 -8
- package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js +11 -11
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown.js +2 -2
- package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +8 -8
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +7 -7
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js +4 -4
- package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mode.js +2 -2
- package/fesm5/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +5 -5
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-table-mode.js +2 -2
- package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-textfield-controller.js +35 -35
- package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
- 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 +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm5/taiga-ui-core-observables.js +2 -2
- package/fesm5/taiga-ui-core-observables.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm5/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm5/taiga-ui-core-providers.js +2 -2
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js +7 -7
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +40 -40
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js +16 -16
- package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +17 -17
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +28 -28
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-miscellaneous.js +12 -12
- package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-polyfills.js +4 -4
- package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-group.js","sources":["ng://@taiga-ui/core/components/group/group-styles.component.ts","ng://@taiga-ui/core/components/group/group.directive.ts","ng://@taiga-ui/core/components/group/group.component.ts","ng://@taiga-ui/core/components/group/group.module.ts","ng://@taiga-ui/core/components/group/taiga-ui-core-components-group.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template:
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-group.js","sources":["ng://@taiga-ui/core/components/group/group-styles.component.ts","ng://@taiga-ui/core/components/group/group.directive.ts","ng://@taiga-ui/core/components/group/group.component.ts","ng://@taiga-ui/core/components/group/group.module.ts","ng://@taiga-ui/core/components/group/taiga-ui-core-components-group.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`../../styles/markup/tui-group.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiGroupStylesComponent {}\n","import {Directive, HostBinding, Inject, Input} from '@angular/core';\nimport {tuiDefaultProp, TuiDirectiveStylesService} from '@taiga-ui/cdk';\nimport {TuiOrientationT, TuiSizeL} from '@taiga-ui/core/types';\n\nimport {TuiGroupStylesComponent} from './group-styles.component';\n\n@Directive({\n selector: `[tuiGroup]:not(ng-container)`,\n host: {\n class: `tui-group`,\n role: `group`,\n },\n})\nexport class TuiGroupDirective {\n @Input()\n @tuiDefaultProp()\n orientation: TuiOrientationT = `horizontal`;\n\n @Input()\n @HostBinding(`class.tui-group_adaptive`)\n @tuiDefaultProp()\n adaptive = false;\n\n @Input()\n @HostBinding(`class.tui-group_collapsed`)\n @tuiDefaultProp()\n collapsed = false;\n\n @Input()\n @HostBinding(`class.tui-group_rounded`)\n @tuiDefaultProp()\n rounded = true;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n constructor(\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiGroupStylesComponent);\n }\n\n @HostBinding(`class.tui-group_orientation_horizontal`)\n get orientationHorizontal(): boolean {\n return this.orientation === `horizontal`;\n }\n\n @HostBinding(`class.tui-group_orientation_vertical`)\n get orientationVertical(): boolean {\n return this.orientation === `vertical`;\n }\n\n @HostBinding(`class.tui-group_radius_large`)\n get sizeLarge(): boolean {\n return this.size === `l`;\n }\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {TuiGroupDirective} from './group.directive';\n\n/** @deprecated */\n@Component({\n selector: `tui-group`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n class: `tui-group`,\n role: `group`,\n },\n})\nexport class TuiGroupComponent extends TuiGroupDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiGroupComponent} from './group.component';\nimport {TuiGroupDirective} from './group.directive';\nimport {TuiGroupStylesComponent} from './group-styles.component';\n\n@NgModule({\n imports: [CommonModule],\n entryComponents: [TuiGroupStylesComponent],\n declarations: [TuiGroupComponent, TuiGroupDirective, TuiGroupStylesComponent],\n exports: [TuiGroupComponent, TuiGroupDirective, TuiGroupStylesComponent],\n})\nexport class TuiGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAOa,uBAAuB,GAApC,MAAa,uBAAuB;EAAG;AAA1B,uBAAuB;IALnC,SAAS,CAAC;QACP,QAAQ,EAAE,EAAE;QAEZ,a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ACJ,CAAC;IA0BO,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;GAzB7B,iBAAiB,CA4C7B;;ACrDD;IAYa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,iBAAiB;EAAG;AAA9C,iBAAiB;IAX7B,SAAS,CAAC;QACP,QAAQ,EAAE,WAAW;QACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,QAAQ,EAAE;;KAET;QACD,IAAI,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,OAAO;SAChB;KACJ,CAAC;GACW,iBAAiB,CAA6B;;ICH9C,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAN1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,CAAC;QACvB,eAAe,EAAE,CAAC,uBAAuB,CAAC;QAC1C,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,uBAAuB,CAAC;QAC7E,OAAO,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,uBAAuB,CAAC;KAC3E,CAAC;GACW,cAAc,CAAG;;ACb9B;;;;;;"}
|
|
@@ -29,12 +29,12 @@ TuiHintsHostComponent.ctorParameters = () => [
|
|
|
29
29
|
];
|
|
30
30
|
TuiHintsHostComponent = __decorate([
|
|
31
31
|
Component({
|
|
32
|
-
selector:
|
|
32
|
+
selector: `tui-hints-host`,
|
|
33
33
|
template: "<div\n *ngFor=\"let hint of hints$ | async\"\n role=\"tooltip\"\n polymorpheus-outlet\n @tuiParentAnimation\n [attr.id]=\"hint.id\"\n [content]=\"hint.component || component\"\n [context]=\"{$implicit: hint}\"\n [tuiActiveZoneParent]=\"hint.activeZone\"\n></div>\n",
|
|
34
34
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
35
|
animations: [TUI_PARENT_ANIMATION],
|
|
36
36
|
host: {
|
|
37
|
-
'aria-live':
|
|
37
|
+
'aria-live': `polite`,
|
|
38
38
|
},
|
|
39
39
|
styles: [":host{position:fixed;bottom:0;left:0;width:100%;height:0}"]
|
|
40
40
|
}),
|
|
@@ -50,24 +50,24 @@ const ARROW_SIZE = 8;
|
|
|
50
50
|
const ARROW_OFFSET = 16;
|
|
51
51
|
const ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;
|
|
52
52
|
const reverseDirectionsVertical = {
|
|
53
|
-
'top-left':
|
|
54
|
-
'top-right':
|
|
55
|
-
'bottom-left':
|
|
56
|
-
'bottom-right':
|
|
57
|
-
left:
|
|
58
|
-
right:
|
|
59
|
-
'top-middle':
|
|
60
|
-
'bottom-middle':
|
|
53
|
+
'top-left': `bottom-left`,
|
|
54
|
+
'top-right': `bottom-right`,
|
|
55
|
+
'bottom-left': `top-left`,
|
|
56
|
+
'bottom-right': `top-right`,
|
|
57
|
+
left: `right`,
|
|
58
|
+
right: `left`,
|
|
59
|
+
'top-middle': `bottom-middle`,
|
|
60
|
+
'bottom-middle': `top-middle`,
|
|
61
61
|
};
|
|
62
62
|
const reverseDirectionsHorizontal = {
|
|
63
|
-
'top-left':
|
|
64
|
-
'top-right':
|
|
65
|
-
'bottom-left':
|
|
66
|
-
'bottom-right':
|
|
67
|
-
left:
|
|
68
|
-
right:
|
|
69
|
-
'top-middle':
|
|
70
|
-
'bottom-middle':
|
|
63
|
+
'top-left': `top-right`,
|
|
64
|
+
'top-right': `top-left`,
|
|
65
|
+
'bottom-left': `bottom-right`,
|
|
66
|
+
'bottom-right': `bottom-left`,
|
|
67
|
+
left: `right`,
|
|
68
|
+
right: `left`,
|
|
69
|
+
'top-middle': `top-middle`,
|
|
70
|
+
'bottom-middle': `bottom-middle`,
|
|
71
71
|
};
|
|
72
72
|
// TODO: consider abstracting UI and move to CDK, split hint and overflow
|
|
73
73
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
@@ -80,7 +80,7 @@ let TuiHintBoxComponent = class TuiHintBoxComponent {
|
|
|
80
80
|
this.media = media;
|
|
81
81
|
this.hintsHost = hintsHost;
|
|
82
82
|
this.context = context;
|
|
83
|
-
this.animation = Object.assign({ value:
|
|
83
|
+
this.animation = Object.assign({ value: `` }, this.options);
|
|
84
84
|
animationFrame$
|
|
85
85
|
.pipe(tuiZonefree(ngZone), takeUntil(destroy$))
|
|
86
86
|
.subscribe(() => this.calculatePosition());
|
|
@@ -107,7 +107,7 @@ let TuiHintBoxComponent = class TuiHintBoxComponent {
|
|
|
107
107
|
* Styles are set directly to avoid visual shake of element
|
|
108
108
|
*/
|
|
109
109
|
calculatePosition() {
|
|
110
|
-
if (this.mode !==
|
|
110
|
+
if (this.mode !== `overflow`) {
|
|
111
111
|
this.calculateCoordinates();
|
|
112
112
|
}
|
|
113
113
|
else {
|
|
@@ -126,14 +126,14 @@ let TuiHintBoxComponent = class TuiHintBoxComponent {
|
|
|
126
126
|
const tooltipRect = tooltip.getBoundingClientRect();
|
|
127
127
|
const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;
|
|
128
128
|
const directions = [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
`left`,
|
|
130
|
+
`right`,
|
|
131
|
+
`bottom-left`,
|
|
132
|
+
`bottom-right`,
|
|
133
|
+
`bottom-middle`,
|
|
134
|
+
`top-left`,
|
|
135
|
+
`top-right`,
|
|
136
|
+
`top-middle`,
|
|
137
137
|
];
|
|
138
138
|
let top = 0;
|
|
139
139
|
let left = 0;
|
|
@@ -158,35 +158,35 @@ let TuiHintBoxComponent = class TuiHintBoxComponent {
|
|
|
158
158
|
// eslint-disable-next-line no-constant-condition
|
|
159
159
|
while (true) {
|
|
160
160
|
switch (direction) {
|
|
161
|
-
case
|
|
161
|
+
case `left`:
|
|
162
162
|
top = horizontalTop;
|
|
163
163
|
left = horizontalLeft;
|
|
164
164
|
break;
|
|
165
|
-
case
|
|
165
|
+
case `right`:
|
|
166
166
|
top = horizontalTop;
|
|
167
167
|
left = horizontalRight;
|
|
168
168
|
break;
|
|
169
|
-
case
|
|
169
|
+
case `top-right`:
|
|
170
170
|
top = verticalTop;
|
|
171
171
|
left = verticalRight;
|
|
172
172
|
break;
|
|
173
|
-
case
|
|
173
|
+
case `top-left`:
|
|
174
174
|
top = verticalTop;
|
|
175
175
|
left = verticalLeft;
|
|
176
176
|
break;
|
|
177
|
-
case
|
|
177
|
+
case `bottom-right`:
|
|
178
178
|
top = verticalBottom;
|
|
179
179
|
left = verticalRight;
|
|
180
180
|
break;
|
|
181
|
-
case
|
|
181
|
+
case `bottom-left`:
|
|
182
182
|
top = verticalBottom;
|
|
183
183
|
left = verticalLeft;
|
|
184
184
|
break;
|
|
185
|
-
case
|
|
185
|
+
case `bottom-middle`:
|
|
186
186
|
top = verticalBottom;
|
|
187
187
|
left = verticalMiddle;
|
|
188
188
|
break;
|
|
189
|
-
case
|
|
189
|
+
case `top-middle`:
|
|
190
190
|
top = verticalTop;
|
|
191
191
|
left = verticalMiddle;
|
|
192
192
|
break;
|
|
@@ -207,7 +207,7 @@ let TuiHintBoxComponent = class TuiHintBoxComponent {
|
|
|
207
207
|
}
|
|
208
208
|
style.top = px(top);
|
|
209
209
|
style.left = px(left);
|
|
210
|
-
tooltip.setAttribute(
|
|
210
|
+
tooltip.setAttribute(`data-tui-host-direction`, direction);
|
|
211
211
|
}
|
|
212
212
|
calculateMobileCoordinates() {
|
|
213
213
|
const hostRect = this.hint.getElementClientRect();
|
|
@@ -221,21 +221,21 @@ let TuiHintBoxComponent = class TuiHintBoxComponent {
|
|
|
221
221
|
hostRect.top < this.windowRef.innerHeight;
|
|
222
222
|
const verticalBottomFit = hostRect.bottom > 0 &&
|
|
223
223
|
hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;
|
|
224
|
-
const direction = (this.hint.direction.includes(
|
|
225
|
-
?
|
|
226
|
-
:
|
|
224
|
+
const direction = (this.hint.direction.includes(`top`) && verticalTopFit) || !verticalBottomFit
|
|
225
|
+
? `top`
|
|
226
|
+
: `bottom`;
|
|
227
227
|
const attemptedLeft = portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;
|
|
228
228
|
const left = Math.max(attemptedLeft + tooltipRect.width + SPACE > portalRect.right
|
|
229
229
|
? portalRect.right - SPACE - tooltipRect.width
|
|
230
230
|
: attemptedLeft, SPACE * 2);
|
|
231
231
|
style.left = px(left);
|
|
232
|
-
style.top = direction ===
|
|
232
|
+
style.top = direction === `top` ? px(verticalTop) : px(verticalBottom);
|
|
233
233
|
if (this.arrow) {
|
|
234
234
|
this.arrow.nativeElement.style.left = px(hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2
|
|
235
235
|
? ARROW_OFFSET
|
|
236
236
|
: hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2);
|
|
237
237
|
}
|
|
238
|
-
tooltip.setAttribute(
|
|
238
|
+
tooltip.setAttribute(`data-tui-host-direction`, direction);
|
|
239
239
|
}
|
|
240
240
|
setOverflowStyles() {
|
|
241
241
|
const hostRect = this.hint.getElementClientRect();
|
|
@@ -257,21 +257,21 @@ TuiHintBoxComponent.ctorParameters = () => [
|
|
|
257
257
|
{ type: undefined, decorators: [{ type: Inject, args: [POLYMORPHEUS_CONTEXT,] }] }
|
|
258
258
|
];
|
|
259
259
|
__decorate([
|
|
260
|
-
ViewChild(
|
|
260
|
+
ViewChild(`arrow`)
|
|
261
261
|
], TuiHintBoxComponent.prototype, "arrow", void 0);
|
|
262
262
|
__decorate([
|
|
263
|
-
HostBinding(
|
|
263
|
+
HostBinding(`@tuiFadeIn`)
|
|
264
264
|
], TuiHintBoxComponent.prototype, "animation", void 0);
|
|
265
265
|
__decorate([
|
|
266
266
|
tuiPure,
|
|
267
|
-
HostBinding(
|
|
267
|
+
HostBinding(`class._untouchable`)
|
|
268
268
|
], TuiHintBoxComponent.prototype, "isUntouchable", null);
|
|
269
269
|
__decorate([
|
|
270
|
-
HostBinding(
|
|
270
|
+
HostBinding(`attr.data-mode`)
|
|
271
271
|
], TuiHintBoxComponent.prototype, "mode", null);
|
|
272
272
|
TuiHintBoxComponent = __decorate([
|
|
273
273
|
Component({
|
|
274
|
-
selector:
|
|
274
|
+
selector: `tui-hint-box[hint]`,
|
|
275
275
|
template: "<!-- @bad TODO: Refactor to use this arrow in all cases -->\n<div\n *ngIf=\"isMobile\"\n #arrow\n class=\"t-arrow\"\n></div>\n<div\n automation-id=\"tui-hint-box__tooltip\"\n polymorpheus-outlet\n class=\"t-tooltip\"\n [content]=\"hint.content\"\n (tuiHoveredChange)=\"onHovered($event)\"\n>\n <ng-template let-text>\n <span class=\"t-text\">{{ text }}</span>\n </ng-template>\n</div>\n",
|
|
276
276
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
277
277
|
providers: [TuiDestroyService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-hints-host.js","sources":["ng://@taiga-ui/core/components/hints-host/hints-host.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.module.ts","ng://@taiga-ui/core/components/hints-host/hints-host.module.ts","ng://@taiga-ui/core/components/hints-host/taiga-ui-core-components-hints-host.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk';\nimport {TuiHint} from '@taiga-ui/core/interfaces';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiHintBoxComponent} from './hint-box/hint-box.component';\n\n@Component({\n selector: 'tui-hints-host',\n templateUrl: './hints-host.template.html',\n styleUrls: ['./hints-host.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [TUI_PARENT_ANIMATION],\n host: {\n 'aria-live': 'polite',\n },\n})\nexport class TuiHintsHostComponent {\n readonly component = new PolymorpheusComponent(TuiHintBoxComponent);\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: Observable<readonly TuiHint[]>,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n px,\n TuiContextWithImplicit,\n TuiDestroyService,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiHintsHostComponent} from '../hints-host.component';\n\nconst SPACE = 8;\nconst BORDER_WIDTH = 1;\nconst LEFT_PADDING = 16;\nconst TOP_PADDING = 12;\nconst ARROW_SIZE = 8;\nconst ARROW_OFFSET = 16;\nconst ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;\nconst reverseDirectionsVertical: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': 'bottom-left',\n 'top-right': 'bottom-right',\n 'bottom-left': 'top-left',\n 'bottom-right': 'top-right',\n left: 'right',\n right: 'left',\n 'top-middle': 'bottom-middle',\n 'bottom-middle': 'top-middle',\n};\nconst reverseDirectionsHorizontal: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': 'top-right',\n 'top-right': 'top-left',\n 'bottom-left': 'bottom-right',\n 'bottom-right': 'bottom-left',\n left: 'right',\n right: 'left',\n 'top-middle': 'top-middle',\n 'bottom-middle': 'bottom-middle',\n};\n\n// TODO: consider abstracting UI and move to CDK, split hint and overflow\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-hint-box[hint]',\n templateUrl: './hint-box.template.html',\n styleUrls: ['./hint-box.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn],\n})\nexport class TuiHintBoxComponent {\n @ViewChild('arrow')\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @HostBinding('@tuiFadeIn')\n readonly animation = {value: '', ...this.options} as const;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_MEDIA) private readonly media: TuiMedia,\n @Inject(forwardRef(() => TuiHintsHostComponent))\n private readonly hintsHost: TuiHintsHostComponent,\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<AbstractTuiHint>,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\n }\n\n get hint(): AbstractTuiHint {\n return this.context.$implicit;\n }\n\n @tuiPure\n @HostBinding('class._untouchable')\n get isUntouchable(): boolean {\n return this.hint instanceof TuiPointerHintDirective;\n }\n\n @HostBinding('attr.data-mode')\n get mode(): TuiHintModeT | null {\n return this.hint.mode;\n }\n\n get isMobile(): boolean {\n return tuiIsMobile(this.windowRef, this.media);\n }\n\n onHovered(hovered: boolean): void {\n if (this.hint instanceof TuiHintDirective) {\n this.hint.componentHovered$.next(hovered);\n }\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition(): void {\n if (this.mode !== 'overflow') {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates(): void {\n if (this.isMobile) {\n this.calculateMobileCoordinates();\n\n return;\n }\n\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;\n const directions: TuiDirection[] = [\n 'left',\n 'right',\n 'bottom-left',\n 'bottom-right',\n 'bottom-middle',\n 'top-left',\n 'top-right',\n 'top-middle',\n ];\n\n let top = 0;\n let left = 0;\n let {direction} = this.hint;\n\n const horizontalTop =\n hostRect.top + hostRect.height / 2 - tooltipRect.height / 2 - portalRect.top;\n const horizontalLeft =\n hostRect.left - tooltipRect.width - SPACE - portalRect.left;\n const horizontalRight = hostRect.left + hostRect.width + SPACE - portalRect.left;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalRight = isHostLong\n ? hostRect.left - portalRect.left\n : hostRect.left + hostRect.width / 2 - ARROWHEAD_OFFSET - portalRect.left;\n const verticalLeft = isHostLong\n ? hostRect.left - tooltipRect.width + hostRect.width - portalRect.left\n : hostRect.left -\n tooltipRect.width +\n hostRect.width / 2 +\n ARROWHEAD_OFFSET -\n portalRect.left;\n const verticalMiddle =\n hostRect.left - tooltipRect.width / 2 + hostRect.width / 2 - portalRect.left;\n\n directions.splice(directions.indexOf(direction), 1);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (direction) {\n case 'left':\n top = horizontalTop;\n left = horizontalLeft;\n break;\n case 'right':\n top = horizontalTop;\n left = horizontalRight;\n break;\n case 'top-right':\n top = verticalTop;\n left = verticalRight;\n break;\n case 'top-left':\n top = verticalTop;\n left = verticalLeft;\n break;\n case 'bottom-right':\n top = verticalBottom;\n left = verticalRight;\n break;\n case 'bottom-left':\n top = verticalBottom;\n left = verticalLeft;\n break;\n case 'bottom-middle':\n top = verticalBottom;\n left = verticalMiddle;\n break;\n case 'top-middle':\n top = verticalTop;\n left = verticalMiddle;\n break;\n }\n\n const verticalFit =\n top + portalRect.top > SPACE &&\n top + tooltipRect.height + SPACE + portalRect.top <\n this.windowRef.innerHeight;\n const horizontalFit =\n left > SPACE &&\n left + tooltipRect.width + SPACE + portalRect.left < portalRect.width;\n\n if (directions.length === 0 || (verticalFit && horizontalFit)) {\n break;\n }\n\n direction = verticalFit\n ? reverseDirectionsHorizontal[direction]\n : reverseDirectionsVertical[direction];\n direction =\n directions.splice(directions.indexOf(direction), 1)[0] || direction;\n }\n\n style.top = px(top);\n style.left = px(left);\n\n tooltip.setAttribute('data-tui-host-direction', direction);\n }\n\n private calculateMobileCoordinates(): void {\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTopFit =\n verticalTop + portalRect.top > SPACE &&\n hostRect.top < this.windowRef.innerHeight;\n const verticalBottomFit =\n hostRect.bottom > 0 &&\n hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;\n const direction =\n (this.hint.direction.includes('top') && verticalTopFit) || !verticalBottomFit\n ? 'top'\n : 'bottom';\n const attemptedLeft =\n portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;\n const left = Math.max(\n attemptedLeft + tooltipRect.width + SPACE > portalRect.right\n ? portalRect.right - SPACE - tooltipRect.width\n : attemptedLeft,\n SPACE * 2,\n );\n\n style.left = px(left);\n style.top = direction === 'top' ? px(verticalTop) : px(verticalBottom);\n\n if (this.arrow) {\n this.arrow.nativeElement.style.left = px(\n hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2\n ? ARROW_OFFSET\n : hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2,\n );\n }\n\n tooltip.setAttribute('data-tui-host-direction', direction);\n }\n\n private setOverflowStyles(): void {\n const hostRect = this.hint.getElementClientRect();\n const {style} = this.elementRef.nativeElement;\n\n style.top = px(hostRect.top - window.innerHeight - TOP_PADDING - BORDER_WIDTH);\n style.left = px(hostRect.left - LEFT_PADDING - BORDER_WIDTH);\n style.width = px(hostRect.width + LEFT_PADDING * 2 + BORDER_WIDTH * 2);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiHoveredModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHoveredModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n entryComponents: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxModule} from './hint-box/hint-box.module';\nimport {TuiHintsHostComponent} from './hints-host.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHintBoxModule, TuiActiveZoneModule],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle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AM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,WAAA,MAAM,CAAC,UAAU,CAAC,MAAM,qBAAqB,CAAC,CAAC,CAAA;IAE/C,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;GAjBxB,mBAAmB,CA+N/B;;IC1RY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAN5B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;QAC7D,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;QAC9B,eAAe,EAAE,CAAC,mBAAmB,CAAC;KACzC,CAAC;GACW,gBAAgB,CAAG;;ICAnB,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAL9B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;QAClF,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACblC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-hints-host.js","sources":["ng://@taiga-ui/core/components/hints-host/hints-host.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.module.ts","ng://@taiga-ui/core/components/hints-host/hints-host.module.ts","ng://@taiga-ui/core/components/hints-host/taiga-ui-core-components-hints-host.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk';\nimport {TuiHint} from '@taiga-ui/core/interfaces';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiHintBoxComponent} from './hint-box/hint-box.component';\n\n@Component({\n selector: `tui-hints-host`,\n templateUrl: `./hints-host.template.html`,\n styleUrls: [`./hints-host.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [TUI_PARENT_ANIMATION],\n host: {\n 'aria-live': `polite`,\n },\n})\nexport class TuiHintsHostComponent {\n readonly component = new PolymorpheusComponent(TuiHintBoxComponent);\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: Observable<readonly TuiHint[]>,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n px,\n TuiContextWithImplicit,\n TuiDestroyService,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiHintsHostComponent} from '../hints-host.component';\n\nconst SPACE = 8;\nconst BORDER_WIDTH = 1;\nconst LEFT_PADDING = 16;\nconst TOP_PADDING = 12;\nconst ARROW_SIZE = 8;\nconst ARROW_OFFSET = 16;\nconst ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;\nconst reverseDirectionsVertical: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': `bottom-left`,\n 'top-right': `bottom-right`,\n 'bottom-left': `top-left`,\n 'bottom-right': `top-right`,\n left: `right`,\n right: `left`,\n 'top-middle': `bottom-middle`,\n 'bottom-middle': `top-middle`,\n};\nconst reverseDirectionsHorizontal: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': `top-right`,\n 'top-right': `top-left`,\n 'bottom-left': `bottom-right`,\n 'bottom-right': `bottom-left`,\n left: `right`,\n right: `left`,\n 'top-middle': `top-middle`,\n 'bottom-middle': `bottom-middle`,\n};\n\n// TODO: consider abstracting UI and move to CDK, split hint and overflow\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: `tui-hint-box[hint]`,\n templateUrl: `./hint-box.template.html`,\n styleUrls: [`./hint-box.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn],\n})\nexport class TuiHintBoxComponent {\n @ViewChild(`arrow`)\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @HostBinding(`@tuiFadeIn`)\n readonly animation = {value: ``, ...this.options} as const;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_MEDIA) private readonly media: TuiMedia,\n @Inject(forwardRef(() => TuiHintsHostComponent))\n private readonly hintsHost: TuiHintsHostComponent,\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<AbstractTuiHint>,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\n }\n\n get hint(): AbstractTuiHint {\n return this.context.$implicit;\n }\n\n @tuiPure\n @HostBinding(`class._untouchable`)\n get isUntouchable(): boolean {\n return this.hint instanceof TuiPointerHintDirective;\n }\n\n @HostBinding(`attr.data-mode`)\n get mode(): TuiHintModeT | null {\n return this.hint.mode;\n }\n\n get isMobile(): boolean {\n return tuiIsMobile(this.windowRef, this.media);\n }\n\n onHovered(hovered: boolean): void {\n if (this.hint instanceof TuiHintDirective) {\n this.hint.componentHovered$.next(hovered);\n }\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition(): void {\n if (this.mode !== `overflow`) {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates(): void {\n if (this.isMobile) {\n this.calculateMobileCoordinates();\n\n return;\n }\n\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;\n const directions: TuiDirection[] = [\n `left`,\n `right`,\n `bottom-left`,\n `bottom-right`,\n `bottom-middle`,\n `top-left`,\n `top-right`,\n `top-middle`,\n ];\n\n let top = 0;\n let left = 0;\n let {direction} = this.hint;\n\n const horizontalTop =\n hostRect.top + hostRect.height / 2 - tooltipRect.height / 2 - portalRect.top;\n const horizontalLeft =\n hostRect.left - tooltipRect.width - SPACE - portalRect.left;\n const horizontalRight = hostRect.left + hostRect.width + SPACE - portalRect.left;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalRight = isHostLong\n ? hostRect.left - portalRect.left\n : hostRect.left + hostRect.width / 2 - ARROWHEAD_OFFSET - portalRect.left;\n const verticalLeft = isHostLong\n ? hostRect.left - tooltipRect.width + hostRect.width - portalRect.left\n : hostRect.left -\n tooltipRect.width +\n hostRect.width / 2 +\n ARROWHEAD_OFFSET -\n portalRect.left;\n const verticalMiddle =\n hostRect.left - tooltipRect.width / 2 + hostRect.width / 2 - portalRect.left;\n\n directions.splice(directions.indexOf(direction), 1);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (direction) {\n case `left`:\n top = horizontalTop;\n left = horizontalLeft;\n break;\n case `right`:\n top = horizontalTop;\n left = horizontalRight;\n break;\n case `top-right`:\n top = verticalTop;\n left = verticalRight;\n break;\n case `top-left`:\n top = verticalTop;\n left = verticalLeft;\n break;\n case `bottom-right`:\n top = verticalBottom;\n left = verticalRight;\n break;\n case `bottom-left`:\n top = verticalBottom;\n left = verticalLeft;\n break;\n case `bottom-middle`:\n top = verticalBottom;\n left = verticalMiddle;\n break;\n case `top-middle`:\n top = verticalTop;\n left = verticalMiddle;\n break;\n }\n\n const verticalFit =\n top + portalRect.top > SPACE &&\n top + tooltipRect.height + SPACE + portalRect.top <\n this.windowRef.innerHeight;\n const horizontalFit =\n left > SPACE &&\n left + tooltipRect.width + SPACE + portalRect.left < portalRect.width;\n\n if (directions.length === 0 || (verticalFit && horizontalFit)) {\n break;\n }\n\n direction = verticalFit\n ? reverseDirectionsHorizontal[direction]\n : reverseDirectionsVertical[direction];\n direction =\n directions.splice(directions.indexOf(direction), 1)[0] || direction;\n }\n\n style.top = px(top);\n style.left = px(left);\n\n tooltip.setAttribute(`data-tui-host-direction`, direction);\n }\n\n private calculateMobileCoordinates(): void {\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTopFit =\n verticalTop + portalRect.top > SPACE &&\n hostRect.top < this.windowRef.innerHeight;\n const verticalBottomFit =\n hostRect.bottom > 0 &&\n hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;\n const direction =\n (this.hint.direction.includes(`top`) && verticalTopFit) || !verticalBottomFit\n ? `top`\n : `bottom`;\n const attemptedLeft =\n portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;\n const left = Math.max(\n attemptedLeft + tooltipRect.width + SPACE > portalRect.right\n ? portalRect.right - SPACE - tooltipRect.width\n : attemptedLeft,\n SPACE * 2,\n );\n\n style.left = px(left);\n style.top = direction === `top` ? px(verticalTop) : px(verticalBottom);\n\n if (this.arrow) {\n this.arrow.nativeElement.style.left = px(\n hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2\n ? ARROW_OFFSET\n : hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2,\n );\n }\n\n tooltip.setAttribute(`data-tui-host-direction`, direction);\n }\n\n private setOverflowStyles(): void {\n const hostRect = this.hint.getElementClientRect();\n const {style} = this.elementRef.nativeElement;\n\n style.top = px(hostRect.top - window.innerHeight - TOP_PADDING - BORDER_WIDTH);\n style.left = px(hostRect.left - LEFT_PADDING - BORDER_WIDTH);\n style.width = px(hostRect.width + LEFT_PADDING * 2 + BORDER_WIDTH * 2);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiHoveredModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHoveredModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n entryComponents: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxModule} from './hint-box/hint-box.module';\nimport {TuiHintsHostComponent} from './hints-host.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHintBoxModule, TuiActiveZoneModule],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;IAmBa,qBAAqB,GAAlC,MAAa,qBAAqB;IAG9B,YACyC,UAAmC,EACvC,MAAsC;QADlC,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgC;QAJlE,cAAS,GAAG,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;KAKhE;IAEJ,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;KAChE;EACJ;;YAPwD,UAAU,uBAA1D,MAAM,SAAC,UAAU;YACuB,UAAU,uBAAlD,MAAM,SAAC,cAAc;;AALjB,qBAAqB;IAVjC,SAAS,CAAC;QACP,QAAQ,EAAE,gBAAgB;QAC1B,4SAAyC;QAEzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,UAAU,EAAE,CAAC,oBAAoB,CAAC;QAClC,IAAI,EAAE;YACF,WAAW,EAAE,QAAQ;SACxB;;KACJ,CAAC;IAKO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;GALlB,qBAAqB,CAWjC;;ACGD,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,UAAU,GAAG,CAAC,CAAC;AACrB,MAAM,YAAY,GAAG,EAAE,CAA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AS,CAAC;;KAC1B,CAAC;IASO,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;IACvB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,WAAA,MAAM,CAAC,UAAU,CAAC,MAAM,qBAAqB,CAAC,CAAC,CAAA;IAE/C,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;GAjBxB,mBAAmB,CA+N/B;;IC1RY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAN5B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;QAC7D,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;QAC9B,eAAe,EAAE,CAAC,mBAAmB,CAAC;KACzC,CAAC;GACW,gBAAgB,CAAG;;ICAnB,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAL9B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;QAClF,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACblC;;;;;;"}
|
|
@@ -11,7 +11,7 @@ let TuiHostedDropdownConnectorDirective = class TuiHostedDropdownConnectorDirect
|
|
|
11
11
|
};
|
|
12
12
|
TuiHostedDropdownConnectorDirective = __decorate([
|
|
13
13
|
Directive({
|
|
14
|
-
selector:
|
|
14
|
+
selector: `[tuiHostedDropdownHost]`,
|
|
15
15
|
})
|
|
16
16
|
], TuiHostedDropdownConnectorDirective);
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ let TuiHostedDropdownComponent = TuiHostedDropdownComponent_1 = class TuiHostedD
|
|
|
20
20
|
constructor(elementRef, controller) {
|
|
21
21
|
this.elementRef = elementRef;
|
|
22
22
|
this.controller = controller;
|
|
23
|
-
this.content =
|
|
23
|
+
this.content = ``;
|
|
24
24
|
this.canOpen = true;
|
|
25
25
|
this.open = false;
|
|
26
26
|
this.openChange = new EventEmitter();
|
|
@@ -157,7 +157,7 @@ __decorate([
|
|
|
157
157
|
ContentChild(TuiHostedDropdownConnectorDirective, { read: ElementRef })
|
|
158
158
|
], TuiHostedDropdownComponent.prototype, "dropdownHost", void 0);
|
|
159
159
|
__decorate([
|
|
160
|
-
ViewChild(
|
|
160
|
+
ViewChild(`wrapper`, { read: ElementRef })
|
|
161
161
|
], TuiHostedDropdownComponent.prototype, "wrapper", void 0);
|
|
162
162
|
__decorate([
|
|
163
163
|
ViewChild(TuiDropdownDirective)
|
|
@@ -181,24 +181,24 @@ __decorate([
|
|
|
181
181
|
Output()
|
|
182
182
|
], TuiHostedDropdownComponent.prototype, "focusedChange", void 0);
|
|
183
183
|
__decorate([
|
|
184
|
-
HostBinding(
|
|
184
|
+
HostBinding(`class._hosted_dropdown_focused`)
|
|
185
185
|
], TuiHostedDropdownComponent.prototype, "focused", null);
|
|
186
186
|
__decorate([
|
|
187
|
-
HostListener(
|
|
187
|
+
HostListener(`focusin`, [`$event.target`])
|
|
188
188
|
], TuiHostedDropdownComponent.prototype, "onFocusIn", null);
|
|
189
189
|
__decorate([
|
|
190
|
-
HostListener(
|
|
190
|
+
HostListener(`click`, [`$event.target`])
|
|
191
191
|
], TuiHostedDropdownComponent.prototype, "onClick", null);
|
|
192
192
|
__decorate([
|
|
193
|
-
HostListener(
|
|
193
|
+
HostListener(`keydown.esc`, [`$event`])
|
|
194
194
|
], TuiHostedDropdownComponent.prototype, "onKeyDownEsc", null);
|
|
195
195
|
__decorate([
|
|
196
|
-
HostListener(
|
|
197
|
-
HostListener(
|
|
196
|
+
HostListener(`keydown.arrowDown`, [`$event`, `true`]),
|
|
197
|
+
HostListener(`keydown.arrowUp`, [`$event`, `false`])
|
|
198
198
|
], TuiHostedDropdownComponent.prototype, "onArrow", null);
|
|
199
199
|
TuiHostedDropdownComponent = TuiHostedDropdownComponent_1 = __decorate([
|
|
200
200
|
Component({
|
|
201
|
-
selector:
|
|
201
|
+
selector: `tui-hosted-dropdown`,
|
|
202
202
|
template: "<div\n #activeZone=\"tuiActiveZone\"\n class=\"wrapper\"\n [tuiDropdownAlign]=\"controller.align\"\n [tuiDropdownDirection]=\"controller.direction\"\n [tuiDropdownHost]=\"nativeFocusableElement\"\n [tuiDropdownLimitWidth]=\"controller.limitWidth\"\n [tuiDropdownMinHeight]=\"controller.minHeight\"\n [tuiDropdownMaxHeight]=\"controller.maxHeight\"\n [tuiDropdownSided]=\"controller.sided\"\n [tuiDropdownContent]=\"dropdown\"\n [tuiDropdown]=\"open && canOpen\"\n [tuiObscuredEnabled]=\"open\"\n (tuiObscured)=\"onHostObscured($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <ng-content></ng-content>\n <ng-template\n #dropdown=\"polymorpheus\"\n polymorpheus\n >\n <div\n #wrapper\n polymorpheus-outlet\n [content]=\"content\"\n [context]=\"{$implicit: activeZone}\"\n (keydown.esc)=\"onKeyDownEsc($event)\"\n (keydown)=\"onKeydown($event)\"\n ></div>\n <!--This DIV is here to start backwards TreeWalker for focusing last focusable item on ArrowUp-->\n <div></div>\n </ng-template>\n</div>\n",
|
|
203
203
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
204
204
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-hosted-dropdown.js","sources":["ng://@taiga-ui/core/components/hosted-dropdown/hosted-dropdown-connector.directive.ts","ng://@taiga-ui/core/components/hosted-dropdown/hosted-dropdown.component.ts","ng://@taiga-ui/core/components/hosted-dropdown/hosted-dropdown.module.ts","ng://@taiga-ui/core/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n@Directive({\n selector: '[tuiHostedDropdownHost]',\n})\nexport class TuiHostedDropdownConnectorDirective {}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {\n getClosestFocusable,\n isElementEditable,\n isNativeFocusedIn,\n isNativeKeyboardFocusable,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiActiveZoneDirective,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n DROPDOWN_CONTROLLER_PROVIDER,\n TUI_DROPDOWN_WATCHED_CONTROLLER,\n TuiDropdownControllerDirective,\n} from '@taiga-ui/core/directives/dropdown-controller';\nimport {isEditingKey} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHostedDropdownConnectorDirective} from './hosted-dropdown-connector.directive';\n\n@Component({\n selector: 'tui-hosted-dropdown',\n templateUrl: './hosted-dropdown.template.html',\n styleUrls: ['./hosted-dropdown.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiHostedDropdownComponent),\n },\n DROPDOWN_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiHostedDropdownComponent implements TuiFocusableElementAccessor {\n @ContentChild(TuiHostedDropdownConnectorDirective, {read: ElementRef})\n private readonly dropdownHost?: ElementRef<HTMLElement>;\n\n @ViewChild('wrapper', {read: ElementRef})\n private readonly wrapper?: ElementRef<HTMLDivElement>;\n\n @ViewChild(TuiDropdownDirective)\n private readonly dropdownDirective?: TuiDropdownDirective;\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent<TuiContextWithImplicit<TuiActiveZoneDirective>> = '';\n\n @Input()\n @tuiDefaultProp()\n canOpen = true;\n\n @Input()\n @tuiDefaultProp()\n open = false;\n\n @Output()\n readonly openChange = new EventEmitter<boolean>();\n\n @Output()\n readonly focusedChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef,\n @Inject(TUI_DROPDOWN_WATCHED_CONTROLLER)\n readonly controller: TuiDropdownControllerDirective,\n ) {}\n\n get host(): HTMLElement {\n return this.dropdownHost\n ? this.dropdownHost.nativeElement\n : this.elementRef.nativeElement;\n }\n\n get dropdown(): HTMLElement | null {\n return !this.dropdownDirective || this.dropdownDirective.dropdownBoxRef === null\n ? null\n : this.dropdownDirective.dropdownBoxRef.location.nativeElement;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return isNativeKeyboardFocusable(this.host)\n ? this.host\n : getClosestFocusable(this.host, false, this.elementRef.nativeElement);\n }\n\n @HostBinding('class._hosted_dropdown_focused')\n get focused(): boolean {\n return (\n isNativeFocusedIn(this.host) ||\n (this.open && !!this.wrapper && isNativeFocusedIn(this.wrapper.nativeElement))\n );\n }\n\n @HostListener('focusin', ['$event.target'])\n onFocusIn(target: HTMLElement): void {\n const host = this.dropdownHost\n ? this.dropdownHost.nativeElement\n : this.nativeFocusableElement || this.elementRef.nativeElement;\n\n if (!host.contains(target)) {\n this.updateOpen(false);\n }\n }\n\n @HostListener('click', ['$event.target'])\n onClick(target: HTMLElement): void {\n const host = this.nativeFocusableElement || this.host;\n const dropdownHost = this.dropdownHost ? this.dropdownHost.nativeElement : host;\n\n if (!this.hostEditable && dropdownHost.contains(target)) {\n this.updateOpen(!this.open);\n }\n }\n\n @HostListener('keydown.esc', ['$event'])\n onKeyDownEsc(event: Event): void {\n if (!this.canOpen || !this.open) {\n return;\n }\n\n event.stopPropagation();\n this.closeDropdown();\n }\n\n @HostListener('keydown.arrowDown', ['$event', 'true'])\n @HostListener('keydown.arrowUp', ['$event', 'false'])\n onArrow(event: KeyboardEvent, down: boolean): void {\n this.focusDropdown(event, down);\n }\n\n onKeydown({key, target, defaultPrevented}: KeyboardEvent): void {\n if (\n !defaultPrevented &&\n isEditingKey(key) &&\n this.hostEditable &&\n // TODO: iframe warning\n target instanceof HTMLElement &&\n !isElementEditable(target)\n ) {\n this.focusHost();\n }\n }\n\n onActiveZone(active: boolean): void {\n this.updateFocused(active);\n\n if (!active) {\n this.updateOpen(false);\n }\n }\n\n onHostObscured(obscured: boolean): void {\n if (obscured) {\n this.closeDropdown();\n }\n }\n\n updateOpen(open: boolean): void {\n if (open && !this.canOpen) {\n return;\n }\n\n this.open = open;\n this.openChange.emit(open);\n }\n\n private get hostEditable(): boolean {\n const host = this.nativeFocusableElement || this.host;\n\n // TODO: iframe warning\n return host instanceof HTMLElement && isElementEditable(host);\n }\n\n private focusDropdown(event: KeyboardEvent, first: boolean): void {\n const host = this.nativeFocusableElement;\n\n // TODO: iframe warning\n if (\n !host ||\n !(host instanceof HTMLElement) ||\n !(event.target instanceof Node) ||\n !host.contains(event.target)\n ) {\n return;\n }\n\n if (\n !this.wrapper ||\n !this.open ||\n this.dropdown === null ||\n // TODO: iframe warning\n !(this.wrapper.nativeElement.nextElementSibling instanceof HTMLElement)\n ) {\n this.updateOpen(true);\n\n if (!isElementEditable(host)) {\n event.preventDefault();\n }\n\n return;\n }\n\n const initial = first\n ? this.wrapper.nativeElement\n : this.wrapper.nativeElement.nextElementSibling;\n const focusable = getClosestFocusable(\n initial,\n !first,\n this.wrapper.nativeElement,\n );\n\n if (focusable === null) {\n return;\n }\n\n setNativeFocused(focusable);\n event.preventDefault();\n }\n\n private closeDropdown(): void {\n if (this.focused) {\n this.focusHost();\n }\n\n this.updateOpen(false);\n }\n\n private focusHost(): void {\n const host = this.nativeFocusableElement;\n\n if (host !== null) {\n setNativeFocused(host, true, true);\n }\n }\n\n private updateFocused(focused: boolean): void {\n this.focusedChange.emit(focused);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiObscuredModule} from '@taiga-ui/cdk';\nimport {TuiDropdownModule} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHostedDropdownComponent} from './hosted-dropdown.component';\nimport {TuiHostedDropdownConnectorDirective} from './hosted-dropdown-connector.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiObscuredModule,\n PolymorpheusModule,\n TuiActiveZoneModule,\n TuiDropdownModule,\n ],\n declarations: [TuiHostedDropdownComponent, TuiHostedDropdownConnectorDirective],\n exports: [TuiHostedDropdownComponent, TuiHostedDropdownConnectorDirective],\n})\nexport class TuiHostedDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAKa,mCAAmC,GAAhD,MAAa,mCAAmC;EAAG;AAAtC,mCAAmC;IAH/C,SAAS,CAAC;QACP,QAAQ,EAAE,yBAAyB;KACtC,CAAC;GACW,mCAAmC,CAAG;;;IC8CtC,0BAA0B,kCAAvC,MAAa,0BAA0B;IA4BnC,YACyC,UAAsB,EAElD,UAA0C;QAFd,eAAU,GAAV,UAAU,CAAY;QAElD,eAAU,GAAV,UAAU,CAAgC;QAnBvD,YAAO,GAAwE,EAAE,CAAC;QAIlF,YAAO,GAAG,IAAI,CAAC;QAIf,SAAI,GAAG,KAAK,CAAC;QAGJ,eAAU,GAAG,IAAI,YAAY,EAAW,CAAC;QAGzC,kBAAa,GAAG,IAAI,YAAY,EAAW,CAAC;KAMjD;IAEJ,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,YAAY;cAClB,IAAI,CAAC,YAAY,C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AC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,4BAA0B,CAAC;aAC5D;YACD,4BAA4B;SAC/B;;KACJ,CAAC;IA8BO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,+BAA+B,CAAC,CAAA;GA9BnC,0BAA0B,CA6MtC;;IC5OY,uBAAuB,GAApC,MAAa,uBAAuB;EAAG;AAA1B,uBAAuB;IAXnC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,iBAAiB;YACjB,kBAAkB;YAClB,mBAAmB;YACnB,iBAAiB;SACpB;QACD,YAAY,EAAE,CAAC,0BAA0B,EAAE,mCAAmC,CAAC;QAC/E,OAAO,EAAE,CAAC,0BAA0B,EAAE,mCAAmC,CAAC;KAC7E,CAAC;GACW,uBAAuB,CAAG;;ACpBvC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-hosted-dropdown.js","sources":["ng://@taiga-ui/core/components/hosted-dropdown/hosted-dropdown-connector.directive.ts","ng://@taiga-ui/core/components/hosted-dropdown/hosted-dropdown.component.ts","ng://@taiga-ui/core/components/hosted-dropdown/hosted-dropdown.module.ts","ng://@taiga-ui/core/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n@Directive({\n selector: `[tuiHostedDropdownHost]`,\n})\nexport class TuiHostedDropdownConnectorDirective {}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {\n getClosestFocusable,\n isElementEditable,\n isNativeFocusedIn,\n isNativeKeyboardFocusable,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiActiveZoneDirective,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n DROPDOWN_CONTROLLER_PROVIDER,\n TUI_DROPDOWN_WATCHED_CONTROLLER,\n TuiDropdownControllerDirective,\n} from '@taiga-ui/core/directives/dropdown-controller';\nimport {isEditingKey} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHostedDropdownConnectorDirective} from './hosted-dropdown-connector.directive';\n\n@Component({\n selector: `tui-hosted-dropdown`,\n templateUrl: `./hosted-dropdown.template.html`,\n styleUrls: [`./hosted-dropdown.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiHostedDropdownComponent),\n },\n DROPDOWN_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiHostedDropdownComponent implements TuiFocusableElementAccessor {\n @ContentChild(TuiHostedDropdownConnectorDirective, {read: ElementRef})\n private readonly dropdownHost?: ElementRef<HTMLElement>;\n\n @ViewChild(`wrapper`, {read: ElementRef})\n private readonly wrapper?: ElementRef<HTMLDivElement>;\n\n @ViewChild(TuiDropdownDirective)\n private readonly dropdownDirective?: TuiDropdownDirective;\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent<TuiContextWithImplicit<TuiActiveZoneDirective>> = ``;\n\n @Input()\n @tuiDefaultProp()\n canOpen = true;\n\n @Input()\n @tuiDefaultProp()\n open = false;\n\n @Output()\n readonly openChange = new EventEmitter<boolean>();\n\n @Output()\n readonly focusedChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef,\n @Inject(TUI_DROPDOWN_WATCHED_CONTROLLER)\n readonly controller: TuiDropdownControllerDirective,\n ) {}\n\n get host(): HTMLElement {\n return this.dropdownHost\n ? this.dropdownHost.nativeElement\n : this.elementRef.nativeElement;\n }\n\n get dropdown(): HTMLElement | null {\n return !this.dropdownDirective || this.dropdownDirective.dropdownBoxRef === null\n ? null\n : this.dropdownDirective.dropdownBoxRef.location.nativeElement;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return isNativeKeyboardFocusable(this.host)\n ? this.host\n : getClosestFocusable(this.host, false, this.elementRef.nativeElement);\n }\n\n @HostBinding(`class._hosted_dropdown_focused`)\n get focused(): boolean {\n return (\n isNativeFocusedIn(this.host) ||\n (this.open && !!this.wrapper && isNativeFocusedIn(this.wrapper.nativeElement))\n );\n }\n\n @HostListener(`focusin`, [`$event.target`])\n onFocusIn(target: HTMLElement): void {\n const host = this.dropdownHost\n ? this.dropdownHost.nativeElement\n : this.nativeFocusableElement || this.elementRef.nativeElement;\n\n if (!host.contains(target)) {\n this.updateOpen(false);\n }\n }\n\n @HostListener(`click`, [`$event.target`])\n onClick(target: HTMLElement): void {\n const host = this.nativeFocusableElement || this.host;\n const dropdownHost = this.dropdownHost ? this.dropdownHost.nativeElement : host;\n\n if (!this.hostEditable && dropdownHost.contains(target)) {\n this.updateOpen(!this.open);\n }\n }\n\n @HostListener(`keydown.esc`, [`$event`])\n onKeyDownEsc(event: Event): void {\n if (!this.canOpen || !this.open) {\n return;\n }\n\n event.stopPropagation();\n this.closeDropdown();\n }\n\n @HostListener(`keydown.arrowDown`, [`$event`, `true`])\n @HostListener(`keydown.arrowUp`, [`$event`, `false`])\n onArrow(event: KeyboardEvent, down: boolean): void {\n this.focusDropdown(event, down);\n }\n\n onKeydown({key, target, defaultPrevented}: KeyboardEvent): void {\n if (\n !defaultPrevented &&\n isEditingKey(key) &&\n this.hostEditable &&\n // TODO: iframe warning\n target instanceof HTMLElement &&\n !isElementEditable(target)\n ) {\n this.focusHost();\n }\n }\n\n onActiveZone(active: boolean): void {\n this.updateFocused(active);\n\n if (!active) {\n this.updateOpen(false);\n }\n }\n\n onHostObscured(obscured: boolean): void {\n if (obscured) {\n this.closeDropdown();\n }\n }\n\n updateOpen(open: boolean): void {\n if (open && !this.canOpen) {\n return;\n }\n\n this.open = open;\n this.openChange.emit(open);\n }\n\n private get hostEditable(): boolean {\n const host = this.nativeFocusableElement || this.host;\n\n // TODO: iframe warning\n return host instanceof HTMLElement && isElementEditable(host);\n }\n\n private focusDropdown(event: KeyboardEvent, first: boolean): void {\n const host = this.nativeFocusableElement;\n\n // TODO: iframe warning\n if (\n !host ||\n !(host instanceof HTMLElement) ||\n !(event.target instanceof Node) ||\n !host.contains(event.target)\n ) {\n return;\n }\n\n if (\n !this.wrapper ||\n !this.open ||\n this.dropdown === null ||\n // TODO: iframe warning\n !(this.wrapper.nativeElement.nextElementSibling instanceof HTMLElement)\n ) {\n this.updateOpen(true);\n\n if (!isElementEditable(host)) {\n event.preventDefault();\n }\n\n return;\n }\n\n const initial = first\n ? this.wrapper.nativeElement\n : this.wrapper.nativeElement.nextElementSibling;\n const focusable = getClosestFocusable(\n initial,\n !first,\n this.wrapper.nativeElement,\n );\n\n if (focusable === null) {\n return;\n }\n\n setNativeFocused(focusable);\n event.preventDefault();\n }\n\n private closeDropdown(): void {\n if (this.focused) {\n this.focusHost();\n }\n\n this.updateOpen(false);\n }\n\n private focusHost(): void {\n const host = this.nativeFocusableElement;\n\n if (host !== null) {\n setNativeFocused(host, true, true);\n }\n }\n\n private updateFocused(focused: boolean): void {\n this.focusedChange.emit(focused);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiObscuredModule} from '@taiga-ui/cdk';\nimport {TuiDropdownModule} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHostedDropdownComponent} from './hosted-dropdown.component';\nimport {TuiHostedDropdownConnectorDirective} from './hosted-dropdown-connector.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiObscuredModule,\n PolymorpheusModule,\n TuiActiveZoneModule,\n TuiDropdownModule,\n ],\n declarations: [TuiHostedDropdownComponent, TuiHostedDropdownConnectorDirective],\n exports: [TuiHostedDropdownComponent, TuiHostedDropdownConnectorDirective],\n})\nexport class TuiHostedDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAKa,mCAAmC,GAAhD,MAAa,mCAAmC;EAAG;AAAtC,mCAAmC;IAH/C,SAAS,CAAC;QACP,QAAQ,EAAE,yBAAyB;KACtC,CAAC;GACW,mCAAmC,CAAG;;;IC8CtC,0BAA0B,kCAAvC,MAAa,0BAA0B;IA4BnC,YACyC,UAAsB,EAElD,UAA0C;QAFd,eAAU,GAAV,UAAU,CAAY;QAElD,eAAU,GAAV,UAAU,CAAgC;QAnBvD,YAAO,GAAwE,EAAE,CAAC;QAIlF,YAAO,GAAG,IAAI,CAAC;QAIf,SAAI,GAAG,KAAK,CAAC;QAGJ,eAAU,GAAG,IAAI,YAAY,EAAW,CAAC;QAGzC,kBAAa,GAAG,IAAI,YAAY,EAAW,CAAC;KAMjD;IAEJ,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,YAAY;cAClB,IAAI,CAAC,YAAY,CAAC,aAAa;cAC/B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;KACvC;IAED,IAAI,QAAQ;QACR,OAAO,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,CAAC,cAAc,KAAK,IAAI;cAC1E,IAAI;cACJ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC,aAAa,CAAC;KACtE;IAED,IAAI,sBAAsB;QACtB,OAAO,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;cACrC,IAAI,CAAC,IAAI;cACT,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;KAC9E;IAGD,IAAI,OAAO;QACP,QACI,iBAAiB,CAAC,IAA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AC,0BAA0B,EAAE,mCAAmC,CAAC;KAC7E,CAAC;GACW,uBAAuB,CAAG;;ACpBvC;;;;;;"}
|
|
@@ -11,7 +11,7 @@ let TuiLabelComponent = class TuiLabelComponent {
|
|
|
11
11
|
constructor(mode$) {
|
|
12
12
|
this.mode$ = mode$;
|
|
13
13
|
// TODO: 3.0 Rename to tuiLabel
|
|
14
|
-
this.label =
|
|
14
|
+
this.label = ``;
|
|
15
15
|
this.context = {
|
|
16
16
|
$implicit: null,
|
|
17
17
|
};
|
|
@@ -30,16 +30,16 @@ __decorate([
|
|
|
30
30
|
], TuiLabelComponent.prototype, "context", void 0);
|
|
31
31
|
__decorate([
|
|
32
32
|
ContentChild(NgControl),
|
|
33
|
-
HostBinding(
|
|
33
|
+
HostBinding(`class._control`)
|
|
34
34
|
], TuiLabelComponent.prototype, "control", void 0);
|
|
35
35
|
TuiLabelComponent = __decorate([
|
|
36
36
|
Component({
|
|
37
|
-
selector:
|
|
37
|
+
selector: `label[tuiLabel]`,
|
|
38
38
|
template: "<span\n polymorpheus-outlet\n class=\"label\"\n [content]=\"label\"\n [context]=\"context\"\n>\n <ng-template let-text>\n <span class=\"text\">{{ text }}</span>\n </ng-template>\n</span>\n<span class=\"content\"><ng-content></ng-content></span>\n",
|
|
39
39
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40
40
|
providers: [MODE_PROVIDER],
|
|
41
41
|
host: {
|
|
42
|
-
'($.data-mode.attr)':
|
|
42
|
+
'($.data-mode.attr)': `mode$`,
|
|
43
43
|
},
|
|
44
44
|
styles: [":host{display:flex;min-height:2.75rem;justify-content:space-between;flex-direction:column;pointer-events:none}.label{font:var(--tui-font-text-s);max-width:100%;align-self:inherit;overflow:inherit;pointer-events:auto}.text{display:block;overflow:inherit;text-overflow:ellipsis}:host:not(._control) .text{color:var(--tui-text-02)}:host([data-mode=onDark]) .text{color:var(--tui-text-02-night)}.content{line-height:1.5rem;overflow:inherit;text-overflow:ellipsis;pointer-events:auto}"]
|
|
45
45
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-label.js","sources":["ng://@taiga-ui/core/components/label/label.component.ts","ng://@taiga-ui/core/components/label/label.module.ts","ng://@taiga-ui/core/components/label/taiga-ui-core-components-label.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiContextWithImplicit, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-label.js","sources":["ng://@taiga-ui/core/components/label/label.component.ts","ng://@taiga-ui/core/components/label/label.module.ts","ng://@taiga-ui/core/components/label/taiga-ui-core-components-label.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiContextWithImplicit, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `label[tuiLabel]`,\n templateUrl: `./label.template.html`,\n styleUrls: [`./label.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': `mode$`,\n },\n})\nexport class TuiLabelComponent<T> {\n // TODO: 3.0 Rename to tuiLabel\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n context: TuiContextWithImplicit<T | null> = {\n $implicit: null,\n };\n\n @ContentChild(NgControl)\n @HostBinding(`class._control`)\n readonly control?: NgControl;\n\n constructor(@Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>) {}\n}\n","import {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLabelComponent} from './label.component';\n\n@NgModule({\n imports: [PolymorpheusModule],\n declarations: [TuiLabelComponent],\n exports: [TuiLabelComponent],\n})\nexport class TuiLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IA0Ba,iBAAiB,GAA9B,MAAa,iBAAiB;IAgB1B,YAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;;QAZ9E,UAAK,GAAwB,EAAE,CAAC;QAIhC,YAAO,GAAqC;YACxC,SAAS,EAAE,IAAI;SAClB,CAAC;KAMgF;EACrF;;YADiD,UAAU,uBAA3C,MAAM,SAAC,QAAQ;;AAZ5B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;gDACe;AAIhC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;kDAGf;AAIF;IAFC,YAAY,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,gBAAgB,CAAC;kDACD;AAdpB,iBAAiB;IAV7B,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,2RAAoC;QAEpC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAiBe,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;GAhBpB,iBAAiB,CAiB7B;;ICjCY,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAL1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC/B,CAAC;GACW,cAAc,CAAG;;ACV9B;;;;;;"}
|
|
@@ -17,11 +17,11 @@ let TuiLinkComponent = TuiLinkComponent_1 = class TuiLinkComponent {
|
|
|
17
17
|
this.pseudo = false;
|
|
18
18
|
// TODO: 3.0 Remove `null`
|
|
19
19
|
this.icon = null;
|
|
20
|
-
this.iconAlign =
|
|
20
|
+
this.iconAlign = `right`;
|
|
21
21
|
this.iconRotated = false;
|
|
22
22
|
this.mode = null;
|
|
23
23
|
this.focusVisible = false;
|
|
24
|
-
this.focusedChange = merge(typedFromEvent(this.elementRef.nativeElement,
|
|
24
|
+
this.focusedChange = merge(typedFromEvent(this.elementRef.nativeElement, `focusin`).pipe(mapTo(true)), typedFromEvent(this.elementRef.nativeElement, `focusout`).pipe(mapTo(false)));
|
|
25
25
|
focusVisible$.subscribe(visible => {
|
|
26
26
|
this.focusVisible = visible;
|
|
27
27
|
});
|
|
@@ -36,10 +36,10 @@ let TuiLinkComponent = TuiLinkComponent_1 = class TuiLinkComponent {
|
|
|
36
36
|
return this.icon !== null;
|
|
37
37
|
}
|
|
38
38
|
get iconAlignLeft() {
|
|
39
|
-
return this.hasIcon && this.iconAlign ===
|
|
39
|
+
return this.hasIcon && this.iconAlign === `left`;
|
|
40
40
|
}
|
|
41
41
|
get iconAlignRight() {
|
|
42
|
-
return this.hasIcon && this.iconAlign ===
|
|
42
|
+
return this.hasIcon && this.iconAlign === `right`;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
TuiLinkComponent.ctorParameters = () => [
|
|
@@ -49,7 +49,7 @@ TuiLinkComponent.ctorParameters = () => [
|
|
|
49
49
|
];
|
|
50
50
|
__decorate([
|
|
51
51
|
Input(),
|
|
52
|
-
HostBinding(
|
|
52
|
+
HostBinding(`class._pseudo`),
|
|
53
53
|
tuiDefaultProp()
|
|
54
54
|
], TuiLinkComponent.prototype, "pseudo", void 0);
|
|
55
55
|
__decorate([
|
|
@@ -62,20 +62,20 @@ __decorate([
|
|
|
62
62
|
], TuiLinkComponent.prototype, "iconAlign", void 0);
|
|
63
63
|
__decorate([
|
|
64
64
|
Input(),
|
|
65
|
-
HostBinding(
|
|
65
|
+
HostBinding(`class._icon-rotated`),
|
|
66
66
|
tuiDefaultProp()
|
|
67
67
|
], TuiLinkComponent.prototype, "iconRotated", void 0);
|
|
68
68
|
__decorate([
|
|
69
69
|
Input(),
|
|
70
|
-
HostBinding(
|
|
70
|
+
HostBinding(`attr.data-host-mode`),
|
|
71
71
|
tuiDefaultProp()
|
|
72
72
|
], TuiLinkComponent.prototype, "mode", void 0);
|
|
73
73
|
__decorate([
|
|
74
|
-
HostBinding(
|
|
74
|
+
HostBinding(`class._focus-visible`)
|
|
75
75
|
], TuiLinkComponent.prototype, "focusVisible", void 0);
|
|
76
76
|
TuiLinkComponent = TuiLinkComponent_1 = __decorate([
|
|
77
77
|
Component({
|
|
78
|
-
selector:
|
|
78
|
+
selector: `a[tuiLink], button[tuiLink]`,
|
|
79
79
|
template: "<tui-svg\n *ngIf=\"iconAlignLeft\"\n class=\"t-icon t-icon_left\"\n [src]=\"icon || ''\"\n></tui-svg>\n<span class=\"t-content\">\n <ng-content></ng-content>\n</span>\n<tui-svg\n *ngIf=\"iconAlignRight\"\n class=\"t-icon t-icon_right\"\n [src]=\"icon || ''\"\n></tui-svg>\n",
|
|
80
80
|
providers: [
|
|
81
81
|
{
|
|
@@ -87,9 +87,9 @@ TuiLinkComponent = TuiLinkComponent_1 = __decorate([
|
|
|
87
87
|
MODE_PROVIDER,
|
|
88
88
|
],
|
|
89
89
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
90
|
-
exportAs:
|
|
90
|
+
exportAs: `tuiLink`,
|
|
91
91
|
host: {
|
|
92
|
-
'($.data-mode.attr)':
|
|
92
|
+
'($.data-mode.attr)': `mode$`,
|
|
93
93
|
},
|
|
94
94
|
styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;color:var(--tui-link);text-decoration:none;text-align:left;text-transform:inherit;font-weight:inherit;cursor:pointer;outline:0}:host:hover{color:var(--tui-link-hover)}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host[data-mode=onLight]{color:var(--tui-text-02)}:host[data-mode=onLight]._active,:host[data-mode=onLight]:hover{color:var(--tui-text-01)}:host[data-mode=onLight]._pseudo{color:var(--tui-text-01)}:host[data-mode=onLight]._pseudo .t-content{-webkit-text-decoration-color:rgba(0,0,0,.48);text-decoration-color:rgba(0,0,0,.48)}:host[data-mode=onLight]._pseudo._active,:host[data-mode=onLight]._pseudo:hover{color:var(--tui-text-03)}:host[data-mode=onLight][data-host-mode=negative]{color:var(--tui-negative-night)}:host[data-mode=onLight][data-host-mode=negative]._active,:host[data-mode=onLight][data-host-mode=negative]:active,:host[data-mode=onLight][data-host-mode=negative]:hover{color:var(--tui-negative-night-hover)}:host[data-mode=onDark]{color:var(--tui-text-03-night)}:host[data-mode=onDark]._active,:host[data-mode=onDark]:active,:host[data-mode=onDark]:hover{color:var(--tui-text-01-night)}:host[data-mode=onDark]._pseudo{color:var(--tui-text-01-night)}:host[data-mode=onDark]._pseudo .t-content{-webkit-text-decoration-color:rgba(255,255,255,.48);text-decoration-color:rgba(255,255,255,.48)}:host[data-mode=onDark]._pseudo._active,:host[data-mode=onDark]._pseudo:active,:host[data-mode=onDark]._pseudo:hover{color:var(--tui-text-03-night)}:host[data-mode=onDark][data-host-mode=positive]{color:var(--tui-positive-night)}:host[data-mode=onDark][data-host-mode=positive]._active,:host[data-mode=onDark][data-host-mode=positive]:active,:host[data-mode=onDark][data-host-mode=positive]:hover{color:var(--tui-positive-night-hover)}:host[data-host-mode=negative]{color:var(--tui-negative)}:host[data-host-mode=negative]:hover{color:var(--tui-negative-hover)}:host[data-host-mode=negative]._pseudo .t-content{-webkit-text-decoration-color:rgba(222,76,30,.48);text-decoration-color:rgba(222,76,30,.48)}:host[data-host-mode=positive]{color:var(--tui-positive)}:host[data-host-mode=positive]:hover{color:var(--tui-positive-hover)}:host[data-host-mode=positive]._pseudo .t-content{-webkit-text-decoration-color:rgba(58,169,129,.48);text-decoration-color:rgba(58,169,129,.48)}:host._focus-visible .t-content{background:var(--tui-selection)}:host[data-mode=onLight]._focus-visible .t-content{background:var(--tui-clear);color:var(--tui-text-01)}:host[data-mode=onDark]._focus-visible .t-content{background:var(--tui-clear-inverse);color:var(--tui-text-01-night)}:host[data-host-mode=positive]._focus-visible .t-content{background:var(--tui-success-bg)}:host[data-host-mode=negative]._focus-visible .t-content{background:var(--tui-error-bg)}:host._pseudo .t-content{padding-bottom:.15em;-webkit-text-decoration:underline dashed rgba(51,111,238,.48);text-decoration:underline dashed rgba(51,111,238,.48);text-underline-offset:.2em;text-decoration-thickness:.7px}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-top:-.125rem;opacity:.8}.t-icon_left{margin-right:.25rem}.t-icon_right{margin-left:.25rem}:host:hover .t-icon{opacity:1}:host._icon-rotated .t-icon{transform:rotate(180deg)}"]
|
|
95
95
|
}),
|