fu-kit 1.1.3 → 1.1.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/package.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<button
|
|
3
3
|
v-bind="{
|
|
4
4
|
...$attrs,
|
|
5
|
+
disabled,
|
|
5
6
|
type: $attrs.type || 'button',
|
|
6
7
|
class: [
|
|
7
8
|
'ui-button',
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
>
|
|
16
17
|
<slot />
|
|
17
18
|
<ui-icon v-if="isLoading" class="ui-button_loader" name="spinner" />
|
|
19
|
+
|
|
18
20
|
</button>
|
|
19
21
|
</template>
|
|
20
22
|
|
|
@@ -27,6 +29,7 @@ export default defineComponent({
|
|
|
27
29
|
name: 'ui-button',
|
|
28
30
|
components: { UiIcon },
|
|
29
31
|
props: {
|
|
32
|
+
disabled: { type: Boolean, default: false },
|
|
30
33
|
hollow: { type: Boolean, default: false },
|
|
31
34
|
naked: { type: Boolean, default: false },
|
|
32
35
|
isLoading: { type: Boolean, default: false },
|
|
@@ -97,6 +100,7 @@ export default defineComponent({
|
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
&:disabled {
|
|
103
|
+
cursor: default;
|
|
100
104
|
color: var(--ui-pal-disabled-border);
|
|
101
105
|
box-shadow: none;
|
|
102
106
|
}
|
|
@@ -125,6 +129,7 @@ export default defineComponent({
|
|
|
125
129
|
&:disabled {
|
|
126
130
|
color: var(--ui-pal-disabled-border);
|
|
127
131
|
box-shadow: none;
|
|
132
|
+
cursor: default;
|
|
128
133
|
}
|
|
129
134
|
}
|
|
130
135
|
|
|
@@ -155,7 +160,7 @@ export default defineComponent({
|
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
&:disabled {
|
|
158
|
-
cursor:
|
|
163
|
+
cursor: default;
|
|
159
164
|
background: var(--ui-pal-disabled);
|
|
160
165
|
border-color: var(--ui-pal-disabled-border);
|
|
161
166
|
border-style: var(--ui-lt-disabled-border-style);
|
|
@@ -168,7 +173,7 @@ export default defineComponent({
|
|
|
168
173
|
//
|
|
169
174
|
|
|
170
175
|
&._loading {
|
|
171
|
-
color: transparent;
|
|
176
|
+
color: transparent !important;
|
|
172
177
|
}
|
|
173
178
|
|
|
174
179
|
&_loader {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:checked="modelValue"
|
|
11
11
|
class="ui-check_input"
|
|
12
12
|
v-bind="{...$attrs, disabled: isDisabled, type: 'checkbox', class: undefined, style: undefined}"
|
|
13
|
-
@
|
|
13
|
+
@change="handleChange"
|
|
14
14
|
>
|
|
15
15
|
<span
|
|
16
16
|
:class="{
|
|
@@ -40,20 +40,24 @@ export default defineComponent({
|
|
|
40
40
|
isLoading: { type: Boolean, default: false },
|
|
41
41
|
disabled: { type: Boolean, default: false },
|
|
42
42
|
},
|
|
43
|
-
emits: [ 'update:modelValue' ],
|
|
44
|
-
setup (props) {
|
|
43
|
+
emits: [ 'update:modelValue', 'change', 'input' ],
|
|
44
|
+
setup (props, { emit }) {
|
|
45
45
|
const inputRef = ref(null)
|
|
46
46
|
const isDisabled = computed(() => props.disabled || props.disabled === '')
|
|
47
47
|
|
|
48
|
-
|
|
49
48
|
const mouseUp = () => {
|
|
50
49
|
// oof
|
|
51
|
-
setTimeout(() =>
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
setTimeout(() => inputRef.value.blur(), 0)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const handleChange = (event) => {
|
|
54
|
+
event.stopPropagation()
|
|
55
|
+
emit('update:modelValue', event.target.checked)
|
|
56
|
+
emit('change', event)
|
|
57
|
+
emit('input', event)
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
return { isDisabled, inputRef, mouseUp }
|
|
60
|
+
return { isDisabled, inputRef, mouseUp, handleChange }
|
|
57
61
|
},
|
|
58
62
|
})
|
|
59
63
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:class="{'_disabled':
|
|
3
|
+
:class="{'_disabled': disabled || $attrs.readOnly !== undefined }"
|
|
4
4
|
class="ui-text"
|
|
5
5
|
v-bind="{ class: $attrs.class }"
|
|
6
6
|
>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
ref="textarea"
|
|
9
9
|
:value="modelValue"
|
|
10
10
|
class="ui-text_textarea"
|
|
11
|
-
v-bind="{...$attrs, class: undefined}"
|
|
11
|
+
v-bind="{...$attrs, disabled, class: undefined}"
|
|
12
12
|
@input="handleInput"
|
|
13
13
|
/>
|
|
14
14
|
</div>
|
|
@@ -20,6 +20,8 @@ import { defineComponent, onMounted, ref } from 'vue'
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
name: 'ui-textarea',
|
|
22
22
|
props: {
|
|
23
|
+
disabled: { type: Boolean, default: false },
|
|
24
|
+
|
|
23
25
|
modelValue: {
|
|
24
26
|
type: [ String, Number ],
|
|
25
27
|
default: '',
|