progress-spinner.d-Lfz4Wh5x.d.ts 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import * as i0 from '@angular/core';
  2. import { InjectionToken, ElementRef } from '@angular/core';
  3. import { T as ThemePalette } from './palette.d-BSSFKjO6.js';
  4. /** Possible mode for a progress spinner. */
  5. type ProgressSpinnerMode = 'determinate' | 'indeterminate';
  6. /** Default `mat-progress-spinner` options that can be overridden. */
  7. interface MatProgressSpinnerDefaultOptions {
  8. /**
  9. * Default theme color of the progress spinner. This API is supported in M2 themes only, it
  10. * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.
  11. *
  12. * For information on applying color variants in M3, see
  13. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  14. */
  15. color?: ThemePalette;
  16. /** Diameter of the spinner. */
  17. diameter?: number;
  18. /** Width of the spinner's stroke. */
  19. strokeWidth?: number;
  20. /**
  21. * Whether the animations should be force to be enabled, ignoring if the current environment is
  22. * using NoopAnimationsModule.
  23. */
  24. _forceAnimations?: boolean;
  25. }
  26. /** Injection token to be used to override the default options for `mat-progress-spinner`. */
  27. declare const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS: InjectionToken<MatProgressSpinnerDefaultOptions>;
  28. /**
  29. * @docs-private
  30. * @deprecated No longer used, will be removed.
  31. * @breaking-change 21.0.0
  32. */
  33. declare function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions;
  34. declare class MatProgressSpinner {
  35. readonly _elementRef: ElementRef<HTMLElement>;
  36. /** Whether the _mat-animation-noopable class should be applied, disabling animations. */
  37. _noopAnimations: boolean;
  38. /**
  39. * Theme color of the progress spinner. This API is supported in M2 themes only, it
  40. * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.
  41. *
  42. * For information on applying color variants in M3, see
  43. * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
  44. */
  45. get color(): string | null | undefined;
  46. set color(value: string | null | undefined);
  47. private _color;
  48. private _defaultColor;
  49. /** The element of the determinate spinner. */
  50. _determinateCircle: ElementRef<HTMLElement>;
  51. constructor(...args: unknown[]);
  52. /**
  53. * Mode of the progress bar.
  54. *
  55. * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to
  56. * 'determinate'.
  57. * Mirrored to mode attribute.
  58. */
  59. mode: ProgressSpinnerMode;
  60. /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */
  61. get value(): number;
  62. set value(v: number);
  63. private _value;
  64. /** The diameter of the progress spinner (will set width and height of svg). */
  65. get diameter(): number;
  66. set diameter(size: number);
  67. private _diameter;
  68. /** Stroke width of the progress spinner. */
  69. get strokeWidth(): number;
  70. set strokeWidth(value: number);
  71. private _strokeWidth;
  72. /** The radius of the spinner, adjusted for stroke width. */
  73. _circleRadius(): number;
  74. /** The view box of the spinner's svg element. */
  75. _viewBox(): string;
  76. /** The stroke circumference of the svg circle. */
  77. _strokeCircumference(): number;
  78. /** The dash offset of the svg circle. */
  79. _strokeDashOffset(): number | null;
  80. /** Stroke width of the circle in percent. */
  81. _circleStrokeWidth(): number;
  82. static ɵfac: i0.ɵɵFactoryDeclaration<MatProgressSpinner, never>;
  83. static ɵcmp: i0.ɵɵComponentDeclaration<MatProgressSpinner, "mat-progress-spinner, mat-spinner", ["matProgressSpinner"], { "color": { "alias": "color"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "diameter": { "alias": "diameter"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; }, {}, never, never, true, never>;
  84. static ngAcceptInputType_value: unknown;
  85. static ngAcceptInputType_diameter: unknown;
  86. static ngAcceptInputType_strokeWidth: unknown;
  87. }
  88. /**
  89. * @deprecated Import Progress Spinner instead. Note that the
  90. * `mat-spinner` selector isn't deprecated.
  91. * @breaking-change 16.0.0
  92. */
  93. declare const MatSpinner: typeof MatProgressSpinner;
  94. export { MatProgressSpinner as M, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS as b, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY as c, MatSpinner as d };
  95. export type { ProgressSpinnerMode as P, MatProgressSpinnerDefaultOptions as a };