@univerjs/design 0.9.2 → 0.9.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.
@@ -0,0 +1,469 @@
1
+ function de(i) {
2
+ return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
3
+ }
4
+ var I = { exports: {} }, K = { exports: {} }, _e = K.exports, re;
5
+ function $e() {
6
+ return re || (re = 1, function(i, y) {
7
+ (function(d, u) {
8
+ i.exports = u();
9
+ })(_e, function() {
10
+ var d = 1e3, u = 6e4, h = 36e5, p = "millisecond", f = "second", $ = "minute", S = "hour", D = "day", R = "week", x = "month", G = "quarter", O = "year", k = "date", X = "Invalid Date", he = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, me = /\[([^\]]+)]|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, ye = { 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(o) {
11
+ var r = ["th", "st", "nd", "rd"], e = o % 100;
12
+ return "[" + o + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
13
+ } }, N = function(o, r, e) {
14
+ var n = String(o);
15
+ return !n || n.length >= r ? o : "" + Array(r + 1 - n.length).join(e) + o;
16
+ }, ve = { s: N, z: function(o) {
17
+ var r = -o.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), t = e % 60;
18
+ return (r <= 0 ? "+" : "-") + N(n, 2, "0") + ":" + N(t, 2, "0");
19
+ }, m: function o(r, e) {
20
+ if (r.date() < e.date()) return -o(e, r);
21
+ var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(n, x), s = e - t < 0, a = r.clone().add(n + (s ? -1 : 1), x);
22
+ return +(-(n + (e - t) / (s ? t - a : a - t)) || 0);
23
+ }, a: function(o) {
24
+ return o < 0 ? Math.ceil(o) || 0 : Math.floor(o);
25
+ }, p: function(o) {
26
+ return { M: x, y: O, w: R, d: D, D: k, h: S, m: $, s: f, ms: p, Q: G }[o] || String(o || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(o) {
28
+ return o === void 0;
29
+ } }, L = "en", Y = {};
30
+ Y[L] = ye;
31
+ var ee = "$isDayjsObject", U = function(o) {
32
+ return o instanceof F || !(!o || !o[ee]);
33
+ }, A = function o(r, e, n) {
34
+ var t;
35
+ if (!r) return L;
36
+ if (typeof r == "string") {
37
+ var s = r.toLowerCase();
38
+ Y[s] && (t = s), e && (Y[s] = e, t = s);
39
+ var a = r.split("-");
40
+ if (!t && a.length > 1) return o(a[0]);
41
+ } else {
42
+ var l = r.name;
43
+ Y[l] = r, t = l;
44
+ }
45
+ return !n && t && (L = t), t || !n && L;
46
+ }, v = function(o, r) {
47
+ if (U(o)) return o.clone();
48
+ var e = typeof r == "object" ? r : {};
49
+ return e.date = o, e.args = arguments, new F(e);
50
+ }, c = ve;
51
+ c.l = A, c.i = U, c.w = function(o, r) {
52
+ return v(o, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
53
+ };
54
+ var F = function() {
55
+ function o(e) {
56
+ this.$L = A(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[ee] = !0;
57
+ }
58
+ var r = o.prototype;
59
+ return r.parse = function(e) {
60
+ this.$d = function(n) {
61
+ var t = n.date, s = 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 a = t.match(he);
67
+ if (a) {
68
+ var l = a[2] - 1 || 0, m = (a[7] || "0").substring(0, 3);
69
+ return s ? new Date(Date.UTC(a[1], l, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, m)) : new Date(a[1], l, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, m);
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() !== X;
81
+ }, r.isSame = function(e, n) {
82
+ var t = v(e);
83
+ return this.startOf(n) <= t && t <= this.endOf(n);
84
+ }, r.isAfter = function(e, n) {
85
+ return v(e) < this.startOf(n);
86
+ }, r.isBefore = function(e, n) {
87
+ return this.endOf(n) < v(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, s = !!c.u(n) || n, a = c.p(e), l = function(P, b) {
96
+ var w = c.w(t.$u ? Date.UTC(t.$y, b, P) : new Date(t.$y, b, P), t);
97
+ return s ? w : w.endOf(D);
98
+ }, m = function(P, b) {
99
+ return c.w(t.toDate()[P].apply(t.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(b)), t);
100
+ }, _ = this.$W, M = this.$M, g = this.$D, q = "set" + (this.$u ? "UTC" : "");
101
+ switch (a) {
102
+ case O:
103
+ return s ? l(1, 0) : l(31, 11);
104
+ case x:
105
+ return s ? l(1, M) : l(0, M + 1);
106
+ case R:
107
+ var j = this.$locale().weekStart || 0, E = (_ < j ? _ + 7 : _) - j;
108
+ return l(s ? g - E : g + (6 - E), M);
109
+ case D:
110
+ case k:
111
+ return m(q + "Hours", 0);
112
+ case S:
113
+ return m(q + "Minutes", 1);
114
+ case $:
115
+ return m(q + "Seconds", 2);
116
+ case f:
117
+ return m(q + "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, s = c.p(e), a = "set" + (this.$u ? "UTC" : ""), l = (t = {}, t[D] = a + "Date", t[k] = a + "Date", t[x] = a + "Month", t[O] = a + "FullYear", t[S] = a + "Hours", t[$] = a + "Minutes", t[f] = a + "Seconds", t[p] = a + "Milliseconds", t)[s], m = s === D ? this.$D + (n - this.$W) : n;
125
+ if (s === x || s === O) {
126
+ var _ = this.clone().set(k, 1);
127
+ _.$d[l](m), _.init(), this.$d = _.set(k, Math.min(this.$D, _.daysInMonth())).$d;
128
+ } else l && this.$d[l](m);
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, s = this;
136
+ e = Number(e);
137
+ var a = c.p(n), l = function(M) {
138
+ var g = v(s);
139
+ return c.w(g.date(g.date() + Math.round(M * e)), s);
140
+ };
141
+ if (a === x) return this.set(x, this.$M + e);
142
+ if (a === O) return this.set(O, this.$y + e);
143
+ if (a === D) return l(1);
144
+ if (a === R) return l(7);
145
+ var m = (t = {}, t[$] = u, t[S] = h, t[f] = d, t)[a] || 1, _ = this.$d.getTime() + e * m;
146
+ return c.w(_, 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 || X;
152
+ var s = e || "YYYY-MM-DDTHH:mm:ssZ", a = c.z(this), l = this.$H, m = this.$m, _ = this.$M, M = t.weekdays, g = t.months, q = t.meridiem, j = function(b, w, T, W) {
153
+ return b && (b[w] || b(n, s)) || T[w].slice(0, W);
154
+ }, E = function(b) {
155
+ return c.s(l % 12 || 12, b, "0");
156
+ }, P = q || function(b, w, T) {
157
+ var W = b < 12 ? "AM" : "PM";
158
+ return T ? W.toLowerCase() : W;
159
+ };
160
+ return s.replace(me, function(b, w) {
161
+ return w || function(T) {
162
+ switch (T) {
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 _ + 1;
169
+ case "MM":
170
+ return c.s(_ + 1, 2, "0");
171
+ case "MMM":
172
+ return j(t.monthsShort, _, g, 3);
173
+ case "MMMM":
174
+ return j(g, _);
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 j(t.weekdaysMin, n.$W, M, 2);
183
+ case "ddd":
184
+ return j(t.weekdaysShort, n.$W, M, 3);
185
+ case "dddd":
186
+ return M[n.$W];
187
+ case "H":
188
+ return String(l);
189
+ case "HH":
190
+ return c.s(l, 2, "0");
191
+ case "h":
192
+ return E(1);
193
+ case "hh":
194
+ return E(2);
195
+ case "a":
196
+ return P(l, m, !0);
197
+ case "A":
198
+ return P(l, m, !1);
199
+ case "m":
200
+ return String(m);
201
+ case "mm":
202
+ return c.s(m, 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 a;
211
+ }
212
+ return null;
213
+ }(b) || a.replace(":", "");
214
+ });
215
+ }, r.utcOffset = function() {
216
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
+ }, r.diff = function(e, n, t) {
218
+ var s, a = this, l = c.p(n), m = v(e), _ = (m.utcOffset() - this.utcOffset()) * u, M = this - m, g = function() {
219
+ return c.m(a, m);
220
+ };
221
+ switch (l) {
222
+ case O:
223
+ s = g() / 12;
224
+ break;
225
+ case x:
226
+ s = g();
227
+ break;
228
+ case G:
229
+ s = g() / 3;
230
+ break;
231
+ case R:
232
+ s = (M - _) / 6048e5;
233
+ break;
234
+ case D:
235
+ s = (M - _) / 864e5;
236
+ break;
237
+ case S:
238
+ s = M / h;
239
+ break;
240
+ case $:
241
+ s = M / u;
242
+ break;
243
+ case f:
244
+ s = M / d;
245
+ break;
246
+ default:
247
+ s = M;
248
+ }
249
+ return t ? s : c.a(s);
250
+ }, r.daysInMonth = function() {
251
+ return this.endOf(x).$D;
252
+ }, r.$locale = function() {
253
+ return Y[this.$L];
254
+ }, r.locale = function(e, n) {
255
+ if (!e) return this.$L;
256
+ var t = this.clone(), s = A(e, n, !0);
257
+ return s && (t.$L = s), 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
+ }, o;
269
+ }(), te = F.prototype;
270
+ return v.prototype = te, [["$ms", p], ["$s", f], ["$m", $], ["$H", S], ["$W", D], ["$M", x], ["$y", O], ["$D", k]].forEach(function(o) {
271
+ te[o[1]] = function(r) {
272
+ return this.$g(r, o[0], o[1]);
273
+ };
274
+ }), v.extend = function(o, r) {
275
+ return o.$i || (o(r, F, v), o.$i = !0), v;
276
+ }, v.locale = A, v.isDayjs = U, v.unix = function(o) {
277
+ return v(1e3 * o);
278
+ }, v.en = Y[L], v.Ls = Y, v.p = {}, v;
279
+ });
280
+ }(K)), K.exports;
281
+ }
282
+ var Me = I.exports, ne;
283
+ function be() {
284
+ return ne || (ne = 1, function(i, y) {
285
+ (function(d, u) {
286
+ i.exports = u($e());
287
+ })(Me, function(d) {
288
+ function u(f) {
289
+ return f && typeof f == "object" && "default" in f ? f : { default: f };
290
+ }
291
+ var h = u(d), p = { name: "es", monthsShort: "ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"), weekdays: "domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"), weekdaysShort: "dom._lun._mar._mié._jue._vie._sáb.".split("_"), weekdaysMin: "do_lu_ma_mi_ju_vi_sá".split("_"), months: "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"), weekStart: 1, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY H:mm", LLLL: "dddd, D [de] MMMM [de] YYYY H:mm" }, relativeTime: { future: "en %s", past: "hace %s", s: "unos segundos", m: "un minuto", mm: "%d minutos", h: "una hora", hh: "%d horas", d: "un día", dd: "%d días", M: "un mes", MM: "%d meses", y: "un año", yy: "%d años" }, ordinal: function(f) {
292
+ return f + "º";
293
+ } };
294
+ return h.default.locale(p, null, !0), p;
295
+ });
296
+ }(I)), I.exports;
297
+ }
298
+ var ge = be();
299
+ const xe = /* @__PURE__ */ de(ge);
300
+ var C = {}, z = { exports: {} }, ie;
301
+ function Se() {
302
+ return ie || (ie = 1, function(i) {
303
+ function y(d) {
304
+ return d && d.__esModule ? d : {
305
+ default: d
306
+ };
307
+ }
308
+ i.exports = y, i.exports.__esModule = !0, i.exports.default = i.exports;
309
+ }(z)), z.exports;
310
+ }
311
+ var J = { exports: {} }, V = { exports: {} }, Z = { exports: {} }, B = { exports: {} }, oe;
312
+ function pe() {
313
+ return oe || (oe = 1, function(i) {
314
+ function y(d) {
315
+ "@babel/helpers - typeof";
316
+ return i.exports = y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(u) {
317
+ return typeof u;
318
+ } : function(u) {
319
+ return u && typeof Symbol == "function" && u.constructor === Symbol && u !== Symbol.prototype ? "symbol" : typeof u;
320
+ }, i.exports.__esModule = !0, i.exports.default = i.exports, y(d);
321
+ }
322
+ i.exports = y, i.exports.__esModule = !0, i.exports.default = i.exports;
323
+ }(B)), B.exports;
324
+ }
325
+ var Q = { exports: {} }, se;
326
+ function De() {
327
+ return se || (se = 1, function(i) {
328
+ var y = pe().default;
329
+ function d(u, h) {
330
+ if (y(u) != "object" || !u) return u;
331
+ var p = u[Symbol.toPrimitive];
332
+ if (p !== void 0) {
333
+ var f = p.call(u, h || "default");
334
+ if (y(f) != "object") return f;
335
+ throw new TypeError("@@toPrimitive must return a primitive value.");
336
+ }
337
+ return (h === "string" ? String : Number)(u);
338
+ }
339
+ i.exports = d, i.exports.__esModule = !0, i.exports.default = i.exports;
340
+ }(Q)), Q.exports;
341
+ }
342
+ var ae;
343
+ function Oe() {
344
+ return ae || (ae = 1, function(i) {
345
+ var y = pe().default, d = De();
346
+ function u(h) {
347
+ var p = d(h, "string");
348
+ return y(p) == "symbol" ? p : p + "";
349
+ }
350
+ i.exports = u, i.exports.__esModule = !0, i.exports.default = i.exports;
351
+ }(Z)), Z.exports;
352
+ }
353
+ var ue;
354
+ function we() {
355
+ return ue || (ue = 1, function(i) {
356
+ var y = Oe();
357
+ function d(u, h, p) {
358
+ return (h = y(h)) in u ? Object.defineProperty(u, h, {
359
+ value: p,
360
+ enumerable: !0,
361
+ configurable: !0,
362
+ writable: !0
363
+ }) : u[h] = p, u;
364
+ }
365
+ i.exports = d, i.exports.__esModule = !0, i.exports.default = i.exports;
366
+ }(V)), V.exports;
367
+ }
368
+ var ce;
369
+ function Ye() {
370
+ return ce || (ce = 1, function(i) {
371
+ var y = we();
372
+ function d(h, p) {
373
+ var f = Object.keys(h);
374
+ if (Object.getOwnPropertySymbols) {
375
+ var $ = Object.getOwnPropertySymbols(h);
376
+ p && ($ = $.filter(function(S) {
377
+ return Object.getOwnPropertyDescriptor(h, S).enumerable;
378
+ })), f.push.apply(f, $);
379
+ }
380
+ return f;
381
+ }
382
+ function u(h) {
383
+ for (var p = 1; p < arguments.length; p++) {
384
+ var f = arguments[p] != null ? arguments[p] : {};
385
+ p % 2 ? d(Object(f), !0).forEach(function($) {
386
+ y(h, $, f[$]);
387
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(f)) : d(Object(f)).forEach(function($) {
388
+ Object.defineProperty(h, $, Object.getOwnPropertyDescriptor(f, $));
389
+ });
390
+ }
391
+ return h;
392
+ }
393
+ i.exports = u, i.exports.__esModule = !0, i.exports.default = i.exports;
394
+ }(J)), J.exports;
395
+ }
396
+ var H = {}, fe;
397
+ function je() {
398
+ return fe || (fe = 1, Object.defineProperty(H, "__esModule", {
399
+ value: !0
400
+ }), H.commonLocale = void 0, H.commonLocale = {
401
+ yearFormat: "YYYY",
402
+ dayFormat: "D",
403
+ cellMeridiemFormat: "A",
404
+ monthBeforeYear: !0
405
+ }), H;
406
+ }
407
+ var le;
408
+ function Pe() {
409
+ if (le) return C;
410
+ le = 1;
411
+ var i = Se().default;
412
+ Object.defineProperty(C, "__esModule", {
413
+ value: !0
414
+ }), C.default = void 0;
415
+ var y = i(Ye()), d = je(), u = (0, y.default)((0, y.default)({}, d.commonLocale), {}, {
416
+ locale: "es_ES",
417
+ today: "Hoy",
418
+ now: "Ahora",
419
+ backToToday: "Volver a hoy",
420
+ ok: "Aceptar",
421
+ clear: "Limpiar",
422
+ week: "Semana",
423
+ month: "Mes",
424
+ year: "Año",
425
+ timeSelect: "Seleccionar hora",
426
+ dateSelect: "Seleccionar fecha",
427
+ monthSelect: "Elegir un mes",
428
+ yearSelect: "Elegir un año",
429
+ decadeSelect: "Elegir una década",
430
+ dateFormat: "D/M/YYYY",
431
+ dateTimeFormat: "D/M/YYYY HH:mm:ss",
432
+ previousMonth: "Mes anterior (PageUp)",
433
+ nextMonth: "Mes siguiente (PageDown)",
434
+ previousYear: "Año anterior (Control + left)",
435
+ nextYear: "Año siguiente (Control + right)",
436
+ previousDecade: "Década anterior",
437
+ nextDecade: "Década siguiente",
438
+ previousCentury: "Siglo anterior",
439
+ nextCentury: "Siglo siguiente"
440
+ });
441
+ return C.default = u, C;
442
+ }
443
+ var ke = Pe();
444
+ const qe = /* @__PURE__ */ de(ke), Le = {
445
+ design: {
446
+ Confirm: {
447
+ cancel: "cancel·la",
448
+ confirm: "ok"
449
+ },
450
+ Picker: {
451
+ ...xe,
452
+ ...qe
453
+ },
454
+ CascaderList: {
455
+ empty: "Cap"
456
+ },
457
+ Select: {
458
+ empty: "Cap"
459
+ },
460
+ ColorPicker: {
461
+ more: "Més colors",
462
+ cancel: "cancel·la",
463
+ confirm: "ok"
464
+ }
465
+ }
466
+ };
467
+ export {
468
+ Le as default
469
+ };