@weni/unnnic-system 2.0.16 → 2.0.17

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 (69) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/unnnic.mjs +1044 -1033
  3. package/dist/unnnic.umd.js +18 -18
  4. package/package.json +3 -2
  5. package/src/components/AudioRecorder/AudioHandler.vue +2 -0
  6. package/src/components/AudioRecorder/AudioPlayer.vue +2 -0
  7. package/src/components/AudioRecorder/AudioRecorder.vue +6 -4
  8. package/src/components/Card/CardData.vue +2 -2
  9. package/src/components/CardProject/CardProject.vue +6 -6
  10. package/src/components/ChartRainbow/ChartRainbow.vue +4 -4
  11. package/src/components/ChatsMessage/ChatsMessage.vue +11 -2
  12. package/src/components/ChatsMessage/ChatsMessageStatusBackdrop.vue +1 -4
  13. package/src/components/DateFilter/DateFilter.vue +2 -2
  14. package/src/components/DatePicker/DatePicker.vue +2 -2
  15. package/src/components/Dropdown/LanguageSelect.vue +7 -7
  16. package/src/components/ImportCard/ImportCard.vue +2 -2
  17. package/src/components/ProgressBar/ProgressBar.vue +3 -3
  18. package/src/components/Sidebar/SidebarPrimary.vue +15 -5
  19. package/src/components/TabsExpanded/TabsExpanded.vue +1 -0
  20. package/src/stories/Accordion.stories.js +35 -40
  21. package/src/stories/Alert.stories.js +98 -83
  22. package/src/stories/Breadcrumb.stories.js +12 -23
  23. package/src/stories/ButtonIcon.stories.js +2 -2
  24. package/src/stories/CardCompany.stories.js +52 -58
  25. package/src/stories/CardData.stories.js +8 -26
  26. package/src/stories/CardImage.stories.js +49 -48
  27. package/src/stories/CardInformation.stories.js +33 -54
  28. package/src/stories/CardProject.stories.js +50 -52
  29. package/src/stories/Carousel.stories.js +32 -27
  30. package/src/stories/ChartBar.stories.js +82 -102
  31. package/src/stories/ChartLine.stories.js +42 -52
  32. package/src/stories/ChartMultiLine.stories.js +39 -49
  33. package/src/stories/ChartRainbow.stories.js +2 -2
  34. package/src/stories/ChatText.stories.js +38 -44
  35. package/src/stories/ChatsContact.stories.js +57 -54
  36. package/src/stories/ChatsDashboardTagLive.stories.js +1 -8
  37. package/src/stories/ChatsHeader.stories.js +63 -74
  38. package/src/stories/ChatsMessage.stories.js +208 -216
  39. package/src/stories/CircleProgressBar.stories.js +4 -20
  40. package/src/stories/Collapse.stories.js +49 -55
  41. package/src/stories/Comment.stories.js +57 -54
  42. package/src/stories/DataArea.stories.js +60 -65
  43. package/src/stories/DateFilter.stories.js +7 -12
  44. package/src/stories/DatePicker.stories.js +50 -68
  45. package/src/stories/Disclaimer.stories.js +12 -27
  46. package/src/stories/Drawer.stories.js +116 -110
  47. package/src/stories/Dropdown.stories.js +22 -12
  48. package/src/stories/FormElement.stories.js +18 -23
  49. package/src/stories/Grid.stories.js +4 -10
  50. package/src/stories/Icon.stories.js +2 -2
  51. package/src/stories/IconLoading.stories.js +5 -11
  52. package/src/stories/ImportCard.stories.js +12 -19
  53. package/src/stories/Indicator.stories.js +8 -13
  54. package/src/stories/InputDatePicker.stories.js +27 -32
  55. package/src/stories/LanguageSelect.stories.js +12 -16
  56. package/src/stories/Modal.stories.js +66 -40
  57. package/src/stories/MoodRating.stories.js +27 -32
  58. package/src/stories/MultiSelect.stories.js +56 -50
  59. package/src/stories/Pagination.stories.js +21 -29
  60. package/src/stories/ProgressBar.stories.js +19 -54
  61. package/src/stories/Radio.stories.js +36 -35
  62. package/src/stories/Sidebar.stories.js +29 -27
  63. package/src/stories/SidebarPrimary.stories.js +87 -80
  64. package/src/stories/SkeletonLoading.stories.js +12 -29
  65. package/src/stories/StarRating.stories.js +29 -33
  66. package/src/stories/Switch.stories.js +26 -19
  67. package/src/stories/TabsExpanded.stories.js +56 -58
  68. package/src/stories/TextArea.stories.js +29 -34
  69. package/src/stories/TransitionRipple.stories.js +19 -18
