@spesia/ui 1.8.21 → 1.9.7

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 (87) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_commonjsHelpers.js +6 -0
  3. package/dist/_virtual/index.js +4 -0
  4. package/dist/client.d.ts +7 -0
  5. package/dist/client.js +16 -0
  6. package/dist/components/Logo/Logo.js +121 -0
  7. package/dist/components/Logo3d/Logo3d.js +61 -0
  8. package/dist/components/checkbox/Checked.js +47 -0
  9. package/dist/components/checkbox/Unchecked.js +70 -0
  10. package/dist/components/chip-list/ChipList.js +97 -0
  11. package/dist/components/container-grid/ContainerGrid.js +110 -0
  12. package/dist/components/date-picker/DatePicker/DatePicker.js +62 -0
  13. package/dist/components/date-picker/PeriodPicker/PeriodPicker.js +374 -0
  14. package/dist/components/date-picker/utils.js +27 -0
  15. package/dist/components/filters/Checked.js +26 -0
  16. package/dist/components/filters/FilterList.js +121 -0
  17. package/dist/components/filters/Unchecked.js +26 -0
  18. package/dist/components/index.d.ts +0 -9
  19. package/dist/components/radio/Checked.js +34 -0
  20. package/dist/components/radio/Unchecked.js +48 -0
  21. package/dist/components/trending-chip/TrendingChip.js +93 -0
  22. package/dist/helpers/suitCx.js +17 -0
  23. package/dist/helpers/utils.js +11 -0
  24. package/dist/hooks/useContainerDimension.js +23 -0
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +13 -37197
  27. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +42 -0
  28. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  29. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  30. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js +515 -0
  31. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
  32. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
  33. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
  34. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  35. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js +20 -0
  36. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js +6 -0
  37. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js +8 -0
  38. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js +16 -0
  39. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js +59 -0
  40. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js +11 -0
  41. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js +12 -0
  42. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js +15 -0
  43. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js +12 -0
  44. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js +17 -0
  45. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js +7 -0
  46. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameDay.js +14 -0
  47. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameMonth.js +13 -0
  48. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameYear.js +13 -0
  49. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js +9 -0
  50. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  51. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  52. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
  53. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  54. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  55. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  56. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  57. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
  58. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
  59. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js +21 -0
  60. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js +9 -0
  61. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js +8 -0
  62. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js +11 -0
  63. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js +11 -0
  64. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js +13 -0
  65. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js +9 -0
  66. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js +8 -0
  67. package/dist/styles/alert/alert.js +70 -0
  68. package/dist/styles/button/button.js +195 -0
  69. package/dist/styles/card/card.js +16 -0
  70. package/dist/styles/checkbox/checkbox.js +46 -0
  71. package/dist/styles/chip/chip.js +115 -0
  72. package/dist/styles/colors.js +435 -0
  73. package/dist/styles/dialog/dialog.js +34 -0
  74. package/dist/styles/form/form.js +18 -0
  75. package/dist/styles/index.js +53 -0
  76. package/dist/styles/input/input.js +127 -0
  77. package/dist/styles/list/list.js +42 -0
  78. package/dist/styles/palette.js +150 -0
  79. package/dist/styles/radio/radio.js +37 -0
  80. package/dist/styles/slider/slider.js +55 -0
  81. package/dist/styles/switch/switch.js +63 -0
  82. package/dist/styles/tab/tab.js +70 -0
  83. package/dist/styles/tooltip/tooltip.js +19 -0
  84. package/dist/styles/typography.js +139 -0
  85. package/dist/themes.js +35 -0
  86. package/package.json +6 -1
  87. /package/dist/components/{TrendingChip → trending-chip}/TrendingChip.d.ts +0 -0
