@univerjs/design 0.2.1 → 0.2.3

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/lib/es/index.js CHANGED
@@ -12031,16 +12031,14 @@ function um(e) {
12031
12031
  () => {
12032
12032
  requestAnimationFrame(() => {
12033
12033
  if (!l.current) return;
12034
- const { clientWidth: m, clientHeight: g } = l.current, h = l.current.parentElement;
12035
- if (!h) return;
12036
- const { clientWidth: p, clientHeight: y } = h;
12034
+ const { clientWidth: m, clientHeight: g } = l.current, h = window.innerWidth, p = window.innerHeight;
12037
12035
  c(lm(
12038
12036
  {
12039
12037
  position: n,
12040
12038
  width: m,
12041
12039
  height: g,
12042
- containerWidth: p,
12043
- containerHeight: y,
12040
+ containerWidth: h,
12041
+ containerHeight: p,
12044
12042
  direction: r
12045
12043
  }
12046
12044
  ));
@@ -12061,24 +12059,20 @@ function um(e) {
12061
12059
  (C) => C.contains(g.target)
12062
12060
  )))
12063
12061
  return;
12064
- const h = g.offsetX, p = g.offsetY, y = [n, ...(b = d.current) != null ? b : []];
12062
+ const h = g.clientX, p = g.clientY, y = [n, ...(b = d.current) != null ? b : []];
12065
12063
  for (const C of y)
12066
12064
  if (h <= C.right && h >= C.left && p <= C.bottom && p >= C.top)
12067
12065
  return;
12068
12066
  u(g);
12069
12067
  };
12070
- return window.addEventListener("click", m), () => {
12071
- window.removeEventListener("click", m);
12072
- };
12068
+ return window.addEventListener("pointerdown", m), () => window.removeEventListener("pointerdown", m);
12073
12069
  }, [n, n.bottom, n.left, n.right, n.top, u, o]), /* @__PURE__ */ R.createElement(
12074
12070
  "section",
12075
12071
  {
12076
12072
  ref: l,
12077
12073
  style: v,
12078
12074
  className: Lr.popupAbsolute,
12079
- onClick: (m) => {
12080
- m.stopPropagation();
12081
- }
12075
+ onPointerDown: (m) => m.stopPropagation()
12082
12076
  },
12083
12077
  /* @__PURE__ */ R.createElement(im.Provider, { value: n }, t)
12084
12078
  );
