@exakt/ui 0.0.3 → 0.0.5
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 +13 -13
- package/dist/module.d.ts +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -10
- package/dist/runtime/components/e/alert.vue +5 -2
- package/dist/runtime/components/e/app-bars.vue +74 -39
- package/dist/runtime/components/e/avatar.vue +7 -2
- package/dist/runtime/components/e/btn.vue +94 -60
- package/dist/runtime/components/e/container.vue +23 -16
- package/dist/runtime/components/e/dialog.vue +14 -6
- package/dist/runtime/components/e/dropdown.vue +57 -22
- package/dist/runtime/components/e/focus-sheet.vue +11 -9
- package/dist/runtime/components/e/icon.vue +1 -1
- package/dist/runtime/components/e/iconButton.vue +8 -2
- package/dist/runtime/components/e/image-lazy-view.vue +5 -3
- package/dist/runtime/components/e/input/radio.vue +28 -12
- package/dist/runtime/components/e/input/text.vue +34 -18
- package/dist/runtime/components/e/link.vue +9 -2
- package/dist/runtime/components/e/loading-spinner.vue +57 -32
- package/dist/runtime/components/e/{nav.vue → nav/bar.vue} +11 -4
- package/dist/runtime/components/e/nav/btn.vue +138 -0
- package/dist/runtime/components/e/passwordEye.vue +3 -1
- package/dist/runtime/components/e/progress/gradient.vue +36 -23
- package/dist/runtime/components/e/progress/linear.vue +11 -2
- package/dist/runtime/components/e/tr/scale.vue +4 -4
- package/dist/runtime/css/util.scss +177 -0
- package/dist/runtime/plugin.mjs +1 -1
- package/package.json +2 -2
- package/dist/runtime/css/util.css +0 -565
- /package/dist/runtime/css/{main.scssx → main.scss} +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-stretch nav-btn">
|
|
3
|
+
<e-link
|
|
4
|
+
:to="to"
|
|
5
|
+
class="flex-stretch fullwidth"
|
|
6
|
+
>
|
|
7
|
+
<e-btn
|
|
8
|
+
:active="active"
|
|
9
|
+
class="button fullwidth"
|
|
10
|
+
:inactive="inactive"
|
|
11
|
+
:solid="false"
|
|
12
|
+
background="transparent"
|
|
13
|
+
:class="{ responsive }"
|
|
14
|
+
>
|
|
15
|
+
<div class="content">
|
|
16
|
+
<div
|
|
17
|
+
v-if="icon"
|
|
18
|
+
class="icon-wrapper flex-center"
|
|
19
|
+
:class="{ 'mr-2': label, 'mx-4': !label }"
|
|
20
|
+
>
|
|
21
|
+
<e-icon
|
|
22
|
+
:icon="icon"
|
|
23
|
+
class="icon"
|
|
24
|
+
:size="size"
|
|
25
|
+
/>
|
|
26
|
+
<transition name="fade">
|
|
27
|
+
<div
|
|
28
|
+
v-if="alert"
|
|
29
|
+
class="icon-alert"
|
|
30
|
+
/>
|
|
31
|
+
</transition>
|
|
32
|
+
</div>
|
|
33
|
+
<p v-if="label">
|
|
34
|
+
{{ label }}
|
|
35
|
+
</p>
|
|
36
|
+
</div>
|
|
37
|
+
<slot />
|
|
38
|
+
</e-btn>
|
|
39
|
+
</e-link>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import { useRoute } from "vue-router";
|
|
44
|
+
import { computed } from "vue";
|
|
45
|
+
|
|
46
|
+
const props = withDefaults(
|
|
47
|
+
defineProps<{
|
|
48
|
+
to?: string;
|
|
49
|
+
label?: string;
|
|
50
|
+
icon?: string;
|
|
51
|
+
size?: string;
|
|
52
|
+
responsive?: boolean;
|
|
53
|
+
alert?: boolean;
|
|
54
|
+
}>(),
|
|
55
|
+
{ to: "", label: "", icon: "", responsive: true, size: "20" }
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const route = useRoute();
|
|
59
|
+
|
|
60
|
+
const aspect = computed(() => {
|
|
61
|
+
if (props.icon) {
|
|
62
|
+
return "3/2";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return "unset";
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const active = computed(() => {
|
|
69
|
+
return route && route.path === props.to;
|
|
70
|
+
});
|
|
71
|
+
const inactive = computed(() => {
|
|
72
|
+
return !active.value && Boolean(props.icon);
|
|
73
|
+
});
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style scoped lang="scss">
|
|
77
|
+
|
|
78
|
+
.nav-btn{
|
|
79
|
+
flex-grow: 1;
|
|
80
|
+
}
|
|
81
|
+
.button:first-child {
|
|
82
|
+
aspect-ratio: unset;
|
|
83
|
+
|
|
84
|
+
.content {
|
|
85
|
+
display: flex;
|
|
86
|
+
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
|
|
89
|
+
justify-content: center;
|
|
90
|
+
align-content: center;
|
|
91
|
+
justify-items: center;
|
|
92
|
+
align-items: center;
|
|
93
|
+
|
|
94
|
+
.icon {
|
|
95
|
+
font-size: 1.5rem;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.icon-wrapper {
|
|
101
|
+
position: relative;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
aspect-ratio: 1;
|
|
104
|
+
|
|
105
|
+
.icon-alert {
|
|
106
|
+
// Add a blue dot to the bottom right of the icon
|
|
107
|
+
content: "";
|
|
108
|
+
position: absolute;
|
|
109
|
+
width: 0.5rem;
|
|
110
|
+
z-index: 2;
|
|
111
|
+
height: 0.5rem;
|
|
112
|
+
border-radius: 100%;
|
|
113
|
+
bottom: 0.1rem;
|
|
114
|
+
right: 0px;
|
|
115
|
+
background-color: var(--t-color-primary);
|
|
116
|
+
outline: 0.1rem solid var(--t-elev-2);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media screen and (max-width: $e-md-screen-breakpoint) {
|
|
121
|
+
.button.responsive {
|
|
122
|
+
aspect-ratio: v-bind(aspect);
|
|
123
|
+
|
|
124
|
+
p {
|
|
125
|
+
margin: 0px;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.content {
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
|
|
132
|
+
.icon-wrapper {
|
|
133
|
+
margin-right: 0rem;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div />
|
|
3
3
|
</template>
|
|
4
4
|
<script setup lang="ts">
|
|
5
5
|
const { $exakt } = useNuxtApp()
|
|
@@ -12,31 +12,44 @@ const props = withDefaults(
|
|
|
12
12
|
const parsedColor = computed(() => $exakt.parseColor(props.color, 'rgb'));
|
|
13
13
|
|
|
14
14
|
</script>
|
|
15
|
-
<style scoped>
|
|
15
|
+
<style scoped lang="scss">
|
|
16
16
|
div {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
display: block;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
--pc: v-bind(parsedColor);
|
|
21
|
+
background-image: linear-gradient(90deg,
|
|
22
|
+
rgba(var(--pc), 0) 0%,
|
|
23
|
+
rgba(var(--pc), 0.5) 50%,
|
|
24
|
+
rgba(var(--pc), 0) 50.1%,
|
|
25
|
+
rgba(var(--pc), 0) 100%,
|
|
26
|
+
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
background-size: 200% 100%;
|
|
31
|
+
|
|
32
|
+
animation: pos 3.5s linear infinite;
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
@keyframes pos {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
0%,10% {
|
|
37
|
+
background-position: 100% 0%;
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
40% {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
70% {
|
|
45
|
+
opacity: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
100% {
|
|
49
|
+
background-position: -100% 0%;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
41
54
|
}
|
|
42
55
|
</style>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Transition name="fade">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
v-if="modelValue"
|
|
5
|
+
class="e-progress-linear"
|
|
6
|
+
:class="posClass"
|
|
7
|
+
/>
|
|
4
8
|
</Transition>
|
|
5
9
|
</template>
|
|
6
10
|
<script setup lang="ts">
|
|
@@ -23,7 +27,7 @@ const posClass = computed(() => {
|
|
|
23
27
|
return null
|
|
24
28
|
})
|
|
25
29
|
</script>
|
|
26
|
-
<style scoped>
|
|
30
|
+
<style scoped lang="scss">
|
|
27
31
|
.pos-top,
|
|
28
32
|
.pos-bottom {
|
|
29
33
|
position: absolute !important;
|
|
@@ -40,9 +44,11 @@ const posClass = computed(() => {
|
|
|
40
44
|
|
|
41
45
|
.e-progress-linear {
|
|
42
46
|
position: relative;
|
|
47
|
+
|
|
43
48
|
width: 100%;
|
|
44
49
|
height: 0.2rem;
|
|
45
50
|
overflow: clip;
|
|
51
|
+
|
|
46
52
|
background-color: var(--e-color-elev);
|
|
47
53
|
}
|
|
48
54
|
|
|
@@ -52,6 +58,7 @@ const posClass = computed(() => {
|
|
|
52
58
|
height: 100%;
|
|
53
59
|
width: 100%;
|
|
54
60
|
content: "";
|
|
61
|
+
|
|
55
62
|
background-color: var(--e-color-primary);
|
|
56
63
|
animation: progressLinear 1.8s linear infinite;
|
|
57
64
|
}
|
|
@@ -60,9 +67,11 @@ const posClass = computed(() => {
|
|
|
60
67
|
0% {
|
|
61
68
|
transform: translateX(-40%) scaleX(40%);
|
|
62
69
|
}
|
|
70
|
+
|
|
63
71
|
50% {
|
|
64
72
|
transform: translateX(40%) scaleX(80%);
|
|
65
73
|
}
|
|
74
|
+
|
|
66
75
|
100% {
|
|
67
76
|
transform: translateX(200%) scaleX(100%);
|
|
68
77
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<!-- wrap the built-in Transition component -->
|
|
3
|
+
<Transition name="e-tr-scale">
|
|
4
|
+
<slot /> <!-- pass down slot content -->
|
|
5
|
+
</Transition>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup lang="ts">
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
$directions: (
|
|
2
|
+
"t": "top",
|
|
3
|
+
"r": "right",
|
|
4
|
+
"b": "bottom",
|
|
5
|
+
"l": "left",
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
@for $i from 0 through 6 {
|
|
9
|
+
@each $name, $direction in $directions {
|
|
10
|
+
.m#{$name}-#{$i} {
|
|
11
|
+
margin-#{$direction}: #{0.2rem * $i};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
.my-#{$i} {
|
|
15
|
+
margin-top: #{0.2rem * $i};
|
|
16
|
+
margin-bottom: #{0.2rem * $i};
|
|
17
|
+
}
|
|
18
|
+
.mx-#{$i} {
|
|
19
|
+
margin-left: #{0.2rem * $i};
|
|
20
|
+
margin-right: #{0.2rem * $i};
|
|
21
|
+
}
|
|
22
|
+
.ma-#{$i} {
|
|
23
|
+
margin: #{0.2rem * $i} !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@each $name, $direction in $directions {
|
|
27
|
+
.p#{$name}-#{$i} {
|
|
28
|
+
padding-#{$direction}: #{0.2rem * $i};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.py-#{$i} {
|
|
32
|
+
padding-top: #{0.2rem * $i};
|
|
33
|
+
padding-bottom: #{0.2rem * $i};
|
|
34
|
+
}
|
|
35
|
+
.px-#{$i} {
|
|
36
|
+
padding-left: #{0.2rem * $i};
|
|
37
|
+
padding-right: #{0.2rem * $i};
|
|
38
|
+
}
|
|
39
|
+
.pa-#{$i} {
|
|
40
|
+
padding: #{0.2rem * $i} !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.op-#{$i} {
|
|
44
|
+
opacity: calc(#{$i}/ 6);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Flex */
|
|
49
|
+
|
|
50
|
+
.d-flex {
|
|
51
|
+
display: flex;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.flex-stretch-y {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-content: stretch;
|
|
57
|
+
align-items: stretch;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.flex-stretch-x {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: stretch;
|
|
63
|
+
justify-items: stretch;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.flex-stretch {
|
|
67
|
+
@extend .flex-stretch-x;
|
|
68
|
+
@extend .flex-stretch-y;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.flex-1 {
|
|
72
|
+
flex: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.flex-start {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-content: flex-start;
|
|
78
|
+
justify-content: flex-start;
|
|
79
|
+
justify-items: flex-start;
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.flex-end {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-content: flex-end;
|
|
86
|
+
justify-content: flex-end;
|
|
87
|
+
justify-items: flex-end;
|
|
88
|
+
align-items: flex-end;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.flex-center {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-content: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
justify-items: center;
|
|
96
|
+
align-items: center;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.justify-space-between {
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.flex-column {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Transitions */
|
|
109
|
+
.scale-enter-active,
|
|
110
|
+
.scale-leave-active {
|
|
111
|
+
transition: all 0.15s ease-in-out;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.scale-enter-from,
|
|
115
|
+
.scale-leave-to {
|
|
116
|
+
opacity: 0;
|
|
117
|
+
transform: scale(90%) translateY(-6%);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.fade-enter-active,
|
|
121
|
+
.fade-leave-active {
|
|
122
|
+
transition: all 0.2s ease-in-out;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.fade-enter-from,
|
|
126
|
+
.fade-leave-to {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Other */
|
|
131
|
+
|
|
132
|
+
body {
|
|
133
|
+
background-color: var(--e-color-light);
|
|
134
|
+
color: var(--e-color-dark);
|
|
135
|
+
font-family: var(--e-font-family);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.fullheight {
|
|
139
|
+
height: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.fullwidth {
|
|
143
|
+
width: 100%;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.fullsize {
|
|
147
|
+
@extend .fullheight;
|
|
148
|
+
@extend .fullwidth;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.text-center {
|
|
152
|
+
text-align: center;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.e-blur {
|
|
156
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
|
|
160
|
+
.e-blur {
|
|
161
|
+
backdrop-filter: blur(12px);
|
|
162
|
+
background-color: rgba(255, 255, 255, 0.7);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.e-disabled {
|
|
167
|
+
opacity: 0.7;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
router-link,
|
|
172
|
+
a,
|
|
173
|
+
input,
|
|
174
|
+
label {
|
|
175
|
+
text-decoration: none !important;
|
|
176
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
177
|
+
}
|
package/dist/runtime/plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exakt/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A UI library for Nuxt.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@nuxt/kit": "^3.2.3",
|
|
32
32
|
"blurhash": "^2.0.5",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
|
-
"sass": "^1.
|
|
34
|
+
"sass": "^1.62.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@nuxt/eslint-config": "^0.1.1",
|