@weni/unnnic-system 3.11.1-alpha.1 → 3.11.1-alpha.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 (47) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/DatePicker/DatePicker.vue.d.ts +69 -249
  3. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  4. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  5. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +47 -911
  6. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts.map +1 -1
  7. package/dist/components/Select/SelectItem.vue.d.ts +1 -1
  8. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +1 -1
  9. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +1 -1
  10. package/dist/components/Sidebar/SidebarItem.vue.d.ts +2 -2
  11. package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -1
  12. package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -1
  13. package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -1
  14. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -1
  15. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -1
  16. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -1
  17. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -1
  18. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -1
  19. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -1
  20. package/dist/{es-1e5cce64.mjs → es-fc643bdb.mjs} +1 -1
  21. package/dist/{index-8d75623f.mjs → index-4601aaf4.mjs} +9050 -9107
  22. package/dist/{pt-br-defd03da.mjs → pt-br-0b82e6d2.mjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/unnnic.mjs +1 -1
  25. package/dist/unnnic.umd.js +42 -42
  26. package/package.json +1 -1
  27. package/src/components/DatePicker/DatePicker.vue +628 -516
  28. package/src/components/DatePicker/__tests__/DatePicker.spec.js +227 -0
  29. package/src/components/Drawer/Drawer.vue +6 -2
  30. package/src/components/Drawer/__tests__/Drawer.spec.js +11 -15
  31. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +9 -9
  32. package/src/components/InputDatePicker/InputDatePicker.vue +149 -183
  33. package/src/components/InputDatePicker/__test__/InputDatePicker.spec.js +159 -0
  34. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -1
  35. package/src/components/ui/drawer/Drawer.vue +4 -0
  36. package/src/components/ui/drawer/DrawerClose.vue +4 -0
  37. package/src/components/ui/drawer/DrawerContent.vue +5 -1
  38. package/src/components/ui/drawer/DrawerDescription.vue +4 -0
  39. package/src/components/ui/drawer/DrawerFooter.vue +5 -1
  40. package/src/components/ui/drawer/DrawerHeader.vue +5 -1
  41. package/src/components/ui/drawer/DrawerOverlay.vue +5 -1
  42. package/src/components/ui/drawer/DrawerTitle.vue +5 -1
  43. package/src/components/ui/drawer/DrawerTrigger.vue +4 -0
  44. package/src/stories/DatePicker.stories.js +71 -0
  45. package/src/stories/InputDatePicker.stories.js +22 -0
  46. package/dist/components/index.d.ts +0 -25946
  47. package/dist/components/index.d.ts.map +0 -1
@@ -20,6 +20,7 @@ export default {
20
20
  months: { control: { type: 'array' } },
21
21
  days: { control: { type: 'array' } },
22
22
  options: { control: { type: 'array' } },
23
+ periodBaseDate: { control: { type: 'text' } },
23
24
  clearLabel: { control: { type: 'text' } },
24
25
  actionLabel: { control: { type: 'text' } },
25
26
  },
@@ -33,3 +34,73 @@ export const Default = {
33
34
  initialEndDate: '12-01-2021',
34
35
  },
35
36
  };
37
+
38
+ export const SmallDayPicker = {
39
+ args: {
40
+ size: 'small',
41
+ type: 'day',
42
+ maxDate: moment().format('YYYY-MM-DD'),
43
+ },
44
+ };
45
+
46
+ export const MonthView = {
47
+ args: {
48
+ size: 'large',
49
+ type: 'month',
50
+ maxDate: moment().format('YYYY-MM-DD'),
51
+ },
52
+ };
53
+
54
+ export const YearView = {
55
+ args: {
56
+ size: 'large',
57
+ type: 'year',
58
+ maxDate: moment().format('YYYY-MM-DD'),
59
+ },
60
+ };
61
+
62
+ export const WithMinAndMaxDateRange = {
63
+ args: {
64
+ size: 'large',
65
+ type: 'day',
66
+ minDate: moment().subtract(30, 'days').format('YYYY-MM-DD'),
67
+ maxDate: moment().format('YYYY-MM-DD'),
68
+ },
69
+ };
70
+
71
+ export const WithCustomLabelsAndDisableClear = {
72
+ args: {
73
+ size: 'large',
74
+ type: 'day',
75
+ clearLabel: 'Reset',
76
+ actionLabel: 'Apply',
77
+ disableClear: true,
78
+ options: [
79
+ { name: 'Last 7 days', id: 'last-7-days' },
80
+ { name: 'Last 30 days', id: 'last-30-days' },
81
+ { name: 'Current month', id: 'current-month' },
82
+ { name: 'Previous month', id: 'previous-month' },
83
+ { name: 'Custom', id: 'custom' },
84
+ ],
85
+ },
86
+ };
87
+
88
+ export const CustomRelativePeriodsWithBaseDate = {
89
+ args: {
90
+ size: 'large',
91
+
92
+ periodBaseDate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
93
+
94
+ maxDate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
95
+
96
+ options: [
97
+ { name: 'Last 7 days (up to 24h ago)', id: 'last-7-days' },
98
+ { name: 'Last 14 days (up to 24h ago)', id: 'last-14-days' },
99
+ { name: 'Last 30 days (up to 24h ago)', id: 'last-30-days' },
100
+ { name: 'Last 12 months (up to 24h ago)', id: 'last-12-months' },
101
+ { name: 'Current month (up to 24h ago)', id: 'current-month' },
102
+ { name: 'Previous month (up to 24h ago)', id: 'previous-month' },
103
+ { name: 'Custom', id: 'custom' },
104
+ ],
105
+ },
106
+ };
@@ -67,3 +67,25 @@ export const WithMinMaxDates = {
67
67
  ],
68
68
  },
69
69
  };
70
+
71
+ export const WithCustomRelativePeriodsAndBaseDate = {
72
+ args: {
73
+ size: 'sm',
74
+ next: true,
75
+ iconPosition: 'right',
76
+ fillW: true,
77
+
78
+ periodBaseDate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
79
+ maxDate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
80
+
81
+ options: [
82
+ { name: 'Last 7 days (up to 24h ago)', id: 'last-7-days' },
83
+ { name: 'Last 14 days (up to 24h ago)', id: 'last-14-days' },
84
+ { name: 'Last 30 days (up to 24h ago)', id: 'last-30-days' },
85
+ { name: 'Last 12 months (up to 24h ago)', id: 'last-12-months' },
86
+ { name: 'Current month (up to 24h ago)', id: 'current-month' },
87
+ { name: 'Previous month (up to 24h ago)', id: 'previous-month' },
88
+ { name: 'Custom', id: 'custom' },
89
+ ],
90
+ },
91
+ };