@@ -0,0 +1,127 @@
1
+ {
2
+ "design": {
3
+ "Confirm": {
4
+ "cancel": "Hủy bỏ",
5
+ "confirm": "Xác nhận"
6
+ },
7
+ "Slider": {
8
+ "resetTo": "Khôi phục đến"
9
+ },
10
+ "Picker": {
11
+ "name": "vi",
12
+ "weekdays": [
13
+ "chủ nhật",
14
+ "thứ hai",
15
+ "thứ ba",
16
+ "thứ tư",
17
+ "thứ năm",
18
+ "thứ sáu",
19
+ "thứ bảy"
20
+ ],
21
+ "months": [
22
+ "tháng 1",
23
+ "tháng 2",
24
+ "tháng 3",
25
+ "tháng 4",
26
+ "tháng 5",
27
+ "tháng 6",
28
+ "tháng 7",
29
+ "tháng 8",
30
+ "tháng 9",
31
+ "tháng 10",
32
+ "tháng 11",
33
+ "tháng 12"
34
+ ],
35
+ "weekStart": 1,
36
+ "weekdaysShort": [
37
+ "CN",
38
+ "T2",
39
+ "T3",
40
+ "T4",
41
+ "T5",
42
+ "T6",
43
+ "T7"
44
+ ],
45
+ "monthsShort": [
46
+ "Th01",
47
+ "Th02",
48
+ "Th03",
49
+ "Th04",
50
+ "Th05",
51
+ "Th06",
52
+ "Th07",
53
+ "Th08",
54
+ "Th09",
55
+ "Th10",
56
+ "Th11",
57
+ "Th12"
58
+ ],
59
+ "weekdaysMin": [
60
+ "CN",
61
+ "T2",
62
+ "T3",
63
+ "T4",
64
+ "T5",
65
+ "T6",
66
+ "T7"
67
+ ],
68
+ "formats": {
69
+ "LT": "HH:mm",
70
+ "LTS": "HH:mm:ss",
71
+ "L": "DD/MM/YYYY",
72
+ "LL": "D MMMM [năm] YYYY",
73
+ "LLL": "D MMMM [năm] YYYY HH:mm",
74
+ "LLLL": "dddd, D MMMM [năm] YYYY HH:mm",
75
+ "l": "DD/M/YYYY",
76
+ "ll": "D MMM YYYY",
77
+ "lll": "D MMM YYYY HH:mm",
78
+ "llll": "ddd, D MMM YYYY HH:mm"
79
+ },
80
+ "relativeTime": {
81
+ "future": "%s tới",
82
+ "past": "%s trước",
83
+ "s": "vài giây",
84
+ "m": "một phút",
85
+ "mm": "%d phút",
86
+ "h": "một giờ",
87
+ "hh": "%d giờ",
88
+ "d": "một ngày",
89
+ "dd": "%d ngày",
90
+ "M": "một tháng",
91
+ "MM": "%d tháng",
92
+ "y": "một năm",
93
+ "yy": "%d năm"
94
+ },
95
+ "locale": "vi_VN",
96
+ "today": "Hôm nay",
97
+ "now": "Bây giờ",
98
+ "backToToday": "Trở về hôm nay",
99
+ "ok": "OK",
100
+ "clear": "Xóa",
101
+ "month": "Tháng",
102
+ "year": "Năm",
103
+ "timeSelect": "Chọn thời gian",
104
+ "dateSelect": "Chọn ngày",
105
+ "weekSelect": "Chọn tuần",
106
+ "monthSelect": "Chọn tháng",
107
+ "yearSelect": "Chọn năm",
108
+ "decadeSelect": "Chọn thập kỷ",
109
+ "yearFormat": "YYYY",
110
+ "dateFormat": "D/M/YYYY",
111
+ "dayFormat": "D",
112
+ "dateTimeFormat": "D/M/YYYY HH:mm:ss",
113
+ "monthBeforeYear": true,
114
+ "previousMonth": "Tháng trước (PageUp)",
115
+ "nextMonth": "Tháng sau (PageDown)",
116
+ "previousYear": "Năm trước (Control + left)",
117
+ "nextYear": "Năm sau (Control + right)",
118
+ "previousDecade": "Thập kỷ trước",
119
+ "nextDecade": "Thập kỷ sau",
120
+ "previousCentury": "Thế kỷ trước",
121
+ "nextCentury": "Thế kỷ sau"
122
+ },
123
+ "CascaderList": {
124
+ "empty": "Không có"
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "design": {
3
+ "Confirm": {
4
+ "cancel": "取消",
5
+ "confirm": "確定"
6
+ },
7
+ "Slider": {
8
+ "resetTo": "恢復至"
9
+ },
10
+ "Picker": {
11
+ "name": "zh-tw",
12
+ "weekdays": [
13
+ "星期日",
14
+ "星期一",
15
+ "星期二",
16
+ "星期三",
17
+ "星期四",
18
+ "星期五",
19
+ "星期六"
20
+ ],
21
+ "weekdaysShort": [
22
+ "週日",
23
+ "週一",
24
+ "週二",
25
+ "週三",
26
+ "週四",
27
+ "週五",
28
+ "週六"
29
+ ],
30
+ "weekdaysMin": [
31
+ "日",
32
+ "一",
33
+ "二",
34
+ "三",
35
+ "四",
36
+ "五",
37
+ "六"
38
+ ],
39
+ "months": [
40
+ "一月",
41
+ "二月",
42
+ "三月",
43
+ "四月",
44
+ "五月",
45
+ "六月",
46
+ "七月",
47
+ "八月",
48
+ "九月",
49
+ "十月",
50
+ "十一月",
51
+ "十二月"
52
+ ],
53
+ "monthsShort": [
54
+ "1月",
55
+ "2月",
56
+ "3月",
57
+ "4月",
58
+ "5月",
59
+ "6月",
60
+ "7月",
61
+ "8月",
62
+ "9月",
63
+ "10月",
64
+ "11月",
65
+ "12月"
66
+ ],
67
+ "formats": {
68
+ "LT": "HH:mm",
69
+ "LTS": "HH:mm:ss",
70
+ "L": "YYYY/MM/DD",
71
+ "LL": "YYYY年M月D日",
72
+ "LLL": "YYYY年M月D日 HH:mm",
73
+ "LLLL": "YYYY年M月D日dddd HH:mm",
74
+ "l": "YYYY/M/D",
75
+ "ll": "YYYY年M月D日",
76
+ "lll": "YYYY年M月D日 HH:mm",
77
+ "llll": "YYYY年M月D日dddd HH:mm"
78
+ },
79
+ "relativeTime": {
80
+ "future": "%s內",
81
+ "past": "%s前",
82
+ "s": "幾秒",
83
+ "m": "1 分鐘",
84
+ "mm": "%d 分鐘",
85
+ "h": "1 小時",
86
+ "hh": "%d 小時",
87
+ "d": "1 天",
88
+ "dd": "%d 天",
89
+ "M": "1 個月",
90
+ "MM": "%d 個月",
91
+ "y": "1 年",
92
+ "yy": "%d 年"
93
+ },
94
+ "locale": "zh_TW",
95
+ "today": "今天",
96
+ "now": "此刻",
97
+ "backToToday": "返回今天",
98
+ "ok": "確定",
99
+ "timeSelect": "選擇時間",
100
+ "dateSelect": "選擇日期",
101
+ "weekSelect": "選擇周",
102
+ "clear": "清除",
103
+ "month": "月",
104
+ "year": "年",
105
+ "previousMonth": "上個月 (翻頁上鍵)",
106
+ "nextMonth": "下個月 (翻頁下鍵)",
107
+ "monthSelect": "選擇月份",
108
+ "yearSelect": "選擇年份",
109
+ "decadeSelect": "選擇年代",
110
+ "yearFormat": "YYYY年",
111
+ "dayFormat": "D",
112
+ "dateFormat": "YYYY年M月D日",
113
+ "dateTimeFormat": "YYYY年M月D日 HH時mm分ss秒",
114
+ "previousYear": "上一年 (Control鍵加左方向鍵)",
115
+ "nextYear": "下一年 (Control鍵加右方向鍵)",
116
+ "previousDecade": "上一年代",
117
+ "nextDecade": "下一年代",
118
+ "previousCentury": "上一世紀",
119
+ "nextCentury": "下一世紀"
120
+ },
121
+ "CascaderList": {
122
+ "empty": "無"
123
+ }
124
+ }
125
+ }
@@ -0,0 +1,4 @@
1
+ import { ILocale } from './interface';
2
+
3
+ declare const locale: ILocale;
4
+ export default locale;
@@ -0,0 +1,4 @@
1
+ import { ILocale } from './interface';
2
+
3
+ declare const locale: ILocale;
4
+ export default locale;