Skip to content

Commit 165c0dc

Browse files
committed
chore: wip
1 parent 8bf117f commit 165c0dc

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

storage/framework/core/components/stepper/src/components/Example.vue

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
22
import { Modal } from '@stacksjs/modal'
3-
import { Stepper } from '@stacksjs/stepper'
3+
import Stepper from './Stepper.vue'
44
import { ref } from 'vue'
55
66
const props = defineProps<{
@@ -23,7 +23,7 @@ function handleClose() {
2323
<template>
2424
<div class="flex">
2525
<Modal close-button :visible="props.visible" @close="handleClose">
26-
<div class="mt-4 w-full flex flex-col">
26+
<div class="mt-4" style="width: 100%;">
2727
<Stepper ref="stepperRef" v-model="step" :steps="steps" />
2828

2929
<div class="flex-center my-4">
@@ -56,19 +56,6 @@ function handleClose() {
5656
</button>
5757
</div>
5858
</div>
59-
60-
<!-- <div class="flex-center w-full">
61-
62-
</div>
63-
<div class="flex-center" v-if="step === 1">
64-
<h1>Step 1</h1>
65-
</div>
66-
<div class="flex-center" v-if="step === 2">
67-
<h1>Step 2</h1>
68-
</div>
69-
<div class="flex-center" v-if="step === 3">
70-
<h1>Step 3</h1>
71-
</div> -->
7259
</Modal>
7360
</div>
7461
</template>

storage/framework/core/components/stepper/src/components/Step.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function handleChange() {
6464
</script>
6565

6666
<template>
67-
<div class="step box-border flex-1 opacity-55 transition-opacity duration-700" :class="[classes]">
67+
<div class="step box-border flex-1 flex-row opacity-55 transition-opacity duration-700" :class="[classes]">
6868
<input
6969
v-show="debug"
7070
:id="id"
@@ -89,13 +89,16 @@ function handleChange() {
8989
<span v-if="defaultSlot" class="title text-white">
9090
<slot v-bind="scope" />
9191
</span>
92-
<span v-if="withDivider && !isLastStep" class="ml-2 w-full border-b border-gray shadow-md" />
93-
ss
92+
<span v-if="withDivider && !isLastStep" class="ml-2 w-full shadow-md">
93+
<span class="bg-gray h-1 block" />
94+
</span>
9495
</label>
9596
</div>
9697
</template>
9798

9899
<style scoped>
100+
/* @unocss-placeholder */
101+
99102
.step:hover:not(.is-disabled) {
100103
opacity: 0.85;
101104
}
@@ -129,6 +132,4 @@ function handleChange() {
129132
margin-right: 0.5rem; /* Assuming mr-2 maps to 0.5rem */
130133
}
131134
}
132-
133-
/* @unocss-placeholder */
134135
</style>

storage/framework/core/components/stepper/src/components/Stepper.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Step from './Step.vue'
55
66
defineOptions({
77
name: 'Stepper',
8-
inheritAttrs: false,
98
})
109
1110
const props = withDefaults(defineProps<StepperProps>(), {
@@ -197,7 +196,13 @@ defineExpose({
197196
</script>
198197

199198
<template>
200-
<div class="box-border w-full flex select-none justify-between">
199+
<div style="
200+
box-sizing: border-box;
201+
width: 100%;
202+
display: flex;
203+
justify-content: space-between;
204+
user-select: none;
205+
">
201206
<Step
202207
v-for="(step, $index) in stepsArr"
203208
:key="$index"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
import type { Plugin } from 'vue'
12
import { Stepper } from './components'
23

4+
const plugin: Plugin = {
5+
install(app) {
6+
app.component('Stepper', Stepper)
7+
},
8+
}
9+
10+
export default plugin
11+
312
export { Stepper }

0 commit comments

Comments
 (0)