@weni/unnnic-system 2.13.0 → 2.13.1

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 (41) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +56 -19
  3. package/dist/style.css +1 -1
  4. package/dist/unnnic.mjs +4546 -4471
  5. package/dist/unnnic.umd.js +19 -19
  6. package/package.json +1 -1
  7. package/src/components/Alert/Alert.vue +2 -0
  8. package/src/components/Alert/AlertBanner.vue +2 -0
  9. package/src/components/Alert/Version1dot1.vue +1 -0
  10. package/src/components/Alert/__tests__/Alert.spec.js +84 -0
  11. package/src/components/Alert/__tests__/AlertBanner.spec.js +89 -0
  12. package/src/components/Alert/__tests__/AlertCaller.spec.js +98 -0
  13. package/src/components/Alert/__tests__/Version1dot1.spec.js +124 -0
  14. package/src/components/AudioRecorder/AudioRecorder.vue +30 -1
  15. package/src/components/AvatarIcon/__tests__/AvatarIcon.spec.js +84 -0
  16. package/src/components/AvatarIcon/__tests__/__snapshots__/AvatarIcon.spec.js.snap +7 -0
  17. package/src/components/Breadcrumb/Breadcrumb.vue +4 -0
  18. package/src/components/Breadcrumb/__tests__/Breadcrumb.spec.js +68 -0
  19. package/src/components/FormElement/FormElement.vue +101 -28
  20. package/src/components/Input/BaseInput.vue +30 -38
  21. package/src/components/Input/Input.scss +43 -0
  22. package/src/components/Input/TextInput.vue +24 -25
  23. package/src/components/Input/__test__/TextInput.spec.js +2 -2
  24. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +1 -1
  25. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
  26. package/src/components/Pagination/Pagination.vue +23 -4
  27. package/src/components/Pagination/__tests__/Pagination.spec.js +208 -0
  28. package/src/components/SelectSmart/SelectSmart.vue +16 -44
  29. package/src/components/SelectSmart/SelectSmartMultipleHeader.vue +5 -13
  30. package/src/components/SelectSmart/SelectSmartOption.vue +13 -9
  31. package/src/components/SkeletonLoading/SkeletonLoading.vue +17 -11
  32. package/src/components/SkeletonLoading/__tests__/SkeletonLoading.spec.js +125 -0
  33. package/src/components/TextArea/TextArea.vue +45 -128
  34. package/src/components/TextArea/__test__/TextArea.spec.js +26 -24
  35. package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +4 -4
  36. package/src/stories/Input.mdx +76 -0
  37. package/src/stories/Input.stories.js +82 -8
  38. package/src/stories/SelectSmart.mdx +15 -17
  39. package/src/stories/SelectSmart.stories.js +72 -6
  40. package/src/stories/TextArea.mdx +68 -0
  41. package/src/stories/TextArea.stories.js +68 -6
@@ -0,0 +1,68 @@
1
+ import { Meta, Source, Story } from '@storybook/blocks';
2
+
3
+ import * as TextAreaStories from './TextArea.stories';
4
+
5
+ <Meta of={TextAreaStories}/>
6
+
7
+ # TextArea
8
+
9
+ The `TextArea` component is designed to provide a textarea field for users to enter texts.
10
+
11
+ <Source
12
+ language='html'
13
+ dark
14
+ code={`<UnnnicTextArea
15
+ label="Label"
16
+ message="Helper text" | error="Error text"
17
+ :disabled="false | true"
18
+ v-model="value"
19
+ size="md"
20
+ type="normal"
21
+ />`}
22
+ />
23
+
24
+
25
+ ---
26
+
27
+ #### **Props Options:**
28
+
29
+ | Key | Description | Values | Default |
30
+ |---------|-------------------------------------------|-------------------------|-------------|
31
+ | label | `String` of the textarea label | `String` | `undefined` |
32
+ | message | `String` of the helper text, when applied | `String` | `undefined` |
33
+ | error | `String` of the error text, when applied | `String` | `undefined` |
34
+ | v-model | `String` of the textarea content | `''` | `''` |
35
+ | size | `String` of the size | `'md'` \| `'sm'` | `md` |
36
+ | type | `String` of the textarea type | `'normal'` \| `'error'` | `'normal'` |
37
+
38
+ ## Example
39
+ Some examples of uses of the `UnnnicTextArea`
40
+
41
+ ### Default
42
+
43
+ <Story of={TextAreaStories.Default} />
44
+
45
+
46
+ ### Error
47
+
48
+ <Story of={TextAreaStories.Error} />
49
+
50
+
51
+ ### Disabled
52
+
53
+ <Story of={TextAreaStories.Disabled} />
54
+
55
+
56
+ ### Default (small size)
57
+
58
+ <Story of={TextAreaStories.DefaultSm} />
59
+
60
+
61
+ ### Error (small size)
62
+
63
+ <Story of={TextAreaStories.ErrorSm} />
64
+
65
+
66
+ ### Disabled (small size)
67
+
68
+ <Story of={TextAreaStories.DisabledSm} />
@@ -1,17 +1,19 @@
1
+ import unnnicFormElement from '../components/FormElement/FormElement.vue';
1
2
  import UnnnicTextArea from '../components/TextArea/TextArea.vue';
