-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: init KTour component * wip: complete KTour component placement、mask、current zIndex、open props * test: added KTour unit test * test: added KTour unit test
- Loading branch information
1 parent
e4521b6
commit 705341e
Showing
14 changed files
with
643 additions
and
70 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
components/Calendar/__test__/__snapshots__/calendar.spec.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = false; | ||
const handleClick = () => { | ||
open = true; | ||
}; | ||
</script> | ||
|
||
<KTour {open} {steps} current={1}></KTour> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
<button on:click={handleClick} id="bwsy_trigger">trigger</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = true; | ||
</script> | ||
|
||
<KTour {open} {steps} mask={false} current={1}> | ||
<button slot="prevButton" id="bwsy_prev" let:handlePrev on:click={handlePrev}>上一步</button> | ||
<button slot="nextButton" id="bwsy_next" let:handleNext on:click={handleNext}>下一步</button> | ||
</KTour> | ||
<div class="w-full h-2000px fcc"> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = true; | ||
</script> | ||
|
||
<KTour {open} {steps} mask={false} current={1}> | ||
<div slot="closeIcon" id="bwsy" let:handleClose on:click={handleClose} aria-hidden="true"> | ||
custom close | ||
</div> | ||
</KTour> | ||
<div class="w-full h-2000px fcc"> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
description: 'custom-description', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = true; | ||
</script> | ||
|
||
<KTour {open} {steps} mask={false} current={1}> | ||
<div slot="description" let:current let:description> | ||
{current}-{description} | ||
</div> | ||
</KTour> | ||
<div class="w-full h-2000px fcc"> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = true; | ||
</script> | ||
|
||
<KTour {open} {steps} mask={false} current={1}> | ||
<div slot="footer" let:current let:handleNext let:handlePrev> | ||
<button id="bwsy_prev" on:click={handlePrev}>上一步{current}</button> | ||
<button id="bwsy_next" on:click={handleNext}>下一步{current}</button> | ||
</div> | ||
</KTour> | ||
<div class="w-full h-2000px fcc"> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = true; | ||
</script> | ||
|
||
<KTour {open} {steps} mask={false} current={1}> | ||
<div slot="indicators" let:current> | ||
indicators-{current} | ||
</div> | ||
</KTour> | ||
<div class="w-full h-2000px fcc"> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
import { KTour } from '@ikun-ui/tour'; | ||
let refEl = null; | ||
let refEl2 = null; | ||
let steps = []; | ||
$: { | ||
steps = [ | ||
{ | ||
title: '111111111111111111', | ||
target: refEl | ||
}, | ||
{ | ||
title: 'custom-title', | ||
target: refEl2 | ||
} | ||
]; | ||
} | ||
let open = true; | ||
</script> | ||
|
||
<KTour {open} {steps} mask={false} current={1}> | ||
<div slot="title" let:current let:title> | ||
{current}-{title} | ||
</div> | ||
</KTour> | ||
<div class="w-full h-2000px fcc"> | ||
<button bind:this={refEl}>111</button> | ||
<button bind:this={refEl2}>222</button> | ||
</div> |
Oops, something went wrong.