@weni/unnnic-system 3.12.6 → 3.12.7-alpha-teleports.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 (77) hide show
  1. package/README.md +9 -1
  2. package/dist/{es-e7dc92a2.mjs → es-95214495.mjs} +1 -1
  3. package/dist/{index-84ade580.mjs → index-edacc4d7.mjs} +99452 -96558
  4. package/dist/index.d.ts +5043 -1561
  5. package/dist/{pt-br-51fd679a.mjs → pt-br-fb80e803.mjs} +1 -1
  6. package/dist/style.css +1 -1
  7. package/dist/unnnic.mjs +234 -204
  8. package/dist/unnnic.umd.js +48 -44
  9. package/package.json +3 -2
  10. package/src/assets/scss/tailwind.scss +8 -0
  11. package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
  12. package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +2 -1
  13. package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +61 -60
  14. package/src/components/Checkbox/Checkbox.vue +2 -8
  15. package/src/components/CheckboxGroup/CheckboxGroup.vue +5 -7
  16. package/src/components/Chip/Chip.vue +1 -1
  17. package/src/components/Drawer/Drawer.vue +180 -270
  18. package/src/components/Drawer/__tests__/Drawer.spec.js +32 -43
  19. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
  20. package/src/components/FormElement/FormElement.vue +87 -96
  21. package/src/components/Input/Input.vue +2 -2
  22. package/src/components/ModalDialog/ModalDialog.vue +63 -154
  23. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
  24. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
  25. package/src/components/Radio/Radio.vue +6 -12
  26. package/src/components/Radio/__test__/Radio.spec.js +1 -3
  27. package/src/components/RadioGroup/RadioGroup.vue +10 -18
  28. package/src/components/Switch/Switch.vue +3 -10
  29. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
  30. package/src/components/TemplatePreview/TemplatePreview.vue +25 -28
  31. package/src/components/TemplatePreview/TemplatePreviewModal.vue +10 -10
  32. package/src/components/TemplatePreview/types.d.ts +3 -3
  33. package/src/components/Toast/Toast.vue +4 -1
  34. package/src/components/Toast/ToastManager.ts +4 -1
  35. package/src/components/Toast/__tests__/ToastManager.spec.js +10 -6
  36. package/src/components/ToolTip/ToolTip.vue +25 -177
  37. package/src/components/ToolTip/__tests__/ToolTip.spec.js +339 -61
  38. package/src/components/index.ts +60 -0
  39. package/src/components/ui/dialog/Dialog.vue +19 -0
  40. package/src/components/ui/dialog/DialogClose.vue +29 -0
  41. package/src/components/ui/dialog/DialogContent.vue +140 -0
  42. package/src/components/ui/dialog/DialogFooter.vue +50 -0
  43. package/src/components/ui/dialog/DialogHeader.vue +83 -0
  44. package/src/components/ui/dialog/DialogTitle.vue +38 -0
  45. package/src/components/ui/dialog/DialogTrigger.vue +16 -0
  46. package/src/components/ui/dialog/index.ts +7 -0
  47. package/src/components/ui/drawer/Drawer.vue +27 -0
  48. package/src/components/ui/drawer/DrawerClose.vue +31 -0
  49. package/src/components/ui/drawer/DrawerContent.vue +113 -0
  50. package/src/components/ui/drawer/DrawerDescription.vue +40 -0
  51. package/src/components/ui/drawer/DrawerFooter.vue +38 -0
  52. package/src/components/ui/drawer/DrawerHeader.vue +57 -0
  53. package/src/components/ui/drawer/DrawerOverlay.vue +33 -0
  54. package/src/components/ui/drawer/DrawerTitle.vue +37 -0
  55. package/src/components/ui/drawer/DrawerTrigger.vue +31 -0
  56. package/src/components/ui/drawer/index.ts +10 -0
  57. package/src/components/ui/popover/PopoverContent.vue +7 -3
  58. package/src/components/ui/popover/PopoverTrigger.vue +5 -1
  59. package/src/components/ui/tooltip/Tooltip.vue +21 -0
  60. package/src/components/ui/tooltip/TooltipContent.vue +77 -0
  61. package/src/components/ui/tooltip/TooltipTrigger.vue +24 -0
  62. package/src/components/ui/tooltip/index.ts +3 -0
  63. package/src/index.ts +9 -2
  64. package/src/lib/__tests__/teleport-target.spec.ts +73 -0
  65. package/src/lib/layer-manager.ts +64 -0
  66. package/src/lib/teleport-target.ts +46 -0
  67. package/src/stories/Dialog.stories.js +832 -0
  68. package/src/stories/Drawer.stories.js +1 -1
  69. package/src/stories/DrawerNext.stories.js +611 -0
  70. package/src/stories/LayerManager.docs.mdx +40 -0
  71. package/src/stories/LayerManager.stories.js +407 -0
  72. package/src/stories/ModalDialog.mdx +3 -0
  73. package/src/stories/ModalDialog.stories.js +1 -1
  74. package/src/stories/TemplatePreview.stories.js +27 -27
  75. package/src/stories/TemplatePreviewModal.stories.js +31 -31
  76. package/.vscode/extensions.json +0 -3
  77. package/CHANGELOG.md +0 -1074
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.12.6",
3
+ "version": "3.12.7-alpha-teleports.0",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -63,6 +63,7 @@
63
63
  "reka-ui": "^2.6.0",
