fu-kit 0.7.2 → 1.0.0
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/LICENCE.txt +20 -20
- package/README.md +21 -21
- package/package.json +44 -42
- package/src/components/UIButtonRoute.vue +79 -0
- package/src/components/UiButton.vue +202 -169
- package/src/components/UiButtonLink.vue +74 -74
- package/src/components/UiCheck.vue +206 -206
- package/src/components/UiCodeInput.vue +47 -36
- package/src/components/UiCopy.vue +88 -88
- package/src/components/UiDropdown.vue +109 -109
- package/src/components/UiDropdownItem.vue +66 -66
- package/src/components/UiIcon.vue +29 -29
- package/src/components/UiIconProvider.vue +511 -32
- package/src/components/UiImg.vue +72 -0
- package/src/components/UiModal.vue +103 -103
- package/src/components/UiSelectX.vue +312 -312
- package/src/components/UiSidebar.vue +118 -118
- package/src/components/UiText.vue +121 -121
- package/src/components/UiTextarea.vue +117 -117
- package/src/entry.js +23 -21
- package/src/scss-kit/colors.scss +2 -3
- package/src/scss-kit/media.scss +3 -3
- package/src/scss-kit/pal_dark.scss +6 -6
- package/src/scss-kit/pal_fu.scss +8 -8
- package/src/scss-kit/pal_light.scss +6 -6
- package/src/scss-kit/typo.scss +39 -39
- package/src/scss-kit/typo_default.scss +4 -2
- package/src/scss-kit/ui.scss +49 -49
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-img">
|
|
3
|
+
<img :src="src"
|
|
4
|
+
:alt="alt"
|
|
5
|
+
@load="isLoaded = true"
|
|
6
|
+
@error="err = true"
|
|
7
|
+
class="ui-img_image"
|
|
8
|
+
:class="{'_loading': !isLoaded}"
|
|
9
|
+
/>
|
|
10
|
+
<div v-if="!isLoaded && !err" class="ui-img_overlay">...</div>
|
|
11
|
+
<div v-if="err" class="ui-img_overlay _err">Ops!<br />Failed to load image.</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { ref } from 'vue'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'ui-img',
|
|
20
|
+
props: {
|
|
21
|
+
src: String,
|
|
22
|
+
alt: String,
|
|
23
|
+
},
|
|
24
|
+
setup () {
|
|
25
|
+
const isLoaded = ref(false)
|
|
26
|
+
const err = ref(false)
|
|
27
|
+
|
|
28
|
+
return { err, isLoaded }
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style scoped lang="scss">
|
|
36
|
+
.ui-img {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: stretch;
|
|
39
|
+
align-items: stretch;
|
|
40
|
+
position: relative;
|
|
41
|
+
object-fit: cover;
|
|
42
|
+
overflow: inherit;
|
|
43
|
+
|
|
44
|
+
&_overlay {
|
|
45
|
+
@include typo(100);
|
|
46
|
+
|
|
47
|
+
position: absolute;
|
|
48
|
+
left: 50%;
|
|
49
|
+
top: 50%;
|
|
50
|
+
transform: translate(-50%, -50%);
|
|
51
|
+
text-align: center;
|
|
52
|
+
|
|
53
|
+
&._err {
|
|
54
|
+
padding: spacing(200, 300);
|
|
55
|
+
color: var(--pal-negative-acc);
|
|
56
|
+
background: rgba(var(--rgb-negative), 0.3);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&_image {
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
object-fit: cover;
|
|
64
|
+
aspect-ratio: inherit;
|
|
65
|
+
transition: all linear 500ms;
|
|
66
|
+
|
|
67
|
+
&._loading {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="{'_shown':isOpen}" class="ui-modal" @click.self="$emit('close')">
|
|
3
|
-
<transition name="bounce">
|
|
4
|
-
<div v-if="isOpen" class="ui-modal_window">
|
|
5
|
-
<ui-button-link class="ui-modal_window-close" @click="$emit('close')">
|
|
6
|
-
<ui-icon class="ui-modal_window-close-icon" name="cross" />
|
|
7
|
-
</ui-button-link>
|
|
8
|
-
<slot />
|
|
9
|
-
</div>
|
|
10
|
-
</transition>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<script>
|
|
14
|
-
import { defineComponent } from 'vue'
|
|
15
|
-
|
|
16
|
-
import UiButtonLink from './UiButtonLink.vue'
|
|
17
|
-
import UiIcon from './UiIcon.vue'
|
|
18
|
-
|
|
19
|
-
export default defineComponent({
|
|
20
|
-
name: 'ui-modal',
|
|
21
|
-
components: { UiButtonLink, UiIcon },
|
|
22
|
-
emits: [ 'close' ],
|
|
23
|
-
props: {
|
|
24
|
-
isOpen: { type: Boolean, default: false },
|
|
25
|
-
},
|
|
26
|
-
watch: {
|
|
27
|
-
isOpen (val) {
|
|
28
|
-
if (val) document.body.style.overflow = 'hidden'
|
|
29
|
-
else document.body.style.overflow = 'visible'
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<style lang="scss" scoped>
|
|
36
|
-
@import "../../scss";
|
|
37
|
-
|
|
38
|
-
.ui-modal {
|
|
39
|
-
position: fixed;
|
|
40
|
-
left: 0;
|
|
41
|
-
top: 0;
|
|
42
|
-
right: 0;
|
|
43
|
-
bottom: 0;
|
|
44
|
-
z-index: var(--lt-z-nav);
|
|
45
|
-
background-color: transparent;
|
|
46
|
-
transition-timing-function: linear;
|
|
47
|
-
transition-duration: 200ms;
|
|
48
|
-
transition-property: background-color, visibility;
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
visibility: hidden;
|
|
51
|
-
display: flex;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
align-items: flex-start;
|
|
54
|
-
overflow: auto;
|
|
55
|
-
padding: spacing(300);
|
|
56
|
-
|
|
57
|
-
&._shown {
|
|
58
|
-
background: var(--pal-overlay);
|
|
59
|
-
visibility: visible;
|
|
60
|
-
pointer-events: unset;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&_window {
|
|
64
|
-
@include scrollbar-awesome();
|
|
65
|
-
|
|
66
|
-
position: relative;
|
|
67
|
-
margin: auto;
|
|
68
|
-
border-radius: var(--ui-lt-border-radius);
|
|
69
|
-
background: var(--pal-
|
|
70
|
-
max-width: 100vw;
|
|
71
|
-
|
|
72
|
-
&-close {
|
|
73
|
-
position: absolute;
|
|
74
|
-
right: spacing(400);
|
|
75
|
-
top: spacing(400);
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
|
|
78
|
-
&-icon {
|
|
79
|
-
--icon-size: 24px;
|
|
80
|
-
--icon-color: var(--pal-grey800);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.bounce-enter-active {
|
|
87
|
-
animation: slide-down 200ms;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.bounce-leave-active {
|
|
91
|
-
animation: slide-down 200ms reverse;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@keyframes slide-down {
|
|
95
|
-
0% {
|
|
96
|
-
transform: translateY(-20px);
|
|
97
|
-
opacity: 0;
|
|
98
|
-
}
|
|
99
|
-
100% {
|
|
100
|
-
transform: translateX(0);
|
|
101
|
-
opacity: 1;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="{'_shown':isOpen}" class="ui-modal" @click.self="$emit('close')">
|
|
3
|
+
<transition name="bounce">
|
|
4
|
+
<div v-if="isOpen" class="ui-modal_window">
|
|
5
|
+
<ui-button-link class="ui-modal_window-close" @click="$emit('close')">
|
|
6
|
+
<ui-icon class="ui-modal_window-close-icon" name="cross" />
|
|
7
|
+
</ui-button-link>
|
|
8
|
+
<slot />
|
|
9
|
+
</div>
|
|
10
|
+
</transition>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script>
|
|
14
|
+
import { defineComponent } from 'vue'
|
|
15
|
+
|
|
16
|
+
import UiButtonLink from './UiButtonLink.vue'
|
|
17
|
+
import UiIcon from './UiIcon.vue'
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: 'ui-modal',
|
|
21
|
+
components: { UiButtonLink, UiIcon },
|
|
22
|
+
emits: [ 'close' ],
|
|
23
|
+
props: {
|
|
24
|
+
isOpen: { type: Boolean, default: false },
|
|
25
|
+
},
|
|
26
|
+
watch: {
|
|
27
|
+
isOpen (val) {
|
|
28
|
+
if (val) document.body.style.overflow = 'hidden'
|
|
29
|
+
else document.body.style.overflow = 'visible'
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style lang="scss" scoped>
|
|
36
|
+
@import "../../scss";
|
|
37
|
+
|
|
38
|
+
.ui-modal {
|
|
39
|
+
position: fixed;
|
|
40
|
+
left: 0;
|
|
41
|
+
top: 0;
|
|
42
|
+
right: 0;
|
|
43
|
+
bottom: 0;
|
|
44
|
+
z-index: var(--lt-z-nav);
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
transition-timing-function: linear;
|
|
47
|
+
transition-duration: 200ms;
|
|
48
|
+
transition-property: background-color, visibility;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
overflow: auto;
|
|
55
|
+
padding: spacing(300);
|
|
56
|
+
|
|
57
|
+
&._shown {
|
|
58
|
+
background: var(--pal-overlay);
|
|
59
|
+
visibility: visible;
|
|
60
|
+
pointer-events: unset;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&_window {
|
|
64
|
+
@include scrollbar-awesome();
|
|
65
|
+
|
|
66
|
+
position: relative;
|
|
67
|
+
margin: auto;
|
|
68
|
+
border-radius: var(--ui-lt-border-radius);
|
|
69
|
+
background: var(--pal-back);
|
|
70
|
+
max-width: 100vw;
|
|
71
|
+
|
|
72
|
+
&-close {
|
|
73
|
+
position: absolute;
|
|
74
|
+
right: spacing(400);
|
|
75
|
+
top: spacing(400);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
|
|
78
|
+
&-icon {
|
|
79
|
+
--icon-size: 24px;
|
|
80
|
+
--icon-color: var(--pal-grey800);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.bounce-enter-active {
|
|
87
|
+
animation: slide-down 200ms;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.bounce-leave-active {
|
|
91
|
+
animation: slide-down 200ms reverse;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes slide-down {
|
|
95
|
+
0% {
|
|
96
|
+
transform: translateY(-20px);
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
100% {
|
|
100
|
+
transform: translateX(0);
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
104
|
</style>
|