@m3ui-vue/m3ui-vue 0.2.1 → 0.2.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/dist/locales/index.js +489 -0
- package/dist/locales/index.js.map +1 -0
- package/package.json +6 -1
- package/src/__tests__/MAlert.test.ts +59 -0
- package/src/__tests__/MConfirmDialog.test.ts +51 -0
- package/src/__tests__/MDialog.test.ts +58 -0
- package/src/__tests__/MSpinner.test.ts +37 -0
- package/src/__tests__/localePresets.test.ts +45 -0
- package/src/__tests__/plugin.test.ts +27 -0
- package/src/__tests__/setup.ts +11 -0
- package/src/__tests__/useColorPalette.test.ts +71 -0
- package/src/__tests__/useLocale.test.ts +50 -0
- package/src/__tests__/useTheme.test.ts +61 -0
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
//#region src/locales/es.ts
|
|
2
|
+
var e = {
|
|
3
|
+
search: "Buscar...",
|
|
4
|
+
noResults: "Sin resultados",
|
|
5
|
+
close: "Cerrar",
|
|
6
|
+
cancel: "Cancelar",
|
|
7
|
+
confirm: "Confirmar",
|
|
8
|
+
loading: "Cargando",
|
|
9
|
+
previous: "Anterior",
|
|
10
|
+
next: "Siguiente",
|
|
11
|
+
today: "Hoy",
|
|
12
|
+
more: "más",
|
|
13
|
+
selectedCount: "seleccionados",
|
|
14
|
+
recordCount: "registro",
|
|
15
|
+
expand: "Expandir",
|
|
16
|
+
columns: "Columnas",
|
|
17
|
+
exportCsv: "Exportar CSV",
|
|
18
|
+
noGroup: "Sin grupo",
|
|
19
|
+
finish: "Finalizar",
|
|
20
|
+
dropText: "Arrastra archivos aquí o",
|
|
21
|
+
selectText: "explorar",
|
|
22
|
+
maxSizePrefix: "Máx.",
|
|
23
|
+
remove: "Eliminar",
|
|
24
|
+
selectDate: "Seleccionar fecha",
|
|
25
|
+
selectTime: "Seleccionar hora",
|
|
26
|
+
selectRange: "Seleccionar rango",
|
|
27
|
+
pickStart: "Seleccionar inicio",
|
|
28
|
+
pickEnd: "Seleccionar fin",
|
|
29
|
+
previousMonth: "Mes anterior",
|
|
30
|
+
nextMonth: "Mes siguiente",
|
|
31
|
+
dayView: "Día",
|
|
32
|
+
weekView: "Semana",
|
|
33
|
+
available: "Disponibles",
|
|
34
|
+
selected: "Seleccionados",
|
|
35
|
+
noItems: "Sin elementos",
|
|
36
|
+
moveAllRight: "Mover todos a la derecha",
|
|
37
|
+
moveRight: "Mover seleccionados a la derecha",
|
|
38
|
+
moveLeft: "Mover seleccionados a la izquierda",
|
|
39
|
+
moveAllLeft: "Mover todos a la izquierda",
|
|
40
|
+
searchCommand: "Buscar comando...",
|
|
41
|
+
navigateHint: "navegar",
|
|
42
|
+
selectHint: "seleccionar",
|
|
43
|
+
openHint: "abrir",
|
|
44
|
+
closeHint: "cerrar",
|
|
45
|
+
loadingMore: "Cargando...",
|
|
46
|
+
noMoreItems: "No hay más elementos",
|
|
47
|
+
bold: "Negrita",
|
|
48
|
+
italic: "Cursiva",
|
|
49
|
+
underline: "Subrayado",
|
|
50
|
+
strikethrough: "Tachado",
|
|
51
|
+
highlight: "Resaltar",
|
|
52
|
+
bulletList: "Lista con viñetas",
|
|
53
|
+
orderedList: "Lista ordenada",
|
|
54
|
+
blockquote: "Cita",
|
|
55
|
+
code: "Código",
|
|
56
|
+
alignLeft: "Alinear a la izquierda",
|
|
57
|
+
alignCenter: "Centrar",
|
|
58
|
+
alignRight: "Alinear a la derecha",
|
|
59
|
+
undo: "Deshacer",
|
|
60
|
+
redo: "Rehacer",
|
|
61
|
+
link: "Enlace",
|
|
62
|
+
image: "Imagen",
|
|
63
|
+
paragraph: "Párrafo",
|
|
64
|
+
heading1: "Encabezado 1",
|
|
65
|
+
heading2: "Encabezado 2",
|
|
66
|
+
heading3: "Encabezado 3",
|
|
67
|
+
insertLink: "Insertar enlace",
|
|
68
|
+
insertImage: "Insertar imagen",
|
|
69
|
+
imageUrlLabel: "URL de la imagen",
|
|
70
|
+
insert: "Insertar"
|
|
71
|
+
}, t = {
|
|
72
|
+
search: "Rechercher...",
|
|
73
|
+
noResults: "Aucun résultat",
|
|
74
|
+
close: "Fermer",
|
|
75
|
+
cancel: "Annuler",
|
|
76
|
+
confirm: "Confirmer",
|
|
77
|
+
loading: "Chargement",
|
|
78
|
+
previous: "Précédent",
|
|
79
|
+
next: "Suivant",
|
|
80
|
+
today: "Aujourd'hui",
|
|
81
|
+
more: "plus",
|
|
82
|
+
selectedCount: "sélectionnés",
|
|
83
|
+
recordCount: "enregistrement",
|
|
84
|
+
expand: "Développer",
|
|
85
|
+
columns: "Colonnes",
|
|
86
|
+
exportCsv: "Exporter CSV",
|
|
87
|
+
noGroup: "Sans groupe",
|
|
88
|
+
finish: "Terminer",
|
|
89
|
+
dropText: "Déposez les fichiers ici ou",
|
|
90
|
+
selectText: "parcourir",
|
|
91
|
+
maxSizePrefix: "Max.",
|
|
92
|
+
remove: "Supprimer",
|
|
93
|
+
selectDate: "Sélectionner la date",
|
|
94
|
+
selectTime: "Sélectionner l'heure",
|
|
95
|
+
selectRange: "Sélectionner la plage",
|
|
96
|
+
pickStart: "Sélectionner le début",
|
|
97
|
+
pickEnd: "Sélectionner la fin",
|
|
98
|
+
previousMonth: "Mois précédent",
|
|
99
|
+
nextMonth: "Mois suivant",
|
|
100
|
+
dayView: "Jour",
|
|
101
|
+
weekView: "Semaine",
|
|
102
|
+
available: "Disponibles",
|
|
103
|
+
selected: "Sélectionnés",
|
|
104
|
+
noItems: "Aucun élément",
|
|
105
|
+
moveAllRight: "Tout déplacer à droite",
|
|
106
|
+
moveRight: "Déplacer la sélection à droite",
|
|
107
|
+
moveLeft: "Déplacer la sélection à gauche",
|
|
108
|
+
moveAllLeft: "Tout déplacer à gauche",
|
|
109
|
+
searchCommand: "Rechercher une commande...",
|
|
110
|
+
navigateHint: "naviguer",
|
|
111
|
+
selectHint: "sélectionner",
|
|
112
|
+
openHint: "ouvrir",
|
|
113
|
+
closeHint: "fermer",
|
|
114
|
+
loadingMore: "Chargement...",
|
|
115
|
+
noMoreItems: "Plus d'éléments",
|
|
116
|
+
bold: "Gras",
|
|
117
|
+
italic: "Italique",
|
|
118
|
+
underline: "Souligné",
|
|
119
|
+
strikethrough: "Barré",
|
|
120
|
+
highlight: "Surligner",
|
|
121
|
+
bulletList: "Liste à puces",
|
|
122
|
+
orderedList: "Liste numérotée",
|
|
123
|
+
blockquote: "Citation",
|
|
124
|
+
code: "Code",
|
|
125
|
+
alignLeft: "Aligner à gauche",
|
|
126
|
+
alignCenter: "Centrer",
|
|
127
|
+
alignRight: "Aligner à droite",
|
|
128
|
+
undo: "Annuler",
|
|
129
|
+
redo: "Rétablir",
|
|
130
|
+
link: "Lien",
|
|
131
|
+
image: "Image",
|
|
132
|
+
paragraph: "Paragraphe",
|
|
133
|
+
heading1: "Titre 1",
|
|
134
|
+
heading2: "Titre 2",
|
|
135
|
+
heading3: "Titre 3",
|
|
136
|
+
insertLink: "Insérer un lien",
|
|
137
|
+
insertImage: "Insérer une image",
|
|
138
|
+
imageUrlLabel: "URL de l'image",
|
|
139
|
+
insert: "Insérer"
|
|
140
|
+
}, n = {
|
|
141
|
+
search: "Pesquisar...",
|
|
142
|
+
noResults: "Sem resultados",
|
|
143
|
+
close: "Fechar",
|
|
144
|
+
cancel: "Cancelar",
|
|
145
|
+
confirm: "Confirmar",
|
|
146
|
+
loading: "Carregando",
|
|
147
|
+
previous: "Anterior",
|
|
148
|
+
next: "Próximo",
|
|
149
|
+
today: "Hoje",
|
|
150
|
+
more: "mais",
|
|
151
|
+
selectedCount: "selecionados",
|
|
152
|
+
recordCount: "registro",
|
|
153
|
+
expand: "Expandir",
|
|
154
|
+
columns: "Colunas",
|
|
155
|
+
exportCsv: "Exportar CSV",
|
|
156
|
+
noGroup: "Sem grupo",
|
|
157
|
+
finish: "Finalizar",
|
|
158
|
+
dropText: "Arraste arquivos aqui ou",
|
|
159
|
+
selectText: "procurar",
|
|
160
|
+
maxSizePrefix: "Máx.",
|
|
161
|
+
remove: "Remover",
|
|
162
|
+
selectDate: "Selecionar data",
|
|
163
|
+
selectTime: "Selecionar hora",
|
|
164
|
+
selectRange: "Selecionar intervalo",
|
|
165
|
+
pickStart: "Selecionar início",
|
|
166
|
+
pickEnd: "Selecionar fim",
|
|
167
|
+
previousMonth: "Mês anterior",
|
|
168
|
+
nextMonth: "Próximo mês",
|
|
169
|
+
dayView: "Dia",
|
|
170
|
+
weekView: "Semana",
|
|
171
|
+
available: "Disponíveis",
|
|
172
|
+
selected: "Selecionados",
|
|
173
|
+
noItems: "Sem itens",
|
|
174
|
+
moveAllRight: "Mover todos para a direita",
|
|
175
|
+
moveRight: "Mover selecionados para a direita",
|
|
176
|
+
moveLeft: "Mover selecionados para a esquerda",
|
|
177
|
+
moveAllLeft: "Mover todos para a esquerda",
|
|
178
|
+
searchCommand: "Pesquisar comando...",
|
|
179
|
+
navigateHint: "navegar",
|
|
180
|
+
selectHint: "selecionar",
|
|
181
|
+
openHint: "abrir",
|
|
182
|
+
closeHint: "fechar",
|
|
183
|
+
loadingMore: "Carregando...",
|
|
184
|
+
noMoreItems: "Não há mais itens",
|
|
185
|
+
bold: "Negrito",
|
|
186
|
+
italic: "Itálico",
|
|
187
|
+
underline: "Sublinhado",
|
|
188
|
+
strikethrough: "Tachado",
|
|
189
|
+
highlight: "Realçar",
|
|
190
|
+
bulletList: "Lista com marcadores",
|
|
191
|
+
orderedList: "Lista ordenada",
|
|
192
|
+
blockquote: "Citação",
|
|
193
|
+
code: "Código",
|
|
194
|
+
alignLeft: "Alinhar à esquerda",
|
|
195
|
+
alignCenter: "Centralizar",
|
|
196
|
+
alignRight: "Alinhar à direita",
|
|
197
|
+
undo: "Desfazer",
|
|
198
|
+
redo: "Refazer",
|
|
199
|
+
link: "Link",
|
|
200
|
+
image: "Imagem",
|
|
201
|
+
paragraph: "Parágrafo",
|
|
202
|
+
heading1: "Título 1",
|
|
203
|
+
heading2: "Título 2",
|
|
204
|
+
heading3: "Título 3",
|
|
205
|
+
insertLink: "Inserir link",
|
|
206
|
+
insertImage: "Inserir imagem",
|
|
207
|
+
imageUrlLabel: "URL da imagem",
|
|
208
|
+
insert: "Inserir"
|
|
209
|
+
}, r = {
|
|
210
|
+
search: "Suchen...",
|
|
211
|
+
noResults: "Keine Ergebnisse",
|
|
212
|
+
close: "Schließen",
|
|
213
|
+
cancel: "Abbrechen",
|
|
214
|
+
confirm: "Bestätigen",
|
|
215
|
+
loading: "Laden",
|
|
216
|
+
previous: "Zurück",
|
|
217
|
+
next: "Weiter",
|
|
218
|
+
today: "Heute",
|
|
219
|
+
more: "mehr",
|
|
220
|
+
selectedCount: "ausgewählt",
|
|
221
|
+
recordCount: "Datensatz",
|
|
222
|
+
expand: "Erweitern",
|
|
223
|
+
columns: "Spalten",
|
|
224
|
+
exportCsv: "CSV exportieren",
|
|
225
|
+
noGroup: "Keine Gruppe",
|
|
226
|
+
finish: "Fertig",
|
|
227
|
+
dropText: "Dateien hierher ziehen oder",
|
|
228
|
+
selectText: "durchsuchen",
|
|
229
|
+
maxSizePrefix: "Max.",
|
|
230
|
+
remove: "Entfernen",
|
|
231
|
+
selectDate: "Datum auswählen",
|
|
232
|
+
selectTime: "Uhrzeit auswählen",
|
|
233
|
+
selectRange: "Bereich auswählen",
|
|
234
|
+
pickStart: "Anfang auswählen",
|
|
235
|
+
pickEnd: "Ende auswählen",
|
|
236
|
+
previousMonth: "Vorheriger Monat",
|
|
237
|
+
nextMonth: "Nächster Monat",
|
|
238
|
+
dayView: "Tag",
|
|
239
|
+
weekView: "Woche",
|
|
240
|
+
available: "Verfügbar",
|
|
241
|
+
selected: "Ausgewählt",
|
|
242
|
+
noItems: "Keine Elemente",
|
|
243
|
+
moveAllRight: "Alle nach rechts verschieben",
|
|
244
|
+
moveRight: "Auswahl nach rechts verschieben",
|
|
245
|
+
moveLeft: "Auswahl nach links verschieben",
|
|
246
|
+
moveAllLeft: "Alle nach links verschieben",
|
|
247
|
+
searchCommand: "Befehl suchen...",
|
|
248
|
+
navigateHint: "navigieren",
|
|
249
|
+
selectHint: "auswählen",
|
|
250
|
+
openHint: "öffnen",
|
|
251
|
+
closeHint: "schließen",
|
|
252
|
+
loadingMore: "Laden...",
|
|
253
|
+
noMoreItems: "Keine weiteren Elemente",
|
|
254
|
+
bold: "Fett",
|
|
255
|
+
italic: "Kursiv",
|
|
256
|
+
underline: "Unterstrichen",
|
|
257
|
+
strikethrough: "Durchgestrichen",
|
|
258
|
+
highlight: "Hervorheben",
|
|
259
|
+
bulletList: "Aufzählungsliste",
|
|
260
|
+
orderedList: "Nummerierte Liste",
|
|
261
|
+
blockquote: "Zitat",
|
|
262
|
+
code: "Code",
|
|
263
|
+
alignLeft: "Linksbündig",
|
|
264
|
+
alignCenter: "Zentriert",
|
|
265
|
+
alignRight: "Rechtsbündig",
|
|
266
|
+
undo: "Rückgängig",
|
|
267
|
+
redo: "Wiederholen",
|
|
268
|
+
link: "Link",
|
|
269
|
+
image: "Bild",
|
|
270
|
+
paragraph: "Absatz",
|
|
271
|
+
heading1: "Überschrift 1",
|
|
272
|
+
heading2: "Überschrift 2",
|
|
273
|
+
heading3: "Überschrift 3",
|
|
274
|
+
insertLink: "Link einfügen",
|
|
275
|
+
insertImage: "Bild einfügen",
|
|
276
|
+
imageUrlLabel: "Bild-URL",
|
|
277
|
+
insert: "Einfügen"
|
|
278
|
+
}, i = {
|
|
279
|
+
search: "検索...",
|
|
280
|
+
noResults: "結果なし",
|
|
281
|
+
close: "閉じる",
|
|
282
|
+
cancel: "キャンセル",
|
|
283
|
+
confirm: "確認",
|
|
284
|
+
loading: "読み込み中",
|
|
285
|
+
previous: "前へ",
|
|
286
|
+
next: "次へ",
|
|
287
|
+
today: "今日",
|
|
288
|
+
more: "件",
|
|
289
|
+
selectedCount: "件選択中",
|
|
290
|
+
recordCount: "件",
|
|
291
|
+
expand: "展開",
|
|
292
|
+
columns: "列",
|
|
293
|
+
exportCsv: "CSV エクスポート",
|
|
294
|
+
noGroup: "グループなし",
|
|
295
|
+
finish: "完了",
|
|
296
|
+
dropText: "ここにファイルをドロップ、または",
|
|
297
|
+
selectText: "参照",
|
|
298
|
+
maxSizePrefix: "最大",
|
|
299
|
+
remove: "削除",
|
|
300
|
+
selectDate: "日付を選択",
|
|
301
|
+
selectTime: "時刻を選択",
|
|
302
|
+
selectRange: "範囲を選択",
|
|
303
|
+
pickStart: "開始を選択",
|
|
304
|
+
pickEnd: "終了を選択",
|
|
305
|
+
previousMonth: "前月",
|
|
306
|
+
nextMonth: "翌月",
|
|
307
|
+
dayView: "日",
|
|
308
|
+
weekView: "週",
|
|
309
|
+
available: "利用可能",
|
|
310
|
+
selected: "選択済み",
|
|
311
|
+
noItems: "項目なし",
|
|
312
|
+
moveAllRight: "すべて右へ移動",
|
|
313
|
+
moveRight: "選択項目を右へ移動",
|
|
314
|
+
moveLeft: "選択項目を左へ移動",
|
|
315
|
+
moveAllLeft: "すべて左へ移動",
|
|
316
|
+
searchCommand: "コマンドを検索...",
|
|
317
|
+
navigateHint: "移動",
|
|
318
|
+
selectHint: "選択",
|
|
319
|
+
openHint: "開く",
|
|
320
|
+
closeHint: "閉じる",
|
|
321
|
+
loadingMore: "読み込み中...",
|
|
322
|
+
noMoreItems: "これ以上の項目はありません",
|
|
323
|
+
bold: "太字",
|
|
324
|
+
italic: "斜体",
|
|
325
|
+
underline: "下線",
|
|
326
|
+
strikethrough: "取り消し線",
|
|
327
|
+
highlight: "ハイライト",
|
|
328
|
+
bulletList: "箇条書きリスト",
|
|
329
|
+
orderedList: "番号付きリスト",
|
|
330
|
+
blockquote: "引用",
|
|
331
|
+
code: "コード",
|
|
332
|
+
alignLeft: "左揃え",
|
|
333
|
+
alignCenter: "中央揃え",
|
|
334
|
+
alignRight: "右揃え",
|
|
335
|
+
undo: "元に戻す",
|
|
336
|
+
redo: "やり直し",
|
|
337
|
+
link: "リンク",
|
|
338
|
+
image: "画像",
|
|
339
|
+
paragraph: "段落",
|
|
340
|
+
heading1: "見出し 1",
|
|
341
|
+
heading2: "見出し 2",
|
|
342
|
+
heading3: "見出し 3",
|
|
343
|
+
insertLink: "リンクを挿入",
|
|
344
|
+
insertImage: "画像を挿入",
|
|
345
|
+
imageUrlLabel: "画像 URL",
|
|
346
|
+
insert: "挿入"
|
|
347
|
+
}, a = {
|
|
348
|
+
search: "搜索...",
|
|
349
|
+
noResults: "无结果",
|
|
350
|
+
close: "关闭",
|
|
351
|
+
cancel: "取消",
|
|
352
|
+
confirm: "确认",
|
|
353
|
+
loading: "加载中",
|
|
354
|
+
previous: "上一个",
|
|
355
|
+
next: "下一个",
|
|
356
|
+
today: "今天",
|
|
357
|
+
more: "更多",
|
|
358
|
+
selectedCount: "已选择",
|
|
359
|
+
recordCount: "条记录",
|
|
360
|
+
expand: "展开",
|
|
361
|
+
columns: "列",
|
|
362
|
+
exportCsv: "导出 CSV",
|
|
363
|
+
noGroup: "无分组",
|
|
364
|
+
finish: "完成",
|
|
365
|
+
dropText: "将文件拖放到此处或",
|
|
366
|
+
selectText: "浏览",
|
|
367
|
+
maxSizePrefix: "最大",
|
|
368
|
+
remove: "移除",
|
|
369
|
+
selectDate: "选择日期",
|
|
370
|
+
selectTime: "选择时间",
|
|
371
|
+
selectRange: "选择范围",
|
|
372
|
+
pickStart: "选择开始",
|
|
373
|
+
pickEnd: "选择结束",
|
|
374
|
+
previousMonth: "上个月",
|
|
375
|
+
nextMonth: "下个月",
|
|
376
|
+
dayView: "日",
|
|
377
|
+
weekView: "周",
|
|
378
|
+
available: "可用",
|
|
379
|
+
selected: "已选",
|
|
380
|
+
noItems: "无项目",
|
|
381
|
+
moveAllRight: "全部移至右侧",
|
|
382
|
+
moveRight: "将选中项移至右侧",
|
|
383
|
+
moveLeft: "将选中项移至左侧",
|
|
384
|
+
moveAllLeft: "全部移至左侧",
|
|
385
|
+
searchCommand: "搜索命令...",
|
|
386
|
+
navigateHint: "导航",
|
|
387
|
+
selectHint: "选择",
|
|
388
|
+
openHint: "打开",
|
|
389
|
+
closeHint: "关闭",
|
|
390
|
+
loadingMore: "加载中...",
|
|
391
|
+
noMoreItems: "没有更多项目",
|
|
392
|
+
bold: "粗体",
|
|
393
|
+
italic: "斜体",
|
|
394
|
+
underline: "下划线",
|
|
395
|
+
strikethrough: "删除线",
|
|
396
|
+
highlight: "高亮",
|
|
397
|
+
bulletList: "无序列表",
|
|
398
|
+
orderedList: "有序列表",
|
|
399
|
+
blockquote: "引用",
|
|
400
|
+
code: "代码",
|
|
401
|
+
alignLeft: "左对齐",
|
|
402
|
+
alignCenter: "居中对齐",
|
|
403
|
+
alignRight: "右对齐",
|
|
404
|
+
undo: "撤销",
|
|
405
|
+
redo: "重做",
|
|
406
|
+
link: "链接",
|
|
407
|
+
image: "图片",
|
|
408
|
+
paragraph: "段落",
|
|
409
|
+
heading1: "标题 1",
|
|
410
|
+
heading2: "标题 2",
|
|
411
|
+
heading3: "标题 3",
|
|
412
|
+
insertLink: "插入链接",
|
|
413
|
+
insertImage: "插入图片",
|
|
414
|
+
imageUrlLabel: "图片 URL",
|
|
415
|
+
insert: "插入"
|
|
416
|
+
}, o = {
|
|
417
|
+
search: "검색...",
|
|
418
|
+
noResults: "결과 없음",
|
|
419
|
+
close: "닫기",
|
|
420
|
+
cancel: "취소",
|
|
421
|
+
confirm: "확인",
|
|
422
|
+
loading: "로딩 중",
|
|
423
|
+
previous: "이전",
|
|
424
|
+
next: "다음",
|
|
425
|
+
today: "오늘",
|
|
426
|
+
more: "더보기",
|
|
427
|
+
selectedCount: "선택됨",
|
|
428
|
+
recordCount: "개 레코드",
|
|
429
|
+
expand: "펼치기",
|
|
430
|
+
columns: "열",
|
|
431
|
+
exportCsv: "CSV 내보내기",
|
|
432
|
+
noGroup: "그룹 없음",
|
|
433
|
+
finish: "완료",
|
|
434
|
+
dropText: "여기에 파일을 놓거나",
|
|
435
|
+
selectText: "찾아보기",
|
|
436
|
+
maxSizePrefix: "최대",
|
|
437
|
+
remove: "삭제",
|
|
438
|
+
selectDate: "날짜 선택",
|
|
439
|
+
selectTime: "시간 선택",
|
|
440
|
+
selectRange: "범위 선택",
|
|
441
|
+
pickStart: "시작 선택",
|
|
442
|
+
pickEnd: "종료 선택",
|
|
443
|
+
previousMonth: "이전 달",
|
|
444
|
+
nextMonth: "다음 달",
|
|
445
|
+
dayView: "일",
|
|
446
|
+
weekView: "주",
|
|
447
|
+
available: "사용 가능",
|
|
448
|
+
selected: "선택됨",
|
|
449
|
+
noItems: "항목 없음",
|
|
450
|
+
moveAllRight: "모두 오른쪽으로 이동",
|
|
451
|
+
moveRight: "선택 항목 오른쪽으로 이동",
|
|
452
|
+
moveLeft: "선택 항목 왼쪽으로 이동",
|
|
453
|
+
moveAllLeft: "모두 왼쪽으로 이동",
|
|
454
|
+
searchCommand: "명령 검색...",
|
|
455
|
+
navigateHint: "탐색",
|
|
456
|
+
selectHint: "선택",
|
|
457
|
+
openHint: "열기",
|
|
458
|
+
closeHint: "닫기",
|
|
459
|
+
loadingMore: "로딩 중...",
|
|
460
|
+
noMoreItems: "더 이상 항목이 없습니다",
|
|
461
|
+
bold: "굵게",
|
|
462
|
+
italic: "기울임꼴",
|
|
463
|
+
underline: "밑줄",
|
|
464
|
+
strikethrough: "취소선",
|
|
465
|
+
highlight: "강조",
|
|
466
|
+
bulletList: "글머리 기호 목록",
|
|
467
|
+
orderedList: "번호 매기기 목록",
|
|
468
|
+
blockquote: "인용",
|
|
469
|
+
code: "코드",
|
|
470
|
+
alignLeft: "왼쪽 정렬",
|
|
471
|
+
alignCenter: "가운데 정렬",
|
|
472
|
+
alignRight: "오른쪽 정렬",
|
|
473
|
+
undo: "실행 취소",
|
|
474
|
+
redo: "다시 실행",
|
|
475
|
+
link: "링크",
|
|
476
|
+
image: "이미지",
|
|
477
|
+
paragraph: "문단",
|
|
478
|
+
heading1: "제목 1",
|
|
479
|
+
heading2: "제목 2",
|
|
480
|
+
heading3: "제목 3",
|
|
481
|
+
insertLink: "링크 삽입",
|
|
482
|
+
insertImage: "이미지 삽입",
|
|
483
|
+
imageUrlLabel: "이미지 URL",
|
|
484
|
+
insert: "삽입"
|
|
485
|
+
};
|
|
486
|
+
//#endregion
|
|
487
|
+
export { r as deLocale, e as esLocale, t as frLocale, i as jaLocale, o as koLocale, n as ptLocale, a as zhLocale };
|
|
488
|
+
|
|
489
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/locales/es.ts","../../src/locales/fr.ts","../../src/locales/pt.ts","../../src/locales/de.ts","../../src/locales/ja.ts","../../src/locales/zh.ts","../../src/locales/ko.ts"],"sourcesContent":["import type { M3Locale } from '../composables/useLocale'\n\nexport const esLocale: M3Locale = {\n // Common\n search: 'Buscar...',\n noResults: 'Sin resultados',\n close: 'Cerrar',\n cancel: 'Cancelar',\n confirm: 'Confirmar',\n loading: 'Cargando',\n\n // Navigation\n previous: 'Anterior',\n next: 'Siguiente',\n today: 'Hoy',\n more: 'más',\n\n // Tables\n selectedCount: 'seleccionados',\n recordCount: 'registro',\n expand: 'Expandir',\n columns: 'Columnas',\n exportCsv: 'Exportar CSV',\n noGroup: 'Sin grupo',\n\n // Tour\n finish: 'Finalizar',\n\n // File upload\n dropText: 'Arrastra archivos aquí o',\n selectText: 'explorar',\n maxSizePrefix: 'Máx.',\n remove: 'Eliminar',\n\n // Pickers\n selectDate: 'Seleccionar fecha',\n selectTime: 'Seleccionar hora',\n selectRange: 'Seleccionar rango',\n pickStart: 'Seleccionar inicio',\n pickEnd: 'Seleccionar fin',\n previousMonth: 'Mes anterior',\n nextMonth: 'Mes siguiente',\n\n // Scheduler\n dayView: 'Día',\n weekView: 'Semana',\n\n // Transfer list\n available: 'Disponibles',\n selected: 'Seleccionados',\n noItems: 'Sin elementos',\n moveAllRight: 'Mover todos a la derecha',\n moveRight: 'Mover seleccionados a la derecha',\n moveLeft: 'Mover seleccionados a la izquierda',\n moveAllLeft: 'Mover todos a la izquierda',\n\n // Command palette / Spotlight\n searchCommand: 'Buscar comando...',\n navigateHint: 'navegar',\n selectHint: 'seleccionar',\n openHint: 'abrir',\n closeHint: 'cerrar',\n\n // Infinite scroll\n loadingMore: 'Cargando...',\n noMoreItems: 'No hay más elementos',\n\n // Rich text editor\n bold: 'Negrita',\n italic: 'Cursiva',\n underline: 'Subrayado',\n strikethrough: 'Tachado',\n highlight: 'Resaltar',\n bulletList: 'Lista con viñetas',\n orderedList: 'Lista ordenada',\n blockquote: 'Cita',\n code: 'Código',\n alignLeft: 'Alinear a la izquierda',\n alignCenter: 'Centrar',\n alignRight: 'Alinear a la derecha',\n undo: 'Deshacer',\n redo: 'Rehacer',\n link: 'Enlace',\n image: 'Imagen',\n paragraph: 'Párrafo',\n heading1: 'Encabezado 1',\n heading2: 'Encabezado 2',\n heading3: 'Encabezado 3',\n insertLink: 'Insertar enlace',\n insertImage: 'Insertar imagen',\n imageUrlLabel: 'URL de la imagen',\n insert: 'Insertar',\n}\n","import type { M3Locale } from '../composables/useLocale'\n\nexport const frLocale: M3Locale = {\n // Common\n search: 'Rechercher...',\n noResults: 'Aucun résultat',\n close: 'Fermer',\n cancel: 'Annuler',\n confirm: 'Confirmer',\n loading: 'Chargement',\n\n // Navigation\n previous: 'Précédent',\n next: 'Suivant',\n today: \"Aujourd'hui\",\n more: 'plus',\n\n // Tables\n selectedCount: 'sélectionnés',\n recordCount: 'enregistrement',\n expand: 'Développer',\n columns: 'Colonnes',\n exportCsv: 'Exporter CSV',\n noGroup: 'Sans groupe',\n\n // Tour\n finish: 'Terminer',\n\n // File upload\n dropText: 'Déposez les fichiers ici ou',\n selectText: 'parcourir',\n maxSizePrefix: 'Max.',\n remove: 'Supprimer',\n\n // Pickers\n selectDate: 'Sélectionner la date',\n selectTime: \"Sélectionner l'heure\",\n selectRange: 'Sélectionner la plage',\n pickStart: 'Sélectionner le début',\n pickEnd: 'Sélectionner la fin',\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n\n // Scheduler\n dayView: 'Jour',\n weekView: 'Semaine',\n\n // Transfer list\n available: 'Disponibles',\n selected: 'Sélectionnés',\n noItems: 'Aucun élément',\n moveAllRight: 'Tout déplacer à droite',\n moveRight: 'Déplacer la sélection à droite',\n moveLeft: 'Déplacer la sélection à gauche',\n moveAllLeft: 'Tout déplacer à gauche',\n\n // Command palette / Spotlight\n searchCommand: 'Rechercher une commande...',\n navigateHint: 'naviguer',\n selectHint: 'sélectionner',\n openHint: 'ouvrir',\n closeHint: 'fermer',\n\n // Infinite scroll\n loadingMore: 'Chargement...',\n noMoreItems: \"Plus d'éléments\",\n\n // Rich text editor\n bold: 'Gras',\n italic: 'Italique',\n underline: 'Souligné',\n strikethrough: 'Barré',\n highlight: 'Surligner',\n bulletList: 'Liste à puces',\n orderedList: 'Liste numérotée',\n blockquote: 'Citation',\n code: 'Code',\n alignLeft: 'Aligner à gauche',\n alignCenter: 'Centrer',\n alignRight: 'Aligner à droite',\n undo: 'Annuler',\n redo: 'Rétablir',\n link: 'Lien',\n image: 'Image',\n paragraph: 'Paragraphe',\n heading1: 'Titre 1',\n heading2: 'Titre 2',\n heading3: 'Titre 3',\n insertLink: 'Insérer un lien',\n insertImage: 'Insérer une image',\n imageUrlLabel: \"URL de l'image\",\n insert: 'Insérer',\n}\n","import type { M3Locale } from '../composables/useLocale'\n\nexport const ptLocale: M3Locale = {\n // Common\n search: 'Pesquisar...',\n noResults: 'Sem resultados',\n close: 'Fechar',\n cancel: 'Cancelar',\n confirm: 'Confirmar',\n loading: 'Carregando',\n\n // Navigation\n previous: 'Anterior',\n next: 'Próximo',\n today: 'Hoje',\n more: 'mais',\n\n // Tables\n selectedCount: 'selecionados',\n recordCount: 'registro',\n expand: 'Expandir',\n columns: 'Colunas',\n exportCsv: 'Exportar CSV',\n noGroup: 'Sem grupo',\n\n // Tour\n finish: 'Finalizar',\n\n // File upload\n dropText: 'Arraste arquivos aqui ou',\n selectText: 'procurar',\n maxSizePrefix: 'Máx.',\n remove: 'Remover',\n\n // Pickers\n selectDate: 'Selecionar data',\n selectTime: 'Selecionar hora',\n selectRange: 'Selecionar intervalo',\n pickStart: 'Selecionar início',\n pickEnd: 'Selecionar fim',\n previousMonth: 'Mês anterior',\n nextMonth: 'Próximo mês',\n\n // Scheduler\n dayView: 'Dia',\n weekView: 'Semana',\n\n // Transfer list\n available: 'Disponíveis',\n selected: 'Selecionados',\n noItems: 'Sem itens',\n moveAllRight: 'Mover todos para a direita',\n moveRight: 'Mover selecionados para a direita',\n moveLeft: 'Mover selecionados para a esquerda',\n moveAllLeft: 'Mover todos para a esquerda',\n\n // Command palette / Spotlight\n searchCommand: 'Pesquisar comando...',\n navigateHint: 'navegar',\n selectHint: 'selecionar',\n openHint: 'abrir',\n closeHint: 'fechar',\n\n // Infinite scroll\n loadingMore: 'Carregando...',\n noMoreItems: 'Não há mais itens',\n\n // Rich text editor\n bold: 'Negrito',\n italic: 'Itálico',\n underline: 'Sublinhado',\n strikethrough: 'Tachado',\n highlight: 'Realçar',\n bulletList: 'Lista com marcadores',\n orderedList: 'Lista ordenada',\n blockquote: 'Citação',\n code: 'Código',\n alignLeft: 'Alinhar à esquerda',\n alignCenter: 'Centralizar',\n alignRight: 'Alinhar à direita',\n undo: 'Desfazer',\n redo: 'Refazer',\n link: 'Link',\n image: 'Imagem',\n paragraph: 'Parágrafo',\n heading1: 'Título 1',\n heading2: 'Título 2',\n heading3: 'Título 3',\n insertLink: 'Inserir link',\n insertImage: 'Inserir imagem',\n imageUrlLabel: 'URL da imagem',\n insert: 'Inserir',\n}\n","import type { M3Locale } from '../composables/useLocale'\n\nexport const deLocale: M3Locale = {\n // Common\n search: 'Suchen...',\n noResults: 'Keine Ergebnisse',\n close: 'Schließen',\n cancel: 'Abbrechen',\n confirm: 'Bestätigen',\n loading: 'Laden',\n\n // Navigation\n previous: 'Zurück',\n next: 'Weiter',\n today: 'Heute',\n more: 'mehr',\n\n // Tables\n selectedCount: 'ausgewählt',\n recordCount: 'Datensatz',\n expand: 'Erweitern',\n columns: 'Spalten',\n exportCsv: 'CSV exportieren',\n noGroup: 'Keine Gruppe',\n\n // Tour\n finish: 'Fertig',\n\n // File upload\n dropText: 'Dateien hierher ziehen oder',\n selectText: 'durchsuchen',\n maxSizePrefix: 'Max.',\n remove: 'Entfernen',\n\n // Pickers\n selectDate: 'Datum auswählen',\n selectTime: 'Uhrzeit auswählen',\n selectRange: 'Bereich auswählen',\n pickStart: 'Anfang auswählen',\n pickEnd: 'Ende auswählen',\n previousMonth: 'Vorheriger Monat',\n nextMonth: 'Nächster Monat',\n\n // Scheduler\n dayView: 'Tag',\n weekView: 'Woche',\n\n // Transfer list\n available: 'Verfügbar',\n selected: 'Ausgewählt',\n noItems: 'Keine Elemente',\n moveAllRight: 'Alle nach rechts verschieben',\n moveRight: 'Auswahl nach rechts verschieben',\n moveLeft: 'Auswahl nach links verschieben',\n moveAllLeft: 'Alle nach links verschieben',\n\n // Command palette / Spotlight\n searchCommand: 'Befehl suchen...',\n navigateHint: 'navigieren',\n selectHint: 'auswählen',\n openHint: 'öffnen',\n closeHint: 'schließen',\n\n // Infinite scroll\n loadingMore: 'Laden...',\n noMoreItems: 'Keine weiteren Elemente',\n\n // Rich text editor\n bold: 'Fett',\n italic: 'Kursiv',\n underline: 'Unterstrichen',\n strikethrough: 'Durchgestrichen',\n highlight: 'Hervorheben',\n bulletList: 'Aufzählungsliste',\n orderedList: 'Nummerierte Liste',\n blockquote: 'Zitat',\n code: 'Code',\n alignLeft: 'Linksbündig',\n alignCenter: 'Zentriert',\n alignRight: 'Rechtsbündig',\n undo: 'Rückgängig',\n redo: 'Wiederholen',\n link: 'Link',\n image: 'Bild',\n paragraph: 'Absatz',\n heading1: 'Überschrift 1',\n heading2: 'Überschrift 2',\n heading3: 'Überschrift 3',\n insertLink: 'Link einfügen',\n insertImage: 'Bild einfügen',\n imageUrlLabel: 'Bild-URL',\n insert: 'Einfügen',\n}\n","import type { M3Locale } from '../composables/useLocale'\n\nexport const jaLocale: M3Locale = {\n // Common\n search: '検索...',\n noResults: '結果なし',\n close: '閉じる',\n cancel: 'キャンセル',\n confirm: '確認',\n loading: '読み込み中',\n\n // Navigation\n previous: '前へ',\n next: '次へ',\n today: '今日',\n more: '件',\n\n // Tables\n selectedCount: '件選択中',\n recordCount: '件',\n expand: '展開',\n columns: '列',\n exportCsv: 'CSV エクスポート',\n noGroup: 'グループなし',\n\n // Tour\n finish: '完了',\n\n // File upload\n dropText: 'ここにファイルをドロップ、または',\n selectText: '参照',\n maxSizePrefix: '最大',\n remove: '削除',\n\n // Pickers\n selectDate: '日付を選択',\n selectTime: '時刻を選択',\n selectRange: '範囲を選択',\n pickStart: '開始を選択',\n pickEnd: '終了を選択',\n previousMonth: '前月',\n nextMonth: '翌月',\n\n // Scheduler\n dayView: '日',\n weekView: '週',\n\n // Transfer list\n available: '利用可能',\n selected: '選択済み',\n noItems: '項目なし',\n moveAllRight: 'すべて右へ移動',\n moveRight: '選択項目を右へ移動',\n moveLeft: '選択項目を左へ移動',\n moveAllLeft: 'すべて左へ移動',\n\n // Command palette / Spotlight\n searchCommand: 'コマンドを検索...',\n navigateHint: '移動',\n selectHint: '選択',\n openHint: '開く',\n closeHint: '閉じる',\n\n // Infinite scroll\n loadingMore: '読み込み中...',\n noMoreItems: 'これ以上の項目はありません',\n\n // Rich text editor\n bold: '太字',\n italic: '斜体',\n underline: '下線',\n strikethrough: '取り消し線',\n highlight: 'ハイライト',\n bulletList: '箇条書きリスト',\n orderedList: '番号付きリスト',\n blockquote: '引用',\n code: 'コード',\n alignLeft: '左揃え',\n alignCenter: '中央揃え',\n alignRight: '右揃え',\n undo: '元に戻す',\n redo: 'やり直し',\n link: 'リンク',\n image: '画像',\n paragraph: '段落',\n heading1: '見出し 1',\n heading2: '見出し 2',\n heading3: '見出し 3',\n insertLink: 'リンクを挿入',\n insertImage: '画像を挿入',\n imageUrlLabel: '画像 URL',\n insert: '挿入',\n}\n","import type { M3Locale } from '../composables/useLocale'\n\nexport const zhLocale: M3Locale = {\n // Common\n search: '搜索...',\n noResults: '无结果',\n close: '关闭',\n cancel: '取消',\n confirm: '确认',\n loading: '加载中',\n\n // Navigation\n previous: '上一个',\n next: '下一个',\n today: '今天',\n more: '更多',\n\n // Tables\n selectedCount: '已选择',\n recordCount: '条记录',\n expand: '展开',\n columns: '列',\n exportCsv: '导出 CSV',\n noGroup: '无分组',\n\n // Tour\n finish: '完成',\n\n // File upload\n dropText: '将文件拖放到此处或',\n selectText: '浏览',\n maxSizePrefix: '最大',\n remove: '移除',\n\n // Pickers\n selectDate: '选择日期',\n selectTime: '选择时间',\n selectRange: '选择范围',\n pickStart: '选择开始',\n pickEnd: '选择结束',\n previousMonth: '上个月',\n nextMonth: '下个月',\n\n // Scheduler\n dayView: '日',\n weekView: '周',\n\n // Transfer list\n available: '可用',\n selected: '已选',\n noItems: '无项目',\n moveAllRight: '全部移至右侧',\n moveRight: '将选中项移至右侧',\n moveLeft: '将选中项移至左侧',\n moveAllLeft: '全部移至左侧',\n\n // Command palette / Spotlight\n searchCommand: '搜索命令...',\n navigateHint: '导航',\n selectHint: '选择',\n openHint: '打开',\n closeHint: '关闭',\n\n // Infinite scroll\n loadingMore: '加载中...',\n noMoreItems: '没有更多项目',\n\n // Rich text editor\n bold: '粗体',\n italic: '斜体',\n underline: '下划线',\n strikethrough: '删除线',\n highlight: '高亮',\n bulletList: '无序列表',\n orderedList: '有序列表',\n blockquote: '引用',\n code: '代码',\n alignLeft: '左对齐',\n alignCenter: '居中对齐',\n alignRight: '右对齐',\n undo: '撤销',\n redo: '重做',\n link: '链接',\n image: '图片',\n paragraph: '段落',\n heading1: '标题 1',\n heading2: '标题 2',\n heading3: '标题 3',\n insertLink: '插入链接',\n insertImage: '插入图片',\n imageUrlLabel: '图片 URL',\n insert: '插入',\n}\n","import type { M3Locale } from '../composables/useLocale'\n\nexport const koLocale: M3Locale = {\n // Common\n search: '검색...',\n noResults: '결과 없음',\n close: '닫기',\n cancel: '취소',\n confirm: '확인',\n loading: '로딩 중',\n\n // Navigation\n previous: '이전',\n next: '다음',\n today: '오늘',\n more: '더보기',\n\n // Tables\n selectedCount: '선택됨',\n recordCount: '개 레코드',\n expand: '펼치기',\n columns: '열',\n exportCsv: 'CSV 내보내기',\n noGroup: '그룹 없음',\n\n // Tour\n finish: '완료',\n\n // File upload\n dropText: '여기에 파일을 놓거나',\n selectText: '찾아보기',\n maxSizePrefix: '최대',\n remove: '삭제',\n\n // Pickers\n selectDate: '날짜 선택',\n selectTime: '시간 선택',\n selectRange: '범위 선택',\n pickStart: '시작 선택',\n pickEnd: '종료 선택',\n previousMonth: '이전 달',\n nextMonth: '다음 달',\n\n // Scheduler\n dayView: '일',\n weekView: '주',\n\n // Transfer list\n available: '사용 가능',\n selected: '선택됨',\n noItems: '항목 없음',\n moveAllRight: '모두 오른쪽으로 이동',\n moveRight: '선택 항목 오른쪽으로 이동',\n moveLeft: '선택 항목 왼쪽으로 이동',\n moveAllLeft: '모두 왼쪽으로 이동',\n\n // Command palette / Spotlight\n searchCommand: '명령 검색...',\n navigateHint: '탐색',\n selectHint: '선택',\n openHint: '열기',\n closeHint: '닫기',\n\n // Infinite scroll\n loadingMore: '로딩 중...',\n noMoreItems: '더 이상 항목이 없습니다',\n\n // Rich text editor\n bold: '굵게',\n italic: '기울임꼴',\n underline: '밑줄',\n strikethrough: '취소선',\n highlight: '강조',\n bulletList: '글머리 기호 목록',\n orderedList: '번호 매기기 목록',\n blockquote: '인용',\n code: '코드',\n alignLeft: '왼쪽 정렬',\n alignCenter: '가운데 정렬',\n alignRight: '오른쪽 정렬',\n undo: '실행 취소',\n redo: '다시 실행',\n link: '링크',\n image: '이미지',\n paragraph: '문단',\n heading1: '제목 1',\n heading2: '제목 2',\n heading3: '제목 3',\n insertLink: '링크 삽입',\n insertImage: '이미지 삽입',\n imageUrlLabel: '이미지 URL',\n insert: '삽입',\n}\n"],"mappings":";AAEA,IAAa,IAAqB;CAEhC,QAAQ;CACR,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CAGT,UAAU;CACV,MAAM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AAW;CACX,SAAS;CACT,eAAe;CACf,WAAW;CAGX,SAAS;CACT,UAAU;CAGV,WAAW;CACX,UAAU;CACV,SAAS;CACT,cAAc;CACd,WAAW;CACX,UAAU;CACV,aAAa;CAGb,eAAe;CACf,cAAc;CACd,YAAY;CACZ,UAAU;CACV,WAAW;CAGX,aAAa;CACb,aAAa;CAGb,MAAM;CACN,QAAQ;CACR,WAAW;CACX,eAAe;CACf,WAAW;CACX,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,MAAM;CACN,WAAW;CACX,aAAa;CACb,YAAY;CACZ,MAAM;CACN,MAAM;CACN,MAAM;CACN,OAAO;CACP,WAAW;CACX,UAAU;CACV,UAAU;CACV,UAAU;CACV,YAAY;CACZ,aAAa;CACb,eAAe;CACf,QAAQ;AACV"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3ui-vue/m3ui-vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Material 3 component library for Vue 3 + Tailwind CSS v4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"build:js": "vite build && cp dist/m3ui-vue.css dist/styles.css",
|
|
65
65
|
"build:types": "vue-tsc -p tsconfig.build.json",
|
|
66
66
|
"build:css": "cp -r src/styles dist/",
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"test:watch": "vitest",
|
|
67
69
|
"prepublishOnly": "pnpm build"
|
|
68
70
|
},
|
|
69
71
|
"peerDependencies": {
|
|
@@ -181,15 +183,18 @@
|
|
|
181
183
|
"@tiptap/vue-3": "^3.26.1",
|
|
182
184
|
"@types/markdown-it": "^14.1.2",
|
|
183
185
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
186
|
+
"@vue/test-utils": "^2.4.11",
|
|
184
187
|
"@vue/tsconfig": "^0.9.1",
|
|
185
188
|
"@xterm/addon-fit": "^0.11.0",
|
|
186
189
|
"@xterm/xterm": "^6.0.0",
|
|
187
190
|
"chart.js": "^4.5.1",
|
|
188
191
|
"codemirror": "^6.0.2",
|
|
192
|
+
"happy-dom": "^20.10.6",
|
|
189
193
|
"highlight.js": "^11.11.1",
|
|
190
194
|
"markdown-it": "^14.2.0",
|
|
191
195
|
"typescript": "~6.0.3",
|
|
192
196
|
"vite": "^8.0.16",
|
|
197
|
+
"vitest": "^4.1.9",
|
|
193
198
|
"vue": "^3.5.38",
|
|
194
199
|
"vue-chartjs": "^5.3.3",
|
|
195
200
|
"vue-tsc": "^3.3.5"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import MAlert from '../components/MAlert.vue'
|
|
4
|
+
|
|
5
|
+
describe('MAlert', () => {
|
|
6
|
+
it('renders slot content', () => {
|
|
7
|
+
const wrapper = mount(MAlert, {
|
|
8
|
+
slots: { default: 'Alert message' },
|
|
9
|
+
})
|
|
10
|
+
expect(wrapper.text()).toContain('Alert message')
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
it('renders title when provided', () => {
|
|
14
|
+
const wrapper = mount(MAlert, {
|
|
15
|
+
props: { title: 'Warning' },
|
|
16
|
+
slots: { default: 'Content' },
|
|
17
|
+
})
|
|
18
|
+
expect(wrapper.text()).toContain('Warning')
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
it('defaults to info type', () => {
|
|
22
|
+
const wrapper = mount(MAlert, {
|
|
23
|
+
slots: { default: 'Content' },
|
|
24
|
+
})
|
|
25
|
+
expect(wrapper.find('[class*="primary"]').exists()).toBe(true)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('shows close button when closeable', () => {
|
|
29
|
+
const wrapper = mount(MAlert, {
|
|
30
|
+
props: { closeable: true },
|
|
31
|
+
slots: { default: 'Content' },
|
|
32
|
+
})
|
|
33
|
+
expect(wrapper.find('button').exists()).toBe(true)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('hides close button by default', () => {
|
|
37
|
+
const wrapper = mount(MAlert, {
|
|
38
|
+
slots: { default: 'Content' },
|
|
39
|
+
})
|
|
40
|
+
expect(wrapper.find('button').exists()).toBe(false)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('emits close when button clicked', async () => {
|
|
44
|
+
const wrapper = mount(MAlert, {
|
|
45
|
+
props: { closeable: true },
|
|
46
|
+
slots: { default: 'Content' },
|
|
47
|
+
})
|
|
48
|
+
await wrapper.find('button').trigger('click')
|
|
49
|
+
expect(wrapper.emitted('close')).toHaveLength(1)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it('uses closeAriaLabel prop', () => {
|
|
53
|
+
const wrapper = mount(MAlert, {
|
|
54
|
+
props: { closeable: true, closeAriaLabel: 'Dismiss' },
|
|
55
|
+
slots: { default: 'Content' },
|
|
56
|
+
})
|
|
57
|
+
expect(wrapper.find('button').attributes('aria-label')).toBe('Dismiss')
|
|
58
|
+
})
|
|
59
|
+
})
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import MConfirmDialog from '../components/MConfirmDialog.vue'
|
|
4
|
+
|
|
5
|
+
describe('MConfirmDialog', () => {
|
|
6
|
+
const baseProps = {
|
|
7
|
+
modelValue: true,
|
|
8
|
+
title: 'Delete item?',
|
|
9
|
+
message: 'This cannot be undone.',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
document.body.innerHTML = ''
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
it('renders title and message', () => {
|
|
17
|
+
mount(MConfirmDialog, { props: baseProps, attachTo: document.body })
|
|
18
|
+
expect(document.body.textContent).toContain('Delete item?')
|
|
19
|
+
expect(document.body.textContent).toContain('This cannot be undone.')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('uses locale defaults for labels', () => {
|
|
23
|
+
mount(MConfirmDialog, { props: baseProps, attachTo: document.body })
|
|
24
|
+
expect(document.body.textContent).toContain('Confirm')
|
|
25
|
+
expect(document.body.textContent).toContain('Cancel')
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('uses custom labels when provided', () => {
|
|
29
|
+
mount(MConfirmDialog, {
|
|
30
|
+
props: { ...baseProps, confirmLabel: 'Delete', cancelLabel: 'Keep' },
|
|
31
|
+
attachTo: document.body,
|
|
32
|
+
})
|
|
33
|
+
expect(document.body.textContent).toContain('Delete')
|
|
34
|
+
expect(document.body.textContent).toContain('Keep')
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('emits confirm when confirm button clicked', async () => {
|
|
38
|
+
const wrapper = mount(MConfirmDialog, { props: baseProps, attachTo: document.body })
|
|
39
|
+
const buttons = wrapper.findAllComponents({ name: 'MButton' })
|
|
40
|
+
const confirmBtn = buttons[buttons.length - 1]!
|
|
41
|
+
await confirmBtn.trigger('click')
|
|
42
|
+
expect(wrapper.emitted('confirm')).toHaveLength(1)
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('emits update:modelValue false when cancel clicked', async () => {
|
|
46
|
+
const wrapper = mount(MConfirmDialog, { props: baseProps, attachTo: document.body })
|
|
47
|
+
const cancelBtn = wrapper.findAllComponents({ name: 'MButton' })[0]!
|
|
48
|
+
await cancelBtn.trigger('click')
|
|
49
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([false])
|
|
50
|
+
})
|
|
51
|
+
})
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import MDialog from '../components/MDialog.vue'
|
|
4
|
+
|
|
5
|
+
describe('MDialog', () => {
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
document.body.innerHTML = ''
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('renders nothing when closed', () => {
|
|
11
|
+
mount(MDialog, {
|
|
12
|
+
props: { modelValue: false },
|
|
13
|
+
attachTo: document.body,
|
|
14
|
+
})
|
|
15
|
+
expect(document.body.querySelector('.fixed')).toBeNull()
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('renders content when open', () => {
|
|
19
|
+
mount(MDialog, {
|
|
20
|
+
props: { modelValue: true, title: 'Test Dialog' },
|
|
21
|
+
slots: { default: 'Dialog body' },
|
|
22
|
+
attachTo: document.body,
|
|
23
|
+
})
|
|
24
|
+
expect(document.body.textContent).toContain('Test Dialog')
|
|
25
|
+
expect(document.body.textContent).toContain('Dialog body')
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('emits update:modelValue false when close button clicked', async () => {
|
|
29
|
+
const wrapper = mount(MDialog, {
|
|
30
|
+
props: { modelValue: true, title: 'Test' },
|
|
31
|
+
attachTo: document.body,
|
|
32
|
+
})
|
|
33
|
+
const closeBtn = wrapper.findComponent({ name: 'MIconButton' })
|
|
34
|
+
await closeBtn.trigger('click')
|
|
35
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([false])
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it('hides close button when persistent', () => {
|
|
39
|
+
const wrapper = mount(MDialog, {
|
|
40
|
+
props: { modelValue: true, persistent: true, title: 'Test' },
|
|
41
|
+
attachTo: document.body,
|
|
42
|
+
})
|
|
43
|
+
const iconBtn = wrapper.findComponent({ name: 'MIconButton' })
|
|
44
|
+
expect(iconBtn.exists()).toBe(false)
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it('renders actions slot', () => {
|
|
48
|
+
mount(MDialog, {
|
|
49
|
+
props: { modelValue: true, title: 'Test' },
|
|
50
|
+
slots: {
|
|
51
|
+
default: 'Body',
|
|
52
|
+
actions: '<button>OK</button>',
|
|
53
|
+
},
|
|
54
|
+
attachTo: document.body,
|
|
55
|
+
})
|
|
56
|
+
expect(document.body.textContent).toContain('OK')
|
|
57
|
+
})
|
|
58
|
+
})
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import MSpinner from '../components/MSpinner.vue'
|
|
4
|
+
|
|
5
|
+
describe('MSpinner', () => {
|
|
6
|
+
it('renders with default size', () => {
|
|
7
|
+
const wrapper = mount(MSpinner)
|
|
8
|
+
const span = wrapper.find('span')
|
|
9
|
+
expect(span.attributes('style')).toContain('width: 20px')
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it('respects custom size', () => {
|
|
13
|
+
const wrapper = mount(MSpinner, { props: { size: 48 } })
|
|
14
|
+
const span = wrapper.find('span')
|
|
15
|
+
expect(span.attributes('style')).toContain('width: 48px')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('uses locale default for aria-label', () => {
|
|
19
|
+
const wrapper = mount(MSpinner)
|
|
20
|
+
expect(wrapper.find('[role="status"]').attributes('aria-label')).toBe('Loading')
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('uses custom label prop', () => {
|
|
24
|
+
const wrapper = mount(MSpinner, { props: { label: 'Cargando' } })
|
|
25
|
+
expect(wrapper.find('[role="status"]').attributes('aria-label')).toBe('Cargando')
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('renders standard spinner by default', () => {
|
|
29
|
+
const wrapper = mount(MSpinner)
|
|
30
|
+
expect(wrapper.find('svg').exists()).toBe(false)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
it('renders wavy spinner when wavy=true', () => {
|
|
34
|
+
const wrapper = mount(MSpinner, { props: { wavy: true } })
|
|
35
|
+
expect(wrapper.find('svg').exists()).toBe(true)
|
|
36
|
+
})
|
|
37
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { defaultLocale } from '../composables/useLocale'
|
|
3
|
+
import type { M3Locale } from '../composables/useLocale'
|
|
4
|
+
import { esLocale } from '../locales/es'
|
|
5
|
+
import { frLocale } from '../locales/fr'
|
|
6
|
+
import { ptLocale } from '../locales/pt'
|
|
7
|
+
import { deLocale } from '../locales/de'
|
|
8
|
+
import { jaLocale } from '../locales/ja'
|
|
9
|
+
import { zhLocale } from '../locales/zh'
|
|
10
|
+
import { koLocale } from '../locales/ko'
|
|
11
|
+
|
|
12
|
+
const allLocales: [string, M3Locale][] = [
|
|
13
|
+
['es', esLocale],
|
|
14
|
+
['fr', frLocale],
|
|
15
|
+
['pt', ptLocale],
|
|
16
|
+
['de', deLocale],
|
|
17
|
+
['ja', jaLocale],
|
|
18
|
+
['zh', zhLocale],
|
|
19
|
+
['ko', koLocale],
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
const defaultKeys = Object.keys(defaultLocale) as (keyof M3Locale)[]
|
|
23
|
+
|
|
24
|
+
describe('locale presets', () => {
|
|
25
|
+
it.each(allLocales)('%s has all keys from defaultLocale', (_name, locale) => {
|
|
26
|
+
for (const key of defaultKeys) {
|
|
27
|
+
expect(locale[key], `missing key: ${key}`).toBeTruthy()
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it.each(allLocales)('%s has no extra keys', (_name, locale) => {
|
|
32
|
+
const localeKeys = Object.keys(locale)
|
|
33
|
+
for (const key of localeKeys) {
|
|
34
|
+
expect(defaultKeys).toContain(key)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it.each(allLocales)('%s differs from English defaults', (_name, locale) => {
|
|
39
|
+
let diffs = 0
|
|
40
|
+
for (const key of defaultKeys) {
|
|
41
|
+
if (locale[key] !== defaultLocale[key]) diffs++
|
|
42
|
+
}
|
|
43
|
+
expect(diffs).toBeGreaterThan(defaultKeys.length / 2)
|
|
44
|
+
})
|
|
45
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from 'vitest'
|
|
2
|
+
import { createApp, defineComponent, h } from 'vue'
|
|
3
|
+
import { createM3UI } from '../plugin'
|
|
4
|
+
|
|
5
|
+
describe('createM3UI', () => {
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
document.documentElement.removeAttribute('data-palette')
|
|
8
|
+
localStorage.removeItem('m3-palette')
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
it('installs without options', () => {
|
|
12
|
+
const app = createApp(defineComponent({ render: () => h('div') }))
|
|
13
|
+
expect(() => app.use(createM3UI())).not.toThrow()
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
it('sets palette on install', () => {
|
|
17
|
+
const app = createApp(defineComponent({ render: () => h('div') }))
|
|
18
|
+
app.use(createM3UI({ palette: 'teal' }))
|
|
19
|
+
expect(document.documentElement.getAttribute('data-palette')).toBe('teal')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('does not set attribute for purple (default)', () => {
|
|
23
|
+
const app = createApp(defineComponent({ render: () => h('div') }))
|
|
24
|
+
app.use(createM3UI({ palette: 'purple' }))
|
|
25
|
+
expect(document.documentElement.hasAttribute('data-palette')).toBe(false)
|
|
26
|
+
})
|
|
27
|
+
})
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
if (typeof globalThis.localStorage === 'undefined') {
|
|
2
|
+
const store: Record<string, string> = {}
|
|
3
|
+
globalThis.localStorage = {
|
|
4
|
+
getItem: (key: string) => store[key] ?? null,
|
|
5
|
+
setItem: (key: string, value: string) => { store[key] = value },
|
|
6
|
+
removeItem: (key: string) => { delete store[key] },
|
|
7
|
+
clear: () => { for (const k of Object.keys(store)) delete store[k] },
|
|
8
|
+
get length() { return Object.keys(store).length },
|
|
9
|
+
key: (i: number) => Object.keys(store)[i] ?? null,
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import { defineComponent, h, nextTick } from 'vue'
|
|
4
|
+
import { useColorPalette, palettes } from '../composables/useColorPalette'
|
|
5
|
+
|
|
6
|
+
function withSetup() {
|
|
7
|
+
let result!: ReturnType<typeof useColorPalette>
|
|
8
|
+
mount(defineComponent({
|
|
9
|
+
setup() {
|
|
10
|
+
result = useColorPalette()
|
|
11
|
+
return () => h('div')
|
|
12
|
+
},
|
|
13
|
+
}))
|
|
14
|
+
return result
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('useColorPalette', () => {
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
document.documentElement.removeAttribute('data-palette')
|
|
20
|
+
localStorage.setItem('m3-palette', 'purple')
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('has 30 palettes', () => {
|
|
24
|
+
expect(palettes).toHaveLength(30)
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it('each palette has id, label, and seed', () => {
|
|
28
|
+
for (const p of palettes) {
|
|
29
|
+
expect(p.id).toBeTruthy()
|
|
30
|
+
expect(p.label).toBeTruthy()
|
|
31
|
+
expect(p.seed).toMatch(/^#[0-9A-Fa-f]{6}$/)
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it('includes monochromatic palettes', () => {
|
|
36
|
+
const ids = palettes.map(p => p.id)
|
|
37
|
+
expect(ids).toContain('graphite')
|
|
38
|
+
expect(ids).toContain('charcoal')
|
|
39
|
+
expect(ids).toContain('steel')
|
|
40
|
+
expect(ids).toContain('ash')
|
|
41
|
+
expect(ids).toContain('iron')
|
|
42
|
+
expect(ids).toContain('fog')
|
|
43
|
+
expect(ids).toContain('pewter')
|
|
44
|
+
expect(ids).toContain('smoke')
|
|
45
|
+
expect(ids).toContain('stone')
|
|
46
|
+
expect(ids).toContain('zinc')
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
it('set() applies data-palette attribute', async () => {
|
|
50
|
+
const { set } = withSetup()
|
|
51
|
+
set('teal')
|
|
52
|
+
await nextTick()
|
|
53
|
+
expect(document.documentElement.getAttribute('data-palette')).toBe('teal')
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it('set(purple) removes data-palette', async () => {
|
|
57
|
+
const { set } = withSetup()
|
|
58
|
+
set('teal')
|
|
59
|
+
await nextTick()
|
|
60
|
+
set('purple')
|
|
61
|
+
await nextTick()
|
|
62
|
+
expect(document.documentElement.hasAttribute('data-palette')).toBe(false)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('persists to localStorage', async () => {
|
|
66
|
+
const { set } = withSetup()
|
|
67
|
+
set('blue')
|
|
68
|
+
await nextTick()
|
|
69
|
+
expect(localStorage.getItem('m3-palette')).toBe('blue')
|
|
70
|
+
})
|
|
71
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import { defineComponent, h } from 'vue'
|
|
4
|
+
import { useLocale, defaultLocale, M3_LOCALE_KEY } from '../composables/useLocale'
|
|
5
|
+
|
|
6
|
+
function withSetup<T>(fn: () => T, provide?: Record<symbol, unknown>): T {
|
|
7
|
+
let result!: T
|
|
8
|
+
mount(defineComponent({
|
|
9
|
+
setup() {
|
|
10
|
+
result = fn()
|
|
11
|
+
return () => h('div')
|
|
12
|
+
},
|
|
13
|
+
}), {
|
|
14
|
+
global: provide ? { provide } : undefined,
|
|
15
|
+
})
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
describe('useLocale', () => {
|
|
20
|
+
it('returns English defaults without provider', () => {
|
|
21
|
+
const locale = withSetup(() => useLocale())
|
|
22
|
+
expect(locale.search).toBe('Search...')
|
|
23
|
+
expect(locale.close).toBe('Close')
|
|
24
|
+
expect(locale.cancel).toBe('Cancel')
|
|
25
|
+
expect(locale.confirm).toBe('Confirm')
|
|
26
|
+
expect(locale.previous).toBe('Previous')
|
|
27
|
+
expect(locale.next).toBe('Next')
|
|
28
|
+
expect(locale.finish).toBe('Finish')
|
|
29
|
+
expect(locale.noResults).toBe('No results')
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('merges partial overrides from provider', () => {
|
|
33
|
+
const locale = withSetup(
|
|
34
|
+
() => useLocale(),
|
|
35
|
+
{ [M3_LOCALE_KEY as symbol]: { search: 'Buscar...', close: 'Cerrar' } },
|
|
36
|
+
)
|
|
37
|
+
expect(locale.search).toBe('Buscar...')
|
|
38
|
+
expect(locale.close).toBe('Cerrar')
|
|
39
|
+
expect(locale.cancel).toBe('Cancel')
|
|
40
|
+
expect(locale.next).toBe('Next')
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('defaultLocale has all keys defined', () => {
|
|
44
|
+
const keys = Object.keys(defaultLocale)
|
|
45
|
+
expect(keys.length).toBeGreaterThan(50)
|
|
46
|
+
for (const key of keys) {
|
|
47
|
+
expect((defaultLocale as unknown as Record<string, string>)[key]).toBeTruthy()
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
})
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from 'vitest'
|
|
2
|
+
import { mount, flushPromises } from '@vue/test-utils'
|
|
3
|
+
import { defineComponent, h, nextTick } from 'vue'
|
|
4
|
+
import { useTheme } from '../composables/useTheme'
|
|
5
|
+
|
|
6
|
+
function withSetup() {
|
|
7
|
+
let result!: ReturnType<typeof useTheme>
|
|
8
|
+
mount(defineComponent({
|
|
9
|
+
setup() {
|
|
10
|
+
result = useTheme()
|
|
11
|
+
return () => h('div')
|
|
12
|
+
},
|
|
13
|
+
}))
|
|
14
|
+
return result
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('useTheme', () => {
|
|
18
|
+
beforeEach(async () => {
|
|
19
|
+
document.documentElement.classList.remove('dark')
|
|
20
|
+
localStorage.setItem('m3-theme', 'system')
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('returns theme ref', () => {
|
|
24
|
+
const { theme } = withSetup()
|
|
25
|
+
expect(['light', 'dark', 'system']).toContain(theme.value)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('can set to dark and applies class', async () => {
|
|
29
|
+
const { theme } = withSetup()
|
|
30
|
+
theme.value = 'dark'
|
|
31
|
+
await nextTick()
|
|
32
|
+
expect(document.documentElement.classList.contains('dark')).toBe(true)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it('can set to light and removes dark class', async () => {
|
|
36
|
+
document.documentElement.classList.add('dark')
|
|
37
|
+
const { theme } = withSetup()
|
|
38
|
+
theme.value = 'light'
|
|
39
|
+
await nextTick()
|
|
40
|
+
expect(document.documentElement.classList.contains('dark')).toBe(false)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('cycle rotates through modes', async () => {
|
|
44
|
+
const { theme, cycle } = withSetup()
|
|
45
|
+
theme.value = 'light'
|
|
46
|
+
await nextTick()
|
|
47
|
+
cycle()
|
|
48
|
+
expect(theme.value).toBe('dark')
|
|
49
|
+
cycle()
|
|
50
|
+
expect(theme.value).toBe('system')
|
|
51
|
+
cycle()
|
|
52
|
+
expect(theme.value).toBe('light')
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it('persists to localStorage', async () => {
|
|
56
|
+
const { theme } = withSetup()
|
|
57
|
+
theme.value = 'dark'
|
|
58
|
+
await nextTick()
|
|
59
|
+
expect(localStorage.getItem('m3-theme')).toBe('dark')
|
|
60
|
+
})
|
|
61
|
+
})
|