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

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 (190) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
  3. package/dist/components/Alert/Alert.vue.d.ts +5 -5
  4. package/dist/components/Alert/Version1dot1.vue.d.ts +2 -2
  5. package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
  6. package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
  7. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
  8. package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
  9. package/dist/components/Banner/Banner.vue.d.ts +1 -1
  10. package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
  11. package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
  12. package/dist/components/Button/Button.vue.d.ts +2 -2
  13. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  14. package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
  15. package/dist/components/Button/types.d.ts +1 -1
  16. package/dist/components/Button/types.d.ts.map +1 -1
  17. package/dist/components/Card/AccountCard.vue.d.ts +3 -3
  18. package/dist/components/Card/BlankCard.vue.d.ts +1 -1
  19. package/dist/components/Card/Card.vue.d.ts +21 -21
  20. package/dist/components/Card/CardCompany.vue.d.ts +8 -8
  21. package/dist/components/Card/CardData.vue.d.ts +1 -1
  22. package/dist/components/Card/CardStatusesContainer.vue.d.ts +4 -4
  23. package/dist/components/Card/ContentCard.vue.d.ts +2 -2
  24. package/dist/components/Card/DashCard.vue.d.ts +4 -4
  25. package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
  26. package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
  27. package/dist/components/Card/SimpleCard.vue.d.ts +3 -3
  28. package/dist/components/Card/StatusCard.vue.d.ts +2 -2
  29. package/dist/components/Card/TitleCard.vue.d.ts +2 -2
  30. package/dist/components/CardImage/CardImage.vue.d.ts +8 -8
  31. package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
  32. package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
  33. package/dist/components/Carousel/Carousel.vue.d.ts +11 -11
  34. package/dist/components/Carousel/TagCarousel.vue.d.ts +9 -9
  35. package/dist/components/ChartBar/ChartBar.vue.d.ts +8 -8
  36. package/dist/components/ChartLine/ChartLine.vue.d.ts +1 -1
  37. package/dist/components/ChatText/ChatText.vue.d.ts +2 -2
  38. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +15 -15
  39. package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
  40. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
  41. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
  42. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
  43. package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
  44. package/dist/components/ChatsMessage/ChatsMessageText.vue.d.ts.map +1 -1
  45. package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
  46. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
  47. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  48. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  49. package/dist/components/Comment/Comment.vue.d.ts +1 -1
  50. package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
  51. package/dist/components/DataTable/index.vue.d.ts +1 -1
  52. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  53. package/dist/components/DateFilter/DateFilter.vue.d.ts +27 -182
  54. package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
  55. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  56. package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
  57. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  58. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  59. package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
  60. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
  61. package/dist/components/Flag.vue.d.ts +2 -2
  62. package/dist/components/FormElement/FormElement.vue.d.ts +32 -38
  63. package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
  64. package/dist/components/Icon.vue.d.ts +1 -1
  65. package/dist/components/Icon.vue.d.ts.map +1 -1
  66. package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
  67. package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
  68. package/dist/components/Input/BaseInput.vue.d.ts +1 -10
  69. package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
  70. package/dist/components/Input/Input.vue.d.ts +27 -182
  71. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  72. package/dist/components/Input/TextInput.vue.d.ts +13 -31
  73. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +37 -192
  74. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  75. package/dist/components/Modal/Modal.vue.d.ts +2 -2
  76. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +10 -10
  77. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  78. package/dist/components/ModalNext/ModalNext.vue.d.ts +34 -189
  79. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -14
  80. package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
  81. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
  82. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  83. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
  84. package/dist/components/Radio/Radio.vue.d.ts +2 -2
  85. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +27 -45
  86. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +8 -8
  87. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
  88. package/dist/components/SelectTime/index.vue.d.ts +13 -31
  89. package/dist/components/Slider/Slider.vue.d.ts +2 -2
  90. package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
  91. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  92. package/dist/components/Tab/Tab.vue.d.ts +2 -2
  93. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  94. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  95. package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
  96. package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
  97. package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
  98. package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
  99. package/dist/components/Tag/Tag.vue.d.ts +8 -8
  100. package/dist/components/Tag/TagNext.vue.d.ts.map +1 -1
  101. package/dist/components/TextArea/TextArea.vue.d.ts +32 -38
  102. package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
  103. package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
  104. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  105. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  106. package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -7
  107. package/dist/components/index.d.ts +890 -2158
  108. package/dist/components/index.d.ts.map +1 -1
  109. package/dist/{es-a147ef18.mjs → es-b3e51efa.js} +1 -1
  110. package/dist/{index-802ab669.mjs → index-b9e3c5e9.js} +7649 -7812
  111. package/dist/{pt-br-cdc64aa4.mjs → pt-br-20887b32.js} +1 -1
  112. package/dist/style.css +1 -1
  113. package/dist/unnnic.js +182 -0
  114. package/dist/{unnnic.umd.js → unnnic.umd.cjs} +41 -42
  115. package/package.json +10 -9
  116. package/src/assets/icons/script-to-convert-svg-to-vue.js +4 -7
  117. package/src/components/AudioRecorder/AudioRecorder.vue +3 -2
  118. package/src/components/Button/Button.vue +109 -58
  119. package/src/components/Button/__tests__/Button.spec.js +2 -2
  120. package/src/components/Button/types.ts +2 -1
  121. package/src/components/Card/Card.vue +4 -1
  122. package/src/components/ChartMultiLine/Line/Line.vue +2 -1
  123. package/src/components/ChatsContact/ChatsContact.vue +1 -1
  124. package/src/components/ChatsHeader/ChatsHeader.vue +4 -2
  125. package/src/components/ChatsMessage/ChatsMessageText.vue +5 -5
  126. package/src/components/Chip/Chip.vue +62 -57
  127. package/src/components/Chip/__tests__/Chip.spec.js +18 -18
  128. package/src/components/DataTable/index.vue +8 -5
  129. package/src/components/DatePicker/DatePicker.vue +29 -16
  130. package/src/components/Drawer/Drawer.vue +4 -1
  131. package/src/components/Drawer/__tests__/Drawer.spec.js +9 -3
  132. package/src/components/DropArea/DropArea.vue +1 -1
  133. package/src/components/Dropdown/__tests__/Dropdown.spec.js +17 -17
  134. package/src/components/EmojiPicker/EmojiPicker.vue +57 -48
  135. package/src/components/EmojiPicker/__tests__/EmojiPicker.spec.js +84 -23
  136. package/src/components/Flag.vue +0 -1
  137. package/src/components/FormElement/FormElement.vue +91 -51
  138. package/src/components/Icon/types.ts +2 -2
  139. package/src/components/Icon.vue +3 -1
  140. package/src/components/Input/BaseInput.vue +12 -10
  141. package/src/components/Input/Input.scss +20 -17
  142. package/src/components/Input/Input.vue +28 -86
  143. package/src/components/Input/TextInput.vue +35 -27
  144. package/src/components/Input/__test__/TextInput.spec.js +5 -5
  145. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +3 -12
  146. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
  147. package/src/components/InputDatePicker/InputDatePicker.vue +1 -1
  148. package/src/components/Label/Label.vue +2 -2
  149. package/src/components/ModalDialog/ModalDialog.vue +29 -27
  150. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
  151. package/src/components/ModalNext/ModalNext.vue +2 -2
  152. package/src/components/SelectSmart/SelectSmart.vue +15 -4
  153. package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +2 -2
  154. package/src/components/Switch/__tests__/Switch.spec.js +6 -2
  155. package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
  156. package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
  157. package/src/components/Tag/TagNext.vue +2 -8
  158. package/src/components/TextArea/TextArea.vue +9 -14
  159. package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +2 -7
  160. package/src/components/Tour/TourPopover.vue +1 -1
  161. package/src/components/__tests__/Icon.spec.js +2 -2
  162. package/src/components/index.ts +88 -96
  163. package/src/index.ts +1 -1
  164. package/src/main.ts +1 -1
  165. package/src/stories/Button.stories.js +11 -2
  166. package/src/stories/ChatsHeader.stories.js +1 -1
  167. package/src/stories/ChatsMessage.stories.js +0 -1
  168. package/src/stories/Chip.stories.js +7 -4
  169. package/src/stories/Input.stories.js +3 -17
  170. package/src/stories/SelectSmart.stories.js +1 -1
  171. package/src/stories/TableNext.stories.js +1 -1
  172. package/src/types/index.d.ts +2 -2
  173. package/src/types/scheme-colors.d.ts +1 -2
  174. package/src/types/unnnic-utils.d.ts +87 -87
  175. package/src/types/vue-shims.d.ts +1 -1
  176. package/src/types/vueuse-overrides.d.ts +2 -2
  177. package/src/utils/plugins/i18n.js +0 -1
  178. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +0 -9
  179. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +0 -1
  180. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +0 -15
  181. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +0 -1
  182. package/dist/unnnic.mjs +0 -186
  183. package/src/assets/img/previews/doc-preview.png +0 -0
  184. package/src/assets/img/previews/image-preview.png +0 -0
  185. package/src/assets/img/previews/video-preview.png +0 -0
  186. package/src/components/TemplatePreview/TemplatePreview.vue +0 -249
  187. package/src/components/TemplatePreview/TemplatePreviewModal.vue +0 -51
  188. package/src/components/TemplatePreview/types.d.ts +0 -16
  189. package/src/stories/TemplatePreview.stories.js +0 -94
  190. package/src/stories/TemplatePreviewModal.stories.js +0 -110
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.2.7-alpha.0",
4
- "type": "commonjs",
3
+ "version": "3.2.8",
4
+ "type": "module",
5
5
  "files": [
6
6
  "dist",
7
7
  "src",
@@ -30,7 +30,7 @@
30
30
  "build": "vite build",
31
31
  "build:types": "vue-tsc && vite build",
32
32
  "preview": "vite preview",
33
- "lint": "eslint --ext .js,.vue,.ts --ignore-path .gitignore --fix src",
33
+ "lint": "eslint src/**/*.{js,vue,ts} --fix",
34
34
  "format": "prettier --write src/",
35
35
  "type-check": "vue-tsc --noEmit",
36
36
  "storybook": "storybook dev -p 6006",
@@ -80,14 +80,15 @@
80
80
  "@vitest/coverage-istanbul": "^1.6.0",
81
81
  "@vitest/coverage-v8": "^1.6.0",
82
82
  "@vitest/ui": "^1.6.0",
83
- "@vue/eslint-config-prettier": "^9.0.0",
83
+ "@vue/eslint-config-prettier": "^10.2.0",
84
+ "@vue/eslint-config-typescript": "^14.6.0",
84
85
  "@vue/test-utils": "^2.4.6",
85
- "eslint": "^8.0.0",
86
- "eslint-config-prettier": "^9.1.0",
87
- "eslint-plugin-prettier": "^5.1.3",
86
+ "@weni/eslint-config": "^2.0.0",
87
+ "eslint": "^9.33.0",
88
88
  "eslint-plugin-storybook": "^0.8.0",
89
- "eslint-plugin-vue": "^9.25.0",
89
+ "eslint-plugin-vue": "10.4.0",
90
90
  "jsdom": "^24.1.1",
91
+ "prettier": "3.6.2",
91
92
  "react": "^18.2.0",
92
93
  "react-dom": "^18.2.0",
93
94
  "sass": "^1.63.0",
@@ -100,4 +101,4 @@
100
101
  "vue-eslint-parser": "^9.4.2",
101
102
  "vue-tsc": "^3.0.5"
102
103
  }
