@weni/unnnic-system 3.0.1-alpha.1 → 3.0.1-alpha.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.0.1-alpha.1",
3
+ "version": "3.0.1-alpha.2",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -342,26 +342,26 @@ $scheme-colors:
342
342
  // Background semantic colors
343
343
  "bg-base" $unnnic-color-white,
344
344
  "bg-soft" $unnnic-color-gray-50,
345
- "bg-muted" $unnnic-color-gray-200,
346
- "bg-info" $unnnic-color-aux-blue-50,
347
- "bg-success" $unnnic-color-aux-green-50,
345
+ "bg-muted" $unnnic-color-gray-100,
346
+ "bg-info" $unnnic-color-aux-blue-100,
347
+ "bg-success" $unnnic-color-aux-green-100,
348
348
  "bg-warning" $unnnic-color-aux-yellow-50,
349
349
  "bg-critical" $unnnic-color-aux-red-50,
350
350
 
351
351
  // Text semantic colors
352
- "text-base" $unnnic-color-gray-900,
353
- "text-muted" $unnnic-color-gray-500,
354
- "text-emphasized" $unnnic-color-gray-950,
355
- "text-inverted" $unnnic-color-teal-500,
356
- "text-info" $unnnic-color-aux-blue-500,
357
- "text-success" $unnnic-color-aux-green-500,
358
- "text-warning" $unnnic-color-aux-yellow-600,
359
- "text-critical" $unnnic-color-aux-red-500,
352
+ "fg-base" $unnnic-color-gray-500,
353
+ "fg-muted" $unnnic-color-gray-300,
354
+ "fg-emphasized" $unnnic-color-gray-900,
355
+ "fg-inverted" $unnnic-color-white,
356
+ "fg-info" $unnnic-color-aux-blue-500,
357
+ "fg-success" $unnnic-color-aux-green-500,
358
+ "fg-warning" $unnnic-color-aux-yellow-500,
359
+ "fg-critical" $unnnic-color-aux-red-500,
360
360
 
361
361
  // Border semantic colors
362
362
  "border-base" $unnnic-color-gray-200,
363
363
  "border-soft" $unnnic-color-gray-100,
364
- "border-muted" $unnnic-color-gray-300,
364
+ "border-muted" $unnnic-color-gray-200,
365
365
  "border-emphasized" $unnnic-color-gray-400,
366
366
  "border-info" $unnnic-color-aux-blue-300,
367
367
  "border-success" $unnnic-color-aux-green-300,
@@ -68,8 +68,9 @@
68
68
  <slot />
69
69
  </div>
70
70
  </main>
71
+ <slot v-if="slots['right']" name="right" />
71
72
  <UnnnicButton
72
- v-if="close"
73
+ v-else-if="close"
73
74
  class="unnnic-chats-header__close--sm"
74
75
  type="tertiary"
75
76
  iconCenter="close-1"
@@ -79,80 +80,59 @@
79
80
  </header>
80
81
  </div>
81
82
  </template>
82
- <script>
83
- import UnnnicI18n from '../../mixins/i18n';
83
+
84
+ <script lang="ts" setup>
85
+ import { useSlots } from 'vue';
86
+ import type { UnnnicColorToken } from '../../types/unnnic-utils';
84
87
 
85
88
  import UnnnicButton from '../Button/Button.vue';
86
89
  import UnnnicAvatarIcon from '../AvatarIcon/AvatarIcon.vue';
87
90
  import UnnnicChatsUserAvatar from '../ChatsUserAvatar/ChatsUserAvatar.vue';
88
91
  import UnnnicBreadcrumb from '../Breadcrumb/Breadcrumb.vue';
89
92
 
90
- export default {
93
+ defineOptions({
91
94
  name: 'UnnnicChatsHeader',
95
+ });
96
+
97
+ interface Props {
98
+ title?: string;
99
+ subtitle?: string;
100
+ sectionIconScheme?: UnnnicColorToken;
101
+ avatarIcon?: string;
102
+ avatarName?: string;
103
+ back?: () => void;
104
+ close?: () => void;
105
+ avatarClick?: () => void;
106
+ titleClick?: () => void;
107
+ crumbs?: Array<{ name: string; path: string }>;
108
+ size?: 'auto' | 'small' | 'large';
109
+ }
110
+
111
+ withDefaults(defineProps<Props>(), {
112
+ title: '',
113
+ subtitle: '',
114
+ sectionIconScheme: 'aux-purple',
115
+ avatarIcon: '',
116
+ avatarName: '',
117
+ back: () => {},
118
+ close: () => {},
119
+ avatarClick: () => {},
120
+ titleClick: () => {},
121
+ crumbs: () => [],
122
+ size: 'auto',
123
+ });
124
+
125
+ const slots = useSlots();
126
+
127
+ defineEmits<{
128
+ crumbClick: [crumb: { name: string; path: string }];
129
+ }>();
92
130
 
93
- components: {
94
- UnnnicButton,
95
- UnnnicAvatarIcon,
96
- UnnnicChatsUserAvatar,
97
- UnnnicBreadcrumb,
98
- },
99
-
100
- mixins: [UnnnicI18n],
101
-
102
- props: {
103
- title: {
104
- type: String,
105
- required: true,
106
- default: '',
107
- },
108
- subtitle: {
109
- type: String,
110
- default: '',
111
- },
112
- sectionIconScheme: {
113
- type: String,
114
- default: 'aux-purple',
115
- },
116
- avatarIcon: {
117
- type: String,
118
- default: '',
119
- },
120
- avatarName: {
121
- type: String,
122
- default: '',
123
- },
124
- back: {
125
- type: Function,
126
- required: false,
127
- },
128
- close: {
129
- type: Function,
130
- required: false,
131
- },
132
- avatarClick: {
133
- type: Function,
134
- required: false,
135
- },
136
- titleClick: {
137
- type: Function,
138
- required: false,
139
- },
140
- crumbs: {
141
- type: Array,
142
- default: () => [],
143
- },
144
- size: {
145
- type: String,
146
- default: 'auto',
147
- validator(size) {
148
- return ['auto', 'small', 'large'].includes(size);
149
- },
150
- },
151
- },
152
- };
153
131
  </script>
