@xto/core 1.1.0 → 1.2.0

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 (3) hide show
  1. package/es/index.mjs +807 -112
  2. package/lib/index.cjs +1 -1
  3. package/package.json +12 -7
package/es/index.mjs CHANGED
@@ -1,114 +1,809 @@
1
- import { applyCSSVars as n, applyDarkTheme as t, cssVarPrefix as i, darkCSSVars as r, defaultThemeConfig as a, generateCSSVars as d, generateColorPalette as x, getComponentSize as l, hexToRgb as p, mixColor as u, removeCSSVars as c, removeDarkTheme as m, rgbToHex as I, sizeMap as g } from "./theme/index.mjs";
2
- import { b as C, block as S, classNames as b, coerceToArray as f, compose as T, constant as y, createNamespace as h, debounce as D, deepClone as M, deepMerge as v, defaultNamespace as N, defaultTo as O, drawerZIndex as P, dropdownZIndex as V, e as k, element as w, flatten as A, get as z, getCurrentZIndex as E, getType as F, getZIndexList as L, identity as R, is as j, isAndroid as B, isArray as q, isBoolean as H, isBrowser as U, isDate as W, isDefined as G, isEmpty as J, isFalse as K, isFunction as Q, isIOS as X, isMobile as Y, isNil as _, isNull as $, isNumber as ee, isObject as se, isPlainObject as oe, isPromise as ne, isRegExp as te, isString as ie, isSupportTouch as re, isTrue as ae, isType as de, isUndefined as xe, isWechat as le, loadingZIndex as pe, m as ue, messageZIndex as ce, modalZIndex as me, modifier as Ie, nextDrawerZIndex as ge, nextDropdownZIndex as Ze, nextLoadingZIndex as Ce, nextMessageZIndex as Se, nextModalZIndex as be, nextPopoverZIndex as fe, nextSelectZIndex as Te, nextTooltipZIndex as ye, noop as he, once as De, pipe as Me, popoverZIndex as ve, popupManage as Ne, resetZIndex as Oe, selectZIndex as Pe, set as Ve, shortId as ke, state as we, throttle as Ae, tooltipZIndex as ze, tryCatch as Ee, unary as Fe, unique as Le, useClass as Re, useComponentPrefix as je, useNamespace as Be, useZIndex as qe, uuid as He } from "./utils/index.mjs";
3
- import { useClickOutside as We, useDOMObserver as Ge, useDelayedAction as Je, useDisabled as Ke, useEscape as Qe, useFocus as Xe, useIntersectionObserver as Ye, useLoading as _e, useModel as $e, useResize as es, useScroll as ss, useToggle as os, useVisible as ns } from "./hooks/index.mjs";
4
- const e = "1.0.0";
1
+ import { applyCSSVars as z, applyDarkTheme as I, cssVarPrefix as R, darkCSSVars as A, defaultThemeConfig as N, generateCSSVars as Z, generateColorPalette as F, getComponentSize as O, hexToRgb as W, mixColor as U, removeCSSVars as E, removeDarkTheme as Y, rgbToHex as q, sizeMap as H } from "./theme/index.mjs";
2
+ import { b as j, block as J, classNames as K, coerceToArray as B, compose as $, constant as G, createNamespace as Q, debounce as X, deepClone as _, deepMerge as ee, defaultNamespace as ae, defaultTo as te, drawerZIndex as oe, dropdownZIndex as se, e as le, element as ie, flatten as ne, get as re, getCurrentZIndex as ce, getType as de, getZIndexList as me, identity as ue, is as ge, isAndroid as pe, isArray as he, isBoolean as fe, isBrowser as xe, isDate as Pe, isDefined as Se, isEmpty as ve, isFalse as ye, isFunction as we, isIOS as ke, isMobile as De, isNil as Le, isNull as be, isNumber as Ce, isObject as Me, isPlainObject as Te, isPromise as ze, isRegExp as Ie, isString as Re, isSupportTouch as Ae, isTrue as Ne, isType as Ze, isUndefined as Fe, isWechat as Oe, loadingZIndex as We, m as Ue, messageZIndex as Ee, modalZIndex as Ye, modifier as qe, nextDrawerZIndex as He, nextDropdownZIndex as Ve, nextLoadingZIndex as je, nextMessageZIndex as Je, nextModalZIndex as Ke, nextPopoverZIndex as Be, nextSelectZIndex as $e, nextTooltipZIndex as Ge, noop as Qe, once as Xe, pipe as _e, popoverZIndex as ea, popupManage as aa, resetZIndex as ta, selectZIndex as oa, set as sa, shortId as la, state as ia, throttle as na, tooltipZIndex as ra, tryCatch as ca, unary as da, unique as ma, useClass as ua, useComponentPrefix as ga, useNamespace as pa, useZIndex as ha, uuid as fa } from "./utils/index.mjs";
3
+ import { useClickOutside as Pa, useDOMObserver as Sa, useDelayedAction as va, useDisabled as ya, useEscape as wa, useFocus as ka, useIntersectionObserver as Da, useLoading as La, useModel as ba, useResize as Ca, useScroll as Ma, useToggle as Ta, useVisible as za } from "./hooks/index.mjs";
4
+ import { ref as d, inject as h, computed as f } from "vue";
5
+ const m = {
6
+ // 通用
7
+ confirm: "确认",
8
+ cancel: "取消",
9
+ save: "保存",
10
+ delete: "删除",
11
+ edit: "编辑",
12
+ add: "添加",
13
+ search: "搜索",
14
+ reset: "重置",
15
+ submit: "提交",
16
+ back: "返回",
17
+ close: "关闭",
18
+ loading: "加载中...",
19
+ noData: "暂无数据",
20
+ noResult: "无匹配结果",
21
+ success: "操作成功",
22
+ failed: "操作失败",
23
+ warning: "警告",
24
+ error: "错误",
25
+ info: "提示",
26
+ // 表单
27
+ form: {
28
+ required: "此项为必填项",
29
+ invalid: "格式不正确",
30
+ minLength: "最少输入 {0} 个字符",
31
+ maxLength: "最多输入 {0} 个字符",
32
+ min: "不能小于 {0}",
33
+ max: "不能大于 {0}",
34
+ email: "请输入有效的邮箱地址",
35
+ phone: "请输入有效的手机号码",
36
+ url: "请输入有效的网址",
37
+ idCard: "请输入有效的身份证号码",
38
+ password: "密码长度应为 6-20 个字符",
39
+ confirmPassword: "两次输入的密码不一致"
40
+ },
41
+ // 表格
42
+ table: {
43
+ total: "共 {0} 条",
44
+ pageSize: "{0} 条/页",
45
+ goto: "跳至",
46
+ page: "页",
47
+ prevPage: "上一页",
48
+ nextPage: "下一页",
49
+ selectAll: "全选",
50
+ sort: "排序",
51
+ filter: "筛选",
52
+ columnSettings: "列设置",
53
+ expand: "展开",
54
+ collapse: "收起"
55
+ },
56
+ // 日期选择器
57
+ datePicker: {
58
+ year: "年",
59
+ month: "月",
60
+ week: "周",
61
+ day: "日",
62
+ today: "今天",
63
+ thisWeek: "本周",
64
+ thisMonth: "本月",
65
+ thisYear: "今年",
66
+ lastWeek: "上周",
67
+ lastMonth: "上月",
68
+ lastYear: "去年",
69
+ last7Days: "最近 7 天",
70
+ last30Days: "最近 30 天",
71
+ last90Days: "最近 90 天",
72
+ custom: "自定义",
73
+ startPlaceholder: "开始日期",
74
+ endPlaceholder: "结束日期",
75
+ startTimePlaceholder: "开始时间",
76
+ endTimePlaceholder: "结束时间",
77
+ months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
78
+ weeks: ["日", "一", "二", "三", "四", "五", "六"]
79
+ },
80
+ // 时间选择器
81
+ timePicker: {
82
+ hour: "时",
83
+ minute: "分",
84
+ second: "秒",
85
+ now: "此刻",
86
+ confirm: "确定"
87
+ },
88
+ // 上传
89
+ upload: {
90
+ selectFile: "选择文件",
91
+ dragTip: "将文件拖到此处,或",
92
+ clickUpload: "点击上传",
93
+ uploadSuccess: "上传成功",
94
+ uploadFailed: "上传失败",
95
+ fileSizeLimit: "文件大小不超过 {0}",
96
+ fileTypeLimit: "文件格式不支持",
97
+ fileCountLimit: "最多上传 {0} 个文件",
98
+ deleteConfirm: "确定删除此文件?",
99
+ preview: "预览",
100
+ download: "下载",
101
+ remove: "删除"
102
+ },
103
+ // 分页
104
+ pagination: {
105
+ total: "共 {total} 条",
106
+ pageSize: "{size} 条/页",
107
+ goto: "前往",
108
+ page: "页"
109
+ },
110
+ // 穿梭框
111
+ transfer: {
112
+ searchPlaceholder: "请输入搜索内容",
113
+ noData: "暂无数据",
114
+ noMatch: "无匹配数据",
115
+ toRight: "移至右侧",
116
+ toLeft: "移至左侧",
117
+ selectAll: "全选",
118
+ selected: "已选 {count} 项"
119
+ },
120
+ // 树形控件
121
+ tree: {
122
+ expandAll: "展开全部",
123
+ collapseAll: "收起全部",
124
+ searchPlaceholder: "搜索关键字",
125
+ noData: "暂无数据"
126
+ },
127
+ // 弹窗
128
+ modal: {
129
+ confirm: "确认",
130
+ cancel: "取消",
131
+ close: "关闭"
132
+ },
133
+ // 消息提示
134
+ message: {
135
+ success: "操作成功",
136
+ warning: "警告提示",
137
+ error: "错误提示",
138
+ info: "信息提示"
139
+ },
140
+ // 图片预览
141
+ image: {
142
+ zoomIn: "放大",
143
+ zoomOut: "缩小",
144
+ rotateLeft: "左旋转",
145
+ rotateRight: "右旋转",
146
+ originalSize: "原始大小",
147
+ prev: "上一张",
148
+ next: "下一张"
149
+ },
150
+ // 结果页
151
+ result: {
152
+ success: "操作成功",
153
+ failed: "操作失败",
154
+ warning: "警告提示",
155
+ info: "信息提示",
156
+ backHome: "返回首页",
157
+ retry: "重试"
158
+ }
159
+ }, x = {
160
+ // Common
161
+ confirm: "Confirm",
162
+ cancel: "Cancel",
163
+ save: "Save",
164
+ delete: "Delete",
165
+ edit: "Edit",
166
+ add: "Add",
167
+ search: "Search",
168
+ reset: "Reset",
169
+ submit: "Submit",
170
+ back: "Back",
171
+ close: "Close",
172
+ loading: "Loading...",
173
+ noData: "No Data",
174
+ noResult: "No Result",
175
+ success: "Success",
176
+ failed: "Failed",
177
+ warning: "Warning",
178
+ error: "Error",
179
+ info: "Info",
180
+ // Form
181
+ form: {
182
+ required: "This field is required",
183
+ invalid: "Invalid format",
184
+ minLength: "Minimum {0} characters required",
185
+ maxLength: "Maximum {0} characters allowed",
186
+ min: "Must be at least {0}",
187
+ max: "Must be at most {0}",
188
+ email: "Please enter a valid email",
189
+ phone: "Please enter a valid phone number",
190
+ url: "Please enter a valid URL",
191
+ idCard: "Please enter a valid ID card number",
192
+ password: "Password must be 6-20 characters",
193
+ confirmPassword: "Passwords do not match"
194
+ },
195
+ // Table
196
+ table: {
197
+ total: "Total {0} items",
198
+ pageSize: "{0} / page",
199
+ goto: "Go to",
200
+ page: "Page",
201
+ prevPage: "Previous",
202
+ nextPage: "Next",
203
+ selectAll: "Select All",
204
+ sort: "Sort",
205
+ filter: "Filter",
206
+ columnSettings: "Column Settings",
207
+ expand: "Expand",
208
+ collapse: "Collapse"
209
+ },
210
+ // Date Picker
211
+ datePicker: {
212
+ year: "Year",
213
+ month: "Month",
214
+ week: "Week",
215
+ day: "Day",
216
+ today: "Today",
217
+ thisWeek: "This Week",
218
+ thisMonth: "This Month",
219
+ thisYear: "This Year",
220
+ lastWeek: "Last Week",
221
+ lastMonth: "Last Month",
222
+ lastYear: "Last Year",
223
+ last7Days: "Last 7 Days",
224
+ last30Days: "Last 30 Days",
225
+ last90Days: "Last 90 Days",
226
+ custom: "Custom",
227
+ startPlaceholder: "Start Date",
228
+ endPlaceholder: "End Date",
229
+ startTimePlaceholder: "Start Time",
230
+ endTimePlaceholder: "End Time",
231
+ months: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
232
+ weeks: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
233
+ },
234
+ // Time Picker
235
+ timePicker: {
236
+ hour: "Hour",
237
+ minute: "Minute",
238
+ second: "Second",
239
+ now: "Now",
240
+ confirm: "OK"
241
+ },
242
+ // Upload
243
+ upload: {
244
+ selectFile: "Select File",
245
+ dragTip: "Drag file here, or",
246
+ clickUpload: "Click to Upload",
247
+ uploadSuccess: "Upload Success",
248
+ uploadFailed: "Upload Failed",
249
+ fileSizeLimit: "File size must not exceed {0}",
250
+ fileTypeLimit: "File type not supported",
251
+ fileCountLimit: "Maximum {0} files allowed",
252
+ deleteConfirm: "Are you sure to delete this file?",
253
+ preview: "Preview",
254
+ download: "Download",
255
+ remove: "Remove"
256
+ },
257
+ // Pagination
258
+ pagination: {
259
+ total: "Total {total} items",
260
+ pageSize: "{size} / page",
261
+ goto: "Go to",
262
+ page: "Page"
263
+ },
264
+ // Transfer
265
+ transfer: {
266
+ searchPlaceholder: "Search",
267
+ noData: "No Data",
268
+ noMatch: "No Match",
269
+ toRight: "Move to Right",
270
+ toLeft: "Move to Left",
271
+ selectAll: "Select All",
272
+ selected: "{count} items selected"
273
+ },
274
+ // Tree
275
+ tree: {
276
+ expandAll: "Expand All",
277
+ collapseAll: "Collapse All",
278
+ searchPlaceholder: "Search",
279
+ noData: "No Data"
280
+ },
281
+ // Modal
282
+ modal: {
283
+ confirm: "Confirm",
284
+ cancel: "Cancel",
285
+ close: "Close"
286
+ },
287
+ // Message
288
+ message: {
289
+ success: "Success",
290
+ warning: "Warning",
291
+ error: "Error",
292
+ info: "Info"
293
+ },
294
+ // Image Preview
295
+ image: {
296
+ zoomIn: "Zoom In",
297
+ zoomOut: "Zoom Out",
298
+ rotateLeft: "Rotate Left",
299
+ rotateRight: "Rotate Right",
300
+ originalSize: "Original Size",
301
+ prev: "Previous",
302
+ next: "Next"
303
+ },
304
+ // Result
305
+ result: {
306
+ success: "Success",
307
+ failed: "Failed",
308
+ warning: "Warning",
309
+ info: "Info",
310
+ backHome: "Back Home",
311
+ retry: "Retry"
312
+ }
313
+ }, P = {
314
+ // 共通
315
+ confirm: "確認",
316
+ cancel: "キャンセル",
317
+ save: "保存",
318
+ delete: "削除",
319
+ edit: "編集",
320
+ add: "追加",
321
+ search: "検索",
322
+ reset: "リセット",
323
+ submit: "送信",
324
+ back: "戻る",
325
+ close: "閉じる",
326
+ loading: "読み込み中...",
327
+ noData: "データがありません",
328
+ noResult: "結果がありません",
329
+ success: "成功",
330
+ failed: "失敗",
331
+ warning: "警告",
332
+ error: "エラー",
333
+ info: "情報",
334
+ // フォーム
335
+ form: {
336
+ required: "この項目は必須です",
337
+ invalid: "形式が正しくありません",
338
+ minLength: "{0}文字以上で入力してください",
339
+ maxLength: "{0}文字以内で入力してください",
340
+ min: "{0}以上で入力してください",
341
+ max: "{0}以下で入力してください",
342
+ email: "有効なメールアドレスを入力してください",
343
+ phone: "有効な電話番号を入力してください",
344
+ url: "有効なURLを入力してください",
345
+ idCard: "有効なID番号を入力してください",
346
+ password: "パスワードは6-20文字で入力してください",
347
+ confirmPassword: "パスワードが一致しません"
348
+ },
349
+ // テーブル
350
+ table: {
351
+ total: "合計 {0} 件",
352
+ pageSize: "{0} 件/ページ",
353
+ goto: "移動",
354
+ page: "ページ",
355
+ prevPage: "前へ",
356
+ nextPage: "次へ",
357
+ selectAll: "全選択",
358
+ sort: "並び替え",
359
+ filter: "フィルター",
360
+ columnSettings: "列設定",
361
+ expand: "展開",
362
+ collapse: "折りたたむ"
363
+ },
364
+ // 日付選択
365
+ datePicker: {
366
+ year: "年",
367
+ month: "月",
368
+ week: "週",
369
+ day: "日",
370
+ today: "今日",
371
+ thisWeek: "今週",
372
+ thisMonth: "今月",
373
+ thisYear: "今年",
374
+ lastWeek: "先週",
375
+ lastMonth: "先月",
376
+ lastYear: "昨年",
377
+ last7Days: "過去7日間",
378
+ last30Days: "過去30日間",
379
+ last90Days: "過去90日間",
380
+ custom: "カスタム",
381
+ startPlaceholder: "開始日",
382
+ endPlaceholder: "終了日",
383
+ startTimePlaceholder: "開始時間",
384
+ endTimePlaceholder: "終了時間",
385
+ months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
386
+ weeks: ["日", "月", "火", "水", "木", "金", "土"]
387
+ },
388
+ // 時間選択
389
+ timePicker: {
390
+ hour: "時",
391
+ minute: "分",
392
+ second: "秒",
393
+ now: "現在",
394
+ confirm: "確定"
395
+ },
396
+ // アップロード
397
+ upload: {
398
+ selectFile: "ファイルを選択",
399
+ dragTip: "ファイルをここにドラッグ、または",
400
+ clickUpload: "クリックしてアップロード",
401
+ uploadSuccess: "アップロード成功",
402
+ uploadFailed: "アップロード失敗",
403
+ fileSizeLimit: "ファイルサイズは{0}以下にしてください",
404
+ fileTypeLimit: "サポートされていないファイル形式です",
405
+ fileCountLimit: "最大{0}ファイルまでアップロードできます",
406
+ deleteConfirm: "このファイルを削除しますか?",
407
+ preview: "プレビュー",
408
+ download: "ダウンロード",
409
+ remove: "削除"
410
+ },
411
+ // ページネーション
412
+ pagination: {
413
+ total: "合計 {total} 件",
414
+ pageSize: "{size} 件/ページ",
415
+ goto: "移動",
416
+ page: "ページ"
417
+ },
418
+ // 転送
419
+ transfer: {
420
+ searchPlaceholder: "検索",
421
+ noData: "データがありません",
422
+ noMatch: "一致するデータがありません",
423
+ toRight: "右に移動",
424
+ toLeft: "左に移動",
425
+ selectAll: "全選択",
426
+ selected: "{count}件選択済み"
427
+ },
428
+ // ツリー
429
+ tree: {
430
+ expandAll: "すべて展開",
431
+ collapseAll: "すべて折りたたむ",
432
+ searchPlaceholder: "キーワード検索",
433
+ noData: "データがありません"
434
+ },
435
+ // モーダル
436
+ modal: {
437
+ confirm: "確認",
438
+ cancel: "キャンセル",
439
+ close: "閉じる"
440
+ },
441
+ // メッセージ
442
+ message: {
443
+ success: "成功",
444
+ warning: "警告",
445
+ error: "エラー",
446
+ info: "情報"
447
+ },
448
+ // 画像プレビュー
449
+ image: {
450
+ zoomIn: "拡大",
451
+ zoomOut: "縮小",
452
+ rotateLeft: "左に回転",
453
+ rotateRight: "右に回転",
454
+ originalSize: "元のサイズ",
455
+ prev: "前へ",
456
+ next: "次へ"
457
+ },
458
+ // 結果ページ
459
+ result: {
460
+ success: "成功",
461
+ failed: "失敗",
462
+ warning: "警告",
463
+ info: "情報",
464
+ backHome: "ホームに戻る",
465
+ retry: "再試行"
466
+ }
467
+ }, S = {
468
+ // 공통
469
+ confirm: "확인",
470
+ cancel: "취소",
471
+ save: "저장",
472
+ delete: "삭제",
473
+ edit: "편집",
474
+ add: "추가",
475
+ search: "검색",
476
+ reset: "초기화",
477
+ submit: "제출",
478
+ back: "뒤로",
479
+ close: "닫기",
480
+ loading: "로딩 중...",
481
+ noData: "데이터 없음",
482
+ noResult: "결과 없음",
483
+ success: "성공",
484
+ failed: "실패",
485
+ warning: "경고",
486
+ error: "오류",
487
+ info: "정보",
488
+ // 폼
489
+ form: {
490
+ required: "필수 항목입니다",
491
+ invalid: "형식이 올바르지 않습니다",
492
+ minLength: "최소 {0}자 이상 입력하세요",
493
+ maxLength: "최대 {0}자까지 입력 가능합니다",
494
+ min: "{0} 이상이어야 합니다",
495
+ max: "{0} 이하여야 합니다",
496
+ email: "올바른 이메일을 입력하세요",
497
+ phone: "올바른 전화번호를 입력하세요",
498
+ url: "올바른 URL을 입력하세요",
499
+ idCard: "올바른 ID 번호를 입력하세요",
500
+ password: "비밀번호는 6-20자여야 합니다",
501
+ confirmPassword: "비밀번호가 일치하지 않습니다"
502
+ },
503
+ // 테이블
504
+ table: {
505
+ total: "총 {0}개",
506
+ pageSize: "{0}개/페이지",
507
+ goto: "이동",
508
+ page: "페이지",
509
+ prevPage: "이전",
510
+ nextPage: "다음",
511
+ selectAll: "전체 선택",
512
+ sort: "정렬",
513
+ filter: "필터",
514
+ columnSettings: "열 설정",
515
+ expand: "펼치기",
516
+ collapse: "접기"
517
+ },
518
+ // 날짜 선택
519
+ datePicker: {
520
+ year: "년",
521
+ month: "월",
522
+ week: "주",
523
+ day: "일",
524
+ today: "오늘",
525
+ thisWeek: "이번 주",
526
+ thisMonth: "이번 달",
527
+ thisYear: "올해",
528
+ lastWeek: "지난 주",
529
+ lastMonth: "지난 달",
530
+ lastYear: "작년",
531
+ last7Days: "최근 7일",
532
+ last30Days: "최근 30일",
533
+ last90Days: "최근 90일",
534
+ custom: "사용자 지정",
535
+ startPlaceholder: "시작일",
536
+ endPlaceholder: "종료일",
537
+ startTimePlaceholder: "시작 시간",
538
+ endTimePlaceholder: "종료 시간",
539
+ months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
540
+ weeks: ["일", "월", "화", "수", "목", "금", "토"]
541
+ },
542
+ // 시간 선택
543
+ timePicker: {
544
+ hour: "시",
545
+ minute: "분",
546
+ second: "초",
547
+ now: "현재",
548
+ confirm: "확인"
549
+ },
550
+ // 업로드
551
+ upload: {
552
+ selectFile: "파일 선택",
553
+ dragTip: "파일을 여기에 끌어오거나",
554
+ clickUpload: "클릭하여 업로드",
555
+ uploadSuccess: "업로드 성공",
556
+ uploadFailed: "업로드 실패",
557
+ fileSizeLimit: "파일 크기는 {0} 이하여야 합니다",
558
+ fileTypeLimit: "지원하지 않는 파일 형식입니다",
559
+ fileCountLimit: "최대 {0}개까지 업로드 가능합니다",
560
+ deleteConfirm: "이 파일을 삭제하시겠습니까?",
561
+ preview: "미리보기",
562
+ download: "다운로드",
563
+ remove: "삭제"
564
+ },
565
+ // 페이지네이션
566
+ pagination: {
567
+ total: "총 {total}개",
568
+ pageSize: "{size}개/페이지",
569
+ goto: "이동",
570
+ page: "페이지"
571
+ },
572
+ // 트랜스퍼
573
+ transfer: {
574
+ searchPlaceholder: "검색",
575
+ noData: "데이터 없음",
576
+ noMatch: "일치하는 데이터 없음",
577
+ toRight: "오른쪽으로 이동",
578
+ toLeft: "왼쪽으로 이동",
579
+ selectAll: "전체 선택",
580
+ selected: "{count}개 선택됨"
581
+ },
582
+ // 트리
583
+ tree: {
584
+ expandAll: "모두 펼치기",
585
+ collapseAll: "모두 접기",
586
+ searchPlaceholder: "키워드 검색",
587
+ noData: "데이터 없음"
588
+ },
589
+ // 모달
590
+ modal: {
591
+ confirm: "확인",
592
+ cancel: "취소",
593
+ close: "닫기"
594
+ },
595
+ // 메시지
596
+ message: {
597
+ success: "성공",
598
+ warning: "경고",
599
+ error: "오류",
600
+ info: "정보"
601
+ },
602
+ // 이미지 미리보기
603
+ image: {
604
+ zoomIn: "확대",
605
+ zoomOut: "축소",
606
+ rotateLeft: "왼쪽 회전",
607
+ rotateRight: "오른쪽 회전",
608
+ originalSize: "원본 크기",
609
+ prev: "이전",
610
+ next: "다음"
611
+ },
612
+ // 결과 페이지
613
+ result: {
614
+ success: "성공",
615
+ failed: "실패",
616
+ warning: "경고",
617
+ info: "정보",
618
+ backHome: "홈으로",
619
+ retry: "재시도"
620
+ }
621
+ }, c = {
622
+ "zh-CN": m,
623
+ "en-US": x,
624
+ "ja-JP": P,
625
+ "ko-KR": S
626
+ }, v = {
627
+ "zh-CN": "简体中文",
628
+ "en-US": "English",
629
+ "ja-JP": "日本語",
630
+ "ko-KR": "한국어"
631
+ }, u = Symbol("locale"), y = d("zh-CN"), w = d({ ...m });
632
+ function g(a, t) {
633
+ const e = t.split(".");
634
+ let s = a;
635
+ for (const i of e)
636
+ if (s && typeof s == "object" && i in s)
637
+ s = s[i];
638
+ else
639
+ return;
640
+ return typeof s == "string" ? s : void 0;
641
+ }
642
+ function p(a, t) {
643
+ return a.replace(/\{(\d+)\}/g, (e, s) => {
644
+ const i = parseInt(s, 10);
645
+ return t[i] !== void 0 ? String(t[i]) : e;
646
+ });
647
+ }
648
+ function D() {
649
+ const a = h(u, null), t = (a == null ? void 0 : a.locale) || y, e = (a == null ? void 0 : a.messages) || w, s = (o, ...r) => {
650
+ const n = g(e.value, o);
651
+ return n === void 0 ? (console.warn(`[xto-i18n] Missing translation for key: ${o}`), o) : r.length > 0 ? p(n, r) : n;
652
+ }, i = (o) => {
653
+ c[o] ? (t.value = o, e.value = { ...c[o] }) : console.warn(`[xto-i18n] Unknown locale: ${o}`);
654
+ }, l = (o) => {
655
+ e.value = { ...e.value, ...o };
656
+ };
657
+ return {
658
+ locale: t,
659
+ messages: f(() => e.value),
660
+ t: s,
661
+ setLocale: i,
662
+ mergeMessages: l
663
+ };
664
+ }
665
+ function L() {
666
+ return Object.entries(v).map(([a, t]) => ({
667
+ code: a,
668
+ name: t
669
+ }));
670
+ }
671
+ function b(a = "zh-CN") {
672
+ const t = d(a), e = d({ ...c[a] });
673
+ return {
674
+ locale: t,
675
+ messages: e,
676
+ setLocale: (l) => {
677
+ c[l] && (t.value = l, e.value = { ...c[l] });
678
+ },
679
+ mergeMessages: (l) => {
680
+ e.value = { ...e.value, ...l };
681
+ },
682
+ install(l) {
683
+ l.provide(u, {
684
+ locale: t,
685
+ messages: e
686
+ }), l.config.globalProperties.$t = (o, ...r) => {
687
+ const n = g(e.value, o);
688
+ return n === void 0 ? o : r.length > 0 ? p(n, r) : n;
689
+ }, l.config.globalProperties.$locale = t;
690
+ }
691
+ };
692
+ }
693
+ const C = "1.0.0";
5
694
  export {
6
- n as applyCSSVars,
7
- t as applyDarkTheme,
8
- C as b,
9
- S as block,
10
- b as classNames,
11
- f as coerceToArray,
12
- T as compose,
13
- y as constant,
14
- h as createNamespace,
15
- i as cssVarPrefix,
16
- r as darkCSSVars,
17
- D as debounce,
18
- M as deepClone,
19
- v as deepMerge,
20
- N as defaultNamespace,
21
- a as defaultThemeConfig,
22
- O as defaultTo,
23
- P as drawerZIndex,
24
- V as dropdownZIndex,
25
- k as e,
26
- w as element,
27
- A as flatten,
28
- d as generateCSSVars,
29
- x as generateColorPalette,
30
- z as get,
31
- l as getComponentSize,
32
- E as getCurrentZIndex,
33
- F as getType,
34
- L as getZIndexList,
35
- p as hexToRgb,
36
- R as identity,
37
- j as is,
38
- B as isAndroid,
39
- q as isArray,
40
- H as isBoolean,
41
- U as isBrowser,
42
- W as isDate,
43
- G as isDefined,
44
- J as isEmpty,
45
- K as isFalse,
46
- Q as isFunction,
47
- X as isIOS,
48
- Y as isMobile,
49
- _ as isNil,
50
- $ as isNull,
51
- ee as isNumber,
52
- se as isObject,
53
- oe as isPlainObject,
54
- ne as isPromise,
55
- te as isRegExp,
56
- ie as isString,
57
- re as isSupportTouch,
58
- ae as isTrue,
59
- de as isType,
60
- xe as isUndefined,
61
- le as isWechat,
62
- pe as loadingZIndex,
63
- ue as m,
64
- ce as messageZIndex,
65
- u as mixColor,
66
- me as modalZIndex,
67
- Ie as modifier,
68
- ge as nextDrawerZIndex,
69
- Ze as nextDropdownZIndex,
70
- Ce as nextLoadingZIndex,
71
- Se as nextMessageZIndex,
72
- be as nextModalZIndex,
73
- fe as nextPopoverZIndex,
74
- Te as nextSelectZIndex,
75
- ye as nextTooltipZIndex,
76
- he as noop,
77
- De as once,
78
- Me as pipe,
79
- ve as popoverZIndex,
80
- Ne as popupManage,
81
- c as removeCSSVars,
82
- m as removeDarkTheme,
83
- Oe as resetZIndex,
84
- I as rgbToHex,
85
- Pe as selectZIndex,
86
- Ve as set,
87
- ke as shortId,
88
- g as sizeMap,
89
- we as state,
90
- Ae as throttle,
91
- ze as tooltipZIndex,
92
- Ee as tryCatch,
93
- Fe as unary,
94
- Le as unique,
95
- Re as useClass,
96
- We as useClickOutside,
97
- je as useComponentPrefix,
98
- Ge as useDOMObserver,
99
- Je as useDelayedAction,
100
- Ke as useDisabled,
101
- Qe as useEscape,
102
- Xe as useFocus,
103
- Ye as useIntersectionObserver,
104
- _e as useLoading,
105
- $e as useModel,
106
- Be as useNamespace,
107
- es as useResize,
108
- ss as useScroll,
109
- os as useToggle,
110
- ns as useVisible,
111
- qe as useZIndex,
112
- He as uuid,
113
- e as version
695
+ z as applyCSSVars,
696
+ I as applyDarkTheme,
697
+ j as b,
698
+ J as block,
699
+ K as classNames,
700
+ B as coerceToArray,
701
+ $ as compose,
702
+ G as constant,
703
+ b as createLocaleProvider,
704
+ Q as createNamespace,
705
+ R as cssVarPrefix,
706
+ A as darkCSSVars,
707
+ X as debounce,
708
+ _ as deepClone,
709
+ ee as deepMerge,
710
+ ae as defaultNamespace,
711
+ N as defaultThemeConfig,
712
+ te as defaultTo,
713
+ oe as drawerZIndex,
714
+ se as dropdownZIndex,
715
+ le as e,
716
+ ie as element,
717
+ ne as flatten,
718
+ Z as generateCSSVars,
719
+ F as generateColorPalette,
720
+ re as get,
721
+ O as getComponentSize,
722
+ ce as getCurrentZIndex,
723
+ L as getSupportedLocales,
724
+ de as getType,
725
+ me as getZIndexList,
726
+ W as hexToRgb,
727
+ ue as identity,
728
+ ge as is,
729
+ pe as isAndroid,
730
+ he as isArray,
731
+ fe as isBoolean,
732
+ xe as isBrowser,
733
+ Pe as isDate,
734
+ Se as isDefined,
735
+ ve as isEmpty,
736
+ ye as isFalse,
737
+ we as isFunction,
738
+ ke as isIOS,
739
+ De as isMobile,
740
+ Le as isNil,
741
+ be as isNull,
742
+ Ce as isNumber,
743
+ Me as isObject,
744
+ Te as isPlainObject,
745
+ ze as isPromise,
746
+ Ie as isRegExp,
747
+ Re as isString,
748
+ Ae as isSupportTouch,
749
+ Ne as isTrue,
750
+ Ze as isType,
751
+ Fe as isUndefined,
752
+ Oe as isWechat,
753
+ We as loadingZIndex,
754
+ u as localeInjectionKey,
755
+ v as localeNames,
756
+ c as locales,
757
+ Ue as m,
758
+ Ee as messageZIndex,
759
+ U as mixColor,
760
+ Ye as modalZIndex,
761
+ qe as modifier,
762
+ He as nextDrawerZIndex,
763
+ Ve as nextDropdownZIndex,
764
+ je as nextLoadingZIndex,
765
+ Je as nextMessageZIndex,
766
+ Ke as nextModalZIndex,
767
+ Be as nextPopoverZIndex,
768
+ $e as nextSelectZIndex,
769
+ Ge as nextTooltipZIndex,
770
+ Qe as noop,
771
+ Xe as once,
772
+ _e as pipe,
773
+ ea as popoverZIndex,
774
+ aa as popupManage,
775
+ E as removeCSSVars,
776
+ Y as removeDarkTheme,
777
+ ta as resetZIndex,
778
+ q as rgbToHex,
779
+ oa as selectZIndex,
780
+ sa as set,
781
+ la as shortId,
782
+ H as sizeMap,
783
+ ia as state,
784
+ na as throttle,
785
+ ra as tooltipZIndex,
786
+ ca as tryCatch,
787
+ da as unary,
788
+ ma as unique,
789
+ ua as useClass,
790
+ Pa as useClickOutside,
791
+ ga as useComponentPrefix,
792
+ Sa as useDOMObserver,
793
+ va as useDelayedAction,
794
+ ya as useDisabled,
795
+ wa as useEscape,
796
+ ka as useFocus,
797
+ Da as useIntersectionObserver,
798
+ La as useLoading,
799
+ D as useLocale,
800
+ ba as useModel,
801
+ pa as useNamespace,
802
+ Ca as useResize,
803
+ Ma as useScroll,
804
+ Ta as useToggle,
805
+ za as useVisible,
806
+ ha as useZIndex,
807
+ fa as uuid,
808
+ C as version
114
809
  };
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./theme/index.cjs"),e=require("./utils/index.cjs"),n=require("./hooks/index.cjs"),o="1.0.0";exports.applyCSSVars=s.applyCSSVars;exports.applyDarkTheme=s.applyDarkTheme;exports.cssVarPrefix=s.cssVarPrefix;exports.darkCSSVars=s.darkCSSVars;exports.defaultThemeConfig=s.defaultThemeConfig;exports.generateCSSVars=s.generateCSSVars;exports.generateColorPalette=s.generateColorPalette;exports.getComponentSize=s.getComponentSize;exports.hexToRgb=s.hexToRgb;exports.mixColor=s.mixColor;exports.removeCSSVars=s.removeCSSVars;exports.removeDarkTheme=s.removeDarkTheme;exports.rgbToHex=s.rgbToHex;exports.sizeMap=s.sizeMap;exports.b=e.b;exports.block=e.block;exports.classNames=e.classNames;exports.coerceToArray=e.coerceToArray;exports.compose=e.compose;exports.constant=e.constant;exports.createNamespace=e.createNamespace;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.defaultNamespace=e.defaultNamespace;exports.defaultTo=e.defaultTo;exports.drawerZIndex=e.drawerZIndex;exports.dropdownZIndex=e.dropdownZIndex;exports.e=e.e;exports.element=e.element;exports.flatten=e.flatten;exports.get=e.get;exports.getCurrentZIndex=e.getCurrentZIndex;exports.getType=e.getType;exports.getZIndexList=e.getZIndexList;exports.identity=e.identity;exports.is=e.is;exports.isAndroid=e.isAndroid;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isBrowser=e.isBrowser;exports.isDate=e.isDate;exports.isDefined=e.isDefined;exports.isEmpty=e.isEmpty;exports.isFalse=e.isFalse;exports.isFunction=e.isFunction;exports.isIOS=e.isIOS;exports.isMobile=e.isMobile;exports.isNil=e.isNil;exports.isNull=e.isNull;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isPlainObject=e.isPlainObject;exports.isPromise=e.isPromise;exports.isRegExp=e.isRegExp;exports.isString=e.isString;exports.isSupportTouch=e.isSupportTouch;exports.isTrue=e.isTrue;exports.isType=e.isType;exports.isUndefined=e.isUndefined;exports.isWechat=e.isWechat;exports.loadingZIndex=e.loadingZIndex;exports.m=e.m;exports.messageZIndex=e.messageZIndex;exports.modalZIndex=e.modalZIndex;exports.modifier=e.modifier;exports.nextDrawerZIndex=e.nextDrawerZIndex;exports.nextDropdownZIndex=e.nextDropdownZIndex;exports.nextLoadingZIndex=e.nextLoadingZIndex;exports.nextMessageZIndex=e.nextMessageZIndex;exports.nextModalZIndex=e.nextModalZIndex;exports.nextPopoverZIndex=e.nextPopoverZIndex;exports.nextSelectZIndex=e.nextSelectZIndex;exports.nextTooltipZIndex=e.nextTooltipZIndex;exports.noop=e.noop;exports.once=e.once;exports.pipe=e.pipe;exports.popoverZIndex=e.popoverZIndex;exports.popupManage=e.popupManage;exports.resetZIndex=e.resetZIndex;exports.selectZIndex=e.selectZIndex;exports.set=e.set;exports.shortId=e.shortId;exports.state=e.state;exports.throttle=e.throttle;exports.tooltipZIndex=e.tooltipZIndex;exports.tryCatch=e.tryCatch;exports.unary=e.unary;exports.unique=e.unique;exports.useClass=e.useClass;exports.useComponentPrefix=e.useComponentPrefix;exports.useNamespace=e.useNamespace;exports.useZIndex=e.useZIndex;exports.uuid=e.uuid;exports.useClickOutside=n.useClickOutside;exports.useDOMObserver=n.useDOMObserver;exports.useDelayedAction=n.useDelayedAction;exports.useDisabled=n.useDisabled;exports.useEscape=n.useEscape;exports.useFocus=n.useFocus;exports.useIntersectionObserver=n.useIntersectionObserver;exports.useLoading=n.useLoading;exports.useModel=n.useModel;exports.useResize=n.useResize;exports.useScroll=n.useScroll;exports.useToggle=n.useToggle;exports.useVisible=n.useVisible;exports.version=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./theme/index.cjs"),e=require("./utils/index.cjs"),n=require("./hooks/index.cjs"),m=require("vue"),h={confirm:"确认",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",search:"搜索",reset:"重置",submit:"提交",back:"返回",close:"关闭",loading:"加载中...",noData:"暂无数据",noResult:"无匹配结果",success:"操作成功",failed:"操作失败",warning:"警告",error:"错误",info:"提示",form:{required:"此项为必填项",invalid:"格式不正确",minLength:"最少输入 {0} 个字符",maxLength:"最多输入 {0} 个字符",min:"不能小于 {0}",max:"不能大于 {0}",email:"请输入有效的邮箱地址",phone:"请输入有效的手机号码",url:"请输入有效的网址",idCard:"请输入有效的身份证号码",password:"密码长度应为 6-20 个字符",confirmPassword:"两次输入的密码不一致"},table:{total:"共 {0} 条",pageSize:"{0} 条/页",goto:"跳至",page:"页",prevPage:"上一页",nextPage:"下一页",selectAll:"全选",sort:"排序",filter:"筛选",columnSettings:"列设置",expand:"展开",collapse:"收起"},datePicker:{year:"年",month:"月",week:"周",day:"日",today:"今天",thisWeek:"本周",thisMonth:"本月",thisYear:"今年",lastWeek:"上周",lastMonth:"上月",lastYear:"去年",last7Days:"最近 7 天",last30Days:"最近 30 天",last90Days:"最近 90 天",custom:"自定义",startPlaceholder:"开始日期",endPlaceholder:"结束日期",startTimePlaceholder:"开始时间",endTimePlaceholder:"结束时间",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],weeks:["日","一","二","三","四","五","六"]},timePicker:{hour:"时",minute:"分",second:"秒",now:"此刻",confirm:"确定"},upload:{selectFile:"选择文件",dragTip:"将文件拖到此处,或",clickUpload:"点击上传",uploadSuccess:"上传成功",uploadFailed:"上传失败",fileSizeLimit:"文件大小不超过 {0}",fileTypeLimit:"文件格式不支持",fileCountLimit:"最多上传 {0} 个文件",deleteConfirm:"确定删除此文件?",preview:"预览",download:"下载",remove:"删除"},pagination:{total:"共 {total} 条",pageSize:"{size} 条/页",goto:"前往",page:"页"},transfer:{searchPlaceholder:"请输入搜索内容",noData:"暂无数据",noMatch:"无匹配数据",toRight:"移至右侧",toLeft:"移至左侧",selectAll:"全选",selected:"已选 {count} 项"},tree:{expandAll:"展开全部",collapseAll:"收起全部",searchPlaceholder:"搜索关键字",noData:"暂无数据"},modal:{confirm:"确认",cancel:"取消",close:"关闭"},message:{success:"操作成功",warning:"警告提示",error:"错误提示",info:"信息提示"},image:{zoomIn:"放大",zoomOut:"缩小",rotateLeft:"左旋转",rotateRight:"右旋转",originalSize:"原始大小",prev:"上一张",next:"下一张"},result:{success:"操作成功",failed:"操作失败",warning:"警告提示",info:"信息提示",backHome:"返回首页",retry:"重试"}},P={confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",search:"Search",reset:"Reset",submit:"Submit",back:"Back",close:"Close",loading:"Loading...",noData:"No Data",noResult:"No Result",success:"Success",failed:"Failed",warning:"Warning",error:"Error",info:"Info",form:{required:"This field is required",invalid:"Invalid format",minLength:"Minimum {0} characters required",maxLength:"Maximum {0} characters allowed",min:"Must be at least {0}",max:"Must be at most {0}",email:"Please enter a valid email",phone:"Please enter a valid phone number",url:"Please enter a valid URL",idCard:"Please enter a valid ID card number",password:"Password must be 6-20 characters",confirmPassword:"Passwords do not match"},table:{total:"Total {0} items",pageSize:"{0} / page",goto:"Go to",page:"Page",prevPage:"Previous",nextPage:"Next",selectAll:"Select All",sort:"Sort",filter:"Filter",columnSettings:"Column Settings",expand:"Expand",collapse:"Collapse"},datePicker:{year:"Year",month:"Month",week:"Week",day:"Day",today:"Today",thisWeek:"This Week",thisMonth:"This Month",thisYear:"This Year",lastWeek:"Last Week",lastMonth:"Last Month",lastYear:"Last Year",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",custom:"Custom",startPlaceholder:"Start Date",endPlaceholder:"End Date",startTimePlaceholder:"Start Time",endTimePlaceholder:"End Time",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},timePicker:{hour:"Hour",minute:"Minute",second:"Second",now:"Now",confirm:"OK"},upload:{selectFile:"Select File",dragTip:"Drag file here, or",clickUpload:"Click to Upload",uploadSuccess:"Upload Success",uploadFailed:"Upload Failed",fileSizeLimit:"File size must not exceed {0}",fileTypeLimit:"File type not supported",fileCountLimit:"Maximum {0} files allowed",deleteConfirm:"Are you sure to delete this file?",preview:"Preview",download:"Download",remove:"Remove"},pagination:{total:"Total {total} items",pageSize:"{size} / page",goto:"Go to",page:"Page"},transfer:{searchPlaceholder:"Search",noData:"No Data",noMatch:"No Match",toRight:"Move to Right",toLeft:"Move to Left",selectAll:"Select All",selected:"{count} items selected"},tree:{expandAll:"Expand All",collapseAll:"Collapse All",searchPlaceholder:"Search",noData:"No Data"},modal:{confirm:"Confirm",cancel:"Cancel",close:"Close"},message:{success:"Success",warning:"Warning",error:"Error",info:"Info"},image:{zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",originalSize:"Original Size",prev:"Previous",next:"Next"},result:{success:"Success",failed:"Failed",warning:"Warning",info:"Info",backHome:"Back Home",retry:"Retry"}},v={confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",edit:"編集",add:"追加",search:"検索",reset:"リセット",submit:"送信",back:"戻る",close:"閉じる",loading:"読み込み中...",noData:"データがありません",noResult:"結果がありません",success:"成功",failed:"失敗",warning:"警告",error:"エラー",info:"情報",form:{required:"この項目は必須です",invalid:"形式が正しくありません",minLength:"{0}文字以上で入力してください",maxLength:"{0}文字以内で入力してください",min:"{0}以上で入力してください",max:"{0}以下で入力してください",email:"有効なメールアドレスを入力してください",phone:"有効な電話番号を入力してください",url:"有効なURLを入力してください",idCard:"有効なID番号を入力してください",password:"パスワードは6-20文字で入力してください",confirmPassword:"パスワードが一致しません"},table:{total:"合計 {0} 件",pageSize:"{0} 件/ページ",goto:"移動",page:"ページ",prevPage:"前へ",nextPage:"次へ",selectAll:"全選択",sort:"並び替え",filter:"フィルター",columnSettings:"列設定",expand:"展開",collapse:"折りたたむ"},datePicker:{year:"年",month:"月",week:"週",day:"日",today:"今日",thisWeek:"今週",thisMonth:"今月",thisYear:"今年",lastWeek:"先週",lastMonth:"先月",lastYear:"昨年",last7Days:"過去7日間",last30Days:"過去30日間",last90Days:"過去90日間",custom:"カスタム",startPlaceholder:"開始日",endPlaceholder:"終了日",startTimePlaceholder:"開始時間",endTimePlaceholder:"終了時間",months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weeks:["日","月","火","水","木","金","土"]},timePicker:{hour:"時",minute:"分",second:"秒",now:"現在",confirm:"確定"},upload:{selectFile:"ファイルを選択",dragTip:"ファイルをここにドラッグ、または",clickUpload:"クリックしてアップロード",uploadSuccess:"アップロード成功",uploadFailed:"アップロード失敗",fileSizeLimit:"ファイルサイズは{0}以下にしてください",fileTypeLimit:"サポートされていないファイル形式です",fileCountLimit:"最大{0}ファイルまでアップロードできます",deleteConfirm:"このファイルを削除しますか?",preview:"プレビュー",download:"ダウンロード",remove:"削除"},pagination:{total:"合計 {total} 件",pageSize:"{size} 件/ページ",goto:"移動",page:"ページ"},transfer:{searchPlaceholder:"検索",noData:"データがありません",noMatch:"一致するデータがありません",toRight:"右に移動",toLeft:"左に移動",selectAll:"全選択",selected:"{count}件選択済み"},tree:{expandAll:"すべて展開",collapseAll:"すべて折りたたむ",searchPlaceholder:"キーワード検索",noData:"データがありません"},modal:{confirm:"確認",cancel:"キャンセル",close:"閉じる"},message:{success:"成功",warning:"警告",error:"エラー",info:"情報"},image:{zoomIn:"拡大",zoomOut:"縮小",rotateLeft:"左に回転",rotateRight:"右に回転",originalSize:"元のサイズ",prev:"前へ",next:"次へ"},result:{success:"成功",failed:"失敗",warning:"警告",info:"情報",backHome:"ホームに戻る",retry:"再試行"}},y={confirm:"확인",cancel:"취소",save:"저장",delete:"삭제",edit:"편집",add:"추가",search:"검색",reset:"초기화",submit:"제출",back:"뒤로",close:"닫기",loading:"로딩 중...",noData:"데이터 없음",noResult:"결과 없음",success:"성공",failed:"실패",warning:"경고",error:"오류",info:"정보",form:{required:"필수 항목입니다",invalid:"형식이 올바르지 않습니다",minLength:"최소 {0}자 이상 입력하세요",maxLength:"최대 {0}자까지 입력 가능합니다",min:"{0} 이상이어야 합니다",max:"{0} 이하여야 합니다",email:"올바른 이메일을 입력하세요",phone:"올바른 전화번호를 입력하세요",url:"올바른 URL을 입력하세요",idCard:"올바른 ID 번호를 입력하세요",password:"비밀번호는 6-20자여야 합니다",confirmPassword:"비밀번호가 일치하지 않습니다"},table:{total:"총 {0}개",pageSize:"{0}개/페이지",goto:"이동",page:"페이지",prevPage:"이전",nextPage:"다음",selectAll:"전체 선택",sort:"정렬",filter:"필터",columnSettings:"열 설정",expand:"펼치기",collapse:"접기"},datePicker:{year:"년",month:"월",week:"주",day:"일",today:"오늘",thisWeek:"이번 주",thisMonth:"이번 달",thisYear:"올해",lastWeek:"지난 주",lastMonth:"지난 달",lastYear:"작년",last7Days:"최근 7일",last30Days:"최근 30일",last90Days:"최근 90일",custom:"사용자 지정",startPlaceholder:"시작일",endPlaceholder:"종료일",startTimePlaceholder:"시작 시간",endTimePlaceholder:"종료 시간",months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],weeks:["일","월","화","수","목","금","토"]},timePicker:{hour:"시",minute:"분",second:"초",now:"현재",confirm:"확인"},upload:{selectFile:"파일 선택",dragTip:"파일을 여기에 끌어오거나",clickUpload:"클릭하여 업로드",uploadSuccess:"업로드 성공",uploadFailed:"업로드 실패",fileSizeLimit:"파일 크기는 {0} 이하여야 합니다",fileTypeLimit:"지원하지 않는 파일 형식입니다",fileCountLimit:"최대 {0}개까지 업로드 가능합니다",deleteConfirm:"이 파일을 삭제하시겠습니까?",preview:"미리보기",download:"다운로드",remove:"삭제"},pagination:{total:"총 {total}개",pageSize:"{size}개/페이지",goto:"이동",page:"페이지"},transfer:{searchPlaceholder:"검색",noData:"데이터 없음",noMatch:"일치하는 데이터 없음",toRight:"오른쪽으로 이동",toLeft:"왼쪽으로 이동",selectAll:"전체 선택",selected:"{count}개 선택됨"},tree:{expandAll:"모두 펼치기",collapseAll:"모두 접기",searchPlaceholder:"키워드 검색",noData:"데이터 없음"},modal:{confirm:"확인",cancel:"취소",close:"닫기"},message:{success:"성공",warning:"경고",error:"오류",info:"정보"},image:{zoomIn:"확대",zoomOut:"축소",rotateLeft:"왼쪽 회전",rotateRight:"오른쪽 회전",originalSize:"원본 크기",prev:"이전",next:"다음"},result:{success:"성공",failed:"실패",warning:"경고",info:"정보",backHome:"홈으로",retry:"재시도"}},u={"zh-CN":h,"en-US":P,"ja-JP":v,"ko-KR":y},f={"zh-CN":"简体中文","en-US":"English","ja-JP":"日本語","ko-KR":"한국어"},g=Symbol("locale"),I=m.ref("zh-CN"),w=m.ref({...h});function x(t,o){const a=o.split(".");let i=t;for(const c of a)if(i&&typeof i=="object"&&c in i)i=i[c];else return;return typeof i=="string"?i:void 0}function S(t,o){return t.replace(/\{(\d+)\}/g,(a,i)=>{const c=parseInt(i,10);return o[c]!==void 0?String(o[c]):a})}function b(){const t=m.inject(g,null),o=(t==null?void 0:t.locale)||I,a=(t==null?void 0:t.messages)||w,i=(l,...p)=>{const d=x(a.value,l);return d===void 0?(console.warn(`[xto-i18n] Missing translation for key: ${l}`),l):p.length>0?S(d,p):d},c=l=>{u[l]?(o.value=l,a.value={...u[l]}):console.warn(`[xto-i18n] Unknown locale: ${l}`)},r=l=>{a.value={...a.value,...l}};return{locale:o,messages:m.computed(()=>a.value),t:i,setLocale:c,mergeMessages:r}}function D(){return Object.entries(f).map(([t,o])=>({code:t,name:o}))}function k(t="zh-CN"){const o=m.ref(t),a=m.ref({...u[t]});return{locale:o,messages:a,setLocale:r=>{u[r]&&(o.value=r,a.value={...u[r]})},mergeMessages:r=>{a.value={...a.value,...r}},install(r){r.provide(g,{locale:o,messages:a}),r.config.globalProperties.$t=(l,...p)=>{const d=x(a.value,l);return d===void 0?l:p.length>0?S(d,p):d},r.config.globalProperties.$locale=o}}}const C="1.0.0";exports.applyCSSVars=s.applyCSSVars;exports.applyDarkTheme=s.applyDarkTheme;exports.cssVarPrefix=s.cssVarPrefix;exports.darkCSSVars=s.darkCSSVars;exports.defaultThemeConfig=s.defaultThemeConfig;exports.generateCSSVars=s.generateCSSVars;exports.generateColorPalette=s.generateColorPalette;exports.getComponentSize=s.getComponentSize;exports.hexToRgb=s.hexToRgb;exports.mixColor=s.mixColor;exports.removeCSSVars=s.removeCSSVars;exports.removeDarkTheme=s.removeDarkTheme;exports.rgbToHex=s.rgbToHex;exports.sizeMap=s.sizeMap;exports.b=e.b;exports.block=e.block;exports.classNames=e.classNames;exports.coerceToArray=e.coerceToArray;exports.compose=e.compose;exports.constant=e.constant;exports.createNamespace=e.createNamespace;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.defaultNamespace=e.defaultNamespace;exports.defaultTo=e.defaultTo;exports.drawerZIndex=e.drawerZIndex;exports.dropdownZIndex=e.dropdownZIndex;exports.e=e.e;exports.element=e.element;exports.flatten=e.flatten;exports.get=e.get;exports.getCurrentZIndex=e.getCurrentZIndex;exports.getType=e.getType;exports.getZIndexList=e.getZIndexList;exports.identity=e.identity;exports.is=e.is;exports.isAndroid=e.isAndroid;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isBrowser=e.isBrowser;exports.isDate=e.isDate;exports.isDefined=e.isDefined;exports.isEmpty=e.isEmpty;exports.isFalse=e.isFalse;exports.isFunction=e.isFunction;exports.isIOS=e.isIOS;exports.isMobile=e.isMobile;exports.isNil=e.isNil;exports.isNull=e.isNull;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isPlainObject=e.isPlainObject;exports.isPromise=e.isPromise;exports.isRegExp=e.isRegExp;exports.isString=e.isString;exports.isSupportTouch=e.isSupportTouch;exports.isTrue=e.isTrue;exports.isType=e.isType;exports.isUndefined=e.isUndefined;exports.isWechat=e.isWechat;exports.loadingZIndex=e.loadingZIndex;exports.m=e.m;exports.messageZIndex=e.messageZIndex;exports.modalZIndex=e.modalZIndex;exports.modifier=e.modifier;exports.nextDrawerZIndex=e.nextDrawerZIndex;exports.nextDropdownZIndex=e.nextDropdownZIndex;exports.nextLoadingZIndex=e.nextLoadingZIndex;exports.nextMessageZIndex=e.nextMessageZIndex;exports.nextModalZIndex=e.nextModalZIndex;exports.nextPopoverZIndex=e.nextPopoverZIndex;exports.nextSelectZIndex=e.nextSelectZIndex;exports.nextTooltipZIndex=e.nextTooltipZIndex;exports.noop=e.noop;exports.once=e.once;exports.pipe=e.pipe;exports.popoverZIndex=e.popoverZIndex;exports.popupManage=e.popupManage;exports.resetZIndex=e.resetZIndex;exports.selectZIndex=e.selectZIndex;exports.set=e.set;exports.shortId=e.shortId;exports.state=e.state;exports.throttle=e.throttle;exports.tooltipZIndex=e.tooltipZIndex;exports.tryCatch=e.tryCatch;exports.unary=e.unary;exports.unique=e.unique;exports.useClass=e.useClass;exports.useComponentPrefix=e.useComponentPrefix;exports.useNamespace=e.useNamespace;exports.useZIndex=e.useZIndex;exports.uuid=e.uuid;exports.useClickOutside=n.useClickOutside;exports.useDOMObserver=n.useDOMObserver;exports.useDelayedAction=n.useDelayedAction;exports.useDisabled=n.useDisabled;exports.useEscape=n.useEscape;exports.useFocus=n.useFocus;exports.useIntersectionObserver=n.useIntersectionObserver;exports.useLoading=n.useLoading;exports.useModel=n.useModel;exports.useResize=n.useResize;exports.useScroll=n.useScroll;exports.useToggle=n.useToggle;exports.useVisible=n.useVisible;exports.createLocaleProvider=k;exports.getSupportedLocales=D;exports.localeInjectionKey=g;exports.localeNames=f;exports.locales=u;exports.useLocale=b;exports.version=C;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xto/core",
3
- "version": "1.1.0",
4
- "description": "Xto Core - Theme, hooks, utils and types",
3
+ "version": "1.2.0",
4
+ "description": "Xto Core - Theme, hooks, utils, i18n and types",
5
5
  "homepage": "https://jinguchu.github.io/xto-ui/",
6
6
  "repository": {
7
7
  "type": "git",
@@ -31,6 +31,11 @@
31
31
  "import": "./es/utils/index.mjs",
32
32
  "require": "./lib/utils/index.cjs",
33
33
  "types": "./es/utils/index.d.ts"
34
+ },
35
+ "./locale": {
36
+ "import": "./es/locale/index.mjs",
37
+ "require": "./lib/locale/index.cjs",
38
+ "types": "./es/locale/index.d.ts"
34
39
  }
35
40
  },
36
41
  "files": [
@@ -40,17 +45,17 @@
40
45
  "publishConfig": {
41
46
  "access": "public"
42
47
  },
48
+ "scripts": {
49
+ "build": "vite build"
50
+ },
43
51
  "peerDependencies": {
44
52
  "vue": "^3.4.0"
45
53
  },
46
54
  "devDependencies": {
55
+ "@xto/build": "workspace:*",
47
56
  "typescript": "^5.4.2",
48
57
  "vite": "^5.2.0",
49
58
  "vitest": "^1.4.0",
50
- "vue": "^3.4.21",
51
- "@xto/build": "0.1.0"
52
- },
53
- "scripts": {
54
- "build": "vite build"
59
+ "vue": "^3.4.21"
55
60
  }
56
61
  }