103
- }
104
+ }
@@ -1,6 +1,6 @@
1
- const fs = require('node:fs');
1
+ import { readdirSync, readFileSync, writeFileSync } from 'node:fs';
2
2
 
3
- const files = fs.readdirSync('.');
3
+ const files = readdirSync('.');
4
4
 
5
5
  files
6
6
  .filter((name) => name.endsWith('.svg'))
@@ -11,10 +11,7 @@ files
11
11
  .map((word) => word.slice(0, 1).toUpperCase() + word.slice(1))
12
12
  .join('');
13
13
 
14
- const content = fs.readFileSync(file + '.svg', { encoding: 'utf8' });
14
+ const content = readFileSync(file + '.svg', { encoding: 'utf8' });
15
15
 
16
- fs.writeFileSync(
17
- pascalCaseName + '.vue',
18
- `<template>${content}</template>`,
19
- );
16
+ writeFileSync(pascalCaseName + '.vue', `<template>${content}</template>`);
20
17
  });
@@ -66,7 +66,6 @@ const filterData = (audioBuffer) => {
66
66
  };
67
67
 
68
68
  const normalizeData = (filteredData) => {
69
- // eslint-disable-next-line no-restricted-properties
70
69
  const multiplier = Math.pow(Math.max(...filteredData), -1);
71
70
  return filteredData.map((n) => n * multiplier);
72
71
  };
