@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,44 +1,34 @@
|
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
id: "input-search",
|
|
33
|
-
placeholder: h,
|
|
34
|
-
onChange: f
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
p
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
) : /* @__PURE__ */ s(d, {});
|
|
1
|
+
import { useScrollLock as e } from "../../../hooks/useScrollLock.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
6
|
+
function s(s) {
|
|
7
|
+
let { children: c, isOpen: l, onSearch: u, search: d, placeholder: f } = s, p = n(null), [m, h] = r("bottom");
|
|
8
|
+
function g(e) {
|
|
9
|
+
u(e.target.value);
|
|
10
|
+
}
|
|
11
|
+
return e(l), t(() => {
|
|
12
|
+
l && (() => {
|
|
13
|
+
if (!p.current) return;
|
|
14
|
+
let e = p.current.parentElement;
|
|
15
|
+
if (!e) return;
|
|
16
|
+
let t = e.getBoundingClientRect();
|
|
17
|
+
window.innerHeight - t.bottom < 300 && t.top > 300 ? h("top") : h("bottom");
|
|
18
|
+
})();
|
|
19
|
+
}, [l]), l ? /* @__PURE__ */ o("div", {
|
|
20
|
+
className: `arkynPhoneInputCountryOptionsContainer ${m}`,
|
|
21
|
+
ref: p,
|
|
22
|
+
children: [/* @__PURE__ */ a("input", {
|
|
23
|
+
type: "search",
|
|
24
|
+
name: "search-select",
|
|
25
|
+
className: "arkynPhoneInputCountryOptionsContainerSearchSelect",
|
|
26
|
+
value: d,
|
|
27
|
+
id: "input-search",
|
|
28
|
+
placeholder: f,
|
|
29
|
+
onChange: g
|
|
30
|
+
}), c]
|
|
31
|
+
}) : /* @__PURE__ */ a(i, {});
|
|
41
32
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as PhoneInputCountryOptionsContainer };
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { Divider as e } from "../../divider/index.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronDown as r } from "lucide-react";
|
|
5
|
+
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
6
|
+
function i(i) {
|
|
7
|
+
let { currentCountry: a, onClick: o } = i;
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: "phoneInputSelectCountry",
|
|
10
|
+
onClick: o,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ t("img", {
|
|
13
|
+
className: "flag",
|
|
14
|
+
src: a.flag,
|
|
15
|
+
alt: a.name
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ t(r, {
|
|
18
|
+
className: "chevronDown",
|
|
19
|
+
strokeWidth: 2.5
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ t(e, { orientation: "vertical" })
|
|
22
|
+
]
|
|
23
|
+
});
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as PhoneInputCountrySelector };
|
|
@@ -1,62 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { forwardRef as
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
className: f,
|
|
48
|
-
component: P,
|
|
49
|
-
onFocus: u,
|
|
50
|
-
onBlur: l,
|
|
51
|
-
disabled: m,
|
|
52
|
-
mask: i,
|
|
53
|
-
showMask: !0,
|
|
54
|
-
replacement: { _: /\d/ },
|
|
55
|
-
ref: n
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
export {
|
|
61
|
-
A as PhoneInputMask
|
|
62
|
-
};
|
|
1
|
+
import { MAX_LENGTH as e, TYPES as t, applyMask as n, clear as r, getMask as i } from "../../../utils/phoneInputUtilities.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { forwardRef as a, useEffect as o, useState as s } from "react";
|
|
4
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
+
import { InputMask as l } from "@react-input/mask";
|
|
6
|
+
//#region src/components/phoneInput/phoneInputMask/index.tsx
|
|
7
|
+
var u = a((e, t) => /* @__PURE__ */ c("input", {
|
|
8
|
+
ref: t,
|
|
9
|
+
...e
|
|
10
|
+
})), d = a((a, d) => {
|
|
11
|
+
let { onFocus: f, readonly: p, onBlur: m, size: h, onChange: g, value: _, currentCountry: v, disabled: y, id: b } = a, [x, S] = s(!1), C = typeof v.mask == "string" ? v.mask : v.mask[0];
|
|
12
|
+
o(() => {
|
|
13
|
+
x ? g(C) : S(!0);
|
|
14
|
+
}, [v]);
|
|
15
|
+
let w = `phoneInputMask ${h}`;
|
|
16
|
+
function T(a) {
|
|
17
|
+
let o = r(a.target.value), s = i(o);
|
|
18
|
+
o.length > e || (o = n(o, t[s]), a.target.value = o, g(o));
|
|
19
|
+
}
|
|
20
|
+
return v.code === "+55" ? /* @__PURE__ */ c("input", {
|
|
21
|
+
id: b,
|
|
22
|
+
value: _,
|
|
23
|
+
onChange: T,
|
|
24
|
+
className: w,
|
|
25
|
+
onFocus: f,
|
|
26
|
+
onBlur: m,
|
|
27
|
+
disabled: y,
|
|
28
|
+
ref: d
|
|
29
|
+
}) : /* @__PURE__ */ c(l, {
|
|
30
|
+
id: b,
|
|
31
|
+
value: _,
|
|
32
|
+
readOnly: p,
|
|
33
|
+
onChange: (e) => g(e.target.value),
|
|
34
|
+
className: w,
|
|
35
|
+
component: u,
|
|
36
|
+
onFocus: f,
|
|
37
|
+
onBlur: m,
|
|
38
|
+
disabled: y,
|
|
39
|
+
mask: C,
|
|
40
|
+
showMask: !0,
|
|
41
|
+
replacement: { _: /\d/ },
|
|
42
|
+
ref: d
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
export { d as PhoneInputMask };
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useState as
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import { useScrollLock as e } from "../../hooks/useScrollLock.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { motion as i } from "framer-motion";
|
|
6
|
+
//#region src/components/popover/index.tsx
|
|
7
|
+
function a(a) {
|
|
8
|
+
let { children: o, button: s, closeOnClick: c, className: l = "", orientation: u = "bottomLeft" } = a, [d, f] = t(!1), p = `arkynPopover ${u} ${d ? "visibleTrue" : "visibleFalse"} ${l}`;
|
|
9
|
+
function m() {
|
|
10
|
+
d || f(!0);
|
|
11
|
+
}
|
|
12
|
+
return e(d), /* @__PURE__ */ r("div", {
|
|
13
|
+
className: p,
|
|
14
|
+
onClick: m,
|
|
15
|
+
children: [
|
|
16
|
+
s,
|
|
17
|
+
/* @__PURE__ */ n(i.div, {
|
|
18
|
+
style: { visibility: d ? "visible" : "hidden" },
|
|
19
|
+
transition: {
|
|
20
|
+
ease: "easeOut",
|
|
21
|
+
duration: 0
|
|
22
|
+
},
|
|
23
|
+
initial: { opacity: 0 },
|
|
24
|
+
animate: { opacity: +!!d },
|
|
25
|
+
exit: { opacity: 0 },
|
|
26
|
+
onClick: () => c && f(!1),
|
|
27
|
+
className: "arkynPopoverContent",
|
|
28
|
+
children: o
|
|
29
|
+
}),
|
|
30
|
+
d && /* @__PURE__ */ n("div", {
|
|
31
|
+
onClick: () => f(!1),
|
|
32
|
+
className: "arkynPopoverOverlay"
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
34
36
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { a as Popover };
|
|
@@ -1,43 +1,25 @@
|
|
|
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
|
-
function x(s) {
|
|
25
|
-
a && a(s), l(e);
|
|
26
|
-
}
|
|
27
|
-
return /* @__PURE__ */ z("label", { className: F.trim(), children: [
|
|
28
|
-
/* @__PURE__ */ $(
|
|
29
|
-
"button",
|
|
30
|
-
{
|
|
31
|
-
type: "button",
|
|
32
|
-
disabled: c,
|
|
33
|
-
onClick: f,
|
|
34
|
-
onFocus: x,
|
|
35
|
-
...u
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
d
|
|
39
|
-
] });
|
|
1
|
+
import { useRadioGroup as e } from "../radioContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/radio/radioBox/index.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { value: i, size: a, disabled: o, children: s, className: c = "", onClick: l, onFocus: u, ...d } = r, { handleChange: f, size: p, value: m, isError: h, disabled: g } = e(), _ = m === i, v = a || p, y = o || g, b = `arkynRadioBox ${v} ${_ ? "checkedTrue" : "checkedFalse"} ${h ? "errorTrue" : "errorFalse"} ${y ? "disabledTrue" : "disabledFalse"} ${c}`;
|
|
7
|
+
function x(e) {
|
|
8
|
+
l && l(e), f(i);
|
|
9
|
+
}
|
|
10
|
+
function S(e) {
|
|
11
|
+
u && u(e), f(i);
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ n("label", {
|
|
14
|
+
className: b.trim(),
|
|
15
|
+
children: [/* @__PURE__ */ t("button", {
|
|
16
|
+
type: "button",
|
|
17
|
+
disabled: y,
|
|
18
|
+
onClick: x,
|
|
19
|
+
onFocus: S,
|
|
20
|
+
...d
|
|
21
|
+
}), s]
|
|
22
|
+
});
|
|
40
23
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as RadioBox };
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/radio/radioContext.tsx
|
|
4
|
+
var r = e({});
|
|
5
|
+
function i(e) {
|
|
6
|
+
let { children: t, size: i, isError: a, handleChange: o, value: s, disabled: c } = e;
|
|
7
|
+
return /* @__PURE__ */ n(r.Provider, {
|
|
8
|
+
value: {
|
|
9
|
+
handleChange: o,
|
|
10
|
+
value: s,
|
|
11
|
+
size: i,
|
|
12
|
+
isError: a,
|
|
13
|
+
disabled: c
|
|
14
|
+
},
|
|
15
|
+
children: t
|
|
16
|
+
});
|
|
13
17
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
18
|
+
function a() {
|
|
19
|
+
return t(r);
|
|
16
20
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
m as useRadioGroup
|
|
20
|
-
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as RadioProvider, a as useRadioGroup };
|
|
@@ -1,65 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
isError: b,
|
|
41
|
-
size: t,
|
|
42
|
-
value: s || i,
|
|
43
|
-
handleChange: x,
|
|
44
|
-
disabled: h,
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ r(
|
|
47
|
-
"input",
|
|
48
|
-
{
|
|
49
|
-
style: { display: "none" },
|
|
50
|
-
type: "text",
|
|
51
|
-
readOnly: !0,
|
|
52
|
-
name: e,
|
|
53
|
-
value: s || i
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
/* @__PURE__ */ r("div", { className: w.trim(), ...y })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
);
|
|
1
|
+
import { useForm as e } from "../../../hooks/useForm.js";
|
|
2
|
+
import { FieldTemplate as t } from "../../../services/fieldTemplate.js";
|
|
3
|
+
import { RadioProvider as n } from "../radioContext.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useState as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/radio/radioGroup/index.tsx
|
|
8
|
+
function o(o) {
|
|
9
|
+
let { defaultValue: s = "", name: c, label: l, showAsterisk: u, errorMessage: d, value: f, onChange: p, size: m = "md", className: h = "", disabled: g = !1, unShowFieldTemplate: _ = !1, orientation: v = "vertical", ...y } = o, [b, x] = r(s), { fieldErrors: S } = e();
|
|
10
|
+
function C(e) {
|
|
11
|
+
x(e), p && p(e);
|
|
12
|
+
}
|
|
13
|
+
let w = d || S?.[c], T = !!w, E = `arkynRadioGroup ${m}`;
|
|
14
|
+
return /* @__PURE__ */ i(t, {
|
|
15
|
+
name: c,
|
|
16
|
+
label: l,
|
|
17
|
+
showAsterisk: u,
|
|
18
|
+
className: h,
|
|
19
|
+
errorMessage: w,
|
|
20
|
+
unShowFieldTemplate: _,
|
|
21
|
+
orientation: v,
|
|
22
|
+
children: /* @__PURE__ */ a(n, {
|
|
23
|
+
isError: T,
|
|
24
|
+
size: m,
|
|
25
|
+
value: f || b,
|
|
26
|
+
handleChange: C,
|
|
27
|
+
disabled: g,
|
|
28
|
+
children: [/* @__PURE__ */ i("input", {
|
|
29
|
+
style: { display: "none" },
|
|
30
|
+
type: "text",
|
|
31
|
+
readOnly: !0,
|
|
32
|
+
name: c,
|
|
33
|
+
value: f || b
|
|
34
|
+
}), /* @__PURE__ */ i("div", {
|
|
35
|
+
className: E.trim(),
|
|
36
|
+
...y
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
});
|
|
62
40
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { o as RadioGroup };
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
);
|
|
1
|
+
import { isBlockActive as e } from "../../../services/isBlockActive.js";
|
|
2
|
+
import { textAlignTypes as t } from "../../../templates/richTextTemplates.js";
|
|
3
|
+
import { toggleBlock as n } from "../../../services/toggleBlock.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import { useSlate as i } from "slate-react";
|
|
7
|
+
//#region src/components/richText/blockButton/index.tsx
|
|
8
|
+
function a({ format: a, icon: o }) {
|
|
9
|
+
let s = i(), c = e(s, a, t.includes(a) ? "align" : "type") ? "activeTrue" : "activeFalse";
|
|
10
|
+
function l(e) {
|
|
11
|
+
e.preventDefault(), n(s, a);
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ r("button", {
|
|
14
|
+
type: "button",
|
|
15
|
+
className: "arkynRichTextBlockButton " + c,
|
|
16
|
+
onMouseDown: l,
|
|
17
|
+
children: /* @__PURE__ */ r(o, {})
|
|
18
|
+
});
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as BlockButton };
|