@@ -0,0 +1,11 @@
1
+ import { constructFrom as r } from "../constructFrom.js";
2
+ function i(e, ...o) {
3
+ const n = r.bind(
4
+ null,
5
+ o.find((t) => typeof t == "object")
6
+ );
7
+ return o.map(n);
8
+ }
9
+ export {
10
+ i as normalizeDates
11
+ };
@@ -0,0 +1,20 @@
1
+ const r = /^D+$/, s = /^Y+$/, a = ["D", "DD", "YY", "YYYY"];
2
+ function i(e) {
3
+ return r.test(e);
4
+ }
5
+ function f(e) {
6
+ return s.test(e);
7
+ }
8
+ function d(e, o, n) {
9
+ const t = c(e, o, n);
10
+ if (console.warn(t), a.includes(e)) throw new RangeError(t);
11
+ }
12
+ function c(e, o, n) {
13
+ const t = e[0] === "Y" ? "years" : "days of the month";
14
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${o}\`) for formatting ${t} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
15
+ }
16
+ export {
17
+ i as isProtectedDayOfYearToken,
18
+ f as isProtectedWeekYearToken,
19
+ d as warnOrThrowProtectedError
20
+ };
@@ -0,0 +1,6 @@
1
+ const o = 6048e5, c = 864e5, n = Symbol.for("constructDateFrom");
2
+ export {
3
+ n as constructFromSymbol,
4
+ c as millisecondsInDay,
5
+ o as millisecondsInWeek
6
+ };
@@ -0,0 +1,8 @@
1
+ import { constructFromSymbol as o } from "./constants.js";
2
+ function c(r, n) {
3
+ return typeof r == "function" ? r(n) : r && typeof r == "object" && o in r ? r[o](n) : r instanceof Date ? new r.constructor(n) : new Date(n);
4
+ }
5
+ export {
6
+ c as constructFrom,
7
+ c as default
8
+ };
@@ -0,0 +1,16 @@
1
+ import { getTimezoneOffsetInMilliseconds as a } from "./_lib/getTimezoneOffsetInMilliseconds.js";
2
+ import { normalizeDates as c } from "./_lib/normalizeDates.js";
3
+ import { millisecondsInDay as D } from "./constants.js";
4
+ import { startOfDay as m } from "./startOfDay.js";
5
+ function p(n, i, e) {
6
+ const [f, l] = c(
7
+ e == null ? void 0 : e.in,
8
+ n,
9
+ i
10
+ ), r = m(f), t = m(l), o = +r - a(r), s = +t - a(t);
11
+ return Math.round((o - s) / D);
12
+ }
13
+ export {
14
+ p as default,
15
+ p as differenceInCalendarDays
16
+ };
@@ -0,0 +1,59 @@
1
+ import { getDefaultOptions as w } from "./_lib/defaultOptions.js";
2
+ import { formatters as k } from "./_lib/format/formatters.js";
3
+ import { longFormatters as T } from "./_lib/format/longFormatters.js";
4
+ import { isProtectedWeekYearToken as D, isProtectedDayOfYearToken as E, warnOrThrowProtectedError as v } from "./_lib/protectedTokens.js";
5
+ import { isValid as O } from "./isValid.js";
6
+ import { toDate as R } from "./toDate.js";
7
+ import { enUS as x } from "./locale/en-US.js";
8
+ const C = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, P = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, S = /^'([^]*?)'?$/, z = /''/g, F = /[a-zA-Z]/;
9
+ function q(r, o, i) {
10
+ var f, m, p, u;
11
+ const a = w(), n = a.locale ?? x, g = a.firstWeekContainsDate ?? ((m = (f = a.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, h = a.weekStartsOn ?? ((u = (p = a.locale) == null ? void 0 : p.options) == null ? void 0 : u.weekStartsOn) ?? 0, c = R(r, i == null ? void 0 : i.in);
12
+ if (!O(c))
13
+ throw new RangeError("Invalid time value");
14
+ let s = o.match(P).map((t) => {
15
+ const e = t[0];
16
+ if (e === "p" || e === "P") {
17
+ const l = T[e];
18
+ return l(t, n.formatLong);
19
+ }
20
+ return t;
21
+ }).join("").match(C).map((t) => {
22
+ if (t === "''")
23
+ return { isToken: !1, value: "'" };
24
+ const e = t[0];
25
+ if (e === "'")
26
+ return { isToken: !1, value: W(t) };
27
+ if (k[e])
28
+ return { isToken: !0, value: t };
29
+ if (e.match(F))
30
+ throw new RangeError(
31
+ "Format string contains an unescaped latin alphabet character `" + e + "`"
32
+ );
33
+ return { isToken: !1, value: t };
34
+ });
35
+ n.localize.preprocessor && (s = n.localize.preprocessor(c, s));
36
+ const d = {
37
+ firstWeekContainsDate: g,
38
+ weekStartsOn: h,
39
+ locale: n
40
+ };
41
+ return s.map((t) => {
42
+ if (!t.isToken) return t.value;
43
+ const e = t.value;
44
+ (D(e) || E(e)) && v(e, o, String(r));
45
+ const l = k[e[0]];
46
+ return l(c, e, n.localize, d);
47
+ }).join("");
48
+ }
49
+ function W(r) {
50
+ const o = r.match(S);
51
+ return o ? o[1].replace(z, "'") : r;
52
+ }
53
+ export {
54
+ q as default,
55
+ q as format,
56
+ q as formatDate,
57
+ k as formatters,
58
+ T as longFormatters
59
+ };
@@ -0,0 +1,11 @@
1
+ import { differenceInCalendarDays as e } from "./differenceInCalendarDays.js";
2
+ import { startOfYear as t } from "./startOfYear.js";
3
+ import { toDate as d } from "./toDate.js";
4
+ function y(f, r) {
5
+ const a = d(f, r == null ? void 0 : r.in);
6
+ return e(a, t(a)) + 1;
7
+ }
8
+ export {
9
+ y as default,
10
+ y as getDayOfYear
11
+ };
@@ -0,0 +1,12 @@
1
+ import { millisecondsInWeek as m } from "./constants.js";
2
+ import { startOfISOWeek as a } from "./startOfISOWeek.js";
3
+ import { startOfISOWeekYear as o } from "./startOfISOWeekYear.js";
4
+ import { toDate as d } from "./toDate.js";
5
+ function k(t, e) {
6
+ const r = d(t, e == null ? void 0 : e.in), f = +a(r) - +o(r);
7
+ return Math.round(f / m) + 1;
8
+ }
9
+ export {
10
+ k as default,
11
+ k as getISOWeek
12
+ };
@@ -0,0 +1,15 @@
1
+ import { constructFrom as f } from "./constructFrom.js";
2
+ import { startOfISOWeek as u } from "./startOfISOWeek.js";
3
+ import { toDate as c } from "./toDate.js";
4
+ function Y(o, r) {
5
+ const e = c(o, r == null ? void 0 : r.in), t = e.getFullYear(), a = f(e, 0);
6
+ a.setFullYear(t + 1, 0, 4), a.setHours(0, 0, 0, 0);
7
+ const m = u(a), s = f(e, 0);
8
+ s.setFullYear(t, 0, 4), s.setHours(0, 0, 0, 0);
9
+ const n = u(s);
10
+ return e.getTime() >= m.getTime() ? t + 1 : e.getTime() >= n.getTime() ? t : t - 1;
11
+ }
12
+ export {
13
+ Y as default,
14
+ Y as getISOWeekYear
15
+ };
@@ -0,0 +1,12 @@
1
+ import { millisecondsInWeek as m } from "./constants.js";
2
+ import { startOfWeek as a } from "./startOfWeek.js";
3
+ import { startOfWeekYear as d } from "./startOfWeekYear.js";
4
+ import { toDate as c } from "./toDate.js";
5
+ function l(t, e) {
6
+ const r = c(t, e == null ? void 0 : e.in), f = +a(r, e) - +d(r, e);
7
+ return Math.round(f / m) + 1;
8
+ }
9
+ export {
10
+ l as default,
11
+ l as getWeek
12
+ };
@@ -0,0 +1,17 @@
1
+ import { getDefaultOptions as C } from "./_lib/defaultOptions.js";
2
+ import { constructFrom as Y } from "./constructFrom.js";
3
+ import { startOfWeek as D } from "./startOfWeek.js";
4
+ import { toDate as F } from "./toDate.js";
5
+ function H(t, e) {
6
+ var u, k, m, W;
7
+ const a = F(t, e == null ? void 0 : e.in), r = a.getFullYear(), c = C(), s = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((k = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : k.firstWeekContainsDate) ?? c.firstWeekContainsDate ?? ((W = (m = c.locale) == null ? void 0 : m.options) == null ? void 0 : W.firstWeekContainsDate) ?? 1, f = Y((e == null ? void 0 : e.in) || t, 0);
8
+ f.setFullYear(r + 1, 0, s), f.setHours(0, 0, 0, 0);
9
+ const O = D(f, e), l = Y((e == null ? void 0 : e.in) || t, 0);
10
+ l.setFullYear(r, 0, s), l.setHours(0, 0, 0, 0);
11
+ const n = D(l, e);
12
+ return +a >= +O ? r + 1 : +a >= +n ? r : r - 1;
13
+ }
14
+ export {
15
+ H as default,
16
+ H as getWeekYear
17
+ };
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
3
+ }
4
+ export {
5
+ e as default,
6
+ e as isDate
7
+ };
@@ -0,0 +1,14 @@
1
+ import { normalizeDates as d } from "./_lib/normalizeDates.js";
2
+ import { startOfDay as t } from "./startOfDay.js";
3
+ function D(e, r, a) {
4
+ const [f, m] = d(
5
+ a == null ? void 0 : a.in,
6
+ e,
7
+ r
8
+ );
9
+ return +t(f) == +t(m);
10
+ }
11
+ export {
12
+ D as default,
13
+ D as isSameDay
14
+ };
@@ -0,0 +1,13 @@
1
+ import { normalizeDates as n } from "./_lib/normalizeDates.js";
2
+ function g(r, l, e) {
3
+ const [t, a] = n(
4
+ e == null ? void 0 : e.in,
5
+ r,
6
+ l
7
+ );
8
+ return t.getFullYear() === a.getFullYear() && t.getMonth() === a.getMonth();
9
+ }
10
+ export {
11
+ g as default,
12
+ g as isSameMonth
13
+ };
@@ -0,0 +1,13 @@
1
+ import { normalizeDates as u } from "./_lib/normalizeDates.js";
2
+ function f(a, r, e) {
3
+ const [l, t] = u(
4
+ e == null ? void 0 : e.in,
5
+ a,
6
+ r
7
+ );
8
+ return l.getFullYear() === t.getFullYear();
9
+ }
10
+ export {
11
+ f as default,
12
+ f as isSameYear
13
+ };
@@ -0,0 +1,9 @@
1
+ import { isDate as r } from "./isDate.js";
2
+ import { toDate as t } from "./toDate.js";
3
+ function f(o) {
4
+ return !(!r(o) && typeof o != "number" || isNaN(+t(o)));
5
+ }
6
+ export {
7
+ f as default,
8
+ f as isValid
9
+ };
@@ -0,0 +1,9 @@
1
+ function r(t) {
2
+ return (d = {}) => {
3
+ const n = d.width ? String(d.width) : t.defaultWidth;
4
+ return t.formats[n] || t.formats[t.defaultWidth];
5
+ };
6
+ }
7
+ export {
8
+ r as buildFormatLongFn
9
+ };
@@ -0,0 +1,18 @@
1
+ function h(e) {
2
+ return (a, t) => {
3
+ const c = t != null && t.context ? String(t.context) : "standalone";
4
+ let l;
5
+ if (c === "formatting" && e.formattingValues) {
6
+ const d = e.defaultFormattingWidth || e.defaultWidth, u = t != null && t.width ? String(t.width) : d;
7
+ l = e.formattingValues[u] || e.formattingValues[d];
8
+ } else {
9
+ const d = e.defaultWidth, u = t != null && t.width ? String(t.width) : e.defaultWidth;
10
+ l = e.values[u] || e.values[d];
11
+ }
12
+ const f = e.argumentCallback ? e.argumentCallback(a) : a;
13
+ return l[f];
14
+ };
15
+ }
16
+ export {
17
+ h as buildLocalizeFn
18
+ };
@@ -0,0 +1,31 @@
1
+ function P(t) {
2
+ return (n, e = {}) => {
3
+ const l = e.width, h = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], i = n.match(h);
4
+ if (!i)
5
+ return null;
6
+ const r = i[0], c = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? o(c, (u) => u.test(r)) : (
7
+ // [TODO] -- I challenge you to fix the type
8
+ s(c, (u) => u.test(r))
9
+ );
10
+ let a;
11
+ a = t.valueCallback ? t.valueCallback(d) : d, a = e.valueCallback ? (
12
+ // [TODO] -- I challenge you to fix the type
13
+ e.valueCallback(a)
14
+ ) : a;
15
+ const f = n.slice(r.length);
16
+ return { value: a, rest: f };
17
+ };
18
+ }
19
+ function s(t, n) {
20
+ for (const e in t)
21
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
22
+ return e;
23
+ }
24
+ function o(t, n) {
25
+ for (let e = 0; e < t.length; e++)
26
+ if (n(t[e]))
27
+ return e;
28
+ }
29
+ export {
30
+ P as buildMatchFn
31
+ };
@@ -0,0 +1,15 @@
1
+ function h(t) {
2
+ return (e, c = {}) => {
3
+ const n = e.match(t.matchPattern);
4
+ if (!n) return null;
5
+ const u = n[0], a = e.match(t.parsePattern);
6
+ if (!a) return null;
7
+ let l = t.valueCallback ? t.valueCallback(a[0]) : a[0];
8
+ l = c.valueCallback ? c.valueCallback(l) : l;
9
+ const r = e.slice(u.length);
10
+ return { value: l, rest: r };
11
+ };
12
+ }
13
+ export {
14
+ h as buildMatchPatternFn
15
+ };
@@ -0,0 +1,70 @@
1
+ const a = {
2
+ lessThanXSeconds: {
3
+ one: "less than a second",
4
+ other: "less than {{count}} seconds"
5
+ },
6
+ xSeconds: {
7
+ one: "1 second",
8
+ other: "{{count}} seconds"
9
+ },
10
+ halfAMinute: "half a minute",
11
+ lessThanXMinutes: {
12
+ one: "less than a minute",
13
+ other: "less than {{count}} minutes"
14
+ },
15
+ xMinutes: {
16
+ one: "1 minute",
17
+ other: "{{count}} minutes"
18
+ },
19
+ aboutXHours: {
20
+ one: "about 1 hour",
21
+ other: "about {{count}} hours"
22
+ },
23
+ xHours: {
24
+ one: "1 hour",
25
+ other: "{{count}} hours"
26
+ },
27
+ xDays: {
28
+ one: "1 day",
29
+ other: "{{count}} days"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "about 1 week",
33
+ other: "about {{count}} weeks"
34
+ },
35
+ xWeeks: {
36
+ one: "1 week",
37
+ other: "{{count}} weeks"
38
+ },
39
+ aboutXMonths: {
40
+ one: "about 1 month",
41
+ other: "about {{count}} months"
42
+ },
43
+ xMonths: {
44
+ one: "1 month",
45
+ other: "{{count}} months"
46
+ },
47
+ aboutXYears: {
48
+ one: "about 1 year",
49
+ other: "about {{count}} years"
50
+ },
51
+ xYears: {
52
+ one: "1 year",
53
+ other: "{{count}} years"
54
+ },
55
+ overXYears: {
56
+ one: "over 1 year",
57
+ other: "over {{count}} years"
58
+ },
59
+ almostXYears: {
60
+ one: "almost 1 year",
61
+ other: "almost {{count}} years"
62
+ }
63
+ }, r = (s, n, o) => {
64
+ let e;
65
+ const t = a[s];
66
+ return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace("{{count}}", n.toString()), o != null && o.addSuffix ? o.comparison && o.comparison > 0 ? "in " + e : e + " ago" : e;
67
+ };
68
+ export {
69
+ r as formatDistance
70
+ };
@@ -0,0 +1,33 @@
1
+ import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
2
+ const m = {
3
+ full: "EEEE, MMMM do, y",
4
+ long: "MMMM do, y",
5
+ medium: "MMM d, y",
6
+ short: "MM/dd/yyyy"
7
+ }, a = {
8
+ full: "h:mm:ss a zzzz",
9
+ long: "h:mm:ss a z",
10
+ medium: "h:mm:ss a",
11
+ short: "h:mm a"
12
+ }, o = {
13
+ full: "{{date}} 'at' {{time}}",
14
+ long: "{{date}} 'at' {{time}}",
15
+ medium: "{{date}}, {{time}}",
16
+ short: "{{date}}, {{time}}"
17
+ }, e = {
18
+ date: t({
19
+ formats: m,
20
+ defaultWidth: "full"
21
+ }),
22
+ time: t({
23
+ formats: a,
24
+ defaultWidth: "full"
25
+ }),
26
+ dateTime: t({
27
+ formats: o,
28
+ defaultWidth: "full"
29
+ })
30
+ };
31
+ export {
32
+ e as formatLong
33
+ };
@@ -0,0 +1,11 @@
1
+ const t = {
2
+ lastWeek: "'last' eeee 'at' p",
3
+ yesterday: "'yesterday at' p",
4
+ today: "'today at' p",
5
+ tomorrow: "'tomorrow at' p",
6
+ nextWeek: "eeee 'at' p",
7
+ other: "P"
8
+ }, s = (e, a, o, r) => t[e];
9
+ export {
10
+ s as formatRelative
11
+ };
@@ -0,0 +1,155 @@
1
+ import { buildLocalizeFn as e } from "../../_lib/buildLocalizeFn.js";
2
+ const a = {
3
+ narrow: ["B", "A"],
4
+ abbreviated: ["BC", "AD"],
5
+ wide: ["Before Christ", "Anno Domini"]
6
+ }, r = {
7
+ narrow: ["1", "2", "3", "4"],
8
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
9
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
10
+ }, o = {
11
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
12
+ abbreviated: [
13
+ "Jan",
14
+ "Feb",
15
+ "Mar",
16
+ "Apr",
17
+ "May",
18
+ "Jun",
19
+ "Jul",
20
+ "Aug",
21
+ "Sep",
22
+ "Oct",
23
+ "Nov",
24
+ "Dec"
25
+ ],
26
+ wide: [
27
+ "January",
28
+ "February",
29
+ "March",
30
+ "April",
31
+ "May",
32
+ "June",
33
+ "July",
34
+ "August",
35
+ "September",
36
+ "October",
37
+ "November",
38
+ "December"
39
+ ]
40
+ }, d = {
41
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
42
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
43
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
44
+ wide: [
45
+ "Sunday",
46
+ "Monday",
47
+ "Tuesday",
48
+ "Wednesday",
49
+ "Thursday",
50
+ "Friday",
51
+ "Saturday"
52
+ ]
53
+ }, m = {
54
+ narrow: {
55
+ am: "a",
56
+ pm: "p",
57
+ midnight: "mi",
58
+ noon: "n",
59
+ morning: "morning",
60
+ afternoon: "afternoon",
61
+ evening: "evening",
62
+ night: "night"
63
+ },
64
+ abbreviated: {
65
+ am: "AM",
66
+ pm: "PM",
67
+ midnight: "midnight",
68
+ noon: "noon",
69
+ morning: "morning",
70
+ afternoon: "afternoon",
71
+ evening: "evening",
72
+ night: "night"
73
+ },
74
+ wide: {
75
+ am: "a.m.",
76
+ pm: "p.m.",
77
+ midnight: "midnight",
78
+ noon: "noon",
79
+ morning: "morning",
80
+ afternoon: "afternoon",
81
+ evening: "evening",
82
+ night: "night"
83
+ }
84
+ }, g = {
85
+ narrow: {
86
+ am: "a",
87
+ pm: "p",
88
+ midnight: "mi",
89
+ noon: "n",
90
+ morning: "in the morning",
91
+ afternoon: "in the afternoon",
92
+ evening: "in the evening",
93
+ night: "at night"
94
+ },
95
+ abbreviated: {
96
+ am: "AM",
97
+ pm: "PM",
98
+ midnight: "midnight",
99
+ noon: "noon",
100
+ morning: "in the morning",
101
+ afternoon: "in the afternoon",
102
+ evening: "in the evening",
103
+ night: "at night"
104
+ },
105
+ wide: {
106
+ am: "a.m.",
107
+ pm: "p.m.",
108
+ midnight: "midnight",
109
+ noon: "noon",
110
+ morning: "in the morning",
111
+ afternoon: "in the afternoon",
112
+ evening: "in the evening",
113
+ night: "at night"
114
+ }
115
+ }, u = (i, h) => {
116
+ const n = Number(i), t = n % 100;
117
+ if (t > 20 || t < 10)
118
+ switch (t % 10) {
119
+ case 1:
120
+ return n + "st";
121
+ case 2:
122
+ return n + "nd";
123
+ case 3:
124
+ return n + "rd";
125
+ }
126
+ return n + "th";
127
+ }, l = {
128
+ ordinalNumber: u,
129
+ era: e({
130
+ values: a,
131
+ defaultWidth: "wide"
132
+ }),
133
+ quarter: e({
134
+ values: r,
135
+ defaultWidth: "wide",
136
+ argumentCallback: (i) => i - 1
137
+ }),
138
+ month: e({
139
+ values: o,
140
+ defaultWidth: "wide"
141
+ }),
142
+ day: e({
143
+ values: d,
144
+ defaultWidth: "wide"
145
+ }),
146
+ dayPeriod: e({
147
+ values: m,
148
+ defaultWidth: "wide",
149
+ formattingValues: g,
150
+ defaultFormattingWidth: "wide"
151
+ })
152
+ };
153
+ export {
154
+ l as localize
155
+ };