@weni/unnnic-system 3.12.8-alpha.0 → 3.12.8

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 (90) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{es-52edeb71.mjs → es-62c1e8d3.mjs} +1 -1
  3. package/dist/{index-756fe685.mjs → index-ef197fd5.mjs} +52261 -55425
  4. package/dist/index.d.ts +1449 -5339
  5. package/dist/{pt-br-24583c8c.mjs → pt-br-198b147b.mjs} +1 -1
  6. package/dist/style.css +1 -1
  7. package/dist/unnnic.mjs +203 -233
  8. package/dist/unnnic.umd.js +44 -48
  9. package/package.json +2 -3
  10. package/src/assets/scss/scheme-colors.scss +223 -223
  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/Checkbox/Checkbox.vue +1 -1
  14. package/src/components/Drawer/Drawer.vue +269 -190
  15. package/src/components/Drawer/__tests__/Drawer.spec.js +46 -37
  16. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +19 -18
  17. package/src/components/FormElement/FormElement.vue +1 -1
  18. package/src/components/Input/BaseInput.vue +5 -25
  19. package/src/components/Input/Input.scss +3 -2
  20. package/src/components/Input/Input.vue +1 -24
  21. package/src/components/Input/TextInput.vue +25 -64
  22. package/src/components/Input/__test__/TextInput.spec.js +1 -1
  23. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +1 -5
  24. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -7
  25. package/src/components/ModalDialog/ModalDialog.vue +148 -64
  26. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +221 -11
  27. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
  28. package/src/components/MultiSelect/MultiSelect.vue +297 -0
  29. package/src/components/Radio/Radio.vue +1 -1
  30. package/src/components/Switch/Switch.vue +1 -1
  31. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -3
  32. package/src/components/TemplatePreview/TemplatePreview.vue +2 -2
  33. package/src/components/TemplatePreview/TemplatePreviewModal.vue +1 -1
  34. package/src/components/Toast/Toast.vue +9 -16
  35. package/src/components/ToolTip/ToolTip.vue +177 -25
  36. package/src/components/ToolTip/__tests__/ToolTip.spec.js +61 -339
  37. package/src/components/index.ts +6 -62
  38. package/src/components/ui/popover/PopoverContent.vue +4 -5
  39. package/src/components/ui/popover/PopoverOption.vue +0 -4
  40. package/src/components/ui/popover/PopoverTrigger.vue +1 -5
  41. package/src/locales/en.json +1 -3
  42. package/src/locales/es.json +1 -3
  43. package/src/locales/pt_br.json +1 -3
  44. package/src/stories/Drawer.stories.js +1 -1
  45. package/src/stories/Input.mdx +0 -3
  46. package/src/stories/ModalDialog.mdx +0 -3
  47. package/src/stories/ModalDialog.stories.js +1 -1
  48. package/src/stories/MultiSelect.stories.js +45 -143
  49. package/src/components/MultiSelect/MultSelectOption.vue +0 -49
  50. package/src/components/MultiSelect/__tests__/MultiSelect.spec.js +0 -557
  51. package/src/components/MultiSelect/__tests__/MultiSelectOption.spec.js +0 -229
  52. package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -87
  53. package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +0 -51
  54. package/src/components/MultiSelect/index.vue +0 -265
  55. package/src/components/Select/__tests__/Select.spec.js +0 -422
  56. package/src/components/Select/__tests__/SelectItem.spec.js +0 -330
  57. package/src/components/Select/__tests__/__snapshots__/Popover.spec.js.snap +0 -8
  58. package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -71
  59. package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +0 -15
  60. package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +0 -25
  61. package/src/components/Select/__tests__/__snapshots__/SelectPopover.spec.js.snap +0 -8
  62. package/src/components/Select/index.vue +0 -308
  63. package/src/components/ui/dialog/Dialog.vue +0 -19
  64. package/src/components/ui/dialog/DialogClose.vue +0 -29
  65. package/src/components/ui/dialog/DialogContent.vue +0 -140
  66. package/src/components/ui/dialog/DialogFooter.vue +0 -50
  67. package/src/components/ui/dialog/DialogHeader.vue +0 -83
  68. package/src/components/ui/dialog/DialogTitle.vue +0 -38
  69. package/src/components/ui/dialog/DialogTrigger.vue +0 -16
  70. package/src/components/ui/dialog/index.ts +0 -7
  71. package/src/components/ui/drawer/Drawer.vue +0 -27
  72. package/src/components/ui/drawer/DrawerClose.vue +0 -31
  73. package/src/components/ui/drawer/DrawerContent.vue +0 -111
  74. package/src/components/ui/drawer/DrawerDescription.vue +0 -40
  75. package/src/components/ui/drawer/DrawerFooter.vue +0 -38
  76. package/src/components/ui/drawer/DrawerHeader.vue +0 -57
  77. package/src/components/ui/drawer/DrawerOverlay.vue +0 -33
  78. package/src/components/ui/drawer/DrawerTitle.vue +0 -37
  79. package/src/components/ui/drawer/DrawerTrigger.vue +0 -31
  80. package/src/components/ui/drawer/index.ts +0 -10
  81. package/src/components/ui/tooltip/Tooltip.vue +0 -21
  82. package/src/components/ui/tooltip/TooltipContent.vue +0 -74
  83. package/src/components/ui/tooltip/TooltipTrigger.vue +0 -26
  84. package/src/components/ui/tooltip/index.ts +0 -3
  85. package/src/lib/layer-manager.ts +0 -92
  86. package/src/stories/Dialog.stories.js +0 -832
  87. package/src/stories/DrawerNext.stories.js +0 -611
  88. package/src/stories/LayerManager.docs.mdx +0 -40
  89. package/src/stories/LayerManager.stories.js +0 -364
  90. package/src/stories/Select.stories.js +0 -161