@@ -273,7 +272,9 @@ export default {
273
272
  this.audio.addEventListener('timeupdate', () => {
274
273
  if (this.status !== 'playing') return;
275
274
 
276
- this.currentTime = isNaN(this.audio.currentTime) ? 0 : this.audio.currentTime;
275
+ this.currentTime = isNaN(this.audio.currentTime)
276
+ ? 0
277
+ : this.audio.currentTime;
277
278
  });
278
279
 
279
280
  this.audio.addEventListener('ended', () => {
@@ -6,16 +6,20 @@
6
6
  :class="[
7
7
  'unnnic-button',
8
8
  `unnnic-button--size-${size}`,
9
- `unnnic-button--${buttonType}`,
9
+ `unnnic-button--${type}`,
10
10
  iconCenter ? `unnnic-button--icon-on-center` : null,
11
11
  float ? `unnnic-button--float` : null,
12
12
  ]"
13
13
  >
14
- <UnnnicIconLoading
14
+ <UnnnicIcon
15
15
  v-if="loading"
16
+ icon="loading-circle-1"
16
17
  :scheme="iconScheme"
17
18
  :size="iconSize"
19
+ :filled="iconsFilled"
18
20
  :style="{ position: 'absolute' }"
21
+ class="rotation"
22
+ :next="next"
19
23
  data-testid="icon-loading"
20
24
  />
21
25
 
@@ -68,7 +72,6 @@
68
72
  <script setup lang="ts">
69
73
  import { computed, watch, useSlots } from 'vue';
70
74
  import UnnnicIcon from '../Icon.vue';
71
- import UnnnicIconLoading from '../IconLoading/IconLoading.vue';
72
75
  import type { ButtonProps, ButtonSize, ButtonType } from './types';
73
76
  import type { SchemeColor } from '@/types/scheme-colors';
74
77
 
@@ -99,8 +102,8 @@ const buttonDisabled = computed(() => {
99
102
  });
100
103
 
101
104
  const iconSize = computed(() => {
102
- if (props.size === 'extra-large') return 'lg';
103
- return 'ant';
105
+ if (props.size === 'small') return 'sm';
106
+ return 'md';
104
107
  });
105
108
 
106
109
  const hasText = computed(() => {
@@ -117,11 +120,12 @@ const iconScheme = computed((): SchemeColor => {
117
120
  primary: 'neutral-white',
118
121
  secondary: 'neutral-dark',
119
122
  tertiary: 'neutral-dark',
123
+ alternative: 'neutral-white',
120
124
  warning: 'neutral-white',
121
125
  attention: 'neutral-white',
122
126
  };
123
127
 
124
- return typeToSchemeMap[buttonType.value] || 'neutral-white';
128
+ return typeToSchemeMap[props.type] || 'neutral-white';
125
129
  });
126
130
 
127
131
  const isSizePropValid = computed(() => {
@@ -132,21 +136,16 @@ const isSizePropValid = computed(() => {
132
136
  );
133
137
  });
134
138
 
135
- const buttonType = computed(() => {
136
- return {
137
- 'alternative': 'tertiary',
138
- }[props.type] || props.type;
139
- });
140
-
141
139
  const isTypePropValid = computed(() => {
142
140
  const validTypes: ButtonType[] = [
143
141
  'primary',
144
142
  'secondary',
145
143
  'tertiary',
144
+ 'alternative',
146
145
  'warning',
147
146
  'attention',
148
147
  ];
149
- return validTypes.includes(buttonType.value);
148
+ return validTypes.includes(props.type);
150
149
  });
151
150
 
152
151
  const validateProps = () => {
@@ -160,7 +159,6 @@ const validateProps = () => {
160
159
 
161
160
  if (!isTypePropValid.value) {
162
161
  errorMessage += ' Invalid type prop.';
163
- errorMessage += ' Please provide one of the following types: primary, secondary, tertiary, warning, attention. Alternative is discontinued and it was forced renamed to tertiary.';
164
162
  }
165
163
 
166
164
  throw new Error(errorMessage);
@@ -172,7 +170,7 @@ watch(
172
170
  () => {
173
171
  validateProps();
174
172
  },
175
- { deep: true, immediate: true }
173
+ { deep: true, immediate: true },
176
174
  );
177
175
  </script>
178
176
 
@@ -198,12 +196,13 @@ watch(
198
196
  display: inline-flex;
199
197
  align-items: center;
200
198
  justify-content: center;
201
- border-radius: $unnnic-radius-2;
199
+ border-radius: $unnnic-border-radius-sm;
202
200
  border: 0;
203
201
  outline: none;
204
202
  overflow: hidden;
205
203
  white-space: nowrap;
206
- font: $unnnic-font-action;
204
+ font-weight: $unnnic-font-weight-regular;
205
+ font-family: $unnnic-font-family-secondary;
207
206
  cursor: pointer;
208
207
  position: relative;
209
208
 
@@ -217,91 +216,129 @@ watch(
217
216
  }
218
217
  }
219
218
 
220
- &--primary,
221
- &--warning,
222
- &--attention {
223
- color: $unnnic-color-fg-inverted;
224
- }
225
-
226
- &--secondary,
227
- &--tertiary {
228
- color: $unnnic-color-fg-emphasized;
229
- }
230
-
231
219
  &--primary {
232
- background-color: $unnnic-color-bg-active;
220
+ background-color: $unnnic-color-weni-600;
221
+ color: $unnnic-color-neutral-white;
233
222
 
234
223
  &:hover:enabled {
235
- background-color: $unnnic-color-teal-700;
224
+ background-color: $unnnic-color-weni-700;
236
225
  }
237
226
 
238
227
  &:active:enabled {
239
- background-color: $unnnic-color-teal-800;
228
+ background-color: $unnnic-color-weni-800;
240
229
  }
241
230
  }
242
231
 
243
232
  &--secondary {
244
- background-color: $unnnic-color-bg-base;
233
+ background-color: $unnnic-color-neutral-white;
234
+ color: $unnnic-color-neutral-dark;
245
235
  box-shadow: inset 0 0 0 $unnnic-border-width-thinner
246
- $unnnic-color-border-base;
236
+ $unnnic-color-neutral-cleanest;
247
237
 
248
238
  &:hover:enabled {
249
- background-color: $unnnic-color-gray-50;
250
- }
251
-
252
- &:active:enabled {
253
- background-color: $unnnic-color-gray-100;
239
+ background-color: $unnnic-color-neutral-light;
254
240
  }
255
241
 
256
242
  &:disabled {
257
243
  box-shadow: none;
258
244
  }
245
+
246
+ &:active:enabled {
247
+ background-color: $unnnic-color-neutral-soft;
248
+ }
259
249
  }
260
250
 
261
251
  &--tertiary {
262
252
  background-color: transparent;
253
+ color: $unnnic-color-neutral-dark;
263
254
 
264
255
  &:hover:enabled {
265
- background-color: rgba($unnnic-color-gray-400, 0.1);
256
+ background-color: $unnnic-color-neutral-light;
257
+ }
258
+
259
+ &:disabled {
260
+ color: $unnnic-color-neutral-clean;
261
+ cursor: not-allowed;
266
262
  }
267
263
 
268
264
  &:active:enabled {
269
- background-color: rgba($unnnic-color-gray-400, 0.2);
265
+ background-color: $unnnic-color-neutral-soft;
266
+ }
267
+ }
268
+
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
+ }
280
+
281
+ &: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
+ }
293
+ }
294
+
295
+ &: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
+ }
270
306
  }
271
307
  }
