Skip to content

Commit 9dbf3a5

Browse files
Charfeddine HamrouniCharfeddine Hamrouni
Charfeddine Hamrouni
authored and
Charfeddine Hamrouni
committed
fix: rebase from origin
1 parent 6055610 commit 9dbf3a5

File tree

5 files changed

+102
-165
lines changed

5 files changed

+102
-165
lines changed

docs/content/1.getting-started/3.theme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ This is how the `@theme` is generated for each design token:
746746
--outline-color-default: var(--ui-border);
747747
--outline-color-inverted: var(--ui-border-inverted);
748748
--stroke-color-default: var(--ui-border);
749+
--stroke-color-accented: var(--ui-border-accented);
749750
--stroke-color-inverted: var(--ui-border-inverted);
750751
--fill-color-default: var(--ui-border);
751752
--fill-color-inverted: var(--ui-border-inverted);

playground/app/pages/components/progress.vue

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -68,57 +68,36 @@ onMounted(() => {
6868
</div>
6969

7070
<div class="flex items-center gap-4">
71-
<UProgress
72-
v-model="value2"
73-
variant="circular"
74-
size="2xs"
75-
status
76-
/>
77-
<UProgress
78-
v-model="value2"
79-
variant="circular"
80-
color="info"
81-
size="xs"
82-
/>
8371
<UProgress
8472
v-model="value2"
8573
variant="circular"
8674
color="warning"
87-
size="sm"
88-
status-position="inside"
89-
status
90-
/>
91-
<UProgress
92-
v-model="value2"
93-
variant="circular"
94-
color="error"
95-
size="md"
96-
status-position="inside"
9775
status
9876
/>
77+
9978
<UProgress
10079
v-model="value2"
10180
variant="circular"
102-
color="success"
10381
size="lg"
104-
status-position="inside"
10582
status
83+
status-position="inside"
84+
color="neutral"
10685
/>
86+
10787
<UProgress
10888
v-model="value2"
109-
variant="circular"
110-
color="secondary"
111-
size="xl"
112-
status-position="outside"
89+
color="error"
11390
status
114-
/>
115-
<UProgress
91+
size="2xs"
11692
variant="circular"
117-
color="neutral"
118-
animation="swing"
119-
status-position="inside"
120-
size="2xl"
121-
/>
93+
>
94+
<template #status="{ percent }">
95+
<div class="flex flex-col items-center">
96+
<span class="font-bold">{{ percent }}%</span>
97+
<span class="text-sm text-gray-500">Loading...</span>
98+
</div>
99+
</template>
100+
</UProgress>
122101
</div>
123102
</div>
124103
</template>

src/runtime/components/Progress.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const appConfig = useAppConfig() as Progress['AppConfig']
8484

8585
const rootProps = useForwardPropsEmits(reactivePick(props, 'getValueLabel', 'modelValue'), emits)
8686

87-
const RADIUS = 35
87+
const RADIUS = 45
8888
const circumference = 2 * Math.PI * RADIUS
8989

9090
const isIndeterminate = computed(() => rootProps.value.modelValue === null)
@@ -194,7 +194,8 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.progress ||
194194
color: props.color,
195195
orientation: props.orientation,
196196
inverted: props.inverted,
197-
variant: props.variant
197+
variant: props.variant,
198+
statusPosition: props.statusPosition
198199
}))
199200
</script>
200201

@@ -208,7 +209,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.progress ||
208209

209210
<ProgressRoot v-bind="rootProps" :max="realMax" :class="ui.base({ class: props.ui?.base })" style="transform: translateZ(0)">
210211
<ProgressIndicator v-if="variant === 'linear'" :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
211-
<template v-if="variant === 'circular'">
212+
<template v-else-if="variant === 'circular'">
212213
<svg
213214
:class="ui.base({ class: props.ui?.base })"
214215
viewBox="0 0 100 100"

src/templates.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export function getTemplates(options: ModuleOptions, uiConfig: Record<string, an
132132
--outline-color-default: var(--ui-border);
133133
--outline-color-inverted: var(--ui-border-inverted);
134134
--stroke-default: var(--ui-border);
135+
--stroke-accented: var(--ui-border-accented);
135136
--stroke-inverted: var(--ui-border-inverted);
136137
--fill-default: var(--ui-border);
137138
--fill-inverted: var(--ui-border-inverted);

0 commit comments

Comments
 (0)