@weni/unnnic-system 3.0.4-alpha.1 → 3.0.4

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 (34) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -2
  3. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +3 -3
  4. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +1 -1
  5. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  6. package/dist/components/index.d.ts +6 -263
  7. package/dist/components/index.d.ts.map +1 -1
  8. package/dist/{es-39b05ec7.mjs → es-91798705.mjs} +1 -1
  9. package/dist/{index-c43e689f.mjs → index-8110960e.mjs} +9163 -9498
  10. package/dist/{pt-br-b70cfbf8.mjs → pt-br-ca5eccc1.mjs} +1 -1
  11. package/dist/style.css +1 -1
  12. package/dist/unnnic.mjs +58 -61
  13. package/dist/unnnic.umd.js +43 -44
  14. package/package.json +2 -2
  15. package/src/assets/scss/colors.scss +3 -0
  16. package/src/components/ModalDialog/ModalDialog.vue +29 -27
  17. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
  18. package/src/components/index.ts +0 -9
  19. package/dist/components/DataTable/index.vue.d.ts +0 -156
  20. package/dist/components/DataTable/index.vue.d.ts.map +0 -1
  21. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +0 -9
  22. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +0 -1
  23. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +0 -15
  24. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +0 -1
  25. package/src/assets/img/previews/doc-preview.png +0 -0
  26. package/src/assets/img/previews/image-preview.png +0 -0
  27. package/src/assets/img/previews/video-preview.png +0 -0
  28. package/src/components/DataTable/index.vue +0 -493
  29. package/src/components/TemplatePreview/TemplatePreview.vue +0 -249
  30. package/src/components/TemplatePreview/TemplatePreviewModal.vue +0 -51
  31. package/src/components/TemplatePreview/types.d.ts +0 -16
  32. package/src/stories/DataTable.stories.js +0 -332
  33. package/src/stories/TemplatePreview.stories.js +0 -94
  34. package/src/stories/TemplatePreviewModal.stories.js +0 -110
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.0.4-alpha.1",
3
+ "version": "3.0.4",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -99,4 +99,4 @@
99
99
  "vue-eslint-parser": "^9.4.2",
100
100
  "vue-tsc": "^3.0.5"
101
101
  }
102
- }
102
+ }
@@ -343,6 +343,7 @@ $scheme-colors:
343
343
  "bg-base" $unnnic-color-white,
344
344
  "bg-soft" $unnnic-color-gray-50,
345
345
  "bg-muted" $unnnic-color-gray-100,
346
+ "bg-active" $unnnic-color-teal-600,
346
347
  "bg-info" $unnnic-color-aux-blue-100,
347
348
  "bg-success" $unnnic-color-aux-green-100,
348
349
  "bg-warning" $unnnic-color-aux-yellow-50,
@@ -353,6 +354,7 @@ $scheme-colors:
353
354
  "fg-muted" $unnnic-color-gray-300,
354
355
  "fg-emphasized" $unnnic-color-gray-900,
355
356
  "fg-inverted" $unnnic-color-white,
357
+ "fg-active" $unnnic-color-teal-600,
356
358
  "fg-info" $unnnic-color-aux-blue-500,
357
359
  "fg-success" $unnnic-color-aux-green-500,
358
360
  "fg-warning" $unnnic-color-aux-yellow-500,
@@ -363,6 +365,7 @@ $scheme-colors:
363
365
  "border-soft" $unnnic-color-gray-100,
364
366
  "border-muted" $unnnic-color-gray-200,
365
367
  "border-emphasized" $unnnic-color-gray-400,
368
+ "border-active" $unnnic-color-teal-600,
366
369
  "border-info" $unnnic-color-aux-blue-300,
367
370
  "border-success" $unnnic-color-aux-green-300,
368
371
  "border-warning" $unnnic-color-aux-yellow-300,
@@ -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">
@@ -88,9 +88,6 @@ 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';
94
91
 
95
92
  type VueComponent = Component;
96
93
 
@@ -189,9 +186,6 @@ export const components: ComponentsMap = {
189
186
  unnnicTour: Tour,
190
187
  unnnicNavigator: Navigator,
191
188
  unnnicSelectTime: SelectTime,
192
- unnnicTemplatePreview: TemplatePreview,
193
- unnnicTemplatePreviewModal: TemplatePreviewModal,
194
- unnnicDataTable: DataTable,
195
189
  };
196
190
 
197
191
  export const unnnicFontSize = fontSize;
@@ -285,6 +279,3 @@ export const unnnicTableNext = TableNext;
285
279
  export const unnnicTour = Tour;
286
280
  export const unnnicNavigator = Navigator;
287
281
  export const unnnicSelectTime = SelectTime as VueComponent;
