@exakt/ui 0.0.6 → 0.0.9
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/dist/module.json +1 -1
- package/dist/runtime/components/e/btn.vue +17 -17
- package/dist/runtime/components/e/container.vue +11 -1
- package/dist/runtime/components/e/dialog.vue +1 -2
- package/dist/runtime/components/e/dropdown.vue +2 -3
- package/dist/runtime/components/e/focus-sheet.vue +1 -1
- package/dist/runtime/components/e/icon.vue +13 -1
- package/dist/runtime/components/e/image-lazy-view.vue +1 -6
- package/dist/runtime/components/e/input/radio.vue +1 -1
- package/dist/runtime/components/e/input/text.vue +23 -11
- package/dist/runtime/components/e/passwordEye.vue +9 -1
- package/dist/runtime/components/e/progress/linear.vue +16 -14
- package/package.json +2 -2
package/dist/module.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
-
class="e-btn
|
|
3
|
+
class="e-btn"
|
|
4
4
|
:style="{ width, justifyContent: justifyWrapper }"
|
|
5
5
|
:type="type"
|
|
6
6
|
:disabled="disabled || loading"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
block,
|
|
12
12
|
rounded: solid,
|
|
13
13
|
'e-disabled': disabled,
|
|
14
|
-
'my-2':solid,
|
|
14
|
+
'my-2': solid,
|
|
15
15
|
loading,
|
|
16
16
|
fab,
|
|
17
17
|
loadingGradient,
|
|
@@ -36,14 +36,13 @@
|
|
|
36
36
|
<e-loading-spinner />
|
|
37
37
|
</div>
|
|
38
38
|
<span class="actual-content flex-center">
|
|
39
|
-
|
|
40
39
|
<slot />
|
|
41
40
|
</span>
|
|
42
41
|
</div>
|
|
43
42
|
</button>
|
|
44
43
|
</template>
|
|
45
44
|
<script lang="ts" setup>
|
|
46
|
-
import { computed,
|
|
45
|
+
import { computed, useNuxtApp } from "#imports";
|
|
47
46
|
//import { IonSpinner } from "@ionic/vue";
|
|
48
47
|
const { $exakt } = useNuxtApp();
|
|
49
48
|
const props = withDefaults(
|
|
@@ -62,15 +61,16 @@ const props = withDefaults(
|
|
|
62
61
|
disabled?: boolean;
|
|
63
62
|
type?: "button" | "submit" | "reset";
|
|
64
63
|
}>(),
|
|
65
|
-
{
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
background: "primary",
|
|
67
|
+
solid: true,
|
|
68
|
+
width: undefined,
|
|
69
|
+
justify: undefined,
|
|
70
|
+
color: undefined,
|
|
71
|
+
}
|
|
66
72
|
);
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
74
|
const justifyWrapper = computed(() => {
|
|
75
75
|
if (props.justify === "space-between") {
|
|
76
76
|
return "stretch";
|
|
@@ -104,7 +104,9 @@ const backgroundColorRgb = computed(() => {
|
|
|
104
104
|
return parseColor(parsedBackgroundProp.value);
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
const parsedBackgroundProp = computed(() =>
|
|
107
|
+
const parsedBackgroundProp = computed(() =>
|
|
108
|
+
$exakt.parseColor(props.background)
|
|
109
|
+
);
|
|
108
110
|
|
|
109
111
|
const textColor = computed(() => {
|
|
110
112
|
if (props.color) {
|
|
@@ -124,8 +126,8 @@ const textColor = computed(() => {
|
|
|
124
126
|
});
|
|
125
127
|
|
|
126
128
|
const hoverColor = computed(() => {
|
|
127
|
-
if (parsedBackgroundProp.value ===
|
|
128
|
-
return
|
|
129
|
+
if (parsedBackgroundProp.value === "transparent") {
|
|
130
|
+
return "rgba(98, 98, 98, 0.15)";
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
const rgb = backgroundColorRgb.value;
|
|
@@ -182,16 +184,14 @@ const hoverColor = computed(() => {
|
|
|
182
184
|
transition: background 0.8s, color 0.5s, opacity 0.4s;
|
|
183
185
|
|
|
184
186
|
.actual-content {
|
|
185
|
-
|
|
186
187
|
opacity: 0.8;
|
|
187
|
-
transition: opacity 0.5s
|
|
188
|
+
transition: opacity 0.5s;
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
.actual-content {
|
|
192
193
|
opacity: 0;
|
|
193
194
|
}
|
|
194
|
-
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
&:hover {
|
|
@@ -12,7 +12,17 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
<script setup lang="ts">
|
|
15
|
-
|
|
15
|
+
withDefaults(
|
|
16
|
+
defineProps<{
|
|
17
|
+
noBtnPadding: boolean;
|
|
18
|
+
forceFullWidth: boolean;
|
|
19
|
+
|
|
20
|
+
}>(),
|
|
21
|
+
{
|
|
22
|
+
noBtnPadding: false,
|
|
23
|
+
forceFullWidth:false
|
|
24
|
+
}
|
|
25
|
+
);
|
|
16
26
|
</script>
|
|
17
27
|
<style lang="scss" scoped>
|
|
18
28
|
.content {
|
|
@@ -28,11 +28,10 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script setup lang="ts">
|
|
31
|
-
|
|
31
|
+
defineProps<{
|
|
32
32
|
modelValue: boolean;
|
|
33
33
|
}>();
|
|
34
34
|
const emit = defineEmits(["update:modelValue"]);
|
|
35
|
-
const state = reactive({ active: false });
|
|
36
35
|
</script>
|
|
37
36
|
<style scoped lang="scss">
|
|
38
37
|
.dialog-wrap {
|
|
@@ -43,10 +43,9 @@
|
|
|
43
43
|
</div>
|
|
44
44
|
</template>
|
|
45
45
|
<script setup lang="ts">
|
|
46
|
-
|
|
46
|
+
import { computed, ref, reactive } from "#imports";
|
|
47
47
|
import _ from "lodash";
|
|
48
48
|
|
|
49
|
-
const { $platform } = useNuxtApp();
|
|
50
49
|
|
|
51
50
|
function parseWidth(input: string | number) {
|
|
52
51
|
const div = document.createElement("div");
|
|
@@ -84,7 +83,7 @@ const updatePosition = () => {
|
|
|
84
83
|
|
|
85
84
|
const debouncedUpdatePosition = _.debounce(updatePosition, 200);
|
|
86
85
|
|
|
87
|
-
const onClick = ({ pageX, pageY }:MouseEvent) => {
|
|
86
|
+
const onClick = (/*{ pageX, pageY }:MouseEvent*/) => {
|
|
88
87
|
state.active = !state.active;
|
|
89
88
|
|
|
90
89
|
if (state.active) {
|
|
@@ -9,7 +9,19 @@
|
|
|
9
9
|
</svg>
|
|
10
10
|
</template>
|
|
11
11
|
<script setup lang="ts">
|
|
12
|
-
|
|
12
|
+
withDefaults(
|
|
13
|
+
defineProps<{
|
|
14
|
+
icon: string;
|
|
15
|
+
color: string;
|
|
16
|
+
size: number | string;
|
|
17
|
+
}>(),
|
|
18
|
+
{
|
|
19
|
+
icon: "",
|
|
20
|
+
color: "",
|
|
21
|
+
size: "21",
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
13
25
|
</script>
|
|
14
26
|
<style scoped>
|
|
15
27
|
svg {
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
class="rounded lv-blur fullsize border-rad-custom"
|
|
28
28
|
:class="{ hidden: state.loaded, rounded: !borderRadius }"
|
|
29
29
|
/>
|
|
30
|
-
<!-- @transitionend.passive="transitionend" -->
|
|
31
30
|
</div>
|
|
32
31
|
|
|
33
32
|
<div
|
|
@@ -146,11 +145,7 @@ const dimensionFix = (value) => {
|
|
|
146
145
|
return value;
|
|
147
146
|
};
|
|
148
147
|
|
|
149
|
-
|
|
150
|
-
if (state.loaded) {
|
|
151
|
-
state.renderBlur = false;
|
|
152
|
-
}
|
|
153
|
-
};
|
|
148
|
+
|
|
154
149
|
|
|
155
150
|
const onIntersect = (intersecting) => {
|
|
156
151
|
if (intersecting && !state.intersected) {
|
|
@@ -44,9 +44,7 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
</template>
|
|
46
46
|
<script setup lang="ts">
|
|
47
|
-
import { ref, watch } from "
|
|
48
|
-
const input = ref<HTMLInputElement>();
|
|
49
|
-
const emit = defineEmits(["update:modelValue"]);
|
|
47
|
+
import { ref, watch, reactive, computed } from "#imports";
|
|
50
48
|
|
|
51
49
|
const inputState = reactive({
|
|
52
50
|
overtakeStyle: "",
|
|
@@ -54,15 +52,21 @@ const inputState = reactive({
|
|
|
54
52
|
focused: false,
|
|
55
53
|
});
|
|
56
54
|
|
|
55
|
+
const input = ref<HTMLInputElement>();
|
|
56
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
57
|
+
|
|
57
58
|
const focus = () => {
|
|
58
|
-
if(!input.value){
|
|
59
|
-
return
|
|
59
|
+
if (!input.value) {
|
|
60
|
+
return;
|
|
60
61
|
}
|
|
61
62
|
const length = input.value.value.length;
|
|
62
63
|
|
|
63
64
|
// Not all input types support setSelectionRange
|
|
64
|
-
if
|
|
65
|
-
|
|
65
|
+
if (
|
|
66
|
+
!inputState.focused &&
|
|
67
|
+
["text", "search", "URL", "tel", "password"].includes(props.type)
|
|
68
|
+
) {
|
|
69
|
+
input.value.setSelectionRange(length, length);
|
|
66
70
|
}
|
|
67
71
|
input.value.focus();
|
|
68
72
|
};
|
|
@@ -86,7 +90,15 @@ const props = withDefaults(
|
|
|
86
90
|
spellcheck?: boolean;
|
|
87
91
|
height?: string;
|
|
88
92
|
}>(),
|
|
89
|
-
{
|
|
93
|
+
{
|
|
94
|
+
icon: undefined,
|
|
95
|
+
label: "Search",
|
|
96
|
+
solid: false,
|
|
97
|
+
type: "text",
|
|
98
|
+
modelValue: "",
|
|
99
|
+
autocomplete: "off",
|
|
100
|
+
height: "unset",
|
|
101
|
+
}
|
|
90
102
|
);
|
|
91
103
|
|
|
92
104
|
watch(
|
|
@@ -103,7 +115,7 @@ const getInputStyle = (prop: string) => {
|
|
|
103
115
|
return c;
|
|
104
116
|
};
|
|
105
117
|
|
|
106
|
-
const transitionEnd = (
|
|
118
|
+
const transitionEnd = () => {
|
|
107
119
|
inputState.autofilled = !inputState.autofilled;
|
|
108
120
|
|
|
109
121
|
if (inputState.autofilled) {
|
|
@@ -133,11 +145,11 @@ const transitionEnd = (a) => {
|
|
|
133
145
|
width: 100%;
|
|
134
146
|
outline: none;
|
|
135
147
|
resize: none;
|
|
136
|
-
margin: var(--e-core-padding-x)/2;
|
|
148
|
+
margin: var(--e-core-padding-x) / 2;
|
|
137
149
|
font-size: 1rem;
|
|
138
150
|
color: var(--e-color-dark);
|
|
139
151
|
font-family: var(--e-font-family);
|
|
140
|
-
height:v-bind(height);
|
|
152
|
+
height: v-bind(height);
|
|
141
153
|
|
|
142
154
|
&:-webkit-autofill {
|
|
143
155
|
// Expose a hook for JavaScript when auto fill is shown.
|
|
@@ -9,5 +9,13 @@
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { mdiEye, mdiEyeOff } from "@mdi/js";
|
|
11
11
|
const emit = defineEmits(["update:modelValue"]);
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
withDefaults(
|
|
14
|
+
defineProps<{
|
|
15
|
+
modelValue: boolean;
|
|
16
|
+
}>(),
|
|
17
|
+
{
|
|
18
|
+
modelValue: false,
|
|
19
|
+
}
|
|
20
|
+
);
|
|
13
21
|
</script>
|
|
@@ -8,24 +8,26 @@
|
|
|
8
8
|
</Transition>
|
|
9
9
|
</template>
|
|
10
10
|
<script setup lang="ts">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
import { computed } from "vue";
|
|
12
|
+
const props = withDefaults(
|
|
13
|
+
defineProps<{
|
|
14
|
+
modelValue: boolean;
|
|
15
|
+
position?: "top" | "bottom" | null;
|
|
16
|
+
}>(),
|
|
17
|
+
{
|
|
18
|
+
position: "bottom",
|
|
19
|
+
}
|
|
20
|
+
);
|
|
18
21
|
|
|
19
22
|
const posClass = computed(() => {
|
|
20
|
-
if (props.position ===
|
|
21
|
-
return
|
|
22
|
-
} else if (props.position ===
|
|
23
|
-
return
|
|
24
|
-
|
|
23
|
+
if (props.position === "top") {
|
|
24
|
+
return "pos-top";
|
|
25
|
+
} else if (props.position === "bottom") {
|
|
26
|
+
return "pos-bottom";
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
return null
|
|
28
|
-
})
|
|
29
|
+
return null;
|
|
30
|
+
});
|
|
29
31
|
</script>
|
|
30
32
|
<style scoped lang="scss">
|
|
31
33
|
.pos-top,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exakt/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "A UI library for Nuxt.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
"url": "https://github.com/wd-4000/exakt/issues"
|
|
64
64
|
},
|
|
65
65
|
"homepage": "https://github.com/wd-4000/exakt#readme"
|
|
66
|
-
}
|
|
66
|
+
}
|