@weni/unnnic-system 3.2.7 → 3.2.9-alpha.0

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.
Files changed (222) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
  3. package/dist/components/Alert/Alert.vue.d.ts +18 -119
  4. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  5. package/dist/components/Alert/Version1dot1.vue.d.ts +2 -38
  6. package/dist/components/Alert/Version1dot1.vue.d.ts.map +1 -1
  7. package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
  8. package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
  9. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
  10. package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
  11. package/dist/components/Banner/Banner.vue.d.ts +1 -1
  12. package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
  13. package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
  14. package/dist/components/Button/Button.vue.d.ts +2 -2
  15. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  16. package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
  17. package/dist/components/Button/types.d.ts +1 -1
  18. package/dist/components/Button/types.d.ts.map +1 -1
  19. package/dist/components/Card/AccountCard.vue.d.ts +3 -3
  20. package/dist/components/Card/BlankCard.vue.d.ts +1 -1
  21. package/dist/components/Card/Card.vue.d.ts +21 -21
  22. package/dist/components/Card/CardCompany.vue.d.ts +8 -8
  23. package/dist/components/Card/CardData.vue.d.ts +1 -1
  24. package/dist/components/Card/CardStatusesContainer.vue.d.ts +4 -4
  25. package/dist/components/Card/ContentCard.vue.d.ts +2 -2
  26. package/dist/components/Card/DashCard.vue.d.ts +4 -4
  27. package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
  28. package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
  29. package/dist/components/Card/SimpleCard.vue.d.ts +3 -3
  30. package/dist/components/Card/StatusCard.vue.d.ts +2 -2
  31. package/dist/components/Card/TitleCard.vue.d.ts +2 -2
  32. package/dist/components/CardImage/CardImage.vue.d.ts +8 -8
  33. package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
  34. package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
  35. package/dist/components/Carousel/Carousel.vue.d.ts +11 -11
  36. package/dist/components/Carousel/TagCarousel.vue.d.ts +9 -9
  37. package/dist/components/ChartBar/ChartBar.vue.d.ts +8 -8
  38. package/dist/components/ChartLine/ChartLine.vue.d.ts +1 -1
  39. package/dist/components/ChatText/ChatText.vue.d.ts +2 -2
  40. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +15 -15
  41. package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
  42. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
  43. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
  44. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
  45. package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
  46. package/dist/components/ChatsMessage/ChatsMessageText.vue.d.ts.map +1 -1
  47. package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
  48. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
  49. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  50. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  51. package/dist/components/Comment/Comment.vue.d.ts +1 -1
  52. package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
  53. package/dist/components/DataTable/index.vue.d.ts +1 -1
  54. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  55. package/dist/components/DateFilter/DateFilter.vue.d.ts +182 -27
  56. package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
  57. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  58. package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
  59. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  60. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  61. package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
  62. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
  63. package/dist/components/Flag.vue.d.ts +2 -2
  64. package/dist/components/FormElement/FormElement.vue.d.ts +38 -32
  65. package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
  66. package/dist/components/Icon.vue.d.ts +1 -1
  67. package/dist/components/Icon.vue.d.ts.map +1 -1
  68. package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
  69. package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
  70. package/dist/components/Input/BaseInput.vue.d.ts +10 -1
  71. package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
  72. package/dist/components/Input/Input.vue.d.ts +182 -27
  73. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  74. package/dist/components/Input/TextInput.vue.d.ts +31 -13
  75. package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
  76. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +192 -37
  77. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  78. package/dist/components/Label/Label.vue.d.ts +9 -15
  79. package/dist/components/Label/Label.vue.d.ts.map +1 -1
  80. package/dist/components/Modal/Modal.vue.d.ts +2 -2
  81. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +9 -9
  82. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  83. package/dist/components/ModalNext/ModalNext.vue.d.ts +190 -35
  84. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -14
  85. package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
  86. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
  87. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  88. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
  89. package/dist/components/Radio/Radio.vue.d.ts +2 -2
  90. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +45 -27
  91. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +8 -8
  92. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
  93. package/dist/components/SelectTime/index.vue.d.ts +31 -13
  94. package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
  95. package/dist/components/Slider/Slider.vue.d.ts +2 -2
  96. package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
  97. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  98. package/dist/components/Tab/Tab.vue.d.ts +2 -2
  99. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  100. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  101. package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
  102. package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
  103. package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
  104. package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
  105. package/dist/components/Tag/Tag.vue.d.ts +8 -8
  106. package/dist/components/Tag/TagNext.vue.d.ts.map +1 -1
  107. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +9 -0
  108. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -0
  109. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +15 -0
  110. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +1 -0
  111. package/dist/components/TextArea/TextArea.vue.d.ts +38 -32
  112. package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
  113. package/dist/components/Toast/Toast.vue.d.ts +16 -0
  114. package/dist/components/Toast/Toast.vue.d.ts.map +1 -0
  115. package/dist/components/Toast/ToastManager.d.ts +14 -0
  116. package/dist/components/Toast/ToastManager.d.ts.map +1 -0
  117. package/dist/components/Toast/types.d.ts +35 -0
  118. package/dist/components/Toast/types.d.ts.map +1 -0
  119. package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
  120. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  121. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  122. package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -7
  123. package/dist/components/index.d.ts +2116 -1064
  124. package/dist/components/index.d.ts.map +1 -1
  125. package/dist/{es-57bb200f.mjs → es-2735a8fb.js} +1 -1
  126. package/dist/{index-5f770b98.mjs → index-e012fa52.js} +8428 -8113
  127. package/dist/{pt-br-dc8f4568.mjs → pt-br-f38a8b9c.js} +1 -1
  128. package/dist/style.css +1 -1
  129. package/dist/unnnic.js +188 -0
  130. package/dist/{unnnic.umd.js → unnnic.umd.cjs} +42 -41
  131. package/dist/utils/call.d.ts +2 -1
  132. package/dist/utils/call.d.ts.map +1 -1
  133. package/package.json +10 -9
  134. package/src/assets/icons/script-to-convert-svg-to-vue.js +4 -7
  135. package/src/assets/img/previews/doc-preview.png +0 -0
  136. package/src/assets/img/previews/image-preview.png +0 -0
  137. package/src/assets/img/previews/video-preview.png +0 -0
  138. package/src/assets/scss/scheme-colors.scss +131 -4
  139. package/src/assets/tokens/colors.json +2 -2
  140. package/src/components/Alert/Alert.vue +26 -135
  141. package/src/components/Alert/Version1dot1.vue +0 -36
  142. package/src/components/AudioRecorder/AudioRecorder.vue +3 -2
  143. package/src/components/Button/Button.vue +61 -109
  144. package/src/components/Button/__tests__/Button.spec.js +2 -2
  145. package/src/components/Button/types.ts +1 -2
  146. package/src/components/Card/Card.vue +4 -1
  147. package/src/components/ChartMultiLine/Line/Line.vue +2 -1
  148. package/src/components/ChatsContact/ChatsContact.vue +1 -1
  149. package/src/components/ChatsHeader/ChatsHeader.vue +4 -2
  150. package/src/components/ChatsMessage/ChatsMessageText.vue +5 -5
  151. package/src/components/Chip/Chip.vue +62 -57
  152. package/src/components/Chip/__tests__/Chip.spec.js +18 -18
  153. package/src/components/DataTable/index.vue +8 -5
  154. package/src/components/DatePicker/DatePicker.vue +29 -16
  155. package/src/components/Drawer/Drawer.vue +4 -1
  156. package/src/components/Drawer/__tests__/Drawer.spec.js +9 -3
  157. package/src/components/DropArea/DropArea.vue +1 -1
  158. package/src/components/Dropdown/__tests__/Dropdown.spec.js +17 -17
  159. package/src/components/EmojiPicker/EmojiPicker.vue +57 -48
  160. package/src/components/EmojiPicker/__tests__/EmojiPicker.spec.js +84 -23
  161. package/src/components/Flag.vue +0 -1
  162. package/src/components/FormElement/FormElement.vue +52 -92
  163. package/src/components/Icon/types.ts +2 -2
  164. package/src/components/Icon.vue +3 -1
  165. package/src/components/Input/BaseInput.vue +10 -12
  166. package/src/components/Input/Input.scss +17 -20
  167. package/src/components/Input/Input.vue +96 -28
  168. package/src/components/Input/TextInput.vue +28 -41
  169. package/src/components/Input/__test__/TextInput.spec.js +5 -5
  170. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +12 -3
  171. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
  172. package/src/components/InputDatePicker/InputDatePicker.vue +1 -1
  173. package/src/components/Label/Label.vue +52 -21
  174. package/src/components/Label/__tests__/Label.spec.js +1 -1
  175. package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
  176. package/src/components/ModalDialog/ModalDialog.vue +1 -0
  177. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
  178. package/src/components/ModalNext/ModalNext.vue +2 -2
  179. package/src/components/SelectSmart/SelectSmart.vue +15 -4
  180. package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +2 -2
  181. package/src/components/Switch/__tests__/Switch.spec.js +6 -2
  182. package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
  183. package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
  184. package/src/components/Tag/TagNext.vue +2 -8
  185. package/src/components/TemplatePreview/TemplatePreview.vue +252 -0
  186. package/src/components/TemplatePreview/TemplatePreviewModal.vue +51 -0
  187. package/src/components/TemplatePreview/types.d.ts +16 -0
  188. package/src/components/TextArea/TextArea.vue +13 -9
  189. package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +7 -2
  190. package/src/components/Toast/Toast.vue +236 -0
  191. package/src/components/Toast/ToastManager.ts +110 -0
  192. package/src/components/Toast/types.ts +57 -0
  193. package/src/components/Tour/TourPopover.vue +1 -1
  194. package/src/components/__tests__/Icon.spec.js +2 -2
  195. package/src/components/index.ts +105 -91
  196. package/src/index.ts +1 -1
  197. package/src/main.ts +1 -1
  198. package/src/stories/Alert.stories.js +6 -67
  199. package/src/stories/Button.stories.js +3 -18
  200. package/src/stories/ChatsHeader.stories.js +1 -1
  201. package/src/stories/ChatsMessage.stories.js +0 -1
  202. package/src/stories/Chip.stories.js +7 -4
  203. package/src/stories/Input.stories.js +16 -3
  204. package/src/stories/Label.stories.js +7 -0
  205. package/src/stories/SelectSmart.stories.js +1 -1
  206. package/src/stories/TableNext.stories.js +1 -1
  207. package/src/stories/TemplatePreview.stories.js +94 -0
  208. package/src/stories/TemplatePreviewModal.stories.js +110 -0
  209. package/src/stories/Toast.mdx +123 -0
  210. package/src/stories/Toast.stories.js +126 -0
  211. package/src/types/index.d.ts +2 -2
  212. package/src/types/scheme-colors.d.ts +121 -16
  213. package/src/types/unnnic-utils.d.ts +87 -87
  214. package/src/types/vue-shims.d.ts +1 -1
  215. package/src/types/vueuse-overrides.d.ts +2 -2
  216. package/src/utils/call.js +46 -18
  217. package/src/utils/plugins/i18n.js +0 -1
  218. package/dist/unnnic.mjs +0 -182
  219. package/src/components/Alert/AlertBanner.vue +0 -182
  220. package/src/components/Alert/AlertCaller.vue +0 -49
  221. package/src/components/Alert/__tests__/AlertBanner.spec.js +0 -89
  222. package/src/components/Alert/__tests__/AlertCaller.spec.js +0 -98
