@webitel/ui-sdk 25.8.1 → 25.8.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.8.1",
3
+ "version": "25.8.3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -3,6 +3,7 @@
3
3
  :class="{
4
4
  'wt-label--invalid': invalid,
5
5
  'wt-label--disabled': disabled,
6
+ 'wt-label--required': required,
6
7
  }"
7
8
  class="wt-label"
8
9
  >
@@ -11,24 +12,13 @@
11
12
  </label>
12
13
  </template>
13
14
 
14
- <script>
15
- export default {
16
- name: 'WtLabel',
17
- props: {
18
- disabled: {
19
- type: Boolean,
20
- default: false,
21
- },
22
- invalid: {
23
- type: Boolean,
24
- default: false,
25
- },
26
- hint: {
27
- type: String,
28
- description: 'Adds hint icon + tooltip with text, passed as "hint" prop',
29
- },
30
- },
31
- };
15
+ <script lang="ts" setup>
16
+ defineProps<{
17
+ disabled?: boolean;
18
+ invalid?: boolean;
19
+ required?: boolean;
20
+ hint?: string;
21
+ }>();
32
22
  </script>
33
23
 
34
24
  <style lang="scss">
@@ -55,6 +45,12 @@ export default {
55
45
  &--disabled {
56
46
  color: var(--wt-label-disabled-color);
57
47
  }
48
+
49
+ &--required {
50
+ &::after {
51
+ content: '*';
52
+ }
53
+ }
58
54
  }
59
55
 
60
56
  .wt-hint {
@@ -10,6 +10,7 @@
10
10
  <wt-label
11
11
  :disabled="disabled"
12
12
  :for="name"
13
+ :required="required"
13
14
  :invalid="invalid"
14
15
  v-bind="labelProps"
15
16
  >
@@ -18,7 +19,7 @@
18
19
  name="label"
19
20
  v-bind="{ label }"
20
21
  >
21
- {{ requiredLabel }}
22
+ {{ label }}
22
23
  </slot>
23
24
  </wt-label>
24
25
  <div class="wt-textarea__wrapper">
@@ -60,10 +61,14 @@
60
61
 
61
62
  <script>
62
63
  import validationMixin from '../../mixins/validationMixin/validationMixin.js';
64
+ import { WtLabel } from '../index';
63
65
 
64
66
  export default {
65
67
  name: 'WtTextarea',
66
68
  mixins: [validationMixin],
69
+ components: {
70
+ WtLabel,
71
+ },
67
72
  props: {
68
73
  /**
69
74
  * Current textarea value (`v-model`)
@@ -101,6 +106,10 @@ export default {
101
106
  default: false,
102
107
  description: 'Native textarea disabled attribute',
103
108
  },
109
+ required: {
110
+ type: Boolean,
111
+ default: false,
112
+ },
104
113
  /**
105
114
  * textarea name
106
115
  */
@@ -135,10 +144,6 @@ export default {
135
144
  keypress: (event) => this.handleKeypress(event),
136
145
  };
137
146
  },
138
-
139
- requiredLabel() {
140
- return this.required ? `${this.label}*` : this.label;
141
- },
142
147
  },
143
148
  mounted() {
144
149
  this.updateInputPaddings();
@@ -141,6 +141,8 @@ const resetAnswer = () => {
141
141
  }
142
142
 
143
143
  .audit-form-question-read-text {
144
+ overflow-wrap: anywhere; // break words in text with no spaces, but preserve words if text has spaces
145
+
144
146
  &--required {
145
147
  &:after {
146
148
  content: '*';