@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,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */ e("button", {
|
|
6
|
-
className: "arkynPaginationCurrentButton",
|
|
7
|
-
disabled: !0,
|
|
8
|
-
children: t
|
|
9
|
-
});
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function e({ currentPage: t }) {
|
|
4
|
+
return /* @__PURE__ */ r("button", { className: "arkynPaginationCurrentButton", disabled: !0, children: t });
|
|
10
5
|
}
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
export {
|
|
7
|
+
e as CurrentButton
|
|
8
|
+
};
|
|
@@ -1,52 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
-
|
|
1
|
+
import { jsxs as o, jsx as e, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronButton as C } from "./chevronButton/index.js";
|
|
3
|
+
import { CurrentButton as B } from "./currentButton/index.js";
|
|
4
|
+
import { PageButton as r } from "./pageButton/index.js";
|
|
5
|
+
import { PaginationService as S } from "./paginationService.js";
|
|
6
|
+
import { Spread as u } from "./spread/index.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
function O(d) {
|
|
9
|
+
const {
|
|
10
|
+
totalCountRegisters: m,
|
|
11
|
+
siblingsCount: p,
|
|
12
|
+
currentPage: b,
|
|
13
|
+
registerPerPage: c,
|
|
14
|
+
onChange: f,
|
|
15
|
+
...v
|
|
16
|
+
} = d, {
|
|
17
|
+
currentPage: a,
|
|
18
|
+
siblingsCount: t,
|
|
19
|
+
previousPages: x,
|
|
20
|
+
nextPages: R,
|
|
21
|
+
lastPage: n,
|
|
22
|
+
handlePageChange: s,
|
|
23
|
+
handleMinusChange: h,
|
|
24
|
+
handlePlusChange: l
|
|
25
|
+
} = new S({
|
|
26
|
+
totalCountRegisters: m,
|
|
27
|
+
currentPage: b,
|
|
28
|
+
registerPerPage: c,
|
|
29
|
+
siblingsCount: p,
|
|
30
|
+
onChange: f
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ o("div", { className: "arkynPagination", ...v, children: [
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
C,
|
|
35
|
+
{
|
|
36
|
+
orientation: "left",
|
|
37
|
+
handlePageChange: h,
|
|
38
|
+
disabled: a <= 1
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
a > 1 + t && /* @__PURE__ */ o(P, { children: [
|
|
42
|
+
/* @__PURE__ */ e(r, { page: 1, handlePageChange: () => s(1) }),
|
|
43
|
+
a > 2 + t && /* @__PURE__ */ e(u, {})
|
|
44
|
+
] }),
|
|
45
|
+
x.map((g, i) => /* @__PURE__ */ e(
|
|
46
|
+
r,
|
|
47
|
+
{
|
|
48
|
+
page: g,
|
|
49
|
+
handlePageChange: h
|
|
50
|
+
},
|
|
51
|
+
i
|
|
52
|
+
)),
|
|
53
|
+
/* @__PURE__ */ e(B, { currentPage: a }),
|
|
54
|
+
R.map((g, i) => /* @__PURE__ */ e(
|
|
55
|
+
r,
|
|
56
|
+
{
|
|
57
|
+
page: g,
|
|
58
|
+
handlePageChange: l
|
|
59
|
+
},
|
|
60
|
+
i
|
|
61
|
+
)),
|
|
62
|
+
a + t < n && /* @__PURE__ */ o(P, { children: [
|
|
63
|
+
a + 1 + t < n && /* @__PURE__ */ e(u, {}),
|
|
64
|
+
/* @__PURE__ */ e(
|
|
65
|
+
r,
|
|
66
|
+
{
|
|
67
|
+
page: n,
|
|
68
|
+
handlePageChange: () => s(n)
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ e(
|
|
73
|
+
C,
|
|
74
|
+
{
|
|
75
|
+
orientation: "right",
|
|
76
|
+
handlePageChange: l,
|
|
77
|
+
disabled: a >= n
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] });
|
|
50
81
|
}
|
|
51
|
-
|
|
52
|
-
|
|
82
|
+
export {
|
|
83
|
+
O as Pagination
|
|
84
|
+
};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return /* @__PURE__ */ e("button", {
|
|
7
|
-
className: "arkynPaginationPageButton",
|
|
8
|
-
onClick: r,
|
|
9
|
-
children: n
|
|
10
|
-
});
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function i(n) {
|
|
4
|
+
const { page: t, handlePageChange: a } = n;
|
|
5
|
+
return /* @__PURE__ */ o("button", { className: "arkynPaginationPageButton", onClick: a, children: t });
|
|
11
6
|
}
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
export {
|
|
8
|
+
i as PageButton
|
|
9
|
+
};
|
|
@@ -1,34 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
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
|
-
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var r = (a, e, i) => e in a ? g(a, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[e] = i;
|
|
3
|
+
var t = (a, e, i) => r(a, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
class P {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
t(this, "currentPage");
|
|
7
|
+
t(this, "totalCountRegisters");
|
|
8
|
+
t(this, "registerPerPage");
|
|
9
|
+
t(this, "siblingsCount");
|
|
10
|
+
t(this, "lastPage");
|
|
11
|
+
t(this, "onChange");
|
|
12
|
+
t(this, "previousPages");
|
|
13
|
+
t(this, "nextPages");
|
|
14
|
+
t(this, "handlePageChange", (e) => {
|
|
15
|
+
e < 1 || e > this.lastPage || this.onChange && (this.currentPage = e, this.onChange(this.currentPage));
|
|
16
|
+
});
|
|
17
|
+
t(this, "handlePlusChange", () => {
|
|
18
|
+
this.currentPage >= this.lastPage || this.onChange && (this.currentPage += 1, this.onChange(this.currentPage));
|
|
19
|
+
});
|
|
20
|
+
t(this, "handleMinusChange", () => {
|
|
21
|
+
this.currentPage <= 1 || this.onChange && (this.currentPage -= 1, this.onChange(this.currentPage));
|
|
22
|
+
});
|
|
23
|
+
this.totalCountRegisters = e.totalCountRegisters, this.currentPage = e.currentPage, this.registerPerPage = (e == null ? void 0 : e.registerPerPage) || 20, this.siblingsCount = (e == null ? void 0 : e.siblingsCount) || 2, this.lastPage = Math.ceil(this.totalCountRegisters / this.registerPerPage), this.onChange = e == null ? void 0 : e.onChange, this.previousPages = this.generatePreviousPages(
|
|
24
|
+
this.currentPage,
|
|
25
|
+
this.siblingsCount
|
|
26
|
+
), this.nextPages = this.generateNextPages(
|
|
27
|
+
this.currentPage,
|
|
28
|
+
this.siblingsCount
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
generatePagesArray(e, i) {
|
|
32
|
+
return [...new Array(i - e)].map((n, s) => e + s + 1).filter((n) => n > 0);
|
|
33
|
+
}
|
|
34
|
+
generatePreviousPages(e, i) {
|
|
35
|
+
return e > 1 ? this.generatePagesArray(
|
|
36
|
+
e - 1 - i,
|
|
37
|
+
e - 1
|
|
38
|
+
) : [];
|
|
39
|
+
}
|
|
40
|
+
generateNextPages(e, i) {
|
|
41
|
+
return e < this.lastPage ? this.generatePagesArray(
|
|
42
|
+
e,
|
|
43
|
+
Math.min(e + i, this.lastPage)
|
|
44
|
+
) : [];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
P as PaginationService
|
|
32
49
|
};
|
|
33
|
-
//#endregion
|
|
34
|
-
export { e as PaginationService };
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/components/pagination/spread/index.tsx
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Ellipsis as i } from "lucide-react";
|
|
3
|
+
/* empty css */
|
|
5
4
|
function n() {
|
|
6
|
-
|
|
7
|
-
className: "arkynPaginationSpread",
|
|
8
|
-
children: /* @__PURE__ */ e(t, {})
|
|
9
|
-
});
|
|
5
|
+
return /* @__PURE__ */ r("p", { className: "arkynPaginationSpread", children: /* @__PURE__ */ r(i, {}) });
|
|
10
6
|
}
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export {
|
|
8
|
+
n as Spread
|
|
9
|
+
};
|
|
@@ -1,104 +1,152 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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
|
-
|
|
1
|
+
import { jsx as n, jsxs as V } from "react/jsx-runtime";
|
|
2
|
+
import { formatToPhone as ee, findCountryMask as ne, removeNonNumeric as oe } from "@arkyn/shared";
|
|
3
|
+
import { countries as m } from "@arkyn/templates";
|
|
4
|
+
import { useState as r, useRef as k, useId as te } from "react";
|
|
5
|
+
import { useForm as re } from "../../hooks/useForm.js";
|
|
6
|
+
import { FieldTemplate as se } from "../../services/fieldTemplate.js";
|
|
7
|
+
import { PhoneInputContainer as ae } from "./phoneInputContainer/index.js";
|
|
8
|
+
import { PhoneInputCountriesOverlay as ue } from "./phoneInputCountriesOverlay/index.js";
|
|
9
|
+
import { PhoneInputCountryOption as ie } from "./phoneInputCountryOption/index.js";
|
|
10
|
+
import { PhoneInputCountryOptionsContainer as le } from "./phoneInputCountryOptionsContainer/index.js";
|
|
11
|
+
import { PhoneInputCountrySelector as ce } from "./phoneInputCountrySelector/index.js";
|
|
12
|
+
import { PhoneInputMask as fe } from "./phoneInputMask/index.js";
|
|
13
|
+
function be(M) {
|
|
14
|
+
const {
|
|
15
|
+
defaultCountryIso: pe,
|
|
16
|
+
value: h,
|
|
17
|
+
label: N,
|
|
18
|
+
className: S = "",
|
|
19
|
+
disabled: x = !1,
|
|
20
|
+
errorMessage: R,
|
|
21
|
+
isLoading: C = !1,
|
|
22
|
+
readOnly: s = !1,
|
|
23
|
+
size: a = "md",
|
|
24
|
+
defaultValue: u = "",
|
|
25
|
+
variant: T = "solid",
|
|
26
|
+
showAsterisk: B,
|
|
27
|
+
name: l,
|
|
28
|
+
onChange: y,
|
|
29
|
+
searchCountryPlaceholder: L = "Pesquisar país",
|
|
30
|
+
notFoundCountryText: j = "Nenhum país encontrado",
|
|
31
|
+
id: A,
|
|
32
|
+
unShowFieldTemplate: D = !1,
|
|
33
|
+
orientation: q = "vertical"
|
|
34
|
+
} = M, z = m.find((e) => e.iso === "BR"), E = u ? ee(u) : "", G = u ? ne(u)[1] : z, [I, o] = r(!1), [F, H] = r(""), [c, f] = r(!1), [J, O] = r(E), P = h !== void 0 ? h : J, [i, K] = r(G), { fieldErrors: p } = re(), Q = k(null), U = A || te(), v = R || (p == null ? void 0 : p[l]), W = !!v, t = x || C, d = k(null);
|
|
35
|
+
function X() {
|
|
36
|
+
t || I || c || (o(!0), d.current && d.current.focus());
|
|
37
|
+
}
|
|
38
|
+
function Y() {
|
|
39
|
+
f(!0), o(!0);
|
|
40
|
+
}
|
|
41
|
+
function Z() {
|
|
42
|
+
f(!1), o(!1);
|
|
43
|
+
}
|
|
44
|
+
function _() {
|
|
45
|
+
o(!0);
|
|
46
|
+
}
|
|
47
|
+
function $() {
|
|
48
|
+
o(!1);
|
|
49
|
+
}
|
|
50
|
+
function g(e) {
|
|
51
|
+
return e.name.toLowerCase().includes(F.toLowerCase());
|
|
52
|
+
}
|
|
53
|
+
function w(e) {
|
|
54
|
+
let b = i.code;
|
|
55
|
+
return b += oe(e || P), b;
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ n(
|
|
58
|
+
se,
|
|
59
|
+
{
|
|
60
|
+
name: l,
|
|
61
|
+
label: N,
|
|
62
|
+
showAsterisk: B,
|
|
63
|
+
className: S,
|
|
64
|
+
errorMessage: v,
|
|
65
|
+
unShowFieldTemplate: D,
|
|
66
|
+
orientation: q,
|
|
67
|
+
children: /* @__PURE__ */ V(
|
|
68
|
+
ae,
|
|
69
|
+
{
|
|
70
|
+
disabled: t,
|
|
71
|
+
isError: W,
|
|
72
|
+
isLoading: C,
|
|
73
|
+
isFocused: I,
|
|
74
|
+
readOnly: s,
|
|
75
|
+
size: a,
|
|
76
|
+
variant: T,
|
|
77
|
+
onFocus: X,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ n(
|
|
80
|
+
ce,
|
|
81
|
+
{
|
|
82
|
+
currentCountry: i,
|
|
83
|
+
onClick: Y,
|
|
84
|
+
size: a
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ V(
|
|
88
|
+
le,
|
|
89
|
+
{
|
|
90
|
+
isOpen: t || s ? !1 : c,
|
|
91
|
+
search: F,
|
|
92
|
+
placeholder: L,
|
|
93
|
+
onSearch: H,
|
|
94
|
+
children: [
|
|
95
|
+
m.filter((e) => g(e)).map((e) => /* @__PURE__ */ n(
|
|
96
|
+
ie,
|
|
97
|
+
{
|
|
98
|
+
country: e,
|
|
99
|
+
handleChangeValue: () => {
|
|
100
|
+
K(e), f(!1), O("");
|
|
101
|
+
},
|
|
102
|
+
isActive: e.iso === i.iso,
|
|
103
|
+
size: a
|
|
104
|
+
},
|
|
105
|
+
e.iso
|
|
106
|
+
)),
|
|
107
|
+
m.filter((e) => g(e)).length === 0 && /* @__PURE__ */ n("p", { children: j })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ n(
|
|
112
|
+
ue,
|
|
113
|
+
{
|
|
114
|
+
isOpen: t || s ? !1 : c,
|
|
115
|
+
onClick: Z
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ n(
|
|
119
|
+
fe,
|
|
120
|
+
{
|
|
121
|
+
id: U,
|
|
122
|
+
ref: d,
|
|
123
|
+
readonly: s,
|
|
124
|
+
currentCountry: i,
|
|
125
|
+
value: P,
|
|
126
|
+
disabled: t,
|
|
127
|
+
onBlur: $,
|
|
128
|
+
onFocus: _,
|
|
129
|
+
size: a,
|
|
130
|
+
onChange: (e) => {
|
|
131
|
+
O(e), y && y(w(e));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ n(
|
|
136
|
+
"input",
|
|
137
|
+
{
|
|
138
|
+
ref: Q,
|
|
139
|
+
type: "hidden",
|
|
140
|
+
name: l,
|
|
141
|
+
value: w()
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
);
|
|
102
149
|
}
|
|
103
|
-
|
|
104
|
-
|
|
150
|
+
export {
|
|
151
|
+
be as PhoneInput
|
|
152
|
+
};
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function N(o) {
|
|
4
|
+
const {
|
|
5
|
+
children: e,
|
|
6
|
+
onFocus: s,
|
|
7
|
+
disabled: r,
|
|
8
|
+
isError: n,
|
|
9
|
+
isLoading: a,
|
|
10
|
+
isFocused: c,
|
|
11
|
+
className: t = "",
|
|
12
|
+
readOnly: i,
|
|
13
|
+
variant: d,
|
|
14
|
+
size: u
|
|
15
|
+
} = o, l = `arkynPhoneInputContainer ${d} ${u} ${r || i || a ? "opacity" : ""} ${n ? "errored" : ""} ${c ? "focused" : ""} ${t}`;
|
|
16
|
+
return /* @__PURE__ */ m("section", { className: l.trim(), onClick: s, children: e });
|
|
11
17
|
}
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
export {
|
|
19
|
+
N as PhoneInputContainer
|
|
20
|
+
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return r ? /* @__PURE__ */ t("aside", {
|
|
7
|
-
className: "arkynPhoneInputCountriesOverlay",
|
|
8
|
-
onClick: i
|
|
9
|
-
}) : /* @__PURE__ */ t(e, {});
|
|
1
|
+
import { jsx as n, Fragment as o } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function a(r) {
|
|
4
|
+
const { isOpen: e, onClick: t } = r;
|
|
5
|
+
return e ? /* @__PURE__ */ n("aside", { className: "arkynPhoneInputCountriesOverlay", onClick: t }) : /* @__PURE__ */ n(o, {});
|
|
10
6
|
}
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export {
|
|
8
|
+
a as PhoneInputCountriesOverlay
|
|
9
|
+
};
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
alt: i.name,
|
|
14
|
-
className: "flag"
|
|
15
|
-
}),
|
|
16
|
-
i.name,
|
|
17
|
-
" ",
|
|
18
|
-
/* @__PURE__ */ e("span", { children: i.code }),
|
|
19
|
-
/* @__PURE__ */ e(n, { className: "check" })
|
|
20
|
-
]
|
|
21
|
-
});
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Check as r } from "lucide-react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function u(t) {
|
|
5
|
+
const { country: n, isActive: c, handleChangeValue: a, size: o } = t, s = `arkynPhoneInputCountryOption ${o} ${c ? "active" : ""}`;
|
|
6
|
+
return /* @__PURE__ */ i("div", { onClick: () => a(n), className: s, children: [
|
|
7
|
+
/* @__PURE__ */ e("img", { src: n.flag, alt: n.name, className: "flag" }),
|
|
8
|
+
n.name,
|
|
9
|
+
" ",
|
|
10
|
+
/* @__PURE__ */ e("span", { children: n.code }),
|
|
11
|
+
/* @__PURE__ */ e(r, { className: "check" })
|
|
12
|
+
] });
|
|
22
13
|
}
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
export {
|
|
15
|
+
u as PhoneInputCountryOption
|
|
16
|
+
};
|