272
308
 
273
309
  &--warning {
274
- background-color: $unnnic-color-red-500;
310
+ background-color: $unnnic-color-aux-red-500;
275
311
  color: $unnnic-color-neutral-white;
276
312
 
277
313
  &:hover:enabled {
278
- background-color: $unnnic-color-red-600;
314
+ background-color: $unnnic-color-aux-red-700;
279
315
  }
280
316
 
281
317
  &:active:enabled {
282
- background-color: $unnnic-color-red-700;
318
+ background-color: $unnnic-color-aux-red-900;
283
319
  }
284
320
  }
285
321
 
286
322
  &--attention {
287
- background-color: $unnnic-color-yellow-500;
323
+ background-color: $unnnic-color-aux-yellow-500;
324
+ color: $unnnic-color-neutral-white;
288
325
 
289
326
  &:hover:enabled {
290
- background-color: $unnnic-color-yellow-600;
327
+ background-color: $unnnic-color-aux-yellow-700;
291
328
  }
292
329
 
293
330
  &:active:enabled {
294
- background-color: $unnnic-color-yellow-700;
331
+ background-color: $unnnic-color-aux-yellow-900;
295
332
  }
296
333
  }
297
334
 
298
335
  &--primary:disabled,
299
336
  &--secondary:disabled,