64
64
  "remark-gfm": "^4.0.0",
65
65
  "tw-animate-css": "^1.4.0",
66
+ "vaul-vue": "^0.4.1",
66
67
  "vue": "^3.4.8",
67
68
  "vue-i18n": "9",
68
69
  "vue-the-mask": "^0.11.1"
@@ -114,4 +115,4 @@
114
115
  "vue-eslint-parser": "^9.4.2",
115
116
  "vue-tsc": "^3.0.5"
116
117
  }
117
- }
118
+ }
@@ -92,5 +92,13 @@
92
92
  @apply bg-background text-foreground;
93
93
  font-family: $unnnic-font-family;
94
94
  }
95
+
96
+ button {
97
+ border: none;
98
+ background: none;
99
+ padding: 0;
100
+ margin: 0;
101
+ cursor: pointer;
102
+ }
95
103
  }
96
104
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`UnnnicAlert.vue > matches the snapshot 1`] = `
4
4
  "<transition-stub data-v-c3231c18="" name="toast-slide" appear="true" persisted="false" css="true" data-testid="toast-transition">
5
- <aside data-v-c3231c18="" class="unnnic-toast unnnic-toast--success" role="status" aria-live="polite" data-testid="toast">
5
+ <aside data-v-c3231c18="" class="unnnic-toast unnnic-toast--success" role="status" aria-live="polite" data-testid="toast" style="z-index: 1005;">
6
6
  <section data-v-c3231c18="" class="unnnic-toast__content" data-testid="toast-content">
7
7
  <header data-v-c3231c18="" class="unnnic-toast__header" data-testid="toast-header"><span data-v-26446d8e="" data-v-c3231c18="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--green-500 unnnic-icon-size--ant unnnic-icon__size--ant" data-testid="toast-type-icon" translate="no">check_circle</span>
8
8
  <h3 data-v-c3231c18="" class="unnnic-toast__title" data-testid="toast-title">Test Alert</h3><span data-v-26446d8e="" data-v-c3231c18="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-dark unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable unnnic-toast__close" data-testid="toast-close-icon" translate="no">close</span>
@@ -59,8 +59,9 @@ const props = defineProps<{
59
59
  }>();
60
60
 
61
61
  const calculatedTransform = computed(() => {
62
- return `skew(${props.data.length === 2 ? '-8deg' : '-12deg'}, 0deg) translateX(-20px)`;
62
+ return `skew(${props.data.length === 2 ? '-8deg': '-12deg'}, 0deg) translateX(-20px)`;
63
63
  });
64
+
64
65
  </script>
65
66
 
66
67
  <style lang="scss" scoped>
@@ -1,64 +1,65 @@
1
1
  <template>
2
- <ChartFunnelBaseRow
3
- class="unnnic-chart-funnel-two-rows"
4
- :rows="rows"
5
- viewBox="0 0 250 148"
6
- />
7
- </template>
8
-
9
- <script>
10
- import ChartFunnelBaseRow from './ChartFunnelBaseRow.vue';
11
- export default {
12
- name: 'UnnnicChartFunnelTwoRows',
13
-
14
- components: {
15
- ChartFunnelBaseRow,
16
- },
17
-
18
- props: {
19
- data: {
20
- type: Array,
21
- required: true,
2
+ <ChartFunnelBaseRow
3
+ class="unnnic-chart-funnel-two-rows"
4
+ :rows="rows"
5
+ viewBox="0 0 250 148"
6
+ />
7
+ </template>
8
+
9
+ <script>
10
+ import ChartFunnelBaseRow from './ChartFunnelBaseRow.vue';
11
+ export default {
12
+ name: 'UnnnicChartFunnelTwoRows',
13
+
14
+ components: {
15
+ ChartFunnelBaseRow,
22
16
  },
23
- },
24
-
25
- computed: {
26
- rows() {
27
- const { data } = this;
28
- return [
29
- {
30
- pathD:
31
- 'M362.938 0H12.025C6.30976 0 2.43799 5.81972 4.64626 11.0911L31 74H343.75L370.307 11.1122C372.535 5.83818 368.663 0 362.938 0Z',
32
- titleX: '50%',
33
- titleY: '32',
34
- descriptionX: '50%',
35
- descriptionY: '52',
36
- title: data[0].title,
37
- description: data[0].description,
38
- },
39
- {
40
- pathD: 'M344 74H31L63.4654 148H311.535L344 74Z',
41
- titleX: '50%',
42
- titleY: '106',
43
- descriptionX: '50%',
44
- descriptionY: '126',
45
- title: data[1].title,
46
- description: data[1].description,
47
- },
48
- ];
17
+
18
+ props: {
19
+ data: {
20
+ type: Array,
21
+ required: true,
22
+ },
49
23
  },
50
- },
51
- };
52
- </script>
53
-
54
- <style lang="scss">
55
- @use '@/assets/scss/unnnic' as *;
56
- .unnnic-chart-funnel-two-rows {
57
- [class$='row']:nth-child(1) {
58
- fill: $unnnic-color-weni-950;
59
- }
60
- [class$='row']:nth-child(2) {
61
- fill: $unnnic-color-weni-800;
24
+
25
+ computed: {
26
+ rows() {
27
+ const { data } = this;
28
+ return [
29
+ {
30
+ pathD:
31
+ 'M362.938 0H12.025C6.30976 0 2.43799 5.81972 4.64626 11.0911L31 74H343.75L370.307 11.1122C372.535 5.83818 368.663 0 362.938 0Z',
32
+ titleX: '50%',
33
+ titleY: '32',
34
+ descriptionX: '50%',
35
+ descriptionY: '52',
36
+ title: data[0].title,
37
+ description: data[0].description,
38
+ },
39
+ {
40
+ pathD: 'M344 74H31L63.4654 148H311.535L344 74Z',
41
+ titleX: '50%',
42
+ titleY: '106',
43
+ descriptionX: '50%',
44
+ descriptionY: '126',
45
+ title: data[1].title,
46
+ description: data[1].description,
47
+ }
48
+ ];
49
+ },
50
+ },
51
+ };
52
+ </script>
53
+
54
+ <style lang="scss">
55
+ @use '@/assets/scss/unnnic' as *;
56
+ .unnnic-chart-funnel-two-rows {
57
+ [class$='row']:nth-child(1) {
58
+ fill: $unnnic-color-weni-950;
59
+ }
60
+ [class$='row']:nth-child(2) {
61
+ fill: $unnnic-color-weni-800;
62
+ }
62
63
  }
63
- }
64
- </style>
64
+ </style>
65
+
@@ -1,12 +1,7 @@
1
1
  <!-- eslint-disable vue/multi-word-component-names -->
2
2
  <template>
3
3
  <section class="unnnic-checkbox">
4
- <label
5
- :class="[
6
- 'unnnic-checkbox__input-wrapper',
7
- { 'unnnic-checkbox__input-wrapper--disabled': disabled },
8
- ]"
9
- >
4
+ <label :class="['unnnic-checkbox__input-wrapper', {'unnnic-checkbox__input-wrapper--disabled': disabled}]">
10
5
  <input
11
6
  :class="[
12
7
  'unnnic-checkbox__input',
@@ -155,8 +150,7 @@ $checkbox-size: 21px;
155
150
  }
156
151
  }
157
152
 
158
- &:disabled,
159
- &:disabled:checked {
153
+ &:disabled, &:disabled:checked {
160
154
  background-color: $unnnic-color-bg-muted;
161
155
  border: 1px solid $unnnic-color-border-muted;
162
156
 
@@ -1,10 +1,8 @@
1
1
  <template>
2
- <section
3
- :class="[
4
- 'unnnic-checkbox-group__container',
5
- `unnnic-checkbox-group--state-${state}`,
6
- ]"
7
- >
2
+ <section :class="[
3
+ 'unnnic-checkbox-group__container',
4
+ `unnnic-checkbox-group--state-${state}`,
5
+ ]">
8
6
  <UnnnicLabel
9
7
  v-if="label"
10
8
  :label="label"
@@ -54,7 +52,7 @@ const props = defineProps({
54
52
  },
55
53
  });
56
54
  </script>
57
-
55
+
58
56
  <style lang="scss" scoped>
59
57
  @use '@/assets/scss/unnnic' as *;
60
58
 
@@ -80,7 +80,7 @@ const chipClass = computed(() => {
80
80
  border-radius: 600px;
81
81
  background-color: $unnnic-color-bg-base;
82
82
  border: 1px solid transparent;
83
-
83
+
84
84
  &:hover {
85
85
  background-color: $unnnic-color-bg-soft;
86
86
  }