@angular/material 19.0.0-next.1 → 19.0.0-next.10
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/_index.scss +6 -6
- package/autocomplete/_autocomplete-theme.scss +37 -24
- package/autocomplete/index.d.ts +5 -15
- package/badge/_badge-theme.scss +38 -24
- package/badge/index.d.ts +3 -7
- package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
- package/bottom-sheet/index.d.ts +5 -15
- package/button/_button-base.scss +2 -2
- package/button/_button-theme.scss +229 -105
- package/button/_fab-theme.scss +95 -44
- package/button/_icon-button-theme.scss +38 -25
- package/button/index.d.ts +24 -36
- package/button-toggle/_button-toggle-theme.scss +62 -37
- package/button-toggle/index.d.ts +5 -8
- package/card/_card-theme.scss +79 -38
- package/card/index.d.ts +2 -2
- package/checkbox/_checkbox-common.scss +4 -4
- package/checkbox/_checkbox-theme.scss +16 -10
- package/checkbox/index.d.ts +16 -14
- package/chips/_chips-theme.scss +64 -30
- package/chips/index.d.ts +19 -35
- package/core/_core-theme.scss +59 -55
- package/core/_core.scss +17 -14
- package/core/focus-indicators/_private.scss +21 -82
- package/core/index.d.ts +116 -200
- package/core/option/_optgroup-theme.scss +29 -18
- package/core/option/_option-theme.scss +34 -21
- package/core/ripple/_ripple-theme.scss +33 -21
- package/core/ripple/_ripple.scss +1 -1
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
- package/core/style/_elevation.scss +1 -1
- package/core/style/_menu-common.scss +1 -1
- package/core/style/_sass-utils.scss +4 -0
- package/core/theming/_all-theme.scss +3 -0
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/theming/_palettes.scss +132 -45
- package/core/tokens/_density.scss +1 -0
- package/core/tokens/_m3-system.scss +162 -36
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mat/_timepicker.scss +44 -0
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/_index.scss +2 -0
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/definitions/_md-sys-color.scss +6 -6
- package/core/tokens/m3/mat/_badge.scss +3 -0
- package/core/tokens/m3/mat/_sidenav.scss +0 -1
- package/core/tokens/m3/mat/_timepicker.scss +22 -0
- package/core/typography/_all-typography.scss +2 -0
- package/datepicker/_datepicker-theme.scss +53 -32
- package/datepicker/index.d.ts +45 -71
- package/dialog/_dialog-theme.scss +46 -23
- package/dialog/index.d.ts +16 -37
- package/dialog/testing/index.d.ts +1 -1
- package/divider/_divider-theme.scss +28 -17
- package/expansion/_expansion-theme.scss +36 -24
- package/expansion/index.d.ts +9 -13
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +43 -75
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +24 -31
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +26 -41
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +30 -45
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +79 -157
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +53 -68
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +41 -44
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +131 -184
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +370 -411
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +208 -349
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +3 -4
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +50 -113
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +60 -98
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +91 -102
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +39 -49
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +22 -31
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input.mjs +58 -59
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +112 -158
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +69 -118
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +2 -2
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +11 -11
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +19 -26
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +15 -21
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +33 -45
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +36 -69
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +72 -94
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +31 -38
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +66 -74
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +52 -68
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +34 -52
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +63 -77
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +59 -75
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +140 -199
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +196 -0
- package/fesm2022/timepicker/testing.mjs.map +1 -0
- package/fesm2022/timepicker.mjs +842 -0
- package/fesm2022/timepicker.mjs.map +1 -0
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +18 -23
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +69 -75
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +36 -69
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-high-contrast.scss +4 -4
- package/form-field/_form-field-theme.scss +114 -61
- package/form-field/_mdc-text-field-structure.scss +51 -49
- package/form-field/index.d.ts +13 -25
- package/grid-list/_grid-list-theme.scss +25 -15
- package/grid-list/index.d.ts +6 -8
- package/icon/_icon-theme.scss +22 -14
- package/icon/index.d.ts +3 -3
- package/input/_input-theme.scss +18 -11
- package/input/index.d.ts +6 -8
- package/list/_list-inherited-structure.scss +1 -13
- package/list/_list-item-hcm-indicator.scss +1 -1
- package/list/_list-theme.scss +89 -47
- package/list/index.d.ts +10 -14
- package/menu/_menu-theme.scss +33 -21
- package/menu/index.d.ts +15 -50
- package/package.json +10 -146
- package/paginator/_paginator-theme.scss +39 -23
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -16
- package/progress-bar/index.d.ts +3 -5
- package/progress-spinner/_progress-spinner-theme.scss +41 -25
- package/progress-spinner/index.d.ts +2 -2
- package/radio/_radio-theme.scss +60 -32
- package/radio/index.d.ts +5 -8
- package/schematics/collection.json +3 -3
- package/schematics/ng-add/fonts/material-fonts.d.ts +1 -1
- package/schematics/ng-add/fonts/material-fonts.js +2 -2
- package/schematics/ng-add/fonts/material-fonts.mjs +2 -2
- package/schematics/ng-add/index.d.ts +1 -1
- package/schematics/ng-add/index.js +3 -3
- package/schematics/ng-add/index.mjs +3 -3
- package/schematics/ng-add/package-config.d.ts +1 -1
- package/schematics/ng-add/package-config.js +2 -2
- package/schematics/ng-add/package-config.mjs +2 -2
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/schema.js +2 -2
- package/schematics/ng-add/schema.mjs +2 -2
- package/schematics/ng-add/setup-project.d.ts +1 -1
- package/schematics/ng-add/setup-project.js +3 -3
- package/schematics/ng-add/setup-project.mjs +3 -3
- package/schematics/ng-add/theming/create-custom-theme.d.ts +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +2 -7
- package/schematics/ng-add/theming/create-custom-theme.mjs +2 -7
- package/schematics/ng-add/theming/theming.d.ts +1 -1
- package/schematics/ng-add/theming/theming.js +2 -2
- package/schematics/ng-add/theming/theming.mjs +2 -2
- package/schematics/ng-generate/address-form/index.d.ts +1 -1
- package/schematics/ng-generate/address-form/index.js +2 -2
- package/schematics/ng-generate/address-form/index.mjs +2 -2
- package/schematics/ng-generate/address-form/schema.d.ts +1 -1
- package/schematics/ng-generate/address-form/schema.js +2 -2
- package/schematics/ng-generate/address-form/schema.mjs +2 -2
- package/schematics/ng-generate/dashboard/index.d.ts +1 -1
- package/schematics/ng-generate/dashboard/index.js +2 -2
- package/schematics/ng-generate/dashboard/index.mjs +2 -2
- package/schematics/ng-generate/dashboard/schema.d.ts +1 -1
- package/schematics/ng-generate/dashboard/schema.js +2 -2
- package/schematics/ng-generate/dashboard/schema.mjs +2 -2
- package/schematics/ng-generate/navigation/index.d.ts +1 -1
- package/schematics/ng-generate/navigation/index.js +2 -2
- package/schematics/ng-generate/navigation/index.mjs +2 -2
- package/schematics/ng-generate/navigation/schema.d.ts +1 -1
- package/schematics/ng-generate/navigation/schema.js +2 -2
- package/schematics/ng-generate/navigation/schema.mjs +2 -2
- package/schematics/ng-generate/table/index.d.ts +1 -1
- package/schematics/ng-generate/table/index.js +2 -2
- package/schematics/ng-generate/table/index.mjs +2 -2
- package/schematics/ng-generate/table/schema.d.ts +1 -1
- package/schematics/ng-generate/table/schema.js +2 -2
- package/schematics/ng-generate/table/schema.mjs +2 -2
- package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +481 -289
- package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
- package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
- package/schematics/ng-generate/tree/index.d.ts +1 -1
- package/schematics/ng-generate/tree/index.js +2 -2
- package/schematics/ng-generate/tree/index.mjs +2 -2
- package/schematics/ng-generate/tree/schema.d.ts +1 -1
- package/schematics/ng-generate/tree/schema.js +2 -2
- package/schematics/ng-generate/tree/schema.mjs +2 -2
- package/schematics/ng-update/index_bundled.js +6518 -2
- package/schematics/ng-update/index_bundled.js.map +4 -4
- package/select/_select-theme.scss +38 -25
- package/select/index.d.ts +4 -14
- package/sidenav/_sidenav-theme.scss +28 -17
- package/sidenav/index.d.ts +7 -17
- package/slide-toggle/_slide-toggle-theme.scss +52 -28
- package/slide-toggle/index.d.ts +2 -2
- package/slider/_slider-theme.scss +62 -38
- package/slider/index.d.ts +8 -8
- package/snack-bar/_snack-bar-theme.scss +29 -17
- package/snack-bar/index.d.ts +6 -22
- package/sort/_sort-theme.scss +33 -21
- package/sort/index.d.ts +4 -20
- package/stepper/_stepper-theme.scss +40 -27
- package/stepper/index.d.ts +6 -13
- package/table/_table-theme.scss +36 -23
- package/tabs/_tabs-common.scss +2 -2
- package/tabs/_tabs-theme.scss +97 -50
- package/tabs/index.d.ts +28 -35
- package/timepicker/_timepicker-theme.scss +124 -0
- package/timepicker/index.d.ts +297 -0
- package/timepicker/testing/index.d.ts +113 -0
- package/toolbar/_toolbar-theme.scss +35 -22
- package/toolbar/index.d.ts +3 -4
- package/tooltip/_tooltip-theme.scss +18 -15
- package/tooltip/index.d.ts +5 -12
- package/tree/_tree-theme.scss +33 -21
- package/tree/index.d.ts +5 -18
- package/core/focus-indicators/_focus-indicators-theme.scss +0 -11
- package/core/focus-indicators/_focus-indicators.scss +0 -6
- package/esm2022/autocomplete/animations.mjs +0 -24
- package/esm2022/autocomplete/autocomplete-origin.mjs +0 -31
- package/esm2022/autocomplete/autocomplete-trigger.mjs +0 -902
- package/esm2022/autocomplete/autocomplete.mjs +0 -238
- package/esm2022/autocomplete/autocomplete_public_index.mjs +0 -5
- package/esm2022/autocomplete/index.mjs +0 -9
- package/esm2022/autocomplete/module.mjs +0 -61
- package/esm2022/autocomplete/public-api.mjs +0 -14
- package/esm2022/autocomplete/testing/autocomplete-harness-filters.mjs +0 -9
- package/esm2022/autocomplete/testing/autocomplete-harness.mjs +0 -105
- package/esm2022/autocomplete/testing/index.mjs +0 -9
- package/esm2022/autocomplete/testing/public-api.mjs +0 -10
- package/esm2022/badge/badge-module.mjs +0 -27
- package/esm2022/badge/badge.mjs +0 -288
- package/esm2022/badge/badge_public_index.mjs +0 -5
- package/esm2022/badge/index.mjs +0 -9
- package/esm2022/badge/public-api.mjs +0 -10
- package/esm2022/badge/testing/badge-harness-filters.mjs +0 -9
- package/esm2022/badge/testing/badge-harness.mjs +0 -71
- package/esm2022/badge/testing/index.mjs +0 -9
- package/esm2022/badge/testing/public-api.mjs +0 -10
- package/esm2022/bottom-sheet/bottom-sheet-animations.mjs +0 -26
- package/esm2022/bottom-sheet/bottom-sheet-config.mjs +0 -48
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +0 -85
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +0 -28
- package/esm2022/bottom-sheet/bottom-sheet-ref.mjs +0 -104
- package/esm2022/bottom-sheet/bottom-sheet.mjs +0 -115
- package/esm2022/bottom-sheet/bottom-sheet_public_index.mjs +0 -5
- package/esm2022/bottom-sheet/index.mjs +0 -9
- package/esm2022/bottom-sheet/public-api.mjs +0 -14
- package/esm2022/bottom-sheet/testing/bottom-sheet-harness-filters.mjs +0 -9
- package/esm2022/bottom-sheet/testing/bottom-sheet-harness.mjs +0 -35
- package/esm2022/bottom-sheet/testing/index.mjs +0 -9
- package/esm2022/bottom-sheet/testing/public-api.mjs +0 -10
- package/esm2022/button/button-base.mjs +0 -230
- package/esm2022/button/button.mjs +0 -67
- package/esm2022/button/button_public_index.mjs +0 -5
- package/esm2022/button/fab.mjs +0 -166
- package/esm2022/button/icon-button.mjs +0 -56
- package/esm2022/button/index.mjs +0 -9
- package/esm2022/button/module.mjs +0 -65
- package/esm2022/button/public-api.mjs +0 -13
- package/esm2022/button/testing/button-harness-filters.mjs +0 -9
- package/esm2022/button/testing/button-harness.mjs +0 -80
- package/esm2022/button/testing/index.mjs +0 -9
- package/esm2022/button/testing/public-api.mjs +0 -10
- package/esm2022/button-toggle/button-toggle-module.mjs +0 -24
- package/esm2022/button-toggle/button-toggle.mjs +0 -651
- package/esm2022/button-toggle/button-toggle_public_index.mjs +0 -5
- package/esm2022/button-toggle/index.mjs +0 -9
- package/esm2022/button-toggle/public-api.mjs +0 -10
- package/esm2022/button-toggle/testing/button-toggle-group-harness-filters.mjs +0 -9
- package/esm2022/button-toggle/testing/button-toggle-group-harness.mjs +0 -47
- package/esm2022/button-toggle/testing/button-toggle-harness-filters.mjs +0 -9
- package/esm2022/button-toggle/testing/button-toggle-harness.mjs +0 -105
- package/esm2022/button-toggle/testing/index.mjs +0 -9
- package/esm2022/button-toggle/testing/public-api.mjs +0 -12
- package/esm2022/card/card.mjs +0 -273
- package/esm2022/card/card_public_index.mjs +0 -5
- package/esm2022/card/index.mjs +0 -9
- package/esm2022/card/module.mjs +0 -67
- package/esm2022/card/public-api.mjs +0 -10
- package/esm2022/card/testing/card-harness-filters.mjs +0 -9
- package/esm2022/card/testing/card-harness.mjs +0 -50
- package/esm2022/card/testing/index.mjs +0 -9
- package/esm2022/card/testing/public-api.mjs +0 -10
- package/esm2022/checkbox/checkbox-config.mjs +0 -22
- package/esm2022/checkbox/checkbox-required-validator.mjs +0 -41
- package/esm2022/checkbox/checkbox.mjs +0 -443
- package/esm2022/checkbox/checkbox_public_index.mjs +0 -5
- package/esm2022/checkbox/index.mjs +0 -9
- package/esm2022/checkbox/module.mjs +0 -41
- package/esm2022/checkbox/public-api.mjs +0 -12
- package/esm2022/checkbox/testing/checkbox-harness-filters.mjs +0 -9
- package/esm2022/checkbox/testing/checkbox-harness.mjs +0 -138
- package/esm2022/checkbox/testing/index.mjs +0 -9
- package/esm2022/checkbox/testing/public-api.mjs +0 -9
- package/esm2022/chips/chip-action.mjs +0 -113
- package/esm2022/chips/chip-edit-input.mjs +0 -61
- package/esm2022/chips/chip-grid.mjs +0 -420
- package/esm2022/chips/chip-icons.mjs +0 -107
- package/esm2022/chips/chip-input.mjs +0 -192
- package/esm2022/chips/chip-listbox.mjs +0 -369
- package/esm2022/chips/chip-option.mjs +0 -190
- package/esm2022/chips/chip-row.mjs +0 -173
- package/esm2022/chips/chip-set.mjs +0 -283
- package/esm2022/chips/chip-text-control.mjs +0 -9
- package/esm2022/chips/chip.mjs +0 -322
- package/esm2022/chips/chips_public_index.mjs +0 -5
- package/esm2022/chips/index.mjs +0 -9
- package/esm2022/chips/module.mjs +0 -85
- package/esm2022/chips/public-api.mjs +0 -20
- package/esm2022/chips/testing/chip-avatar-harness.mjs +0 -22
- package/esm2022/chips/testing/chip-edit-input-harness.mjs +0 -33
- package/esm2022/chips/testing/chip-grid-harness.mjs +0 -45
- package/esm2022/chips/testing/chip-harness-filters.mjs +0 -9
- package/esm2022/chips/testing/chip-harness.mjs +0 -62
- package/esm2022/chips/testing/chip-input-harness.mjs +0 -85
- package/esm2022/chips/testing/chip-listbox-harness.mjs +0 -61
- package/esm2022/chips/testing/chip-option-harness.mjs +0 -45
- package/esm2022/chips/testing/chip-remove-harness.mjs +0 -26
- package/esm2022/chips/testing/chip-row-harness.mjs +0 -40
- package/esm2022/chips/testing/chip-set-harness.mjs +0 -26
- package/esm2022/chips/testing/index.mjs +0 -9
- package/esm2022/chips/testing/public-api.mjs +0 -19
- package/esm2022/chips/tokens.mjs +0 -39
- package/esm2022/core/animation/animation.mjs +0 -21
- package/esm2022/core/common-behaviors/color.mjs +0 -33
- package/esm2022/core/common-behaviors/common-module.mjs +0 -127
- package/esm2022/core/common-behaviors/constructor.mjs +0 -9
- package/esm2022/core/common-behaviors/disable-ripple.mjs +0 -24
- package/esm2022/core/common-behaviors/disabled.mjs +0 -23
- package/esm2022/core/common-behaviors/error-state.mjs +0 -66
- package/esm2022/core/common-behaviors/index.mjs +0 -15
- package/esm2022/core/common-behaviors/initialized.mjs +0 -62
- package/esm2022/core/common-behaviors/tabindex.mjs +0 -25
- package/esm2022/core/core_public_index.mjs +0 -5
- package/esm2022/core/datetime/date-adapter.mjs +0 -109
- package/esm2022/core/datetime/date-formats.mjs +0 -10
- package/esm2022/core/datetime/index.mjs +0 -46
- package/esm2022/core/datetime/native-date-adapter.mjs +0 -221
- package/esm2022/core/datetime/native-date-formats.mjs +0 -19
- package/esm2022/core/error/error-options.mjs +0 -33
- package/esm2022/core/index.mjs +0 -9
- package/esm2022/core/internal-form-field/internal-form-field.mjs +0 -29
- package/esm2022/core/line/line.mjs +0 -64
- package/esm2022/core/option/index.mjs +0 -30
- package/esm2022/core/option/optgroup.mjs +0 -71
- package/esm2022/core/option/option-parent.mjs +0 -13
- package/esm2022/core/option/option.mjs +0 -283
- package/esm2022/core/private/index.mjs +0 -9
- package/esm2022/core/private/ripple-loader.mjs +0 -160
- package/esm2022/core/public-api.mjs +0 -19
- package/esm2022/core/ripple/index.mjs +0 -27
- package/esm2022/core/ripple/ripple-event-manager.mjs +0 -69
- package/esm2022/core/ripple/ripple-ref.mjs +0 -39
- package/esm2022/core/ripple/ripple-renderer.mjs +0 -354
- package/esm2022/core/ripple/ripple.mjs +0 -156
- package/esm2022/core/selection/index.mjs +0 -10
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +0 -24
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +0 -62
- package/esm2022/core/testing/index.mjs +0 -9
- package/esm2022/core/testing/optgroup-harness-filters.mjs +0 -9
- package/esm2022/core/testing/optgroup-harness.mjs +0 -43
- package/esm2022/core/testing/option-harness-filters.mjs +0 -9
- package/esm2022/core/testing/option-harness.mjs +0 -53
- package/esm2022/core/testing/public-api.mjs +0 -12
- package/esm2022/core/version.mjs +0 -11
- package/esm2022/datepicker/aria-accessible-name.mjs +0 -159
- package/esm2022/datepicker/calendar-body.mjs +0 -509
- package/esm2022/datepicker/calendar.mjs +0 -426
- package/esm2022/datepicker/date-range-input-parts.mjs +0 -372
- package/esm2022/datepicker/date-range-input.mjs +0 -369
- package/esm2022/datepicker/date-range-picker.mjs +0 -51
- package/esm2022/datepicker/date-range-selection-strategy.mjs +0 -97
- package/esm2022/datepicker/date-selection-model.mjs +0 -188
- package/esm2022/datepicker/datepicker-actions.mjs +0 -91
- package/esm2022/datepicker/datepicker-animations.mjs +0 -35
- package/esm2022/datepicker/datepicker-base.mjs +0 -609
- package/esm2022/datepicker/datepicker-errors.mjs +0 -14
- package/esm2022/datepicker/datepicker-input-base.mjs +0 -311
- package/esm2022/datepicker/datepicker-input.mjs +0 -200
- package/esm2022/datepicker/datepicker-intl.mjs +0 -69
- package/esm2022/datepicker/datepicker-module.mjs +0 -138
- package/esm2022/datepicker/datepicker-toggle.mjs +0 -113
- package/esm2022/datepicker/datepicker.mjs +0 -38
- package/esm2022/datepicker/datepicker_public_index.mjs +0 -5
- package/esm2022/datepicker/index.mjs +0 -9
- package/esm2022/datepicker/month-view.mjs +0 -460
- package/esm2022/datepicker/multi-year-view.mjs +0 -330
- package/esm2022/datepicker/public-api.mjs +0 -27
- package/esm2022/datepicker/testing/calendar-cell-harness.mjs +0 -138
- package/esm2022/datepicker/testing/calendar-harness.mjs +0 -83
- package/esm2022/datepicker/testing/date-range-input-harness.mjs +0 -98
- package/esm2022/datepicker/testing/datepicker-harness-filters.mjs +0 -9
- package/esm2022/datepicker/testing/datepicker-input-harness-base.mjs +0 -81
- package/esm2022/datepicker/testing/datepicker-input-harness.mjs +0 -58
- package/esm2022/datepicker/testing/datepicker-toggle-harness.mjs +0 -41
- package/esm2022/datepicker/testing/datepicker-trigger-harness-base.mjs +0 -65
- package/esm2022/datepicker/testing/index.mjs +0 -9
- package/esm2022/datepicker/testing/public-api.mjs +0 -14
- package/esm2022/datepicker/year-view.mjs +0 -324
- package/esm2022/dialog/dialog-animations.mjs +0 -38
- package/esm2022/dialog/dialog-config.mjs +0 -59
- package/esm2022/dialog/dialog-container.mjs +0 -253
- package/esm2022/dialog/dialog-content-directives.mjs +0 -212
- package/esm2022/dialog/dialog-ref.mjs +0 -177
- package/esm2022/dialog/dialog.mjs +0 -212
- package/esm2022/dialog/dialog_public_index.mjs +0 -5
- package/esm2022/dialog/index.mjs +0 -9
- package/esm2022/dialog/module.mjs +0 -45
- package/esm2022/dialog/public-api.mjs +0 -15
- package/esm2022/dialog/testing/dialog-harness-filters.mjs +0 -9
- package/esm2022/dialog/testing/dialog-harness.mjs +0 -84
- package/esm2022/dialog/testing/dialog-opener.mjs +0 -58
- package/esm2022/dialog/testing/index.mjs +0 -10
- package/esm2022/dialog/testing/public-api.mjs +0 -10
- package/esm2022/divider/divider-module.mjs +0 -24
- package/esm2022/divider/divider.mjs +0 -48
- package/esm2022/divider/divider_public_index.mjs +0 -5
- package/esm2022/divider/index.mjs +0 -9
- package/esm2022/divider/public-api.mjs +0 -10
- package/esm2022/divider/testing/divider-harness-filters.mjs +0 -9
- package/esm2022/divider/testing/divider-harness.mjs +0 -22
- package/esm2022/divider/testing/index.mjs +0 -9
- package/esm2022/divider/testing/public-api.mjs +0 -10
- package/esm2022/expansion/accordion-base.mjs +0 -14
- package/esm2022/expansion/accordion.mjs +0 -96
- package/esm2022/expansion/expansion-animations.mjs +0 -51
- package/esm2022/expansion/expansion-module.mjs +0 -65
- package/esm2022/expansion/expansion-panel-base.mjs +0 -14
- package/esm2022/expansion/expansion-panel-content.mjs +0 -35
- package/esm2022/expansion/expansion-panel-header.mjs +0 -218
- package/esm2022/expansion/expansion-panel.mjs +0 -211
- package/esm2022/expansion/expansion_public_index.mjs +0 -5
- package/esm2022/expansion/index.mjs +0 -9
- package/esm2022/expansion/public-api.mjs +0 -16
- package/esm2022/expansion/testing/accordion-harness.mjs +0 -31
- package/esm2022/expansion/testing/expansion-harness-filters.mjs +0 -9
- package/esm2022/expansion/testing/expansion-harness.mjs +0 -128
- package/esm2022/expansion/testing/index.mjs +0 -9
- package/esm2022/expansion/testing/public-api.mjs +0 -11
- package/esm2022/form-field/directives/error.mjs +0 -48
- package/esm2022/form-field/directives/floating-label.mjs +0 -135
- package/esm2022/form-field/directives/hint.mjs +0 -40
- package/esm2022/form-field/directives/label.mjs +0 -22
- package/esm2022/form-field/directives/line-ripple.mjs +0 -60
- package/esm2022/form-field/directives/notched-outline.mjs +0 -66
- package/esm2022/form-field/directives/prefix.mjs +0 -38
- package/esm2022/form-field/directives/suffix.mjs +0 -38
- package/esm2022/form-field/form-field-animations.mjs +0 -24
- package/esm2022/form-field/form-field-control.mjs +0 -11
- package/esm2022/form-field/form-field-errors.mjs +0 -20
- package/esm2022/form-field/form-field.mjs +0 -620
- package/esm2022/form-field/form-field_public_index.mjs +0 -5
- package/esm2022/form-field/index.mjs +0 -9
- package/esm2022/form-field/module.mjs +0 -51
- package/esm2022/form-field/public-api.mjs +0 -18
- package/esm2022/form-field/testing/control/form-field-control-harness.mjs +0 -15
- package/esm2022/form-field/testing/control/index.mjs +0 -9
- package/esm2022/form-field/testing/error-harness.mjs +0 -29
- package/esm2022/form-field/testing/form-field-harness-filters.mjs +0 -9
- package/esm2022/form-field/testing/form-field-harness.mjs +0 -179
- package/esm2022/form-field/testing/index.mjs +0 -9
- package/esm2022/form-field/testing/public-api.mjs +0 -15
- package/esm2022/grid-list/grid-list-base.mjs +0 -14
- package/esm2022/grid-list/grid-list-module.mjs +0 -59
- package/esm2022/grid-list/grid-list.mjs +0 -146
- package/esm2022/grid-list/grid-list_public_index.mjs +0 -5
- package/esm2022/grid-list/grid-tile.mjs +0 -128
- package/esm2022/grid-list/index.mjs +0 -9
- package/esm2022/grid-list/public-api.mjs +0 -14
- package/esm2022/grid-list/testing/grid-list-harness-filters.mjs +0 -9
- package/esm2022/grid-list/testing/grid-list-harness.mjs +0 -76
- package/esm2022/grid-list/testing/grid-tile-harness.mjs +0 -71
- package/esm2022/grid-list/testing/index.mjs +0 -9
- package/esm2022/grid-list/testing/public-api.mjs +0 -11
- package/esm2022/grid-list/tile-coordinator.mjs +0 -145
- package/esm2022/grid-list/tile-styler.mjs +0 -231
- package/esm2022/icon/fake-svgs.mjs +0 -62
- package/esm2022/icon/icon-module.mjs +0 -24
- package/esm2022/icon/icon-registry.mjs +0 -592
- package/esm2022/icon/icon.mjs +0 -379
- package/esm2022/icon/icon_public_index.mjs +0 -5
- package/esm2022/icon/index.mjs +0 -9
- package/esm2022/icon/public-api.mjs +0 -11
- package/esm2022/icon/testing/fake-icon-registry.mjs +0 -92
- package/esm2022/icon/testing/icon-harness-filters.mjs +0 -14
- package/esm2022/icon/testing/icon-harness.mjs +0 -60
- package/esm2022/icon/testing/index.mjs +0 -9
- package/esm2022/icon/testing/public-api.mjs +0 -11
- package/esm2022/icon/testing/testing_public_index.mjs +0 -5
- package/esm2022/icon/trusted-types.mjs +0 -43
- package/esm2022/index.mjs +0 -14
- package/esm2022/input/index.mjs +0 -9
- package/esm2022/input/input-errors.mjs +0 -12
- package/esm2022/input/input-value-accessor.mjs +0 -16
- package/esm2022/input/input.mjs +0 -524
- package/esm2022/input/input_public_index.mjs +0 -5
- package/esm2022/input/module.mjs +0 -26
- package/esm2022/input/public-api.mjs +0 -14
- package/esm2022/input/testing/index.mjs +0 -9
- package/esm2022/input/testing/input-harness-filters.mjs +0 -9
- package/esm2022/input/testing/input-harness.mjs +0 -119
- package/esm2022/input/testing/native-option-harness.mjs +0 -42
- package/esm2022/input/testing/native-select-harness-filters.mjs +0 -9
- package/esm2022/input/testing/native-select-harness.mjs +0 -79
- package/esm2022/input/testing/public-api.mjs +0 -13
- package/esm2022/list/action-list.mjs +0 -31
- package/esm2022/list/index.mjs +0 -9
- package/esm2022/list/list-base.mjs +0 -284
- package/esm2022/list/list-item-sections.mjs +0 -144
- package/esm2022/list/list-module.mjs +0 -97
- package/esm2022/list/list-option-types.mjs +0 -16
- package/esm2022/list/list-option.mjs +0 -295
- package/esm2022/list/list.mjs +0 -103
- package/esm2022/list/list_public_index.mjs +0 -5
- package/esm2022/list/nav-list.mjs +0 -37
- package/esm2022/list/public-api.mjs +0 -18
- package/esm2022/list/selection-list.mjs +0 -391
- package/esm2022/list/subheader.mjs +0 -28
- package/esm2022/list/testing/action-list-harness.mjs +0 -59
- package/esm2022/list/testing/index.mjs +0 -9
- package/esm2022/list/testing/list-harness-base.mjs +0 -95
- package/esm2022/list/testing/list-harness-filters.mjs +0 -9
- package/esm2022/list/testing/list-harness.mjs +0 -41
- package/esm2022/list/testing/list-item-harness-base.mjs +0 -162
- package/esm2022/list/testing/nav-list-harness.mjs +0 -69
- package/esm2022/list/testing/public-api.mjs +0 -14
- package/esm2022/list/testing/selection-list-harness.mjs +0 -122
- package/esm2022/list/tokens.mjs +0 -11
- package/esm2022/menu/index.mjs +0 -9
- package/esm2022/menu/menu-animations.mjs +0 -61
- package/esm2022/menu/menu-content.mjs +0 -87
- package/esm2022/menu/menu-errors.mjs +0 -35
- package/esm2022/menu/menu-item.mjs +0 -148
- package/esm2022/menu/menu-panel.mjs +0 -14
- package/esm2022/menu/menu-positions.mjs +0 -9
- package/esm2022/menu/menu-trigger.mjs +0 -542
- package/esm2022/menu/menu.mjs +0 -405
- package/esm2022/menu/menu_public_index.mjs +0 -5
- package/esm2022/menu/module.mjs +0 -63
- package/esm2022/menu/public-api.mjs +0 -16
- package/esm2022/menu/testing/index.mjs +0 -9
- package/esm2022/menu/testing/menu-harness-filters.mjs +0 -9
- package/esm2022/menu/testing/menu-harness.mjs +0 -166
- package/esm2022/menu/testing/public-api.mjs +0 -10
- package/esm2022/paginator/index.mjs +0 -9
- package/esm2022/paginator/module.mjs +0 -28
- package/esm2022/paginator/paginator-intl.mjs +0 -62
- package/esm2022/paginator/paginator.mjs +0 -266
- package/esm2022/paginator/paginator_public_index.mjs +0 -5
- package/esm2022/paginator/public-api.mjs +0 -11
- package/esm2022/paginator/testing/index.mjs +0 -9
- package/esm2022/paginator/testing/paginator-harness-filters.mjs +0 -9
- package/esm2022/paginator/testing/paginator-harness.mjs +0 -98
- package/esm2022/paginator/testing/public-api.mjs +0 -10
- package/esm2022/progress-bar/index.mjs +0 -9
- package/esm2022/progress-bar/module.mjs +0 -24
- package/esm2022/progress-bar/progress-bar.mjs +0 -181
- package/esm2022/progress-bar/progress-bar_public_index.mjs +0 -5
- package/esm2022/progress-bar/public-api.mjs +0 -10
- package/esm2022/progress-bar/testing/index.mjs +0 -9
- package/esm2022/progress-bar/testing/progress-bar-harness-filters.mjs +0 -9
- package/esm2022/progress-bar/testing/progress-bar-harness.mjs +0 -33
- package/esm2022/progress-bar/testing/public-api.mjs +0 -10
- package/esm2022/progress-bar/testing/testing_public_index.mjs +0 -5
- package/esm2022/progress-spinner/index.mjs +0 -9
- package/esm2022/progress-spinner/module.mjs +0 -25
- package/esm2022/progress-spinner/progress-spinner.mjs +0 -166
- package/esm2022/progress-spinner/progress-spinner_public_index.mjs +0 -5
- package/esm2022/progress-spinner/public-api.mjs +0 -10
- package/esm2022/progress-spinner/testing/index.mjs +0 -9
- package/esm2022/progress-spinner/testing/progress-spinner-harness-filters.mjs +0 -9
- package/esm2022/progress-spinner/testing/progress-spinner-harness.mjs +0 -35
- package/esm2022/progress-spinner/testing/public-api.mjs +0 -10
- package/esm2022/progress-spinner/testing/testing_public_index.mjs +0 -5
- package/esm2022/radio/index.mjs +0 -9
- package/esm2022/radio/module.mjs +0 -25
- package/esm2022/radio/public-api.mjs +0 -10
- package/esm2022/radio/radio.mjs +0 -680
- package/esm2022/radio/radio_public_index.mjs +0 -5
- package/esm2022/radio/testing/index.mjs +0 -9
- package/esm2022/radio/testing/public-api.mjs +0 -10
- package/esm2022/radio/testing/radio-harness-filters.mjs +0 -9
- package/esm2022/radio/testing/radio-harness.mjs +0 -228
- package/esm2022/select/index.mjs +0 -9
- package/esm2022/select/module.mjs +0 -59
- package/esm2022/select/public-api.mjs +0 -15
- package/esm2022/select/select-animations.mjs +0 -38
- package/esm2022/select/select-errors.mjs +0 -35
- package/esm2022/select/select.mjs +0 -1160
- package/esm2022/select/select_public_index.mjs +0 -5
- package/esm2022/select/testing/index.mjs +0 -9
- package/esm2022/select/testing/public-api.mjs +0 -10
- package/esm2022/select/testing/select-harness-filters.mjs +0 -9
- package/esm2022/select/testing/select-harness.mjs +0 -129
- package/esm2022/sidenav/drawer-animations.mjs +0 -33
- package/esm2022/sidenav/drawer.mjs +0 -863
- package/esm2022/sidenav/index.mjs +0 -9
- package/esm2022/sidenav/public-api.mjs +0 -12
- package/esm2022/sidenav/sidenav-module.mjs +0 -60
- package/esm2022/sidenav/sidenav.mjs +0 -148
- package/esm2022/sidenav/sidenav_public_index.mjs +0 -5
- package/esm2022/sidenav/testing/drawer-container-harness.mjs +0 -36
- package/esm2022/sidenav/testing/drawer-content-harness.mjs +0 -23
- package/esm2022/sidenav/testing/drawer-harness-filters.mjs +0 -9
- package/esm2022/sidenav/testing/drawer-harness.mjs +0 -49
- package/esm2022/sidenav/testing/index.mjs +0 -9
- package/esm2022/sidenav/testing/public-api.mjs +0 -15
- package/esm2022/sidenav/testing/sidenav-container-harness.mjs +0 -36
- package/esm2022/sidenav/testing/sidenav-content-harness.mjs +0 -23
- package/esm2022/sidenav/testing/sidenav-harness.mjs +0 -28
- package/esm2022/slide-toggle/index.mjs +0 -9
- package/esm2022/slide-toggle/module.mjs +0 -41
- package/esm2022/slide-toggle/public-api.mjs +0 -12
- package/esm2022/slide-toggle/slide-toggle-config.mjs +0 -14
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +0 -44
- package/esm2022/slide-toggle/slide-toggle.mjs +0 -273
- package/esm2022/slide-toggle/slide-toggle_public_index.mjs +0 -5
- package/esm2022/slide-toggle/testing/index.mjs +0 -9
- package/esm2022/slide-toggle/testing/public-api.mjs +0 -10
- package/esm2022/slide-toggle/testing/slide-toggle-harness-filters.mjs +0 -9
- package/esm2022/slide-toggle/testing/slide-toggle-harness.mjs +0 -110
- package/esm2022/slider/index.mjs +0 -9
- package/esm2022/slider/module.mjs +0 -39
- package/esm2022/slider/public-api.mjs +0 -13
- package/esm2022/slider/slider-input.mjs +0 -701
- package/esm2022/slider/slider-interface.mjs +0 -56
- package/esm2022/slider/slider-thumb.mjs +0 -231
- package/esm2022/slider/slider.mjs +0 -746
- package/esm2022/slider/slider_public_index.mjs +0 -5
- package/esm2022/slider/testing/index.mjs +0 -9
- package/esm2022/slider/testing/public-api.mjs +0 -11
- package/esm2022/slider/testing/slider-harness-filters.mjs +0 -7
- package/esm2022/slider/testing/slider-harness.mjs +0 -67
- package/esm2022/slider/testing/slider-thumb-harness.mjs +0 -95
- package/esm2022/snack-bar/index.mjs +0 -9
- package/esm2022/snack-bar/module.mjs +0 -47
- package/esm2022/snack-bar/public-api.mjs +0 -16
- package/esm2022/snack-bar/simple-snack-bar.mjs +0 -40
- package/esm2022/snack-bar/snack-bar-animations.mjs +0 -30
- package/esm2022/snack-bar/snack-bar-config.mjs +0 -33
- package/esm2022/snack-bar/snack-bar-container.mjs +0 -277
- package/esm2022/snack-bar/snack-bar-content.mjs +0 -55
- package/esm2022/snack-bar/snack-bar-ref.mjs +0 -89
- package/esm2022/snack-bar/snack-bar.mjs +0 -267
- package/esm2022/snack-bar/snack-bar_public_index.mjs +0 -5
- package/esm2022/snack-bar/testing/index.mjs +0 -9
- package/esm2022/snack-bar/testing/public-api.mjs +0 -10
- package/esm2022/snack-bar/testing/snack-bar-harness-filters.mjs +0 -9
- package/esm2022/snack-bar/testing/snack-bar-harness.mjs +0 -101
- package/esm2022/sort/index.mjs +0 -9
- package/esm2022/sort/public-api.mjs +0 -14
- package/esm2022/sort/sort-animations.mjs +0 -69
- package/esm2022/sort/sort-direction.mjs +0 -9
- package/esm2022/sort/sort-errors.mjs +0 -24
- package/esm2022/sort/sort-header-intl.mjs +0 -41
- package/esm2022/sort/sort-header.mjs +0 -317
- package/esm2022/sort/sort-module.mjs +0 -27
- package/esm2022/sort/sort.mjs +0 -155
- package/esm2022/sort/sort_public_index.mjs +0 -5
- package/esm2022/sort/testing/index.mjs +0 -9
- package/esm2022/sort/testing/public-api.mjs +0 -11
- package/esm2022/sort/testing/sort-harness-filters.mjs +0 -2
- package/esm2022/sort/testing/sort-harness.mjs +0 -36
- package/esm2022/sort/testing/sort-header-harness.mjs +0 -56
- package/esm2022/stepper/index.mjs +0 -9
- package/esm2022/stepper/public-api.mjs +0 -17
- package/esm2022/stepper/step-content.mjs +0 -27
- package/esm2022/stepper/step-header.mjs +0 -105
- package/esm2022/stepper/step-label.mjs +0 -22
- package/esm2022/stepper/stepper-animations.mjs +0 -47
- package/esm2022/stepper/stepper-button.mjs +0 -43
- package/esm2022/stepper/stepper-icon.mjs +0 -30
- package/esm2022/stepper/stepper-intl.mjs +0 -43
- package/esm2022/stepper/stepper-module.mjs +0 -88
- package/esm2022/stepper/stepper.mjs +0 -205
- package/esm2022/stepper/stepper_public_index.mjs +0 -5
- package/esm2022/stepper/testing/index.mjs +0 -9
- package/esm2022/stepper/testing/public-api.mjs +0 -12
- package/esm2022/stepper/testing/step-harness-filters.mjs +0 -7
- package/esm2022/stepper/testing/step-harness.mjs +0 -90
- package/esm2022/stepper/testing/stepper-button-harnesses.mjs +0 -48
- package/esm2022/stepper/testing/stepper-harness.mjs +0 -51
- package/esm2022/table/cell.mjs +0 -147
- package/esm2022/table/index.mjs +0 -9
- package/esm2022/table/module.mjs +0 -93
- package/esm2022/table/public-api.mjs +0 -14
- package/esm2022/table/row.mjs +0 -163
- package/esm2022/table/table-data-source.mjs +0 -317
- package/esm2022/table/table.mjs +0 -122
- package/esm2022/table/table_public_index.mjs +0 -5
- package/esm2022/table/testing/cell-harness.mjs +0 -77
- package/esm2022/table/testing/index.mjs +0 -9
- package/esm2022/table/testing/public-api.mjs +0 -12
- package/esm2022/table/testing/row-harness.mjs +0 -84
- package/esm2022/table/testing/table-harness-filters.mjs +0 -2
- package/esm2022/table/testing/table-harness.mjs +0 -86
- package/esm2022/table/text-column.mjs +0 -60
- package/esm2022/tabs/index.mjs +0 -9
- package/esm2022/tabs/ink-bar.mjs +0 -149
- package/esm2022/tabs/module.mjs +0 -60
- package/esm2022/tabs/paginated-tab-header.mjs +0 -539
- package/esm2022/tabs/public-api.mjs +0 -21
- package/esm2022/tabs/tab-body.mjs +0 -199
- package/esm2022/tabs/tab-config.mjs +0 -11
- package/esm2022/tabs/tab-content.mjs +0 -32
- package/esm2022/tabs/tab-group.mjs +0 -469
- package/esm2022/tabs/tab-header.mjs +0 -86
- package/esm2022/tabs/tab-label-wrapper.mjs +0 -49
- package/esm2022/tabs/tab-label.mjs +0 -44
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +0 -388
- package/esm2022/tabs/tab.mjs +0 -128
- package/esm2022/tabs/tabs-animations.mjs +0 -45
- package/esm2022/tabs/tabs_public_index.mjs +0 -5
- package/esm2022/tabs/testing/index.mjs +0 -9
- package/esm2022/tabs/testing/public-api.mjs +0 -13
- package/esm2022/tabs/testing/tab-group-harness.mjs +0 -56
- package/esm2022/tabs/testing/tab-harness-filters.mjs +0 -2
- package/esm2022/tabs/testing/tab-harness.mjs +0 -66
- package/esm2022/tabs/testing/tab-link-harness.mjs +0 -40
- package/esm2022/tabs/testing/tab-nav-bar-harness.mjs +0 -66
- package/esm2022/tabs/testing/tab-nav-panel-harness.mjs +0 -27
- package/esm2022/toolbar/index.mjs +0 -9
- package/esm2022/toolbar/public-api.mjs +0 -10
- package/esm2022/toolbar/testing/index.mjs +0 -9
- package/esm2022/toolbar/testing/public-api.mjs +0 -10
- package/esm2022/toolbar/testing/toolbar-harness-filters.mjs +0 -9
- package/esm2022/toolbar/testing/toolbar-harness.mjs +0 -44
- package/esm2022/toolbar/toolbar-module.mjs +0 -24
- package/esm2022/toolbar/toolbar.mjs +0 -84
- package/esm2022/toolbar/toolbar_public_index.mjs +0 -5
- package/esm2022/tooltip/index.mjs +0 -9
- package/esm2022/tooltip/module.mjs +0 -29
- package/esm2022/tooltip/public-api.mjs +0 -11
- package/esm2022/tooltip/testing/index.mjs +0 -9
- package/esm2022/tooltip/testing/public-api.mjs +0 -10
- package/esm2022/tooltip/testing/tooltip-harness-filters.mjs +0 -9
- package/esm2022/tooltip/testing/tooltip-harness.mjs +0 -66
- package/esm2022/tooltip/tooltip-animations.mjs +0 -24
- package/esm2022/tooltip/tooltip.mjs +0 -920
- package/esm2022/tooltip/tooltip_public_index.mjs +0 -5
- package/esm2022/tree/data-source/flat-data-source.mjs +0 -156
- package/esm2022/tree/data-source/nested-data-source.mjs +0 -38
- package/esm2022/tree/index.mjs +0 -9
- package/esm2022/tree/node.mjs +0 -220
- package/esm2022/tree/outlet.mjs +0 -46
- package/esm2022/tree/padding.mjs +0 -46
- package/esm2022/tree/public-api.mjs +0 -16
- package/esm2022/tree/testing/index.mjs +0 -9
- package/esm2022/tree/testing/node-harness.mjs +0 -73
- package/esm2022/tree/testing/public-api.mjs +0 -11
- package/esm2022/tree/testing/tree-harness-filters.mjs +0 -9
- package/esm2022/tree/testing/tree-harness.mjs +0 -123
- package/esm2022/tree/toggle.mjs +0 -27
- package/esm2022/tree/tree-module.mjs +0 -50
- package/esm2022/tree/tree.mjs +0 -34
- package/esm2022/tree/tree_public_index.mjs +0 -5
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ViewContainerRef, Injector, signal, viewChild, viewChildren, input, output, booleanAttribute, effect, ElementRef, afterNextRender, untracked, Component, ChangeDetectionStrategy, ViewEncapsulation, computed, model, Directive, HostAttributeToken, NgModule } from '@angular/core';
|
|
3
|
+
import { trigger, state, style, transition, group, animate } from '@angular/animations';
|
|
4
|
+
import { DateAdapter, MAT_DATE_FORMATS, MatOption, MAT_OPTION_PARENT_COMPONENT } from '@angular/material/core';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
7
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
8
|
+
import { _getEventTarget } from '@angular/cdk/platform';
|
|
9
|
+
import { TAB, ESCAPE, hasModifierKey, ENTER, DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';
|
|
10
|
+
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
11
|
+
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
12
|
+
import { MAT_FORM_FIELD } from '@angular/material/form-field';
|
|
13
|
+
import { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
|
|
14
|
+
import { DOCUMENT } from '@angular/common';
|
|
15
|
+
import { MatIconButton } from '@angular/material/button';
|
|
16
|
+
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
17
|
+
|
|
18
|
+
/** Pattern that interval strings have to match. */
|
|
19
|
+
const INTERVAL_PATTERN = /^(\d*\.?\d+)\s*(h|hour|hours|m|min|minute|minutes|s|second|seconds)?$/i;
|
|
20
|
+
/**
|
|
21
|
+
* Injection token that can be used to configure the default options for the timepicker component.
|
|
22
|
+
*/
|
|
23
|
+
const MAT_TIMEPICKER_CONFIG = new InjectionToken('MAT_TIMEPICKER_CONFIG');
|
|
24
|
+
/** Parses an interval value into seconds. */
|
|
25
|
+
function parseInterval(value) {
|
|
26
|
+
let result;
|
|
27
|
+
if (value === null) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
else if (typeof value === 'number') {
|
|
31
|
+
result = value;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
if (value.trim().length === 0) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const parsed = value.match(INTERVAL_PATTERN);
|
|
38
|
+
const amount = parsed ? parseFloat(parsed[1]) : null;
|
|
39
|
+
const unit = parsed?.[2]?.toLowerCase() || null;
|
|
40
|
+
if (!parsed || amount === null || isNaN(amount)) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
if (unit === 'h' || unit === 'hour' || unit === 'hours') {
|
|
44
|
+
result = amount * 3600;
|
|
45
|
+
}
|
|
46
|
+
else if (unit === 'm' || unit === 'min' || unit === 'minute' || unit === 'minutes') {
|
|
47
|
+
result = amount * 60;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
result = amount;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Generates the options to show in a timepicker.
|
|
57
|
+
* @param adapter Date adapter to be used to generate the options.
|
|
58
|
+
* @param formats Formatting config to use when displaying the options.
|
|
59
|
+
* @param min Time from which to start generating the options.
|
|
60
|
+
* @param max Time at which to stop generating the options.
|
|
61
|
+
* @param interval Amount of seconds between each option.
|
|
62
|
+
*/
|
|
63
|
+
function generateOptions(adapter, formats, min, max, interval) {
|
|
64
|
+
const options = [];
|
|
65
|
+
let current = adapter.compareTime(min, max) < 1 ? min : max;
|
|
66
|
+
while (adapter.sameDate(current, min) &&
|
|
67
|
+
adapter.compareTime(current, max) < 1 &&
|
|
68
|
+
adapter.isValid(current)) {
|
|
69
|
+
options.push({ value: current, label: adapter.format(current, formats.display.timeOptionLabel) });
|
|
70
|
+
current = adapter.addSeconds(current, interval);
|
|
71
|
+
}
|
|
72
|
+
return options;
|
|
73
|
+
}
|
|
74
|
+
/** Checks whether a date adapter is set up correctly for use with the timepicker. */
|
|
75
|
+
function validateAdapter(adapter, formats) {
|
|
76
|
+
function missingAdapterError(provider) {
|
|
77
|
+
return Error(`MatTimepicker: No provider found for ${provider}. You must add one of the following ` +
|
|
78
|
+
`to your app config: provideNativeDateAdapter, provideDateFnsAdapter, ` +
|
|
79
|
+
`provideLuxonDateAdapter, provideMomentDateAdapter, or provide a custom implementation.`);
|
|
80
|
+
}
|
|
81
|
+
if (!adapter) {
|
|
82
|
+
throw missingAdapterError('DateAdapter');
|
|
83
|
+
}
|
|
84
|
+
if (!formats) {
|
|
85
|
+
throw missingAdapterError('MAT_DATE_FORMATS');
|
|
86
|
+
}
|
|
87
|
+
if (formats.display.timeInput === undefined ||
|
|
88
|
+
formats.display.timeOptionLabel === undefined ||
|
|
89
|
+
formats.parse.timeInput === undefined) {
|
|
90
|
+
throw new Error('MatTimepicker: Incomplete `MAT_DATE_FORMATS` has been provided. ' +
|
|
91
|
+
'`MAT_DATE_FORMATS` must provide `display.timeInput`, `display.timeOptionLabel` ' +
|
|
92
|
+
'and `parse.timeInput` formats in order to be compatible with MatTimepicker.');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Counter used to generate unique IDs. */
|
|
97
|
+
let uniqueId = 0;
|
|
98
|
+
/**
|
|
99
|
+
* Renders out a listbox that can be used to select a time of day.
|
|
100
|
+
* Intended to be used together with `MatTimepickerInput`.
|
|
101
|
+
*/
|
|
102
|
+
class MatTimepicker {
|
|
103
|
+
constructor() {
|
|
104
|
+
this._overlay = inject(Overlay);
|
|
105
|
+
this._dir = inject(Directionality, { optional: true });
|
|
106
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
107
|
+
this._injector = inject(Injector);
|
|
108
|
+
this._defaultConfig = inject(MAT_TIMEPICKER_CONFIG, { optional: true });
|
|
109
|
+
this._dateAdapter = inject(DateAdapter, { optional: true });
|
|
110
|
+
this._dateFormats = inject(MAT_DATE_FORMATS, { optional: true });
|
|
111
|
+
this._isOpen = signal(false);
|
|
112
|
+
this._activeDescendant = signal(null);
|
|
113
|
+
this._overlayRef = null;
|
|
114
|
+
this._portal = null;
|
|
115
|
+
this._optionsCacheKey = null;
|
|
116
|
+
this._onOpenRender = null;
|
|
117
|
+
this._panelTemplate = viewChild.required('panelTemplate');
|
|
118
|
+
this._timeOptions = [];
|
|
119
|
+
this._options = viewChildren(MatOption);
|
|
120
|
+
this._keyManager = new ActiveDescendantKeyManager(this._options, this._injector)
|
|
121
|
+
.withHomeAndEnd(true)
|
|
122
|
+
.withPageUpDown(true)
|
|
123
|
+
.withVerticalOrientation(true);
|
|
124
|
+
/**
|
|
125
|
+
* Interval between each option in the timepicker. The value can either be an amount of
|
|
126
|
+
* seconds (e.g. 90) or a number with a unit (e.g. 45m). Supported units are `s` for seconds,
|
|
127
|
+
* `m` for minutes or `h` for hours.
|
|
128
|
+
*/
|
|
129
|
+
this.interval = input(parseInterval(this._defaultConfig?.interval || null), { transform: parseInterval });
|
|
130
|
+
/**
|
|
131
|
+
* Array of pre-defined options that the user can select from, as an alternative to using the
|
|
132
|
+
* `interval` input. An error will be thrown if both `options` and `interval` are specified.
|
|
133
|
+
*/
|
|
134
|
+
this.options = input(null);
|
|
135
|
+
/** Whether the timepicker is open. */
|
|
136
|
+
this.isOpen = this._isOpen.asReadonly();
|
|
137
|
+
/** Emits when the user selects a time. */
|
|
138
|
+
this.selected = output();
|
|
139
|
+
/** Emits when the timepicker is opened. */
|
|
140
|
+
this.opened = output();
|
|
141
|
+
/** Emits when the timepicker is closed. */
|
|
142
|
+
this.closed = output();
|
|
143
|
+
/** ID of the active descendant option. */
|
|
144
|
+
this.activeDescendant = this._activeDescendant.asReadonly();
|
|
145
|
+
/** Unique ID of the timepicker's panel */
|
|
146
|
+
this.panelId = `mat-timepicker-panel-${uniqueId++}`;
|
|
147
|
+
/** Whether ripples within the timepicker should be disabled. */
|
|
148
|
+
this.disableRipple = input(this._defaultConfig?.disableRipple ?? false, {
|
|
149
|
+
transform: booleanAttribute,
|
|
150
|
+
});
|
|
151
|
+
/** ARIA label for the timepicker panel. */
|
|
152
|
+
this.ariaLabel = input(null, {
|
|
153
|
+
alias: 'aria-label',
|
|
154
|
+
});
|
|
155
|
+
/** ID of the label element for the timepicker panel. */
|
|
156
|
+
this.ariaLabelledby = input(null, {
|
|
157
|
+
alias: 'aria-labelledby',
|
|
158
|
+
});
|
|
159
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
160
|
+
validateAdapter(this._dateAdapter, this._dateFormats);
|
|
161
|
+
effect(() => {
|
|
162
|
+
const options = this.options();
|
|
163
|
+
const interval = this.interval();
|
|
164
|
+
if (options !== null && interval !== null) {
|
|
165
|
+
throw new Error('Cannot specify both the `options` and `interval` inputs at the same time');
|
|
166
|
+
}
|
|
167
|
+
else if (options?.length === 0) {
|
|
168
|
+
throw new Error('Value of `options` input cannot be an empty array');
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
// Since the panel ID is static, we can set it once without having to maintain a host binding.
|
|
173
|
+
const element = inject(ElementRef);
|
|
174
|
+
element.nativeElement.setAttribute('mat-timepicker-panel-id', this.panelId);
|
|
175
|
+
this._handleLocaleChanges();
|
|
176
|
+
this._handleInputStateChanges();
|
|
177
|
+
this._keyManager.change.subscribe(() => this._activeDescendant.set(this._keyManager.activeItem?.id || null));
|
|
178
|
+
}
|
|
179
|
+
/** Opens the timepicker. */
|
|
180
|
+
open() {
|
|
181
|
+
if (!this._input) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
// Focus should already be on the input, but this call is in case the timepicker is opened
|
|
185
|
+
// programmatically. We need to call this even if the timepicker is already open, because
|
|
186
|
+
// the user might be clicking the toggle.
|
|
187
|
+
this._input.focus();
|
|
188
|
+
if (this._isOpen()) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
this._isOpen.set(true);
|
|
192
|
+
this._generateOptions();
|
|
193
|
+
const overlayRef = this._getOverlayRef();
|
|
194
|
+
overlayRef.updateSize({ width: this._input.getOverlayOrigin().nativeElement.offsetWidth });
|
|
195
|
+
this._portal ??= new TemplatePortal(this._panelTemplate(), this._viewContainerRef);
|
|
196
|
+
overlayRef.attach(this._portal);
|
|
197
|
+
this._onOpenRender?.destroy();
|
|
198
|
+
this._onOpenRender = afterNextRender(() => {
|
|
199
|
+
const options = this._options();
|
|
200
|
+
this._syncSelectedState(this._input.value(), options, options[0]);
|
|
201
|
+
this._onOpenRender = null;
|
|
202
|
+
}, { injector: this._injector });
|
|
203
|
+
this.opened.emit();
|
|
204
|
+
}
|
|
205
|
+
/** Closes the timepicker. */
|
|
206
|
+
close() {
|
|
207
|
+
if (this._isOpen()) {
|
|
208
|
+
this._isOpen.set(false);
|
|
209
|
+
this._overlayRef?.detach();
|
|
210
|
+
this.closed.emit();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/** Registers an input with the timepicker. */
|
|
214
|
+
registerInput(input) {
|
|
215
|
+
if (this._input && input !== this._input && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
216
|
+
throw new Error('MatTimepicker can only be registered with one input at a time');
|
|
217
|
+
}
|
|
218
|
+
this._input = input;
|
|
219
|
+
}
|
|
220
|
+
ngOnDestroy() {
|
|
221
|
+
this._keyManager.destroy();
|
|
222
|
+
this._localeChanges.unsubscribe();
|
|
223
|
+
this._onOpenRender?.destroy();
|
|
224
|
+
this._overlayRef?.dispose();
|
|
225
|
+
}
|
|
226
|
+
/** Selects a specific time value. */
|
|
227
|
+
_selectValue(value) {
|
|
228
|
+
this.close();
|
|
229
|
+
this.selected.emit({ value, source: this });
|
|
230
|
+
this._input.focus();
|
|
231
|
+
}
|
|
232
|
+
/** Gets the value of the `aria-labelledby` attribute. */
|
|
233
|
+
_getAriaLabelledby() {
|
|
234
|
+
if (this.ariaLabel()) {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
return this.ariaLabelledby() || this._input?._getLabelId() || null;
|
|
238
|
+
}
|
|
239
|
+
/** Creates an overlay reference for the timepicker panel. */
|
|
240
|
+
_getOverlayRef() {
|
|
241
|
+
if (this._overlayRef) {
|
|
242
|
+
return this._overlayRef;
|
|
243
|
+
}
|
|
244
|
+
const positionStrategy = this._overlay
|
|
245
|
+
.position()
|
|
246
|
+
.flexibleConnectedTo(this._input.getOverlayOrigin())
|
|
247
|
+
.withFlexibleDimensions(false)
|
|
248
|
+
.withPush(false)
|
|
249
|
+
.withTransformOriginOn('.mat-timepicker-panel')
|
|
250
|
+
.withPositions([
|
|
251
|
+
{
|
|
252
|
+
originX: 'start',
|
|
253
|
+
originY: 'bottom',
|
|
254
|
+
overlayX: 'start',
|
|
255
|
+
overlayY: 'top',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
originX: 'start',
|
|
259
|
+
originY: 'top',
|
|
260
|
+
overlayX: 'start',
|
|
261
|
+
overlayY: 'bottom',
|
|
262
|
+
panelClass: 'mat-timepicker-above',
|
|
263
|
+
},
|
|
264
|
+
]);
|
|
265
|
+
this._overlayRef = this._overlay.create({
|
|
266
|
+
positionStrategy,
|
|
267
|
+
scrollStrategy: this._overlay.scrollStrategies.reposition(),
|
|
268
|
+
direction: this._dir || 'ltr',
|
|
269
|
+
hasBackdrop: false,
|
|
270
|
+
});
|
|
271
|
+
this._overlayRef.keydownEvents().subscribe(event => {
|
|
272
|
+
this._handleKeydown(event);
|
|
273
|
+
});
|
|
274
|
+
this._overlayRef.outsidePointerEvents().subscribe(event => {
|
|
275
|
+
const target = _getEventTarget(event);
|
|
276
|
+
const origin = this._input.getOverlayOrigin().nativeElement;
|
|
277
|
+
if (target && target !== origin && !origin.contains(target)) {
|
|
278
|
+
this.close();
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
return this._overlayRef;
|
|
282
|
+
}
|
|
283
|
+
/** Generates the list of options from which the user can select.. */
|
|
284
|
+
_generateOptions() {
|
|
285
|
+
// Default the interval to 30 minutes.
|
|
286
|
+
const interval = this.interval() ?? 30 * 60;
|
|
287
|
+
const options = this.options();
|
|
288
|
+
if (options !== null) {
|
|
289
|
+
this._timeOptions = options;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
const adapter = this._dateAdapter;
|
|
293
|
+
const timeFormat = this._dateFormats.display.timeInput;
|
|
294
|
+
const min = this._input.min() || adapter.setTime(adapter.today(), 0, 0, 0);
|
|
295
|
+
const max = this._input.max() || adapter.setTime(adapter.today(), 23, 59, 0);
|
|
296
|
+
const cacheKey = interval + '/' + adapter.format(min, timeFormat) + '/' + adapter.format(max, timeFormat);
|
|
297
|
+
// Don't re-generate the options if the inputs haven't changed.
|
|
298
|
+
if (cacheKey !== this._optionsCacheKey) {
|
|
299
|
+
this._optionsCacheKey = cacheKey;
|
|
300
|
+
this._timeOptions = generateOptions(adapter, this._dateFormats, min, max, interval);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Synchronizes the internal state of the component based on a specific selected date.
|
|
306
|
+
* @param value Currently selected date.
|
|
307
|
+
* @param options Options rendered out in the timepicker.
|
|
308
|
+
* @param fallback Option to set as active if no option is selected.
|
|
309
|
+
*/
|
|
310
|
+
_syncSelectedState(value, options, fallback) {
|
|
311
|
+
let hasSelected = false;
|
|
312
|
+
for (const option of options) {
|
|
313
|
+
if (value && this._dateAdapter.sameTime(option.value, value)) {
|
|
314
|
+
option.select(false);
|
|
315
|
+
scrollOptionIntoView(option, 'center');
|
|
316
|
+
untracked(() => this._keyManager.setActiveItem(option));
|
|
317
|
+
hasSelected = true;
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
option.deselect(false);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
// If no option was selected, we need to reset the key manager since
|
|
324
|
+
// it might be holding onto an option that no longer exists.
|
|
325
|
+
if (!hasSelected) {
|
|
326
|
+
if (fallback) {
|
|
327
|
+
untracked(() => this._keyManager.setActiveItem(fallback));
|
|
328
|
+
scrollOptionIntoView(fallback, 'center');
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
untracked(() => this._keyManager.setActiveItem(-1));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/** Handles keyboard events while the overlay is open. */
|
|
336
|
+
_handleKeydown(event) {
|
|
337
|
+
const keyCode = event.keyCode;
|
|
338
|
+
if (keyCode === TAB) {
|
|
339
|
+
this.close();
|
|
340
|
+
}
|
|
341
|
+
else if (keyCode === ESCAPE && !hasModifierKey(event)) {
|
|
342
|
+
event.preventDefault();
|
|
343
|
+
this.close();
|
|
344
|
+
}
|
|
345
|
+
else if (keyCode === ENTER) {
|
|
346
|
+
event.preventDefault();
|
|
347
|
+
if (this._keyManager.activeItem) {
|
|
348
|
+
this._selectValue(this._keyManager.activeItem.value);
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
this.close();
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
const previousActive = this._keyManager.activeItem;
|
|
356
|
+
this._keyManager.onKeydown(event);
|
|
357
|
+
const currentActive = this._keyManager.activeItem;
|
|
358
|
+
if (currentActive && currentActive !== previousActive) {
|
|
359
|
+
scrollOptionIntoView(currentActive, 'nearest');
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
/** Sets up the logic that updates the timepicker when the locale changes. */
|
|
364
|
+
_handleLocaleChanges() {
|
|
365
|
+
// Re-generate the options list if the locale changes.
|
|
366
|
+
this._localeChanges = this._dateAdapter.localeChanges.subscribe(() => {
|
|
367
|
+
this._optionsCacheKey = null;
|
|
368
|
+
if (this.isOpen()) {
|
|
369
|
+
this._generateOptions();
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Sets up the logic that updates the timepicker when the state of the connected input changes.
|
|
375
|
+
*/
|
|
376
|
+
_handleInputStateChanges() {
|
|
377
|
+
effect(() => {
|
|
378
|
+
const value = this._input?.value();
|
|
379
|
+
const options = this._options();
|
|
380
|
+
if (this._isOpen()) {
|
|
381
|
+
this._syncSelectedState(value, options, null);
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
386
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.10", type: MatTimepicker, isStandalone: true, selector: "mat-timepicker", inputs: { interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected", opened: "opened", closed: "closed" }, providers: [
|
|
387
|
+
{
|
|
388
|
+
provide: MAT_OPTION_PARENT_COMPONENT,
|
|
389
|
+
useExisting: MatTimepicker,
|
|
390
|
+
},
|
|
391
|
+
], viewQueries: [{ propertyName: "_panelTemplate", first: true, predicate: ["panelTemplate"], descendants: true, isSignal: true }, { propertyName: "_options", predicate: MatOption, descendants: true, isSignal: true }], exportAs: ["matTimepicker"], ngImport: i0, template: "<ng-template #panelTemplate>\n <div\n role=\"listbox\"\n class=\"mat-timepicker-panel\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"_getAriaLabelledby()\"\n [id]=\"panelId\"\n @panel>\n @for (option of _timeOptions; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"_selectValue(option.value)\">{{option.label}}</mat-option>\n }\n </div>\n</ng-template>\n", styles: ["mat-timepicker{display:none}.mat-timepicker-panel{width:100%;max-height:256px;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;border-bottom-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-timepicker-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-timepicker-container-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){.mat-timepicker-panel{outline:solid 1px}}.mat-timepicker-above .mat-timepicker-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small))}.mat-timepicker-input:read-only{cursor:pointer}@media(forced-colors: active){.mat-timepicker-toggle-default-icon{color:CanvasText}}"], dependencies: [{ kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], animations: [
|
|
392
|
+
trigger('panel', [
|
|
393
|
+
state('void', style({ opacity: 0, transform: 'scaleY(0.8)' })),
|
|
394
|
+
transition(':enter', [
|
|
395
|
+
group([
|
|
396
|
+
animate('0.03s linear', style({ opacity: 1 })),
|
|
397
|
+
animate('0.12s cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scaleY(1)' })),
|
|
398
|
+
]),
|
|
399
|
+
]),
|
|
400
|
+
transition(':leave', [animate('0.075s linear', style({ opacity: 0 }))]),
|
|
401
|
+
]),
|
|
402
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
403
|
+
}
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepicker, decorators: [{
|
|
405
|
+
type: Component,
|
|
406
|
+
args: [{ selector: 'mat-timepicker', exportAs: 'matTimepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [MatOption], providers: [
|
|
407
|
+
{
|
|
408
|
+
provide: MAT_OPTION_PARENT_COMPONENT,
|
|
409
|
+
useExisting: MatTimepicker,
|
|
410
|
+
},
|
|
411
|
+
], animations: [
|
|
412
|
+
trigger('panel', [
|
|
413
|
+
state('void', style({ opacity: 0, transform: 'scaleY(0.8)' })),
|
|
414
|
+
transition(':enter', [
|
|
415
|
+
group([
|
|
416
|
+
animate('0.03s linear', style({ opacity: 1 })),
|
|
417
|
+
animate('0.12s cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scaleY(1)' })),
|
|
418
|
+
]),
|
|
419
|
+
]),
|
|
420
|
+
transition(':leave', [animate('0.075s linear', style({ opacity: 0 }))]),
|
|
421
|
+
]),
|
|
422
|
+
], template: "<ng-template #panelTemplate>\n <div\n role=\"listbox\"\n class=\"mat-timepicker-panel\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"_getAriaLabelledby()\"\n [id]=\"panelId\"\n @panel>\n @for (option of _timeOptions; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"_selectValue(option.value)\">{{option.label}}</mat-option>\n }\n </div>\n</ng-template>\n", styles: ["mat-timepicker{display:none}.mat-timepicker-panel{width:100%;max-height:256px;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;border-bottom-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-timepicker-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-timepicker-container-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){.mat-timepicker-panel{outline:solid 1px}}.mat-timepicker-above .mat-timepicker-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small))}.mat-timepicker-input:read-only{cursor:pointer}@media(forced-colors: active){.mat-timepicker-toggle-default-icon{color:CanvasText}}"] }]
|
|
423
|
+
}], ctorParameters: () => [] });
|
|
424
|
+
/**
|
|
425
|
+
* Scrolls an option into view.
|
|
426
|
+
* @param option Option to be scrolled into view.
|
|
427
|
+
* @param position Position to which to align the option relative to the scrollable container.
|
|
428
|
+
*/
|
|
429
|
+
function scrollOptionIntoView(option, position) {
|
|
430
|
+
option._getHostElement().scrollIntoView({ block: position, inline: position });
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Input that can be used to enter time and connect to a `mat-timepicker`.
|
|
435
|
+
*/
|
|
436
|
+
class MatTimepickerInput {
|
|
437
|
+
constructor() {
|
|
438
|
+
this._elementRef = inject(ElementRef);
|
|
439
|
+
this._document = inject(DOCUMENT);
|
|
440
|
+
this._dateAdapter = inject(DateAdapter, { optional: true });
|
|
441
|
+
this._dateFormats = inject(MAT_DATE_FORMATS, { optional: true });
|
|
442
|
+
this._formField = inject(MAT_FORM_FIELD, { optional: true });
|
|
443
|
+
this._accessorDisabled = signal(false);
|
|
444
|
+
this._lastValueValid = false;
|
|
445
|
+
this._lastValidDate = null;
|
|
446
|
+
/** Value of the `aria-activedescendant` attribute. */
|
|
447
|
+
this._ariaActiveDescendant = computed(() => {
|
|
448
|
+
const timepicker = this.timepicker();
|
|
449
|
+
const isOpen = timepicker.isOpen();
|
|
450
|
+
const activeDescendant = timepicker.activeDescendant();
|
|
451
|
+
return isOpen && activeDescendant ? activeDescendant : null;
|
|
452
|
+
});
|
|
453
|
+
/** Value of the `aria-expanded` attribute. */
|
|
454
|
+
this._ariaExpanded = computed(() => this.timepicker().isOpen() + '');
|
|
455
|
+
/** Value of the `aria-controls` attribute. */
|
|
456
|
+
this._ariaControls = computed(() => {
|
|
457
|
+
const timepicker = this.timepicker();
|
|
458
|
+
return timepicker.isOpen() ? timepicker.panelId : null;
|
|
459
|
+
});
|
|
460
|
+
/** Current value of the input. */
|
|
461
|
+
this.value = model(null);
|
|
462
|
+
/** Timepicker that the input is associated with. */
|
|
463
|
+
this.timepicker = input.required({
|
|
464
|
+
alias: 'matTimepicker',
|
|
465
|
+
});
|
|
466
|
+
/**
|
|
467
|
+
* Minimum time that can be selected or typed in. Can be either
|
|
468
|
+
* a date object (only time will be used) or a valid time string.
|
|
469
|
+
*/
|
|
470
|
+
this.min = input(null, {
|
|
471
|
+
alias: 'matTimepickerMin',
|
|
472
|
+
transform: (value) => this._transformDateInput(value),
|
|
473
|
+
});
|
|
474
|
+
/**
|
|
475
|
+
* Maximum time that can be selected or typed in. Can be either
|
|
476
|
+
* a date object (only time will be used) or a valid time string.
|
|
477
|
+
*/
|
|
478
|
+
this.max = input(null, {
|
|
479
|
+
alias: 'matTimepickerMax',
|
|
480
|
+
transform: (value) => this._transformDateInput(value),
|
|
481
|
+
});
|
|
482
|
+
/** Whether the input is disabled. */
|
|
483
|
+
this.disabled = computed(() => this.disabledInput() || this._accessorDisabled());
|
|
484
|
+
/** Whether the input should be disabled through the template. */
|
|
485
|
+
this.disabledInput = input(false, {
|
|
486
|
+
transform: booleanAttribute,
|
|
487
|
+
alias: 'disabled',
|
|
488
|
+
});
|
|
489
|
+
/** Handles clicks on the input or the containing form field. */
|
|
490
|
+
this._handleClick = () => {
|
|
491
|
+
this.timepicker().open();
|
|
492
|
+
};
|
|
493
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
494
|
+
validateAdapter(this._dateAdapter, this._dateFormats);
|
|
495
|
+
}
|
|
496
|
+
this._validator = this._getValidator();
|
|
497
|
+
this._respondToValueChanges();
|
|
498
|
+
this._respondToMinMaxChanges();
|
|
499
|
+
this._registerTimepicker();
|
|
500
|
+
this._localeSubscription = this._dateAdapter.localeChanges.subscribe(() => {
|
|
501
|
+
if (!this._hasFocus()) {
|
|
502
|
+
this._formatValue(this.value());
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
// Bind the click listener manually to the overlay origin, because we want the entire
|
|
506
|
+
// form field to be clickable, if the timepicker is used in `mat-form-field`.
|
|
507
|
+
this.getOverlayOrigin().nativeElement.addEventListener('click', this._handleClick);
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Implemented as a part of `ControlValueAccessor`.
|
|
511
|
+
* @docs-private
|
|
512
|
+
*/
|
|
513
|
+
writeValue(value) {
|
|
514
|
+
this.value.set(this._dateAdapter.getValidDateOrNull(value));
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Implemented as a part of `ControlValueAccessor`.
|
|
518
|
+
* @docs-private
|
|
519
|
+
*/
|
|
520
|
+
registerOnChange(fn) {
|
|
521
|
+
this._onChange = fn;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Implemented as a part of `ControlValueAccessor`.
|
|
525
|
+
* @docs-private
|
|
526
|
+
*/
|
|
527
|
+
registerOnTouched(fn) {
|
|
528
|
+
this._onTouched = fn;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Implemented as a part of `ControlValueAccessor`.
|
|
532
|
+
* @docs-private
|
|
533
|
+
*/
|
|
534
|
+
setDisabledState(isDisabled) {
|
|
535
|
+
this._accessorDisabled.set(isDisabled);
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Implemented as a part of `Validator`.
|
|
539
|
+
* @docs-private
|
|
540
|
+
*/
|
|
541
|
+
validate(control) {
|
|
542
|
+
return this._validator(control);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Implemented as a part of `Validator`.
|
|
546
|
+
* @docs-private
|
|
547
|
+
*/
|
|
548
|
+
registerOnValidatorChange(fn) {
|
|
549
|
+
this._validatorOnChange = fn;
|
|
550
|
+
}
|
|
551
|
+
/** Gets the element to which the timepicker popup should be attached. */
|
|
552
|
+
getOverlayOrigin() {
|
|
553
|
+
return this._formField?.getConnectedOverlayOrigin() || this._elementRef;
|
|
554
|
+
}
|
|
555
|
+
/** Focuses the input. */
|
|
556
|
+
focus() {
|
|
557
|
+
this._elementRef.nativeElement.focus();
|
|
558
|
+
}
|
|
559
|
+
ngOnDestroy() {
|
|
560
|
+
this.getOverlayOrigin().nativeElement.removeEventListener('click', this._handleClick);
|
|
561
|
+
this._timepickerSubscription?.unsubscribe();
|
|
562
|
+
this._localeSubscription.unsubscribe();
|
|
563
|
+
}
|
|
564
|
+
/** Gets the ID of the input's label. */
|
|
565
|
+
_getLabelId() {
|
|
566
|
+
return this._formField?.getLabelId() || null;
|
|
567
|
+
}
|
|
568
|
+
/** Handles the `input` event. */
|
|
569
|
+
_handleInput(value) {
|
|
570
|
+
const currentValue = this.value();
|
|
571
|
+
const date = this._dateAdapter.parseTime(value, this._dateFormats.parse.timeInput);
|
|
572
|
+
const hasChanged = !this._dateAdapter.sameTime(date, currentValue);
|
|
573
|
+
if (!date || hasChanged || !!(value && !currentValue)) {
|
|
574
|
+
// We need to fire the CVA change event for all nulls, otherwise the validators won't run.
|
|
575
|
+
this._assignUserSelection(date, true);
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
// Call the validator even if the value hasn't changed since
|
|
579
|
+
// some fields change depending on what the user has entered.
|
|
580
|
+
this._validatorOnChange?.();
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
/** Handles the `blur` event. */
|
|
584
|
+
_handleBlur() {
|
|
585
|
+
const value = this.value();
|
|
586
|
+
// Only reformat on blur so the value doesn't change while the user is interacting.
|
|
587
|
+
if (value && this._isValid(value)) {
|
|
588
|
+
this._formatValue(value);
|
|
589
|
+
}
|
|
590
|
+
this._onTouched?.();
|
|
591
|
+
}
|
|
592
|
+
/** Handles the `keydown` event. */
|
|
593
|
+
_handleKeydown(event) {
|
|
594
|
+
// All keyboard events while open are handled through the timepicker.
|
|
595
|
+
if (this.timepicker().isOpen()) {
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
if (event.keyCode === ESCAPE && !hasModifierKey(event) && this.value() !== null) {
|
|
599
|
+
event.preventDefault();
|
|
600
|
+
this.value.set(null);
|
|
601
|
+
this._formatValue(null);
|
|
602
|
+
}
|
|
603
|
+
else if ((event.keyCode === DOWN_ARROW || event.keyCode === UP_ARROW) && !this.disabled()) {
|
|
604
|
+
event.preventDefault();
|
|
605
|
+
this.timepicker().open();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
/** Sets up the code that watches for changes in the value and adjusts the input. */
|
|
609
|
+
_respondToValueChanges() {
|
|
610
|
+
effect(() => {
|
|
611
|
+
const value = this._dateAdapter.deserialize(this.value());
|
|
612
|
+
const wasValid = this._lastValueValid;
|
|
613
|
+
this._lastValueValid = this._isValid(value);
|
|
614
|
+
// Reformat the value if it changes while the user isn't interacting.
|
|
615
|
+
if (!this._hasFocus()) {
|
|
616
|
+
this._formatValue(value);
|
|
617
|
+
}
|
|
618
|
+
if (value && this._lastValueValid) {
|
|
619
|
+
this._lastValidDate = value;
|
|
620
|
+
}
|
|
621
|
+
// Trigger the validator if the state changed.
|
|
622
|
+
if (wasValid !== this._lastValueValid) {
|
|
623
|
+
this._validatorOnChange?.();
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
/** Sets up the logic that registers the input with the timepicker. */
|
|
628
|
+
_registerTimepicker() {
|
|
629
|
+
effect(() => {
|
|
630
|
+
const timepicker = this.timepicker();
|
|
631
|
+
timepicker.registerInput(this);
|
|
632
|
+
timepicker.closed.subscribe(() => this._onTouched?.());
|
|
633
|
+
timepicker.selected.subscribe(({ value }) => {
|
|
634
|
+
if (!this._dateAdapter.sameTime(value, this.value())) {
|
|
635
|
+
this._assignUserSelection(value, true);
|
|
636
|
+
this._formatValue(value);
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
/** Sets up the logic that adjusts the input if the min/max changes. */
|
|
642
|
+
_respondToMinMaxChanges() {
|
|
643
|
+
effect(() => {
|
|
644
|
+
// Read the min/max so the effect knows when to fire.
|
|
645
|
+
this.min();
|
|
646
|
+
this.max();
|
|
647
|
+
this._validatorOnChange?.();
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Assigns a value set by the user to the input's model.
|
|
652
|
+
* @param selection Time selected by the user that should be assigned.
|
|
653
|
+
* @param propagateToAccessor Whether the value should be propagated to the ControlValueAccessor.
|
|
654
|
+
*/
|
|
655
|
+
_assignUserSelection(selection, propagateToAccessor) {
|
|
656
|
+
if (selection == null || !this._isValid(selection)) {
|
|
657
|
+
this.value.set(selection);
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
// If a datepicker and timepicker are writing to the same object and the user enters an
|
|
661
|
+
// invalid time into the timepicker, we may end up clearing their selection from the
|
|
662
|
+
// datepicker. If the user enters a valid time afterwards, the datepicker's selection will
|
|
663
|
+
// have been lost. This logic restores the previously-valid date and sets its time to
|
|
664
|
+
// the newly-selected time.
|
|
665
|
+
const adapter = this._dateAdapter;
|
|
666
|
+
const target = adapter.getValidDateOrNull(this._lastValidDate || this.value());
|
|
667
|
+
const hours = adapter.getHours(selection);
|
|
668
|
+
const minutes = adapter.getMinutes(selection);
|
|
669
|
+
const seconds = adapter.getSeconds(selection);
|
|
670
|
+
this.value.set(target ? adapter.setTime(target, hours, minutes, seconds) : selection);
|
|
671
|
+
}
|
|
672
|
+
if (propagateToAccessor) {
|
|
673
|
+
this._onChange?.(this.value());
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
/** Formats the current value and assigns it to the input. */
|
|
677
|
+
_formatValue(value) {
|
|
678
|
+
value = this._dateAdapter.getValidDateOrNull(value);
|
|
679
|
+
this._elementRef.nativeElement.value =
|
|
680
|
+
value == null ? '' : this._dateAdapter.format(value, this._dateFormats.display.timeInput);
|
|
681
|
+
}
|
|
682
|
+
/** Checks whether a value is valid. */
|
|
683
|
+
_isValid(value) {
|
|
684
|
+
return !value || this._dateAdapter.isValid(value);
|
|
685
|
+
}
|
|
686
|
+
/** Transforms an arbitrary value into a value that can be assigned to a date-based input. */
|
|
687
|
+
_transformDateInput(value) {
|
|
688
|
+
const date = typeof value === 'string'
|
|
689
|
+
? this._dateAdapter.parseTime(value, this._dateFormats.parse.timeInput)
|
|
690
|
+
: this._dateAdapter.deserialize(value);
|
|
691
|
+
return date && this._dateAdapter.isValid(date) ? date : null;
|
|
692
|
+
}
|
|
693
|
+
/** Whether the input is currently focused. */
|
|
694
|
+
_hasFocus() {
|
|
695
|
+
return this._document.activeElement === this._elementRef.nativeElement;
|
|
696
|
+
}
|
|
697
|
+
/** Gets a function that can be used to validate the input. */
|
|
698
|
+
_getValidator() {
|
|
699
|
+
return Validators.compose([
|
|
700
|
+
() => this._lastValueValid
|
|
701
|
+
? null
|
|
702
|
+
: { 'matTimepickerParse': { 'text': this._elementRef.nativeElement.value } },
|
|
703
|
+
control => {
|
|
704
|
+
const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
|
|
705
|
+
const min = this.min();
|
|
706
|
+
return !min || !controlValue || this._dateAdapter.compareTime(min, controlValue) <= 0
|
|
707
|
+
? null
|
|
708
|
+
: { 'matTimepickerMin': { 'min': min, 'actual': controlValue } };
|
|
709
|
+
},
|
|
710
|
+
control => {
|
|
711
|
+
const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
|
|
712
|
+
const max = this.max();
|
|
713
|
+
return !max || !controlValue || this._dateAdapter.compareTime(max, controlValue) >= 0
|
|
714
|
+
? null
|
|
715
|
+
: { 'matTimepickerMax': { 'max': max, 'actual': controlValue } };
|
|
716
|
+
},
|
|
717
|
+
]);
|
|
718
|
+
}
|
|
719
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
720
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0-next.10", type: MatTimepickerInput, isStandalone: true, selector: "input[matTimepicker]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, timepicker: { classPropertyName: "timepicker", publicName: "matTimepicker", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "matTimepickerMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "matTimepickerMax", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "combobox", "type": "text", "aria-haspopup": "listbox" }, listeners: { "blur": "_handleBlur()", "input": "_handleInput($event.target.value)", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-activedescendant": "_ariaActiveDescendant()", "attr.aria-expanded": "_ariaExpanded()", "attr.aria-controls": "_ariaControls()", "attr.mat-timepicker-id": "timepicker()?.panelId", "disabled": "disabled()" }, classAttribute: "mat-timepicker-input" }, providers: [
|
|
721
|
+
{
|
|
722
|
+
provide: NG_VALUE_ACCESSOR,
|
|
723
|
+
useExisting: MatTimepickerInput,
|
|
724
|
+
multi: true,
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
provide: NG_VALIDATORS,
|
|
728
|
+
useExisting: MatTimepickerInput,
|
|
729
|
+
multi: true,
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
|
733
|
+
useExisting: MatTimepickerInput,
|
|
734
|
+
},
|
|
735
|
+
], exportAs: ["matTimepickerInput"], ngImport: i0 }); }
|
|
736
|
+
}
|
|
737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerInput, decorators: [{
|
|
738
|
+
type: Directive,
|
|
739
|
+
args: [{
|
|
740
|
+
selector: 'input[matTimepicker]',
|
|
741
|
+
exportAs: 'matTimepickerInput',
|
|
742
|
+
host: {
|
|
743
|
+
'class': 'mat-timepicker-input',
|
|
744
|
+
'role': 'combobox',
|
|
745
|
+
'type': 'text',
|
|
746
|
+
'aria-haspopup': 'listbox',
|
|
747
|
+
'[attr.aria-activedescendant]': '_ariaActiveDescendant()',
|
|
748
|
+
'[attr.aria-expanded]': '_ariaExpanded()',
|
|
749
|
+
'[attr.aria-controls]': '_ariaControls()',
|
|
750
|
+
'[attr.mat-timepicker-id]': 'timepicker()?.panelId',
|
|
751
|
+
'[disabled]': 'disabled()',
|
|
752
|
+
'(blur)': '_handleBlur()',
|
|
753
|
+
'(input)': '_handleInput($event.target.value)',
|
|
754
|
+
'(keydown)': '_handleKeydown($event)',
|
|
755
|
+
},
|
|
756
|
+
providers: [
|
|
757
|
+
{
|
|
758
|
+
provide: NG_VALUE_ACCESSOR,
|
|
759
|
+
useExisting: MatTimepickerInput,
|
|
760
|
+
multi: true,
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
provide: NG_VALIDATORS,
|
|
764
|
+
useExisting: MatTimepickerInput,
|
|
765
|
+
multi: true,
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
|
769
|
+
useExisting: MatTimepickerInput,
|
|
770
|
+
},
|
|
771
|
+
],
|
|
772
|
+
}]
|
|
773
|
+
}], ctorParameters: () => [] });
|
|
774
|
+
|
|
775
|
+
/** Button that can be used to open a `mat-timepicker`. */
|
|
776
|
+
class MatTimepickerToggle {
|
|
777
|
+
constructor() {
|
|
778
|
+
this._defaultConfig = inject(MAT_TIMEPICKER_CONFIG, { optional: true });
|
|
779
|
+
this._defaultTabIndex = (() => {
|
|
780
|
+
const value = inject(new HostAttributeToken('tabindex'), { optional: true });
|
|
781
|
+
const parsed = Number(value);
|
|
782
|
+
return isNaN(parsed) ? null : parsed;
|
|
783
|
+
})();
|
|
784
|
+
/** Timepicker instance that the button will toggle. */
|
|
785
|
+
this.timepicker = input.required({
|
|
786
|
+
alias: 'for',
|
|
787
|
+
});
|
|
788
|
+
/** Screen-reader label for the button. */
|
|
789
|
+
this.ariaLabel = input(undefined, {
|
|
790
|
+
alias: 'aria-label',
|
|
791
|
+
});
|
|
792
|
+
/** Whether the toggle button is disabled. */
|
|
793
|
+
this.disabled = input(false, {
|
|
794
|
+
transform: booleanAttribute,
|
|
795
|
+
alias: 'disabled',
|
|
796
|
+
});
|
|
797
|
+
/** Tabindex for the toggle. */
|
|
798
|
+
this.tabIndex = input(this._defaultTabIndex);
|
|
799
|
+
/** Whether ripples on the toggle should be disabled. */
|
|
800
|
+
this.disableRipple = input(this._defaultConfig?.disableRipple ?? false, { transform: booleanAttribute });
|
|
801
|
+
}
|
|
802
|
+
/** Opens the connected timepicker. */
|
|
803
|
+
_open(event) {
|
|
804
|
+
if (this.timepicker() && !this.disabled()) {
|
|
805
|
+
this.timepicker().open();
|
|
806
|
+
event.stopPropagation();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
810
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.0-next.10", type: MatTimepickerToggle, isStandalone: true, selector: "mat-timepicker-toggle", inputs: { timepicker: { classPropertyName: "timepicker", publicName: "for", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_open($event)" }, properties: { "attr.tabindex": "null" }, classAttribute: "mat-timepicker-toggle" }, exportAs: ["matTimepickerToggle"], ngImport: i0, template: "<button\n mat-icon-button\n type=\"button\"\n aria-haspopup=\"listbox\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"timepicker().isOpen()\"\n [attr.tabindex]=\"disabled() ? -1 : tabIndex()\"\n [disabled]=\"disabled()\"\n [disableRipple]=\"disableRipple()\">\n\n <ng-content select=\"[matTimepickerToggleIcon]\">\n <svg\n class=\"mat-timepicker-toggle-default-icon\"\n height=\"24px\"\n width=\"24px\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z\"/>\n </svg>\n </ng-content>\n</button>\n", dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
811
|
+
}
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerToggle, decorators: [{
|
|
813
|
+
type: Component,
|
|
814
|
+
args: [{ selector: 'mat-timepicker-toggle', host: {
|
|
815
|
+
'class': 'mat-timepicker-toggle',
|
|
816
|
+
'[attr.tabindex]': 'null',
|
|
817
|
+
// Bind the `click` on the host, rather than the inner `button`, so that we can call
|
|
818
|
+
// `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
|
|
819
|
+
// it so that the input doesn't get focused automatically by the form field (See #21836).
|
|
820
|
+
'(click)': '_open($event)',
|
|
821
|
+
}, exportAs: 'matTimepickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], template: "<button\n mat-icon-button\n type=\"button\"\n aria-haspopup=\"listbox\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"timepicker().isOpen()\"\n [attr.tabindex]=\"disabled() ? -1 : tabIndex()\"\n [disabled]=\"disabled()\"\n [disableRipple]=\"disableRipple()\">\n\n <ng-content select=\"[matTimepickerToggleIcon]\">\n <svg\n class=\"mat-timepicker-toggle-default-icon\"\n height=\"24px\"\n width=\"24px\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z\"/>\n </svg>\n </ng-content>\n</button>\n" }]
|
|
822
|
+
}] });
|
|
823
|
+
|
|
824
|
+
class MatTimepickerModule {
|
|
825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
826
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerModule, imports: [MatTimepicker, MatTimepickerInput, MatTimepickerToggle], exports: [CdkScrollableModule, MatTimepicker, MatTimepickerInput, MatTimepickerToggle] }); }
|
|
827
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerModule, imports: [MatTimepicker, MatTimepickerToggle, CdkScrollableModule] }); }
|
|
828
|
+
}
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatTimepickerModule, decorators: [{
|
|
830
|
+
type: NgModule,
|
|
831
|
+
args: [{
|
|
832
|
+
imports: [MatTimepicker, MatTimepickerInput, MatTimepickerToggle],
|
|
833
|
+
exports: [CdkScrollableModule, MatTimepicker, MatTimepickerInput, MatTimepickerToggle],
|
|
834
|
+
}]
|
|
835
|
+
}] });
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Generated bundle index. Do not edit.
|
|
839
|
+
*/
|
|
840
|
+
|
|
841
|
+
export { MAT_TIMEPICKER_CONFIG, MatTimepicker, MatTimepickerInput, MatTimepickerModule, MatTimepickerToggle };
|
|
842
|
+
//# sourceMappingURL=timepicker.mjs.map
|