@weni/unnnic-system 3.14.0-alpha-teleports.0 → 3.15.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 (82) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -9
  3. package/dist/{es-0d53b5b2.mjs → es-b51fb49d.mjs} +1 -1
  4. package/dist/{index-d7070de8.mjs → index-88ec0352.mjs} +26529 -29321
  5. package/dist/index.d.ts +1485 -4826
  6. package/dist/{pt-br-bf4e1f97.mjs → pt-br-cd9f0dbc.mjs} +1 -1
  7. package/dist/style.css +1 -1
  8. package/dist/unnnic.mjs +204 -232
  9. package/dist/unnnic.umd.js +46 -50
  10. package/package.json +2 -3
  11. package/src/assets/scss/tailwind.scss +0 -8
  12. package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
  13. package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +1 -2
  14. package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +60 -61
  15. package/src/components/CheckboxGroup/CheckboxGroup.vue +7 -5
  16. package/src/components/Chip/Chip.vue +1 -1
  17. package/src/components/DatePicker/DatePicker.vue +1 -10
  18. package/src/components/Drawer/Drawer.vue +270 -180
  19. package/src/components/Drawer/__tests__/Drawer.spec.js +43 -32
  20. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +19 -18
  21. package/src/components/FormElement/FormElement.vue +96 -87
  22. package/src/components/InputDatePicker/InputDatePicker.vue +73 -68
  23. package/src/components/InputDatePicker/__test__/InputDatePicker.spec.js +24 -31
  24. package/src/components/ModalDialog/ModalDialog.vue +154 -63
  25. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +210 -30
  26. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
  27. package/src/components/Radio/Radio.vue +12 -6
  28. package/src/components/Radio/__test__/Radio.spec.js +3 -1
  29. package/src/components/RadioGroup/RadioGroup.vue +18 -10
  30. package/src/components/Select/__tests__/Select.spec.js +74 -0
  31. package/src/components/Select/__tests__/SelectItem.spec.js +35 -15
  32. package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +18 -0
  33. package/src/components/Select/index.vue +131 -22
  34. package/src/components/Switch/Switch.vue +10 -3
  35. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -3
  36. package/src/components/TemplatePreview/TemplatePreview.vue +28 -25
  37. package/src/components/TemplatePreview/TemplatePreviewModal.vue +10 -10
  38. package/src/components/TemplatePreview/types.d.ts +3 -3
  39. package/src/components/Toast/Toast.vue +1 -4
  40. package/src/components/Toast/ToastManager.ts +1 -4
  41. package/src/components/Toast/__tests__/ToastManager.spec.js +6 -10
  42. package/src/components/ToolTip/ToolTip.vue +177 -25
  43. package/src/components/ToolTip/__tests__/ToolTip.spec.js +61 -339
  44. package/src/components/index.ts +0 -56
  45. package/src/components/ui/popover/PopoverContent.vue +4 -7
  46. package/src/components/ui/popover/PopoverTrigger.vue +1 -5
  47. package/src/index.ts +2 -9
  48. package/src/stories/Drawer.stories.js +1 -1
  49. package/src/stories/ModalDialog.mdx +0 -3
  50. package/src/stories/ModalDialog.stories.js +1 -96
  51. package/src/stories/Select.stories.js +86 -0
  52. package/src/stories/TemplatePreview.stories.js +27 -27
  53. package/src/stories/TemplatePreviewModal.stories.js +31 -31
  54. package/src/components/ui/dialog/Dialog.vue +0 -19
  55. package/src/components/ui/dialog/DialogClose.vue +0 -29
  56. package/src/components/ui/dialog/DialogContent.vue +0 -140
  57. package/src/components/ui/dialog/DialogFooter.vue +0 -50
  58. package/src/components/ui/dialog/DialogHeader.vue +0 -83
  59. package/src/components/ui/dialog/DialogTitle.vue +0 -38
  60. package/src/components/ui/dialog/DialogTrigger.vue +0 -16
  61. package/src/components/ui/dialog/index.ts +0 -7
  62. package/src/components/ui/drawer/Drawer.vue +0 -27
  63. package/src/components/ui/drawer/DrawerClose.vue +0 -31
  64. package/src/components/ui/drawer/DrawerContent.vue +0 -113
  65. package/src/components/ui/drawer/DrawerDescription.vue +0 -40
  66. package/src/components/ui/drawer/DrawerFooter.vue +0 -38
  67. package/src/components/ui/drawer/DrawerHeader.vue +0 -57
  68. package/src/components/ui/drawer/DrawerOverlay.vue +0 -33
  69. package/src/components/ui/drawer/DrawerTitle.vue +0 -37
  70. package/src/components/ui/drawer/DrawerTrigger.vue +0 -31
  71. package/src/components/ui/drawer/index.ts +0 -10
  72. package/src/components/ui/tooltip/Tooltip.vue +0 -21
  73. package/src/components/ui/tooltip/TooltipContent.vue +0 -77
  74. package/src/components/ui/tooltip/TooltipTrigger.vue +0 -24
  75. package/src/components/ui/tooltip/index.ts +0 -3
  76. package/src/lib/__tests__/teleport-target.spec.ts +0 -73
  77. package/src/lib/layer-manager.ts +0 -64
  78. package/src/lib/teleport-target.ts +0 -46
  79. package/src/stories/Dialog.stories.js +0 -832
  80. package/src/stories/DrawerNext.stories.js +0 -611
  81. package/src/stories/LayerManager.docs.mdx +0 -40
  82. package/src/stories/LayerManager.stories.js +0 -407
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.14.0-alpha-teleports.0",
3
+ "version": "3.15.0",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -63,7 +63,6 @@
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",
67
66
  "vue": "^3.4.8",
