@arkyn/components 3.0.1-beta.154 → 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/index.js +4694 -75
- package/dist/modules/components/alert/alertContainer/index.js +22 -0
- package/dist/modules/components/alert/alertContent/index.js +9 -0
- package/dist/modules/components/alert/alertDescription/index.js +9 -0
- package/dist/modules/components/alert/alertIcon/index.js +20 -0
- package/dist/modules/components/alert/alertTitle/index.js +9 -0
- package/dist/modules/components/audioPlayer/index.js +76 -0
- package/dist/modules/components/audioUpload/hasFileContent/index.js +63 -0
- package/dist/modules/components/audioUpload/index.js +80 -0
- package/dist/modules/components/audioUpload/noFileContent/index.js +46 -0
- package/dist/modules/components/badge/index.js +23 -0
- package/dist/modules/components/button/index.js +33 -0
- package/dist/modules/components/calendar/_calendarProvider.js +65 -0
- package/dist/modules/components/calendar/_viewService.js +141 -0
- package/dist/modules/components/calendar/calendarContainer/index.js +8 -0
- package/dist/modules/components/calendar/calendarHeader/index.js +73 -0
- package/dist/modules/components/calendar/calendarTableBody/index.js +11 -0
- package/dist/modules/components/calendar/calendarTableContainer/index.js +8 -0
- package/dist/modules/components/calendar/calendarTableHeader/index.js +11 -0
- package/dist/modules/components/calendar/calendarTableTd/index.js +24 -0
- package/dist/modules/components/calendar/index.js +50 -0
- package/dist/modules/components/cardTab/cardTabButton/index.js +30 -0
- package/dist/modules/components/cardTab/cardTabContainer/index.js +29 -0
- package/dist/modules/components/cardTab/cardTabContext.js +13 -0
- package/dist/modules/components/checkbox/index.js +65 -0
- package/dist/modules/components/clientOnly.js +9 -0
- package/dist/modules/components/currencyInput/index.js +140 -0
- package/dist/modules/components/divider/index.js +13 -0
- package/dist/modules/components/drawer/drawerContainer/index.js +44 -0
- package/dist/modules/components/drawer/drawerContext.js +13 -0
- package/dist/modules/components/drawer/drawerHeader/index.js +28 -0
- package/dist/modules/components/facebookPixel/facebookPixel.client.js +19 -0
- package/dist/modules/components/facebookPixel/index.js +9 -0
- package/dist/modules/components/facebookPixel/pixel.js +53 -0
- package/dist/modules/components/fieldError/index.js +9 -0
- package/dist/modules/components/fieldLabel/index.js +13 -0
- package/dist/modules/components/fieldWrapper/index.js +14 -0
- package/dist/modules/components/fileUpload/hasFileContent/index.js +68 -0
- package/dist/modules/components/fileUpload/index.js +73 -0
- package/dist/modules/components/fileUpload/noFileContent/index.js +46 -0
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +48 -0
- package/dist/modules/components/fullCalendar/_viewService.js +106 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +8 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +79 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +34 -0
- package/dist/modules/components/fullCalendar/dayCalendar/index.js +11 -0
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +8 -0
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +72 -0
- package/dist/modules/components/fullCalendar/index.js +31 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +13 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +37 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +11 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +10 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +11 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +37 -0
- package/dist/modules/components/fullCalendar/weekCalendar/index.js +13 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +79 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +21 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +10 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +20 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +40 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +8 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.js +18 -0
- package/dist/modules/components/googleAnalytics/index.js +10 -0
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +16 -0
- package/dist/modules/components/googleTagManager/googleTagManager.client.js +8 -0
- package/dist/modules/components/googleTagManager/googleTagManager.js +49 -0
- package/dist/modules/components/googleTagManager/index.js +28 -0
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +9 -0
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +24 -0
- package/dist/modules/components/iconButton/index.js +30 -0
- package/dist/modules/components/imageUpload/hasFileContent/index.js +64 -0
- package/dist/modules/components/imageUpload/index.js +83 -0
- package/dist/modules/components/imageUpload/noFileContent/index.js +46 -0
- package/dist/modules/components/input/index.js +121 -0
- package/dist/modules/components/mapView/index.js +33 -0
- package/dist/modules/components/mapView/mapView.client.js +52 -0
- package/dist/modules/components/maskedInput/index.js +113 -0
- package/dist/modules/components/modal/modalContainer/index.js +43 -0
- package/dist/modules/components/modal/modalContext.js +13 -0
- package/dist/modules/components/modal/modalFooter/index.js +9 -0
- package/dist/modules/components/modal/modalHeader/index.js +28 -0
- package/dist/modules/components/multiSelect/index.js +155 -0
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js +22 -0
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +30 -0
- package/dist/modules/components/multiSelect/multiSelectContent/index.js +9 -0
- package/dist/modules/components/multiSelect/multiSelectMark/index.js +23 -0
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +14 -0
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +46 -0
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +9 -0
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +17 -0
- package/dist/modules/components/pagination/chevronButton/index.js +18 -0
- package/dist/modules/components/pagination/currentButton/index.js +8 -0
- package/dist/modules/components/pagination/index.js +84 -0
- package/dist/modules/components/pagination/pageButton/index.js +9 -0
- package/dist/modules/components/pagination/paginationService.js +49 -0
- package/dist/modules/components/pagination/spread/index.js +9 -0
- package/dist/modules/components/phoneInput/index.js +152 -0
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js +20 -0
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +9 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +16 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +44 -0
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +22 -0
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +62 -0
- package/dist/modules/components/popover/index.js +37 -0
- package/dist/modules/components/radio/radioBox/index.js +43 -0
- package/dist/modules/components/radio/radioContext.js +20 -0
- package/dist/modules/components/radio/radioGroup/index.js +65 -0
- package/dist/modules/components/richText/blockButton/index.js +24 -0
- package/dist/modules/components/richText/element/index.js +59 -0
- package/dist/modules/components/richText/index.js +136 -0
- package/dist/modules/components/richText/insertImage/index.js +106 -0
- package/dist/modules/components/richText/insertVideo/index.js +98 -0
- package/dist/modules/components/richText/leaf/index.js +7 -0
- package/dist/modules/components/richText/markButton/index.js +23 -0
- package/dist/modules/components/richText/toolbar/index.js +8 -0
- package/dist/modules/components/searchPlaces.js +67 -0
- package/dist/modules/components/select/index.js +145 -0
- package/dist/modules/components/select/selectChevron/index.js +22 -0
- package/dist/modules/components/select/selectContainer/index.js +30 -0
- package/dist/modules/components/select/selectContent/index.js +9 -0
- package/dist/modules/components/select/selectOption/index.js +14 -0
- package/dist/modules/components/select/selectOptionsContainer/index.js +46 -0
- package/dist/modules/components/select/selectOverlay/index.js +9 -0
- package/dist/modules/components/select/selectSpinner/index.js +10 -0
- package/dist/modules/components/slider/index.js +42 -0
- package/dist/modules/components/switch/index.js +63 -0
- package/dist/modules/components/tab/tabButton/index.js +30 -0
- package/dist/modules/components/tab/tabContainer/index.js +29 -0
- package/dist/modules/components/tab/tabContext.js +13 -0
- package/dist/modules/components/table/tableBody/index.js +15 -0
- package/dist/modules/components/table/tableCaption/index.js +9 -0
- package/dist/modules/components/table/tableContainer/index.js +9 -0
- package/dist/modules/components/table/tableFooter/index.js +12 -0
- package/dist/modules/components/table/tableHeader/index.js +12 -0
- package/dist/modules/components/textarea/index.js +70 -0
- package/dist/modules/components/tooltip/index.js +46 -0
- package/dist/modules/hooks/useAutomation.js +28 -0
- package/dist/modules/hooks/useDrawer.js +20 -0
- package/dist/modules/hooks/useForm.js +8 -0
- package/dist/modules/hooks/useHydrated.js +15 -0
- package/dist/modules/hooks/useModal.js +20 -0
- package/dist/modules/hooks/useScopedParams.js +18 -0
- package/dist/modules/hooks/useScrollLock.js +21 -0
- package/dist/modules/hooks/useSearchAutomation.js +15 -0
- package/dist/modules/hooks/useSlider.js +14 -0
- package/dist/modules/hooks/useToast.js +11 -0
- package/dist/modules/index.js +144 -0
- package/dist/modules/providers/drawerProvider.js +31 -0
- package/dist/modules/providers/formProvider.js +18 -0
- package/dist/modules/providers/modalProvider.js +34 -0
- package/dist/modules/providers/placesProvider.js +18 -0
- package/dist/modules/providers/toastProvider.js +52 -0
- package/dist/modules/services/extractTextFromNode.js +7 -0
- package/dist/modules/services/fieldTemplate.js +24 -0
- package/dist/modules/services/iconRenderer.js +8 -0
- package/dist/modules/services/isBlockActive.js +15 -0
- package/dist/modules/services/isMarkActive.js +8 -0
- package/dist/modules/services/maskCurrencyValues.js +14 -0
- package/dist/modules/services/toHtml.js +7 -0
- package/dist/modules/services/toRichTextValue.js +9 -0
- package/dist/modules/services/toggleBlock.js +20 -0
- package/dist/modules/services/toggleMark.js +8 -0
- package/dist/modules/style.css +1 -0
- package/dist/modules/templates/badResponses.js +14 -0
- package/dist/modules/templates/richTextTemplates.js +14 -0
- package/dist/modules/templates/successResponses.js +4 -0
- package/dist/modules/utils/phoneInputUtilities.js +32 -0
- package/dist/modules/utils/richTextUtilities.js +77 -0
- package/package.json +208 -208
- package/dist/components/alert/alertContainer/index.js +0 -71
- package/dist/components/alert/alertContent/index.js +0 -26
- package/dist/components/alert/alertDescription/index.js +0 -25
- package/dist/components/alert/alertIcon/index.js +0 -43
- package/dist/components/alert/alertTitle/index.js +0 -27
- package/dist/components/audioPlayer/index.js +0 -112
- package/dist/components/audioUpload/hasFileContent/index.js +0 -26
- package/dist/components/audioUpload/index.js +0 -95
- package/dist/components/audioUpload/noFileContent/index.js +0 -29
- package/dist/components/badge/index.js +0 -41
- package/dist/components/button/index.js +0 -51
- package/dist/components/calendar/_calendarProvider.js +0 -58
- package/dist/components/calendar/_viewService.js +0 -179
- package/dist/components/calendar/calendarContainer/index.js +0 -6
- package/dist/components/calendar/calendarHeader/index.js +0 -13
- package/dist/components/calendar/calendarTableBody/index.js +0 -9
- package/dist/components/calendar/calendarTableContainer/index.js +0 -6
- package/dist/components/calendar/calendarTableHeader/index.js +0 -9
- package/dist/components/calendar/calendarTableTd/index.js +0 -15
- package/dist/components/calendar/index.js +0 -54
- package/dist/components/cardTab/cardTabButton/index.js +0 -40
- package/dist/components/cardTab/cardTabContainer/index.js +0 -42
- package/dist/components/cardTab/cardTabContext.js +0 -10
- package/dist/components/checkbox/index.js +0 -71
- package/dist/components/clientOnly.js +0 -31
- package/dist/components/currencyInput/index.js +0 -126
- package/dist/components/divider/index.js +0 -28
- package/dist/components/drawer/drawerContainer/index.js +0 -38
- package/dist/components/drawer/drawerContext.js +0 -10
- package/dist/components/drawer/drawerHeader/index.js +0 -33
- package/dist/components/facebookPixel/facebookPixel.client.js +0 -23
- package/dist/components/facebookPixel/index.js +0 -45
- package/dist/components/facebookPixel/pixel.js +0 -111
- package/dist/components/fieldError/index.js +0 -26
- package/dist/components/fieldLabel/index.js +0 -23
- package/dist/components/fieldWrapper/index.js +0 -27
- package/dist/components/fileUpload/hasFileContent/index.js +0 -34
- package/dist/components/fileUpload/index.js +0 -89
- package/dist/components/fileUpload/noFileContent/index.js +0 -29
- package/dist/components/fullCalendar/_fullCalendarProvider.js +0 -36
- package/dist/components/fullCalendar/_viewService.js +0 -144
- package/dist/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +0 -6
- package/dist/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +0 -105
- package/dist/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +0 -24
- package/dist/components/fullCalendar/dayCalendar/index.js +0 -9
- package/dist/components/fullCalendar/fullCalendarContainer/index.js +0 -6
- package/dist/components/fullCalendar/fullCalendarHeader/index.js +0 -37
- package/dist/components/fullCalendar/index.js +0 -52
- package/dist/components/fullCalendar/monthlyCalendar/index.js +0 -8
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +0 -29
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +0 -9
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +0 -6
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +0 -9
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +0 -30
- package/dist/components/fullCalendar/weekCalendar/index.js +0 -8
- package/dist/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +0 -102
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +0 -11
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +0 -6
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +0 -10
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +0 -25
- package/dist/components/googleAnalytics/googleAnalytics.client.js +0 -8
- package/dist/components/googleAnalytics/googleAnalytics.js +0 -23
- package/dist/components/googleAnalytics/index.js +0 -31
- package/dist/components/googleAnalytics/snippets/generateGAElements.js +0 -16
- package/dist/components/googleTagManager/googleTagManager.client.js +0 -8
- package/dist/components/googleTagManager/googleTagManager.js +0 -52
- package/dist/components/googleTagManager/index.js +0 -47
- package/dist/components/googleTagManager/snippets/appendToDataLayer.js +0 -7
- package/dist/components/googleTagManager/snippets/generateGTMElements.js +0 -25
- package/dist/components/iconButton/index.js +0 -38
- package/dist/components/imageUpload/hasFileContent/index.js +0 -24
- package/dist/components/imageUpload/index.js +0 -101
- package/dist/components/imageUpload/noFileContent/index.js +0 -29
- package/dist/components/input/index.js +0 -94
- package/dist/components/mapView/index.js +0 -53
- package/dist/components/mapView/mapView.client.js +0 -51
- package/dist/components/maskedInput/index.js +0 -108
- package/dist/components/modal/modalContainer/index.js +0 -40
- package/dist/components/modal/modalContext.js +0 -10
- package/dist/components/modal/modalFooter/index.js +0 -32
- package/dist/components/modal/modalHeader/index.js +0 -34
- package/dist/components/multiSelect/index.js +0 -135
- package/dist/components/multiSelect/multiSelectChevron/index.js +0 -18
- package/dist/components/multiSelect/multiSelectContainer/index.js +0 -11
- package/dist/components/multiSelect/multiSelectContent/index.js +0 -8
- package/dist/components/multiSelect/multiSelectMark/index.js +0 -11
- package/dist/components/multiSelect/multiSelectOption/index.js +0 -10
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.js +0 -44
- package/dist/components/multiSelect/multiSelectOverlay/index.js +0 -9
- package/dist/components/multiSelect/multiSelectSpinner/index.js +0 -10
- package/dist/components/pagination/chevronButton/index.js +0 -9
- package/dist/components/pagination/currentButton/index.js +0 -6
- package/dist/components/pagination/index.js +0 -46
- package/dist/components/pagination/pageButton/index.js +0 -7
- package/dist/components/pagination/paginationService.js +0 -62
- package/dist/components/pagination/spread/index.js +0 -7
- package/dist/components/phoneInput/index.js +0 -127
- package/dist/components/phoneInput/phoneInputContainer/index.js +0 -11
- package/dist/components/phoneInput/phoneInputCountriesOverlay/index.js +0 -9
- package/dist/components/phoneInput/phoneInputCountryOption/index.js +0 -10
- package/dist/components/phoneInput/phoneInputCountryOptionsContainer/index.js +0 -40
- package/dist/components/phoneInput/phoneInputCountrySelector/index.js +0 -9
- package/dist/components/phoneInput/phoneInputMask/index.js +0 -37
- package/dist/components/popover/index.js +0 -62
- package/dist/components/radio/radioBox/index.js +0 -48
- package/dist/components/radio/radioContext.js +0 -11
- package/dist/components/radio/radioGroup/index.js +0 -58
- package/dist/components/richText/blockButton/index.js +0 -18
- package/dist/components/richText/element/index.js +0 -26
- package/dist/components/richText/index.js +0 -136
- package/dist/components/richText/insertImage/index.js +0 -33
- package/dist/components/richText/insertVideo/index.js +0 -51
- package/dist/components/richText/leaf/index.js +0 -13
- package/dist/components/richText/markButton/index.js +0 -16
- package/dist/components/richText/toolbar/index.js +0 -6
- package/dist/components/searchPlaces.js +0 -99
- package/dist/components/select/index.js +0 -134
- package/dist/components/select/selectChevron/index.js +0 -18
- package/dist/components/select/selectContainer/index.js +0 -11
- package/dist/components/select/selectContent/index.js +0 -8
- package/dist/components/select/selectOption/index.js +0 -10
- package/dist/components/select/selectOptionsContainer/index.js +0 -44
- package/dist/components/select/selectOverlay/index.js +0 -9
- package/dist/components/select/selectSpinner/index.js +0 -10
- package/dist/components/slider/index.js +0 -79
- package/dist/components/switch/index.js +0 -66
- package/dist/components/tab/tabButton/index.js +0 -40
- package/dist/components/tab/tabContainer/index.js +0 -42
- package/dist/components/tab/tabContext.js +0 -10
- package/dist/components/table/tableBody/index.js +0 -34
- package/dist/components/table/tableCaption/index.js +0 -24
- package/dist/components/table/tableContainer/index.js +0 -37
- package/dist/components/table/tableFooter/index.js +0 -23
- package/dist/components/table/tableHeader/index.js +0 -25
- package/dist/components/textarea/index.js +0 -80
- package/dist/components/tooltip/index.js +0 -96
- package/dist/hooks/useAutomation.js +0 -74
- package/dist/hooks/useDrawer.js +0 -20
- package/dist/hooks/useForm.js +0 -35
- package/dist/hooks/useHydrated.js +0 -26
- package/dist/hooks/useModal.js +0 -20
- package/dist/hooks/useScopedParams.js +0 -55
- package/dist/hooks/useScrollLock.js +0 -46
- package/dist/hooks/useSearchAutomation.js +0 -64
- package/dist/hooks/useSlider.js +0 -35
- package/dist/hooks/useToast.js +0 -28
- package/dist/providers/drawerProvider.js +0 -54
- package/dist/providers/formProvider.js +0 -34
- package/dist/providers/modalProvider.js +0 -58
- package/dist/providers/placesProvider.js +0 -40
- package/dist/providers/toastProvider.js +0 -62
- package/dist/services/extractTextFromNode.js +0 -5
- package/dist/services/fieldTemplate.js +0 -11
- package/dist/services/iconRenderer.js +0 -13
- package/dist/services/isBlockActive.js +0 -14
- package/dist/services/isMarkActive.js +0 -6
- package/dist/services/maskCurrencyValues.js +0 -23
- package/dist/services/toHtml.js +0 -22
- package/dist/services/toRichTextValue.js +0 -34
- package/dist/services/toggleBlock.js +0 -32
- package/dist/services/toggleMark.js +0 -10
- package/dist/templates/badResponses.js +0 -12
- package/dist/templates/richTextTemplates.js +0 -12
- package/dist/templates/successResponses.js +0 -2
- package/dist/types/richTextTypes.js +0 -1
- package/dist/utils/phoneInputUtilities.js +0 -37
- package/dist/utils/richTextUtilities.js +0 -89
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as s, createContext as c } from "react";
|
|
3
|
+
const r = c({});
|
|
4
|
+
function f(e) {
|
|
5
|
+
const { children: o, size: t, isError: n, handleChange: i, value: a, disabled: d } = e;
|
|
6
|
+
return /* @__PURE__ */ u(
|
|
7
|
+
r.Provider,
|
|
8
|
+
{
|
|
9
|
+
value: { handleChange: i, value: a, size: t, isError: n, disabled: d },
|
|
10
|
+
children: o
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
function m() {
|
|
15
|
+
return s(r);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
f as RadioProvider,
|
|
19
|
+
m as useRadioGroup
|
|
20
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F } from "react";
|
|
3
|
+
import { useForm as M } from "../../../hooks/useForm.js";
|
|
4
|
+
import { FieldTemplate as R } from "../../../services/fieldTemplate.js";
|
|
5
|
+
import { RadioProvider as V } from "../radioContext.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
function A(m) {
|
|
8
|
+
const {
|
|
9
|
+
defaultValue: u = "",
|
|
10
|
+
name: e,
|
|
11
|
+
label: c,
|
|
12
|
+
showAsterisk: p,
|
|
13
|
+
errorMessage: d,
|
|
14
|
+
value: s,
|
|
15
|
+
onChange: o,
|
|
16
|
+
size: t = "md",
|
|
17
|
+
className: f = "",
|
|
18
|
+
disabled: h = !1,
|
|
19
|
+
unShowFieldTemplate: v = !1,
|
|
20
|
+
orientation: g = "vertical",
|
|
21
|
+
...y
|
|
22
|
+
} = m, [i, N] = F(u), { fieldErrors: a } = M();
|
|
23
|
+
function x(n) {
|
|
24
|
+
N(n), o && o(n);
|
|
25
|
+
}
|
|
26
|
+
const l = d || (a == null ? void 0 : a[e]), b = !!l, w = `arkynRadioGroup ${t}`;
|
|
27
|
+
return /* @__PURE__ */ r(
|
|
28
|
+
R,
|
|
29
|
+
{
|
|
30
|
+
name: e,
|
|
31
|
+
label: c,
|
|
32
|
+
showAsterisk: p,
|
|
33
|
+
className: f,
|
|
34
|
+
errorMessage: l,
|
|
35
|
+
unShowFieldTemplate: v,
|
|
36
|
+
orientation: g,
|
|
37
|
+
children: /* @__PURE__ */ C(
|
|
38
|
+
V,
|
|
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
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
A as RadioGroup
|
|
65
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useSlate as l } from "slate-react";
|
|
3
|
+
import { isBlockActive as u } from "../../../services/isBlockActive.js";
|
|
4
|
+
import { toggleBlock as p } from "../../../services/toggleBlock.js";
|
|
5
|
+
import { textAlignTypes as a } from "../../../templates/richTextTemplates.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
function g({ format: t, icon: i }) {
|
|
8
|
+
const o = l(), n = a.includes(t) ? "align" : "type", c = u(o, t, n) ? "activeTrue" : "activeFalse";
|
|
9
|
+
function s(r) {
|
|
10
|
+
r.preventDefault(), p(o, t);
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ e(
|
|
13
|
+
"button",
|
|
14
|
+
{
|
|
15
|
+
type: "button",
|
|
16
|
+
className: "arkynRichTextBlockButton " + c,
|
|
17
|
+
onMouseDown: s,
|
|
18
|
+
children: /* @__PURE__ */ e(i, {})
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
g as BlockButton
|
|
24
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as s, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function i({ attributes: e, children: a, element: c }) {
|
|
4
|
+
const r = { textAlign: c.align };
|
|
5
|
+
switch (c.type) {
|
|
6
|
+
case "blockQuote":
|
|
7
|
+
return /* @__PURE__ */ s(
|
|
8
|
+
"blockquote",
|
|
9
|
+
{
|
|
10
|
+
className: "arkynElementBlockquote",
|
|
11
|
+
style: r,
|
|
12
|
+
...e,
|
|
13
|
+
children: a
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
case "bulletedList":
|
|
17
|
+
return /* @__PURE__ */ s("ul", { className: "arkynElementBulletList", style: r, ...e, children: a });
|
|
18
|
+
case "headingOne":
|
|
19
|
+
return /* @__PURE__ */ s("h1", { className: "arkynElementHeadingOne", style: r, ...e, children: a });
|
|
20
|
+
case "headingTwo":
|
|
21
|
+
return /* @__PURE__ */ s("h2", { className: "arkynElementHeadingTwo", style: r, ...e, children: a });
|
|
22
|
+
case "listItem":
|
|
23
|
+
return /* @__PURE__ */ s("li", { className: "arkynElementListItem", style: r, ...e, children: a });
|
|
24
|
+
case "numberedList":
|
|
25
|
+
return /* @__PURE__ */ s("ol", { className: "arkynElementNumberedList", style: r, ...e, children: a });
|
|
26
|
+
case "image":
|
|
27
|
+
return /* @__PURE__ */ l("div", { style: r, ...e, children: [
|
|
28
|
+
/* @__PURE__ */ s(
|
|
29
|
+
"img",
|
|
30
|
+
{
|
|
31
|
+
className: "arkynElementImage",
|
|
32
|
+
alt: "arkynElementImage",
|
|
33
|
+
src: (c == null ? void 0 : c.src) || ""
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
a
|
|
37
|
+
] });
|
|
38
|
+
case "video":
|
|
39
|
+
return /* @__PURE__ */ l("div", { style: r, ...e, children: [
|
|
40
|
+
/* @__PURE__ */ s(
|
|
41
|
+
"iframe",
|
|
42
|
+
{
|
|
43
|
+
className: "arkynElementVideo",
|
|
44
|
+
src: (c == null ? void 0 : c.src) || "",
|
|
45
|
+
title: "YouTube video player",
|
|
46
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
47
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
48
|
+
allowFullScreen: !0
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
a
|
|
52
|
+
] });
|
|
53
|
+
default:
|
|
54
|
+
return /* @__PURE__ */ s("p", { className: "arkynElementParagraph", style: r, ...e, children: a });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
i as Element
|
|
59
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import Y from "is-hotkey";
|
|
3
|
+
import { Heading1 as Z, Heading2 as _, Quote as ee, Bold as re, Italic as te, Underline as oe, Code as ne, AlignLeft as ie, AlignRight as se, AlignCenter as ae, AlignJustify as ce } from "lucide-react";
|
|
4
|
+
import { useMemo as le, useState as g, useRef as me, useId as fe, useCallback as F } from "react";
|
|
5
|
+
import { createEditor as ue, Transforms as de } from "slate";
|
|
6
|
+
import { withHistory as he } from "slate-history";
|
|
7
|
+
import { withReact as pe, Slate as ge, Editable as Ce } from "slate-react";
|
|
8
|
+
import { BlockButton as n } from "./blockButton/index.js";
|
|
9
|
+
import { Element as ye } from "./element/index.js";
|
|
10
|
+
import { InsertImage as Ne } from "./insertImage/index.js";
|
|
11
|
+
import { InsertVideo as be } from "./insertVideo/index.js";
|
|
12
|
+
import { Leaf as ke } from "./leaf/index.js";
|
|
13
|
+
import { MarkButton as l } from "./markButton/index.js";
|
|
14
|
+
import { Toolbar as Te } from "./toolbar/index.js";
|
|
15
|
+
import { useForm as xe } from "../../hooks/useForm.js";
|
|
16
|
+
import { extractTextFromNode as I } from "../../services/extractTextFromNode.js";
|
|
17
|
+
import { FieldTemplate as Fe } from "../../services/fieldTemplate.js";
|
|
18
|
+
import { toggleMark as Ie } from "../../services/toggleMark.js";
|
|
19
|
+
import { hotKeys as V, initialValue as m } from "../../templates/richTextTemplates.js";
|
|
20
|
+
/* empty css */
|
|
21
|
+
function Ge(w) {
|
|
22
|
+
const {
|
|
23
|
+
name: s,
|
|
24
|
+
hiddenButtons: f,
|
|
25
|
+
imageConfig: C,
|
|
26
|
+
videoConfig: A,
|
|
27
|
+
className: E = "",
|
|
28
|
+
defaultValue: O = "[]",
|
|
29
|
+
enforceCharacterLimit: S = !1,
|
|
30
|
+
onChangeCharactersCount: y,
|
|
31
|
+
baseErrorMessage: j,
|
|
32
|
+
maxLimit: a = 1e4,
|
|
33
|
+
onChange: N,
|
|
34
|
+
isError: H,
|
|
35
|
+
label: L,
|
|
36
|
+
showAsterisk: M,
|
|
37
|
+
id: R,
|
|
38
|
+
orientation: v = "vertical",
|
|
39
|
+
unShowFieldTemplate: B = !1
|
|
40
|
+
} = w, c = le(() => he(pe(ue())), []), { fieldErrors: u } = xe();
|
|
41
|
+
function d() {
|
|
42
|
+
try {
|
|
43
|
+
const r = JSON.parse(O);
|
|
44
|
+
return Array.isArray(r) ? r.length <= 0 ? m : r.every(
|
|
45
|
+
(i) => typeof i == "object" && i !== null && "type" in i && "children" in i
|
|
46
|
+
) ? r : m : m;
|
|
47
|
+
} catch {
|
|
48
|
+
return m;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const J = I(d()), [h, D] = g(J.length), [Q, $] = g(
|
|
52
|
+
JSON.stringify(d()) || "[]"
|
|
53
|
+
), [K, b] = g(!1), U = me(null), q = R || fe(), k = j || (u == null ? void 0 : u[s]), z = H || !!k, G = F(ke, []), P = F(ye, []);
|
|
54
|
+
function T(r) {
|
|
55
|
+
const o = I(r);
|
|
56
|
+
D(o.length), y && y(o.length), !(S && o.length >= a) && ($(JSON.stringify(r)), N && N(r), c.children = r, de.setNodes(c, { children: r }));
|
|
57
|
+
}
|
|
58
|
+
const W = K ? "focusTrue" : "focusFalse", X = `arkynRichText ${z || a < h ? "errorTrue" : "errorFalse"} ${W}`, x = a - h;
|
|
59
|
+
function t(r) {
|
|
60
|
+
return !(f != null && f.includes(r));
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ e(
|
|
63
|
+
Fe,
|
|
64
|
+
{
|
|
65
|
+
name: s,
|
|
66
|
+
label: L,
|
|
67
|
+
showAsterisk: M,
|
|
68
|
+
className: E,
|
|
69
|
+
errorMessage: k,
|
|
70
|
+
unShowFieldTemplate: B,
|
|
71
|
+
orientation: v,
|
|
72
|
+
children: /* @__PURE__ */ p(
|
|
73
|
+
ge,
|
|
74
|
+
{
|
|
75
|
+
editor: c,
|
|
76
|
+
initialValue: d(),
|
|
77
|
+
onChange: T,
|
|
78
|
+
onValueChange: T,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ p("div", { className: X, children: [
|
|
81
|
+
/* @__PURE__ */ p(Te, { children: [
|
|
82
|
+
t("headingOne") && /* @__PURE__ */ e(n, { format: "headingOne", icon: Z }),
|
|
83
|
+
t("headingTwo") && /* @__PURE__ */ e(n, { format: "headingTwo", icon: _ }),
|
|
84
|
+
t("blockQuote") && /* @__PURE__ */ e(n, { format: "blockQuote", icon: ee }),
|
|
85
|
+
t("bold") && /* @__PURE__ */ e(l, { format: "bold", icon: re }),
|
|
86
|
+
t("italic") && /* @__PURE__ */ e(l, { format: "italic", icon: te }),
|
|
87
|
+
t("underline") && /* @__PURE__ */ e(l, { format: "underline", icon: oe }),
|
|
88
|
+
t("code") && /* @__PURE__ */ e(l, { format: "code", icon: ne }),
|
|
89
|
+
t("left") && /* @__PURE__ */ e(n, { format: "left", icon: ie }),
|
|
90
|
+
t("right") && /* @__PURE__ */ e(n, { format: "right", icon: se }),
|
|
91
|
+
t("center") && /* @__PURE__ */ e(n, { format: "center", icon: ae }),
|
|
92
|
+
t("justify") && /* @__PURE__ */ e(n, { format: "justify", icon: ce }),
|
|
93
|
+
C && t("image") && /* @__PURE__ */ e(Ne, { ...C }),
|
|
94
|
+
t("video") && /* @__PURE__ */ e(be, { ...A })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
Ce,
|
|
98
|
+
{
|
|
99
|
+
className: "editorContainer",
|
|
100
|
+
renderElement: P,
|
|
101
|
+
renderLeaf: G,
|
|
102
|
+
spellCheck: !0,
|
|
103
|
+
ref: U,
|
|
104
|
+
id: q,
|
|
105
|
+
onFocus: () => b(!0),
|
|
106
|
+
onBlur: () => b(!1),
|
|
107
|
+
onKeyDown: (r) => {
|
|
108
|
+
for (const o in V)
|
|
109
|
+
if (Y(o, r)) {
|
|
110
|
+
r.preventDefault();
|
|
111
|
+
const i = V[o];
|
|
112
|
+
Ie(c, i);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
x < 0 && /* @__PURE__ */ e("div", { className: "restatesCharacters", children: x })
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ e(
|
|
120
|
+
"input",
|
|
121
|
+
{
|
|
122
|
+
type: "hidden",
|
|
123
|
+
name: s,
|
|
124
|
+
value: Q.slice(0, a)
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: `${s}Count`, value: h })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
Ge as RichText
|
|
136
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Image as T } from "lucide-react";
|
|
3
|
+
import { useState as l } from "react";
|
|
4
|
+
import { useSlate as U } from "slate-react";
|
|
5
|
+
import { Button as d } from "../../button/index.js";
|
|
6
|
+
import { ImageUpload as L } from "../../imageUpload/index.js";
|
|
7
|
+
import { Input as R } from "../../input/index.js";
|
|
8
|
+
import { ModalContainer as k } from "../../modal/modalContainer/index.js";
|
|
9
|
+
import { ModalFooter as M } from "../../modal/modalFooter/index.js";
|
|
10
|
+
import { ModalHeader as w } from "../../modal/modalHeader/index.js";
|
|
11
|
+
import { TabButton as c } from "../../tab/tabButton/index.js";
|
|
12
|
+
import { TabContainer as V } from "../../tab/tabContainer/index.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
function J(u) {
|
|
15
|
+
const {
|
|
16
|
+
action: p,
|
|
17
|
+
tabLabels: i = ["Adicionar URL", "Upload de arquivo"],
|
|
18
|
+
modalCancelButton: h = "Cancelar",
|
|
19
|
+
modalConfirmButton: f = "Confirmar",
|
|
20
|
+
modalInputImageLabel: g = "Imagem:",
|
|
21
|
+
modalInputUrlLabel: I = "URL da imagem:",
|
|
22
|
+
modalTitle: b = "Inserir imagem"
|
|
23
|
+
} = u, x = U(), [y, o] = l(!1), [t, m] = l(""), [n, C] = l("url");
|
|
24
|
+
function v(r) {
|
|
25
|
+
r.preventDefault(), !(!t || t === "") && (x.insertNodes([
|
|
26
|
+
{ type: "paragraph", children: [{ text: "" }] },
|
|
27
|
+
{ type: "image", src: t, children: [{ text: "" }] },
|
|
28
|
+
{ type: "paragraph", children: [{ text: "" }] }
|
|
29
|
+
]), o(!1));
|
|
30
|
+
}
|
|
31
|
+
return /* @__PURE__ */ a(s, { children: [
|
|
32
|
+
/* @__PURE__ */ e(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
type: "button",
|
|
36
|
+
className: "arkynRichTextInsertImage",
|
|
37
|
+
onMouseDown: () => o(!0),
|
|
38
|
+
children: /* @__PURE__ */ e(T, {})
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ a(
|
|
42
|
+
k,
|
|
43
|
+
{
|
|
44
|
+
isVisible: y,
|
|
45
|
+
makeInvisible: () => o(!1),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ e(w, { children: b }),
|
|
48
|
+
/* @__PURE__ */ a("div", { className: "arkynRichTextInsertImageModalContent", children: [
|
|
49
|
+
/* @__PURE__ */ a(V, { defaultValue: n, onChange: C, children: [
|
|
50
|
+
/* @__PURE__ */ e(c, { value: "url", children: i[0] }),
|
|
51
|
+
/* @__PURE__ */ e(c, { value: "file", children: i[1] })
|
|
52
|
+
] }),
|
|
53
|
+
n === "url" && /* @__PURE__ */ a(s, { children: [
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
R,
|
|
56
|
+
{
|
|
57
|
+
type: "text",
|
|
58
|
+
name: "richTextImageURL",
|
|
59
|
+
label: I,
|
|
60
|
+
showAsterisk: !0,
|
|
61
|
+
defaultValue: t,
|
|
62
|
+
onChange: (r) => m(r.target.value)
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
t && /* @__PURE__ */ e(
|
|
66
|
+
"img",
|
|
67
|
+
{
|
|
68
|
+
className: "arkynRichTextInsertImageModalPreviewImage",
|
|
69
|
+
src: t,
|
|
70
|
+
alt: "preview"
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }),
|
|
74
|
+
n === "file" && /* @__PURE__ */ e(
|
|
75
|
+
L,
|
|
76
|
+
{
|
|
77
|
+
name: "richTextImageURL",
|
|
78
|
+
action: p,
|
|
79
|
+
label: g,
|
|
80
|
+
showAsterisk: !0,
|
|
81
|
+
defaultValue: t,
|
|
82
|
+
onChange: (r) => m(r)
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ a(M, { children: [
|
|
87
|
+
/* @__PURE__ */ e(
|
|
88
|
+
d,
|
|
89
|
+
{
|
|
90
|
+
type: "button",
|
|
91
|
+
scheme: "danger",
|
|
92
|
+
variant: "outline",
|
|
93
|
+
onClick: () => o(!1),
|
|
94
|
+
children: h
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ e(d, { type: "button", onClick: v, children: f })
|
|
98
|
+
] })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] });
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
J as InsertImage
|
|
106
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as x, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Video as M } from "lucide-react";
|
|
3
|
+
import { useState as s, useEffect as u } from "react";
|
|
4
|
+
import { useSlate as R } from "slate-react";
|
|
5
|
+
import { Button as p } from "../../button/index.js";
|
|
6
|
+
import { Input as C } from "../../input/index.js";
|
|
7
|
+
import { ModalContainer as U } from "../../modal/modalContainer/index.js";
|
|
8
|
+
import { ModalFooter as L } from "../../modal/modalFooter/index.js";
|
|
9
|
+
import { ModalHeader as k } from "../../modal/modalHeader/index.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
function A(h) {
|
|
12
|
+
const {
|
|
13
|
+
modalCancelButton: f = "Cancelar",
|
|
14
|
+
modalConfirmButton: b = "Confirmar",
|
|
15
|
+
modalInputUrlLabel: w = "URL do vídeo:",
|
|
16
|
+
modalTitle: v = "Inserir vídeo",
|
|
17
|
+
invalidUrlMessage: y = "URL inválida"
|
|
18
|
+
} = h, g = R(), [l, o] = s(!1), [t, d] = s(""), [r, m] = s(""), [I, c] = s("");
|
|
19
|
+
function V(i) {
|
|
20
|
+
if (i.preventDefault(), !t || t === "") return;
|
|
21
|
+
const a = `https://www.youtube.com/embed/${t}`;
|
|
22
|
+
g.insertNodes([
|
|
23
|
+
{ type: "paragraph", children: [{ text: "" }] },
|
|
24
|
+
{ type: "video", src: a, children: [{ text: "" }] },
|
|
25
|
+
{ type: "paragraph", children: [{ text: "" }] }
|
|
26
|
+
]), o(!1);
|
|
27
|
+
}
|
|
28
|
+
return u(() => {
|
|
29
|
+
if (!r || r === "") return;
|
|
30
|
+
d(""), c("");
|
|
31
|
+
const a = new URLSearchParams(r.split("?")[1]).get("v");
|
|
32
|
+
a ? d(a) : c(y);
|
|
33
|
+
}, [r]), u(() => {
|
|
34
|
+
l || (d(""), m(""), c(""));
|
|
35
|
+
}, [l]), /* @__PURE__ */ n(x, { children: [
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
type: "button",
|
|
40
|
+
className: "arkynRichTextInsertVideo",
|
|
41
|
+
onMouseDown: () => o(!0),
|
|
42
|
+
children: /* @__PURE__ */ e(M, {})
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ n(
|
|
46
|
+
U,
|
|
47
|
+
{
|
|
48
|
+
isVisible: l,
|
|
49
|
+
makeInvisible: () => o(!1),
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ e(k, { children: v }),
|
|
52
|
+
/* @__PURE__ */ n("div", { className: "arkynRichTextInsertVideoModalContent", children: [
|
|
53
|
+
/* @__PURE__ */ e(
|
|
54
|
+
C,
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
name: "richTextVideoURL",
|
|
58
|
+
label: w,
|
|
59
|
+
showAsterisk: !0,
|
|
60
|
+
defaultValue: r,
|
|
61
|
+
onChange: (i) => m(i.target.value),
|
|
62
|
+
errorMessage: I
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
t && /* @__PURE__ */ e(
|
|
66
|
+
"iframe",
|
|
67
|
+
{
|
|
68
|
+
width: "auto",
|
|
69
|
+
height: "315",
|
|
70
|
+
src: `https://www.youtube.com/embed/${t}`,
|
|
71
|
+
title: "YouTube video player",
|
|
72
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
73
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
74
|
+
allowFullScreen: !0
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ n(L, { children: [
|
|
79
|
+
/* @__PURE__ */ e(
|
|
80
|
+
p,
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
scheme: "danger",
|
|
84
|
+
variant: "outline",
|
|
85
|
+
onClick: () => o(!1),
|
|
86
|
+
children: f
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ e(p, { disabled: !t, type: "button", onClick: V, children: b })
|
|
90
|
+
] })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
A as InsertVideo
|
|
98
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
function p({ attributes: u, children: o, leaf: f }) {
|
|
3
|
+
return f.bold && (o = /* @__PURE__ */ t("strong", { children: o })), f.code && (o = /* @__PURE__ */ t("code", { children: o })), f.italic && (o = /* @__PURE__ */ t("em", { children: o })), f.underline && (o = /* @__PURE__ */ t("u", { children: o })), /* @__PURE__ */ t("span", { ...u, children: o });
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
p as Leaf
|
|
7
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useSlate as s } from "slate-react";
|
|
3
|
+
import { isMarkActive as a } from "../../../services/isMarkActive.js";
|
|
4
|
+
import { toggleMark as u } from "../../../services/toggleMark.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
function k({ format: t, icon: i }) {
|
|
7
|
+
const o = s(), n = a(o, t) ? "activeTrue" : "activeFalse";
|
|
8
|
+
function r(c) {
|
|
9
|
+
c.preventDefault(), u(o, t);
|
|
10
|
+
}
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
"button",
|
|
13
|
+
{
|
|
14
|
+
type: "button",
|
|
15
|
+
className: "arkynRichTextMarkButton " + n,
|
|
16
|
+
onMouseDown: r,
|
|
17
|
+
children: /* @__PURE__ */ e(i, {})
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
k as MarkButton
|
|
23
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { StandaloneSearchBox as B } from "@react-google-maps/api";
|
|
3
|
+
import { useState as N } from "react";
|
|
4
|
+
import { Input as j } from "./input/index.js";
|
|
5
|
+
function A(g) {
|
|
6
|
+
const { onChange: i, onPlaceChanged: d, options: y, ...v } = g, [r, C] = N(null);
|
|
7
|
+
return /* @__PURE__ */ _(
|
|
8
|
+
B,
|
|
9
|
+
{
|
|
10
|
+
onLoad: (o) => C(o),
|
|
11
|
+
onPlacesChanged: () => {
|
|
12
|
+
var f, m, h, p;
|
|
13
|
+
const o = r == null ? void 0 : r.getPlaces(), a = o ? o[0] : null, c = a == null ? void 0 : a.address_components;
|
|
14
|
+
function s(n) {
|
|
15
|
+
const t = c.find((e) => e.types[0] === n);
|
|
16
|
+
return t ? t.long_name : "";
|
|
17
|
+
}
|
|
18
|
+
function P(n) {
|
|
19
|
+
const t = c.find((e) => e.types[0] === n);
|
|
20
|
+
return t ? t.short_name : "";
|
|
21
|
+
}
|
|
22
|
+
function u(n) {
|
|
23
|
+
for (const t of n) {
|
|
24
|
+
const e = c.find(
|
|
25
|
+
(l) => l.types.includes(t)
|
|
26
|
+
);
|
|
27
|
+
if (e) return e.long_name;
|
|
28
|
+
}
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
if (a) {
|
|
32
|
+
const n = s("route"), t = s("street_number"), e = u([
|
|
33
|
+
"sublocality_level_1",
|
|
34
|
+
"sublocality",
|
|
35
|
+
"neighborhood"
|
|
36
|
+
]), l = s("administrative_area_level_2"), S = s("administrative_area_level_1"), b = P("administrative_area_level_1"), x = u([
|
|
37
|
+
"postal_code",
|
|
38
|
+
"postal_code_prefix"
|
|
39
|
+
]), D = (m = (f = a.geometry) == null ? void 0 : f.location) == null ? void 0 : m.lat(), L = (p = (h = a.geometry) == null ? void 0 : h.location) == null ? void 0 : p.lng();
|
|
40
|
+
d && d({
|
|
41
|
+
street: n,
|
|
42
|
+
city: l,
|
|
43
|
+
state: S,
|
|
44
|
+
neighborhood: e,
|
|
45
|
+
postalCode: x,
|
|
46
|
+
streetNumber: t,
|
|
47
|
+
stateShortName: b,
|
|
48
|
+
coordinates: { lat: D, lng: L }
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
options: y,
|
|
53
|
+
children: /* @__PURE__ */ _(
|
|
54
|
+
j,
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
autoComplete: "off",
|
|
58
|
+
onChange: (o) => i && i(o.target.value),
|
|
59
|
+
...v
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
A as SearchPlaces
|
|
67
|
+
};
|