2
3
 
3
4
  export default {
4
5
  title: 'Form/TextArea',
5
6
  component: UnnnicTextArea,
6
7
  argTypes: {
7
- size: { control: { type: 'select', options: ['md', 'sm'] } },
8
- type: { control: { type: 'select', options: ['normal', 'error'] } },
8
+ size: { control: { type: 'select' }, options: ['md', 'sm'] },
9
+ type: { control: { type: 'select' }, options: ['normal', 'error'] },
9
10
  },
10
11
  render: (args) => ({
11
12
  setup() {
12
13
  return { args };
13
14
  },
14
15
  components: {
16
+ unnnicFormElement,
15
17
  UnnnicTextArea,
16
18
  },
17
19
  data() {
@@ -20,10 +22,7 @@ export default {
20
22
  };
21
23
  },
22
24
  template: `
23
- <div>
24
- <pre>v-model: {{ content }}</pre>
25
- <unnnic-text-area v-bind="args" v-model="content"/>
26
- </div>
25
+ <unnnic-text-area v-bind="args" v-model="content"/>
27
26
  `,
28
27
  }),
29
28
  };
@@ -36,5 +35,68 @@ export const Default = {
36
35
  disabled: false,
37
36
  type: 'normal',
38
37
  errors: [],
38
+ size: 'md',
39
+ message: 'Helper text',
40
+ },
41
+ };
42
+
43
+ export const Error = {
44
+ args: {
45
+ label: 'Label',
46
+ placeholder: 'Placeholder',
47
+ maxLength: 150,
48
+ disabled: false,
49
+ type: 'error',
50
+ error: 'Error text',
51
+ size: 'md',
52
+ },
53
+ };
54
+
55
+ export const Disabled = {
56
+ args: {
57
+ label: 'Label',
58
+ placeholder: 'Placeholder',
59
+ maxLength: 150,
60
+ disabled: true,
61
+ type: 'normal',
62
+ size: 'md',
63
+ message: 'Helper text',
64
+ },
65
+ };
66
+
67
+ export const DefaultSm = {
68
+ args: {
69
+ label: 'Label',
70
+ placeholder: 'Placeholder',
71
+ maxLength: 150,
72
+ disabled: false,
73
+ type: 'normal',
74
+ errors: [],
75
+ size: 'sm',
76
+ message: 'Helper text',
77
+ },
78
+ };
79
+
80
+ export const ErrorSm = {
81
+ args: {
82
+ label: 'Label',
83
+ placeholder: 'Placeholder',
84
+ maxLength: 150,
85
+ disabled: false,
86
+ type: 'error',
87
+ error: 'Error text',
88
+ size: 'sm',
89
+ },
90
+ };
91
+
92
+ export const DisabledSm = {
93
+ args: {
94
+ label: 'Label',
95
+ placeholder: 'Placeholder',
96
+ maxLength: 150,
97
+ disabled: true,
98
+ type: 'normal',
99
+ size: 'sm',
100
+ message: 'Helper text',
39
101
  },
40
102
  };