@weni/unnnic-system 3.2.9-alpha.0 → 3.2.9-alpha.10
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/CHANGELOG.md +18 -0
- package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
- package/dist/components/DataTable/index.vue.d.ts +7 -0
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +87 -95
- package/dist/components/Input/BaseInput.vue.d.ts +22 -0
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +87 -95
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +52 -1
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +87 -95
- package/dist/components/InputNext/InputNext.vue.d.ts +1 -1
- package/dist/components/Label/Label.vue.d.ts +2 -2
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +87 -95
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +52 -1
- package/dist/components/SelectTime/index.vue.d.ts +52 -1
- package/dist/components/Tab/Tab.vue.d.ts +11 -0
- package/dist/components/index.d.ts +895 -937
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-2735a8fb.js → es-3cbe331a.js} +1 -1
- package/dist/{index-e012fa52.js → index-2241773d.js} +4242 -4189
- package/dist/locales/en.json.d.ts +2 -1
- package/dist/locales/es.json.d.ts +2 -1
- package/dist/locales/pt_br.json.d.ts +2 -1
- package/dist/{pt-br-f38a8b9c.js → pt-br-9ddee0e9.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.js +1 -1
- package/dist/unnnic.umd.cjs +39 -39
- package/package.json +1 -1
- package/src/assets/scss/scheme-colors.scss +115 -238
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +11 -7
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +2 -2
- package/src/components/Chip/Chip.vue +3 -2
- package/src/components/DataTable/index.vue +25 -10
- package/src/components/Input/BaseInput.vue +21 -2
- package/src/components/Input/Input.scss +2 -1
- package/src/components/Input/Input.vue +26 -30
- package/src/components/Input/TextInput.vue +59 -22
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +7 -3
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +7 -1
- package/src/components/Label/Label.vue +2 -2
- package/src/components/Popover/__tests__/Popover.spec.js +147 -0
- package/src/components/Popover/__tests__/__snapshots__/Popover.spec.js.snap +8 -0
- package/src/components/Popover/index.vue +146 -0
- package/src/components/Select/SelectOption.vue +65 -0
- package/src/components/Select/__tests__/Select.spec.js +412 -0
- package/src/components/Select/__tests__/SelectItem.spec.js +330 -0
- package/src/components/Select/__tests__/SelectOption.spec.js +174 -0
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +97 -0
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +15 -0
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +25 -0
- package/src/components/Select/index.vue +245 -0
- package/src/components/Tab/Tab.vue +37 -23
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -1
- package/src/locales/en.json +2 -1
- package/src/locales/es.json +2 -1
- package/src/locales/pt_br.json +2 -1
- package/src/stories/DataTable.stories.js +60 -0
- package/src/stories/Input.stories.js +6 -0
- package/src/stories/Popover.stories.js +39 -0
- package/src/stories/Select.stories.js +91 -0
- package/src/stories/Tab.stories.js +11 -4
package/package.json
CHANGED
|
@@ -3,242 +3,118 @@
|
|
|
3
3
|
|
|
4
4
|
// Global scheme colors mapping for all components
|
|
5
5
|
|
|
6
|
-
$unnnic-scheme-colors:
|
|
7
|
-
'
|
|
8
|
-
|
|
9
|
-
'
|
|
10
|
-
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'green
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
'green-
|
|
44
|
-
'green-
|
|
45
|
-
'green-
|
|
46
|
-
|
|
47
|
-
'
|
|
48
|
-
'blue-100'
|
|
49
|
-
'blue-
|
|
50
|
-
'blue-
|
|
51
|
-
'blue-
|
|
52
|
-
'blue-
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
'
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
-
'
|
|
102
|
-
'
|
|
103
|
-
|
|
104
|
-
'
|
|
105
|
-
'
|
|
106
|
-
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
'
|
|
111
|
-
'
|
|
112
|
-
'
|
|
113
|
-
'
|
|
114
|
-
'
|
|
115
|
-
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'fg-emphasized' $unnnic-color-fg-emphasized,
|
|
119
|
-
'fg-inverted' $unnnic-color-fg-inverted,
|
|
120
|
-
'fg-active' $unnnic-color-fg-active,
|
|
121
|
-
'fg-info' $unnnic-color-fg-info,
|
|
122
|
-
'fg-success' $unnnic-color-fg-success,
|
|
123
|
-
'fg-warning' $unnnic-color-fg-warning,
|
|
124
|
-
'fg-critical' $unnnic-color-fg-critical,
|
|
125
|
-
|
|
126
|
-
'border-base' $unnnic-color-border-base,
|
|
127
|
-
'border-soft' $unnnic-color-border-soft,
|
|
128
|
-
'border-muted' $unnnic-color-border-muted,
|
|
129
|
-
'border-emphasized' $unnnic-color-border-emphasized,
|
|
130
|
-
'border-active' $unnnic-color-border-active,
|
|
131
|
-
'border-info' $unnnic-color-border-info,
|
|
132
|
-
'border-success' $unnnic-color-border-success,
|
|
133
|
-
'border-warning' $unnnic-color-border-warning,
|
|
134
|
-
'border-critical' $unnnic-color-border-critical,
|
|
135
|
-
|
|
136
|
-
// Deprecated
|
|
137
|
-
'background-solo' $unnnic-color-teal-50,
|
|
138
|
-
'background-sky' $unnnic-color-gray-50,
|
|
139
|
-
'background-grass' $unnnic-color-green-50,
|
|
140
|
-
'background-carpet' $unnnic-color-gray-50,
|
|
141
|
-
'background-snow' $unnnic-color-white,
|
|
142
|
-
'background-lightest' $unnnic-color-gray-50,
|
|
143
|
-
'background-white' $unnnic-color-white,
|
|
144
|
-
|
|
145
|
-
'neutral-black' $unnnic-color-gray-900,
|
|
146
|
-
'neutral-darkest' $unnnic-color-gray-800,
|
|
147
|
-
'neutral-dark' $unnnic-color-gray-700,
|
|
148
|
-
'neutral-cloudy' $unnnic-color-gray-500,
|
|
149
|
-
'neutral-cleanest' $unnnic-color-gray-200,
|
|
150
|
-
'neutral-clean' $unnnic-color-gray-300,
|
|
151
|
-
'neutral-soft' $unnnic-color-gray-100,
|
|
152
|
-
'neutral-lightest' $unnnic-color-gray-50,
|
|
153
|
-
'neutral-light' $unnnic-color-gray-50,
|
|
154
|
-
'neutral-white' $unnnic-color-white,
|
|
155
|
-
'neutral-snow' $unnnic-color-white,
|
|
156
|
-
|
|
157
|
-
'feedback-red' $unnnic-color-red-500,
|
|
158
|
-
'feedback-green' $unnnic-color-green-500,
|
|
159
|
-
'feedback-yellow' $unnnic-color-yellow-500,
|
|
160
|
-
'feedback-blue' $unnnic-color-blue-500,
|
|
161
|
-
'feedback-grey' $unnnic-color-gray-500,
|
|
162
|
-
|
|
163
|
-
'aux-blue' $unnnic-color-blue-500,
|
|
164
|
-
'aux-purple' $unnnic-color-purple-500,
|
|
165
|
-
'aux-orange' $unnnic-color-orange-500,
|
|
166
|
-
'aux-lemon' $unnnic-color-yellow-400,
|
|
167
|
-
'aux-pink' $unnnic-color-red-300,
|
|
168
|
-
'aux-baby-blue' $unnnic-color-blue-200,
|
|
169
|
-
'aux-baby-yellow' $unnnic-color-yellow-200,
|
|
170
|
-
'aux-baby-red' $unnnic-color-red-200,
|
|
171
|
-
'aux-baby-green' $unnnic-color-green-200,
|
|
172
|
-
'aux-baby-pink' $unnnic-color-red-100,
|
|
173
|
-
|
|
174
|
-
'aux-green-100' $unnnic-color-green-100,
|
|
175
|
-
'aux-green-300' $unnnic-color-green-300,
|
|
176
|
-
'aux-green-500' $unnnic-color-green-500,
|
|
177
|
-
'aux-green-700' $unnnic-color-green-700,
|
|
178
|
-
'aux-green-900' $unnnic-color-green-900,
|
|
179
|
-
'aux-blue-100' $unnnic-color-blue-100,
|
|
180
|
-
'aux-blue-300' $unnnic-color-blue-300,
|
|
181
|
-
'aux-blue-500' $unnnic-color-blue-500,
|
|
182
|
-
'aux-blue-700' $unnnic-color-blue-700,
|
|
183
|
-
'aux-blue-900' $unnnic-color-blue-900,
|
|
184
|
-
'aux-purple-100' $unnnic-color-purple-100,
|
|
185
|
-
'aux-purple-300' $unnnic-color-purple-300,
|
|
186
|
-
'aux-purple-500' $unnnic-color-purple-500,
|
|
187
|
-
'aux-purple-700' $unnnic-color-purple-700,
|
|
188
|
-
'aux-purple-900' $unnnic-color-purple-900,
|
|
189
|
-
'aux-red-100' $unnnic-color-red-100,
|
|
190
|
-
'aux-red-300' $unnnic-color-red-300,
|
|
191
|
-
'aux-red-500' $unnnic-color-red-500,
|
|
192
|
-
'aux-red-700' $unnnic-color-red-700,
|
|
193
|
-
'aux-red-900' $unnnic-color-red-900,
|
|
194
|
-
'aux-orange-100' $unnnic-color-orange-100,
|
|
195
|
-
'aux-orange-300' $unnnic-color-orange-300,
|
|
196
|
-
'aux-orange-500' $unnnic-color-orange-500,
|
|
197
|
-
'aux-orange-700' $unnnic-color-orange-700,
|
|
198
|
-
'aux-orange-900' $unnnic-color-orange-900,
|
|
199
|
-
'aux-yellow-100' $unnnic-color-yellow-100,
|
|
200
|
-
'aux-yellow-300' $unnnic-color-yellow-300,
|
|
201
|
-
'aux-yellow-500' $unnnic-color-yellow-500,
|
|
202
|
-
'aux-yellow-700' $unnnic-color-yellow-700,
|
|
203
|
-
'aux-yellow-900' $unnnic-color-yellow-900,
|
|
204
|
-
|
|
205
|
-
'floweditor-blue' $unnnic-color-blue-600,
|
|
206
|
-
'floweditor-purple' $unnnic-color-purple-600,
|
|
207
|
-
'floweditor-wine' $unnnic-color-red-800,
|
|
208
|
-
'floweditor-orange' $unnnic-color-orange-600,
|
|
209
|
-
'floweditor-pink' $unnnic-color-red-400,
|
|
210
|
-
'floweditor-turquoise' $unnnic-color-teal-500,
|
|
211
|
-
'floweditor-green' $unnnic-color-green-600,
|
|
212
|
-
|
|
213
|
-
'weni-50' $unnnic-color-teal-50,
|
|
214
|
-
'weni-100' $unnnic-color-teal-100,
|
|
215
|
-
'weni-200' $unnnic-color-teal-200,
|
|
216
|
-
'weni-300' $unnnic-color-teal-300,
|
|
217
|
-
'weni-400' $unnnic-color-teal-400,
|
|
218
|
-
'weni-500' $unnnic-color-teal-500,
|
|
219
|
-
'weni-600' $unnnic-color-teal-600,
|
|
220
|
-
'weni-700' $unnnic-color-teal-700,
|
|
221
|
-
'weni-800' $unnnic-color-teal-800,
|
|
222
|
-
'weni-900' $unnnic-color-teal-900,
|
|
223
|
-
'weni-950' $unnnic-color-teal-950,
|
|
224
|
-
'brand-weni' $unnnic-color-teal-600,
|
|
225
|
-
'brand-weni-dark' $unnnic-color-teal-800,
|
|
226
|
-
'brand-weni-soft' $unnnic-color-teal-100,
|
|
227
|
-
'brand-sec-dark' $unnnic-color-blue-800,
|
|
228
|
-
'brand-sec-soft' $unnnic-color-blue-100,
|
|
229
|
-
'brand-sec' $unnnic-color-blue-600,
|
|
230
|
-
|
|
231
|
-
'teal-50' $unnnic-color-teal-50,
|
|
232
|
-
'teal-100' $unnnic-color-teal-100,
|
|
233
|
-
'teal-200' $unnnic-color-teal-200,
|
|
234
|
-
'teal-300' $unnnic-color-teal-300,
|
|
235
|
-
'teal-400' $unnnic-color-teal-400,
|
|
236
|
-
'teal-500' $unnnic-color-teal-500,
|
|
237
|
-
'teal-600' $unnnic-color-teal-600,
|
|
238
|
-
'teal-700' $unnnic-color-teal-700,
|
|
239
|
-
'teal-800' $unnnic-color-teal-800,
|
|
240
|
-
'teal-900' $unnnic-color-teal-900,
|
|
241
|
-
'teal-950' $unnnic-color-teal-950;
|
|
6
|
+
$unnnic-scheme-colors: 'background-solo'$unnnic-color-teal-50,
|
|
7
|
+
'background-sky'$unnnic-color-gray-50,
|
|
8
|
+
'background-grass'$unnnic-color-green-50,
|
|
9
|
+
'background-carpet'$unnnic-color-gray-50,
|
|
10
|
+
'background-snow'$unnnic-color-white,
|
|
11
|
+
'background-lightest'$unnnic-color-gray-50,
|
|
12
|
+
'background-white'$unnnic-color-white,
|
|
13
|
+
|
|
14
|
+
'neutral-black'$unnnic-color-gray-900,
|
|
15
|
+
'neutral-darkest'$unnnic-color-gray-800,
|
|
16
|
+
'neutral-dark'$unnnic-color-gray-700,
|
|
17
|
+
'neutral-cloudy'$unnnic-color-gray-500,
|
|
18
|
+
'neutral-cleanest'$unnnic-color-gray-200,
|
|
19
|
+
'neutral-clean'$unnnic-color-gray-300,
|
|
20
|
+
'neutral-soft'$unnnic-color-gray-100,
|
|
21
|
+
'neutral-lightest'$unnnic-color-gray-50,
|
|
22
|
+
'neutral-light'$unnnic-color-gray-50,
|
|
23
|
+
'neutral-white'$unnnic-color-white,
|
|
24
|
+
'neutral-snow'$unnnic-color-white,
|
|
25
|
+
|
|
26
|
+
'feedback-red'$unnnic-color-red-500,
|
|
27
|
+
'feedback-green'$unnnic-color-green-500,
|
|
28
|
+
'feedback-yellow'$unnnic-color-yellow-500,
|
|
29
|
+
'feedback-blue'$unnnic-color-blue-500,
|
|
30
|
+
'feedback-grey'$unnnic-color-gray-500,
|
|
31
|
+
|
|
32
|
+
'aux-blue'$unnnic-color-blue-500,
|
|
33
|
+
'aux-purple'$unnnic-color-purple-500,
|
|
34
|
+
'aux-orange'$unnnic-color-orange-500,
|
|
35
|
+
'aux-lemon'$unnnic-color-yellow-400,
|
|
36
|
+
'aux-pink'$unnnic-color-red-300,
|
|
37
|
+
'aux-baby-blue'$unnnic-color-blue-200,
|
|
38
|
+
'aux-baby-yellow'$unnnic-color-yellow-200,
|
|
39
|
+
'aux-baby-red'$unnnic-color-red-200,
|
|
40
|
+
'aux-baby-green'$unnnic-color-green-200,
|
|
41
|
+
'aux-baby-pink'$unnnic-color-red-100,
|
|
42
|
+
|
|
43
|
+
'aux-green-100'$unnnic-color-green-100,
|
|
44
|
+
'aux-green-300'$unnnic-color-green-300,
|
|
45
|
+
'aux-green-500'$unnnic-color-green-500,
|
|
46
|
+
'aux-green-700'$unnnic-color-green-700,
|
|
47
|
+
'aux-green-900'$unnnic-color-green-900,
|
|
48
|
+
'aux-blue-100'$unnnic-color-blue-100,
|
|
49
|
+
'aux-blue-300'$unnnic-color-blue-300,
|
|
50
|
+
'aux-blue-500'$unnnic-color-blue-500,
|
|
51
|
+
'aux-blue-700'$unnnic-color-blue-700,
|
|
52
|
+
'aux-blue-900'$unnnic-color-blue-900,
|
|
53
|
+
'aux-purple-100'$unnnic-color-purple-100,
|
|
54
|
+
'aux-purple-300'$unnnic-color-purple-300,
|
|
55
|
+
'aux-purple-500'$unnnic-color-purple-500,
|
|
56
|
+
'aux-purple-700'$unnnic-color-purple-700,
|
|
57
|
+
'aux-purple-900'$unnnic-color-purple-900,
|
|
58
|
+
'aux-red-100'$unnnic-color-red-100,
|
|
59
|
+
'aux-red-300'$unnnic-color-red-300,
|
|
60
|
+
'aux-red-500'$unnnic-color-red-500,
|
|
61
|
+
'aux-red-700'$unnnic-color-red-700,
|
|
62
|
+
'aux-red-900'$unnnic-color-red-900,
|
|
63
|
+
'aux-orange-100'$unnnic-color-orange-100,
|
|
64
|
+
'aux-orange-300'$unnnic-color-orange-300,
|
|
65
|
+
'aux-orange-500'$unnnic-color-orange-500,
|
|
66
|
+
'aux-orange-700'$unnnic-color-orange-700,
|
|
67
|
+
'aux-orange-900'$unnnic-color-orange-900,
|
|
68
|
+
'aux-yellow-100'$unnnic-color-yellow-100,
|
|
69
|
+
'aux-yellow-300'$unnnic-color-yellow-300,
|
|
70
|
+
'aux-yellow-500'$unnnic-color-yellow-500,
|
|
71
|
+
'aux-yellow-700'$unnnic-color-yellow-700,
|
|
72
|
+
'aux-yellow-900'$unnnic-color-yellow-900,
|
|
73
|
+
|
|
74
|
+
"fg-critical"$unnnic-color-fg-critical,
|
|
75
|
+
"fg-muted"$unnnic-color-fg-muted,
|
|
76
|
+
"fg-base"$unnnic-color-fg-base,
|
|
77
|
+
|
|
78
|
+
'floweditor-blue'$unnnic-color-blue-600,
|
|
79
|
+
'floweditor-purple'$unnnic-color-purple-600,
|
|
80
|
+
'floweditor-wine'$unnnic-color-red-800,
|
|
81
|
+
'floweditor-orange'$unnnic-color-orange-600,
|
|
82
|
+
'floweditor-pink'$unnnic-color-red-400,
|
|
83
|
+
'floweditor-turquoise'$unnnic-color-teal-500,
|
|
84
|
+
'floweditor-green'$unnnic-color-green-600,
|
|
85
|
+
|
|
86
|
+
'weni-50'$unnnic-color-teal-50,
|
|
87
|
+
'weni-100'$unnnic-color-teal-100,
|
|
88
|
+
'weni-200'$unnnic-color-teal-200,
|
|
89
|
+
'weni-300'$unnnic-color-teal-300,
|
|
90
|
+
'weni-400'$unnnic-color-teal-400,
|
|
91
|
+
'weni-500'$unnnic-color-teal-500,
|
|
92
|
+
'weni-600'$unnnic-color-teal-600,
|
|
93
|
+
'weni-700'$unnnic-color-teal-700,
|
|
94
|
+
'weni-800'$unnnic-color-teal-800,
|
|
95
|
+
'weni-900'$unnnic-color-teal-900,
|
|
96
|
+
'weni-950'$unnnic-color-teal-950,
|
|
97
|
+
'brand-weni'$unnnic-color-teal-600,
|
|
98
|
+
'brand-weni-dark'$unnnic-color-teal-800,
|
|
99
|
+
'brand-weni-soft'$unnnic-color-teal-100,
|
|
100
|
+
'brand-sec-dark'$unnnic-color-blue-800,
|
|
101
|
+
'brand-sec-soft'$unnnic-color-blue-100,
|
|
102
|
+
'brand-sec'$unnnic-color-blue-600,
|
|
103
|
+
|
|
104
|
+
'bg-base'$unnnic-color-bg-base,
|
|
105
|
+
'bg-soft'$unnnic-color-bg-soft,
|
|
106
|
+
|
|
107
|
+
'teal-50'$unnnic-color-teal-50,
|
|
108
|
+
'teal-100'$unnnic-color-teal-100,
|
|
109
|
+
'teal-200'$unnnic-color-teal-200,
|
|
110
|
+
'teal-300'$unnnic-color-teal-300,
|
|
111
|
+
'teal-400'$unnnic-color-teal-400,
|
|
112
|
+
'teal-500'$unnnic-color-teal-500,
|
|
113
|
+
'teal-600'$unnnic-color-teal-600,
|
|
114
|
+
'teal-700'$unnnic-color-teal-700,
|
|
115
|
+
'teal-800'$unnnic-color-teal-800,
|
|
116
|
+
'teal-900'$unnnic-color-teal-900,
|
|
117
|
+
'teal-950'$unnnic-color-teal-950;
|
|
242
118
|
|
|
243
119
|
@mixin generate-scheme-classes($component-name, $property: 'background-color') {
|
|
244
120
|
@each $name, $color in $unnnic-scheme-colors {
|
|
@@ -250,10 +126,11 @@ $unnnic-scheme-colors:
|
|
|
250
126
|
|
|
251
127
|
@function get-scheme-color($name) {
|
|
252
128
|
@each $scheme-name, $color in $unnnic-scheme-colors {
|
|
253
|
-
@if $scheme-name
|
|
129
|
+
@if $scheme-name ==$name {
|
|
254
130
|
@return $color;
|
|
255
131
|
}
|
|
256
132
|
}
|
|
133
|
+
|
|
257
134
|
@warn "Scheme color '#{$name}' not found in $unnnic-scheme-colors";
|
|
258
135
|
@return null;
|
|
259
|
-
}
|
|
136
|
+
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`UnnnicAlert.vue > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
"<transition-stub data-v-c3231c18="" name="toast-slide" appear="true" persisted="false" css="true" icon="alert-icon" position="top-right" closetext="Close">
|
|
5
|
+
<aside data-v-c3231c18="" class="unnnic-toast unnnic-toast--informational" role="status" aria-live="polite" data-testid="unnnic-toast">
|
|
6
|
+
<section data-v-c3231c18="" class="unnnic-toast__content">
|
|
7
|
+
<header data-v-c3231c18="" class="unnnic-toast__header"><span data-v-26446d8e="" data-v-c3231c18="" class="material-symbols-rounded unnnic-icon-scheme--blue-500 unnnic-icon-size--ant" data-testid="toast-type-icon" translate="no">info</span>
|
|
8
|
+
<h3 data-v-c3231c18="" class="unnnic-toast__title">Test Alert</h3><span data-v-26446d8e="" data-v-c3231c18="" class="material-symbols-rounded unnnic-icon-scheme--neutral-dark unnnic-icon-size--ant unnnic--clickable unnnic-toast__close" data-testid="toast-close-button" translate="no">close</span>
|
|
9
|
+
</header>
|
|
10
|
+
<!--v-if-->
|
|
11
|
+
</section>
|
|
12
|
+
<!--v-if-->
|
|
13
|
+
</aside>
|
|
14
|
+
</transition-stub>"
|
|
11
15
|
`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Alert.vue > matches snapshot 1`] = `
|
|
4
|
-
"<div data-v-fb94f284="" class="alert-container">
|
|
4
|
+
"<div data-v-fb94f284="" class="alert-container" version="1.0" linkhref="https://example.com" linktarget="_blank" linktext="Learn more">
|
|
5
5
|
<div data-v-fb94f284="" class="alert alert--scheme-aux-green">
|
|
6
6
|
<div data-v-fb94f284="" class="alert__progress"></div>
|
|
7
|
-
<div data-v-fb94f284="" class="alert__text">Test Alert</div
|
|
7
|
+
<div data-v-fb94f284="" class="alert__text">Test Alert</div>
|
|
8
8
|
<div data-v-fb94f284="" class="alert__close">
|
|
9
9
|
<unnnic-icon-stub data-v-fb94f284="" filled="false" next="false" icon="close-1" clickable="false" size="sm" scheme="neutral-white"></unnnic-icon-stub>
|
|
10
10
|
</div>
|
|
@@ -71,7 +71,7 @@ const chipClass = computed(() => {
|
|
|
71
71
|
|
|
72
72
|
.chip {
|
|
73
73
|
display: inline-flex;
|
|
74
|
-
height:
|
|
74
|
+
height: 22px;
|
|
75
75
|
padding: $unnnic-space-1 $unnnic-space-3;
|
|
76
76
|
justify-content: center;
|
|
77
77
|
align-items: center;
|
|
@@ -79,6 +79,7 @@ const chipClass = computed(() => {
|
|
|
79
79
|
flex-shrink: 0;
|
|
80
80
|
border-radius: 600px;
|
|
81
81
|
background-color: $unnnic-color-bg-base;
|
|
82
|
+
border: 1px solid transparent;
|
|
82
83
|
|
|
83
84
|
&:hover {
|
|
84
85
|
background-color: $unnnic-color-bg-soft;
|
|
@@ -96,7 +97,7 @@ const chipClass = computed(() => {
|
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
&--border {
|
|
99
|
-
border:
|
|
100
|
+
border-color: $unnnic-color-border-base;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
&__text {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
{
|
|
17
17
|
'unnnic-data-table__header-cell--clickable': header.isSortable,
|
|
18
18
|
'unnnic-data-table__header-cell--sorting':
|
|
19
|
-
|
|
19
|
+
sortState.header === header.title && sortState.order !== '',
|
|
20
20
|
},
|
|
21
21
|
]"
|
|
22
22
|
@click.stop="handleClickHeader(header)"
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
<template v-if="header.isSortable">
|
|
33
33
|
<IconArrowsDefault
|
|
34
|
-
v-if="
|
|
34
|
+
v-if="sortState.header !== header.title"
|
|
35
35
|
class="order-default-icon"
|
|
36
36
|
data-testid="arrow-default-icon"
|
|
37
37
|
/>
|
|
38
38
|
<Icon
|
|
39
|
-
v-else-if="
|
|
39
|
+
v-else-if="sortState.order === 'asc'"
|
|
40
40
|
clickable
|
|
41
41
|
size="ant"
|
|
42
42
|
:icon="'switch_left'"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
data-testid="arrow-asc-icon"
|
|
45
45
|
/>
|
|
46
46
|
<Icon
|
|
47
|
-
v-else-if="
|
|
47
|
+
v-else-if="sortState.order === 'desc'"
|
|
48
48
|
clickable
|
|
49
49
|
size="ant"
|
|
50
50
|
:icon="'switch_left'"
|
|
@@ -183,6 +183,12 @@ type DataTableItem = {
|
|
|
183
183
|
[key: string]: any;
|
|
184
184
|
};
|
|
185
185
|
|
|
186
|
+
type SortState = {
|
|
187
|
+
header: string;
|
|
188
|
+
itemKey: string;
|
|
189
|
+
order: string;
|
|
190
|
+
};
|
|
191
|
+
|
|
186
192
|
interface Props {
|
|
187
193
|
headers: DataTableHeader[];
|
|
188
194
|
items: DataTableItem[];
|
|
@@ -198,6 +204,7 @@ interface Props {
|
|
|
198
204
|
pageTotal?: number;
|
|
199
205
|
pageInterval?: number;
|
|
200
206
|
locale?: string;
|
|
207
|
+
sort?: SortState;
|
|
201
208
|
}
|
|
202
209
|
|
|
203
210
|
defineOptions({
|
|
@@ -225,6 +232,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
225
232
|
pageTotal: 0,
|
|
226
233
|
pageInterval: 5,
|
|
227
234
|
locale: 'en',
|
|
235
|
+
sort: undefined,
|
|
228
236
|
});
|
|
229
237
|
|
|
230
238
|
const defaultTranslations = {
|
|
@@ -251,12 +259,16 @@ const headersItemsKeys: ComputedRef<string[]> = computed(() => {
|
|
|
251
259
|
return props.headers.map((header) => header.itemKey);
|
|
252
260
|
});
|
|
253
261
|
|
|
254
|
-
const
|
|
262
|
+
const internalSort = ref({
|
|
255
263
|
header: '',
|
|
256
264
|
itemKey: '',
|
|
257
265
|
order: '',
|
|
258
266
|
});
|
|
259
267
|
|
|
268
|
+
const sortState = computed(() => {
|
|
269
|
+
return props.sort !== undefined ? props.sort : internalSort.value;
|
|
270
|
+
});
|
|
271
|
+
|
|
260
272
|
const getHeaderColumnSize = (header: DataTableHeader): string => {
|
|
261
273
|
return typeof header.size === 'number'
|
|
262
274
|
? `${header.size || 1}fr`
|
|
@@ -271,9 +283,12 @@ const gridTemplateColumns: ComputedRef<string> = computed(() => {
|
|
|
271
283
|
return columnSizes.join(' ');
|
|
272
284
|
});
|
|
273
285
|
|
|
274
|
-
const handleSort = (header:
|
|
275
|
-
sort
|
|
276
|
-
|
|
286
|
+
const handleSort = (header: SortState, order: string) => {
|
|
287
|
+
if (props.sort === undefined) {
|
|
288
|
+
internalSort.value = { ...header, order };
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
emit('update:sort', { ...header, order });
|
|
277
292
|
};
|
|
278
293
|
|
|
279
294
|
const handleClickHeader = (header: DataTableHeader) => {
|
|
@@ -286,9 +301,9 @@ const handleClickHeader = (header: DataTableHeader) => {
|
|
|
286
301
|
};
|
|
287
302
|
|
|
288
303
|
const nextSort =
|
|
289
|
-
header.title !==
|
|
304
|
+
header.title !== sortState.value.header
|
|
290
305
|
? 'asc'
|
|
291
|
-
: nextSortOrderMapper[
|
|
306
|
+
: nextSortOrderMapper[sortState.value.order];
|
|
292
307
|
|
|
293
308
|
handleSort(
|
|
294
309
|
nextSort === ''
|
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
v-mask="mask"
|
|
5
5
|
v-bind="attributes"
|
|
6
6
|
:value="fullySanitize(modelValue)"
|
|
7
|
-
:class="classes"
|
|
7
|
+
:class="[classes, { focus: forceActiveStatus }]"
|
|
8
8
|
:type="nativeType"
|
|
9
|
+
:readonly="readonly"
|
|
9
10
|
/>
|
|
10
11
|
<input
|
|
11
12
|
v-else
|
|
12
13
|
v-bind="attributes"
|
|
13
14
|
:value="fullySanitize(modelValue)"
|
|
14
|
-
:class="classes"
|
|
15
|
+
:class="[classes, { focus: forceActiveStatus }]"
|
|
15
16
|
:type="nativeType"
|
|
16
17
|
:maxlength="maxlength"
|
|
18
|
+
:readonly="readonly"
|
|
17
19
|
/>
|
|
18
20
|
</template>
|
|
19
21
|
|
|
@@ -49,10 +51,19 @@ export default {
|
|
|
49
51
|
},
|
|
50
52
|
hasIconLeft: Boolean,
|
|
51
53
|
hasIconRight: Boolean,
|
|
54
|
+
hasClearIcon: Boolean,
|
|
52
55
|
maxlength: {
|
|
53
56
|
type: Number,
|
|
54
57
|
default: null,
|
|
55
58
|
},
|
|
59
|
+
readonly: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
forceActiveStatus: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
56
67
|
},
|
|
57
68
|
emits: ['update:modelValue'],
|
|
58
69
|
data() {
|
|
@@ -77,6 +88,7 @@ export default {
|
|
|
77
88
|
{
|
|
78
89
|
'input--has-icon-left': this.hasIconLeft,
|
|
79
90
|
'input--has-icon-right': this.hasIconRight,
|
|
91
|
+
'input--has-clear-icon': this.hasClearIcon,
|
|
80
92
|
},
|
|
81
93
|
];
|
|
82
94
|
},
|
|
@@ -115,6 +127,13 @@ export default {
|
|
|
115
127
|
|
|
116
128
|
&.input--has-icon-right {
|
|
117
129
|
padding-right: $unnnic-space-10;
|
|
130
|
+
&.input--has-clear-icon {
|
|
131
|
+
padding-right: $unnnic-space-10 + $unnnic-space-6;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.input--has-clear-icon {
|
|
136
|
+
padding-right: $unnnic-space-10;
|
|
118
137
|
}
|
|
119
138
|
|
|
120
139
|
&.error {
|