quirk-ui 0.1.19 → 0.1.21
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/dist/assets/index12.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index61.css +1 -1
- package/dist/assets/index66.css +1 -1
- package/dist/core/components/ButtonGroup/index.cjs +1 -1
- package/dist/core/components/ButtonGroup/index.mjs +20 -20
- package/dist/core/components/Calendar/Calendar.test.cjs +1 -1
- package/dist/core/components/Calendar/Calendar.test.mjs +1 -1
- package/dist/core/components/Calendar/index.cjs +1 -1
- package/dist/core/components/Calendar/index.mjs +1 -1
- package/dist/core/components/Checkbox/index.cjs +1 -1
- package/dist/core/components/Checkbox/index.mjs +59 -59
- package/dist/core/components/DatePicker/DatePicker.test.cjs +1 -1
- package/dist/core/components/DatePicker/DatePicker.test.mjs +1 -1
- package/dist/core/components/DatePicker/index.cjs +2 -2
- package/dist/core/components/DatePicker/index.mjs +56 -56
- package/dist/core/components/Heading/index.cjs +1 -1
- package/dist/core/components/Heading/index.mjs +27 -27
- package/dist/core/components/Text/index.cjs +1 -1
- package/dist/core/components/Text/index.mjs +21 -21
- package/dist/{index-hM-Do4qg.js → index-D38CuMjf.js} +42 -42
- package/dist/{index-CiXCoJuk.cjs → index-DvtjEAHw.cjs} +1 -1
- package/dist/next/blocks/StickyScrollBlock/index.cjs +1 -1
- package/dist/next/blocks/StickyScrollBlock/index.mjs +67 -62
- package/dist/styles.css +14 -14
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { f as j, C as P } from "../../../index-
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useRef as z, useEffect as v } from "react";
|
|
3
|
+
import { f as j, C as P } from "../../../index-D38CuMjf.js";
|
|
4
4
|
import { Label as R } from "../Label/index.mjs";
|
|
5
5
|
import { X as F } from "../../../x-CnsEH4Ox.js";
|
|
6
6
|
import { c as X } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
@@ -15,7 +15,7 @@ const A = [
|
|
|
15
15
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
16
16
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
17
17
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
18
|
-
], G = X("calendar", A), H = "
|
|
18
|
+
], G = X("calendar", A), H = "_wrapper_176sy_1", J = "_inputWrapper_176sy_28", K = "_input_176sy_28", Q = "_inputDisabled_176sy_62", U = "_inputError_176sy_69", Y = "_icons_176sy_78", Z = "_calendarIcon_176sy_87", q = "_iconDisabled_176sy_92", V = "_clearButton_176sy_101", C = "_helperText_176sy_129", g = "_helperTextError_176sy_134", ee = "_popover_176sy_139", e = {
|
|
19
19
|
wrapper: H,
|
|
20
20
|
inputWrapper: J,
|
|
21
21
|
input: K,
|
|
@@ -27,17 +27,17 @@ const A = [
|
|
|
27
27
|
clearButton: V,
|
|
28
28
|
helperText: C,
|
|
29
29
|
helperTextError: g,
|
|
30
|
-
popover:
|
|
30
|
+
popover: ee
|
|
31
31
|
};
|
|
32
|
-
function
|
|
33
|
-
id:
|
|
34
|
-
name:
|
|
35
|
-
label:
|
|
32
|
+
function oe({
|
|
33
|
+
id: D,
|
|
34
|
+
name: $,
|
|
35
|
+
label: E,
|
|
36
36
|
value: o,
|
|
37
|
-
defaultValue:
|
|
37
|
+
defaultValue: h,
|
|
38
38
|
placeholder: b = "Select date",
|
|
39
|
-
required:
|
|
40
|
-
disabled:
|
|
39
|
+
required: k = !1,
|
|
40
|
+
disabled: s = !1,
|
|
41
41
|
error: p = !1,
|
|
42
42
|
helperText: m,
|
|
43
43
|
minDate: w,
|
|
@@ -46,77 +46,77 @@ function ot({
|
|
|
46
46
|
formatStr: T = "yyyy-MM-dd",
|
|
47
47
|
className: L,
|
|
48
48
|
onChange: c,
|
|
49
|
-
onValueChange:
|
|
49
|
+
onValueChange: n,
|
|
50
50
|
...M
|
|
51
51
|
}) {
|
|
52
|
-
const [
|
|
53
|
-
|
|
54
|
-
), [i,
|
|
55
|
-
|
|
52
|
+
const [a, _] = x(
|
|
53
|
+
h || o || null
|
|
54
|
+
), [i, l] = x(!1), u = z(null), d = D || `datepicker-${Math.random().toString(36).substr(2, 9)}`;
|
|
55
|
+
v(() => {
|
|
56
56
|
o !== void 0 && _(o);
|
|
57
|
-
}, [o]),
|
|
58
|
-
const
|
|
59
|
-
u.current && !u.current.contains(
|
|
57
|
+
}, [o]), v(() => {
|
|
58
|
+
const t = (y) => {
|
|
59
|
+
u.current && !u.current.contains(y.target) && l(!1);
|
|
60
60
|
};
|
|
61
|
-
return i && document.addEventListener("mousedown",
|
|
62
|
-
document.removeEventListener("mousedown",
|
|
61
|
+
return i && document.addEventListener("mousedown", t), () => {
|
|
62
|
+
document.removeEventListener("mousedown", t);
|
|
63
63
|
};
|
|
64
|
-
}, [i]),
|
|
65
|
-
const
|
|
66
|
-
|
|
64
|
+
}, [i]), v(() => {
|
|
65
|
+
const t = (y) => {
|
|
66
|
+
y.key === "Escape" && i && l(!1);
|
|
67
67
|
};
|
|
68
|
-
return document.addEventListener("keydown",
|
|
68
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
69
69
|
}, [i]);
|
|
70
|
-
const S = (
|
|
71
|
-
_(
|
|
72
|
-
}, B = (
|
|
73
|
-
|
|
70
|
+
const S = (t) => {
|
|
71
|
+
_(t), l(!1), c == null || c(t), n == null || n(t);
|
|
72
|
+
}, B = (t) => {
|
|
73
|
+
t.stopPropagation(), _(null), c == null || c(null), n == null || n(null);
|
|
74
74
|
}, O = () => {
|
|
75
|
-
|
|
76
|
-
}, W =
|
|
77
|
-
return /* @__PURE__ */
|
|
75
|
+
s || l(!i);
|
|
76
|
+
}, W = a ? j(a, T) : "";
|
|
77
|
+
return /* @__PURE__ */ f(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
ref: u,
|
|
81
|
-
className: `${
|
|
81
|
+
className: `${e.wrapper} ${L ?? ""}`.trim(),
|
|
82
82
|
children: [
|
|
83
|
-
|
|
83
|
+
E && /* @__PURE__ */ r(
|
|
84
84
|
R,
|
|
85
85
|
{
|
|
86
|
-
htmlFor:
|
|
87
|
-
intent: p ? "error" :
|
|
88
|
-
required:
|
|
89
|
-
disabled:
|
|
86
|
+
htmlFor: d,
|
|
87
|
+
intent: p ? "error" : s ? "disabled" : "default",
|
|
88
|
+
required: k,
|
|
89
|
+
disabled: s,
|
|
90
90
|
size: "md",
|
|
91
|
-
children:
|
|
91
|
+
children: E
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ f("div", { className: e.inputWrapper, children: [
|
|
95
95
|
/* @__PURE__ */ r(
|
|
96
96
|
"input",
|
|
97
97
|
{
|
|
98
|
-
id:
|
|
99
|
-
name:
|
|
98
|
+
id: d,
|
|
99
|
+
name: $,
|
|
100
100
|
type: "text",
|
|
101
101
|
readOnly: !0,
|
|
102
102
|
value: W,
|
|
103
103
|
onClick: O,
|
|
104
104
|
placeholder: b,
|
|
105
|
-
required:
|
|
106
|
-
disabled:
|
|
107
|
-
className: `${
|
|
105
|
+
required: k,
|
|
106
|
+
disabled: s,
|
|
107
|
+
className: `${e.input} ${p ? e.inputError : ""} ${s ? e.inputDisabled : ""}`.trim(),
|
|
108
108
|
"aria-invalid": p,
|
|
109
|
-
"aria-describedby": m ? `${
|
|
109
|
+
"aria-describedby": m ? `${d}-helper` : void 0,
|
|
110
110
|
...M
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
113
|
+
/* @__PURE__ */ f("div", { className: e.icons, children: [
|
|
114
|
+
a && !s && /* @__PURE__ */ r(
|
|
115
115
|
"button",
|
|
116
116
|
{
|
|
117
117
|
type: "button",
|
|
118
118
|
onClick: B,
|
|
119
|
-
className:
|
|
119
|
+
className: e.clearButton,
|
|
120
120
|
"aria-label": "Clear date",
|
|
121
121
|
tabIndex: -1,
|
|
122
122
|
children: /* @__PURE__ */ r(F, { size: 14 })
|
|
@@ -126,7 +126,7 @@ function ot({
|
|
|
126
126
|
G,
|
|
127
127
|
{
|
|
128
128
|
size: 18,
|
|
129
|
-
className: `${
|
|
129
|
+
className: `${e.calendarIcon} ${s ? e.iconDisabled : ""}`.trim()
|
|
130
130
|
}
|
|
131
131
|
)
|
|
132
132
|
] })
|
|
@@ -134,15 +134,15 @@ function ot({
|
|
|
134
134
|
m && /* @__PURE__ */ r(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
|
-
id: `${
|
|
138
|
-
className: `${
|
|
137
|
+
id: `${d}-helper`,
|
|
138
|
+
className: `${e.helperText} ${p ? e.helperTextError : ""}`.trim(),
|
|
139
139
|
children: m
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
i && /* @__PURE__ */ r("div", { className:
|
|
142
|
+
i && /* @__PURE__ */ r("div", { className: e.popover, children: /* @__PURE__ */ r(
|
|
143
143
|
P,
|
|
144
144
|
{
|
|
145
|
-
selectedDate:
|
|
145
|
+
selectedDate: a,
|
|
146
146
|
onSelectDate: S,
|
|
147
147
|
minDate: w,
|
|
148
148
|
maxDate: N,
|
|
@@ -154,5 +154,5 @@ function ot({
|
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
156
|
export {
|
|
157
|
-
|
|
157
|
+
oe as DatePicker
|
|
158
158
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index23.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index23.css');const b=require("react"),y="_heading_274hu_2",C="_h1_274hu_10",w="_h2_274hu_16",k="_h3_274hu_22",v="_h4_274hu_27",S="_h5_274hu_32",z="_h6_274hu_37",H="_gradient_274hu_71",O="_truncate_274hu_84",t={heading:y,h1:C,h2:w,h3:k,h4:v,h5:S,h6:z,"align-left":"_align-left_274hu_45","align-center":"_align-center_274hu_49","align-right":"_align-right_274hu_53","transform-uppercase":"_transform-uppercase_274hu_58","transform-lowercase":"_transform-lowercase_274hu_62","transform-capitalize":"_transform-capitalize_274hu_66",gradient:H,truncate:O};function W({level:n=1,as:r,align:a,transform:s="none",gradient:_=!1,truncate:h=!1,maxLines:e,className:c,style:o,children:i,...l}){const u=r||`h${n}`,g=t[`h${n}`]||"",d=a?t[`align-${a}`]:"",f=s!=="none"?t[`transform-${s}`]:"",m=_?t.gradient:"",$=h?t.truncate:"",p={...o,...e&&e>1?{display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden"}:{}};return b.createElement(u,{className:`${t.heading} ${g} ${d} ${f} ${m} ${$} ${c??""}`.trim(),style:p,...l},i)}exports.Heading=W;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../../../assets/index23.css';const
|
|
3
|
-
heading:
|
|
4
|
-
h1:
|
|
5
|
-
h2:
|
|
6
|
-
h3:
|
|
7
|
-
h4:
|
|
8
|
-
h5:
|
|
9
|
-
h6:
|
|
10
|
-
"align-left": "_align-
|
|
11
|
-
"align-center": "_align-
|
|
12
|
-
"align-right": "_align-
|
|
13
|
-
"transform-uppercase": "_transform-
|
|
14
|
-
"transform-lowercase": "_transform-
|
|
15
|
-
"transform-capitalize": "_transform-
|
|
16
|
-
gradient:
|
|
17
|
-
truncate:
|
|
1
|
+
import C from "react";
|
|
2
|
+
import '../../../assets/index23.css';const b = "_heading_274hu_2", w = "_h1_274hu_10", y = "_h2_274hu_16", k = "_h3_274hu_22", v = "_h4_274hu_27", z = "_h5_274hu_32", W = "_h6_274hu_37", x = "_gradient_274hu_71", B = "_truncate_274hu_84", t = {
|
|
3
|
+
heading: b,
|
|
4
|
+
h1: w,
|
|
5
|
+
h2: y,
|
|
6
|
+
h3: k,
|
|
7
|
+
h4: v,
|
|
8
|
+
h5: z,
|
|
9
|
+
h6: W,
|
|
10
|
+
"align-left": "_align-left_274hu_45",
|
|
11
|
+
"align-center": "_align-center_274hu_49",
|
|
12
|
+
"align-right": "_align-right_274hu_53",
|
|
13
|
+
"transform-uppercase": "_transform-uppercase_274hu_58",
|
|
14
|
+
"transform-lowercase": "_transform-lowercase_274hu_62",
|
|
15
|
+
"transform-capitalize": "_transform-capitalize_274hu_66",
|
|
16
|
+
gradient: x,
|
|
17
|
+
truncate: B
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
level:
|
|
19
|
+
function H({
|
|
20
|
+
level: e = 1,
|
|
21
21
|
as: s,
|
|
22
22
|
align: a,
|
|
23
23
|
transform: _ = "none",
|
|
24
24
|
gradient: h = !1,
|
|
25
25
|
truncate: r = !1,
|
|
26
|
-
maxLines:
|
|
26
|
+
maxLines: n,
|
|
27
27
|
className: o,
|
|
28
28
|
style: c,
|
|
29
29
|
children: i,
|
|
30
30
|
...l
|
|
31
31
|
}) {
|
|
32
|
-
const
|
|
32
|
+
const u = s || `h${e}`, g = t[`h${e}`] || "", d = a ? t[`align-${a}`] : "", f = _ !== "none" ? t[`transform-${_}`] : "", m = h ? t.gradient : "", $ = r ? t.truncate : "", p = {
|
|
33
33
|
...c,
|
|
34
|
-
...
|
|
34
|
+
...n && n > 1 ? {
|
|
35
35
|
display: "-webkit-box",
|
|
36
|
-
WebkitLineClamp:
|
|
36
|
+
WebkitLineClamp: n,
|
|
37
37
|
WebkitBoxOrient: "vertical",
|
|
38
38
|
overflow: "hidden"
|
|
39
39
|
} : {}
|
|
40
40
|
};
|
|
41
|
-
return
|
|
42
|
-
|
|
41
|
+
return C.createElement(
|
|
42
|
+
u,
|
|
43
43
|
{
|
|
44
|
-
className: `${
|
|
44
|
+
className: `${t.heading} ${g} ${d} ${f} ${m} ${$} ${o ?? ""}`.trim(),
|
|
45
45
|
style: p,
|
|
46
46
|
...l
|
|
47
47
|
},
|
|
@@ -49,5 +49,5 @@ function E({
|
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
H as Heading
|
|
53
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index22.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index22.css');const r=require("react/jsx-runtime"),a=require("react"),p="_text_1gbox_1",g="_muted_1gbox_172",m="_lead_1gbox_176",_="_large_1gbox_182",x="_small_1gbox_187",s={text:p,default:"_default_1gbox_167",muted:g,lead:m,large:_,small:x},i=["div","ul","ol","table","section","article","blockquote","pre","hr"];function c(o){let t=!1;return a.Children.forEach(o,e=>{if(!a.isValidElement(e))return;const n=typeof e.type=="string"?e.type:"";if(i.includes(n))t=!0;else{const l=e.props.children;l&&c(l)&&(t=!0)}}),t}function b(o){const t=[];let e=[];return a.Children.forEach(o,n=>{const l=a.isValidElement(n)&&typeof n.type=="string"&&i.includes(n.type);typeof n=="string"||a.isValidElement(n)&&!l?e.push(n):(e.length>0&&(t.push(r.jsx("p",{children:e},t.length)),e=[]),t.push(n))}),e.length>0&&t.push(r.jsx("p",{children:e},t.length)),t}const y={default:s.default,muted:s.muted,lead:s.lead,small:s.small,large:s.large};function E({as:o,variant:t="default",children:e,className:n,...l}){const f=y[t],u=c(e),d=o??(u?"div":"p");return r.jsx(d,{className:`${n??""} ${s.text} ${f}`.trim(),...l,children:u?b(e):e})}exports.Text=E;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
|
-
import '../../../assets/index22.css';const c = "
|
|
3
|
+
import '../../../assets/index22.css';const c = "_text_1gbox_1", m = "_muted_1gbox_172", d = "_lead_1gbox_176", _ = "_large_1gbox_182", g = "_small_1gbox_187", s = {
|
|
4
4
|
text: c,
|
|
5
|
-
default: "
|
|
5
|
+
default: "_default_1gbox_167",
|
|
6
6
|
muted: m,
|
|
7
7
|
lead: d,
|
|
8
8
|
large: _,
|
|
9
9
|
small: g
|
|
10
|
-
},
|
|
10
|
+
}, u = [
|
|
11
11
|
"div",
|
|
12
12
|
"ul",
|
|
13
13
|
"ol",
|
|
@@ -18,51 +18,51 @@ import '../../../assets/index22.css';const c = "_text_10rqf_1", m = "_muted_10rq
|
|
|
18
18
|
"pre",
|
|
19
19
|
"hr"
|
|
20
20
|
];
|
|
21
|
-
function
|
|
21
|
+
function f(o) {
|
|
22
22
|
let t = !1;
|
|
23
|
-
return a.Children.forEach(
|
|
23
|
+
return a.Children.forEach(o, (e) => {
|
|
24
24
|
if (!a.isValidElement(e)) return;
|
|
25
25
|
const n = typeof e.type == "string" ? e.type : "";
|
|
26
|
-
if (
|
|
26
|
+
if (u.includes(n))
|
|
27
27
|
t = !0;
|
|
28
28
|
else {
|
|
29
29
|
const l = e.props.children;
|
|
30
|
-
l &&
|
|
30
|
+
l && f(l) && (t = !0);
|
|
31
31
|
}
|
|
32
32
|
}), t;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function x(o) {
|
|
35
35
|
const t = [];
|
|
36
36
|
let e = [];
|
|
37
|
-
return a.Children.forEach(
|
|
38
|
-
const l = a.isValidElement(n) && typeof n.type == "string" &&
|
|
39
|
-
typeof n == "string" || a.isValidElement(n) && !l ? e.push(n) : (e.length > 0 && (t.push(/* @__PURE__ */
|
|
40
|
-
}), e.length > 0 && t.push(/* @__PURE__ */
|
|
37
|
+
return a.Children.forEach(o, (n) => {
|
|
38
|
+
const l = a.isValidElement(n) && typeof n.type == "string" && u.includes(n.type);
|
|
39
|
+
typeof n == "string" || a.isValidElement(n) && !l ? e.push(n) : (e.length > 0 && (t.push(/* @__PURE__ */ r("p", { children: e }, t.length)), e = []), t.push(n));
|
|
40
|
+
}), e.length > 0 && t.push(/* @__PURE__ */ r("p", { children: e }, t.length)), t;
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const E = {
|
|
43
43
|
default: s.default,
|
|
44
44
|
muted: s.muted,
|
|
45
45
|
lead: s.lead,
|
|
46
46
|
small: s.small,
|
|
47
47
|
large: s.large
|
|
48
48
|
};
|
|
49
|
-
function
|
|
50
|
-
as:
|
|
49
|
+
function y({
|
|
50
|
+
as: o,
|
|
51
51
|
variant: t = "default",
|
|
52
52
|
children: e,
|
|
53
53
|
className: n,
|
|
54
54
|
...l
|
|
55
55
|
}) {
|
|
56
|
-
const p =
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
56
|
+
const p = E[t], i = f(e);
|
|
57
|
+
return /* @__PURE__ */ r(
|
|
58
|
+
o ?? (i ? "div" : "p"),
|
|
59
59
|
{
|
|
60
60
|
className: `${n ?? ""} ${s.text} ${p}`.trim(),
|
|
61
61
|
...l,
|
|
62
|
-
children:
|
|
62
|
+
children: i ? x(e) : e
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
y as Text
|
|
68
68
|
};
|
|
@@ -83,7 +83,7 @@ function Me(t, e) {
|
|
|
83
83
|
const n = ue(t, e), r = b(t, 0);
|
|
84
84
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), B(r);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Oe(t) {
|
|
87
87
|
return b(t, Date.now());
|
|
88
88
|
}
|
|
89
89
|
function L(t, e, n) {
|
|
@@ -94,11 +94,11 @@ function L(t, e, n) {
|
|
|
94
94
|
);
|
|
95
95
|
return +D(r) == +D(a);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Pe(t) {
|
|
98
98
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return !(!
|
|
100
|
+
function ve(t) {
|
|
101
|
+
return !(!Pe(t) && typeof t != "number" || isNaN(+d(t)));
|
|
102
102
|
}
|
|
103
103
|
function p(t, e) {
|
|
104
104
|
const n = d(t, e == null ? void 0 : e.in), r = n.getMonth();
|
|
@@ -244,11 +244,11 @@ const Ee = {
|
|
|
244
244
|
narrow: ["B", "A"],
|
|
245
245
|
abbreviated: ["BC", "AD"],
|
|
246
246
|
wide: ["Before Christ", "Anno Domini"]
|
|
247
|
-
},
|
|
247
|
+
}, qe = {
|
|
248
248
|
narrow: ["1", "2", "3", "4"],
|
|
249
249
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
250
250
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
251
|
-
},
|
|
251
|
+
}, Fe = {
|
|
252
252
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
253
253
|
abbreviated: [
|
|
254
254
|
"Jan",
|
|
@@ -372,12 +372,12 @@ const Ee = {
|
|
|
372
372
|
defaultWidth: "wide"
|
|
373
373
|
}),
|
|
374
374
|
quarter: C({
|
|
375
|
-
values:
|
|
375
|
+
values: qe,
|
|
376
376
|
defaultWidth: "wide",
|
|
377
377
|
argumentCallback: (t) => t - 1
|
|
378
378
|
}),
|
|
379
379
|
month: C({
|
|
380
|
-
values:
|
|
380
|
+
values: Fe,
|
|
381
381
|
defaultWidth: "wide"
|
|
382
382
|
}),
|
|
383
383
|
day: C({
|
|
@@ -1267,11 +1267,11 @@ function yt(t, e, n) {
|
|
|
1267
1267
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1268
1268
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1269
1269
|
}
|
|
1270
|
-
const wt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Mt = /^'([^]*?)'?$/,
|
|
1270
|
+
const wt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Mt = /^'([^]*?)'?$/, Ot = /''/g, Pt = /[a-zA-Z]/;
|
|
1271
1271
|
function E(t, e, n) {
|
|
1272
1272
|
var g, w, S, x;
|
|
1273
1273
|
const r = Q(), a = r.locale ?? rt, i = r.firstWeekContainsDate ?? ((w = (g = r.locale) == null ? void 0 : g.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, s = r.weekStartsOn ?? ((x = (S = r.locale) == null ? void 0 : S.options) == null ? void 0 : x.weekStartsOn) ?? 0, o = d(t, n == null ? void 0 : n.in);
|
|
1274
|
-
if (!
|
|
1274
|
+
if (!ve(o))
|
|
1275
1275
|
throw new RangeError("Invalid time value");
|
|
1276
1276
|
let u = e.match(bt).map((y) => {
|
|
1277
1277
|
const f = y[0];
|
|
@@ -1285,10 +1285,10 @@ function E(t, e, n) {
|
|
|
1285
1285
|
return { isToken: !1, value: "'" };
|
|
1286
1286
|
const f = y[0];
|
|
1287
1287
|
if (f === "'")
|
|
1288
|
-
return { isToken: !1, value:
|
|
1288
|
+
return { isToken: !1, value: vt(y) };
|
|
1289
1289
|
if (te[f])
|
|
1290
1290
|
return { isToken: !0, value: y };
|
|
1291
|
-
if (f.match(
|
|
1291
|
+
if (f.match(Pt))
|
|
1292
1292
|
throw new RangeError(
|
|
1293
1293
|
"Format string contains an unescaped latin alphabet character `" + f + "`"
|
|
1294
1294
|
);
|
|
@@ -1308,9 +1308,9 @@ function E(t, e, n) {
|
|
|
1308
1308
|
return l(o, f, a.localize, h);
|
|
1309
1309
|
}).join("");
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function vt(t) {
|
|
1312
1312
|
const e = t.match(Mt);
|
|
1313
|
-
return e ? e[1].replace(
|
|
1313
|
+
return e ? e[1].replace(Ot, "'") : t;
|
|
1314
1314
|
}
|
|
1315
1315
|
function ie(t, e) {
|
|
1316
1316
|
return +d(t) > +d(e);
|
|
@@ -1329,13 +1329,13 @@ function kt(t, e, n) {
|
|
|
1329
1329
|
function Dt(t, e) {
|
|
1330
1330
|
return L(
|
|
1331
1331
|
b(t, t),
|
|
1332
|
-
|
|
1332
|
+
Oe(t)
|
|
1333
1333
|
);
|
|
1334
1334
|
}
|
|
1335
1335
|
function oe(t, e, n) {
|
|
1336
1336
|
return X(t, -1, n);
|
|
1337
1337
|
}
|
|
1338
|
-
const St = "
|
|
1338
|
+
const St = "_calendar_1eniq_1", xt = "_header_1eniq_11", _t = "_navButton_1eniq_18", Wt = "_monthName_1eniq_47", Yt = "_daysRow_1eniq_53", Nt = "_dayName_1eniq_60", Ct = "_cells_1eniq_70", Tt = "_week_1eniq_76", Et = "_cell_1eniq_70", qt = "_cellContent_1eniq_99", Ft = "_selected_1eniq_107", Ht = "_outside_1eniq_117", Bt = "_today_1eniq_125", Qt = "_disabled_1eniq_152", Rt = "_emptyCell_1eniq_163", m = {
|
|
1339
1339
|
calendar: St,
|
|
1340
1340
|
header: xt,
|
|
1341
1341
|
navButton: _t,
|
|
@@ -1345,8 +1345,8 @@ const St = "_calendar_907ov_1", xt = "_header_907ov_11", _t = "_navButton_907ov_
|
|
|
1345
1345
|
cells: Ct,
|
|
1346
1346
|
week: Tt,
|
|
1347
1347
|
cell: Et,
|
|
1348
|
-
cellContent:
|
|
1349
|
-
selected:
|
|
1348
|
+
cellContent: qt,
|
|
1349
|
+
selected: Ft,
|
|
1350
1350
|
outside: Ht,
|
|
1351
1351
|
today: Bt,
|
|
1352
1352
|
disabled: Qt,
|
|
@@ -1367,9 +1367,9 @@ function Gt({
|
|
|
1367
1367
|
u((l) => X(l, 1));
|
|
1368
1368
|
}, []), w = H(
|
|
1369
1369
|
(l) => {
|
|
1370
|
-
const
|
|
1371
|
-
return n && se(
|
|
1372
|
-
(
|
|
1370
|
+
const O = D(l);
|
|
1371
|
+
return n && se(O, D(n)) || r && ie(O, D(r)) ? !0 : a.some(
|
|
1372
|
+
(v) => L(O, D(v))
|
|
1373
1373
|
);
|
|
1374
1374
|
},
|
|
1375
1375
|
[n, r, a]
|
|
@@ -1379,7 +1379,7 @@ function Gt({
|
|
|
1379
1379
|
},
|
|
1380
1380
|
[e, w]
|
|
1381
1381
|
), x = () => {
|
|
1382
|
-
const l = n && se(oe(o), ee(n)),
|
|
1382
|
+
const l = n && se(oe(o), ee(n)), O = r && ie(X(o, 1), p(r));
|
|
1383
1383
|
return /* @__PURE__ */ z("div", { className: m.header, children: [
|
|
1384
1384
|
/* @__PURE__ */ M(
|
|
1385
1385
|
"button",
|
|
@@ -1399,57 +1399,57 @@ function Gt({
|
|
|
1399
1399
|
type: "button",
|
|
1400
1400
|
className: m.navButton,
|
|
1401
1401
|
onClick: g,
|
|
1402
|
-
disabled:
|
|
1402
|
+
disabled: O,
|
|
1403
1403
|
"aria-label": "Next month",
|
|
1404
1404
|
children: /* @__PURE__ */ M(ge, { size: 20 })
|
|
1405
1405
|
}
|
|
1406
1406
|
)
|
|
1407
1407
|
] });
|
|
1408
1408
|
}, y = () => {
|
|
1409
|
-
const l = [],
|
|
1410
|
-
for (let
|
|
1411
|
-
const
|
|
1409
|
+
const l = [], O = W(o, { weekStartsOn: 0 });
|
|
1410
|
+
for (let v = 0; v < 7; v++) {
|
|
1411
|
+
const q = K(O, v);
|
|
1412
1412
|
l.push(
|
|
1413
1413
|
/* @__PURE__ */ M(
|
|
1414
1414
|
"div",
|
|
1415
1415
|
{
|
|
1416
1416
|
className: m.dayName,
|
|
1417
|
-
"aria-label": E(
|
|
1418
|
-
children: E(
|
|
1417
|
+
"aria-label": E(q, "EEEE"),
|
|
1418
|
+
children: E(q, "EEE")
|
|
1419
1419
|
},
|
|
1420
|
-
|
|
1420
|
+
v
|
|
1421
1421
|
)
|
|
1422
1422
|
);
|
|
1423
1423
|
}
|
|
1424
1424
|
return /* @__PURE__ */ M("div", { className: m.daysRow, children: l });
|
|
1425
1425
|
}, f = () => {
|
|
1426
|
-
const l = ee(o),
|
|
1427
|
-
let
|
|
1428
|
-
for (; N <=
|
|
1426
|
+
const l = ee(o), O = p(o), v = W(l, { weekStartsOn: 0 }), q = De(O, { weekStartsOn: 0 }), G = [];
|
|
1427
|
+
let F = [], N = v;
|
|
1428
|
+
for (; N <= q; ) {
|
|
1429
1429
|
for (let I = 0; I < 7; I++) {
|
|
1430
|
-
const
|
|
1431
|
-
!s && J ?
|
|
1432
|
-
/* @__PURE__ */ M("div", { className: m.emptyCell },
|
|
1433
|
-
) :
|
|
1430
|
+
const P = N, he = kt(P, o), A = t && L(P, t), $ = Dt(P), V = w(P), J = !he;
|
|
1431
|
+
!s && J ? F.push(
|
|
1432
|
+
/* @__PURE__ */ M("div", { className: m.emptyCell }, P.toISOString())
|
|
1433
|
+
) : F.push(
|
|
1434
1434
|
/* @__PURE__ */ M(
|
|
1435
1435
|
"button",
|
|
1436
1436
|
{
|
|
1437
1437
|
type: "button",
|
|
1438
1438
|
className: `${m.cell} ${J ? m.outside : ""} ${A ? m.selected : ""} ${$ ? m.today : ""} ${V ? m.disabled : ""}`.trim(),
|
|
1439
|
-
onClick: () => S(
|
|
1439
|
+
onClick: () => S(P),
|
|
1440
1440
|
disabled: V,
|
|
1441
|
-
"aria-label": E(
|
|
1441
|
+
"aria-label": E(P, "MMMM d, yyyy"),
|
|
1442
1442
|
"aria-pressed": A ? !0 : void 0,
|
|
1443
1443
|
"aria-current": $ ? "date" : void 0,
|
|
1444
|
-
children: /* @__PURE__ */ M("span", { className: m.cellContent, children: E(
|
|
1444
|
+
children: /* @__PURE__ */ M("span", { className: m.cellContent, children: E(P, "d") })
|
|
1445
1445
|
},
|
|
1446
|
-
|
|
1446
|
+
P.toISOString()
|
|
1447
1447
|
)
|
|
1448
1448
|
), N = K(N, 1);
|
|
1449
1449
|
}
|
|
1450
1450
|
G.push(
|
|
1451
|
-
/* @__PURE__ */ M("div", { className: m.week, children:
|
|
1452
|
-
),
|
|
1451
|
+
/* @__PURE__ */ M("div", { className: m.week, children: F }, N.toISOString())
|
|
1452
|
+
), F = [];
|
|
1453
1453
|
}
|
|
1454
1454
|
return /* @__PURE__ */ M("div", { className: m.cells, children: G });
|
|
1455
1455
|
};
|