Skip to content

Commit

Permalink
feat: First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pisandelli committed Apr 6, 2023
1 parent 4901f5a commit 85e33d1
Show file tree
Hide file tree
Showing 17 changed files with 8,084 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
24 changes: 24 additions & 0 deletions assets/styles/BoxL.module.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.box-l
padding: var(--gap, 1.5rem)
border: var(--border-thin, .0625rem) solid var(--color-grey-light, #F0F0F0)
border-radius: var(--border-radius, .5rem)
color: var(--color-default, #595959)
background-color: #FFF
& *
color: inherit

&[compact]
overflow: hidden
padding: 0

&[transparent]
background-color: transparent

&[sharp]
border-radius: 0

&[borderless]
border-width: 0
border-color: transparent


14 changes: 14 additions & 0 deletions assets/styles/CenterL.module.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.center-l
box-sizing: content-box
margin-inline: auto
max-inline-size: var(--max-width, 65ch)
padding-inline-start: var(--gap, 1.5rem)
padding-inline-end: var(--gap, 1.5rem)

&[center-text]
text-align: center

&[intrinsic]
display:flex
flex-direction: column
align-items: center
21 changes: 21 additions & 0 deletions assets/styles/ClusterL.module.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.cluster-l
display: flex
flex-wrap: wrap
gap: var(--gap, 1.5rem)
justify-content: flex-start
align-items: center

&[center]
justify-content: center

&[end]
justify-content: flex-end

&[between]
justify-content: space-between

&[around]
justify-content: space-around

&[narrow]
gap: var(--s0, 1rem)
10 changes: 10 additions & 0 deletions assets/styles/ModalL.module.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.modal
position: fixed
inset-block-start: 50%
inset-inline-start: 50%
transform: translate(-50%, -50%)

// .modal.contain
// overflow: auto
// max-inline-size: calc(100% - (var(--gap, 1.5rem) * 2))
// max-block-size: calc(100% - (var(--gap, 1.5rem) * 2))
6 changes: 6 additions & 0 deletions assets/styles/RowL.module.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.row-l:not(:last-child)
padding-block-end: var(--gap, 1.5rem)
border-bottom: var(--border-thin, .0625rem) solid var(--color-grey-light, #F0F0F0)

&[dashed]
border-bottom-style: dashed
20 changes: 20 additions & 0 deletions assets/styles/StackL.module.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.stack-l
display: flex
flex-direction: column
justify-content: flex-start

&[recursive] > *
margin-block: 0

& > * + *,
&[recursive] * + *
margin-block-start: var(--gap, 1.5rem)

&[squeezed] > * + *
margin-block-start: 0

&[compact] > * + *
margin-block-start: calc(var(--gap, 1.5rem) / 2)

&[wide] > * + *
margin-block-start: calc(var(--gap, 1.5rem) * 3)
22 changes: 22 additions & 0 deletions components/BoxL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
/**
* A simple box component
* @name 'BoxL'
* @version 1.0.0
*/
import { defineComponent, h } from 'vue'
import Styles from '../assets/styles/BoxL.module.styl'
export default defineComponent({
props: {
tag: {
type: String,
default: 'div'
}
},
setup (props, { slots }) {
return () => h(props.tag, { class: Object.values(Styles) }, slots)
}
})
</script>
23 changes: 23 additions & 0 deletions components/CenterL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts">
/**
* A component that can create a
* horizontally centered column
* @name 'CenterL'
* @version 1.0.0
*/
import { defineComponent, h } from 'vue'
import Styles from '../assets/styles/CenterL.module.styl'
export default defineComponent({
props: {
tag: {
type: String,
default: 'div'
}
},
setup (props, { slots }) {
return () => h(props.tag, { class: Object.values(Styles) }, slots)
}
})
</script>
22 changes: 22 additions & 0 deletions components/ClusterL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
/**
* A component that can create a
* horizontally centered column
* @name 'ClusterL'
* @version 1.0.0
*/
import { defineComponent, h } from 'vue'
import Styles from '../assets/styles/ClusterL.module.styl'
export default defineComponent({
props: {
tag: {
type: String,
default: 'div'
}
},
setup (props, { slots }) {
return () => h(props.tag, { class: Object.values(Styles) }, slots)
}
})
</script>
22 changes: 22 additions & 0 deletions components/ModalL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
/**
* A modal positioner
* @name 'ModalL'
* @version 1.0.0
*/
import { defineComponent, h } from 'vue'
import Styles from '../assets/styles/ModalL.module.styl'
export default defineComponent({
props: {
tag: {
type: String,
default: 'div'
}
},
setup (props, { slots }) {
return () => h(props.tag, { class: Object.values(Styles) }, slots)
}
})
</script>
22 changes: 22 additions & 0 deletions components/RowL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
/**
* A simple separator.
* @name 'RowL'
* @version 1.0.0
*/
import { defineComponent, h } from 'vue'
import Styles from '../assets/styles/RowL.module.styl'
export default defineComponent({
props: {
tag: {
type: String,
default: 'div'
}
},
setup (props, { slots }) {
return () => h(props.tag, { class: Object.values(Styles) }, slots)
}
})
</script>
24 changes: 24 additions & 0 deletions components/StackL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
/**
* The Stack layout primitive injects
* margin between elements via their
* common parent.
* @name 'StackL'
* @version 1.0.0
*/
import { defineComponent, h } from 'vue'
import Styles from '../assets/styles/StackL.module.styl'
export default defineComponent({
props: {
tag: {
type: String,
default: 'div'
}
},
setup (props, { slots }) {
return () => h(props.tag, { class: Object.values(Styles) }, slots)
}
})
</script>
1 change: 1 addition & 0 deletions declarations.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*.module.styl';
3 changes: 3 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default defineNuxtConfig({
components: true
})
Loading

0 comments on commit 85e33d1

Please sign in to comment.