@univerjs/design 0.6.7 → 0.6.8

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.
@@ -0,0 +1,478 @@
1
+ function _e(i) {
2
+ return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
3
+ }
4
+ var Z = { exports: {} }, z = { exports: {} }, ve = z.exports, ue;
5
+ function $e() {
6
+ return ue || (ue = 1, function(i, m) {
7
+ (function(l, a) {
8
+ i.exports = a();
9
+ })(ve, function() {
10
+ var l = 1e3, a = 6e4, h = 36e5, d = "millisecond", _ = "second", v = "minute", g = "hour", O = "day", w = "week", D = "month", T = "quarter", Y = "year", f = "date", j = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, P = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, H = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
11
+ var r = ["th", "st", "nd", "rd"], e = u % 100;
12
+ return "[" + u + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
13
+ } }, V = function(u, r, e) {
14
+ var n = String(u);
15
+ return !n || n.length >= r ? u : "" + Array(r + 1 - n.length).join(e) + u;
16
+ }, me = { s: V, z: function(u) {
17
+ var r = -u.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), t = e % 60;
18
+ return (r <= 0 ? "+" : "-") + V(n, 2, "0") + ":" + V(t, 2, "0");
19
+ }, m: function u(r, e) {
20
+ if (r.date() < e.date()) return -u(e, r);
21
+ var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(n, D), o = e - t < 0, s = r.clone().add(n + (o ? -1 : 1), D);
22
+ return +(-(n + (e - t) / (o ? t - s : s - t)) || 0);
23
+ }, a: function(u) {
24
+ return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
25
+ }, p: function(u) {
26
+ return { M: D, y: Y, w, d: O, D: f, h: g, m: v, s: _, ms: d, Q: T }[u] || String(u || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(u) {
28
+ return u === void 0;
29
+ } }, U = "en", q = {};
30
+ q[U] = H;
31
+ var ne = "$isDayjsObject", B = function(u) {
32
+ return u instanceof N || !(!u || !u[ne]);
33
+ }, K = function u(r, e, n) {
34
+ var t;
35
+ if (!r) return U;
36
+ if (typeof r == "string") {
37
+ var o = r.toLowerCase();
38
+ q[o] && (t = o), e && (q[o] = e, t = o);
39
+ var s = r.split("-");
40
+ if (!t && s.length > 1) return u(s[0]);
41
+ } else {
42
+ var p = r.name;
43
+ q[p] = r, t = p;
44
+ }
45
+ return !n && t && (U = t), t || !n && U;
46
+ }, $ = function(u, r) {
47
+ if (B(u)) return u.clone();
48
+ var e = typeof r == "object" ? r : {};
49
+ return e.date = u, e.args = arguments, new N(e);
50
+ }, c = me;
51
+ c.l = K, c.i = B, c.w = function(u, r) {
52
+ return $(u, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
53
+ };
54
+ var N = function() {
55
+ function u(e) {
56
+ this.$L = K(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[ne] = !0;
57
+ }
58
+ var r = u.prototype;
59
+ return r.parse = function(e) {
60
+ this.$d = function(n) {
61
+ var t = n.date, o = n.utc;
62
+ if (t === null) return /* @__PURE__ */ new Date(NaN);
63
+ if (c.u(t)) return /* @__PURE__ */ new Date();
64
+ if (t instanceof Date) return new Date(t);
65
+ if (typeof t == "string" && !/Z$/i.test(t)) {
66
+ var s = t.match(E);
67
+ if (s) {
68
+ var p = s[2] - 1 || 0, y = (s[7] || "0").substring(0, 3);
69
+ return o ? new Date(Date.UTC(s[1], p, s[3] || 1, s[4] || 0, s[5] || 0, s[6] || 0, y)) : new Date(s[1], p, s[3] || 1, s[4] || 0, s[5] || 0, s[6] || 0, y);
70
+ }
71
+ }
72
+ return new Date(t);
73
+ }(e), this.init();
74
+ }, r.init = function() {
75
+ var e = this.$d;
76
+ this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
77
+ }, r.$utils = function() {
78
+ return c;
79
+ }, r.isValid = function() {
80
+ return this.$d.toString() !== j;
81
+ }, r.isSame = function(e, n) {
82
+ var t = $(e);
83
+ return this.startOf(n) <= t && t <= this.endOf(n);
84
+ }, r.isAfter = function(e, n) {
85
+ return $(e) < this.startOf(n);
86
+ }, r.isBefore = function(e, n) {
87
+ return this.endOf(n) < $(e);
88
+ }, r.$g = function(e, n, t) {
89
+ return c.u(e) ? this[n] : this.set(t, e);
90
+ }, r.unix = function() {
91
+ return Math.floor(this.valueOf() / 1e3);
92
+ }, r.valueOf = function() {
93
+ return this.$d.getTime();
94
+ }, r.startOf = function(e, n) {
95
+ var t = this, o = !!c.u(n) || n, s = c.p(e), p = function(k, b) {
96
+ var R = c.w(t.$u ? Date.UTC(t.$y, b, k) : new Date(t.$y, b, k), t);
97
+ return o ? R : R.endOf(O);
98
+ }, y = function(k, b) {
99
+ return c.w(t.toDate()[k].apply(t.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(b)), t);
100
+ }, M = this.$W, x = this.$M, S = this.$D, C = "set" + (this.$u ? "UTC" : "");
101
+ switch (s) {
102
+ case Y:
103
+ return o ? p(1, 0) : p(31, 11);
104
+ case D:
105
+ return o ? p(1, x) : p(0, x + 1);
106
+ case w:
107
+ var L = this.$locale().weekStart || 0, F = (M < L ? M + 7 : M) - L;
108
+ return p(o ? S - F : S + (6 - F), x);
109
+ case O:
110
+ case f:
111
+ return y(C + "Hours", 0);
112
+ case g:
113
+ return y(C + "Minutes", 1);
114
+ case v:
115
+ return y(C + "Seconds", 2);
116
+ case _:
117
+ return y(C + "Milliseconds", 3);
118
+ default:
119
+ return this.clone();
120
+ }
121
+ }, r.endOf = function(e) {
122
+ return this.startOf(e, !1);
123
+ }, r.$set = function(e, n) {
124
+ var t, o = c.p(e), s = "set" + (this.$u ? "UTC" : ""), p = (t = {}, t[O] = s + "Date", t[f] = s + "Date", t[D] = s + "Month", t[Y] = s + "FullYear", t[g] = s + "Hours", t[v] = s + "Minutes", t[_] = s + "Seconds", t[d] = s + "Milliseconds", t)[o], y = o === O ? this.$D + (n - this.$W) : n;
125
+ if (o === D || o === Y) {
126
+ var M = this.clone().set(f, 1);
127
+ M.$d[p](y), M.init(), this.$d = M.set(f, Math.min(this.$D, M.daysInMonth())).$d;
128
+ } else p && this.$d[p](y);
129
+ return this.init(), this;
130
+ }, r.set = function(e, n) {
131
+ return this.clone().$set(e, n);
132
+ }, r.get = function(e) {
133
+ return this[c.p(e)]();
134
+ }, r.add = function(e, n) {
135
+ var t, o = this;
136
+ e = Number(e);
137
+ var s = c.p(n), p = function(x) {
138
+ var S = $(o);
139
+ return c.w(S.date(S.date() + Math.round(x * e)), o);
140
+ };
141
+ if (s === D) return this.set(D, this.$M + e);
142
+ if (s === Y) return this.set(Y, this.$y + e);
143
+ if (s === O) return p(1);
144
+ if (s === w) return p(7);
145
+ var y = (t = {}, t[v] = a, t[g] = h, t[_] = l, t)[s] || 1, M = this.$d.getTime() + e * y;
146
+ return c.w(M, this);
147
+ }, r.subtract = function(e, n) {
148
+ return this.add(-1 * e, n);
149
+ }, r.format = function(e) {
150
+ var n = this, t = this.$locale();
151
+ if (!this.isValid()) return t.invalidDate || j;
152
+ var o = e || "YYYY-MM-DDTHH:mm:ssZ", s = c.z(this), p = this.$H, y = this.$m, M = this.$M, x = t.weekdays, S = t.months, C = t.meridiem, L = function(b, R, W, J) {
153
+ return b && (b[R] || b(n, o)) || W[R].slice(0, J);
154
+ }, F = function(b) {
155
+ return c.s(p % 12 || 12, b, "0");
156
+ }, k = C || function(b, R, W) {
157
+ var J = b < 12 ? "AM" : "PM";
158
+ return W ? J.toLowerCase() : J;
159
+ };
160
+ return o.replace(P, function(b, R) {
161
+ return R || function(W) {
162
+ switch (W) {
163
+ case "YY":
164
+ return String(n.$y).slice(-2);
165
+ case "YYYY":
166
+ return c.s(n.$y, 4, "0");
167
+ case "M":
168
+ return M + 1;
169
+ case "MM":
170
+ return c.s(M + 1, 2, "0");
171
+ case "MMM":
172
+ return L(t.monthsShort, M, S, 3);
173
+ case "MMMM":
174
+ return L(S, M);
175
+ case "D":
176
+ return n.$D;
177
+ case "DD":
178
+ return c.s(n.$D, 2, "0");
179
+ case "d":
180
+ return String(n.$W);
181
+ case "dd":
182
+ return L(t.weekdaysMin, n.$W, x, 2);
183
+ case "ddd":
184
+ return L(t.weekdaysShort, n.$W, x, 3);
185
+ case "dddd":
186
+ return x[n.$W];
187
+ case "H":
188
+ return String(p);
189
+ case "HH":
190
+ return c.s(p, 2, "0");
191
+ case "h":
192
+ return F(1);
193
+ case "hh":
194
+ return F(2);
195
+ case "a":
196
+ return k(p, y, !0);
197
+ case "A":
198
+ return k(p, y, !1);
199
+ case "m":
200
+ return String(y);
201
+ case "mm":
202
+ return c.s(y, 2, "0");
203
+ case "s":
204
+ return String(n.$s);
205
+ case "ss":
206
+ return c.s(n.$s, 2, "0");
207
+ case "SSS":
208
+ return c.s(n.$ms, 3, "0");
209
+ case "Z":
210
+ return s;
211
+ }
212
+ return null;
213
+ }(b) || s.replace(":", "");
214
+ });
215
+ }, r.utcOffset = function() {
216
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
+ }, r.diff = function(e, n, t) {
218
+ var o, s = this, p = c.p(n), y = $(e), M = (y.utcOffset() - this.utcOffset()) * a, x = this - y, S = function() {
219
+ return c.m(s, y);
220
+ };
221
+ switch (p) {
222
+ case Y:
223
+ o = S() / 12;
224
+ break;
225
+ case D:
226
+ o = S();
227
+ break;
228
+ case T:
229
+ o = S() / 3;
230
+ break;
231
+ case w:
232
+ o = (x - M) / 6048e5;
233
+ break;
234
+ case O:
235
+ o = (x - M) / 864e5;
236
+ break;
237
+ case g:
238
+ o = x / h;
239
+ break;
240
+ case v:
241
+ o = x / a;
242
+ break;
243
+ case _:
244
+ o = x / l;
245
+ break;
246
+ default:
247
+ o = x;
248
+ }
249
+ return t ? o : c.a(o);
250
+ }, r.daysInMonth = function() {
251
+ return this.endOf(D).$D;
252
+ }, r.$locale = function() {
253
+ return q[this.$L];
254
+ }, r.locale = function(e, n) {
255
+ if (!e) return this.$L;
256
+ var t = this.clone(), o = K(e, n, !0);
257
+ return o && (t.$L = o), t;
258
+ }, r.clone = function() {
259
+ return c.w(this.$d, this);
260
+ }, r.toDate = function() {
261
+ return new Date(this.valueOf());
262
+ }, r.toJSON = function() {
263
+ return this.isValid() ? this.toISOString() : null;
264
+ }, r.toISOString = function() {
265
+ return this.$d.toISOString();
266
+ }, r.toString = function() {
267
+ return this.$d.toUTCString();
268
+ }, u;
269
+ }(), ie = N.prototype;
270
+ return $.prototype = ie, [["$ms", d], ["$s", _], ["$m", v], ["$H", g], ["$W", O], ["$M", D], ["$y", Y], ["$D", f]].forEach(function(u) {
271
+ ie[u[1]] = function(r) {
272
+ return this.$g(r, u[0], u[1]);
273
+ };
274
+ }), $.extend = function(u, r) {
275
+ return u.$i || (u(r, N, $), u.$i = !0), $;
276
+ }, $.locale = K, $.isDayjs = B, $.unix = function(u) {
277
+ return $(1e3 * u);
278
+ }, $.en = q[U], $.Ls = q, $.p = {}, $;
279
+ });
280
+ }(z)), z.exports;
281
+ }
282
+ var Me = Z.exports, oe;
283
+ function xe() {
284
+ return oe || (oe = 1, function(i, m) {
285
+ (function(l, a) {
286
+ i.exports = a($e());
287
+ })(Me, function(l) {
288
+ function a(f) {
289
+ return f && typeof f == "object" && "default" in f ? f : { default: f };
290
+ }
291
+ var h = a(l), d = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), _ = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), v = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), g = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), O = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
292
+ function w(f, j, E) {
293
+ var P, H;
294
+ return E === "m" ? j ? "минута" : "минуту" : f + " " + (P = +f, H = { mm: j ? "минута_минуты_минут" : "минуту_минуты_минут", hh: "час_часа_часов", dd: "день_дня_дней", MM: "месяц_месяца_месяцев", yy: "год_года_лет" }[E].split("_"), P % 10 == 1 && P % 100 != 11 ? H[0] : P % 10 >= 2 && P % 10 <= 4 && (P % 100 < 10 || P % 100 >= 20) ? H[1] : H[2]);
295
+ }
296
+ var D = function(f, j) {
297
+ return O.test(j) ? d[f.month()] : _[f.month()];
298
+ };
299
+ D.s = _, D.f = d;
300
+ var T = function(f, j) {
301
+ return O.test(j) ? v[f.month()] : g[f.month()];
302
+ };
303
+ T.s = g, T.f = v;
304
+ var Y = { name: "ru", weekdays: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"), weekdaysShort: "вск_пнд_втр_срд_чтв_птн_сбт".split("_"), weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"), months: D, monthsShort: T, weekStart: 1, yearStart: 4, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY г.", LLL: "D MMMM YYYY г., H:mm", LLLL: "dddd, D MMMM YYYY г., H:mm" }, relativeTime: { future: "через %s", past: "%s назад", s: "несколько секунд", m: w, mm: w, h: "час", hh: w, d: "день", dd: w, M: "месяц", MM: w, y: "год", yy: w }, ordinal: function(f) {
305
+ return f;
306
+ }, meridiem: function(f) {
307
+ return f < 4 ? "ночи" : f < 12 ? "утра" : f < 17 ? "дня" : "вечера";
308
+ } };
309
+ return h.default.locale(Y, null, !0), Y;
310
+ });
311
+ }(Z)), Z.exports;
312
+ }
313
+ var De = xe();
314
+ const be = /* @__PURE__ */ _e(De);
315
+ var A = {}, Q = { exports: {} }, se;
316
+ function Se() {
317
+ return se || (se = 1, function(i) {
318
+ function m(l) {
319
+ return l && l.__esModule ? l : {
320
+ default: l
321
+ };
322
+ }
323
+ i.exports = m, i.exports.__esModule = !0, i.exports.default = i.exports;
324
+ }(Q)), Q.exports;
325
+ }
326
+ var G = { exports: {} }, X = { exports: {} }, ee = { exports: {} }, te = { exports: {} }, ae;
327
+ function ye() {
328
+ return ae || (ae = 1, function(i) {
329
+ function m(l) {
330
+ "@babel/helpers - typeof";
331
+ return i.exports = m = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
332
+ return typeof a;
333
+ } : function(a) {
334
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
335
+ }, i.exports.__esModule = !0, i.exports.default = i.exports, m(l);
336
+ }
337
+ i.exports = m, i.exports.__esModule = !0, i.exports.default = i.exports;
338
+ }(te)), te.exports;
339
+ }
340
+ var re = { exports: {} }, ce;
341
+ function ge() {
342
+ return ce || (ce = 1, function(i) {
343
+ var m = ye().default;
344
+ function l(a, h) {
345
+ if (m(a) != "object" || !a) return a;
346
+ var d = a[Symbol.toPrimitive];
347
+ if (d !== void 0) {
348
+ var _ = d.call(a, h || "default");
349
+ if (m(_) != "object") return _;
350
+ throw new TypeError("@@toPrimitive must return a primitive value.");
351
+ }
352
+ return (h === "string" ? String : Number)(a);
353
+ }
354
+ i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
355
+ }(re)), re.exports;
356
+ }
357
+ var fe;
358
+ function Oe() {
359
+ return fe || (fe = 1, function(i) {
360
+ var m = ye().default, l = ge();
361
+ function a(h) {
362
+ var d = l(h, "string");
363
+ return m(d) == "symbol" ? d : d + "";
364
+ }
365
+ i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
366
+ }(ee)), ee.exports;
367
+ }
368
+ var pe;
369
+ function we() {
370
+ return pe || (pe = 1, function(i) {
371
+ var m = Oe();
372
+ function l(a, h, d) {
373
+ return (h = m(h)) in a ? Object.defineProperty(a, h, {
374
+ value: d,
375
+ enumerable: !0,
376
+ configurable: !0,
377
+ writable: !0
378
+ }) : a[h] = d, a;
379
+ }
380
+ i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
381
+ }(X)), X.exports;
382
+ }
383
+ var le;
384
+ function Ye() {
385
+ return le || (le = 1, function(i) {
386
+ var m = we();
387
+ function l(h, d) {
388
+ var _ = Object.keys(h);
389
+ if (Object.getOwnPropertySymbols) {
390
+ var v = Object.getOwnPropertySymbols(h);
391
+ d && (v = v.filter(function(g) {
392
+ return Object.getOwnPropertyDescriptor(h, g).enumerable;
393
+ })), _.push.apply(_, v);
394
+ }
395
+ return _;
396
+ }
397
+ function a(h) {
398
+ for (var d = 1; d < arguments.length; d++) {
399
+ var _ = arguments[d] != null ? arguments[d] : {};
400
+ d % 2 ? l(Object(_), !0).forEach(function(v) {
401
+ m(h, v, _[v]);
402
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(_)) : l(Object(_)).forEach(function(v) {
403
+ Object.defineProperty(h, v, Object.getOwnPropertyDescriptor(_, v));
404
+ });
405
+ }
406
+ return h;
407
+ }
408
+ i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
409
+ }(G)), G.exports;
410
+ }
411
+ var I = {}, de;
412
+ function je() {
413
+ return de || (de = 1, Object.defineProperty(I, "__esModule", {
414
+ value: !0
415
+ }), I.commonLocale = void 0, I.commonLocale = {
416
+ yearFormat: "YYYY",
417
+ dayFormat: "D",
418
+ cellMeridiemFormat: "A",
419
+ monthBeforeYear: !0
420
+ }), I;
421
+ }
422
+ var he;
423
+ function Pe() {
424
+ if (he) return A;
425
+ he = 1;
426
+ var i = Se().default;
427
+ Object.defineProperty(A, "__esModule", {
428
+ value: !0
429
+ }), A.default = void 0;
430
+ var m = i(Ye()), l = je(), a = (0, m.default)((0, m.default)({}, l.commonLocale), {}, {
431
+ locale: "ru_RU",
432
+ today: "Сегодня",
433
+ now: "Сейчас",
434
+ backToToday: "Текущая дата",
435
+ ok: "ОК",
436
+ clear: "Очистить",
437
+ month: "Месяц",
438
+ year: "Год",
439
+ timeSelect: "Выбрать время",
440
+ dateSelect: "Выбрать дату",
441
+ monthSelect: "Выбрать месяц",
442
+ yearSelect: "Выбрать год",
443
+ decadeSelect: "Выбрать десятилетие",
444
+ dateFormat: "D-M-YYYY",
445
+ dateTimeFormat: "D-M-YYYY HH:mm:ss",
446
+ previousMonth: "Предыдущий месяц (PageUp)",
447
+ nextMonth: "Следующий месяц (PageDown)",
448
+ previousYear: "Предыдущий год (Control + left)",
449
+ nextYear: "Следующий год (Control + right)",
450
+ previousDecade: "Предыдущее десятилетие",
451
+ nextDecade: "Следущее десятилетие",
452
+ previousCentury: "Предыдущий век",
453
+ nextCentury: "Следующий век"
454
+ });
455
+ return A.default = a, A;
456
+ }
457
+ var Re = Pe();
458
+ const qe = /* @__PURE__ */ _e(Re), Le = {
459
+ design: {
460
+ Confirm: {
461
+ cancel: "отмена",
462
+ confirm: "ок"
463
+ },
464
+ Picker: {
465
+ ...be,
466
+ ...qe
467
+ },
468
+ CascaderList: {
469
+ empty: "Нет"
470
+ },
471
+ Select: {
472
+ empty: "Нет"
473
+ }
474
+ }
475
+ };
476
+ export {
477
+ Le as default
478
+ };