132
+
154
133
  <style lang="scss">
155
134
  @use '@/assets/scss/unnnic' as *;
135
+
156
136
  .unnnic-chats-header {
157
137
  padding: $unnnic-spacing-sm;
158
138
 
@@ -32,6 +32,27 @@ export const ContactInfos = {
32
32
  },
33
33
  };
34
34
 
35
+ export const ContactRightSlot = {
36
+ args: {
37
+ title: 'John Doe',
38
+ avatarName: 'John Doe',
39
+ },
40
+ render: (args) => ({
41
+ setup() {
42
+ return { args };
43
+ },
44
+ components: { UnnnicChatsHeader },
45
+ template: `
46
+ <UnnnicChatsHeader
47
+ v-bind="args"
48
+ >
49
+ <template #right>
50
+ right slot
51
+ </template>
52
+ </UnnnicChatsHeader>`,
53
+ }),
54
+ }
55
+
35
56
  export const Dashboard = {
36
57
  args: {
37
58
  title: size === 'large' ? 'Lorem Ipsum Inc.' : 'Dashboard',
@@ -1,6 +1,6 @@
1
- import type { App, Component } from 'vue';
1
+ import type { App, Component } from "vue";
2
2
 
3
- export type { IconProps } from '../components/Icon.vue';
3
+ export type { IconProps } from "../components/Icon.vue";
4
4
 
5
5
  export interface UnnnicPlugin {
6
6
  install(app: App): void;
@@ -48,4 +48,4 @@ export declare const unnnicCallModal: (props: any) => void;
48
48
  export declare const unnnicFontSize: any;
49
49
 
50
50
  declare const Unnnic: UnnnicPlugin;
51
- export default Unnnic;
51
+ export default Unnnic;
@@ -0,0 +1,88 @@
1
+ export type UnnnicColorToken =
2
+ | "background-solo"
3
+ | "background-sky"
4
+ | "background-grass"
5
+ | "background-carpet"
6
+ | "background-snow"
7
+ | "background-lightest"
8
+ | "background-white"
9
+ | "neutral-black"
10
+ | "neutral-darkest"
11
+ | "neutral-dark"
12
+ | "neutral-cloudy"
13
+ | "neutral-cleanest"
14
+ | "neutral-clean"
15
+ | "neutral-soft"
16
+ | "neutral-lightest"
17
+ | "neutral-light"
18
+ | "neutral-white"
19
+ | "neutral-snow"
20
+ | "feedback-red"
21
+ | "feedback-green"
22
+ | "feedback-yellow"
23
+ | "feedback-blue"
24
+ | "feedback-grey"
25
+ | "aux-blue"
26
+ | "aux-purple"
27
+ | "aux-orange"
28
+ | "aux-lemon"
29
+ | "aux-pink"
30
+ | "aux-baby-blue"
31
+ | "aux-baby-yellow"
32
+ | "aux-baby-red"
33
+ | "aux-baby-green"
34
+ | "aux-baby-pink"
35
+ | "aux-green-100"
36
+ | "aux-green-300"
37
+ | "aux-green-500"
38
+ | "aux-green-700"
39
+ | "aux-green-900"
40
+ | "aux-blue-100"
41
+ | "aux-blue-300"
42
+ | "aux-blue-500"
43
+ | "aux-blue-700"
44
+ | "aux-blue-900"
45
+ | "aux-purple-100"
46
+ | "aux-purple-300"
47
+ | "aux-purple-500"
48
+ | "aux-purple-700"
49
+ | "aux-purple-900"
50
+ | "aux-red-100"
51
+ | "aux-red-300"
52
+ | "aux-red-500"
53
+ | "aux-red-700"
54
+ | "aux-red-900"
55
+ | "aux-orange-100"
56
+ | "aux-orange-300"
57
+ | "aux-orange-500"
58
+ | "aux-orange-700"
59
+ | "aux-orange-900"
60
+ | "aux-yellow-100"
61
+ | "aux-yellow-300"
62
+ | "aux-yellow-500"
63
+ | "aux-yellow-700"
64
+ | "aux-yellow-900"
65
+ | "floweditor-blue"
66
+ | "floweditor-purple"
67
+ | "floweditor-wine"
68
+ | "floweditor-orange"
69
+ | "floweditor-pink"
70
+ | "floweditor-turquoise"
71
+ | "floweditor-green"
72
+ | "weni-50"
73
+ | "weni-100"
74
+ | "weni-200"
75
+ | "weni-300"
76
+ | "weni-400"
77
+ | "weni-500"
78
+ | "weni-600"
79
+ | "weni-700"
80
+ | "weni-800"
81
+ | "weni-900"
82
+ | "weni-950"
83
+ | "brand-weni"
84
+ | "brand-weni-dark"
85
+ | "brand-weni-soft"
86
+ | "brand-sec-dark"
87
+ | "brand-sec-soft"
88
+ | "brand-sec";