68
67
  "vue-i18n": "9",
69
68
  "vue-the-mask": "^0.11.1"
@@ -115,4 +114,4 @@
115
114
  "vue-eslint-parser": "^9.4.2",
116
115
  "vue-tsc": "^3.0.5"
117
116
  }
118
- }
117
+ }
@@ -92,13 +92,5 @@
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
- }
103
95
  }
104
96
 
@@ -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" style="z-index: 1005;">
5
+ <aside data-v-c3231c18="" class="unnnic-toast unnnic-toast--success" role="status" aria-live="polite" data-testid="toast">
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,9 +59,8 @@ 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
-
65
64
  </script>
66
65
 
67
66
  <style lang="scss" scoped>
@@ -1,65 +1,64 @@
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,
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,
16
22
  },
17
-
18
- props: {
19
- data: {
20
- type: Array,
21
- required: true,
22
- },
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
+ ];
23
49
  },
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
- }
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;
63
62
  }
64
- </style>
65
-
63
+ }
64
+ </style>
@@ -1,8 +1,10 @@
1
1
  <template>
2
- <section :class="[
3
- 'unnnic-checkbox-group__container',
4
- `unnnic-checkbox-group--state-${state}`,
5
- ]">
2
+ <section
3
+ :class="[
4
+ 'unnnic-checkbox-group__container',
5
+ `unnnic-checkbox-group--state-${state}`,
6
+ ]"
7
+ >
6
8
  <UnnnicLabel
7
9
  v-if="label"
8
10
  :label="label"
@@ -52,7 +54,7 @@ const props = defineProps({
52
54
  },
53
55
  });
54
56
  </script>
55
-
57
+
56
58
  <style lang="scss" scoped>
57
59
  @use '@/assets/scss/unnnic' as *;
58
60
 
@@ -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
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- :class="['unnnic-date-picker', `unnnic-date-picker--${props.variant}`]"
3
+ class="unnnic-date-picker"
4
4
  data-testid="date-picker-root"
5
5
  >
6
6
  <template v-if="type === 'day'">
@@ -296,8 +296,6 @@ export interface DatePickerProps {
296
296
 
297
297
  locale?: string;
298
298
  translations?: Record<string, unknown>;
299
-
300
- variant?: 'card' | 'popover';
301
299
  }
302
300
 
303
301
  const props = withDefaults(defineProps<DatePickerProps>(), {
@@ -317,7 +315,6 @@ const props = withDefaults(defineProps<DatePickerProps>(), {
317
315
  disableClear: false,
318
316
  locale: undefined,
319
317
  translations: undefined,
320
- variant: 'card',
321
318
  });
322
319
 
323
320
  const emit = defineEmits<{
@@ -966,12 +963,6 @@ onMounted(() => {
966
963
  box-shadow: $unnnic-shadow-level-separated;
967
964
  overflow: hidden;
968
965
 
969
- &--popover {
970
- border-radius: 0;
971
- box-shadow: none;
972
- overflow: visible;
973
- }
974
-
975
966
  .month-container {
976
967
  display: flex;
977
968
  flex-direction: column;