@arkyn/components 3.0.1-beta.95 → 3.0.2
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/LICENSE.txt +184 -1
- package/README.md +174 -228
- package/dist/components/alert/alertContainer/index.d.ts +30 -26
- package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
- package/dist/components/alert/alertContent/index.d.ts +9 -30
- package/dist/components/alert/alertContent/index.d.ts.map +1 -1
- package/dist/components/alert/alertDescription/index.d.ts +8 -34
- package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
- package/dist/components/alert/alertIcon/index.d.ts +13 -35
- package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
- package/dist/components/alert/alertTitle/index.d.ts +11 -32
- package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
- package/dist/components/audioPlayer/index.d.ts +24 -33
- package/dist/components/audioPlayer/index.d.ts.map +1 -1
- package/dist/components/audioUpload/hasFileContent/index.d.ts +1 -1
- package/dist/components/audioUpload/hasFileContent/index.d.ts.map +1 -1
- package/dist/components/audioUpload/index.d.ts +38 -49
- package/dist/components/audioUpload/index.d.ts.map +1 -1
- package/dist/components/audioUpload/noFileContent/index.d.ts +1 -1
- package/dist/components/audioUpload/noFileContent/index.d.ts.map +1 -1
- package/dist/components/badge/index.d.ts +34 -25
- package/dist/components/badge/index.d.ts.map +1 -1
- package/dist/components/button/index.d.ts +42 -32
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/calendar/_calendarProvider.d.ts +52 -0
- package/dist/components/calendar/_calendarProvider.d.ts.map +1 -0
- package/dist/components/calendar/_viewService.d.ts +32 -0
- package/dist/components/calendar/_viewService.d.ts.map +1 -0
- package/dist/components/calendar/calendarContainer/index.d.ts +8 -0
- package/dist/components/calendar/calendarContainer/index.d.ts.map +1 -0
- package/dist/components/calendar/calendarHeader/index.d.ts +7 -0
- package/dist/components/calendar/calendarHeader/index.d.ts.map +1 -0
- package/dist/components/calendar/calendarTableBody/index.d.ts +4 -0
- package/dist/components/calendar/calendarTableBody/index.d.ts.map +1 -0
- package/dist/components/calendar/calendarTableContainer/index.d.ts +8 -0
- package/dist/components/calendar/calendarTableContainer/index.d.ts.map +1 -0
- package/dist/components/calendar/calendarTableHeader/index.d.ts +4 -0
- package/dist/components/calendar/calendarTableHeader/index.d.ts.map +1 -0
- package/dist/components/calendar/calendarTableTd/index.d.ts +11 -0
- package/dist/components/calendar/calendarTableTd/index.d.ts.map +1 -0
- package/dist/components/calendar/index.d.ts +100 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/cardTab/cardTabButton/index.d.ts +16 -54
- package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -1
- package/dist/components/cardTab/cardTabContainer/index.d.ts +18 -60
- package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -1
- package/dist/components/cardTab/cardTabContext.d.ts +4 -4
- package/dist/components/cardTab/cardTabContext.d.ts.map +1 -1
- package/dist/components/checkbox/index.d.ts +42 -37
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/clientOnly.d.ts +14 -67
- package/dist/components/clientOnly.d.ts.map +1 -1
- package/dist/components/currencyInput/index.d.ts +75 -53
- package/dist/components/currencyInput/index.d.ts.map +1 -1
- package/dist/components/divider/index.d.ts +14 -27
- package/dist/components/divider/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerContainer/index.d.ts +18 -52
- package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerContext.d.ts +2 -2
- package/dist/components/drawer/drawerContext.d.ts.map +1 -1
- package/dist/components/drawer/drawerHeader/index.d.ts +11 -35
- package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -1
- package/dist/components/facebookPixel/facebookPixel.client.d.ts +4 -0
- package/dist/components/facebookPixel/facebookPixel.client.d.ts.map +1 -0
- package/dist/components/facebookPixel/index.d.ts +65 -0
- package/dist/components/facebookPixel/index.d.ts.map +1 -0
- package/dist/components/facebookPixel/pixel.d.ts +21 -0
- package/dist/components/facebookPixel/pixel.d.ts.map +1 -0
- package/dist/components/fieldError/index.d.ts +6 -13
- package/dist/components/fieldError/index.d.ts.map +1 -1
- package/dist/components/fieldLabel/index.d.ts +8 -23
- package/dist/components/fieldLabel/index.d.ts.map +1 -1
- package/dist/components/fieldWrapper/index.d.ts +14 -24
- package/dist/components/fieldWrapper/index.d.ts.map +1 -1
- package/dist/components/fileUpload/hasFileContent/index.d.ts +1 -1
- package/dist/components/fileUpload/hasFileContent/index.d.ts.map +1 -1
- package/dist/components/fileUpload/index.d.ts +37 -62
- package/dist/components/fileUpload/index.d.ts.map +1 -1
- package/dist/components/fileUpload/noFileContent/index.d.ts +1 -1
- package/dist/components/fileUpload/noFileContent/index.d.ts.map +1 -1
- package/dist/components/fullCalendar/_fullCalendarProvider.d.ts +44 -0
- package/dist/components/fullCalendar/_fullCalendarProvider.d.ts.map +1 -0
- package/dist/components/fullCalendar/_viewService.d.ts +28 -0
- package/dist/components/fullCalendar/_viewService.d.ts.map +1 -0
- package/dist/components/fullCalendar/dayCalendar/dayCalendarContainer/index.d.ts +8 -0
- package/dist/components/fullCalendar/dayCalendar/dayCalendarContainer/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/dayCalendar/dayCalendarEvent/index.d.ts +7 -0
- package/dist/components/fullCalendar/dayCalendar/dayCalendarEvent/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/dayCalendar/dayCalendarRow/index.d.ts +8 -0
- package/dist/components/fullCalendar/dayCalendar/dayCalendarRow/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/dayCalendar/index.d.ts +3 -0
- package/dist/components/fullCalendar/dayCalendar/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/fullCalendarContainer/index.d.ts +8 -0
- package/dist/components/fullCalendar/fullCalendarContainer/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/fullCalendarHeader/index.d.ts +8 -0
- package/dist/components/fullCalendar/fullCalendarHeader/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/index.d.ts +94 -0
- package/dist/components/fullCalendar/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/monthlyCalendar/index.d.ts +3 -0
- package/dist/components/fullCalendar/monthlyCalendar/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.d.ts +9 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.d.ts +4 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.d.ts +8 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.d.ts +4 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.d.ts +10 -0
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/weekCalendar/index.d.ts +3 -0
- package/dist/components/fullCalendar/weekCalendar/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarEvent/index.d.ts +10 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarEvent/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.d.ts +4 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.d.ts +8 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.d.ts +4 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.d.ts.map +1 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.d.ts +11 -0
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.d.ts.map +1 -0
- package/dist/components/googleAnalytics/googleAnalytics.client.d.ts +6 -0
- package/dist/components/googleAnalytics/googleAnalytics.client.d.ts.map +1 -0
- package/dist/components/googleAnalytics/googleAnalytics.d.ts +10 -0
- package/dist/components/googleAnalytics/googleAnalytics.d.ts.map +1 -0
- package/dist/components/googleAnalytics/index.d.ts +30 -0
- package/dist/components/googleAnalytics/index.d.ts.map +1 -0
- package/dist/components/googleAnalytics/snippets/generateGAElements.d.ts +9 -0
- package/dist/components/googleAnalytics/snippets/generateGAElements.d.ts.map +1 -0
- package/dist/components/googleTagManager/googleTagManager.client.d.ts +11 -0
- package/dist/components/googleTagManager/googleTagManager.client.d.ts.map +1 -0
- package/dist/components/googleTagManager/googleTagManager.d.ts +20 -0
- package/dist/components/googleTagManager/googleTagManager.d.ts.map +1 -0
- package/dist/components/googleTagManager/index.d.ts +55 -0
- package/dist/components/googleTagManager/index.d.ts.map +1 -0
- package/dist/components/googleTagManager/snippets/appendToDataLayer.d.ts +7 -0
- package/dist/components/googleTagManager/snippets/appendToDataLayer.d.ts.map +1 -0
- package/dist/components/googleTagManager/snippets/generateGTMElements.d.ts +15 -0
- package/dist/components/googleTagManager/snippets/generateGTMElements.d.ts.map +1 -0
- package/dist/components/iconButton/index.d.ts +35 -19
- package/dist/components/iconButton/index.d.ts.map +1 -1
- package/dist/components/imageUpload/hasFileContent/index.d.ts +1 -1
- package/dist/components/imageUpload/hasFileContent/index.d.ts.map +1 -1
- package/dist/components/imageUpload/index.d.ts +51 -75
- package/dist/components/imageUpload/index.d.ts.map +1 -1
- package/dist/components/imageUpload/noFileContent/index.d.ts +1 -1
- package/dist/components/imageUpload/noFileContent/index.d.ts.map +1 -1
- package/dist/components/input/index.d.ts +58 -47
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/mapView/index.d.ts +55 -7
- package/dist/components/mapView/index.d.ts.map +1 -1
- package/dist/components/mapView/mapView.client.d.ts +17 -0
- package/dist/components/mapView/mapView.client.d.ts.map +1 -0
- package/dist/components/maskedInput/index.d.ts +71 -56
- package/dist/components/maskedInput/index.d.ts.map +1 -1
- package/dist/components/modal/modalContainer/index.d.ts +19 -59
- package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
- package/dist/components/modal/modalContext.d.ts +2 -2
- package/dist/components/modal/modalContext.d.ts.map +1 -1
- package/dist/components/modal/modalFooter/index.d.ts +19 -52
- package/dist/components/modal/modalFooter/index.d.ts.map +1 -1
- package/dist/components/modal/modalHeader/index.d.ts +15 -49
- package/dist/components/modal/modalHeader/index.d.ts.map +1 -1
- package/dist/components/multiSelect/index.d.ts +72 -63
- package/dist/components/multiSelect/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectChevron/index.d.ts +1 -1
- package/dist/components/multiSelect/multiSelectChevron/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectContainer/index.d.ts +2 -2
- package/dist/components/multiSelect/multiSelectContainer/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectContent/index.d.ts +2 -2
- package/dist/components/multiSelect/multiSelectContent/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectMark/index.d.ts +1 -1
- package/dist/components/multiSelect/multiSelectMark/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectOption/index.d.ts +1 -1
- package/dist/components/multiSelect/multiSelectOption/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts +2 -2
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectOverlay/index.d.ts +1 -1
- package/dist/components/multiSelect/multiSelectOverlay/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectSpinner/index.d.ts +1 -1
- package/dist/components/multiSelect/multiSelectSpinner/index.d.ts.map +1 -1
- package/dist/components/pagination/chevronButton/index.d.ts +1 -1
- package/dist/components/pagination/chevronButton/index.d.ts.map +1 -1
- package/dist/components/pagination/currentButton/index.d.ts +1 -1
- package/dist/components/pagination/currentButton/index.d.ts.map +1 -1
- package/dist/components/pagination/index.d.ts +20 -11
- package/dist/components/pagination/index.d.ts.map +1 -1
- package/dist/components/pagination/pageButton/index.d.ts +1 -1
- package/dist/components/pagination/pageButton/index.d.ts.map +1 -1
- package/dist/components/pagination/paginationService.d.ts.map +1 -1
- package/dist/components/pagination/spread/index.d.ts +1 -1
- package/dist/components/pagination/spread/index.d.ts.map +1 -1
- package/dist/components/phoneInput/index.d.ts +68 -89
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputContainer/index.d.ts +2 -2
- package/dist/components/phoneInput/phoneInputContainer/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputCountriesOverlay/index.d.ts +1 -1
- package/dist/components/phoneInput/phoneInputCountriesOverlay/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputCountryOption/index.d.ts +2 -3
- package/dist/components/phoneInput/phoneInputCountryOption/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputCountryOptionsContainer/index.d.ts +2 -2
- package/dist/components/phoneInput/phoneInputCountryOptionsContainer/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputCountrySelector/index.d.ts +2 -3
- package/dist/components/phoneInput/phoneInputCountrySelector/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputMask/index.d.ts +1 -2
- package/dist/components/phoneInput/phoneInputMask/index.d.ts.map +1 -1
- package/dist/components/popover/index.d.ts +36 -116
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/radio/radioBox/index.d.ts +19 -67
- package/dist/components/radio/radioBox/index.d.ts.map +1 -1
- package/dist/components/radio/radioContext.d.ts +2 -2
- package/dist/components/radio/radioContext.d.ts.map +1 -1
- package/dist/components/radio/radioGroup/index.d.ts +40 -67
- package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
- package/dist/components/richText/blockButton/index.d.ts +3 -3
- package/dist/components/richText/blockButton/index.d.ts.map +1 -1
- package/dist/components/richText/element/index.d.ts +2 -2
- package/dist/components/richText/element/index.d.ts.map +1 -1
- package/dist/components/richText/index.d.ts +35 -47
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/insertImage/index.d.ts +2 -2
- package/dist/components/richText/insertImage/index.d.ts.map +1 -1
- package/dist/components/richText/insertVideo/index.d.ts +5 -0
- package/dist/components/richText/insertVideo/index.d.ts.map +1 -0
- package/dist/components/richText/leaf/index.d.ts +2 -2
- package/dist/components/richText/leaf/index.d.ts.map +1 -1
- package/dist/components/richText/markButton/index.d.ts +3 -3
- package/dist/components/richText/markButton/index.d.ts.map +1 -1
- package/dist/components/richText/toolbar/index.d.ts +2 -2
- package/dist/components/richText/toolbar/index.d.ts.map +1 -1
- package/dist/components/searchPlaces.d.ts +55 -52
- package/dist/components/searchPlaces.d.ts.map +1 -1
- package/dist/components/select/index.d.ts +73 -64
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/selectChevron/index.d.ts +1 -1
- package/dist/components/select/selectChevron/index.d.ts.map +1 -1
- package/dist/components/select/selectContainer/index.d.ts +2 -2
- package/dist/components/select/selectContainer/index.d.ts.map +1 -1
- package/dist/components/select/selectContent/index.d.ts +2 -2
- package/dist/components/select/selectContent/index.d.ts.map +1 -1
- package/dist/components/select/selectOption/index.d.ts +1 -1
- package/dist/components/select/selectOption/index.d.ts.map +1 -1
- package/dist/components/select/selectOptionsContainer/index.d.ts +2 -2
- package/dist/components/select/selectOptionsContainer/index.d.ts.map +1 -1
- package/dist/components/select/selectOverlay/index.d.ts +1 -1
- package/dist/components/select/selectOverlay/index.d.ts.map +1 -1
- package/dist/components/select/selectSpinner/index.d.ts +1 -1
- package/dist/components/select/selectSpinner/index.d.ts.map +1 -1
- package/dist/components/slider/index.d.ts +22 -36
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/switch/index.d.ts +46 -58
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/tab/tabButton/index.d.ts +16 -54
- package/dist/components/tab/tabButton/index.d.ts.map +1 -1
- package/dist/components/tab/tabContainer/index.d.ts +18 -60
- package/dist/components/tab/tabContainer/index.d.ts.map +1 -1
- package/dist/components/tab/tabContext.d.ts +2 -2
- package/dist/components/tab/tabContext.d.ts.map +1 -1
- package/dist/components/table/tableBody/index.d.ts +15 -49
- package/dist/components/table/tableBody/index.d.ts.map +1 -1
- package/dist/components/table/tableCaption/index.d.ts +8 -48
- package/dist/components/table/tableCaption/index.d.ts.map +1 -1
- package/dist/components/table/tableContainer/index.d.ts +14 -43
- package/dist/components/table/tableContainer/index.d.ts.map +1 -1
- package/dist/components/table/tableFooter/index.d.ts +7 -31
- package/dist/components/table/tableFooter/index.d.ts.map +1 -1
- package/dist/components/table/tableHeader/index.d.ts +6 -27
- package/dist/components/table/tableHeader/index.d.ts.map +1 -1
- package/dist/components/textarea/index.d.ts +36 -68
- package/dist/components/textarea/index.d.ts.map +1 -1
- package/dist/components/tooltip/index.d.ts +29 -57
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/hooks/useAutomation.d.ts +22 -25
- package/dist/hooks/useAutomation.d.ts.map +1 -1
- package/dist/hooks/useDrawer.d.ts +20 -65
- package/dist/hooks/useDrawer.d.ts.map +1 -1
- package/dist/hooks/useForm.d.ts +12 -29
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useHydrated.d.ts +8 -63
- package/dist/hooks/useHydrated.d.ts.map +1 -1
- package/dist/hooks/useModal.d.ts +20 -60
- package/dist/hooks/useModal.d.ts.map +1 -1
- package/dist/hooks/useScopedParams.d.ts +18 -70
- package/dist/hooks/useScopedParams.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.d.ts +11 -27
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useSearchAutomation.d.ts +31 -0
- package/dist/hooks/useSearchAutomation.d.ts.map +1 -0
- package/dist/hooks/useSlider.d.ts +5 -19
- package/dist/hooks/useSlider.d.ts.map +1 -1
- package/dist/hooks/useToast.d.ts +8 -52
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4391 -69
- package/dist/index.js.map +1 -0
- package/dist/modules/components/alert/alertContainer/index.js +29 -0
- package/dist/modules/components/alert/alertContainer/index.js.map +1 -0
- package/dist/modules/components/alert/alertContainer/styles.css +3 -0
- package/dist/modules/components/alert/alertContent/index.js +14 -0
- package/dist/modules/components/alert/alertContent/index.js.map +1 -0
- package/dist/modules/components/alert/alertContent/styles.css +1 -0
- package/dist/modules/components/alert/alertDescription/index.js +14 -0
- package/dist/modules/components/alert/alertDescription/index.js.map +1 -0
- package/dist/modules/components/alert/alertDescription/styles.css +1 -0
- package/dist/modules/components/alert/alertIcon/index.js +30 -0
- package/dist/modules/components/alert/alertIcon/index.js.map +1 -0
- package/dist/modules/components/alert/alertIcon/styles.css +7 -0
- package/dist/modules/components/alert/alertTitle/index.js +14 -0
- package/dist/modules/components/alert/alertTitle/index.js.map +1 -0
- package/dist/modules/components/alert/alertTitle/styles.css +1 -0
- package/dist/modules/components/audioPlayer/index.js +77 -0
- package/dist/modules/components/audioPlayer/index.js.map +1 -0
- package/dist/modules/components/audioPlayer/styles.css +3 -0
- package/dist/modules/components/audioUpload/hasFileContent/index.js +57 -0
- package/dist/modules/components/audioUpload/hasFileContent/index.js.map +1 -0
- package/dist/modules/components/audioUpload/hasFileContent/styles.css +1 -0
- package/dist/modules/components/audioUpload/index.js +74 -0
- package/dist/modules/components/audioUpload/index.js.map +1 -0
- package/dist/modules/components/audioUpload/noFileContent/index.js +38 -0
- package/dist/modules/components/audioUpload/noFileContent/index.js.map +1 -0
- package/dist/modules/components/audioUpload/noFileContent/styles.css +1 -0
- package/dist/modules/components/audioUpload/styles.css +25 -0
- package/dist/modules/components/badge/index.js +29 -0
- package/dist/modules/components/badge/index.js.map +1 -0
- package/dist/modules/components/badge/styles.css +1 -0
- package/dist/modules/components/button/index.js +42 -0
- package/dist/modules/components/button/index.js.map +1 -0
- package/dist/modules/components/button/styles.css +1 -0
- package/dist/modules/components/calendar/_calendarProvider.js +42 -0
- package/dist/modules/components/calendar/_calendarProvider.js.map +1 -0
- package/dist/modules/components/calendar/_viewService.js +135 -0
- package/dist/modules/components/calendar/_viewService.js.map +1 -0
- package/dist/modules/components/calendar/calendarContainer/index.js +13 -0
- package/dist/modules/components/calendar/calendarContainer/index.js.map +1 -0
- package/dist/modules/components/calendar/calendarContainer/styles.css +1 -0
- package/dist/modules/components/calendar/calendarHeader/index.js +58 -0
- package/dist/modules/components/calendar/calendarHeader/index.js.map +1 -0
- package/dist/modules/components/calendar/calendarHeader/styles.css +1 -0
- package/dist/modules/components/calendar/calendarTableBody/index.js +15 -0
- package/dist/modules/components/calendar/calendarTableBody/index.js.map +1 -0
- package/dist/modules/components/calendar/calendarTableBody/styles.css +1 -0
- package/dist/modules/components/calendar/calendarTableContainer/index.js +13 -0
- package/dist/modules/components/calendar/calendarTableContainer/index.js.map +1 -0
- package/dist/modules/components/calendar/calendarTableContainer/styles.css +1 -0
- package/dist/modules/components/calendar/calendarTableHeader/index.js +16 -0
- package/dist/modules/components/calendar/calendarTableHeader/index.js.map +1 -0
- package/dist/modules/components/calendar/calendarTableHeader/styles.css +1 -0
- package/dist/modules/components/calendar/calendarTableTd/index.js +23 -0
- package/dist/modules/components/calendar/calendarTableTd/index.js.map +1 -0
- package/dist/modules/components/calendar/calendarTableTd/styles.css +1 -0
- package/dist/modules/components/calendar/index.js +34 -0
- package/dist/modules/components/calendar/index.js.map +1 -0
- package/dist/modules/components/calendar/styles.css +33 -0
- package/dist/modules/components/cardTab/cardTabButton/index.js +22 -0
- package/dist/modules/components/cardTab/cardTabButton/index.js.map +1 -0
- package/dist/modules/components/cardTab/cardTabButton/styles.css +1 -0
- package/dist/modules/components/cardTab/cardTabContainer/index.js +25 -0
- package/dist/modules/components/cardTab/cardTabContainer/index.js.map +1 -0
- package/dist/modules/components/cardTab/cardTabContainer/styles.css +1 -0
- package/dist/modules/components/cardTab/cardTabContext.js +26 -0
- package/dist/modules/components/cardTab/cardTabContext.js.map +1 -0
- package/dist/modules/components/checkbox/index.js +40 -0
- package/dist/modules/components/checkbox/index.js.map +1 -0
- package/dist/modules/components/checkbox/styles.css +7 -0
- package/dist/modules/components/clientOnly.js +10 -0
- package/dist/modules/components/clientOnly.js.map +1 -0
- package/dist/modules/components/currencyInput/index.js +114 -0
- package/dist/modules/components/currencyInput/index.js.map +1 -0
- package/dist/modules/components/currencyInput/style.css +1 -0
- package/dist/modules/components/currencyInput/styles.css +7 -0
- package/dist/modules/components/divider/index.js +14 -0
- package/dist/modules/components/divider/index.js.map +1 -0
- package/dist/modules/components/divider/styles.css +1 -0
- package/dist/modules/components/drawer/drawerContainer/index.js +39 -0
- package/dist/modules/components/drawer/drawerContainer/index.js.map +1 -0
- package/dist/modules/components/drawer/drawerContainer/styles.css +1 -0
- package/dist/modules/components/drawer/drawerContext.js +18 -0
- package/dist/modules/components/drawer/drawerContext.js.map +1 -0
- package/dist/modules/components/drawer/drawerHeader/index.js +23 -0
- package/dist/modules/components/drawer/drawerHeader/index.js.map +1 -0
- package/dist/modules/components/drawer/drawerHeader/styles.css +1 -0
- package/dist/modules/components/facebookPixel/facebookPixel.client.js +10 -0
- package/dist/modules/components/facebookPixel/facebookPixel.client.js.map +1 -0
- package/dist/modules/components/facebookPixel/index.js +11 -0
- package/dist/modules/components/facebookPixel/index.js.map +1 -0
- package/dist/modules/components/facebookPixel/pixel.js +50 -0
- package/dist/modules/components/facebookPixel/pixel.js.map +1 -0
- package/dist/modules/components/fieldError/index.js +15 -0
- package/dist/modules/components/fieldError/index.js.map +1 -0
- package/dist/modules/components/fieldError/styles.css +1 -0
- package/dist/modules/components/fieldLabel/index.js +14 -0
- package/dist/modules/components/fieldLabel/index.js.map +1 -0
- package/dist/modules/components/fieldLabel/styles.css +1 -0
- package/dist/modules/components/fieldWrapper/index.js +15 -0
- package/dist/modules/components/fieldWrapper/index.js.map +1 -0
- package/dist/modules/components/fieldWrapper/styles.css +1 -0
- package/dist/modules/components/fileUpload/hasFileContent/index.js +62 -0
- package/dist/modules/components/fileUpload/hasFileContent/index.js.map +1 -0
- package/dist/modules/components/fileUpload/hasFileContent/styles.css +1 -0
- package/dist/modules/components/fileUpload/index.js +68 -0
- package/dist/modules/components/fileUpload/index.js.map +1 -0
- package/dist/modules/components/fileUpload/noFileContent/index.js +38 -0
- package/dist/modules/components/fileUpload/noFileContent/index.js.map +1 -0
- package/dist/modules/components/fileUpload/noFileContent/styles.css +1 -0
- package/dist/modules/components/fileUpload/styles.css +19 -0
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +37 -0
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js.map +1 -0
- package/dist/modules/components/fullCalendar/_viewService.js +103 -0
- package/dist/modules/components/fullCalendar/_viewService.js.map +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +13 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/styles.css +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +73 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/styles.css +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +31 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/styles.css +1 -0
- package/dist/modules/components/fullCalendar/dayCalendar/index.js +16 -0
- package/dist/modules/components/fullCalendar/dayCalendar/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +13 -0
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/fullCalendarContainer/styles.css +1 -0
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +71 -0
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/fullCalendarHeader/styles.css +1 -0
- package/dist/modules/components/fullCalendar/index.js +33 -0
- package/dist/modules/components/fullCalendar/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +12 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +31 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/styles.css +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +15 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/styles.css +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +13 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/styles.css +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +16 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/styles.css +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +38 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/styles.css +1 -0
- package/dist/modules/components/fullCalendar/styles.css +35 -0
- package/dist/modules/components/fullCalendar/weekCalendar/index.js +12 -0
- package/dist/modules/components/fullCalendar/weekCalendar/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +73 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/styles.css +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +20 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/styles.css +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +13 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/styles.css +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +19 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/styles.css +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +37 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js.map +1 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/styles.css +1 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +9 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.client.js.map +1 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.js +20 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.js.map +1 -0
- package/dist/modules/components/googleAnalytics/index.js +12 -0
- package/dist/modules/components/googleAnalytics/index.js.map +1 -0
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +16 -0
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js.map +1 -0
- package/dist/modules/components/googleTagManager/googleTagManager.client.js +9 -0
- package/dist/modules/components/googleTagManager/googleTagManager.client.js.map +1 -0
- package/dist/modules/components/googleTagManager/googleTagManager.js +47 -0
- package/dist/modules/components/googleTagManager/googleTagManager.js.map +1 -0
- package/dist/modules/components/googleTagManager/index.js +19 -0
- package/dist/modules/components/googleTagManager/index.js.map +1 -0
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +11 -0
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js.map +1 -0
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +25 -0
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js.map +1 -0
- package/dist/modules/components/iconButton/index.js +34 -0
- package/dist/modules/components/iconButton/index.js.map +1 -0
- package/dist/modules/components/iconButton/styles.css +1 -0
- package/dist/modules/components/imageUpload/hasFileContent/index.js +49 -0
- package/dist/modules/components/imageUpload/hasFileContent/index.js.map +1 -0
- package/dist/modules/components/imageUpload/hasFileContent/styles.css +1 -0
- package/dist/modules/components/imageUpload/index.js +68 -0
- package/dist/modules/components/imageUpload/index.js.map +1 -0
- package/dist/modules/components/imageUpload/noFileContent/index.js +38 -0
- package/dist/modules/components/imageUpload/noFileContent/index.js.map +1 -0
- package/dist/modules/components/imageUpload/noFileContent/styles.css +1 -0
- package/dist/modules/components/imageUpload/styles.css +17 -0
- package/dist/modules/components/input/index.js +95 -0
- package/dist/modules/components/input/index.js.map +1 -0
- package/dist/modules/components/input/style.css +1 -0
- package/dist/modules/components/input/styles.css +7 -0
- package/dist/modules/components/mapView/index.js +31 -0
- package/dist/modules/components/mapView/index.js.map +1 -0
- package/dist/modules/components/mapView/mapView.client.js +58 -0
- package/dist/modules/components/mapView/mapView.client.js.map +1 -0
- package/dist/modules/components/mapView/mapbox.css +1 -0
- package/dist/modules/components/mapView/styles.css +1 -0
- package/dist/modules/components/maskedInput/index.js +104 -0
- package/dist/modules/components/maskedInput/index.js.map +1 -0
- package/dist/modules/components/maskedInput/style.css +1 -0
- package/dist/modules/components/maskedInput/styles.css +7 -0
- package/dist/modules/components/modal/modalContainer/index.js +38 -0
- package/dist/modules/components/modal/modalContainer/index.js.map +1 -0
- package/dist/modules/components/modal/modalContainer/styles.css +1 -0
- package/dist/modules/components/modal/modalContext.js +18 -0
- package/dist/modules/components/modal/modalContext.js.map +1 -0
- package/dist/modules/components/modal/modalFooter/index.js +14 -0
- package/dist/modules/components/modal/modalFooter/index.js.map +1 -0
- package/dist/modules/components/modal/modalFooter/styles.css +1 -0
- package/dist/modules/components/modal/modalHeader/index.js +23 -0
- package/dist/modules/components/modal/modalHeader/index.js.map +1 -0
- package/dist/modules/components/modal/modalHeader/styles.css +1 -0
- package/dist/modules/components/multiSelect/index.js +118 -0
- package/dist/modules/components/multiSelect/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js +21 -0
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectChevron/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +16 -0
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectContainer/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectContent/index.js +14 -0
- package/dist/modules/components/multiSelect/multiSelectContent/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectContent/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectMark/index.js +22 -0
- package/dist/modules/components/multiSelect/multiSelectMark/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectMark/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +20 -0
- package/dist/modules/components/multiSelect/multiSelectOption/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectOption/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +38 -0
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +14 -0
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectOverlay/styles.css +1 -0
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +16 -0
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js.map +1 -0
- package/dist/modules/components/multiSelect/multiSelectSpinner/styles.css +1 -0
- package/dist/modules/components/multiSelect/styles.css +31 -0
- package/dist/modules/components/pagination/chevronButton/index.js +21 -0
- package/dist/modules/components/pagination/chevronButton/index.js.map +1 -0
- package/dist/modules/components/pagination/chevronButton/styles.css +1 -0
- package/dist/modules/components/pagination/currentButton/index.js +15 -0
- package/dist/modules/components/pagination/currentButton/index.js.map +1 -0
- package/dist/modules/components/pagination/currentButton/styles.css +1 -0
- package/dist/modules/components/pagination/index.js +54 -0
- package/dist/modules/components/pagination/index.js.map +1 -0
- package/dist/modules/components/pagination/pageButton/index.js +16 -0
- package/dist/modules/components/pagination/pageButton/index.js.map +1 -0
- package/dist/modules/components/pagination/pageButton/styles.css +1 -0
- package/dist/modules/components/pagination/paginationService.js +36 -0
- package/dist/modules/components/pagination/paginationService.js.map +1 -0
- package/dist/modules/components/pagination/spread/index.js +14 -0
- package/dist/modules/components/pagination/spread/index.js.map +1 -0
- package/dist/modules/components/pagination/spread/styles.css +1 -0
- package/dist/modules/components/pagination/styles.css +9 -0
- package/dist/modules/components/phoneInput/index.js +106 -0
- package/dist/modules/components/phoneInput/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js +15 -0
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputContainer/styles.css +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +14 -0
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/styles.css +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +26 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOption/styles.css +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +36 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/styles.css +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +28 -0
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/styles.css +1 -0
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +55 -0
- package/dist/modules/components/phoneInput/phoneInputMask/index.js.map +1 -0
- package/dist/modules/components/phoneInput/phoneInputMask/style.css +1 -0
- package/dist/modules/components/phoneInput/styles.css +19 -0
- package/dist/modules/components/popover/index.js +32 -0
- package/dist/modules/components/popover/index.js.map +1 -0
- package/dist/modules/components/popover/styles.css +1 -0
- package/dist/modules/components/radio/radioBox/index.js +27 -0
- package/dist/modules/components/radio/radioBox/index.js.map +1 -0
- package/dist/modules/components/radio/radioBox/styles.css +1 -0
- package/dist/modules/components/radio/radioContext.js +24 -0
- package/dist/modules/components/radio/radioContext.js.map +1 -0
- package/dist/modules/components/radio/radioGroup/index.js +44 -0
- package/dist/modules/components/radio/radioGroup/index.js.map +1 -0
- package/dist/modules/components/radio/radioGroup/styles.css +7 -0
- package/dist/modules/components/richText/blockButton/index.js +23 -0
- package/dist/modules/components/richText/blockButton/index.js.map +1 -0
- package/dist/modules/components/richText/blockButton/styles.css +1 -0
- package/dist/modules/components/richText/element/index.js +75 -0
- package/dist/modules/components/richText/element/index.js.map +1 -0
- package/dist/modules/components/richText/element/styles.css +1 -0
- package/dist/modules/components/richText/index.js +144 -0
- package/dist/modules/components/richText/index.js.map +1 -0
- package/dist/modules/components/richText/insertImage/index.js +97 -0
- package/dist/modules/components/richText/insertImage/index.js.map +1 -0
- package/dist/modules/components/richText/insertImage/styles.css +1 -0
- package/dist/modules/components/richText/insertVideo/index.js +88 -0
- package/dist/modules/components/richText/insertVideo/index.js.map +1 -0
- package/dist/modules/components/richText/insertVideo/styles.css +1 -0
- package/dist/modules/components/richText/leaf/index.js +12 -0
- package/dist/modules/components/richText/leaf/index.js.map +1 -0
- package/dist/modules/components/richText/markButton/index.js +22 -0
- package/dist/modules/components/richText/markButton/index.js.map +1 -0
- package/dist/modules/components/richText/markButton/styles.css +1 -0
- package/dist/modules/components/richText/styles.css +67 -0
- package/dist/modules/components/richText/toolbar/index.js +13 -0
- package/dist/modules/components/richText/toolbar/index.js.map +1 -0
- package/dist/modules/components/richText/toolbar/styles.css +1 -0
- package/dist/modules/components/searchPlaces.js +60 -0
- package/dist/modules/components/searchPlaces.js.map +1 -0
- package/dist/modules/components/select/index.js +115 -0
- package/dist/modules/components/select/index.js.map +1 -0
- package/dist/modules/components/select/selectChevron/index.js +21 -0
- package/dist/modules/components/select/selectChevron/index.js.map +1 -0
- package/dist/modules/components/select/selectChevron/styles.css +1 -0
- package/dist/modules/components/select/selectContainer/index.js +16 -0
- package/dist/modules/components/select/selectContainer/index.js.map +1 -0
- package/dist/modules/components/select/selectContainer/styles.css +1 -0
- package/dist/modules/components/select/selectContent/index.js +14 -0
- package/dist/modules/components/select/selectContent/index.js.map +1 -0
- package/dist/modules/components/select/selectContent/styles.css +1 -0
- package/dist/modules/components/select/selectOption/index.js +21 -0
- package/dist/modules/components/select/selectOption/index.js.map +1 -0
- package/dist/modules/components/select/selectOption/styles.css +1 -0
- package/dist/modules/components/select/selectOptionsContainer/index.js +38 -0
- package/dist/modules/components/select/selectOptionsContainer/index.js.map +1 -0
- package/dist/modules/components/select/selectOptionsContainer/styles.css +1 -0
- package/dist/modules/components/select/selectOverlay/index.js +14 -0
- package/dist/modules/components/select/selectOverlay/index.js.map +1 -0
- package/dist/modules/components/select/selectOverlay/styles.css +1 -0
- package/dist/modules/components/select/selectSpinner/index.js +16 -0
- package/dist/modules/components/select/selectSpinner/index.js.map +1 -0
- package/dist/modules/components/select/selectSpinner/styles.css +1 -0
- package/dist/modules/components/select/styles.css +29 -0
- package/dist/modules/components/slider/index.js +46 -0
- package/dist/modules/components/slider/index.js.map +1 -0
- package/dist/modules/components/slider/styles.css +1 -0
- package/dist/modules/components/switch/index.js +38 -0
- package/dist/modules/components/switch/index.js.map +1 -0
- package/dist/modules/components/switch/styles.css +7 -0
- package/dist/modules/components/tab/tabButton/index.js +22 -0
- package/dist/modules/components/tab/tabButton/index.js.map +1 -0
- package/dist/modules/components/tab/tabButton/styles.css +1 -0
- package/dist/modules/components/tab/tabContainer/index.js +25 -0
- package/dist/modules/components/tab/tabContainer/index.js.map +1 -0
- package/dist/modules/components/tab/tabContainer/styles.css +1 -0
- package/dist/modules/components/tab/tabContext.js +26 -0
- package/dist/modules/components/tab/tabContext.js.map +1 -0
- package/dist/modules/components/table/tableBody/index.js +22 -0
- package/dist/modules/components/table/tableBody/index.js.map +1 -0
- package/dist/modules/components/table/tableBody/styles.css +1 -0
- package/dist/modules/components/table/tableCaption/index.js +18 -0
- package/dist/modules/components/table/tableCaption/index.js.map +1 -0
- package/dist/modules/components/table/tableCaption/styles.css +1 -0
- package/dist/modules/components/table/tableContainer/index.js +15 -0
- package/dist/modules/components/table/tableContainer/index.js.map +1 -0
- package/dist/modules/components/table/tableContainer/styles.css +1 -0
- package/dist/modules/components/table/tableFooter/index.js +21 -0
- package/dist/modules/components/table/tableFooter/index.js.map +1 -0
- package/dist/modules/components/table/tableFooter/styles.css +1 -0
- package/dist/modules/components/table/tableHeader/index.js +15 -0
- package/dist/modules/components/table/tableHeader/index.js.map +1 -0
- package/dist/modules/components/table/tableHeader/styles.css +1 -0
- package/dist/modules/components/textarea/index.js +54 -0
- package/dist/modules/components/textarea/index.js.map +1 -0
- package/dist/modules/components/textarea/styles.css +7 -0
- package/dist/modules/components/tooltip/index.js +37 -0
- package/dist/modules/components/tooltip/index.js.map +1 -0
- package/dist/modules/components/tooltip/styles.css +1 -0
- package/dist/modules/hooks/useAutomation.js +47 -0
- package/dist/modules/hooks/useAutomation.js.map +1 -0
- package/dist/modules/hooks/useDrawer.js +20 -0
- package/dist/modules/hooks/useDrawer.js.map +1 -0
- package/dist/modules/hooks/useForm.js +10 -0
- package/dist/modules/hooks/useForm.js.map +1 -0
- package/dist/modules/hooks/useHydrated.js +12 -0
- package/dist/modules/hooks/useHydrated.js.map +1 -0
- package/dist/modules/hooks/useModal.js +20 -0
- package/dist/modules/hooks/useModal.js.map +1 -0
- package/dist/modules/hooks/useScopedParams.js +20 -0
- package/dist/modules/hooks/useScopedParams.js.map +1 -0
- package/dist/modules/hooks/useScrollLock.js +23 -0
- package/dist/modules/hooks/useScrollLock.js.map +1 -0
- package/dist/modules/hooks/useSearchAutomation.js +36 -0
- package/dist/modules/hooks/useSearchAutomation.js.map +1 -0
- package/dist/modules/hooks/useSlider.js +16 -0
- package/dist/modules/hooks/useSlider.js.map +1 -0
- package/dist/modules/hooks/useToast.js +12 -0
- package/dist/modules/hooks/useToast.js.map +1 -0
- package/dist/modules/providers/drawerProvider.js +38 -0
- package/dist/modules/providers/drawerProvider.js.map +1 -0
- package/dist/modules/providers/formProvider.js +15 -0
- package/dist/modules/providers/formProvider.js.map +1 -0
- package/dist/modules/providers/modalProvider.js +42 -0
- package/dist/modules/providers/modalProvider.js.map +1 -0
- package/dist/modules/providers/placesProvider.js +20 -0
- package/dist/modules/providers/placesProvider.js.map +1 -0
- package/dist/modules/providers/toastProvider.js +49 -0
- package/dist/modules/providers/toastProvider.js.map +1 -0
- package/dist/modules/services/extractTextFromNode.js +9 -0
- package/dist/modules/services/extractTextFromNode.js.map +1 -0
- package/dist/modules/services/fieldTemplate.js +25 -0
- package/dist/modules/services/fieldTemplate.js.map +1 -0
- package/dist/modules/services/iconRenderer.js +17 -0
- package/dist/modules/services/iconRenderer.js.map +1 -0
- package/dist/modules/services/isBlockActive.js +15 -0
- package/dist/modules/services/isBlockActive.js.map +1 -0
- package/dist/modules/services/isMarkActive.js +10 -0
- package/dist/modules/services/isMarkActive.js.map +1 -0
- package/dist/modules/services/maskCurrencyValues.js +15 -0
- package/dist/modules/services/maskCurrencyValues.js.map +1 -0
- package/dist/modules/services/toHtml.js +9 -0
- package/dist/modules/services/toHtml.js.map +1 -0
- package/dist/modules/services/toRichTextValue.js +11 -0
- package/dist/modules/services/toRichTextValue.js.map +1 -0
- package/dist/modules/services/toggleBlock.js +23 -0
- package/dist/modules/services/toggleBlock.js.map +1 -0
- package/dist/modules/services/toggleMark.js +10 -0
- package/dist/modules/services/toggleMark.js.map +1 -0
- package/dist/modules/templates/badResponses.js +16 -0
- package/dist/modules/templates/badResponses.js.map +1 -0
- package/dist/modules/templates/richTextTemplates.js +19 -0
- package/dist/modules/templates/richTextTemplates.js.map +1 -0
- package/dist/modules/templates/successResponses.js +11 -0
- package/dist/modules/templates/successResponses.js.map +1 -0
- package/dist/modules/utils/phoneInputUtilities.js +24 -0
- package/dist/modules/utils/phoneInputUtilities.js.map +1 -0
- package/dist/modules/utils/richTextUtilities.js +92 -0
- package/dist/modules/utils/richTextUtilities.js.map +1 -0
- package/dist/providers/drawerProvider.d.ts +18 -84
- package/dist/providers/drawerProvider.d.ts.map +1 -1
- package/dist/providers/formProvider.d.ts +20 -56
- package/dist/providers/formProvider.d.ts.map +1 -1
- package/dist/providers/modalProvider.d.ts +19 -80
- package/dist/providers/modalProvider.d.ts.map +1 -1
- package/dist/providers/placesProvider.d.ts +18 -13
- package/dist/providers/placesProvider.d.ts.map +1 -1
- package/dist/providers/toastProvider.d.ts +13 -24
- package/dist/providers/toastProvider.d.ts.map +1 -1
- package/dist/services/extractTextFromNode.d.ts +1 -1
- package/dist/services/extractTextFromNode.d.ts.map +1 -1
- package/dist/services/fieldTemplate.d.ts +14 -0
- package/dist/services/fieldTemplate.d.ts.map +1 -0
- package/dist/services/iconRenderer.d.ts +2 -2
- package/dist/services/iconRenderer.d.ts.map +1 -1
- package/dist/services/isBlockActive.d.ts +1 -1
- package/dist/services/isBlockActive.d.ts.map +1 -1
- package/dist/services/isMarkActive.d.ts +1 -1
- package/dist/services/isMarkActive.d.ts.map +1 -1
- package/dist/services/maskCurrencyValues.d.ts.map +1 -1
- package/dist/services/toHtml.d.ts +12 -11
- package/dist/services/toHtml.d.ts.map +1 -1
- package/dist/services/toRichTextValue.d.ts +12 -18
- package/dist/services/toRichTextValue.d.ts.map +1 -1
- package/dist/services/toggleBlock.d.ts +1 -1
- package/dist/services/toggleBlock.d.ts.map +1 -1
- package/dist/services/toggleMark.d.ts +1 -1
- package/dist/services/toggleMark.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/templates/richTextTemplates.d.ts +1 -1
- package/dist/templates/richTextTemplates.d.ts.map +1 -1
- package/dist/types/richTextTypes.d.ts +14 -3
- package/dist/types/richTextTypes.d.ts.map +1 -1
- package/dist/utils/phoneInputUtilities.d.ts +1 -1713
- package/dist/utils/phoneInputUtilities.d.ts.map +1 -1
- package/dist/utils/richTextUtilities.d.ts +1 -1
- package/dist/utils/richTextUtilities.d.ts.map +1 -1
- package/package.json +1084 -27
- package/styles.d.ts +3 -0
- package/dist/bundle.js +0 -18054
- package/dist/bundle.umd.cjs +0 -219
- package/dist/components/alert/alertContainer/index.js +0 -74
- package/dist/components/alert/alertContent/index.js +0 -47
- package/dist/components/alert/alertDescription/index.js +0 -51
- package/dist/components/alert/alertIcon/index.js +0 -66
- package/dist/components/alert/alertTitle/index.js +0 -48
- package/dist/components/audioPlayer/index.js +0 -130
- package/dist/components/audioUpload/hasFileContent/index.js +0 -26
- package/dist/components/audioUpload/index.js +0 -120
- package/dist/components/audioUpload/noFileContent/index.js +0 -29
- package/dist/components/badge/index.js +0 -49
- package/dist/components/button/index.js +0 -61
- package/dist/components/cardTab/cardTabButton/index.js +0 -80
- package/dist/components/cardTab/cardTabContainer/index.js +0 -88
- package/dist/components/cardTab/cardTabContext.js +0 -10
- package/dist/components/checkbox/index.js +0 -87
- package/dist/components/clientOnly.js +0 -86
- package/dist/components/currencyInput/index.js +0 -141
- package/dist/components/divider/index.js +0 -45
- package/dist/components/drawer/drawerContainer/index.js +0 -75
- package/dist/components/drawer/drawerContext.js +0 -10
- package/dist/components/drawer/drawerHeader/index.js +0 -58
- package/dist/components/fieldError/index.js +0 -33
- package/dist/components/fieldLabel/index.js +0 -39
- package/dist/components/fieldWrapper/index.js +0 -42
- package/dist/components/fileUpload/hasFileContent/index.js +0 -34
- package/dist/components/fileUpload/index.js +0 -127
- package/dist/components/fileUpload/noFileContent/index.js +0 -29
- package/dist/components/iconButton/index.js +0 -41
- package/dist/components/imageUpload/hasFileContent/index.js +0 -24
- package/dist/components/imageUpload/index.js +0 -149
- package/dist/components/imageUpload/noFileContent/index.js +0 -29
- package/dist/components/input/index.js +0 -114
- package/dist/components/mapView/index.js +0 -16
- package/dist/components/maskedInput/index.js +0 -131
- package/dist/components/modal/modalContainer/index.js +0 -82
- package/dist/components/modal/modalContext.js +0 -10
- package/dist/components/modal/modalFooter/index.js +0 -72
- package/dist/components/modal/modalHeader/index.js +0 -69
- package/dist/components/multiSelect/index.js +0 -169
- 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 -37
- 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 -205
- 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 -34
- package/dist/components/popover/index.js +0 -151
- package/dist/components/radio/radioBox/index.js +0 -99
- package/dist/components/radio/radioContext.js +0 -11
- package/dist/components/radio/radioGroup/index.js +0 -100
- package/dist/components/richText/blockButton/index.js +0 -18
- package/dist/components/richText/element/index.js +0 -24
- package/dist/components/richText/index.js +0 -149
- package/dist/components/richText/insertImage/index.js +0 -33
- 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 -91
- package/dist/components/select/index.js +0 -168
- 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 -97
- package/dist/components/switch/index.js +0 -100
- package/dist/components/tab/tabButton/index.js +0 -80
- package/dist/components/tab/tabContainer/index.js +0 -88
- package/dist/components/tab/tabContext.js +0 -10
- package/dist/components/table/tableBody/index.js +0 -69
- package/dist/components/table/tableCaption/index.js +0 -64
- package/dist/components/table/tableContainer/index.js +0 -66
- package/dist/components/table/tableFooter/index.js +0 -47
- package/dist/components/table/tableHeader/index.js +0 -46
- package/dist/components/textarea/index.js +0 -128
- package/dist/components/tooltip/index.js +0 -135
- package/dist/hooks/useAutomation.js +0 -67
- package/dist/hooks/useDrawer.js +0 -20
- package/dist/hooks/useForm.js +0 -52
- package/dist/hooks/useHydrated.js +0 -81
- package/dist/hooks/useModal.js +0 -20
- package/dist/hooks/useScopedParams.js +0 -107
- package/dist/hooks/useScrollLock.js +0 -68
- package/dist/hooks/useSlider.js +0 -49
- package/dist/hooks/useToast.js +0 -72
- package/dist/providers/drawerProvider.js +0 -120
- package/dist/providers/formProvider.js +0 -69
- package/dist/providers/modalProvider.js +0 -119
- package/dist/providers/placesProvider.js +0 -35
- package/dist/providers/toastProvider.js +0 -73
- package/dist/services/extractTextFromNode.js +0 -5
- 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 -21
- package/dist/services/toRichTextValue.js +0 -40
- 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 -99
- package/dist/utils/richTextUtilities.js +0 -87
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer arkyn{.arkynFieldError{color:rgb(var(--spotlight-danger,244, 63, 94));font-size:12px;font-weight:600;line-height:12px}}
|
|
2
|
+
|
|
3
|
+
@layer arkyn{.arkynFieldLabel{color:var(--text-body,#52525b);font-size:14px;font-weight:600;line-height:19.07px}.arkynFieldLabel.asteriskTrue:before{content:"* ";text-align:left;color:rgb(var(--spotlight-danger,244, 63, 94));font-size:12px;font-weight:600;line-height:16.34px}}
|
|
4
|
+
|
|
5
|
+
@layer arkyn{.arkynFieldWrapper{gap:6px;height:max-content;display:flex}.arkynFieldWrapper.horizontal{flex-direction:row;align-items:center}.arkynFieldWrapper.horizontalReverse{flex-direction:row-reverse;align-items:center;margin-right:auto}.arkynFieldWrapper.vertical{flex-direction:column;align-items:flex-start}}
|
|
6
|
+
|
|
7
|
+
@layer arkyn{.arkynPhoneInputContainer{border:1px solid #0000;border-radius:6px;outline:1px solid #0000;justify-content:start;align-items:center;gap:8px;width:100%;min-height:38px;max-height:38px;padding:0 16px;display:flex;position:relative}.arkynPhoneInputContainer:hover{cursor:text}.arkynPhoneInputContainer.opacity{opacity:.5}.arkynPhoneInputContainer.solid{border-color:var(--border,#e2e8f0);background-color:var(--input-background,#fafafa)}.arkynPhoneInputContainer.solid.errored{border-color:rgb(var(--spotlight-danger,244, 63, 94));outline-color:rgb(var(--spotlight-danger,244, 63, 94))}.arkynPhoneInputContainer:not(.opacity).solid.focused{border-color:rgb(var(--spotlight-primary,17, 109, 220));outline-color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynPhoneInputContainer.outline{border-color:var(--border,#e2e8f0)}.arkynPhoneInputContainer.outline.errored{border-color:rgb(var(--spotlight-danger,244, 63, 94));outline-color:rgb(var(--spotlight-danger,244, 63, 94))}.arkynPhoneInputContainer:not(.opacity).outline.focused{border-color:rgb(var(--spotlight-primary,17, 109, 220));outline-color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynPhoneInputContainer.md{min-height:42px;max-height:42px}.arkynPhoneInputContainer.lg{min-height:46px;max-height:46px}}
|
|
8
|
+
|
|
9
|
+
@layer arkyn{.arkynPhoneInputCountriesOverlay{z-index:5;position:fixed;inset:0}}
|
|
10
|
+
|
|
11
|
+
@layer arkyn{.arkynPhoneInputCountryOption{color:var(--text-body,#52525b);-webkit-user-select:none;user-select:none;background-color:var(--background-foreground,#fff);align-items:center;gap:10px;font-weight:400;line-height:21.79px;display:flex}.arkynPhoneInputCountryOption>span{color:var(--text-muted,#a1a1aa);font-size:14px;font-weight:300;line-height:21.79px}.arkynPhoneInputCountryOption.md{padding:8px 16px;font-size:14px}.arkynPhoneInputCountryOption.lg{padding:8px 16px;font-size:16px}.arkynPhoneInputCountryOption .flag{border-radius:4px;max-width:30px;max-height:20px}.arkynPhoneInputCountryOption .check{width:20px;height:20px;color:rgb(var(--spotlight-primary,17, 109, 220));margin-left:auto;display:none}.arkynPhoneInputCountryOption:hover{cursor:pointer;filter:brightness(.95)}.arkynPhoneInputCountryOption.active{color:var(--text-heading,#09090b);filter:brightness(.95);font-weight:600}.arkynPhoneInputCountryOption.active svg{display:unset}}
|
|
12
|
+
|
|
13
|
+
@layer arkyn{.arkynPhoneInputCountryOptionsContainer{z-index:7;border:1px solid var(--border,#e2e8f0);background-color:var(--background-foreground,#fff);border-radius:6px;flex-direction:column;flex:1;height:max-content;max-height:200px;list-style:none;display:flex;position:absolute;left:-2px;right:-2px;overflow:auto;box-shadow:0 4px 8px #0000001a}.arkynPhoneInputCountryOptionsContainer.bottom{top:calc(100% + 5px)}.arkynPhoneInputCountryOptionsContainer.top{bottom:calc(100% + 5px)}.arkynPhoneInputCountryOptionsContainer>p{text-align:center;color:var(--text-body,#52525b);padding:16px;font-size:14px;font-weight:400;line-height:21.79px}.arkynPhoneInputCountryOptionsContainerSearchSelect{border:none;border-bottom:1px solid var(--border,#e2e8f0);color:var(--text-heading,#09090b);background-color:var(--background-foreground,#fff);outline:none;padding:16px;font-size:14px}.arkynPhoneInputCountryOptionsContainerSearchSelect::placeholder{color:var(--text-muted,#a1a1aa)}}
|
|
14
|
+
|
|
15
|
+
@layer arkyn{.phoneInputSelectCountry{cursor:pointer;align-items:center;gap:8px;min-width:58px;display:flex}.phoneInputSelectCountry .flag{border-radius:4px;max-width:30px;max-height:20px}.phoneInputSelectCountry .chevronDown{min-width:12px;max-width:12px;min-height:12px;max-height:12px;color:var(--text-muted,#a1a1aa)}.phoneInputSelectCountry>.arkynDivider{min-width:1px;min-height:20px}}
|
|
16
|
+
|
|
17
|
+
@layer arkyn{.arkynDivider{background-color:var(--border,#e2e8f0);flex:1;display:block}.arkynDivider.horizontal{width:100%;min-height:1px;max-height:1px}.arkynDivider.vertical{min-width:1px;max-width:1px;height:100%}}
|
|
18
|
+
|
|
19
|
+
@layer arkyn{.phoneInputMask{width:100%;color:var(--text-heading,#09090b);background:0 0;border:none;outline:none;margin-left:8px}.phoneInputMask.md{min-height:40px;max-height:40px;font-size:14px;font-weight:400;line-height:14px}.phoneInputMask.md::placeholder{font-size:14px;font-weight:400;line-height:14px}.phoneInputMask.lg{min-height:44px;max-height:44px;font-size:16px;font-weight:400;line-height:16px}.phoneInputMask.lg::placeholder{font-size:16px;font-weight:400;line-height:16px}}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
//#region src/components/popover/index.tsx
|
|
6
|
+
function i(i) {
|
|
7
|
+
let { children: a, button: o, closeOnClick: s, className: c = "", orientation: l = "bottomLeft" } = i, [u, d] = t(!1), f = `arkynPopover ${l} ${u ? "visibleTrue" : "visibleFalse"} ${c}`;
|
|
8
|
+
function p() {
|
|
9
|
+
u || d(!0);
|
|
10
|
+
}
|
|
11
|
+
return e(u), /* @__PURE__ */ r("div", {
|
|
12
|
+
className: f,
|
|
13
|
+
onClick: p,
|
|
14
|
+
children: [
|
|
15
|
+
o,
|
|
16
|
+
/* @__PURE__ */ n("div", {
|
|
17
|
+
style: { visibility: u ? "visible" : "hidden" },
|
|
18
|
+
onClick: () => s && d(!1),
|
|
19
|
+
className: "arkynPopoverContent",
|
|
20
|
+
children: a
|
|
21
|
+
}),
|
|
22
|
+
u && /* @__PURE__ */ n("div", {
|
|
23
|
+
onClick: () => d(!1),
|
|
24
|
+
className: "arkynPopoverOverlay"
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { i as Popover };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/popover/index.tsx"],"sourcesContent":["import { type ReactNode, useState } from \"react\";\n\nimport { useScrollLock } from \"../../hooks/useScrollLock\";\nimport \"./styles.css\";\n\ntype OrientationProps =\n\t| \"bottomLeft\"\n\t| \"bottomRight\"\n\t| \"topLeft\"\n\t| \"topRight\"\n\t| \"top\"\n\t| \"left\"\n\t| \"bottom\"\n\t| \"right\";\n\ntype PopoverProps = {\n\t/** Content rendered inside the floating panel. Required. */\n\tchildren: ReactNode;\n\t/** Trigger element — clicking it opens the popover. Required. */\n\tbutton: ReactNode;\n\t/** When true, clicking the popover content also closes it. @default false */\n\tcloseOnClick?: boolean;\n\t/**\n\t * Position of the floating panel relative to the trigger.\n\t * Options: `\"bottomLeft\"` | `\"bottomRight\"` | `\"topLeft\"` | `\"topRight\"` | `\"top\"` | `\"bottom\"` | `\"left\"` | `\"right\"`.\n\t * @default \"bottomLeft\"\n\t */\n\torientation?: OrientationProps;\n\t/** Additional CSS class applied to the popover root element. */\n\tclassName?: string;\n};\n\n/**\n * Popover — floating panel that appears relative to a trigger element.\n *\n * Clicking outside the popover (or clicking the content when `closeOnClick` is set)\n * dismisses it. Locks body scroll while open.\n *\n * @param props.children - Content to display inside the panel. Required.\n * @param props.button - Trigger element that opens the popover. Required.\n * @param props.closeOnClick - Clicking the content also closes the popover. Default: false\n * @param props.orientation - Panel position relative to the trigger. Default: \"bottomLeft\"\n * @param props.className - Additional CSS class for the root element.\n *\n * @returns Popover JSX element with trigger, animated panel, and outside-click overlay.\n *\n * @example\n * ```tsx\n * // Basic dropdown menu\n * <Popover button={<Button>Options</Button>} closeOnClick>\n * <ul>\n * <li onClick={handleEdit}>Edit</li>\n * <li onClick={handleDelete}>Delete</li>\n * </ul>\n * </Popover>\n *\n * // User profile menu (bottom-right)\n * <Popover\n * button={<IconButton icon={User} aria-label=\"Account\" />}\n * orientation=\"bottomRight\"\n * closeOnClick\n * >\n * <nav>\n * <a href=\"/profile\">Profile</a>\n * <a href=\"/settings\">Settings</a>\n * <a href=\"/logout\">Sign out</a>\n * </nav>\n * </Popover>\n *\n * // Filter panel (top-left)\n * <Popover button={<Badge>Filters</Badge>} orientation=\"topLeft\">\n * <Input name=\"search\" placeholder=\"Search...\" />\n * <Select name=\"status\" options={statusOptions} />\n * </Popover>\n * ```\n */\n\nfunction Popover(props: PopoverProps) {\n\tconst {\n\t\tchildren,\n\t\tbutton,\n\t\tcloseOnClick,\n\t\tclassName: baseClassName = \"\",\n\t\torientation = \"bottomLeft\",\n\t} = props;\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst visible = isOpen ? \"visibleTrue\" : \"visibleFalse\";\n\tconst className = `arkynPopover ${orientation} ${visible} ${baseClassName}`;\n\n\tfunction handleOpenPopover() {\n\t\tif (!isOpen) setIsOpen(true);\n\t}\n\n\tuseScrollLock(isOpen);\n\n\treturn (\n\t\t<div className={className} onClick={handleOpenPopover}>\n\t\t\t{button}\n\n\t\t\t<div\n\t\t\t\tstyle={{ visibility: isOpen ? \"visible\" : \"hidden\" }}\n\t\t\t\tonClick={() => closeOnClick && setIsOpen(false)}\n\t\t\t\tclassName=\"arkynPopoverContent\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\n\t\t\t{isOpen && (\n\t\t\t\t<div onClick={() => setIsOpen(false)} className=\"arkynPopoverOverlay\" />\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport { Popover };\n"],"mappings":";;;;;AA6EA,SAAS,EAAQ,GAAqB;CACrC,IAAM,EACL,aACA,WACA,iBACA,WAAW,IAAgB,IAC3B,iBAAc,iBACX,GACE,CAAC,GAAQ,KAAa,EAAS,EAAK,GAGpC,IAAY,gBAAgB,EAAY,GAD9B,IAAS,gBAAgB,eACgB,GAAG;CAE5D,SAAS,IAAoB;EAC5B,AAAK,KAAQ,EAAU,EAAI;CAC5B;CAIA,OAFA,EAAc,CAAM,GAGnB,kBAAC,OAAD;EAAgB;EAAW,SAAS;YAApC;GACE;GAED,kBAAC,OAAD;IACC,OAAO,EAAE,YAAY,IAAS,YAAY,SAAS;IACnD,eAAe,KAAgB,EAAU,EAAK;IAC9C,WAAU;IAET;GACG,CAAA;GAEJ,KACA,kBAAC,OAAD;IAAK,eAAe,EAAU,EAAK;IAAG,WAAU;GAAuB,CAAA;EAEpE;;AAEP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynPopover{position:relative}.arkynPopoverContent{z-index:3;background-color:var(--background-foreground,#fff);border-radius:8px;position:absolute;box-shadow:3px 3px 8px #0003}.arkynPopover .arkynPopoverContent{display:none}.arkynPopover.visibleTrue .arkynPopoverContent{display:unset}.arkynPopover.bottomLeft .arkynPopoverContent{bottom:-5px;right:0;transform:translateY(100%)}.arkynPopover.bottomRight .arkynPopoverContent{bottom:-5px;left:0;transform:translateY(100%)}.arkynPopover.topLeft .arkynPopoverContent{top:-5px;right:0;transform:translateY(-100%)}.arkynPopover.topRight .arkynPopoverContent{top:-5px;left:0;transform:translateY(-100%)}.arkynPopover.bottom .arkynPopoverContent{top:calc(100% + 5px);left:50%;transform:translate(-50%)}.arkynPopover.top .arkynPopoverContent{bottom:calc(100% + 5px);left:50%;transform:translate(-50%)}.arkynPopover.left .arkynPopoverContent{bottom:50%;right:calc(100% + 5px);transform:translateY(50%)}.arkynPopover.right .arkynPopoverContent{bottom:50%;left:calc(100% + 5px);transform:translateY(50%)}.arkynPopoverOverlay{z-index:1;position:fixed;inset:0}}
|
|
@@ -0,0 +1,27 @@
|
|
|
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?.(e), f(i);
|
|
9
|
+
}
|
|
10
|
+
function S(e) {
|
|
11
|
+
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
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as RadioBox };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/radio/radioBox/index.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from \"react\";\n\nimport { useRadioGroup } from \"../radioContext\";\nimport \"./styles.css\";\n\ntype RadioBoxProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n\t/** Value submitted to the form when this option is selected. Required. */\n\tvalue: string;\n\t/** Applies error styling. Inherited from `RadioGroup` when not set. */\n\tisError?: boolean;\n\t/** Size variant. Inherits from `RadioGroup` when not set. */\n\tsize?: \"sm\" | \"md\" | \"lg\";\n};\n\n/**\n * RadioBox — individual option inside a `RadioGroup`. Renders as a `<label>` + hidden `<button>` pair.\n *\n * Reads active value, size, error state, and disabled state from `RadioGroup` context.\n * Must be used as a direct child of `RadioGroup`.\n *\n * @param props.value - Option value. Required.\n * @param props.children - Option label content (text, icons, or rich markup).\n * @param props.disabled - Disables this option (group can also disable all options).\n * @param props.size - Size override. Inherits from group by default.\n *\n * **...Other valid HTML `<button>` properties**\n *\n * @returns RadioBox JSX element.\n *\n * @example\n * ```tsx\n * <RadioGroup name=\"plan\" label=\"Choose a plan\" onChange={setPlan}>\n * <RadioBox value=\"basic\">Basic — $9/mo</RadioBox>\n * <RadioBox value=\"pro\">Pro — $29/mo</RadioBox>\n * <RadioBox value=\"enterprise\" disabled>Enterprise — contact us</RadioBox>\n * </RadioGroup>\n * ```\n */\n\nfunction RadioBox(props: RadioBoxProps) {\n\tconst {\n\t\tvalue: componentValue,\n\t\tsize: componentSize,\n\t\tdisabled,\n\t\tchildren,\n\t\tclassName: baseClassName = \"\",\n\t\tonClick,\n\t\tonFocus,\n\t\t...rest\n\t} = props;\n\n\tconst {\n\t\thandleChange,\n\t\tsize: groupSize,\n\t\tvalue,\n\t\tisError,\n\t\tdisabled: groupDisabled,\n\t} = useRadioGroup();\n\n\tconst isChecked = value === componentValue;\n\tconst size = componentSize || groupSize;\n\n\tconst isDisabled = disabled || groupDisabled;\n\n\tconst checkedClass = isChecked ? \"checkedTrue\" : \"checkedFalse\";\n\tconst errorClass = isError ? \"errorTrue\" : \"errorFalse\";\n\tconst disabledClass = isDisabled ? \"disabledTrue\" : \"disabledFalse\";\n\tconst className = `arkynRadioBox ${size} ${checkedClass} ${errorClass} ${disabledClass} ${baseClassName}`;\n\n\tfunction handleClick(event: React.MouseEvent<HTMLButtonElement>) {\n\t\tonClick?.(event);\n\t\thandleChange(componentValue);\n\t}\n\n\tfunction handleFocus(event: React.FocusEvent<HTMLButtonElement>) {\n\t\tonFocus?.(event);\n\t\thandleChange(componentValue);\n\t}\n\n\treturn (\n\t\t<label className={className.trim()}>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonFocus={handleFocus}\n\t\t\t\t{...rest}\n\t\t\t/>\n\n\t\t\t{children}\n\t\t</label>\n\t);\n}\n\nexport { RadioBox };\n"],"mappings":";;;;AAuCA,SAAS,EAAS,GAAsB;CACvC,IAAM,EACL,OAAO,GACP,MAAM,GACN,aACA,aACA,WAAW,IAAgB,IAC3B,YACA,YACA,GAAG,MACA,GAEE,EACL,iBACA,MAAM,GACN,UACA,YACA,UAAU,MACP,EAAc,GAEZ,IAAY,MAAU,GACtB,IAAO,KAAiB,GAExB,IAAa,KAAY,GAKzB,IAAY,iBAAiB,EAAK,GAHnB,IAAY,gBAAgB,eAGO,GAFrC,IAAU,cAAc,aAE2B,GADhD,IAAa,iBAAiB,gBACmC,GAAG;CAE1F,SAAS,EAAY,GAA4C;EAEhE,AADA,IAAU,CAAK,GACf,EAAa,CAAc;CAC5B;CAEA,SAAS,EAAY,GAA4C;EAEhE,AADA,IAAU,CAAK,GACf,EAAa,CAAc;CAC5B;CAEA,OACC,kBAAC,SAAD;EAAO,WAAW,EAAU,KAAK;YAAjC,CACC,kBAAC,UAAD;GACC,MAAK;GACL,UAAU;GACV,SAAS;GACT,SAAS;GACT,GAAI;EACJ,CAAA,GAEA,CACK;;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynRadioBox{color:var(--text-body,#52525b);align-items:center;gap:8px;font-size:14px;line-height:19.07px;display:flex}.arkynRadioBox>button{background-color:var(--input-background,#fafafa);border:2px solid var(--border,#e2e8f0);border-radius:99999px;position:relative}.arkynRadioBox>button:not(:disabled):hover{cursor:pointer}.arkynRadioBox.checkedTrue>button{border-color:rgb(var(--spotlight-primary,17, 109, 220))}.arkynRadioBox.errorTrue>button{border-color:rgb(var(--spotlight-danger,244, 63, 94))}.arkynRadioBox.checkedTrue>button:before{content:" ";background-color:rgb(var(--spotlight-primary,17, 109, 220));border-radius:99999px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.arkynRadioBox.sm>button{min-width:20px;max-width:20px;min-height:20px;max-height:20px}.arkynRadioBox.md>button,.arkynRadioBox.lg>button{min-width:24px;max-width:24px;min-height:24px;max-height:24px}.arkynRadioBox.checkedTrue.sm>button:before{min-width:10px;max-width:10px;min-height:10px;max-height:10px}.arkynRadioBox.checkedTrue.md>button:before,.arkynRadioBox.checkedTrue.lg>button:before{min-width:12px;max-width:12px;min-height:12px;max-height:12px}.arkynRadioBox.disabledTrue{opacity:.5}.arkynRadioBox.disabledTrue>button{cursor:not-allowed}}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function a() {
|
|
19
|
+
return t(r);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as RadioProvider, a as useRadioGroup };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=radioContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radioContext.js","names":[],"sources":["../../../../src/components/radio/radioContext.tsx"],"sourcesContent":["import { createContext, type ReactNode, useContext } from \"react\";\n\ntype RadioGroupContextType = {\n\tvalue: string;\n\tisError: boolean;\n\tsize: \"sm\" | \"md\" | \"lg\";\n\thandleChange: (value: string) => void;\n\tdisabled: boolean;\n};\n\ntype RadioProviderProps = {\n\tchildren: ReactNode;\n\tisError: boolean;\n\tsize: \"sm\" | \"md\" | \"lg\";\n\tvalue: string;\n\thandleChange: (value: string) => void;\n\tdisabled: boolean;\n};\n\nconst radioContext = createContext({} as RadioGroupContextType);\n\nfunction RadioProvider(props: RadioProviderProps) {\n\tconst { children, size, isError, handleChange, value, disabled } = props;\n\n\treturn (\n\t\t<radioContext.Provider\n\t\t\tvalue={{ handleChange, value, size, isError, disabled }}\n\t\t>\n\t\t\t{children}\n\t\t</radioContext.Provider>\n\t);\n}\n\nfunction useRadioGroup() {\n\treturn useContext(radioContext);\n}\n\nexport { RadioProvider, useRadioGroup };\n"],"mappings":";;;AAmBA,IAAM,IAAe,EAAc,CAAC,CAA0B;AAE9D,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,aAAU,SAAM,YAAS,iBAAc,UAAO,gBAAa;CAEnE,OACC,kBAAC,EAAa,UAAd;EACC,OAAO;GAAE;GAAc;GAAO;GAAM;GAAS;EAAS;EAErD;CACqB,CAAA;AAEzB;AAEA,SAAS,IAAgB;CACxB,OAAO,EAAW,CAAY;AAC/B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { o as RadioGroup };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/radio/radioGroup/index.tsx"],"sourcesContent":["import { type HTMLAttributes, useState } from \"react\";\n\nimport { useForm } from \"../../../hooks/useForm\";\nimport { FieldTemplate } from \"../../../services/fieldTemplate\";\n\nimport { RadioProvider } from \"../radioContext\";\nimport \"./styles.css\";\n\ntype RadioGroupProps = Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> & {\n\t/** Field name used for form submission. Required. */\n\tname: string;\n\t/** Label displayed above the group. */\n\tlabel?: string;\n\t/** Appends an asterisk to the label. @default false */\n\tshowAsterisk?: boolean;\n\t/** Error message shown below the group. Overrides `fieldErrors[name]` from `FormProvider`. */\n\terrorMessage?: string;\n\t/** Controlled selected value. */\n\tvalue?: string;\n\t/** Initial selected value (uncontrolled). @default \"\" */\n\tdefaultValue?: string;\n\t/** Callback fired when the selected option changes. */\n\tonChange?: (value: string) => void;\n\t/** Size variant applied to all `RadioBox` children. @default \"md\" */\n\tsize?: \"sm\" | \"md\" | \"lg\";\n\t/** Disables all `RadioBox` children. @default false */\n\tdisabled?: boolean;\n\t/** When `true`, skips the `FieldTemplate` wrapper (label, error message). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/** Layout direction of the `FieldWrapper`. @default \"horizontal\" */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n};\n\n/**\n * RadioGroup — managed group of `RadioBox` options with form integration.\n *\n * Renders a hidden `<input>` for native form submission. Reads `fieldErrors[name]` from\n * the nearest `FormProvider` when no `errorMessage` is explicitly provided.\n *\n * @param props.name - Form field name. Required.\n * @param props.label - Label displayed above the group.\n * @param props.showAsterisk - Appends `*` to the label. Default: false\n * @param props.value - Controlled selection.\n * @param props.defaultValue - Initial selection (uncontrolled). Default: `\"\"`\n * @param props.onChange - Called with the newly selected value.\n * @param props.size - Size for all child `RadioBox` elements. Default: `\"md\"`\n * @param props.disabled - Disables all options. Default: false\n * @param props.errorMessage - Validation error message.\n * @param props.unShowFieldTemplate - Omit label/error wrapper. Default: false\n *\n * **...Other valid HTML `<div>` properties**\n *\n * @returns RadioGroup JSX element.\n *\n * @example\n * ```tsx\n * // Uncontrolled with label\n * <RadioGroup name=\"gender\" label=\"Gender\" showAsterisk defaultValue=\"male\">\n * <RadioBox value=\"male\">Male</RadioBox>\n * <RadioBox value=\"female\">Female</RadioBox>\n * <RadioBox value=\"other\">Other</RadioBox>\n * </RadioGroup>\n *\n * // Controlled with change handler\n * <RadioGroup name=\"plan\" label=\"Subscription plan\" value={plan} onChange={setPlan}>\n * <RadioBox value=\"basic\">Basic — $9/mo</RadioBox>\n * <RadioBox value=\"pro\">Pro — $29/mo</RadioBox>\n * </RadioGroup>\n * ```\n */\n\nfunction RadioGroup(props: RadioGroupProps) {\n\tconst {\n\t\tdefaultValue = \"\",\n\t\tname,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\terrorMessage: baseErrorMessage,\n\t\tvalue: forceValue,\n\t\tonChange,\n\t\tsize = \"md\",\n\t\tclassName: wrapperClassName = \"\",\n\t\tdisabled = false,\n\t\tunShowFieldTemplate = false,\n\t\torientation = \"vertical\",\n\t\t...rest\n\t} = props;\n\n\tconst [value, setValue] = useState(defaultValue);\n\tconst { fieldErrors } = useForm();\n\n\tfunction handleChange(value: string) {\n\t\tsetValue(value);\n\t\tif (onChange) onChange(value);\n\t}\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst className = `arkynRadioGroup ${size}`;\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<RadioProvider\n\t\t\t\tisError={isError}\n\t\t\t\tsize={size}\n\t\t\t\tvalue={forceValue || value}\n\t\t\t\thandleChange={handleChange}\n\t\t\t\tdisabled={disabled}\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tstyle={{ display: \"none\" }}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\treadOnly\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={forceValue || value}\n\t\t\t\t/>\n\n\t\t\t\t<div className={className.trim()} {...rest} />\n\t\t\t</RadioProvider>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { RadioGroup };\n"],"mappings":";;;;;;;AAuEA,SAAS,EAAW,GAAwB;CAC3C,IAAM,EACL,kBAAe,IACf,SACA,UACA,iBACA,cAAc,GACd,OAAO,GACP,aACA,UAAO,MACP,WAAW,IAAmB,IAC9B,cAAW,IACX,yBAAsB,IACtB,iBAAc,YACd,GAAG,MACA,GAEE,CAAC,GAAO,KAAY,EAAS,CAAY,GACzC,EAAE,mBAAgB,EAAQ;CAEhC,SAAS,EAAa,GAAe;EAEpC,AADA,EAAS,CAAK,GACV,KAAU,EAAS,CAAK;CAC7B;CAEA,IAAM,IAAe,KAAoB,IAAc,IACjD,IAAU,CAAC,CAAC,GACZ,IAAY,mBAAmB;CAErC,OACC,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,GAAD;GACU;GACH;GACN,OAAO,KAAc;GACP;GACJ;aALX,CAOC,kBAAC,SAAD;IACC,OAAO,EAAE,SAAS,OAAO;IACzB,MAAK;IACL,UAAA;IACM;IACN,OAAO,KAAc;GACrB,CAAA,GAED,kBAAC,OAAD;IAAK,WAAW,EAAU,KAAK;IAAG,GAAI;GAAO,CAAA,CAC/B;;CACD,CAAA;AAEjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@layer arkyn{.arkynRadioGroup{align-items:center;gap:32px;display:flex}}
|
|
2
|
+
|
|
3
|
+
@layer arkyn{.arkynFieldError{color:rgb(var(--spotlight-danger,244, 63, 94));font-size:12px;font-weight:600;line-height:12px}}
|
|
4
|
+
|
|
5
|
+
@layer arkyn{.arkynFieldLabel{color:var(--text-body,#52525b);font-size:14px;font-weight:600;line-height:19.07px}.arkynFieldLabel.asteriskTrue:before{content:"* ";text-align:left;color:rgb(var(--spotlight-danger,244, 63, 94));font-size:12px;font-weight:600;line-height:16.34px}}
|
|
6
|
+
|
|
7
|
+
@layer arkyn{.arkynFieldWrapper{gap:6px;height:max-content;display:flex}.arkynFieldWrapper.horizontal{flex-direction:row;align-items:center}.arkynFieldWrapper.horizontalReverse{flex-direction:row-reverse;align-items:center;margin-right:auto}.arkynFieldWrapper.vertical{flex-direction:column;align-items:flex-start}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { textAlignTypes as e } from "../../../templates/richTextTemplates.js";
|
|
2
|
+
import { isBlockActive as t } from "../../../services/isBlockActive.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 = t(s, a, e.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
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as BlockButton };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/blockButton/index.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type { MouseEvent } from \"react\";\nimport { useSlate } from \"slate-react\";\n\nimport { isBlockActive } from \"../../../services/isBlockActive\";\nimport { toggleBlock } from \"../../../services/toggleBlock\";\nimport { textAlignTypes } from \"../../../templates/richTextTemplates\";\nimport type {\n\tRichTextAlignFormatType,\n\tRichTextElementFormatType,\n} from \"../../../types/richTextTypes\";\n\nimport \"./styles.css\";\n\ntype BlockButtonProps = {\n\tformat: RichTextElementFormatType | RichTextAlignFormatType;\n\ticon: LucideIcon;\n};\n\nfunction BlockButton({ format, icon: Icon }: BlockButtonProps) {\n\tconst editor = useSlate();\n\n\tconst blockType = textAlignTypes.includes(format) ? \"align\" : \"type\";\n\tconst isActive = isBlockActive(editor, format, blockType);\n\n\tconst activeClass = isActive ? \"activeTrue\" : \"activeFalse\";\n\n\tfunction handleMouseDown(event: MouseEvent<HTMLButtonElement>) {\n\t\tevent.preventDefault();\n\t\ttoggleBlock(editor, format);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={`arkynRichTextBlockButton ${activeClass}`}\n\t\t\tonMouseDown={handleMouseDown}\n\t\t>\n\t\t\t<Icon />\n\t\t</button>\n\t);\n}\n\nexport { BlockButton };\n"],"mappings":";;;;;;;AAmBA,SAAS,EAAY,EAAE,WAAQ,MAAM,KAA0B;CAC9D,IAAM,IAAS,EAAS,GAKlB,IAFW,EAAc,GAAQ,GADrB,EAAe,SAAS,CAAM,IAAI,UAAU,MAG1C,IAAW,eAAe;CAE9C,SAAS,EAAgB,GAAsC;EAE9D,AADA,EAAM,eAAe,GACrB,EAAY,GAAQ,CAAM;CAC3B;CAEA,OACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAW,4BAA4B;EACvC,aAAa;YAEb,kBAAC,GAAD,CAAO,CAAA;CACA,CAAA;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynRichTextBlockButton{background-color:var(--background-underground,#fafafa);border:none;border-radius:4px;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.arkynRichTextBlockButton svg{width:20px;height:20px;color:var(--text-heading,#09090b)}.arkynRichTextBlockButton:hover{cursor:pointer;filter:brightness(.98)}html.dark .arkynRichTextBlockButton:hover{cursor:pointer;filter:brightness(.9)}}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/richText/element/index.tsx
|
|
4
|
+
function n({ attributes: n, children: r, element: i }) {
|
|
5
|
+
let a = { textAlign: i.align };
|
|
6
|
+
switch (i.type) {
|
|
7
|
+
case "blockQuote": return /* @__PURE__ */ e("blockquote", {
|
|
8
|
+
className: "arkynElementBlockquote",
|
|
9
|
+
style: a,
|
|
10
|
+
...n,
|
|
11
|
+
children: r
|
|
12
|
+
});
|
|
13
|
+
case "bulletedList": return /* @__PURE__ */ e("ul", {
|
|
14
|
+
className: "arkynElementBulletList",
|
|
15
|
+
style: a,
|
|
16
|
+
...n,
|
|
17
|
+
children: r
|
|
18
|
+
});
|
|
19
|
+
case "headingOne": return /* @__PURE__ */ e("h1", {
|
|
20
|
+
className: "arkynElementHeadingOne",
|
|
21
|
+
style: a,
|
|
22
|
+
...n,
|
|
23
|
+
children: r
|
|
24
|
+
});
|
|
25
|
+
case "headingTwo": return /* @__PURE__ */ e("h2", {
|
|
26
|
+
className: "arkynElementHeadingTwo",
|
|
27
|
+
style: a,
|
|
28
|
+
...n,
|
|
29
|
+
children: r
|
|
30
|
+
});
|
|
31
|
+
case "listItem": return /* @__PURE__ */ e("li", {
|
|
32
|
+
className: "arkynElementListItem",
|
|
33
|
+
style: a,
|
|
34
|
+
...n,
|
|
35
|
+
children: r
|
|
36
|
+
});
|
|
37
|
+
case "numberedList": return /* @__PURE__ */ e("ol", {
|
|
38
|
+
className: "arkynElementNumberedList",
|
|
39
|
+
style: a,
|
|
40
|
+
...n,
|
|
41
|
+
children: r
|
|
42
|
+
});
|
|
43
|
+
case "image": return /* @__PURE__ */ t("div", {
|
|
44
|
+
style: a,
|
|
45
|
+
...n,
|
|
46
|
+
children: [/* @__PURE__ */ e("img", {
|
|
47
|
+
className: "arkynElementImage",
|
|
48
|
+
alt: "arkynElementImage",
|
|
49
|
+
src: i?.src || ""
|
|
50
|
+
}), r]
|
|
51
|
+
});
|
|
52
|
+
case "video": return /* @__PURE__ */ t("div", {
|
|
53
|
+
style: a,
|
|
54
|
+
...n,
|
|
55
|
+
children: [/* @__PURE__ */ e("iframe", {
|
|
56
|
+
className: "arkynElementVideo",
|
|
57
|
+
src: i?.src || "",
|
|
58
|
+
title: "YouTube video player",
|
|
59
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
60
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
61
|
+
allowFullScreen: !0
|
|
62
|
+
}), r]
|
|
63
|
+
});
|
|
64
|
+
default: return /* @__PURE__ */ e("p", {
|
|
65
|
+
className: "arkynElementParagraph",
|
|
66
|
+
style: a,
|
|
67
|
+
...n,
|
|
68
|
+
children: r
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { n as Element };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/element/index.tsx"],"sourcesContent":["import type { RenderElementProps } from \"slate-react\";\nimport \"./styles.css\";\n\nfunction Element({ attributes, children, element }: RenderElementProps) {\n\tconst style = { textAlign: element.align };\n\n\tswitch (element.type) {\n\t\tcase \"blockQuote\":\n\t\t\treturn (\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName=\"arkynElementBlockquote\"\n\t\t\t\t\tstyle={style}\n\t\t\t\t\t{...attributes}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</blockquote>\n\t\t\t);\n\t\tcase \"bulletedList\":\n\t\t\treturn (\n\t\t\t\t<ul className=\"arkynElementBulletList\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</ul>\n\t\t\t);\n\t\tcase \"headingOne\":\n\t\t\treturn (\n\t\t\t\t<h1 className=\"arkynElementHeadingOne\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</h1>\n\t\t\t);\n\t\tcase \"headingTwo\":\n\t\t\treturn (\n\t\t\t\t<h2 className=\"arkynElementHeadingTwo\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</h2>\n\t\t\t);\n\t\tcase \"listItem\":\n\t\t\treturn (\n\t\t\t\t<li className=\"arkynElementListItem\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</li>\n\t\t\t);\n\t\tcase \"numberedList\":\n\t\t\treturn (\n\t\t\t\t<ol className=\"arkynElementNumberedList\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</ol>\n\t\t\t);\n\t\tcase \"image\":\n\t\t\treturn (\n\t\t\t\t<div style={style} {...attributes}>\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName=\"arkynElementImage\"\n\t\t\t\t\t\talt=\"arkynElementImage\"\n\t\t\t\t\t\tsrc={element?.src || \"\"}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase \"video\":\n\t\t\treturn (\n\t\t\t\t<div style={style} {...attributes}>\n\t\t\t\t\t<iframe\n\t\t\t\t\t\tclassName=\"arkynElementVideo\"\n\t\t\t\t\t\tsrc={element?.src || \"\"}\n\t\t\t\t\t\ttitle=\"YouTube video player\"\n\t\t\t\t\t\tallow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n\t\t\t\t\t\treferrerPolicy=\"strict-origin-when-cross-origin\"\n\t\t\t\t\t\tallowFullScreen\n\t\t\t\t\t/>\n\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<p className=\"arkynElementParagraph\" style={style} {...attributes}>\n\t\t\t\t\t{children}\n\t\t\t\t</p>\n\t\t\t);\n\t}\n}\n\nexport { Element };\n"],"mappings":";;;AAGA,SAAS,EAAQ,EAAE,eAAY,aAAU,cAA+B;CACvE,IAAM,IAAQ,EAAE,WAAW,EAAQ,MAAM;CAEzC,QAAQ,EAAQ,MAAhB;EACC,KAAK,cACJ,OACC,kBAAC,cAAD;GACC,WAAU;GACH;GACP,GAAI;GAEH;EACU,CAAA;EAEd,KAAK,gBACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAgC;GAAO,GAAI;GACvD;EACE,CAAA;EAEN,KAAK,cACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAgC;GAAO,GAAI;GACvD;EACE,CAAA;EAEN,KAAK,cACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAgC;GAAO,GAAI;GACvD;EACE,CAAA;EAEN,KAAK,YACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAA8B;GAAO,GAAI;GACrD;EACE,CAAA;EAEN,KAAK,gBACJ,OACC,kBAAC,MAAD;GAAI,WAAU;GAAkC;GAAO,GAAI;GACzD;EACE,CAAA;EAEN,KAAK,SACJ,OACC,kBAAC,OAAD;GAAY;GAAO,GAAI;aAAvB,CACC,kBAAC,OAAD;IACC,WAAU;IACV,KAAI;IACJ,KAAK,GAAS,OAAO;GACrB,CAAA,GAEA,CACG;;EAEP,KAAK,SACJ,OACC,kBAAC,OAAD;GAAY;GAAO,GAAI;aAAvB,CACC,kBAAC,UAAD;IACC,WAAU;IACV,KAAK,GAAS,OAAO;IACrB,OAAM;IACN,OAAM;IACN,gBAAe;IACf,iBAAA;GACA,CAAA,GAEA,CACG;;EAGP,SACC,OACC,kBAAC,KAAD;GAAG,WAAU;GAA+B;GAAO,GAAI;GACrD;EACC,CAAA;CAEN;AACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynElementBlockquote,.arkynElementBulletList,.arkynElementListItem,.arkynElementNumberedList,.arkynElementParagraph{color:var(--text-body,#52525b);font-size:14px;font-weight:400}.arkynElementHeadingOne,.arkynElementHeadingTwo{color:var(--text-heading,#09090b);font-weight:600}.arkynElementHeadingOne{font-size:18px}.arkynElementHeadingTwo{font-size:16px}.arkynElementImage{max-width:100%}}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { useForm as e } from "../../hooks/useForm.js";
|
|
2
|
+
import { FieldTemplate as t } from "../../services/fieldTemplate.js";
|
|
3
|
+
import { extractTextFromNode as n } from "../../services/extractTextFromNode.js";
|
|
4
|
+
import { toggleMark as r } from "../../services/toggleMark.js";
|
|
5
|
+
import { hotKeys as i, initialValue as a } from "../../templates/richTextTemplates.js";
|
|
6
|
+
import { BlockButton as o } from "./blockButton/index.js";
|
|
7
|
+
import { Element as s } from "./element/index.js";
|
|
8
|
+
import { InsertImage as c } from "./insertImage/index.js";
|
|
9
|
+
import { InsertVideo as l } from "./insertVideo/index.js";
|
|
10
|
+
import { Leaf as u } from "./leaf/index.js";
|
|
11
|
+
import { MarkButton as d } from "./markButton/index.js";
|
|
12
|
+
import { Toolbar as ee } from "./toolbar/index.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import { useCallback as f, useId as te, useMemo as p, useRef as m, useState as h } from "react";
|
|
15
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
16
|
+
import { AlignCenter as ne, AlignJustify as re, AlignLeft as ie, AlignRight as ae, Bold as oe, Code as se, Heading1 as v, Heading2 as y, Italic as b, Quote as x, Underline as S } from "lucide-react";
|
|
17
|
+
import C from "is-hotkey";
|
|
18
|
+
import { createEditor as w } from "slate";
|
|
19
|
+
import { withHistory as T } from "slate-history";
|
|
20
|
+
import { Editable as E, Slate as D, withReact as O } from "slate-react";
|
|
21
|
+
//#region src/components/richText/index.tsx
|
|
22
|
+
function k(k) {
|
|
23
|
+
let { name: A, hiddenButtons: j, imageConfig: M, videoConfig: N, className: P = "", defaultValue: F = "[]", enforceCharacterLimit: I = !1, onChangeCharactersCount: L, baseErrorMessage: R, maxLimit: z = 1e4, onChange: B, isError: V, label: ce, showAsterisk: H, id: U, orientation: W = "vertical", unShowFieldTemplate: G = !1 } = k, K = p(() => T(O(w())), []), { fieldErrors: le } = e(), q = p(() => {
|
|
24
|
+
try {
|
|
25
|
+
let e = JSON.parse(F);
|
|
26
|
+
return !Array.isArray(e) || e.length === 0 ? structuredClone(a) : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : structuredClone(a);
|
|
27
|
+
} catch {
|
|
28
|
+
return structuredClone(a);
|
|
29
|
+
}
|
|
30
|
+
}, [F]), [J, ue] = h(n(q).length), [de, fe] = h(JSON.stringify(q) || "[]"), [pe, Y] = h(!1), me = m(null), he = te(), ge = U || he, X = R || le?.[A], _e = V || !!X, ve = f(u, []), ye = f(s, []);
|
|
31
|
+
function Z(e) {
|
|
32
|
+
let t = n(e);
|
|
33
|
+
ue(t.length), L?.(t.length), !(I && t.length >= z) && (fe(JSON.stringify(e)), B?.(e));
|
|
34
|
+
}
|
|
35
|
+
let be = `arkynRichText ${_e || z < J ? "errorTrue" : "errorFalse"} ${pe ? "focusTrue" : "focusFalse"}`, Q = z - J;
|
|
36
|
+
function $(e) {
|
|
37
|
+
return !j?.includes(e);
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ g(t, {
|
|
40
|
+
name: A,
|
|
41
|
+
label: ce,
|
|
42
|
+
showAsterisk: H,
|
|
43
|
+
className: P,
|
|
44
|
+
errorMessage: X,
|
|
45
|
+
unShowFieldTemplate: G,
|
|
46
|
+
orientation: W,
|
|
47
|
+
children: /* @__PURE__ */ _(D, {
|
|
48
|
+
editor: K,
|
|
49
|
+
initialValue: q,
|
|
50
|
+
onChange: Z,
|
|
51
|
+
onValueChange: Z,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ _("div", {
|
|
54
|
+
className: be,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ _(ee, { children: [
|
|
57
|
+
$("headingOne") && /* @__PURE__ */ g(o, {
|
|
58
|
+
format: "headingOne",
|
|
59
|
+
icon: v
|
|
60
|
+
}),
|
|
61
|
+
$("headingTwo") && /* @__PURE__ */ g(o, {
|
|
62
|
+
format: "headingTwo",
|
|
63
|
+
icon: y
|
|
64
|
+
}),
|
|
65
|
+
$("blockQuote") && /* @__PURE__ */ g(o, {
|
|
66
|
+
format: "blockQuote",
|
|
67
|
+
icon: x
|
|
68
|
+
}),
|
|
69
|
+
$("bold") && /* @__PURE__ */ g(d, {
|
|
70
|
+
format: "bold",
|
|
71
|
+
icon: oe
|
|
72
|
+
}),
|
|
73
|
+
$("italic") && /* @__PURE__ */ g(d, {
|
|
74
|
+
format: "italic",
|
|
75
|
+
icon: b
|
|
76
|
+
}),
|
|
77
|
+
$("underline") && /* @__PURE__ */ g(d, {
|
|
78
|
+
format: "underline",
|
|
79
|
+
icon: S
|
|
80
|
+
}),
|
|
81
|
+
$("code") && /* @__PURE__ */ g(d, {
|
|
82
|
+
format: "code",
|
|
83
|
+
icon: se
|
|
84
|
+
}),
|
|
85
|
+
$("left") && /* @__PURE__ */ g(o, {
|
|
86
|
+
format: "left",
|
|
87
|
+
icon: ie
|
|
88
|
+
}),
|
|
89
|
+
$("right") && /* @__PURE__ */ g(o, {
|
|
90
|
+
format: "right",
|
|
91
|
+
icon: ae
|
|
92
|
+
}),
|
|
93
|
+
$("center") && /* @__PURE__ */ g(o, {
|
|
94
|
+
format: "center",
|
|
95
|
+
icon: ne
|
|
96
|
+
}),
|
|
97
|
+
$("justify") && /* @__PURE__ */ g(o, {
|
|
98
|
+
format: "justify",
|
|
99
|
+
icon: re
|
|
100
|
+
}),
|
|
101
|
+
M && $("image") && /* @__PURE__ */ g(c, { ...M }),
|
|
102
|
+
$("video") && /* @__PURE__ */ g(l, { ...N })
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ g(E, {
|
|
105
|
+
className: "editorContainer",
|
|
106
|
+
renderElement: ye,
|
|
107
|
+
renderLeaf: ve,
|
|
108
|
+
spellCheck: !0,
|
|
109
|
+
ref: me,
|
|
110
|
+
id: ge,
|
|
111
|
+
onFocus: () => Y(!0),
|
|
112
|
+
onBlur: () => Y(!1),
|
|
113
|
+
onKeyDown: (e) => {
|
|
114
|
+
for (let t in i) if (C(t, e)) {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
let n = i[t];
|
|
117
|
+
r(K, n);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}),
|
|
121
|
+
Q < 0 && /* @__PURE__ */ g("div", {
|
|
122
|
+
className: "restatesCharacters",
|
|
123
|
+
children: Q
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ g("input", {
|
|
128
|
+
type: "hidden",
|
|
129
|
+
name: A,
|
|
130
|
+
value: de.slice(0, z)
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ g("input", {
|
|
133
|
+
type: "hidden",
|
|
134
|
+
name: `${A}Count`,
|
|
135
|
+
value: J
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
export { k as RichText };
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/richText/index.tsx"],"sourcesContent":["import isHotkey from \"is-hotkey\";\nimport {\n\tAlignCenter,\n\tAlignJustify,\n\tAlignLeft,\n\tAlignRight,\n\tBold,\n\tCode,\n\tHeading1,\n\tHeading2,\n\tItalic,\n\tQuote,\n\tUnderline,\n} from \"lucide-react\";\nimport { useCallback, useId, useMemo, useRef, useState } from \"react\";\nimport { createEditor, type Descendant } from \"slate\";\nimport { withHistory } from \"slate-history\";\nimport { Editable, Slate, withReact } from \"slate-react\";\nimport { useForm } from \"../../hooks/useForm\";\nimport { extractTextFromNode } from \"../../services/extractTextFromNode\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { toggleMark } from \"../../services/toggleMark\";\nimport { hotKeys, initialValue } from \"../../templates/richTextTemplates\";\nimport type {\n\tRichTextHiddenButtonKey,\n\tRichTextProps,\n} from \"../../types/richTextTypes\";\nimport { BlockButton } from \"./blockButton\";\nimport { Element } from \"./element\";\nimport { InsertImage } from \"./insertImage\";\nimport { InsertVideo } from \"./insertVideo\";\nimport { Leaf } from \"./leaf\";\nimport { MarkButton } from \"./markButton\";\nimport { Toolbar } from \"./toolbar\";\nimport \"./styles.css\";\n\n/**\n * RichText — WYSIWYG rich-text editor built on Slate.js with a configurable toolbar.\n *\n * **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image and video insertion.\n *\n * Editor content is stored as a Slate JSON string in a hidden `<input>` for form submission.\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.label - Label text displayed above the editor.\n * @param props.hiddenButtons - Toolbar button keys to hide (e.g. `[\"image\", \"code\"]`).\n * @param props.imageConfig - Enables image insertion; contains the upload endpoint and modal labels.\n * @param props.defaultValue - Initial editor content as a Slate JSON string. Default: \"[]\"\n * @param props.maxLimit - Maximum character count. Default: 10000\n * @param props.enforceCharacterLimit - Prevents typing past `maxLimit`. Default: false\n * @param props.onChangeCharactersCount - Callback fired on every keystroke — receives the current character count.\n * @param props.onChange - Callback fired when editor content changes — receives the Slate `Descendant[]`.\n * @param props.baseErrorMessage - Custom error message (overrides `useForm` context error).\n * @param props.isError - Forces the error visual state.\n * @param props.id - Custom id for the editable area element.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.orientation - Layout direction. Default: \"horizontal\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns RichText JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <RichText name=\"content\" />\n *\n * // With character limit and hidden toolbar buttons\n * <RichText\n * name=\"description\"\n * label=\"Description\"\n * maxLimit={500}\n * enforceCharacterLimit\n * hiddenButtons={[\"image\", \"video\", \"code\"]}\n * onChangeCharactersCount={(n) => setCharCount(n)}\n * />\n *\n * // With image upload support\n * <RichText\n * name=\"article\"\n * label=\"Article Body\"\n * imageConfig={{ action: \"/api/upload\" }}\n * />\n * ```\n */\n\nfunction RichText(props: RichTextProps) {\n\tconst {\n\t\tname,\n\t\thiddenButtons,\n\t\timageConfig,\n\t\tvideoConfig,\n\t\tclassName: wrapperClassName = \"\",\n\t\tdefaultValue = \"[]\",\n\t\tenforceCharacterLimit = false,\n\t\tonChangeCharactersCount,\n\t\tbaseErrorMessage,\n\t\tmaxLimit = 10000,\n\t\tonChange,\n\t\tisError: baseIsError,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tid,\n\t\torientation = \"vertical\",\n\t\tunShowFieldTemplate = false,\n\t} = props;\n\n\tconst editor = useMemo(() => withHistory(withReact(createEditor())), []);\n\n\tconst { fieldErrors } = useForm();\n\n\tconst defaultNodes = useMemo((): Descendant[] => {\n\t\ttry {\n\t\t\tconst parsedNodes = JSON.parse(defaultValue);\n\t\t\tif (!Array.isArray(parsedNodes) || parsedNodes.length === 0) {\n\t\t\t\treturn structuredClone(initialValue);\n\t\t\t}\n\n\t\t\tconst isValidNodes = parsedNodes.every(\n\t\t\t\t(node) =>\n\t\t\t\t\ttypeof node === \"object\" &&\n\t\t\t\t\tnode !== null &&\n\t\t\t\t\t\"type\" in node &&\n\t\t\t\t\t\"children\" in node,\n\t\t\t);\n\n\t\t\treturn isValidNodes ? parsedNodes : structuredClone(initialValue);\n\t\t} catch (_error) {\n\t\t\treturn structuredClone(initialValue);\n\t\t}\n\t}, [defaultValue]);\n\n\tconst textFromNodes = extractTextFromNode(defaultNodes);\n\n\tconst [charactersCount, setCharactersCount] = useState(textFromNodes.length);\n\tconst [inputValue, setInputValue] = useState(\n\t\tJSON.stringify(defaultNodes) || \"[]\",\n\t);\n\n\tconst [onFocus, setOnFocus] = useState(false);\n\n\tconst ref = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst inputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = baseIsError || !!errorMessage;\n\n\tconst renderLeaf = useCallback(Leaf, []);\n\tconst renderElement = useCallback(Element, []);\n\n\tfunction handleChange(value: Descendant[]) {\n\t\tconst text = extractTextFromNode(value);\n\n\t\tsetCharactersCount(text.length);\n\t\tonChangeCharactersCount?.(text.length);\n\n\t\tif (enforceCharacterLimit && text.length >= maxLimit) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetInputValue(JSON.stringify(value));\n\t\tonChange?.(value);\n\t}\n\n\tconst focusClass = onFocus ? \"focusTrue\" : \"focusFalse\";\n\tconst errorClass = isError\n\t\t? \"errorTrue\"\n\t\t: maxLimit < charactersCount\n\t\t\t? \"errorTrue\"\n\t\t\t: \"errorFalse\";\n\n\tconst className = `arkynRichText ${errorClass} ${focusClass}`;\n\n\tconst restatesCharacters = maxLimit - charactersCount;\n\n\tfunction buttonIsNotHidden(format: RichTextHiddenButtonKey) {\n\t\treturn !hiddenButtons?.includes(format);\n\t}\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<Slate\n\t\t\t\teditor={editor}\n\t\t\t\tinitialValue={defaultNodes}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonValueChange={handleChange}\n\t\t\t>\n\t\t\t\t<div className={className}>\n\t\t\t\t\t<Toolbar>\n\t\t\t\t\t\t{buttonIsNotHidden(\"headingOne\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"headingOne\" icon={Heading1} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"headingTwo\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"headingTwo\" icon={Heading2} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"blockQuote\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"blockQuote\" icon={Quote} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"bold\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"bold\" icon={Bold} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"italic\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"italic\" icon={Italic} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"underline\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"underline\" icon={Underline} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"code\") && (\n\t\t\t\t\t\t\t<MarkButton format=\"code\" icon={Code} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"left\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"left\" icon={AlignLeft} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"right\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"right\" icon={AlignRight} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"center\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"center\" icon={AlignCenter} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"justify\") && (\n\t\t\t\t\t\t\t<BlockButton format=\"justify\" icon={AlignJustify} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{imageConfig && buttonIsNotHidden(\"image\") && (\n\t\t\t\t\t\t\t<InsertImage {...imageConfig} />\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{buttonIsNotHidden(\"video\") && <InsertVideo {...videoConfig} />}\n\t\t\t\t\t</Toolbar>\n\n\t\t\t\t\t<Editable\n\t\t\t\t\t\tclassName=\"editorContainer\"\n\t\t\t\t\t\trenderElement={renderElement}\n\t\t\t\t\t\trenderLeaf={renderLeaf}\n\t\t\t\t\t\tspellCheck\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\tonFocus={() => setOnFocus(true)}\n\t\t\t\t\t\tonBlur={() => setOnFocus(false)}\n\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\tfor (const hotkey in hotKeys) {\n\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\t\t\t\t\t\t\t\tif (isHotkey(hotkey, event as any)) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tconst mark = hotKeys[hotkey as keyof typeof hotKeys];\n\t\t\t\t\t\t\t\t\ttoggleMark(editor, mark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{restatesCharacters < 0 && (\n\t\t\t\t\t\t<div className=\"restatesCharacters\">{restatesCharacters}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={inputValue.slice(0, maxLimit)}\n\t\t\t\t/>\n\n\t\t\t\t<input type=\"hidden\" name={`${name}Count`} value={charactersCount} />\n\t\t\t</Slate>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { RichText };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsFA,SAAS,EAAS,GAAsB;CACvC,IAAM,EACL,SACA,kBACA,gBACA,gBACA,WAAW,IAAmB,IAC9B,kBAAe,MACf,2BAAwB,IACxB,4BACA,qBACA,cAAW,KACX,aACA,SAAS,GACT,WACA,iBACA,OACA,iBAAc,YACd,yBAAsB,OACnB,GAEE,IAAS,QAAc,EAAY,EAAU,EAAa,CAAC,CAAC,GAAG,CAAC,CAAC,GAEjE,EAAE,oBAAgB,EAAQ,GAE1B,IAAe,QAA4B;EAChD,IAAI;GACH,IAAM,IAAc,KAAK,MAAM,CAAY;GAa3C,OAZI,CAAC,MAAM,QAAQ,CAAW,KAAK,EAAY,WAAW,IAClD,gBAAgB,CAAY,IAGf,EAAY,OAC/B,MACA,OAAO,KAAS,cAChB,KACA,UAAU,KACV,cAAc,CAGT,IAAe,IAAc,gBAAgB,CAAY;EACjE,QAAiB;GAChB,OAAO,gBAAgB,CAAY;EACpC;CACD,GAAG,CAAC,CAAY,CAAC,GAIX,CAAC,GAAiB,MAAsB,EAFxB,EAAoB,CAEa,CAAA,CAAc,MAAM,GACrE,CAAC,IAAY,MAAiB,EACnC,KAAK,UAAU,CAAY,KAAK,IACjC,GAEM,CAAC,IAAS,KAAc,EAAS,EAAK,GAEtC,KAAM,EAAyB,IAAI,GACnC,KAAc,GAAM,GACpB,KAAU,KAAM,IAEhB,IAAe,KAAoB,KAAc,IACjD,KAAU,KAAe,CAAC,CAAC,GAE3B,KAAa,EAAY,GAAM,CAAC,CAAC,GACjC,KAAgB,EAAY,GAAS,CAAC,CAAC;CAE7C,SAAS,EAAa,GAAqB;EAC1C,IAAM,IAAO,EAAoB,CAAK;EAEtC,GAAmB,EAAK,MAAM,GAC9B,IAA0B,EAAK,MAAM,GAEjC,OAAyB,EAAK,UAAU,OAI5C,GAAc,KAAK,UAAU,CAAK,CAAC,GACnC,IAAW,CAAK;CACjB;CASA,IAAM,KAAY,iBANC,MAEhB,IAAW,IADX,cAGC,aAE0C,GAP3B,KAAU,cAAc,gBASrC,IAAqB,IAAW;CAEtC,SAAS,EAAkB,GAAiC;EAC3D,OAAO,CAAC,GAAe,SAAS,CAAM;CACvC;CAEA,OACC,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,GAAD;GACS;GACR,cAAc;GACd,UAAU;GACV,eAAe;aAJhB;IAMC,kBAAC,OAAD;KAAgB;eAAhB;MACC,kBAAC,IAAD,EAAA,UAAA;OACE,EAAkB,YAAY,KAC9B,kBAAC,GAAD;QAAa,QAAO;QAAa,MAAM;OAAW,CAAA;OAGlD,EAAkB,YAAY,KAC9B,kBAAC,GAAD;QAAa,QAAO;QAAa,MAAM;OAAW,CAAA;OAGlD,EAAkB,YAAY,KAC9B,kBAAC,GAAD;QAAa,QAAO;QAAa,MAAM;OAAQ,CAAA;OAG/C,EAAkB,MAAM,KACxB,kBAAC,GAAD;QAAY,QAAO;QAAO,MAAM;OAAO,CAAA;OAGvC,EAAkB,QAAQ,KAC1B,kBAAC,GAAD;QAAY,QAAO;QAAS,MAAM;OAAS,CAAA;OAG3C,EAAkB,WAAW,KAC7B,kBAAC,GAAD;QAAY,QAAO;QAAY,MAAM;OAAY,CAAA;OAGjD,EAAkB,MAAM,KACxB,kBAAC,GAAD;QAAY,QAAO;QAAO,MAAM;OAAO,CAAA;OAGvC,EAAkB,MAAM,KACxB,kBAAC,GAAD;QAAa,QAAO;QAAO,MAAM;OAAY,CAAA;OAG7C,EAAkB,OAAO,KACzB,kBAAC,GAAD;QAAa,QAAO;QAAQ,MAAM;OAAa,CAAA;OAG/C,EAAkB,QAAQ,KAC1B,kBAAC,GAAD;QAAa,QAAO;QAAS,MAAM;OAAc,CAAA;OAGjD,EAAkB,SAAS,KAC3B,kBAAC,GAAD;QAAa,QAAO;QAAU,MAAM;OAAe,CAAA;OAGnD,KAAe,EAAkB,OAAO,KACxC,kBAAC,GAAD,EAAa,GAAI,EAAc,CAAA;OAG/B,EAAkB,OAAO,KAAK,kBAAC,GAAD,EAAa,GAAI,EAAc,CAAA;MACtD,EAAA,CAAA;MAET,kBAAC,GAAD;OACC,WAAU;OACK;OACH;OACZ,YAAA;OACK;OACL,IAAI;OACJ,eAAe,EAAW,EAAI;OAC9B,cAAc,EAAW,EAAK;OAC9B,YAAY,MAAU;QACrB,KAAK,IAAM,KAAU,GAEpB,IAAI,EAAS,GAAQ,CAAY,GAAG;SACnC,EAAM,eAAe;SACrB,IAAM,IAAO,EAAQ;SACrB,EAAW,GAAQ,CAAI;QACxB;OAEF;MACA,CAAA;MAEA,IAAqB,KACrB,kBAAC,OAAD;OAAK,WAAU;iBAAsB;MAAwB,CAAA;KAE1D;;IAEL,kBAAC,SAAD;KACC,MAAK;KACC;KACN,OAAO,GAAW,MAAM,GAAG,CAAQ;IACnC,CAAA;IAED,kBAAC,SAAD;KAAO,MAAK;KAAS,MAAM,GAAG,EAAK;KAAQ,OAAO;IAAkB,CAAA;GAC9D;;CACO,CAAA;AAEjB"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Button as e } from "../../button/index.js";
|
|
2
|
+
import { Input as t } from "../../input/index.js";
|
|
3
|
+
import { ImageUpload as n } from "../../imageUpload/index.js";
|
|
4
|
+
import { ModalContainer as r } from "../../modal/modalContainer/index.js";
|
|
5
|
+
import { ModalFooter as i } from "../../modal/modalFooter/index.js";
|
|
6
|
+
import { ModalHeader as a } from "../../modal/modalHeader/index.js";
|
|
7
|
+
import { TabButton as o } from "../../tab/tabButton/index.js";
|
|
8
|
+
import { TabContainer as s } from "../../tab/tabContainer/index.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import { useState as c } from "react";
|
|
11
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
12
|
+
import { Image as f } from "lucide-react";
|
|
13
|
+
import { useSlate as p } from "slate-react";
|
|
14
|
+
//#region src/components/richText/insertImage/index.tsx
|
|
15
|
+
function m(m) {
|
|
16
|
+
let { action: h, tabLabels: g = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: _ = "Cancelar", modalConfirmButton: v = "Confirmar", modalInputImageLabel: y = "Imagem:", modalInputUrlLabel: b = "URL da imagem:", modalTitle: x = "Inserir imagem" } = m, S = p(), [C, w] = c(!1), [T, E] = c(""), [D, O] = c("url");
|
|
17
|
+
function k(e) {
|
|
18
|
+
e.preventDefault(), !(!T || T === "") && (S.insertNodes([
|
|
19
|
+
{
|
|
20
|
+
type: "paragraph",
|
|
21
|
+
children: [{ text: "" }]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: "image",
|
|
25
|
+
src: T,
|
|
26
|
+
children: [{ text: "" }]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "paragraph",
|
|
30
|
+
children: [{ text: "" }]
|
|
31
|
+
}
|
|
32
|
+
]), w(!1));
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
className: "arkynRichTextInsertImage",
|
|
37
|
+
onMouseDown: () => w(!0),
|
|
38
|
+
children: /* @__PURE__ */ u(f, {})
|
|
39
|
+
}), /* @__PURE__ */ d(r, {
|
|
40
|
+
isVisible: C,
|
|
41
|
+
makeInvisible: () => w(!1),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ u(a, { children: x }),
|
|
44
|
+
/* @__PURE__ */ d("div", {
|
|
45
|
+
className: "arkynRichTextInsertImageModalContent",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ d(s, {
|
|
48
|
+
defaultValue: D,
|
|
49
|
+
onChange: O,
|
|
50
|
+
children: [/* @__PURE__ */ u(o, {
|
|
51
|
+
value: "url",
|
|
52
|
+
children: g[0]
|
|
53
|
+
}), /* @__PURE__ */ u(o, {
|
|
54
|
+
value: "file",
|
|
55
|
+
children: g[1]
|
|
56
|
+
})]
|
|
57
|
+
}),
|
|
58
|
+
D === "url" && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(t, {
|
|
59
|
+
type: "text",
|
|
60
|
+
name: "richTextImageURL",
|
|
61
|
+
label: b,
|
|
62
|
+
showAsterisk: !0,
|
|
63
|
+
defaultValue: T,
|
|
64
|
+
onChange: (e) => E(e.target.value)
|
|
65
|
+
}), T && /* @__PURE__ */ u("img", {
|
|
66
|
+
className: "arkynRichTextInsertImageModalPreviewImage",
|
|
67
|
+
src: T,
|
|
68
|
+
alt: "preview"
|
|
69
|
+
})] }),
|
|
70
|
+
D === "file" && /* @__PURE__ */ u(n, {
|
|
71
|
+
name: "richTextImageURL",
|
|
72
|
+
action: h,
|
|
73
|
+
label: y,
|
|
74
|
+
showAsterisk: !0,
|
|
75
|
+
defaultValue: T,
|
|
76
|
+
onChange: (e) => E(e)
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ d(i, { children: [/* @__PURE__ */ u(e, {
|
|
81
|
+
type: "button",
|
|
82
|
+
scheme: "danger",
|
|
83
|
+
variant: "outline",
|
|
84
|
+
onClick: () => w(!1),
|
|
85
|
+
children: _
|
|
86
|
+
}), /* @__PURE__ */ u(e, {
|
|
87
|
+
type: "button",
|
|
88
|
+
onClick: k,
|
|
89
|
+
children: v
|
|
90
|
+
})] })
|
|
91
|
+
]
|
|
92
|
+
})] });
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { m as InsertImage };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/richText/insertImage/index.tsx"],"sourcesContent":["import { Image } from \"lucide-react\";\nimport { type MouseEvent, useState } from \"react\";\nimport { useSlate } from \"slate-react\";\n\nimport type { RichTextInsertImageProps } from \"../../../types/richTextTypes\";\n\nimport { Button } from \"../../button\";\nimport { ImageUpload } from \"../../imageUpload\";\nimport { Input } from \"../../input\";\nimport { ModalContainer } from \"../../modal/modalContainer\";\nimport { ModalFooter } from \"../../modal/modalFooter\";\nimport { ModalHeader } from \"../../modal/modalHeader\";\nimport { TabButton } from \"../../tab/tabButton\";\nimport { TabContainer } from \"../../tab/tabContainer\";\n\nimport \"./styles.css\";\n\nfunction InsertImage(props: RichTextInsertImageProps) {\n\tconst {\n\t\taction,\n\t\ttabLabels = [\"Adicionar URL\", \"Upload de arquivo\"],\n\t\tmodalCancelButton = \"Cancelar\",\n\t\tmodalConfirmButton = \"Confirmar\",\n\t\tmodalInputImageLabel = \"Imagem:\",\n\t\tmodalInputUrlLabel = \"URL da imagem:\",\n\t\tmodalTitle = \"Inserir imagem\",\n\t} = props;\n\n\tconst editor = useSlate();\n\n\tconst [modalIsVisible, setModalIsVisible] = useState(false);\n\tconst [imageURL, setImageURL] = useState(\"\");\n\tconst [uploadType, setUploadType] = useState(\"url\");\n\n\tfunction handleMouseDown(event: MouseEvent<HTMLButtonElement>) {\n\t\tevent.preventDefault();\n\t\tif (!imageURL || imageURL === \"\") return;\n\n\t\teditor.insertNodes([\n\t\t\t{ type: \"paragraph\", children: [{ text: \"\" }] },\n\t\t\t{ type: \"image\", src: imageURL, children: [{ text: \"\" }] },\n\t\t\t{ type: \"paragraph\", children: [{ text: \"\" }] },\n\t\t]);\n\n\t\tsetModalIsVisible(false);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName=\"arkynRichTextInsertImage\"\n\t\t\t\tonMouseDown={() => setModalIsVisible(true)}\n\t\t\t>\n\t\t\t\t<Image />\n\t\t\t</button>\n\n\t\t\t<ModalContainer\n\t\t\t\tisVisible={modalIsVisible}\n\t\t\t\tmakeInvisible={() => setModalIsVisible(false)}\n\t\t\t>\n\t\t\t\t<ModalHeader>{modalTitle}</ModalHeader>\n\n\t\t\t\t<div className=\"arkynRichTextInsertImageModalContent\">\n\t\t\t\t\t<TabContainer defaultValue={uploadType} onChange={setUploadType}>\n\t\t\t\t\t\t<TabButton value=\"url\">{tabLabels[0]}</TabButton>\n\t\t\t\t\t\t<TabButton value=\"file\">{tabLabels[1]}</TabButton>\n\t\t\t\t\t</TabContainer>\n\n\t\t\t\t\t{uploadType === \"url\" && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tname=\"richTextImageURL\"\n\t\t\t\t\t\t\t\tlabel={modalInputUrlLabel}\n\t\t\t\t\t\t\t\tshowAsterisk\n\t\t\t\t\t\t\t\tdefaultValue={imageURL}\n\t\t\t\t\t\t\t\tonChange={(e) => setImageURL(e.target.value)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{imageURL && (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tclassName=\"arkynRichTextInsertImageModalPreviewImage\"\n\t\t\t\t\t\t\t\t\tsrc={imageURL}\n\t\t\t\t\t\t\t\t\talt=\"preview\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{uploadType === \"file\" && (\n\t\t\t\t\t\t<ImageUpload\n\t\t\t\t\t\t\tname=\"richTextImageURL\"\n\t\t\t\t\t\t\taction={action}\n\t\t\t\t\t\t\tlabel={modalInputImageLabel}\n\t\t\t\t\t\t\tshowAsterisk\n\t\t\t\t\t\t\tdefaultValue={imageURL}\n\t\t\t\t\t\t\tonChange={(url) => setImageURL(url)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<ModalFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tscheme=\"danger\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => setModalIsVisible(false)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{modalCancelButton}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<Button type=\"button\" onClick={handleMouseDown}>\n\t\t\t\t\t\t{modalConfirmButton}\n\t\t\t\t\t</Button>\n\t\t\t\t</ModalFooter>\n\t\t\t</ModalContainer>\n\t\t</>\n\t);\n}\n\nexport { InsertImage };\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAS,EAAY,GAAiC;CACrD,IAAM,EACL,WACA,eAAY,CAAC,iBAAiB,mBAAmB,GACjD,uBAAoB,YACpB,wBAAqB,aACrB,0BAAuB,WACvB,wBAAqB,kBACrB,gBAAa,qBACV,GAEE,IAAS,EAAS,GAElB,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,CAAC,GAAU,KAAe,EAAS,EAAE,GACrC,CAAC,GAAY,KAAiB,EAAS,KAAK;CAElD,SAAS,EAAgB,GAAsC;EAC9D,EAAM,eAAe,GACjB,GAAC,KAAY,MAAa,QAE9B,EAAO,YAAY;GAClB;IAAE,MAAM;IAAa,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;GAC9C;IAAE,MAAM;IAAS,KAAK;IAAU,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;GACzD;IAAE,MAAM;IAAa,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;GAAE;EAC/C,CAAC,GAED,EAAkB,EAAK;CACxB;CAEA,OACC,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAU;EACV,mBAAmB,EAAkB,EAAI;YAEzC,kBAAC,GAAD,CAAQ,CAAA;CACD,CAAA,GAER,kBAAC,GAAD;EACC,WAAW;EACX,qBAAqB,EAAkB,EAAK;YAF7C;GAIC,kBAAC,GAAD,EAAA,UAAc,EAAwB,CAAA;GAEtC,kBAAC,OAAD;IAAK,WAAU;cAAf;KACC,kBAAC,GAAD;MAAc,cAAc;MAAY,UAAU;gBAAlD,CACC,kBAAC,GAAD;OAAW,OAAM;iBAAO,EAAU;MAAc,CAAA,GAChD,kBAAC,GAAD;OAAW,OAAM;iBAAQ,EAAU;MAAc,CAAA,CACpC;;KAEb,MAAe,SACf,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,GAAD;MACC,MAAK;MACL,MAAK;MACL,OAAO;MACP,cAAA;MACA,cAAc;MACd,WAAW,MAAM,EAAY,EAAE,OAAO,KAAK;KAC3C,CAAA,GAEA,KACA,kBAAC,OAAD;MACC,WAAU;MACV,KAAK;MACL,KAAI;KACJ,CAAA,CAED,EAAA,CAAA;KAGF,MAAe,UACf,kBAAC,GAAD;MACC,MAAK;MACG;MACR,OAAO;MACP,cAAA;MACA,cAAc;MACd,WAAW,MAAQ,EAAY,CAAG;KAClC,CAAA;IAEE;;GAEL,kBAAC,GAAD,EAAA,UAAA,CACC,kBAAC,GAAD;IACC,MAAK;IACL,QAAO;IACP,SAAQ;IACR,eAAe,EAAkB,EAAK;cAErC;GACM,CAAA,GAER,kBAAC,GAAD;IAAQ,MAAK;IAAS,SAAS;cAC7B;GACM,CAAA,CACI,EAAA,CAAA;EACE;GACf,EAAA,CAAA;AAEJ"}
|