@community-release/nx-ui 0.0.37 → 0.0.39

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 CHANGED
@@ -104,6 +104,9 @@ var defaultComponentsStyle = {
104
104
  },
105
105
  map: {
106
106
  "user-position-color": "var(--ui-color-primary)"
107
+ },
108
+ select: {
109
+ "value-font-weight": "var(--ui-font-weight-medium)"
107
110
  }
108
111
  };
109
112
 
package/dist/module.d.ts CHANGED
@@ -104,6 +104,9 @@ var defaultComponentsStyle = {
104
104
  },
105
105
  map: {
106
106
  "user-position-color": "var(--ui-color-primary)"
107
+ },
108
+ select: {
109
+ "value-font-weight": "var(--ui-font-weight-medium)"
107
110
  }
108
111
  };
109
112
 
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui",
3
3
  "configKey": "ui",
4
- "version": "0.0.37"
4
+ "version": "0.0.39"
5
5
  }
package/dist/module.mjs CHANGED
@@ -104,6 +104,9 @@ const defaultComponentsStyle = {
104
104
  },
105
105
  map: {
106
106
  "user-position-color": "var(--ui-color-primary)"
107
+ },
108
+ select: {
109
+ "value-font-weight": "var(--ui-font-weight-medium)"
107
110
  }
108
111
  };
109
112
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span class="component-ui component-ui-checkbox" :class="classes">
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
- </span>
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
- @com-color-header-text: var(--ui-color-header-text);
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
- display: block;
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,9 +88,8 @@ 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');
92
+ if (props.label) ar.push('tag-label');
102
93
 
103
94
  return ar;
104
95
  });
@@ -155,10 +146,13 @@ onMounted(() => {
155
146
  </script>
156
147
 
157
148
  <style lang="less">
149
+ @import (less) './styles/components.less';
150
+
158
151
  @com-space-micro: var(--ui-space-micro);
159
152
  @com-input-height-default: var(--ui-input-height-default);
160
153
 
161
154
  @com-font-header: var(--ui-font-header);
155
+ @com-value-font-weight: @ui-select-value-font-weight;
162
156
 
163
157
  @com-text-default: var(--ui-text-default);
164
158
  @com-text-small: var(--ui-text-small);
@@ -175,7 +169,6 @@ onMounted(() => {
175
169
  @com-bs-1: var(--ui-bs-1);
176
170
 
177
171
  .component-ui-select {
178
- display: inline-block;
179
172
  position: relative;
180
173
  text-align: left;
181
174
  font-size: @com-text-default;
@@ -228,21 +221,12 @@ onMounted(() => {
228
221
  right: 30px;
229
222
  }
230
223
 
231
- label {
232
- top: 3px;
233
- margin: 0;
234
- padding: 0;
235
- font-size: @com-text-small;
236
-
237
- color: @com-color-gray-text;
238
- }
239
-
240
224
  strong {
241
- top: 20px;
242
- bottom: 0;
243
-
225
+ transform: translateY(-50%);
226
+ top: 50%;
227
+ bottom: auto;
244
228
  font-family: @com-font-header;
245
- font-weight: 600;
229
+ font-weight: @com-value-font-weight;
246
230
  color: @com-color-header-text;
247
231
  }
248
232
 
@@ -262,19 +246,22 @@ onMounted(() => {
262
246
  }
263
247
  }
264
248
 
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;
249
+ &.tag-label {
250
+ .value {
251
+ label {
252
+ top: 3px;
253
+ margin: 0;
254
+ padding: 0 0 5px 0;
255
+ font-size: @com-text-small;
256
+
257
+ color: @com-color-gray-text;
258
+ }
259
+
260
+ strong {
261
+ transform: none;
262
+ top: 20px;
263
+ bottom: 0;
264
+ }
278
265
  }
279
266
  }
280
267
 
@@ -2,3 +2,4 @@
2
2
  @ui-accordion-text-font-size: var(--ui-text-default);
3
3
  @ui-button-border-radius: var(--ui-input-height-large);
4
4
  @ui-map-user-position-color: var(--color-primary);
5
+ @ui-select-value-font-weight: var(--ui-font-weight-medium);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "nx-ui - Nuxt UI library",
5
5
  "repository": {
6
6
  "type": "git",