@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,10 +1,10 @@
1
- import unnnicModal from '../components/Modal/Modal.vue';
2
- import unnnicCallModal from '../components/Modal/CallModal.vue';
3
- import unnnicButton from '../components/Button/Button.vue';
1
+ import UnnnicModal from '../components/Modal/Modal.vue';
2
+ import UnnnicCallModal from '../components/Modal/CallModal.vue';
3
+ import UnnnicButton from '../components/Button/Button.vue';
4
4
 
5
5
  export default {
6
6
  title: 'Example/Modal',
7
- component: unnnicModal,
7
+ component: UnnnicModal,
8
8
  argTypes: {
9
9
  modalIcon: {
10
10
  control: {
@@ -34,42 +34,68 @@ export default {
34
34
  },
35
35
  };
36
36
 
37
- const Template = (args, { argTypes }) => ({
38
- props: Object.keys(argTypes),
39
- components: { unnnicModal, unnnicButton },
40
- template:
41
- '<unnnic-modal v-bind="$props">Conteúdo do modal<br>Conteúdo do modal<br>Conteúdo do modal<br>Conteúdo do modal<br>Conteúdo do modal<br>Conteúdo do modal<br>Conteúdo do modalConteúdo do modal<br></unnnic-modal>',
42
- });
43
-
44
- const ModalTemplate = (args, { argTypes }) => ({
45
- props: Object.keys(argTypes),
46
- components: { unnnicModal, unnnicButton },
47
- template:
48
- '<unnnicModal v-bind="$props"> <template #message><span>Modal with Buttons</span></template><template #options><unnnic-button> Button 1 </unnnic-button> <unnnic-button > Button 2 </unnnic-button></template></unnnic-modal>',
49
- });
50
-
51
- export const Normal = Template.bind({});
52
- Normal.args = {
53
- text: 'Title text',
54
- description: 'Message body',
55
- alertMessage: 'Message alert',
56
- closeIcon: true,
57
- showModal: true,
37
+ export const Normal = {
38
+ render: (args) => ({
39
+ components: { UnnnicModal, UnnnicButton },
40
+ setup() {
41
+ return { args };
42
+ },
43
+ template: `
44
+ <unnnic-modal v-bind="args">
45
+ Conteúdo do modal<br>
46
+ Conteúdo do modal<br>
47
+ Conteúdo do modal<br>
48
+ Conteúdo do modal<br>
49
+ Conteúdo do modal<br>
50
+ Conteúdo do modal<br>
51
+ Conteúdo do modal<br>
52
+ </unnnic-modal>
53
+ `,
54
+ }),
55
+ args: {
56
+ text: 'Title text',
57
+ description: 'Message body',
58
+ alertMessage: 'Message alert',
59
+ closeIcon: true,
60
+ showModal: true,
61
+ },
58
62
  };
59
-
60
- export const Buttons = ModalTemplate.bind({});
61
- Buttons.args = {
62
- text: 'Title text',
63
- description: 'Message body',
64
- alertMessage: 'Message alert',
65
- closeIcon: true,
66
- showModal: true,
63
+ export const Buttons = {
64
+ render: (args) => ({
65
+ components: { UnnnicModal, UnnnicButton },
66
+ setup() {
67
+ return { args };
68
+ },
69
+ template: `
70
+ <unnnic-modal v-bind="args">
71
+ <template #message>
72
+ <span>Modal with Buttons</span>
73
+ </template>
74
+ <template #options>
75
+ <unnnic-button> Button 1 </unnnic-button>
76
+ <unnnic-button > Button 2 </unnnic-button>
77
+ </template>
78
+ </unnnic-modal>
79
+ `,
80
+ }),
81
+ args: {
82
+ text: 'Title text',
83
+ description: 'Message body',
84
+ alertMessage: 'Message alert',
85
+ closeIcon: true,
86
+ showModal: true,
87
+ },
67
88
  };
68
89
 
69
- const CallTemplate = (args, { argTypes }) => ({
70
- props: Object.keys(argTypes),
71
- components: { unnnicCallModal },
72
- template: '<unnnic-call-modal />',
73
- });
74
-
75
- export const Call = CallTemplate.bind({});
90
+ export const Call = {
91
+ render: (args) => ({
92
+ components: { UnnnicCallModal },
93
+ setup() {
94
+ return { args };
95
+ },
96
+ template: `
97
+ <unnnic-call-modal />
98
+ `,
99
+ }),
100
+ args: {},
101
+ };
@@ -1,38 +1,33 @@
1
- import unnnicMoodRating from '../components/MoodRating/MoodRating.vue';
1
+ import UnnnicMoodRating from '../components/MoodRating/MoodRating.vue';
2
2
 
3
3
  export default {
4
4
  title: 'Rating/MoodRating',
5
- component: unnnicMoodRating,
6
- argTypes: {
7
- 'on-update:model-value': { action: '@update:model-value' },
5
+ component: UnnnicMoodRating,
6
+ argTypes: {},
7
+ render: (args) => ({
8
+ setup() {
9
+ return { args };
10
+ },
11
+ components: {
12
+ UnnnicMoodRating,
13
+ },
14
+
15
+ data() {
16
+ return {
17
+ mood: null,
18
+ };
19
+ },
20
+
21
+ template: `
22
+ <div>
23
+ <pre>v-model: {{ mood }}</pre>
24
+ <unnnic-mood-rating v-bind="args" v-model="mood" />
25
+ </div>
26
+ `,
27
+ }),
28
+ args: {
29
+ title: 'Avalie seu aprendizado nesta aula',
8
30
  },
9
31
  };
10
32
 
11
- const Template = (args, { argTypes }) => ({
12
- props: Object.keys(argTypes),
13
-
14
- components: {
15
- unnnicMoodRating,
16
- },
17
-
18
- data() {
19
- return {
20
- mood: null,
21
- };
22
- },
23
-
24
- template: `
25
- <div>
26
- <pre>v-model: {{ mood }}</pre>
27
- <unnnic-mood-rating v-bind="$props" v-model="mood" />
28
- </div>
29
- `,
30
-
31
- methods: {},
32
- });
33
-
34
- export const Default = Template.bind({});
35
-
36
- Default.args = {
37
- title: 'Avalie seu aprendizado nesta aula',
38
- };
33
+ export const Default = {};
@@ -1,56 +1,62 @@
1
- import unnnicMultiSelect from '../components/MultiSelect/MultiSelect.vue';
1
+ import UnnnicMultiSelect from '../components/MultiSelect/MultiSelect.vue';
2
2
 
3
3
  export default {
4
4
  title: 'Form/MultiSelect',
5
- component: unnnicMultiSelect,
5
+ component: UnnnicMultiSelect,
6
6
  argTypes: {},
7
+ render: (args) => ({
8
+ components: {
9
+ UnnnicMultiSelect,
10
+ },
11
+ setup() {
12
+ return { args };
13
+ },
14
+ data() {
15
+ return {
16
+ groups: [
17
+ {
18
+ title: 'Permissões Gerais',
19
+ selected: 0,
20
+ items: [
21
+ {
22
+ title: 'Moderador',
23
+ description:
24
+ 'Gerencia membros do projeto e administra o rocket',
25
+ },
26
+ {
27
+ title: 'Contribuidor',
28
+ description: 'Consegue editar o projeto',
29
+ },
30
+ {
31
+ title: 'Vizualizador',
32
+ description: 'Apenas vizualiza o projeto',
33
+ },
34
+ ],
35
+ },
36
+ {
37
+ title: 'Permissões do módulo chat',
38
+ selected: 0,
39
+ items: [
40
+ {
41
+ title: 'Gerente de Atendimento',
42
+ description:
43
+ 'Consegue responder mensagens e criar grupos no Rocket',
44
+ },
45
+ {
46
+ title: 'Agente',
47
+ description: 'Consegue responder mensagens no Rocket',
48
+ },
49
+ ],
50
+ },
51
+ ],
52
+ };
53
+ },
54
+ template: `
55
+ <div>
56
+ <UnnnicMultiSelect v-bind="args" v-model="groups" />
57
+ </div>
58
+ `,
59
+ }),
7
60
  };
8
61
 
9
- const Template = (args, { argTypes }) => ({
10
- props: Object.keys(argTypes),
11
- components: { unnnicMultiSelect },
12
- data() {
13
- return {
14
- groups: [
15
- {
16
- title: 'Permissões Gerais',
17
- selected: 0,
18
- items: [
19
- {
20
- title: 'Moderador',
21
- description: 'Gerencia membros do projeto e administra o rocket',
22
- },
23
- { title: 'Contribuidor', description: 'Consegue editar o projeto' },
24
- {
25
- title: 'Vizualizador',
26
- description: 'Apenas vizualiza o projeto',
27
- },
28
- ],
29
- },
30
- {
31
- title: 'Permissões do módulo chat',
32
- selected: 0,
33
- items: [
34
- {
35
- title: 'Gerente de Atendimento',
36
- description:
37
- 'Consegue responder mensagens e criar grupos no Rocket',
38
- },
39
- {
40
- title: 'Agente',
41
- description: 'Consegue responder mensagens no Rocket',
42
- },
43
- ],
44
- },
45
- ],
46
- };
47
- },
48
-
49
- // eslint-disable-next-line no-multi-str
50
- template:
51
- '<div><unnnicMultiSelect v-bind="$props" v-model="groups"></unnnicMultiSelect></div>',
52
- });
53
-
54
- export const Medium = Template.bind({});
55
-
56
- Medium.args = {};
62
+ export const Medium = { args: {} };
@@ -1,9 +1,8 @@
1
- import unnnicPagination from '../components/Pagination/Pagination.vue';
2
- import { ref } from 'vue';
1
+ import UnnnicPagination from '../components/Pagination/Pagination.vue';
3
2
 
4
3
  export default {
5
4
  title: 'example/Pagination',
6
- component: unnnicPagination,
5
+ component: UnnnicPagination,
7
6
  argTypes: {
8
7
  max: {
9
8
  control: {
@@ -17,29 +16,22 @@ export default {
17
16
  },
18
17
  };
19
18
 
20
- const Template = (args, { argTypes }) => ({
21
- props: Object.keys(argTypes),
22
-
23
- components: {
24
- unnnicPagination,
25
- },
26
-
27
- setup() {
28
- let page = ref(1);
29
- const onChange = (value) => {
30
- page.value = value;
31
- };
32
-
33
- return { page, onChange };
34
- },
35
-
36
- template: `
37
- <div>
38
- <unnnic-pagination v-bind="$props" :value="page" @input="onChange"/>
39
- </div>
40
- `,
41
- });
42
-
43
- export const Default = Template.bind({});
44
-
45
- Default.args = {};
19
+ export const Default = {
20
+ render: (args) => ({
21
+ components: { UnnnicPagination },
22
+ setup() {
23
+ return { args };
24
+ },
25
+ data() {
26
+ return {
27
+ page: 1,
28
+ };
29
+ },
30
+ template: `
31
+ <div>
32
+ <unnnic-pagination v-bind="args" v-model="page" :max="10" :show="5"/>
33
+ </div>
34
+ `,
35
+ }),
36
+ args: {},
37
+ };
@@ -1,8 +1,9 @@
1
- import unnnicProgressBar from '../components/ProgressBar/ProgressBar.vue';
1
+ import { action } from '@storybook/addon-actions';
2
+ import UnnnicProgressBar from '../components/ProgressBar/ProgressBar.vue';
2
3
 
3
4
  export default {
4
5
  title: 'Progress/ProgressBar',
5
- component: unnnicProgressBar,
6
+ component: UnnnicProgressBar,
6
7
  argTypes: {
7
8
  type: {
8
9
  control: {
@@ -11,63 +12,27 @@ export default {
11
12
  options: ['primary', 'secondary'],
12
13
  },
13
14
  },
14
- };
15
-
16
- const Template = (args, { argTypes }) => ({
17
- props: Object.keys(argTypes),
18
-
19
- components: {
20
- unnnicProgressBar,
21
- },
22
-
23
- data() {
24
- return {
25
- percentage: 25,
26
- };
15
+ args: {
16
+ modelValue: 25,
17
+ title: 'Title name',
18
+ onClose: action('close'),
27
19
  },
28
-
29
- template: `
30
- <div>
31
- <pre>v-model: {{ percentage }}</pre>
32
- <unnnic-progress-bar v-model="percentage" v-bind="$props">
33
- </unnnic-progress-bar>
34
- </div>
35
- `,
36
-
37
- methods: {},
38
- });
39
-
40
- export const Primary = Template.bind({});
41
-
42
- Primary.args = {
43
- title: 'Title name',
44
20
  };
21
+ export const Primary = {};
45
22
 
46
- export const Secondary = Template.bind({});
23
+ export const Secondary = { args: { type: 'secondary' } };
47
24
 
48
- Secondary.args = {
49
- title: 'Title name',
50
- type: 'secondary',
51
- };
52
-
53
- export const Inline = Template.bind({});
54
-
55
- Inline.args = {
56
- title: 'Title name',
57
- inline: true,
58
- };
59
-
60
- export const Subtitle = Template.bind({});
61
-
62
- Subtitle.args = {
63
- title: 'test',
64
- subtitle: 'Subtitle or description',
25
+ export const Inline = {
26
+ args: {
27
+ inline: true,
28
+ },
65
29
  };
66
30
 
67
- export const SubtitleCanClose = Template.bind({});
31
+ export const Subtitle = { args: { subtitle: 'Subtitle or description' } };
68
32
 
69
- SubtitleCanClose.args = {
70
- title: 'test',
71
- subtitle: 'Subtitle or description',
72
- canClose: true,
33
+ export const SubtitleCanClose = {
34
+ args: {
35
+ subtitle: 'Subtitle or description',
36
+ canClose: true,
37
+ },
73
38
  };
@@ -1,48 +1,49 @@
1
- import unnnicRadio from '../components/Radio/Radio.vue';
1
+ import UnnnicRadio from '../components/Radio/Radio.vue';
2
2
 
3
3
  export default {
4
4
  title: 'Form/Radio',
5
- component: unnnicRadio,
5
+ component: UnnnicRadio,
6
6
  argTypes: {
7
- 'on-update:model-value': { action: '@update:model-value' },
8
7
  value: { control: { type: 'text' } },
9
8
  disabled: { control: { type: 'boolean' } },
10
9
  size: { control: { type: 'select', options: ['md', 'sm'] } },
11
10
  },
12
- };
13
-
14
- const Template = (args, { argTypes }) => ({
15
- props: Object.keys(argTypes).concat(['input']),
16
- components: {
17
- unnnicRadio,
18
- },
19
- data() {
20
- return {
21
- insideValue: 'option 1',
22
- };
23
- },
24
- template: `
25
- <div>
26
- v-model: {{ insideValue }}
27
- <br>
11
+ render: (args) => ({
12
+ components: {
13
+ UnnnicRadio,
14
+ },
15
+ setup() {
16
+ return { args };
17
+ },
18
+ data() {
19
+ return {
20
+ insideValue: 'option 1',
21
+ };
22
+ },
23
+ template: `
24
+ <div>
25
+ v-model: {{ insideValue }}
26
+ <br>
28
27
 
29
- <unnnic-radio v-bind="$props" v-model="insideValue" value="option 1">
30
- Option 1
31
- </unnnic-radio>
28
+ <unnnic-radio v-bind="args" v-model="insideValue" value="option 1">
29
+ Option 1
30
+ </unnnic-radio>
32
31
 
33
- <unnnic-radio v-bind="$props" v-model="insideValue" value="option 2">
34
- Option 2
35
- </unnnic-radio>
32
+ <unnnic-radio v-bind="args" v-model="insideValue" value="option 2">
33
+ Option 2
34
+ </unnnic-radio>
36
35
 
37
- <unnnic-radio v-bind="$props" v-model="insideValue" value="option 3">
38
- Option 3
39
- </unnnic-radio>
40
- </div>
41
- `,
42
- });
36
+ <unnnic-radio v-bind="args" v-model="insideValue" value="option 3">
37
+ Option 3
38
+ </unnnic-radio>
39
+ </div>
40
+ `,
41
+ }),
42
+ };
43
43
 
44
- export const Default = Template.bind({});
45
- Default.args = {
46
- disabled: false,
47
- size: 'md',
44
+ export const Default = {
45
+ args: {
46
+ disabled: false,
47
+ size: 'md',
48
+ },
48
49
  };
@@ -1,38 +1,40 @@
1
1
  /* eslint-disable no-multi-str */
2
2
 
3
- import unnnicSidebar from '../components/Sidebar/Sidebar.vue';
4
- import unnnicSidebarItem from '../components/Sidebar/SidebarItem.vue';
5
- import unnnicSidebarMenu from '../components/Sidebar/SidebarMenu.vue';
3
+ import UnnnicSidebar from '../components/Sidebar/Sidebar.vue';
4
+ import UnnnicSidebarItem from '../components/Sidebar/SidebarItem.vue';
5
+ import UnnnicSidebarMenu from '../components/Sidebar/SidebarMenu.vue';
6
6
 
7
7
  export default {
8
8
  title: 'Example/Sidebar',
9
- component: unnnicSidebar,
9
+ component: UnnnicSidebar,
10
10
  argTypes: {
11
11
  expanded: { control: { type: 'boolean' } },
12
12
  },
13
+ render: (args) => ({
14
+ setup() {
15
+ return { args };
16
+ },
17
+ components: { UnnnicSidebar, UnnnicSidebarItem, UnnnicSidebarMenu },
18
+ template: `
19
+ <unnnic-sidebar v-bind="args">
20
+ <template #header>
21
+ <p> Title </p>
22
+ </template>
23
+ <template #footer>
24
+ <unnnic-sidebar-item icon="expand-8-1" text="footer" />
25
+ </template>
26
+ <unnnic-sidebar-menu text="Submenu">
27
+ <unnnic-sidebar-item :enable-tooltip="!expanded" text="Item1" icon="developer-community-github-1-1" :active="true" /> \
28
+ <unnnic-sidebar-item :enable-tooltip="!expanded" text="Item2" icon="alarm-bell-2" />
29
+ </unnnic-sidebar-menu>
30
+ <unnnic-sidebar-menu text="Submenu 2">
31
+ <unnnic-sidebar-item :enable-tooltip="!expanded" text="Item3" icon="alarm-bell-2" />
32
+ </unnnic-sidebar-menu>
33
+ </unnnic-sidebar>
34
+ `,
35
+ }),
13
36
  };
14
37
 
15
- const Template = (args, { argTypes }) => ({
16
- props: Object.keys(argTypes),
17
- components: { unnnicSidebar, unnnicSidebarItem, unnnicSidebarMenu },
18
- template:
19
- '<unnnic-sidebar v-bind="$props"> \
20
- <p slot="header"> Title </p> \
21
- <unnnic-sidebar-item icon="expand-8-1" text="footer" slot="footer" /> \
22
- <unnnic-sidebar-menu text="Submenu"> \
23
- <unnnic-sidebar-item :enable-tooltip="!expanded" text="Item1" icon="developer-community-github-1-1" :active="true" /> \
24
- <unnnic-sidebar-item :enable-tooltip="!expanded" text="Item2" icon="alarm-bell-2" /> \
25
- </unnnic-sidebar-menu> \
26
- <unnnic-sidebar-menu text="Submenu 2"> \
27
- <unnnic-sidebar-item :enable-tooltip="!expanded" text="Item3" icon="alarm-bell-2" /> \
28
- </unnnic-sidebar-menu> \
29
- </unnnic-sidebar>',
30
- });
38
+ export const Expanded = { args: {} };
31
39
 
32
- export const Expanded = Template.bind({});
33
- Expanded.args = {};
34
-
35
- export const Contracted = Template.bind({});
36
- Contracted.args = {
37
- expanded: false,
38
- };
40
+ export const Contracted = { args: { expanded: false } };