300
- &--tertiary:disabled,
337
+ &--alternative:disabled,
301
338
  &--warning:disabled,
302
339
  &--attention:disabled {
303
- background-color: $unnnic-color-bg-muted;
304
- color: $unnnic-color-fg-muted;
340
+ background-color: $unnnic-color-neutral-soft;
341
+ color: $unnnic-color-neutral-clean;
305
342
  cursor: not-allowed;
306
343
  }
307
344
 
@@ -314,12 +351,26 @@ watch(
314
351
  box-shadow: $unnnic-shadow-level-near;
315
352
  }
316
353
 
317
- &--size-large {
318
- padding: $unnnic-space-3 $unnnic-space-4;
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
+ }
320
366
 
321
- &--size-small {
322
- padding: $unnnic-space-2 $unnnic-space-4;
367
+ &-large {
368
+ height: 46px;
369
+ }
370
+
371
+ &-small {
372
+ height: 38px;
373
+ }
323
374
  }
324
375
  }
325
376
  </style>
@@ -337,8 +388,8 @@ watch(
337
388
  }
338
389
 
339
390
  &-large {
340
- height: 45px;
341
- width: 45px;
391
+ height: 46px;
392
+ width: 46px;
342
393
  }
343
394
 
344
395
  &-large,
@@ -353,8 +404,8 @@ watch(
353
404
 
354
405
  &-small {
355
406
  padding: $unnnic-inset-nano;
356
- height: 37px;
357
- width: 37px;
407
+ height: 38px;
408
+ width: 38px;
358
409
 
359
410
  .unnnic-icon {
360
411
  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,9 +1,10 @@
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'
7
8
  | 'warning'
8
9
  | 'attention';
9
10
 
@@ -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>