@angular/material 10.0.0-rc.3 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +17 -17
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +2 -0
- package/bundles/material-autocomplete-testing.umd.js +11 -0
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +3 -1
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +5 -5
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +1 -1
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +11 -0
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +2 -2
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +11 -0
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +3 -3
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +12 -3
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +2 -2
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +7 -2
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +4 -4
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +335 -0
- package/bundles/material-card-testing.umd.js.map +1 -0
- package/bundles/material-card-testing.umd.min.js +44 -0
- package/bundles/material-card-testing.umd.min.js.map +1 -0
- package/bundles/material-checkbox-testing.umd.js +11 -0
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +3 -3
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-chips.umd.js +36 -12
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +4 -4
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +1 -1
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +11 -3
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +11 -11
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +20 -11
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +5 -5
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +1 -1
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +45 -8
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +14 -7
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +1 -1
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +11 -0
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +3 -3
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +32 -0
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +4 -4
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +47 -21
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +5 -5
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +1 -1
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +2 -2
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +2 -2
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +23 -6
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +3 -3
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +28 -3
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +3 -3
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +33 -0
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +2 -2
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +3 -3
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +22 -0
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +13 -2
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +4 -4
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +1 -1
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +1 -1
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +2 -2
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +2 -2
- package/bundles/material-progress-spinner.umd.min.js +3 -3
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +11 -0
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +3 -3
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +15 -5
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +2 -2
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +11 -0
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +11 -3
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +4 -4
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +1 -1
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +41 -17
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +2 -2
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +11 -0
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -2
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +11 -0
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -2
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +47 -39
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +2 -2
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +10 -10
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +3 -3
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +25 -12
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +5 -5
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +1 -1
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.min.js +2 -2
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -1
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +23 -4
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +5 -12
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +330 -0
- package/bundles/material-toolbar-testing.umd.js.map +1 -0
- package/bundles/material-toolbar-testing.umd.min.js +44 -0
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -0
- package/bundles/material-tooltip-testing.umd.min.js +1 -1
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +14 -1
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +3 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js.map +1 -1
- package/button/_button-base.scss +1 -1
- package/button/_button-theme.scss +8 -8
- package/button/index.metadata.json +1 -1
- package/button/testing/button-harness.d.ts +2 -0
- package/button-toggle/button-toggle.d.ts +10 -3
- package/button-toggle/index.metadata.json +1 -1
- package/button-toggle/testing/button-toggle-harness.d.ts +2 -0
- package/card/testing/card-harness-filters.d.ts +17 -0
- package/card/testing/card-harness.d.ts +36 -0
- package/card/testing/index.d.ts +8 -0
- package/card/testing/package.json +9 -0
- package/card/testing/public-api.d.ts +9 -0
- package/checkbox/index.metadata.json +1 -1
- package/checkbox/testing/checkbox-harness.d.ts +2 -0
- package/chips/chip.d.ts +19 -1
- package/chips/index.metadata.json +1 -1
- package/core/focus-indicators/_focus-indicators.scss +6 -6
- package/core/index.metadata.json +1 -1
- package/core/option/optgroup.d.ts +7 -0
- package/core/ripple/ripple-ref.d.ts +21 -2
- package/core/ripple/ripple-renderer.d.ts +1 -19
- package/core/ripple/ripple.d.ts +2 -2
- package/core/style/_list-common.scss +1 -1
- package/datepicker/date-range-input-parts.d.ts +2 -4
- package/datepicker/date-range-input.d.ts +4 -4
- package/datepicker/date-range-picker.d.ts +10 -3
- package/datepicker/datepicker.d.ts +2 -3
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/public-api.d.ts +1 -1
- package/dialog/dialog-container.d.ts +9 -2
- package/dialog/dialog-content-directives.d.ts +1 -0
- package/dialog/dialog-ref.d.ts +7 -0
- package/dialog/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete-module.js +18 -22
- package/esm2015/autocomplete/autocomplete-origin.js +16 -20
- package/esm2015/autocomplete/autocomplete-trigger.js +519 -521
- package/esm2015/autocomplete/autocomplete.js +126 -130
- package/esm2015/autocomplete/testing/autocomplete-harness.js +99 -97
- package/esm2015/badge/badge-module.js +13 -17
- package/esm2015/badge/badge.js +184 -188
- package/esm2015/badge/testing/badge-harness.js +74 -78
- package/esm2015/bottom-sheet/bottom-sheet-container.js +161 -165
- package/esm2015/bottom-sheet/bottom-sheet-module.js +15 -19
- package/esm2015/bottom-sheet/bottom-sheet.js +124 -128
- package/esm2015/bottom-sheet/testing/bottom-sheet-harness.js +29 -33
- package/esm2015/button/button-module.js +20 -24
- package/esm2015/button/button.js +111 -114
- package/esm2015/button/testing/button-harness.js +60 -58
- package/esm2015/button-toggle/button-toggle-module.js +10 -14
- package/esm2015/button-toggle/button-toggle.js +368 -368
- package/esm2015/button-toggle/testing/button-toggle-group-harness.js +42 -46
- package/esm2015/button-toggle/testing/button-toggle-harness.js +113 -111
- package/esm2015/card/card-module.js +30 -34
- package/esm2015/card/card.js +147 -203
- package/esm2015/card/testing/card-harness-filters.js +8 -0
- package/esm2015/card/testing/card-harness.js +52 -0
- package/esm2015/card/testing/index.js +9 -0
- package/esm2015/card/testing/public-api.js +10 -0
- package/esm2015/card/testing/testing.externs.js +0 -0
- package/esm2015/checkbox/checkbox-module.js +21 -29
- package/esm2015/checkbox/checkbox-required-validator.js +9 -13
- package/esm2015/checkbox/checkbox.js +315 -319
- package/esm2015/checkbox/testing/checkbox-harness.js +150 -148
- package/esm2015/chips/chip-input.js +119 -123
- package/esm2015/chips/chip-list.js +572 -576
- package/esm2015/chips/chip.js +333 -328
- package/esm2015/chips/chips-module.js +16 -20
- package/esm2015/core/animation/animation.js +12 -20
- package/esm2015/core/common-behaviors/common-module.js +91 -95
- package/esm2015/core/datetime/index.js +19 -27
- package/esm2015/core/datetime/native-date-adapter.js +202 -206
- package/esm2015/core/error/error-options.js +16 -24
- package/esm2015/core/line/line.js +18 -26
- package/esm2015/core/option/index.js +10 -14
- package/esm2015/core/option/optgroup.js +36 -33
- package/esm2015/core/option/option.js +181 -185
- package/esm2015/core/ripple/index.js +10 -14
- package/esm2015/core/ripple/ripple-ref.js +1 -1
- package/esm2015/core/ripple/ripple-renderer.js +1 -1
- package/esm2015/core/ripple/ripple.js +102 -106
- package/esm2015/core/selection/index.js +9 -13
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +32 -36
- package/esm2015/core/testing/optgroup-harness.js +39 -43
- package/esm2015/core/testing/option-harness.js +51 -55
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/calendar-body.js +214 -218
- package/esm2015/datepicker/calendar.js +295 -303
- package/esm2015/datepicker/date-range-input-parts.js +214 -229
- package/esm2015/datepicker/date-range-input.js +244 -242
- package/esm2015/datepicker/date-range-picker.js +19 -23
- package/esm2015/datepicker/date-range-selection-strategy.js +31 -35
- package/esm2015/datepicker/date-selection-model.js +110 -122
- package/esm2015/datepicker/datepicker-base.js +418 -426
- package/esm2015/datepicker/datepicker-input-base.js +227 -224
- package/esm2015/datepicker/datepicker-input.js +111 -115
- package/esm2015/datepicker/datepicker-intl.js +37 -41
- package/esm2015/datepicker/datepicker-module.js +62 -66
- package/esm2015/datepicker/datepicker-toggle.js +81 -89
- package/esm2015/datepicker/datepicker.js +13 -17
- package/esm2015/datepicker/month-view.js +283 -287
- package/esm2015/datepicker/multi-year-view.js +198 -202
- package/esm2015/datepicker/public-api.js +2 -2
- package/esm2015/datepicker/year-view.js +220 -224
- package/esm2015/dialog/dialog-container.js +175 -164
- package/esm2015/dialog/dialog-content-directives.js +105 -114
- package/esm2015/dialog/dialog-module.js +32 -36
- package/esm2015/dialog/dialog-ref.js +17 -3
- package/esm2015/dialog/dialog.js +236 -240
- package/esm2015/dialog/testing/dialog-harness.js +58 -62
- package/esm2015/divider/divider-module.js +10 -14
- package/esm2015/divider/divider.js +33 -37
- package/esm2015/divider/testing/divider-harness.js +16 -20
- package/esm2015/expansion/accordion.js +73 -77
- package/esm2015/expansion/expansion-module.js +26 -30
- package/esm2015/expansion/expansion-panel-content.js +13 -17
- package/esm2015/expansion/expansion-panel-header.js +168 -180
- package/esm2015/expansion/expansion-panel.js +144 -152
- package/esm2015/expansion/testing/accordion-harness.js +24 -28
- package/esm2015/expansion/testing/expansion-harness.js +136 -134
- package/esm2015/form-field/error.js +26 -23
- package/esm2015/form-field/form-field-control.js +6 -10
- package/esm2015/form-field/form-field-module.js +31 -35
- package/esm2015/form-field/form-field.js +407 -409
- package/esm2015/form-field/hint.js +35 -29
- package/esm2015/form-field/label.js +8 -12
- package/esm2015/form-field/placeholder.js +8 -12
- package/esm2015/form-field/prefix.js +16 -13
- package/esm2015/form-field/suffix.js +16 -13
- package/esm2015/form-field/testing/form-field-harness.js +220 -206
- package/esm2015/grid-list/grid-list-module.js +26 -30
- package/esm2015/grid-list/grid-list.js +108 -112
- package/esm2015/grid-list/grid-tile.js +91 -111
- package/esm2015/grid-list/testing/grid-list-harness.js +62 -66
- package/esm2015/grid-list/testing/grid-tile-harness.js +69 -73
- package/esm2015/grid-list/tile-styler.js +1 -1
- package/esm2015/icon/icon-module.js +10 -14
- package/esm2015/icon/icon-registry.js +406 -410
- package/esm2015/icon/icon.js +228 -232
- package/esm2015/icon/testing/fake-icon-registry.js +66 -74
- package/esm2015/input/autosize.js +30 -34
- package/esm2015/input/input-module.js +21 -25
- package/esm2015/input/input.js +305 -284
- package/esm2015/input/testing/input-harness.js +129 -123
- package/esm2015/list/list-module.js +32 -36
- package/esm2015/list/list.js +165 -189
- package/esm2015/list/selection-list.js +503 -511
- package/esm2015/list/testing/action-list-harness.js +55 -57
- package/esm2015/list/testing/list-harness.js +31 -39
- package/esm2015/list/testing/list-item-harness-base.js +13 -17
- package/esm2015/list/testing/nav-list-harness.js +62 -64
- package/esm2015/list/testing/selection-list-harness.js +136 -138
- package/esm2015/menu/menu-content.js +74 -71
- package/esm2015/menu/menu-item.js +119 -123
- package/esm2015/menu/menu-module.js +29 -37
- package/esm2015/menu/menu-panel.js +1 -1
- package/esm2015/menu/menu-trigger.js +402 -405
- package/esm2015/menu/menu.js +329 -339
- package/esm2015/menu/testing/menu-harness.js +193 -189
- package/esm2015/paginator/paginator-intl.js +36 -40
- package/esm2015/paginator/paginator-module.js +16 -20
- package/esm2015/paginator/paginator.js +205 -209
- package/esm2015/paginator/testing/paginator-harness.js +91 -95
- package/esm2015/progress-bar/progress-bar-module.js +10 -14
- package/esm2015/progress-bar/progress-bar.js +114 -118
- package/esm2015/progress-bar/testing/progress-bar-harness.js +27 -31
- package/esm2015/progress-spinner/progress-spinner-module.js +17 -21
- package/esm2015/progress-spinner/progress-spinner.js +181 -189
- package/esm2015/progress-spinner/testing/progress-spinner-harness.js +28 -32
- package/esm2015/radio/radio-module.js +10 -14
- package/esm2015/radio/radio.js +437 -444
- package/esm2015/radio/testing/radio-harness.js +241 -243
- package/esm2015/select/select-module.js +23 -27
- package/esm2015/select/select.js +917 -918
- package/esm2015/select/testing/select-harness.js +138 -136
- package/esm2015/sidenav/drawer.js +632 -620
- package/esm2015/sidenav/sidenav-module.js +31 -35
- package/esm2015/sidenav/sidenav.js +104 -116
- package/esm2015/sidenav/testing/drawer-harness.js +40 -44
- package/esm2015/sidenav/testing/sidenav-harness.js +20 -24
- package/esm2015/slide-toggle/slide-toggle-module.js +27 -35
- package/esm2015/slide-toggle/slide-toggle-required-validator.js +9 -13
- package/esm2015/slide-toggle/slide-toggle.js +184 -188
- package/esm2015/slide-toggle/testing/slide-toggle-harness.js +123 -121
- package/esm2015/slider/slider-module.js +10 -14
- package/esm2015/slider/slider.js +640 -644
- package/esm2015/slider/testing/slider-harness.js +129 -127
- package/esm2015/snack-bar/simple-snack-bar.js +32 -36
- package/esm2015/snack-bar/snack-bar-container.js +144 -148
- package/esm2015/snack-bar/snack-bar-module.js +17 -21
- package/esm2015/snack-bar/snack-bar-ref.js +1 -1
- package/esm2015/snack-bar/snack-bar.js +208 -205
- package/esm2015/snack-bar/testing/snack-bar-harness.js +112 -116
- package/esm2015/sort/sort-header-intl.js +21 -21
- package/esm2015/sort/sort-header.js +200 -194
- package/esm2015/sort/sort-module.js +11 -15
- package/esm2015/sort/sort.js +92 -96
- package/esm2015/sort/testing/sort-harness.js +28 -32
- package/esm2015/sort/testing/sort-header-harness.js +66 -67
- package/esm2015/stepper/step-header.js +78 -82
- package/esm2015/stepper/step-label.js +8 -12
- package/esm2015/stepper/stepper-button.js +23 -31
- package/esm2015/stepper/stepper-icon.js +16 -20
- package/esm2015/stepper/stepper-intl.js +15 -19
- package/esm2015/stepper/stepper-module.js +40 -44
- package/esm2015/stepper/stepper.js +139 -155
- package/esm2015/table/cell.js +94 -122
- package/esm2015/table/row.js +90 -118
- package/esm2015/table/table-module.js +13 -17
- package/esm2015/table/table.js +26 -30
- package/esm2015/table/testing/cell-harness.js +56 -68
- package/esm2015/table/testing/row-harness.js +90 -102
- package/esm2015/table/testing/table-harness.js +65 -69
- package/esm2015/table/text-column.js +17 -21
- package/esm2015/tabs/index.js +4 -2
- package/esm2015/tabs/ink-bar.js +55 -59
- package/esm2015/tabs/paginated-tab-header.js +415 -419
- package/esm2015/tabs/tab-body.js +179 -191
- package/esm2015/tabs/tab-content.js +21 -16
- package/esm2015/tabs/tab-group.js +263 -271
- package/esm2015/tabs/tab-header.js +69 -77
- package/esm2015/tabs/tab-label-wrapper.js +29 -33
- package/esm2015/tabs/tab-label.js +16 -13
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +199 -215
- package/esm2015/tabs/tab.js +80 -83
- package/esm2015/tabs/tabs-module.js +38 -42
- package/esm2015/tabs/testing/tab-group-harness.js +52 -56
- package/esm2015/tabs/testing/tab-harness.js +78 -82
- package/esm2015/toolbar/testing/index.js +9 -0
- package/esm2015/toolbar/testing/public-api.js +10 -0
- package/esm2015/toolbar/testing/testing.externs.js +0 -0
- package/esm2015/toolbar/testing/toolbar-harness-filters.js +8 -0
- package/esm2015/toolbar/testing/toolbar-harness.js +47 -0
- package/esm2015/toolbar/toolbar-module.js +10 -14
- package/esm2015/toolbar/toolbar.js +61 -69
- package/esm2015/tooltip/testing/tooltip-harness.js +43 -47
- package/esm2015/tooltip/tooltip-module.js +17 -21
- package/esm2015/tooltip/tooltip.js +502 -497
- package/esm2015/tree/data-source/flat-data-source.js +1 -1
- package/esm2015/tree/node.js +99 -111
- package/esm2015/tree/outlet.js +19 -23
- package/esm2015/tree/padding.js +13 -17
- package/esm2015/tree/toggle.js +15 -19
- package/esm2015/tree/tree-module.js +10 -14
- package/esm2015/tree/tree.js +23 -27
- package/expansion/testing/expansion-harness.d.ts +2 -0
- package/fesm2015/autocomplete/testing.js +98 -95
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +677 -687
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/badge/testing.js +73 -76
- package/fesm2015/badge/testing.js.map +1 -1
- package/fesm2015/badge.js +195 -201
- package/fesm2015/badge.js.map +1 -1
- package/fesm2015/bottom-sheet/testing.js +28 -31
- package/fesm2015/bottom-sheet/testing.js.map +1 -1
- package/fesm2015/bottom-sheet.js +297 -306
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/button/testing.js +59 -56
- package/fesm2015/button/testing.js.map +1 -1
- package/fesm2015/button-toggle/testing.js +155 -155
- package/fesm2015/button-toggle/testing.js.map +1 -1
- package/fesm2015/button-toggle.js +377 -378
- package/fesm2015/button-toggle.js.map +1 -1
- package/fesm2015/button.js +129 -133
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/card/testing.js +79 -0
- package/fesm2015/card/testing.js.map +1 -0
- package/fesm2015/card.js +175 -220
- package/fesm2015/card.js.map +1 -1
- package/fesm2015/checkbox/testing.js +149 -146
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +342 -354
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips.js +1039 -1039
- package/fesm2015/chips.js.map +1 -1
- package/fesm2015/core/testing.js +88 -94
- package/fesm2015/core/testing.js.map +1 -1
- package/fesm2015/core.js +729 -773
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +2821 -2884
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog/testing.js +57 -60
- package/fesm2015/dialog/testing.js.map +1 -1
- package/fesm2015/dialog.js +564 -549
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/divider/testing.js +15 -18
- package/fesm2015/divider/testing.js.map +1 -1
- package/fesm2015/divider.js +41 -47
- package/fesm2015/divider.js.map +1 -1
- package/fesm2015/expansion/testing.js +159 -159
- package/fesm2015/expansion/testing.js.map +1 -1
- package/fesm2015/expansion.js +422 -446
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field/testing.js +219 -204
- package/fesm2015/form-field/testing.js.map +1 -1
- package/fesm2015/form-field.js +538 -532
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list/testing.js +129 -135
- package/fesm2015/grid-list/testing.js.map +1 -1
- package/fesm2015/grid-list.js +221 -242
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +65 -71
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +660 -669
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +128 -121
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/input.js +353 -337
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/list/testing.js +298 -307
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js +698 -725
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu/testing.js +192 -186
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/menu.js +948 -962
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator/testing.js +90 -93
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/paginator.js +247 -256
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-bar/testing.js +26 -29
- package/fesm2015/progress-bar/testing.js.map +1 -1
- package/fesm2015/progress-bar.js +122 -128
- package/fesm2015/progress-bar.js.map +1 -1
- package/fesm2015/progress-spinner/testing.js +27 -30
- package/fesm2015/progress-spinner/testing.js.map +1 -1
- package/fesm2015/progress-spinner.js +196 -205
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +240 -240
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js +447 -453
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +137 -134
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +939 -941
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav/testing.js +58 -64
- package/fesm2015/sidenav/testing.js.map +1 -1
- package/fesm2015/sidenav.js +765 -762
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle/testing.js +122 -119
- package/fesm2015/slide-toggle/testing.js.map +1 -1
- package/fesm2015/slide-toggle.js +217 -229
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/slider/testing.js +128 -125
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/slider.js +648 -654
- package/fesm2015/slider.js.map +1 -1
- package/fesm2015/snack-bar/testing.js +111 -114
- package/fesm2015/snack-bar/testing.js.map +1 -1
- package/fesm2015/snack-bar.js +426 -431
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/sort/testing.js +92 -95
- package/fesm2015/sort/testing.js.map +1 -1
- package/fesm2015/sort.js +320 -318
- package/fesm2015/sort.js.map +1 -1
- package/fesm2015/stepper.js +312 -345
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table/testing.js +208 -229
- package/fesm2015/table/testing.js.map +1 -1
- package/fesm2015/table.js +235 -286
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs/testing.js +128 -134
- package/fesm2015/tabs/testing.js.map +1 -1
- package/fesm2015/tabs.js +1362 -1399
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +74 -0
- package/fesm2015/toolbar/testing.js.map +1 -0
- package/fesm2015/toolbar.js +69 -78
- package/fesm2015/toolbar.js.map +1 -1
- package/fesm2015/tooltip/testing.js +42 -45
- package/fesm2015/tooltip/testing.js.map +1 -1
- package/fesm2015/tooltip.js +517 -513
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree.js +173 -197
- package/fesm2015/tree.js.map +1 -1
- package/form-field/error.d.ts +7 -0
- package/form-field/hint.d.ts +10 -0
- package/form-field/index.metadata.json +1 -1
- package/form-field/prefix.d.ts +7 -0
- package/form-field/suffix.d.ts +7 -0
- package/form-field/testing/form-field-harness.d.ts +8 -0
- package/grid-list/grid-list.d.ts +2 -1
- package/grid-list/index.metadata.json +1 -1
- package/grid-list/tile-styler.d.ts +10 -5
- package/input/_input-theme.scss +2 -2
- package/input/index.metadata.json +1 -1
- package/input/input.d.ts +6 -2
- package/input/testing/input-harness.d.ts +2 -0
- package/list/index.metadata.json +1 -1
- package/list/testing/action-list-harness.d.ts +2 -0
- package/list/testing/nav-list-harness.d.ts +2 -0
- package/list/testing/selection-list-harness.d.ts +2 -0
- package/menu/index.metadata.json +1 -1
- package/menu/menu-content.d.ts +7 -1
- package/menu/menu-panel.d.ts +1 -0
- package/menu/menu.d.ts +4 -0
- package/menu/testing/menu-harness.d.ts +4 -0
- package/package.json +6 -6
- 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-spinner/index.metadata.json +1 -1
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +6 -0
- package/radio/testing/radio-harness.d.ts +2 -0
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +3 -3
- package/schematics/ng-generate/navigation/schema.json +5 -0
- package/schematics/ng-update/data/index.js +1 -1
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +639 -639
- package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
- package/select/index.metadata.json +1 -1
- package/select/select.d.ts +6 -0
- package/select/testing/select-harness.d.ts +2 -0
- package/sidenav/drawer.d.ts +15 -3
- package/sidenav/index.metadata.json +1 -1
- package/slide-toggle/index.metadata.json +1 -1
- package/slide-toggle/testing/slide-toggle-harness.d.ts +2 -0
- package/slider/testing/slider-harness.d.ts +2 -0
- package/snack-bar/index.metadata.json +1 -1
- package/snack-bar/simple-snack-bar.d.ts +13 -1
- package/snack-bar/snack-bar-container.d.ts +16 -3
- package/snack-bar/snack-bar-ref.d.ts +3 -3
- package/snack-bar/snack-bar.d.ts +10 -3
- package/sort/index.metadata.json +1 -1
- package/sort/sort-header-intl.d.ts +5 -1
- package/sort/sort-header.d.ts +3 -1
- package/sort/testing/sort-header-harness.d.ts +6 -2
- package/tabs/index.d.ts +3 -1
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab-content.d.ts +7 -1
- package/tabs/tab-label.d.ts +7 -0
- package/toolbar/testing/index.d.ts +8 -0
- package/toolbar/testing/package.json +9 -0
- package/toolbar/testing/public-api.d.ts +9 -0
- package/toolbar/testing/toolbar-harness-filters.d.ts +13 -0
- package/toolbar/testing/toolbar-harness.d.ts +31 -0
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +1 -0
- package/tree/data-source/flat-data-source.d.ts +4 -4
- package/tree/index.metadata.json +1 -1
package/fesm2015/checkbox.js
CHANGED
|
@@ -70,347 +70,344 @@ const _MatCheckboxMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinD
|
|
|
70
70
|
* have the checkbox be accessible, you may supply an [aria-label] input.
|
|
71
71
|
* See: https://material.io/design/components/selection-controls.html
|
|
72
72
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
class MatCheckbox extends _MatCheckboxMixinBase {
|
|
74
|
+
constructor(elementRef, _changeDetectorRef, _focusMonitor, _ngZone, tabIndex,
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated `_clickAction` parameter to be removed, use
|
|
77
|
+
* `MAT_CHECKBOX_DEFAULT_OPTIONS`
|
|
78
|
+
* @breaking-change 10.0.0
|
|
79
|
+
*/
|
|
80
|
+
_clickAction, _animationMode, _options) {
|
|
81
|
+
super(elementRef);
|
|
82
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
83
|
+
this._focusMonitor = _focusMonitor;
|
|
84
|
+
this._ngZone = _ngZone;
|
|
85
|
+
this._clickAction = _clickAction;
|
|
86
|
+
this._animationMode = _animationMode;
|
|
87
|
+
this._options = _options;
|
|
76
88
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* @breaking-change 10.0.0
|
|
89
|
+
* Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
|
|
90
|
+
* take precedence so this may be omitted.
|
|
80
91
|
*/
|
|
81
|
-
|
|
82
|
-
super(elementRef);
|
|
83
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
84
|
-
this._focusMonitor = _focusMonitor;
|
|
85
|
-
this._ngZone = _ngZone;
|
|
86
|
-
this._clickAction = _clickAction;
|
|
87
|
-
this._animationMode = _animationMode;
|
|
88
|
-
this._options = _options;
|
|
89
|
-
/**
|
|
90
|
-
* Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
|
|
91
|
-
* take precedence so this may be omitted.
|
|
92
|
-
*/
|
|
93
|
-
this.ariaLabel = '';
|
|
94
|
-
/**
|
|
95
|
-
* Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
|
|
96
|
-
*/
|
|
97
|
-
this.ariaLabelledby = null;
|
|
98
|
-
this._uniqueId = `mat-checkbox-${++nextUniqueId}`;
|
|
99
|
-
/** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */
|
|
100
|
-
this.id = this._uniqueId;
|
|
101
|
-
/** Whether the label should appear after or before the checkbox. Defaults to 'after' */
|
|
102
|
-
this.labelPosition = 'after';
|
|
103
|
-
/** Name value will be applied to the input element if present */
|
|
104
|
-
this.name = null;
|
|
105
|
-
/** Event emitted when the checkbox's `checked` value changes. */
|
|
106
|
-
this.change = new EventEmitter();
|
|
107
|
-
/** Event emitted when the checkbox's `indeterminate` value changes. */
|
|
108
|
-
this.indeterminateChange = new EventEmitter();
|
|
109
|
-
/**
|
|
110
|
-
* Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.
|
|
111
|
-
* @docs-private
|
|
112
|
-
*/
|
|
113
|
-
this._onTouched = () => { };
|
|
114
|
-
this._currentAnimationClass = '';
|
|
115
|
-
this._currentCheckState = 0 /* Init */;
|
|
116
|
-
this._controlValueAccessorChangeFn = () => { };
|
|
117
|
-
this._checked = false;
|
|
118
|
-
this._disabled = false;
|
|
119
|
-
this._indeterminate = false;
|
|
120
|
-
this._options = this._options || {};
|
|
121
|
-
if (this._options.color) {
|
|
122
|
-
this.color = this._options.color;
|
|
123
|
-
}
|
|
124
|
-
this.tabIndex = parseInt(tabIndex) || 0;
|
|
125
|
-
// TODO: Remove this after the `_clickAction` parameter is removed as an injection parameter.
|
|
126
|
-
this._clickAction = this._clickAction || this._options.clickAction;
|
|
127
|
-
}
|
|
128
|
-
/** Returns the unique id for the visual hidden input. */
|
|
129
|
-
get inputId() { return `${this.id || this._uniqueId}-input`; }
|
|
130
|
-
/** Whether the checkbox is required. */
|
|
131
|
-
get required() { return this._required; }
|
|
132
|
-
set required(value) { this._required = coerceBooleanProperty(value); }
|
|
133
|
-
ngAfterViewInit() {
|
|
134
|
-
this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {
|
|
135
|
-
if (!focusOrigin) {
|
|
136
|
-
// When a focused element becomes disabled, the browser *immediately* fires a blur event.
|
|
137
|
-
// Angular does not expect events to be raised during change detection, so any state change
|
|
138
|
-
// (such as a form control's 'ng-touched') will cause a changed-after-checked error.
|
|
139
|
-
// See https://github.com/angular/angular/issues/17793. To work around this, we defer
|
|
140
|
-
// telling the form control it has been touched until the next tick.
|
|
141
|
-
Promise.resolve().then(() => {
|
|
142
|
-
this._onTouched();
|
|
143
|
-
this._changeDetectorRef.markForCheck();
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
this._syncIndeterminate(this._indeterminate);
|
|
148
|
-
}
|
|
149
|
-
// TODO: Delete next major revision.
|
|
150
|
-
ngAfterViewChecked() { }
|
|
151
|
-
ngOnDestroy() {
|
|
152
|
-
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
153
|
-
}
|
|
92
|
+
this.ariaLabel = '';
|
|
154
93
|
/**
|
|
155
|
-
*
|
|
94
|
+
* Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
|
|
156
95
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
96
|
+
this.ariaLabelledby = null;
|
|
97
|
+
this._uniqueId = `mat-checkbox-${++nextUniqueId}`;
|
|
98
|
+
/** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */
|
|
99
|
+
this.id = this._uniqueId;
|
|
100
|
+
/** Whether the label should appear after or before the checkbox. Defaults to 'after' */
|
|
101
|
+
this.labelPosition = 'after';
|
|
102
|
+
/** Name value will be applied to the input element if present */
|
|
103
|
+
this.name = null;
|
|
104
|
+
/** Event emitted when the checkbox's `checked` value changes. */
|
|
105
|
+
this.change = new EventEmitter();
|
|
106
|
+
/** Event emitted when the checkbox's `indeterminate` value changes. */
|
|
107
|
+
this.indeterminateChange = new EventEmitter();
|
|
164
108
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
109
|
+
* Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.
|
|
110
|
+
* @docs-private
|
|
167
111
|
*/
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
112
|
+
this._onTouched = () => { };
|
|
113
|
+
this._currentAnimationClass = '';
|
|
114
|
+
this._currentCheckState = 0 /* Init */;
|
|
115
|
+
this._controlValueAccessorChangeFn = () => { };
|
|
116
|
+
this._checked = false;
|
|
117
|
+
this._disabled = false;
|
|
118
|
+
this._indeterminate = false;
|
|
119
|
+
this._options = this._options || {};
|
|
120
|
+
if (this._options.color) {
|
|
121
|
+
this.color = this._options.color;
|
|
175
122
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
123
|
+
this.tabIndex = parseInt(tabIndex) || 0;
|
|
124
|
+
// TODO: Remove this after the `_clickAction` parameter is removed as an injection parameter.
|
|
125
|
+
this._clickAction = this._clickAction || this._options.clickAction;
|
|
126
|
+
}
|
|
127
|
+
/** Returns the unique id for the visual hidden input. */
|
|
128
|
+
get inputId() { return `${this.id || this._uniqueId}-input`; }
|
|
129
|
+
/** Whether the checkbox is required. */
|
|
130
|
+
get required() { return this._required; }
|
|
131
|
+
set required(value) { this._required = coerceBooleanProperty(value); }
|
|
132
|
+
ngAfterViewInit() {
|
|
133
|
+
this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {
|
|
134
|
+
if (!focusOrigin) {
|
|
135
|
+
// When a focused element becomes disabled, the browser *immediately* fires a blur event.
|
|
136
|
+
// Angular does not expect events to be raised during change detection, so any state change
|
|
137
|
+
// (such as a form control's 'ng-touched') will cause a changed-after-checked error.
|
|
138
|
+
// See https://github.com/angular/angular/issues/17793. To work around this, we defer
|
|
139
|
+
// telling the form control it has been touched until the next tick.
|
|
140
|
+
Promise.resolve().then(() => {
|
|
141
|
+
this._onTouched();
|
|
142
|
+
this._changeDetectorRef.markForCheck();
|
|
143
|
+
});
|
|
194
144
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
145
|
+
});
|
|
146
|
+
this._syncIndeterminate(this._indeterminate);
|
|
147
|
+
}
|
|
148
|
+
// TODO: Delete next major revision.
|
|
149
|
+
ngAfterViewChecked() { }
|
|
150
|
+
ngOnDestroy() {
|
|
151
|
+
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Whether the checkbox is checked.
|
|
155
|
+
*/
|
|
156
|
+
get checked() { return this._checked; }
|
|
157
|
+
set checked(value) {
|
|
158
|
+
if (value != this.checked) {
|
|
159
|
+
this._checked = value;
|
|
160
|
+
this._changeDetectorRef.markForCheck();
|
|
199
161
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Whether the checkbox is disabled. This fully overrides the implementation provided by
|
|
165
|
+
* mixinDisabled, but the mixin is still required because mixinTabIndex requires it.
|
|
166
|
+
*/
|
|
167
|
+
get disabled() { return this._disabled; }
|
|
168
|
+
set disabled(value) {
|
|
169
|
+
const newValue = coerceBooleanProperty(value);
|
|
170
|
+
if (newValue !== this.disabled) {
|
|
171
|
+
this._disabled = newValue;
|
|
172
|
+
this._changeDetectorRef.markForCheck();
|
|
208
173
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
|
|
177
|
+
* represent a checkbox with three states, e.g. a checkbox that represents a nested list of
|
|
178
|
+
* checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately
|
|
179
|
+
* set to false.
|
|
180
|
+
*/
|
|
181
|
+
get indeterminate() { return this._indeterminate; }
|
|
182
|
+
set indeterminate(value) {
|
|
183
|
+
const changed = value != this._indeterminate;
|
|
184
|
+
this._indeterminate = coerceBooleanProperty(value);
|
|
185
|
+
if (changed) {
|
|
186
|
+
if (this._indeterminate) {
|
|
187
|
+
this._transitionCheckState(3 /* Indeterminate */);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
this._transitionCheckState(this.checked ? 1 /* Checked */ : 2 /* Unchecked */);
|
|
191
|
+
}
|
|
192
|
+
this.indeterminateChange.emit(this._indeterminate);
|
|
212
193
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
194
|
+
this._syncIndeterminate(this._indeterminate);
|
|
195
|
+
}
|
|
196
|
+
_isRippleDisabled() {
|
|
197
|
+
return this.disableRipple || this.disabled;
|
|
198
|
+
}
|
|
199
|
+
/** Method being called whenever the label text changes. */
|
|
200
|
+
_onLabelTextChange() {
|
|
201
|
+
// Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox
|
|
202
|
+
// component will be only marked for check, but no actual change detection runs automatically.
|
|
203
|
+
// Instead of going back into the zone in order to trigger a change detection which causes
|
|
204
|
+
// *all* components to be checked (if explicitly marked or not using OnPush), we only trigger
|
|
205
|
+
// an explicit change detection for the checkbox view and its children.
|
|
206
|
+
this._changeDetectorRef.detectChanges();
|
|
207
|
+
}
|
|
208
|
+
// Implemented as part of ControlValueAccessor.
|
|
209
|
+
writeValue(value) {
|
|
210
|
+
this.checked = !!value;
|
|
211
|
+
}
|
|
212
|
+
// Implemented as part of ControlValueAccessor.
|
|
213
|
+
registerOnChange(fn) {
|
|
214
|
+
this._controlValueAccessorChangeFn = fn;
|
|
215
|
+
}
|
|
216
|
+
// Implemented as part of ControlValueAccessor.
|
|
217
|
+
registerOnTouched(fn) {
|
|
218
|
+
this._onTouched = fn;
|
|
219
|
+
}
|
|
220
|
+
// Implemented as part of ControlValueAccessor.
|
|
221
|
+
setDisabledState(isDisabled) {
|
|
222
|
+
this.disabled = isDisabled;
|
|
223
|
+
}
|
|
224
|
+
_getAriaChecked() {
|
|
225
|
+
if (this.checked) {
|
|
226
|
+
return 'true';
|
|
216
227
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
228
|
+
return this.indeterminate ? 'mixed' : 'false';
|
|
229
|
+
}
|
|
230
|
+
_transitionCheckState(newState) {
|
|
231
|
+
let oldState = this._currentCheckState;
|
|
232
|
+
let element = this._elementRef.nativeElement;
|
|
233
|
+
if (oldState === newState) {
|
|
234
|
+
return;
|
|
220
235
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.disabled = isDisabled;
|
|
236
|
+
if (this._currentAnimationClass.length > 0) {
|
|
237
|
+
element.classList.remove(this._currentAnimationClass);
|
|
224
238
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
239
|
+
this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);
|
|
240
|
+
this._currentCheckState = newState;
|
|
241
|
+
if (this._currentAnimationClass.length > 0) {
|
|
242
|
+
element.classList.add(this._currentAnimationClass);
|
|
243
|
+
// Remove the animation class to avoid animation when the checkbox is moved between containers
|
|
244
|
+
const animationClass = this._currentAnimationClass;
|
|
245
|
+
this._ngZone.runOutsideAngular(() => {
|
|
246
|
+
setTimeout(() => {
|
|
247
|
+
element.classList.remove(animationClass);
|
|
248
|
+
}, 1000);
|
|
249
|
+
});
|
|
230
250
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
251
|
+
}
|
|
252
|
+
_emitChangeEvent() {
|
|
253
|
+
const event = new MatCheckboxChange();
|
|
254
|
+
event.source = this;
|
|
255
|
+
event.checked = this.checked;
|
|
256
|
+
this._controlValueAccessorChangeFn(this.checked);
|
|
257
|
+
this.change.emit(event);
|
|
258
|
+
}
|
|
259
|
+
/** Toggles the `checked` state of the checkbox. */
|
|
260
|
+
toggle() {
|
|
261
|
+
this.checked = !this.checked;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Event handler for checkbox input element.
|
|
265
|
+
* Toggles checked state if element is not disabled.
|
|
266
|
+
* Do not toggle on (change) event since IE doesn't fire change event when
|
|
267
|
+
* indeterminate checkbox is clicked.
|
|
268
|
+
* @param event
|
|
269
|
+
*/
|
|
270
|
+
_onInputClick(event) {
|
|
271
|
+
// We have to stop propagation for click events on the visual hidden input element.
|
|
272
|
+
// By default, when a user clicks on a label element, a generated click event will be
|
|
273
|
+
// dispatched on the associated input element. Since we are using a label element as our
|
|
274
|
+
// root container, the click event on the `checkbox` will be executed twice.
|
|
275
|
+
// The real click event will bubble up, and the generated click event also tries to bubble up.
|
|
276
|
+
// This will lead to multiple click events.
|
|
277
|
+
// Preventing bubbling for the second event will solve that issue.
|
|
278
|
+
event.stopPropagation();
|
|
279
|
+
// If resetIndeterminate is false, and the current state is indeterminate, do nothing on click
|
|
280
|
+
if (!this.disabled && this._clickAction !== 'noop') {
|
|
281
|
+
// When user manually click on the checkbox, `indeterminate` is set to false.
|
|
282
|
+
if (this.indeterminate && this._clickAction !== 'check') {
|
|
283
|
+
Promise.resolve().then(() => {
|
|
284
|
+
this._indeterminate = false;
|
|
285
|
+
this.indeterminateChange.emit(this._indeterminate);
|
|
250
286
|
});
|
|
251
287
|
}
|
|
288
|
+
this.toggle();
|
|
289
|
+
this._transitionCheckState(this._checked ? 1 /* Checked */ : 2 /* Unchecked */);
|
|
290
|
+
// Emit our custom change event if the native input emitted one.
|
|
291
|
+
// It is important to only emit it, if the native input triggered one, because
|
|
292
|
+
// we don't want to trigger a change event, when the `checked` variable changes for example.
|
|
293
|
+
this._emitChangeEvent();
|
|
252
294
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
this.
|
|
258
|
-
this.change.emit(event);
|
|
295
|
+
else if (!this.disabled && this._clickAction === 'noop') {
|
|
296
|
+
// Reset native input when clicked with noop. The native checkbox becomes checked after
|
|
297
|
+
// click, reset it to be align with `checked` value of `mat-checkbox`.
|
|
298
|
+
this._inputElement.nativeElement.checked = this.checked;
|
|
299
|
+
this._inputElement.nativeElement.indeterminate = this.indeterminate;
|
|
259
300
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
301
|
+
}
|
|
302
|
+
/** Focuses the checkbox. */
|
|
303
|
+
focus(origin = 'keyboard', options) {
|
|
304
|
+
this._focusMonitor.focusVia(this._inputElement, origin, options);
|
|
305
|
+
}
|
|
306
|
+
_onInteractionEvent(event) {
|
|
307
|
+
// We always have to stop propagation on the change event.
|
|
308
|
+
// Otherwise the change event, from the input element, will bubble up and
|
|
309
|
+
// emit its event object to the `change` output.
|
|
310
|
+
event.stopPropagation();
|
|
311
|
+
}
|
|
312
|
+
_getAnimationClassForCheckStateTransition(oldState, newState) {
|
|
313
|
+
// Don't transition if animations are disabled.
|
|
314
|
+
if (this._animationMode === 'NoopAnimations') {
|
|
315
|
+
return '';
|
|
263
316
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
_onInputClick(event) {
|
|
272
|
-
// We have to stop propagation for click events on the visual hidden input element.
|
|
273
|
-
// By default, when a user clicks on a label element, a generated click event will be
|
|
274
|
-
// dispatched on the associated input element. Since we are using a label element as our
|
|
275
|
-
// root container, the click event on the `checkbox` will be executed twice.
|
|
276
|
-
// The real click event will bubble up, and the generated click event also tries to bubble up.
|
|
277
|
-
// This will lead to multiple click events.
|
|
278
|
-
// Preventing bubbling for the second event will solve that issue.
|
|
279
|
-
event.stopPropagation();
|
|
280
|
-
// If resetIndeterminate is false, and the current state is indeterminate, do nothing on click
|
|
281
|
-
if (!this.disabled && this._clickAction !== 'noop') {
|
|
282
|
-
// When user manually click on the checkbox, `indeterminate` is set to false.
|
|
283
|
-
if (this.indeterminate && this._clickAction !== 'check') {
|
|
284
|
-
Promise.resolve().then(() => {
|
|
285
|
-
this._indeterminate = false;
|
|
286
|
-
this.indeterminateChange.emit(this._indeterminate);
|
|
287
|
-
});
|
|
317
|
+
let animSuffix = '';
|
|
318
|
+
switch (oldState) {
|
|
319
|
+
case 0 /* Init */:
|
|
320
|
+
// Handle edge case where user interacts with checkbox that does not have [(ngModel)] or
|
|
321
|
+
// [checked] bound to it.
|
|
322
|
+
if (newState === 1 /* Checked */) {
|
|
323
|
+
animSuffix = 'unchecked-checked';
|
|
288
324
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
// We always have to stop propagation on the change event.
|
|
309
|
-
// Otherwise the change event, from the input element, will bubble up and
|
|
310
|
-
// emit its event object to the `change` output.
|
|
311
|
-
event.stopPropagation();
|
|
312
|
-
}
|
|
313
|
-
_getAnimationClassForCheckStateTransition(oldState, newState) {
|
|
314
|
-
// Don't transition if animations are disabled.
|
|
315
|
-
if (this._animationMode === 'NoopAnimations') {
|
|
316
|
-
return '';
|
|
317
|
-
}
|
|
318
|
-
let animSuffix = '';
|
|
319
|
-
switch (oldState) {
|
|
320
|
-
case 0 /* Init */:
|
|
321
|
-
// Handle edge case where user interacts with checkbox that does not have [(ngModel)] or
|
|
322
|
-
// [checked] bound to it.
|
|
323
|
-
if (newState === 1 /* Checked */) {
|
|
324
|
-
animSuffix = 'unchecked-checked';
|
|
325
|
-
}
|
|
326
|
-
else if (newState == 3 /* Indeterminate */) {
|
|
327
|
-
animSuffix = 'unchecked-indeterminate';
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
return '';
|
|
331
|
-
}
|
|
332
|
-
break;
|
|
333
|
-
case 2 /* Unchecked */:
|
|
334
|
-
animSuffix = newState === 1 /* Checked */ ?
|
|
335
|
-
'unchecked-checked' : 'unchecked-indeterminate';
|
|
336
|
-
break;
|
|
337
|
-
case 1 /* Checked */:
|
|
338
|
-
animSuffix = newState === 2 /* Unchecked */ ?
|
|
339
|
-
'checked-unchecked' : 'checked-indeterminate';
|
|
340
|
-
break;
|
|
341
|
-
case 3 /* Indeterminate */:
|
|
342
|
-
animSuffix = newState === 1 /* Checked */ ?
|
|
343
|
-
'indeterminate-checked' : 'indeterminate-unchecked';
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
return `mat-checkbox-anim-${animSuffix}`;
|
|
325
|
+
else if (newState == 3 /* Indeterminate */) {
|
|
326
|
+
animSuffix = 'unchecked-indeterminate';
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
return '';
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
332
|
+
case 2 /* Unchecked */:
|
|
333
|
+
animSuffix = newState === 1 /* Checked */ ?
|
|
334
|
+
'unchecked-checked' : 'unchecked-indeterminate';
|
|
335
|
+
break;
|
|
336
|
+
case 1 /* Checked */:
|
|
337
|
+
animSuffix = newState === 2 /* Unchecked */ ?
|
|
338
|
+
'checked-unchecked' : 'checked-indeterminate';
|
|
339
|
+
break;
|
|
340
|
+
case 3 /* Indeterminate */:
|
|
341
|
+
animSuffix = newState === 1 /* Checked */ ?
|
|
342
|
+
'indeterminate-checked' : 'indeterminate-unchecked';
|
|
343
|
+
break;
|
|
347
344
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
345
|
+
return `mat-checkbox-anim-${animSuffix}`;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Syncs the indeterminate value with the checkbox DOM node.
|
|
349
|
+
*
|
|
350
|
+
* We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a
|
|
351
|
+
* property is supported on an element boils down to `if (propName in element)`. Domino's
|
|
352
|
+
* HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during
|
|
353
|
+
* server-side rendering.
|
|
354
|
+
*/
|
|
355
|
+
_syncIndeterminate(value) {
|
|
356
|
+
const nativeCheckbox = this._inputElement;
|
|
357
|
+
if (nativeCheckbox) {
|
|
358
|
+
nativeCheckbox.nativeElement.indeterminate = value;
|
|
361
359
|
}
|
|
362
360
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
},] }
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
]
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
})();
|
|
361
|
+
}
|
|
362
|
+
MatCheckbox.decorators = [
|
|
363
|
+
{ type: Component, args: [{
|
|
364
|
+
selector: 'mat-checkbox',
|
|
365
|
+
template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label>\n <div class=\"mat-checkbox-inner-container\"\n [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\">\n <input #input\n class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\"\n [id]=\"inputId\"\n [required]=\"required\"\n [checked]=\"checked\"\n [attr.value]=\"value\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [tabIndex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"_getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInteractionEvent($event)\"\n (click)=\"_onInputClick($event)\">\n <div matRipple class=\"mat-checkbox-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleRadius]=\"20\"\n [matRippleCentered]=\"true\"\n [matRippleAnimation]=\"{enterDuration: 150}\">\n <div class=\"mat-ripple-element mat-checkbox-persistent-ripple\"></div>\n </div>\n <div class=\"mat-checkbox-frame\"></div>\n <div class=\"mat-checkbox-background\">\n <svg version=\"1.1\"\n focusable=\"false\"\n class=\"mat-checkbox-checkmark\"\n viewBox=\"0 0 24 24\"\n xml:space=\"preserve\">\n <path class=\"mat-checkbox-checkmark-path\"\n fill=\"none\"\n stroke=\"white\"\n d=\"M4.1,12.7 9,17.6 20.3,6.3\"/>\n </svg>\n <!-- Element for rendering the indeterminate state checkbox. -->\n <div class=\"mat-checkbox-mixedmark\"></div>\n </div>\n </div>\n <span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\"> </span>\n <ng-content></ng-content>\n </span>\n</label>\n",
|
|
366
|
+
exportAs: 'matCheckbox',
|
|
367
|
+
host: {
|
|
368
|
+
'class': 'mat-checkbox',
|
|
369
|
+
'[id]': 'id',
|
|
370
|
+
'[attr.tabindex]': 'null',
|
|
371
|
+
'[class.mat-checkbox-indeterminate]': 'indeterminate',
|
|
372
|
+
'[class.mat-checkbox-checked]': 'checked',
|
|
373
|
+
'[class.mat-checkbox-disabled]': 'disabled',
|
|
374
|
+
'[class.mat-checkbox-label-before]': 'labelPosition == "before"',
|
|
375
|
+
'[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,
|
|
376
|
+
},
|
|
377
|
+
providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],
|
|
378
|
+
inputs: ['disableRipple', 'color', 'tabIndex'],
|
|
379
|
+
encapsulation: ViewEncapsulation.None,
|
|
380
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
381
|
+
styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"]
|
|
382
|
+
},] }
|
|
383
|
+
];
|
|
384
|
+
MatCheckbox.ctorParameters = () => [
|
|
385
|
+
{ type: ElementRef },
|
|
386
|
+
{ type: ChangeDetectorRef },
|
|
387
|
+
{ type: FocusMonitor },
|
|
388
|
+
{ type: NgZone },
|
|
389
|
+
{ type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },
|
|
390
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_CHECKBOX_CLICK_ACTION,] }] },
|
|
391
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },
|
|
392
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_CHECKBOX_DEFAULT_OPTIONS,] }] }
|
|
393
|
+
];
|
|
394
|
+
MatCheckbox.propDecorators = {
|
|
395
|
+
ariaLabel: [{ type: Input, args: ['aria-label',] }],
|
|
396
|
+
ariaLabelledby: [{ type: Input, args: ['aria-labelledby',] }],
|
|
397
|
+
ariaDescribedby: [{ type: Input, args: ['aria-describedby',] }],
|
|
398
|
+
id: [{ type: Input }],
|
|
399
|
+
required: [{ type: Input }],
|
|
400
|
+
labelPosition: [{ type: Input }],
|
|
401
|
+
name: [{ type: Input }],
|
|
402
|
+
change: [{ type: Output }],
|
|
403
|
+
indeterminateChange: [{ type: Output }],
|
|
404
|
+
value: [{ type: Input }],
|
|
405
|
+
_inputElement: [{ type: ViewChild, args: ['input',] }],
|
|
406
|
+
ripple: [{ type: ViewChild, args: [MatRipple,] }],
|
|
407
|
+
checked: [{ type: Input }],
|
|
408
|
+
disabled: [{ type: Input }],
|
|
409
|
+
indeterminate: [{ type: Input }]
|
|
410
|
+
};
|
|
414
411
|
|
|
415
412
|
/**
|
|
416
413
|
* @license
|
|
@@ -429,18 +426,15 @@ const MAT_CHECKBOX_REQUIRED_VALIDATOR = {
|
|
|
429
426
|
* Current CheckboxRequiredValidator only work with `input type=checkbox` and does not
|
|
430
427
|
* work with `mat-checkbox`.
|
|
431
428
|
*/
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
selector: `mat-checkbox[required][formControlName],
|
|
429
|
+
class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {
|
|
430
|
+
}
|
|
431
|
+
MatCheckboxRequiredValidator.decorators = [
|
|
432
|
+
{ type: Directive, args: [{
|
|
433
|
+
selector: `mat-checkbox[required][formControlName],
|
|
438
434
|
mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return MatCheckboxRequiredValidator;
|
|
443
|
-
})();
|
|
435
|
+
providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],
|
|
436
|
+
},] }
|
|
437
|
+
];
|
|
444
438
|
|
|
445
439
|
/**
|
|
446
440
|
* @license
|
|
@@ -450,32 +444,26 @@ let MatCheckboxRequiredValidator = /** @class */ (() => {
|
|
|
450
444
|
* found in the LICENSE file at https://angular.io/license
|
|
451
445
|
*/
|
|
452
446
|
/** This module is used by both original and MDC-based checkbox implementations. */
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],
|
|
474
|
-
declarations: [MatCheckbox],
|
|
475
|
-
},] }
|
|
476
|
-
];
|
|
477
|
-
return MatCheckboxModule;
|
|
478
|
-
})();
|
|
447
|
+
class _MatCheckboxRequiredValidatorModule {
|
|
448
|
+
}
|
|
449
|
+
_MatCheckboxRequiredValidatorModule.decorators = [
|
|
450
|
+
{ type: NgModule, args: [{
|
|
451
|
+
exports: [MatCheckboxRequiredValidator],
|
|
452
|
+
declarations: [MatCheckboxRequiredValidator],
|
|
453
|
+
},] }
|
|
454
|
+
];
|
|
455
|
+
class MatCheckboxModule {
|
|
456
|
+
}
|
|
457
|
+
MatCheckboxModule.decorators = [
|
|
458
|
+
{ type: NgModule, args: [{
|
|
459
|
+
imports: [
|
|
460
|
+
MatRippleModule, MatCommonModule, ObserversModule,
|
|
461
|
+
_MatCheckboxRequiredValidatorModule
|
|
462
|
+
],
|
|
463
|
+
exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],
|
|
464
|
+
declarations: [MatCheckbox],
|
|
465
|
+
},] }
|
|
466
|
+
];
|
|
479
467
|
|
|
480
468
|
/**
|
|
481
469
|
* @license
|