@@ -6,20 +6,16 @@
6
6
  :class="[
7
7
  'unnnic-button',
8
8
  `unnnic-button--size-${size}`,
9
- `unnnic-button--${type}`,
9
+ `unnnic-button--${buttonType}`,
10
10
  iconCenter ? `unnnic-button--icon-on-center` : null,
11
11
  float ? `unnnic-button--float` : null,
12
12
  ]"
13
13
  >
14
- <UnnnicIcon
14
+ <UnnnicIconLoading
15
15
  v-if="loading"
16
- icon="loading-circle-1"
17
16
  :scheme="iconScheme"
18
17
  :size="iconSize"
19
- :filled="iconsFilled"
20
18
  :style="{ position: 'absolute' }"
21
- class="rotation"
22
- :next="next"
23
19
  data-testid="icon-loading"
24
20
  />
25
21
 
@@ -72,6 +68,7 @@
72
68
  <script setup lang="ts">
73
69
  import { computed, watch, useSlots } from 'vue';
74
70
  import UnnnicIcon from '../Icon.vue';
71
+ import UnnnicIconLoading from '../IconLoading/IconLoading.vue';
75
72
  import type { ButtonProps, ButtonSize, ButtonType } from './types';
76
73
  import type { SchemeColor } from '@/types/scheme-colors';
