|
@@ -12,11 +12,11 @@
|
|
|
{ step: { title: 'sleep' } },
|
|
{ step: { title: 'sleep' } },
|
|
|
];
|
|
];
|
|
|
const steps1 = [
|
|
const steps1 = [
|
|
|
- { step: { title: 'Get up', bar: { type: 'icon', icon: { name: 'ri-hotel-bed-line' } } } },
|
|
|
|
|
- { step: { title: 'Eat', bar: { type: 'icon', icon: { name: 'ri-restaurant-2-line' } } } },
|
|
|
|
|
- { step: { title: 'Drink', bar: { type: 'icon', icon: { name: 'ri-cup-line' } } } },
|
|
|
|
|
- { step: { title: 'Beat beans', bar: { type: 'icon', icon: { name: 'ri-emotion-sad-line' } } } },
|
|
|
|
|
- { step: { title: 'sleep', bar: { type: 'icon', icon: { name: 'ri-zzz-line' } } } },
|
|
|
|
|
|
|
+ { step: { title: 'Get up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } } },
|
|
|
|
|
+ { step: { title: 'Eat', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } } },
|
|
|
|
|
+ { step: { title: 'Drink', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } } },
|
|
|
|
|
+ { step: { title: 'Beat beans', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } } } },
|
|
|
|
|
+ { step: { title: 'sleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
|
|
|
];
|
|
];
|
|
|
const steps2 = [
|
|
const steps2 = [
|
|
|
{ step: { title: 'Get up' }, finishStep: { title: 'Have got up' } },
|
|
{ step: { title: 'Get up' }, finishStep: { title: 'Have got up' } },
|
|
@@ -27,24 +27,24 @@
|
|
|
];
|
|
];
|
|
|
const steps3 = [
|
|
const steps3 = [
|
|
|
{
|
|
{
|
|
|
- step: { title: 'Get up', bar: { type: 'icon', icon: { name: 'ri-hotel-bed-line' } } },
|
|
|
|
|
- finishStep: { title: 'Have got up', bar: { type: 'icon', icon: { name: 'ri-hotel-bed-fill' } } },
|
|
|
|
|
|
|
+ step: { title: 'Get up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } },
|
|
|
|
|
+ finishStep: { title: 'Have got up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-fill' } } },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- step: { title: 'Eat', bar: { type: 'icon', icon: { name: 'ri-restaurant-2-line' } } },
|
|
|
|
|
- finishStep: { title: 'Have had enough', bar: { type: 'icon', icon: { name: 'ri-restaurant-2-fill' } } },
|
|
|
|
|
|
|
+ step: { title: 'Eat', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } },
|
|
|
|
|
+ finishStep: { title: 'Have had enough', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-fill' } } },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- step: { title: 'Drink', bar: { type: 'icon', icon: { name: 'ri-cup-line' } } },
|
|
|
|
|
- finishStep: { title: 'Drink up', bar: { type: 'icon', icon: { name: 'ri-cup-fill' } } },
|
|
|
|
|
|
|
+ step: { title: 'Drink', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } },
|
|
|
|
|
+ finishStep: { title: 'Drink up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-fill' } } },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- step: { title: 'Beat beans', bar: { type: 'icon', icon: { name: 'ri-emotion-sad-line' } } },
|
|
|
|
|
- finishStep: { title: 'Have a good time', bar: { type: 'icon', icon: { name: 'ri-emotion-sad-fill' } } },
|
|
|
|
|
|
|
+ step: { title: 'Beat beans', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } } },
|
|
|
|
|
+ finishStep: { title: 'Have a good time', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-fill' } } },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- step: { title: 'sleep', bar: { type: 'icon', icon: { name: 'ri-zzz-line' } } },
|
|
|
|
|
- finishStep: { title: 'Fall asleep', bar: { type: 'icon', icon: { name: 'ri-zzz-fill' } } },
|
|
|
|
|
|
|
+ step: { title: 'sleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
|
|
|
|
|
+ finishStep: { title: 'Fall asleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-fill' } } },
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
const steps4 = [
|
|
const steps4 = [
|
|
@@ -60,123 +60,163 @@
|
|
|
{ step: { title: 'sleep', desc: 'Too full to sleep.' } },
|
|
{ step: { title: 'sleep', desc: 'Too full to sleep.' } },
|
|
|
];
|
|
];
|
|
|
const steps5 = [
|
|
const steps5 = [
|
|
|
- { step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'icon', icon: { name: 'ri-hotel-bed-line' } } } },
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Get up',
|
|
|
|
|
+ desc: 'Get up and move bricks!',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Eat',
|
|
title: 'Eat',
|
|
|
desc: 'Eat, eat, eat, eat, fat you.',
|
|
desc: 'Eat, eat, eat, eat, fat you.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-restaurant-2-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Drink',
|
|
|
|
|
+ desc: 'Walk slowly and drink lots of water.',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- { step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'icon', icon: { name: 'ri-cup-line' } } } },
|
|
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Beat beans',
|
|
title: 'Beat beans',
|
|
|
desc: "Eat, sleep, play peas It's cool, it's cool, it's cool, it's cool, it's cool. By the way to verify the progress bar height adaptive step text height.",
|
|
desc: "Eat, sleep, play peas It's cool, it's cool, it's cool, it's cool, it's cool. By the way to verify the progress bar height adaptive step text height.",
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-emotion-sad-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- { step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'icon', icon: { name: 'ri-zzz-line' } } } },
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
|
|
|
|
|
+ },
|
|
|
];
|
|
];
|
|
|
const steps6 = [
|
|
const steps6 = [
|
|
|
{
|
|
{
|
|
|
- step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'icon', icon: { name: 'ri-hotel-bed-line' } } },
|
|
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Get up',
|
|
|
|
|
+ desc: 'Get up and move bricks!',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } },
|
|
|
|
|
+ },
|
|
|
finishStep: {
|
|
finishStep: {
|
|
|
title: 'Have got up',
|
|
title: 'Have got up',
|
|
|
desc: 'The bricks are gone!',
|
|
desc: 'The bricks are gone!',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-hotel-bed-fill' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-fill' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Eat',
|
|
title: 'Eat',
|
|
|
desc: 'Eat, eat, eat, eat, fat you.',
|
|
desc: 'Eat, eat, eat, eat, fat you.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-restaurant-2-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
|
|
|
},
|
|
},
|
|
|
finishStep: {
|
|
finishStep: {
|
|
|
title: 'Have had enough',
|
|
title: 'Have had enough',
|
|
|
desc: 'The meal has been eaten up!',
|
|
desc: 'The meal has been eaten up!',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-restaurant-2-fill' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-fill' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'icon', icon: { name: 'ri-cup-line' } } },
|
|
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Drink',
|
|
|
|
|
+ desc: 'Walk slowly and drink lots of water.',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
|
|
|
|
|
+ },
|
|
|
finishStep: {
|
|
finishStep: {
|
|
|
title: 'Drink up',
|
|
title: 'Drink up',
|
|
|
desc: 'I drink too much water and it spills out of my eyes!',
|
|
desc: 'I drink too much water and it spills out of my eyes!',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-cup-fill' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-fill' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Beat beans',
|
|
title: 'Beat beans',
|
|
|
desc: 'Eat, sleep, play beans.',
|
|
desc: 'Eat, sleep, play beans.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-emotion-sad-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
|
|
|
},
|
|
},
|
|
|
finishStep: {
|
|
finishStep: {
|
|
|
title: 'Have a good time',
|
|
title: 'Have a good time',
|
|
|
desc: 'Doudou has been beaten to the ground.',
|
|
desc: 'Doudou has been beaten to the ground.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-emotion-sad-fill' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-fill' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'icon', icon: { name: 'ri-zzz-line' } } },
|
|
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'sleep',
|
|
|
|
|
+ desc: 'Too full to sleep.',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } },
|
|
|
|
|
+ },
|
|
|
finishStep: {
|
|
finishStep: {
|
|
|
title: 'Fall asleep',
|
|
title: 'Fall asleep',
|
|
|
desc: 'Asleep and dreaming!',
|
|
desc: 'Asleep and dreaming!',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-zzz-fill' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-fill' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
const steps7 = [
|
|
const steps7 = [
|
|
|
- { step: { title: 'Get up', desc: 'Get up and move bricks!', bar: '1' } },
|
|
|
|
|
- { step: { title: 'Eat', desc: 'Eat, eat, eat, eat, fat you.', bar: 'eat' } },
|
|
|
|
|
- { step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: '3' } },
|
|
|
|
|
|
|
+ { step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: /** @type {"string"} */ ('string'), content: '1' } } },
|
|
|
|
|
+ { step: { title: 'Eat', desc: 'Eat, eat, eat, eat, fat you.', bar: { type: /** @type {"string"} */ ('string'), content: 'eat' } } },
|
|
|
|
|
+ {
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Drink',
|
|
|
|
|
+ desc: 'Walk slowly and drink lots of water.',
|
|
|
|
|
+ bar: { type: /** @type {"string"} */ ('string'), content: '3' },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Beat beans',
|
|
title: 'Beat beans',
|
|
|
desc: 'Eat, sleep, play beans.',
|
|
desc: 'Eat, sleep, play beans.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-emotion-sad-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- { step: { title: 'sleep', desc: 'Too full to sleep.', bar: '😴' } },
|
|
|
|
|
|
|
+ { step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: /** @type {"string"} */ ('string'), content: '😴' } } },
|
|
|
];
|
|
];
|
|
|
const steps8 = [
|
|
const steps8 = [
|
|
|
- { step: { title: 'Get up', bar: { type: 'image', image: '/assets/images/avatar_2.png' } } },
|
|
|
|
|
- { step: { title: 'Eat', bar: { type: 'icon', icon: { name: 'ri-restaurant-2-line' } } } },
|
|
|
|
|
- { step: { title: 'Drink', bar: { type: 'icon', icon: { name: 'ri-cup-line' } } } },
|
|
|
|
|
- { step: { title: 'Beat beans', bar: { type: 'image', image: '/assets/images/avatar_1.jpg' } } },
|
|
|
|
|
- { step: { title: 'sleep', bar: { type: 'icon', icon: { name: 'ri-zzz-line' } } } },
|
|
|
|
|
|
|
+ { step: { title: 'Get up', bar: { type: /** @type {"image"} */ ('image'), content: '/assets/images/avatar_2.png' } } },
|
|
|
|
|
+ { step: { title: 'Eat', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } } },
|
|
|
|
|
+ { step: { title: 'Drink', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } } },
|
|
|
|
|
+ { step: { title: 'Beat beans', bar: { type: /** @type {"image"} */ ('image'), content: '/assets/images/avatar_1.jpg' } } },
|
|
|
|
|
+ { step: { title: 'sleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
|
|
|
];
|
|
];
|
|
|
const steps9 = [
|
|
const steps9 = [
|
|
|
- { step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'icon', icon: { name: 'ri-hotel-bed-line' } } } },
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Get up',
|
|
|
|
|
+ desc: 'Get up and move bricks!',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Eat',
|
|
title: 'Eat',
|
|
|
desc: 'Eat, eat, eat, eat, fat you.',
|
|
desc: 'Eat, eat, eat, eat, fat you.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-restaurant-2-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
|
|
|
injComponent: injCom1,
|
|
injComponent: injCom1,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- { step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'icon', icon: { name: 'ri-cup-line' } } } },
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ step: {
|
|
|
|
|
+ title: 'Drink',
|
|
|
|
|
+ desc: 'Walk slowly and drink lots of water.',
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
step: {
|
|
step: {
|
|
|
title: 'Beat beans',
|
|
title: 'Beat beans',
|
|
|
desc: 'Eat, sleep, play beans.',
|
|
desc: 'Eat, sleep, play beans.',
|
|
|
- bar: { type: 'icon', icon: { name: 'ri-emotion-sad-line' } },
|
|
|
|
|
|
|
+ bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
|
|
|
injComponent: injCom2,
|
|
injComponent: injCom2,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- { step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'icon', icon: { name: 'ri-zzz-line' } } } },
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
|
|
|
|
|
+ },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- let current = 1;
|
|
|
|
|
- const preFun = () => {
|
|
|
|
|
- current > 1 && current--;
|
|
|
|
|
- };
|
|
|
|
|
- const nextFun = () => {
|
|
|
|
|
- current < steps.length + 1 && current++;
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ let current = $state(1);
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<div class="mt-8 px-4 mb-4 font-bold text-2xl">Horizontal arrangement</div>
|
|
<div class="mt-8 px-4 mb-4 font-bold text-2xl">Horizontal arrangement</div>
|
|
@@ -257,10 +297,10 @@
|
|
|
|
|
|
|
|
<div class="flex sticky bottom-0 z-10 bg-white/50 dark:bg-black/50 backdrop-blur">
|
|
<div class="flex sticky bottom-0 z-10 bg-white/50 dark:bg-black/50 backdrop-blur">
|
|
|
<div class="flex-1">
|
|
<div class="flex-1">
|
|
|
- <Button fill="lineTheme" on:click={preFun}>Previous step</Button>
|
|
|
|
|
|
|
+ <Button fill="lineTheme" disabled={current === 1} onclick={() => current > 1 && current--}>Previous step</Button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex-1">
|
|
<div class="flex-1">
|
|
|
- <Button fill="lineTheme" on:click={nextFun}>Next step</Button>
|
|
|
|
|
|
|
+ <Button fill="lineTheme" disabled={current === steps.length} onclick={() => current < steps.length + 1 && current++}>Next step</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -281,7 +321,7 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<div class="text-primary dark:text-dark text-sm">Here you inject something in the form of a component</div>
|
|
<div class="text-primary dark:text-dark text-sm">Here you inject something in the form of a component</div>
|
|
|
-<div class="flex items-center justify-between">
|
|
|
|
|
|
|
+<div class="flex items-center space-x-4">
|
|
|
<Button size="full" heightIn="2" injClass="px-4">button</Button>
|
|
<Button size="full" heightIn="2" injClass="px-4">button</Button>
|
|
|
<Avatar image="/assets/images/avatar_1.jpg" size="sm" />
|
|
<Avatar image="/assets/images/avatar_1.jpg" size="sm" />
|
|
|
<Icon name="ri-money-cny-circle-line" theme />
|
|
<Icon name="ri-money-cny-circle-line" theme />
|