@arkyn/components 3.0.1-beta.156 → 3.0.1-beta.158
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 +4347 -4683
- package/dist/modules/components/alert/alertContainer/index.js +25 -20
- package/dist/modules/components/alert/alertContent/index.js +11 -8
- package/dist/modules/components/alert/alertDescription/index.js +11 -8
- package/dist/modules/components/alert/alertIcon/index.js +27 -19
- package/dist/modules/components/alert/alertTitle/index.js +11 -8
- package/dist/modules/components/audioPlayer/index.js +74 -75
- package/dist/modules/components/audioUpload/hasFileContent/index.js +54 -62
- package/dist/modules/components/audioUpload/index.js +71 -79
- package/dist/modules/components/audioUpload/noFileContent/index.js +35 -45
- package/dist/modules/components/badge/index.js +26 -22
- package/dist/modules/components/button/index.js +39 -32
- package/dist/modules/components/calendar/_calendarProvider.js +38 -63
- package/dist/modules/components/calendar/_viewService.js +132 -140
- package/dist/modules/components/calendar/calendarContainer/index.js +10 -7
- package/dist/modules/components/calendar/calendarHeader/index.js +51 -72
- package/dist/modules/components/calendar/calendarTableBody/index.js +12 -10
- package/dist/modules/components/calendar/calendarTableContainer/index.js +10 -7
- package/dist/modules/components/calendar/calendarTableHeader/index.js +13 -10
- package/dist/modules/components/calendar/calendarTableTd/index.js +20 -23
- package/dist/modules/components/calendar/index.js +31 -49
- package/dist/modules/components/cardTab/cardTabButton/index.js +19 -29
- package/dist/modules/components/cardTab/cardTabContainer/index.js +22 -28
- package/dist/modules/components/cardTab/cardTabContext.js +13 -11
- package/dist/modules/components/checkbox/index.js +37 -64
- package/dist/modules/components/clientOnly.js +8 -8
- package/dist/modules/components/currencyInput/index.js +110 -138
- package/dist/modules/components/divider/index.js +10 -11
- package/dist/modules/components/drawer/drawerContainer/index.js +40 -43
- package/dist/modules/components/drawer/drawerContext.js +13 -11
- package/dist/modules/components/drawer/drawerHeader/index.js +20 -27
- package/dist/modules/components/facebookPixel/facebookPixel.client.js +8 -18
- package/dist/modules/components/facebookPixel/index.js +8 -8
- package/dist/modules/components/facebookPixel/pixel.js +47 -52
- package/dist/modules/components/fieldError/index.js +12 -8
- package/dist/modules/components/fieldLabel/index.js +11 -12
- package/dist/modules/components/fieldWrapper/index.js +12 -13
- package/dist/modules/components/fileUpload/hasFileContent/index.js +59 -67
- package/dist/modules/components/fileUpload/index.js +65 -72
- package/dist/modules/components/fileUpload/noFileContent/index.js +35 -45
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +33 -46
- package/dist/modules/components/fullCalendar/_viewService.js +100 -105
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +10 -7
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +70 -78
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +28 -33
- package/dist/modules/components/fullCalendar/dayCalendar/index.js +12 -9
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +10 -7
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +67 -70
- package/dist/modules/components/fullCalendar/index.js +30 -30
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +9 -12
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +28 -36
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +11 -9
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +10 -9
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +13 -10
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +35 -36
- package/dist/modules/components/fullCalendar/weekCalendar/index.js +8 -11
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +70 -78
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +17 -20
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +9 -8
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +16 -19
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +34 -39
- 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 +10 -12
- package/dist/modules/components/googleTagManager/googleTagManager.client.js +6 -6
- package/dist/modules/components/googleTagManager/googleTagManager.js +44 -48
- package/dist/modules/components/googleTagManager/index.js +16 -27
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +8 -8
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +19 -20
- package/dist/modules/components/iconButton/index.js +31 -29
- package/dist/modules/components/imageUpload/hasFileContent/index.js +46 -63
- package/dist/modules/components/imageUpload/index.js +65 -82
- package/dist/modules/components/imageUpload/noFileContent/index.js +35 -45
- package/dist/modules/components/input/index.js +92 -120
- package/dist/modules/components/mapView/index.js +27 -31
- package/dist/modules/components/mapView/mapView.client.js +49 -51
- package/dist/modules/components/maskedInput/index.js +101 -112
- package/dist/modules/components/modal/modalContainer/index.js +49 -42
- package/dist/modules/components/modal/modalContext.js +13 -11
- package/dist/modules/components/modal/modalFooter/index.js +10 -7
- package/dist/modules/components/modal/modalHeader/index.js +20 -27
- package/dist/modules/components/multiSelect/index.js +115 -154
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js +18 -21
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +13 -29
- package/dist/modules/components/multiSelect/multiSelectContent/index.js +11 -8
- package/dist/modules/components/multiSelect/multiSelectMark/index.js +19 -22
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +17 -13
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +35 -45
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +11 -8
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +13 -16
- package/dist/modules/components/pagination/chevronButton/index.js +17 -17
- package/dist/modules/components/pagination/currentButton/index.js +11 -7
- package/dist/modules/components/pagination/index.js +51 -83
- package/dist/modules/components/pagination/pageButton/index.js +12 -8
- package/dist/modules/components/pagination/paginationService.js +33 -48
- package/dist/modules/components/pagination/spread/index.js +10 -7
- package/dist/modules/components/phoneInput/index.js +103 -151
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js +12 -19
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +11 -8
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +23 -15
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +33 -43
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +25 -21
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +46 -62
- package/dist/modules/components/popover/index.js +37 -36
- package/dist/modules/components/radio/radioBox/index.js +24 -42
- package/dist/modules/components/radio/radioContext.js +20 -18
- package/dist/modules/components/radio/radioGroup/index.js +41 -64
- package/dist/modules/components/richText/blockButton/index.js +20 -23
- package/dist/modules/components/richText/element/index.js +72 -58
- package/dist/modules/components/richText/index.js +143 -135
- package/dist/modules/components/richText/insertImage/index.js +94 -105
- package/dist/modules/components/richText/insertVideo/index.js +85 -97
- package/dist/modules/components/richText/leaf/index.js +9 -6
- package/dist/modules/components/richText/markButton/index.js +19 -22
- package/dist/modules/components/richText/toolbar/index.js +10 -7
- package/dist/modules/components/searchPlaces.js +57 -66
- package/dist/modules/components/select/index.js +112 -144
- package/dist/modules/components/select/selectChevron/index.js +18 -21
- package/dist/modules/components/select/selectContainer/index.js +13 -29
- package/dist/modules/components/select/selectContent/index.js +11 -8
- package/dist/modules/components/select/selectOption/index.js +17 -13
- package/dist/modules/components/select/selectOptionsContainer/index.js +35 -45
- package/dist/modules/components/select/selectOverlay/index.js +11 -8
- package/dist/modules/components/select/selectSpinner/index.js +13 -9
- package/dist/modules/components/slider/index.js +34 -41
- package/dist/modules/components/switch/index.js +35 -62
- package/dist/modules/components/tab/tabButton/index.js +19 -29
- package/dist/modules/components/tab/tabContainer/index.js +22 -28
- package/dist/modules/components/tab/tabContext.js +12 -10
- package/dist/modules/components/table/tableBody/index.js +19 -14
- package/dist/modules/components/table/tableCaption/index.js +15 -8
- package/dist/modules/components/table/tableContainer/index.js +12 -8
- package/dist/modules/components/table/tableFooter/index.js +18 -11
- package/dist/modules/components/table/tableHeader/index.js +12 -11
- package/dist/modules/components/textarea/index.js +51 -69
- package/dist/modules/components/tooltip/index.js +34 -45
- package/dist/modules/hooks/useAutomation.js +35 -27
- package/dist/modules/hooks/useDrawer.js +17 -19
- package/dist/modules/hooks/useForm.js +6 -6
- package/dist/modules/hooks/useHydrated.js +7 -12
- package/dist/modules/hooks/useModal.js +17 -19
- package/dist/modules/hooks/useScopedParams.js +17 -17
- package/dist/modules/hooks/useScrollLock.js +19 -19
- package/dist/modules/hooks/useSearchAutomation.js +31 -14
- package/dist/modules/hooks/useSlider.js +13 -13
- package/dist/modules/hooks/useToast.js +8 -9
- package/dist/modules/index.js +72 -144
- package/dist/modules/providers/drawerProvider.js +35 -30
- package/dist/modules/providers/formProvider.js +11 -16
- package/dist/modules/providers/modalProvider.js +39 -33
- package/dist/modules/providers/placesProvider.js +16 -16
- package/dist/modules/providers/toastProvider.js +45 -51
- package/dist/modules/services/extractTextFromNode.js +6 -6
- package/dist/modules/services/fieldTemplate.js +22 -23
- package/dist/modules/services/iconRenderer.js +14 -7
- package/dist/modules/services/isBlockActive.js +12 -14
- package/dist/modules/services/isMarkActive.js +6 -6
- package/dist/modules/services/maskCurrencyValues.js +11 -12
- package/dist/modules/services/toHtml.js +6 -6
- package/dist/modules/services/toRichTextValue.js +7 -7
- package/dist/modules/services/toggleBlock.js +20 -19
- package/dist/modules/services/toggleMark.js +7 -7
- package/dist/modules/style.css +2 -1
- package/dist/modules/templates/badResponses.js +13 -13
- package/dist/modules/templates/richTextTemplates.js +17 -14
- package/dist/modules/templates/successResponses.js +9 -4
- package/dist/modules/utils/phoneInputUtilities.js +18 -28
- package/dist/modules/utils/richTextUtilities.js +88 -75
- package/dist/services/fieldTemplate.d.ts +1 -1
- package/dist/services/fieldTemplate.d.ts.map +1 -1
- package/dist/style.css +2 -1
- package/package.json +4 -4
- package/styles.d.ts +2 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/pagination/currentButton/index.tsx
|
|
4
|
+
function t({ currentPage: t }) {
|
|
5
|
+
return /* @__PURE__ */ e("button", {
|
|
6
|
+
className: "arkynPaginationCurrentButton",
|
|
7
|
+
disabled: !0,
|
|
8
|
+
children: t
|
|
9
|
+
});
|
|
5
10
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as CurrentButton };
|
|
@@ -1,84 +1,52 @@
|
|
|
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
|
-
|
|
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
|
-
] });
|
|
1
|
+
import { ChevronButton as e } from "./chevronButton/index.js";
|
|
2
|
+
import { CurrentButton as t } from "./currentButton/index.js";
|
|
3
|
+
import { PageButton as n } from "./pageButton/index.js";
|
|
4
|
+
import { PaginationService as r } from "./paginationService.js";
|
|
5
|
+
import { Spread as i } from "./spread/index.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/pagination/index.tsx
|
|
9
|
+
function c(c) {
|
|
10
|
+
let { totalCountRegisters: l, siblingsCount: u, currentPage: d, registerPerPage: f, onChange: p, ...m } = c, { currentPage: h, siblingsCount: g, previousPages: _, nextPages: v, lastPage: y, handlePageChange: b, handleMinusChange: x, handlePlusChange: S } = new r({
|
|
11
|
+
totalCountRegisters: l,
|
|
12
|
+
currentPage: d,
|
|
13
|
+
registerPerPage: f,
|
|
14
|
+
siblingsCount: u,
|
|
15
|
+
onChange: p
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ s("div", {
|
|
18
|
+
className: "arkynPagination",
|
|
19
|
+
...m,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ o(e, {
|
|
22
|
+
orientation: "left",
|
|
23
|
+
handlePageChange: x,
|
|
24
|
+
disabled: h <= 1
|
|
25
|
+
}),
|
|
26
|
+
h > 1 + g && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(n, {
|
|
27
|
+
page: 1,
|
|
28
|
+
handlePageChange: () => b(1)
|
|
29
|
+
}), h > 2 + g && /* @__PURE__ */ o(i, {})] }),
|
|
30
|
+
_.map((e, t) => /* @__PURE__ */ o(n, {
|
|
31
|
+
page: e,
|
|
32
|
+
handlePageChange: x
|
|
33
|
+
}, t)),
|
|
34
|
+
/* @__PURE__ */ o(t, { currentPage: h }),
|
|
35
|
+
v.map((e, t) => /* @__PURE__ */ o(n, {
|
|
36
|
+
page: e,
|
|
37
|
+
handlePageChange: S
|
|
38
|
+
}, t)),
|
|
39
|
+
h + g < y && /* @__PURE__ */ s(a, { children: [h + 1 + g < y && /* @__PURE__ */ o(i, {}), /* @__PURE__ */ o(n, {
|
|
40
|
+
page: y,
|
|
41
|
+
handlePageChange: () => b(y)
|
|
42
|
+
})] }),
|
|
43
|
+
/* @__PURE__ */ o(e, {
|
|
44
|
+
orientation: "right",
|
|
45
|
+
handlePageChange: S,
|
|
46
|
+
disabled: h >= y
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
81
50
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { c as Pagination };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/pagination/pageButton/index.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
let { page: n, handlePageChange: r } = t;
|
|
6
|
+
return /* @__PURE__ */ e("button", {
|
|
7
|
+
className: "arkynPaginationPageButton",
|
|
8
|
+
onClick: r,
|
|
9
|
+
children: n
|
|
10
|
+
});
|
|
6
11
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as PageButton };
|
|
@@ -1,49 +1,34 @@
|
|
|
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
|
-
|
|
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
|
|
1
|
+
//#region src/components/pagination/paginationService.ts
|
|
2
|
+
var e = class {
|
|
3
|
+
currentPage;
|
|
4
|
+
totalCountRegisters;
|
|
5
|
+
registerPerPage;
|
|
6
|
+
siblingsCount;
|
|
7
|
+
lastPage;
|
|
8
|
+
onChange;
|
|
9
|
+
previousPages;
|
|
10
|
+
nextPages;
|
|
11
|
+
generatePagesArray(e, t) {
|
|
12
|
+
return [...Array(t - e)].map((t, n) => e + n + 1).filter((e) => e > 0);
|
|
13
|
+
}
|
|
14
|
+
generatePreviousPages(e, t) {
|
|
15
|
+
return e > 1 ? this.generatePagesArray(e - 1 - t, e - 1) : [];
|
|
16
|
+
}
|
|
17
|
+
generateNextPages(e, t) {
|
|
18
|
+
return e < this.lastPage ? this.generatePagesArray(e, Math.min(e + t, this.lastPage)) : [];
|
|
19
|
+
}
|
|
20
|
+
constructor(e) {
|
|
21
|
+
this.totalCountRegisters = e.totalCountRegisters, this.currentPage = e.currentPage, this.registerPerPage = e?.registerPerPage || 20, this.siblingsCount = e?.siblingsCount || 2, this.lastPage = Math.ceil(this.totalCountRegisters / this.registerPerPage), this.onChange = e?.onChange, this.previousPages = this.generatePreviousPages(this.currentPage, this.siblingsCount), this.nextPages = this.generateNextPages(this.currentPage, this.siblingsCount);
|
|
22
|
+
}
|
|
23
|
+
handlePageChange = (e) => {
|
|
24
|
+
e < 1 || e > this.lastPage || this.onChange && (this.currentPage = e, this.onChange(this.currentPage));
|
|
25
|
+
};
|
|
26
|
+
handlePlusChange = () => {
|
|
27
|
+
this.currentPage >= this.lastPage || this.onChange && (this.currentPage += 1, this.onChange(this.currentPage));
|
|
28
|
+
};
|
|
29
|
+
handleMinusChange = () => {
|
|
30
|
+
this.currentPage <= 1 || this.onChange && (--this.currentPage, this.onChange(this.currentPage));
|
|
31
|
+
};
|
|
49
32
|
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { e as PaginationService };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Ellipsis as t } from "lucide-react";
|
|
4
|
+
//#region src/components/pagination/spread/index.tsx
|
|
4
5
|
function n() {
|
|
5
|
-
|
|
6
|
+
return /* @__PURE__ */ e("p", {
|
|
7
|
+
className: "arkynPaginationSpread",
|
|
8
|
+
children: /* @__PURE__ */ e(t, {})
|
|
9
|
+
});
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as Spread };
|
|
@@ -1,152 +1,104 @@
|
|
|
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
|
-
|
|
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
|
-
);
|
|
1
|
+
import { useForm as e } from "../../hooks/useForm.js";
|
|
2
|
+
import { FieldTemplate as t } from "../../services/fieldTemplate.js";
|
|
3
|
+
import { PhoneInputContainer as n } from "./phoneInputContainer/index.js";
|
|
4
|
+
import { PhoneInputCountriesOverlay as ee } from "./phoneInputCountriesOverlay/index.js";
|
|
5
|
+
import { PhoneInputCountryOption as te } from "./phoneInputCountryOption/index.js";
|
|
6
|
+
import { PhoneInputCountryOptionsContainer as ne } from "./phoneInputCountryOptionsContainer/index.js";
|
|
7
|
+
import { PhoneInputCountrySelector as r } from "./phoneInputCountrySelector/index.js";
|
|
8
|
+
import { PhoneInputMask as i } from "./phoneInputMask/index.js";
|
|
9
|
+
import { useId as a, useRef as o, useState as s } from "react";
|
|
10
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
11
|
+
import { findCountryMask as u, formatToPhone as d, removeNonNumeric as f } from "@arkyn/shared";
|
|
12
|
+
import { countries as p } from "@arkyn/templates";
|
|
13
|
+
//#region src/components/phoneInput/index.tsx
|
|
14
|
+
function m(m) {
|
|
15
|
+
let { defaultCountryIso: re, value: h, label: ie, className: g = "", disabled: _ = !1, errorMessage: v, isLoading: y = !1, readOnly: b = !1, size: x = "md", defaultValue: S = "", variant: ae = "solid", showAsterisk: C, name: w, onChange: T, searchCountryPlaceholder: E = "Pesquisar país", notFoundCountryText: D = "Nenhum país encontrado", id: O, unShowFieldTemplate: k = !1, orientation: A = "vertical" } = m, j = p.find((e) => e.iso === "BR"), M = S ? d(S) : "", N = S ? u(S)[1] : j, [P, F] = s(!1), [I, L] = s(""), [R, z] = s(!1), [B, V] = s(M), H = h === void 0 ? B : h, [U, W] = s(N), { fieldErrors: G } = e(), K = o(null), q = O || a(), J = v || G?.[w], Y = !!J, X = _ || y, Z = o(null);
|
|
16
|
+
function oe() {
|
|
17
|
+
X || P || R || (F(!0), Z.current && Z.current.focus());
|
|
18
|
+
}
|
|
19
|
+
function se() {
|
|
20
|
+
z(!0), F(!0);
|
|
21
|
+
}
|
|
22
|
+
function ce() {
|
|
23
|
+
z(!1), F(!1);
|
|
24
|
+
}
|
|
25
|
+
function le() {
|
|
26
|
+
F(!0);
|
|
27
|
+
}
|
|
28
|
+
function ue() {
|
|
29
|
+
F(!1);
|
|
30
|
+
}
|
|
31
|
+
function Q(e) {
|
|
32
|
+
return e.name.toLowerCase().includes(I.toLowerCase());
|
|
33
|
+
}
|
|
34
|
+
function $(e) {
|
|
35
|
+
let t = U.code;
|
|
36
|
+
return t += f(e || H), t;
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ c(t, {
|
|
39
|
+
name: w,
|
|
40
|
+
label: ie,
|
|
41
|
+
showAsterisk: C,
|
|
42
|
+
className: g,
|
|
43
|
+
errorMessage: J,
|
|
44
|
+
unShowFieldTemplate: k,
|
|
45
|
+
orientation: A,
|
|
46
|
+
children: /* @__PURE__ */ l(n, {
|
|
47
|
+
disabled: X,
|
|
48
|
+
isError: Y,
|
|
49
|
+
isLoading: y,
|
|
50
|
+
isFocused: P,
|
|
51
|
+
readOnly: b,
|
|
52
|
+
size: x,
|
|
53
|
+
variant: ae,
|
|
54
|
+
onFocus: oe,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ c(r, {
|
|
57
|
+
currentCountry: U,
|
|
58
|
+
onClick: se,
|
|
59
|
+
size: x
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ l(ne, {
|
|
62
|
+
isOpen: X || b ? !1 : R,
|
|
63
|
+
search: I,
|
|
64
|
+
placeholder: E,
|
|
65
|
+
onSearch: L,
|
|
66
|
+
children: [p.filter((e) => Q(e)).map((e) => /* @__PURE__ */ c(te, {
|
|
67
|
+
country: e,
|
|
68
|
+
handleChangeValue: () => {
|
|
69
|
+
W(e), z(!1), V("");
|
|
70
|
+
},
|
|
71
|
+
isActive: e.iso === U.iso,
|
|
72
|
+
size: x
|
|
73
|
+
}, e.iso)), p.filter((e) => Q(e)).length === 0 && /* @__PURE__ */ c("p", { children: D })]
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ c(ee, {
|
|
76
|
+
isOpen: X || b ? !1 : R,
|
|
77
|
+
onClick: ce
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ c(i, {
|
|
80
|
+
id: q,
|
|
81
|
+
ref: Z,
|
|
82
|
+
readonly: b,
|
|
83
|
+
currentCountry: U,
|
|
84
|
+
value: H,
|
|
85
|
+
disabled: X,
|
|
86
|
+
onBlur: ue,
|
|
87
|
+
onFocus: le,
|
|
88
|
+
size: x,
|
|
89
|
+
onChange: (e) => {
|
|
90
|
+
V(e), T && T($(e));
|
|
91
|
+
}
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ c("input", {
|
|
94
|
+
ref: K,
|
|
95
|
+
type: "hidden",
|
|
96
|
+
name: w,
|
|
97
|
+
value: $()
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
149
102
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
};
|
|
103
|
+
//#endregion
|
|
104
|
+
export { m as PhoneInput };
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 });
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
let { children: n, onFocus: r, disabled: i, isError: a, isLoading: o, isFocused: s, className: c = "", readOnly: l, variant: u, size: d } = t;
|
|
6
|
+
return /* @__PURE__ */ e("section", {
|
|
7
|
+
className: `arkynPhoneInputContainer ${u} ${d} ${i || l || o ? "opacity" : ""} ${a ? "errored" : ""} ${s ? "focused" : ""} ${c}`.trim(),
|
|
8
|
+
onClick: r,
|
|
9
|
+
children: n
|
|
10
|
+
});
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as PhoneInputContainer };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { Fragment as e, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
4
|
+
function n(n) {
|
|
5
|
+
let { isOpen: r, onClick: i } = n;
|
|
6
|
+
return r ? /* @__PURE__ */ t("aside", {
|
|
7
|
+
className: "arkynPhoneInputCountriesOverlay",
|
|
8
|
+
onClick: i
|
|
9
|
+
}) : /* @__PURE__ */ t(e, {});
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as PhoneInputCountriesOverlay };
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { Check as n } from "lucide-react";
|
|
4
|
+
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { country: i, isActive: a, handleChangeValue: o, size: s } = r;
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
onClick: () => o(i),
|
|
9
|
+
className: `arkynPhoneInputCountryOption ${s} ${a ? "active" : ""}`,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ e("img", {
|
|
12
|
+
src: i.flag,
|
|
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
|
+
});
|
|
13
22
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { r as PhoneInputCountryOption };
|