77
74
 
@@ -102,8 +99,8 @@ const buttonDisabled = computed(() => {
102
99
  });
103
100
 
104
101
  const iconSize = computed(() => {
105
- if (props.size === 'small') return 'sm';
106
- return 'md';
102
+ if (props.size === 'extra-large') return 'lg';
103
+ return 'ant';
107
104
  });
108
105
 
109
106
  const hasText = computed(() => {
@@ -120,12 +117,11 @@ const iconScheme = computed((): SchemeColor => {
120
117
  primary: 'neutral-white',
121
118
  secondary: 'neutral-dark',
122
119
  tertiary: 'neutral-dark',
123
- alternative: 'neutral-white',
124
120
  warning: 'neutral-white',
125
121
  attention: 'neutral-white',
126
122
  };
127
123
 
128
- return typeToSchemeMap[props.type] || 'neutral-white';
124
+ return typeToSchemeMap[buttonType.value] || 'neutral-white';
129
125
  });
130
126
 
131
127
  const isSizePropValid = computed(() => {
@@ -136,16 +132,23 @@ const isSizePropValid = computed(() => {
136
132
  );
137
133
  });
138
134
 
135
+ const buttonType = computed(() => {
136
+ return (
137
+ {
138
+ alternative: 'tertiary',
139
+ }[props.type] || props.type
140
+ );
141
+ });
142
+
139
143
  const isTypePropValid = computed(() => {
140
144
  const validTypes: ButtonType[] = [
141
145
  'primary',
142
146
  'secondary',
143
147
  'tertiary',
144
- 'alternative',
145
148
  'warning',
146
149
  'attention',
147
150
  ];
148
- return validTypes.includes(props.type);
151
+ return validTypes.includes(buttonType.value);
149
152
  });
150
153
 
151
154
  const validateProps = () => {
@@ -159,6 +162,8 @@ const validateProps = () => {
159
162
 
160
163
  if (!isTypePropValid.value) {
161
164
  errorMessage += ' Invalid type prop.';
165
+ errorMessage +=
166
+ ' Please provide one of the following types: primary, secondary, tertiary, warning, attention. Alternative is discontinued and it was forced renamed to tertiary.';
162
167
  }
163
168
 
164
169
  throw new Error(errorMessage);
@@ -170,7 +175,7 @@ watch(
170
175
  () => {
171
176
  validateProps();
172
177
  },
173
- { deep: true, immediate: true }
178
+ { deep: true, immediate: true },
174
179
  );
175
180
  </script>
176
181
 
@@ -196,13 +201,12 @@ watch(
196
201
  display: inline-flex;
197
202
  align-items: center;
198
203
  justify-content: center;
199
- border-radius: $unnnic-border-radius-sm;
204
+ border-radius: $unnnic-radius-2;
200
205
  border: 0;
201
206
  outline: none;
202
207
  overflow: hidden;
203
208
  white-space: nowrap;
204
- font-weight: $unnnic-font-weight-regular;
205
- font-family: $unnnic-font-family-secondary;
209
+ font: $unnnic-font-action;
206
210
  cursor: pointer;
207
211
  position: relative;
208
212
 
@@ -216,129 +220,91 @@ watch(
216
220
  }
217
221
  }
218
222
 
223
+ &--primary,
224
+ &--warning,
225
+ &--attention {
226
+ color: $unnnic-color-fg-inverted;
227
+ }
228
+
229
+ &--secondary,
230
+ &--tertiary {
231
+ color: $unnnic-color-fg-emphasized;
232
+ }
233
+
219
234
  &--primary {
220
- background-color: $unnnic-color-weni-600;
221
- color: $unnnic-color-neutral-white;
235
+ background-color: $unnnic-color-bg-active;
222
236
 
223
237
  &:hover:enabled {
224
- background-color: $unnnic-color-weni-700;
238
+ background-color: $unnnic-color-teal-700;
225
239
  }
226
240
 
227
241
  &:active:enabled {
228
- background-color: $unnnic-color-weni-800;
242
+ background-color: $unnnic-color-teal-800;
229
243
  }
230
244
  }
231
245
 
232
246
  &--secondary {
233
- background-color: $unnnic-color-neutral-white;
234
- color: $unnnic-color-neutral-dark;
247
+ background-color: $unnnic-color-bg-base;
235
248
  box-shadow: inset 0 0 0 $unnnic-border-width-thinner
236
- $unnnic-color-neutral-cleanest;
249
+ $unnnic-color-border-base;
237
250
 
238
251
  &:hover:enabled {
239
- background-color: $unnnic-color-neutral-light;
240
- }
241
-
242
- &:disabled {
243
- box-shadow: none;
252
+ background-color: $unnnic-color-gray-50;
244
253
  }
245
254
 
246
255
  &:active:enabled {
247
- background-color: $unnnic-color-neutral-soft;
248
- }
249
- }
250
-
251
- &--tertiary {
252
- background-color: transparent;
253
- color: $unnnic-color-neutral-dark;
254
-
255
- &:hover:enabled {
256
- background-color: $unnnic-color-neutral-light;
256
+ background-color: $unnnic-color-gray-100;
257
257
  }
258
258
 
259
259
  &:disabled {
260
- color: $unnnic-color-neutral-clean;
261
- cursor: not-allowed;
262
- }
263
-
264
- &:active:enabled {
265
- background-color: $unnnic-color-neutral-soft;
260
+ box-shadow: none;
266
261
  }
267
262
  }
268
263
 
269
- &--alternative {
270
- background-color: $unnnic-color-weni-50;
271
- color: $unnnic-color-weni-800;
272
-
273
- :deep(svg .primary) {
274
- fill: $unnnic-color-weni-800;
275
- }
276
-
277
- :deep(svg .primary-stroke) {
278
- stroke: $unnnic-color-weni-800;
279
- }
264
+ &--tertiary {
265
+ background-color: transparent;
280
266
 
281
267
  &:hover:enabled {
282
- background-color: $unnnic-color-weni-100;
283
- }
284
-
285
- &:disabled {
286
- :deep(svg .primary) {
287
- fill: $unnnic-color-neutral-clean;
288
- }
289
-
290
- :deep(svg .primary-stroke) {
291
- stroke: $unnnic-color-neutral-clean;
292
- }
268
+ background-color: rgba($unnnic-color-gray-400, 0.1);
293
269
  }
294
270
 
295
271
  &:active:enabled {
296
- background-color: $unnnic-color-weni-200;
297
- color: $unnnic-color-weni-900;
298
-
299
- :deep(svg .primary) {
300
- fill: $unnnic-color-weni-900;
301
- }
302
-
303
- :deep(svg .primary-stroke) {
304
- stroke: $unnnic-color-weni-900;
305
- }
272
+ background-color: rgba($unnnic-color-gray-400, 0.2);
306
273
  }
307
274
  }
308
275
 
309
276
  &--warning {
310
- background-color: $unnnic-color-aux-red-500;
277
+ background-color: $unnnic-color-red-500;
311
278
  color: $unnnic-color-neutral-white;
312
279
 
313
280
  &:hover:enabled {
314
- background-color: $unnnic-color-aux-red-700;
281
+ background-color: $unnnic-color-red-600;
315
282
  }
316
283
 
317
284
  &:active:enabled {
318
- background-color: $unnnic-color-aux-red-900;
285
+ background-color: $unnnic-color-red-700;
319
286
  }
320
287
  }
321
288
 
322
289
  &--attention {
323
- background-color: $unnnic-color-aux-yellow-500;
324
- color: $unnnic-color-neutral-white;
290
+ background-color: $unnnic-color-yellow-500;
325
291
 
326
292
  &:hover:enabled {
327
- background-color: $unnnic-color-aux-yellow-700;
293
+ background-color: $unnnic-color-yellow-600;
328
294
  }
329
295
 
330
296
  &:active:enabled {
331
- background-color: $unnnic-color-aux-yellow-900;
297
+ background-color: $unnnic-color-yellow-700;
332
298
  }
333
299
  }
334
300
 
335
301
  &--primary:disabled,
336
302
  &--secondary:disabled,
337
- &--alternative:disabled,
303
+ &--tertiary:disabled,
338
304
  &--warning:disabled,
339
305
  &--attention:disabled {
340
- background-color: $unnnic-color-neutral-soft;
341
- color: $unnnic-color-neutral-clean;
306
+ background-color: $unnnic-color-bg-muted;
307
+ color: $unnnic-color-fg-muted;
342
308
  cursor: not-allowed;
343
309
  }
344
310
 
@@ -351,26 +317,12 @@ watch(
351
317
  box-shadow: $unnnic-shadow-level-near;
352
318
  }
353
319
 
354
- &--size {
355
- &-extra-large,
356
- &-large,
357
- &-small {
358
- padding: $unnnic-squish-xs;
359
- font-size: $unnnic-font-size-body-gt;
360
- line-height: ($unnnic-font-size-body-gt + $unnnic-line-height-medium);
361
- }
362
-
363
- &-extra-large {
364
- height: 58px;
365
- }
366
-
367
- &-large {
368
- height: 46px;
369
- }
320
+ &--size-large {
321
+ padding: $unnnic-space-3 $unnnic-space-4;
322
+ }
370
323
 
371
- &-small {
372
- height: 38px;
373
- }
324
+ &--size-small {
325
+ padding: $unnnic-space-2 $unnnic-space-4;
374
326
  }
375
327
  }
376
328
  </style>
@@ -388,8 +340,8 @@ watch(
388
340
  }
389
341
 
390
342
  &-large {
391
- height: 46px;
392
- width: 46px;
343
+ height: 45px;
344
+ width: 45px;
393
345
  }
394
346
 
395
347
  &-large,
@@ -404,8 +356,8 @@ watch(
404
356
 
405
357
  &-small {
406
358
  padding: $unnnic-inset-nano;
407
- height: 38px;
408
- width: 38px;
359
+ height: 37px;
360
+ width: 37px;
409
361
 
410
362
  .unnnic-icon {
411
363
  width: $unnnic-icon-size-ant;
@@ -91,10 +91,10 @@ describe('Button', () => {
91
91
  });
92
92
 
93
93
  it('should render filled icons when iconsFilled prop is true', async () => {
94
- const wrapper = createWrapper({
94
+ const wrapper = createWrapper({
95
95
  iconLeft: 'search-1',
96
96
  iconRight: 'search-1',
97
- iconsFilled: true
97
+ iconsFilled: true,
98
98
  });
99
99
 
100
100
  const leftIcon = wrapper.findComponent('[data-testid="icon-left"]');
@@ -1,10 +1,9 @@
1
1
  export type ButtonSize = 'small' | 'large' | 'extra-large';
2
2
 
3
- export type ButtonType =
3
+ export type ButtonType =
4
4
  | 'primary'
5
5
  | 'secondary'
6
6
  | 'tertiary'
7
- | 'alternative'
8
7
  | 'warning'
9
8
  | 'attention';
10
9
 
@@ -194,7 +194,10 @@ export default {
194
194
  <style lang="scss">
195
195
  @use '@/assets/scss/unnnic' as *;
196
196
 
197
- $card-needed-colors: 'feedback-red', 'feedback-green', 'feedback-yellow', 'feedback-blue', 'feedback-grey', 'aux-blue', 'aux-purple', 'aux-orange', 'aux-lemon', 'aux-pink', 'brand-weni-soft';
197
+ $card-needed-colors:
198
+ 'feedback-red', 'feedback-green', 'feedback-yellow', 'feedback-blue',
199
+ 'feedback-grey', 'aux-blue', 'aux-purple', 'aux-orange', 'aux-lemon',
200
+ 'aux-pink', 'brand-weni-soft';
198
201
 
199
202
  @each $name, $color in $unnnic-scheme-colors {
200
203
  @if index($card-needed-colors, $name) {
@@ -124,7 +124,8 @@ export default {
124
124
  </script>
125
125
 
126
126
  <style lang="scss">
127
- @use '@/assets/scss/unnnic' as *;.chart {
127
+ @use '@/assets/scss/unnnic' as *;
128
+ .chart {
128
129
  width: 100%;
129
130
  height: 100%;
130
131
  background-repeat: no-repeat;
@@ -119,7 +119,7 @@
119
119
  />
120
120
  </button>
121
121
  <p
122
- v-else-if="(unreadMessages && !selected) || (forceShowUnreadMessages)"
122
+ v-else-if="(unreadMessages && !selected) || forceShowUnreadMessages"
123
123
  class="chats-contact__infos__unread-messages"
124
124
  :title="i18n('unread_messages', unreadMessages, { unreadMessages })"
125
125
  >
@@ -68,7 +68,10 @@
68
68
  <slot />
69
69
  </div>
70
70
  </main>
71
- <slot v-if="slots['right']" name="right" />
71
+ <slot
72
+ v-if="slots['right']"
73
+ name="right"
74
+ />
72
75
  <UnnnicButton
73
76
  v-else-if="close"
74
77
  class="unnnic-chats-header__close--sm"
@@ -127,7 +130,6 @@ const slots = useSlots();
127
130
  defineEmits<{
128
131
  crumbClick: [crumb: { name: string; path: string }];
129
132
  }>();
130
-
131
133
  </script>
132
134
 
133
135
  <style lang="scss">
@@ -4,7 +4,10 @@
4
4
  class="unnnic-chats-message__text"
5
5
  v-html="formattedText"
6
6
  />
7
- <p v-if="isAutomatic" class="unnnic-chats-message__text--automatic">
7
+ <p
8
+ v-if="isAutomatic"
9
+ class="unnnic-chats-message__text--automatic"
10
+ >
8
11
  {{ i18n('automatic_message') }}
9
12
  </p>
10
13
  </section>
@@ -49,14 +52,12 @@ export default {
49
52
  }
50
53
 
51
54
  function removeHtmlDangerousContent(text) {
52
- // eslint-disable-next-line default-param-last
53
55
  return text.replace(
54
56
  /<(\/)?([^> ]+)( [^>]+)?>/gi,
55
57
  ($1, $2 = '', $3, $4 = '') => {
56
58
  if (['b', 'i', 'u', 'ul', 'li', 'br', 'div'].includes($3)) {
57
59
  const complements = [];
58
60
 
59
- // eslint-disable-next-line no-restricted-syntax
60
61
  for (const i of $4.matchAll(
61
62
  /((?<name1>[^ =]+)="(?<value1>[^"]*)"|(?<name2>[^ =]+)='(?<value2>[^"]*)')/g,
62
63
  )) {
@@ -66,7 +67,6 @@ export default {
66
67
  if (name === 'style') {
67
68
  const styles = [];
68
69
 
69
- // eslint-disable-next-line no-restricted-syntax
70
70
  for (const j of value.matchAll(
71
71
  /(?<propertyName>[^:]+):(?<propertyValue>[^;]+);?/g,
72
72
  )) {
@@ -131,4 +131,4 @@ export default {
131
131
  color: $unnnic-color-aux-blue-500;
132
132
  }
133
133
  }
134
- </style>
134
+ </style>
@@ -1,24 +1,29 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <template>
3
- <section
3
+ <section
4
4
  :class="[
5
5
  'chip',
6
6
  chipClass,
7
7
  {
8
8
  'chip--border': shouldShowBorder,
9
- 'chip--is-clickable': isClickable
10
- }
9
+ 'chip--is-clickable': isClickable,
10
+ },
11
11
  ]"
12
12
  @click="onClick"
13
13
  >
14
14
  <p :class="['chip__text', textColorClass]">{{ text }}</p>
15
- <p v-if="count" :class="['chip__count', countColorClass]">{{ count }}</p>
16
- <UnnnicIcon
17
- v-if="type === 'multiple'"
18
- :icon="isSelected ? 'close' : 'add'"
19
- :scheme="isSelected ? 'teal-600' : 'feedback-grey'"
20
- class="chip__icon"
21
- size="sm"
15
+ <p
16
+ v-if="count"
17
+ :class="['chip__count', countColorClass]"
18
+ >
19
+ {{ count }}
20
+ </p>
21
+ <UnnnicIcon
22
+ v-if="type === 'multiple'"
23
+ :icon="isSelected ? 'close' : 'add'"
24
+ :scheme="isSelected ? 'teal-600' : 'feedback-grey'"
25
+ class="chip__icon"
26
+ size="sm"
22
27
  />
23
28
  </section>
24
29
  </template>
@@ -47,7 +52,7 @@ const textColorClass = computed(() => {
47
52
  return 'chip__text--is-selected';
48
53
  }
49
54
  return '';
50
- });
55
+ });
51
56
 
52
57
  const countColorClass = computed(() => {
53
58
  if (props.isSelected) {
@@ -65,60 +70,60 @@ const chipClass = computed(() => {
65
70
  @use '@/assets/scss/unnnic' as *;
66
71
 
67
72
  .chip {
68
- display: inline-flex;
69
- height: 26px;
70
- padding: $unnnic-space-1 $unnnic-space-3;
71
- justify-content: center;
72
- align-items: center;
73
- gap: $unnnic-space-2;
74
- flex-shrink: 0;
75
- border-radius: 600px;
76
- background-color: $unnnic-color-bg-base;
73
+ display: inline-flex;
74
+ height: 26px;
75
+ padding: $unnnic-space-1 $unnnic-space-3;
76
+ justify-content: center;
77
+ align-items: center;
78
+ gap: $unnnic-space-2;
79
+ flex-shrink: 0;
80
+ border-radius: 600px;
81
+ background-color: $unnnic-color-bg-base;
82
+
83
+ &:hover {
84
+ background-color: $unnnic-color-bg-soft;
85
+ }
77
86
 
87
+ &--is-selected {
88
+ background-color: $unnnic-color-teal-100;
78
89
  &:hover {
79
- background-color: $unnnic-color-bg-soft;
90
+ background-color: $unnnic-color-teal-200;
80
91
  }
92
+ }
81
93
 
82
- &--is-selected {
83
- background-color: $unnnic-color-teal-100;
84
- &:hover {
85
- background-color: $unnnic-color-teal-200;
86
- }
87
- }
94
+ &--is-clickable {
95
+ cursor: pointer;
96
+ }
88
97
 
89
- &--is-clickable {
90
- cursor: pointer;
91
- }
92
-
93
- &--border {
94
- border: 1px solid $unnnic-color-border-base;
95
- }
98
+ &--border {
99
+ border: 1px solid $unnnic-color-border-base;
100
+ }
96
101
 
97
- &__text {
98
- color: $unnnic-color-fg-base;
99
- font: $unnnic-font-caption-1;
102
+ &__text {
103
+ color: $unnnic-color-fg-base;
104
+ font: $unnnic-font-caption-1;
100
105
 
101
- &--is-selected {
102
- color: $unnnic-color-fg-active;
103
- }
106
+ &--is-selected {
107
+ color: $unnnic-color-fg-active;
104
108
  }
109
+ }
110
+
111
+ &__count {
112
+ display: flex;
113
+ padding: 0 $unnnic-space-2;
114
+ justify-content: center;
115
+ align-items: center;
116
+ gap: 10px;
117
+ border-radius: 600px;
118
+ background: $unnnic-color-bg-soft;
119
+ color: $unnnic-color-fg-base;
120
+ font: $unnnic-font-caption-1;
121
+ font-weight: $unnnic-font-weight-medium;
105
122
 
106
- &__count {
107
- display: flex;
108
- padding: 0 $unnnic-space-2;
109
- justify-content: center;
110
- align-items: center;
111
- gap: 10px;
112
- border-radius: 600px;
113
- background: $unnnic-color-bg-soft;
114
- color: $unnnic-color-fg-base;
115
- font: $unnnic-font-caption-1;
116
- font-weight: $unnnic-font-weight-medium;
117
-
118
- &--is-selected {
119
- color: $unnnic-color-fg-active;
120
- background: $unnnic-color-white;
121
- }
123
+ &--is-selected {
124
+ color: $unnnic-color-fg-active;
125
+ background: $unnnic-color-white;
122
126
  }
127
+ }
123
128
  }
124
- </style>
129
+ </style>