_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
components/src/material/toolbar/public-api.ts_0_265
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './toolbar-module'; export * from './toolbar';
{ "end_byte": 265, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/public-api.ts" }
components/src/material/toolbar/toolbar.ts_0_3261
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Platform} from '@angular/cdk/platform'; import {DOCUMENT} from '@angular/common'; import { AfterViewInit, ...
{ "end_byte": 3261, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/toolbar.ts" }
components/src/material/toolbar/README.md_0_97
Please see the official documentation at https://material.angular.io/components/component/toolbar
{ "end_byte": 97, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/README.md" }
components/src/material/toolbar/toolbar.html_0_77
<ng-content></ng-content> <ng-content select="mat-toolbar-row"></ng-content>
{ "end_byte": 77, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/toolbar.html" }
components/src/material/toolbar/toolbar.spec.ts_0_4693
import {Component, signal} from '@angular/core'; import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; import {By} from '@angular/platform-browser'; import {MatToolbarModule} from './index'; describe('MatToolbar', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ ...
{ "end_byte": 4693, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/toolbar.spec.ts" }
components/src/material/toolbar/toolbar.scss_0_3896
@use '@angular/cdk'; @use '../core/tokens/token-utils'; @use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar; @use '../core/tokens/m2/mdc/text-button' as tokens-mdc-text-button; @use '../core/tokens/m2/mdc/outlined-button' as tokens-mdc-outlined-button; @use '../core/style/variables'; $row-padding: 16px !default...
{ "end_byte": 3896, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/toolbar.scss" }
components/src/material/toolbar/toolbar-module.ts_0_516
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {NgModule} from '@angular/core'; import {MatCommonModule} from '@angular/material/core'; import {MatToolbar, ...
{ "end_byte": 516, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/toolbar-module.ts" }
components/src/material/toolbar/BUILD.bazel_0_1415
load( "//tools:defaults.bzl", "extract_tokens", "markdown_to_html", "ng_module", "ng_test_library", "ng_web_test_suite", "sass_binary", "sass_library", ) package(default_visibility = ["//visibility:public"]) ng_module( name = "toolbar", srcs = glob( ["**/*.ts"], ...
{ "end_byte": 1415, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/BUILD.bazel" }
components/src/material/toolbar/index.ts_0_234
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './public-api';
{ "end_byte": 234, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/index.ts" }
components/src/material/toolbar/_toolbar-variables.scss_0_891
// Minimum height for toolbar's in the highest density is difficult to determine because // developers can project arbitrary content. We use a minimum value that ensures that most // common content (e.g. icon buttons) does not exceed the row boundaries in highest density. $minimum-height: 44px !default; $height-deskto...
{ "end_byte": 891, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/_toolbar-variables.scss" }
components/src/material/toolbar/testing/toolbar-harness.ts_0_1903
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {ContentContainerComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing'; import {ToolbarHa...
{ "end_byte": 1903, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/testing/toolbar-harness.ts" }
components/src/material/toolbar/testing/toolbar-harness-filters.ts_0_516
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {BaseHarnessFilters} from '@angular/cdk/testing'; /** A set of criteria that can be used to filter a list of...
{ "end_byte": 516, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/testing/toolbar-harness-filters.ts" }
components/src/material/toolbar/testing/public-api.ts_0_282
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './toolbar-harness'; export * from './toolbar-harness-filters';
{ "end_byte": 282, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/testing/public-api.ts" }
components/src/material/toolbar/testing/toolbar-harness.spec.ts_0_2863
import {Component} from '@angular/core'; import {ComponentHarness, HarnessLoader} from '@angular/cdk/testing'; import {MatToolbarModule} from '@angular/material/toolbar'; import {MatToolbarHarness, MatToolbarSection} from '@angular/material/toolbar/testing'; import {ComponentFixture, TestBed} from '@angular/core/testin...
{ "end_byte": 2863, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/testing/toolbar-harness.spec.ts" }
components/src/material/toolbar/testing/BUILD.bazel_0_722
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library") package(default_visibility = ["//visibility:public"]) ts_library( name = "testing", srcs = glob( ["**/*.ts"], exclude = ["**/*.spec.ts"], ), deps = [ "//src/cdk/testing", ], ) filegroup( ...
{ "end_byte": 722, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/testing/BUILD.bazel" }
components/src/material/toolbar/testing/index.ts_0_234
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './public-api';
{ "end_byte": 234, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/toolbar/testing/index.ts" }
components/src/material/checkbox/checkbox.ts_0_3340
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {FocusableOption} from '@angular/cdk/a11y'; import { ANIMATION_MODULE_TYPE, AfterViewInit, ChangeDetect...
{ "end_byte": 3340, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.ts" }
components/src/material/checkbox/checkbox.ts_3341_11904
{ _elementRef = inject<ElementRef<HTMLElement>>(ElementRef); private _changeDetectorRef = inject(ChangeDetectorRef); private _ngZone = inject(NgZone); _animationMode? = inject(ANIMATION_MODULE_TYPE, {optional: true}); private _options = inject<MatCheckboxDefaultOptions>(MAT_CHECKBOX_DEFAULT_OPTIONS, { opt...
{ "end_byte": 11904, "start_byte": 3341, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.ts" }
components/src/material/checkbox/checkbox.ts_11907_19067
validate(control: AbstractControl<boolean>): ValidationErrors | null { return this.required && control.value !== true ? {'required': true} : null; } // Implemented as a part of Validator. registerOnValidatorChange(fn: () => void): void { this._validatorChangeFn = fn; } private _transitionCheckState(...
{ "end_byte": 19067, "start_byte": 11907, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.ts" }
components/src/material/checkbox/_checkbox-theme.scss_0_6039
@use '../core/style/sass-utils'; @use '../core/theming/theming'; @use '../core/theming/inspection'; @use '../core/theming/validation'; @use '../core/tokens/token-utils'; @use '../core/typography/typography'; @use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox; @use '../core/tokens/m2/mat/checkbox' as tokens-ma...
{ "end_byte": 6039, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/_checkbox-theme.scss" }
components/src/material/checkbox/checkbox-required-validator.ts_0_1235
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive, forwardRef, Provider} from '@angular/core'; import {CheckboxRequiredValidator, NG_VALIDATORS} fro...
{ "end_byte": 1235, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox-required-validator.ts" }
components/src/material/checkbox/module.ts_0_827
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {NgModule} from '@angular/core'; import {MatCommonModule} from '@angular/material/core'; import {MatCheckbox}...
{ "end_byte": 827, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/module.ts" }
components/src/material/checkbox/checkbox.scss_0_3689
@use '../core/style/layout-common'; @use '../core/tokens/m2/mat/checkbox' as tokens-mat-checkbox; @use '../core/tokens/token-utils'; @use './checkbox-common'; @include checkbox-common.checkbox-structure(true); .mat-mdc-checkbox { // The host node defaults to `display: inline`, we have to change it in order for marg...
{ "end_byte": 3689, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.scss" }
components/src/material/checkbox/checkbox.spec.ts_0_897
import {dispatchFakeEvent} from '@angular/cdk/testing/private'; import {ChangeDetectionStrategy, Component, DebugElement, Type} from '@angular/core'; import {ComponentFixture, TestBed, fakeAsync, flush, flushMicrotasks} from '@angular/core/testing'; import {FormControl, FormsModule, NgModel, ReactiveFormsModule} from '...
{ "end_byte": 897, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/checkbox.spec.ts_901_11045
describe('basic behaviors', () => { let checkboxDebugElement: DebugElement; let checkboxNativeElement: HTMLElement; let checkboxInstance: MatCheckbox; let testComponent: SingleCheckbox; let inputElement: HTMLInputElement; let labelElement: HTMLLabelElement; let checkboxElement: HTMLElement; ...
{ "end_byte": 11045, "start_byte": 901, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/checkbox.spec.ts_11051_20731
it('should add a css class to position the label before the checkbox', fakeAsync(() => { testComponent.labelPos = 'before'; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); expect(checkboxNativeElement.querySelector('.mdc-form-field')!.classList).toContain( 'mdc-form-f...
{ "end_byte": 20731, "start_byte": 11051, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/checkbox.spec.ts_20737_29933
describe(`when MAT_CHECKBOX_CLICK_ACTION is 'check'`, () => { beforeEach(() => { TestBed.resetTestingModule(); TestBed.configureTestingModule({ imports: [MatCheckboxModule, FormsModule, ReactiveFormsModule, SingleCheckbox], providers: [{provide: MAT_CHECKBOX_DEFAULT_OPTIONS, us...
{ "end_byte": 29933, "start_byte": 20737, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/checkbox.spec.ts_29937_36478
describe('with provided aria-expanded', () => { let checkboxDebugElement: DebugElement; let checkboxNativeElement: HTMLElement; let inputElement: HTMLInputElement; it('should use the provided postive aria-expanded', () => { fixture = createComponent(CheckboxWithPositiveAriaExpanded); checkb...
{ "end_byte": 36478, "start_byte": 29937, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/checkbox.spec.ts_36482_45562
describe('with ngModel', () => { let checkboxDebugElement: DebugElement; let checkboxNativeElement: HTMLElement; let checkboxInstance: MatCheckbox; let inputElement: HTMLInputElement; let ngModel: NgModel; beforeEach(() => { fixture = createComponent(CheckboxWithNgModel); fixture.c...
{ "end_byte": 45562, "start_byte": 36482, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/checkbox.spec.ts_45563_50945
@Component({ template: ` <div (click)="parentElementClicked = true" (keyup)="parentElementKeyedUp = true" (click)="onCheckboxClick($event)"> <mat-checkbox [id]="checkboxId" [required]="isRequired" [labelPosition]="labelPos" [checked]="isChecked" [(indeterminate)]="isIndet...
{ "end_byte": 50945, "start_byte": 45563, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.spec.ts" }
components/src/material/checkbox/public-api.ts_0_340
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './checkbox'; export * from './checkbox-config'; export * from './module'; export * from './checkbox-r...
{ "end_byte": 340, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/public-api.ts" }
components/src/material/checkbox/checkbox.md_0_3413
`<mat-checkbox>` provides the same functionality as a native `<input type="checkbox">` enhanced with Material Design styling and animations. <!-- example(checkbox-overview) --> ### Checkbox label The checkbox label is provided as the content to the `<mat-checkbox>` element. The label can be positioned before or afte...
{ "end_byte": 3413, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.md" }
components/src/material/checkbox/checkbox-config.ts_0_1821
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {InjectionToken} from '@angular/core'; import {ThemePalette} from '@angular/material/core'; /** Default `mat-...
{ "end_byte": 1821, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox-config.ts" }
components/src/material/checkbox/checkbox.html_0_2301
<div mat-internal-form-field [labelPosition]="labelPosition" (click)="_preventBubblingFromLabel($event)"> <div #checkbox class="mdc-checkbox"> <!-- Render this element first so the input is on top. --> <div class="mat-mdc-checkbox-touch-target" (click)="_onTouchTargetClick()"></div> <input #input ...
{ "end_byte": 2301, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/checkbox.html" }
components/src/material/checkbox/README.md_0_99
Please see the official documentation at https://material.angular.io/components/component/checkbox
{ "end_byte": 99, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/README.md" }
components/src/material/checkbox/_checkbox-common.scss_0_4926
@use 'sass:math'; @use '@angular/cdk'; @use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox; @use '../core/tokens/token-utils'; @use '../core/style/vendor-prefixes'; $_path-length: 29.7833385; $_transition-duration: 90ms; $_icon-size: 18px; $_mark-stroke-size: math.div(2, 15) * $_icon-size; $_indeterminate-che...
{ "end_byte": 4926, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/_checkbox-common.scss" }
components/src/material/checkbox/_checkbox-common.scss_4931_12994
.mdc-checkbox__native-control:focus:focus:not(:checked) ~ .mdc-checkbox__background, .mdc-checkbox__native-control:focus:focus:not(:indeterminate) ~ .mdc-checkbox__background { @include token-utils.create-token-slot(border-color, unselected-focus-icon-color); } .mdc-checkbox__native-control:focus:foc...
{ "end_byte": 12994, "start_byte": 4931, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/_checkbox-common.scss" }
components/src/material/checkbox/_checkbox-common.scss_12998_17260
@keyframes mdc-checkbox-indeterminate-checked-mixedmark { from { animation-timing-function: $_indeterminate-checked-curve; transform: rotate(0deg); opacity: 1; } to { transform: rotate(315deg); opacity: 0; } } @keyframes mdc-checkbox-indeterminate-unchecked-mixedmark ...
{ "end_byte": 17260, "start_byte": 12998, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/_checkbox-common.scss" }
components/src/material/checkbox/BUILD.bazel_0_1577
load( "//tools:defaults.bzl", "extract_tokens", "markdown_to_html", "ng_module", "ng_test_library", "ng_web_test_suite", "sass_binary", "sass_library", ) package(default_visibility = ["//visibility:public"]) ng_module( name = "checkbox", srcs = glob( ["**/*.ts"], ...
{ "end_byte": 1577, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/BUILD.bazel" }
components/src/material/checkbox/index.ts_0_234
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './public-api';
{ "end_byte": 234, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/index.ts" }
components/src/material/checkbox/testing/public-api.ts_0_307
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './checkbox-harness'; export {CheckboxHarnessFilters} from './checkbox-harness-filters';
{ "end_byte": 307, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/testing/public-api.ts" }
components/src/material/checkbox/testing/checkbox-harness.ts_0_6047
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate, } from '@angular/cdk/testing'; impor...
{ "end_byte": 6047, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/testing/checkbox-harness.ts" }
components/src/material/checkbox/testing/checkbox-harness.spec.ts_0_8308
import {Component, signal} from '@angular/core'; import {ComponentFixture, TestBed} from '@angular/core/testing'; import {HarnessLoader} from '@angular/cdk/testing'; import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed'; import {FormControl, ReactiveFormsModule} from '@angular/forms'; import {MatCheckb...
{ "end_byte": 8308, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/testing/checkbox-harness.spec.ts" }
components/src/material/checkbox/testing/checkbox-harness-filters.ts_0_776
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {BaseHarnessFilters} from '@angular/cdk/testing'; /** A set of criteria that can be used to filter a list of...
{ "end_byte": 776, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/testing/checkbox-harness-filters.ts" }
components/src/material/checkbox/testing/BUILD.bazel_0_800
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library") package(default_visibility = ["//visibility:public"]) ts_library( name = "testing", srcs = glob( ["**/*.ts"], exclude = ["**/*.spec.ts"], ), deps = [ "//src/cdk/coercion", "//src/cdk/test...
{ "end_byte": 800, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/testing/BUILD.bazel" }
components/src/material/checkbox/testing/index.ts_0_234
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './public-api';
{ "end_byte": 234, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/checkbox/testing/index.ts" }
components/src/material/slider/slider.md_0_3267
`<mat-slider>` allows for the selection of a value from a range via mouse, touch, or keyboard, similar to `<input type="range">`. <!-- example(slider-overview) --> ### Selecting a value By default the minimum value of the slider is `0`, the maximum value is `100`, and the thumb moves in increments of `1`. These valu...
{ "end_byte": 3267, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.md" }
components/src/material/slider/module.ts_0_729
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {NgModule} from '@angular/core'; import {MatCommonModule, MatRippleModule} from '@angular/material/core'; imp...
{ "end_byte": 729, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/module.ts" }
components/src/material/slider/slider-input.ts_0_2330
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { booleanAttribute, ChangeDetectorRef, Directive, ElementRef, EventEmitter, forwardRef, inject,...
{ "end_byte": 2330, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-input.ts" }
components/src/material/slider/slider-input.ts_2331_10293
class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueAccessor { readonly _ngZone = inject(NgZone); readonly _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef); readonly _cdr = inject(ChangeDetectorRef); protected _slider = inject<_MatSlider>(MAT_SLIDER); @Input({transform: numb...
{ "end_byte": 10293, "start_byte": 2331, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-input.ts" }
components/src/material/slider/slider-input.ts_10297_18249
_onInput(): void { this._onChangeFn?.(this.value); // handles arrowing and updating the value when // a step is defined. if (this._slider.step || !this._isActive) { this._updateThumbUIByValue({withAnimation: true}); } this._slider._onValueChange(this); } _onNgControlValueChange(): voi...
{ "end_byte": 18249, "start_byte": 10297, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-input.ts" }
components/src/material/slider/slider-input.ts_18251_24917
@Directive({ selector: 'input[matSliderStartThumb], input[matSliderEndThumb]', exportAs: 'matSliderRangeThumb', providers: [ MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR, {provide: MAT_SLIDER_RANGE_THUMB, useExisting: MatSliderRangeThumb}, ], }) export class MatSliderRangeThumb extends MatSliderThumb implement...
{ "end_byte": 24917, "start_byte": 18251, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-input.ts" }
components/src/material/slider/public-api.ts_0_475
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export {MatSlider} from './slider'; export {MatSliderVisualThumb} from './slider-thumb'; export {MatSliderThumb, Mat...
{ "end_byte": 475, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/public-api.ts" }
components/src/material/slider/slider.e2e.spec.ts_0_6516
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {$, browser, by, element, ElementFinder} from 'protractor'; import {logging} from 'selenium-webdriver'; desc...
{ "end_byte": 6516, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.e2e.spec.ts" }
components/src/material/slider/slider.ts_0_2166
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directionality} from '@angular/cdk/bidi'; import {Platform} from '@angular/cdk/platform'; import { AfterVi...
{ "end_byte": 2166, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.ts" }
components/src/material/slider/slider.ts_2167_9511
class MatSlider implements AfterViewInit, OnDestroy, _MatSlider { readonly _ngZone = inject(NgZone); readonly _cdr = inject(ChangeDetectorRef); readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef); readonly _dir = inject(Directionality, {optional: true}); readonly _globalRippleOptions = inject<R...
{ "end_byte": 9511, "start_byte": 2167, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.ts" }
components/src/material/slider/slider.ts_9515_17406
private _updateStepNonRange(): void { const input = this._getInput(_MatThumb.END); if (input) { const oldValue = input.value; input.step = this._step; if (this._platform.SAFARI) { input.value = input.value; } input._updateThumbUIByValue(); if (oldValue !== input.va...
{ "end_byte": 17406, "start_byte": 9515, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.ts" }
components/src/material/slider/slider.ts_17410_24831
_onTranslateXChangeBySideEffect( input1: _MatSliderRangeThumb, input2: _MatSliderRangeThumb, ): void { if (!this._hasViewInitialized) { return; } input1._updateThumbUIByValue(); input2._updateThumbUIByValue(); } _onValueChange(source: _MatSliderThumb): void { if (!this._hasView...
{ "end_byte": 24831, "start_byte": 17410, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.ts" }
components/src/material/slider/slider.ts_24835_29382
private _updateTrackUINonRange(source: _MatSliderThumb): void { this._isRtl ? this._setTrackActiveStyles({ left: 'auto', right: '0px', transformOrigin: 'right', transform: `scaleX(${1 - source.fillPercentage})`, }) : this._setTrackActiveStyles({ ...
{ "end_byte": 29382, "start_byte": 24835, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.ts" }
components/src/material/slider/slider-thumb.ts_0_1294
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, NgZo...
{ "end_byte": 1294, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-thumb.ts" }
components/src/material/slider/slider-thumb.ts_1295_9451
class MatSliderVisualThumb implements _MatSliderVisualThumb, AfterViewInit, OnDestroy { readonly _cdr = inject(ChangeDetectorRef); private readonly _ngZone = inject(NgZone); private _slider = inject<_MatSlider>(MAT_SLIDER); /** Whether the slider displays a numeric value label upon pressing the thumb. */ @In...
{ "end_byte": 9451, "start_byte": 1295, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-thumb.ts" }
components/src/material/slider/slider-thumb.ts_9454_10273
_hideValueIndicator(): void { this._hostElement.classList.remove('mdc-slider__thumb--with-indicator'); } _getSibling(): _MatSliderVisualThumb { return this._slider._getThumb( this.thumbPosition === _MatThumb.START ? _MatThumb.END : _MatThumb.START, ); } /** Gets the value indicator container...
{ "end_byte": 10273, "start_byte": 9454, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-thumb.ts" }
components/src/material/slider/README.md_0_97
Please see the official documentation at https://material.angular.io/components/component/slider
{ "end_byte": 97, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/README.md" }
components/src/material/slider/slider.scss_0_6980
@use '@angular/cdk'; @use '../core/tokens/m2/mat/slider' as tokens-mat-slider; @use '../core/tokens/m2/mdc/slider' as tokens-mdc-slider; @use '../core/tokens/token-utils'; @use '../core/style/vendor-prefixes'; $mat-slider-min-size: 128px !default; $mat-slider-horizontal-margin: 8px !default; $_mdc-slots: (tokens-mdc-s...
{ "end_byte": 6980, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.scss" }
components/src/material/slider/slider.scss_6980_12492
.create-token-slot(border-radius, handle-shape); .mdc-slider__thumb:hover & { @include token-utils.create-token-slot(background-color, hover-handle-color); @include token-utils.create-token-slot(border-color, hover-handle-color); } .mdc-slider__thumb--focused & { @include token-utils.cre...
{ "end_byte": 12492, "start_byte": 6980, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.scss" }
components/src/material/slider/_slider-theme.scss_0_5850
@use '../core/theming/theming'; @use '../core/theming/inspection'; @use '../core/theming/validation'; @use '../core/typography/typography'; @use '../core/style/sass-utils'; @use '../core/tokens/token-utils'; @use '../core/tokens/m2/mat/slider' as tokens-mat-slider; @use '../core/tokens/m2/mdc/slider' as tokens-mdc-slid...
{ "end_byte": 5850, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/_slider-theme.scss" }
components/src/material/slider/slider-thumb.html_0_373
@if (discrete) { <div class="mdc-slider__value-indicator-container" #valueIndicatorContainer> <div class="mdc-slider__value-indicator"> <span class="mdc-slider__value-indicator-text">{{valueIndicatorText}}</span> </div> </div> } <div class="mdc-slider__thumb-knob" #knob></div> <div matRipple class="ma...
{ "end_byte": 373, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-thumb.html" }
components/src/material/slider/slider-thumb.scss_0_261
.mat-mdc-slider-visual-thumb .mat-ripple { height: 100%; width: 100%; } .mat-mdc-slider .mdc-slider__tick-marks { justify-content: start; .mdc-slider__tick-mark--active, .mdc-slider__tick-mark--inactive { position: absolute; left: 2px; } }
{ "end_byte": 261, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-thumb.scss" }
components/src/material/slider/slider.spec.ts_0_6498
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {BidiModule, Directionality} from '@angular/cdk/bidi'; import {Platform} from '@angular/cdk/platform'; import...
{ "end_byte": 6498, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_6502_13563
describe('standard range slider', () => { let fixture: ComponentFixture<StandardRangeSlider>; let slider: MatSlider; let endInput: MatSliderRangeThumb; let startInput: MatSliderRangeThumb; beforeEach(waitForAsync(() => { fixture = createComponent(StandardRangeSlider); fixture.detectChan...
{ "end_byte": 13563, "start_byte": 6502, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_13567_17992
describe('range slider with min/max bindings', () => { let fixture: ComponentFixture<RangeSliderWithMinAndMax>; let slider: MatSlider; let endInput: MatSliderRangeThumb; let startInput: MatSliderRangeThumb; beforeEach(waitForAsync(() => { fixture = createComponent(RangeSliderWithMinAndMax); ...
{ "end_byte": 17992, "start_byte": 13567, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_17998_23592
describe('should handle max changes', () => { it('that do not affect values', () => { checkInput(startInput, {min: 25, max: 75, value: 25, translateX: 0}); checkInput(endInput, {min: 25, max: 75, value: 75, translateX: 300}); fixture.componentInstance.max = 125; fixture.changeDete...
{ "end_byte": 23592, "start_byte": 17998, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_23596_31976
describe('ripple states', () => { let input: MatSliderThumb; let thumbInstance: MatSliderVisualThumb; let thumbElement: HTMLElement; let thumbX: number; let thumbY: number; beforeEach(waitForAsync(() => { const fixture = createComponent(StandardSlider); fixture.detectChanges(); ...
{ "end_byte": 31976, "start_byte": 23596, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_31980_40165
describe('range slider with set step', () => { let fixture: ComponentFixture<RangeSliderWithStep>; let slider: MatSlider; let startInput: MatSliderThumb; let endInput: MatSliderThumb; beforeEach(waitForAsync(() => { fixture = createComponent(RangeSliderWithStep); fixture.detectChanges()...
{ "end_byte": 40165, "start_byte": 31980, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_40169_46879
describe('slider with value property binding', () => { let fixture: ComponentFixture<SliderWithOneWayBinding>; let input: MatSliderThumb; beforeEach(waitForAsync(() => { fixture = createComponent(SliderWithOneWayBinding); fixture.detectChanges(); const sliderDebugElement = fixture.debugEl...
{ "end_byte": 46879, "start_byte": 40169, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_46883_52650
describe('range slider with ngModel', () => { let slider: MatSlider; let fixture: ComponentFixture<RangeSliderWithNgModel>; let startInput: MatSliderThumb; let endInput: MatSliderThumb; beforeEach(waitForAsync(() => { fixture = createComponent(RangeSliderWithNgModel); fixture.detectChan...
{ "end_byte": 52650, "start_byte": 46883, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_52654_61233
describe('slider as a custom form control', () => { let fixture: ComponentFixture<RangeSliderWithFormControl>; let slider: MatSlider; let startInput: MatSliderThumb; let endInput: MatSliderThumb; beforeEach(waitForAsync(() => { fixture = createComponent(RangeSliderWithFormControl); fixt...
{ "end_byte": 61233, "start_byte": 52654, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.spec.ts_61235_67404
@Component({ template: ` <mat-slider [min]="min" [max]="max"> <input matSliderStartThumb> <input matSliderEndThumb> </mat-slider> `, styles: SLIDER_STYLES, standalone: false, }) class RangeSliderWithMinAndMax { min = 25; max = 75; } @Component({ template: ` <mat-slider> <input value="50...
{ "end_byte": 67404, "start_byte": 61235, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.spec.ts" }
components/src/material/slider/slider.html_0_1003
<!-- Inputs --> <ng-content></ng-content> <!-- Track --> <div class="mdc-slider__track"> <div class="mdc-slider__track--inactive"></div> <div class="mdc-slider__track--active"> <div #trackActive class="mdc-slider__track--active_fill"></div> </div> @if (showTickMarks) { <div class="mdc-slider__tick-mark...
{ "end_byte": 1003, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider.html" }
components/src/material/slider/BUILD.bazel_0_2064
load("//src/e2e-app:test_suite.bzl", "e2e_test_suite") load( "//tools:defaults.bzl", "extract_tokens", "markdown_to_html", "ng_e2e_test_library", "ng_module", "ng_test_library", "ng_web_test_suite", "sass_binary", "sass_library", ) package(default_visibility = ["//visibility:public"...
{ "end_byte": 2064, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/BUILD.bazel" }
components/src/material/slider/index.ts_0_234
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './public-api';
{ "end_byte": 234, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/index.ts" }
components/src/material/slider/slider-interface.ts_0_7998
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {InjectionToken, ChangeDetectorRef, WritableSignal} from '@angular/core'; import {MatRipple, RippleGlobalOpti...
{ "end_byte": 7998, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/slider-interface.ts" }
components/src/material/slider/testing/slider-harness-filters.ts_0_939
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {BaseHarnessFilters} from '@angular/cdk/testing'; /** Possible positions of a slider thumb. */ export enum Th...
{ "end_byte": 939, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/slider-harness-filters.ts" }
components/src/material/slider/testing/slider-thumb-harness.ts_0_4073
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {coerceNumberProperty} from '@angular/cdk/coercion'; import { ComponentHarness, ComponentHarnessConstruct...
{ "end_byte": 4073, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/slider-thumb-harness.ts" }
components/src/material/slider/testing/public-api.ts_0_320
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './slider-harness'; export * from './slider-thumb-harness'; export * from './slider-harness-filters';
{ "end_byte": 320, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/public-api.ts" }
components/src/material/slider/testing/slider-harness.spec.ts_0_8932
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Component, signal} from '@angular/core'; import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/t...
{ "end_byte": 8932, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/slider-harness.spec.ts" }
components/src/material/slider/testing/slider-harness.ts_0_3101
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate, } from '@angular/cdk/testing'; impor...
{ "end_byte": 3101, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/slider-harness.ts" }
components/src/material/slider/testing/BUILD.bazel_0_756
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library") package(default_visibility = ["//visibility:public"]) ts_library( name = "testing", srcs = glob( ["**/*.ts"], exclude = ["**/*.spec.ts"], ), deps = [ "//src/cdk/coercion", "//src/cdk/test...
{ "end_byte": 756, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/BUILD.bazel" }
components/src/material/slider/testing/index.ts_0_234
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export * from './public-api';
{ "end_byte": 234, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/slider/testing/index.ts" }
components/src/material/stepper/step-header.ts_0_4403
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; import { ChangeDetectionStrategy, ChangeDetectorRef...
{ "end_byte": 4403, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/step-header.ts" }
components/src/material/stepper/stepper-intl.ts_0_1319
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Injectable, Optional, SkipSelf} from '@angular/core'; import {Subject} from 'rxjs'; /** Stepper data that i...
{ "end_byte": 1319, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/stepper-intl.ts" }
components/src/material/stepper/stepper-icon.ts_0_989
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive, Input, TemplateRef, inject} from '@angular/core'; import {StepState} from '@angular/cdk/stepper';...
{ "end_byte": 989, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/stepper-icon.ts" }
components/src/material/stepper/stepper.html_0_3885
<!-- We need to project the content somewhere to avoid hydration errors. Some observations: 1. This is only necessary on the server. 2. We get a hydration error if there aren't any nodes after the `ng-content`. 3. We get a hydration error if `ng-content` is wrapped in another element. --> @if (_isServer) { <n...
{ "end_byte": 3885, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/stepper.html" }
components/src/material/stepper/step-content.ts_0_532
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive, TemplateRef, inject} from '@angular/core'; /** * Content for a `mat-step` that will be rendered...
{ "end_byte": 532, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/step-content.ts" }
components/src/material/stepper/step-header.scss_0_6533
@use '@angular/cdk'; @use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper; @use '../core/tokens/token-utils'; @use '../core/style/layout-common'; @use './stepper-variables'; .mat-step-header { overflow: hidden; outline: none; cursor: pointer; position: relative; box-sizing: content-box; -webkit-tap-h...
{ "end_byte": 6533, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/step-header.scss" }
components/src/material/stepper/_stepper-theme.scss_0_4742
@use '../core/theming/theming'; @use '../core/theming/inspection'; @use '../core/theming/validation'; @use '../core/typography/typography'; @use '../core/style/sass-utils'; @use '../core/tokens/token-utils'; @use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper; /// Outputs base theme styles (styles not dependent...
{ "end_byte": 4742, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/_stepper-theme.scss" }
components/src/material/stepper/public-api.ts_0_583
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export {StepperOrientation, StepState} from '@angular/cdk/stepper'; export * from './stepper-module'; export * from ...
{ "end_byte": 583, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/public-api.ts" }
components/src/material/stepper/step-header.html_0_1805
<div class="mat-step-header-ripple mat-focus-indicator" matRipple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disableRipple"></div> <div class="mat-step-icon-state-{{state}} mat-step-icon" [class.mat-step-icon-selected]="selected"> <div class="mat-step-icon-content"> @if (iconOverrides ...
{ "end_byte": 1805, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/step-header.html" }
components/src/material/stepper/stepper.scss_0_7991
@use 'sass:math'; @use '@angular/cdk'; @use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper; @use '../core/tokens/token-utils'; @use './stepper-variables'; // Gets the `calc` expression for the vertical padding of the stepper header. @function _get-vertical-padding-calc() { $height: token-utils.get-token-varia...
{ "end_byte": 7991, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/stepper.scss" }
components/src/material/stepper/stepper-button.ts_0_826
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {CdkStepperNext, CdkStepperPrevious} from '@angular/cdk/stepper'; import {Directive} from '@angular/core'; /...
{ "end_byte": 826, "start_byte": 0, "url": "https://github.com/angular/components/blob/main/src/material/stepper/stepper-button.ts" }