@angular/material 2.0.0-alpha.9-3 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +4 -145
- package/_theming.scss +3872 -0
- package/autocomplete/index.d.ts +8 -0
- package/autocomplete/index.metadata.json +11 -0
- package/autocomplete/package.json +7 -0
- package/autocomplete/typings/autocomplete-module.d.ts +2 -0
- package/autocomplete/typings/autocomplete-trigger.d.ts +159 -0
- package/autocomplete/typings/autocomplete.d.ts +55 -0
- package/autocomplete/typings/index.d.ts +4 -0
- package/autocomplete/typings/index.metadata.json +1 -0
- package/autocomplete/typings/mat-exports.d.ts +17 -0
- package/autocomplete/typings/public_api.d.ts +11 -0
- package/autocomplete.d.ts +8 -0
- package/autocomplete.metadata.json +11 -0
- package/bundles/material-autocomplete.umd.js +3293 -0
- package/bundles/material-autocomplete.umd.js.map +1 -0
- package/bundles/material-autocomplete.umd.min.js +10 -0
- package/bundles/material-autocomplete.umd.min.js.map +1 -0
- package/bundles/material-button-toggle.umd.js +2689 -0
- package/bundles/material-button-toggle.umd.js.map +1 -0
- package/bundles/material-button-toggle.umd.min.js +10 -0
- package/bundles/material-button-toggle.umd.min.js.map +1 -0
- package/bundles/material-button.umd.js +2503 -0
- package/bundles/material-button.umd.js.map +1 -0
- package/bundles/material-button.umd.min.js +10 -0
- package/bundles/material-button.umd.min.js.map +1 -0
- package/bundles/material-card.umd.js +2438 -0
- package/bundles/material-card.umd.js.map +1 -0
- package/bundles/material-card.umd.min.js +10 -0
- package/bundles/material-card.umd.min.js.map +1 -0
- package/bundles/material-checkbox.umd.js +2692 -0
- package/bundles/material-checkbox.umd.js.map +1 -0
- package/bundles/material-checkbox.umd.min.js +10 -0
- package/bundles/material-checkbox.umd.min.js.map +1 -0
- package/bundles/material-chips.umd.js +4121 -0
- package/bundles/material-chips.umd.js.map +1 -0
- package/bundles/material-chips.umd.min.js +11 -0
- package/bundles/material-chips.umd.min.js.map +1 -0
- package/bundles/material-core.umd.js +2505 -0
- package/bundles/material-core.umd.js.map +1 -0
- package/bundles/material-core.umd.min.js +10 -0
- package/bundles/material-core.umd.min.js.map +1 -0
- package/bundles/material-datepicker.umd.js +6568 -0
- package/bundles/material-datepicker.umd.js.map +1 -0
- package/bundles/material-datepicker.umd.min.js +12 -0
- package/bundles/material-datepicker.umd.min.js.map +1 -0
- package/bundles/material-dialog.umd.js +2980 -0
- package/bundles/material-dialog.umd.js.map +1 -0
- package/bundles/material-dialog.umd.min.js +10 -0
- package/bundles/material-dialog.umd.min.js.map +1 -0
- package/bundles/material-examples.umd.js +3627 -0
- package/bundles/material-examples.umd.js.map +1 -0
- package/bundles/material-examples.umd.min.js +12 -0
- package/bundles/material-examples.umd.min.js.map +1 -0
- package/bundles/material-expansion.umd.js +2678 -0
- package/bundles/material-expansion.umd.js.map +1 -0
- package/bundles/material-expansion.umd.min.js +10 -0
- package/bundles/material-expansion.umd.min.js.map +1 -0
- package/bundles/material-form-field.umd.js +2629 -0
- package/bundles/material-form-field.umd.js.map +1 -0
- package/bundles/material-form-field.umd.min.js +10 -0
- package/bundles/material-form-field.umd.min.js.map +1 -0
- package/bundles/material-grid-list.umd.js +3000 -0
- package/bundles/material-grid-list.umd.js.map +1 -0
- package/bundles/material-grid-list.umd.min.js +10 -0
- package/bundles/material-grid-list.umd.min.js.map +1 -0
- package/bundles/material-icon.umd.js +2862 -0
- package/bundles/material-icon.umd.js.map +1 -0
- package/bundles/material-icon.umd.min.js +10 -0
- package/bundles/material-icon.umd.min.js.map +1 -0
- package/bundles/material-input.umd.js +3214 -0
- package/bundles/material-input.umd.js.map +1 -0
- package/bundles/material-input.umd.min.js +10 -0
- package/bundles/material-input.umd.min.js.map +1 -0
- package/bundles/material-list.umd.js +2908 -0
- package/bundles/material-list.umd.js.map +1 -0
- package/bundles/material-list.umd.min.js +11 -0
- package/bundles/material-list.umd.min.js.map +1 -0
- package/bundles/material-menu.umd.js +3016 -0
- package/bundles/material-menu.umd.js.map +1 -0
- package/bundles/material-menu.umd.min.js +10 -0
- package/bundles/material-menu.umd.min.js.map +1 -0
- package/bundles/material-paginator.umd.js +4990 -0
- package/bundles/material-paginator.umd.js.map +1 -0
- package/bundles/material-paginator.umd.min.js +11 -0
- package/bundles/material-paginator.umd.min.js.map +1 -0
- package/bundles/material-progress-bar.umd.js +2204 -0
- package/bundles/material-progress-bar.umd.js.map +1 -0
- package/bundles/material-progress-bar.umd.min.js +10 -0
- package/bundles/material-progress-bar.umd.min.js.map +1 -0
- package/bundles/material-progress-spinner.umd.js +2594 -0
- package/bundles/material-progress-spinner.umd.js.map +1 -0
- package/bundles/material-progress-spinner.umd.min.js +10 -0
- package/bundles/material-progress-spinner.umd.min.js.map +1 -0
- package/bundles/material-radio.umd.js +2936 -0
- package/bundles/material-radio.umd.js.map +1 -0
- package/bundles/material-radio.umd.min.js +10 -0
- package/bundles/material-radio.umd.min.js.map +1 -0
- package/bundles/material-select.umd.js +3611 -0
- package/bundles/material-select.umd.js.map +1 -0
- package/bundles/material-select.umd.min.js +10 -0
- package/bundles/material-select.umd.min.js.map +1 -0
- package/bundles/material-sidenav.umd.js +2781 -0
- package/bundles/material-sidenav.umd.js.map +1 -0
- package/bundles/material-sidenav.umd.min.js +10 -0
- package/bundles/material-sidenav.umd.min.js.map +1 -0
- package/bundles/material-slide-toggle.umd.js +2657 -0
- package/bundles/material-slide-toggle.umd.js.map +1 -0
- package/bundles/material-slide-toggle.umd.min.js +10 -0
- package/bundles/material-slide-toggle.umd.min.js.map +1 -0
- package/bundles/material-slider.umd.js +3043 -0
- package/bundles/material-slider.umd.js.map +1 -0
- package/bundles/material-slider.umd.min.js +10 -0
- package/bundles/material-slider.umd.min.js.map +1 -0
- package/bundles/material-snack-bar.umd.js +2717 -0
- package/bundles/material-snack-bar.umd.js.map +1 -0
- package/bundles/material-snack-bar.umd.min.js +10 -0
- package/bundles/material-snack-bar.umd.min.js.map +1 -0
- package/bundles/material-sort.umd.js +2479 -0
- package/bundles/material-sort.umd.js.map +1 -0
- package/bundles/material-sort.umd.min.js +10 -0
- package/bundles/material-sort.umd.min.js.map +1 -0
- package/bundles/material-stepper.umd.js +3598 -0
- package/bundles/material-stepper.umd.js.map +1 -0
- package/bundles/material-stepper.umd.min.js +11 -0
- package/bundles/material-stepper.umd.min.js.map +1 -0
- package/bundles/material-table.umd.js +2458 -0
- package/bundles/material-table.umd.js.map +1 -0
- package/bundles/material-table.umd.min.js +10 -0
- package/bundles/material-table.umd.min.js.map +1 -0
- package/bundles/material-tabs.umd.js +3742 -0
- package/bundles/material-tabs.umd.js.map +1 -0
- package/bundles/material-tabs.umd.min.js +10 -0
- package/bundles/material-tabs.umd.min.js.map +1 -0
- package/bundles/material-toolbar.umd.js +2211 -0
- package/bundles/material-toolbar.umd.js.map +1 -0
- package/bundles/material-toolbar.umd.min.js +9 -0
- package/bundles/material-toolbar.umd.min.js.map +1 -0
- package/bundles/material-tooltip.umd.js +2821 -0
- package/bundles/material-tooltip.umd.js.map +1 -0
- package/bundles/material-tooltip.umd.min.js +10 -0
- package/bundles/material-tooltip.umd.min.js.map +1 -0
- package/bundles/material.umd.js +23785 -0
- package/bundles/material.umd.js.map +1 -0
- package/bundles/material.umd.min.js +23 -0
- package/bundles/material.umd.min.js.map +1 -0
- package/button/index.d.ts +8 -1
- package/button/index.metadata.json +11 -1
- package/button/package.json +7 -0
- package/button/typings/button-module.d.ts +2 -0
- package/button/typings/button.d.ts +80 -0
- package/button/typings/index.d.ts +4 -0
- package/button/typings/index.metadata.json +1 -0
- package/button/typings/mat-exports.d.ts +18 -0
- package/button/typings/public_api.d.ts +10 -0
- package/button-toggle/index.d.ts +8 -1
- package/button-toggle/index.metadata.json +11 -1
- package/button-toggle/package.json +7 -0
- package/button-toggle/typings/button-toggle-module.d.ts +2 -0
- package/button-toggle/typings/button-toggle.d.ts +156 -0
- package/button-toggle/typings/index.d.ts +4 -0
- package/button-toggle/typings/index.metadata.json +1 -0
- package/button-toggle/typings/mat-exports.d.ts +16 -0
- package/button-toggle/typings/public_api.d.ts +10 -0
- package/button-toggle.d.ts +8 -0
- package/button-toggle.metadata.json +11 -0
- package/button.d.ts +8 -0
- package/button.metadata.json +11 -0
- package/card/index.d.ts +8 -1
- package/card/index.metadata.json +11 -1
- package/card/package.json +7 -0
- package/card/typings/card-module.d.ts +2 -0
- package/card/typings/card.d.ts +95 -0
- package/card/typings/index.d.ts +4 -0
- package/card/typings/index.metadata.json +1 -0
- package/card/typings/mat-exports.d.ts +24 -0
- package/card/typings/public_api.d.ts +10 -0
- package/card.d.ts +8 -0
- package/card.metadata.json +11 -0
- package/checkbox/index.d.ts +8 -1
- package/checkbox/index.metadata.json +11 -1
- package/checkbox/package.json +7 -0
- package/checkbox/typings/checkbox-module.d.ts +2 -0
- package/checkbox/typings/checkbox-required-validator.d.ts +18 -0
- package/checkbox/typings/checkbox.d.ts +159 -0
- package/checkbox/typings/index.d.ts +4 -0
- package/checkbox/typings/index.metadata.json +1 -0
- package/checkbox/typings/mat-exports.d.ts +17 -0
- package/checkbox/typings/public_api.d.ts +11 -0
- package/checkbox.d.ts +8 -0
- package/checkbox.metadata.json +11 -0
- package/chips/index.d.ts +8 -0
- package/chips/index.metadata.json +11 -0
- package/chips/package.json +7 -0
- package/chips/typings/chip-input.d.ts +54 -0
- package/chips/typings/chip-list.d.ts +219 -0
- package/chips/typings/chip.d.ts +123 -0
- package/chips/typings/chips-module.d.ts +2 -0
- package/chips/typings/index.d.ts +4 -0
- package/chips/typings/index.metadata.json +1 -0
- package/chips/typings/mat-exports.d.ts +21 -0
- package/chips/typings/public_api.d.ts +12 -0
- package/chips.d.ts +8 -0
- package/chips.metadata.json +11 -0
- package/core/index.d.ts +8 -1
- package/core/index.metadata.json +11 -1
- package/core/package.json +7 -0
- package/core/typings/a11y/index.d.ts +8 -0
- package/core/typings/animation/animation.d.ts +20 -0
- package/core/typings/bidi/index.d.ts +8 -0
- package/core/typings/common-behaviors/color.d.ts +22 -0
- package/core/typings/common-behaviors/common-module.d.ts +24 -0
- package/core/typings/common-behaviors/constructor.d.ts +9 -0
- package/core/typings/common-behaviors/disable-ripple.d.ts +7 -0
- package/core/typings/common-behaviors/disabled.d.ts +7 -0
- package/core/typings/common-behaviors/index.d.ts +12 -0
- package/core/typings/common-behaviors/tabindex.d.ts +15 -0
- package/core/typings/compatibility/compatibility.d.ts +40 -0
- package/core/typings/coordination/unique-selection-dispatcher.d.ts +40 -0
- package/core/typings/datetime/date-adapter.d.ts +198 -0
- package/core/typings/datetime/date-formats.d.ts +20 -0
- package/core/typings/datetime/index.d.ts +8 -0
- package/core/typings/datetime/native-date-adapter.d.ts +50 -0
- package/core/typings/datetime/native-date-formats.d.ts +9 -0
- package/core/typings/error/error-options.d.ts +19 -0
- package/core/typings/gestures/gesture-annotations.d.ts +51 -0
- package/core/typings/gestures/gesture-config.d.ts +23 -0
- package/core/typings/index.d.ts +5 -0
- package/core/typings/index.metadata.json +1 -0
- package/core/typings/keyboard/keycodes.d.ts +8 -0
- package/core/typings/line/line.d.ts +30 -0
- package/core/typings/mat-exports.d.ts +36 -0
- package/core/typings/option/index.d.ts +4 -0
- package/core/typings/option/optgroup.d.ts +14 -0
- package/core/typings/option/option.d.ts +97 -0
- package/core/typings/overlay/index.d.ts +8 -0
- package/core/typings/placeholder/placeholder-options.d.ts +15 -0
- package/core/typings/platform/features.d.ts +8 -0
- package/core/typings/platform/index.d.ts +10 -0
- package/core/typings/platform/platform.d.ts +8 -0
- package/core/typings/portal/dom-portal-host.d.ts +8 -0
- package/core/typings/portal/portal-directives.d.ts +8 -0
- package/core/typings/portal/portal-injector.d.ts +19 -0
- package/core/typings/portal/portal.d.ts +8 -0
- package/core/typings/public_api.d.ts +34 -0
- package/core/typings/ripple/index.d.ts +5 -0
- package/core/typings/ripple/ripple-ref.d.ts +28 -0
- package/core/typings/ripple/ripple-renderer.d.ts +64 -0
- package/core/typings/ripple/ripple.d.ts +73 -0
- package/core/typings/rxjs/index.d.ts +9 -0
- package/core/typings/rxjs/rx-chain.d.ts +8 -0
- package/core/typings/rxjs/rx-operators.d.ts +8 -0
- package/core/typings/selection/index.d.ts +3 -0
- package/core/typings/selection/pseudo-checkbox/pseudo-checkbox.d.ts +20 -0
- package/core/typings/style/apply-transform.d.ts +13 -0
- package/core/typings/style/index.d.ts +5 -0
- package/core/typings/testing/month-constants.d.ts +12 -0
- package/core/typings/util/object-extend.d.ts +15 -0
- package/core.d.ts +7 -0
- package/core.metadata.json +11 -1
- package/datepicker/index.d.ts +8 -0
- package/datepicker/index.metadata.json +11 -0
- package/datepicker/package.json +7 -0
- package/datepicker/typings/calendar-body.d.ts +52 -0
- package/datepicker/typings/calendar.d.ts +90 -0
- package/datepicker/typings/coerce-date-property.d.ts +19 -0
- package/datepicker/typings/datepicker-errors.d.ts +9 -0
- package/datepicker/typings/datepicker-input.d.ts +94 -0
- package/datepicker/typings/datepicker-intl.d.ts +25 -0
- package/datepicker/typings/datepicker-module.d.ts +2 -0
- package/datepicker/typings/datepicker-toggle.d.ts +24 -0
- package/datepicker/typings/datepicker.d.ts +117 -0
- package/datepicker/typings/index.d.ts +4 -0
- package/datepicker/typings/index.metadata.json +1 -0
- package/datepicker/typings/mat-exports.d.ts +33 -0
- package/datepicker/typings/month-view.d.ts +65 -0
- package/datepicker/typings/public_api.d.ts +18 -0
- package/datepicker/typings/year-view.d.ts +54 -0
- package/datepicker.d.ts +8 -0
- package/datepicker.metadata.json +11 -0
- package/dialog/index.d.ts +8 -4
- package/dialog/index.metadata.json +11 -1
- package/dialog/package.json +7 -0
- package/dialog/typings/dialog-config.d.ts +54 -0
- package/dialog/typings/dialog-container.d.ts +68 -0
- package/dialog/typings/dialog-content-directives.d.ts +45 -0
- package/dialog/typings/dialog-module.d.ts +2 -0
- package/dialog/typings/dialog-ref.d.ts +68 -0
- package/dialog/typings/dialog.d.ts +108 -0
- package/dialog/typings/index.d.ts +4 -0
- package/dialog/typings/index.metadata.json +1 -0
- package/dialog/typings/mat-exports.d.ts +26 -0
- package/dialog/typings/public_api.d.ts +14 -0
- package/dialog.d.ts +8 -0
- package/dialog.metadata.json +11 -0
- package/esm2015/autocomplete.js +661 -0
- package/esm2015/autocomplete.js.map +1 -0
- package/esm2015/button-toggle.js +567 -0
- package/esm2015/button-toggle.js.map +1 -0
- package/esm2015/button.js +323 -0
- package/esm2015/button.js.map +1 -0
- package/esm2015/card.js +312 -0
- package/esm2015/card.js.map +1 -0
- package/esm2015/checkbox.js +504 -0
- package/esm2015/checkbox.js.map +1 -0
- package/esm2015/chips.js +1332 -0
- package/esm2015/chips.js.map +1 -0
- package/esm2015/core.js +2316 -0
- package/esm2015/core.js.map +1 -0
- package/esm2015/datepicker.js +1808 -0
- package/esm2015/datepicker.js.map +1 -0
- package/esm2015/dialog.js +849 -0
- package/esm2015/dialog.js.map +1 -0
- package/esm2015/expansion.js +581 -0
- package/esm2015/expansion.js.map +1 -0
- package/esm2015/form-field.js +522 -0
- package/esm2015/form-field.js.map +1 -0
- package/esm2015/grid-list.js +825 -0
- package/esm2015/grid-list.js.map +1 -0
- package/esm2015/icon.js +733 -0
- package/esm2015/icon.js.map +1 -0
- package/esm2015/input.js +568 -0
- package/esm2015/input.js.map +1 -0
- package/esm2015/list.js +666 -0
- package/esm2015/list.js.map +1 -0
- package/esm2015/material.js +51 -0
- package/esm2015/material.js.map +1 -0
- package/esm2015/menu.js +917 -0
- package/esm2015/menu.js.map +1 -0
- package/esm2015/paginator.js +304 -0
- package/esm2015/paginator.js.map +1 -0
- package/esm2015/progress-bar.js +132 -0
- package/esm2015/progress-bar.js.map +1 -0
- package/esm2015/progress-spinner.js +438 -0
- package/esm2015/progress-spinner.js.map +1 -0
- package/esm2015/radio.js +707 -0
- package/esm2015/radio.js.map +1 -0
- package/esm2015/select.js +1378 -0
- package/esm2015/select.js.map +1 -0
- package/esm2015/sidenav.js +666 -0
- package/esm2015/sidenav.js.map +1 -0
- package/esm2015/slide-toggle.js +429 -0
- package/esm2015/slide-toggle.js.map +1 -0
- package/esm2015/slider.js +833 -0
- package/esm2015/slider.js.map +1 -0
- package/esm2015/snack-bar.js +606 -0
- package/esm2015/snack-bar.js.map +1 -0
- package/esm2015/sort.js +387 -0
- package/esm2015/sort.js.map +1 -0
- package/esm2015/stepper.js +330 -0
- package/esm2015/stepper.js.map +1 -0
- package/esm2015/table.js +312 -0
- package/esm2015/table.js.map +1 -0
- package/esm2015/tabs.js +1477 -0
- package/esm2015/tabs.js.map +1 -0
- package/esm2015/toolbar.js +88 -0
- package/esm2015/toolbar.js.map +1 -0
- package/esm2015/tooltip.js +701 -0
- package/esm2015/tooltip.js.map +1 -0
- package/esm5/autocomplete.es5.js +691 -0
- package/esm5/autocomplete.es5.js.map +1 -0
- package/esm5/button-toggle.es5.js +619 -0
- package/esm5/button-toggle.es5.js.map +1 -0
- package/esm5/button.es5.js +341 -0
- package/esm5/button.es5.js.map +1 -0
- package/esm5/card.es5.js +349 -0
- package/esm5/card.es5.js.map +1 -0
- package/esm5/checkbox.es5.js +534 -0
- package/esm5/checkbox.es5.js.map +1 -0
- package/esm5/chips.es5.js +1466 -0
- package/esm5/chips.es5.js.map +1 -0
- package/esm5/core.es5.js +2316 -0
- package/esm5/core.es5.js.map +1 -0
- package/esm5/datepicker.es5.js +1936 -0
- package/esm5/datepicker.es5.js.map +1 -0
- package/esm5/dialog.es5.js +877 -0
- package/esm5/dialog.es5.js.map +1 -0
- package/esm5/expansion.es5.js +608 -0
- package/esm5/expansion.es5.js.map +1 -0
- package/esm5/form-field.es5.js +556 -0
- package/esm5/form-field.es5.js.map +1 -0
- package/esm5/grid-list.es5.js +877 -0
- package/esm5/grid-list.es5.js.map +1 -0
- package/esm5/icon.es5.js +746 -0
- package/esm5/icon.es5.js.map +1 -0
- package/esm5/input.es5.js +606 -0
- package/esm5/input.es5.js.map +1 -0
- package/esm5/list.es5.js +726 -0
- package/esm5/list.es5.js.map +1 -0
- package/esm5/material.es5.js +48 -0
- package/esm5/material.es5.js.map +1 -0
- package/esm5/menu.es5.js +953 -0
- package/esm5/menu.es5.js.map +1 -0
- package/esm5/paginator.es5.js +324 -0
- package/esm5/paginator.es5.js.map +1 -0
- package/esm5/progress-bar.es5.js +142 -0
- package/esm5/progress-bar.es5.js.map +1 -0
- package/esm5/progress-spinner.es5.js +474 -0
- package/esm5/progress-spinner.es5.js.map +1 -0
- package/esm5/radio.es5.js +779 -0
- package/esm5/radio.es5.js.map +1 -0
- package/esm5/select.es5.js +1444 -0
- package/esm5/select.es5.js.map +1 -0
- package/esm5/sidenav.es5.js +719 -0
- package/esm5/sidenav.es5.js.map +1 -0
- package/esm5/slide-toggle.es5.js +451 -0
- package/esm5/slide-toggle.es5.js.map +1 -0
- package/esm5/slider.es5.js +932 -0
- package/esm5/slider.es5.js.map +1 -0
- package/esm5/snack-bar.es5.js +623 -0
- package/esm5/snack-bar.es5.js.map +1 -0
- package/esm5/sort.es5.js +418 -0
- package/esm5/sort.es5.js.map +1 -0
- package/esm5/stepper.es5.js +376 -0
- package/esm5/stepper.es5.js.map +1 -0
- package/esm5/table.es5.js +370 -0
- package/esm5/table.es5.js.map +1 -0
- package/esm5/tabs.es5.js +1576 -0
- package/esm5/tabs.es5.js.map +1 -0
- package/esm5/toolbar.es5.js +94 -0
- package/esm5/toolbar.es5.js.map +1 -0
- package/esm5/tooltip.es5.js +759 -0
- package/esm5/tooltip.es5.js.map +1 -0
- package/expansion/index.d.ts +8 -0
- package/expansion/index.metadata.json +11 -0
- package/expansion/package.json +7 -0
- package/expansion/typings/accordion-item.d.ts +41 -0
- package/expansion/typings/accordion.d.ts +29 -0
- package/expansion/typings/expansion-module.d.ts +2 -0
- package/expansion/typings/expansion-panel-header.d.ts +56 -0
- package/expansion/typings/expansion-panel.d.ts +39 -0
- package/expansion/typings/index.d.ts +5 -0
- package/expansion/typings/index.metadata.json +1 -0
- package/expansion/typings/mat-exports.d.ts +20 -0
- package/expansion/typings/public_api.d.ts +13 -0
- package/expansion.d.ts +8 -0
- package/expansion.metadata.json +11 -0
- package/form-field/index.d.ts +8 -0
- package/form-field/index.metadata.json +11 -0
- package/form-field/package.json +7 -0
- package/form-field/typings/error.d.ts +4 -0
- package/form-field/typings/form-field-control.d.ts +39 -0
- package/form-field/typings/form-field-errors.d.ts +13 -0
- package/form-field/typings/form-field-module.d.ts +2 -0
- package/form-field/typings/form-field.d.ts +77 -0
- package/form-field/typings/hint.d.ts +7 -0
- package/form-field/typings/index.d.ts +4 -0
- package/form-field/typings/index.metadata.json +1 -0
- package/form-field/typings/mat-exports.d.ts +23 -0
- package/form-field/typings/placeholder.d.ts +3 -0
- package/form-field/typings/prefix.d.ts +3 -0
- package/form-field/typings/public_api.d.ts +17 -0
- package/form-field/typings/suffix.d.ts +3 -0
- package/form-field.d.ts +8 -0
- package/form-field.metadata.json +11 -0
- package/grid-list/index.d.ts +8 -1
- package/grid-list/index.metadata.json +11 -1
- package/grid-list/package.json +7 -0
- package/grid-list/typings/grid-list-measure.d.ts +17 -0
- package/grid-list/typings/grid-list-module.d.ts +2 -0
- package/grid-list/typings/grid-list.d.ts +53 -0
- package/grid-list/typings/grid-tile.d.ts +55 -0
- package/grid-list/typings/index.d.ts +5 -0
- package/grid-list/typings/index.metadata.json +1 -0
- package/grid-list/typings/mat-exports.d.ts +13 -0
- package/grid-list/typings/public_api.d.ts +11 -0
- package/grid-list/typings/tile-coordinator.d.ts +64 -0
- package/grid-list/typings/tile-styler.d.ts +129 -0
- package/grid-list.d.ts +8 -0
- package/grid-list.metadata.json +11 -0
- package/icon/index.d.ts +8 -1
- package/icon/index.metadata.json +11 -1
- package/icon/package.json +7 -0
- package/icon/typings/icon-module.d.ts +2 -0
- package/icon/typings/icon-registry.d.ts +194 -0
- package/icon/typings/icon.d.ts +76 -0
- package/icon/typings/index.d.ts +4 -0
- package/icon/typings/index.metadata.json +1 -0
- package/icon/typings/mat-exports.d.ts +14 -0
- package/icon/typings/public_api.d.ts +11 -0
- package/icon.d.ts +8 -0
- package/icon.metadata.json +11 -0
- package/input/index.d.ts +8 -1
- package/input/index.metadata.json +11 -1
- package/input/package.json +7 -0
- package/input/typings/autosize.d.ts +45 -0
- package/input/typings/index.d.ts +4 -0
- package/input/typings/index.metadata.json +1 -0
- package/input/typings/input-errors.d.ts +9 -0
- package/input/typings/input-module.d.ts +2 -0
- package/input/typings/input.d.ts +78 -0
- package/input/typings/mat-exports.d.ts +13 -0
- package/input/typings/public_api.d.ts +12 -0
- package/input.d.ts +8 -0
- package/input.metadata.json +11 -0
- package/list/index.d.ts +8 -1
- package/list/index.metadata.json +11 -1
- package/list/package.json +7 -0
- package/list/typings/index.d.ts +4 -0
- package/list/typings/index.metadata.json +1 -0
- package/list/typings/list-module.d.ts +2 -0
- package/list/typings/list.d.ts +78 -0
- package/list/typings/mat-exports.d.ts +27 -0
- package/list/typings/public_api.d.ts +11 -0
- package/list/typings/selection-list.d.ts +112 -0
- package/list.d.ts +8 -0
- package/list.metadata.json +11 -0
- package/material.d.ts +39 -0
- package/material.metadata.json +102 -0
- package/menu/index.d.ts +8 -1
- package/menu/index.metadata.json +11 -1
- package/menu/package.json +7 -0
- package/menu/typings/index.d.ts +6 -0
- package/menu/typings/index.metadata.json +1 -0
- package/menu/typings/mat-exports.d.ts +16 -0
- package/menu/typings/menu-animations.d.ts +27 -0
- package/menu/typings/menu-directive.d.ts +86 -0
- package/menu/typings/menu-errors.d.ts +24 -0
- package/menu/typings/menu-item.d.ts +40 -0
- package/menu/typings/menu-module.d.ts +2 -0
- package/menu/typings/menu-panel.d.ts +22 -0
- package/menu/typings/menu-positions.d.ts +9 -0
- package/menu/typings/menu-trigger.d.ts +116 -0
- package/menu/typings/menu.d.ts +12 -0
- package/menu/typings/public_api.d.ts +12 -0
- package/menu.d.ts +8 -0
- package/menu.metadata.json +11 -0
- package/package.json +10 -8
- package/paginator/index.d.ts +8 -0
- package/paginator/index.metadata.json +11 -0
- package/paginator/package.json +7 -0
- package/paginator/typings/index.d.ts +4 -0
- package/paginator/typings/index.metadata.json +1 -0
- package/paginator/typings/mat-exports.d.ts +13 -0
- package/paginator/typings/paginator-intl.d.ts +20 -0
- package/paginator/typings/paginator-module.d.ts +2 -0
- package/paginator/typings/paginator.d.ts +75 -0
- package/paginator/typings/public_api.d.ts +11 -0
- package/paginator.d.ts +8 -0
- package/paginator.metadata.json +11 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -0
- package/prebuilt-themes/indigo-pink.css +1 -0
- package/prebuilt-themes/pink-bluegrey.css +1 -0
- package/prebuilt-themes/purple-green.css +1 -0
- package/progress-bar/index.d.ts +8 -1
- package/progress-bar/index.metadata.json +11 -1
- package/progress-bar/package.json +7 -0
- package/progress-bar/typings/index.d.ts +4 -0
- package/progress-bar/typings/index.metadata.json +1 -0
- package/progress-bar/typings/mat-exports.d.ts +11 -0
- package/progress-bar/typings/progress-bar-module.d.ts +2 -0
- package/progress-bar/typings/progress-bar.d.ts +32 -0
- package/progress-bar/typings/public_api.d.ts +10 -0
- package/progress-bar.d.ts +8 -0
- package/progress-bar.metadata.json +11 -0
- package/progress-spinner/index.d.ts +8 -0
- package/progress-spinner/index.metadata.json +11 -0
- package/progress-spinner/package.json +7 -0
- package/progress-spinner/typings/index.d.ts +4 -0
- package/progress-spinner/typings/index.metadata.json +1 -0
- package/progress-spinner/typings/mat-exports.d.ts +14 -0
- package/progress-spinner/typings/progress-spinner-module.d.ts +2 -0
- package/progress-spinner/typings/progress-spinner.d.ts +98 -0
- package/progress-spinner/typings/public_api.d.ts +10 -0
- package/progress-spinner.d.ts +8 -0
- package/progress-spinner.metadata.json +11 -0
- package/radio/index.d.ts +8 -1
- package/radio/index.metadata.json +11 -1
- package/radio/package.json +7 -0
- package/radio/typings/index.d.ts +4 -0
- package/radio/typings/index.metadata.json +1 -0
- package/radio/typings/mat-exports.d.ts +16 -0
- package/radio/typings/public_api.d.ts +10 -0
- package/radio/typings/radio-module.d.ts +2 -0
- package/radio/typings/radio.d.ts +217 -0
- package/radio.d.ts +8 -0
- package/radio.metadata.json +11 -0
- package/select/index.d.ts +8 -5
- package/select/index.metadata.json +11 -1
- package/select/package.json +7 -0
- package/select/typings/index.d.ts +4 -0
- package/select/typings/index.metadata.json +1 -0
- package/select/typings/mat-exports.d.ts +17 -0
- package/select/typings/public_api.d.ts +11 -0
- package/select/typings/select-animations.d.ts +36 -0
- package/select/typings/select-errors.d.ts +26 -0
- package/select/typings/select-module.d.ts +2 -0
- package/select/typings/select.d.ts +412 -0
- package/select.d.ts +8 -0
- package/select.metadata.json +11 -0
- package/sidenav/index.d.ts +8 -1
- package/sidenav/index.metadata.json +11 -1
- package/sidenav/package.json +7 -0
- package/sidenav/typings/drawer.d.ts +178 -0
- package/sidenav/typings/index.d.ts +4 -0
- package/sidenav/typings/index.metadata.json +1 -0
- package/sidenav/typings/mat-exports.d.ts +16 -0
- package/sidenav/typings/public_api.d.ts +11 -0
- package/sidenav/typings/sidenav-module.d.ts +2 -0
- package/sidenav/typings/sidenav.d.ts +6 -0
- package/sidenav.d.ts +8 -0
- package/sidenav.metadata.json +11 -0
- package/slide-toggle/index.d.ts +8 -1
- package/slide-toggle/index.metadata.json +11 -1
- package/slide-toggle/package.json +7 -0
- package/slide-toggle/typings/index.d.ts +4 -0
- package/slide-toggle/typings/index.metadata.json +1 -0
- package/slide-toggle/typings/mat-exports.d.ts +14 -0
- package/slide-toggle/typings/public_api.d.ts +10 -0
- package/slide-toggle/typings/slide-toggle-module.d.ts +2 -0
- package/slide-toggle/typings/slide-toggle.d.ts +93 -0
- package/slide-toggle.d.ts +8 -0
- package/slide-toggle.metadata.json +11 -0
- package/slider/index.d.ts +8 -1
- package/slider/index.metadata.json +11 -1
- package/slider/package.json +7 -0
- package/slider/typings/index.d.ts +4 -0
- package/slider/typings/index.metadata.json +1 -0
- package/slider/typings/mat-exports.d.ts +14 -0
- package/slider/typings/public_api.d.ts +10 -0
- package/slider/typings/slider-module.d.ts +2 -0
- package/slider/typings/slider.d.ts +207 -0
- package/slider.d.ts +8 -0
- package/slider.metadata.json +11 -0
- package/snack-bar/index.d.ts +8 -4
- package/snack-bar/index.metadata.json +11 -1
- package/snack-bar/package.json +7 -0
- package/snack-bar/typings/index.d.ts +4 -0
- package/snack-bar/typings/index.metadata.json +1 -0
- package/snack-bar/typings/mat-exports.d.ts +18 -0
- package/snack-bar/typings/public_api.d.ts +14 -0
- package/snack-bar/typings/simple-snack-bar.d.ts +18 -0
- package/snack-bar/typings/snack-bar-config.d.ts +38 -0
- package/snack-bar/typings/snack-bar-container.d.ts +61 -0
- package/snack-bar/typings/snack-bar-module.d.ts +2 -0
- package/snack-bar/typings/snack-bar-ref.d.ts +51 -0
- package/snack-bar/typings/snack-bar.d.ts +70 -0
- package/snack-bar.d.ts +8 -0
- package/snack-bar.metadata.json +11 -0
- package/sort/index.d.ts +8 -0
- package/sort/index.metadata.json +11 -0
- package/sort/package.json +7 -0
- package/sort/typings/index.d.ts +4 -0
- package/sort/typings/index.metadata.json +1 -0
- package/sort/typings/mat-exports.d.ts +16 -0
- package/sort/typings/public_api.d.ts +13 -0
- package/sort/typings/sort-direction.d.ts +8 -0
- package/sort/typings/sort-errors.d.ts +13 -0
- package/sort/typings/sort-header-intl.d.ts +17 -0
- package/sort/typings/sort-header.d.ts +44 -0
- package/sort/typings/sort-module.d.ts +2 -0
- package/sort/typings/sort.d.ts +59 -0
- package/sort.d.ts +8 -0
- package/sort.metadata.json +11 -0
- package/stepper/index.d.ts +8 -0
- package/stepper/index.metadata.json +11 -0
- package/stepper/package.json +7 -0
- package/stepper/typings/index.d.ts +4 -0
- package/stepper/typings/index.metadata.json +1 -0
- package/stepper/typings/mat-exports.d.ts +21 -0
- package/stepper/typings/public_api.d.ts +13 -0
- package/stepper/typings/step-header.d.ts +23 -0
- package/stepper/typings/step-label.d.ts +14 -0
- package/stepper/typings/stepper-button.d.ts +10 -0
- package/stepper/typings/stepper-module.d.ts +2 -0
- package/stepper/typings/stepper.d.ts +27 -0
- package/stepper.d.ts +8 -0
- package/stepper.metadata.json +11 -0
- package/table/index.d.ts +8 -0
- package/table/index.metadata.json +11 -0
- package/table/package.json +7 -0
- package/table/typings/cell.d.ts +44 -0
- package/table/typings/index.d.ts +4 -0
- package/table/typings/index.metadata.json +1 -0
- package/table/typings/mat-exports.d.ts +20 -0
- package/table/typings/public_api.d.ts +12 -0
- package/table/typings/row.d.ts +30 -0
- package/table/typings/table-module.d.ts +2 -0
- package/table/typings/table.d.ts +8 -0
- package/table.d.ts +8 -0
- package/table.metadata.json +11 -0
- package/tabs/index.d.ts +8 -1
- package/tabs/index.metadata.json +11 -1
- package/tabs/package.json +7 -0
- package/tabs/typings/index.d.ts +8 -0
- package/tabs/typings/index.metadata.json +1 -0
- package/tabs/typings/ink-bar.d.ts +33 -0
- package/tabs/typings/mat-exports.d.ts +31 -0
- package/tabs/typings/public_api.d.ts +17 -0
- package/tabs/typings/tab-body.d.ts +69 -0
- package/tabs/typings/tab-group.d.ts +100 -0
- package/tabs/typings/tab-header.d.ts +156 -0
- package/tabs/typings/tab-label-wrapper.d.ts +25 -0
- package/tabs/typings/tab-label.d.ts +15 -0
- package/tabs/typings/tab-nav-bar/index.d.ts +8 -0
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +77 -0
- package/tabs/typings/tab.d.ts +50 -0
- package/tabs/typings/tabs-module.d.ts +2 -0
- package/tabs.d.ts +8 -0
- package/tabs.metadata.json +11 -0
- package/toolbar/index.d.ts +8 -1
- package/toolbar/index.metadata.json +11 -1
- package/toolbar/package.json +7 -0
- package/toolbar/typings/index.d.ts +4 -0
- package/toolbar/typings/index.metadata.json +1 -0
- package/toolbar/typings/mat-exports.d.ts +13 -0
- package/toolbar/typings/public_api.d.ts +10 -0
- package/toolbar/typings/toolbar-module.d.ts +2 -0
- package/toolbar/typings/toolbar.d.ts +21 -0
- package/toolbar.d.ts +8 -0
- package/toolbar.metadata.json +11 -0
- package/tooltip/index.d.ts +8 -1
- package/tooltip/index.metadata.json +11 -1
- package/tooltip/package.json +7 -0
- package/tooltip/typings/index.d.ts +4 -0
- package/tooltip/typings/index.metadata.json +1 -0
- package/tooltip/typings/mat-exports.d.ts +14 -0
- package/tooltip/typings/public_api.d.ts +10 -0
- package/tooltip/typings/tooltip-module.d.ts +2 -0
- package/tooltip/typings/tooltip.d.ts +177 -0
- package/tooltip.d.ts +8 -0
- package/tooltip.metadata.json +11 -0
- package/typings/autocomplete/autocomplete-module.d.ts +2 -0
- package/typings/autocomplete/autocomplete-trigger.d.ts +159 -0
- package/typings/autocomplete/autocomplete.d.ts +55 -0
- package/typings/autocomplete/index.d.ts +4 -0
- package/typings/autocomplete/index.metadata.json +1 -0
- package/typings/autocomplete/mat-exports.d.ts +17 -0
- package/typings/autocomplete/public_api.d.ts +11 -0
- package/typings/button/button-module.d.ts +2 -0
- package/typings/button/button.d.ts +80 -0
- package/typings/button/index.d.ts +4 -0
- package/typings/button/index.metadata.json +1 -0
- package/typings/button/mat-exports.d.ts +18 -0
- package/typings/button/public_api.d.ts +10 -0
- package/typings/button-toggle/button-toggle-module.d.ts +2 -0
- package/typings/button-toggle/button-toggle.d.ts +156 -0
- package/typings/button-toggle/index.d.ts +4 -0
- package/typings/button-toggle/index.metadata.json +1 -0
- package/typings/button-toggle/mat-exports.d.ts +16 -0
- package/typings/button-toggle/public_api.d.ts +10 -0
- package/typings/card/card-module.d.ts +2 -0
- package/typings/card/card.d.ts +95 -0
- package/typings/card/index.d.ts +4 -0
- package/typings/card/index.metadata.json +1 -0
- package/typings/card/mat-exports.d.ts +24 -0
- package/typings/card/public_api.d.ts +10 -0
- package/typings/checkbox/checkbox-module.d.ts +2 -0
- package/typings/checkbox/checkbox-required-validator.d.ts +18 -0
- package/typings/checkbox/checkbox.d.ts +159 -0
- package/typings/checkbox/index.d.ts +4 -0
- package/typings/checkbox/index.metadata.json +1 -0
- package/typings/checkbox/mat-exports.d.ts +17 -0
- package/typings/checkbox/public_api.d.ts +11 -0
- package/typings/chips/chip-input.d.ts +54 -0
- package/typings/chips/chip-list.d.ts +219 -0
- package/typings/chips/chip.d.ts +123 -0
- package/typings/chips/chips-module.d.ts +2 -0
- package/typings/chips/index.d.ts +4 -0
- package/typings/chips/index.metadata.json +1 -0
- package/typings/chips/mat-exports.d.ts +21 -0
- package/typings/chips/public_api.d.ts +12 -0
- package/typings/core/a11y/index.d.ts +8 -0
- package/typings/core/animation/animation.d.ts +20 -0
- package/typings/core/bidi/index.d.ts +8 -0
- package/typings/core/common-behaviors/color.d.ts +22 -0
- package/typings/core/common-behaviors/common-module.d.ts +24 -0
- package/typings/core/common-behaviors/constructor.d.ts +9 -0
- package/typings/core/common-behaviors/disable-ripple.d.ts +7 -0
- package/typings/core/common-behaviors/disabled.d.ts +7 -0
- package/typings/core/common-behaviors/index.d.ts +12 -0
- package/typings/core/common-behaviors/tabindex.d.ts +15 -0
- package/typings/core/compatibility/compatibility.d.ts +40 -0
- package/typings/core/coordination/unique-selection-dispatcher.d.ts +40 -0
- package/typings/core/datetime/date-adapter.d.ts +198 -0
- package/typings/core/datetime/date-formats.d.ts +20 -0
- package/typings/core/datetime/index.d.ts +8 -0
- package/typings/core/datetime/native-date-adapter.d.ts +50 -0
- package/typings/core/datetime/native-date-formats.d.ts +9 -0
- package/typings/core/error/error-options.d.ts +19 -0
- package/typings/core/gestures/gesture-annotations.d.ts +51 -0
- package/typings/core/gestures/gesture-config.d.ts +23 -0
- package/typings/core/index.d.ts +5 -0
- package/typings/core/index.metadata.json +1 -0
- package/typings/core/keyboard/keycodes.d.ts +8 -0
- package/typings/core/line/line.d.ts +30 -0
- package/typings/core/mat-exports.d.ts +36 -0
- package/typings/core/option/index.d.ts +4 -0
- package/typings/core/option/optgroup.d.ts +14 -0
- package/typings/core/option/option.d.ts +97 -0
- package/typings/core/overlay/index.d.ts +8 -0
- package/typings/core/placeholder/placeholder-options.d.ts +15 -0
- package/typings/core/platform/features.d.ts +8 -0
- package/typings/core/platform/index.d.ts +10 -0
- package/typings/core/platform/platform.d.ts +8 -0
- package/typings/core/portal/dom-portal-host.d.ts +8 -0
- package/typings/core/portal/portal-directives.d.ts +8 -0
- package/typings/core/portal/portal-injector.d.ts +19 -0
- package/typings/core/portal/portal.d.ts +8 -0
- package/typings/core/public_api.d.ts +34 -0
- package/typings/core/ripple/index.d.ts +5 -0
- package/typings/core/ripple/ripple-ref.d.ts +28 -0
- package/typings/core/ripple/ripple-renderer.d.ts +64 -0
- package/typings/core/ripple/ripple.d.ts +73 -0
- package/typings/core/rxjs/index.d.ts +9 -0
- package/typings/core/rxjs/rx-chain.d.ts +8 -0
- package/typings/core/rxjs/rx-operators.d.ts +8 -0
- package/typings/core/selection/index.d.ts +3 -0
- package/typings/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +20 -0
- package/typings/core/style/apply-transform.d.ts +13 -0
- package/typings/core/style/index.d.ts +5 -0
- package/typings/core/testing/month-constants.d.ts +12 -0
- package/typings/core/util/object-extend.d.ts +15 -0
- package/typings/datepicker/calendar-body.d.ts +52 -0
- package/typings/datepicker/calendar.d.ts +90 -0
- package/typings/datepicker/coerce-date-property.d.ts +19 -0
- package/typings/datepicker/datepicker-errors.d.ts +9 -0
- package/typings/datepicker/datepicker-input.d.ts +94 -0
- package/typings/datepicker/datepicker-intl.d.ts +25 -0
- package/typings/datepicker/datepicker-module.d.ts +2 -0
- package/typings/datepicker/datepicker-toggle.d.ts +24 -0
- package/typings/datepicker/datepicker.d.ts +117 -0
- package/typings/datepicker/index.d.ts +4 -0
- package/typings/datepicker/index.metadata.json +1 -0
- package/typings/datepicker/mat-exports.d.ts +33 -0
- package/typings/datepicker/month-view.d.ts +65 -0
- package/typings/datepicker/public_api.d.ts +18 -0
- package/typings/datepicker/year-view.d.ts +54 -0
- package/typings/dialog/dialog-config.d.ts +54 -0
- package/typings/dialog/dialog-container.d.ts +68 -0
- package/typings/dialog/dialog-content-directives.d.ts +45 -0
- package/typings/dialog/dialog-module.d.ts +2 -0
- package/typings/dialog/dialog-ref.d.ts +68 -0
- package/typings/dialog/dialog.d.ts +108 -0
- package/typings/dialog/index.d.ts +4 -0
- package/typings/dialog/index.metadata.json +1 -0
- package/typings/dialog/mat-exports.d.ts +26 -0
- package/typings/dialog/public_api.d.ts +14 -0
- package/typings/expansion/accordion-item.d.ts +41 -0
- package/typings/expansion/accordion.d.ts +29 -0
- package/typings/expansion/expansion-module.d.ts +2 -0
- package/typings/expansion/expansion-panel-header.d.ts +56 -0
- package/typings/expansion/expansion-panel.d.ts +39 -0
- package/typings/expansion/index.d.ts +5 -0
- package/typings/expansion/index.metadata.json +1 -0
- package/typings/expansion/mat-exports.d.ts +20 -0
- package/typings/expansion/public_api.d.ts +13 -0
- package/typings/form-field/error.d.ts +4 -0
- package/typings/form-field/form-field-control.d.ts +39 -0
- package/typings/form-field/form-field-errors.d.ts +13 -0
- package/typings/form-field/form-field-module.d.ts +2 -0
- package/typings/form-field/form-field.d.ts +77 -0
- package/typings/form-field/hint.d.ts +7 -0
- package/typings/form-field/index.d.ts +4 -0
- package/typings/form-field/index.metadata.json +1 -0
- package/typings/form-field/mat-exports.d.ts +23 -0
- package/typings/form-field/placeholder.d.ts +3 -0
- package/typings/form-field/prefix.d.ts +3 -0
- package/typings/form-field/public_api.d.ts +17 -0
- package/typings/form-field/suffix.d.ts +3 -0
- package/typings/grid-list/grid-list-measure.d.ts +17 -0
- package/typings/grid-list/grid-list-module.d.ts +2 -0
- package/typings/grid-list/grid-list.d.ts +53 -0
- package/typings/grid-list/grid-tile.d.ts +55 -0
- package/typings/grid-list/index.d.ts +5 -0
- package/typings/grid-list/index.metadata.json +1 -0
- package/typings/grid-list/mat-exports.d.ts +13 -0
- package/typings/grid-list/public_api.d.ts +11 -0
- package/typings/grid-list/tile-coordinator.d.ts +64 -0
- package/typings/grid-list/tile-styler.d.ts +129 -0
- package/typings/icon/icon-module.d.ts +2 -0
- package/typings/icon/icon-registry.d.ts +194 -0
- package/typings/icon/icon.d.ts +76 -0
- package/typings/icon/index.d.ts +4 -0
- package/typings/icon/index.metadata.json +1 -0
- package/typings/icon/mat-exports.d.ts +14 -0
- package/typings/icon/public_api.d.ts +11 -0
- package/typings/index.d.ts +4 -0
- package/typings/index.metadata.json +26 -0
- package/typings/input/autosize.d.ts +45 -0
- package/typings/input/index.d.ts +4 -0
- package/typings/input/index.metadata.json +1 -0
- package/typings/input/input-errors.d.ts +9 -0
- package/typings/input/input-module.d.ts +2 -0
- package/typings/input/input.d.ts +78 -0
- package/typings/input/mat-exports.d.ts +13 -0
- package/typings/input/public_api.d.ts +12 -0
- package/typings/list/index.d.ts +4 -0
- package/typings/list/index.metadata.json +1 -0
- package/typings/list/list-module.d.ts +2 -0
- package/typings/list/list.d.ts +78 -0
- package/typings/list/mat-exports.d.ts +27 -0
- package/typings/list/public_api.d.ts +11 -0
- package/typings/list/selection-list.d.ts +112 -0
- package/typings/menu/index.d.ts +6 -0
- package/typings/menu/index.metadata.json +1 -0
- package/typings/menu/mat-exports.d.ts +16 -0
- package/typings/menu/menu-animations.d.ts +27 -0
- package/typings/menu/menu-directive.d.ts +86 -0
- package/typings/menu/menu-errors.d.ts +24 -0
- package/typings/menu/menu-item.d.ts +40 -0
- package/typings/menu/menu-module.d.ts +2 -0
- package/typings/menu/menu-panel.d.ts +22 -0
- package/typings/menu/menu-positions.d.ts +9 -0
- package/typings/menu/menu-trigger.d.ts +116 -0
- package/typings/menu/menu.d.ts +12 -0
- package/typings/menu/public_api.d.ts +12 -0
- package/typings/paginator/index.d.ts +4 -0
- package/typings/paginator/index.metadata.json +1 -0
- package/typings/paginator/mat-exports.d.ts +13 -0
- package/typings/paginator/paginator-intl.d.ts +20 -0
- package/typings/paginator/paginator-module.d.ts +2 -0
- package/typings/paginator/paginator.d.ts +75 -0
- package/typings/paginator/public_api.d.ts +11 -0
- package/typings/progress-bar/index.d.ts +4 -0
- package/typings/progress-bar/index.metadata.json +1 -0
- package/typings/progress-bar/mat-exports.d.ts +11 -0
- package/typings/progress-bar/progress-bar-module.d.ts +2 -0
- package/typings/progress-bar/progress-bar.d.ts +32 -0
- package/typings/progress-bar/public_api.d.ts +10 -0
- package/typings/progress-spinner/index.d.ts +4 -0
- package/typings/progress-spinner/index.metadata.json +1 -0
- package/typings/progress-spinner/mat-exports.d.ts +14 -0
- package/typings/progress-spinner/progress-spinner-module.d.ts +2 -0
- package/typings/progress-spinner/progress-spinner.d.ts +98 -0
- package/typings/progress-spinner/public_api.d.ts +10 -0
- package/typings/public_api.d.ts +39 -0
- package/typings/radio/index.d.ts +4 -0
- package/typings/radio/index.metadata.json +1 -0
- package/typings/radio/mat-exports.d.ts +16 -0
- package/typings/radio/public_api.d.ts +10 -0
- package/typings/radio/radio-module.d.ts +2 -0
- package/typings/radio/radio.d.ts +217 -0
- package/typings/select/index.d.ts +4 -0
- package/typings/select/index.metadata.json +1 -0
- package/typings/select/mat-exports.d.ts +17 -0
- package/typings/select/public_api.d.ts +11 -0
- package/typings/select/select-animations.d.ts +36 -0
- package/typings/select/select-errors.d.ts +26 -0
- package/typings/select/select-module.d.ts +2 -0
- package/typings/select/select.d.ts +412 -0
- package/typings/sidenav/drawer.d.ts +178 -0
- package/typings/sidenav/index.d.ts +4 -0
- package/typings/sidenav/index.metadata.json +1 -0
- package/typings/sidenav/mat-exports.d.ts +16 -0
- package/typings/sidenav/public_api.d.ts +11 -0
- package/typings/sidenav/sidenav-module.d.ts +2 -0
- package/typings/sidenav/sidenav.d.ts +6 -0
- package/typings/slide-toggle/index.d.ts +4 -0
- package/typings/slide-toggle/index.metadata.json +1 -0
- package/typings/slide-toggle/mat-exports.d.ts +14 -0
- package/typings/slide-toggle/public_api.d.ts +10 -0
- package/typings/slide-toggle/slide-toggle-module.d.ts +2 -0
- package/typings/slide-toggle/slide-toggle.d.ts +93 -0
- package/typings/slider/index.d.ts +4 -0
- package/typings/slider/index.metadata.json +1 -0
- package/typings/slider/mat-exports.d.ts +14 -0
- package/typings/slider/public_api.d.ts +10 -0
- package/typings/slider/slider-module.d.ts +2 -0
- package/typings/slider/slider.d.ts +207 -0
- package/typings/snack-bar/index.d.ts +4 -0
- package/typings/snack-bar/index.metadata.json +1 -0
- package/typings/snack-bar/mat-exports.d.ts +18 -0
- package/typings/snack-bar/public_api.d.ts +14 -0
- package/typings/snack-bar/simple-snack-bar.d.ts +18 -0
- package/typings/snack-bar/snack-bar-config.d.ts +38 -0
- package/typings/snack-bar/snack-bar-container.d.ts +61 -0
- package/typings/snack-bar/snack-bar-module.d.ts +2 -0
- package/typings/snack-bar/snack-bar-ref.d.ts +51 -0
- package/typings/snack-bar/snack-bar.d.ts +70 -0
- package/typings/sort/index.d.ts +4 -0
- package/typings/sort/index.metadata.json +1 -0
- package/typings/sort/mat-exports.d.ts +16 -0
- package/typings/sort/public_api.d.ts +13 -0
- package/typings/sort/sort-direction.d.ts +8 -0
- package/typings/sort/sort-errors.d.ts +13 -0
- package/typings/sort/sort-header-intl.d.ts +17 -0
- package/typings/sort/sort-header.d.ts +44 -0
- package/typings/sort/sort-module.d.ts +2 -0
- package/typings/sort/sort.d.ts +59 -0
- package/typings/stepper/index.d.ts +4 -0
- package/typings/stepper/index.metadata.json +1 -0
- package/typings/stepper/mat-exports.d.ts +21 -0
- package/typings/stepper/public_api.d.ts +13 -0
- package/typings/stepper/step-header.d.ts +23 -0
- package/typings/stepper/step-label.d.ts +14 -0
- package/typings/stepper/stepper-button.d.ts +10 -0
- package/typings/stepper/stepper-module.d.ts +2 -0
- package/typings/stepper/stepper.d.ts +27 -0
- package/typings/table/cell.d.ts +44 -0
- package/typings/table/index.d.ts +4 -0
- package/typings/table/index.metadata.json +1 -0
- package/typings/table/mat-exports.d.ts +20 -0
- package/typings/table/public_api.d.ts +12 -0
- package/typings/table/row.d.ts +30 -0
- package/typings/table/table-module.d.ts +2 -0
- package/typings/table/table.d.ts +8 -0
- package/typings/tabs/index.d.ts +8 -0
- package/typings/tabs/index.metadata.json +1 -0
- package/typings/tabs/ink-bar.d.ts +33 -0
- package/typings/tabs/mat-exports.d.ts +31 -0
- package/typings/tabs/public_api.d.ts +17 -0
- package/typings/tabs/tab-body.d.ts +69 -0
- package/typings/tabs/tab-group.d.ts +100 -0
- package/typings/tabs/tab-header.d.ts +156 -0
- package/typings/tabs/tab-label-wrapper.d.ts +25 -0
- package/typings/tabs/tab-label.d.ts +15 -0
- package/typings/tabs/tab-nav-bar/index.d.ts +8 -0
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +77 -0
- package/typings/tabs/tab.d.ts +50 -0
- package/typings/tabs/tabs-module.d.ts +2 -0
- package/typings/toolbar/index.d.ts +4 -0
- package/typings/toolbar/index.metadata.json +1 -0
- package/typings/toolbar/mat-exports.d.ts +13 -0
- package/typings/toolbar/public_api.d.ts +10 -0
- package/typings/toolbar/toolbar-module.d.ts +2 -0
- package/typings/toolbar/toolbar.d.ts +21 -0
- package/typings/tooltip/index.d.ts +4 -0
- package/typings/tooltip/index.metadata.json +1 -0
- package/typings/tooltip/mat-exports.d.ts +14 -0
- package/typings/tooltip/public_api.d.ts +10 -0
- package/typings/tooltip/tooltip-module.d.ts +2 -0
- package/typings/tooltip/tooltip.d.ts +177 -0
- package/typings/version.d.ts +10 -0
- package/button/README.md +0 -115
- package/button/_button-base.scss +0 -116
- package/button/_button-theme.scss +0 -85
- package/button/button.css +0 -101
- package/button/button.css.map +0 -1
- package/button/button.d.ts +0 -35
- package/button/button.html +0 -6
- package/button/button.js +0 -196
- package/button/button.js.map +0 -1
- package/button/button.metadata.json +0 -1
- package/button/button.scss +0 -72
- package/button/index.js +0 -3
- package/button/index.js.map +0 -1
- package/button-toggle/README.md +0 -149
- package/button-toggle/_button-toggle-theme.scss +0 -14
- package/button-toggle/button-toggle.css +0 -24
- package/button-toggle/button-toggle.css.map +0 -1
- package/button-toggle/button-toggle.d.ts +0 -110
- package/button-toggle/button-toggle.html +0 -14
- package/button-toggle/button-toggle.js +0 -436
- package/button-toggle/button-toggle.js.map +0 -1
- package/button-toggle/button-toggle.metadata.json +0 -1
- package/button-toggle/button-toggle.scss +0 -34
- package/button-toggle/index.js +0 -3
- package/button-toggle/index.js.map +0 -1
- package/card/README.md +0 -116
- package/card/_card-theme.scss +0 -17
- package/card/card-header.html +0 -5
- package/card/card-title-group.html +0 -5
- package/card/card.css +0 -140
- package/card/card.css.map +0 -1
- package/card/card.d.ts +0 -35
- package/card/card.html +0 -1
- package/card/card.js +0 -187
- package/card/card.js.map +0 -1
- package/card/card.metadata.json +0 -1
- package/card/card.scss +0 -226
- package/card/index.js +0 -3
- package/card/index.js.map +0 -1
- package/checkbox/README.md +0 -79
- package/checkbox/_checkbox-theme.scss +0 -69
- package/checkbox/checkbox.css +0 -241
- package/checkbox/checkbox.css.map +0 -1
- package/checkbox/checkbox.d.ts +0 -127
- package/checkbox/checkbox.html +0 -37
- package/checkbox/checkbox.js +0 -344
- package/checkbox/checkbox.js.map +0 -1
- package/checkbox/checkbox.metadata.json +0 -1
- package/checkbox/checkbox.scss +0 -412
- package/checkbox/index.js +0 -3
- package/checkbox/index.js.map +0 -1
- package/core/README.md +0 -2
- package/core/_core.scss +0 -27
- package/core/a11y/README.md +0 -30
- package/core/a11y/_a11y.scss +0 -13
- package/core/a11y/focus-trap.d.ts +0 -23
- package/core/a11y/focus-trap.js +0 -82
- package/core/a11y/focus-trap.js.map +0 -1
- package/core/a11y/focus-trap.metadata.json +0 -1
- package/core/a11y/index.d.ts +0 -10
- package/core/a11y/index.js +0 -37
- package/core/a11y/index.js.map +0 -1
- package/core/a11y/index.metadata.json +0 -1
- package/core/a11y/interactivity-checker.d.ts +0 -31
- package/core/a11y/interactivity-checker.js +0 -122
- package/core/a11y/interactivity-checker.js.map +0 -1
- package/core/a11y/interactivity-checker.metadata.json +0 -1
- package/core/a11y/live-announcer.d.ts +0 -13
- package/core/a11y/live-announcer.js +0 -56
- package/core/a11y/live-announcer.js.map +0 -1
- package/core/a11y/live-announcer.metadata.json +0 -1
- package/core/annotations/field-value.d.ts +0 -16
- package/core/annotations/field-value.js +0 -30
- package/core/annotations/field-value.js.map +0 -1
- package/core/async/promise-completer.d.ts +0 -6
- package/core/async/promise-completer.js +0 -12
- package/core/async/promise-completer.js.map +0 -1
- package/core/coordination/unique-selection-dispatcher.d.ts +0 -17
- package/core/coordination/unique-selection-dispatcher.js +0 -42
- package/core/coordination/unique-selection-dispatcher.js.map +0 -1
- package/core/coordination/unique-selection-dispatcher.metadata.json +0 -1
- package/core/core.d.ts +0 -28
- package/core/core.js +0 -71
- package/core/core.js.map +0 -1
- package/core/core.metadata.json +0 -1
- package/core/errors/error.d.ts +0 -6
- package/core/errors/error.js +0 -19
- package/core/errors/error.js.map +0 -1
- package/core/gestures/MdGestureConfig.d.ts +0 -7
- package/core/gestures/MdGestureConfig.js +0 -84
- package/core/gestures/MdGestureConfig.js.map +0 -1
- package/core/gestures/MdGestureConfig.metadata.json +0 -1
- package/core/index.js +0 -3
- package/core/index.js.map +0 -1
- package/core/keyboard/keycodes.d.ts +0 -6
- package/core/keyboard/keycodes.js +0 -12
- package/core/keyboard/keycodes.js.map +0 -1
- package/core/keyboard/keycodes.metadata.json +0 -1
- package/core/line/line.d.ts +0 -19
- package/core/line/line.js +0 -65
- package/core/line/line.js.map +0 -1
- package/core/line/line.metadata.json +0 -1
- package/core/overlay/generic-component-type.d.ts +0 -3
- package/core/overlay/generic-component-type.js +0 -3
- package/core/overlay/generic-component-type.js.map +0 -1
- package/core/overlay/overlay-container.d.ts +0 -19
- package/core/overlay/overlay-container.js +0 -33
- package/core/overlay/overlay-container.js.map +0 -1
- package/core/overlay/overlay-directives.d.ts +0 -36
- package/core/overlay/overlay-directives.js +0 -120
- package/core/overlay/overlay-directives.js.map +0 -1
- package/core/overlay/overlay-directives.metadata.json +0 -1
- package/core/overlay/overlay-ref.d.ts +0 -28
- package/core/overlay/overlay-ref.js +0 -82
- package/core/overlay/overlay-ref.js.map +0 -1
- package/core/overlay/overlay-state.d.ts +0 -11
- package/core/overlay/overlay-state.js +0 -13
- package/core/overlay/overlay-state.js.map +0 -1
- package/core/overlay/overlay.css +0 -2
- package/core/overlay/overlay.css.map +0 -1
- package/core/overlay/overlay.d.ts +0 -51
- package/core/overlay/overlay.js +0 -93
- package/core/overlay/overlay.js.map +0 -1
- package/core/overlay/overlay.metadata.json +0 -1
- package/core/overlay/overlay.scss +0 -55
- package/core/overlay/position/connected-position-strategy.d.ts +0 -69
- package/core/overlay/position/connected-position-strategy.js +0 -164
- package/core/overlay/position/connected-position-strategy.js.map +0 -1
- package/core/overlay/position/connected-position.d.ts +0 -22
- package/core/overlay/position/connected-position.js +0 -12
- package/core/overlay/position/connected-position.js.map +0 -1
- package/core/overlay/position/global-position-strategy.d.ts +0 -45
- package/core/overlay/position/global-position-strategy.js +0 -102
- package/core/overlay/position/global-position-strategy.js.map +0 -1
- package/core/overlay/position/overlay-position-builder.d.ts +0 -14
- package/core/overlay/position/overlay-position-builder.js +0 -34
- package/core/overlay/position/overlay-position-builder.js.map +0 -1
- package/core/overlay/position/overlay-position-builder.metadata.json +0 -1
- package/core/overlay/position/position-strategy.d.ts +0 -5
- package/core/overlay/position/position-strategy.js +0 -3
- package/core/overlay/position/position-strategy.js.map +0 -1
- package/core/overlay/position/relative-position-strategy.d.ts +0 -7
- package/core/overlay/position/relative-position-strategy.js +0 -12
- package/core/overlay/position/relative-position-strategy.js.map +0 -1
- package/core/overlay/position/viewport-ruler.d.ts +0 -16
- package/core/overlay/position/viewport-ruler.js +0 -71
- package/core/overlay/position/viewport-ruler.js.map +0 -1
- package/core/overlay/position/viewport-ruler.metadata.json +0 -1
- package/core/portal/README.md +0 -72
- package/core/portal/dom-portal-host.d.ts +0 -17
- package/core/portal/dom-portal-host.js +0 -56
- package/core/portal/dom-portal-host.js.map +0 -1
- package/core/portal/portal-directives.d.ts +0 -38
- package/core/portal/portal-directives.js +0 -124
- package/core/portal/portal-directives.js.map +0 -1
- package/core/portal/portal-directives.metadata.json +0 -1
- package/core/portal/portal-errors.d.ts +0 -29
- package/core/portal/portal-errors.js +0 -66
- package/core/portal/portal-errors.js.map +0 -1
- package/core/portal/portal.d.ts +0 -85
- package/core/portal/portal.js +0 -155
- package/core/portal/portal.js.map +0 -1
- package/core/ripple/README.md +0 -27
- package/core/ripple/_ripple.scss +0 -106
- package/core/ripple/ripple-renderer.d.ts +0 -65
- package/core/ripple/ripple-renderer.js +0 -149
- package/core/ripple/ripple-renderer.js.map +0 -1
- package/core/ripple/ripple-renderer.metadata.json +0 -1
- package/core/ripple/ripple.d.ts +0 -75
- package/core/ripple/ripple.js +0 -179
- package/core/ripple/ripple.js.map +0 -1
- package/core/ripple/ripple.metadata.json +0 -1
- package/core/rtl/dir.d.ts +0 -17
- package/core/rtl/dir.js +0 -83
- package/core/rtl/dir.js.map +0 -1
- package/core/rtl/dir.metadata.json +0 -1
- package/core/style/_button-common.scss +0 -7
- package/core/style/_elevation.scss +0 -174
- package/core/style/_list-common.scss +0 -49
- package/core/style/_sidenav-common.scss +0 -8
- package/core/style/_variables.scss +0 -55
- package/core/style/apply-transform.d.ts +0 -6
- package/core/style/apply-transform.js +0 -14
- package/core/style/apply-transform.js.map +0 -1
- package/core/theming/_all-theme.scss +0 -46
- package/core/theming/_palette.scss +0 -694
- package/core/theming/_theming.scss +0 -84
- package/core/theming/prebuilt/deeppurple-amber.css +0 -446
- package/core/theming/prebuilt/deeppurple-amber.css.map +0 -1
- package/core/theming/prebuilt/deeppurple-amber.scss +0 -14
- package/core/theming/prebuilt/indigo-pink.css +0 -446
- package/core/theming/prebuilt/indigo-pink.css.map +0 -1
- package/core/theming/prebuilt/indigo-pink.scss +0 -14
- package/core/theming/prebuilt/pink-bluegrey.css +0 -446
- package/core/theming/prebuilt/pink-bluegrey.css.map +0 -1
- package/core/theming/prebuilt/pink-bluegrey.scss +0 -14
- package/core/theming/prebuilt/purple-green.css +0 -446
- package/core/theming/prebuilt/purple-green.css.map +0 -1
- package/core/theming/prebuilt/purple-green.scss +0 -14
- package/core/typography/_typography.scss +0 -6
- package/core.js +0 -3
- package/core.js.map +0 -1
- package/dialog/README.md +0 -0
- package/dialog/_dialog-theme.scss +0 -11
- package/dialog/dialog-config.d.ts +0 -11
- package/dialog/dialog-config.js +0 -12
- package/dialog/dialog-config.js.map +0 -1
- package/dialog/dialog-container.css +0 -7
- package/dialog/dialog-container.css.map +0 -1
- package/dialog/dialog-container.d.ts +0 -29
- package/dialog/dialog-container.html +0 -3
- package/dialog/dialog-container.js +0 -88
- package/dialog/dialog-container.js.map +0 -1
- package/dialog/dialog-container.metadata.json +0 -1
- package/dialog/dialog-container.scss +0 -12
- package/dialog/dialog-errors.d.ts +0 -5
- package/dialog/dialog-errors.js +0 -16
- package/dialog/dialog-errors.js.map +0 -1
- package/dialog/dialog-injector.d.ts +0 -9
- package/dialog/dialog-injector.js +0 -17
- package/dialog/dialog-injector.js.map +0 -1
- package/dialog/dialog-ref.d.ts +0 -20
- package/dialog/dialog-ref.js +0 -29
- package/dialog/dialog-ref.js.map +0 -1
- package/dialog/dialog.d.ts +0 -51
- package/dialog/dialog.js +0 -128
- package/dialog/dialog.js.map +0 -1
- package/dialog/dialog.metadata.json +0 -1
- package/dialog/index.js +0 -6
- package/dialog/index.js.map +0 -1
- package/grid-list/README.md +0 -118
- package/grid-list/_grid-list-theme.scss +0 -6
- package/grid-list/grid-list-errors.d.ts +0 -19
- package/grid-list/grid-list-errors.js +0 -38
- package/grid-list/grid-list-errors.js.map +0 -1
- package/grid-list/grid-list-measure.d.ts +0 -10
- package/grid-list/grid-list-measure.js +0 -16
- package/grid-list/grid-list-measure.js.map +0 -1
- package/grid-list/grid-list-measure.metadata.json +0 -1
- package/grid-list/grid-list.css +0 -78
- package/grid-list/grid-list.css.map +0 -1
- package/grid-list/grid-list.d.ts +0 -49
- package/grid-list/grid-list.html +0 -3
- package/grid-list/grid-list.js +0 -165
- package/grid-list/grid-list.js.map +0 -1
- package/grid-list/grid-list.metadata.json +0 -1
- package/grid-list/grid-list.scss +0 -91
- package/grid-list/grid-tile-text.html +0 -3
- package/grid-list/grid-tile.d.ts +0 -28
- package/grid-list/grid-tile.html +0 -4
- package/grid-list/grid-tile.js +0 -87
- package/grid-list/grid-tile.js.map +0 -1
- package/grid-list/grid-tile.metadata.json +0 -1
- package/grid-list/index.js +0 -3
- package/grid-list/index.js.map +0 -1
- package/grid-list/tile-coordinator.d.ts +0 -51
- package/grid-list/tile-coordinator.js +0 -124
- package/grid-list/tile-coordinator.js.map +0 -1
- package/grid-list/tile-styler.d.ts +0 -88
- package/grid-list/tile-styler.js +0 -190
- package/grid-list/tile-styler.js.map +0 -1
- package/icon/README.md +0 -116
- package/icon/_icon-theme.scss +0 -6
- package/icon/fake-svgs.d.ts +0 -5
- package/icon/fake-svgs.js +0 -29
- package/icon/fake-svgs.js.map +0 -1
- package/icon/icon-registry.d.ts +0 -148
- package/icon/icon-registry.js +0 -375
- package/icon/icon-registry.js.map +0 -1
- package/icon/icon-registry.metadata.json +0 -1
- package/icon/icon.css +0 -8
- package/icon/icon.css.map +0 -1
- package/icon/icon.d.ts +0 -85
- package/icon/icon.js +0 -252
- package/icon/icon.js.map +0 -1
- package/icon/icon.metadata.json +0 -1
- package/icon/icon.scss +0 -13
- package/icon/index.js +0 -3
- package/icon/index.js.map +0 -1
- package/index.d.ts +0 -23
- package/index.js +0 -25
- package/index.js.map +0 -1
- package/index.metadata.json +0 -1
- package/input/README.md +0 -121
- package/input/_input-theme.scss +0 -64
- package/input/index.js +0 -3
- package/input/index.js.map +0 -1
- package/input/input.css +0 -109
- package/input/input.css.map +0 -1
- package/input/input.d.ts +0 -134
- package/input/input.html +0 -65
- package/input/input.js +0 -471
- package/input/input.js.map +0 -1
- package/input/input.metadata.json +0 -1
- package/input/input.scss +0 -198
- package/list/README.md +0 -167
- package/list/_list-theme.scss +0 -28
- package/list/index.js +0 -3
- package/list/index.js.map +0 -1
- package/list/list-item.html +0 -5
- package/list/list.css +0 -139
- package/list/list.css.map +0 -1
- package/list/list.d.ts +0 -24
- package/list/list.js +0 -113
- package/list/list.js.map +0 -1
- package/list/list.metadata.json +0 -1
- package/list/list.scss +0 -168
- package/material.umd.js +0 -9017
- package/material.umd.js.map +0 -1
- package/menu/README.md +0 -164
- package/menu/_menu-theme.scss +0 -25
- package/menu/index.js +0 -3
- package/menu/index.js.map +0 -1
- package/menu/menu-directive.d.ts +0 -54
- package/menu/menu-directive.js +0 -158
- package/menu/menu-directive.js.map +0 -1
- package/menu/menu-directive.metadata.json +0 -1
- package/menu/menu-errors.d.ts +0 -21
- package/menu/menu-errors.js +0 -40
- package/menu/menu-errors.js.map +0 -1
- package/menu/menu-item.d.ts +0 -18
- package/menu/menu-item.js +0 -74
- package/menu/menu-item.js.map +0 -1
- package/menu/menu-item.metadata.json +0 -1
- package/menu/menu-positions.d.ts +0 -2
- package/menu/menu-positions.js +0 -3
- package/menu/menu-positions.js.map +0 -1
- package/menu/menu-trigger.d.ts +0 -62
- package/menu/menu-trigger.js +0 -169
- package/menu/menu-trigger.js.map +0 -1
- package/menu/menu-trigger.metadata.json +0 -1
- package/menu/menu.css +0 -41
- package/menu/menu.css.map +0 -1
- package/menu/menu.d.ts +0 -7
- package/menu/menu.html +0 -6
- package/menu/menu.js +0 -39
- package/menu/menu.js.map +0 -1
- package/menu/menu.metadata.json +0 -1
- package/menu/menu.scss +0 -59
- package/module.d.ts +0 -6
- package/module.js +0 -117
- package/module.js.map +0 -1
- package/module.metadata.json +0 -1
- package/progress-bar/README.md +0 -54
- package/progress-bar/_progress-bar-theme.scss +0 -78
- package/progress-bar/index.js +0 -3
- package/progress-bar/index.js.map +0 -1
- package/progress-bar/progress-bar.css +0 -114
- package/progress-bar/progress-bar.css.map +0 -1
- package/progress-bar/progress-bar.d.ts +0 -34
- package/progress-bar/progress-bar.html +0 -5
- package/progress-bar/progress-bar.js +0 -122
- package/progress-bar/progress-bar.js.map +0 -1
- package/progress-bar/progress-bar.metadata.json +0 -1
- package/progress-bar/progress-bar.scss +0 -229
- package/progress-circle/README.md +0 -51
- package/progress-circle/_progress-circle-theme.scss +0 -23
- package/progress-circle/index.d.ts +0 -1
- package/progress-circle/index.js +0 -3
- package/progress-circle/index.js.map +0 -1
- package/progress-circle/index.metadata.json +0 -1
- package/progress-circle/progress-circle.css +0 -43
- package/progress-circle/progress-circle.css.map +0 -1
- package/progress-circle/progress-circle.d.ts +0 -76
- package/progress-circle/progress-circle.html +0 -9
- package/progress-circle/progress-circle.js +0 -315
- package/progress-circle/progress-circle.js.map +0 -1
- package/progress-circle/progress-circle.metadata.json +0 -1
- package/progress-circle/progress-circle.scss +0 -67
- package/radio/README.md +0 -79
- package/radio/_radio-theme.scss +0 -36
- package/radio/index.js +0 -3
- package/radio/index.js.map +0 -1
- package/radio/radio.css +0 -82
- package/radio/radio.css.map +0 -1
- package/radio/radio.d.ts +0 -127
- package/radio/radio.html +0 -27
- package/radio/radio.js +0 -445
- package/radio/radio.js.map +0 -1
- package/radio/radio.metadata.json +0 -1
- package/radio/radio.scss +0 -92
- package/select/index.js +0 -33
- package/select/index.js.map +0 -1
- package/select/select.css +0 -2
- package/select/select.css.map +0 -1
- package/select/select.d.ts +0 -2
- package/select/select.html +0 -1
- package/select/select.js +0 -25
- package/select/select.js.map +0 -1
- package/select/select.metadata.json +0 -1
- package/select/select.scss +0 -0
- package/sidenav/README.md +0 -83
- package/sidenav/_sidenav-theme.scss +0 -37
- package/sidenav/index.js +0 -3
- package/sidenav/index.js.map +0 -1
- package/sidenav/sidenav-transitions.css +0 -10
- package/sidenav/sidenav-transitions.css.map +0 -1
- package/sidenav/sidenav-transitions.scss +0 -14
- package/sidenav/sidenav.css +0 -111
- package/sidenav/sidenav.css.map +0 -1
- package/sidenav/sidenav.d.ts +0 -141
- package/sidenav/sidenav.html +0 -8
- package/sidenav/sidenav.js +0 -479
- package/sidenav/sidenav.js.map +0 -1
- package/sidenav/sidenav.metadata.json +0 -1
- package/sidenav/sidenav.scss +0 -133
- package/slide-toggle/README.md +0 -66
- package/slide-toggle/_slide-toggle-theme.scss +0 -77
- package/slide-toggle/index.js +0 -3
- package/slide-toggle/index.js.map +0 -1
- package/slide-toggle/slide-toggle.css +0 -88
- package/slide-toggle/slide-toggle.css.map +0 -1
- package/slide-toggle/slide-toggle.d.ts +0 -74
- package/slide-toggle/slide-toggle.html +0 -33
- package/slide-toggle/slide-toggle.js +0 -317
- package/slide-toggle/slide-toggle.js.map +0 -1
- package/slide-toggle/slide-toggle.metadata.json +0 -1
- package/slide-toggle/slide-toggle.scss +0 -140
- package/slider/README.md +0 -97
- package/slider/_slider-theme.scss +0 -33
- package/slider/index.js +0 -3
- package/slider/index.js.map +0 -1
- package/slider/slider.css +0 -122
- package/slider/slider.css.map +0 -1
- package/slider/slider.d.ts +0 -155
- package/slider/slider.html +0 -21
- package/slider/slider.js +0 -433
- package/slider/slider.js.map +0 -1
- package/slider/slider.metadata.json +0 -1
- package/slider/slider.scss +0 -186
- package/slider/test-gesture-config.d.ts +0 -21
- package/slider/test-gesture-config.js +0 -59
- package/slider/test-gesture-config.js.map +0 -1
- package/slider/test-gesture-config.metadata.json +0 -1
- package/snack-bar/README.md +0 -38
- package/snack-bar/index.js +0 -6
- package/snack-bar/index.js.map +0 -1
- package/snack-bar/simple-snack-bar.css +0 -27
- package/snack-bar/simple-snack-bar.css.map +0 -1
- package/snack-bar/simple-snack-bar.d.ts +0 -17
- package/snack-bar/simple-snack-bar.html +0 -3
- package/snack-bar/simple-snack-bar.js +0 -38
- package/snack-bar/simple-snack-bar.js.map +0 -1
- package/snack-bar/simple-snack-bar.metadata.json +0 -1
- package/snack-bar/simple-snack-bar.scss +0 -28
- package/snack-bar/snack-bar-config.d.ts +0 -11
- package/snack-bar/snack-bar-config.js +0 -10
- package/snack-bar/snack-bar-config.js.map +0 -1
- package/snack-bar/snack-bar-container.css +0 -12
- package/snack-bar/snack-bar-container.css.map +0 -1
- package/snack-bar/snack-bar-container.d.ts +0 -15
- package/snack-bar/snack-bar-container.html +0 -1
- package/snack-bar/snack-bar-container.js +0 -53
- package/snack-bar/snack-bar-container.js.map +0 -1
- package/snack-bar/snack-bar-container.metadata.json +0 -1
- package/snack-bar/snack-bar-container.scss +0 -19
- package/snack-bar/snack-bar-errors.d.ts +0 -4
- package/snack-bar/snack-bar-errors.js +0 -15
- package/snack-bar/snack-bar-errors.js.map +0 -1
- package/snack-bar/snack-bar-ref.d.ts +0 -17
- package/snack-bar/snack-bar-ref.js +0 -28
- package/snack-bar/snack-bar-ref.js.map +0 -1
- package/snack-bar/snack-bar.d.ts +0 -41
- package/snack-bar/snack-bar.js +0 -110
- package/snack-bar/snack-bar.js.map +0 -1
- package/snack-bar/snack-bar.metadata.json +0 -1
- package/tabs/README.md +0 -47
- package/tabs/_tabs-theme.scss +0 -23
- package/tabs/index.js +0 -3
- package/tabs/index.js.map +0 -1
- package/tabs/ink-bar.d.ts +0 -24
- package/tabs/ink-bar.js +0 -50
- package/tabs/ink-bar.js.map +0 -1
- package/tabs/ink-bar.metadata.json +0 -1
- package/tabs/tab-content.d.ts +0 -6
- package/tabs/tab-content.js +0 -32
- package/tabs/tab-content.js.map +0 -1
- package/tabs/tab-content.metadata.json +0 -1
- package/tabs/tab-group.css +0 -55
- package/tabs/tab-group.css.map +0 -1
- package/tabs/tab-group.html +0 -27
- package/tabs/tab-group.scss +0 -72
- package/tabs/tab-label-wrapper.d.ts +0 -10
- package/tabs/tab-label-wrapper.js +0 -31
- package/tabs/tab-label-wrapper.js.map +0 -1
- package/tabs/tab-label-wrapper.metadata.json +0 -1
- package/tabs/tab-label.d.ts +0 -6
- package/tabs/tab-label.js +0 -32
- package/tabs/tab-label.js.map +0 -1
- package/tabs/tab-label.metadata.json +0 -1
- package/tabs/tabs.d.ts +0 -79
- package/tabs/tabs.js +0 -290
- package/tabs/tabs.js.map +0 -1
- package/tabs/tabs.metadata.json +0 -1
- package/toolbar/README.md +0 -68
- package/toolbar/_toolbar-theme.scss +0 -33
- package/toolbar/index.js +0 -3
- package/toolbar/index.js.map +0 -1
- package/toolbar/toolbar.css +0 -19
- package/toolbar/toolbar.css.map +0 -1
- package/toolbar/toolbar.d.ts +0 -17
- package/toolbar/toolbar.html +0 -6
- package/toolbar/toolbar.js +0 -83
- package/toolbar/toolbar.js.map +0 -1
- package/toolbar/toolbar.metadata.json +0 -1
- package/toolbar/toolbar.scss +0 -36
- package/tooltip/README.md +0 -32
- package/tooltip/_tooltip-theme.scss +0 -9
- package/tooltip/index.js +0 -3
- package/tooltip/index.js.map +0 -1
- package/tooltip/tooltip.css +0 -14
- package/tooltip/tooltip.css.map +0 -1
- package/tooltip/tooltip.d.ts +0 -67
- package/tooltip/tooltip.html +0 -0
- package/tooltip/tooltip.js +0 -210
- package/tooltip/tooltip.js.map +0 -1
- package/tooltip/tooltip.metadata.json +0 -1
- package/tooltip/tooltip.scss +0 -21
- package/tsconfig-spec.json +0 -33
- package/tsconfig.json +0 -33
- package/typings.d.ts +0 -1
package/esm2015/chips.js
ADDED
|
@@ -0,0 +1,1332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, Directive, ElementRef, EventEmitter, Input, NgModule, Optional, Output, Renderer2, Self, ViewEncapsulation } from '@angular/core';
|
|
9
|
+
import { FocusKeyManager } from '@angular/cdk/a11y';
|
|
10
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
11
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
12
|
+
import { startWith } from '@angular/cdk/rxjs';
|
|
13
|
+
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
14
|
+
import { BACKSPACE, DELETE, Directionality, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW, mixinColor, mixinDisabled } from '@angular/material/core';
|
|
15
|
+
import { MdFormFieldControl } from '@angular/material/form-field';
|
|
16
|
+
import { merge } from 'rxjs/observable/merge';
|
|
17
|
+
import { Subject } from 'rxjs/Subject';
|
|
18
|
+
import { Subscription } from 'rxjs/Subscription';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Event object emitted by MdChip when selected or deselected.
|
|
22
|
+
*/
|
|
23
|
+
class MdChipSelectionChange {
|
|
24
|
+
/**
|
|
25
|
+
* @param {?} source
|
|
26
|
+
* @param {?} selected
|
|
27
|
+
* @param {?=} isUserInput
|
|
28
|
+
*/
|
|
29
|
+
constructor(source, selected, isUserInput = false) {
|
|
30
|
+
this.source = source;
|
|
31
|
+
this.selected = selected;
|
|
32
|
+
this.isUserInput = isUserInput;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* \@docs-private
|
|
37
|
+
*/
|
|
38
|
+
class MdChipBase {
|
|
39
|
+
/**
|
|
40
|
+
* @param {?} _renderer
|
|
41
|
+
* @param {?} _elementRef
|
|
42
|
+
*/
|
|
43
|
+
constructor(_renderer, _elementRef) {
|
|
44
|
+
this._renderer = _renderer;
|
|
45
|
+
this._elementRef = _elementRef;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const _MdChipMixinBase = mixinColor(mixinDisabled(MdChipBase), 'primary');
|
|
49
|
+
/**
|
|
50
|
+
* Dummy directive to add CSS class to basic chips.
|
|
51
|
+
* \@docs-private
|
|
52
|
+
*/
|
|
53
|
+
class MdBasicChip {
|
|
54
|
+
}
|
|
55
|
+
MdBasicChip.decorators = [
|
|
56
|
+
{ type: Directive, args: [{
|
|
57
|
+
selector: `md-basic-chip, [md-basic-chip], mat-basic-chip, [mat-basic-chip]`,
|
|
58
|
+
host: { 'class': 'mat-basic-chip' }
|
|
59
|
+
},] },
|
|
60
|
+
];
|
|
61
|
+
/**
|
|
62
|
+
* @nocollapse
|
|
63
|
+
*/
|
|
64
|
+
MdBasicChip.ctorParameters = () => [];
|
|
65
|
+
/**
|
|
66
|
+
* Material design styled Chip component. Used inside the MdChipList component.
|
|
67
|
+
*/
|
|
68
|
+
class MdChip extends _MdChipMixinBase {
|
|
69
|
+
/**
|
|
70
|
+
* @param {?} renderer
|
|
71
|
+
* @param {?} _elementRef
|
|
72
|
+
*/
|
|
73
|
+
constructor(renderer, _elementRef) {
|
|
74
|
+
super(renderer, _elementRef);
|
|
75
|
+
this._elementRef = _elementRef;
|
|
76
|
+
this._selected = false;
|
|
77
|
+
this._selectable = true;
|
|
78
|
+
this._removable = true;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the chip has focus.
|
|
81
|
+
*/
|
|
82
|
+
this._hasFocus = false;
|
|
83
|
+
/**
|
|
84
|
+
* Emits when the chip is focused.
|
|
85
|
+
*/
|
|
86
|
+
this._onFocus = new Subject();
|
|
87
|
+
/**
|
|
88
|
+
* Emits when the chip is blured.
|
|
89
|
+
*/
|
|
90
|
+
this._onBlur = new Subject();
|
|
91
|
+
/**
|
|
92
|
+
* Emitted when the chip is selected or deselected.
|
|
93
|
+
*/
|
|
94
|
+
this.selectionChange = new EventEmitter();
|
|
95
|
+
/**
|
|
96
|
+
* Emitted when the chip is destroyed.
|
|
97
|
+
*/
|
|
98
|
+
this.destroyed = new EventEmitter();
|
|
99
|
+
/**
|
|
100
|
+
* Emitted when the chip is destroyed.
|
|
101
|
+
* @deprecated Use 'destroyed' instead.
|
|
102
|
+
*/
|
|
103
|
+
this.destroy = this.destroyed;
|
|
104
|
+
/**
|
|
105
|
+
* Emitted when a chip is to be removed.
|
|
106
|
+
*/
|
|
107
|
+
this.removed = new EventEmitter();
|
|
108
|
+
/**
|
|
109
|
+
* Emitted when a chip is to be removed.
|
|
110
|
+
* @deprecated Use `removed` instead.
|
|
111
|
+
*/
|
|
112
|
+
this.onRemove = this.removed;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Whether the chip is selected.
|
|
116
|
+
* @return {?}
|
|
117
|
+
*/
|
|
118
|
+
get selected() { return this._selected; }
|
|
119
|
+
/**
|
|
120
|
+
* @param {?} value
|
|
121
|
+
* @return {?}
|
|
122
|
+
*/
|
|
123
|
+
set selected(value) {
|
|
124
|
+
this._selected = coerceBooleanProperty(value);
|
|
125
|
+
this.selectionChange.emit({
|
|
126
|
+
source: this,
|
|
127
|
+
isUserInput: false,
|
|
128
|
+
selected: value
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The value of the chip. Defaults to the content inside <md-chip> tags.
|
|
133
|
+
* @return {?}
|
|
134
|
+
*/
|
|
135
|
+
get value() {
|
|
136
|
+
return this._value != undefined
|
|
137
|
+
? this._value
|
|
138
|
+
: this._elementRef.nativeElement.textContent;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* @param {?} newValue
|
|
142
|
+
* @return {?}
|
|
143
|
+
*/
|
|
144
|
+
set value(newValue) { this._value = newValue; }
|
|
145
|
+
/**
|
|
146
|
+
* Whether or not the chips are selectable. When a chip is not selectable,
|
|
147
|
+
* changes to it's selected state are always ignored.
|
|
148
|
+
* @return {?}
|
|
149
|
+
*/
|
|
150
|
+
get selectable() { return this._selectable; }
|
|
151
|
+
/**
|
|
152
|
+
* @param {?} value
|
|
153
|
+
* @return {?}
|
|
154
|
+
*/
|
|
155
|
+
set selectable(value) { this._selectable = coerceBooleanProperty(value); }
|
|
156
|
+
/**
|
|
157
|
+
* Determines whether or not the chip displays the remove styling and emits (remove) events.
|
|
158
|
+
* @return {?}
|
|
159
|
+
*/
|
|
160
|
+
get removable() { return this._removable; }
|
|
161
|
+
/**
|
|
162
|
+
* @param {?} value
|
|
163
|
+
* @return {?}
|
|
164
|
+
*/
|
|
165
|
+
set removable(value) { this._removable = coerceBooleanProperty(value); }
|
|
166
|
+
/**
|
|
167
|
+
* @return {?}
|
|
168
|
+
*/
|
|
169
|
+
get ariaSelected() {
|
|
170
|
+
return this.selectable ? this.selected.toString() : null;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @return {?}
|
|
174
|
+
*/
|
|
175
|
+
ngOnDestroy() {
|
|
176
|
+
this.destroyed.emit({ chip: this });
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Selects the chip.
|
|
180
|
+
* @return {?}
|
|
181
|
+
*/
|
|
182
|
+
select() {
|
|
183
|
+
this._selected = true;
|
|
184
|
+
this.selectionChange.emit({
|
|
185
|
+
source: this,
|
|
186
|
+
isUserInput: false,
|
|
187
|
+
selected: true
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Deselects the chip.
|
|
192
|
+
* @return {?}
|
|
193
|
+
*/
|
|
194
|
+
deselect() {
|
|
195
|
+
this._selected = false;
|
|
196
|
+
this.selectionChange.emit({
|
|
197
|
+
source: this,
|
|
198
|
+
isUserInput: false,
|
|
199
|
+
selected: false
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Select this chip and emit selected event
|
|
204
|
+
* @return {?}
|
|
205
|
+
*/
|
|
206
|
+
selectViaInteraction() {
|
|
207
|
+
this._selected = true;
|
|
208
|
+
// Emit select event when selected changes.
|
|
209
|
+
this.selectionChange.emit({
|
|
210
|
+
source: this,
|
|
211
|
+
isUserInput: true,
|
|
212
|
+
selected: true
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Toggles the current selected state of this chip.
|
|
217
|
+
* @param {?=} isUserInput
|
|
218
|
+
* @return {?}
|
|
219
|
+
*/
|
|
220
|
+
toggleSelected(isUserInput = false) {
|
|
221
|
+
this._selected = !this.selected;
|
|
222
|
+
this.selectionChange.emit({
|
|
223
|
+
source: this,
|
|
224
|
+
isUserInput,
|
|
225
|
+
selected: this._selected
|
|
226
|
+
});
|
|
227
|
+
return this.selected;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Allows for programmatic focusing of the chip.
|
|
231
|
+
* @return {?}
|
|
232
|
+
*/
|
|
233
|
+
focus() {
|
|
234
|
+
this._elementRef.nativeElement.focus();
|
|
235
|
+
this._onFocus.next({ chip: this });
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Allows for programmatic removal of the chip. Called by the MdChipList when the DELETE or
|
|
239
|
+
* BACKSPACE keys are pressed.
|
|
240
|
+
*
|
|
241
|
+
* Informs any listeners of the removal request. Does not remove the chip from the DOM.
|
|
242
|
+
* @return {?}
|
|
243
|
+
*/
|
|
244
|
+
remove() {
|
|
245
|
+
if (this.removable) {
|
|
246
|
+
this.removed.emit({ chip: this });
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Ensures events fire properly upon click.
|
|
251
|
+
* @param {?} event
|
|
252
|
+
* @return {?}
|
|
253
|
+
*/
|
|
254
|
+
_handleClick(event) {
|
|
255
|
+
// Check disabled
|
|
256
|
+
if (this.disabled) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
event.preventDefault();
|
|
260
|
+
event.stopPropagation();
|
|
261
|
+
this.focus();
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Handle custom key presses.
|
|
265
|
+
* @param {?} event
|
|
266
|
+
* @return {?}
|
|
267
|
+
*/
|
|
268
|
+
_handleKeydown(event) {
|
|
269
|
+
if (this.disabled) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
switch (event.keyCode) {
|
|
273
|
+
case DELETE:
|
|
274
|
+
case BACKSPACE:
|
|
275
|
+
// If we are removable, remove the focused chip
|
|
276
|
+
this.remove();
|
|
277
|
+
// Always prevent so page navigation does not occur
|
|
278
|
+
event.preventDefault();
|
|
279
|
+
break;
|
|
280
|
+
case SPACE:
|
|
281
|
+
// If we are selectable, toggle the focused chip
|
|
282
|
+
if (this.selectable) {
|
|
283
|
+
this.toggleSelected(true);
|
|
284
|
+
}
|
|
285
|
+
// Always prevent space from scrolling the page since the list has focus
|
|
286
|
+
event.preventDefault();
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @return {?}
|
|
292
|
+
*/
|
|
293
|
+
_blur() {
|
|
294
|
+
this._hasFocus = false;
|
|
295
|
+
this._onBlur.next({ chip: this });
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
MdChip.decorators = [
|
|
299
|
+
{ type: Directive, args: [{
|
|
300
|
+
selector: `md-basic-chip, [md-basic-chip], md-chip, [md-chip],
|
|
301
|
+
mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]`,
|
|
302
|
+
inputs: ['color', 'disabled'],
|
|
303
|
+
exportAs: 'mdChip, matChip',
|
|
304
|
+
host: {
|
|
305
|
+
'class': 'mat-chip',
|
|
306
|
+
'tabindex': '-1',
|
|
307
|
+
'role': 'option',
|
|
308
|
+
'[class.mat-chip-selected]': 'selected',
|
|
309
|
+
'[attr.disabled]': 'disabled || null',
|
|
310
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
311
|
+
'[attr.aria-selected]': 'ariaSelected',
|
|
312
|
+
'(click)': '_handleClick($event)',
|
|
313
|
+
'(keydown)': '_handleKeydown($event)',
|
|
314
|
+
'(focus)': '_hasFocus = true',
|
|
315
|
+
'(blur)': '_blur()',
|
|
316
|
+
},
|
|
317
|
+
},] },
|
|
318
|
+
];
|
|
319
|
+
/**
|
|
320
|
+
* @nocollapse
|
|
321
|
+
*/
|
|
322
|
+
MdChip.ctorParameters = () => [
|
|
323
|
+
{ type: Renderer2, },
|
|
324
|
+
{ type: ElementRef, },
|
|
325
|
+
];
|
|
326
|
+
MdChip.propDecorators = {
|
|
327
|
+
'selected': [{ type: Input },],
|
|
328
|
+
'value': [{ type: Input },],
|
|
329
|
+
'selectable': [{ type: Input },],
|
|
330
|
+
'removable': [{ type: Input },],
|
|
331
|
+
'selectionChange': [{ type: Output },],
|
|
332
|
+
'destroyed': [{ type: Output },],
|
|
333
|
+
'destroy': [{ type: Output },],
|
|
334
|
+
'removed': [{ type: Output },],
|
|
335
|
+
'onRemove': [{ type: Output, args: ['remove',] },],
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Applies proper (click) support and adds styling for use with the Material Design "cancel" icon
|
|
339
|
+
* available at https://material.io/icons/#ic_cancel.
|
|
340
|
+
*
|
|
341
|
+
* Example:
|
|
342
|
+
*
|
|
343
|
+
* <md-chip>
|
|
344
|
+
* <md-icon mdChipRemove>cancel</md-icon>
|
|
345
|
+
* </md-chip>
|
|
346
|
+
*
|
|
347
|
+
* You *may* use a custom icon, but you may need to override the `md-chip-remove` positioning styles
|
|
348
|
+
* to properly center the icon within the chip.
|
|
349
|
+
*/
|
|
350
|
+
class MdChipRemove {
|
|
351
|
+
/**
|
|
352
|
+
* @param {?} _parentChip
|
|
353
|
+
*/
|
|
354
|
+
constructor(_parentChip) {
|
|
355
|
+
this._parentChip = _parentChip;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Calls the parent chip's public `remove()` method if applicable.
|
|
359
|
+
* @return {?}
|
|
360
|
+
*/
|
|
361
|
+
_handleClick() {
|
|
362
|
+
if (this._parentChip.removable) {
|
|
363
|
+
this._parentChip.remove();
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
MdChipRemove.decorators = [
|
|
368
|
+
{ type: Directive, args: [{
|
|
369
|
+
selector: '[mdChipRemove], [matChipRemove]',
|
|
370
|
+
host: {
|
|
371
|
+
'class': 'mat-chip-remove',
|
|
372
|
+
'(click)': '_handleClick($event)'
|
|
373
|
+
}
|
|
374
|
+
},] },
|
|
375
|
+
];
|
|
376
|
+
/**
|
|
377
|
+
* @nocollapse
|
|
378
|
+
*/
|
|
379
|
+
MdChipRemove.ctorParameters = () => [
|
|
380
|
+
{ type: MdChip, },
|
|
381
|
+
];
|
|
382
|
+
|
|
383
|
+
// Increasing integer for generating unique ids for chip-list components.
|
|
384
|
+
let nextUniqueId = 0;
|
|
385
|
+
/**
|
|
386
|
+
* Change event object that is emitted when the chip list value has changed.
|
|
387
|
+
*/
|
|
388
|
+
class MdChipListChange {
|
|
389
|
+
/**
|
|
390
|
+
* @param {?} source
|
|
391
|
+
* @param {?} value
|
|
392
|
+
*/
|
|
393
|
+
constructor(source, value) {
|
|
394
|
+
this.source = source;
|
|
395
|
+
this.value = value;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* A material design chips component (named ChipList for it's similarity to the List component).
|
|
400
|
+
*/
|
|
401
|
+
class MdChipList {
|
|
402
|
+
/**
|
|
403
|
+
* @param {?} _renderer
|
|
404
|
+
* @param {?} _elementRef
|
|
405
|
+
* @param {?} _changeDetectorRef
|
|
406
|
+
* @param {?} _dir
|
|
407
|
+
* @param {?} _parentForm
|
|
408
|
+
* @param {?} _parentFormGroup
|
|
409
|
+
* @param {?} ngControl
|
|
410
|
+
*/
|
|
411
|
+
constructor(_renderer, _elementRef, _changeDetectorRef, _dir, _parentForm, _parentFormGroup, ngControl) {
|
|
412
|
+
this._renderer = _renderer;
|
|
413
|
+
this._elementRef = _elementRef;
|
|
414
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
415
|
+
this._dir = _dir;
|
|
416
|
+
this._parentForm = _parentForm;
|
|
417
|
+
this._parentFormGroup = _parentFormGroup;
|
|
418
|
+
this.ngControl = ngControl;
|
|
419
|
+
/**
|
|
420
|
+
* Stream that emits whenever the state of the input changes such that the wrapping `MdFormField`
|
|
421
|
+
* needs to run change detection.
|
|
422
|
+
*/
|
|
423
|
+
this.stateChanges = new Subject();
|
|
424
|
+
/**
|
|
425
|
+
* When a chip is destroyed, we track the index so we can focus the appropriate next chip.
|
|
426
|
+
*/
|
|
427
|
+
this._lastDestroyedIndex = null;
|
|
428
|
+
/**
|
|
429
|
+
* Track which chips we're listening to for focus/destruction.
|
|
430
|
+
*/
|
|
431
|
+
this._chipSet = new WeakMap();
|
|
432
|
+
/**
|
|
433
|
+
* Subscription to tabbing out from the chip list.
|
|
434
|
+
*/
|
|
435
|
+
this._tabOutSubscription = Subscription.EMPTY;
|
|
436
|
+
/**
|
|
437
|
+
* Whether or not the chip is selectable.
|
|
438
|
+
*/
|
|
439
|
+
this._selectable = true;
|
|
440
|
+
/**
|
|
441
|
+
* Whether the component is in multiple selection mode.
|
|
442
|
+
*/
|
|
443
|
+
this._multiple = false;
|
|
444
|
+
/**
|
|
445
|
+
* Uid of the chip list
|
|
446
|
+
*/
|
|
447
|
+
this._uid = `md-chip-list-${nextUniqueId++}`;
|
|
448
|
+
/**
|
|
449
|
+
* Whether this is required
|
|
450
|
+
*/
|
|
451
|
+
this._required = false;
|
|
452
|
+
/**
|
|
453
|
+
* Whether this is disabled
|
|
454
|
+
*/
|
|
455
|
+
this._disabled = false;
|
|
456
|
+
/**
|
|
457
|
+
* Tab index for the chip list.
|
|
458
|
+
*/
|
|
459
|
+
this._tabIndex = 0;
|
|
460
|
+
/**
|
|
461
|
+
* User defined tab index.
|
|
462
|
+
* When it is not null, use user defined tab index. Otherwise use _tabIndex
|
|
463
|
+
*/
|
|
464
|
+
this._userTabIndex = null;
|
|
465
|
+
/**
|
|
466
|
+
* Function when touched
|
|
467
|
+
*/
|
|
468
|
+
this._onTouched = () => { };
|
|
469
|
+
/**
|
|
470
|
+
* Function when changed
|
|
471
|
+
*/
|
|
472
|
+
this._onChange = () => { };
|
|
473
|
+
/**
|
|
474
|
+
* Comparison function to specify which option is displayed. Defaults to object equality.
|
|
475
|
+
*/
|
|
476
|
+
this._compareWith = (o1, o2) => o1 === o2;
|
|
477
|
+
/**
|
|
478
|
+
* Orientation of the chip list.
|
|
479
|
+
*/
|
|
480
|
+
this.ariaOrientation = 'horizontal';
|
|
481
|
+
/**
|
|
482
|
+
* Event emitted when the selected chip list value has been changed by the user.
|
|
483
|
+
*/
|
|
484
|
+
this.change = new EventEmitter();
|
|
485
|
+
/**
|
|
486
|
+
* Event that emits whenever the raw value of the chip-list changes. This is here primarily
|
|
487
|
+
* to facilitate the two-way binding for the `value` input.
|
|
488
|
+
* \@docs-private
|
|
489
|
+
*/
|
|
490
|
+
this.valueChange = new EventEmitter();
|
|
491
|
+
if (this.ngControl) {
|
|
492
|
+
this.ngControl.valueAccessor = this;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* The array of selected chips inside chip list.
|
|
497
|
+
* @return {?}
|
|
498
|
+
*/
|
|
499
|
+
get selected() {
|
|
500
|
+
return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Whether the user should be allowed to select multiple chips.
|
|
504
|
+
* @return {?}
|
|
505
|
+
*/
|
|
506
|
+
get multiple() { return this._multiple; }
|
|
507
|
+
/**
|
|
508
|
+
* @param {?} value
|
|
509
|
+
* @return {?}
|
|
510
|
+
*/
|
|
511
|
+
set multiple(value) {
|
|
512
|
+
this._multiple = coerceBooleanProperty(value);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* A function to compare the option values with the selected values. The first argument
|
|
516
|
+
* is a value from an option. The second is a value from the selection. A boolean
|
|
517
|
+
* should be returned.
|
|
518
|
+
* @return {?}
|
|
519
|
+
*/
|
|
520
|
+
get compareWith() { return this._compareWith; }
|
|
521
|
+
/**
|
|
522
|
+
* @param {?} fn
|
|
523
|
+
* @return {?}
|
|
524
|
+
*/
|
|
525
|
+
set compareWith(fn) {
|
|
526
|
+
this._compareWith = fn;
|
|
527
|
+
if (this._selectionModel) {
|
|
528
|
+
// A different comparator means the selection could change.
|
|
529
|
+
this._initializeSelection();
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Required for FormFieldControl
|
|
534
|
+
* @return {?}
|
|
535
|
+
*/
|
|
536
|
+
get value() { return this._value; }
|
|
537
|
+
/**
|
|
538
|
+
* @param {?} newValue
|
|
539
|
+
* @return {?}
|
|
540
|
+
*/
|
|
541
|
+
set value(newValue) {
|
|
542
|
+
this.writeValue(newValue);
|
|
543
|
+
this._value = newValue;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Required for FormFieldControl. The ID of the chip list
|
|
547
|
+
* @param {?} value
|
|
548
|
+
* @return {?}
|
|
549
|
+
*/
|
|
550
|
+
set id(value) {
|
|
551
|
+
this._id = value;
|
|
552
|
+
this.stateChanges.next();
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* @return {?}
|
|
556
|
+
*/
|
|
557
|
+
get id() { return this._id || this._uid; }
|
|
558
|
+
/**
|
|
559
|
+
* Required for FormFieldControl. Whether the chip list is required.
|
|
560
|
+
* @param {?} value
|
|
561
|
+
* @return {?}
|
|
562
|
+
*/
|
|
563
|
+
set required(value) {
|
|
564
|
+
this._required = coerceBooleanProperty(value);
|
|
565
|
+
this.stateChanges.next();
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* @return {?}
|
|
569
|
+
*/
|
|
570
|
+
get required() {
|
|
571
|
+
return this._required;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* For FormFieldControl. Use chip input's placholder if there's a chip input
|
|
575
|
+
* @param {?} value
|
|
576
|
+
* @return {?}
|
|
577
|
+
*/
|
|
578
|
+
set placeholder(value) {
|
|
579
|
+
this._placeholder = value;
|
|
580
|
+
this.stateChanges.next();
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* @return {?}
|
|
584
|
+
*/
|
|
585
|
+
get placeholder() {
|
|
586
|
+
return this._chipInput ? this._chipInput.placeholder : this._placeholder;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Whether any chips or the mdChipInput inside of this chip-list has focus.
|
|
590
|
+
* @return {?}
|
|
591
|
+
*/
|
|
592
|
+
get focused() {
|
|
593
|
+
return this.chips.some(chip => chip._hasFocus) ||
|
|
594
|
+
(this._chipInput && this._chipInput.focused);
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Whether this chip-list contains no chips and no mdChipInput.
|
|
598
|
+
* @return {?}
|
|
599
|
+
*/
|
|
600
|
+
get empty() {
|
|
601
|
+
return (!this._chipInput || this._chipInput.empty) && this.chips.length === 0;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Whether this chip-list is disabled.
|
|
605
|
+
* @return {?}
|
|
606
|
+
*/
|
|
607
|
+
get disabled() { return this.ngControl ? this.ngControl.disabled : this._disabled; }
|
|
608
|
+
/**
|
|
609
|
+
* @param {?} value
|
|
610
|
+
* @return {?}
|
|
611
|
+
*/
|
|
612
|
+
set disabled(value) { this._disabled = coerceBooleanProperty(value); }
|
|
613
|
+
/**
|
|
614
|
+
* Whether the chip list is in an error state.
|
|
615
|
+
* @return {?}
|
|
616
|
+
*/
|
|
617
|
+
get errorState() {
|
|
618
|
+
const /** @type {?} */ isInvalid = this.ngControl && this.ngControl.invalid;
|
|
619
|
+
const /** @type {?} */ isTouched = this.ngControl && this.ngControl.touched;
|
|
620
|
+
const /** @type {?} */ isSubmitted = (this._parentFormGroup && this._parentFormGroup.submitted) ||
|
|
621
|
+
(this._parentForm && this._parentForm.submitted);
|
|
622
|
+
return !!(isInvalid && (isTouched || isSubmitted));
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Whether or not this chip is selectable. When a chip is not selectable,
|
|
626
|
+
* its selected state is always ignored.
|
|
627
|
+
* @return {?}
|
|
628
|
+
*/
|
|
629
|
+
get selectable() { return this._selectable; }
|
|
630
|
+
/**
|
|
631
|
+
* @param {?} value
|
|
632
|
+
* @return {?}
|
|
633
|
+
*/
|
|
634
|
+
set selectable(value) { this._selectable = coerceBooleanProperty(value); }
|
|
635
|
+
/**
|
|
636
|
+
* @param {?} value
|
|
637
|
+
* @return {?}
|
|
638
|
+
*/
|
|
639
|
+
set tabIndex(value) {
|
|
640
|
+
this._userTabIndex = value;
|
|
641
|
+
this._tabIndex = value;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Combined stream of all of the child chips' selection change events.
|
|
645
|
+
* @return {?}
|
|
646
|
+
*/
|
|
647
|
+
get chipSelectionChanges() {
|
|
648
|
+
return merge(...this.chips.map(chip => chip.selectionChange));
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Combined stream of all of the child chips' focus change events.
|
|
652
|
+
* @return {?}
|
|
653
|
+
*/
|
|
654
|
+
get chipFocusChanges() {
|
|
655
|
+
return merge(...this.chips.map(chip => chip._onFocus));
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Combined stream of all of the child chips' blur change events.
|
|
659
|
+
* @return {?}
|
|
660
|
+
*/
|
|
661
|
+
get chipBlurChanges() {
|
|
662
|
+
return merge(...this.chips.map(chip => chip._onBlur));
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Combined stream of all of the child chips' remove change events.
|
|
666
|
+
* @return {?}
|
|
667
|
+
*/
|
|
668
|
+
get chipRemoveChanges() {
|
|
669
|
+
return merge(...this.chips.map(chip => chip.destroy));
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* @return {?}
|
|
673
|
+
*/
|
|
674
|
+
ngAfterContentInit() {
|
|
675
|
+
this._keyManager = new FocusKeyManager(this.chips).withWrap();
|
|
676
|
+
// Prevents the chip list from capturing focus and redirecting
|
|
677
|
+
// it back to the first chip when the user tabs out.
|
|
678
|
+
this._tabOutSubscription = this._keyManager.tabOut.subscribe(() => {
|
|
679
|
+
this._tabIndex = -1;
|
|
680
|
+
setTimeout(() => this._tabIndex = this._userTabIndex || 0);
|
|
681
|
+
});
|
|
682
|
+
// When the list changes, re-subscribe
|
|
683
|
+
this._changeSubscription = startWith.call(this.chips.changes, null).subscribe(() => {
|
|
684
|
+
this._resetChips();
|
|
685
|
+
// Reset chips selected/deselected status
|
|
686
|
+
this._initializeSelection();
|
|
687
|
+
// Check to see if we need to update our tab index
|
|
688
|
+
this._updateTabIndex();
|
|
689
|
+
// Check to see if we have a destroyed chip and need to refocus
|
|
690
|
+
this._updateFocusForDestroyedChips();
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* @return {?}
|
|
695
|
+
*/
|
|
696
|
+
ngOnInit() {
|
|
697
|
+
this._selectionModel = new SelectionModel(this.multiple, undefined, false);
|
|
698
|
+
this.stateChanges.next();
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* @return {?}
|
|
702
|
+
*/
|
|
703
|
+
ngOnDestroy() {
|
|
704
|
+
this._tabOutSubscription.unsubscribe();
|
|
705
|
+
if (this._changeSubscription) {
|
|
706
|
+
this._changeSubscription.unsubscribe();
|
|
707
|
+
}
|
|
708
|
+
this._dropSubscriptions();
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Associates an HTML input element with this chip list.
|
|
712
|
+
* @param {?} inputElement
|
|
713
|
+
* @return {?}
|
|
714
|
+
*/
|
|
715
|
+
registerInput(inputElement) {
|
|
716
|
+
this._chipInput = inputElement;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* @param {?} ids
|
|
720
|
+
* @return {?}
|
|
721
|
+
*/
|
|
722
|
+
setDescribedByIds(ids) { this._ariaDescribedby = ids.join(' '); }
|
|
723
|
+
/**
|
|
724
|
+
* @param {?} value
|
|
725
|
+
* @return {?}
|
|
726
|
+
*/
|
|
727
|
+
writeValue(value) {
|
|
728
|
+
if (this.chips) {
|
|
729
|
+
this._setSelectionByValue(value, false);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* @param {?} fn
|
|
734
|
+
* @return {?}
|
|
735
|
+
*/
|
|
736
|
+
registerOnChange(fn) {
|
|
737
|
+
this._onChange = fn;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* @param {?} fn
|
|
741
|
+
* @return {?}
|
|
742
|
+
*/
|
|
743
|
+
registerOnTouched(fn) {
|
|
744
|
+
this._onTouched = fn;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* @param {?} disabled
|
|
748
|
+
* @return {?}
|
|
749
|
+
*/
|
|
750
|
+
setDisabledState(disabled) {
|
|
751
|
+
this.disabled = disabled;
|
|
752
|
+
this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', disabled);
|
|
753
|
+
this.stateChanges.next();
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Focuses the the first non-disabled chip in this chip list, or the associated input when there
|
|
757
|
+
* are no eligible chips.
|
|
758
|
+
* @return {?}
|
|
759
|
+
*/
|
|
760
|
+
focus() {
|
|
761
|
+
// TODO: ARIA says this should focus the first `selected` chip if any are selected.
|
|
762
|
+
// Focus on first element if there's no chipInput inside chip-list
|
|
763
|
+
if (this._chipInput && this._chipInput.focused) {
|
|
764
|
+
// do nothing
|
|
765
|
+
}
|
|
766
|
+
else if (this.chips.length > 0) {
|
|
767
|
+
this._keyManager.setFirstItemActive();
|
|
768
|
+
this.stateChanges.next();
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
this._focusInput();
|
|
772
|
+
this.stateChanges.next();
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Attempt to focus an input if we have one.
|
|
777
|
+
* @return {?}
|
|
778
|
+
*/
|
|
779
|
+
_focusInput() {
|
|
780
|
+
if (this._chipInput) {
|
|
781
|
+
this._chipInput.focus();
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Pass events to the keyboard manager. Available here for tests.
|
|
786
|
+
* @param {?} event
|
|
787
|
+
* @return {?}
|
|
788
|
+
*/
|
|
789
|
+
_keydown(event) {
|
|
790
|
+
let /** @type {?} */ code = event.keyCode;
|
|
791
|
+
let /** @type {?} */ target = (event.target);
|
|
792
|
+
let /** @type {?} */ isInputEmpty = this._isInputEmpty(target);
|
|
793
|
+
let /** @type {?} */ isRtl = this._dir && this._dir.value == 'rtl';
|
|
794
|
+
let /** @type {?} */ isPrevKey = (code === (isRtl ? RIGHT_ARROW : LEFT_ARROW));
|
|
795
|
+
let /** @type {?} */ isNextKey = (code === (isRtl ? LEFT_ARROW : RIGHT_ARROW));
|
|
796
|
+
let /** @type {?} */ isBackKey = (code === BACKSPACE || code == DELETE || code == UP_ARROW || isPrevKey);
|
|
797
|
+
// If they are on an empty input and hit backspace/delete/left arrow, focus the last chip
|
|
798
|
+
if (isInputEmpty && isBackKey) {
|
|
799
|
+
this._keyManager.setLastItemActive();
|
|
800
|
+
event.preventDefault();
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
// If they are on a chip, check for space/left/right, otherwise pass to our key manager (like
|
|
804
|
+
// up/down keys)
|
|
805
|
+
if (target && target.classList.contains('mat-chip')) {
|
|
806
|
+
if (isPrevKey) {
|
|
807
|
+
this._keyManager.setPreviousItemActive();
|
|
808
|
+
event.preventDefault();
|
|
809
|
+
}
|
|
810
|
+
else if (isNextKey) {
|
|
811
|
+
this._keyManager.setNextItemActive();
|
|
812
|
+
event.preventDefault();
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
this._keyManager.onKeydown(event);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
this.stateChanges.next();
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Check the tab index as you should not be allowed to focus an empty list.
|
|
822
|
+
* @return {?}
|
|
823
|
+
*/
|
|
824
|
+
_updateTabIndex() {
|
|
825
|
+
// If we have 0 chips, we should not allow keyboard focus
|
|
826
|
+
this._tabIndex = this._userTabIndex || (this.chips.length === 0 ? -1 : 0);
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Update key manager's active item when chip is deleted.
|
|
830
|
+
* If the deleted chip is the last chip in chip list, focus the new last chip.
|
|
831
|
+
* Otherwise focus the next chip in the list.
|
|
832
|
+
* Save `_lastDestroyedIndex` so we can set the correct focus.
|
|
833
|
+
* @param {?} chip
|
|
834
|
+
* @return {?}
|
|
835
|
+
*/
|
|
836
|
+
_updateKeyManager(chip) {
|
|
837
|
+
let /** @type {?} */ chipIndex = this.chips.toArray().indexOf(chip);
|
|
838
|
+
if (this._isValidIndex(chipIndex)) {
|
|
839
|
+
if (chip._hasFocus) {
|
|
840
|
+
// Check whether the chip is not the last item
|
|
841
|
+
if (chipIndex < this.chips.length - 1) {
|
|
842
|
+
this._keyManager.setActiveItem(chipIndex);
|
|
843
|
+
}
|
|
844
|
+
else if (chipIndex - 1 >= 0) {
|
|
845
|
+
this._keyManager.setActiveItem(chipIndex - 1);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (this._keyManager.activeItemIndex === chipIndex) {
|
|
849
|
+
this._lastDestroyedIndex = chipIndex;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Checks to see if a focus chip was recently destroyed so that we can refocus the next closest
|
|
855
|
+
* one.
|
|
856
|
+
* @return {?}
|
|
857
|
+
*/
|
|
858
|
+
_updateFocusForDestroyedChips() {
|
|
859
|
+
let /** @type {?} */ chipsArray = this.chips;
|
|
860
|
+
if (this._lastDestroyedIndex != null && chipsArray.length > 0) {
|
|
861
|
+
// Check whether the destroyed chip was the last item
|
|
862
|
+
const /** @type {?} */ newFocusIndex = Math.min(this._lastDestroyedIndex, chipsArray.length - 1);
|
|
863
|
+
this._keyManager.setActiveItem(newFocusIndex);
|
|
864
|
+
let /** @type {?} */ focusChip = this._keyManager.activeItem;
|
|
865
|
+
// Focus the chip
|
|
866
|
+
if (focusChip) {
|
|
867
|
+
focusChip.focus();
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
else if (chipsArray.length === 0) {
|
|
871
|
+
this._focusInput();
|
|
872
|
+
}
|
|
873
|
+
// Reset our destroyed index
|
|
874
|
+
this._lastDestroyedIndex = null;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Utility to ensure all indexes are valid.
|
|
878
|
+
*
|
|
879
|
+
* @param {?} index The index to be checked.
|
|
880
|
+
* @return {?} True if the index is valid for our list of chips.
|
|
881
|
+
*/
|
|
882
|
+
_isValidIndex(index) {
|
|
883
|
+
return index >= 0 && index < this.chips.length;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* @param {?} element
|
|
887
|
+
* @return {?}
|
|
888
|
+
*/
|
|
889
|
+
_isInputEmpty(element) {
|
|
890
|
+
if (element && element.nodeName.toLowerCase() === 'input') {
|
|
891
|
+
let /** @type {?} */ input = (element);
|
|
892
|
+
return !input.value;
|
|
893
|
+
}
|
|
894
|
+
return false;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* @param {?} value
|
|
898
|
+
* @param {?=} isUserInput
|
|
899
|
+
* @return {?}
|
|
900
|
+
*/
|
|
901
|
+
_setSelectionByValue(value, isUserInput = true) {
|
|
902
|
+
this._clearSelection();
|
|
903
|
+
this.chips.forEach(chip => chip.deselect());
|
|
904
|
+
if (Array.isArray(value)) {
|
|
905
|
+
value.forEach(currentValue => this._selectValue(currentValue, isUserInput));
|
|
906
|
+
this._sortValues();
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
const /** @type {?} */ correspondingChip = this._selectValue(value, isUserInput);
|
|
910
|
+
// Shift focus to the active item. Note that we shouldn't do this in multiple
|
|
911
|
+
// mode, because we don't know what chip the user interacted with last.
|
|
912
|
+
if (correspondingChip) {
|
|
913
|
+
this._keyManager.setActiveItem(this.chips.toArray().indexOf(correspondingChip));
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Finds and selects the chip based on its value.
|
|
919
|
+
* @param {?} value
|
|
920
|
+
* @param {?=} isUserInput
|
|
921
|
+
* @return {?} Chip that has the corresponding value.
|
|
922
|
+
*/
|
|
923
|
+
_selectValue(value, isUserInput = true) {
|
|
924
|
+
const /** @type {?} */ correspondingChip = this.chips.find(chip => {
|
|
925
|
+
return chip.value != null && this._compareWith(chip.value, value);
|
|
926
|
+
});
|
|
927
|
+
if (correspondingChip) {
|
|
928
|
+
isUserInput ? correspondingChip.selectViaInteraction() : correspondingChip.select();
|
|
929
|
+
this._selectionModel.select(correspondingChip);
|
|
930
|
+
}
|
|
931
|
+
return correspondingChip;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* @return {?}
|
|
935
|
+
*/
|
|
936
|
+
_initializeSelection() {
|
|
937
|
+
// Defer setting the value in order to avoid the "Expression
|
|
938
|
+
// has changed after it was checked" errors from Angular.
|
|
939
|
+
Promise.resolve().then(() => {
|
|
940
|
+
this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value, false);
|
|
941
|
+
this.stateChanges.next();
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Deselects every chip in the list.
|
|
946
|
+
* @param {?=} skip Chip that should not be deselected.
|
|
947
|
+
* @return {?}
|
|
948
|
+
*/
|
|
949
|
+
_clearSelection(skip) {
|
|
950
|
+
this._selectionModel.clear();
|
|
951
|
+
this.chips.forEach(chip => {
|
|
952
|
+
if (chip !== skip) {
|
|
953
|
+
chip.deselect();
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
this.stateChanges.next();
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Sorts the model values, ensuring that they keep the same
|
|
960
|
+
* order that they have in the panel.
|
|
961
|
+
* @return {?}
|
|
962
|
+
*/
|
|
963
|
+
_sortValues() {
|
|
964
|
+
if (this._multiple) {
|
|
965
|
+
this._selectionModel.clear();
|
|
966
|
+
this.chips.forEach(chip => {
|
|
967
|
+
if (chip.selected) {
|
|
968
|
+
this._selectionModel.select(chip);
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
this.stateChanges.next();
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Emits change event to set the model value.
|
|
976
|
+
* @param {?=} fallbackValue
|
|
977
|
+
* @return {?}
|
|
978
|
+
*/
|
|
979
|
+
_propagateChanges(fallbackValue) {
|
|
980
|
+
let /** @type {?} */ valueToEmit = null;
|
|
981
|
+
if (Array.isArray(this.selected)) {
|
|
982
|
+
valueToEmit = this.selected.map(chip => chip.value);
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
valueToEmit = this.selected ? this.selected.value : fallbackValue;
|
|
986
|
+
}
|
|
987
|
+
this._value = valueToEmit;
|
|
988
|
+
this.change.emit(new MdChipListChange(this, valueToEmit));
|
|
989
|
+
this.valueChange.emit(valueToEmit);
|
|
990
|
+
this._onChange(valueToEmit);
|
|
991
|
+
this._changeDetectorRef.markForCheck();
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* When blurred, mark the field as touched when focus moved outside the chip list.
|
|
995
|
+
* @return {?}
|
|
996
|
+
*/
|
|
997
|
+
_blur() {
|
|
998
|
+
if (!this.disabled) {
|
|
999
|
+
if (this._chipInput) {
|
|
1000
|
+
// If there's a chip input, we should check whether the focus moved to chip input.
|
|
1001
|
+
// If the focus is not moved to chip input, mark the field as touched. If the focus moved
|
|
1002
|
+
// to chip input, do nothing.
|
|
1003
|
+
// Timeout is needed to wait for the focus() event trigger on chip input.
|
|
1004
|
+
setTimeout(() => {
|
|
1005
|
+
if (!this.focused) {
|
|
1006
|
+
this._markAsTouched();
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
else {
|
|
1011
|
+
// If there's no chip input, then mark the field as touched.
|
|
1012
|
+
this._markAsTouched();
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Mark the field as touched
|
|
1018
|
+
* @return {?}
|
|
1019
|
+
*/
|
|
1020
|
+
_markAsTouched() {
|
|
1021
|
+
this._onTouched();
|
|
1022
|
+
this._changeDetectorRef.markForCheck();
|
|
1023
|
+
this.stateChanges.next();
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* @return {?}
|
|
1027
|
+
*/
|
|
1028
|
+
_resetChips() {
|
|
1029
|
+
this._dropSubscriptions();
|
|
1030
|
+
this._listenToChipsFocus();
|
|
1031
|
+
this._listenToChipsSelection();
|
|
1032
|
+
this._listenToChipsRemoved();
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* @return {?}
|
|
1036
|
+
*/
|
|
1037
|
+
_dropSubscriptions() {
|
|
1038
|
+
if (this._chipFocusSubscription) {
|
|
1039
|
+
this._chipFocusSubscription.unsubscribe();
|
|
1040
|
+
this._chipFocusSubscription = null;
|
|
1041
|
+
}
|
|
1042
|
+
if (this._chipBlurSubscription) {
|
|
1043
|
+
this._chipBlurSubscription.unsubscribe();
|
|
1044
|
+
this._chipBlurSubscription = null;
|
|
1045
|
+
}
|
|
1046
|
+
if (this._chipSelectionSubscription) {
|
|
1047
|
+
this._chipSelectionSubscription.unsubscribe();
|
|
1048
|
+
this._chipSelectionSubscription = null;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Listens to user-generated selection events on each chip.
|
|
1053
|
+
* @return {?}
|
|
1054
|
+
*/
|
|
1055
|
+
_listenToChipsSelection() {
|
|
1056
|
+
this._chipSelectionSubscription = this.chipSelectionChanges.subscribe(event => {
|
|
1057
|
+
event.source.selected
|
|
1058
|
+
? this._selectionModel.select(event.source)
|
|
1059
|
+
: this._selectionModel.deselect(event.source);
|
|
1060
|
+
// For single selection chip list, make sure the deselected value is unselected.
|
|
1061
|
+
if (!this.multiple) {
|
|
1062
|
+
this.chips.forEach(chip => {
|
|
1063
|
+
if (!this._selectionModel.isSelected(chip) && chip.selected) {
|
|
1064
|
+
chip.deselect();
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
if (event.isUserInput) {
|
|
1069
|
+
this._propagateChanges();
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Listens to user-generated selection events on each chip.
|
|
1075
|
+
* @return {?}
|
|
1076
|
+
*/
|
|
1077
|
+
_listenToChipsFocus() {
|
|
1078
|
+
this._chipFocusSubscription = this.chipFocusChanges.subscribe(event => {
|
|
1079
|
+
let /** @type {?} */ chipIndex = this.chips.toArray().indexOf(event.chip);
|
|
1080
|
+
if (this._isValidIndex(chipIndex)) {
|
|
1081
|
+
this._keyManager.updateActiveItemIndex(chipIndex);
|
|
1082
|
+
}
|
|
1083
|
+
this.stateChanges.next();
|
|
1084
|
+
});
|
|
1085
|
+
this._chipBlurSubscription = this.chipBlurChanges.subscribe(_ => {
|
|
1086
|
+
this._blur();
|
|
1087
|
+
this.stateChanges.next();
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* @return {?}
|
|
1092
|
+
*/
|
|
1093
|
+
_listenToChipsRemoved() {
|
|
1094
|
+
this._chipRemoveSubscription = this.chipRemoveChanges.subscribe((event) => {
|
|
1095
|
+
this._updateKeyManager(event.chip);
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
MdChipList.decorators = [
|
|
1100
|
+
{ type: Component, args: [{selector: 'md-chip-list, mat-chip-list',
|
|
1101
|
+
template: `<div class="mat-chip-list-wrapper"><ng-content></ng-content></div>`,
|
|
1102
|
+
exportAs: 'mdChipList, matChipList',
|
|
1103
|
+
host: {
|
|
1104
|
+
'[attr.tabindex]': '_tabIndex',
|
|
1105
|
+
'[attr.aria-describedby]': '_ariaDescribedby || null',
|
|
1106
|
+
'[attr.aria-required]': 'required.toString()',
|
|
1107
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
1108
|
+
'[attr.aria-invalid]': 'errorState',
|
|
1109
|
+
'[attr.aria-multiselectable]': 'multiple',
|
|
1110
|
+
'[class.mat-chip-list-disabled]': 'disabled',
|
|
1111
|
+
'[class.mat-chip-list-invalid]': 'errorState',
|
|
1112
|
+
'[class.mat-chip-list-required]': 'required',
|
|
1113
|
+
'role': 'listbox',
|
|
1114
|
+
'[attr.aria-orientation]': 'ariaOrientation',
|
|
1115
|
+
'class': 'mat-chip-list',
|
|
1116
|
+
'(focus)': 'focus()',
|
|
1117
|
+
'(blur)': '_blur()',
|
|
1118
|
+
'(keydown)': '_keydown($event)'
|
|
1119
|
+
},
|
|
1120
|
+
providers: [{ provide: MdFormFieldControl, useExisting: MdChipList }],
|
|
1121
|
+
styles: [".mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline}.mat-chip:not(.mat-basic-chip){transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:inline-flex;padding:7px 12px;border-radius:24px;align-items:center;cursor:default}.mat-chip:not(.mat-basic-chip)+.mat-chip:not(.mat-basic-chip){margin:0 0 3px 8px}[dir=rtl] .mat-chip:not(.mat-basic-chip)+.mat-chip:not(.mat-basic-chip){margin:0 8px 3px 0}.mat-form-field-prefix .mat-chip:not(.mat-basic-chip):last-child{margin-right:8px}[dir=rtl] .mat-form-field-prefix .mat-chip:not(.mat-basic-chip):last-child{margin-left:8px}.mat-chip:not(.mat-basic-chip) .mat-chip-remove.mat-icon{width:1em;height:1em}.mat-chip:not(.mat-basic-chip):focus{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);outline:0}@media screen and (-ms-high-contrast:active){.mat-chip:not(.mat-basic-chip){outline:solid 1px}}.mat-chip-list-stacked .mat-chip-list-wrapper{display:block}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip){display:block;margin:0;margin-bottom:8px}[dir=rtl] .mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip){margin:0;margin-bottom:8px}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip):last-child,[dir=rtl] .mat-chip-list-stacked .mat-chip-list-wrapper .mat-chip:not(.mat-basic-chip):last-child{margin-bottom:0}.mat-form-field-prefix .mat-chip-list-wrapper{margin-bottom:8px}.mat-chip-remove{margin-right:-4px;margin-left:6px;cursor:pointer}[dir=rtl] .mat-chip-remove{margin-right:6px;margin-left:-4px}input.mat-chip-input{width:150px;margin:3px}"],
|
|
1122
|
+
encapsulation: ViewEncapsulation.None,
|
|
1123
|
+
preserveWhitespaces: false,
|
|
1124
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1125
|
+
},] },
|
|
1126
|
+
];
|
|
1127
|
+
/**
|
|
1128
|
+
* @nocollapse
|
|
1129
|
+
*/
|
|
1130
|
+
MdChipList.ctorParameters = () => [
|
|
1131
|
+
{ type: Renderer2, },
|
|
1132
|
+
{ type: ElementRef, },
|
|
1133
|
+
{ type: ChangeDetectorRef, },
|
|
1134
|
+
{ type: Directionality, decorators: [{ type: Optional },] },
|
|
1135
|
+
{ type: NgForm, decorators: [{ type: Optional },] },
|
|
1136
|
+
{ type: FormGroupDirective, decorators: [{ type: Optional },] },
|
|
1137
|
+
{ type: NgControl, decorators: [{ type: Optional }, { type: Self },] },
|
|
1138
|
+
];
|
|
1139
|
+
MdChipList.propDecorators = {
|
|
1140
|
+
'multiple': [{ type: Input },],
|
|
1141
|
+
'compareWith': [{ type: Input },],
|
|
1142
|
+
'value': [{ type: Input },],
|
|
1143
|
+
'id': [{ type: Input },],
|
|
1144
|
+
'required': [{ type: Input },],
|
|
1145
|
+
'placeholder': [{ type: Input },],
|
|
1146
|
+
'disabled': [{ type: Input },],
|
|
1147
|
+
'ariaOrientation': [{ type: Input, args: ['aria-orientation',] },],
|
|
1148
|
+
'selectable': [{ type: Input },],
|
|
1149
|
+
'tabIndex': [{ type: Input },],
|
|
1150
|
+
'change': [{ type: Output },],
|
|
1151
|
+
'valueChange': [{ type: Output },],
|
|
1152
|
+
'chips': [{ type: ContentChildren, args: [MdChip,] },],
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Directive that adds chip-specific behaviors to an input element inside <md-form-field>.
|
|
1157
|
+
* May be placed inside or outside of an <md-chip-list>.
|
|
1158
|
+
*/
|
|
1159
|
+
class MdChipInput {
|
|
1160
|
+
/**
|
|
1161
|
+
* @param {?} _elementRef
|
|
1162
|
+
*/
|
|
1163
|
+
constructor(_elementRef) {
|
|
1164
|
+
this._elementRef = _elementRef;
|
|
1165
|
+
this.focused = false;
|
|
1166
|
+
this._addOnBlur = false;
|
|
1167
|
+
/**
|
|
1168
|
+
* The list of key codes that will trigger a chipEnd event.
|
|
1169
|
+
*
|
|
1170
|
+
* Defaults to `[ENTER]`.
|
|
1171
|
+
*/
|
|
1172
|
+
// TODO(tinayuangao): Support Set here
|
|
1173
|
+
this.separatorKeyCodes = [ENTER];
|
|
1174
|
+
/**
|
|
1175
|
+
* Emitted when a chip is to be added.
|
|
1176
|
+
*/
|
|
1177
|
+
this.chipEnd = new EventEmitter();
|
|
1178
|
+
this._matChipInputTokenEnd = this.chipEnd;
|
|
1179
|
+
this.placeholder = '';
|
|
1180
|
+
this._inputElement = this._elementRef.nativeElement;
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Register input for chip list
|
|
1184
|
+
* @param {?} value
|
|
1185
|
+
* @return {?}
|
|
1186
|
+
*/
|
|
1187
|
+
set chipList(value) {
|
|
1188
|
+
if (value) {
|
|
1189
|
+
this._chipList = value;
|
|
1190
|
+
this._chipList.registerInput(this);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Whether or not the chipEnd event will be emitted when the input is blurred.
|
|
1195
|
+
* @return {?}
|
|
1196
|
+
*/
|
|
1197
|
+
get addOnBlur() { return this._addOnBlur; }
|
|
1198
|
+
/**
|
|
1199
|
+
* @param {?} value
|
|
1200
|
+
* @return {?}
|
|
1201
|
+
*/
|
|
1202
|
+
set addOnBlur(value) { this._addOnBlur = coerceBooleanProperty(value); }
|
|
1203
|
+
/**
|
|
1204
|
+
* @param {?} value
|
|
1205
|
+
* @return {?}
|
|
1206
|
+
*/
|
|
1207
|
+
set matChipList(value) { this.chipList = value; }
|
|
1208
|
+
/**
|
|
1209
|
+
* @return {?}
|
|
1210
|
+
*/
|
|
1211
|
+
get matAddOnBlur() { return this._addOnBlur; }
|
|
1212
|
+
/**
|
|
1213
|
+
* @param {?} value
|
|
1214
|
+
* @return {?}
|
|
1215
|
+
*/
|
|
1216
|
+
set matAddOnBlur(value) { this.addOnBlur = value; }
|
|
1217
|
+
/**
|
|
1218
|
+
* @return {?}
|
|
1219
|
+
*/
|
|
1220
|
+
get matSeparatorKeyCodes() { return this.separatorKeyCodes; }
|
|
1221
|
+
/**
|
|
1222
|
+
* @param {?} v
|
|
1223
|
+
* @return {?}
|
|
1224
|
+
*/
|
|
1225
|
+
set matSeparatorKeyCodes(v) { this.separatorKeyCodes = v; }
|
|
1226
|
+
/**
|
|
1227
|
+
* @return {?}
|
|
1228
|
+
*/
|
|
1229
|
+
get empty() {
|
|
1230
|
+
let /** @type {?} */ value = this._inputElement.value;
|
|
1231
|
+
return value == null || value === '';
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Utility method to make host definition/tests more clear.
|
|
1235
|
+
* @param {?=} event
|
|
1236
|
+
* @return {?}
|
|
1237
|
+
*/
|
|
1238
|
+
_keydown(event) {
|
|
1239
|
+
this._emitChipEnd(event);
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Checks to see if the blur should emit the (chipEnd) event.
|
|
1243
|
+
* @return {?}
|
|
1244
|
+
*/
|
|
1245
|
+
_blur() {
|
|
1246
|
+
if (this.addOnBlur) {
|
|
1247
|
+
this._emitChipEnd();
|
|
1248
|
+
}
|
|
1249
|
+
this.focused = false;
|
|
1250
|
+
// Blur the chip list if it is not focused
|
|
1251
|
+
if (!this._chipList.focused) {
|
|
1252
|
+
this._chipList._blur();
|
|
1253
|
+
}
|
|
1254
|
+
this._chipList.stateChanges.next();
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* @return {?}
|
|
1258
|
+
*/
|
|
1259
|
+
_focus() {
|
|
1260
|
+
this.focused = true;
|
|
1261
|
+
this._chipList.stateChanges.next();
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Checks to see if the (chipEnd) event needs to be emitted.
|
|
1265
|
+
* @param {?=} event
|
|
1266
|
+
* @return {?}
|
|
1267
|
+
*/
|
|
1268
|
+
_emitChipEnd(event) {
|
|
1269
|
+
if (!this._inputElement.value && !!event) {
|
|
1270
|
+
this._chipList._keydown(event);
|
|
1271
|
+
}
|
|
1272
|
+
if (!event || this.separatorKeyCodes.indexOf(event.keyCode) > -1) {
|
|
1273
|
+
this.chipEnd.emit({ input: this._inputElement, value: this._inputElement.value });
|
|
1274
|
+
if (event) {
|
|
1275
|
+
event.preventDefault();
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* @return {?}
|
|
1281
|
+
*/
|
|
1282
|
+
focus() { this._inputElement.focus(); }
|
|
1283
|
+
}
|
|
1284
|
+
MdChipInput.decorators = [
|
|
1285
|
+
{ type: Directive, args: [{
|
|
1286
|
+
selector: 'input[mdChipInputFor], input[matChipInputFor]',
|
|
1287
|
+
host: {
|
|
1288
|
+
'class': 'mat-chip-input mat-input-element',
|
|
1289
|
+
'(keydown)': '_keydown($event)',
|
|
1290
|
+
'(blur)': '_blur()',
|
|
1291
|
+
'(focus)': '_focus()',
|
|
1292
|
+
}
|
|
1293
|
+
},] },
|
|
1294
|
+
];
|
|
1295
|
+
/**
|
|
1296
|
+
* @nocollapse
|
|
1297
|
+
*/
|
|
1298
|
+
MdChipInput.ctorParameters = () => [
|
|
1299
|
+
{ type: ElementRef, },
|
|
1300
|
+
];
|
|
1301
|
+
MdChipInput.propDecorators = {
|
|
1302
|
+
'chipList': [{ type: Input, args: ['mdChipInputFor',] },],
|
|
1303
|
+
'addOnBlur': [{ type: Input, args: ['mdChipInputAddOnBlur',] },],
|
|
1304
|
+
'separatorKeyCodes': [{ type: Input, args: ['mdChipInputSeparatorKeyCodes',] },],
|
|
1305
|
+
'chipEnd': [{ type: Output, args: ['mdChipInputTokenEnd',] },],
|
|
1306
|
+
'_matChipInputTokenEnd': [{ type: Output, args: ['matChipInputTokenEnd',] },],
|
|
1307
|
+
'matChipList': [{ type: Input, args: ['matChipInputFor',] },],
|
|
1308
|
+
'matAddOnBlur': [{ type: Input, args: ['matChipInputAddOnBlur',] },],
|
|
1309
|
+
'matSeparatorKeyCodes': [{ type: Input, args: ['matChipInputSeparatorKeyCodes',] },],
|
|
1310
|
+
'placeholder': [{ type: Input },],
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
class MdChipsModule {
|
|
1314
|
+
}
|
|
1315
|
+
MdChipsModule.decorators = [
|
|
1316
|
+
{ type: NgModule, args: [{
|
|
1317
|
+
imports: [],
|
|
1318
|
+
exports: [MdChipList, MdChip, MdChipInput, MdChipRemove, MdChipRemove, MdBasicChip],
|
|
1319
|
+
declarations: [MdChipList, MdChip, MdChipInput, MdChipRemove, MdChipRemove, MdBasicChip]
|
|
1320
|
+
},] },
|
|
1321
|
+
];
|
|
1322
|
+
/**
|
|
1323
|
+
* @nocollapse
|
|
1324
|
+
*/
|
|
1325
|
+
MdChipsModule.ctorParameters = () => [];
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* Generated bundle index. Do not edit.
|
|
1329
|
+
*/
|
|
1330
|
+
|
|
1331
|
+
export { MdChipsModule, MdChipListChange, MdChipList, MdChipSelectionChange, MdChipBase, _MdChipMixinBase, MdBasicChip, MdChip, MdChipRemove, MdChipInput, MdBasicChip as MatBasicChip, MdChip as MatChip, MdChipBase as MatChipBase, MdChipInput as MatChipInput, MdChipListChange as MatChipListChange, MdChipList as MatChipList, MdChipRemove as MatChipRemove, MdChipsModule as MatChipsModule };
|
|
1332
|
+
//# sourceMappingURL=chips.js.map
|