fu-kit 0.0.1-beta.2 → 0.0.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -19
- package/dist/favicon.ico +0 -0
- package/dist/img/splash-screen.8bd73950.jpg +0 -0
- package/dist/index.html +1 -0
- package/dist/js/app.53980592.js +2 -0
- package/dist/js/app.53980592.js.map +1 -0
- package/dist/js/chunk-vendors.fe8aa7a9.js +8 -0
- package/dist/js/chunk-vendors.fe8aa7a9.js.map +1 -0
- package/package.json +36 -36
- package/reset.scss +60 -0
- package/root.scss +130 -0
- package/scss.scss +5 -3
- package/src/App.vue +122 -30
- package/src/Home.vue +112 -0
- package/src/assets/splash-screen.jpg +0 -0
- package/src/components/FuButton.vue +104 -27
- package/src/components/FuButtonLink.vue +79 -0
- package/src/components/FuCodeView.vue +58 -0
- package/src/components/FuCopy.vue +103 -0
- package/src/components/FuProgressRadial.vue +117 -0
- package/src/components/FuSelect.vue +84 -55
- package/src/components/FuSelectX.vue +317 -0
- package/src/components/FuSidebar.vue +90 -0
- package/src/components/FuText.vue +98 -60
- package/src/components/FuTextarea.vue +118 -0
- package/src/docs/DocButton.vue +67 -0
- package/src/docs/DocSandbox.vue +71 -0
- package/src/docs/DocSelect.vue +55 -0
- package/src/docs/DocSidebar.vue +93 -0
- package/src/docs/DocText.vue +59 -0
- package/src/docs/DocTextarea.vue +64 -0
- package/src/docs/DocTypo.vue +98 -0
- package/src/main.js +9 -5
- package/src/router.js +29 -17
- package/src/scss/colors.scss +16 -6
- package/src/scss/typo.scss +5 -14
- package/src/scss/ui.scss +22 -38
- package/src/scss/utils.scss +36 -0
- package/src/styles.scss +15 -0
- package/src/utils/media.js +1 -0
- package/src/utils/woosh.js +2 -0
- package/vue.config.js +1 -4
- package/src/views/Home.vue +0 -24
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-button">
|
|
3
|
+
<div class="doc-button_row">
|
|
4
|
+
<fu-button>default</fu-button>
|
|
5
|
+
<fu-button class="primary">primary</fu-button>
|
|
6
|
+
<fu-button class="secondary">secondary</fu-button>
|
|
7
|
+
<fu-button class="positive">positive</fu-button>
|
|
8
|
+
<fu-button class="warning">warning</fu-button>
|
|
9
|
+
<fu-button class="negative">negative</fu-button>
|
|
10
|
+
<fu-button disabled>disabled</fu-button>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="doc-button_row">
|
|
13
|
+
<fu-button hollow>default</fu-button>
|
|
14
|
+
<fu-button hollow class="primary">primary</fu-button>
|
|
15
|
+
<fu-button hollow class="secondary">secondary</fu-button>
|
|
16
|
+
<fu-button hollow class="positive">positive</fu-button>
|
|
17
|
+
<fu-button hollow class="warning">warning</fu-button>
|
|
18
|
+
<fu-button hollow class="negative">negative</fu-button>
|
|
19
|
+
<fu-button hollow disabled>disabled</fu-button>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="doc-button_row">
|
|
22
|
+
<fu-button class="primary">
|
|
23
|
+
primary buttons<br />with a long text inside
|
|
24
|
+
</fu-button>
|
|
25
|
+
|
|
26
|
+
<fu-button class="secondary">
|
|
27
|
+
<h4>HUGE TEXT</h4>
|
|
28
|
+
</fu-button>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<fu-code-view label="Example">{{ example }}</fu-code-view>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import FuButton from '@/components/FuButton.vue'
|
|
37
|
+
import FuCodeView from '@/components/FuCodeView.vue'
|
|
38
|
+
|
|
39
|
+
const example = `
|
|
40
|
+
/// vue
|
|
41
|
+
<fu-button hollow>default</fu-button>
|
|
42
|
+
<fu-button hollow class="primary">primary</fu-button>
|
|
43
|
+
|
|
44
|
+
/// css
|
|
45
|
+
.primary {
|
|
46
|
+
--button-pal: var(--pal-primary);
|
|
47
|
+
}
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
name: 'doc-button',
|
|
52
|
+
components: { FuCodeView, FuButton },
|
|
53
|
+
setup () {
|
|
54
|
+
return { example }
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style scoped lang="scss">
|
|
60
|
+
.doc-button {
|
|
61
|
+
&_row {
|
|
62
|
+
@include spacing-padding(300);
|
|
63
|
+
gap: 1em;
|
|
64
|
+
display: flex;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-sandbox">
|
|
3
|
+
<div class="doc-sandbox_row" v-for="c in classes" :class="c">
|
|
4
|
+
<fu-button class="doc-sandbox_row-btn">{{ c }}</fu-button>
|
|
5
|
+
<fu-select v-model="selectVal">
|
|
6
|
+
<option v-for="i in list" :value="i.value">{{ i.label }}</option>
|
|
7
|
+
</fu-select>
|
|
8
|
+
<fu-select-x v-model="selectVal" :options="list" />
|
|
9
|
+
<fu-text class="doc-sandbox_row-text" v-model="textVal" :placeholder="c + ' placeholder'" />
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="doc-sandbox_row">
|
|
13
|
+
<fu-button disabled class="doc-sandbox_row-btn">disabled</fu-button>
|
|
14
|
+
<fu-text disabled v-model="textVal" placeholder="disabled placeholder" class="doc-sandbox_row-text" />
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<fu-code-view label="Example">{{ example }}</fu-code-view>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import FuCodeView from '@/components/FuCodeView.vue'
|
|
23
|
+
import FuText from '@/components/FuText.vue'
|
|
24
|
+
import { ref } from 'vue'
|
|
25
|
+
import FuButton from '@/components/FuButton.vue'
|
|
26
|
+
import FuSelect from '@/components/FuSelect.vue'
|
|
27
|
+
import FuSelectX from '@/components/FuSelectX.vue'
|
|
28
|
+
|
|
29
|
+
const example = `
|
|
30
|
+
TBD
|
|
31
|
+
`
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'doc-sandbox',
|
|
35
|
+
components: { FuSelectX, FuSelect, FuButton, FuText, FuCodeView },
|
|
36
|
+
setup () {
|
|
37
|
+
const classes = [ 'default', 'primary', 'brand', 'secondary', 'positive', 'warning', 'negative' ]
|
|
38
|
+
const textVal = ref('')
|
|
39
|
+
|
|
40
|
+
const selectVal = ref('val1')
|
|
41
|
+
const list = [
|
|
42
|
+
{ value: 'val1', label: 'label 1' },
|
|
43
|
+
{ value: 'val2', label: 'label 2' },
|
|
44
|
+
{ value: 'val3', label: 'label 3' },
|
|
45
|
+
]
|
|
46
|
+
return { example, textVal, classes, selectVal, list }
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style scoped lang="scss">
|
|
52
|
+
.doc-sandbox {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 1em;
|
|
56
|
+
|
|
57
|
+
&_row {
|
|
58
|
+
@include spacing-padding(300);
|
|
59
|
+
gap: 1em;
|
|
60
|
+
display: flex;
|
|
61
|
+
|
|
62
|
+
&-text {
|
|
63
|
+
max-width: 15em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&-btn {
|
|
67
|
+
width: 8em;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-select">
|
|
3
|
+
<div class="doc-select_row">
|
|
4
|
+
<label>Boring Select</label>
|
|
5
|
+
<fu-select v-model="val">
|
|
6
|
+
<option v-for="i in list" :value="i.value">{{ i.label }}</option>
|
|
7
|
+
</fu-select>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="doc-select_row brand">
|
|
11
|
+
<label>Fancy select with search</label>
|
|
12
|
+
<fu-select-x v-model="val" :options="list" />
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="doc-select_row positive">
|
|
16
|
+
<label>Fancy select with search</label>
|
|
17
|
+
<fu-select-x v-model="val" :options="list" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="doc-select_row negative">
|
|
21
|
+
<label>Fancy select with search</label>
|
|
22
|
+
<fu-select-x v-model="val" :options="list" />
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import { ref } from 'vue'
|
|
29
|
+
|
|
30
|
+
import FuButton from '@/components/FuButton.vue'
|
|
31
|
+
import FuSelect from '@/components/FuSelect.vue'
|
|
32
|
+
import FuSelectX from '@/components/FuSelectX.vue'
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: 'doc-buttons',
|
|
36
|
+
components: { FuSelectX, FuSelect, FuButton },
|
|
37
|
+
setup () {
|
|
38
|
+
const val = ref('val1')
|
|
39
|
+
const list = [
|
|
40
|
+
{ value: 'val1', label: 'label 1' },
|
|
41
|
+
{ value: 'val2', label: 'label 2' },
|
|
42
|
+
{ value: 'val3', label: 'label 3' },
|
|
43
|
+
]
|
|
44
|
+
return { val, list }
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style scoped lang="scss">
|
|
50
|
+
.doc-select {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: spacing(300);
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-sidebar">
|
|
3
|
+
<fu-sidebar side="right" :is-open="rightIsOpen" @close="rightIsOpen = false">
|
|
4
|
+
<div class="doc-sidebar_content">
|
|
5
|
+
<h4>What is Lorem Ipsum?</h4>
|
|
6
|
+
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
|
7
|
+
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
|
|
8
|
+
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining
|
|
9
|
+
essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum
|
|
10
|
+
passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem
|
|
11
|
+
Ipsum.</p>
|
|
12
|
+
<fu-button @click="rightIsOpen = false">Open Right One</fu-button>
|
|
13
|
+
</div>
|
|
14
|
+
</fu-sidebar>
|
|
15
|
+
<fu-button @click="rightIsOpen = true">Open Right One</fu-button>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import FuCodeView from '@/components/FuCodeView.vue'
|
|
21
|
+
import FuSidebar from '@/components/FuSidebar.vue'
|
|
22
|
+
import { ref } from 'vue'
|
|
23
|
+
import FuButton from '@/components/FuButton.vue'
|
|
24
|
+
|
|
25
|
+
const example = `
|
|
26
|
+
TBD
|
|
27
|
+
|
|
28
|
+
`
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'doc-sidebar',
|
|
32
|
+
components: { FuButton, FuSidebar, FuCodeView },
|
|
33
|
+
setup () {
|
|
34
|
+
const rightIsOpen = ref(false)
|
|
35
|
+
return { example, rightIsOpen }
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style scoped lang="scss">
|
|
41
|
+
.doc-sidebar {
|
|
42
|
+
&_content {
|
|
43
|
+
@include spacing-padding(400);
|
|
44
|
+
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: 1em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.h100 {
|
|
51
|
+
@include typo(100);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.h200 {
|
|
55
|
+
@include typo(200);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.h300 {
|
|
59
|
+
@include typo(300);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.h400 {
|
|
63
|
+
@include typo(400);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.h500 {
|
|
67
|
+
@include typo(500);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.h600 {
|
|
71
|
+
@include typo(600);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.h700 {
|
|
75
|
+
@include typo(700);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.h800 {
|
|
79
|
+
@include typo(800);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.h900 {
|
|
83
|
+
@include typo(900);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&_title {
|
|
87
|
+
margin-bottom: spacing(400);
|
|
88
|
+
color: pal(text-dimm);
|
|
89
|
+
font-weight: normal;
|
|
90
|
+
border-bottom: 1px solid color(grey200);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-text">
|
|
3
|
+
<div class="doc-text_row">
|
|
4
|
+
<fu-text v-model="val" placeholder="placeholder" />
|
|
5
|
+
<fu-text class="secondary" v-model="val" placeholder="placeholder" />
|
|
6
|
+
<fu-text class="brand" v-model="val" placeholder="placeholder" />
|
|
7
|
+
<fu-text disabled v-model="val" placeholder="placeholder" />
|
|
8
|
+
</div>
|
|
9
|
+
<div class="doc-text_row">
|
|
10
|
+
<fu-text v-model="val" placeholder="disabled placeholder" class="doc-sandbox_row-text">
|
|
11
|
+
<template #left>
|
|
12
|
+
<p class="icon"> ❤️</p>
|
|
13
|
+
</template>
|
|
14
|
+
<template #right>
|
|
15
|
+
<p class="icon"> ❤️</p>
|
|
16
|
+
</template>
|
|
17
|
+
</fu-text>
|
|
18
|
+
</div>
|
|
19
|
+
<fu-code-view label="Example">{{ example }}</fu-code-view>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import FuCodeView from '@/components/FuCodeView.vue'
|
|
25
|
+
import FuText from '@/components/FuText.vue'
|
|
26
|
+
import { ref } from 'vue'
|
|
27
|
+
import FuButton from '@/components/FuButton.vue'
|
|
28
|
+
|
|
29
|
+
const example = `
|
|
30
|
+
TBD
|
|
31
|
+
`
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'doc-text',
|
|
35
|
+
components: { FuButton, FuText, FuCodeView },
|
|
36
|
+
setup () {
|
|
37
|
+
const val = ref('')
|
|
38
|
+
return { example, val }
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style scoped lang="scss">
|
|
44
|
+
.doc-text {
|
|
45
|
+
&_row {
|
|
46
|
+
@include spacing-padding(300);
|
|
47
|
+
gap: 1em;
|
|
48
|
+
display: flex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.icon {
|
|
52
|
+
height: 2em;
|
|
53
|
+
width: 2em;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-textarea">
|
|
3
|
+
<fu-textarea v-model="val" placeholder="this is a text area" auto-resize />
|
|
4
|
+
<fu-textarea class="brand" v-model="val" placeholder="this is a text area" />
|
|
5
|
+
<fu-button>Like submit</fu-button>
|
|
6
|
+
<fu-code-view label="Example">{{ example }}</fu-code-view>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import FuCodeView from '@/components/FuCodeView.vue'
|
|
12
|
+
import FuTextarea from '@/components/FuTextarea.vue'
|
|
13
|
+
import { ref } from 'vue'
|
|
14
|
+
import FuButton from '@/components/FuButton.vue'
|
|
15
|
+
|
|
16
|
+
const example = `
|
|
17
|
+
TBD
|
|
18
|
+
`
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'doc-textarea',
|
|
22
|
+
components: { FuButton, FuTextarea, FuCodeView },
|
|
23
|
+
setup () {
|
|
24
|
+
const val = ref(`Where does it come from?
|
|
25
|
+
|
|
26
|
+
Contrary to popular belief, Lorem Ipsum is not simply random text.
|
|
27
|
+
It has roots in a piece of classical Latin literature from 45 BC,
|
|
28
|
+
making it over 2000 years old. Richard McClintock, a Latin professor
|
|
29
|
+
at Hampden-Sydney College in Virginia, looked up one of the more
|
|
30
|
+
obscure Latin words, consectetur, from a Lorem Ipsum passage,
|
|
31
|
+
and going through the cites of the word in classical literature,
|
|
32
|
+
discovered the undoubtable source. Lorem Ipsum comes from sections
|
|
33
|
+
1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum"
|
|
34
|
+
(The Extremes of Good and Evil) by Cicero, written in 45 BC.
|
|
35
|
+
This book is a treatise on the theory of ethics, very popular
|
|
36
|
+
during the Renaissance. The first line of Lorem Ipsum, "Lorem
|
|
37
|
+
ipsum dolor sit amet..", comes from a line in section 1.10.32.
|
|
38
|
+
|
|
39
|
+
The standard chunk of Lorem Ipsum used since the 1500s is reproduced
|
|
40
|
+
below for those interested. Sections 1.10.32 and 1.10.33 from
|
|
41
|
+
"de Finibus Bonorum et Malorum" by Cicero are also reproduced
|
|
42
|
+
in their exact original form, accompanied by English versions
|
|
43
|
+
from the 1914 translation by H. Rackham.
|
|
44
|
+
`)
|
|
45
|
+
return { example, val }
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style scoped lang="scss">
|
|
51
|
+
.doc-textarea {
|
|
52
|
+
@include spacing-padding(300);
|
|
53
|
+
|
|
54
|
+
gap: 1em;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
|
|
58
|
+
--text-focus-pal: var(--pal-brand);
|
|
59
|
+
|
|
60
|
+
.brand {
|
|
61
|
+
--ui-pal: var(--pal-brand);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="doc-typo">
|
|
3
|
+
<div class="doc-typo_col">
|
|
4
|
+
<h3 class="doc-typo_title">Default tags style</h3>
|
|
5
|
+
|
|
6
|
+
<div>Default block</div>
|
|
7
|
+
<small>Default small text</small>
|
|
8
|
+
<p>Default paragraph</p>
|
|
9
|
+
<h5>Default Heading 5 300/400</h5>
|
|
10
|
+
<h4>Default Heading 4 400/500</h4>
|
|
11
|
+
<h3>Default Heading 3 500/600</h3>
|
|
12
|
+
<h2>Default Heading 2 600/700</h2>
|
|
13
|
+
<h1>Default Heading 1 700/800</h1>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="doc-typo_col">
|
|
16
|
+
<h3 class="doc-typo_title">@include typo(*)</h3>
|
|
17
|
+
|
|
18
|
+
<div class="h100">100 Test sample</div>
|
|
19
|
+
<div class="h200">200 Test sample</div>
|
|
20
|
+
<div class="h300">300 Test sample</div>
|
|
21
|
+
<div class="h400">400 Test sample</div>
|
|
22
|
+
<div class="h500">500 Test sample</div>
|
|
23
|
+
<div class="h600">600 Test sample</div>
|
|
24
|
+
<div class="h700">700 Test sample</div>
|
|
25
|
+
<div class="h800">800 Test sample</div>
|
|
26
|
+
<div class="h900">900 Test sample</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<fu-code-view collapse label="Example">{{ example }}</fu-code-view>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import FuCodeView from '@/components/FuCodeView.vue'
|
|
35
|
+
import { ref } from 'vue'
|
|
36
|
+
const example =
|
|
37
|
+
`
|
|
38
|
+
.h200 {
|
|
39
|
+
@include typo(200);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
h4 {
|
|
43
|
+
@include typo(400, 500);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
`
|
|
47
|
+
export default {
|
|
48
|
+
name: 'doc-typo',
|
|
49
|
+
components: { FuCodeView },
|
|
50
|
+
setup(){
|
|
51
|
+
return { example }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style scoped lang="scss">
|
|
57
|
+
.doc-typo {
|
|
58
|
+
&_col {
|
|
59
|
+
@include spacing-padding(400, 0);
|
|
60
|
+
flex: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.h100 {
|
|
64
|
+
@include typo(100);
|
|
65
|
+
}
|
|
66
|
+
.h200 {
|
|
67
|
+
@include typo(200);
|
|
68
|
+
}
|
|
69
|
+
.h300 {
|
|
70
|
+
@include typo(300);
|
|
71
|
+
}
|
|
72
|
+
.h400 {
|
|
73
|
+
@include typo(400);
|
|
74
|
+
}
|
|
75
|
+
.h500 {
|
|
76
|
+
@include typo(500);
|
|
77
|
+
}
|
|
78
|
+
.h600 {
|
|
79
|
+
@include typo(600);
|
|
80
|
+
}
|
|
81
|
+
.h700 {
|
|
82
|
+
@include typo(700);
|
|
83
|
+
}
|
|
84
|
+
.h800 {
|
|
85
|
+
@include typo(800);
|
|
86
|
+
}
|
|
87
|
+
.h900 {
|
|
88
|
+
@include typo(900);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&_title {
|
|
92
|
+
margin-bottom: spacing(400);
|
|
93
|
+
color: pal(text-dimm);
|
|
94
|
+
font-weight: normal;
|
|
95
|
+
border-bottom: 1px solid color(grey200);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</style>
|
package/src/main.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import App from './App.vue'
|
|
3
|
-
import router from './router.js'
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { createApp } from 'vue'
|
|
2
|
+
import App from './App.vue'
|
|
3
|
+
import router from './router.js'
|
|
4
|
+
|
|
5
|
+
import '/reset.scss'
|
|
6
|
+
import '/root.scss'
|
|
7
|
+
import './styles.scss'
|
|
8
|
+
|
|
9
|
+
createApp(App).use(router).mount('#app')
|
package/src/router.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
+
|
|
3
|
+
import Home from '@/Home.vue'
|
|
4
|
+
|
|
5
|
+
import DocButton from '@/docs/DocButton.vue'
|
|
6
|
+
import DocTypo from '@/docs/DocTypo.vue'
|
|
7
|
+
import DocSelect from '@/docs/DocSelect.vue'
|
|
8
|
+
import DocText from '@/docs/DocText.vue'
|
|
9
|
+
import DocTextarea from '@/docs/DocTextarea.vue'
|
|
10
|
+
import DocSandbox from '@/docs/DocSandbox.vue'
|
|
11
|
+
import DocSidebar from '@/docs/DocSidebar.vue'
|
|
12
|
+
|
|
13
|
+
const routes = [
|
|
14
|
+
{ path: '/', name: 'Home', component: Home },
|
|
15
|
+
{ path: '/sandbox', name: 'DocSandbox', component: DocSandbox },
|
|
16
|
+
{ path: '/typo', name: 'DocTypo', component: DocTypo },
|
|
17
|
+
{ path: '/button', name: 'DocButton', component: DocButton },
|
|
18
|
+
{ path: '/select', name: 'DocSelect', component: DocSelect },
|
|
19
|
+
{ path: '/text', name: 'DocText', component: DocText },
|
|
20
|
+
{ path: '/textarea', name: 'DocTextarea', component: DocTextarea },
|
|
21
|
+
{ path: '/sidebar', name: 'DocSidebar', component: DocSidebar },
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
const router = createRouter({
|
|
25
|
+
history: createWebHistory(process.env.BASE_URL),
|
|
26
|
+
routes,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export default router
|
package/src/scss/colors.scss
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
@
|
|
1
|
+
@function pal($color-code, $opacity:1) {
|
|
2
|
+
@if ($opacity < 1) {
|
|
3
|
+
@return rgba(var(--pal-#{$color-code}), #{$opacity})
|
|
4
|
+
} @else {
|
|
5
|
+
@return rgb(var(--pal-#{$color-code}))
|
|
6
|
+
}
|
|
7
|
+
}
|
|
2
8
|
|
|
3
|
-
@function
|
|
4
|
-
@
|
|
9
|
+
@function pal-acc($color-code, $opacity:1) {
|
|
10
|
+
@if ($opacity < 1) {
|
|
11
|
+
@return rgba(var(--pal-acc-#{$color-code}), #{$opacity})
|
|
12
|
+
} @else {
|
|
13
|
+
@return rgb(var(--pal-acc-#{$color-code}))
|
|
14
|
+
}
|
|
5
15
|
}
|
|
6
16
|
|
|
7
|
-
@function
|
|
17
|
+
@function color($color-code, $opacity:1) {
|
|
8
18
|
@if ($opacity < 1) {
|
|
9
|
-
@return rgba(var(
|
|
19
|
+
@return rgba(var(--rgb-#{$color-code}), #{$opacity})
|
|
10
20
|
} @else {
|
|
11
|
-
@return rgb(var(
|
|
21
|
+
@return rgb(var(--rgb-#{$color-code}))
|
|
12
22
|
}
|
|
13
23
|
}
|
package/src/scss/typo.scss
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//
|
|
1
|
+
@mixin typo($h, $l:null) {
|
|
2
|
+
font-size: var(--typo-h#{$h});
|
|
4
3
|
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
line-height: var(--typo-l#{$h});
|
|
8
|
-
@if ($weight) {
|
|
9
|
-
font-weight: $weight;
|
|
4
|
+
@if ($l) {
|
|
5
|
+
line-height: var(--typo-lh#{$l});
|
|
10
6
|
}
|
|
11
7
|
}
|
|
12
8
|
|
|
13
|
-
//
|
|
14
|
-
// LAYOUT SPACING
|
|
15
|
-
//
|
|
16
|
-
|
|
17
9
|
@function spacing($spacing-code: null) {
|
|
18
10
|
@if (
|
|
19
11
|
$spacing-code == 0 or
|
|
20
|
-
$spacing-code == 0px or // redundant
|
|
21
12
|
$spacing-code == auto or
|
|
22
13
|
$spacing-code == unset or
|
|
23
14
|
$spacing-code == null
|
|
@@ -25,7 +16,7 @@
|
|
|
25
16
|
@return $spacing-code;
|
|
26
17
|
}
|
|
27
18
|
|
|
28
|
-
@return var(--lt
|
|
19
|
+
@return var(--lt-sp#{$spacing-code});
|
|
29
20
|
}
|
|
30
21
|
|
|
31
22
|
@mixin spacing-prop($prop, $t, $r: null, $b: null, $l: null) {
|