@taiga-ui/core 2.29.0 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/abstract-dropdown.d.ts +2 -1
- package/abstract/abstract-hint-options.d.ts +7 -0
- package/abstract/abstract-hint.d.ts +5 -4
- package/abstract/abstract-textfield-host.d.ts +13 -0
- package/abstract/index.d.ts +2 -0
- package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-core-abstract.umd.js +76 -4
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +1 -0
- 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-label.umd.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +2 -2
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +5 -2
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +226 -44
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js +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 +24 -14
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +2 -2
- 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-dropdown.umd.js +1 -6
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +2 -2
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +17 -12
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +2 -2
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +20 -6
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js +15 -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 +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +17 -6
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.js +4 -12
- package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.min.js +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +2 -1
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +3 -0
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js +2 -2
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +38 -6
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
- package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
- package/components/loader/loader.directive.d.ts +3 -0
- package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
- package/components/primitive-textfield/index.d.ts +3 -0
- package/components/primitive-textfield/primitive-textfield-options.d.ts +11 -0
- package/components/primitive-textfield/primitive-textfield.component.d.ts +18 -11
- package/components/primitive-textfield/primitive-textfield.directive.d.ts +8 -0
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/primitive-textfield/textfield/textfield.component.d.ts +15 -0
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +1 -0
- package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
- package/components/theme-night/taiga-ui-core-components-theme-night.metadata.json +1 -1
- package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
- package/components/tooltip/tooltip.component.d.ts +9 -6
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/dropdown/taiga-ui-core-directives-dropdown.metadata.json +1 -1
- package/directives/hint/hint-options.d.ts +12 -0
- package/directives/hint/hint.directive.d.ts +5 -3
- package/directives/hint/index.d.ts +1 -0
- package/directives/hint/taiga-ui-core-directives-hint.metadata.json +1 -1
- package/directives/hint-controller/hint-controller.directive.d.ts +7 -5
- package/directives/hint-controller/taiga-ui-core-directives-hint-controller.metadata.json +1 -1
- package/directives/index.d.ts +0 -1
- package/directives/manual-hint/index.d.ts +1 -0
- package/directives/manual-hint/manual-hint-options.d.ts +6 -0
- package/directives/manual-hint/manual-hint.directive.d.ts +3 -1
- package/directives/manual-hint/taiga-ui-core-directives-manual-hint.metadata.json +1 -1
- package/directives/pointer-hint/index.d.ts +1 -0
- package/directives/pointer-hint/pointer-hint-options.d.ts +9 -0
- package/directives/pointer-hint/pointer-hint.directive.d.ts +5 -3
- package/directives/pointer-hint/taiga-ui-core-directives-pointer-hint.metadata.json +1 -1
- package/directives/taiga-ui-core-directives.metadata.json +1 -1
- package/esm2015/abstract/abstract-dropdown.js +12 -1
- package/esm2015/abstract/abstract-hint-options.js +6 -0
- package/esm2015/abstract/abstract-hint.js +7 -5
- package/esm2015/abstract/abstract-textfield-host.js +34 -0
- package/esm2015/abstract/index.js +3 -1
- package/esm2015/components/dialog/dialog.component.js +1 -1
- package/esm2015/components/dropdown-box/dropdown-box.component.js +1 -1
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +2 -1
- package/esm2015/components/label/label.component.js +1 -1
- package/esm2015/components/link/link.component.js +3 -3
- package/esm2015/components/loader/loader.component.js +1 -1
- package/esm2015/components/loader/loader.directive.js +5 -2
- package/esm2015/components/primitive-textfield/index.js +4 -1
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +12 -0
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +66 -31
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +40 -0
- package/esm2015/components/primitive-textfield/primitive-textfield.module.js +15 -7
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +68 -0
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -5
- package/esm2015/components/scroll-controls/scroll-controls.component.js +1 -1
- package/esm2015/components/theme-night/theme-night.component.js +1 -1
- package/esm2015/components/tooltip/tooltip.component.js +17 -10
- package/esm2015/components/tooltip/tooltip.module.js +3 -2
- package/esm2015/constants/regexp.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/dropdown/dropdown.directive.js +2 -7
- package/esm2015/directives/hint/hint-options.js +10 -0
- package/esm2015/directives/hint/hint.directive.js +11 -7
- package/esm2015/directives/hint/index.js +2 -1
- package/esm2015/directives/hint-controller/hint-controller.directive.js +16 -10
- package/esm2015/directives/hint-controller/hint-controller.token.js +4 -3
- package/esm2015/directives/index.js +1 -2
- package/esm2015/directives/manual-hint/index.js +2 -1
- package/esm2015/directives/manual-hint/manual-hint-options.js +8 -0
- package/esm2015/directives/manual-hint/manual-hint.directive.js +9 -5
- package/esm2015/directives/pointer-hint/index.js +2 -1
- package/esm2015/directives/pointer-hint/pointer-hint-options.js +8 -0
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +11 -7
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/interfaces/textfield-host.js +1 -0
- package/esm2015/providers/mode.provider.js +3 -2
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/textfield-host.js +3 -0
- package/esm2015/utils/dom/process-icon.js +2 -2
- package/esm2015/utils/format/format-number.js +6 -7
- package/esm2015/utils/format/get-fractional-part-padded.js +15 -0
- package/esm2015/utils/format/index.js +3 -1
- package/esm2015/utils/format/number-to-string-without-exp.js +18 -0
- package/esm2015/utils/mask/create-number-mask.js +2 -2
- package/esm5/abstract/abstract-dropdown.js +12 -1
- package/esm5/abstract/abstract-hint-options.js +6 -0
- package/esm5/abstract/abstract-hint.js +7 -5
- package/esm5/abstract/abstract-textfield-host.js +55 -0
- package/esm5/abstract/index.js +3 -1
- package/esm5/components/dialog/dialog.component.js +1 -1
- package/esm5/components/dropdown-box/dropdown-box.component.js +1 -1
- package/esm5/components/hints-host/hint-box/hint-box.component.js +2 -1
- package/esm5/components/label/label.component.js +1 -1
- package/esm5/components/link/link.component.js +3 -3
- package/esm5/components/loader/loader.component.js +1 -1
- package/esm5/components/loader/loader.directive.js +5 -2
- package/esm5/components/primitive-textfield/index.js +4 -1
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +12 -0
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +70 -35
- package/esm5/components/primitive-textfield/primitive-textfield.directive.js +49 -0
- package/esm5/components/primitive-textfield/primitive-textfield.module.js +15 -7
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +77 -0
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +16 -5
- package/esm5/components/scroll-controls/scroll-controls.component.js +1 -1
- package/esm5/components/theme-night/theme-night.component.js +1 -1
- package/esm5/components/tooltip/tooltip.component.js +21 -10
- package/esm5/components/tooltip/tooltip.module.js +3 -2
- package/esm5/constants/regexp.js +2 -2
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/dropdown/dropdown.directive.js +2 -7
- package/esm5/directives/hint/hint-options.js +11 -0
- package/esm5/directives/hint/hint.directive.js +11 -7
- package/esm5/directives/hint/index.js +2 -1
- package/esm5/directives/hint-controller/hint-controller.directive.js +16 -10
- package/esm5/directives/hint-controller/hint-controller.token.js +4 -3
- package/esm5/directives/index.js +1 -2
- package/esm5/directives/manual-hint/index.js +2 -1
- package/esm5/directives/manual-hint/manual-hint-options.js +9 -0
- package/esm5/directives/manual-hint/manual-hint.directive.js +9 -5
- package/esm5/directives/pointer-hint/index.js +2 -1
- package/esm5/directives/pointer-hint/pointer-hint-options.js +9 -0
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +11 -7
- package/esm5/interfaces/index.js +1 -1
- package/esm5/interfaces/textfield-host.js +1 -0
- package/esm5/providers/mode.provider.js +3 -2
- package/esm5/tokens/index.js +2 -1
- package/esm5/tokens/textfield-host.js +3 -0
- package/esm5/utils/dom/process-icon.js +2 -2
- package/esm5/utils/format/format-number.js +6 -7
- package/esm5/utils/format/get-fractional-part-padded.js +16 -0
- package/esm5/utils/format/index.js +3 -1
- package/esm5/utils/format/number-to-string-without-exp.js +19 -0
- package/esm5/utils/mask/create-number-mask.js +2 -2
- package/fesm2015/taiga-ui-core-abstract.js +57 -8
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +1 -0
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +2 -2
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +5 -2
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +197 -42
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +18 -10
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +2 -2
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +1 -6
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +16 -10
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +20 -9
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js +16 -7
- package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +18 -9
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives.js +0 -1
- package/fesm2015/taiga-ui-core-directives.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +2 -1
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +3 -1
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +37 -7
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +78 -8
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +1 -0
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +1 -1
- package/fesm5/taiga-ui-core-components-link.js +2 -2
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +5 -2
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +223 -46
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm5/taiga-ui-core-components-theme-night.js +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +22 -10
- package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +2 -2
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown.js +1 -6
- package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +16 -10
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +21 -10
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js +17 -8
- package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +19 -10
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives.js +0 -1
- package/fesm5/taiga-ui-core-directives.js.map +1 -1
- package/fesm5/taiga-ui-core-providers.js +2 -1
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +3 -1
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +37 -7
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/interfaces/index.d.ts +1 -0
- package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
- package/interfaces/textfield-host.d.ts +9 -0
- package/package.json +7 -6
- package/providers/taiga-ui-core-providers.metadata.json +1 -1
- package/styles/markup/tui-island.less +1 -0
- package/styles/mixins/textfield.less +47 -27
- package/styles/mixins/textfield.scss +0 -9
- package/styles/taiga-ui-theme.less +1 -0
- package/styles/theme/dialog.less +13 -0
- package/styles/theme/variables.less +2 -0
- package/styles/variables/media.less +2 -2
- package/tokens/index.d.ts +1 -0
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
- package/tokens/textfield-host.d.ts +3 -0
- package/utils/format/get-fractional-part-padded.d.ts +8 -0
- package/utils/format/index.d.ts +2 -0
- package/utils/format/number-to-string-without-exp.d.ts +7 -0
- package/utils/format/taiga-ui-core-utils-format.metadata.json +1 -1
- package/bundles/taiga-ui-core-directives-border.umd.js +0 -291
- package/bundles/taiga-ui-core-directives-border.umd.js.map +0 -1
- package/bundles/taiga-ui-core-directives-border.umd.min.js +0 -16
- package/bundles/taiga-ui-core-directives-border.umd.min.js.map +0 -1
- package/directives/border/border.directive.d.ts +0 -9
- package/directives/border/border.module.d.ts +0 -2
- package/directives/border/index.d.ts +0 -2
- package/directives/border/package.json +0 -13
- package/directives/border/taiga-ui-core-directives-border.d.ts +0 -4
- package/directives/border/taiga-ui-core-directives-border.metadata.json +0 -1
- package/esm2015/directives/border/border.directive.js +0 -42
- package/esm2015/directives/border/border.module.js +0 -13
- package/esm2015/directives/border/index.js +0 -3
- package/esm2015/directives/border/taiga-ui-core-directives-border.js +0 -5
- package/esm5/directives/border/border.directive.js +0 -51
- package/esm5/directives/border/border.module.js +0 -16
- package/esm5/directives/border/index.js +0 -3
- package/esm5/directives/border/taiga-ui-core-directives-border.js +0 -5
- package/fesm2015/taiga-ui-core-directives-border.js +0 -57
- package/fesm2015/taiga-ui-core-directives-border.js.map +0 -1
- package/fesm5/taiga-ui-core-directives-border.js +0 -69
- package/fesm5/taiga-ui-core-directives-border.js.map +0 -1
|
@@ -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 {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATION_OPTIONS} from '@taiga-ui/core/tokens';\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: [tuiFadeIn],\n host: {\n 'aria-live': 'polite',\n },\n})\nexport class TuiHintsHostComponent {\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: TuiHintService,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n onHovered(hovered: boolean, directive: AbstractTuiHint) {\n if (directive instanceof TuiHintDirective) {\n directive.componentHovered$.next(hovered);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {px, TuiDestroyService, tuiPure, tuiZonefree} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\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};\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};\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})\nexport class TuiHintBoxComponent {\n @ViewChild('arrow')\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @Input()\n hint!: AbstractTuiHint;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\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(TuiHintsHostComponent)\n private readonly hintsHost: TuiHintsHostComponent,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\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 this.windowRef.innerWidth <= this.media.mobile;\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition() {\n if (this.mode !== 'overflow') {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates() {\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 'top-left',\n 'top-right',\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\n directions.splice(directions.indexOf(direction), 1);\n\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 }\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() {\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() {\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';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiHoveredModule} 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: [\n CommonModule,\n PolymorpheusModule,\n TuiHoveredModule,\n TuiHintBoxModule,\n TuiActiveZoneModule,\n ],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n entryComponents: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAkBa,qBAAqB,GAAlC,MAAa,qBAAqB;IAM9B,YACoD,OAAyB,EACpC,UAAmC,EACvC,MAAsB;QAFP,YAAO,GAAP,OAAO,CAAkB;QACpC,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgB;QARlD,cAAS,GAAG,gBACjB,KAAK,EAAE,EAAE,IACN,IAAI,CAAC,OAAO,CACT,CAAC;KAMP;IAEJ,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;KAChE;IAED,SAAS,CAAC,OAAgB,EAAE,SAA0B;QAClD,IAAI,SAAS,YAAY,gBAAgB,EAAE;YACvC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC7C;KACJ;EACJ;;4CAdQ,MAAM,SAAC,qBAAqB;YACoB,UAAU,uBAA1D,MAAM,SAAC,UAAU;YACuB,cAAc,uBAAtD,MAAM,SAAC,cAAc;;AATjB,qBAAqB;IAVjC,SAAS,CAAC;QACP,QAAQ,EAAE,gBAAgB;QAC1B,udAAyC;QAEzC,eAAe,EAAE,uBAAu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ACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,gBAAgB,CAAG;;ICUnB,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAZ9B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;SACtB;QACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;QAChC,eAAe,EAAE,CAAC,qBAAqB,CAAC;KAC3C,CAAC;GACW,kBAAkB,CAAG;;ACpBlC;;;;;;"}
|
|
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 {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATION_OPTIONS} from '@taiga-ui/core/tokens';\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: [tuiFadeIn],\n host: {\n 'aria-live': 'polite',\n },\n})\nexport class TuiHintsHostComponent {\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: TuiHintService,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n onHovered(hovered: boolean, directive: AbstractTuiHint) {\n if (directive instanceof TuiHintDirective) {\n directive.componentHovered$.next(hovered);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {px, TuiDestroyService, tuiPure, tuiZonefree} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\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};\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};\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})\nexport class TuiHintBoxComponent {\n @ViewChild('arrow')\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @Input()\n hint!: AbstractTuiHint;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\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(TuiHintsHostComponent)\n private readonly hintsHost: TuiHintsHostComponent,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\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 this.windowRef.innerWidth <= this.media.mobile;\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition() {\n if (this.mode !== 'overflow') {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates() {\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 'top-left',\n 'top-right',\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\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 }\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() {\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() {\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';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiHoveredModule} 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: [\n CommonModule,\n PolymorpheusModule,\n TuiHoveredModule,\n TuiHintBoxModule,\n TuiActiveZoneModule,\n ],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n entryComponents: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAkBa,qBAAqB,GAAlC,MAAa,qBAAqB;IAM9B,YACoD,OAAyB,EACpC,UAAmC,EACvC,MAAsB;QAFP,YAAO,GAAP,OAAO,CAAkB;QACpC,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgB;QARlD,cAAS,GAAG,gBACjB,KAAK,EAAE,EAAE,IACN,IAAI,CAAC,OAAO,CACT,CAAC;KAMP;IAEJ,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;KAChE;IAED,SAAS,CAAC,OAAgB,EAAE,SAA0B;QAClD,IAAI,SAAS,YAAY,gBAAgB,EAAE;YACvC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC7C;KACJ;EACJ;;4CAdQ,MAAM,SAAC,qBAAqB;YACoB,UAAU,uBAA1D,MAAM,SAAC,UAAU;YACuB,cAAc,uBAAtD,MAAM,SAAC,cAAc;;AATjB,qBAAqB;IAVjC,SAAS,CAAC;QACP,QAAQ,EAAE,gBAAgB;QAC1B,udAAyC;QAEzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,UAAU,EAAE,CAAC,SAAS,CAAC;QACvB,IAAI,EAAE;YACF,WAAW,EAAE,QAAQ;SAC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Aa,kBAAkB;EAAG;AAArB,kBAAkB;IAZ9B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;SACtB;QACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;QAChC,eAAe,EAAE,CAAC,qBAAqB,CAAC;KAC3C,CAAC;GACW,kBAAkB,CAAG;;ACpBlC;;;;;;"}
|
|
@@ -41,7 +41,7 @@ TuiLabelComponent = __decorate([
|
|
|
41
41
|
host: {
|
|
42
42
|
'($.data-mode.attr)': 'mode$',
|
|
43
43
|
},
|
|
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
|
|
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
|
}),
|
|
46
46
|
__param(0, Inject(TUI_MODE))
|
|
47
47
|
], TuiLabelComponent);
|
|
@@ -75,7 +75,7 @@ __decorate([
|
|
|
75
75
|
TuiLinkComponent = TuiLinkComponent_1 = __decorate([
|
|
76
76
|
Component({
|
|
77
77
|
selector: 'a[tuiLink], button[tuiLink]',
|
|
78
|
-
template: "<tui-svg
|
|
78
|
+
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",
|
|
79
79
|
providers: [
|
|
80
80
|
{
|
|
81
81
|
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
@@ -90,7 +90,7 @@ TuiLinkComponent = TuiLinkComponent_1 = __decorate([
|
|
|
90
90
|
host: {
|
|
91
91
|
'($.data-mode.attr)': 'mode$',
|
|
92
92
|
},
|
|
93
|
-
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._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._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=positive]{color:var(--tui-positive)}:host[data-host-mode=positive]:hover{color:var(--tui-positive-hover)}.content{display:inline-block}:host._focus-visible .content{background:var(--tui-selection)}:host[data-mode=onLight]._focus-visible .content{background:var(--tui-clear);color:var(--tui-text-01)}:host[data-mode=onDark]._focus-visible .content{background:var(--tui-clear-inverse);color:var(--tui-text-01-night)}:host[data-host-mode=positive]._focus-visible .content{background:var(--tui-success-bg)}:host[data-host-mode=negative]._focus-visible .content{background:var(--tui-error-bg)}:host._pseudo .content{padding-bottom:.15em;text-decoration:underline dashed;text-underline-offset:.2em;text-decoration-thickness:.7px}.icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-top:-.125rem;opacity:.8}.icon_left{margin-right:.25rem}.icon_right{margin-left:.25rem}:host._hovered .icon{opacity:1}:host._icon-rotated .icon{transform:rotate(180deg)}"]
|
|
93
|
+
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._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._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=positive]{color:var(--tui-positive)}:host[data-host-mode=positive]:hover{color:var(--tui-positive-hover)}.t-content{display:inline-block}: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;text-decoration:underline dashed;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._hovered .t-icon{opacity:1}:host._icon-rotated .t-icon{transform:rotate(180deg)}"]
|
|
94
94
|
}),
|
|
95
95
|
__param(0, Inject(ElementRef)),
|
|
96
96
|
__param(1, Inject(TUI_MODE)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-link.js","sources":["ng://@taiga-ui/core/components/link/link.component.ts","ng://@taiga-ui/core/components/link/link.module.ts","ng://@taiga-ui/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiNativeFocusableElement,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {merge, Observable} from 'rxjs';\nimport {mapTo} from 'rxjs/operators';\n\n// @bad TODO: Think about extending Interactive\n@Component({\n selector: 'a[tuiLink], button[tuiLink]',\n templateUrl: './link.template.html',\n styleUrls: ['./link.style.less'],\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiLinkComponent),\n },\n TuiFocusVisibleService,\n TuiDestroyService,\n MODE_PROVIDER,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'tuiLink',\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiLinkComponent implements TuiFocusableElementAccessor {\n @Input()\n @HostBinding('class._pseudo')\n @tuiDefaultProp()\n pseudo = false;\n\n @Input()\n @tuiDefaultProp()\n icon: string | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n @Input()\n @HostBinding('class._icon-rotated')\n @tuiDefaultProp()\n iconRotated = false;\n\n @Input()\n @HostBinding('attr.data-host-mode')\n @tuiDefaultProp()\n mode: 'positive' | 'negative' | null = null;\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n readonly focusedChange = merge(\n typedFromEvent(this.elementRef.nativeElement, 'focusin').pipe(mapTo(true)),\n typedFromEvent(this.elementRef.nativeElement, 'focusout').pipe(mapTo(false)),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<TuiNativeFocusableElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TuiFocusVisibleService)\n focusVisible$: TuiFocusVisibleService,\n ) {\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement {\n return this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get hasIcon(): boolean {\n return this.icon !== null;\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\n\nimport {TuiLinkComponent} from './link.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiLinkComponent],\n exports: [TuiLinkComponent],\n})\nexport class TuiLinkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAyBA;IAoBa,gBAAgB,wBAA7B,MAAa,gBAAgB;IAgCzB,YAEqB,UAAiD,EACvC,KAAuC,EAElE,aAAqC;QAHpB,eAAU,GAAV,UAAU,CAAuC;QACvC,UAAK,GAAL,KAAK,CAAkC;QA/BtE,WAAM,GAAG,KAAK,CAAC;QAIf,SAAI,GAAkB,IAAI,CAAC;QAI3B,cAAS,GAA2B,OAAO,CAAC;QAK5C,gBAAW,GAAG,KAAK,CAAC;QAKpB,SAAI,GAAmC,IAAI,CAAC;QAG5C,iBAAY,GAAG,KAAK,CAAC;QAEZ,kBAAa,GAAG,KAAK,CAC1B,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,aA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,gBAAgB;IAnB5B,SAAS,CAAC;QACP,QAAQ,EAAE,6BAA6B;QACvC,
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-link.js","sources":["ng://@taiga-ui/core/components/link/link.component.ts","ng://@taiga-ui/core/components/link/link.module.ts","ng://@taiga-ui/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiNativeFocusableElement,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {merge, Observable} from 'rxjs';\nimport {mapTo} from 'rxjs/operators';\n\n// @bad TODO: Think about extending Interactive\n@Component({\n selector: 'a[tuiLink], button[tuiLink]',\n templateUrl: './link.template.html',\n styleUrls: ['./link.style.less'],\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiLinkComponent),\n },\n TuiFocusVisibleService,\n TuiDestroyService,\n MODE_PROVIDER,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'tuiLink',\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiLinkComponent implements TuiFocusableElementAccessor {\n @Input()\n @HostBinding('class._pseudo')\n @tuiDefaultProp()\n pseudo = false;\n\n @Input()\n @tuiDefaultProp()\n icon: string | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n @Input()\n @HostBinding('class._icon-rotated')\n @tuiDefaultProp()\n iconRotated = false;\n\n @Input()\n @HostBinding('attr.data-host-mode')\n @tuiDefaultProp()\n mode: 'positive' | 'negative' | null = null;\n\n @HostBinding('class._focus-visible')\n focusVisible = false;\n\n readonly focusedChange = merge(\n typedFromEvent(this.elementRef.nativeElement, 'focusin').pipe(mapTo(true)),\n typedFromEvent(this.elementRef.nativeElement, 'focusout').pipe(mapTo(false)),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<TuiNativeFocusableElement>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TuiFocusVisibleService)\n focusVisible$: TuiFocusVisibleService,\n ) {\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement {\n return this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get hasIcon(): boolean {\n return this.icon !== null;\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\n\nimport {TuiLinkComponent} from './link.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiLinkComponent],\n exports: [TuiLinkComponent],\n})\nexport class TuiLinkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAyBA;IAoBa,gBAAgB,wBAA7B,MAAa,gBAAgB;IAgCzB,YAEqB,UAAiD,EACvC,KAAuC,EAElE,aAAqC;QAHpB,eAAU,GAAV,UAAU,CAAuC;QACvC,UAAK,GAAL,KAAK,CAAkC;QA/BtE,WAAM,GAAG,KAAK,CAAC;QAIf,SAAI,GAAkB,IAAI,CAAC;QAI3B,cAAS,GAA2B,OAAO,CAAC;QAK5C,gBAAW,GAAG,KAAK,CAAC;QAKpB,SA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;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,qBAAqB,CAAC;IAClC,cAAc,EAAE;8CAC2B;AAG5C;IADC,WAAW,CAAC,sBAAsB,CAAC;sDACf;AAzBZ,gBAAgB;IAnB5B,SAAS,CAAC;QACP,QAAQ,EAAE,6BAA6B;QACvC,sSAAmC;QAEnC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAgB,CAAC;aAClD;YACD,sBAAsB;YACtB,iBAAiB;YACjB,aAAa;SAChB;QACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE;YACF,oBAAoB,EAAE,OAAO;SAChC;;KACJ,CAAC;IAkCO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAElB,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;GApC1B,gBAAgB,CA+D5B;;ICjGY,aAAa,GAA1B,MAAa,aAAa;EAAG;AAAhB,aAAa;IALzB,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,gBAAgB,CAAC;QAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;KAC9B,CAAC;GACW,aAAa,CAAG;;ACX7B;;;;;;"}
|
|
@@ -81,7 +81,7 @@ TuiLoaderComponent = __decorate([
|
|
|
81
81
|
selector: 'tui-loader',
|
|
82
82
|
template: "<fieldset\n class=\"t-content\"\n [class.t-content_has-overlay]=\"hasOverlay\"\n [class.t-content_loading]=\"loading\"\n [disabled]=\"loading && !isApple\"\n>\n <ng-content></ng-content>\n</fieldset>\n\n<div\n *ngIf=\"loading\"\n class=\"t-loader\"\n [class.t-loader_horizontal]=\"isHorizontal\"\n [class.t-loader_inherit-color]=\"inheritColor\"\n [attr.data-tui-element-size]=\"size\"\n>\n <svg\n automation-id=\"tui-loader__loader\"\n focusable=\"false\"\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-icon\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"50\"\n stroke-dasharray=\"314\"\n class=\"t-circle\"\n ></circle>\n </svg>\n\n <div\n *ngIf=\"hasText\"\n polymorpheus-outlet\n automation-id=\"tui-loader__text\"\n class=\"t-text\"\n [class.t-text_horizontal]=\"isHorizontal\"\n [content]=\"textContent\"\n ></div>\n</div>\n",
|
|
83
83
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
84
|
-
styles: ["@-webkit-keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@-webkit-keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}@keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}:host{position:relative;display:flex}:host._loading{overflow:hidden}.t-content{z-index:0;min-width:100%;height:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:100%;flex-shrink:0
|
|
84
|
+
styles: ["@-webkit-keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@keyframes tuiLoaderDashOffset{0%,100%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}}@-webkit-keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}@keyframes tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}100%{transform:rotate(3turn)}}:host{position:relative;display:flex}:host._loading{overflow:hidden}.t-content{z-index:0;min-width:100%;height:100%;padding:0;margin:0;border:none}.t-content_has-overlay{opacity:.3}.t-content_loading{pointer-events:none}.t-loader{position:relative;left:-100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:100%;flex-shrink:0;align-self:center;color:var(--tui-text-01);stroke:var(--tui-primary);-webkit-animation:tuiFadeIn var(--tui-duration);animation:tuiFadeIn var(--tui-duration)}.t-loader.t-loader_horizontal{flex-direction:row}.t-loader.t-loader_inherit-color{color:inherit;stroke:currentColor}.t-loader[data-tui-element-size=xs]{font-size:.75rem;stroke-width:38}.t-loader[data-tui-element-size='s']{font-size:1rem;stroke-width:25}.t-loader[data-tui-element-size='m']{font-size:1.5rem;stroke-width:17}.t-loader[data-tui-element-size='l']{font-size:2.5rem;stroke-width:15}.t-loader[data-tui-element-size=xl]{font-size:3.5rem;stroke-width:14}.t-loader[data-tui-element-size=xxl]{font-size:5rem;stroke-width:10}.t-text{font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1rem;color:inherit;max-width:100%;text-align:center;stroke-width:0}.t-text_horizontal{margin:0 0 0 1rem}.t-icon{display:block;min-width:1em;max-width:1em;min-height:1em;max-height:1em;margin:.25rem -.5em;border-radius:100%;overflow:hidden;transform:scale(1,-1)}:host:not(._animated-with-js) .t-icon{-webkit-animation:3s linear infinite tuiLoaderRotate;animation:3s linear infinite tuiLoaderRotate}.t-circle{fill:none;stroke:inherit;stroke-width:inherit;-webkit-animation:3s linear infinite tuiLoaderDashOffset;animation:3s linear infinite tuiLoaderDashOffset}"]
|
|
85
85
|
}),
|
|
86
86
|
__param(0, Inject(DOCUMENT)),
|
|
87
87
|
__param(1, Inject(ElementRef)),
|
|
@@ -91,6 +91,9 @@ TuiLoaderComponent = __decorate([
|
|
|
91
91
|
|
|
92
92
|
const PERIMETER = 314;
|
|
93
93
|
const COEFFICIENT = 1.5;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated
|
|
96
|
+
*/
|
|
94
97
|
let TuiLoaderDirective = class TuiLoaderDirective {
|
|
95
98
|
constructor(animationFrame$, ngZone, destroy$, elementRef, userAgent) {
|
|
96
99
|
this.elementRef = elementRef;
|
|
@@ -114,7 +117,7 @@ let TuiLoaderDirective = class TuiLoaderDirective {
|
|
|
114
117
|
const fps = 1000 / delta;
|
|
115
118
|
const offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);
|
|
116
119
|
const { style } = this.elementRef.nativeElement;
|
|
117
|
-
style.strokeDashoffset = this.strokeDashoffset
|
|
120
|
+
style.strokeDashoffset = String(this.strokeDashoffset);
|
|
118
121
|
style.strokeDasharray = PERIMETER - strokeDasharray + ' ' + strokeDasharray;
|
|
119
122
|
this.strokeDasharray -= PERIMETER / COEFFICIENT / fps;
|
|
120
123
|
this.strokeDashoffset += (offsetStep * PERIMETER) / COEFFICIENT / fps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-loader.js","sources":["ng://@taiga-ui/core/components/loader/loader.component.ts","ng://@taiga-ui/core/components/loader/loader.directive.ts","ng://@taiga-ui/core/components/loader/loader.module.ts","ng://@taiga-ui/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n blurNativeFocused,\n isEdgeOlderThan,\n isIE,\n isNativeFocusedIn,\n isSafari,\n TUI_IS_IOS,\n tuiDefaultProp,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core/types';\nimport {sizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n// @dynamic\n@Component({\n selector: 'tui-loader',\n templateUrl: './loader.template.html',\n styleUrls: ['./loader.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiLoaderComponent {\n @Input()\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeXXL = 'm';\n\n @Input()\n @tuiDefaultProp()\n inheritColor = false;\n\n @Input()\n @tuiDefaultProp()\n overlay = false;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n textContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiRequiredSetter()\n set showLoader(value: boolean) {\n // @bad TODO: https://github.com/angular/angular/issues/32083 think of a better way\n if (value && this.focused) {\n blurNativeFocused(this.documentRef);\n }\n\n this.loading = value;\n }\n\n @HostBinding('class._loading')\n loading = true;\n\n @HostBinding('class._animated-with-js')\n animatedWithJs = isEdgeOlderThan(17, this.userAgent) || isIE(this.userAgent);\n\n readonly isApple = isSafari(this.elementRef.nativeElement) || this.isIos;\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n ) {}\n\n get hasOverlay(): boolean {\n return this.overlay && this.loading;\n }\n\n get hasText(): boolean {\n return !!this.textContent;\n }\n\n get isHorizontal(): boolean {\n return !sizeBigger(this.size);\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n}\n","import {Directive, ElementRef, Inject, NgZone} from '@angular/core';\nimport {ANIMATION_FRAME, USER_AGENT} from '@ng-web-apis/common';\nimport {isEdgeOlderThan, isIE, TuiDestroyService, tuiZonefree} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {pairwise, takeUntil} from 'rxjs/operators';\n\nconst PERIMETER = 314;\nconst COEFFICIENT = 1.5;\n\n@Directive({\n selector: 'circle',\n providers: [TuiDestroyService],\n})\nexport class TuiLoaderDirective {\n private strokeDasharray = PERIMETER;\n\n private strokeDashoffset = 0;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ElementRef) private readonly elementRef: ElementRef<SVGCircleElement>,\n @Inject(USER_AGENT) userAgent: string,\n ) {\n if (!isEdgeOlderThan(17, userAgent) && !isIE(userAgent)) {\n return;\n }\n\n animationFrame$\n .pipe(tuiZonefree(ngZone), pairwise(), takeUntil(destroy$))\n .subscribe(([cur, prev]) => {\n this.animate(prev - cur);\n });\n }\n\n private animate(delta: number) {\n if (this.strokeDasharray < 0) {\n this.strokeDasharray = PERIMETER * 2;\n this.strokeDashoffset = 0;\n }\n\n const strokeDasharray = Math.abs(this.strokeDasharray - PERIMETER);\n const fps = 1000 / delta;\n const offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);\n const {style} = this.elementRef.nativeElement;\n\n style.strokeDashoffset = this.strokeDashoffset
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-loader.js","sources":["ng://@taiga-ui/core/components/loader/loader.component.ts","ng://@taiga-ui/core/components/loader/loader.directive.ts","ng://@taiga-ui/core/components/loader/loader.module.ts","ng://@taiga-ui/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {\n blurNativeFocused,\n isEdgeOlderThan,\n isIE,\n isNativeFocusedIn,\n isSafari,\n TUI_IS_IOS,\n tuiDefaultProp,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core/types';\nimport {sizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n// @dynamic\n@Component({\n selector: 'tui-loader',\n templateUrl: './loader.template.html',\n styleUrls: ['./loader.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiLoaderComponent {\n @Input()\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeXXL = 'm';\n\n @Input()\n @tuiDefaultProp()\n inheritColor = false;\n\n @Input()\n @tuiDefaultProp()\n overlay = false;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n textContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiRequiredSetter()\n set showLoader(value: boolean) {\n // @bad TODO: https://github.com/angular/angular/issues/32083 think of a better way\n if (value && this.focused) {\n blurNativeFocused(this.documentRef);\n }\n\n this.loading = value;\n }\n\n @HostBinding('class._loading')\n loading = true;\n\n @HostBinding('class._animated-with-js')\n animatedWithJs = isEdgeOlderThan(17, this.userAgent) || isIE(this.userAgent);\n\n readonly isApple = isSafari(this.elementRef.nativeElement) || this.isIos;\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(USER_AGENT) private readonly userAgent: string,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n ) {}\n\n get hasOverlay(): boolean {\n return this.overlay && this.loading;\n }\n\n get hasText(): boolean {\n return !!this.textContent;\n }\n\n get isHorizontal(): boolean {\n return !sizeBigger(this.size);\n }\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n}\n","import {Directive, ElementRef, Inject, NgZone} from '@angular/core';\nimport {ANIMATION_FRAME, USER_AGENT} from '@ng-web-apis/common';\nimport {isEdgeOlderThan, isIE, TuiDestroyService, tuiZonefree} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {pairwise, takeUntil} from 'rxjs/operators';\n\nconst PERIMETER = 314;\nconst COEFFICIENT = 1.5;\n\n/**\n * @deprecated\n */\n@Directive({\n selector: 'circle',\n providers: [TuiDestroyService],\n})\nexport class TuiLoaderDirective {\n private strokeDasharray = PERIMETER;\n\n private strokeDashoffset = 0;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ElementRef) private readonly elementRef: ElementRef<SVGCircleElement>,\n @Inject(USER_AGENT) userAgent: string,\n ) {\n if (!isEdgeOlderThan(17, userAgent) && !isIE(userAgent)) {\n return;\n }\n\n animationFrame$\n .pipe(tuiZonefree(ngZone), pairwise(), takeUntil(destroy$))\n .subscribe(([cur, prev]) => {\n this.animate(prev - cur);\n });\n }\n\n private animate(delta: number) {\n if (this.strokeDasharray < 0) {\n this.strokeDasharray = PERIMETER * 2;\n this.strokeDashoffset = 0;\n }\n\n const strokeDasharray = Math.abs(this.strokeDasharray - PERIMETER);\n const fps = 1000 / delta;\n const offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);\n const {style} = this.elementRef.nativeElement;\n\n style.strokeDashoffset = String(this.strokeDashoffset);\n style.strokeDasharray = PERIMETER - strokeDasharray + ' ' + strokeDasharray;\n\n this.strokeDasharray -= PERIMETER / COEFFICIENT / fps;\n this.strokeDashoffset += (offsetStep * PERIMETER) / COEFFICIENT / fps;\n // this.elementRef.nativeElement.parentElement!.style.animation = 'none';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLoaderComponent} from './loader.component';\nimport {TuiLoaderDirective} from './loader.directive';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule],\n declarations: [TuiLoaderComponent, TuiLoaderDirective],\n exports: [TuiLoaderComponent],\n})\nexport class TuiLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAwBA;IAOa,kBAAkB,GAA/B,MAAa,kBAAkB;IAqC3B,YACuC,WAAqB,EACnB,UAAmC,EACnC,SAAiB,EACjB,KAAc;QAHhB,gBAAW,GAAX,WAAW,CAAU;QACnB,eAAU,G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