diff --git a/src/plugins/components/progress.ts b/src/plugins/components/progress.ts index fc235a8..9703665 100644 --- a/src/plugins/components/progress.ts +++ b/src/plugins/components/progress.ts @@ -119,12 +119,30 @@ export default plugin.withOptions( }) } }, - function () { + function (options) { + let { prefix } = defu(options, defaultPluginOptions) + + if (prefix) { + prefix = `${prefix}-` + } + return { theme: { shurikenUi: { progress: defaultProgressConfig, }, + extend: { + keyframes: { + [`${prefix}progress-indeterminate`]: { + '0%': { 'margin-left': '-100%' }, + '60%': { 'margin-left': '100%' }, + '100%': { 'margin-left': '-100%' }, + }, + }, + animation: { + [`${prefix}progress-indeterminate`]: `${prefix}progress-indeterminate 3s linear infinite forwards`, + }, + }, }, } } diff --git a/src/preset.ts b/src/preset.ts index d3c4c4c..5bf967e 100644 --- a/src/preset.ts +++ b/src/preset.ts @@ -140,16 +140,6 @@ export function createPreset(options: PluginOption = {}) { }, }, }), - keyframes: { - 'nui-indeterminate': { - '0%': { 'margin-left': '-10%' }, - '100%': { 'margin-left': '100%' }, - }, - }, - animation: { - 'nui-indeterminate': - 'nui-indeterminate 1s cubic-bezier(0.4, 0, 0.2, 1) infinite', - }, }, }, } satisfies Config