@depup/angular__material 21.2.2-depup.19
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/LICENSE +21 -0
- package/README.md +31 -0
- package/_index.scss +145 -0
- package/autocomplete/_autocomplete-theme.scss +76 -0
- package/autocomplete/_m2-autocomplete.scss +19 -0
- package/autocomplete/_m3-autocomplete.scss +26 -0
- package/badge/_badge-theme.scss +106 -0
- package/badge/_m2-badge.scss +73 -0
- package/badge/_m3-badge.scss +52 -0
- package/bottom-sheet/_bottom-sheet-theme.scss +76 -0
- package/bottom-sheet/_m2-bottom-sheet.scss +24 -0
- package/bottom-sheet/_m3-bottom-sheet.scss +25 -0
- package/button/_button-theme.scss +113 -0
- package/button/_fab-theme.scss +111 -0
- package/button/_icon-button-theme.scss +136 -0
- package/button/_m2-button.scss +194 -0
- package/button/_m2-fab.scss +101 -0
- package/button/_m2-icon-button.scss +59 -0
- package/button/_m3-button.scss +170 -0
- package/button/_m3-fab.scss +92 -0
- package/button/_m3-icon-button.scss +54 -0
- package/button-toggle/_button-toggle-theme.scss +93 -0
- package/button-toggle/_m2-button-toggle.scss +68 -0
- package/button-toggle/_m3-button-toggle.scss +72 -0
- package/card/_card-theme.scss +76 -0
- package/card/_m2-card.scss +39 -0
- package/card/_m3-card.scss +44 -0
- package/changes.json +10 -0
- package/checkbox/_checkbox-theme.scss +105 -0
- package/checkbox/_m2-checkbox.scss +78 -0
- package/checkbox/_m3-checkbox.scss +68 -0
- package/chips/_chips-theme.scss +115 -0
- package/chips/_m2-chip.scss +85 -0
- package/chips/_m3-chip.scss +81 -0
- package/core/_core-theme.scss +125 -0
- package/core/_core.scss +50 -0
- package/core/_m2-app.scss +24 -0
- package/core/_m3-app.scss +44 -0
- package/core/color/_all-color.scss +17 -0
- package/core/density/private/_all-density.scss +78 -0
- package/core/focus-indicators/_private.scss +126 -0
- package/core/m2/_index.scss +52 -0
- package/core/m2/_palette.scss +748 -0
- package/core/m2/_theming.scss +340 -0
- package/core/m2/_typography-utils.scss +81 -0
- package/core/m2/_typography.scss +388 -0
- package/core/option/_m2-optgroup.scss +21 -0
- package/core/option/_m2-option.scss +38 -0
- package/core/option/_m3-optgroup.scss +25 -0
- package/core/option/_m3-option.scss +37 -0
- package/core/option/_optgroup-theme.scss +76 -0
- package/core/option/_option-theme.scss +103 -0
- package/core/ripple/_m2-ripple.scss +17 -0
- package/core/ripple/_m3-ripple.scss +17 -0
- package/core/ripple/_ripple-theme.scss +75 -0
- package/core/ripple/_ripple.scss +56 -0
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +32 -0
- package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +34 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-common.scss +86 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +110 -0
- package/core/style/_checkbox-common.scss +11 -0
- package/core/style/_elevation.scss +208 -0
- package/core/style/_layout-common.scss +8 -0
- package/core/style/_private.scss +27 -0
- package/core/style/_sass-utils.scss +57 -0
- package/core/style/_validation.scss +52 -0
- package/core/style/_variables.scss +44 -0
- package/core/style/_vendor-prefixes.scss +56 -0
- package/core/theming/_all-theme.scss +168 -0
- package/core/theming/_color-api-backwards-compatibility.scss +159 -0
- package/core/theming/_config-validation.scss +174 -0
- package/core/theming/_definition.scss +141 -0
- package/core/theming/_inspection.scss +289 -0
- package/core/theming/_m2-inspection.scss +243 -0
- package/core/theming/_palettes.scss +1036 -0
- package/core/theming/_theming.scss +193 -0
- package/core/theming/_validation.scss +5 -0
- package/core/tokens/_classes.scss +398 -0
- package/core/tokens/_m2-utils.scss +25 -0
- package/core/tokens/_m3-tokens.scss +126 -0
- package/core/tokens/_m3-utils.scss +36 -0
- package/core/tokens/_system.scss +398 -0
- package/core/tokens/_token-utils.scss +119 -0
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color-internal.scss +11 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +10 -0
- package/core/tokens/m2/_md-sys-motion.scss +30 -0
- package/core/tokens/m2/_md-sys-shape.scss +16 -0
- package/core/tokens/m2/_md-sys-state.scss +8 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_index.scss +7 -0
- package/core/tokens/m3/_md-sys-color-internal.scss +11 -0
- package/core/tokens/m3/_md-sys-color.scss +118 -0
- package/core/tokens/m3/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/_md-sys-motion.scss +35 -0
- package/core/tokens/m3/_md-sys-shape.scss +21 -0
- package/core/tokens/m3/_md-sys-state.scss +13 -0
- package/core/tokens/m3/_md-sys-typescale-internal.scss +5 -0
- package/core/tokens/m3/_md-sys-typescale.scss +114 -0
- package/core/tokens/m3/_theme.scss +35 -0
- package/core/typography/_all-typography.scss +104 -0
- package/core/typography/_typography-utils.scss +31 -0
- package/core/typography/_typography.scss +269 -0
- package/core/typography/_versioning.scss +90 -0
- package/datepicker/_datepicker-theme.scss +132 -0
- package/datepicker/_m2-datepicker.scss +81 -0
- package/datepicker/_m3-datepicker.scss +74 -0
- package/dialog/_dialog-legacy-padding.scss +31 -0
- package/dialog/_dialog-theme.scss +76 -0
- package/dialog/_m2-dialog.scss +43 -0
- package/dialog/_m3-dialog.scss +47 -0
- package/divider/_divider-theme.scss +75 -0
- package/divider/_m2-divider.scss +17 -0
- package/divider/_m3-divider.scss +19 -0
- package/expansion/_expansion-theme.scss +76 -0
- package/expansion/_m2-expansion.scss +64 -0
- package/expansion/_m3-expansion.scss +61 -0
- package/fesm2022/_animation-chunk.mjs +22 -0
- package/fesm2022/_animation-chunk.mjs.map +1 -0
- package/fesm2022/_date-formats-chunk.mjs +86 -0
- package/fesm2022/_date-formats-chunk.mjs.map +1 -0
- package/fesm2022/_date-range-input-harness-chunk.mjs +322 -0
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -0
- package/fesm2022/_error-options-chunk.mjs +66 -0
- package/fesm2022/_error-options-chunk.mjs.map +1 -0
- package/fesm2022/_error-state-chunk.mjs +30 -0
- package/fesm2022/_error-state-chunk.mjs.map +1 -0
- package/fesm2022/_form-field-chunk.mjs +1351 -0
- package/fesm2022/_form-field-chunk.mjs.map +1 -0
- package/fesm2022/_icon-button-chunk.mjs +268 -0
- package/fesm2022/_icon-button-chunk.mjs.map +1 -0
- package/fesm2022/_icon-registry-chunk.mjs +368 -0
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -0
- package/fesm2022/_input-harness-chunk.mjs +67 -0
- package/fesm2022/_input-harness-chunk.mjs.map +1 -0
- package/fesm2022/_input-value-accessor-chunk.mjs +6 -0
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -0
- package/fesm2022/_internal-form-field-chunk.mjs +67 -0
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -0
- package/fesm2022/_line-chunk.mjs +99 -0
- package/fesm2022/_line-chunk.mjs.map +1 -0
- package/fesm2022/_option-chunk.mjs +385 -0
- package/fesm2022/_option-chunk.mjs.map +1 -0
- package/fesm2022/_option-harness-chunk.mjs +30 -0
- package/fesm2022/_option-harness-chunk.mjs.map +1 -0
- package/fesm2022/_option-module-chunk.mjs +48 -0
- package/fesm2022/_option-module-chunk.mjs.map +1 -0
- package/fesm2022/_pseudo-checkbox-chunk.mjs +88 -0
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -0
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +46 -0
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -0
- package/fesm2022/_public-api-chunk.mjs +84 -0
- package/fesm2022/_public-api-chunk.mjs.map +1 -0
- package/fesm2022/_ripple-chunk.mjs +544 -0
- package/fesm2022/_ripple-chunk.mjs.map +1 -0
- package/fesm2022/_ripple-loader-chunk.mjs +144 -0
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -0
- package/fesm2022/_ripple-module-chunk.mjs +46 -0
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -0
- package/fesm2022/_structural-styles-chunk.mjs +45 -0
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -0
- package/fesm2022/_tooltip-chunk.mjs +848 -0
- package/fesm2022/_tooltip-chunk.mjs.map +1 -0
- package/fesm2022/autocomplete-testing.mjs +75 -0
- package/fesm2022/autocomplete-testing.mjs.map +1 -0
- package/fesm2022/autocomplete.mjs +1068 -0
- package/fesm2022/autocomplete.mjs.map +1 -0
- package/fesm2022/badge-testing.mjs +48 -0
- package/fesm2022/badge-testing.mjs.map +1 -0
- package/fesm2022/badge.mjs +357 -0
- package/fesm2022/badge.mjs.map +1 -0
- package/fesm2022/bottom-sheet-testing.mjs +17 -0
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -0
- package/fesm2022/bottom-sheet.mjs +390 -0
- package/fesm2022/bottom-sheet.mjs.map +1 -0
- package/fesm2022/button-testing.mjs +81 -0
- package/fesm2022/button-testing.mjs.map +1 -0
- package/fesm2022/button-toggle-testing.mjs +87 -0
- package/fesm2022/button-toggle-testing.mjs.map +1 -0
- package/fesm2022/button-toggle.mjs +789 -0
- package/fesm2022/button-toggle.mjs.map +1 -0
- package/fesm2022/button.mjs +308 -0
- package/fesm2022/button.mjs.map +1 -0
- package/fesm2022/card-testing.mjs +29 -0
- package/fesm2022/card-testing.mjs.map +1 -0
- package/fesm2022/card.mjs +615 -0
- package/fesm2022/card.mjs.map +1 -0
- package/fesm2022/checkbox-testing.mjs +79 -0
- package/fesm2022/checkbox-testing.mjs.map +1 -0
- package/fesm2022/checkbox.mjs +551 -0
- package/fesm2022/checkbox.mjs.map +1 -0
- package/fesm2022/chips-testing.mjs +239 -0
- package/fesm2022/chips-testing.mjs.map +1 -0
- package/fesm2022/chips.mjs +2663 -0
- package/fesm2022/chips.mjs.map +1 -0
- package/fesm2022/core-testing.mjs +22 -0
- package/fesm2022/core-testing.mjs.map +1 -0
- package/fesm2022/core.mjs +408 -0
- package/fesm2022/core.mjs.map +1 -0
- package/fesm2022/datepicker-testing.mjs +26 -0
- package/fesm2022/datepicker-testing.mjs.map +1 -0
- package/fesm2022/datepicker.mjs +5015 -0
- package/fesm2022/datepicker.mjs.map +1 -0
- package/fesm2022/dialog-testing.mjs +123 -0
- package/fesm2022/dialog-testing.mjs.map +1 -0
- package/fesm2022/dialog.mjs +873 -0
- package/fesm2022/dialog.mjs.map +1 -0
- package/fesm2022/divider-testing.mjs +17 -0
- package/fesm2022/divider-testing.mjs.map +1 -0
- package/fesm2022/divider.mjs +132 -0
- package/fesm2022/divider.mjs.map +1 -0
- package/fesm2022/expansion-testing.mjs +87 -0
- package/fesm2022/expansion-testing.mjs.map +1 -0
- package/fesm2022/expansion.mjs +749 -0
- package/fesm2022/expansion.mjs.map +1 -0
- package/fesm2022/form-field-testing-control.mjs +24 -0
- package/fesm2022/form-field-testing-control.mjs.map +1 -0
- package/fesm2022/form-field-testing.mjs +135 -0
- package/fesm2022/form-field-testing.mjs.map +1 -0
- package/fesm2022/form-field.mjs +57 -0
- package/fesm2022/form-field.mjs.map +1 -0
- package/fesm2022/grid-list-testing.mjs +80 -0
- package/fesm2022/grid-list-testing.mjs.map +1 -0
- package/fesm2022/grid-list.mjs +604 -0
- package/fesm2022/grid-list.mjs.map +1 -0
- package/fesm2022/icon-testing.mjs +172 -0
- package/fesm2022/icon-testing.mjs.map +1 -0
- package/fesm2022/icon.mjs +366 -0
- package/fesm2022/icon.mjs.map +1 -0
- package/fesm2022/input-testing.mjs +73 -0
- package/fesm2022/input-testing.mjs.map +1 -0
- package/fesm2022/input.mjs +495 -0
- package/fesm2022/input.mjs.map +1 -0
- package/fesm2022/list-testing.mjs +295 -0
- package/fesm2022/list-testing.mjs.map +1 -0
- package/fesm2022/list.mjs +1604 -0
- package/fesm2022/list.mjs.map +1 -0
- package/fesm2022/material.mjs +4 -0
- package/fesm2022/material.mjs.map +1 -0
- package/fesm2022/menu-testing.mjs +174 -0
- package/fesm2022/menu-testing.mjs.map +1 -0
- package/fesm2022/menu.mjs +1421 -0
- package/fesm2022/menu.mjs.map +1 -0
- package/fesm2022/paginator-testing.mjs +69 -0
- package/fesm2022/paginator-testing.mjs.map +1 -0
- package/fesm2022/paginator.mjs +445 -0
- package/fesm2022/paginator.mjs.map +1 -0
- package/fesm2022/progress-bar-testing.mjs +20 -0
- package/fesm2022/progress-bar-testing.mjs.map +1 -0
- package/fesm2022/progress-bar.mjs +247 -0
- package/fesm2022/progress-bar.mjs.map +1 -0
- package/fesm2022/progress-spinner-testing.mjs +21 -0
- package/fesm2022/progress-spinner-testing.mjs.map +1 -0
- package/fesm2022/progress-spinner.mjs +258 -0
- package/fesm2022/progress-spinner.mjs.map +1 -0
- package/fesm2022/radio-testing.mjs +143 -0
- package/fesm2022/radio-testing.mjs.map +1 -0
- package/fesm2022/radio.mjs +751 -0
- package/fesm2022/radio.mjs.map +1 -0
- package/fesm2022/select-testing.mjs +92 -0
- package/fesm2022/select-testing.mjs.map +1 -0
- package/fesm2022/select.mjs +1181 -0
- package/fesm2022/select.mjs.map +1 -0
- package/fesm2022/sidenav-testing.mjs +80 -0
- package/fesm2022/sidenav-testing.mjs.map +1 -0
- package/fesm2022/sidenav.mjs +1151 -0
- package/fesm2022/sidenav.mjs.map +1 -0
- package/fesm2022/slide-toggle-testing.mjs +68 -0
- package/fesm2022/slide-toggle-testing.mjs.map +1 -0
- package/fesm2022/slide-toggle.mjs +403 -0
- package/fesm2022/slide-toggle.mjs.map +1 -0
- package/fesm2022/slider-testing.mjs +105 -0
- package/fesm2022/slider-testing.mjs.map +1 -0
- package/fesm2022/slider.mjs +1720 -0
- package/fesm2022/slider.mjs.map +1 -0
- package/fesm2022/snack-bar-testing.mjs +47 -0
- package/fesm2022/snack-bar-testing.mjs.map +1 -0
- package/fesm2022/snack-bar.mjs +820 -0
- package/fesm2022/snack-bar.mjs.map +1 -0
- package/fesm2022/sort-testing.mjs +55 -0
- package/fesm2022/sort-testing.mjs.map +1 -0
- package/fesm2022/sort.mjs +470 -0
- package/fesm2022/sort.mjs.map +1 -0
- package/fesm2022/stepper-testing.mjs +99 -0
- package/fesm2022/stepper-testing.mjs.map +1 -0
- package/fesm2022/stepper.mjs +900 -0
- package/fesm2022/stepper.mjs.map +1 -0
- package/fesm2022/table-testing.mjs +152 -0
- package/fesm2022/table-testing.mjs.map +1 -0
- package/fesm2022/table.mjs +1151 -0
- package/fesm2022/table.mjs.map +1 -0
- package/fesm2022/tabs-testing.mjs +144 -0
- package/fesm2022/tabs-testing.mjs.map +1 -0
- package/fesm2022/tabs.mjs +2435 -0
- package/fesm2022/tabs.mjs.map +1 -0
- package/fesm2022/timepicker-testing.mjs +128 -0
- package/fesm2022/timepicker-testing.mjs.map +1 -0
- package/fesm2022/timepicker.mjs +1284 -0
- package/fesm2022/timepicker.mjs.map +1 -0
- package/fesm2022/toolbar-testing.mjs +26 -0
- package/fesm2022/toolbar-testing.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +182 -0
- package/fesm2022/toolbar.mjs.map +1 -0
- package/fesm2022/tooltip-testing.mjs +48 -0
- package/fesm2022/tooltip-testing.mjs.map +1 -0
- package/fesm2022/tooltip.mjs +58 -0
- package/fesm2022/tooltip.mjs.map +1 -0
- package/fesm2022/tree-testing.mjs +104 -0
- package/fesm2022/tree-testing.mjs.map +1 -0
- package/fesm2022/tree.mjs +681 -0
- package/fesm2022/tree.mjs.map +1 -0
- package/form-field/_form-field-theme.scss +96 -0
- package/form-field/_m2-form-field.scss +226 -0
- package/form-field/_m3-form-field.scss +137 -0
- package/grid-list/_grid-list-theme.scss +76 -0
- package/grid-list/_m2-grid-list.scss +21 -0
- package/grid-list/_m3-grid-list.scss +20 -0
- package/icon/_icon-theme.scss +109 -0
- package/icon/_m2-icon.scss +15 -0
- package/icon/_m3-icon.scss +21 -0
- package/input/_input-theme.scss +36 -0
- package/list/_list-theme.scss +201 -0
- package/list/_m2-list.scss +92 -0
- package/list/_m3-list.scss +93 -0
- package/menu/_m2-menu.scss +44 -0
- package/menu/_m3-menu.scss +42 -0
- package/menu/_menu-theme.scss +76 -0
- package/package.json +404 -0
- package/paginator/_m2-paginator.scss +69 -0
- package/paginator/_m3-paginator.scss +46 -0
- package/paginator/_paginator-theme.scss +76 -0
- package/prebuilt-themes/azure-blue.css +1 -0
- package/prebuilt-themes/cyan-orange.css +1 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -0
- package/prebuilt-themes/indigo-pink.css +1 -0
- package/prebuilt-themes/magenta-violet.css +1 -0
- package/prebuilt-themes/pink-bluegrey.css +1 -0
- package/prebuilt-themes/purple-green.css +1 -0
- package/prebuilt-themes/rose-red.css +1 -0
- package/progress-bar/_m2-progress-bar.scss +36 -0
- package/progress-bar/_m3-progress-bar.scss +29 -0
- package/progress-bar/_progress-bar-theme.scss +93 -0
- package/progress-spinner/_m2-progress-spinner.scss +25 -0
- package/progress-spinner/_m3-progress-spinner.scss +27 -0
- package/progress-spinner/_progress-spinner-theme.scss +95 -0
- package/radio/_m2-radio.scss +67 -0
- package/radio/_m3-radio.scss +65 -0
- package/radio/_radio-theme.scss +102 -0
- package/schematics/collection.json +55 -0
- package/schematics/migration.json +15 -0
- package/schematics/ng-add/fonts/material-fonts.d.ts +11 -0
- package/schematics/ng-add/fonts/material-fonts.js +41 -0
- package/schematics/ng-add/fonts/material-fonts.js.map +1 -0
- package/schematics/ng-add/index.d.ts +17 -0
- package/schematics/ng-add/index.js +54 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/package-config.d.ts +12 -0
- package/schematics/ng-add/package-config.js +51 -0
- package/schematics/ng-add/package-config.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +15 -0
- package/schematics/ng-add/schema.js +10 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +43 -0
- package/schematics/ng-add/setup-project.d.ts +15 -0
- package/schematics/ng-add/setup-project.js +36 -0
- package/schematics/ng-add/setup-project.js.map +1 -0
- package/schematics/ng-add/theming/create-theme.d.ts +9 -0
- package/schematics/ng-add/theming/create-theme.js +58 -0
- package/schematics/ng-add/theming/create-theme.js.map +1 -0
- package/schematics/ng-add/theming/theming.d.ts +11 -0
- package/schematics/ng-add/theming/theming.js +133 -0
- package/schematics/ng-add/theming/theming.js.map +1 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +27 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +99 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +38 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +118 -0
- package/schematics/ng-generate/address-form/index.d.ts +14 -0
- package/schematics/ng-generate/address-form/index.js +43 -0
- package/schematics/ng-generate/address-form/index.js.map +1 -0
- package/schematics/ng-generate/address-form/schema.d.ts +10 -0
- package/schematics/ng-generate/address-form/schema.js +10 -0
- package/schematics/ng-generate/address-form/schema.js.map +1 -0
- package/schematics/ng-generate/address-form/schema.json +100 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +21 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +26 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +36 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +56 -0
- package/schematics/ng-generate/dashboard/index.d.ts +14 -0
- package/schematics/ng-generate/dashboard/index.js +42 -0
- package/schematics/ng-generate/dashboard/index.js.map +1 -0
- package/schematics/ng-generate/dashboard/schema.d.ts +10 -0
- package/schematics/ng-generate/dashboard/schema.js +10 -0
- package/schematics/ng-generate/dashboard/schema.js.map +1 -0
- package/schematics/ng-generate/dashboard/schema.json +100 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +17 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +28 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +36 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +42 -0
- package/schematics/ng-generate/navigation/index.d.ts +14 -0
- package/schematics/ng-generate/navigation/index.js +42 -0
- package/schematics/ng-generate/navigation/index.js.map +1 -0
- package/schematics/ng-generate/navigation/schema.d.ts +10 -0
- package/schematics/ng-generate/navigation/schema.js +10 -0
- package/schematics/ng-generate/navigation/schema.js.map +1 -0
- package/schematics/ng-generate/navigation/schema.json +105 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__-datasource.ts.template +111 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +3 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +26 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +32 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +36 -0
- package/schematics/ng-generate/table/index.d.ts +14 -0
- package/schematics/ng-generate/table/index.js +40 -0
- package/schematics/ng-generate/table/index.js.map +1 -0
- package/schematics/ng-generate/table/schema.d.ts +10 -0
- package/schematics/ng-generate/table/schema.js +10 -0
- package/schematics/ng-generate/table/schema.js.map +1 -0
- package/schematics/ng-generate/table/schema.json +100 -0
- package/schematics/ng-generate/theme-color/index_bundled.js +6561 -0
- package/schematics/ng-generate/theme-color/index_bundled.js.map +6 -0
- package/schematics/ng-generate/theme-color/schema.json +55 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +4 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +22 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +32 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +93 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/example-data.ts.template +47 -0
- package/schematics/ng-generate/tree/index.d.ts +14 -0
- package/schematics/ng-generate/tree/index.js +40 -0
- package/schematics/ng-generate/tree/index.js.map +1 -0
- package/schematics/ng-generate/tree/schema.d.ts +10 -0
- package/schematics/ng-generate/tree/schema.js +10 -0
- package/schematics/ng-generate/tree/schema.js.map +1 -0
- package/schematics/ng-generate/tree/schema.json +100 -0
- package/schematics/ng-update/index_bundled.js +204 -0
- package/schematics/ng-update/index_bundled.js.map +6 -0
- package/schematics/package.json +3 -0
- package/select/_m2-select.scss +49 -0
- package/select/_m3-select.scss +54 -0
- package/select/_select-theme.scss +99 -0
- package/sidenav/_m2-sidenav.scss +48 -0
- package/sidenav/_m3-sidenav.scss +26 -0
- package/sidenav/_sidenav-theme.scss +75 -0
- package/slide-toggle/_m2-slide-toggle.scss +134 -0
- package/slide-toggle/_m3-slide-toggle.scss +133 -0
- package/slide-toggle/_slide-toggle-theme.scss +119 -0
- package/slider/_m2-slider.scss +73 -0
- package/slider/_m3-slider.scss +69 -0
- package/slider/_slider-theme.scss +103 -0
- package/snack-bar/_m2-snack-bar.scss +24 -0
- package/snack-bar/_m3-snack-bar.scss +26 -0
- package/snack-bar/_snack-bar-theme.scss +77 -0
- package/sort/_m2-sort.scss +16 -0
- package/sort/_m3-sort.scss +20 -0
- package/sort/_sort-theme.scss +76 -0
- package/stepper/_m2-stepper.scss +65 -0
- package/stepper/_m3-stepper.scss +66 -0
- package/stepper/_stepper-theme.scss +102 -0
- package/table/_m2-table.scss +63 -0
- package/table/_m3-table.scss +52 -0
- package/table/_table-theme.scss +76 -0
- package/tabs/_m2-tabs.scss +68 -0
- package/tabs/_m3-tabs.scss +58 -0
- package/tabs/_tabs-theme.scss +131 -0
- package/timepicker/_m2-timepicker.scss +19 -0
- package/timepicker/_m3-timepicker.scss +21 -0
- package/timepicker/_timepicker-theme.scss +81 -0
- package/toolbar/_m2-toolbar.scss +43 -0
- package/toolbar/_m3-toolbar.scss +41 -0
- package/toolbar/_toolbar-theme.scss +114 -0
- package/tooltip/_m2-tooltip.scss +24 -0
- package/tooltip/_m3-tooltip.scss +25 -0
- package/tooltip/_tooltip-theme.scss +76 -0
- package/tree/_m2-tree.scss +30 -0
- package/tree/_m3-tree.scss +37 -0
- package/tree/_tree-theme.scss +76 -0
- package/types/_badge-chunk.d.ts +100 -0
- package/types/_button-toggle-chunk.d.ts +252 -0
- package/types/_date-adapter-chunk.d.ts +261 -0
- package/types/_date-range-input-harness-chunk.d.ts +284 -0
- package/types/_dialog-chunk.d.ts +336 -0
- package/types/_error-options-chunk.d.ts +17 -0
- package/types/_form-field-chunk.d.ts +375 -0
- package/types/_form-field-control-chunk.d.ts +64 -0
- package/types/_form-field-control-harness-chunk.d.ts +20 -0
- package/types/_form-field-module-chunk.d.ts +18 -0
- package/types/_icon-module-chunk.d.ts +162 -0
- package/types/_icon-registry-chunk.d.ts +271 -0
- package/types/_input-harness-chunk.d.ts +61 -0
- package/types/_line-chunk.d.ts +25 -0
- package/types/_list-option-types-chunk.d.ts +15 -0
- package/types/_option-chunk.d.ts +146 -0
- package/types/_option-harness-chunk.d.ts +35 -0
- package/types/_option-module-chunk.d.ts +13 -0
- package/types/_option-parent-chunk.d.ts +20 -0
- package/types/_paginator-chunk.d.ts +184 -0
- package/types/_palette-chunk.d.ts +4 -0
- package/types/_progress-spinner-chunk.d.ts +91 -0
- package/types/_pseudo-checkbox-module-chunk.d.ts +45 -0
- package/types/_ripple-chunk.d.ts +256 -0
- package/types/_ripple-loader-chunk.d.ts +48 -0
- package/types/_ripple-module-chunk.d.ts +11 -0
- package/types/_sort-chunk.d.ts +88 -0
- package/types/_sort-direction-chunk.d.ts +3 -0
- package/types/_tooltip-chunk.d.ts +315 -0
- package/types/autocomplete-testing.d.ts +53 -0
- package/types/autocomplete.d.ts +420 -0
- package/types/badge-testing.d.ts +36 -0
- package/types/badge.d.ts +14 -0
- package/types/bottom-sheet-testing.d.ts +26 -0
- package/types/bottom-sheet.d.ts +192 -0
- package/types/button-testing.d.ts +70 -0
- package/types/button-toggle-testing.d.ts +97 -0
- package/types/button-toggle.d.ts +16 -0
- package/types/button.d.ts +210 -0
- package/types/card-testing.d.ts +41 -0
- package/types/card.d.ts +156 -0
- package/types/checkbox-testing.d.ts +86 -0
- package/types/checkbox.d.ts +216 -0
- package/types/chips-testing.d.ts +270 -0
- package/types/chips.d.ts +993 -0
- package/types/core-testing.d.ts +32 -0
- package/types/core.d.ts +185 -0
- package/types/datepicker-testing.d.ts +25 -0
- package/types/datepicker.d.ts +1746 -0
- package/types/dialog-testing.d.ts +83 -0
- package/types/dialog.d.ts +84 -0
- package/types/divider-testing.d.ts +15 -0
- package/types/divider.d.ts +24 -0
- package/types/expansion-testing.d.ts +101 -0
- package/types/expansion.d.ts +258 -0
- package/types/form-field-testing-control.d.ts +13 -0
- package/types/form-field-testing.d.ts +127 -0
- package/types/form-field.d.ts +19 -0
- package/types/grid-list-testing.d.ts +82 -0
- package/types/grid-list.d.ts +207 -0
- package/types/icon-testing.d.ts +81 -0
- package/types/icon.d.ts +8 -0
- package/types/input-testing.d.ts +73 -0
- package/types/input.d.ts +208 -0
- package/types/list-testing.d.ts +354 -0
- package/types/list.d.ts +516 -0
- package/types/material.d.ts +3 -0
- package/types/menu-testing.d.ts +141 -0
- package/types/menu.d.ts +547 -0
- package/types/paginator-testing.d.ts +51 -0
- package/types/paginator.d.ts +36 -0
- package/types/progress-bar-testing.d.ts +24 -0
- package/types/progress-bar.d.ts +106 -0
- package/types/progress-spinner-testing.d.ts +28 -0
- package/types/progress-spinner.d.ts +13 -0
- package/types/radio-testing.d.ts +109 -0
- package/types/radio.d.ts +295 -0
- package/types/select-testing.d.ts +63 -0
- package/types/select.d.ts +448 -0
- package/types/sidenav-testing.d.ts +122 -0
- package/types/sidenav.d.ts +335 -0
- package/types/slide-toggle-testing.d.ts +66 -0
- package/types/slide-toggle.d.ts +151 -0
- package/types/slider-testing.d.ts +90 -0
- package/types/slider.d.ts +662 -0
- package/types/snack-bar-testing.d.ts +64 -0
- package/types/snack-bar.d.ts +328 -0
- package/types/sort-testing.d.ts +48 -0
- package/types/sort.d.ts +126 -0
- package/types/stepper-testing.d.ts +136 -0
- package/types/stepper.d.ts +225 -0
- package/types/table-testing.d.ts +174 -0
- package/types/table.d.ts +302 -0
- package/types/tabs-testing.d.ts +145 -0
- package/types/tabs.d.ts +890 -0
- package/types/timepicker-testing.d.ts +108 -0
- package/types/timepicker.d.ts +318 -0
- package/types/toolbar-testing.d.ts +33 -0
- package/types/toolbar.d.ts +44 -0
- package/types/tooltip-testing.d.ts +35 -0
- package/types/tooltip.d.ts +17 -0
- package/types/tree-testing.d.ts +119 -0
- package/types/tree.d.ts +233 -0
|
@@ -0,0 +1,848 @@
|
|
|
1
|
+
import { takeUntil } from 'rxjs/operators';
|
|
2
|
+
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
3
|
+
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { InjectionToken, inject, Injector, ElementRef, NgZone, ViewContainerRef, DOCUMENT, Renderer2, afterNextRender, Directive, Input, ChangeDetectorRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild } from '@angular/core';
|
|
6
|
+
import { Platform } from '@angular/cdk/platform';
|
|
7
|
+
import { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';
|
|
8
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
9
|
+
import { createRepositionScrollStrategy, ScrollDispatcher, createFlexibleConnectedPositionStrategy, createOverlayRef } from '@angular/cdk/overlay';
|
|
10
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
11
|
+
import { MediaMatcher } from '@angular/cdk/layout';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { _animationsDisabled } from './_animation-chunk.mjs';
|
|
14
|
+
|
|
15
|
+
const SCROLL_THROTTLE_MS = 20;
|
|
16
|
+
function getMatTooltipInvalidPositionError(position) {
|
|
17
|
+
return Error(`Tooltip position "${position}" is invalid.`);
|
|
18
|
+
}
|
|
19
|
+
const MAT_TOOLTIP_SCROLL_STRATEGY = new InjectionToken('mat-tooltip-scroll-strategy', {
|
|
20
|
+
providedIn: 'root',
|
|
21
|
+
factory: () => {
|
|
22
|
+
const injector = inject(Injector);
|
|
23
|
+
return () => createRepositionScrollStrategy(injector, {
|
|
24
|
+
scrollThrottle: SCROLL_THROTTLE_MS
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const MAT_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken('mat-tooltip-default-options', {
|
|
29
|
+
providedIn: 'root',
|
|
30
|
+
factory: () => ({
|
|
31
|
+
showDelay: 0,
|
|
32
|
+
hideDelay: 0,
|
|
33
|
+
touchendHideDelay: 1500
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
const TOOLTIP_PANEL_CLASS = 'mat-mdc-tooltip-panel';
|
|
37
|
+
const PANEL_CLASS = 'tooltip-panel';
|
|
38
|
+
const passiveListenerOptions = {
|
|
39
|
+
passive: true
|
|
40
|
+
};
|
|
41
|
+
const MIN_VIEWPORT_TOOLTIP_THRESHOLD = 8;
|
|
42
|
+
const UNBOUNDED_ANCHOR_GAP = 8;
|
|
43
|
+
const MIN_HEIGHT = 24;
|
|
44
|
+
const MAX_WIDTH = 200;
|
|
45
|
+
class MatTooltip {
|
|
46
|
+
_elementRef = inject(ElementRef);
|
|
47
|
+
_ngZone = inject(NgZone);
|
|
48
|
+
_platform = inject(Platform);
|
|
49
|
+
_ariaDescriber = inject(AriaDescriber);
|
|
50
|
+
_focusMonitor = inject(FocusMonitor);
|
|
51
|
+
_dir = inject(Directionality);
|
|
52
|
+
_injector = inject(Injector);
|
|
53
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
54
|
+
_mediaMatcher = inject(MediaMatcher);
|
|
55
|
+
_document = inject(DOCUMENT);
|
|
56
|
+
_renderer = inject(Renderer2);
|
|
57
|
+
_animationsDisabled = _animationsDisabled();
|
|
58
|
+
_defaultOptions = inject(MAT_TOOLTIP_DEFAULT_OPTIONS, {
|
|
59
|
+
optional: true
|
|
60
|
+
});
|
|
61
|
+
_overlayRef = null;
|
|
62
|
+
_tooltipInstance = null;
|
|
63
|
+
_overlayPanelClass;
|
|
64
|
+
_portal;
|
|
65
|
+
_position = 'below';
|
|
66
|
+
_positionAtOrigin = false;
|
|
67
|
+
_disabled = false;
|
|
68
|
+
_tooltipClass;
|
|
69
|
+
_viewInitialized = false;
|
|
70
|
+
_pointerExitEventsInitialized = false;
|
|
71
|
+
_tooltipComponent = TooltipComponent;
|
|
72
|
+
_viewportMargin = 8;
|
|
73
|
+
_currentPosition;
|
|
74
|
+
_cssClassPrefix = 'mat-mdc';
|
|
75
|
+
_ariaDescriptionPending = false;
|
|
76
|
+
_dirSubscribed = false;
|
|
77
|
+
get position() {
|
|
78
|
+
return this._position;
|
|
79
|
+
}
|
|
80
|
+
set position(value) {
|
|
81
|
+
if (value !== this._position) {
|
|
82
|
+
this._position = value;
|
|
83
|
+
if (this._overlayRef) {
|
|
84
|
+
this._updatePosition(this._overlayRef);
|
|
85
|
+
this._tooltipInstance?.show(0);
|
|
86
|
+
this._overlayRef.updatePosition();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
get positionAtOrigin() {
|
|
91
|
+
return this._positionAtOrigin;
|
|
92
|
+
}
|
|
93
|
+
set positionAtOrigin(value) {
|
|
94
|
+
this._positionAtOrigin = coerceBooleanProperty(value);
|
|
95
|
+
this._detach();
|
|
96
|
+
this._overlayRef = null;
|
|
97
|
+
}
|
|
98
|
+
get disabled() {
|
|
99
|
+
return this._disabled;
|
|
100
|
+
}
|
|
101
|
+
set disabled(value) {
|
|
102
|
+
const isDisabled = coerceBooleanProperty(value);
|
|
103
|
+
if (this._disabled !== isDisabled) {
|
|
104
|
+
this._disabled = isDisabled;
|
|
105
|
+
if (isDisabled) {
|
|
106
|
+
this.hide(0);
|
|
107
|
+
} else {
|
|
108
|
+
this._setupPointerEnterEventsIfNeeded();
|
|
109
|
+
}
|
|
110
|
+
this._syncAriaDescription(this.message);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
get showDelay() {
|
|
114
|
+
return this._showDelay;
|
|
115
|
+
}
|
|
116
|
+
set showDelay(value) {
|
|
117
|
+
this._showDelay = coerceNumberProperty(value);
|
|
118
|
+
}
|
|
119
|
+
_showDelay;
|
|
120
|
+
get hideDelay() {
|
|
121
|
+
return this._hideDelay;
|
|
122
|
+
}
|
|
123
|
+
set hideDelay(value) {
|
|
124
|
+
this._hideDelay = coerceNumberProperty(value);
|
|
125
|
+
if (this._tooltipInstance) {
|
|
126
|
+
this._tooltipInstance._mouseLeaveHideDelay = this._hideDelay;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
_hideDelay;
|
|
130
|
+
touchGestures = 'auto';
|
|
131
|
+
get message() {
|
|
132
|
+
return this._message;
|
|
133
|
+
}
|
|
134
|
+
set message(value) {
|
|
135
|
+
const oldMessage = this._message;
|
|
136
|
+
this._message = value != null ? String(value).trim() : '';
|
|
137
|
+
if (!this._message && this._isTooltipVisible()) {
|
|
138
|
+
this.hide(0);
|
|
139
|
+
} else {
|
|
140
|
+
this._setupPointerEnterEventsIfNeeded();
|
|
141
|
+
this._updateTooltipMessage();
|
|
142
|
+
}
|
|
143
|
+
this._syncAriaDescription(oldMessage);
|
|
144
|
+
}
|
|
145
|
+
_message = '';
|
|
146
|
+
get tooltipClass() {
|
|
147
|
+
return this._tooltipClass;
|
|
148
|
+
}
|
|
149
|
+
set tooltipClass(value) {
|
|
150
|
+
this._tooltipClass = value;
|
|
151
|
+
if (this._tooltipInstance) {
|
|
152
|
+
this._setTooltipClass(this._tooltipClass);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
_eventCleanups = [];
|
|
156
|
+
_touchstartTimeout = null;
|
|
157
|
+
_destroyed = new Subject();
|
|
158
|
+
_isDestroyed = false;
|
|
159
|
+
constructor() {
|
|
160
|
+
const defaultOptions = this._defaultOptions;
|
|
161
|
+
if (defaultOptions) {
|
|
162
|
+
this._showDelay = defaultOptions.showDelay;
|
|
163
|
+
this._hideDelay = defaultOptions.hideDelay;
|
|
164
|
+
if (defaultOptions.position) {
|
|
165
|
+
this.position = defaultOptions.position;
|
|
166
|
+
}
|
|
167
|
+
if (defaultOptions.positionAtOrigin) {
|
|
168
|
+
this.positionAtOrigin = defaultOptions.positionAtOrigin;
|
|
169
|
+
}
|
|
170
|
+
if (defaultOptions.touchGestures) {
|
|
171
|
+
this.touchGestures = defaultOptions.touchGestures;
|
|
172
|
+
}
|
|
173
|
+
if (defaultOptions.tooltipClass) {
|
|
174
|
+
this.tooltipClass = defaultOptions.tooltipClass;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
this._viewportMargin = MIN_VIEWPORT_TOOLTIP_THRESHOLD;
|
|
178
|
+
}
|
|
179
|
+
ngAfterViewInit() {
|
|
180
|
+
this._viewInitialized = true;
|
|
181
|
+
this._setupPointerEnterEventsIfNeeded();
|
|
182
|
+
this._focusMonitor.monitor(this._elementRef).pipe(takeUntil(this._destroyed)).subscribe(origin => {
|
|
183
|
+
if (!origin) {
|
|
184
|
+
this._ngZone.run(() => this.hide(0));
|
|
185
|
+
} else if (origin === 'keyboard') {
|
|
186
|
+
this._ngZone.run(() => this.show());
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
ngOnDestroy() {
|
|
191
|
+
const nativeElement = this._elementRef.nativeElement;
|
|
192
|
+
if (this._touchstartTimeout) {
|
|
193
|
+
clearTimeout(this._touchstartTimeout);
|
|
194
|
+
}
|
|
195
|
+
if (this._overlayRef) {
|
|
196
|
+
this._overlayRef.dispose();
|
|
197
|
+
this._tooltipInstance = null;
|
|
198
|
+
}
|
|
199
|
+
this._eventCleanups.forEach(cleanup => cleanup());
|
|
200
|
+
this._eventCleanups.length = 0;
|
|
201
|
+
this._destroyed.next();
|
|
202
|
+
this._destroyed.complete();
|
|
203
|
+
this._isDestroyed = true;
|
|
204
|
+
this._ariaDescriber.removeDescription(nativeElement, this.message, 'tooltip');
|
|
205
|
+
this._focusMonitor.stopMonitoring(nativeElement);
|
|
206
|
+
}
|
|
207
|
+
show(delay = this.showDelay, origin) {
|
|
208
|
+
if (this.disabled || !this.message || this._isTooltipVisible()) {
|
|
209
|
+
this._tooltipInstance?._cancelPendingAnimations();
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const overlayRef = this._createOverlay(origin);
|
|
213
|
+
this._detach();
|
|
214
|
+
this._portal = this._portal || new ComponentPortal(this._tooltipComponent, this._viewContainerRef);
|
|
215
|
+
const instance = this._tooltipInstance = overlayRef.attach(this._portal).instance;
|
|
216
|
+
instance._triggerElement = this._elementRef.nativeElement;
|
|
217
|
+
instance._mouseLeaveHideDelay = this._hideDelay;
|
|
218
|
+
instance.afterHidden().pipe(takeUntil(this._destroyed)).subscribe(() => this._detach());
|
|
219
|
+
this._setTooltipClass(this._tooltipClass);
|
|
220
|
+
this._updateTooltipMessage();
|
|
221
|
+
instance.show(delay);
|
|
222
|
+
}
|
|
223
|
+
hide(delay = this.hideDelay) {
|
|
224
|
+
const instance = this._tooltipInstance;
|
|
225
|
+
if (instance) {
|
|
226
|
+
if (instance.isVisible()) {
|
|
227
|
+
instance.hide(delay);
|
|
228
|
+
} else {
|
|
229
|
+
instance._cancelPendingAnimations();
|
|
230
|
+
this._detach();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
toggle(origin) {
|
|
235
|
+
this._isTooltipVisible() ? this.hide() : this.show(undefined, origin);
|
|
236
|
+
}
|
|
237
|
+
_isTooltipVisible() {
|
|
238
|
+
return !!this._tooltipInstance && this._tooltipInstance.isVisible();
|
|
239
|
+
}
|
|
240
|
+
_createOverlay(origin) {
|
|
241
|
+
if (this._overlayRef) {
|
|
242
|
+
const existingStrategy = this._overlayRef.getConfig().positionStrategy;
|
|
243
|
+
if ((!this.positionAtOrigin || !origin) && existingStrategy._origin instanceof ElementRef) {
|
|
244
|
+
return this._overlayRef;
|
|
245
|
+
}
|
|
246
|
+
this._detach();
|
|
247
|
+
}
|
|
248
|
+
const scrollableAncestors = this._injector.get(ScrollDispatcher).getAncestorScrollContainers(this._elementRef);
|
|
249
|
+
const panelClass = `${this._cssClassPrefix}-${PANEL_CLASS}`;
|
|
250
|
+
const strategy = createFlexibleConnectedPositionStrategy(this._injector, this.positionAtOrigin ? origin || this._elementRef : this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(scrollableAncestors).withPopoverLocation('global');
|
|
251
|
+
strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe(change => {
|
|
252
|
+
this._updateCurrentPositionClass(change.connectionPair);
|
|
253
|
+
if (this._tooltipInstance) {
|
|
254
|
+
if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {
|
|
255
|
+
this._ngZone.run(() => this.hide(0));
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
this._overlayRef = createOverlayRef(this._injector, {
|
|
260
|
+
direction: this._dir,
|
|
261
|
+
positionStrategy: strategy,
|
|
262
|
+
panelClass: this._overlayPanelClass ? [...this._overlayPanelClass, panelClass] : panelClass,
|
|
263
|
+
scrollStrategy: this._injector.get(MAT_TOOLTIP_SCROLL_STRATEGY)(),
|
|
264
|
+
disableAnimations: this._animationsDisabled,
|
|
265
|
+
eventPredicate: this._overlayEventPredicate
|
|
266
|
+
});
|
|
267
|
+
this._updatePosition(this._overlayRef);
|
|
268
|
+
this._overlayRef.detachments().pipe(takeUntil(this._destroyed)).subscribe(() => this._detach());
|
|
269
|
+
this._overlayRef.outsidePointerEvents().pipe(takeUntil(this._destroyed)).subscribe(() => this._tooltipInstance?._handleBodyInteraction());
|
|
270
|
+
this._overlayRef.keydownEvents().pipe(takeUntil(this._destroyed)).subscribe(event => {
|
|
271
|
+
event.preventDefault();
|
|
272
|
+
event.stopPropagation();
|
|
273
|
+
this._ngZone.run(() => this.hide(0));
|
|
274
|
+
});
|
|
275
|
+
if (this._defaultOptions?.disableTooltipInteractivity) {
|
|
276
|
+
this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`);
|
|
277
|
+
}
|
|
278
|
+
if (!this._dirSubscribed) {
|
|
279
|
+
this._dirSubscribed = true;
|
|
280
|
+
this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
281
|
+
if (this._overlayRef) {
|
|
282
|
+
this._updatePosition(this._overlayRef);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
return this._overlayRef;
|
|
287
|
+
}
|
|
288
|
+
_detach() {
|
|
289
|
+
if (this._overlayRef && this._overlayRef.hasAttached()) {
|
|
290
|
+
this._overlayRef.detach();
|
|
291
|
+
}
|
|
292
|
+
this._tooltipInstance = null;
|
|
293
|
+
}
|
|
294
|
+
_updatePosition(overlayRef) {
|
|
295
|
+
const position = overlayRef.getConfig().positionStrategy;
|
|
296
|
+
const origin = this._getOrigin();
|
|
297
|
+
const overlay = this._getOverlayPosition();
|
|
298
|
+
position.withPositions([this._addOffset({
|
|
299
|
+
...origin.main,
|
|
300
|
+
...overlay.main
|
|
301
|
+
}), this._addOffset({
|
|
302
|
+
...origin.fallback,
|
|
303
|
+
...overlay.fallback
|
|
304
|
+
})]);
|
|
305
|
+
}
|
|
306
|
+
_addOffset(position) {
|
|
307
|
+
const offset = UNBOUNDED_ANCHOR_GAP;
|
|
308
|
+
const isLtr = !this._dir || this._dir.value == 'ltr';
|
|
309
|
+
if (position.originY === 'top') {
|
|
310
|
+
position.offsetY = -offset;
|
|
311
|
+
} else if (position.originY === 'bottom') {
|
|
312
|
+
position.offsetY = offset;
|
|
313
|
+
} else if (position.originX === 'start') {
|
|
314
|
+
position.offsetX = isLtr ? -offset : offset;
|
|
315
|
+
} else if (position.originX === 'end') {
|
|
316
|
+
position.offsetX = isLtr ? offset : -offset;
|
|
317
|
+
}
|
|
318
|
+
return position;
|
|
319
|
+
}
|
|
320
|
+
_getOrigin() {
|
|
321
|
+
const isLtr = !this._dir || this._dir.value == 'ltr';
|
|
322
|
+
const position = this.position;
|
|
323
|
+
let originPosition;
|
|
324
|
+
if (position == 'above' || position == 'below') {
|
|
325
|
+
originPosition = {
|
|
326
|
+
originX: 'center',
|
|
327
|
+
originY: position == 'above' ? 'top' : 'bottom'
|
|
328
|
+
};
|
|
329
|
+
} else if (position == 'before' || position == 'left' && isLtr || position == 'right' && !isLtr) {
|
|
330
|
+
originPosition = {
|
|
331
|
+
originX: 'start',
|
|
332
|
+
originY: 'center'
|
|
333
|
+
};
|
|
334
|
+
} else if (position == 'after' || position == 'right' && isLtr || position == 'left' && !isLtr) {
|
|
335
|
+
originPosition = {
|
|
336
|
+
originX: 'end',
|
|
337
|
+
originY: 'center'
|
|
338
|
+
};
|
|
339
|
+
} else if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
340
|
+
throw getMatTooltipInvalidPositionError(position);
|
|
341
|
+
}
|
|
342
|
+
const {
|
|
343
|
+
x,
|
|
344
|
+
y
|
|
345
|
+
} = this._invertPosition(originPosition.originX, originPosition.originY);
|
|
346
|
+
return {
|
|
347
|
+
main: originPosition,
|
|
348
|
+
fallback: {
|
|
349
|
+
originX: x,
|
|
350
|
+
originY: y
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
_getOverlayPosition() {
|
|
355
|
+
const isLtr = !this._dir || this._dir.value == 'ltr';
|
|
356
|
+
const position = this.position;
|
|
357
|
+
let overlayPosition;
|
|
358
|
+
if (position == 'above') {
|
|
359
|
+
overlayPosition = {
|
|
360
|
+
overlayX: 'center',
|
|
361
|
+
overlayY: 'bottom'
|
|
362
|
+
};
|
|
363
|
+
} else if (position == 'below') {
|
|
364
|
+
overlayPosition = {
|
|
365
|
+
overlayX: 'center',
|
|
366
|
+
overlayY: 'top'
|
|
367
|
+
};
|
|
368
|
+
} else if (position == 'before' || position == 'left' && isLtr || position == 'right' && !isLtr) {
|
|
369
|
+
overlayPosition = {
|
|
370
|
+
overlayX: 'end',
|
|
371
|
+
overlayY: 'center'
|
|
372
|
+
};
|
|
373
|
+
} else if (position == 'after' || position == 'right' && isLtr || position == 'left' && !isLtr) {
|
|
374
|
+
overlayPosition = {
|
|
375
|
+
overlayX: 'start',
|
|
376
|
+
overlayY: 'center'
|
|
377
|
+
};
|
|
378
|
+
} else if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
379
|
+
throw getMatTooltipInvalidPositionError(position);
|
|
380
|
+
}
|
|
381
|
+
const {
|
|
382
|
+
x,
|
|
383
|
+
y
|
|
384
|
+
} = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);
|
|
385
|
+
return {
|
|
386
|
+
main: overlayPosition,
|
|
387
|
+
fallback: {
|
|
388
|
+
overlayX: x,
|
|
389
|
+
overlayY: y
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
_updateTooltipMessage() {
|
|
394
|
+
if (this._tooltipInstance) {
|
|
395
|
+
this._tooltipInstance.message = this.message;
|
|
396
|
+
this._tooltipInstance._markForCheck();
|
|
397
|
+
afterNextRender(() => {
|
|
398
|
+
if (this._tooltipInstance) {
|
|
399
|
+
this._overlayRef.updatePosition();
|
|
400
|
+
}
|
|
401
|
+
}, {
|
|
402
|
+
injector: this._injector
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
_setTooltipClass(tooltipClass) {
|
|
407
|
+
if (this._tooltipInstance) {
|
|
408
|
+
this._tooltipInstance.tooltipClass = tooltipClass instanceof Set ? Array.from(tooltipClass) : tooltipClass;
|
|
409
|
+
this._tooltipInstance._markForCheck();
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
_invertPosition(x, y) {
|
|
413
|
+
if (this.position === 'above' || this.position === 'below') {
|
|
414
|
+
if (y === 'top') {
|
|
415
|
+
y = 'bottom';
|
|
416
|
+
} else if (y === 'bottom') {
|
|
417
|
+
y = 'top';
|
|
418
|
+
}
|
|
419
|
+
} else {
|
|
420
|
+
if (x === 'end') {
|
|
421
|
+
x = 'start';
|
|
422
|
+
} else if (x === 'start') {
|
|
423
|
+
x = 'end';
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return {
|
|
427
|
+
x,
|
|
428
|
+
y
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
_updateCurrentPositionClass(connectionPair) {
|
|
432
|
+
const {
|
|
433
|
+
overlayY,
|
|
434
|
+
originX,
|
|
435
|
+
originY
|
|
436
|
+
} = connectionPair;
|
|
437
|
+
let newPosition;
|
|
438
|
+
if (overlayY === 'center') {
|
|
439
|
+
if (this._dir && this._dir.value === 'rtl') {
|
|
440
|
+
newPosition = originX === 'end' ? 'left' : 'right';
|
|
441
|
+
} else {
|
|
442
|
+
newPosition = originX === 'start' ? 'left' : 'right';
|
|
443
|
+
}
|
|
444
|
+
} else {
|
|
445
|
+
newPosition = overlayY === 'bottom' && originY === 'top' ? 'above' : 'below';
|
|
446
|
+
}
|
|
447
|
+
if (newPosition !== this._currentPosition) {
|
|
448
|
+
const overlayRef = this._overlayRef;
|
|
449
|
+
if (overlayRef) {
|
|
450
|
+
const classPrefix = `${this._cssClassPrefix}-${PANEL_CLASS}-`;
|
|
451
|
+
overlayRef.removePanelClass(classPrefix + this._currentPosition);
|
|
452
|
+
overlayRef.addPanelClass(classPrefix + newPosition);
|
|
453
|
+
}
|
|
454
|
+
this._currentPosition = newPosition;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
_setupPointerEnterEventsIfNeeded() {
|
|
458
|
+
if (this._disabled || !this.message || !this._viewInitialized || this._eventCleanups.length) {
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (!this._isTouchPlatform()) {
|
|
462
|
+
this._addListener('mouseenter', event => {
|
|
463
|
+
this._setupPointerExitEventsIfNeeded();
|
|
464
|
+
let point = undefined;
|
|
465
|
+
if (event.x !== undefined && event.y !== undefined) {
|
|
466
|
+
point = event;
|
|
467
|
+
}
|
|
468
|
+
this.show(undefined, point);
|
|
469
|
+
});
|
|
470
|
+
} else if (this.touchGestures !== 'off') {
|
|
471
|
+
this._disableNativeGesturesIfNecessary();
|
|
472
|
+
this._addListener('touchstart', event => {
|
|
473
|
+
const touch = event.targetTouches?.[0];
|
|
474
|
+
const origin = touch ? {
|
|
475
|
+
x: touch.clientX,
|
|
476
|
+
y: touch.clientY
|
|
477
|
+
} : undefined;
|
|
478
|
+
this._setupPointerExitEventsIfNeeded();
|
|
479
|
+
if (this._touchstartTimeout) {
|
|
480
|
+
clearTimeout(this._touchstartTimeout);
|
|
481
|
+
}
|
|
482
|
+
const DEFAULT_LONGPRESS_DELAY = 500;
|
|
483
|
+
this._touchstartTimeout = setTimeout(() => {
|
|
484
|
+
this._touchstartTimeout = null;
|
|
485
|
+
this.show(undefined, origin);
|
|
486
|
+
}, this._defaultOptions?.touchLongPressShowDelay ?? DEFAULT_LONGPRESS_DELAY);
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
_setupPointerExitEventsIfNeeded() {
|
|
491
|
+
if (this._pointerExitEventsInitialized) {
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
this._pointerExitEventsInitialized = true;
|
|
495
|
+
if (!this._isTouchPlatform()) {
|
|
496
|
+
this._addListener('mouseleave', event => {
|
|
497
|
+
const newTarget = event.relatedTarget;
|
|
498
|
+
if (!newTarget || !this._overlayRef?.overlayElement.contains(newTarget)) {
|
|
499
|
+
this.hide();
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
this._addListener('wheel', event => {
|
|
503
|
+
if (this._isTooltipVisible()) {
|
|
504
|
+
const elementUnderPointer = this._document.elementFromPoint(event.clientX, event.clientY);
|
|
505
|
+
const element = this._elementRef.nativeElement;
|
|
506
|
+
if (elementUnderPointer !== element && !element.contains(elementUnderPointer)) {
|
|
507
|
+
this.hide();
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
} else if (this.touchGestures !== 'off') {
|
|
512
|
+
this._disableNativeGesturesIfNecessary();
|
|
513
|
+
const touchendListener = () => {
|
|
514
|
+
if (this._touchstartTimeout) {
|
|
515
|
+
clearTimeout(this._touchstartTimeout);
|
|
516
|
+
}
|
|
517
|
+
this.hide(this._defaultOptions?.touchendHideDelay);
|
|
518
|
+
};
|
|
519
|
+
this._addListener('touchend', touchendListener);
|
|
520
|
+
this._addListener('touchcancel', touchendListener);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
_addListener(name, listener) {
|
|
524
|
+
this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement, name, listener, passiveListenerOptions));
|
|
525
|
+
}
|
|
526
|
+
_isTouchPlatform() {
|
|
527
|
+
if (this._platform.IOS || this._platform.ANDROID) {
|
|
528
|
+
return true;
|
|
529
|
+
} else if (!this._platform.isBrowser) {
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
532
|
+
return !!this._defaultOptions?.detectHoverCapability && this._mediaMatcher.matchMedia('(any-hover: none)').matches;
|
|
533
|
+
}
|
|
534
|
+
_disableNativeGesturesIfNecessary() {
|
|
535
|
+
const gestures = this.touchGestures;
|
|
536
|
+
if (gestures !== 'off') {
|
|
537
|
+
const element = this._elementRef.nativeElement;
|
|
538
|
+
const style = element.style;
|
|
539
|
+
if (gestures === 'on' || element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA') {
|
|
540
|
+
style.userSelect = style.msUserSelect = style.webkitUserSelect = style.MozUserSelect = 'none';
|
|
541
|
+
}
|
|
542
|
+
if (gestures === 'on' || !element.draggable) {
|
|
543
|
+
style.webkitUserDrag = 'none';
|
|
544
|
+
}
|
|
545
|
+
style.touchAction = 'none';
|
|
546
|
+
style.webkitTapHighlightColor = 'transparent';
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
_syncAriaDescription(oldMessage) {
|
|
550
|
+
if (this._ariaDescriptionPending) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
this._ariaDescriptionPending = true;
|
|
554
|
+
this._ariaDescriber.removeDescription(this._elementRef.nativeElement, oldMessage, 'tooltip');
|
|
555
|
+
if (!this._isDestroyed) {
|
|
556
|
+
afterNextRender({
|
|
557
|
+
write: () => {
|
|
558
|
+
this._ariaDescriptionPending = false;
|
|
559
|
+
if (this.message && !this.disabled) {
|
|
560
|
+
this._ariaDescriber.describe(this._elementRef.nativeElement, this.message, 'tooltip');
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}, {
|
|
564
|
+
injector: this._injector
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
_overlayEventPredicate = event => {
|
|
569
|
+
if (event.type === 'keydown') {
|
|
570
|
+
return this._isTooltipVisible() && event.keyCode === ESCAPE && !hasModifierKey(event);
|
|
571
|
+
}
|
|
572
|
+
return true;
|
|
573
|
+
};
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
575
|
+
minVersion: "12.0.0",
|
|
576
|
+
version: "22.0.0-next.1",
|
|
577
|
+
ngImport: i0,
|
|
578
|
+
type: MatTooltip,
|
|
579
|
+
deps: [],
|
|
580
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
581
|
+
});
|
|
582
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
583
|
+
minVersion: "14.0.0",
|
|
584
|
+
version: "22.0.0-next.1",
|
|
585
|
+
type: MatTooltip,
|
|
586
|
+
isStandalone: true,
|
|
587
|
+
selector: "[matTooltip]",
|
|
588
|
+
inputs: {
|
|
589
|
+
position: ["matTooltipPosition", "position"],
|
|
590
|
+
positionAtOrigin: ["matTooltipPositionAtOrigin", "positionAtOrigin"],
|
|
591
|
+
disabled: ["matTooltipDisabled", "disabled"],
|
|
592
|
+
showDelay: ["matTooltipShowDelay", "showDelay"],
|
|
593
|
+
hideDelay: ["matTooltipHideDelay", "hideDelay"],
|
|
594
|
+
touchGestures: ["matTooltipTouchGestures", "touchGestures"],
|
|
595
|
+
message: ["matTooltip", "message"],
|
|
596
|
+
tooltipClass: ["matTooltipClass", "tooltipClass"]
|
|
597
|
+
},
|
|
598
|
+
host: {
|
|
599
|
+
properties: {
|
|
600
|
+
"class.mat-mdc-tooltip-disabled": "disabled"
|
|
601
|
+
},
|
|
602
|
+
classAttribute: "mat-mdc-tooltip-trigger"
|
|
603
|
+
},
|
|
604
|
+
exportAs: ["matTooltip"],
|
|
605
|
+
ngImport: i0
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
609
|
+
minVersion: "12.0.0",
|
|
610
|
+
version: "22.0.0-next.1",
|
|
611
|
+
ngImport: i0,
|
|
612
|
+
type: MatTooltip,
|
|
613
|
+
decorators: [{
|
|
614
|
+
type: Directive,
|
|
615
|
+
args: [{
|
|
616
|
+
selector: '[matTooltip]',
|
|
617
|
+
exportAs: 'matTooltip',
|
|
618
|
+
host: {
|
|
619
|
+
'class': 'mat-mdc-tooltip-trigger',
|
|
620
|
+
'[class.mat-mdc-tooltip-disabled]': 'disabled'
|
|
621
|
+
}
|
|
622
|
+
}]
|
|
623
|
+
}],
|
|
624
|
+
ctorParameters: () => [],
|
|
625
|
+
propDecorators: {
|
|
626
|
+
position: [{
|
|
627
|
+
type: Input,
|
|
628
|
+
args: ['matTooltipPosition']
|
|
629
|
+
}],
|
|
630
|
+
positionAtOrigin: [{
|
|
631
|
+
type: Input,
|
|
632
|
+
args: ['matTooltipPositionAtOrigin']
|
|
633
|
+
}],
|
|
634
|
+
disabled: [{
|
|
635
|
+
type: Input,
|
|
636
|
+
args: ['matTooltipDisabled']
|
|
637
|
+
}],
|
|
638
|
+
showDelay: [{
|
|
639
|
+
type: Input,
|
|
640
|
+
args: ['matTooltipShowDelay']
|
|
641
|
+
}],
|
|
642
|
+
hideDelay: [{
|
|
643
|
+
type: Input,
|
|
644
|
+
args: ['matTooltipHideDelay']
|
|
645
|
+
}],
|
|
646
|
+
touchGestures: [{
|
|
647
|
+
type: Input,
|
|
648
|
+
args: ['matTooltipTouchGestures']
|
|
649
|
+
}],
|
|
650
|
+
message: [{
|
|
651
|
+
type: Input,
|
|
652
|
+
args: ['matTooltip']
|
|
653
|
+
}],
|
|
654
|
+
tooltipClass: [{
|
|
655
|
+
type: Input,
|
|
656
|
+
args: ['matTooltipClass']
|
|
657
|
+
}]
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
class TooltipComponent {
|
|
661
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
662
|
+
_elementRef = inject(ElementRef);
|
|
663
|
+
_isMultiline = false;
|
|
664
|
+
message;
|
|
665
|
+
tooltipClass;
|
|
666
|
+
_showTimeoutId;
|
|
667
|
+
_hideTimeoutId;
|
|
668
|
+
_triggerElement;
|
|
669
|
+
_mouseLeaveHideDelay;
|
|
670
|
+
_animationsDisabled = _animationsDisabled();
|
|
671
|
+
_tooltip;
|
|
672
|
+
_closeOnInteraction = false;
|
|
673
|
+
_isVisible = false;
|
|
674
|
+
_onHide = new Subject();
|
|
675
|
+
_showAnimation = 'mat-mdc-tooltip-show';
|
|
676
|
+
_hideAnimation = 'mat-mdc-tooltip-hide';
|
|
677
|
+
constructor() {}
|
|
678
|
+
show(delay) {
|
|
679
|
+
if (this._hideTimeoutId != null) {
|
|
680
|
+
clearTimeout(this._hideTimeoutId);
|
|
681
|
+
}
|
|
682
|
+
this._showTimeoutId = setTimeout(() => {
|
|
683
|
+
this._toggleVisibility(true);
|
|
684
|
+
this._showTimeoutId = undefined;
|
|
685
|
+
}, delay);
|
|
686
|
+
}
|
|
687
|
+
hide(delay) {
|
|
688
|
+
if (this._showTimeoutId != null) {
|
|
689
|
+
clearTimeout(this._showTimeoutId);
|
|
690
|
+
}
|
|
691
|
+
this._hideTimeoutId = setTimeout(() => {
|
|
692
|
+
this._toggleVisibility(false);
|
|
693
|
+
this._hideTimeoutId = undefined;
|
|
694
|
+
}, delay);
|
|
695
|
+
}
|
|
696
|
+
afterHidden() {
|
|
697
|
+
return this._onHide;
|
|
698
|
+
}
|
|
699
|
+
isVisible() {
|
|
700
|
+
return this._isVisible;
|
|
701
|
+
}
|
|
702
|
+
ngOnDestroy() {
|
|
703
|
+
this._cancelPendingAnimations();
|
|
704
|
+
this._onHide.complete();
|
|
705
|
+
this._triggerElement = null;
|
|
706
|
+
}
|
|
707
|
+
_handleBodyInteraction() {
|
|
708
|
+
if (this._closeOnInteraction) {
|
|
709
|
+
this.hide(0);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
_markForCheck() {
|
|
713
|
+
this._changeDetectorRef.markForCheck();
|
|
714
|
+
}
|
|
715
|
+
_handleMouseLeave({
|
|
716
|
+
relatedTarget
|
|
717
|
+
}) {
|
|
718
|
+
if (!relatedTarget || !this._triggerElement.contains(relatedTarget)) {
|
|
719
|
+
if (this.isVisible()) {
|
|
720
|
+
this.hide(this._mouseLeaveHideDelay);
|
|
721
|
+
} else {
|
|
722
|
+
this._finalizeAnimation(false);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
_onShow() {
|
|
727
|
+
this._isMultiline = this._isTooltipMultiline();
|
|
728
|
+
this._markForCheck();
|
|
729
|
+
}
|
|
730
|
+
_isTooltipMultiline() {
|
|
731
|
+
const rect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
732
|
+
return rect.height > MIN_HEIGHT && rect.width >= MAX_WIDTH;
|
|
733
|
+
}
|
|
734
|
+
_handleAnimationEnd({
|
|
735
|
+
animationName
|
|
736
|
+
}) {
|
|
737
|
+
if (animationName === this._showAnimation || animationName === this._hideAnimation) {
|
|
738
|
+
this._finalizeAnimation(animationName === this._showAnimation);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
_cancelPendingAnimations() {
|
|
742
|
+
if (this._showTimeoutId != null) {
|
|
743
|
+
clearTimeout(this._showTimeoutId);
|
|
744
|
+
}
|
|
745
|
+
if (this._hideTimeoutId != null) {
|
|
746
|
+
clearTimeout(this._hideTimeoutId);
|
|
747
|
+
}
|
|
748
|
+
this._showTimeoutId = this._hideTimeoutId = undefined;
|
|
749
|
+
}
|
|
750
|
+
_finalizeAnimation(toVisible) {
|
|
751
|
+
if (toVisible) {
|
|
752
|
+
this._closeOnInteraction = true;
|
|
753
|
+
} else if (!this.isVisible()) {
|
|
754
|
+
this._onHide.next();
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
_toggleVisibility(isVisible) {
|
|
758
|
+
const tooltip = this._tooltip.nativeElement;
|
|
759
|
+
const showClass = this._showAnimation;
|
|
760
|
+
const hideClass = this._hideAnimation;
|
|
761
|
+
tooltip.classList.remove(isVisible ? hideClass : showClass);
|
|
762
|
+
tooltip.classList.add(isVisible ? showClass : hideClass);
|
|
763
|
+
if (this._isVisible !== isVisible) {
|
|
764
|
+
this._isVisible = isVisible;
|
|
765
|
+
this._changeDetectorRef.markForCheck();
|
|
766
|
+
}
|
|
767
|
+
if (isVisible && !this._animationsDisabled && typeof getComputedStyle === 'function') {
|
|
768
|
+
const styles = getComputedStyle(tooltip);
|
|
769
|
+
if (styles.getPropertyValue('animation-duration') === '0s' || styles.getPropertyValue('animation-name') === 'none') {
|
|
770
|
+
this._animationsDisabled = true;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
if (isVisible) {
|
|
774
|
+
this._onShow();
|
|
775
|
+
}
|
|
776
|
+
if (this._animationsDisabled) {
|
|
777
|
+
tooltip.classList.add('_mat-animation-noopable');
|
|
778
|
+
this._finalizeAnimation(isVisible);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
782
|
+
minVersion: "12.0.0",
|
|
783
|
+
version: "22.0.0-next.1",
|
|
784
|
+
ngImport: i0,
|
|
785
|
+
type: TooltipComponent,
|
|
786
|
+
deps: [],
|
|
787
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
788
|
+
});
|
|
789
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
790
|
+
minVersion: "14.0.0",
|
|
791
|
+
version: "22.0.0-next.1",
|
|
792
|
+
type: TooltipComponent,
|
|
793
|
+
isStandalone: true,
|
|
794
|
+
selector: "mat-tooltip-component",
|
|
795
|
+
host: {
|
|
796
|
+
attributes: {
|
|
797
|
+
"aria-hidden": "true"
|
|
798
|
+
},
|
|
799
|
+
listeners: {
|
|
800
|
+
"mouseleave": "_handleMouseLeave($event)"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
viewQueries: [{
|
|
804
|
+
propertyName: "_tooltip",
|
|
805
|
+
first: true,
|
|
806
|
+
predicate: ["tooltip"],
|
|
807
|
+
descendants: true,
|
|
808
|
+
static: true
|
|
809
|
+
}],
|
|
810
|
+
ngImport: i0,
|
|
811
|
+
template: "<div\n #tooltip\n class=\"mdc-tooltip mat-mdc-tooltip\"\n [class]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mat-mdc-tooltip-surface mdc-tooltip__surface\">{{message}}</div>\n</div>\n",
|
|
812
|
+
styles: [".mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:\"\";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}\n"],
|
|
813
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
814
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
818
|
+
minVersion: "12.0.0",
|
|
819
|
+
version: "22.0.0-next.1",
|
|
820
|
+
ngImport: i0,
|
|
821
|
+
type: TooltipComponent,
|
|
822
|
+
decorators: [{
|
|
823
|
+
type: Component,
|
|
824
|
+
args: [{
|
|
825
|
+
selector: 'mat-tooltip-component',
|
|
826
|
+
encapsulation: ViewEncapsulation.None,
|
|
827
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
828
|
+
host: {
|
|
829
|
+
'(mouseleave)': '_handleMouseLeave($event)',
|
|
830
|
+
'aria-hidden': 'true'
|
|
831
|
+
},
|
|
832
|
+
template: "<div\n #tooltip\n class=\"mdc-tooltip mat-mdc-tooltip\"\n [class]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mat-mdc-tooltip-surface mdc-tooltip__surface\">{{message}}</div>\n</div>\n",
|
|
833
|
+
styles: [".mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:\"\";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}\n"]
|
|
834
|
+
}]
|
|
835
|
+
}],
|
|
836
|
+
ctorParameters: () => [],
|
|
837
|
+
propDecorators: {
|
|
838
|
+
_tooltip: [{
|
|
839
|
+
type: ViewChild,
|
|
840
|
+
args: ['tooltip', {
|
|
841
|
+
static: true
|
|
842
|
+
}]
|
|
843
|
+
}]
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
export { MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_SCROLL_STRATEGY, MatTooltip, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipComponent, getMatTooltipInvalidPositionError };
|
|
848
|
+
//# sourceMappingURL=_tooltip-chunk.mjs.map
|