288
- export const unnnicTemplatePreview = TemplatePreview as VueComponent;
289
- export const unnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
290
- export const unnnicDataTable = DataTable;
@@ -1,156 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
2
- headers: {
3
- type: {
4
- title: string;
5
- isSortable?: boolean;
6
- itemKey: string;
7
- align?: "start" | "center" | "end";
8
- size?: number | string;
9
- }[];
10
- required: true;
11
- };
12
- items: {
13
- type: {
14
- [key: string]: any;
15
- }[];
16
- required: true;
17
- };
18
- isLoading: {
19
- type: Boolean;
20
- default: false;
21
- };
22
- size: {
23
- type: "sm" | "md";
24
- default: "md";
25
- };
26
- height: {
27
- type: String;
28
- default: "";
29
- };
30
- maxHeight: {
31
- type: String;
32
- default: "";
33
- };
34
- clickable: {
35
- type: Boolean;
36
- default: false;
37
- };
38
- fixedHeaders: {
39
- type: Boolean;
40
- default: false;
41
- };
42
- hideHeaders: {
43
- type: Boolean;
44
- default: false;
45
- };
46
- hidePagination: {
47
- type: Boolean;
48
- default: false;
49
- };
50
- page: {
51
- type: Number;
52
- default: 1;
53
- };
54
- pageTotal: {
55
- type: Number;
56
- default: 0;
57
- };
58
- pageInterval: {
59
- type: Number;
60
- default: 5;
61
- };
62
- locale: {
63
- type: string;
64
- default: "en";
65
- };
66
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
67
- "update:sort": (sort: {
68
- header: string;
69
- order: string;
70
- }) => any;
71
- itemClick: (item: {
72
- [key: string]: any;
73
- }) => any;
74
- "update:page": (page: number) => any;
75
- }, string, import('vue').PublicProps, Readonly<{
76
- headers: {
77
- type: {
78
- title: string;
79
- isSortable?: boolean;
80
- itemKey: string;
81
- align?: "start" | "center" | "end";
82
- size?: number | string;
83
- }[];
84
- required: true;
85
- };
86
- items: {
87
- type: {
88
- [key: string]: any;
89
- }[];
90
- required: true;
91
- };
92
- isLoading: {
93
- type: Boolean;
94
- default: false;
95
- };
96
- size: {
97
- type: "sm" | "md";
98
- default: "md";
99
- };
100
- height: {
101
- type: String;
102
- default: "";
103
- };
104
- maxHeight: {
105
- type: String;
106
- default: "";
107
- };
108
- clickable: {
109
- type: Boolean;
110
- default: false;
111
- };
112
- fixedHeaders: {
113
- type: Boolean;
114
- default: false;
115
- };
116
- hideHeaders: {
117
- type: Boolean;
118
- default: false;
119
- };
120
- hidePagination: {
121
- type: Boolean;
122
- default: false;
123
- };
124
- page: {
125
- type: Number;
126
- default: 1;
127
- };
128
- pageTotal: {
129
- type: Number;
130
- default: 0;
131
- };
132
- pageInterval: {
133
- type: Number;
134
- default: 5;
135
- };
136
- locale: {
137
- type: string;
138
- default: "en";
139
- };
140
- }> & Readonly<{
141
- "onUpdate:sort"?: ((sort: {
142
- header: string;
143
- order: string;
144
- }) => any) | undefined;
145
- onItemClick?: ((item: {
146
- [key: string]: any;
147
- }) => any) | undefined;
148
- "onUpdate:page"?: ((page: number) => any) | undefined;
149
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, any>;
150
- export default _default;
151
- type __VLS_WithTemplateSlots<T, S> = T & {
152
- new (): {
153
- $slots: S;
154
- };
155
- };
156
- //# sourceMappingURL=index.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.vue"],"names":[],"mappings":"AA2JA;;aA6gBW;QACP,IAAI,EAAE;mBAtBD,MAAM;yBACA,OAAO;qBACX,MAAM;oBACP,OAAO,GAAG,QAAQ,GAAG,KAAK;mBAC3B,MAAM,GAAG,MAAM;WAkBG,CAAC;QACxB,QAAQ,EAAE,IAAI,CAAC;KAChB;WACM;QACL,IAAI,EAAE;;WAAe,CAAC;QACtB,QAAQ,EAAE,IAAI,CAAC;KAChB;eACU;QACT,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,KAAK,CAAC;KAChB;UACK;QACJ,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,EAA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AE,MAAM,CAAC;QACb,OAAO,EAAE,EAAE,CAAC;KACb;eACU;QACT,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,KAAK,CAAC;KAChB;kBACa;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,KAAK,CAAC;KAChB;iBACY;QACX,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,KAAK,CAAC;KAChB;oBACe;QACd,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,KAAK,CAAC;KAChB;UACK;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CAAC,CAAC;KACZ;eACU;QACT,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CAAC,CAAC;KACZ;kBACa;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CAAC,CAAC;KACZ;YACO;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,IAAI,CAAC;KACf;;;gBA9D+B,MAAM;eAAS,MAAM;;;;;;;AAhBvD,wBA+aK;AASL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,9 +0,0 @@
1
- import { Template } from './types';
2
- interface Props {
3
- template?: Template | null;
4
- }
5
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
6
- template: Template | null;
7
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
8
- export default _default;
9
- //# sourceMappingURL=TemplatePreview.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TemplatePreview.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TemplatePreview/TemplatePreview.vue"],"names":[],"mappings":"AAgGA;AA6PA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQxC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B;;cADY,QAAQ,GAAG,IAAI;;AAkN5B,wBAQG"}
@@ -1,15 +0,0 @@
1
- import { Template } from './types';
2
- interface Props {
3
- locale?: string;
4
- template: Template;
5
- modelValue: boolean;
6
- }
7
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
- close: () => any;
9
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
10
- onClose?: (() => any) | undefined;
11
- }>, {
12
- locale: string;
13
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
- export default _default;
15
- //# sourceMappingURL=TemplatePreviewModal.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TemplatePreviewModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TemplatePreview/TemplatePreviewModal.vue"],"names":[],"mappings":"AAWA;AAwDA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAUxC,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;;;;;;YAHU,MAAM;;AAgGjB,wBASG"}