@companix/uikit 0.0.29 → 0.0.30
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/ButtonGroup/index.d.ts +1 -2
- package/dist/Checkbox/index.d.ts +1 -1
- package/dist/Countdown/index.d.ts +1 -2
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DatePicker/index.d.ts +1 -2
- package/dist/FormGroup/index.d.ts +2 -3
- package/dist/LoadingButton/index.d.ts +5 -0
- package/dist/OptionItem/OptionItem.d.ts +1 -2
- package/dist/OptionItem/OptionsList.d.ts +2 -3
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Scrollable/ImitateScroll.d.ts +2 -2
- package/dist/Select/index.d.ts +1 -1
- package/dist/Spinner/index.d.ts +2 -3
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/TextArea/index.d.ts +1 -2
- package/dist/Tooltip/index.d.ts +1 -2
- package/dist/bundle.es.js +26 -26
- package/dist/bundle.es10.js +37 -32
- package/dist/bundle.es11.js +32 -52
- package/dist/bundle.es12.js +54 -14
- package/dist/bundle.es13.js +20 -7
- package/dist/bundle.es2.js +1 -1
- package/dist/bundle.es20.js +1 -1
- package/dist/bundle.es24.js +3 -3
- package/dist/bundle.es25.js +2 -2
- package/dist/bundle.es26.js +1 -1
- package/dist/bundle.es29.js +2 -2
- package/dist/bundle.es3.js +7 -10
- package/dist/bundle.es38.js +1 -1
- package/dist/bundle.es4.js +11 -85
- package/dist/bundle.es42.js +2 -2
- package/dist/bundle.es49.js +1 -1
- package/dist/bundle.es5.js +82 -82
- package/dist/bundle.es50.js +1 -1
- package/dist/bundle.es51.js +2 -2
- package/dist/bundle.es6.js +81 -74
- package/dist/bundle.es63.js +20 -76
- package/dist/bundle.es64.js +2 -49
- package/dist/bundle.es65.js +18 -17
- package/dist/bundle.es66.js +2 -2
- package/dist/bundle.es67.js +17 -18
- package/dist/bundle.es68.js +76 -2
- package/dist/bundle.es69.js +49 -20
- package/dist/bundle.es7.js +78 -26
- package/dist/bundle.es8.js +21 -70
- package/dist/bundle.es9.js +75 -41
- package/dist/index.d.ts +31 -5
- package/package.json +1 -1
- package/dist/LoadButton/index.d.ts +0 -5
package/dist/bundle.es4.js
CHANGED
|
@@ -1,87 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
scrollX: h,
|
|
12
|
-
className: b,
|
|
13
|
-
scrollY: n,
|
|
14
|
-
onWheel: f,
|
|
15
|
-
maxHeight: d,
|
|
16
|
-
onScroll: p,
|
|
17
|
-
thumbColor: u,
|
|
18
|
-
children: w
|
|
19
|
-
} = t;
|
|
20
|
-
const x = (() => {
|
|
21
|
-
if (t.implementation === "edge") {
|
|
22
|
-
l = 0;
|
|
23
|
-
const { padding: o, scrollbarWidth: e } = t;
|
|
24
|
-
return {
|
|
25
|
-
...r({ "--scrollbar-width": i(e) }),
|
|
26
|
-
padding: `0px ${o - e}px 0px ${o}px`
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
if (t.implementation === "outer") {
|
|
30
|
-
const { shadowPadding: o = 0, noneCorrect: e, scrollbarWidth: a } = t;
|
|
31
|
-
return window.IS_MOBILE ? {
|
|
32
|
-
padding: o,
|
|
33
|
-
margin: -o
|
|
34
|
-
} : {
|
|
35
|
-
...r({ "--scrollbar-width": i(a) }),
|
|
36
|
-
padding: o,
|
|
37
|
-
margin: -o,
|
|
38
|
-
marginRight: e ? void 0 : `calc(-${a}px - ${o}px)`,
|
|
39
|
-
marginBottom: 0
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (t.implementation === "inner") {
|
|
43
|
-
const { padding: o } = t;
|
|
44
|
-
return window.IS_MOBILE ? {
|
|
45
|
-
[n ? "paddingLeft" : "paddingTop"]: o,
|
|
46
|
-
[n ? "paddingRight" : "paddingBottom"]: o
|
|
47
|
-
} : {
|
|
48
|
-
[n ? "paddingLeft" : "paddingTop"]: o,
|
|
49
|
-
...r({ "--scrollbar-width": i(o) })
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return {};
|
|
53
|
-
})();
|
|
54
|
-
return /* @__PURE__ */ v(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
ref: c,
|
|
58
|
-
onWheel: f,
|
|
59
|
-
onScroll: p,
|
|
60
|
-
onMouseDown: (o) => {
|
|
61
|
-
o.preventDefault();
|
|
62
|
-
},
|
|
63
|
-
style: {
|
|
64
|
-
...x,
|
|
65
|
-
...t.style,
|
|
66
|
-
maxHeight: d ? i(d) : void 0,
|
|
67
|
-
...r({ "--thumb-padding": i(l) }),
|
|
68
|
-
...r({ "--thumb-color": u ?? "#c1c2c8bd" })
|
|
69
|
-
},
|
|
70
|
-
className: I(
|
|
71
|
-
!window.IS_MOBILE && "scrollable",
|
|
72
|
-
b,
|
|
73
|
-
s ? "" : "h-full",
|
|
74
|
-
{
|
|
75
|
-
"overflow-y-scroll": n,
|
|
76
|
-
"overflow-x-scroll": h,
|
|
77
|
-
"scrollable-hover-interaction": m === "hover",
|
|
78
|
-
"scrollable-border-position": g === "border"
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
children: w
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
});
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import n from "classnames";
|
|
3
|
+
const d = ({ size: r = 40, className: t, width: e = 2, color: i = "inherit" }) => /* @__PURE__ */ o(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
style: { width: `${r}px`, height: `${r}px`, color: i, borderWidth: `${e}px` },
|
|
7
|
+
className: n("spinner-border", t),
|
|
8
|
+
role: "status"
|
|
9
|
+
}
|
|
10
|
+
);
|
|
85
11
|
export {
|
|
86
|
-
|
|
12
|
+
d as Spinner
|
|
87
13
|
};
|
package/dist/bundle.es42.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as a } from "react";
|
|
3
|
-
import { OptionItem as f } from "./bundle.
|
|
4
|
-
import { OptionsList as O } from "./bundle.
|
|
3
|
+
import { OptionItem as f } from "./bundle.es11.js";
|
|
4
|
+
import { OptionsList as O } from "./bundle.es13.js";
|
|
5
5
|
const h = (t) => {
|
|
6
6
|
const { active: i, onOpened: m, scrollboxRef: n, optionsWrapperRef: r, options: p, onSelect: s, minimalOptions: c } = t;
|
|
7
7
|
return a(() => {
|
package/dist/bundle.es49.js
CHANGED
package/dist/bundle.es5.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import I from "classnames";
|
|
3
|
+
import { forwardRef as S } from "react";
|
|
4
|
+
import { varToStyle as r, px as i } from "@companix/utils-browser";
|
|
5
|
+
const $ = S((t, c) => {
|
|
6
|
+
let {
|
|
7
|
+
interactionKind: m = "static",
|
|
8
|
+
thumbPos: g = "center",
|
|
9
|
+
thumbPadding: l = 4,
|
|
10
|
+
heightAuto: s,
|
|
11
|
+
scrollX: h,
|
|
12
|
+
className: b,
|
|
13
|
+
scrollY: n,
|
|
14
|
+
onWheel: f,
|
|
15
|
+
maxHeight: d,
|
|
16
|
+
onScroll: p,
|
|
17
|
+
thumbColor: u,
|
|
18
|
+
children: w
|
|
19
|
+
} = t;
|
|
20
|
+
const x = (() => {
|
|
21
|
+
if (t.implementation === "edge") {
|
|
22
|
+
l = 0;
|
|
23
|
+
const { padding: o, scrollbarWidth: e } = t;
|
|
24
|
+
return {
|
|
25
|
+
...r({ "--scrollbar-width": i(e) }),
|
|
26
|
+
padding: `0px ${o - e}px 0px ${o}px`
|
|
27
|
+
};
|
|
18
28
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
o
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, []);
|
|
32
|
-
const u = n(() => {
|
|
33
|
-
const { current: o } = t, { current: e } = l;
|
|
34
|
-
if (e && o) {
|
|
35
|
-
const s = o.clientHeight / o.scrollHeight;
|
|
36
|
-
e.style.height = h(s * 100), e.style.display = s === 1 ? "none" : "block", r.scrollRatio = s;
|
|
29
|
+
if (t.implementation === "outer") {
|
|
30
|
+
const { shadowPadding: o = 0, noneCorrect: e, scrollbarWidth: a } = t;
|
|
31
|
+
return window.IS_MOBILE ? {
|
|
32
|
+
padding: o,
|
|
33
|
+
margin: -o
|
|
34
|
+
} : {
|
|
35
|
+
...r({ "--scrollbar-width": i(a) }),
|
|
36
|
+
padding: o,
|
|
37
|
+
margin: -o,
|
|
38
|
+
marginRight: e ? void 0 : `calc(-${a}px - ${o}px)`,
|
|
39
|
+
marginBottom: 0
|
|
40
|
+
};
|
|
37
41
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
if (t.implementation === "inner") {
|
|
43
|
+
const { padding: o } = t;
|
|
44
|
+
return window.IS_MOBILE ? {
|
|
45
|
+
[n ? "paddingLeft" : "paddingTop"]: o,
|
|
46
|
+
[n ? "paddingRight" : "paddingBottom"]: o
|
|
47
|
+
} : {
|
|
48
|
+
[n ? "paddingLeft" : "paddingTop"]: o,
|
|
49
|
+
...r({ "--scrollbar-width": i(o) })
|
|
50
|
+
};
|
|
43
51
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className: `${y} relative w-full rounded-full`,
|
|
78
|
-
ref: l
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
] });
|
|
84
|
-
};
|
|
52
|
+
return {};
|
|
53
|
+
})();
|
|
54
|
+
return /* @__PURE__ */ v(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref: c,
|
|
58
|
+
onWheel: f,
|
|
59
|
+
onScroll: p,
|
|
60
|
+
onMouseDown: (o) => {
|
|
61
|
+
o.preventDefault();
|
|
62
|
+
},
|
|
63
|
+
style: {
|
|
64
|
+
...x,
|
|
65
|
+
...t.style,
|
|
66
|
+
maxHeight: d ? i(d) : void 0,
|
|
67
|
+
...r({ "--thumb-padding": i(l) }),
|
|
68
|
+
...r({ "--thumb-color": u ?? "#c1c2c8bd" })
|
|
69
|
+
},
|
|
70
|
+
className: I(
|
|
71
|
+
!window.IS_MOBILE && "scrollable",
|
|
72
|
+
b,
|
|
73
|
+
s ? "" : "h-full",
|
|
74
|
+
{
|
|
75
|
+
"overflow-y-scroll": n,
|
|
76
|
+
"overflow-x-scroll": h,
|
|
77
|
+
"scrollable-hover-interaction": m === "hover",
|
|
78
|
+
"scrollable-border-position": g === "border"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
children: w
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
$ as Scrollable
|
|
87
87
|
};
|
package/dist/bundle.es50.js
CHANGED
package/dist/bundle.es51.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as D, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { dateToFormat as $, weeks as g, createVoids as p, getDayIndex as b, getFirstDay as u, getMonthMaxDay as k } from "./bundle.es53.js";
|
|
3
|
-
import { CalendarHeader as F } from "./bundle.
|
|
4
|
-
import { useCalendar as j } from "./bundle.
|
|
3
|
+
import { CalendarHeader as F } from "./bundle.es68.js";
|
|
4
|
+
import { useCalendar as j } from "./bundle.es69.js";
|
|
5
5
|
import { attr as m } from "@companix/utils-browser";
|
|
6
6
|
import { isSameDate as f } from "./bundle.es52.js";
|
|
7
7
|
import { useLayoutEffect as I } from "react";
|
package/dist/bundle.es6.js
CHANGED
|
@@ -1,80 +1,87 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
1
|
+
import { jsxs as x, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import L from "classnames";
|
|
3
|
+
import { useRef as d, useMemo as f, useCallback as n, useEffect as T, useLayoutEffect as H } from "react";
|
|
4
|
+
import { getContainers as p, pc as h, px as v } from "@companix/utils-browser";
|
|
5
|
+
const C = ({
|
|
6
|
+
children: b,
|
|
7
|
+
thumbClassName: y,
|
|
8
|
+
scrollableClassName: g,
|
|
9
|
+
thumbMargin: R = 0,
|
|
10
|
+
trackWidth: w = 20
|
|
11
|
+
}) => {
|
|
12
|
+
const l = d(null), t = d(null), r = f(() => ({ positons: { top: 0, y: 0 }, scrollRatio: 0 }), []), i = f(() => ({
|
|
13
|
+
start() {
|
|
14
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", m);
|
|
15
|
+
},
|
|
16
|
+
clear() {
|
|
17
|
+
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", m);
|
|
18
|
+
}
|
|
19
|
+
}), []);
|
|
20
|
+
T(() => {
|
|
21
|
+
const o = new ResizeObserver(u);
|
|
22
|
+
return t.current && p(t.current, (e) => {
|
|
23
|
+
o.observe(e);
|
|
24
|
+
}), () => {
|
|
25
|
+
t.current && p(t.current, (e) => {
|
|
26
|
+
o.unobserve(e);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}, []), H(() => {
|
|
30
|
+
u();
|
|
31
|
+
}, []);
|
|
32
|
+
const u = n(() => {
|
|
33
|
+
const { current: o } = t, { current: e } = l;
|
|
34
|
+
if (e && o) {
|
|
35
|
+
const s = o.clientHeight / o.scrollHeight;
|
|
36
|
+
e.style.height = h(s * 100), e.style.display = s === 1 ? "none" : "block", r.scrollRatio = s;
|
|
37
|
+
}
|
|
38
|
+
}, []), a = n(({ clientY: o }) => {
|
|
39
|
+
const { current: e } = t;
|
|
40
|
+
if (e) {
|
|
41
|
+
const s = o - r.positons.y;
|
|
42
|
+
e.scrollTop = r.positons.top + s / r.scrollRatio;
|
|
43
|
+
}
|
|
44
|
+
}, []), m = n(() => {
|
|
45
|
+
i.clear();
|
|
46
|
+
}, []), E = n(({ clientY: o }) => {
|
|
47
|
+
const { current: e } = t;
|
|
48
|
+
e && (r.positons = {
|
|
49
|
+
top: e.scrollTop,
|
|
50
|
+
y: o
|
|
51
|
+
}), i.start();
|
|
52
|
+
}, []), M = () => {
|
|
53
|
+
requestAnimationFrame(() => {
|
|
54
|
+
const { current: o } = t, { current: e } = l;
|
|
55
|
+
e && o && (e.style.top = h(o.scrollTop * 100 / o.scrollHeight));
|
|
56
|
+
});
|
|
31
57
|
};
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
o.Content,
|
|
58
|
+
return /* @__PURE__ */ x("div", { className: "relative h-full overflow-hidden", children: [
|
|
59
|
+
/* @__PURE__ */ c(
|
|
60
|
+
"div",
|
|
36
61
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"data-appearance": x ? "minimal" : "default",
|
|
42
|
-
"data-match-target": l,
|
|
43
|
-
sideOffset: s ?? 6,
|
|
44
|
-
avoidCollisions: !0,
|
|
45
|
-
arrowPadding: 10,
|
|
46
|
-
onAnimationStart: m,
|
|
47
|
-
onAnimationEnd: c,
|
|
48
|
-
onOpenAutoFocus: d,
|
|
49
|
-
onCloseAutoFocus: f,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ r(o.Close, { ref: e, style: { display: "none" } }),
|
|
52
|
-
A && /* @__PURE__ */ r(o.Arrow, { width: 30, height: 11, asChild: !0, children: /* @__PURE__ */ r("div", { className: "popover-arrow", children: /* @__PURE__ */ t("svg", { className: "popover-arrow-icon", viewBox: "0 0 30 11", width: 30, height: 11, children: [
|
|
53
|
-
/* @__PURE__ */ r(
|
|
54
|
-
"path",
|
|
55
|
-
{
|
|
56
|
-
className: "popover-arrow-border",
|
|
57
|
-
d: "M 18.112 -2.704 C 19.127 -3.64 19.999 -5.626 19.999 -7.001 L 19.999 18.999 C 19.999 17.621 19.131 15.642 18.111 14.702 L 10.927 8.084 C 9.69 6.944 9.694 5.05 10.927 3.914 L 18.112 -2.704 Z",
|
|
58
|
-
style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
|
|
59
|
-
transform: "matrix(0, -1, 1, 0, 0.000001, 0)"
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ r(
|
|
63
|
-
"path",
|
|
64
|
-
{
|
|
65
|
-
className: "popover-arrow-fill",
|
|
66
|
-
d: "M 17.789 -2.965 C 19.009 -4.09 19.999 -6.341 19.999 -7.995 L 19.999 -10.001 L 19.999 19.999 L 19.999 17.994 C 19.999 16.34 19.016 14.094 17.789 12.964 L 10.606 6.348 C 9.796 5.602 9.804 4.388 10.606 3.648 L 17.789 -2.966 L 17.789 -2.965 Z",
|
|
67
|
-
style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
|
|
68
|
-
transform: "matrix(0, -1, 1, 0, 0, 0)"
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
] }) }) }),
|
|
72
|
-
/* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height": y(N), children: u({ close: P }) })
|
|
73
|
-
]
|
|
62
|
+
className: L("hidden-scroll h-full overflow-y-scroll", g),
|
|
63
|
+
onScroll: M,
|
|
64
|
+
ref: t,
|
|
65
|
+
children: b
|
|
74
66
|
}
|
|
75
|
-
)
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ c(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: "absolute right-0 top-0 box-border h-full",
|
|
72
|
+
style: { width: v(w), padding: v(R) },
|
|
73
|
+
children: /* @__PURE__ */ c(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
onMouseDown: E,
|
|
77
|
+
className: `${y} relative w-full rounded-full`,
|
|
78
|
+
ref: l
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
76
83
|
] });
|
|
77
|
-
}
|
|
84
|
+
};
|
|
78
85
|
export {
|
|
79
|
-
|
|
86
|
+
C as ImitateScroll
|
|
80
87
|
};
|
package/dist/bundle.es63.js
CHANGED
|
@@ -1,78 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
[m, n]
|
|
22
|
-
), E = h(
|
|
23
|
-
(t) => {
|
|
24
|
-
m(T(n, t));
|
|
25
|
-
},
|
|
26
|
-
[m, n]
|
|
27
|
-
), M = d(() => Y(i).map((t) => ({
|
|
28
|
-
...t,
|
|
29
|
-
className: "capitalize",
|
|
30
|
-
disabled: a && a(t.value)
|
|
31
|
-
})), [i, a]), A = d(() => k(r, 100).map((t) => ({
|
|
32
|
-
...t,
|
|
33
|
-
disabled: c && c(t.value)
|
|
34
|
-
})), [r, c]);
|
|
35
|
-
let l = e === 11 && r === u;
|
|
36
|
-
a && !l && (l = a(
|
|
37
|
-
e === 11 ? 0 : e + 1,
|
|
38
|
-
e === 11 ? Math.min(r + 1, u) : r
|
|
39
|
-
));
|
|
40
|
-
let s = e === 0 && r === g;
|
|
41
|
-
return a && !s && (s = a(
|
|
42
|
-
e === 0 ? 11 : e - 1,
|
|
43
|
-
e === 0 ? Math.max(r - 1, g) : r
|
|
44
|
-
)), /* @__PURE__ */ f("div", { className: "calendar-header", children: [
|
|
45
|
-
!s && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "left", onClick: x, children: /* @__PURE__ */ o(C, { icon: L.faChevronLeft }) }),
|
|
46
|
-
/* @__PURE__ */ f("div", { className: "calendar-pickers", children: [
|
|
47
|
-
/* @__PURE__ */ o(
|
|
48
|
-
p,
|
|
49
|
-
{
|
|
50
|
-
fill: !0,
|
|
51
|
-
options: A,
|
|
52
|
-
size: "sm",
|
|
53
|
-
value: r,
|
|
54
|
-
minimalOptions: !0,
|
|
55
|
-
matchTarget: "min-width",
|
|
56
|
-
onChange: (t) => E(t)
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
/* @__PURE__ */ o(
|
|
60
|
-
p,
|
|
61
|
-
{
|
|
62
|
-
fill: !0,
|
|
63
|
-
options: M,
|
|
64
|
-
size: "sm",
|
|
65
|
-
className: "capitalize",
|
|
66
|
-
value: e,
|
|
67
|
-
minimalOptions: !0,
|
|
68
|
-
matchTarget: "min-width",
|
|
69
|
-
onChange: (t) => N(t)
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
] }),
|
|
73
|
-
!l && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "right", onClick: v, children: /* @__PURE__ */ o(C, { icon: z.faChevronRight }) })
|
|
74
|
-
] });
|
|
75
|
-
};
|
|
1
|
+
import { __exports as e } from "./bundle.es64.js";
|
|
2
|
+
var c;
|
|
3
|
+
function d() {
|
|
4
|
+
return c ? e : (c = 1, (function(a) {
|
|
5
|
+
Object.defineProperty(a, "__esModule", { value: !0 });
|
|
6
|
+
var n = "fas", r = "chevron-down", v = 448, o = 512, i = [], f = "f078", h = "M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";
|
|
7
|
+
a.definition = {
|
|
8
|
+
prefix: n,
|
|
9
|
+
iconName: r,
|
|
10
|
+
icon: [
|
|
11
|
+
v,
|
|
12
|
+
o,
|
|
13
|
+
i,
|
|
14
|
+
f,
|
|
15
|
+
h
|
|
16
|
+
]
|
|
17
|
+
}, a.faChevronDown = a.definition, a.prefix = n, a.iconName = r, a.width = v, a.height = o, a.ligatures = i, a.unicode = f, a.svgPathData = h, a.aliases = i;
|
|
18
|
+
})(e), e);
|
|
19
|
+
}
|
|
76
20
|
export {
|
|
77
|
-
|
|
21
|
+
d as __require
|
|
78
22
|
};
|
package/dist/bundle.es64.js
CHANGED
|
@@ -1,51 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { DEFAULT_MIN_YEAR as w, DEFAULT_MAX_YEAR as A } from "./bundle.es53.js";
|
|
3
|
-
import { useState as U, useCallback as M } from "react";
|
|
4
|
-
const X = ({
|
|
5
|
-
value: p,
|
|
6
|
-
disablePast: r,
|
|
7
|
-
disableFuture: c,
|
|
8
|
-
shouldDisableDate: E,
|
|
9
|
-
minDateTime: l,
|
|
10
|
-
maxDateTime: s
|
|
11
|
-
}) => {
|
|
12
|
-
const [e, u] = U(p || /* @__PURE__ */ new Date()), _ = M(() => {
|
|
13
|
-
u(L(e));
|
|
14
|
-
}, [e]), C = M(() => {
|
|
15
|
-
u(N(e, 1));
|
|
16
|
-
}, [e]), D = R({
|
|
17
|
-
disableFuture: c,
|
|
18
|
-
disablePast: r,
|
|
19
|
-
shouldDisableDate: E,
|
|
20
|
-
minDateTime: l,
|
|
21
|
-
maxDateTime: s
|
|
22
|
-
}), k = M(
|
|
23
|
-
(o, t) => {
|
|
24
|
-
const n = /* @__PURE__ */ new Date();
|
|
25
|
-
t = t || e.getFullYear();
|
|
26
|
-
const h = l ? l.getMonth() : 0, Y = s ? s.getMonth() : 11, F = l?.getFullYear() || w, f = s?.getFullYear() || A;
|
|
27
|
-
let g = t >= F && t <= f ? t === F && h > o || t === f && o > Y : !0;
|
|
28
|
-
return c && (g = g || (t === n.getFullYear() ? o > n.getMonth() : t > n.getFullYear())), r && (g = g || (t === n.getFullYear() ? o < n.getMonth() : t < n.getFullYear())), g;
|
|
29
|
-
},
|
|
30
|
-
[c, r, e, l, s]
|
|
31
|
-
), v = M(
|
|
32
|
-
(o) => {
|
|
33
|
-
const t = /* @__PURE__ */ new Date(), n = l?.getFullYear() || w, h = s?.getFullYear() || A;
|
|
34
|
-
let Y = n > o || o > h;
|
|
35
|
-
return c && (Y = Y || o > t.getFullYear()), r && (Y = Y || o < t.getFullYear()), Y;
|
|
36
|
-
},
|
|
37
|
-
[c, r, l, s]
|
|
38
|
-
);
|
|
39
|
-
return {
|
|
40
|
-
viewDate: e,
|
|
41
|
-
setViewDate: u,
|
|
42
|
-
setPrevMonth: _,
|
|
43
|
-
setNextMonth: C,
|
|
44
|
-
isDayDisabled: D,
|
|
45
|
-
isMonthDisabled: k,
|
|
46
|
-
isYearDisabled: v
|
|
47
|
-
};
|
|
48
|
-
};
|
|
1
|
+
var o = {};
|
|
49
2
|
export {
|
|
50
|
-
|
|
3
|
+
o as __exports
|
|
51
4
|
};
|
package/dist/bundle.es65.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { __exports as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { __exports as a } from "./bundle.es66.js";
|
|
2
|
+
import { __require as n } from "./bundle.es67.js";
|
|
3
|
+
var r;
|
|
4
|
+
function f() {
|
|
5
|
+
return r ? a : (r = 1, (function(e) {
|
|
6
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
7
|
+
var i = /* @__PURE__ */ n();
|
|
8
|
+
e.definition = {
|
|
9
|
+
prefix: i.prefix,
|
|
10
|
+
iconName: i.iconName,
|
|
10
11
|
icon: [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
i,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
i.width,
|
|
13
|
+
i.height,
|
|
14
|
+
i.aliases,
|
|
15
|
+
i.unicode,
|
|
16
|
+
i.svgPathData
|
|
16
17
|
]
|
|
17
|
-
},
|
|
18
|
-
})(
|
|
18
|
+
}, e.faClose = e.definition, e.prefix = i.prefix, e.iconName = i.iconName, e.width = i.width, e.height = i.height, e.ligatures = i.aliases, e.unicode = i.unicode, e.svgPathData = i.svgPathData, e.aliases = i.aliases;
|
|
19
|
+
})(a), a);
|
|
19
20
|
}
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
f as __require
|
|
22
23
|
};
|