@arkyn/components 3.0.1-beta.155 → 3.0.1-beta.156
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/components/calendar/_viewService.d.ts +1 -1
- package/dist/components/fullCalendar/_viewService.d.ts +2 -2
- package/dist/hooks/useScopedParams.d.ts +1 -1
- package/dist/index.js +4683 -4347
- package/dist/modules/components/alert/alertContainer/index.js +20 -25
- package/dist/modules/components/alert/alertContent/index.js +8 -11
- package/dist/modules/components/alert/alertDescription/index.js +8 -11
- package/dist/modules/components/alert/alertIcon/index.js +19 -27
- package/dist/modules/components/alert/alertTitle/index.js +8 -11
- package/dist/modules/components/audioPlayer/index.js +75 -74
- package/dist/modules/components/audioUpload/hasFileContent/index.js +62 -54
- package/dist/modules/components/audioUpload/index.js +79 -71
- package/dist/modules/components/audioUpload/noFileContent/index.js +45 -35
- package/dist/modules/components/badge/index.js +22 -26
- package/dist/modules/components/button/index.js +32 -39
- package/dist/modules/components/calendar/_calendarProvider.js +63 -38
- package/dist/modules/components/calendar/_viewService.js +140 -132
- package/dist/modules/components/calendar/calendarContainer/index.js +7 -10
- package/dist/modules/components/calendar/calendarHeader/index.js +72 -51
- package/dist/modules/components/calendar/calendarTableBody/index.js +10 -12
- package/dist/modules/components/calendar/calendarTableContainer/index.js +7 -10
- package/dist/modules/components/calendar/calendarTableHeader/index.js +10 -13
- package/dist/modules/components/calendar/calendarTableTd/index.js +23 -20
- package/dist/modules/components/calendar/index.js +49 -31
- package/dist/modules/components/cardTab/cardTabButton/index.js +29 -19
- package/dist/modules/components/cardTab/cardTabContainer/index.js +28 -22
- package/dist/modules/components/cardTab/cardTabContext.js +11 -13
- package/dist/modules/components/checkbox/index.js +64 -37
- package/dist/modules/components/clientOnly.js +8 -8
- package/dist/modules/components/currencyInput/index.js +138 -110
- package/dist/modules/components/divider/index.js +11 -10
- package/dist/modules/components/drawer/drawerContainer/index.js +43 -40
- package/dist/modules/components/drawer/drawerContext.js +11 -13
- package/dist/modules/components/drawer/drawerHeader/index.js +27 -20
- package/dist/modules/components/facebookPixel/facebookPixel.client.js +18 -8
- package/dist/modules/components/facebookPixel/index.js +8 -8
- package/dist/modules/components/facebookPixel/pixel.js +52 -47
- package/dist/modules/components/fieldError/index.js +8 -12
- package/dist/modules/components/fieldLabel/index.js +12 -11
- package/dist/modules/components/fieldWrapper/index.js +13 -12
- package/dist/modules/components/fileUpload/hasFileContent/index.js +67 -59
- package/dist/modules/components/fileUpload/index.js +72 -65
- package/dist/modules/components/fileUpload/noFileContent/index.js +45 -35
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +46 -33
- package/dist/modules/components/fullCalendar/_viewService.js +105 -100
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +7 -10
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +78 -70
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +33 -28
- package/dist/modules/components/fullCalendar/dayCalendar/index.js +9 -12
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +7 -10
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +70 -67
- package/dist/modules/components/fullCalendar/index.js +30 -30
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +12 -9
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +36 -28
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +9 -11
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +9 -10
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +10 -13
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +36 -35
- package/dist/modules/components/fullCalendar/weekCalendar/index.js +11 -8
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +78 -70
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +20 -17
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +8 -9
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +19 -16
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +39 -34
- package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +7 -7
- package/dist/modules/components/googleAnalytics/googleAnalytics.js +17 -17
- package/dist/modules/components/googleAnalytics/index.js +9 -9
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +12 -10
- package/dist/modules/components/googleTagManager/googleTagManager.client.js +6 -6
- package/dist/modules/components/googleTagManager/googleTagManager.js +48 -44
- package/dist/modules/components/googleTagManager/index.js +27 -16
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +8 -8
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +20 -19
- package/dist/modules/components/iconButton/index.js +29 -31
- package/dist/modules/components/imageUpload/hasFileContent/index.js +63 -46
- package/dist/modules/components/imageUpload/index.js +82 -65
- package/dist/modules/components/imageUpload/noFileContent/index.js +45 -35
- package/dist/modules/components/input/index.js +120 -92
- package/dist/modules/components/mapView/index.js +31 -27
- package/dist/modules/components/mapView/mapView.client.js +51 -49
- package/dist/modules/components/maskedInput/index.js +112 -101
- package/dist/modules/components/modal/modalContainer/index.js +42 -49
- package/dist/modules/components/modal/modalContext.js +11 -13
- package/dist/modules/components/modal/modalFooter/index.js +7 -10
- package/dist/modules/components/modal/modalHeader/index.js +27 -20
- package/dist/modules/components/multiSelect/index.js +154 -115
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js +21 -18
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +29 -13
- package/dist/modules/components/multiSelect/multiSelectContent/index.js +8 -11
- package/dist/modules/components/multiSelect/multiSelectMark/index.js +22 -19
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +13 -17
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +45 -35
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +8 -11
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +16 -13
- package/dist/modules/components/pagination/chevronButton/index.js +17 -17
- package/dist/modules/components/pagination/currentButton/index.js +7 -11
- package/dist/modules/components/pagination/index.js +83 -51
- package/dist/modules/components/pagination/pageButton/index.js +8 -12
- package/dist/modules/components/pagination/paginationService.js +48 -33
- package/dist/modules/components/pagination/spread/index.js +7 -10
- package/dist/modules/components/phoneInput/index.js +151 -103
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js +19 -12
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +8 -11
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +15 -23
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +43 -33
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +21 -25
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +62 -46
- package/dist/modules/components/popover/index.js +36 -37
- package/dist/modules/components/radio/radioBox/index.js +42 -24
- package/dist/modules/components/radio/radioContext.js +18 -20
- package/dist/modules/components/radio/radioGroup/index.js +64 -41
- package/dist/modules/components/richText/blockButton/index.js +23 -20
- package/dist/modules/components/richText/element/index.js +58 -72
- package/dist/modules/components/richText/index.js +135 -143
- package/dist/modules/components/richText/insertImage/index.js +105 -94
- package/dist/modules/components/richText/insertVideo/index.js +97 -85
- package/dist/modules/components/richText/leaf/index.js +6 -9
- package/dist/modules/components/richText/markButton/index.js +22 -19
- package/dist/modules/components/richText/toolbar/index.js +7 -10
- package/dist/modules/components/searchPlaces.js +66 -57
- package/dist/modules/components/select/index.js +144 -112
- package/dist/modules/components/select/selectChevron/index.js +21 -18
- package/dist/modules/components/select/selectContainer/index.js +29 -13
- package/dist/modules/components/select/selectContent/index.js +8 -11
- package/dist/modules/components/select/selectOption/index.js +13 -17
- package/dist/modules/components/select/selectOptionsContainer/index.js +45 -35
- package/dist/modules/components/select/selectOverlay/index.js +8 -11
- package/dist/modules/components/select/selectSpinner/index.js +9 -13
- package/dist/modules/components/slider/index.js +41 -34
- package/dist/modules/components/switch/index.js +62 -35
- package/dist/modules/components/tab/tabButton/index.js +29 -19
- package/dist/modules/components/tab/tabContainer/index.js +28 -22
- package/dist/modules/components/tab/tabContext.js +10 -12
- package/dist/modules/components/table/tableBody/index.js +14 -19
- package/dist/modules/components/table/tableCaption/index.js +8 -15
- package/dist/modules/components/table/tableContainer/index.js +8 -12
- package/dist/modules/components/table/tableFooter/index.js +11 -18
- package/dist/modules/components/table/tableHeader/index.js +11 -12
- package/dist/modules/components/textarea/index.js +69 -51
- package/dist/modules/components/tooltip/index.js +45 -34
- package/dist/modules/hooks/useAutomation.js +27 -35
- package/dist/modules/hooks/useDrawer.js +19 -17
- package/dist/modules/hooks/useForm.js +6 -6
- package/dist/modules/hooks/useHydrated.js +12 -7
- package/dist/modules/hooks/useModal.js +19 -17
- package/dist/modules/hooks/useScopedParams.js +17 -17
- package/dist/modules/hooks/useScrollLock.js +19 -19
- package/dist/modules/hooks/useSearchAutomation.js +14 -31
- package/dist/modules/hooks/useSlider.js +13 -13
- package/dist/modules/hooks/useToast.js +9 -8
- package/dist/modules/index.js +144 -72
- package/dist/modules/providers/drawerProvider.js +30 -35
- package/dist/modules/providers/formProvider.js +16 -11
- package/dist/modules/providers/modalProvider.js +33 -39
- package/dist/modules/providers/placesProvider.js +16 -16
- package/dist/modules/providers/toastProvider.js +51 -45
- package/dist/modules/services/extractTextFromNode.js +6 -6
- package/dist/modules/services/fieldTemplate.js +23 -22
- package/dist/modules/services/iconRenderer.js +7 -14
- package/dist/modules/services/isBlockActive.js +14 -12
- package/dist/modules/services/isMarkActive.js +6 -6
- package/dist/modules/services/maskCurrencyValues.js +12 -11
- package/dist/modules/services/toHtml.js +6 -6
- package/dist/modules/services/toRichTextValue.js +7 -7
- package/dist/modules/services/toggleBlock.js +19 -20
- package/dist/modules/services/toggleMark.js +7 -7
- package/dist/modules/style.css +1 -0
- package/dist/modules/templates/badResponses.js +13 -13
- package/dist/modules/templates/richTextTemplates.js +14 -17
- package/dist/modules/templates/successResponses.js +4 -9
- package/dist/modules/utils/phoneInputUtilities.js +28 -18
- package/dist/modules/utils/richTextUtilities.js +75 -88
- package/dist/services/fieldTemplate.d.ts +1 -1
- package/dist/services/fieldTemplate.d.ts.map +1 -1
- package/dist/style.css +1 -0
- package/package.json +65 -65
- package/dist/components.css +0 -2
- package/dist/modules/components.css +0 -2
|
@@ -1,36 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as h } from "../../button/index.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function k(c) {
|
|
5
|
+
const {
|
|
6
|
+
dropAudioText: a,
|
|
7
|
+
isLoading: s,
|
|
8
|
+
acceptAudio: d,
|
|
9
|
+
handleSelectFile: i,
|
|
10
|
+
selectAudioButtonText: u,
|
|
11
|
+
disabled: n
|
|
12
|
+
} = c;
|
|
13
|
+
function f(t) {
|
|
14
|
+
if (n) return;
|
|
15
|
+
t.preventDefault();
|
|
16
|
+
const e = t.dataTransfer.files[0];
|
|
17
|
+
e && i(e);
|
|
18
|
+
}
|
|
19
|
+
function p() {
|
|
20
|
+
if (n) return;
|
|
21
|
+
const t = document.createElement("input");
|
|
22
|
+
t.type = "file", t.accept = d, t.onchange = (e) => {
|
|
23
|
+
var l;
|
|
24
|
+
const o = (l = e.target.files) == null ? void 0 : l[0];
|
|
25
|
+
o && i(o);
|
|
26
|
+
}, t.click();
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ m("div", { onDrop: f, className: "arkynAudioUploadNoFileContent", children: [
|
|
29
|
+
/* @__PURE__ */ r(
|
|
30
|
+
h,
|
|
31
|
+
{
|
|
32
|
+
isLoading: s,
|
|
33
|
+
onClick: p,
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "sm",
|
|
36
|
+
type: "button",
|
|
37
|
+
disabled: n,
|
|
38
|
+
children: u
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r("p", { children: a })
|
|
42
|
+
] });
|
|
34
43
|
}
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
export {
|
|
45
|
+
k as NoFileContent
|
|
46
|
+
};
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
iconSize: f,
|
|
21
|
-
icon: c
|
|
22
|
-
})
|
|
23
|
-
]
|
|
24
|
-
});
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconRenderer as n } from "../../services/iconRenderer.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function $(o) {
|
|
5
|
+
const {
|
|
6
|
+
variant: c = "ghost",
|
|
7
|
+
scheme: r = "primary",
|
|
8
|
+
size: s = "lg",
|
|
9
|
+
leftIcon: t,
|
|
10
|
+
rightIcon: a,
|
|
11
|
+
className: m = "",
|
|
12
|
+
children: l,
|
|
13
|
+
...d
|
|
14
|
+
} = o, i = { md: 12, lg: 14 }[s], g = `arkynBadge ${c} ${r} ${s} ${m}`;
|
|
15
|
+
return /* @__PURE__ */ p("div", { className: g.trim(), ...d, children: [
|
|
16
|
+
/* @__PURE__ */ e(n, { iconSize: i, icon: t }),
|
|
17
|
+
/* @__PURE__ */ e("p", { children: l }),
|
|
18
|
+
/* @__PURE__ */ e(n, { iconSize: i, icon: a })
|
|
19
|
+
] });
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
export {
|
|
22
|
+
$ as Badge
|
|
23
|
+
};
|
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
m,
|
|
31
|
-
/* @__PURE__ */ t(e, {
|
|
32
|
-
iconSize: g,
|
|
33
|
-
icon: d
|
|
34
|
-
})
|
|
35
|
-
]
|
|
36
|
-
})]
|
|
37
|
-
});
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2 as T } from "lucide-react";
|
|
3
|
+
import { IconRenderer as t } from "../../services/iconRenderer.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
function y(l) {
|
|
6
|
+
const {
|
|
7
|
+
isLoading: i = !1,
|
|
8
|
+
scheme: r = "primary",
|
|
9
|
+
variant: d = "solid",
|
|
10
|
+
loadingText: n,
|
|
11
|
+
size: a = "md",
|
|
12
|
+
leftIcon: c,
|
|
13
|
+
rightIcon: m,
|
|
14
|
+
disabled: g,
|
|
15
|
+
className: u = "",
|
|
16
|
+
children: x,
|
|
17
|
+
...h
|
|
18
|
+
} = l, s = { xs: 12, sm: 16, md: 20, lg: 24 }[a], p = `arkynButton ${i ? "loadingTrue" : "loadingFalse"} ${d} ${r} ${a} ${n ? "loadingTextTrue" : "loadingTextFalse"} ${u}`;
|
|
19
|
+
return /* @__PURE__ */ o("button", { className: p, disabled: g || i, ...h, children: [
|
|
20
|
+
/* @__PURE__ */ o("div", { className: "arkynButtonSpinner", children: [
|
|
21
|
+
/* @__PURE__ */ e(T, { size: s, strokeWidth: 2.5 }),
|
|
22
|
+
n && n
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ o("div", { className: "arkynButtonContent", children: [
|
|
25
|
+
/* @__PURE__ */ e(t, { iconSize: s, icon: c }),
|
|
26
|
+
x,
|
|
27
|
+
/* @__PURE__ */ e(t, { iconSize: s, icon: m })
|
|
28
|
+
] })
|
|
29
|
+
] });
|
|
38
30
|
}
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export {
|
|
32
|
+
y as Button
|
|
33
|
+
};
|
|
@@ -1,40 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return n(a);
|
|
1
|
+
import { jsx as Y } from "react/jsx-runtime";
|
|
2
|
+
import { useState as D, createContext as y, useContext as k } from "react";
|
|
3
|
+
import { ViewService as P } from "./_viewService.js";
|
|
4
|
+
const h = y({});
|
|
5
|
+
function B() {
|
|
6
|
+
return k(h);
|
|
8
7
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
8
|
+
function L(g) {
|
|
9
|
+
const {
|
|
10
|
+
calendarType: n,
|
|
11
|
+
children: V,
|
|
12
|
+
defaultValue: u,
|
|
13
|
+
defaultViewValue: f = /* @__PURE__ */ new Date(),
|
|
14
|
+
language: c = "pt-BR",
|
|
15
|
+
onChange: o,
|
|
16
|
+
onChangeView: w,
|
|
17
|
+
value: l,
|
|
18
|
+
viewValue: M
|
|
19
|
+
} = g, v = n === "single" ? [u || /* @__PURE__ */ new Date(), u || /* @__PURE__ */ new Date()] : u || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [d, x] = D(f), [p, C] = D(v), t = M || d, s = l ? n === "single" ? [l, l] : l : p, e = new P();
|
|
20
|
+
function m(a) {
|
|
21
|
+
const i = [
|
|
22
|
+
new Date(a[0]),
|
|
23
|
+
new Date(a[1])
|
|
24
|
+
];
|
|
25
|
+
o && n === "range" && o(i), o && n === "single" && o(i[0]), C(i);
|
|
26
|
+
}
|
|
27
|
+
function r(a) {
|
|
28
|
+
w && w(a), x(a);
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ Y(
|
|
31
|
+
h.Provider,
|
|
32
|
+
{
|
|
33
|
+
value: {
|
|
34
|
+
valueDate: s,
|
|
35
|
+
viewDate: t,
|
|
36
|
+
currentDate: t.toLocaleDateString(c).slice(3),
|
|
37
|
+
currentDay: e.currentDay(t),
|
|
38
|
+
currentMonth: e.currentMonth(t),
|
|
39
|
+
currentYear: e.currentYear(t),
|
|
40
|
+
listWeek: e.listWeek(c),
|
|
41
|
+
listMonths: e.listMonths(t, c),
|
|
42
|
+
listYears: e.listYears(100),
|
|
43
|
+
listMatrix: e.listMatrix(t, s),
|
|
44
|
+
changeDay: (a, i, S) => e.changeDay(
|
|
45
|
+
a,
|
|
46
|
+
i,
|
|
47
|
+
S,
|
|
48
|
+
n,
|
|
49
|
+
s,
|
|
50
|
+
m,
|
|
51
|
+
r
|
|
52
|
+
),
|
|
53
|
+
changeMonth: (a) => e.changeMonth(a, t, r),
|
|
54
|
+
changeYear: (a) => e.changeYear(a, t, r),
|
|
55
|
+
nextMonth: () => e.nextMonth(t, r),
|
|
56
|
+
previousMonth: () => e.previousMonth(t, r)
|
|
57
|
+
},
|
|
58
|
+
children: V
|
|
59
|
+
}
|
|
60
|
+
);
|
|
38
61
|
}
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
export {
|
|
63
|
+
L as CalendarProvider,
|
|
64
|
+
B as useCalendar
|
|
65
|
+
};
|
|
@@ -1,133 +1,141 @@
|
|
|
1
|
-
import { formatToCapitalizeFirstWordLetter as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
import { formatToCapitalizeFirstWordLetter as f } from "@arkyn/shared";
|
|
2
|
+
let p = class {
|
|
3
|
+
currentDay(n) {
|
|
4
|
+
return String(n.getDate()).padStart(2, "0");
|
|
5
|
+
}
|
|
6
|
+
currentMonth(n) {
|
|
7
|
+
return String(n.getMonth() + 1).padStart(2, "0");
|
|
8
|
+
}
|
|
9
|
+
currentYear(n) {
|
|
10
|
+
return String(n.getFullYear());
|
|
11
|
+
}
|
|
12
|
+
capitalize(n) {
|
|
13
|
+
return f(n);
|
|
14
|
+
}
|
|
15
|
+
parseDayType(n, r, t, e) {
|
|
16
|
+
const s = e[0].getDate(), o = e[0].getMonth(), y = e[0].getFullYear(), l = e[1].getDate(), a = e[1].getMonth(), c = e[1].getFullYear(), D = new Date(y, o, s), h = new Date(c, a, l), i = new Date(t, r, n);
|
|
17
|
+
return D.getTime() === i.getTime() || h.getTime() === i.getTime() ? "checkedDay" : i > D && i < h ? "middleDay" : "uncheckedDay";
|
|
18
|
+
}
|
|
19
|
+
listWeek(n) {
|
|
20
|
+
const r = [], t = new Date(Date.UTC(2023, 0, 1));
|
|
21
|
+
for (let e = 0; e < 7; e++) {
|
|
22
|
+
const s = new Date(t);
|
|
23
|
+
s.setUTCDate(t.getUTCDate() + e);
|
|
24
|
+
const o = s.toLocaleDateString(n, {
|
|
25
|
+
weekday: "short",
|
|
26
|
+
timeZone: "UTC"
|
|
27
|
+
});
|
|
28
|
+
r.push(o);
|
|
29
|
+
}
|
|
30
|
+
return r;
|
|
31
|
+
}
|
|
32
|
+
listMonths(n, r) {
|
|
33
|
+
const t = new Intl.DateTimeFormat(r, {
|
|
34
|
+
month: "long"
|
|
35
|
+
});
|
|
36
|
+
return Array.from({ length: 12 }, (e, s) => {
|
|
37
|
+
const o = new Date(n.getFullYear(), s, 1), y = t.format(o);
|
|
38
|
+
return {
|
|
39
|
+
label: this.capitalize(y),
|
|
40
|
+
value: String(s).padStart(2, "0")
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
listYears(n) {
|
|
45
|
+
const r = (/* @__PURE__ */ new Date()).getFullYear();
|
|
46
|
+
return Array.from({ length: n + 1 }, (t, e) => {
|
|
47
|
+
const s = r - n + e;
|
|
48
|
+
return { label: String(s), value: String(s) };
|
|
49
|
+
}).reverse();
|
|
50
|
+
}
|
|
51
|
+
listMatrix(n, r) {
|
|
52
|
+
const t = n.getFullYear(), e = n.getMonth(), o = new Date(t, e, 1).getDay(), y = new Date(t, e + 1, 0).getDate(), l = new Date(t, e, 0).getDate(), a = Math.ceil((o + y) / 7) * 7, c = [];
|
|
53
|
+
let D = 1, h = 1;
|
|
54
|
+
for (let i = 0; i < a; i++) {
|
|
55
|
+
const g = Math.floor(i / 7);
|
|
56
|
+
if (c[g] || (c[g] = []), i < o) {
|
|
57
|
+
const d = l - (o - i - 1), u = e === 0 ? 11 : e - 1, w = e === 0 ? t - 1 : t;
|
|
58
|
+
c[g].push({
|
|
59
|
+
day: d,
|
|
60
|
+
month: u,
|
|
61
|
+
year: w,
|
|
62
|
+
dayOwner: "previous",
|
|
63
|
+
dayType: this.parseDayType(d, u, w, r)
|
|
64
|
+
});
|
|
65
|
+
} else if (D <= y)
|
|
66
|
+
c[g].push({
|
|
67
|
+
day: D,
|
|
68
|
+
month: e,
|
|
69
|
+
year: t,
|
|
70
|
+
dayOwner: "current",
|
|
71
|
+
dayType: this.parseDayType(
|
|
72
|
+
D,
|
|
73
|
+
e,
|
|
74
|
+
t,
|
|
75
|
+
r
|
|
76
|
+
)
|
|
77
|
+
}), D++;
|
|
78
|
+
else {
|
|
79
|
+
const d = e === 11 ? 0 : e + 1, u = e === 11 ? t + 1 : t;
|
|
80
|
+
c[g].push({
|
|
81
|
+
day: h,
|
|
82
|
+
month: d,
|
|
83
|
+
year: u,
|
|
84
|
+
dayOwner: "next",
|
|
85
|
+
dayType: this.parseDayType(h, d, u, r)
|
|
86
|
+
}), h++;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return c;
|
|
90
|
+
}
|
|
91
|
+
changeDay(n, r, t, e, s, o, y) {
|
|
92
|
+
const l = (w) => new Date(w.getFullYear(), w.getMonth(), w.getDate()), a = l(new Date(t, r, n));
|
|
93
|
+
if (y(a), e === "single") {
|
|
94
|
+
o([a, a]);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
let c = l(s[0]), D = l(s[1]);
|
|
98
|
+
const h = a.getTime(), i = c.getTime(), g = D.getTime();
|
|
99
|
+
if (h === i) {
|
|
100
|
+
o([a, a]);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (h === g) {
|
|
104
|
+
o([a, a]);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (a < c) {
|
|
108
|
+
o([a, D]);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (a > D) {
|
|
112
|
+
o([c, a]);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const d = Math.abs(h - i), u = Math.abs(g - h);
|
|
116
|
+
if (d <= u) {
|
|
117
|
+
o([a, D]);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
o([c, a]);
|
|
121
|
+
}
|
|
122
|
+
changeMonth(n, r, t) {
|
|
123
|
+
const e = new Date(r);
|
|
124
|
+
e.setMonth(n), t(e);
|
|
125
|
+
}
|
|
126
|
+
changeYear(n, r, t) {
|
|
127
|
+
const e = new Date(r);
|
|
128
|
+
e.setFullYear(n), t(e);
|
|
129
|
+
}
|
|
130
|
+
nextMonth(n, r) {
|
|
131
|
+
const t = new Date(n);
|
|
132
|
+
t.setDate(1), t.setMonth(t.getMonth() + 1), r(t);
|
|
133
|
+
}
|
|
134
|
+
previousMonth(n, r) {
|
|
135
|
+
const t = new Date(n);
|
|
136
|
+
t.setDate(1), t.setMonth(t.getMonth() - 1), r(t);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
export {
|
|
140
|
+
p as ViewService
|
|
131
141
|
};
|
|
132
|
-
//#endregion
|
|
133
|
-
export { t as ViewService };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */ e("div", {
|
|
6
|
-
className: "arkynCalendarContainer",
|
|
7
|
-
children: t
|
|
8
|
-
});
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function o({ children: r }) {
|
|
4
|
+
return /* @__PURE__ */ n("div", { className: "arkynCalendarContainer", children: r });
|
|
9
5
|
}
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export {
|
|
7
|
+
o as CalendarContainer
|
|
8
|
+
};
|