Skip to content

[Progress bars]: Bundle theme styles with component #15720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: simeonoff/scoped-styles
Choose a base branch
from

Conversation

desig9stein
Copy link
Contributor

Closes #15686

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@desig9stein desig9stein requested a review from simeonoff April 13, 2025 17:41
@adrianptrv adrianptrv added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Apr 15, 2025
@simeonoff simeonoff linked an issue Apr 17, 2025 that may be closed by this pull request
Comment on lines +14 to +132
}

@keyframes igx-indeterminate-accordion-rtl {
0% {
stroke-dashoffset: calc(#{$circumference} * -2);
stroke-dasharray: calc(#{$circumference} * 9 / 10);
}

100% {
stroke-dashoffset: calc(#{$circumference} * -2 / 5);
}
}

// Fluent: Circular progress animation for indeterminate state.
// Dynamically changes stroke-dasharray and rotates for a smooth spinning effect.
@keyframes igx-indeterminate-circular-fluent {
0% {
// Start the stroke at the correct position by adjusting the dasharray and dashoffset
stroke-dasharray: calc(#{$circumference} * 0.0001), #{$circumference};
stroke-dashoffset: calc(-1 * #{$circumference} / 4);

// Start at 12 o'clock
transform: rotate(-90deg);
}

50% {
stroke-dasharray: calc(#{$circumference} / 2), calc(#{$circumference} / 2);

// Adjust to keep starting point correct
stroke-dashoffset: calc(-1 * #{$circumference} / 4);

// Continue rotating smoothly
transform: rotate(360deg);
}

100% {
stroke-dasharray: calc(#{$circumference} * 0.0001), #{$circumference};

// Reset properly
stroke-dashoffset: calc(-1 * #{$circumference} / 4);

// Complete the full rotation
transform: rotate(990deg);
}
}

@keyframes igx-indeterminate-circular-fluent-rtl {
0% {
stroke-dasharray: calc(#{$circumference} * 0.0001), #{$circumference};

// Positive offset for opposite direction
stroke-dashoffset: calc(#{$circumference} / 4);
transform: rotate(90deg);
}

50% {
stroke-dasharray: calc(#{$circumference} / 2), calc(#{$circumference} / 2);

// Positive offset for opposite direction
stroke-dashoffset: calc(#{$circumference} / 4);
transform: rotate(-360deg);
}

100% {
stroke-dasharray: calc(#{$circumference} * 0.0001), #{$circumference};

// Positive offset for opposite direction
stroke-dashoffset: calc(#{$circumference} / 4);
transform: rotate(-990deg);
}
}

@keyframes igx-initial-dashoffset {
from {
/* Start with no progress (0%) */
stroke-dashoffset: #{$circumference};
}

to {
stroke-dashoffset: calc(#{$circumference} - var(--_progress-percentage) * #{$circumference});
}
}

// Generic animations
@keyframes igc-initial-counter {
from {
--_progress-integer: 0;
--_progress-fraction: 0;
}
}

@keyframes igx-rotate-center {
0% {
transform: rotate(0);
}

100% {
transform: rotate(360deg);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put these in a separate file to clean this up a bit. Also make sure to put the keyframes in the base layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Progress Indicators]: Bundle theme styles with component
3 participants