@angular/material 20.0.0-next.0 → 20.0.0-next.2
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/autocomplete/_autocomplete-theme.scss +4 -4
- package/autocomplete/index.d.ts +96 -126
- package/autocomplete/testing/index.d.ts +6 -11
- package/badge/_badge-theme.scss +5 -5
- package/badge/index.d.ts +8 -112
- package/badge/testing/index.d.ts +7 -8
- package/badge.d-49a8a74b.d.ts +98 -0
- package/bottom-sheet/_bottom-sheet-theme.scss +3 -3
- package/bottom-sheet/index.d.ts +88 -103
- package/bottom-sheet/testing/index.d.ts +4 -6
- package/button/_button-theme.scss +84 -32
- package/button/_fab-theme.scss +13 -13
- package/button/_icon-button-theme.scss +5 -5
- package/button/index.d.ts +10 -245
- package/button/testing/index.d.ts +13 -10
- package/button-toggle/_button-toggle-theme.scss +8 -8
- package/button-toggle/index.d.ts +12 -285
- package/button-toggle/testing/index.d.ts +38 -37
- package/button-toggle.d-edc8acff.d.ts +257 -0
- package/card/_card-theme.scss +12 -12
- package/card/index.d.ts +80 -117
- package/card/testing/index.d.ts +11 -15
- package/checkbox/_checkbox-theme.scss +10 -10
- package/checkbox/index.d.ts +43 -104
- package/checkbox/testing/index.d.ts +6 -10
- package/chips/_chips-theme.scss +14 -14
- package/chips/index.d.ts +599 -693
- package/chips/testing/index.d.ts +78 -93
- package/common-module.d-0e6515ae.d.ts +43 -0
- package/core/_core-theme.scss +2 -2
- package/core/index.d.ts +50 -979
- package/core/option/_optgroup-theme.scss +2 -2
- package/core/option/_option-theme.scss +4 -4
- package/core/ripple/_ripple-theme.scss +3 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +4 -4
- package/core/testing/index.d.ts +3 -65
- package/core/theming/_color-api-backwards-compatibility.scss +19 -8
- package/core/tokens/_density.scss +3 -0
- package/core/tokens/_token-definition.scss +1 -2
- package/core/tokens/_token-utils.scss +20 -5
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m2/mat/_tonal-button.scss +110 -0
- package/core/tokens/m3/_index.scss +2 -0
- package/core/tokens/m3/definitions/_index.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
- package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
- package/core/tokens/m3/mat/_tonal-button.scss +101 -0
- package/date-adapter.d-c6835d41.d.ts +267 -0
- package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
- package/datepicker/_datepicker-theme.scss +8 -7
- package/datepicker/index.d.ts +1332 -1482
- package/datepicker/testing/index.d.ts +5 -287
- package/dialog/_dialog-theme.scss +6 -6
- package/dialog/index.d.ts +59 -453
- package/dialog/testing/index.d.ts +22 -26
- package/dialog.d-57867441.d.ts +335 -0
- package/divider/_divider-theme.scss +2 -2
- package/divider/index.d.ts +6 -11
- package/divider/testing/index.d.ts +2 -16
- package/divider-harness.d-d34fede4.d.ts +14 -0
- package/error-options.d-448d9046.d.ts +17 -0
- package/expansion/_expansion-theme.scss +4 -4
- package/expansion/index.d.ts +139 -190
- package/expansion/testing/index.d.ts +25 -31
- package/fesm2022/autocomplete/testing.mjs +2 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +56 -32
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +14 -17
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +13 -15
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +34 -15
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +22 -15
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +14 -395
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +49 -51
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +32 -73
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +51 -46
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module-2d64df09.mjs +42 -0
- package/fesm2022/common-module-2d64df09.mjs.map +1 -0
- package/fesm2022/core/testing.mjs +3 -76
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +38 -1598
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-b618acb8.mjs +190 -0
- package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
- package/fesm2022/date-range-input-harness-de70be6a.mjs +467 -0
- package/fesm2022/date-range-input-harness-de70be6a.mjs.map +1 -0
- package/fesm2022/datepicker/testing.mjs +5 -465
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +162 -131
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +12 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +14 -895
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +2 -17
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider-harness-8099453f.mjs +18 -0
- package/fesm2022/divider-harness-8099453f.mjs.map +1 -0
- package/fesm2022/divider.mjs +10 -12
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options-4a00765e.mjs +29 -0
- package/fesm2022/error-options-4a00765e.mjs.map +1 -0
- package/fesm2022/error-state-8f4ce1af.mjs +37 -0
- package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +30 -32
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs +2 -10
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +7 -6
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field-6d755764.mjs +1076 -0
- package/fesm2022/form-field-6d755764.mjs.map +1 -0
- package/fesm2022/form-field-control-harness-efefd4cf.mjs +11 -0
- package/fesm2022/form-field-control-harness-efefd4cf.mjs.map +1 -0
- package/fesm2022/form-field.mjs +14 -1110
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +30 -173
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +12 -12
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button-0850d958.mjs +211 -0
- package/fesm2022/icon-button-0850d958.mjs.map +1 -0
- package/fesm2022/icon-module-3f77a24d.mjs +395 -0
- package/fesm2022/icon-module-3f77a24d.mjs.map +1 -0
- package/fesm2022/icon-registry-13a3b98e.mjs +639 -0
- package/fesm2022/icon-registry-13a3b98e.mjs.map +1 -0
- package/fesm2022/icon.mjs +11 -1016
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-1763d3a6.mjs +22 -0
- package/fesm2022/index-1763d3a6.mjs.map +1 -0
- package/fesm2022/index-4bc1d6d3.mjs +20 -0
- package/fesm2022/index-4bc1d6d3.mjs.map +1 -0
- package/fesm2022/input/testing.mjs +5 -113
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-e68bb132.mjs +115 -0
- package/fesm2022/input-harness-e68bb132.mjs.map +1 -0
- package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
- package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
- package/fesm2022/input.mjs +21 -23
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field-434c4039.mjs +27 -0
- package/fesm2022/internal-form-field-434c4039.mjs.map +1 -0
- package/fesm2022/line-d6afe347.mjs +59 -0
- package/fesm2022/line-d6afe347.mjs.map +1 -0
- package/fesm2022/list/testing.mjs +2 -2
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +59 -56
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +37 -25
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/module-1c16a0a9.mjs +1293 -0
- package/fesm2022/module-1c16a0a9.mjs.map +1 -0
- package/fesm2022/module-47e3be58.mjs +970 -0
- package/fesm2022/module-47e3be58.mjs.map +1 -0
- package/fesm2022/module-a5f9ab72.mjs +875 -0
- package/fesm2022/module-a5f9ab72.mjs.map +1 -0
- package/fesm2022/module-cf951a02.mjs +214 -0
- package/fesm2022/module-cf951a02.mjs.map +1 -0
- package/fesm2022/module-d757bba0.mjs +38 -0
- package/fesm2022/module-d757bba0.mjs.map +1 -0
- package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
- package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
- package/fesm2022/option-07c3c660.mjs +348 -0
- package/fesm2022/option-07c3c660.mjs.map +1 -0
- package/fesm2022/option-harness-3b7c1106.mjs +46 -0
- package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
- package/fesm2022/paginator/testing.mjs +4 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +52 -22
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +0 -4
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +15 -13
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +0 -4
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +15 -13
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-af5a4ea4.mjs +52 -0
- package/fesm2022/pseudo-checkbox-af5a4ea4.mjs.map +1 -0
- package/fesm2022/pseudo-checkbox-module-216fae38.mjs +20 -0
- package/fesm2022/pseudo-checkbox-module-216fae38.mjs.map +1 -0
- package/fesm2022/public-api-c5ab57f5.mjs +147 -0
- package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +23 -15
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-9939d1f5.mjs +639 -0
- package/fesm2022/ripple-9939d1f5.mjs.map +1 -0
- package/fesm2022/ripple-loader-f2078c66.mjs +165 -0
- package/fesm2022/ripple-loader-f2078c66.mjs.map +1 -0
- package/fesm2022/select/testing.mjs +5 -121
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select-harness-69d47123.mjs +123 -0
- package/fesm2022/select-harness-69d47123.mjs.map +1 -0
- package/fesm2022/select.mjs +30 -1311
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +31 -31
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +27 -75
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +27 -23
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +38 -30
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +26 -20
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +52 -39
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles-d5ada3b3.mjs +18 -0
- package/fesm2022/structural-styles-d5ada3b3.mjs.map +1 -0
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +58 -60
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +54 -58
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +37 -26
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +13 -15
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +15 -960
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +28 -30
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +16 -16
- package/form-field/index.d.ts +16 -508
- package/form-field/testing/control/index.d.ts +2 -10
- package/form-field/testing/index.d.ts +19 -24
- package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
- package/form-field-control.d-eb86711c.d.ts +62 -0
- package/form-field.d-2edbc094.d.ts +367 -0
- package/grid-list/_grid-list-theme.scss +1 -1
- package/grid-list/index.d.ts +128 -152
- package/grid-list/testing/index.d.ts +39 -44
- package/icon/_icon-theme.scss +2 -2
- package/icon/index.d.ts +9 -470
- package/icon/testing/index.d.ts +41 -44
- package/icon-module.d-aa3bbba0.d.ts +167 -0
- package/icon-registry.d-1dffe9de.d.ts +286 -0
- package/index.d-0536b706.d.ts +11 -0
- package/index.d-37e31cd3.d.ts +13 -0
- package/index.d.ts +2 -3
- package/input/index.d.ts +33 -62
- package/input/testing/index.d.ts +13 -71
- package/input-harness.d-4eecd1d3.d.ts +60 -0
- package/line.d-570a2537.d.ts +25 -0
- package/list/_list-theme.scss +15 -15
- package/list/index.d.ts +155 -244
- package/list/testing/index.d.ts +158 -180
- package/list-option-types.d-8739f903.d.ts +15 -0
- package/menu/_menu-theme.scss +3 -3
- package/menu/index.d.ts +183 -231
- package/menu/testing/index.d.ts +17 -23
- package/module.d-74a721b9.d.ts +326 -0
- package/module.d-792a497c.d.ts +213 -0
- package/module.d-ba05faa6.d.ts +448 -0
- package/module.d-c17c834e.d.ts +18 -0
- package/optgroup-harness.d-7f741f69.d.ts +31 -0
- package/option-harness.d-3d33fc9a.d.ts +34 -0
- package/option-parent.d-559ad5c5.d.ts +19 -0
- package/option.d-6f493d78.d.ts +146 -0
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +3 -3
- package/paginator/index.d.ts +31 -216
- package/paginator/testing/index.d.ts +14 -15
- package/paginator.d-40b1766e.d.ts +199 -0
- package/palette.d-ec4a617c.d.ts +4 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +2 -2
- package/progress-bar/index.d.ts +40 -59
- package/progress-bar/testing/index.d.ts +7 -10
- package/progress-spinner/_progress-spinner-theme.scss +4 -4
- package/progress-spinner/index.d.ts +8 -110
- package/progress-spinner/testing/index.d.ts +10 -11
- package/progress-spinner.d-1fc040c5.d.ts +96 -0
- package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
- package/radio/_radio-theme.scss +12 -12
- package/radio/index.d.ts +151 -170
- package/radio/testing/index.d.ts +61 -67
- package/ripple-loader.d-8aac2988.d.ts +48 -0
- package/ripple.d-2fb57d04.d.ts +255 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
- package/schematics/ng-generate/theme-color/schema.json +10 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
- package/schematics/ng-update/index_bundled.js +31 -31
- package/select/_select-theme.scss +6 -6
- package/select/index.d.ts +25 -505
- package/select/testing/index.d.ts +5 -67
- package/select-harness.d-7441a7ac.d.ts +63 -0
- package/sidenav/_sidenav-theme.scss +2 -2
- package/sidenav/index.d.ts +49 -92
- package/sidenav/testing/index.d.ts +58 -63
- package/slide-toggle/_slide-toggle-theme.scss +10 -10
- package/slide-toggle/index.d.ts +39 -110
- package/slide-toggle/testing/index.d.ts +17 -21
- package/slider/_slider-theme.scss +10 -10
- package/slider/index.d.ts +281 -328
- package/slider/testing/index.d.ts +42 -47
- package/snack-bar/_snack-bar-theme.scss +4 -4
- package/snack-bar/index.d.ts +152 -185
- package/snack-bar/testing/index.d.ts +7 -9
- package/sort/_sort-theme.scss +3 -3
- package/sort/index.d.ts +61 -169
- package/sort/testing/index.d.ts +22 -25
- package/sort-direction.d-f4ce4649.d.ts +3 -0
- package/sort.d-c2b79a45.d.ts +87 -0
- package/stepper/_stepper-theme.scss +5 -5
- package/stepper/index.d.ts +115 -167
- package/stepper/testing/index.d.ts +43 -52
- package/table/_table-theme.scss +4 -4
- package/table/index.d.ts +97 -156
- package/table/testing/index.d.ts +64 -78
- package/tabs/_tabs-theme.scss +16 -16
- package/tabs/index.d.ts +309 -383
- package/tabs/testing/index.d.ts +67 -76
- package/timepicker/_timepicker-theme.scss +4 -4
- package/timepicker/index.d.ts +127 -160
- package/timepicker/testing/index.d.ts +20 -26
- package/toolbar/_toolbar-theme.scss +4 -4
- package/toolbar/index.d.ts +15 -26
- package/toolbar/testing/index.d.ts +13 -16
- package/tooltip/_tooltip-theme.scss +4 -4
- package/tooltip/index.d.ts +11 -355
- package/tooltip/testing/index.d.ts +7 -10
- package/tree/_tree-theme.scss +3 -3
- package/tree/index.d.ts +117 -163
- package/tree/testing/index.d.ts +52 -58
- /package/core/tokens/m3/definitions/{unused/_md-comp-filled-tonal-button.scss → _md-comp-filled-tonal-button.scss} +0 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, ErrorHandler, HostAttributeToken, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
|
+
import { Subscription } from 'rxjs';
|
|
5
|
+
import { take } from 'rxjs/operators';
|
|
6
|
+
import { M as MatIconRegistry } from './icon-registry-13a3b98e.mjs';
|
|
7
|
+
import { M as MatCommonModule } from './common-module-2d64df09.mjs';
|
|
8
|
+
|
|
9
|
+
/** Injection token to be used to override the default options for `mat-icon`. */
|
|
10
|
+
const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken('MAT_ICON_DEFAULT_OPTIONS');
|
|
11
|
+
/**
|
|
12
|
+
* Injection token used to provide the current location to `MatIcon`.
|
|
13
|
+
* Used to handle server-side rendering and to stub out during unit tests.
|
|
14
|
+
* @docs-private
|
|
15
|
+
*/
|
|
16
|
+
const MAT_ICON_LOCATION = new InjectionToken('mat-icon-location', {
|
|
17
|
+
providedIn: 'root',
|
|
18
|
+
factory: MAT_ICON_LOCATION_FACTORY,
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* @docs-private
|
|
22
|
+
* @deprecated No longer used, will be removed.
|
|
23
|
+
* @breaking-change 21.0.0
|
|
24
|
+
*/
|
|
25
|
+
function MAT_ICON_LOCATION_FACTORY() {
|
|
26
|
+
const _document = inject(DOCUMENT);
|
|
27
|
+
const _location = _document ? _document.location : null;
|
|
28
|
+
return {
|
|
29
|
+
// Note that this needs to be a function, rather than a property, because Angular
|
|
30
|
+
// will only resolve it once, but we want the current path on each call.
|
|
31
|
+
getPathname: () => (_location ? _location.pathname + _location.search : ''),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */
|
|
35
|
+
const funcIriAttributes = [
|
|
36
|
+
'clip-path',
|
|
37
|
+
'color-profile',
|
|
38
|
+
'src',
|
|
39
|
+
'cursor',
|
|
40
|
+
'fill',
|
|
41
|
+
'filter',
|
|
42
|
+
'marker',
|
|
43
|
+
'marker-start',
|
|
44
|
+
'marker-mid',
|
|
45
|
+
'marker-end',
|
|
46
|
+
'mask',
|
|
47
|
+
'stroke',
|
|
48
|
+
];
|
|
49
|
+
/** Selector that can be used to find all elements that are using a `FuncIRI`. */
|
|
50
|
+
const funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');
|
|
51
|
+
/** Regex that can be used to extract the id out of a FuncIRI. */
|
|
52
|
+
const funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/;
|
|
53
|
+
/**
|
|
54
|
+
* Component to display an icon. It can be used in the following ways:
|
|
55
|
+
*
|
|
56
|
+
* - Specify the svgIcon input to load an SVG icon from a URL previously registered with the
|
|
57
|
+
* addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of
|
|
58
|
+
* MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format
|
|
59
|
+
* "[namespace]:[name]", if not the value will be the name of an icon in the default namespace.
|
|
60
|
+
* Examples:
|
|
61
|
+
* `<mat-icon svgIcon="left-arrow"></mat-icon>
|
|
62
|
+
* <mat-icon svgIcon="animals:cat"></mat-icon>`
|
|
63
|
+
*
|
|
64
|
+
* - Use a font ligature as an icon by putting the ligature text in the `fontIcon` attribute or the
|
|
65
|
+
* content of the `<mat-icon>` component. If you register a custom font class, don't forget to also
|
|
66
|
+
* include the special class `mat-ligature-font`. It is recommended to use the attribute alternative
|
|
67
|
+
* to prevent the ligature text to be selectable and to appear in search engine results.
|
|
68
|
+
* By default, the Material icons font is used as described at
|
|
69
|
+
* http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an
|
|
70
|
+
* alternate font by setting the fontSet input to either the CSS class to apply to use the
|
|
71
|
+
* desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.
|
|
72
|
+
* Examples:
|
|
73
|
+
* `<mat-icon fontIcon="home"></mat-icon>
|
|
74
|
+
* <mat-icon>home</mat-icon>
|
|
75
|
+
* <mat-icon fontSet="myfont" fontIcon="sun"></mat-icon>
|
|
76
|
+
* <mat-icon fontSet="myfont">sun</mat-icon>`
|
|
77
|
+
*
|
|
78
|
+
* - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the
|
|
79
|
+
* font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a
|
|
80
|
+
* CSS class which causes the glyph to be displayed via a :before selector, as in
|
|
81
|
+
* https://fontawesome-v4.github.io/examples/
|
|
82
|
+
* Example:
|
|
83
|
+
* `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
|
|
84
|
+
*/
|
|
85
|
+
class MatIcon {
|
|
86
|
+
_elementRef = inject(ElementRef);
|
|
87
|
+
_iconRegistry = inject(MatIconRegistry);
|
|
88
|
+
_location = inject(MAT_ICON_LOCATION);
|
|
89
|
+
_errorHandler = inject(ErrorHandler);
|
|
90
|
+
_defaultColor;
|
|
91
|
+
/**
|
|
92
|
+
* Theme color of the icon. This API is supported in M2 themes only, it
|
|
93
|
+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.
|
|
94
|
+
*
|
|
95
|
+
* For information on applying color variants in M3, see
|
|
96
|
+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
|
|
97
|
+
*/
|
|
98
|
+
get color() {
|
|
99
|
+
return this._color || this._defaultColor;
|
|
100
|
+
}
|
|
101
|
+
set color(value) {
|
|
102
|
+
this._color = value;
|
|
103
|
+
}
|
|
104
|
+
_color;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the icon should be inlined, automatically sizing the icon to match the font size of
|
|
107
|
+
* the element the icon is contained in.
|
|
108
|
+
*/
|
|
109
|
+
inline = false;
|
|
110
|
+
/** Name of the icon in the SVG icon set. */
|
|
111
|
+
get svgIcon() {
|
|
112
|
+
return this._svgIcon;
|
|
113
|
+
}
|
|
114
|
+
set svgIcon(value) {
|
|
115
|
+
if (value !== this._svgIcon) {
|
|
116
|
+
if (value) {
|
|
117
|
+
this._updateSvgIcon(value);
|
|
118
|
+
}
|
|
119
|
+
else if (this._svgIcon) {
|
|
120
|
+
this._clearSvgElement();
|
|
121
|
+
}
|
|
122
|
+
this._svgIcon = value;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
_svgIcon;
|
|
126
|
+
/** Font set that the icon is a part of. */
|
|
127
|
+
get fontSet() {
|
|
128
|
+
return this._fontSet;
|
|
129
|
+
}
|
|
130
|
+
set fontSet(value) {
|
|
131
|
+
const newValue = this._cleanupFontValue(value);
|
|
132
|
+
if (newValue !== this._fontSet) {
|
|
133
|
+
this._fontSet = newValue;
|
|
134
|
+
this._updateFontIconClasses();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
_fontSet;
|
|
138
|
+
/** Name of an icon within a font set. */
|
|
139
|
+
get fontIcon() {
|
|
140
|
+
return this._fontIcon;
|
|
141
|
+
}
|
|
142
|
+
set fontIcon(value) {
|
|
143
|
+
const newValue = this._cleanupFontValue(value);
|
|
144
|
+
if (newValue !== this._fontIcon) {
|
|
145
|
+
this._fontIcon = newValue;
|
|
146
|
+
this._updateFontIconClasses();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
_fontIcon;
|
|
150
|
+
_previousFontSetClass = [];
|
|
151
|
+
_previousFontIconClass;
|
|
152
|
+
_svgName;
|
|
153
|
+
_svgNamespace;
|
|
154
|
+
/** Keeps track of the current page path. */
|
|
155
|
+
_previousPath;
|
|
156
|
+
/** Keeps track of the elements and attributes that we've prefixed with the current path. */
|
|
157
|
+
_elementsWithExternalReferences;
|
|
158
|
+
/** Subscription to the current in-progress SVG icon request. */
|
|
159
|
+
_currentIconFetch = Subscription.EMPTY;
|
|
160
|
+
constructor() {
|
|
161
|
+
const ariaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });
|
|
162
|
+
const defaults = inject(MAT_ICON_DEFAULT_OPTIONS, { optional: true });
|
|
163
|
+
if (defaults) {
|
|
164
|
+
if (defaults.color) {
|
|
165
|
+
this.color = this._defaultColor = defaults.color;
|
|
166
|
+
}
|
|
167
|
+
if (defaults.fontSet) {
|
|
168
|
+
this.fontSet = defaults.fontSet;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is
|
|
172
|
+
// the right thing to do for the majority of icon use-cases.
|
|
173
|
+
if (!ariaHidden) {
|
|
174
|
+
this._elementRef.nativeElement.setAttribute('aria-hidden', 'true');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Splits an svgIcon binding value into its icon set and icon name components.
|
|
179
|
+
* Returns a 2-element array of [(icon set), (icon name)].
|
|
180
|
+
* The separator for the two fields is ':'. If there is no separator, an empty
|
|
181
|
+
* string is returned for the icon set and the entire value is returned for
|
|
182
|
+
* the icon name. If the argument is falsy, returns an array of two empty strings.
|
|
183
|
+
* Throws an error if the name contains two or more ':' separators.
|
|
184
|
+
* Examples:
|
|
185
|
+
* `'social:cake' -> ['social', 'cake']
|
|
186
|
+
* 'penguin' -> ['', 'penguin']
|
|
187
|
+
* null -> ['', '']
|
|
188
|
+
* 'a:b:c' -> (throws Error)`
|
|
189
|
+
*/
|
|
190
|
+
_splitIconName(iconName) {
|
|
191
|
+
if (!iconName) {
|
|
192
|
+
return ['', ''];
|
|
193
|
+
}
|
|
194
|
+
const parts = iconName.split(':');
|
|
195
|
+
switch (parts.length) {
|
|
196
|
+
case 1:
|
|
197
|
+
return ['', parts[0]]; // Use default namespace.
|
|
198
|
+
case 2:
|
|
199
|
+
return parts;
|
|
200
|
+
default:
|
|
201
|
+
throw Error(`Invalid icon name: "${iconName}"`); // TODO: add an ngDevMode check
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
ngOnInit() {
|
|
205
|
+
// Update font classes because ngOnChanges won't be called if none of the inputs are present,
|
|
206
|
+
// e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.
|
|
207
|
+
this._updateFontIconClasses();
|
|
208
|
+
}
|
|
209
|
+
ngAfterViewChecked() {
|
|
210
|
+
const cachedElements = this._elementsWithExternalReferences;
|
|
211
|
+
if (cachedElements && cachedElements.size) {
|
|
212
|
+
const newPath = this._location.getPathname();
|
|
213
|
+
// We need to check whether the URL has changed on each change detection since
|
|
214
|
+
// the browser doesn't have an API that will let us react on link clicks and
|
|
215
|
+
// we can't depend on the Angular router. The references need to be updated,
|
|
216
|
+
// because while most browsers don't care whether the URL is correct after
|
|
217
|
+
// the first render, Safari will break if the user navigates to a different
|
|
218
|
+
// page and the SVG isn't re-rendered.
|
|
219
|
+
if (newPath !== this._previousPath) {
|
|
220
|
+
this._previousPath = newPath;
|
|
221
|
+
this._prependPathToReferences(newPath);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
ngOnDestroy() {
|
|
226
|
+
this._currentIconFetch.unsubscribe();
|
|
227
|
+
if (this._elementsWithExternalReferences) {
|
|
228
|
+
this._elementsWithExternalReferences.clear();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
_usingFontIcon() {
|
|
232
|
+
return !this.svgIcon;
|
|
233
|
+
}
|
|
234
|
+
_setSvgElement(svg) {
|
|
235
|
+
this._clearSvgElement();
|
|
236
|
+
// Note: we do this fix here, rather than the icon registry, because the
|
|
237
|
+
// references have to point to the URL at the time that the icon was created.
|
|
238
|
+
const path = this._location.getPathname();
|
|
239
|
+
this._previousPath = path;
|
|
240
|
+
this._cacheChildrenWithExternalReferences(svg);
|
|
241
|
+
this._prependPathToReferences(path);
|
|
242
|
+
this._elementRef.nativeElement.appendChild(svg);
|
|
243
|
+
}
|
|
244
|
+
_clearSvgElement() {
|
|
245
|
+
const layoutElement = this._elementRef.nativeElement;
|
|
246
|
+
let childCount = layoutElement.childNodes.length;
|
|
247
|
+
if (this._elementsWithExternalReferences) {
|
|
248
|
+
this._elementsWithExternalReferences.clear();
|
|
249
|
+
}
|
|
250
|
+
// Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that
|
|
251
|
+
// we can't use innerHTML, because IE will throw if the element has a data binding.
|
|
252
|
+
while (childCount--) {
|
|
253
|
+
const child = layoutElement.childNodes[childCount];
|
|
254
|
+
// 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid
|
|
255
|
+
// of any loose text nodes, as well as any SVG elements in order to remove any old icons.
|
|
256
|
+
if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {
|
|
257
|
+
child.remove();
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
_updateFontIconClasses() {
|
|
262
|
+
if (!this._usingFontIcon()) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const elem = this._elementRef.nativeElement;
|
|
266
|
+
const fontSetClasses = (this.fontSet
|
|
267
|
+
? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)
|
|
268
|
+
: this._iconRegistry.getDefaultFontSetClass()).filter(className => className.length > 0);
|
|
269
|
+
this._previousFontSetClass.forEach(className => elem.classList.remove(className));
|
|
270
|
+
fontSetClasses.forEach(className => elem.classList.add(className));
|
|
271
|
+
this._previousFontSetClass = fontSetClasses;
|
|
272
|
+
if (this.fontIcon !== this._previousFontIconClass &&
|
|
273
|
+
!fontSetClasses.includes('mat-ligature-font')) {
|
|
274
|
+
if (this._previousFontIconClass) {
|
|
275
|
+
elem.classList.remove(this._previousFontIconClass);
|
|
276
|
+
}
|
|
277
|
+
if (this.fontIcon) {
|
|
278
|
+
elem.classList.add(this.fontIcon);
|
|
279
|
+
}
|
|
280
|
+
this._previousFontIconClass = this.fontIcon;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Cleans up a value to be used as a fontIcon or fontSet.
|
|
285
|
+
* Since the value ends up being assigned as a CSS class, we
|
|
286
|
+
* have to trim the value and omit space-separated values.
|
|
287
|
+
*/
|
|
288
|
+
_cleanupFontValue(value) {
|
|
289
|
+
return typeof value === 'string' ? value.trim().split(' ')[0] : value;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`
|
|
293
|
+
* reference. This is required because WebKit browsers require references to be prefixed with
|
|
294
|
+
* the current path, if the page has a `base` tag.
|
|
295
|
+
*/
|
|
296
|
+
_prependPathToReferences(path) {
|
|
297
|
+
const elements = this._elementsWithExternalReferences;
|
|
298
|
+
if (elements) {
|
|
299
|
+
elements.forEach((attrs, element) => {
|
|
300
|
+
attrs.forEach(attr => {
|
|
301
|
+
element.setAttribute(attr.name, `url('${path}#${attr.value}')`);
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Caches the children of an SVG element that have `url()`
|
|
308
|
+
* references that we need to prefix with the current path.
|
|
309
|
+
*/
|
|
310
|
+
_cacheChildrenWithExternalReferences(element) {
|
|
311
|
+
const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);
|
|
312
|
+
const elements = (this._elementsWithExternalReferences =
|
|
313
|
+
this._elementsWithExternalReferences || new Map());
|
|
314
|
+
for (let i = 0; i < elementsWithFuncIri.length; i++) {
|
|
315
|
+
funcIriAttributes.forEach(attr => {
|
|
316
|
+
const elementWithReference = elementsWithFuncIri[i];
|
|
317
|
+
const value = elementWithReference.getAttribute(attr);
|
|
318
|
+
const match = value ? value.match(funcIriPattern) : null;
|
|
319
|
+
if (match) {
|
|
320
|
+
let attributes = elements.get(elementWithReference);
|
|
321
|
+
if (!attributes) {
|
|
322
|
+
attributes = [];
|
|
323
|
+
elements.set(elementWithReference, attributes);
|
|
324
|
+
}
|
|
325
|
+
attributes.push({ name: attr, value: match[1] });
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
/** Sets a new SVG icon with a particular name. */
|
|
331
|
+
_updateSvgIcon(rawName) {
|
|
332
|
+
this._svgNamespace = null;
|
|
333
|
+
this._svgName = null;
|
|
334
|
+
this._currentIconFetch.unsubscribe();
|
|
335
|
+
if (rawName) {
|
|
336
|
+
const [namespace, iconName] = this._splitIconName(rawName);
|
|
337
|
+
if (namespace) {
|
|
338
|
+
this._svgNamespace = namespace;
|
|
339
|
+
}
|
|
340
|
+
if (iconName) {
|
|
341
|
+
this._svgName = iconName;
|
|
342
|
+
}
|
|
343
|
+
this._currentIconFetch = this._iconRegistry
|
|
344
|
+
.getNamedSvgIcon(iconName, namespace)
|
|
345
|
+
.pipe(take(1))
|
|
346
|
+
.subscribe(svg => this._setSvgElement(svg), (err) => {
|
|
347
|
+
const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;
|
|
348
|
+
this._errorHandler.handleError(new Error(errorMessage));
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
353
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.0.0-next.1", type: MatIcon, isStandalone: true, selector: "mat-icon", inputs: { color: "color", inline: ["inline", "inline", booleanAttribute], svgIcon: "svgIcon", fontSet: "fontSet", fontIcon: "fontIcon" }, host: { attributes: { "role": "img" }, properties: { "class": "color ? \"mat-\" + color : \"\"", "attr.data-mat-icon-type": "_usingFontIcon() ? \"font\" : \"svg\"", "attr.data-mat-icon-name": "_svgName || fontIcon", "attr.data-mat-icon-namespace": "_svgNamespace || fontSet", "attr.fontIcon": "_usingFontIcon() ? fontIcon : null", "class.mat-icon-inline": "inline", "class.mat-icon-no-color": "color !== \"primary\" && color !== \"accent\" && color !== \"warn\"" }, classAttribute: "mat-icon notranslate" }, exportAs: ["matIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
354
|
+
}
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatIcon, decorators: [{
|
|
356
|
+
type: Component,
|
|
357
|
+
args: [{ template: '<ng-content></ng-content>', selector: 'mat-icon', exportAs: 'matIcon', host: {
|
|
358
|
+
'role': 'img',
|
|
359
|
+
'class': 'mat-icon notranslate',
|
|
360
|
+
'[class]': 'color ? "mat-" + color : ""',
|
|
361
|
+
'[attr.data-mat-icon-type]': '_usingFontIcon() ? "font" : "svg"',
|
|
362
|
+
'[attr.data-mat-icon-name]': '_svgName || fontIcon',
|
|
363
|
+
'[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',
|
|
364
|
+
'[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',
|
|
365
|
+
'[class.mat-icon-inline]': 'inline',
|
|
366
|
+
'[class.mat-icon-no-color]': 'color !== "primary" && color !== "accent" && color !== "warn"',
|
|
367
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"] }]
|
|
368
|
+
}], ctorParameters: () => [], propDecorators: { color: [{
|
|
369
|
+
type: Input
|
|
370
|
+
}], inline: [{
|
|
371
|
+
type: Input,
|
|
372
|
+
args: [{ transform: booleanAttribute }]
|
|
373
|
+
}], svgIcon: [{
|
|
374
|
+
type: Input
|
|
375
|
+
}], fontSet: [{
|
|
376
|
+
type: Input
|
|
377
|
+
}], fontIcon: [{
|
|
378
|
+
type: Input
|
|
379
|
+
}] } });
|
|
380
|
+
|
|
381
|
+
class MatIconModule {
|
|
382
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
383
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatIconModule, imports: [MatCommonModule, MatIcon], exports: [MatIcon, MatCommonModule] });
|
|
384
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatIconModule, imports: [MatCommonModule, MatCommonModule] });
|
|
385
|
+
}
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatIconModule, decorators: [{
|
|
387
|
+
type: NgModule,
|
|
388
|
+
args: [{
|
|
389
|
+
imports: [MatCommonModule, MatIcon],
|
|
390
|
+
exports: [MatIcon, MatCommonModule],
|
|
391
|
+
}]
|
|
392
|
+
}] });
|
|
393
|
+
|
|
394
|
+
export { MatIconModule as M, MAT_ICON_DEFAULT_OPTIONS as a, MAT_ICON_LOCATION as b, MAT_ICON_LOCATION_FACTORY as c, MatIcon as d };
|
|
395
|
+
//# sourceMappingURL=icon-module-3f77a24d.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-module-3f77a24d.mjs","sources":["../../../../../../src/material/icon/icon.ts","../../../../../../src/material/icon/icon-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n HostAttributeToken,\n} from '@angular/core';\nimport {ThemePalette} from '../core';\nimport {Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n/** Default options for `mat-icon`. */\nexport interface MatIconDefaultOptions {\n /**\n * Theme color of the icon. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Font set that the icon is a part of. */\n fontSet?: string;\n}\n\n/** Injection token to be used to override the default options for `mat-icon`. */\nexport const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken<MatIconDefaultOptions>(\n 'MAT_ICON_DEFAULT_OPTIONS',\n);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY,\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => (_location ? _location.pathname + _location.search : ''),\n };\n}\n\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke',\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the `fontIcon` attribute or the\n * content of the `<mat-icon>` component. If you register a custom font class, don't forget to also\n * include the special class `mat-ligature-font`. It is recommended to use the attribute alternative\n * to prevent the ligature text to be selectable and to appear in search engine results.\n * By default, the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon fontIcon=\"home\"></mat-icon>\n * <mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\" fontIcon=\"sun\"></mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fontawesome-v4.github.io/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrl: 'icon.css',\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[class]': 'color ? \"mat-\" + color : \"\"',\n '[attr.data-mat-icon-type]': '_usingFontIcon() ? \"font\" : \"svg\"',\n '[attr.data-mat-icon-name]': '_svgName || fontIcon',\n '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',\n '[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon implements OnInit, AfterViewChecked, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _iconRegistry = inject(MatIconRegistry);\n private _location = inject<MatIconLocation>(MAT_ICON_LOCATION);\n private readonly _errorHandler = inject(ErrorHandler);\n private _defaultColor: ThemePalette;\n\n /**\n * Theme color of the icon. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input({transform: booleanAttribute})\n inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input()\n get svgIcon(): string {\n return this._svgIcon;\n }\n set svgIcon(value: string) {\n if (value !== this._svgIcon) {\n if (value) {\n this._updateSvgIcon(value);\n } else if (this._svgIcon) {\n this._clearSvgElement();\n }\n this._svgIcon = value;\n }\n }\n private _svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string {\n return this._fontSet;\n }\n set fontSet(value: string) {\n const newValue = this._cleanupFontValue(value);\n\n if (newValue !== this._fontSet) {\n this._fontSet = newValue;\n this._updateFontIconClasses();\n }\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string {\n return this._fontIcon;\n }\n set fontIcon(value: string) {\n const newValue = this._cleanupFontValue(value);\n\n if (newValue !== this._fontIcon) {\n this._fontIcon = newValue;\n this._updateFontIconClasses();\n }\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string[] = [];\n private _previousFontIconClass: string;\n\n _svgName: string | null;\n _svgNamespace: string | null;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string; value: string}[]>;\n\n /** Subscription to the current in-progress SVG icon request. */\n private _currentIconFetch = Subscription.EMPTY;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {optional: true});\n const defaults = inject<MatIconDefaultOptions>(MAT_ICON_DEFAULT_OPTIONS, {optional: true});\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.fontSet) {\n this.fontSet = defaults.fontSet;\n }\n }\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n this._elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1:\n return ['', parts[0]]; // Use default namespace.\n case 2:\n return <[string, string]>parts;\n default:\n throw Error(`Invalid icon name: \"${iconName}\"`); // TODO: add an ngDevMode check\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n this._updateFontIconClasses();\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n this._currentIconFetch.unsubscribe();\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n child.remove();\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClasses = (\n this.fontSet\n ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)\n : this._iconRegistry.getDefaultFontSetClass()\n ).filter(className => className.length > 0);\n\n this._previousFontSetClass.forEach(className => elem.classList.remove(className));\n fontSetClasses.forEach(className => elem.classList.add(className));\n this._previousFontSetClass = fontSetClasses;\n\n if (\n this.fontIcon !== this._previousFontIconClass &&\n !fontSetClasses.includes('mat-ligature-font')\n ) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = (this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map());\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\n }\n }\n\n /** Sets a new SVG icon with a particular name. */\n private _updateSvgIcon(rawName: string | undefined) {\n this._svgNamespace = null;\n this._svgName = null;\n this._currentIconFetch.unsubscribe();\n\n if (rawName) {\n const [namespace, iconName] = this._splitIconName(rawName);\n\n if (namespace) {\n this._svgNamespace = namespace;\n }\n\n if (iconName) {\n this._svgName = iconName;\n }\n\n this._currentIconFetch = this._iconRegistry\n .getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n },\n );\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatIcon} from './icon';\n\n@NgModule({\n imports: [MatCommonModule, MatIcon],\n exports: [MatIcon, MatCommonModule],\n})\nexport class MatIconModule {}\n"],"names":[],"mappings":";;;;;;;;AA4CA;MACa,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,EAC3B;AAED;;;;AAIG;MACU,iBAAiB,GAAG,IAAI,cAAc,CAAkB,mBAAmB,EAAE;AACxF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,yBAAyB;AACnC,CAAA,EAAC;AAUF;;;;AAIG;SACa,yBAAyB,GAAA;AACvC,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAClC,IAAA,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;IAEvD,OAAO;;;QAGL,WAAW,EAAE,OAAO,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,GA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