@community-release/nx-ui 0.0.37 → 0.0.38
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.d.mts +3 -0
- package/dist/module.d.ts +3 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -0
- package/dist/runtime/components/checkbox.vue +2 -3
- package/dist/runtime/components/label/index.vue +25 -3
- package/dist/runtime/components/select.vue +6 -30
- package/dist/runtime/components/styles/components.less +1 -0
- package/package.json +2 -2
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="component-ui component-ui-checkbox" :class="classes">
|
|
3
3
|
<label>
|
|
4
4
|
<input
|
|
5
5
|
ref="input"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<slot></slot>
|
|
18
18
|
</span>
|
|
19
19
|
</label>
|
|
20
|
-
</
|
|
20
|
+
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script setup>
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
@com-space-micro: var(--ui-space-micro);
|
|
104
104
|
|
|
105
105
|
position: relative;
|
|
106
|
-
display: inline-block;
|
|
107
106
|
text-align: left;
|
|
108
107
|
|
|
109
108
|
.error-wrap {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<label class="component-ui-label" :class="[`tag-size-${size}`, `tag-weight-${weight}
|
|
2
|
+
<label class="component-ui-label" :class="[`tag-size-${size}`, `tag-weight-${weight}`, required ? 'tag-required' : '']">
|
|
3
3
|
<span class="component-ui-label--text">{{ text }}</span>
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</label>
|
|
@@ -22,14 +22,21 @@
|
|
|
22
22
|
type: [String, Number],
|
|
23
23
|
default: comProps.weight,
|
|
24
24
|
},
|
|
25
|
+
required: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
25
29
|
});
|
|
26
30
|
</script>
|
|
27
31
|
|
|
28
32
|
<style lang="less">
|
|
29
33
|
@com-space-micro: var(--ui-space-micro);
|
|
30
|
-
|
|
34
|
+
|
|
31
35
|
@com-font-weight-medium: var(--ui-font-weight-medium);
|
|
32
36
|
|
|
37
|
+
@com-color-header-text: var(--ui-color-header-text);
|
|
38
|
+
@com-color-red: var(--ui-color-red);
|
|
39
|
+
|
|
33
40
|
@com-text-big: var(--ui-text-big);
|
|
34
41
|
@com-text-medium: var(--ui-text-medium);
|
|
35
42
|
@com-text-default: var(--ui-text-default);
|
|
@@ -39,7 +46,8 @@
|
|
|
39
46
|
display: block;
|
|
40
47
|
|
|
41
48
|
.component-ui-label--text {
|
|
42
|
-
|
|
49
|
+
position: relative;
|
|
50
|
+
display: inline-block;
|
|
43
51
|
padding-bottom: @com-space-micro;
|
|
44
52
|
font-weight: @com-font-weight-medium;
|
|
45
53
|
font-size: @com-text-default;
|
|
@@ -57,5 +65,19 @@
|
|
|
57
65
|
&.tag-weight-600 .component-ui-label--text { font-weight: 600; }
|
|
58
66
|
&.tag-weight-500 .component-ui-label--text { font-weight: 500; }
|
|
59
67
|
&.tag-weight-400 .component-ui-label--text { font-weight: 400; }
|
|
68
|
+
|
|
69
|
+
// Required
|
|
70
|
+
&.tag-required {
|
|
71
|
+
.component-ui-label--text:after {
|
|
72
|
+
content: '*';
|
|
73
|
+
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 0;
|
|
76
|
+
right: -0.7em;
|
|
77
|
+
color: @com-color-red;
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
font-size: @com-text-medium;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
60
82
|
}
|
|
61
83
|
</style>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
26
26
|
// Imports
|
|
27
|
-
import { ref, computed, watch, onMounted } from 'vue';
|
|
27
|
+
import { ref, computed, watch, onMounted, nextTick } from 'vue';
|
|
28
28
|
|
|
29
29
|
// Setup
|
|
30
30
|
const props = defineProps({
|
|
@@ -45,10 +45,6 @@ const props = defineProps({
|
|
|
45
45
|
type: Array,
|
|
46
46
|
default: () => []
|
|
47
47
|
},
|
|
48
|
-
required: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: false
|
|
51
|
-
},
|
|
52
48
|
disabled: {
|
|
53
49
|
type: Boolean,
|
|
54
50
|
default: false
|
|
@@ -61,10 +57,6 @@ const props = defineProps({
|
|
|
61
57
|
type: [String, Number],
|
|
62
58
|
default: 'none'
|
|
63
59
|
},
|
|
64
|
-
block: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false
|
|
67
|
-
},
|
|
68
60
|
});
|
|
69
61
|
|
|
70
62
|
const emit = defineEmits(['update:modelValue']);
|
|
@@ -96,8 +88,6 @@ const classes = computed(() => {
|
|
|
96
88
|
if (props.modelValue !== null) ar.push('tag-not-empty');
|
|
97
89
|
if (props.error) ar.push('tag-error');
|
|
98
90
|
if (focus.value) ar.push('tag-focus');
|
|
99
|
-
if (props.block) ar.push('tag-block');
|
|
100
|
-
if (props.required) ar.push('tag-required');
|
|
101
91
|
if (props.disabled) ar.push('tag-disabled');
|
|
102
92
|
|
|
103
93
|
return ar;
|
|
@@ -155,10 +145,13 @@ onMounted(() => {
|
|
|
155
145
|
</script>
|
|
156
146
|
|
|
157
147
|
<style lang="less">
|
|
148
|
+
@import (less) './styles/components.less';
|
|
149
|
+
|
|
158
150
|
@com-space-micro: var(--ui-space-micro);
|
|
159
151
|
@com-input-height-default: var(--ui-input-height-default);
|
|
160
152
|
|
|
161
153
|
@com-font-header: var(--ui-font-header);
|
|
154
|
+
@com-value-font-weight: @ui-select-value-font-weight;
|
|
162
155
|
|
|
163
156
|
@com-text-default: var(--ui-text-default);
|
|
164
157
|
@com-text-small: var(--ui-text-small);
|
|
@@ -175,7 +168,6 @@ onMounted(() => {
|
|
|
175
168
|
@com-bs-1: var(--ui-bs-1);
|
|
176
169
|
|
|
177
170
|
.component-ui-select {
|
|
178
|
-
display: inline-block;
|
|
179
171
|
position: relative;
|
|
180
172
|
text-align: left;
|
|
181
173
|
font-size: @com-text-default;
|
|
@@ -231,7 +223,7 @@ onMounted(() => {
|
|
|
231
223
|
label {
|
|
232
224
|
top: 3px;
|
|
233
225
|
margin: 0;
|
|
234
|
-
padding: 0;
|
|
226
|
+
padding: 0 0 5px 0;
|
|
235
227
|
font-size: @com-text-small;
|
|
236
228
|
|
|
237
229
|
color: @com-color-gray-text;
|
|
@@ -242,7 +234,7 @@ onMounted(() => {
|
|
|
242
234
|
bottom: 0;
|
|
243
235
|
|
|
244
236
|
font-family: @com-font-header;
|
|
245
|
-
font-weight:
|
|
237
|
+
font-weight: @com-value-font-weight;
|
|
246
238
|
color: @com-color-header-text;
|
|
247
239
|
}
|
|
248
240
|
|
|
@@ -262,22 +254,6 @@ onMounted(() => {
|
|
|
262
254
|
}
|
|
263
255
|
}
|
|
264
256
|
|
|
265
|
-
&.tag-block {
|
|
266
|
-
display: block;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
&.tag-required {
|
|
270
|
-
.value:before {
|
|
271
|
-
content: '*';
|
|
272
|
-
|
|
273
|
-
position: absolute;
|
|
274
|
-
top: 2px;
|
|
275
|
-
right: 2px;
|
|
276
|
-
|
|
277
|
-
color: @com-color-red;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
257
|
&.tag-disabled {
|
|
282
258
|
opacity: 0.6;
|
|
283
259
|
cursor: not-allowed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@community-release/nx-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "nx-ui - Nuxt UI library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
"docs:components": "vue-docgen",
|
|
64
64
|
"docs:generate": "npm run generate:production -prefix ./docs"
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
}
|