@weni/unnnic-system 3.2.5-alpha.1 → 3.2.6

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 (166) hide show
  1. package/CHANGELOG.md +47 -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 +16 -7
  31. package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
  32. package/dist/components/CardProject/CardProject.vue.d.ts +11 -2
  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/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
  45. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
  46. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  47. package/dist/components/Chip/Chip.vue.d.ts +8 -0
  48. package/dist/components/Chip/Chip.vue.d.ts.map +1 -0
  49. package/dist/components/Chip/types.d.ts +9 -0
  50. package/dist/components/Chip/types.d.ts.map +1 -0
  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 +27 -182
  56. package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
  57. package/dist/components/Disclaimer/types.d.ts +1 -1
  58. package/dist/components/Disclaimer/types.d.ts.map +1 -1
  59. package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
  60. package/dist/components/DropArea/DropArea.vue.d.ts +0 -2
  61. package/dist/components/DropArea/DropArea.vue.d.ts.map +1 -1
  62. package/dist/components/Dropdown/Dropdown.vue.d.ts +9 -0
  63. package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
  64. package/dist/components/Flag.vue.d.ts +2 -2
  65. package/dist/components/FormElement/FormElement.vue.d.ts +32 -38
  66. package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
  67. package/dist/components/Icon/types.d.ts +2 -1
  68. package/dist/components/Icon/types.d.ts.map +1 -1
  69. package/dist/components/Icon.vue.d.ts +3 -2
  70. package/dist/components/Icon.vue.d.ts.map +1 -1
  71. package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
  72. package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
  73. package/dist/components/Input/BaseInput.vue.d.ts +1 -10
  74. package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
  75. package/dist/components/Input/Input.vue.d.ts +27 -182
  76. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  77. package/dist/components/Input/TextInput.vue.d.ts +13 -31
  78. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +37 -192
  79. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  80. package/dist/components/Modal/Modal.vue.d.ts +2 -2
  81. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +10 -10
  82. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  83. package/dist/components/ModalNext/ModalNext.vue.d.ts +34 -189
  84. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -20
  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 +28 -45
  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 +13 -31
  94. package/dist/components/Slider/Slider.vue.d.ts +2 -2
  95. package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
  96. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  97. package/dist/components/Tab/Tab.vue.d.ts +2 -2
  98. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  99. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  100. package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
  101. package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
  102. package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
  103. package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
  104. package/dist/components/Tag/Tag.vue.d.ts +8 -8
  105. package/dist/components/TextArea/TextArea.vue.d.ts +32 -38
  106. package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
  107. package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
  108. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  109. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  110. package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -13
  111. package/dist/components/index.d.ts +899 -2193
  112. package/dist/components/index.d.ts.map +1 -1
  113. package/dist/{es-dc7f4ae0.mjs → es-abc8e9a2.mjs} +1 -1
  114. package/dist/{index-93c6d4e1.mjs → index-22520f9b.mjs} +7776 -7910
  115. package/dist/{pt-br-6c72f1f4.mjs → pt-br-a1f8d5de.mjs} +1 -1
  116. package/dist/style.css +1 -1
  117. package/dist/unnnic.mjs +116 -118
  118. package/dist/unnnic.umd.js +41 -42
  119. package/package.json +2 -2
  120. package/src/assets/scss/scheme-colors.scss +132 -0
  121. package/src/assets/scss/unnnic.scss +2 -0
  122. package/src/components/Button/Button.vue +109 -58
  123. package/src/components/Button/types.ts +1 -0
  124. package/src/components/Card/Card.vue +12 -21
  125. package/src/components/Chip/Chip.vue +124 -0
  126. package/src/components/Chip/__tests__/Chip.spec.js +164 -0
  127. package/src/components/Chip/types.ts +8 -0
  128. package/src/components/Disclaimer/types.ts +1 -1
  129. package/src/components/DropArea/DropArea.vue +2 -26
  130. package/src/components/Dropdown/Dropdown.vue +6 -0
  131. package/src/components/Dropdown/__tests__/Dropdown.spec.js +57 -0
  132. package/src/components/FormElement/FormElement.vue +90 -50
  133. package/src/components/Icon/types.ts +4 -95
  134. package/src/components/Icon.vue +3 -98
  135. package/src/components/Input/BaseInput.vue +12 -10
  136. package/src/components/Input/Input.scss +20 -17
  137. package/src/components/Input/Input.vue +28 -86
  138. package/src/components/Input/TextInput.vue +35 -27
  139. package/src/components/Input/__test__/TextInput.spec.js +5 -5
  140. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +3 -12
  141. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
  142. package/src/components/ModalDialog/ModalDialog.vue +29 -27
  143. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
  144. package/src/components/SelectSmart/SelectSmart.vue +3 -1
  145. package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +45 -0
  146. package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
  147. package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
  148. package/src/components/TextArea/TextArea.vue +9 -14
  149. package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +2 -7
  150. package/src/components/index.ts +7 -12
  151. package/src/stories/Button.stories.js +10 -1
  152. package/src/stories/Chip.stories.js +173 -0
  153. package/src/stories/Input.stories.js +3 -17
  154. package/src/types/scheme-colors.d.ts +102 -0
  155. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +0 -9
  156. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +0 -1
  157. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +0 -15
  158. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +0 -1
  159. package/src/assets/img/previews/doc-preview.png +0 -0
  160. package/src/assets/img/previews/image-preview.png +0 -0
  161. package/src/assets/img/previews/video-preview.png +0 -0
  162. package/src/components/TemplatePreview/TemplatePreview.vue +0 -249
  163. package/src/components/TemplatePreview/TemplatePreviewModal.vue +0 -51
  164. package/src/components/TemplatePreview/types.d.ts +0 -16
  165. package/src/stories/TemplatePreview.stories.js +0 -94
  166. package/src/stories/TemplatePreviewModal.stories.js +0 -110
