generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: finish tests on theme/style/vue; begin work on runtime; arch up…
…dates
- Loading branch information
Showing
158 changed files
with
4,373 additions
and
2,668 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,57 @@ | ||
<template> | ||
<main> | ||
Hello World | ||
<p> | ||
{{ color }} | ||
</p> | ||
<MyButton /> | ||
</main> | ||
</template> | ||
|
||
<style lang="postcss"> | ||
@lg { | ||
div { | ||
color: red; | ||
background-color: red; | ||
<script setup lang="ts"> | ||
import theme from '$pinceau/theme' | ||
const color = ref('blue') | ||
const colors = Object.keys(theme.color) | ||
const rand = array => array[Math.floor(Math.random() * array.length)]; | ||
let interval: NodeJS.Timeout | ||
onMounted(() => { | ||
if (interval) clearInterval(interval) | ||
interval = setInterval( | ||
() => { | ||
color.value = rand(colors) | ||
}, | ||
1000 | ||
) | ||
}) | ||
</script> | ||
|
||
<style lang="ts"> | ||
css({ | ||
'html, body, #__nuxt': { | ||
minHeight: '100vh', | ||
minWidth: '100vw' | ||
} | ||
}) | ||
</style> | ||
|
||
<style scoped lang="ts"> | ||
css({ | ||
main: { | ||
color: '$color.blue.1', | ||
backgroundColor: '$color.blue.9', | ||
minHeight: '100vh', | ||
minWidth: '100vw', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
flexDirection: 'column', | ||
padding: '$space.16' | ||
}, | ||
p: { | ||
marginBottom: 24 | ||
} | ||
} | ||
}) | ||
</style> |
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,82 @@ | ||
<script setup lang="ts"> | ||
withDefaults( | ||
defineProps<{ | ||
color?: StyleProp<keyof PinceauTheme['color']> | ||
}>(), | ||
{ | ||
color: 'blue' | ||
} | ||
) | ||
</script> | ||
|
||
<template> | ||
<button class="my-button"> | ||
<span v-if="!$slots?.default"> | ||
Hello Pinceau 1.0 | ||
</span> | ||
<span v-else> | ||
<slot /> | ||
</span> | ||
</button> | ||
</template> | ||
<style scoped lang="ts"> | ||
css({ | ||
'.my-button': { | ||
'--button-primary': (props) => `$color.${props.color}.600`, | ||
'--button-secondary': (props) => `$color.${props.color}.500`, | ||
display: 'inline-block', | ||
borderRadius: '$radii.xl', | ||
transition: '$transition.all', | ||
color: '$color.white', | ||
boxShadow: `0 5px 0 $button.primary, 0 12px 16px $color.dimmed`, | ||
span: { | ||
display: 'inline-block', | ||
fontFamily: '$font.sans', | ||
borderRadius: '$radii.lg', | ||
fontSize: '$fontSize.xl', | ||
lineHeight: '$lead.none', | ||
transition: '$transition.all', | ||
backgroundColor: '$button.primary', | ||
boxShadow: 'inset 0 -1px 1px $color.dark', | ||
}, | ||
'&:hover': { | ||
span: { | ||
backgroundColor: `$button.secondary`, | ||
} | ||
}, | ||
'&:active': { | ||
span: { | ||
transform: 'translateY($space.4)' | ||
} | ||
} | ||
}, | ||
variants: { | ||
size: { | ||
sm: { | ||
span: { | ||
padding: '$space.6 $space.12', | ||
}, | ||
}, | ||
md: { | ||
span: { | ||
padding: '$space.12 $space.16' | ||
}, | ||
}, | ||
lg: { | ||
span: { | ||
padding: '$space.16 $space.24' | ||
}, | ||
}, | ||
xl: { | ||
span: { | ||
padding: '$space.32 $space.48' | ||
}, | ||
}, | ||
options: { | ||
default: 'sm', | ||
}, | ||
}, | ||
}, | ||
}) | ||
</style> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@lg { | ||
.test { | ||
background-color: $theme('color.blue.100'); | ||
background-color: $theme('color.blue.1'); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
<template> | ||
<main> | ||
<main class="main"> | ||
<Navigation /> | ||
|
||
<RouterView /> | ||
</main> | ||
</template> | ||
|
||
|
||
<style lang="ts"> | ||
css({ | ||
'html, body, #app': { | ||
height: '100vh', | ||
width: '100vw', | ||
backgroundColor: '$color.blue.2' | ||
}, | ||
}) | ||
</style> | ||
|
||
<style scoped lang="ts"> | ||
css({ | ||
main: { | ||
padding: '{space.16}', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '2rem' | ||
'.main': { | ||
width: '100%', | ||
height: '100%', | ||
padding: '$space.8', | ||
} | ||
}) | ||
</style> |
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
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
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
Oops, something went wrong.