@@ -1,62 +1,65 @@
1
- import unnnicComment from '../components/Comment/Comment.vue';
2
- import unnnicButton from '../components/Button/Button.vue';
3
- import unnnicDropdown from '../components/Dropdown/Dropdown.vue';
4
- import unnnicDropdownItem from '../components/Dropdown/DropdownItem.vue';
1
+ import UnnnicComment from '../components/Comment/Comment.vue';
2
+ import UnnnicButton from '../components/Button/Button.vue';
3
+ import UnnnicDropdown from '../components/Dropdown/Dropdown.vue';
4
+ import UnnnicDropdownItem from '../components/Dropdown/DropdownItem.vue';
5
5
  import UnnnicIcon from '../components/Icon.vue';
6
6
 
7
7
  export default {
8
8
  title: 'Example/Comment',
9
- component: unnnicComment,
9
+ component: UnnnicComment,
10
+ render: (args) => ({
11
+ components: {
12
+ UnnnicComment,
13
+ UnnnicButton,
14
+ UnnnicDropdown,
15
+ UnnnicDropdownItem,
16
+ UnnnicIcon,
17
+ },
18
+ setup() {
19
+ return { args };
20
+ },
21
+ template: `
22
+ <unnnic-comment v-bind="args">
23
+ <template #avatar>
24
+ <img src="https://images.unsplash.com/photo-1568564321589-3e581d074f9b?ixid=MnwxMjA3fDB8MHxzZWFyY2h8NTl8fGRvZ3xlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&w=1000&q=80" />
25
+ </template>
26
+ <template #actions>
27
+ <unnnic-dropdown>
28
+ <template #trigger>
29
+ <unnnic-icon
30
+ icon="navigation-menu-vertical-1"
31
+ size="sm"
32
+ />
33
+ </template>
34
+ <unnnic-dropdown-item>
35
+ <unnnic-button
36
+ type="tertiary"
37
+ iconLeft="pencil-write-1"
38
+ text="Edit comment"
39
+ size="small"
40
+ />
41
+ </unnnic-dropdown-item>
42
+ <unnnic-dropdown-item>
43
+ <unnnic-button
44
+ type="tertiary"
45
+ iconLeft="delete-1"
46
+ text="Delete Comment"
47
+ size="small"
48
+ />
49
+ </unnnic-dropdown-item>
50
+ </unnnic-dropdown>
51
+ </template>
52
+ </unnnic-comment>
53
+ `,
54
+ }),
10
55
  };
11
56
 