@@ -42,9 +42,6 @@ The `Input` component is designed to provide an input field for users to enter t
42
42
  | placeholder | `String` of the native input placeholder | `String` | `''` |
43
43
  | iconLeft | `String` of the left icon | `String` | `undefined` |
44
44
  | iconRight | `String` of the right icon | `String` | `false` |
45
- | useFocusProp | `Boolean` to enable use focus by prop (ignore native css) | `true` \| `false` | `false` |
46
- | focus | `Boolean` to enable focus component status | `true` \| `false` | `false` |
47
-
48
45
 
49
46
  ## Example
50
47
  Some examples of uses of the `UnnnicInput`
@@ -6,9 +6,6 @@ import * as ModalDialogStories from './ModalDialog.stories';
6
6
 
7
7
  # ModalDialog
8
8
 
9
- > **⚠️ DEPRECATED**: This component has been deprecated in favor of the new `Dialog` component. Please use `UnnnicDialog`
10
- instead for new implementations. See the [Dialog documentation](?path=/docs/feedback-dialog--docs) for more information.
11
-
12
9
  The ModalDialog was designed to inform the user about a specific task, request information, or involve other tasks.
13
10
 
14
11
  <Source
@@ -7,7 +7,7 @@ import iconsList from '../utils/iconList';
7
7
  import colorsList from '../utils/colorsList';
8
8
 
