@taiga-ui/core 2.45.0 → 2.48.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 +50 -20
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js +1 -15
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +51 -21
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +50 -20
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +50 -20
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +58 -29
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +51 -21
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +74 -27
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +50 -20
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +52 -22
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +50 -20
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +88 -46
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +50 -20
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +51 -21
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +52 -22
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +60 -95
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +50 -20
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +56 -30
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +50 -20
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -15
- 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 +50 -20
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js +1 -15
- 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 +64 -30
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -15
- 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 +50 -20
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +51 -21
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +50 -20
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +52 -22
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +50 -20
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +50 -20
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +50 -20
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +1 -1
- 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 +50 -20
- package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js +51 -21
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +52 -22
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +52 -22
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js +50 -20
- 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 -15
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +51 -21
- 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 -15
- 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 +50 -20
- 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 +1 -15
- 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 +50 -22
- package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +52 -22
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +53 -22
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js +2 -2
- 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 +50 -20
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js +1 -15
- 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 +50 -20
- 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 +1 -15
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +54 -23
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +7 -9
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +51 -21
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js +1 -15
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +63 -27
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js +1 -15
- 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.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +51 -21
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -15
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +50 -20
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -15
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- 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.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
- package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/dropdown-box/dropdown-box.component.d.ts +1 -0
- package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
- package/components/hints-host/hint-box/hint-box.component.d.ts +13 -2
- package/components/hints-host/hints-host.component.d.ts +4 -10
- package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
- package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
- package/components/loader/index.d.ts +0 -1
- package/components/loader/loader.component.d.ts +1 -3
- package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
- package/components/primitive-textfield/primitive-textfield.component.d.ts +1 -1
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +4 -2
- package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
- package/components/scrollbar/scrollbar.component.d.ts +2 -2
- package/components/scrollbar/taiga-ui-core-components-scrollbar.metadata.json +1 -1
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/table-mode/table-mode.directive.d.ts +0 -1
- package/directives/table-mode/taiga-ui-core-directives-table-mode.metadata.json +1 -1
- package/directives/wrapper/taiga-ui-core-directives-wrapper.metadata.json +1 -1
- package/esm2015/components/alert/alert.component.js +2 -2
- package/esm2015/components/button/button-options.js +1 -1
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +4 -5
- package/esm2015/components/data-list/data-list.component.js +3 -3
- package/esm2015/components/data-list/option/option.component.js +4 -4
- package/esm2015/components/dialog/dialog.component.js +1 -1
- package/esm2015/components/dropdown-box/dropdown-box.component.js +22 -9
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +2 -2
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +27 -14
- package/esm2015/components/hints-host/hint-box/hint-box.module.js +4 -2
- package/esm2015/components/hints-host/hints-host.component.js +11 -13
- package/esm2015/components/hints-host/hints-host.module.js +1 -2
- package/esm2015/components/label/label.component.js +2 -2
- package/esm2015/components/link/link.component.js +3 -3
- package/esm2015/components/loader/index.js +1 -2
- package/esm2015/components/loader/loader.component.js +7 -15
- package/esm2015/components/loader/loader.module.js +2 -3
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +7 -11
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +2 -2
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +5 -5
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +11 -6
- package/esm2015/components/root/root.component.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +3 -3
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm2015/directives/hint/hint-options.js +2 -2
- package/esm2015/directives/hint/hint.directive.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.directive.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +2 -2
- package/esm2015/directives/table-mode/table-mode.directive.js +1 -3
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
- package/esm2015/directives/wrapper/wrapper.directive.js +4 -3
- package/esm2015/enums/interactive-state.js +3 -3
- package/esm2015/interfaces/notification-options.js +1 -1
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +3 -2
- package/esm2015/pipes/calendar-sheet/utils.js +3 -3
- package/esm2015/providers/is-mobile-resolution.provider.js +5 -10
- package/esm2015/services/hint.service.js +2 -2
- package/esm2015/tokens/is-mobile-resolution.js +13 -3
- package/esm2015/tokens/ordered-short-week-days.js +2 -2
- package/esm2015/types/pluralize.js +1 -1
- package/esm2015/utils/dom/are-css-vars-supported.js +2 -2
- package/esm2015/utils/format/pluralize-to-icu.js +2 -2
- package/esm2015/utils/miscellaneous/index.js +2 -2
- package/esm2015/utils/miscellaneous/is-presumed-html-string.js +5 -0
- package/esm2015/utils/polyfills/index.js +2 -2
- package/esm2015/utils/polyfills/{inner-HTML.js → inner-html.js} +1 -1
- package/esm5/components/alert/alert.component.js +2 -2
- package/esm5/components/button/button-options.js +1 -1
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +4 -5
- package/esm5/components/data-list/data-list.component.js +3 -3
- package/esm5/components/data-list/option/option.component.js +4 -4
- package/esm5/components/dialog/dialog.component.js +1 -1
- package/esm5/components/dropdown-box/dropdown-box.component.js +26 -9
- package/esm5/components/expand/expand-content.directive.js +2 -2
- package/esm5/components/expand/expand.component.js +2 -2
- package/esm5/components/hints-host/hint-box/hint-box.component.js +32 -15
- package/esm5/components/hints-host/hint-box/hint-box.module.js +4 -2
- package/esm5/components/hints-host/hints-host.component.js +12 -14
- package/esm5/components/hints-host/hints-host.module.js +1 -2
- package/esm5/components/label/label.component.js +2 -2
- package/esm5/components/link/link.component.js +3 -3
- package/esm5/components/loader/index.js +1 -2
- package/esm5/components/loader/loader.component.js +7 -15
- package/esm5/components/loader/loader.module.js +2 -3
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +7 -11
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +2 -2
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +5 -5
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +11 -6
- package/esm5/components/root/root.component.js +2 -2
- package/esm5/components/scrollbar/scrollbar.component.js +3 -3
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm5/directives/hint/hint-options.js +2 -2
- package/esm5/directives/hint/hint.directive.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.directive.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +2 -2
- package/esm5/directives/table-mode/table-mode.directive.js +1 -3
- package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
- package/esm5/directives/wrapper/wrapper.directive.js +4 -3
- package/esm5/enums/interactive-state.js +3 -3
- package/esm5/interfaces/notification-options.js +1 -1
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +3 -2
- package/esm5/pipes/calendar-sheet/utils.js +3 -3
- package/esm5/providers/is-mobile-resolution.provider.js +6 -12
- package/esm5/services/hint.service.js +2 -2
- package/esm5/tokens/is-mobile-resolution.js +13 -3
- package/esm5/tokens/ordered-short-week-days.js +2 -2
- package/esm5/types/pluralize.js +1 -1
- package/esm5/utils/dom/are-css-vars-supported.js +2 -2
- package/esm5/utils/format/pluralize-to-icu.js +2 -2
- package/esm5/utils/miscellaneous/index.js +2 -2
- package/esm5/utils/miscellaneous/is-presumed-html-string.js +5 -0
- package/esm5/utils/polyfills/index.js +2 -2
- package/esm5/utils/polyfills/{inner-HTML.js → inner-html.js} +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +8 -9
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +21 -8
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +2 -2
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +34 -26
- 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-label.js.map +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 +9 -73
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +6 -10
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +16 -12
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +2 -2
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +2 -2
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +2 -2
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-table-mode.js +0 -2
- package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +2 -2
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +3 -2
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-enums.js +2 -2
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +4 -3
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +7 -9
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +1 -1
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +13 -6
- 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 +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +1 -1
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +8 -9
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +25 -8
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +2 -2
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +39 -27
- 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-label.js.map +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 +10 -77
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +6 -10
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +16 -12
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +1 -1
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scrollbar.js +2 -2
- package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +1 -1
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +2 -2
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +2 -2
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-table-mode.js +0 -2
- package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-textfield-controller.js +2 -2
- package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-wrapper.js +3 -2
- package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-core-enums.js +2 -2
- package/fesm5/taiga-ui-core-enums.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +4 -3
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-providers.js +8 -11
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js +1 -1
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +13 -6
- 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 +1 -1
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/interfaces/notification-options.d.ts +3 -3
- package/package.json +4 -4
- package/providers/is-mobile-resolution.provider.d.ts +2 -3
- package/providers/taiga-ui-core-providers.metadata.json +1 -1
- package/services/hint.service.d.ts +1 -1
- package/styles/basic/main.less +0 -1
- package/styles/markup/tui-palette.less +1 -1
- package/styles/mixins/mixins.less +3 -9
- package/styles/taiga-ui-global-old.less +0 -1
- package/styles/taiga-ui-global.less +0 -1
- package/styles/theme/variables.less +1 -1
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
- package/utils/dom/are-css-vars-supported.d.ts +1 -1
- package/utils/miscellaneous/index.d.ts +1 -1
- package/utils/miscellaneous/{is-presumed-hTMLString.d.ts → is-presumed-html-string.d.ts} +0 -0
- package/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.metadata.json +1 -1
- package/utils/polyfills/index.d.ts +1 -1
- package/utils/polyfills/{inner-HTML.d.ts → inner-html.d.ts} +0 -0
- package/utils/polyfills/taiga-ui-core-utils-polyfills.metadata.json +1 -1
- package/components/loader/loader.directive.d.ts +0 -12
- package/esm2015/components/loader/loader.directive.js +0 -61
- package/esm2015/utils/miscellaneous/is-presumed-hTMLString.js +0 -5
- package/esm5/components/loader/loader.directive.js +0 -64
- package/esm5/utils/miscellaneous/is-presumed-hTMLString.js +0 -5
- package/styles/markup/tui-autofill.less +0 -19
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
|
-
import { InjectionToken, Inject, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy,
|
|
4
|
-
import {
|
|
5
|
-
import { isEdgeOlderThan, isIE, isSafari, blurNativeFocused, isNativeFocusedIn, TUI_IS_IOS, tuiDefaultProp, tuiRequiredSetter, tuiZonefree, TuiDestroyService } from '@taiga-ui/cdk';
|
|
3
|
+
import { InjectionToken, Inject, ElementRef, Input, HostBinding, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
4
|
+
import { isSafari, blurNativeFocused, isNativeFocusedIn, TUI_IS_IOS, tuiDefaultProp, tuiRequiredSetter } from '@taiga-ui/cdk';
|
|
6
5
|
import { sizeBigger } from '@taiga-ui/core/utils/miscellaneous';
|
|
7
|
-
import { Observable } from 'rxjs';
|
|
8
|
-
import { pairwise, takeUntil } from 'rxjs/operators';
|
|
9
6
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
10
7
|
|
|
11
8
|
/** Default values for the loader options. */
|
|
@@ -24,19 +21,17 @@ const tuiLoaderOptionsProvider = (options) => ({
|
|
|
24
21
|
|
|
25
22
|
// @dynamic
|
|
26
23
|
let TuiLoaderComponent = class TuiLoaderComponent {
|
|
27
|
-
constructor(documentRef, elementRef,
|
|
24
|
+
constructor(documentRef, elementRef, isIos, options) {
|
|
28
25
|
this.documentRef = documentRef;
|
|
29
26
|
this.elementRef = elementRef;
|
|
30
|
-
this.userAgent = userAgent;
|
|
31
27
|
this.isIos = isIos;
|
|
32
28
|
this.options = options;
|
|
33
29
|
this.size = this.options.size;
|
|
34
30
|
this.inheritColor = this.options.inheritColor;
|
|
35
31
|
this.overlay = this.options.overlay;
|
|
36
|
-
// TODO: Remove null
|
|
32
|
+
// TODO: 3.0 Remove null
|
|
37
33
|
this.textContent = null;
|
|
38
34
|
this.loading = true;
|
|
39
|
-
this.animatedWithJs = isEdgeOlderThan(17, this.userAgent) || isIE(this.userAgent);
|
|
40
35
|
this.isApple = isSafari(this.elementRef.nativeElement) || this.isIos;
|
|
41
36
|
}
|
|
42
37
|
set showLoader(value) {
|
|
@@ -62,7 +57,6 @@ let TuiLoaderComponent = class TuiLoaderComponent {
|
|
|
62
57
|
TuiLoaderComponent.ctorParameters = () => [
|
|
63
58
|
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
64
59
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
65
|
-
{ type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] },
|
|
66
60
|
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
|
|
67
61
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_LOADER_OPTIONS,] }] }
|
|
68
62
|
];
|
|
@@ -89,83 +83,25 @@ __decorate([
|
|
|
89
83
|
__decorate([
|
|
90
84
|
HostBinding('class._loading')
|
|
91
85
|
], TuiLoaderComponent.prototype, "loading", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
HostBinding('class._animated-with-js')
|
|
94
|
-
], TuiLoaderComponent.prototype, "animatedWithJs", void 0);
|
|
95
86
|
TuiLoaderComponent = __decorate([
|
|
96
87
|
Component({
|
|
97
88
|
selector: 'tui-loader',
|
|
98
89
|
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",
|
|
99
90
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
100
|
-
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)
|
|
91
|
+
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);-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}"]
|
|
101
92
|
}),
|
|
102
93
|
__param(0, Inject(DOCUMENT)),
|
|
103
94
|
__param(1, Inject(ElementRef)),
|
|
104
|
-
__param(2, Inject(
|
|
105
|
-
__param(3, Inject(
|
|
106
|
-
__param(4, Inject(TUI_LOADER_OPTIONS))
|
|
95
|
+
__param(2, Inject(TUI_IS_IOS)),
|
|
96
|
+
__param(3, Inject(TUI_LOADER_OPTIONS))
|
|
107
97
|
], TuiLoaderComponent);
|
|
108
98
|
|
|
109
|
-
const PERIMETER = 314;
|
|
110
|
-
const COEFFICIENT = 1.5;
|
|
111
|
-
/**
|
|
112
|
-
* @deprecated
|
|
113
|
-
*/
|
|
114
|
-
let TuiLoaderDirective = class TuiLoaderDirective {
|
|
115
|
-
constructor(animationFrame$, ngZone, destroy$, elementRef, userAgent) {
|
|
116
|
-
this.elementRef = elementRef;
|
|
117
|
-
this.strokeDasharray = PERIMETER;
|
|
118
|
-
this.strokeDashoffset = 0;
|
|
119
|
-
if (!isEdgeOlderThan(17, userAgent) && !isIE(userAgent)) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
animationFrame$
|
|
123
|
-
.pipe(tuiZonefree(ngZone), pairwise(), takeUntil(destroy$))
|
|
124
|
-
.subscribe(([cur, prev]) => {
|
|
125
|
-
this.animate(prev - cur);
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
animate(delta) {
|
|
129
|
-
if (this.strokeDasharray < 0) {
|
|
130
|
-
this.strokeDasharray = PERIMETER * 2;
|
|
131
|
-
this.strokeDashoffset = 0;
|
|
132
|
-
}
|
|
133
|
-
const strokeDasharray = Math.abs(this.strokeDasharray - PERIMETER);
|
|
134
|
-
const fps = 1000 / delta;
|
|
135
|
-
const offsetStep = 1 + Math.floor(this.strokeDasharray / PERIMETER);
|
|
136
|
-
const { style } = this.elementRef.nativeElement;
|
|
137
|
-
style.strokeDashoffset = String(this.strokeDashoffset);
|
|
138
|
-
style.strokeDasharray = `${PERIMETER - strokeDasharray} ${strokeDasharray}`;
|
|
139
|
-
this.strokeDasharray -= PERIMETER / COEFFICIENT / fps;
|
|
140
|
-
this.strokeDashoffset += (offsetStep * PERIMETER) / COEFFICIENT / fps;
|
|
141
|
-
// this.elementRef.nativeElement.parentElement!.style.animation = 'none';
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
TuiLoaderDirective.ctorParameters = () => [
|
|
145
|
-
{ type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
|
|
146
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
147
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
148
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
149
|
-
{ type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
|
|
150
|
-
];
|
|
151
|
-
TuiLoaderDirective = __decorate([
|
|
152
|
-
Directive({
|
|
153
|
-
selector: 'circle',
|
|
154
|
-
providers: [TuiDestroyService],
|
|
155
|
-
}),
|
|
156
|
-
__param(0, Inject(ANIMATION_FRAME)),
|
|
157
|
-
__param(1, Inject(NgZone)),
|
|
158
|
-
__param(2, Inject(TuiDestroyService)),
|
|
159
|
-
__param(3, Inject(ElementRef)),
|
|
160
|
-
__param(4, Inject(USER_AGENT))
|
|
161
|
-
], TuiLoaderDirective);
|
|
162
|
-
|
|
163
99
|
let TuiLoaderModule = class TuiLoaderModule {
|
|
164
100
|
};
|
|
165
101
|
TuiLoaderModule = __decorate([
|
|
166
102
|
NgModule({
|
|
167
103
|
imports: [CommonModule, PolymorpheusModule],
|
|
168
|
-
declarations: [TuiLoaderComponent
|
|
104
|
+
declarations: [TuiLoaderComponent],
|
|
169
105
|
exports: [TuiLoaderComponent],
|
|
170
106
|
})
|
|
171
107
|
], TuiLoaderModule);
|
|
@@ -174,5 +110,5 @@ TuiLoaderModule = __decorate([
|
|
|
174
110
|
* Generated bundle index. Do not edit.
|
|
175
111
|
*/
|
|
176
112
|
|
|
177
|
-
export { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent,
|
|
113
|
+
export { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderModule, tuiLoaderOptionsProvider };
|
|
178
114
|
//# sourceMappingURL=taiga-ui-core-components-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-loader.js","sources":["ng://@taiga-ui/core/components/loader/loader-options.ts","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 {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core/types';\n\nexport interface TuiLoaderOptions {\n readonly size: TuiSizeXS | TuiSizeXXL;\n readonly inheritColor: boolean;\n readonly overlay: boolean;\n}\n\n/** Default values for the loader options. */\nexport const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions = {\n size: 'm',\n inheritColor: false,\n overlay: false,\n};\n\nexport const TUI_LOADER_OPTIONS = new InjectionToken<TuiLoaderOptions>(\n 'Default parameters for loader component',\n {\n factory: () => TUI_LOADER_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiLoaderOptionsProvider: (\n options: Partial<TuiLoaderOptions>,\n) => ValueProvider = (options: Partial<TuiLoaderOptions>) => ({\n provide: TUI_LOADER_OPTIONS,\n useValue: {...TUI_LOADER_DEFAULT_OPTIONS, ...options},\n});\n","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 {sizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_LOADER_OPTIONS, TuiLoaderOptions} from './loader-options';\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 = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n inheritColor = this.options.inheritColor;\n\n @Input()\n @tuiDefaultProp()\n overlay = this.options.overlay;\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 @Inject(TUI_LOADER_OPTIONS) private readonly options: TuiLoaderOptions,\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): void {\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":";;;;;;;;;;AASA;MACa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,KAAK;EAChB;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;ACHD;IAOa,kBAAkB,GAA/B,MAAa,kBAAkB;IAqC3B,YACuC,WAAqB,EACnB,UAAmC,EACnC,SAAiB,EACjB,KAAc,EACN,OAAyB;QAJnC,gBAAW,GAAX,WAAW,CAAU;QACnB,eAAU,GAAV,UAAU,CAAyB;QACnC,cAAS,GAAT,SAAS,CAAQ;QACjB,UAAK,GAAL,KAAK,CAAS;QACN,YAAO,GAAP,OAAO,CAAkB;QAvC1E,SAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAIzB,iBAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;QAIzC,YAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;;QAK/B,gBAAW,GAA+B,IAAI,CAAC;QAc/C,YAAO,GAAG,IAAI,CAAC;QAGf,mBAAc,GAAG,eAAe,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEpE,YAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;KAQrE;IAvBJ,IAAI,UAAU,CAAC,KAAc;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ng://@taiga-ui/core/components/loader/loader.component.ts","ng://@taiga-ui/core/components/loader/loader.module.ts","ng://@taiga-ui/core/components/loader/taiga-ui-core-components-loader.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core/types';\n\nexport interface TuiLoaderOptions {\n readonly size: TuiSizeXS | TuiSizeXXL;\n readonly inheritColor: boolean;\n readonly overlay: boolean;\n}\n\n/** Default values for the loader options. */\nexport const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions = {\n size: 'm',\n inheritColor: false,\n overlay: false,\n};\n\nexport const TUI_LOADER_OPTIONS = new InjectionToken<TuiLoaderOptions>(\n 'Default parameters for loader component',\n {\n factory: () => TUI_LOADER_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiLoaderOptionsProvider: (\n options: Partial<TuiLoaderOptions>,\n) => ValueProvider = (options: Partial<TuiLoaderOptions>) => ({\n provide: TUI_LOADER_OPTIONS,\n useValue: {...TUI_LOADER_DEFAULT_OPTIONS, ...options},\n});\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n blurNativeFocused,\n isNativeFocusedIn,\n isSafari,\n TUI_IS_IOS,\n tuiDefaultProp,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {sizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_LOADER_OPTIONS, TuiLoaderOptions} from './loader-options';\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 = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n inheritColor = this.options.inheritColor;\n\n @Input()\n @tuiDefaultProp()\n overlay = this.options.overlay;\n\n // TODO: 3.0 Remove null\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 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(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_LOADER_OPTIONS) private readonly options: TuiLoaderOptions,\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 {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiLoaderComponent} from './loader.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule],\n declarations: [TuiLoaderComponent],\n exports: [TuiLoaderComponent],\n})\nexport class TuiLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AASA;MACa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,KAAK;EAChB;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM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,MAAM,SAAC,kBAAkB;;AAnC9B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;gDACQ;AAIzB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;wDACwB;AAIzC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mDACc;AAK/B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;uDAC8B;AAI/C;IAFC,KAAK,EAAE;IACP,iBAAiB,EAAE;oDAQnB;AAGD;IADC,WAAW,CAAC,gBAAgB,CAAC;mDACf;AA9BN,kBAAkB;IAN9B,SAAS,CAAC;QACP,QAAQ,EAAE,YAAY;QACtB,siCAAqC;QAErC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;IAoCO,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;GAtCtB,kBAAkB,CAwD9B;;IC1EY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAL3B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;QAC3C,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;ACX/B;;;;;;"}
|
|
@@ -39,10 +39,10 @@ let TuiPrimitiveCalendarComponent = class TuiPrimitiveCalendarComponent {
|
|
|
39
39
|
if (disabledItemHandler(item)) {
|
|
40
40
|
return "disabled" /* Disabled */;
|
|
41
41
|
}
|
|
42
|
-
if (pressedItem
|
|
42
|
+
if (pressedItem === null || pressedItem === void 0 ? void 0 : pressedItem.daySame(item)) {
|
|
43
43
|
return "pressed" /* Pressed */;
|
|
44
44
|
}
|
|
45
|
-
if (hoveredItem
|
|
45
|
+
if (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.daySame(item)) {
|
|
46
46
|
return "hovered" /* Hovered */;
|
|
47
47
|
}
|
|
48
48
|
return null;
|
|
@@ -56,23 +56,19 @@ let TuiPrimitiveCalendarComponent = class TuiPrimitiveCalendarComponent {
|
|
|
56
56
|
return value.daySame(item) ? "single" /* Single */ : null;
|
|
57
57
|
}
|
|
58
58
|
if ((value.from.daySame(item) && !value.isSingleDay) ||
|
|
59
|
-
(hoveredItem &&
|
|
60
|
-
hoveredItem.dayAfter(value.from) &&
|
|
59
|
+
((hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.dayAfter(value.from)) &&
|
|
61
60
|
value.from.daySame(item) &&
|
|
62
61
|
value.isSingleDay) ||
|
|
63
|
-
(hoveredItem &&
|
|
64
|
-
hoveredItem.daySame(item) &&
|
|
62
|
+
((hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.daySame(item)) &&
|
|
65
63
|
hoveredItem.dayBefore(value.from) &&
|
|
66
64
|
value.isSingleDay)) {
|
|
67
65
|
return "start" /* Start */;
|
|
68
66
|
}
|
|
69
67
|
if ((value.to.daySame(item) && !value.isSingleDay) ||
|
|
70
|
-
(hoveredItem &&
|
|
71
|
-
hoveredItem.dayBefore(value.from) &&
|
|
68
|
+
((hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.dayBefore(value.from)) &&
|
|
72
69
|
value.from.daySame(item) &&
|
|
73
70
|
value.isSingleDay) ||
|
|
74
|
-
(hoveredItem &&
|
|
75
|
-
hoveredItem.daySame(item) &&
|
|
71
|
+
((hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.daySame(item)) &&
|
|
76
72
|
hoveredItem.dayAfter(value.from) &&
|
|
77
73
|
value.isSingleDay)) {
|
|
78
74
|
return "end" /* End */;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-primitive-calendar.js","sources":["ng://@taiga-ui/core/components/primitive-calendar/primitive-calendar.component.ts","ng://@taiga-ui/core/components/primitive-calendar/primitive-calendar.module.ts","ng://@taiga-ui/core/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n nullableSame,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n tuiDefaultProp,\n TuiMonth,\n} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_MARKER_HANDLER} from '@taiga-ui/core/constants';\nimport {TuiInteractiveState, TuiRangeState} from '@taiga-ui/core/enums';\nimport {TUI_ORDERED_SHORT_WEEK_DAYS, WEEK_DAYS_NAMES} from '@taiga-ui/core/tokens';\nimport {TuiColor, TuiMarkerHandler} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n// @dynamic\n@Component({\n selector: 'tui-primitive-calendar',\n templateUrl: './primitive-calendar.template.html',\n styleUrls: ['./primitive-calendar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPrimitiveCalendarComponent {\n private pressedItem: TuiDay | null = null;\n private readonly today = TuiDay.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n month: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n value: TuiDayRange | TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n hoveredItem: TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n showAdjacent = true;\n\n @Output()\n readonly hoveredItemChange = new EventEmitter<TuiDay | null>();\n\n @Output()\n readonly dayClick = new EventEmitter<TuiDay>();\n\n constructor(\n @Inject(TUI_ORDERED_SHORT_WEEK_DAYS)\n readonly weekDays$: Observable<WEEK_DAYS_NAMES>,\n ) {}\n\n @HostBinding('class._single')\n get isSingle(): boolean {\n return (\n this.value !== null &&\n (this.value instanceof TuiDay || this.value.isSingleDay)\n );\n }\n\n readonly toMarkers = (\n day: TuiDay,\n today: boolean,\n inRange: boolean,\n ): null | [TuiColor | string] | [TuiColor | string, TuiColor | string] => {\n if (today || inRange) {\n return null;\n }\n\n const markers = this.markerHandler(day);\n\n return markers.length === 0 ? null : markers;\n };\n\n getItemState(item: TuiDay): TuiInteractiveState | null {\n const {disabledItemHandler, pressedItem, hoveredItem} = this;\n\n if (disabledItemHandler(item)) {\n return TuiInteractiveState.Disabled;\n }\n\n if (pressedItem && pressedItem.daySame(item)) {\n return TuiInteractiveState.Pressed;\n }\n\n if (hoveredItem && hoveredItem.daySame(item)) {\n return TuiInteractiveState.Hovered;\n }\n\n return null;\n }\n\n getItemRange(item: TuiDay): TuiRangeState | null {\n const {value, hoveredItem} = this;\n\n if (!value) {\n return null;\n }\n\n if (value instanceof TuiDay) {\n return value.daySame(item) ? TuiRangeState.Single : null;\n }\n\n if (\n (value.from.daySame(item) && !value.isSingleDay) ||\n (hoveredItem &&\n hoveredItem.dayAfter(value.from) &&\n value.from.daySame(item) &&\n value.isSingleDay) ||\n (hoveredItem &&\n hoveredItem.daySame(item) &&\n hoveredItem.dayBefore(value.from) &&\n value.isSingleDay)\n ) {\n return TuiRangeState.Start;\n }\n\n if (\n (value.to.daySame(item) && !value.isSingleDay) ||\n (hoveredItem &&\n hoveredItem.dayBefore(value.from) &&\n value.from.daySame(item) &&\n value.isSingleDay) ||\n (hoveredItem &&\n hoveredItem.daySame(item) &&\n hoveredItem.dayAfter(value.from) &&\n value.isSingleDay)\n ) {\n return TuiRangeState.End;\n }\n\n return value.isSingleDay && value.from.daySame(item)\n ? TuiRangeState.Single\n : null;\n }\n\n itemIsToday(item: TuiDay): boolean {\n return this.today.daySame(item);\n }\n\n itemIsUnavailable(item: TuiDay): boolean {\n return !this.month.monthSame(item);\n }\n\n itemIsInterval(day: TuiDay): boolean {\n const {value, hoveredItem} = this;\n\n if (value === null || value instanceof TuiDay) {\n return false;\n }\n\n if (!value.isSingleDay) {\n return value.from.daySameOrBefore(day) && value.to.dayAfter(day);\n }\n\n if (hoveredItem === null) {\n return false;\n }\n\n const range = TuiDayRange.sort(value.from, hoveredItem);\n\n return range.from.daySameOrBefore(day) && range.to.dayAfter(day);\n }\n\n onItemHovered(item: TuiDay | false): void {\n this.updateHoveredItem(item || null);\n }\n\n onItemPressed(item: TuiDay | false): void {\n this.pressedItem = item || null;\n }\n\n onItemClick(item: TuiDay): void {\n this.dayClick.emit(item);\n }\n\n private updateHoveredItem(day: TuiDay | null): void {\n if (nullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiHoveredModule,\n TuiLetModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiColorModule} from '@taiga-ui/core/directives/color';\nimport {TuiCalendarSheetPipeModule} from '@taiga-ui/core/pipes';\n\nimport {TuiPrimitiveCalendarComponent} from './primitive-calendar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiLetModule,\n TuiMapperPipeModule,\n TuiRepeatTimesModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiColorModule,\n TuiCalendarSheetPipeModule,\n ],\n declarations: [TuiPrimitiveCalendarComponent],\n exports: [TuiPrimitiveCalendarComponent],\n})\nexport class TuiPrimitiveCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAwBA;IAOa,6BAA6B,GAA1C,MAAa,6BAA6B;IAkCtC,YAEa,SAAsC;QAAtC,cAAS,GAAT,SAAS,CAA6B;QAnC3C,gBAAW,GAAkB,IAAI,CAAC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AAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpC;EACJ;;YAvI2B,UAAU,uBAD7B,MAAM,SAAC,2BAA2B;;AA7BvC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;4DACyB;AAI1C;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;0EACqD;AAItE;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;oEAC4C;AAI7D;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;4DACyB;AAI1C;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;kEACiB;AAIlC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mEACG;AAGpB;IADC,MAAM,EAAE;wEACsD;AAG/D;IADC,MAAM,EAAE;+DACsC;AAQ/C;IADC,WAAW,CAAC,eAAe,CAAC;6DAM5B;AA7CQ,6BAA6B;IANzC,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,u1EAAiD;QAEjD,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;IAoCO,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GAnC/B,6BAA6B,CA2KzC;;IC9KY,0BAA0B,GAAvC,MAAa,0BAA0B;EAAG;AAA7B,0BAA0B;IAdtC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,YAAY;YACZ,mBAAmB;YACnB,oBAAoB;YACpB,gBAAgB;YAChB,gBAAgB;YAChB,cAAc;YACd,0BAA0B;SAC7B;QACD,YAAY,EAAE,CAAC,6BAA6B,CAAC;QAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,0BAA0B,CAAG;;AC5B1C;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-primitive-calendar.js","sources":["ng://@taiga-ui/core/components/primitive-calendar/primitive-calendar.component.ts","ng://@taiga-ui/core/components/primitive-calendar/primitive-calendar.module.ts","ng://@taiga-ui/core/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n nullableSame,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n tuiDefaultProp,\n TuiMonth,\n} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_MARKER_HANDLER} from '@taiga-ui/core/constants';\nimport {TuiInteractiveState, TuiRangeState} from '@taiga-ui/core/enums';\nimport {TUI_ORDERED_SHORT_WEEK_DAYS, WEEK_DAYS_NAMES} from '@taiga-ui/core/tokens';\nimport {TuiColor, TuiMarkerHandler} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n// @dynamic\n@Component({\n selector: 'tui-primitive-calendar',\n templateUrl: './primitive-calendar.template.html',\n styleUrls: ['./primitive-calendar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPrimitiveCalendarComponent {\n private pressedItem: TuiDay | null = null;\n private readonly today = TuiDay.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n month: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n value: TuiDayRange | TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n hoveredItem: TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n showAdjacent = true;\n\n @Output()\n readonly hoveredItemChange = new EventEmitter<TuiDay | null>();\n\n @Output()\n readonly dayClick = new EventEmitter<TuiDay>();\n\n constructor(\n @Inject(TUI_ORDERED_SHORT_WEEK_DAYS)\n readonly weekDays$: Observable<WEEK_DAYS_NAMES>,\n ) {}\n\n @HostBinding('class._single')\n get isSingle(): boolean {\n return (\n this.value !== null &&\n (this.value instanceof TuiDay || this.value.isSingleDay)\n );\n }\n\n readonly toMarkers = (\n day: TuiDay,\n today: boolean,\n inRange: boolean,\n ): null | [TuiColor | string] | [TuiColor | string, TuiColor | string] => {\n if (today || inRange) {\n return null;\n }\n\n const markers = this.markerHandler(day);\n\n return markers.length === 0 ? null : markers;\n };\n\n getItemState(item: TuiDay): TuiInteractiveState | null {\n const {disabledItemHandler, pressedItem, hoveredItem} = this;\n\n if (disabledItemHandler(item)) {\n return TuiInteractiveState.Disabled;\n }\n\n if (pressedItem?.daySame(item)) {\n return TuiInteractiveState.Pressed;\n }\n\n if (hoveredItem?.daySame(item)) {\n return TuiInteractiveState.Hovered;\n }\n\n return null;\n }\n\n getItemRange(item: TuiDay): TuiRangeState | null {\n const {value, hoveredItem} = this;\n\n if (!value) {\n return null;\n }\n\n if (value instanceof TuiDay) {\n return value.daySame(item) ? TuiRangeState.Single : null;\n }\n\n if (\n (value.from.daySame(item) && !value.isSingleDay) ||\n (hoveredItem?.dayAfter(value.from) &&\n value.from.daySame(item) &&\n value.isSingleDay) ||\n (hoveredItem?.daySame(item) &&\n hoveredItem.dayBefore(value.from) &&\n value.isSingleDay)\n ) {\n return TuiRangeState.Start;\n }\n\n if (\n (value.to.daySame(item) && !value.isSingleDay) ||\n (hoveredItem?.dayBefore(value.from) &&\n value.from.daySame(item) &&\n value.isSingleDay) ||\n (hoveredItem?.daySame(item) &&\n hoveredItem.dayAfter(value.from) &&\n value.isSingleDay)\n ) {\n return TuiRangeState.End;\n }\n\n return value.isSingleDay && value.from.daySame(item)\n ? TuiRangeState.Single\n : null;\n }\n\n itemIsToday(item: TuiDay): boolean {\n return this.today.daySame(item);\n }\n\n itemIsUnavailable(item: TuiDay): boolean {\n return !this.month.monthSame(item);\n }\n\n itemIsInterval(day: TuiDay): boolean {\n const {value, hoveredItem} = this;\n\n if (value === null || value instanceof TuiDay) {\n return false;\n }\n\n if (!value.isSingleDay) {\n return value.from.daySameOrBefore(day) && value.to.dayAfter(day);\n }\n\n if (hoveredItem === null) {\n return false;\n }\n\n const range = TuiDayRange.sort(value.from, hoveredItem);\n\n return range.from.daySameOrBefore(day) && range.to.dayAfter(day);\n }\n\n onItemHovered(item: TuiDay | false): void {\n this.updateHoveredItem(item || null);\n }\n\n onItemPressed(item: TuiDay | false): void {\n this.pressedItem = item || null;\n }\n\n onItemClick(item: TuiDay): void {\n this.dayClick.emit(item);\n }\n\n private updateHoveredItem(day: TuiDay | null): void {\n if (nullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiHoveredModule,\n TuiLetModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n TuiRepeatTimesModule,\n} from '@taiga-ui/cdk';\nimport {TuiColorModule} from '@taiga-ui/core/directives/color';\nimport {TuiCalendarSheetPipeModule} from '@taiga-ui/core/pipes';\n\nimport {TuiPrimitiveCalendarComponent} from './primitive-calendar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiLetModule,\n TuiMapperPipeModule,\n TuiRepeatTimesModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiColorModule,\n TuiCalendarSheetPipeModule,\n ],\n declarations: [TuiPrimitiveCalendarComponent],\n exports: [TuiPrimitiveCalendarComponent],\n})\nexport class TuiPrimitiveCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAwBA;IAOa,6BAA6B,GAA1C,MAAa,6BAA6B;IAkCtC,YAEa,SAAsC;QAAtC,cAAS,GAAT,SAAS,CAA6B;QAnC3C,gBAAW,GAAkB,IAAI,CAAC;QACzB,UAAK,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;QAI/C,UAAK,GAAa,QAAQ,CAAC,YAAY,EAAE,CAAC;QAI1C,wBAAmB,GAA8B,oBAAoB,CAAC;QAItE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AAM,SAAC,2BAA2B;;AA7BvC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;4DACyB;AAI1C;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;0EACqD;AAItE;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;oEAC4C;AAI7D;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;4DACyB;AAI1C;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;kEACiB;AAIlC;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mEACG;AAGpB;IADC,MAAM,EAAE;wEACsD;AAG/D;IADC,MAAM,EAAE;+DACsC;AAQ/C;IADC,WAAW,CAAC,eAAe,CAAC;6DAM5B;AA7CQ,6BAA6B;IANzC,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,u1EAAiD;QAEjD,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;IAoCO,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GAnC/B,6BAA6B,CAuKzC;;IC1KY,0BAA0B,GAAvC,MAAa,0BAA0B;EAAG;AAA7B,0BAA0B;IAdtC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,YAAY;YACZ,mBAAmB;YACnB,oBAAoB;YACpB,gBAAgB;YAChB,gBAAgB;YAChB,cAAc;YACd,0BAA0B;SAC7B;QACD,YAAY,EAAE,CAAC,6BAA6B,CAAC;QAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,0BAA0B,CAAG;;AC5B1C;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { forwardRef, InjectionToken, EventEmitter, Inject, ElementRef, ViewChild, Input, HostBinding, Output, ContentChildren, HostListener, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
|
|
3
|
-
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, isNativeFocusedIn, setNativeFocused, tuiDefaultProp, tuiPure, TuiIdService, TuiFocusableModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule } from '@taiga-ui/cdk';
|
|
3
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiInteractive, isNativeFocusedIn, setNativeFocused, tuiDefaultProp, tuiPure, TuiIdService, TuiResizeService, TuiFocusableModule, TuiHoveredModule, TuiInputModeModule, TuiAutofilledModule } from '@taiga-ui/cdk';
|
|
4
4
|
import { HINT_CONTROLLER_PROVIDER, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/hint-controller';
|
|
5
5
|
import { TEXTFIELD_CONTROLLER_PROVIDER, TuiTextfieldController, TUI_TEXTFIELD_WATCHED_CONTROLLER } from '@taiga-ui/core/directives/textfield-controller';
|
|
6
6
|
import { TUI_MODE, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST } from '@taiga-ui/core/tokens';
|
|
7
7
|
import { getBorder } from '@taiga-ui/core/utils/miscellaneous';
|
|
8
8
|
import { PolymorpheusOutletComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
9
|
-
import { fromEvent, Observable, defer, EMPTY } from 'rxjs';
|
|
9
|
+
import { fromEvent, Observable, defer, merge, EMPTY } from 'rxjs';
|
|
10
10
|
import { map, startWith, distinctUntilChanged } from 'rxjs/operators';
|
|
11
11
|
import { MODE_PROVIDER } from '@taiga-ui/core/providers';
|
|
12
12
|
import { TuiAbstractTextfieldHost } from '@taiga-ui/core/abstract';
|
|
@@ -30,7 +30,7 @@ const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [
|
|
|
30
30
|
MODE_PROVIDER,
|
|
31
31
|
];
|
|
32
32
|
|
|
33
|
-
// TODO: remove in ivy compilation
|
|
33
|
+
// TODO: 3.0 remove in ivy compilation
|
|
34
34
|
const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';
|
|
35
35
|
/** Default values for primitive textfield options */
|
|
36
36
|
const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS = {
|
|
@@ -59,7 +59,7 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
|
|
|
59
59
|
this.editable = true;
|
|
60
60
|
this.filler = '';
|
|
61
61
|
this.iconAlign = this.options.iconAlign;
|
|
62
|
-
// TODO: Remove null
|
|
62
|
+
// TODO: 3.0 Remove null
|
|
63
63
|
this.iconContent = null;
|
|
64
64
|
this.iconCleaner = this.options.iconCleaner;
|
|
65
65
|
this.readOnly = false;
|
|
@@ -70,7 +70,7 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
|
|
|
70
70
|
this.value = '';
|
|
71
71
|
this.valueChange = new EventEmitter();
|
|
72
72
|
/**
|
|
73
|
-
* @deprecated TODO:
|
|
73
|
+
* @deprecated TODO: 3.0 remove
|
|
74
74
|
*/
|
|
75
75
|
this.autofilledChange = new EventEmitter();
|
|
76
76
|
this.autofilled = false;
|
|
@@ -79,7 +79,7 @@ let TuiPrimitiveTextfieldComponent = class TuiPrimitiveTextfieldComponent extend
|
|
|
79
79
|
if (this.computedDisabled || !this.focusableElement) {
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
-
// TODO: Refactor this after we drop built-in input element
|
|
82
|
+
// TODO: 3.0 Refactor this after we drop built-in input element
|
|
83
83
|
return (this.focusableElement.nativeElement
|
|
84
84
|
.previousElementSibling ||
|
|
85
85
|
this.focusableElement.nativeElement);
|
|
@@ -301,7 +301,7 @@ TuiPrimitiveTextfieldComponent = __decorate([
|
|
|
301
301
|
'[class._autofilled]': 'autofilled',
|
|
302
302
|
'[class._label-outside]': 'controller.labelOutside',
|
|
303
303
|
},
|
|
304
|
-
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:focus,.t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,:host[data-mode=onDark] .t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}.t-input :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size='s']):not(tui-text-area),:host[data-size='s'] .t-input{padding:0 var(--tui-padding-s)}.t-input :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size='l']):not(tui-text-area),:host[data-size='l'] .t-input{padding:0 var(--tui-padding-l)}.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled),:host._disabled .t-input{pointer-events:none}.t-input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .t-input{padding-top:1.25rem}.t-input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .t-input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.t-input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .t-input{padding-top:1.125rem}.t-input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .t-input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.t-input :host-context(tui-primitive-textfield._hidden),:host._hidden input.t-input{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size='s'] .t-content{padding:0 var(--tui-padding-s)}:host[data-size='l'] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:'';margin-right:-.25rem}:host[data-size='m'] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size='l']._focused._label-outside .t-placeholder,:host[data-size='m']._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size='l'] .t-placeholder{font-size:.9375rem}:host[data-size='l'] .t-placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .t-placeholder,:host[data-size='m']._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.t-cleaner:hover{color:var(--tui-text-02)}:host._disabled .t-cleaner,:host._readonly .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-icon{display:flex;align-items:center;justify-content:center;color:var(--tui-text-03)}.t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size='s'] .t-icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration{display:none}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}.t-icon:hover{color:var(--tui-text-02)}:host._disabled .t-icon,:host._readonly .t-icon{pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-icon:hover{color:var(--tui-text-01-night)}:host:hover:not(._readonly) .t-icon{color:var(--tui-text-02)}:host[data-mode=onDark]:hover:not(._readonly) .t-icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]:hover:not(._readonly) .t-icon{color:var(--tui-text-01)}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size='l']:not(._label-outside) .t-input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size='l']:not(._label-outside) .t-input::-webkit-contacts-auto-fill-button,:host[data-size='l']:not(._label-outside) .t-input::-webkit-credentials-auto-fill-button,:host[data-size='l']:not(._label-outside) .t-input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.t-input::-webkit-contacts-auto-fill-button:hover,.t-input::-webkit-credentials-auto-fill-button:hover,.t-input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.t-input:-webkit-autofill,.t-input:-webkit-autofill::first-line{font-size:inherit;line-height:inherit}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}"]
|
|
304
|
+
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:focus,.t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,:host[data-mode=onDark] .t-input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}.t-input :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size='s']):not(tui-text-area),:host[data-size='s'] .t-input{padding:0 var(--tui-padding-s)}.t-input :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size='l']):not(tui-text-area),:host[data-size='l'] .t-input{padding:0 var(--tui-padding-l)}.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled),:host._disabled .t-input{pointer-events:none}.t-input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) .t-input{padding-top:1.25rem}.t-input :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) .t-input:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}.t-input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) .t-input{padding-top:1.125rem}.t-input :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) .t-input:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}.t-input :host-context(tui-primitive-textfield._hidden),:host._hidden input.t-input{opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size='s'] .t-content{padding:0 var(--tui-padding-s)}:host[data-size='l'] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:'';margin-right:-.25rem}:host[data-size='m'] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size='l']._focused._label-outside .t-placeholder,:host[data-size='m']._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size='l'] .t-placeholder{font-size:.9375rem}:host[data-size='l'] .t-placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .t-placeholder,:host[data-size='m']._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.t-cleaner:hover{color:var(--tui-text-02)}:host._disabled .t-cleaner,:host._readonly .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-icon{display:flex;align-items:center;justify-content:center;color:var(--tui-text-03)}.t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size='s'] .t-icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration{display:none}:host._autofilled[data-size='m'] .t-placeholder,:host._autofilled[data-size='s'] .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}.t-icon:hover{color:var(--tui-text-02)}:host._disabled .t-icon,:host._readonly .t-icon{pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-icon:hover{color:var(--tui-text-01-night)}:host:hover:not(._readonly) .t-icon{color:var(--tui-text-02)}:host[data-mode=onDark]:hover:not(._readonly) .t-icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]:hover:not(._readonly) .t-icon{color:var(--tui-text-01)}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-input::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host[data-size='l']:not(._label-outside) .t-input::-webkit-caps-lock-indicator{margin-top:-1.25rem}.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host[data-size='l']:not(._label-outside) .t-input::-webkit-contacts-auto-fill-button,:host[data-size='l']:not(._label-outside) .t-input::-webkit-credentials-auto-fill-button,:host[data-size='l']:not(._label-outside) .t-input::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}.t-input::-webkit-contacts-auto-fill-button:hover,.t-input::-webkit-credentials-auto-fill-button:hover,.t-input::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}.t-input:-webkit-autofill,.t-input:-webkit-autofill::first-line{font-size:inherit;line-height:inherit}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}"]
|
|
305
305
|
}),
|
|
306
306
|
__param(0, Inject(TUI_MODE)),
|
|
307
307
|
__param(1, Inject(TUI_TEXTFIELD_APPEARANCE)),
|
|
@@ -398,7 +398,7 @@ TuiTextfieldComponent = __decorate([
|
|
|
398
398
|
'(input)': 'host.onValueChange($event.target.value)',
|
|
399
399
|
},
|
|
400
400
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
401
|
-
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}:host:-webkit-autofill,:host:-webkit-autofill:focus,:host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0
|
|
401
|
+
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}:host:-webkit-autofill,:host:-webkit-autofill:focus,:host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:focus,:host :host-context(tui-primitive-textfield[data-mode=onDark]):-webkit-autofill:hover,:host :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill,:host :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:focus,:host :host-context(tui-text-area[data-mode=onDark]):-webkit-autofill:hover,:host[data-mode=onDark] :host:-webkit-autofill,:host[data-mode=onDark] :host:-webkit-autofill:focus,:host[data-mode=onDark] :host:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size='s']):not(tui-text-area),:host[data-size='s'] :host{padding:0 var(--tui-padding-s)}:host :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),:host :host-context(tui-text-area[data-size='l']):not(tui-text-area),:host[data-size='l'] :host{padding:0 var(--tui-padding-l)}:host :host-context(tui-primitive-textfield._disabled),:host :host-context(tui-text-area._disabled),:host._disabled :host{pointer-events:none}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='l']:not(._label-outside) :host{padding-top:1.25rem}:host :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='l']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield),:host[data-size='m']:not(._label-outside) :host{padding-top:1.125rem}:host :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.content .placeholder,:host[data-size='m']:not(._label-outside) :host:-webkit-autofill+.content .placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host :host-context(tui-primitive-textfield._hidden),:host._hidden input:host{opacity:0;text-indent:-10em;-webkit-user-select:none}:host::-webkit-caps-lock-indicator{margin-right:.375rem;align-self:center}:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-caps-lock-indicator{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button,:host::-webkit-credentials-auto-fill-button,:host::-webkit-credit-card-auto-fill-button{background-color:var(--tui-text-03)}:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-contacts-auto-fill-button,:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-credentials-auto-fill-button,:host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)) :host::-webkit-credit-card-auto-fill-button{margin-top:-1.25rem}:host::-webkit-contacts-auto-fill-button:hover,:host::-webkit-credentials-auto-fill-button:hover,:host::-webkit-credit-card-auto-fill-button:hover{background-color:var(--tui-text-02)}:host::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}:host::placeholder{color:var(--tui-text-03);opacity:0}:host :host-context(tui-primitive-textfield[data-mode=onDark])::-ms-input-placeholder,:host :host-context(tui-text-area[data-mode=onDark])::-ms-input-placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield[data-mode=onDark])::placeholder,:host :host-context(tui-text-area[data-mode=onDark])::placeholder{color:var(--tui-text-03-night)}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::-ms-input-placeholder,:host :host-context(tui-text-area._focused:not(._readonly))::-ms-input-placeholder{opacity:1}:host :host-context(tui-primitive-textfield._focused:not(._readonly))::placeholder,:host :host-context(tui-text-area._focused:not(._readonly))::placeholder{opacity:1}textarea:host{white-space:normal}textarea:host :host-context(tui-text-area._ios){padding-left:.8125rem}"]
|
|
402
402
|
}),
|
|
403
403
|
__param(0, Inject(TUI_TEXTFIELD_HOST)),
|
|
404
404
|
__param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1)),
|
|
@@ -408,10 +408,11 @@ TuiTextfieldComponent = __decorate([
|
|
|
408
408
|
], TuiTextfieldComponent);
|
|
409
409
|
|
|
410
410
|
let TuiValueDecorationComponent = class TuiValueDecorationComponent {
|
|
411
|
-
constructor(textfield, controller) {
|
|
411
|
+
constructor(textfield, controller, resize$) {
|
|
412
412
|
this.textfield = textfield;
|
|
413
413
|
this.controller = controller;
|
|
414
|
-
this.
|
|
414
|
+
this.resize$ = resize$;
|
|
415
|
+
this.pre$ = defer(() => { var _a, _b; return merge((_b = (_a = this.directive) === null || _a === void 0 ? void 0 : _a.waMutationObserver) !== null && _b !== void 0 ? _b : EMPTY, this.resize$); }).pipe(map(() => { var _a, _b; return (_b = (_a = this.pre) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) !== null && _b !== void 0 ? _b : 0; }), startWith(0), distinctUntilChanged());
|
|
415
416
|
}
|
|
416
417
|
get isContextTable() {
|
|
417
418
|
return this.textfield.appearance === "table" /* Table */;
|
|
@@ -454,7 +455,8 @@ let TuiValueDecorationComponent = class TuiValueDecorationComponent {
|
|
|
454
455
|
};
|
|
455
456
|
TuiValueDecorationComponent.ctorParameters = () => [
|
|
456
457
|
{ type: TuiPrimitiveTextfieldComponent, decorators: [{ type: Inject, args: [TuiPrimitiveTextfieldComponent,] }] },
|
|
457
|
-
{ type: TuiTextfieldController$1, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1,] }] }
|
|
458
|
+
{ type: TuiTextfieldController$1, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_WATCHED_CONTROLLER$1,] }] },
|
|
459
|
+
{ type: Observable, decorators: [{ type: Inject, args: [TuiResizeService,] }] }
|
|
458
460
|
];
|
|
459
461
|
__decorate([
|
|
460
462
|
ViewChild('pre', { read: ElementRef, static: true })
|
|
@@ -469,12 +471,14 @@ TuiValueDecorationComponent = __decorate([
|
|
|
469
471
|
Component({
|
|
470
472
|
selector: 'tui-value-decoration',
|
|
471
473
|
template: "<span\n #pre\n subtree\n characterData\n waMutationObserver\n>\n {{ prefix }}\n</span>\n<span class=\"t-ghost\">{{ value }}</span>\n<span class=\"t-filler\">{{ filler }}</span>\n{{ postfix }}\n",
|
|
474
|
+
providers: [TuiResizeService],
|
|
472
475
|
// It follows Change Detection of PrimitiveTextfield
|
|
473
476
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
474
477
|
styles: [":host{position:absolute;display:block;height:1.25rem;max-width:100%;margin:-1.25rem 0;padding:.625rem 0;box-sizing:content-box;color:var(--tui-text-01)}:host._table{position:static}:host-context(tui-textfield[data-mode=onDark]) :host{color:var(--tui-text-01-night)}.t-ghost{visibility:hidden;white-space:pre;text-overflow:clip}.t-filler{display:inline-block;overflow:hidden;color:var(--tui-text-03);text-overflow:ellipsis;max-width:100%;white-space:nowrap}:host-context(tui-textfield[data-mode=onDark]) .t-filler{color:var(--tui-text-03-night)}"]
|
|
475
478
|
}),
|
|
476
479
|
__param(0, Inject(TuiPrimitiveTextfieldComponent)),
|
|
477
|
-
__param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1))
|
|
480
|
+
__param(1, Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER$1)),
|
|
481
|
+
__param(2, Inject(TuiResizeService))
|
|
478
482
|
], TuiValueDecorationComponent);
|
|
479
483
|
|
|
480
484
|
let TuiPrimitiveTextfieldModule = class TuiPrimitiveTextfieldModule {
|