12
- const Template = (args, { argTypes }) => ({
13
- props: Object.keys(argTypes),
14
- components: {
15
- unnnicComment,
16
- unnnicButton,
17
- unnnicDropdown,
18
- unnnicDropdownItem,
19
- UnnnicIcon,
57
+ export const Default = {
58
+ args: {
59
+ avatar:
60
+ 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT8qiVsOfzasQWdcm81N6WmPicyHp50mMkvgw&usqp=CAU',
61
+ title: 'This is the username',
62
+ time: '- 2 hours ago',
63
+ text: 'This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment',
20
64
  },
21
- template: `
22
- <unnnic-comment v-bind="$props">
23
- <img slot="avatar" src="https://images.unsplash.com/photo-1568564321589-3e581d074f9b?ixid=MnwxMjA3fDB8MHxzZWFyY2h8NTl8fGRvZ3xlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&w=1000&q=80" />
24
- <template v-slot:actions>
25
- <unnnic-dropdown>
26
- <template v-slot:trigger>
27
- <unnnic-icon
28
- slot="trigger"
29
- icon="navigation-menu-vertical-1"
30
- size="sm"
31
- />
32
- </template>
33
- <unnnic-dropdown-item>
34
- <unnnic-button
35
- type="tertiary"
36
- iconLeft="pencil-write-1"
37
- text="Edit comment"
38
- size="small"
39
- />
40
- </unnnic-dropdown-item>
41
- <unnnic-dropdown-item>
42
- <unnnic-button
43
- type="tertiary"
44
- iconLeft="delete-1"
45
- text="Delete Comment"
46
- size="small"
47
- />
48
- </unnnic-dropdown-item>
49
- </unnnic-dropdown>
50
- </template>
51
- </unnnic-comment>
52
- `,
53
- });
54
-
55
- export const Default = Template.bind({});
56
- Default.args = {
57
- avatar:
58
- 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT8qiVsOfzasQWdcm81N6WmPicyHp50mMkvgw&usqp=CAU',
59
- title: 'This is the username',
60
- time: '- 2 hours ago',
61
- text: 'This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment This is a very very very very very very very very very very very long comment',
62
65
  };
@@ -1,79 +1,74 @@
1
- import unnnicDataArea from '../components/DataArea/DataArea.vue';
2
- import unnnicButton from '../components/Button/Button.vue';
1
+ import UnnnicDataArea from '../components/DataArea/DataArea.vue';
2
+ import UnnnicButton from '../components/Button/Button.vue';
3
3
  import { unnnicFontSize } from '../components/config';
4
4
 
5
5
  export default {
6
6
  title: 'example/DataArea',
7
- component: unnnicDataArea,
7
+ component: UnnnicDataArea,
8
8
  argTypes: {
9
9
  title: { control: { type: 'text' } },
10
10
  text: { control: { type: 'text' } },
11
11
  enableHover: { control: { type: 'boolean' } },
12
12
  hoverText: { control: { type: 'text' } },
13
13
  },
14
- };
15
-
16
- const Template = (args, { argTypes }) => ({
17
- props: Object.keys(argTypes),
18
-
19
- components: {
20
- unnnicDataArea,
21
- unnnicButton,
22
- },
23
-
24
- data() {
25
- return {
26
- slotStyle: {
27
- display: 'flex',
28
- gap: `${0.5 * unnnicFontSize}px`,
29
- color: 'red',
30
- },
31
- linkStyle: {
32
- color: 'DimGray',
14
+ render: (args) => ({
15
+ components: {
16
+ UnnnicDataArea,
17
+ UnnnicButton,
18
+ },
19
+ setup() {
20
+ return { args };
21
+ },
22
+ methods: {
23
+ click() {
24
+ console.log('clicked');
33
25
  },
34
- };
35
- },
36
-
37
- template: `
38
- <div>
39
- <unnnic-data-area v-bind="$props">
40
- <template v-slot:links>
41
- <div :style="slotStyle">
42
- <a href="#" :style="linkStyle">Link1</a>
43
- <a href="#" :style="linkStyle">Link2</a>
44
- </div>
45
- </template>
46
-
47
- <template v-slot:buttons>
48
- <div :style="slotStyle">
49
- <unnnic-button
50
- slot="trigger"
51
- size="small"
52
- type="secondary"
53
- iconCenter="copy-paste-1"
54
- />
55
- <unnnic-button
56
- slot="trigger"
57
- size="small"
58
- type="secondary"
59
- iconCenter="button-refresh-arrows-1"
60
- />
61
- </div>
62
- </template>
63
- </unnnic-data-area>
64
- </div>
65
- `,
66
-
67
- methods: {
68
- click() {
69
- console.log('clicked');
70
26
  },
71
- },
72
- });
73
-
74
- export const Default = Template.bind({});
27
+ data() {
28
+ return {
29
+ slotStyle: {
30
+ display: 'flex',
31
+ gap: `${0.5 * unnnicFontSize}px`,
32
+ color: 'red',
33
+ },
34
+ linkStyle: {
35
+ color: 'DimGray',
36
+ },
37
+ };
38
+ },
39
+ template: `
40
+ <div>
41
+ <unnnic-data-area v-bind="args">
42
+ <template #links>
43
+ <div :style="slotStyle">
44
+ <a href="#" :style="linkStyle">Link1</a>
45
+ <a href="#" :style="linkStyle">Link2</a>
46
+ </div>
47
+ </template>
48
+
49
+ <template #buttons>
50
+ <div :style="slotStyle">
51
+ <unnnic-button
52
+ size="small"
53
+ type="secondary"
54
+ iconCenter="copy-paste-1"
55
+ />
56
+ <unnnic-button
57
+ size="small"
58
+ type="secondary"
59
+ iconCenter="button-refresh-arrows-1"
60
+ />
61
+ </div>
62
+ </template>
63
+ </unnnic-data-area>
64
+ </div>
65
+ `,
66
+ }),
67
+ };
75
68
 
76
- Default.args = {
77
- title: 'Title text',
78
- text: '1e65416859c4cdff11cf94a70ce7395eba0f494d',
69
+ export const Default = {
70
+ args: {
71
+ title: 'Title text',
72
+ text: '1e65416859c4cdff11cf94a70ce7395eba0f494d',
73
+ },
79
74
  };
@@ -1,8 +1,8 @@
1
- import unnnicDateFilter from '../components/DateFilter/DateFilter.vue';
1
+ import UnnnicDateFilter from '../components/DateFilter/DateFilter.vue';
2
2
 
3
3
  export default {
4
4
  title: 'Form/DateFilter',
5
- component: unnnicDateFilter,
5
+ component: UnnnicDateFilter,
6
6
  argTypes: {
7
7
  dateFormat: { control: { type: 'text' } },
8
8
  startDate: { control: { type: 'date' } },
@@ -10,14 +10,9 @@ export default {
10
10
  },
11
11
  };
12
12
 
13
- const Template = (args, { argTypes }) => ({
14
- props: Object.keys(argTypes),
15
- components: { unnnicDateFilter },
16
- template: '<unnnic-date-filter v-bind="$props"/>',
17
- });
18
-
19
- export const Default = Template.bind({});
20
- Default.args = {
21
- dateFormat: 'DD/MM/YYYY',
22
- placeholder: 'DD/MM/YYYY ~ DD/MM/YYYY',
13
+ export const Default = {
14
+ args: {
15
+ dateFormat: 'DD/MM/YYYY',
16
+ placeholder: 'DD/MM/YYYY ~ DD/MM/YYYY',
17
+ },
23
18
  };
@@ -1,8 +1,8 @@
1
- import unnnicDatePicker from '../components/DatePicker/DatePicker.vue';
1
+ import UnnnicDatePicker from '../components/DatePicker/DatePicker.vue';
2
2
 
3
3
  export default {
4
4
  title: 'example/DatePicker',
5
- component: unnnicDatePicker,
5
+ component: UnnnicDatePicker,
6
6
  argTypes: {
7
7
  type: {
8
8
  control: {
@@ -24,71 +24,53 @@ export default {
24
24
  },
25
25
  };
26
26
 
27
- const Template = (args, { argTypes }) => ({
28
- props: Object.keys(argTypes),
29
-
30
- components: {
31
- unnnicDatePicker,
32
- },
33
-
34
- data() {
35
- return {};
27
+ export const Default = {
28
+ args: {
29
+ size: 'large',
30
+ clearLabel: 'Limpar',
31
+ actionLabel: 'Filtrar',
32
+ months: [
33
+ 'Janeiro',
34
+ 'Fevereiro',
35
+ 'Março',
36
+ 'Abril',
37
+ 'Maio',
38
+ 'Junho',
39
+ 'Julho',
40
+ 'Agosto',
41
+ 'Setembro',
42
+ 'Outubro',
43
+ 'Novembro',
44
+ 'Dezembro',
45
+ ],
46
+ days: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'],
47
+ initialStartDate: '12-01-2021',
48
+ initialEndDate: '12-01-2021',
49
+ options: [
50
+ {
51
+ name: 'Últimos 7 dias',
52
+ id: 'last-7-days',
53
+ },
54
+ {
55
+ name: 'Últimos 14 dias',
56
+ id: 'last-14-days',
57
+ },
58
+ {
59
+ name: 'Últimos 30 dias',
60
+ id: 'last-30-days',
61
+ },
62
+ {
63
+ name: 'Últimos 12 meses',
64
+ id: 'last-12-months',
65
+ },
66
+ {
67
+ name: 'Mês Atual',
68
+ id: 'current-month',
69
+ },
70
+ {
71
+ name: 'Personalizar',
72
+ id: 'custom',
73
+ },
74
+ ],
36
75
  },
37
-
38
- template: `
39
- <div>
40
- <unnnic-date-picker v-bind="$props" initial-start-date="12-01-2021" initial-end-date="12-31-2021"></unnnic-date-picker>
41
- </div>
42
- `,
43
-
44
- methods: {},
45
- });
46
-
47
- export const Default = Template.bind({});
48
-
49
- Default.args = {
50
- size: 'large',
51
- clearLabel: 'Limpar',
52
- actionLabel: 'Filtrar',
53
- months: [
54
- 'Janeiro',
55
- 'Fevereiro',
56
- 'Março',
57
- 'Abril',
58
- 'Maio',
59
- 'Junho',
60
- 'Julho',
61
- 'Agosto',
62
- 'Setembro',
63
- 'Outubro',
64
- 'Novembro',
65
- 'Dezembro',
66
- ],
67
- days: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'],
68
- options: [
69
- {
70
- name: 'Últimos 7 dias',
71
- id: 'last-7-days',
72
- },
73
- {
74
- name: 'Últimos 14 dias',
75
- id: 'last-14-days',
76
- },
77
- {
78
- name: 'Últimos 30 dias',
79
- id: 'last-30-days',
80
- },
81
- {
82
- name: 'Últimos 12 meses',
83
- id: 'last-12-months',
84
- },
85
- {
86
- name: 'Mês Atual',
87
- id: 'current-month',
88
- },
89
- {
90
- name: 'Personalizar',
91
- id: 'custom',
92
- },
93
- ],
94
76
  };
@@ -1,37 +1,22 @@
1
- import unnnicDisclaimer from '../components/Disclaimer/Disclaimer.vue';
1
+ import UnnnicDisclaimer from '../components/Disclaimer/Disclaimer.vue';
2
2
  import icons from '../utils/iconList';
3
3
  import colors from '../utils/colorsList';
4
4
 
5
5
  export default {
6
- title: 'Example/Disclaimer',
7
- component: unnnicDisclaimer,
8
- args: {},
9
- argTypes: {
10
- text: { control: { type: 'text' } },
11
- icon: { options: icons, control: { type: 'select', } },
12
- iconColor: { options: colors, control: { type: 'select', } },
13
- },
6
+ title: 'Example/Disclaimer',
7
+ component: UnnnicDisclaimer,
8
+ args: {},
9
+ argTypes: {
10
+ text: { control: { type: 'text' } },
11
+ icon: { options: icons, control: { type: 'select' } },
12
+ iconColor: { options: colors, control: { type: 'select' } },
13
+ },
14
14
  };
15
15
 
16
- const Template = (args) => ({
17
- components: {
18
- unnnicDisclaimer,
19
- },
20
- setup() {
21
- return { args };
22
- },
23
- props: Object.keys(args),
24
- template: `
25
- <div>
26
- <unnnic-disclaimer v-bind="args" />
27
- </div>
28
- `,
29
- });
30
-
31
- export const Default = Template.bind({});
32
-
33
- Default.args = {
16
+ export const Default = {
17
+ args: {
34
18
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
35
19
  icon: 'alert-circle-1-1',
36
20
  iconColor: 'feedback-yellow',
21
+ },
37
22
  };