UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

1 lines 8.29 kB
{"version":3,"file":"primeng-progressspinner.mjs","sources":["../../src/progressspinner/style/progressspinnerstyle.ts","../../src/progressspinner/progressspinner.ts","../../src/progressspinner/primeng-progressspinner.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-progressspinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n\n.p-progressspinner::before {\n content: \"\";\n display: block;\n padding-top: 100%;\n}\n\n.p-progressspinner-spin {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n animation: p-progressspinner-rotate 2s linear infinite;\n}\n\n.p-progressspinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: ${dt('progressspinner.color.1')};\n animation: p-progressspinner-dash 1.5s ease-in-out infinite, p-progressspinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n}\n\n@keyframes p-progressspinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes p-progressspinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n@keyframes p-progressspinner-color {\n 100%,\n 0% {\n stroke: ${dt('progressspinner.color.one')};\n }\n 40% {\n stroke: ${dt('progressspinner.color.two')};\n }\n 66% {\n stroke: ${dt('progressspinner.color.three')};\n }\n 80%,\n 90% {\n stroke: ${dt('progressspinner.color.four')};\n }\n}\n`;\n\nconst classes = {\n root: 'p-progressspinner',\n spin: 'p-progressspinner-spin',\n circle: 'p-progressspinner-circle'\n};\n\n@Injectable()\nexport class ProgressSpinnerStyle extends BaseStyle {\n name = 'progressspinner';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * ProgressSpinner is a process status indicator.\n *\n * [Live Demo](https://www.primeng.org/progressspinner)\n *\n * @module progressspinnerstyle\n *\n */\nexport enum ProgressSpinnerClasses {\n /**\n * Class name of the root element\n */\n root = 'p-progressspinner',\n /**\n * Class name of the spin element\n */\n spin = 'p-progressspinner-spin',\n /**\n * Class name of the circle element\n */\n circle = 'p-progressspinner-circle'\n}\n\nexport interface ProgressSpinnerStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, Input, NgModule, ViewEncapsulation } from '@angular/core';\nimport { SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ProgressSpinnerStyle } from './style/progressspinnerstyle';\n\n/**\n * ProgressSpinner is a process status indicator.\n * @group Components\n */\n@Component({\n selector: 'p-progressSpinner, p-progress-spinner, p-progressspinner',\n standalone: true,\n imports: [CommonModule, SharedModule],\n template: `\n <div class=\"p-progressspinner\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel\" [attr.aria-busy]=\"true\" [attr.data-pc-name]=\"'progressspinner'\" [attr.data-pc-section]=\"'root'\">\n <svg class=\"p-progressspinner-spin\" viewBox=\"25 25 50 50\" [style.animation-duration]=\"animationDuration\" [attr.data-pc-section]=\"'root'\">\n <circle class=\"p-progressspinner-circle\" cx=\"50\" cy=\"50\" r=\"20\" [attr.fill]=\"fill\" [attr.stroke-width]=\"strokeWidth\" stroke-miterlimit=\"10\" />\n </svg>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ProgressSpinnerStyle]\n})\nexport class ProgressSpinner extends BaseComponent {\n /**\n * Class of the element.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Inline style of the element.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Width of the circle stroke.\n * @group Props\n */\n @Input() strokeWidth: string = '2';\n /**\n * Color for the background of the circle.\n * @group Props\n */\n @Input() fill: string = 'none';\n /**\n * Duration of the rotate animation.\n * @group Props\n */\n @Input() animationDuration: string = '2s';\n /**\n * Used to define a aria label attribute the current element.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n\n _componentStyle = inject(ProgressSpinnerStyle);\n}\n\n@NgModule({\n imports: [ProgressSpinner, SharedModule],\n exports: [ProgressSpinner, SharedModule]\n})\nexport class ProgressSpinnerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BZ,EAAE,CAAC,yBAAyB,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2BzB,EAAE,CAAC,2BAA2B,CAAC,CAAA;;;kBAG/B,EAAE,CAAC,2BAA2B,CAAC,CAAA;;;kBAG/B,EAAE,CAAC,6BAA6B,CAAC,CAAA;;;;kBAIjC,EAAE,CAAC,4BAA4B,CAAC,CAAA;;;CAGjD;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,mBAAmB;AACzB,IAAA,IAAI,EAAE,wBAAwB;AAC9B,IAAA,MAAM,EAAE;CACX;AAGK,MAAO,oBAAqB,SAAQ,SAAS,CAAA;IAC/C,IAAI,GAAG,iBAAiB;IAExB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAApB,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC;;AASD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