@@ -24,7 +24,10 @@
24
24
  </section>
25
25
 
26
26
  <section class="unnnic-modal-dialog__container__body">
27
- <header v-if="title" class="unnnic-modal-dialog__container__header">
27
+ <header
28
+ v-if="title"
29
+ class="unnnic-modal-dialog__container__header"
30
+ >
28
31
  <section class="unnnic-modal-dialog__container__title-container">
29
32
  <UnnnicIcon
30
33
  v-if="icon || type"
@@ -46,7 +49,6 @@
46
49
  data-testid="close-icon"
47
50
  icon="close"
48
51
  clickable
49
- scheme="neutral-cloudy"
50
52
  @click="close()"
51
53
  />
52
54
  </header>
@@ -96,12 +98,12 @@
96
98
  </template>
97
99
 
98
100
  <script>
99
- import UnnnicIcon from "../Icon.vue";
100
- import UnnnicButton from "../Button/Button.vue";
101
- import UnnnicI18n from "../../mixins/i18n";
101
+ import UnnnicIcon from '../Icon.vue';
102
+ import UnnnicButton from '../Button/Button.vue';
103
+ import UnnnicI18n from '../../mixins/i18n';
102
104
 
103
105
  export default {
104
- name: "UnnnicModalDialog",
106
+ name: 'UnnnicModalDialog',
105
107
  components: {
106
108
  UnnnicIcon,
107
109
  UnnnicButton,
@@ -118,29 +120,29 @@ export default {
118
120
  },
119
121
  type: {
120
122
  type: String,
121
- default: "",
123
+ default: '',
122
124
  validate(type) {
123
- return ["success", "warning", "attention"].includes(type);
125
+ return ['success', 'warning', 'attention'].includes(type);
124
126
  },
125
127
  },
126
128
  size: {
127
129
  type: String,
128
- default: "md",
130
+ default: 'md',
129
131
  validate(size) {
130
- return ["sm", "md", "lg"].includes(size);
132
+ return ['sm', 'md', 'lg'].includes(size);
131
133
  },
132
134
  },
133
135
  title: {
134
136
  type: String,
135
- default: "",
137
+ default: '',
136
138
  },
137
139
  icon: {
138
140
  type: String,
139
- default: "",
141
+ default: '',
140
142
  },
141
143
  iconScheme: {
142
144
  type: String,
143
- default: "",
145
+ default: '',
144
146
  },
145
147
  showCloseIcon: {
146
148
  type: Boolean,
@@ -163,26 +165,26 @@ export default {
163
165
  default: () => ({}),
164
166
  },
165
167
  },
166
- emits: ["primaryButtonClick", "secondaryButtonClick", "update:modelValue"],
168
+ emits: ['primaryButtonClick', 'secondaryButtonClick', 'update:modelValue'],
167
169
 
168
170
  data() {
169
171
  return {
170
172
  defaultTranslations: {
171
173
  cancel: {
172
- "pt-br": "Cancelar",
173
- en: "Cancel",
174
- es: "Cancelar",
174
+ 'pt-br': 'Cancelar',
175
+ en: 'Cancel',
176
+ es: 'Cancelar',
175
177
  },
176
178
  },
177
179
  iconsMapper: {
178
- success: { icon: "check_circle", scheme: "aux-green-500" },
179
- warning: { icon: "warning", scheme: "aux-red-500" },
180
- attention: { icon: "error", scheme: "aux-yellow-500" },
180
+ success: { icon: 'check_circle', scheme: 'aux-green-500' },
181
+ warning: { icon: 'warning', scheme: 'aux-red-500' },
182
+ attention: { icon: 'error', scheme: 'aux-yellow-500' },
181
183
  },
182
184
  primaryButtonTypeMapper: {
183
- success: "primary",
184
- warning: "warning",
185
- attention: "attention",
185
+ success: 'primary',
186
+ warning: 'warning',
187
+ attention: 'attention',
186
188
  },
187
189
  };
188
190
  },
@@ -193,17 +195,17 @@ export default {
193
195
  },
194
196
  methods: {
195
197
  close() {
196
- this.$emit("update:modelValue", false);
198
+ this.$emit('update:modelValue', false);
197
199
  },
198
200
  updateBodyOverflow(isHidden) {
199
- document.body.style.overflow = isHidden ? "hidden" : "";
201
+ document.body.style.overflow = isHidden ? 'hidden' : '';
200
202
  },
201
203
  },
202
204
  };
203
205
  </script>
204
206
 
205
207
  <style lang="scss" scoped>
206
- @use "@/assets/scss/unnnic" as *;
208
+ @use '@/assets/scss/unnnic' as *;
207
209
  * {
208
210
  margin: 0;
209
211
  padding: 0;
@@ -310,7 +312,7 @@ export default {
310
312
  &__actions {
311
313
  display: grid;
312
314
  grid-template-columns: 1fr 1fr;
313
- grid-template-areas: "secondary-button primary-button";
315
+ grid-template-areas: 'secondary-button primary-button';
314
316
  gap: $unnnic-spacing-sm;
315
317
  padding: $unnnic-spacing-md;
316
318
  flex-shrink: 0;
@@ -11,7 +11,7 @@ exports[`ModalDialog.vue > Elements rendering > matches the snapshot 1`] = `
11
11
  <unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="test-icon" clickable="false" size="md" scheme="neutral-darkest" data-testid="title-icon" class="unnnic-modal-dialog__container__title-icon"></unnnic-icon-stub>
12
12
  <h1 data-v-68ebadeb="" class="unnnic-modal-dialog__container__title-text" data-testid="title-text">Test Title</h1>
13
13
  </section>
14
- <unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="close" clickable="true" size="md" scheme="neutral-cloudy" data-testid="close-icon"></unnnic-icon-stub>
14
+ <unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="close" clickable="true" size="md" scheme="neutral-darkest" data-testid="close-icon"></unnnic-icon-stub>
15
15
  </header>
16
16
  <section data-v-68ebadeb="" class="unnnic-modal-dialog__container__content"></section>
17
17
  <section data-v-68ebadeb="" data-testid="actions-section" class="unnnic-modal-dialog__container__actions">
@@ -214,7 +214,7 @@ export default {
214
214
  },
215
215
  },
216
216
 
217
- emits: ['update:searchValue', 'onChange', 'update:modelValue'],
217
+ emits: ['update:searchValue', 'onChange', 'update:modelValue', 'onActiveChange'],
218
218
 
219
219
  data() {
220
220
  return {
@@ -303,6 +303,8 @@ export default {
303
303
  active(newValue) {
304
304
  this.$refs['dropdown-skeleton'].calculatePosition();
305
305
 
306
+ this.$emit('onActiveChange', newValue);
307
+
306
308
  this.$nextTick(() => {
307
309
  if (newValue && !this.multiple) {
308
310
  const activeOptionIndex = this.getOptionIndex('active');
@@ -238,6 +238,51 @@ describe('SelectSmart.vue', () => {
238
238
  });
239
239
  });
240
240
 
241
+ describe('onActiveChange Event', () => {
242
+ it('should emit onActiveChange when dropdown opens', async () => {
243
+ await input().trigger('click');
244
+
245
+ expect(wrapper.emitted('onActiveChange')).toBeTruthy();
246
+ expect(wrapper.emitted('onActiveChange')[0][0]).toBe(true);
247
+ });
248
+
249
+ it('should emit onActiveChange when dropdown closes', async () => {
250
+ wrapper.vm.active = true;
251
+ await nextTick();
252
+
253
+ wrapper.vm.active = false;
254
+ await nextTick();
255
+
256
+ expect(wrapper.emitted('onActiveChange')).toBeTruthy();
257
+ expect(wrapper.emitted('onActiveChange')[1][0]).toBe(false);
258
+ });
259
+
260
+ it('should emit onActiveChange when toggling dropdown visibility', async () => {
261
+ // Open dropdown
262
+ await input().trigger('click');
263
+
264
+ // Close dropdown
265
+ await input().trigger('click');
266
+
267
+ const emittedEvents = wrapper.emitted('onActiveChange');
268
+ expect(emittedEvents).toBeTruthy();
269
+ expect(emittedEvents.length).toBe(2);
270
+ expect(emittedEvents[0][0]).toBe(true); // opened
271
+ expect(emittedEvents[1][0]).toBe(false); // closed
272
+ });
273
+
274
+ it('should emit onActiveChange when closing dropdown with escape key', async () => {
275
+ await input().trigger('click');
276
+ expect(wrapper.emitted('onActiveChange')[0][0]).toBe(true);
277
+
278
+ await selectSmart().trigger('keydown', { key: 'Escape' });
279
+
280
+ const emittedEvents = wrapper.emitted('onActiveChange');
281
+ expect(emittedEvents.length).toBe(2);
282
+ expect(emittedEvents[1][0]).toBe(false);
283
+ });
284
+ });
285
+
241
286
  describe('Secondary Type', () => {
242
287
  beforeEach(() => {
243
288
  mountWrapper({
@@ -42,7 +42,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
42
42
  <p data-v-e29458bb="" class="table-pagination__count" data-testid="count">1 - 1 of 1</p>
43
43
  <div data-v-0eeff8cb="" data-v-e29458bb="" class="pagination"><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="previous-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
44
44
  <!--v-if-->
45
- <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
45
+ <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
46
46
  <path d="M26.8368 35.0005C26.5868 35.0005 26.3506 34.903 26.1743 34.7255L12.7743 21.3255C12.4206 20.9717 12.2256 20.5017 12.2256 20.0017C12.2256 19.5017 12.4193 19.0305 12.7731 18.6767L26.1743 5.27549C26.3506 5.09799 26.5868 5.00049 26.8368 5.00049C27.0868 5.00049 27.3231 5.09799 27.4993 5.27549C27.6768 5.45174 27.7743 5.68799 27.7743 5.93799C27.7743 6.18799 27.6768 6.42424 27.4993 6.60049L14.0993 20.0005L27.4993 33.4005C27.6768 33.578 27.7743 33.813 27.7743 34.063C27.7743 34.313 27.6768 34.5492 27.4993 34.7255C27.3218 34.9017 27.0868 35.0005 26.8368 35.0005Z" fill="#3B414D" class="primary"></path>
47
47
  </svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
48
48
  <!--v-if-->
@@ -53,7 +53,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
53
53
  <!--v-if-->
54
54
  </button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="next-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
55
55
  <!--v-if-->
56
- <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
56
+ <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
57
57
  <path d="M13.1635 35.0005C12.9135 35.0005 12.6772 34.903 12.501 34.7255C12.136 34.3605 12.136 33.7655 12.501 33.3992L25.901 20.0005L12.501 6.60049C12.3235 6.42424 12.226 6.18799 12.226 5.93799C12.226 5.68799 12.3235 5.45174 12.501 5.27549C12.6772 5.09799 12.9135 5.00049 13.1635 5.00049C13.4135 5.00049 13.6497 5.09799 13.826 5.27549L27.226 18.6755C27.956 19.4055 27.9572 20.5942 27.2272 21.3242L13.826 34.7255C13.6497 34.903 13.4135 35.0005 13.1635 35.0005Z" fill="#3B414D" class="primary"></path>
58
58
  </svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
59
59
  <!--v-if-->
@@ -5,7 +5,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
5
5
  <p data-v-e29458bb="" class="table-pagination__count" data-testid="count">1 - 10 of 100</p>
6
6
  <div data-v-0eeff8cb="" data-v-e29458bb="" class="pagination"><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="previous-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
7
7
  <!--v-if-->
8
- <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
8
+ <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
9
9
  <path d="M26.8368 35.0005C26.5868 35.0005 26.3506 34.903 26.1743 34.7255L12.7743 21.3255C12.4206 20.9717 12.2256 20.5017 12.2256 20.0017C12.2256 19.5017 12.4193 19.0305 12.7731 18.6767L26.1743 5.27549C26.3506 5.09799 26.5868 5.00049 26.8368 5.00049C27.0868 5.00049 27.3231 5.09799 27.4993 5.27549C27.6768 5.45174 27.7743 5.68799 27.7743 5.93799C27.7743 6.18799 27.6768 6.42424 27.4993 6.60049L14.0993 20.0005L27.4993 33.4005C27.6768 33.578 27.7743 33.813 27.7743 34.063C27.7743 34.313 27.6768 34.5492 27.4993 34.7255C27.3218 34.9017 27.0868 35.0005 26.8368 35.0005Z" fill="#3B414D" class="primary"></path>
10
10
  </svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
11
11
  <!--v-if-->
@@ -36,7 +36,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
36
36
  <!--v-if-->
37
37
  </button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="next-button" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
38
38
  <!--v-if-->
39
- <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-dark" data-testid="icon-center" style="visibility: visible;">
39
+ <!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-dark" data-testid="icon-center" style="visibility: visible;">
40
40
  <path d="M13.1635 35.0005C12.9135 35.0005 12.6772 34.903 12.501 34.7255C12.136 34.3605 12.136 33.7655 12.501 33.3992L25.901 20.0005L12.501 6.60049C12.3235 6.42424 12.226 6.18799 12.226 5.93799C12.226 5.68799 12.3235 5.45174 12.501 5.27549C12.6772 5.09799 12.9135 5.00049 13.1635 5.00049C13.4135 5.00049 13.6497 5.09799 13.826 5.27549L27.226 18.6755C27.956 19.4055 27.9572 20.5942 27.2272 21.3242L13.826 34.7255C13.6497 34.903 13.4135 35.0005 13.1635 35.0005Z" fill="#3B414D" class="primary"></path>
41
41
  </svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
42
42
  <!--v-if-->
@@ -18,14 +18,13 @@
18
18
  :disabled="disabled"
19
19
  :value="modelValue"
20
20
  @input="$emit('update:modelValue', fullySanitize($event.target.value))"
21
- />
21
+ ></textarea>
22
22
 
23
23
  <template
24
24
  v-if="maxLength"
25
25
  #rightMessage
26
+ >{{ modelValue.length }}/{{ maxLength }}</template
26
27
  >
27
- {{ modelValue.length }}/{{ maxLength }}
28
- </template>
29
28
  </UnnnicFormElement>
30
29
  </template>
31
30
 
@@ -97,12 +96,6 @@ export default {
97
96
  @use '@/assets/scss/unnnic' as *;
98
97
  @use '@/components/Input/Input' as *;
99
98
 
100
- * {
101
- margin: 0;
102
- padding: 0;
103
- box-sizing: border-box;
104
- }
105
-
106
99
  .unnnic-text-area {
107
100
  &__textarea {
108
101
  @include input-base;
@@ -110,22 +103,24 @@ export default {
110
103
  display: block;
111
104
  width: 100%;
112
105
  resize: vertical;
106
+ box-sizing: border-box;
113
107
 
114
108
  scrollbar-width: thin;
115
109
 
116
- padding: $unnnic-space-3 $unnnic-space-4;
117
-
118
110
  &--size-md {
119
111
  @include input-md-font;
120
112
 
121
- min-height: 100px;
122
-
113
+ min-height: 6.25 * $unnnic-font-size;
114
+ padding: ($unnnic-spacing-ant - $unnnic-border-width-thinner)
115
+ ($unnnic-spacing-sm - $unnnic-border-width-thinner);
123
116
  }
124
117
 
125
118
  &--size-sm {
126
119
  @include input-sm-font;
127
120
 
128
- min-height: $unnnic-space-20;
121
+ min-height: 5 * $unnnic-font-size;
122
+ padding: ($unnnic-spacing-xs)
123
+ ($unnnic-spacing-sm - $unnnic-border-width-thinner);
129
124
  }
130
125
 
131
126
  &.unnnic-text-area__textarea--type-error {
@@ -3,12 +3,7 @@
3
3
  exports[`TextArea.vue > matches the snapshot 1`] = `
4
4
  "<section data-v-9f8d6c86="" data-v-735b3c51="" class="unnnic-form-element">
5
5
  <p data-v-9f8d6c86="" class="unnnic-form-element__label">Description</p><textarea data-v-735b3c51="" class="unnnic-text-area__textarea unnnic-text-area__textarea--size-md unnnic-text-area__textarea--type-normal" placeholder="Enter text" maxlength="200" value=""></textarea>
6
- <section data-v-9f8d6c86="" class="unnnic-form-element__hints-container">
7
- <section data-v-9f8d6c86="" class="unnnic-form-element__message-container">
8
- <!--v-if-->
9
- <!--v-if-->
10
- </section>
11
- <p data-v-9f8d6c86="">0/200</p>
12
- </section>
6
+ <!--v-if-->
7
+ <p data-v-9f8d6c86="" class="unnnic-form-element__message"> <span data-v-9f8d6c86="" class="unnnic-form-element__right-message">0/200</span></p>
13
8
  </section>"
14
9
  `;
@@ -88,9 +88,8 @@ import ModalDialog from "./ModalDialog/ModalDialog.vue";
88
88
  import Tour from "./Tour/Tour.vue";
89
89
  import Navigator from "./Navigator/index.vue";
90
90
  import SelectTime from "./SelectTime/index.vue";
91
- import TemplatePreview from "./TemplatePreview/TemplatePreview.vue";
92
- import TemplatePreviewModal from "./TemplatePreview/TemplatePreviewModal.vue";
93
- import DataTable from './DataTable/index.vue';
91
+ import DataTable from "./DataTable/index.vue";
92
+ import Chip from "./Chip/Chip.vue";
94
93
 
95
94
  type VueComponent = Component;
96
95
 
@@ -189,9 +188,8 @@ export const components: ComponentsMap = {
189
188
  unnnicTour: Tour,
190
189
  unnnicNavigator: Navigator,
191
190
  unnnicSelectTime: SelectTime,
192
- unnnicTemplatePreview: TemplatePreview,
193
- unnnicTemplatePreviewModal: TemplatePreviewModal,
194
191
  unnnicDataTable: DataTable,
192
+ unnnicChip: Chip,
195
193
  };
196
194
 
197
195
  export const unnnicFontSize = fontSize;
@@ -284,10 +282,9 @@ export const unnnicDrawer = Drawer;
284
282
  export const unnnicTableNext = TableNext;
285
283
  export const unnnicTour = Tour;
286
284
  export const unnnicNavigator = Navigator;
287
- export const unnnicSelectTime = SelectTime as VueComponent;
288
- export const unnnicTemplatePreview = TemplatePreview as VueComponent;
289
- export const unnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
290
285
  export const unnnicDataTable = DataTable as VueComponent;
286
+ export const unnnicSelectTime = SelectTime as VueComponent;
287
+ export const unnnicChip = Chip;
291
288
 
292
289
  export const UnnnicFontSize = fontSize;
293
290
  export const UnnnicFormElement = formElement;
@@ -379,8 +376,6 @@ export const UnnnicDrawer = Drawer;
379
376
  export const UnnnicTableNext = TableNext;
380
377
  export const UnnnicTour = Tour;
381
378
  export const UnnnicNavigator = Navigator;
382
- export const UnnnicSelectTime = SelectTime as VueComponent;
383
- export const UnnnicTemplatePreview = TemplatePreview as VueComponent;
384
- export const UnnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
385
379
  export const UnnnicDataTable = DataTable as VueComponent;
386
-
380
+ export const UnnnicSelectTime = SelectTime as VueComponent;
381
+ export const UnnnicChip = Chip;
@@ -8,7 +8,7 @@ export default {
8
8
  description: {
9
9
  component: `Allows users to perform an action or navigate to another page.
10
10
  It has styles for various needs and are ideal for directing the user's attention.
11
- It is divided into 5 types: Primary, Secondary, Tertiary, Warning, Attention.
11
+ It is divided into 6 types: Primary, Secondary, Tertiary, Alternative, Warning, Attention.
12
12
  Each of these types has its states.
13
13
  <br/>
14
14
  <br/>
@@ -40,6 +40,7 @@ export default {
40
40
  'primary',
41
41
  'secondary',
42
42
  'tertiary',
43
+ 'alternative',
43
44
  'warning',
44
45
  'attention',
45
46
  ],
@@ -113,6 +114,14 @@ export const OnlyIcon = {
113
114
  },
114
115
  };
115
116
 
117
+ export const Alternative = {
118
+ args: {
119
+ type: 'alternative',
120
+ iconLeft: 'add',
121
+ text: 'Text',
122
+ },
123
+ };
124
+
116
125
  export const Warning = {
117
126
  parameters: {
118
127
  docs: {
@@ -0,0 +1,173 @@
1
+ import UnnnicChip from '../components/Chip/Chip.vue';
2
+
3
+ export default {
4
+ title: 'Data Display/Chip',
5
+ component: UnnnicChip,
6
+ tags: ['autodocs'],
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component: `A simplified compact element used for selection and filtering.
11
+ Chips are commonly used to display tags, filters, or selectable options
12
+ with automatic styling based on selection state. They provide a clean
13
+ and organized way to show multiple related items with clear visual feedback.`,
14
+ },
15
+ },
16
+ },
17
+ args: {
18
+ text: 'Chip Text',
19
+ type: 'single',
20
+ isSelected: false,
21
+ count: null,
22
+ isClickable: false,
23
+ },
24
+ argTypes: {
25
+ type: {
26
+ control: { type: 'select' },
27
+ options: ['single', 'multiple'],
28
+ description: 'The type of chip - single for basic display, multiple for selection with icons',
29
+ },
30
+ text: {
31
+ control: { type: 'text' },
32
+ description: 'The text content displayed in the chip',
33
+ },
34
+ isSelected: {
35
+ control: { type: 'boolean' },
36
+ description: 'Whether the chip is in selected state (affects styling and icons)',
37
+ },
38
+ count: {
39
+ control: { type: 'number' },
40
+ description: 'Optional count number displayed in the chip',
41
+ },
42
+ isClickable: {
43
+ control: { type: 'boolean' },
44
+ description: 'Whether the chip should show clickable styling (cursor pointer)',
45
+ },
46
+ },
47
+ };
48
+
49
+ export const Default = {
50
+ args: {
51
+ text: 'Default Chip',
52
+ type: 'single',
53
+ },
54
+ };
55
+
56
+ export const Selected = {
57
+ args: {
58
+ text: 'Selected Chip',
59
+ type: 'single',
60
+ isSelected: true,
61
+ },
62
+ };
63
+
64
+ export const WithCount = {
65
+ args: {
66
+ text: 'Messages',
67
+ type: 'single',
68
+ count: 5,
69
+ },
70
+ };
71
+
72
+ export const WithCountSelected = {
73
+ args: {
74
+ text: 'Selected Messages',
75
+ type: 'single',
76
+ count: 12,
77
+ isSelected: true,
78
+ },
79
+ };
80
+
81
+ export const MultipleType = {
82
+ args: {
83
+ text: 'Multiple Chip',
84
+ type: 'multiple',
85
+ isSelected: false,
86
+ },
87
+ };
88
+
89
+ export const MultipleSelected = {
90
+ args: {
91
+ text: 'Selected Multiple',
92
+ type: 'multiple',
93
+ isSelected: true,
94
+ },
95
+ };
96
+
97
+ export const MultipleWithCount = {
98
+ args: {
99
+ text: 'Items',
100
+ type: 'multiple',
101
+ count: 8,
102
+ isSelected: false,
103
+ },
104
+ };
105
+
106
+ export const MultipleWithCountSelected = {
107
+ args: {
108
+ text: 'Selected Items',
109
+ type: 'multiple',
110
+ count: 15,
111
+ isSelected: true,
112
+ },
113
+ };
114
+
115
+ export const LongText = {
116
+ args: {
117
+ text: 'This is a chip with longer text content',
118
+ type: 'single',
119
+ },
120
+ };
121
+
122
+ export const LongTextSelected = {
123
+ args: {
124
+ text: 'This is a selected chip with longer text',
125
+ type: 'single',
126
+ isSelected: true,
127
+ },
128
+ };
129
+
130
+ export const Clickable = {
131
+ args: {
132
+ text: 'Clickable Chip',
133
+ type: 'single',
134
+ isClickable: true,
135
+ },
136
+ };
137
+
138
+ export const ClickableSelected = {
139
+ args: {
140
+ text: 'Clickable Selected',
141
+ type: 'multiple',
142
+ isSelected: true,
143
+ isClickable: true,
144
+ },
145
+ };
146
+
147
+ // Interactive example showing state changes
148
+ export const Interactive = {
149
+ args: {
150
+ text: 'Click to toggle',
151
+ type: 'multiple',
152
+ count: 3,
153
+ isClickable: true,
154
+ },
155
+ render: (args) => ({
156
+ components: { UnnnicChip },
157
+ data() {
158
+ return {
159
+ selected: args.isSelected || false,
160
+ };
161
+ },
162
+ template: `
163
+ <UnnnicChip
164
+ :text="'${args.text}'"
165
+ :type="'${args.type}'"
166
+ :count="${args.count}"
167
+ :isSelected="selected"
168
+ :isClickable="true"
169
+ @click="selected = !selected"
170
+ />
171
+ `,
172
+ }),
173
+ };
@@ -35,7 +35,9 @@ export default {
35
35
  },
36
36
  },
37
37
  template: `
38
- <unnnic-input v-model="value" @icon-right-click="click" v-bind="args" label="Label" />
38
+ <unnnic-form-element label="Label" message="Helper text">
39
+ <unnnic-input v-model="value" @icon-right-click="click" v-bind="args" />
40
+ </unnnic-form-element>
39
41
  `,
40
42
  }),
41
43
  };
@@ -154,20 +156,4 @@ export const Mask = {
154
156
  placeholder: 'Text',
155
157
  mask: ['###.###.###-##', '##.###.###/####-##'],
156
158
  },
157
-
158
- };
159
-
160
- export const LimitMaxLength = {
161
- args: {
162
- placeholder: 'Text',
163
- maxlength: 10,
164
- showMaxlengthCounter: true,
165
- },
166
159
  };
167
-
168
- export const WithTooltip = {
169
- args: {
170
- placeholder: 'Text',
171
- tooltip: 'Tooltip',
172
- },
173
- };