9
9
  export default {
10
- title: 'Feedback/ModalDialog',
10
+ title: 'Example/ModalDialog',
11
11
  component: UnnnicModalDialog,
12
12
  argTypes: {
13
13
  type: {
@@ -1,160 +1,62 @@
1
- import UnnnicMultiSelect from '../components/MultiSelect/index.vue';
2
-
3
- const options = [
4
- { label: 'Option 1', value: 'option1', altValue: 'alt_value_option1' },
5
- { label: 'Option 2', value: 'option2', altValue: 'alt_value_option2' },
6
- { label: 'Option 3', value: 'option3', altValue: 'alt_value_option3' },
7
- { label: 'Option 4', value: 'option4', altValue: 'alt_value_option4' },
8
- { label: 'Option 5', value: 'option5', altValue: 'alt_value_option5' },
9
- { label: 'Option 6', value: 'option6', altValue: 'alt_value_option6' },
10
- { label: 'Option 7', value: 'option7', altValue: 'alt_value_option7' },
11
- { label: 'Option 8', value: 'option8', altValue: 'alt_value_option8' },
12
- { label: 'Option 9', value: 'option9', altValue: 'alt_value_option9' },
13
- { label: 'Option 10', value: 'option10', disabled: true },
14
- ];
1
+ import UnnnicMultiSelect from '../components/MultiSelect/MultiSelect.vue';
15
2
 
16
3
  export default {
17
4
  title: 'Form/MultiSelect',
18
5
  component: UnnnicMultiSelect,
19
- tags: ['autodocs'],
20
- parameters: {
21
- docs: {
22
- description: {
23
- component:
24
- 'MultiSelect is designed to solve common problems related to multiple option selection.',
25
- },
26
- },
27
- },
28
- argTypes: {
29
- options: {
30
- description:
31
- 'List of items to be displayed in the options. If an item has a `disabled` key set to `true`, that item will be disabled. By default, the component looks for the `label` and `value` keys to display and update the model, but these are not required if you wish to customize them using the `itemLabel` and `itemValue` props, respectively.',
32
- },
33
- placeholder: {
34
- description: 'Text to be displayed in the placeholder.',
35
- },
36
- label: {
37
- description: 'Text to be displayed in the label.',
38
- },
39
- modelValue: {
40
- description:
41
- 'Model variable. Its type will always match a list of the return type of the key specified by `itemValue`, or the entire options object when the `returnObject` property is set to `true`.',
42
- },
43
- returnObject: {
44
- description:
45
- 'Prop to indicate that the full option object should be returned in the v-model.',
46
- },
47
- itemLabel: {
48
- description:
49
- 'Field of the option item that should be used to render the option label.',
50
- },
51
- itemValue: {
52
- description:
53
- 'Field of the option item that should be used to return value to v-model.',
54
- },
55
- type: {
56
- description: 'Select state type',
57
- },
58
- errors: {
59
- description:
60
- "Error message or messages. When it's an array, the messages will be separated by commas.",
61
- },
62
- message: {
63
- description: 'Help or hint message.',
64
- },
65
- size: {
66
- description: 'Select size',
67
- },
68
- optionsLines: {
69
- description:
70
- 'Number of options to display at most; if exceeded, scrolling will be enabled.',
71
- },
72
- enableSearch: {
73
- description:
74
- 'If true, enables a search field displayed inside the options popover. The `update:search` event is emitted on each input.',
75
- },
76
- search: {
77
- description: 'Search value.',
78
- },
79
- locale: {
80
- description: 'Locale for i18n translations.',
81
- },
82
- disabled: {
83
- description: 'Disable the select.',
84
- },
85
- },
6
+ argTypes: {},
86
7
  render: (args) => ({
87
- components: { UnnnicMultiSelect },
8
+ components: {
9
+ UnnnicMultiSelect,
10
+ },
88
11
  setup() {
89
- const handleSearch = (value) => {
90
- args.search = value;
91
- };
92
- return { args, handleSearch };
12
+ return { args };
93
13
  },
94
14
  data() {
95
15
  return {
96
- exampleValue: [],
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
+ ],
97
52
  };
98
53
  },
99
54
  template: `
100
- <div style="width: 300px;">
101
- <p>modelValue: {{ exampleValue }}</p>
102
- <unnnic-multi-select v-model="exampleValue" v-bind="args" @update:search="handleSearch" />
55
+ <div>
56
+ <UnnnicMultiSelect v-bind="args" v-model="groups" />
103
57
  </div>
104
58
  `,
105
59
  }),
106
60
  };
107
61
 
108
- export const Default = {
109
- args: {
110
- placeholder: 'Placeholder',
111
- label: 'Label',
112
- options,
113
- },
114
- };
115
-
116
- export const ReturnObject = {
117
- args: {
118
- returnObject: true,
119
- placeholder: 'Placeholder',
120
- label: 'Label',
121
- options,
122
- },
123
- };
124
-
125
- export const AlternativeValueKey = {
126
- args: {
127
- itemValue: 'altValue',
128
- placeholder: 'Placeholder',
129
- label: 'Label',
130
- options,
131
- },
132
- };
133
-
134
- export const AlternativeValueLabel = {
135
- args: {
136
- itemLabel: 'altValue',
137
- placeholder: 'Placeholder',
138
- label: 'Label',
139
- options,
140
- },
141
- };
142
-
143
- export const Disabled = {
144
- args: {
145
- placeholder: 'Placeholder',
146
- label: 'Label',
147
- options,
148
- disabled: true,
149
- },
150
- };
151
-
152
- export const WithSearch = {
153
- args: {
154
- placeholder: 'Placeholder',
155
- label: 'Label',
156
- options,
157
- enableSearch: true,
158
- search: '',
159
- },
160
- };
62
+ export const Medium = { args: {} };
@@ -1,49 +0,0 @@
1
- <template>
2
- <div :class="['unnnic-multi-select-option']">
3
- <UnnnicCheckbox
4
- :modelValue="props.active"
5
- :disabled="props.disabled"
6
- :label="props.label"
7
- @update:model-value="emit('update:modelValue', !props.active)"
8
- />
9
- </div>
10
- </template>
11
-
12
- <script setup lang="ts">
13
- import UnnnicCheckbox from '../Checkbox/Checkbox.vue';
14
-
15
- defineOptions({
16
- name: 'UnnnicMultiSelectOption',
17
- });
18
-
19
- const emit = defineEmits<{
20
- 'update:modelValue': [boolean];
21
- }>();
22
-
23
- interface SelectOptionProps {
24
- label: string;
25
- disabled?: boolean;
26
- active?: boolean;
27
- focused?: boolean;
28
- }
29
-
30
- const props = withDefaults(defineProps<SelectOptionProps>(), {
31
- disabled: false,
32
- active: false,
33
- focused: false,
34
- });
35
- </script>
36
-
37
- <style lang="scss" scoped>
38
- @use '@/assets/scss/unnnic' as *;
39
- * {
40
- margin: 0;
41
- padding: 0;
42
- box-sizing: border-box;
43
- }
44
-
45
- .unnnic-multi-select-option {
46
- border-radius: $unnnic-radius-1;
47
- font: $unnnic-font-emphasis;
48
- }
49
- </style>