@a-ui/react 7.13.0-beta.0 → 7.13.0-beta.1
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/constants/settings.d.ts +1 -1
- package/constants/stories.settings.d.ts +11 -0
- package/index.js +1 -62
- package/index.mjs +98 -9098
- package/index10.js +1 -0
- package/index10.mjs +60 -0
- package/index100.js +1 -0
- package/index100.mjs +4 -0
- package/index101.js +1 -0
- package/index101.mjs +400 -0
- package/index102.js +5 -0
- package/index102.mjs +42 -0
- package/index103.js +1 -0
- package/index103.mjs +4 -0
- package/index104.js +1 -0
- package/index104.mjs +10 -0
- package/index105.js +2 -0
- package/index105.mjs +329 -0
- package/index106.js +1 -0
- package/index106.mjs +52 -0
- package/index107.js +1 -0
- package/index107.mjs +4 -0
- package/index108.js +1 -0
- package/index108.mjs +67 -0
- package/index109.js +1 -0
- package/index109.mjs +45 -0
- package/index11.js +1 -0
- package/index11.mjs +12 -0
- package/index110.js +10 -0
- package/index110.mjs +62 -0
- package/index111.js +1 -0
- package/index111.mjs +46 -0
- package/index112.js +1 -0
- package/index112.mjs +42 -0
- package/index113.js +1 -0
- package/index113.mjs +4 -0
- package/index114.js +1 -0
- package/index114.mjs +4 -0
- package/index115.js +1 -0
- package/index115.mjs +4 -0
- package/index116.js +1 -0
- package/index116.mjs +33 -0
- package/index117.js +5 -0
- package/index117.mjs +21 -0
- package/index118.js +9 -0
- package/index118.mjs +63 -0
- package/index119.js +1 -0
- package/index119.mjs +65 -0
- package/index12.js +1 -0
- package/index12.mjs +215 -0
- package/index120.js +1 -0
- package/index120.mjs +16 -0
- package/index121.js +1 -0
- package/index121.mjs +9 -0
- package/index122.js +1 -0
- package/index122.mjs +9 -0
- package/index123.js +1 -0
- package/index123.mjs +8 -0
- package/index124.js +1 -0
- package/index124.mjs +8 -0
- package/index125.js +1 -0
- package/index125.mjs +7 -0
- package/index126.js +1 -0
- package/index126.mjs +7 -0
- package/index127.js +1 -0
- package/index127.mjs +9 -0
- package/index128.js +1 -0
- package/index128.mjs +7 -0
- package/index129.js +1 -0
- package/index129.mjs +69 -0
- package/index13.js +1 -0
- package/index13.mjs +29 -0
- package/index130.js +1 -0
- package/index130.mjs +5 -0
- package/index131.js +1 -0
- package/index131.mjs +7 -0
- package/index132.js +1 -0
- package/index132.mjs +13 -0
- package/index133.js +1 -0
- package/index133.mjs +4 -0
- package/index134.js +1 -0
- package/index134.mjs +393 -0
- package/index135.js +1 -0
- package/index135.mjs +127 -0
- package/index136.js +1 -0
- package/index136.mjs +136 -0
- package/index137.js +1 -0
- package/index137.mjs +4 -0
- package/index138.js +1 -0
- package/index138.mjs +4 -0
- package/index139.js +8 -0
- package/index139.mjs +78 -0
- package/index14.js +1 -0
- package/index14.mjs +44 -0
- package/index140.js +8 -0
- package/index140.mjs +95 -0
- package/index141.js +5 -0
- package/index141.mjs +54 -0
- package/index142.js +1 -0
- package/index142.mjs +10 -0
- package/index143.js +1 -0
- package/index143.mjs +7 -0
- package/index144.js +1 -0
- package/index144.mjs +54 -0
- package/index145.js +11 -0
- package/index145.mjs +60 -0
- package/index146.js +1 -0
- package/index146.mjs +4 -0
- package/index147.js +1 -0
- package/index147.mjs +4 -0
- package/index148.js +1 -0
- package/index148.mjs +7 -0
- package/index149.js +1 -0
- package/index149.mjs +7 -0
- package/index15.js +1 -0
- package/index15.mjs +8 -0
- package/index150.js +1 -0
- package/index150.mjs +9 -0
- package/index151.js +1 -0
- package/index151.mjs +15 -0
- package/index152.js +1 -0
- package/index152.mjs +18 -0
- package/index153.js +1 -0
- package/index153.mjs +11 -0
- package/index154.js +1 -0
- package/index154.mjs +8 -0
- package/index155.js +1 -0
- package/index155.mjs +8 -0
- package/index156.js +1 -0
- package/index156.mjs +7 -0
- package/index157.js +1 -0
- package/index157.mjs +515 -0
- package/index158.js +1 -0
- package/index158.mjs +52 -0
- package/index159.js +1 -0
- package/index159.mjs +20 -0
- package/index16.js +1 -0
- package/index16.mjs +15 -0
- package/index160.js +1 -0
- package/index160.mjs +20 -0
- package/index161.js +1 -0
- package/index161.mjs +7 -0
- package/index162.js +1 -0
- package/index162.mjs +10 -0
- package/index163.js +1 -0
- package/index163.mjs +8 -0
- package/index164.js +1 -0
- package/index164.mjs +7 -0
- package/index165.js +1 -0
- package/index165.mjs +8 -0
- package/index166.js +1 -0
- package/index166.mjs +11 -0
- package/index167.js +1 -0
- package/index167.mjs +7 -0
- package/index168.js +1 -0
- package/index168.mjs +10 -0
- package/index169.js +1 -0
- package/index169.mjs +14 -0
- package/index17.js +1 -0
- package/index17.mjs +108 -0
- package/index170.js +1 -0
- package/index170.mjs +11 -0
- package/index171.js +1 -0
- package/index171.mjs +11 -0
- package/index172.js +1 -0
- package/index172.mjs +15 -0
- package/index173.js +1 -0
- package/index173.mjs +6 -0
- package/index174.js +1 -0
- package/index174.mjs +35 -0
- package/index175.js +1 -0
- package/index175.mjs +67 -0
- package/index176.js +1 -0
- package/index176.mjs +10 -0
- package/index177.js +1 -0
- package/index177.mjs +10 -0
- package/index178.js +1 -0
- package/index178.mjs +9 -0
- package/index179.js +1 -0
- package/index179.mjs +9 -0
- package/index18.js +1 -0
- package/index18.mjs +136 -0
- package/index180.js +1 -0
- package/index180.mjs +16 -0
- package/index181.js +1 -0
- package/index181.mjs +4 -0
- package/index182.js +1 -0
- package/index182.mjs +4 -0
- package/index183.js +1 -0
- package/index183.mjs +4 -0
- package/index184.js +1 -0
- package/index184.mjs +59 -0
- package/index185.js +1 -0
- package/index185.mjs +24 -0
- package/index186.js +1 -0
- package/index186.mjs +43 -0
- package/index187.js +1 -0
- package/index187.mjs +63 -0
- package/index188.js +1 -0
- package/index188.mjs +34 -0
- package/index189.js +1 -0
- package/index189.mjs +15 -0
- package/index19.js +1 -0
- package/index19.mjs +11 -0
- package/index190.js +1 -0
- package/index190.mjs +64 -0
- package/index191.js +1 -0
- package/index191.mjs +64 -0
- package/index192.js +1 -0
- package/index192.mjs +65 -0
- package/index193.js +1 -0
- package/index193.mjs +65 -0
- package/index194.js +1 -0
- package/index194.mjs +42 -0
- package/index195.js +1 -0
- package/index195.mjs +43 -0
- package/index196.js +1 -0
- package/index196.mjs +55 -0
- package/index197.js +1 -0
- package/index197.mjs +45 -0
- package/index198.js +1 -0
- package/index198.mjs +39 -0
- package/index199.js +1 -0
- package/index199.mjs +68 -0
- package/index2.js +1 -0
- package/index2.mjs +12 -0
- package/index20.js +1 -0
- package/index20.mjs +54 -0
- package/index200.js +1 -0
- package/index200.mjs +68 -0
- package/index201.js +1 -0
- package/index201.mjs +93 -0
- package/index202.js +1 -0
- package/index202.mjs +43 -0
- package/index203.js +1 -0
- package/index203.mjs +43 -0
- package/index204.js +1 -0
- package/index204.mjs +43 -0
- package/index205.js +1 -0
- package/index205.mjs +27 -0
- package/index206.js +1 -0
- package/index206.mjs +26 -0
- package/index207.js +1 -0
- package/index207.mjs +26 -0
- package/index208.js +1 -0
- package/index208.mjs +27 -0
- package/index209.js +1 -0
- package/index209.mjs +26 -0
- package/index21.js +1 -0
- package/index21.mjs +33 -0
- package/index210.js +1 -0
- package/index210.mjs +26 -0
- package/index211.js +1 -0
- package/index211.mjs +16 -0
- package/index212.js +1 -0
- package/index212.mjs +42 -0
- package/index213.js +1 -0
- package/index213.mjs +42 -0
- package/index214.js +1 -0
- package/index214.mjs +16 -0
- package/index215.js +1 -0
- package/index215.mjs +16 -0
- package/index216.js +1 -0
- package/index216.mjs +70 -0
- package/index217.js +1 -0
- package/index217.mjs +33 -0
- package/index218.js +1 -0
- package/index218.mjs +11 -0
- package/index219.js +1 -0
- package/index219.mjs +155 -0
- package/index22.js +1 -0
- package/index22.mjs +22 -0
- package/index220.js +1 -0
- package/index220.mjs +110 -0
- package/index221.js +1 -0
- package/index221.mjs +22 -0
- package/index222.js +1 -0
- package/index222.mjs +103 -0
- package/index223.js +1 -0
- package/index223.mjs +49 -0
- package/index224.js +1 -0
- package/index224.mjs +70 -0
- package/index225.js +1 -0
- package/index225.mjs +33 -0
- package/index226.js +1 -0
- package/index226.mjs +11 -0
- package/index227.js +1 -0
- package/index227.mjs +110 -0
- package/index228.js +1 -0
- package/index228.mjs +109 -0
- package/index229.js +1 -0
- package/index229.mjs +9 -0
- package/index23.js +1 -0
- package/index23.mjs +32 -0
- package/index230.js +1 -0
- package/index230.mjs +18 -0
- package/index231.js +1 -0
- package/index231.mjs +31 -0
- package/index232.js +1 -0
- package/index232.mjs +15 -0
- package/index233.js +1 -0
- package/index233.mjs +61 -0
- package/index234.js +1 -0
- package/index234.mjs +11 -0
- package/index235.js +1 -0
- package/index235.mjs +22 -0
- package/index24.js +2 -0
- package/index24.mjs +62 -0
- package/index25.js +1 -0
- package/index25.mjs +15 -0
- package/index26.js +1 -0
- package/index26.mjs +12 -0
- package/index27.js +1 -0
- package/index27.mjs +43 -0
- package/index28.js +1 -0
- package/index28.mjs +34 -0
- package/index29.js +1 -0
- package/index29.mjs +10 -0
- package/index3.js +1 -0
- package/index3.mjs +15 -0
- package/index30.js +1 -0
- package/index30.mjs +72 -0
- package/index31.js +1 -0
- package/index31.mjs +40 -0
- package/index32.js +1 -0
- package/index32.mjs +48 -0
- package/index33.js +1 -0
- package/index33.mjs +90 -0
- package/index34.js +1 -0
- package/index34.mjs +36 -0
- package/index35.js +1 -0
- package/index35.mjs +25 -0
- package/index36.js +1 -0
- package/index36.mjs +27 -0
- package/index37.js +1 -0
- package/index37.mjs +110 -0
- package/index38.js +1 -0
- package/index38.mjs +57 -0
- package/index39.js +1 -0
- package/index39.mjs +21 -0
- package/index4.js +1 -0
- package/index4.mjs +58 -0
- package/index40.js +1 -0
- package/index40.mjs +40 -0
- package/index41.js +1 -0
- package/index41.mjs +54 -0
- package/index42.js +1 -0
- package/index42.mjs +73 -0
- package/index43.js +1 -0
- package/index43.mjs +49 -0
- package/index44.js +1 -0
- package/index44.mjs +13 -0
- package/index45.js +1 -0
- package/index45.mjs +73 -0
- package/index46.js +1 -0
- package/index46.mjs +99 -0
- package/index47.js +1 -0
- package/index47.mjs +45 -0
- package/index48.js +1 -0
- package/index48.mjs +26 -0
- package/index49.js +1 -0
- package/index49.mjs +83 -0
- package/index5.js +1 -0
- package/index5.mjs +136 -0
- package/index50.js +1 -0
- package/index50.mjs +35 -0
- package/index51.js +1 -0
- package/index51.mjs +10 -0
- package/index52.js +1 -0
- package/index52.mjs +13 -0
- package/index53.js +1 -0
- package/index53.mjs +30 -0
- package/index54.js +1 -0
- package/index54.mjs +51 -0
- package/index55.js +1 -0
- package/index55.mjs +10 -0
- package/index56.js +1 -0
- package/index56.mjs +49 -0
- package/index58.js +1 -0
- package/index58.mjs +64 -0
- package/index59.js +1 -0
- package/index59.mjs +62 -0
- package/index6.js +1 -0
- package/index6.mjs +29 -0
- package/index60.js +1 -0
- package/index60.mjs +31 -0
- package/index61.js +1 -0
- package/index61.mjs +23 -0
- package/index62.js +1 -0
- package/index62.mjs +32 -0
- package/index63.js +1 -0
- package/index63.mjs +16 -0
- package/index64.js +1 -0
- package/index64.mjs +61 -0
- package/index65.js +1 -0
- package/index65.mjs +19 -0
- package/index66.js +7 -0
- package/index66.mjs +411 -0
- package/index7.js +1 -0
- package/index7.mjs +8 -0
- package/index70.js +1 -0
- package/index70.mjs +4 -0
- package/index71.js +1 -0
- package/index71.mjs +76 -0
- package/index72.js +1 -0
- package/index72.mjs +31 -0
- package/index73.js +1 -0
- package/index73.mjs +38 -0
- package/index74.js +1 -0
- package/index74.mjs +6 -0
- package/index75.js +1 -0
- package/index75.mjs +37 -0
- package/index76.js +1 -0
- package/index76.mjs +7 -0
- package/index77.js +1 -0
- package/index77.mjs +7 -0
- package/index78.js +1 -0
- package/index78.mjs +7 -0
- package/index79.js +1 -0
- package/index79.mjs +7 -0
- package/index8.js +1 -0
- package/index8.mjs +18 -0
- package/index80.js +1 -0
- package/index80.mjs +7 -0
- package/index81.js +1 -0
- package/index81.mjs +19 -0
- package/index82.js +1 -0
- package/index82.mjs +87 -0
- package/index83.js +1 -0
- package/index83.mjs +8 -0
- package/index84.js +1 -0
- package/index84.mjs +27 -0
- package/index85.js +1 -0
- package/index85.mjs +57 -0
- package/index87.js +1 -0
- package/index87.mjs +7 -0
- package/index88.js +1 -0
- package/index88.mjs +121 -0
- package/index89.js +1 -0
- package/index89.mjs +20 -0
- package/index9.js +1 -0
- package/index9.mjs +18 -0
- package/index90.js +1 -0
- package/index90.mjs +26 -0
- package/index91.js +1 -0
- package/index91.mjs +4 -0
- package/index92.js +1 -0
- package/index92.mjs +237 -0
- package/index93.js +1 -0
- package/index93.mjs +4 -0
- package/index94.js +1 -0
- package/index94.mjs +13 -0
- package/index95.js +1 -0
- package/index95.mjs +249 -0
- package/index96.js +1 -0
- package/index96.mjs +91 -0
- package/index97.js +1 -0
- package/index97.mjs +15 -0
- package/index98.js +1 -0
- package/index98.mjs +6 -0
- package/index99.js +1 -0
- package/index99.mjs +4 -0
- package/lib/atoms/input/text-field/TextField.d.ts +1 -1
- package/lib/atoms/select/Select.types.d.ts +1 -1
- package/lib/base/icon/Icon.d.ts +1 -1
- package/lib/molecules/datepicker/Calendar.d.ts +1 -1
- package/lib/molecules/flyout/Flyout.d.ts +1 -1
- package/lib/molecules/tag/Tag.d.ts +1 -1
- package/package.json +4 -1
- package/packages/antwerp-ui/react-components/src/lib/atoms/input/text-field/TextField.css +1 -0
- package/packages/antwerp-ui/react-components/src/lib/atoms/tooltip/Tooltip.css +1 -0
- package/packages/antwerp-ui/react-components/src/lib/molecules/autocomplete/Autocomplete.css +1 -0
- package/packages/antwerp-ui/react-components/src/lib/molecules/datepicker/DateRangePicker.css +1 -0
- package/utils/math.utils.d.ts +1 -1
- package/index.css +0 -1
package/index71.mjs
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as r, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import { DayButton as b } from "./index119.mjs";
|
|
3
|
+
import { titleize as l } from "./index74.mjs";
|
|
4
|
+
import { useState as B } from "react";
|
|
5
|
+
import { isBetween as N } from "./index75.mjs";
|
|
6
|
+
import { eachDayOfInterval as $ } from "./index120.mjs";
|
|
7
|
+
import { endOfWeek as u } from "./index121.mjs";
|
|
8
|
+
import { startOfWeek as d } from "./index122.mjs";
|
|
9
|
+
import { format as k } from "./index85.mjs";
|
|
10
|
+
import { startOfMonth as j } from "./index123.mjs";
|
|
11
|
+
import { endOfMonth as V } from "./index124.mjs";
|
|
12
|
+
import { isValid as s } from "./index83.mjs";
|
|
13
|
+
import { isAfter as E } from "./index125.mjs";
|
|
14
|
+
import { addWeeks as z } from "./index126.mjs";
|
|
15
|
+
import { addDays as A } from "./index127.mjs";
|
|
16
|
+
function Z({
|
|
17
|
+
value: w,
|
|
18
|
+
onChange: y,
|
|
19
|
+
activeMonth: m,
|
|
20
|
+
activeYear: a,
|
|
21
|
+
ariaLabelCurrentDay: D,
|
|
22
|
+
locale: n,
|
|
23
|
+
unavailableFrom: O,
|
|
24
|
+
unavailableTo: S,
|
|
25
|
+
highlight: _,
|
|
26
|
+
unavailable: g,
|
|
27
|
+
hoverStart: f
|
|
28
|
+
}) {
|
|
29
|
+
const [c, p] = B(null), W = (t) => {
|
|
30
|
+
const o = [];
|
|
31
|
+
let e = d(t, { locale: n });
|
|
32
|
+
const i = u(t, { locale: n });
|
|
33
|
+
for (; s(e) && !E(e, i); ) {
|
|
34
|
+
let h = !1;
|
|
35
|
+
const I = new Date(a, m);
|
|
36
|
+
f && c && (h = N(e, f, c.toISOString())), o.push(
|
|
37
|
+
/* @__PURE__ */ r(
|
|
38
|
+
b,
|
|
39
|
+
{
|
|
40
|
+
ariaLabelCurrentDay: D,
|
|
41
|
+
unavailableFrom: O,
|
|
42
|
+
unavailableTo: S,
|
|
43
|
+
unavailable: g,
|
|
44
|
+
date: e,
|
|
45
|
+
hoverStyle: h,
|
|
46
|
+
highlight: _,
|
|
47
|
+
value: w,
|
|
48
|
+
monthYear: I,
|
|
49
|
+
onChange: y,
|
|
50
|
+
onMouseEnter: p,
|
|
51
|
+
onMouseLeave: () => p(null)
|
|
52
|
+
},
|
|
53
|
+
`day_${s(e) ? e.toISOString() : "invalid"}`
|
|
54
|
+
)
|
|
55
|
+
), e = A(e, 1);
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ r("tr", { children: o }, `aui-calendar-week-${e.toISOString()}`);
|
|
58
|
+
}, v = () => {
|
|
59
|
+
const t = [], o = new Date(a, m);
|
|
60
|
+
let e = d(j(o), { locale: n });
|
|
61
|
+
const i = V(o);
|
|
62
|
+
for (; s(e) && !E(e, i); )
|
|
63
|
+
t.push(W(e)), e = z(e, 1);
|
|
64
|
+
return t;
|
|
65
|
+
}, x = $({
|
|
66
|
+
start: d(/* @__PURE__ */ new Date(), { locale: n }),
|
|
67
|
+
end: u(/* @__PURE__ */ new Date(), { locale: n })
|
|
68
|
+
});
|
|
69
|
+
return /* @__PURE__ */ r("div", { className: "m-datepicker__grid", children: /* @__PURE__ */ M("table", { children: [
|
|
70
|
+
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { className: "m-datepicker__grid-head", children: x.map((t) => /* @__PURE__ */ r("th", { scope: "col", children: /* @__PURE__ */ r("span", { title: l(k(t, "EEEE", { locale: n })), children: l(k(t, "EEEEEE", { locale: n })) }) }, `aui-calendar-weekday-${t}`)) }) }),
|
|
71
|
+
/* @__PURE__ */ r("tbody", { className: "m-datepicker__grid-body", children: v() })
|
|
72
|
+
] }) });
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
Z as DaysView
|
|
76
|
+
};
|
package/index72.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("./index51.js"),M=require("./index74.js"),g=require("./index52.js"),c=require("./index77.js"),l=require("./index76.js"),j=require("./index85.js");function x({onChange:a,value:n,activeYear:r,locale:d=g.DEFAULT_LOCALE}){const i=e=>{const s=!!(n&&e===c.getMonth(n)&&r===l.getYear(n)),h=m.classNames({"is-current":e===c.getMonth(new Date)&&r===l.getYear(new Date),"is-selected":s}),o=new Date(r,e);return t.jsx("td",{children:t.jsx("button",{type:"button",className:h,onClick:()=>a(o),children:M.titleize(j.format(o,"MMMM",{locale:d}))})})},u=()=>{let e=0;const s=[];for(;e<12;)s.push(t.jsxs("tr",{children:[i(e),i(e+1)]},`aui-calendar-month-pair-${e}`)),e+=2;return s};return t.jsx("div",{className:"m-datepicker__list",children:t.jsx("table",{children:t.jsx("tbody",{className:"m-datepicker__list-body",children:u()})})})}exports.MonthsView=x;
|
package/index72.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as h } from "./index51.mjs";
|
|
3
|
+
import { titleize as f } from "./index74.mjs";
|
|
4
|
+
import { DEFAULT_LOCALE as u } from "./index52.mjs";
|
|
5
|
+
import { getMonth as c } from "./index77.mjs";
|
|
6
|
+
import { getYear as m } from "./index76.mjs";
|
|
7
|
+
import { format as M } from "./index85.mjs";
|
|
8
|
+
function L({ onChange: d, value: o, activeYear: n, locale: l = u }) {
|
|
9
|
+
const s = (e) => {
|
|
10
|
+
const r = !!(o && e === c(o) && n === m(o)), a = h({
|
|
11
|
+
"is-current": e === c(/* @__PURE__ */ new Date()) && n === m(/* @__PURE__ */ new Date()),
|
|
12
|
+
"is-selected": r
|
|
13
|
+
}), i = new Date(n, e);
|
|
14
|
+
return /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("button", { type: "button", className: a, onClick: () => d(i), children: f(M(i, "MMMM", { locale: l })) }) });
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ t("div", { className: "m-datepicker__list", children: /* @__PURE__ */ t("table", { children: /* @__PURE__ */ t("tbody", { className: "m-datepicker__list-body", children: (() => {
|
|
17
|
+
let e = 0;
|
|
18
|
+
const r = [];
|
|
19
|
+
for (; e < 12; )
|
|
20
|
+
r.push(
|
|
21
|
+
/* @__PURE__ */ p("tr", { children: [
|
|
22
|
+
s(e),
|
|
23
|
+
s(e + 1)
|
|
24
|
+
] }, `aui-calendar-month-pair-${e}`)
|
|
25
|
+
), e += 2;
|
|
26
|
+
return r;
|
|
27
|
+
})() }) }) });
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
L as MonthsView
|
|
31
|
+
};
|
package/index73.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./index51.js"),a=require("./index76.js"),u=require("./index85.js"),m=require("./index128.js");function j({yearsRowsStart:n,value:r,activeMonth:c,onChange:d}){const i=e=>{const s=l.classNames({"is-current":e===a.getYear(new Date),"is-selected":!!(r&&e===a.getYear(new Date(r)))});return t.jsx("td",{children:t.jsx("button",{type:"button",className:s,onClick:()=>d(new Date(e,c,r?m.getDate(r):1)),children:u.format(new Date(e,c),"yyyy")})})},o=()=>{let e=0;const s=[];for(;e<16;)s.push(t.jsxs("tr",{children:[i(n+e),i(n+e+1),i(n+e+2)]},`aui-calendar-years-${e}`)),e+=3;return s};return t.jsx("div",{className:"m-datepicker__list",children:t.jsx("table",{children:t.jsx("tbody",{className:"m-datepicker__list-body",children:o()})})})}exports.YearsView=j;
|
package/index73.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as l } from "./index51.mjs";
|
|
3
|
+
import { getYear as c } from "./index76.mjs";
|
|
4
|
+
import { format as a } from "./index85.mjs";
|
|
5
|
+
import { getDate as p } from "./index128.mjs";
|
|
6
|
+
function D({ yearsRowsStart: s, value: t, activeMonth: o, onChange: d }) {
|
|
7
|
+
const i = (e) => {
|
|
8
|
+
const n = l({
|
|
9
|
+
"is-current": e === c(/* @__PURE__ */ new Date()),
|
|
10
|
+
"is-selected": !!(t && e === c(new Date(t)))
|
|
11
|
+
});
|
|
12
|
+
return /* @__PURE__ */ r("td", { children: /* @__PURE__ */ r(
|
|
13
|
+
"button",
|
|
14
|
+
{
|
|
15
|
+
type: "button",
|
|
16
|
+
className: n,
|
|
17
|
+
onClick: () => d(new Date(e, o, t ? p(t) : 1)),
|
|
18
|
+
children: a(new Date(e, o), "yyyy")
|
|
19
|
+
}
|
|
20
|
+
) });
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ r("div", { className: "m-datepicker__list", children: /* @__PURE__ */ r("table", { children: /* @__PURE__ */ r("tbody", { className: "m-datepicker__list-body", children: (() => {
|
|
23
|
+
let e = 0;
|
|
24
|
+
const n = [];
|
|
25
|
+
for (; e < 16; )
|
|
26
|
+
n.push(
|
|
27
|
+
/* @__PURE__ */ m("tr", { children: [
|
|
28
|
+
i(s + e),
|
|
29
|
+
i(s + e + 1),
|
|
30
|
+
i(s + e + 2)
|
|
31
|
+
] }, `aui-calendar-years-${e}`)
|
|
32
|
+
), e += 3;
|
|
33
|
+
return n;
|
|
34
|
+
})() }) }) });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
D as YearsView
|
|
38
|
+
};
|
package/index74.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(e){return e.charAt(0).toUpperCase()+e.slice(1)}exports.titleize=t;
|
package/index74.mjs
ADDED
package/index75.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index129.js");const c=require("./index130.js"),f=require("./index52.js"),a=require("./index85.js"),u=require("./index131.js"),i=require("./index132.js"),o=require("./index125.js");function D(e,t,r,n){return r&&(u.isBefore(e,new Date(r))||i.isSameDay(e,new Date(r)))||t&&(o.isAfter(e,new Date(t))||i.isSameDay(e,new Date(t)))||!!n?.find(s=>i.isSameDay(e,new Date(s)))}function l(e,t,r){return o.isAfter(e,new Date(t))&&u.isBefore(e,new Date(r))}function w(e,t){try{return a.format(new Date(e),t)}catch{return e}}function m(e,t,r,n=""){try{return a.format(e,t,{locale:r})}catch{return n}}function I(e,t,r){return c.tz(f.TIMEZONE)(new Date(Date.UTC(e,t,r,0,0,0))).toISOString()}exports.formatIfValid=w;exports.formatWithFallback=m;exports.isBetween=l;exports.isInRange=D;exports.toUtcMidnightInBrussels=I;
|
package/index75.mjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./index129.mjs";
|
|
2
|
+
import { tz as f } from "./index130.mjs";
|
|
3
|
+
import { TIMEZONE as m } from "./index52.mjs";
|
|
4
|
+
import { format as s } from "./index85.mjs";
|
|
5
|
+
import { isBefore as a } from "./index131.mjs";
|
|
6
|
+
import { isSameDay as o } from "./index132.mjs";
|
|
7
|
+
import { isAfter as u } from "./index125.mjs";
|
|
8
|
+
function S(t, e, r, n) {
|
|
9
|
+
return r && (a(t, new Date(r)) || o(t, new Date(r))) || e && (u(t, new Date(e)) || o(t, new Date(e))) || !!n?.find((i) => o(t, new Date(i)));
|
|
10
|
+
}
|
|
11
|
+
function h(t, e, r) {
|
|
12
|
+
return u(t, new Date(e)) && a(t, new Date(r));
|
|
13
|
+
}
|
|
14
|
+
function O(t, e) {
|
|
15
|
+
try {
|
|
16
|
+
return s(new Date(t), e);
|
|
17
|
+
} catch {
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function g(t, e, r, n = "") {
|
|
22
|
+
try {
|
|
23
|
+
return s(t, e, { locale: r });
|
|
24
|
+
} catch {
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function y(t, e, r) {
|
|
29
|
+
return f(m)(new Date(Date.UTC(t, e, r, 0, 0, 0))).toISOString();
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
O as formatIfValid,
|
|
33
|
+
g as formatWithFallback,
|
|
34
|
+
h as isBetween,
|
|
35
|
+
S as isInRange,
|
|
36
|
+
y as toUtcMidnightInBrussels
|
|
37
|
+
};
|
package/index76.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index149.js");function o(e,t){return r.toDate(e,t?.in).getFullYear()}exports.getYear=o;
|
package/index76.mjs
ADDED
package/index77.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index149.js");function n(t,e){return o.toDate(t,e?.in).getMonth()}exports.getMonth=n;
|
package/index77.mjs
ADDED
package/index78.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index79.js");function a(e,s,r){return t.addYears(e,-1,r)}exports.subYears=a;
|
package/index78.mjs
ADDED
package/index79.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index81.js");function a(e,t,d){return r.addMonths(e,t*12,d)}exports.addYears=a;
|
package/index79.mjs
ADDED
package/index8.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),c=require("./index51.js"),l=require("react"),e=require("./index53.js"),g=require("./index55.js");function d({ariaLabel:r,theme:t,emphasis:s,children:n,qa:i}){const a=parseInt(n),o=c.classNames({"a-badge":!0,[`a-badge--${t}`]:!!t,[`a-badge--${e.EMPHASIS_MAP[s||e.DEFAULT_EMPHASIS]}`]:!!e.EMPHASIS_MAP[s||e.DEFAULT_EMPHASIS]});return l.useEffect(()=>{isNaN(a)&&g.logWarning("Using the Badge Component with a non-numerical value")},[n]),u.jsx("span",{className:o,"aria-label":r,"data-qa":i,children:isNaN(a)?"":`${a}`})}exports.Badge=d;
|
package/index8.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as c } from "./index51.mjs";
|
|
3
|
+
import { useEffect as g } from "react";
|
|
4
|
+
import { EMPHASIS_MAP as n, DEFAULT_EMPHASIS as t } from "./index53.mjs";
|
|
5
|
+
import { logWarning as l } from "./index55.mjs";
|
|
6
|
+
function A({ ariaLabel: s, theme: r, emphasis: o, children: e, qa: i }) {
|
|
7
|
+
const a = parseInt(e), m = c({
|
|
8
|
+
"a-badge": !0,
|
|
9
|
+
[`a-badge--${r}`]: !!r,
|
|
10
|
+
[`a-badge--${n[o || t]}`]: !!n[o || t]
|
|
11
|
+
});
|
|
12
|
+
return g(() => {
|
|
13
|
+
isNaN(a) && l("Using the Badge Component with a non-numerical value");
|
|
14
|
+
}, [e]), /* @__PURE__ */ f("span", { className: m, "aria-label": s, "data-qa": i, children: isNaN(a) ? "" : `${a}` });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
A as Badge
|
|
18
|
+
};
|
package/index80.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index81.js");function e(t,s,n){return o.addMonths(t,-1,n)}exports.subMonths=e;
|
package/index80.mjs
ADDED
package/index81.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index148.js"),u=require("./index149.js");function a(n,o,c){const t=u.toDate(n,c?.in);if(isNaN(o))return s.constructFrom(n,NaN);if(!o)return t;const r=t.getDate(),e=s.constructFrom(n,t.getTime());e.setMonth(t.getMonth()+o+1,0);const i=e.getDate();return r>=i?e:(t.setFullYear(e.getFullYear(),e.getMonth(),r),t)}exports.addMonths=a;
|
package/index81.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { constructFrom as s } from "./index148.mjs";
|
|
2
|
+
import { toDate as a } from "./index149.mjs";
|
|
3
|
+
function M(n, o, i) {
|
|
4
|
+
const t = a(n, i?.in);
|
|
5
|
+
if (isNaN(o)) return s(n, NaN);
|
|
6
|
+
if (!o)
|
|
7
|
+
return t;
|
|
8
|
+
const r = t.getDate(), e = s(n, t.getTime());
|
|
9
|
+
e.setMonth(t.getMonth() + o + 1, 0);
|
|
10
|
+
const f = e.getDate();
|
|
11
|
+
return r >= f ? e : (t.setFullYear(
|
|
12
|
+
e.getFullYear(),
|
|
13
|
+
e.getMonth(),
|
|
14
|
+
r
|
|
15
|
+
), t);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
M as addMonths
|
|
19
|
+
};
|
package/index82.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index158.js"),l=require("./index159.js"),b=require("./index148.js"),D=require("./index164.js"),O=require("./index149.js"),x=require("./index174.js"),E=require("./index175.js"),C=require("./index160.js"),$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,A=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W=/^'([^]*?)'?$/,N=/''/g,j=/\S/,v=/[a-zA-Z]/;function L(n,a,c,u){const o=()=>b.constructFrom(c,NaN),i=D.getDefaultOptions(),p=i.locale??C.enUS,F=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,q=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!a)return n?o():O.toDate(c,u?.in);const f={firstWeekContainsDate:F,weekStartsOn:q,locale:p},g=[new x.DateTimezoneSetter(u?.in,c)],P=a.match(A).map(e=>{const t=e[0];if(t in k.longFormatters){const r=k.longFormatters[t];return r(e,p.formatLong)}return e}).join("").match($),m=[];for(let e of P){l.isProtectedWeekYearToken(e)&&l.warnOrThrowProtectedError(e,a,n),l.isProtectedDayOfYearToken(e)&&l.warnOrThrowProtectedError(e,a,n);const t=e[0],r=E.parsers[t];if(r){const{incompatibleTokens:T}=r;if(Array.isArray(T)){const d=m.find(y=>T.includes(y.token)||y.token===t);if(d)throw new RangeError(`The format string mustn't contain \`${d.fullToken}\` and \`${e}\` at the same time`)}else if(r.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${e}\` and any other token at the same time`);m.push({token:t,fullToken:e});const h=r.run(n,e,p.match,f);if(!h)return o();g.push(h.setter),n=h.rest}else{if(t.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");if(e==="''"?e="'":t==="'"&&(e=Y(e)),n.indexOf(e)===0)n=n.slice(e.length);else return o()}}if(n.length>0&&j.test(n))return o();const R=g.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,r)=>r.indexOf(e)===t).map(e=>g.filter(t=>t.priority===e).sort((t,r)=>r.subPriority-t.subPriority)).map(e=>e[0]);let s=O.toDate(c,u?.in);if(isNaN(+s))return o();const w={};for(const e of R){if(!e.validate(s,f))return o();const t=e.set(s,w,f);Array.isArray(t)?(s=t[0],Object.assign(w,t[1])):s=t}return s}function Y(n){return n.match(W)[1].replace(N,"'")}exports.longFormatters=k.longFormatters;exports.parsers=E.parsers;exports.parse=L;
|
package/index82.mjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { longFormatters as y } from "./index158.mjs";
|
|
2
|
+
import { isProtectedWeekYearToken as b, warnOrThrowProtectedError as E, isProtectedDayOfYearToken as C } from "./index159.mjs";
|
|
3
|
+
import { constructFrom as D } from "./index148.mjs";
|
|
4
|
+
import { getDefaultOptions as F } from "./index164.mjs";
|
|
5
|
+
import { toDate as O } from "./index149.mjs";
|
|
6
|
+
import { DateTimezoneSetter as $ } from "./index174.mjs";
|
|
7
|
+
import { parsers as A } from "./index175.mjs";
|
|
8
|
+
import { enUS as W } from "./index160.mjs";
|
|
9
|
+
const N = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, L = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Y = /^'([^]*?)'?$/, j = /''/g, q = /\S/, v = /[a-zA-Z]/;
|
|
10
|
+
function G(n, a, c, f) {
|
|
11
|
+
const r = () => D(c, NaN), i = F(), l = i.locale ?? W, d = i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, R = i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0;
|
|
12
|
+
if (!a)
|
|
13
|
+
return n ? r() : O(c, f?.in);
|
|
14
|
+
const m = {
|
|
15
|
+
firstWeekContainsDate: d,
|
|
16
|
+
weekStartsOn: R,
|
|
17
|
+
locale: l
|
|
18
|
+
}, p = [new $(f?.in, c)], x = a.match(L).map((t) => {
|
|
19
|
+
const e = t[0];
|
|
20
|
+
if (e in y) {
|
|
21
|
+
const o = y[e];
|
|
22
|
+
return o(t, l.formatLong);
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
}).join("").match(N), u = [];
|
|
26
|
+
for (let t of x) {
|
|
27
|
+
b(t) && E(t, a, n), C(t) && E(t, a, n);
|
|
28
|
+
const e = t[0], o = A[e];
|
|
29
|
+
if (o) {
|
|
30
|
+
const { incompatibleTokens: k } = o;
|
|
31
|
+
if (Array.isArray(k)) {
|
|
32
|
+
const w = u.find(
|
|
33
|
+
(T) => k.includes(T.token) || T.token === e
|
|
34
|
+
);
|
|
35
|
+
if (w)
|
|
36
|
+
throw new RangeError(
|
|
37
|
+
`The format string mustn't contain \`${w.fullToken}\` and \`${t}\` at the same time`
|
|
38
|
+
);
|
|
39
|
+
} else if (o.incompatibleTokens === "*" && u.length > 0)
|
|
40
|
+
throw new RangeError(
|
|
41
|
+
`The format string mustn't contain \`${t}\` and any other token at the same time`
|
|
42
|
+
);
|
|
43
|
+
u.push({ token: e, fullToken: t });
|
|
44
|
+
const g = o.run(
|
|
45
|
+
n,
|
|
46
|
+
t,
|
|
47
|
+
l.match,
|
|
48
|
+
m
|
|
49
|
+
);
|
|
50
|
+
if (!g)
|
|
51
|
+
return r();
|
|
52
|
+
p.push(g.setter), n = g.rest;
|
|
53
|
+
} else {
|
|
54
|
+
if (e.match(v))
|
|
55
|
+
throw new RangeError(
|
|
56
|
+
"Format string contains an unescaped latin alphabet character `" + e + "`"
|
|
57
|
+
);
|
|
58
|
+
if (t === "''" ? t = "'" : e === "'" && (t = z(t)), n.indexOf(t) === 0)
|
|
59
|
+
n = n.slice(t.length);
|
|
60
|
+
else
|
|
61
|
+
return r();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (n.length > 0 && q.test(n))
|
|
65
|
+
return r();
|
|
66
|
+
const P = p.map((t) => t.priority).sort((t, e) => e - t).filter((t, e, o) => o.indexOf(t) === e).map(
|
|
67
|
+
(t) => p.filter((e) => e.priority === t).sort((e, o) => o.subPriority - e.subPriority)
|
|
68
|
+
).map((t) => t[0]);
|
|
69
|
+
let s = O(c, f?.in);
|
|
70
|
+
if (isNaN(+s)) return r();
|
|
71
|
+
const h = {};
|
|
72
|
+
for (const t of P) {
|
|
73
|
+
if (!t.validate(s, m))
|
|
74
|
+
return r();
|
|
75
|
+
const e = t.set(s, h, m);
|
|
76
|
+
Array.isArray(e) ? (s = e[0], Object.assign(h, e[1])) : s = e;
|
|
77
|
+
}
|
|
78
|
+
return s;
|
|
79
|
+
}
|
|
80
|
+
function z(n) {
|
|
81
|
+
return n.match(Y)[1].replace(j, "'");
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
y as longFormatters,
|
|
85
|
+
G as parse,
|
|
86
|
+
A as parsers
|
|
87
|
+
};
|
package/index83.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index173.js"),i=require("./index149.js");function r(e){return!(!t.isDate(e)&&typeof e!="number"||isNaN(+i.toDate(e)))}exports.isValid=r;
|
package/index83.mjs
ADDED
package/index84.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index161.js"),L=require("./index149.js");function O(c,g){const e=L.toDate(c,g?.in);if(isNaN(+e))throw new RangeError("Invalid time value");let o="",s="";const r="-",f=":";{const n=t.addLeadingZeros(e.getDate(),2),a=t.addLeadingZeros(e.getMonth()+1,2);o=`${t.addLeadingZeros(e.getFullYear(),4)}${r}${a}${r}${n}`}{const n=e.getTimezoneOffset();if(n!==0){const i=Math.abs(n),$=t.addLeadingZeros(Math.trunc(i/60),2),Z=t.addLeadingZeros(i%60,2);s=`${n<0?"+":"-"}${$}:${Z}`}else s="Z";const a=t.addLeadingZeros(e.getHours(),2),d=t.addLeadingZeros(e.getMinutes(),2),u=t.addLeadingZeros(e.getSeconds(),2),l=o===""?"":"T",m=[a,d,u].join(f);o=`${o}${l}${m}${s}`}return o}exports.formatISO=O;
|
package/index84.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { addLeadingZeros as e } from "./index161.mjs";
|
|
2
|
+
import { toDate as O } from "./index149.mjs";
|
|
3
|
+
function y(f, m) {
|
|
4
|
+
const t = O(f, m?.in);
|
|
5
|
+
if (isNaN(+t))
|
|
6
|
+
throw new RangeError("Invalid time value");
|
|
7
|
+
let o = "", s = "";
|
|
8
|
+
const i = "-", u = ":";
|
|
9
|
+
{
|
|
10
|
+
const n = e(t.getDate(), 2), r = e(t.getMonth() + 1, 2);
|
|
11
|
+
o = `${e(t.getFullYear(), 4)}${i}${r}${i}${n}`;
|
|
12
|
+
}
|
|
13
|
+
{
|
|
14
|
+
const n = t.getTimezoneOffset();
|
|
15
|
+
if (n !== 0) {
|
|
16
|
+
const c = Math.abs(n), d = e(Math.trunc(c / 60), 2), h = e(c % 60, 2);
|
|
17
|
+
s = `${n < 0 ? "+" : "-"}${d}:${h}`;
|
|
18
|
+
} else
|
|
19
|
+
s = "Z";
|
|
20
|
+
const r = e(t.getHours(), 2), a = e(t.getMinutes(), 2), $ = e(t.getSeconds(), 2), g = o === "" ? "" : "T", l = [r, a, $].join(u);
|
|
21
|
+
o = `${o}${g}${l}${s}`;
|
|
22
|
+
}
|
|
23
|
+
return o;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
y as formatISO
|
|
27
|
+
};
|
package/index85.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index156.js"),u=require("./index157.js"),m=require("./index158.js"),f=require("./index159.js"),T=require("./index83.js"),w=require("./index149.js"),D=require("./index160.js"),O=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,S=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v=/^'([^]*?)'?$/,E=/''/g,q=/[a-zA-Z]/;function k(o,a,r){const n=h.getDefaultOptions(),s=r?.locale??n.locale??D.enUS,p=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,d=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=w.toDate(o,r?.in);if(!T.isValid(i))throw new RangeError("Invalid time value");let c=a.match(S).map(t=>{const e=t[0];if(e==="p"||e==="P"){const l=m.longFormatters[e];return l(t,s.formatLong)}return t}).join("").match(O).map(t=>{if(t==="''")return{isToken:!1,value:"'"};const e=t[0];if(e==="'")return{isToken:!1,value:C(t)};if(u.formatters[e])return{isToken:!0,value:t};if(e.match(q))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}});s.localize.preprocessor&&(c=s.localize.preprocessor(i,c));const g={firstWeekContainsDate:p,weekStartsOn:d,locale:s};return c.map(t=>{if(!t.isToken)return t.value;const e=t.value;(!r?.useAdditionalWeekYearTokens&&f.isProtectedWeekYearToken(e)||!r?.useAdditionalDayOfYearTokens&&f.isProtectedDayOfYearToken(e))&&f.warnOrThrowProtectedError(e,a,String(o));const l=u.formatters[e[0]];return l(i,e,s.localize,g)}).join("")}function C(o){const a=o.match(v);return a?a[1].replace(E,"'"):o}exports.formatters=u.formatters;exports.longFormatters=m.longFormatters;exports.format=k;exports.formatDate=k;
|
package/index85.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getDefaultOptions as u } from "./index156.mjs";
|
|
2
|
+
import { formatters as f } from "./index157.mjs";
|
|
3
|
+
import { longFormatters as d } from "./index158.mjs";
|
|
4
|
+
import { isProtectedWeekYearToken as g, isProtectedDayOfYearToken as h, warnOrThrowProtectedError as w } from "./index159.mjs";
|
|
5
|
+
import { isValid as D } from "./index83.mjs";
|
|
6
|
+
import { toDate as T } from "./index149.mjs";
|
|
7
|
+
import { enUS as O } from "./index160.mjs";
|
|
8
|
+
const E = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, v = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, C = /^'([^]*?)'?$/, S = /''/g, R = /[a-zA-Z]/;
|
|
9
|
+
function L(o, a, r) {
|
|
10
|
+
const n = u(), i = r?.locale ?? n.locale ?? O, m = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, p = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = T(o, r?.in);
|
|
11
|
+
if (!D(s))
|
|
12
|
+
throw new RangeError("Invalid time value");
|
|
13
|
+
let c = a.match(v).map((t) => {
|
|
14
|
+
const e = t[0];
|
|
15
|
+
if (e === "p" || e === "P") {
|
|
16
|
+
const l = d[e];
|
|
17
|
+
return l(t, i.formatLong);
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
}).join("").match(E).map((t) => {
|
|
21
|
+
if (t === "''")
|
|
22
|
+
return { isToken: !1, value: "'" };
|
|
23
|
+
const e = t[0];
|
|
24
|
+
if (e === "'")
|
|
25
|
+
return { isToken: !1, value: W(t) };
|
|
26
|
+
if (f[e])
|
|
27
|
+
return { isToken: !0, value: t };
|
|
28
|
+
if (e.match(R))
|
|
29
|
+
throw new RangeError(
|
|
30
|
+
"Format string contains an unescaped latin alphabet character `" + e + "`"
|
|
31
|
+
);
|
|
32
|
+
return { isToken: !1, value: t };
|
|
33
|
+
});
|
|
34
|
+
i.localize.preprocessor && (c = i.localize.preprocessor(s, c));
|
|
35
|
+
const k = {
|
|
36
|
+
firstWeekContainsDate: m,
|
|
37
|
+
weekStartsOn: p,
|
|
38
|
+
locale: i
|
|
39
|
+
};
|
|
40
|
+
return c.map((t) => {
|
|
41
|
+
if (!t.isToken) return t.value;
|
|
42
|
+
const e = t.value;
|
|
43
|
+
(!r?.useAdditionalWeekYearTokens && g(e) || !r?.useAdditionalDayOfYearTokens && h(e)) && w(e, a, String(o));
|
|
44
|
+
const l = f[e[0]];
|
|
45
|
+
return l(s, e, i.localize, k);
|
|
46
|
+
}).join("");
|
|
47
|
+
}
|
|
48
|
+
function W(o) {
|
|
49
|
+
const a = o.match(C);
|
|
50
|
+
return a ? a[1].replace(S, "'") : o;
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
L as format,
|
|
54
|
+
L as formatDate,
|
|
55
|
+
f as formatters,
|
|
56
|
+
d as longFormatters
|
|
57
|
+
};
|
package/index87.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index127.js");function s(e,u,t){return a.addDays(e,-1,t)}exports.subDays=s;
|
package/index87.mjs
ADDED
package/index88.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index150.js"),N=require("./index148.js"),p=require("./index149.js");function T(t,e){const n=()=>N.constructFrom(e?.in,NaN),i=C(t);let a;if(i.date){const s=y(i.date,2);a=Y(s.restDateString,s.year)}if(!a||isNaN(+a))return n();const u=+a;let o=0,c;if(i.time&&(o=w(i.time),isNaN(o)))return n();if(i.timezone){if(c=x(i.timezone),isNaN(c))return n()}else{const s=new Date(u+o),m=p.toDate(0,e?.in);return m.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),m.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),m}return p.toDate(u+o+c,e?.in)}const f={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},I=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,U=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,h=/^([+-])(\d{2})(?::?(\d{2}))?$/;function C(t){const e={},n=t.split(f.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],f.timeZoneDelimiter.test(e.date)&&(e.date=t.split(f.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const i=f.timezone.exec(r);i?(e.time=r.replace(i[1],""),e.timezone=i[1]):e.time=r}return e}function y(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:t.slice((r[1]||r[2]).length)}}function Y(t,e){if(e===null)return new Date(NaN);const n=t.match(I);if(!n)return new Date(NaN);const r=!!n[4],i=l(n[1]),a=l(n[2])-1,u=l(n[3]),o=l(n[4]),c=l(n[5])-1;if(r)return F(e,o,c)?M(e,o,c):new Date(NaN);{const s=new Date(0);return!S(e,a,u)||!z(e,i)?new Date(NaN):(s.setUTCFullYear(e,a,Math.max(i,u)),s)}}function l(t){return t?parseInt(t):1}function w(t){const e=t.match(U);if(!e)return NaN;const n=D(e[1]),r=D(e[2]),i=D(e[3]);return Z(n,r,i)?n*d.millisecondsInHour+r*d.millisecondsInMinute+i*1e3:NaN}function D(t){return t&&parseFloat(t.replace(",","."))||0}function x(t){if(t==="Z")return 0;const e=t.match(h);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return k(r,i)?n*(r*d.millisecondsInHour+i*d.millisecondsInMinute):NaN}function M(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const i=r.getUTCDay()||7,a=(e-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const O=[31,null,31,30,31,30,31,31,30,31,30,31];function g(t){return t%400===0||t%4===0&&t%100!==0}function S(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(O[e]||(g(t)?29:28))}function z(t,e){return e>=1&&e<=(g(t)?366:365)}function F(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function Z(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function k(t,e){return e>=0&&e<=59}exports.parseISO=T;
|