@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,21 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronLeft as t, ChevronRight as n } from "lucide-react";
|
|
4
|
+
//#region src/components/pagination/chevronButton/index.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { orientation: i, handlePageChange: a, disabled: o } = r;
|
|
7
|
+
return /* @__PURE__ */ e("button", {
|
|
8
|
+
type: "button",
|
|
9
|
+
className: "arkynChevronPageButton",
|
|
10
|
+
disabled: o,
|
|
11
|
+
onClick: a,
|
|
12
|
+
children: {
|
|
13
|
+
left: /* @__PURE__ */ e(t, {}),
|
|
14
|
+
right: /* @__PURE__ */ e(n, {})
|
|
15
|
+
}[i]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as ChevronButton };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/pagination/chevronButton/index.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport \"./styles.css\";\n\ntype ChevronButtonProps = {\n\torientation: \"left\" | \"right\";\n\tdisabled: boolean;\n\thandlePageChange: () => void;\n};\n\nfunction ChevronButton(props: ChevronButtonProps) {\n\tconst { orientation, handlePageChange, disabled } = props;\n\tconst icon = { left: <ChevronLeft />, right: <ChevronRight /> };\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName=\"arkynChevronPageButton\"\n\t\t\tdisabled={disabled}\n\t\t\tonClick={handlePageChange}\n\t\t>\n\t\t\t{icon[orientation]}\n\t\t</button>\n\t);\n}\n\nexport { ChevronButton };\n"],"mappings":";;;;AASA,SAAS,EAAc,GAA2B;CACjD,IAAM,EAAE,gBAAa,qBAAkB,gBAAa;CAGpD,OACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAU;EACA;EACV,SAAS;YAER;GATY,MAAM,kBAAC,GAAD,CAAc,CAAA;GAAG,OAAO,kBAAC,GAAD,CAAe,CAAA;EASzD,EAAK;CACC,CAAA;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynChevronPageButton{background-color:inherit;border:none;border-radius:8px;justify-content:center;align-items:center;min-width:28px;max-width:28px;min-height:28px;max-height:28px;display:flex}.arkynChevronPageButton>svg{color:var(--text-muted,#a1a1aa);width:20px;height:20px}.arkynChevronPageButton:hover{filter:brightness(.98);cursor:pointer}html.dark .arkynChevronPageButton:hover{filter:brightness(1.2)}.arkynChevronPageButton:disabled{filter:brightness();cursor:not-allowed;opacity:.5}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/pagination/currentButton/index.tsx
|
|
4
|
+
function t({ currentPage: t }) {
|
|
5
|
+
return /* @__PURE__ */ e("button", {
|
|
6
|
+
type: "button",
|
|
7
|
+
className: "arkynPaginationCurrentButton",
|
|
8
|
+
disabled: !0,
|
|
9
|
+
children: t
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as CurrentButton };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/pagination/currentButton/index.tsx"],"sourcesContent":["import \"./styles.css\";\n\ntype CurrentButtonProps = {\n\tcurrentPage: number;\n};\n\nfunction CurrentButton({ currentPage }: CurrentButtonProps) {\n\treturn (\n\t\t<button type=\"button\" className=\"arkynPaginationCurrentButton\" disabled>\n\t\t\t{currentPage}\n\t\t</button>\n\t);\n}\n\nexport { CurrentButton };\n"],"mappings":";;;AAMA,SAAS,EAAc,EAAE,kBAAmC;CAC3D,OACC,kBAAC,UAAD;EAAQ,MAAK;EAAS,WAAU;EAA+B,UAAA;YAC7D;CACM,CAAA;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynPaginationCurrentButton{background-color:rgb(var(--spotlight-primary,17, 109, 220));color:var(--white,#fff);text-align:center;border:none;border-radius:8px;justify-content:center;align-items:center;min-width:28px;min-height:28px;font-size:14px;font-weight:500;line-height:14px;display:flex}}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChevronButton as e } from "./chevronButton/index.js";
|
|
2
|
+
import { CurrentButton as t } from "./currentButton/index.js";
|
|
3
|
+
import { PageButton as n } from "./pageButton/index.js";
|
|
4
|
+
import { PaginationService as r } from "./paginationService.js";
|
|
5
|
+
import { Spread as i } from "./spread/index.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/pagination/index.tsx
|
|
9
|
+
function c(c) {
|
|
10
|
+
let { totalCountRegisters: l, siblingsCount: u, currentPage: d, registerPerPage: f, onChange: p, ...m } = c, { currentPage: h, siblingsCount: g, previousPages: _, nextPages: v, lastPage: y, handlePageChange: b, handleMinusChange: x, handlePlusChange: S } = new r({
|
|
11
|
+
totalCountRegisters: l,
|
|
12
|
+
currentPage: d,
|
|
13
|
+
registerPerPage: f,
|
|
14
|
+
siblingsCount: u,
|
|
15
|
+
onChange: p
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ s("div", {
|
|
18
|
+
className: "arkynPagination",
|
|
19
|
+
...m,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ o(e, {
|
|
22
|
+
orientation: "left",
|
|
23
|
+
handlePageChange: x,
|
|
24
|
+
disabled: h <= 1
|
|
25
|
+
}),
|
|
26
|
+
h > 1 + g && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(n, {
|
|
27
|
+
page: 1,
|
|
28
|
+
handlePageChange: () => b(1)
|
|
29
|
+
}), h > 2 + g && /* @__PURE__ */ o(i, {})] }),
|
|
30
|
+
_.map((e) => /* @__PURE__ */ o(n, {
|
|
31
|
+
page: e,
|
|
32
|
+
handlePageChange: x
|
|
33
|
+
}, e)),
|
|
34
|
+
/* @__PURE__ */ o(t, { currentPage: h }),
|
|
35
|
+
v.map((e) => /* @__PURE__ */ o(n, {
|
|
36
|
+
page: e,
|
|
37
|
+
handlePageChange: S
|
|
38
|
+
}, e)),
|
|
39
|
+
h + g < y && /* @__PURE__ */ s(a, { children: [h + 1 + g < y && /* @__PURE__ */ o(i, {}), /* @__PURE__ */ o(n, {
|
|
40
|
+
page: y,
|
|
41
|
+
handlePageChange: () => b(y)
|
|
42
|
+
})] }),
|
|
43
|
+
/* @__PURE__ */ o(e, {
|
|
44
|
+
orientation: "right",
|
|
45
|
+
handlePageChange: S,
|
|
46
|
+
disabled: h >= y
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { c as Pagination };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/pagination/index.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\n\nimport { ChevronButton } from \"./chevronButton\";\nimport { CurrentButton } from \"./currentButton\";\nimport { PageButton } from \"./pageButton\";\nimport { PaginationService } from \"./paginationService\";\nimport { Spread } from \"./spread\";\n\nimport \"./styles.css\";\n\n/**\n * Props for the Pagination component.\n */\ntype PaginationProps = {\n\t/**\n\t * Number of sibling pages to show on each side of the current page.\n\t * @default 1\n\t */\n\tsiblingsCount?: number;\n\t/**\n\t * Total number of records/items to paginate.\n\t */\n\ttotalCountRegisters: number;\n\t/**\n\t * The currently active page number (1-indexed).\n\t */\n\tcurrentPage: number;\n\t/**\n\t * Number of records to display per page.\n\t * @default 10\n\t */\n\tregisterPerPage?: number;\n\t/**\n\t * Callback function triggered when the page changes.\n\t * @param page - The new page number\n\t */\n\tonChange?: (page: number) => void;\n} & Omit<HTMLAttributes<HTMLDivElement>, \"onChange\">;\n\n/**\n * Pagination — navigation control for paginated data sets.\n *\n * Renders page number buttons, prev/next arrows, and spread indicators (…)\n * when the page count exceeds the visible range.\n *\n * @param props.totalCountRegisters - Total number of records. Required.\n * @param props.currentPage - The currently active page (1-indexed). Required.\n * @param props.registerPerPage - Records per page. Default: 10\n * @param props.siblingsCount - Number of sibling pages visible on each side of the current page. Default: 1\n * @param props.onChange - Callback fired when the user selects a different page.\n *\n * **...Other valid HTML properties for `<div>`**\n *\n * @returns Pagination JSX element.\n *\n * @example\n * ```tsx\n * <Pagination\n * totalCountRegisters={250}\n * currentPage={page}\n * registerPerPage={20}\n * siblingsCount={1}\n * onChange={(p) => setPage(p)}\n * />\n * ```\n */\n\nfunction Pagination(props: PaginationProps) {\n\tconst {\n\t\ttotalCountRegisters: baseTotalCountRegisters,\n\t\tsiblingsCount: baseSiblingsCount,\n\t\tcurrentPage: baseCurrentPage,\n\t\tregisterPerPage: baseRegisterPerPage,\n\t\tonChange: baseOnChange,\n\t\t...rest\n\t} = props;\n\n\tconst {\n\t\tcurrentPage,\n\t\tsiblingsCount,\n\t\tpreviousPages,\n\t\tnextPages,\n\t\tlastPage,\n\t\thandlePageChange,\n\t\thandleMinusChange,\n\t\thandlePlusChange,\n\t} = new PaginationService({\n\t\ttotalCountRegisters: baseTotalCountRegisters,\n\t\tcurrentPage: baseCurrentPage,\n\t\tregisterPerPage: baseRegisterPerPage,\n\t\tsiblingsCount: baseSiblingsCount,\n\t\tonChange: baseOnChange,\n\t});\n\n\treturn (\n\t\t<div className=\"arkynPagination\" {...rest}>\n\t\t\t<ChevronButton\n\t\t\t\torientation=\"left\"\n\t\t\t\thandlePageChange={handleMinusChange}\n\t\t\t\tdisabled={currentPage <= 1}\n\t\t\t/>\n\n\t\t\t{currentPage > 1 + siblingsCount && (\n\t\t\t\t<>\n\t\t\t\t\t<PageButton page={1} handlePageChange={() => handlePageChange(1)} />\n\t\t\t\t\t{currentPage > 2 + siblingsCount && <Spread />}\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{previousPages.map((page) => (\n\t\t\t\t<PageButton\n\t\t\t\t\tkey={page}\n\t\t\t\t\tpage={page}\n\t\t\t\t\thandlePageChange={handleMinusChange}\n\t\t\t\t/>\n\t\t\t))}\n\n\t\t\t<CurrentButton currentPage={currentPage} />\n\n\t\t\t{nextPages.map((page) => (\n\t\t\t\t<PageButton\n\t\t\t\t\tkey={page}\n\t\t\t\t\tpage={page}\n\t\t\t\t\thandlePageChange={handlePlusChange}\n\t\t\t\t/>\n\t\t\t))}\n\n\t\t\t{currentPage + siblingsCount < lastPage && (\n\t\t\t\t<>\n\t\t\t\t\t{currentPage + 1 + siblingsCount < lastPage && <Spread />}\n\t\t\t\t\t<PageButton\n\t\t\t\t\t\tpage={lastPage}\n\t\t\t\t\t\thandlePageChange={() => handlePageChange(lastPage)}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t<ChevronButton\n\t\t\t\torientation=\"right\"\n\t\t\t\thandlePageChange={handlePlusChange}\n\t\t\t\tdisabled={currentPage >= lastPage}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport { Pagination };\n"],"mappings":";;;;;;;;AAmEA,SAAS,EAAW,GAAwB;CAC3C,IAAM,EACL,qBAAqB,GACrB,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,UAAU,GACV,GAAG,MACA,GAEE,EACL,gBACA,kBACA,kBACA,cACA,aACA,qBACA,sBACA,wBACG,IAAI,EAAkB;EACzB,qBAAqB;EACrB,aAAa;EACb,iBAAiB;EACjB,eAAe;EACf,UAAU;CACX,CAAC;CAED,OACC,kBAAC,OAAD;EAAK,WAAU;EAAkB,GAAI;YAArC;GACC,kBAAC,GAAD;IACC,aAAY;IACZ,kBAAkB;IAClB,UAAU,KAAe;GACzB,CAAA;GAEA,IAAc,IAAI,KAClB,kBAAA,GAAA,EAAA,UAAA,CACC,kBAAC,GAAD;IAAY,MAAM;IAAG,wBAAwB,EAAiB,CAAC;GAAI,CAAA,GAClE,IAAc,IAAI,KAAiB,kBAAC,GAAD,CAAS,CAAA,CAC5C,EAAA,CAAA;GAGF,EAAc,KAAK,MACnB,kBAAC,GAAD;IAEO;IACN,kBAAkB;GAClB,GAHK,CAGL,CACD;GAED,kBAAC,GAAD,EAA4B,eAAc,CAAA;GAEzC,EAAU,KAAK,MACf,kBAAC,GAAD;IAEO;IACN,kBAAkB;GAClB,GAHK,CAGL,CACD;GAEA,IAAc,IAAgB,KAC9B,kBAAA,GAAA,EAAA,UAAA,CACE,IAAc,IAAI,IAAgB,KAAY,kBAAC,GAAD,CAAS,CAAA,GACxD,kBAAC,GAAD;IACC,MAAM;IACN,wBAAwB,EAAiB,CAAQ;GACjD,CAAA,CACA,EAAA,CAAA;GAGH,kBAAC,GAAD;IACC,aAAY;IACZ,kBAAkB;IAClB,UAAU,KAAe;GACzB,CAAA;EACG;;AAEP"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/pagination/pageButton/index.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
let { page: n, handlePageChange: r } = t;
|
|
6
|
+
return /* @__PURE__ */ e("button", {
|
|
7
|
+
type: "button",
|
|
8
|
+
className: "arkynPaginationPageButton",
|
|
9
|
+
onClick: r,
|
|
10
|
+
children: n
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as PageButton };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/pagination/pageButton/index.tsx"],"sourcesContent":["import \"./styles.css\";\n\ntype PageButtonProps = {\n\tpage: number;\n\thandlePageChange: () => void;\n};\n\nfunction PageButton(props: PageButtonProps) {\n\tconst { page, handlePageChange } = props;\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName=\"arkynPaginationPageButton\"\n\t\t\tonClick={handlePageChange}\n\t\t>\n\t\t\t{page}\n\t\t</button>\n\t);\n}\n\nexport { PageButton };\n"],"mappings":";;;AAOA,SAAS,EAAW,GAAwB;CAC3C,IAAM,EAAE,SAAM,wBAAqB;CACnC,OACC,kBAAC,UAAD;EACC,MAAK;EACL,WAAU;EACV,SAAS;YAER;CACM,CAAA;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynPaginationPageButton{background-color:inherit;min-width:28px;max-width:28px;min-height:28px;max-height:28px;color:var(--text-body,#52525b);border:none;border-radius:8px;justify-content:center;align-items:center;font-size:14px;font-weight:600;display:flex}.arkynPaginationPageButton:hover{filter:brightness(.98);cursor:pointer}html.dark .arkynPaginationPageButton:hover{filter:brightness(1.2)}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/components/pagination/paginationService.ts
|
|
2
|
+
var e = class {
|
|
3
|
+
currentPage;
|
|
4
|
+
totalCountRegisters;
|
|
5
|
+
registerPerPage;
|
|
6
|
+
siblingsCount;
|
|
7
|
+
lastPage;
|
|
8
|
+
onChange;
|
|
9
|
+
previousPages;
|
|
10
|
+
nextPages;
|
|
11
|
+
generatePagesArray(e, t) {
|
|
12
|
+
return [...Array(t - e)].map((t, n) => e + n + 1).filter((e) => e > 0);
|
|
13
|
+
}
|
|
14
|
+
generatePreviousPages(e, t) {
|
|
15
|
+
return e > 1 ? this.generatePagesArray(e - 1 - t, e - 1) : [];
|
|
16
|
+
}
|
|
17
|
+
generateNextPages(e, t) {
|
|
18
|
+
return e < this.lastPage ? this.generatePagesArray(e, Math.min(e + t, this.lastPage)) : [];
|
|
19
|
+
}
|
|
20
|
+
constructor(e) {
|
|
21
|
+
this.totalCountRegisters = e.totalCountRegisters, this.currentPage = e.currentPage, this.registerPerPage = e?.registerPerPage || 20, this.siblingsCount = e?.siblingsCount || 2, this.lastPage = Math.ceil(this.totalCountRegisters / this.registerPerPage), this.onChange = e?.onChange, this.previousPages = this.generatePreviousPages(this.currentPage, this.siblingsCount), this.nextPages = this.generateNextPages(this.currentPage, this.siblingsCount);
|
|
22
|
+
}
|
|
23
|
+
handlePageChange = (e) => {
|
|
24
|
+
e < 1 || e > this.lastPage || this.onChange && (this.currentPage = e, this.onChange(this.currentPage));
|
|
25
|
+
};
|
|
26
|
+
handlePlusChange = () => {
|
|
27
|
+
this.currentPage >= this.lastPage || this.onChange && (this.currentPage += 1, this.onChange(this.currentPage));
|
|
28
|
+
};
|
|
29
|
+
handleMinusChange = () => {
|
|
30
|
+
this.currentPage <= 1 || this.onChange && (--this.currentPage, this.onChange(this.currentPage));
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { e as PaginationService };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=paginationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginationService.js","names":[],"sources":["../../../../src/components/pagination/paginationService.ts"],"sourcesContent":["type PaginationServiceConstructor = {\n\tcurrentPage: number;\n\ttotalCountRegisters: number;\n\tregisterPerPage?: number;\n\tsiblingsCount?: number;\n\tonChange?: (page: number) => void;\n};\n\nclass PaginationService {\n\tcurrentPage: number;\n\ttotalCountRegisters: number;\n\tregisterPerPage: number;\n\tsiblingsCount: number;\n\tlastPage: number;\n\tonChange?: (page: number) => void;\n\tpreviousPages: number[];\n\tnextPages: number[];\n\n\tprivate generatePagesArray(from: number, to: number) {\n\t\treturn [...new Array(to - from)]\n\t\t\t.map((_, index) => from + index + 1)\n\t\t\t.filter((page) => page > 0);\n\t}\n\n\tprivate generatePreviousPages(currentPage: number, siblingsCount: number) {\n\t\tif (!(currentPage > 1)) return [];\n\t\treturn this.generatePagesArray(\n\t\t\tcurrentPage - 1 - siblingsCount,\n\t\t\tcurrentPage - 1,\n\t\t);\n\t}\n\n\tprivate generateNextPages(currentPage: number, siblingsCount: number) {\n\t\tif (!(currentPage < this.lastPage)) return [];\n\t\treturn this.generatePagesArray(\n\t\t\tcurrentPage,\n\t\t\tMath.min(currentPage + siblingsCount, this.lastPage),\n\t\t);\n\t}\n\n\tconstructor(props: PaginationServiceConstructor) {\n\t\tthis.totalCountRegisters = props.totalCountRegisters;\n\t\tthis.currentPage = props.currentPage;\n\t\tthis.registerPerPage = props?.registerPerPage || 20;\n\t\tthis.siblingsCount = props?.siblingsCount || 2;\n\t\tthis.lastPage = Math.ceil(this.totalCountRegisters / this.registerPerPage);\n\t\tthis.onChange = props?.onChange;\n\t\tthis.previousPages = this.generatePreviousPages(\n\t\t\tthis.currentPage,\n\t\t\tthis.siblingsCount,\n\t\t);\n\t\tthis.nextPages = this.generateNextPages(\n\t\t\tthis.currentPage,\n\t\t\tthis.siblingsCount,\n\t\t);\n\t}\n\n\thandlePageChange = (page: number) => {\n\t\tif (page < 1) return;\n\t\tif (page > this.lastPage) return;\n\t\tif (this.onChange) {\n\t\t\tthis.currentPage = page;\n\t\t\tthis.onChange(this.currentPage);\n\t\t}\n\t};\n\n\thandlePlusChange = () => {\n\t\tif (this.currentPage >= this.lastPage) return;\n\t\tif (this.onChange) {\n\t\t\tthis.currentPage += 1;\n\t\t\tthis.onChange(this.currentPage);\n\t\t}\n\t};\n\n\thandleMinusChange = () => {\n\t\tif (this.currentPage <= 1) return;\n\t\tif (this.onChange) {\n\t\t\tthis.currentPage -= 1;\n\t\t\tthis.onChange(this.currentPage);\n\t\t}\n\t};\n}\n\nexport { PaginationService };\n"],"mappings":";AAQA,IAAM,IAAN,MAAwB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA,mBAA2B,GAAc,GAAY;EACpD,OAAO,CAAC,GAAO,MAAM,IAAK,CAAI,CAAC,CAAC,CAC9B,KAAK,GAAG,MAAU,IAAO,IAAQ,CAAC,CAAC,CACnC,QAAQ,MAAS,IAAO,CAAC;CAC5B;CAEA,sBAA8B,GAAqB,GAAuB;EAEzE,OADM,IAAc,IACb,KAAK,mBACX,IAAc,IAAI,GAClB,IAAc,CACf,IAJ+B,CAAC;CAKjC;CAEA,kBAA0B,GAAqB,GAAuB;EAErE,OADM,IAAc,KAAK,WAClB,KAAK,mBACX,GACA,KAAK,IAAI,IAAc,GAAe,KAAK,QAAQ,CACpD,IAJ2C,CAAC;CAK7C;CAEA,YAAY,GAAqC;EAWhD,AAVA,KAAK,sBAAsB,EAAM,qBACjC,KAAK,cAAc,EAAM,aACzB,KAAK,kBAAkB,GAAO,mBAAmB,IACjD,KAAK,gBAAgB,GAAO,iBAAiB,GAC7C,KAAK,WAAW,KAAK,KAAK,KAAK,sBAAsB,KAAK,eAAe,GACzE,KAAK,WAAW,GAAO,UACvB,KAAK,gBAAgB,KAAK,sBACzB,KAAK,aACL,KAAK,aACN,GACA,KAAK,YAAY,KAAK,kBACrB,KAAK,aACL,KAAK,aACN;CACD;CAEA,oBAAoB,MAAiB;EAChC,IAAO,KACP,IAAO,KAAK,YACZ,KAAK,aACR,KAAK,cAAc,GACnB,KAAK,SAAS,KAAK,WAAW;CAEhC;CAEA,yBAAyB;EACpB,KAAK,eAAe,KAAK,YACzB,KAAK,aACR,KAAK,eAAe,GACpB,KAAK,SAAS,KAAK,WAAW;CAEhC;CAEA,0BAA0B;EACrB,KAAK,eAAe,KACpB,KAAK,aACR,OAAK,aACL,KAAK,SAAS,KAAK,WAAW;CAEhC;AACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Ellipsis as t } from "lucide-react";
|
|
4
|
+
//#region src/components/pagination/spread/index.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ e("p", {
|
|
7
|
+
className: "arkynPaginationSpread",
|
|
8
|
+
children: /* @__PURE__ */ e(t, {})
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as Spread };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/pagination/spread/index.tsx"],"sourcesContent":["import { Ellipsis } from \"lucide-react\";\nimport \"./styles.css\";\n\nfunction Spread() {\n\treturn (\n\t\t<p className=\"arkynPaginationSpread\">\n\t\t\t<Ellipsis />\n\t\t</p>\n\t);\n}\n\nexport { Spread };\n"],"mappings":";;;;AAGA,SAAS,IAAS;CACjB,OACC,kBAAC,KAAD;EAAG,WAAU;YACZ,kBAAC,GAAD,CAAW,CAAA;CACT,CAAA;AAEL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynPaginationSpread{color:var(--text-muted,#a1a1aa);background-color:#0000;border:none;justify-content:center;align-items:center;min-width:28px;max-width:28px;min-height:28px;max-height:28px;display:flex}.arkynPaginationSpread>svg{color:var(--text-muted,#a1a1aa);width:16px;height:16px}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer arkyn{.arkynPagination{justify-content:center;align-items:center;gap:8px;display:flex}}
|
|
2
|
+
|
|
3
|
+
@layer arkyn{.arkynChevronPageButton{background-color:inherit;border:none;border-radius:8px;justify-content:center;align-items:center;min-width:28px;max-width:28px;min-height:28px;max-height:28px;display:flex}.arkynChevronPageButton>svg{color:var(--text-muted,#a1a1aa);width:20px;height:20px}.arkynChevronPageButton:hover{filter:brightness(.98);cursor:pointer}html.dark .arkynChevronPageButton:hover{filter:brightness(1.2)}.arkynChevronPageButton:disabled{filter:brightness();cursor:not-allowed;opacity:.5}}
|
|
4
|
+
|
|
5
|
+
@layer arkyn{.arkynPaginationCurrentButton{background-color:rgb(var(--spotlight-primary,17, 109, 220));color:var(--white,#fff);text-align:center;border:none;border-radius:8px;justify-content:center;align-items:center;min-width:28px;min-height:28px;font-size:14px;font-weight:500;line-height:14px;display:flex}}
|
|
6
|
+
|
|
7
|
+
@layer arkyn{.arkynPaginationPageButton{background-color:inherit;min-width:28px;max-width:28px;min-height:28px;max-height:28px;color:var(--text-body,#52525b);border:none;border-radius:8px;justify-content:center;align-items:center;font-size:14px;font-weight:600;display:flex}.arkynPaginationPageButton:hover{filter:brightness(.98);cursor:pointer}html.dark .arkynPaginationPageButton:hover{filter:brightness(1.2)}}
|
|
8
|
+
|
|
9
|
+
@layer arkyn{.arkynPaginationSpread{color:var(--text-muted,#a1a1aa);background-color:#0000;border:none;justify-content:center;align-items:center;min-width:28px;max-width:28px;min-height:28px;max-height:28px;display:flex}.arkynPaginationSpread>svg{color:var(--text-muted,#a1a1aa);width:16px;height:16px}}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { useForm as e } from "../../hooks/useForm.js";
|
|
2
|
+
import { FieldTemplate as t } from "../../services/fieldTemplate.js";
|
|
3
|
+
import { PhoneInputContainer as n } from "./phoneInputContainer/index.js";
|
|
4
|
+
import { PhoneInputCountriesOverlay as ee } from "./phoneInputCountriesOverlay/index.js";
|
|
5
|
+
import { PhoneInputCountryOption as te } from "./phoneInputCountryOption/index.js";
|
|
6
|
+
import { PhoneInputCountryOptionsContainer as ne } from "./phoneInputCountryOptionsContainer/index.js";
|
|
7
|
+
import { PhoneInputCountrySelector as r } from "./phoneInputCountrySelector/index.js";
|
|
8
|
+
import { PhoneInputMask as i } from "./phoneInputMask/index.js";
|
|
9
|
+
import { useId as a, useRef as o, useState as s } from "react";
|
|
10
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
11
|
+
import { findCountryMask as u, formatToPhone as d, removeNonNumeric as f } from "@arkyn/shared";
|
|
12
|
+
import { countries as p } from "@arkyn/templates";
|
|
13
|
+
//#region src/components/phoneInput/index.tsx
|
|
14
|
+
function m(m) {
|
|
15
|
+
let { value: h, label: re, className: g = "", disabled: _ = !1, errorMessage: v, isLoading: y = !1, readOnly: b = !1, size: x = "md", defaultValue: S = "", variant: ie = "solid", showAsterisk: C, name: w, onChange: T, searchCountryPlaceholder: E = "Pesquisar país", notFoundCountryText: D = "Nenhum país encontrado", id: O, unShowFieldTemplate: k = !1, orientation: A = "vertical" } = m, j = p.find((e) => e.iso === "BR"), M = S ? d(S) : "", N = S ? u(S)[1] : j, [P, F] = s(!1), [I, L] = s(""), [R, z] = s(!1), [B, V] = s(M), H = h === void 0 ? B : h, [U, W] = s(N), { fieldErrors: G } = e(), K = o(null), q = a(), J = O || q, Y = v || G?.[w], ae = !!Y, X = _ || y, Z = o(null);
|
|
16
|
+
function oe() {
|
|
17
|
+
X || P || R || (F(!0), Z.current && Z.current.focus());
|
|
18
|
+
}
|
|
19
|
+
function se() {
|
|
20
|
+
z(!0), F(!0);
|
|
21
|
+
}
|
|
22
|
+
function ce() {
|
|
23
|
+
z(!1), F(!1);
|
|
24
|
+
}
|
|
25
|
+
function le() {
|
|
26
|
+
F(!0);
|
|
27
|
+
}
|
|
28
|
+
function ue() {
|
|
29
|
+
F(!1);
|
|
30
|
+
}
|
|
31
|
+
function Q(e) {
|
|
32
|
+
return e.name.toLowerCase().includes(I.toLowerCase());
|
|
33
|
+
}
|
|
34
|
+
function $(e) {
|
|
35
|
+
let t = U.code;
|
|
36
|
+
return t += f(e || H), t;
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ c(t, {
|
|
39
|
+
name: w,
|
|
40
|
+
label: re,
|
|
41
|
+
showAsterisk: C,
|
|
42
|
+
className: g,
|
|
43
|
+
errorMessage: Y,
|
|
44
|
+
unShowFieldTemplate: k,
|
|
45
|
+
orientation: A,
|
|
46
|
+
children: /* @__PURE__ */ l(n, {
|
|
47
|
+
disabled: X,
|
|
48
|
+
isError: ae,
|
|
49
|
+
isLoading: y,
|
|
50
|
+
isFocused: P,
|
|
51
|
+
readOnly: b,
|
|
52
|
+
size: x,
|
|
53
|
+
variant: ie,
|
|
54
|
+
onFocus: oe,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ c(r, {
|
|
57
|
+
currentCountry: U,
|
|
58
|
+
onClick: se,
|
|
59
|
+
size: x
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ l(ne, {
|
|
62
|
+
isOpen: X || b ? !1 : R,
|
|
63
|
+
search: I,
|
|
64
|
+
placeholder: E,
|
|
65
|
+
onSearch: L,
|
|
66
|
+
children: [p.filter((e) => Q(e)).map((e) => /* @__PURE__ */ c(te, {
|
|
67
|
+
country: e,
|
|
68
|
+
handleChangeValue: () => {
|
|
69
|
+
W(e), z(!1), V("");
|
|
70
|
+
},
|
|
71
|
+
isActive: e.iso === U.iso,
|
|
72
|
+
size: x
|
|
73
|
+
}, e.iso)), p.filter((e) => Q(e)).length === 0 && /* @__PURE__ */ c("p", { children: D })]
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ c(ee, {
|
|
76
|
+
isOpen: X || b ? !1 : R,
|
|
77
|
+
onClick: ce
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ c(i, {
|
|
80
|
+
id: J,
|
|
81
|
+
ref: Z,
|
|
82
|
+
readonly: b,
|
|
83
|
+
currentCountry: U,
|
|
84
|
+
value: H,
|
|
85
|
+
disabled: X,
|
|
86
|
+
onBlur: ue,
|
|
87
|
+
onFocus: le,
|
|
88
|
+
size: x,
|
|
89
|
+
onChange: (e) => {
|
|
90
|
+
V(e), T?.($(e));
|
|
91
|
+
}
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ c("input", {
|
|
94
|
+
ref: K,
|
|
95
|
+
type: "hidden",
|
|
96
|
+
name: w,
|
|
97
|
+
value: $()
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { m as PhoneInput };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/phoneInput/index.tsx"],"sourcesContent":["import {\n\tfindCountryMask,\n\tformatToPhone,\n\tremoveNonNumeric,\n} from \"@arkyn/shared\";\nimport { countries } from \"@arkyn/templates\";\nimport { useId, useRef, useState } from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\n\nimport { PhoneInputContainer } from \"./phoneInputContainer\";\nimport { PhoneInputCountriesOverlay } from \"./phoneInputCountriesOverlay\";\nimport { PhoneInputCountryOption } from \"./phoneInputCountryOption\";\nimport { PhoneInputCountryOptionsContainer } from \"./phoneInputCountryOptionsContainer\";\nimport { PhoneInputCountrySelector } from \"./phoneInputCountrySelector\";\nimport { PhoneInputMask } from \"./phoneInputMask\";\n\ntype CountryType = {\n\tname: string;\n\tcode: string;\n\tiso: string;\n\tflag: string;\n\tmask: string | string[];\n};\n\ntype PhoneInputProps = {\n\t/** Optional HTML id for the visible phone text input. */\n\tid?: string;\n\t/** Disables all interactions. @default false */\n\tdisabled?: boolean;\n\t/** Prevents value changes while keeping the current value visible. @default false */\n\treadOnly?: boolean;\n\t/** Validation error message (overrides the `useForm` context error for this field). */\n\terrorMessage?: string;\n\t/** Optional label text displayed above the input. */\n\tlabel?: string;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Shows a loading state and disables interactions. @default false */\n\tisLoading?: boolean;\n\t/**\n\t * Input size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\";\n\t/** Additional CSS class applied to the field wrapper. */\n\tclassName?: string;\n\t/** Uncontrolled default phone value (numeric string with or without country code). @default \"\" */\n\tdefaultValue?: string;\n\t/** Text displayed when no country matches the search query. @default \"Nenhum país encontrado\" */\n\tnotFoundCountryText?: string;\n\t/** Field name for form submission (stored as numeric string with country code). Required. */\n\tname: string;\n\t/** Placeholder for the country search input. @default \"Pesquisar país\" */\n\tsearchCountryPlaceholder?: string;\n\t/** ISO 3166-1 alpha-2 code of the initially selected country. @default \"BR\" */\n\tdefaultCountryIso?: (typeof countries)[number][\"iso\"];\n\t/** Callback fired on value change. Receives a numeric string prefixed with the country dial code. */\n\tonChange?: (e: string) => void;\n\t/** Controlled phone value (without country code). */\n\tvalue?: string;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"vertical\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n};\n\n/**\n * PhoneInput — phone number field with an integrated country selector and automatic mask formatting.\n *\n * The visible input is masked according to the selected country's phone format.\n * The hidden `<input>` stores a numeric string prefixed with the country dial code 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 input.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.errorMessage - Validation error message.\n * @param props.size - Input size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.disabled - Disables all interactions. Default: false\n * @param props.readOnly - Prevents editing. Default: false\n * @param props.isLoading - Shows loading state and disables interactions. Default: false\n * @param props.defaultValue - Uncontrolled default phone value.\n * @param props.value - Controlled phone value (without country code).\n * @param props.onChange - Callback fired on change — receives numeric string with country code.\n * @param props.defaultCountryIso - ISO code of the initially selected country. Default: \"BR\"\n * @param props.searchCountryPlaceholder - Placeholder for country search. Default: \"Pesquisar país\"\n * @param props.notFoundCountryText - Text shown when no country matches. Default: \"Nenhum país encontrado\"\n * @param props.orientation - Layout direction. Default: \"vertical\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns PhoneInput JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <PhoneInput name=\"phone\" label=\"Phone\" />\n *\n * // Controlled with outline variant\n * <PhoneInput\n * name=\"contactPhone\"\n * label=\"Contact Phone\"\n * value={phone}\n * onChange={(v) => setPhone(v)}\n * variant=\"outline\"\n * size=\"lg\"\n * />\n *\n * // Pre-selected country (US)\n * <PhoneInput\n * name=\"phone\"\n * label=\"Phone\"\n * defaultCountryIso=\"US\"\n * showAsterisk\n * />\n * ```\n */\nfunction PhoneInput(props: PhoneInputProps) {\n\tconst {\n\t\tvalue: rawValue,\n\t\tlabel,\n\t\tclassName: wrapperClassName = \"\",\n\t\tdisabled = false,\n\t\terrorMessage: baseErrorMessage,\n\t\tisLoading = false,\n\t\treadOnly = false,\n\t\tsize = \"md\",\n\t\tdefaultValue = \"\",\n\t\tvariant = \"solid\",\n\t\tshowAsterisk,\n\t\tname,\n\t\tonChange,\n\t\tsearchCountryPlaceholder = \"Pesquisar país\",\n\t\tnotFoundCountryText = \"Nenhum país encontrado\",\n\t\tid,\n\t\tunShowFieldTemplate = false,\n\t\torientation = \"vertical\",\n\t} = props;\n\n\t// biome-ignore lint/style/noNonNullAssertion: \"BR\" is always present in the countries list\n\tconst brasilCountry = countries.find((country) => country.iso === \"BR\")!;\n\n\tconst defaultData = defaultValue ? formatToPhone(defaultValue) : \"\";\n\tconst defaultCountry: CountryType = defaultValue\n\t\t? findCountryMask(defaultValue)[1]\n\t\t: brasilCountry;\n\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [search, setSearch] = useState(\"\");\n\tconst [showCountryOptions, setShowCountryOptions] = useState(false);\n\tconst [internalValue, setValue] = useState(defaultData);\n\tconst value = rawValue !== undefined ? rawValue : internalValue;\n\n\tconst [currentCountry, setCurrentCountry] = useState(defaultCountry);\n\n\tconst { fieldErrors } = useForm();\n\n\tconst phoneInputRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst phoneInputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst isDisabled = disabled || isLoading;\n\n\tconst inputPhoneMaskRef = useRef<HTMLInputElement>(null);\n\n\tfunction handleContainerFocus() {\n\t\tif (isDisabled) return;\n\t\tif (isFocused || showCountryOptions) return;\n\n\t\tsetIsFocused(true);\n\t\tif (inputPhoneMaskRef.current) inputPhoneMaskRef.current.focus();\n\t}\n\n\tfunction handleOpenCountryOptions() {\n\t\tsetShowCountryOptions(true);\n\t\tsetIsFocused(true);\n\t}\n\n\tfunction handleCloseCountryOptions() {\n\t\tsetShowCountryOptions(false);\n\t\tsetIsFocused(false);\n\t}\n\n\tfunction handleInputFocus() {\n\t\tsetIsFocused(true);\n\t}\n\n\tfunction handleInputBlur() {\n\t\tsetIsFocused(false);\n\t}\n\n\tfunction filterCountryFunction(country: CountryType) {\n\t\treturn country.name.toLowerCase().includes(search.toLowerCase());\n\t}\n\n\tfunction inputValue(props?: string) {\n\t\tlet returnValue = currentCountry.code;\n\t\treturnValue += removeNonNumeric(props || value);\n\t\treturn returnValue;\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<PhoneInputContainer\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\tisError={isError}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tisFocused={isFocused}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tsize={size}\n\t\t\t\tvariant={variant}\n\t\t\t\tonFocus={handleContainerFocus}\n\t\t\t>\n\t\t\t\t<PhoneInputCountrySelector\n\t\t\t\t\tcurrentCountry={currentCountry}\n\t\t\t\t\tonClick={handleOpenCountryOptions}\n\t\t\t\t\tsize={size}\n\t\t\t\t/>\n\n\t\t\t\t<PhoneInputCountryOptionsContainer\n\t\t\t\t\tisOpen={isDisabled ? false : readOnly ? false : showCountryOptions}\n\t\t\t\t\tsearch={search}\n\t\t\t\t\tplaceholder={searchCountryPlaceholder}\n\t\t\t\t\tonSearch={setSearch}\n\t\t\t\t>\n\t\t\t\t\t{countries\n\t\t\t\t\t\t.filter((country) => filterCountryFunction(country))\n\t\t\t\t\t\t.map((country) => (\n\t\t\t\t\t\t\t<PhoneInputCountryOption\n\t\t\t\t\t\t\t\tkey={country.iso}\n\t\t\t\t\t\t\t\tcountry={country}\n\t\t\t\t\t\t\t\thandleChangeValue={() => {\n\t\t\t\t\t\t\t\t\tsetCurrentCountry(country);\n\t\t\t\t\t\t\t\t\tsetShowCountryOptions(false);\n\t\t\t\t\t\t\t\t\tsetValue(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tisActive={country.iso === currentCountry.iso}\n\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t{countries.filter((country) => filterCountryFunction(country))\n\t\t\t\t\t\t.length === 0 && <p>{notFoundCountryText}</p>}\n\t\t\t\t</PhoneInputCountryOptionsContainer>\n\n\t\t\t\t<PhoneInputCountriesOverlay\n\t\t\t\t\tisOpen={isDisabled ? false : readOnly ? false : showCountryOptions}\n\t\t\t\t\tonClick={handleCloseCountryOptions}\n\t\t\t\t/>\n\n\t\t\t\t<PhoneInputMask\n\t\t\t\t\tid={phoneInputId}\n\t\t\t\t\tref={inputPhoneMaskRef}\n\t\t\t\t\treadonly={readOnly}\n\t\t\t\t\tcurrentCountry={currentCountry}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tsetValue(e);\n\t\t\t\t\t\tonChange?.(inputValue(e));\n\t\t\t\t\t}}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\tref={phoneInputRef}\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={inputValue()}\n\t\t\t\t/>\n\t\t\t</PhoneInputContainer>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { PhoneInput };\n"],"mappings":";;;;;;;;;;;;;AAiIA,SAAS,EAAW,GAAwB;CAC3C,IAAM,EACL,OAAO,GACP,WACA,WAAW,IAAmB,IAC9B,cAAW,IACX,cAAc,GACd,eAAY,IACZ,cAAW,IACX,UAAO,MACP,kBAAe,IACf,cAAU,SACV,iBACA,SACA,aACA,8BAA2B,kBAC3B,yBAAsB,0BACtB,OACA,yBAAsB,IACtB,iBAAc,eACX,GAGE,IAAgB,EAAU,MAAM,MAAY,EAAQ,QAAQ,IAAI,GAEhE,IAAc,IAAe,EAAc,CAAY,IAAI,IAC3D,IAA8B,IACjC,EAAgB,CAAY,CAAC,CAAC,KAC9B,GAEG,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAoB,KAAyB,EAAS,EAAK,GAC5D,CAAC,GAAe,KAAY,EAAS,CAAW,GAChD,IAAQ,MAAa,KAAA,IAAuB,IAAX,GAEjC,CAAC,GAAgB,KAAqB,EAAS,CAAc,GAE7D,EAAE,mBAAgB,EAAQ,GAE1B,IAAgB,EAAyB,IAAI,GAC7C,IAAc,EAAM,GACpB,IAAe,KAAM,GAErB,IAAe,KAAoB,IAAc,IACjD,KAAU,CAAC,CAAC,GACZ,IAAa,KAAY,GAEzB,IAAoB,EAAyB,IAAI;CAEvD,SAAS,KAAuB;EAC3B,KACA,KAAa,MAEjB,EAAa,EAAI,GACb,EAAkB,WAAS,EAAkB,QAAQ,MAAM;CAChE;CAEA,SAAS,KAA2B;EAEnC,AADA,EAAsB,EAAI,GAC1B,EAAa,EAAI;CAClB;CAEA,SAAS,KAA4B;EAEpC,AADA,EAAsB,EAAK,GAC3B,EAAa,EAAK;CACnB;CAEA,SAAS,KAAmB;EAC3B,EAAa,EAAI;CAClB;CAEA,SAAS,KAAkB;EAC1B,EAAa,EAAK;CACnB;CAEA,SAAS,EAAsB,GAAsB;EACpD,OAAO,EAAQ,KAAK,YAAY,CAAC,CAAC,SAAS,EAAO,YAAY,CAAC;CAChE;CAEA,SAAS,EAAW,GAAgB;EACnC,IAAI,IAAc,EAAe;EAEjC,OADA,KAAe,EAAiB,KAAS,CAAK,GACvC;CACR;CAEA,OACC,kBAAC,GAAD;EACO;EACC;EACO;EACd,WAAW;EACG;EACO;EACR;YAEb,kBAAC,GAAD;GACC,UAAU;GACD;GACE;GACA;GACD;GACJ;GACG;GACT,SAAS;aARV;IAUC,kBAAC,GAAD;KACiB;KAChB,SAAS;KACH;IACN,CAAA;IAED,kBAAC,IAAD;KACC,QAAQ,KAAqB,IAAR,KAA2B;KACxC;KACR,aAAa;KACb,UAAU;eAJX,CAME,EACC,QAAQ,MAAY,EAAsB,CAAO,CAAC,CAAC,CACnD,KAAK,MACL,kBAAC,IAAD;MAEU;MACT,yBAAyB;OAGxB,AAFA,EAAkB,CAAO,GACzB,EAAsB,EAAK,GAC3B,EAAS,EAAE;MACZ;MACA,UAAU,EAAQ,QAAQ,EAAe;MACnC;KACN,GATK,EAAQ,GASb,CACD,GAED,EAAU,QAAQ,MAAY,EAAsB,CAAO,CAAC,CAAC,CAC5D,WAAW,KAAK,kBAAC,KAAD,EAAA,UAAI,EAAuB,CAAA,CACX;;IAEnC,kBAAC,IAAD;KACC,QAAQ,KAAqB,IAAR,KAA2B;KAChD,SAAS;IACT,CAAA;IAED,kBAAC,GAAD;KACC,IAAI;KACJ,KAAK;KACL,UAAU;KACM;KACT;KACP,UAAU;KACV,QAAQ;KACR,SAAS;KACH;KACN,WAAW,MAAM;MAEhB,AADA,EAAS,CAAC,GACV,IAAW,EAAW,CAAC,CAAC;KACzB;IACA,CAAA;IAED,kBAAC,SAAD;KACC,KAAK;KACL,MAAK;KACC;KACN,OAAO,EAAW;IAClB,CAAA;GACmB;;CACP,CAAA;AAEjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
let { children: n, onFocus: r, disabled: i, isError: a, isLoading: o, isFocused: s, className: c = "", readOnly: l, variant: u, size: d } = t;
|
|
6
|
+
return /* @__PURE__ */ e("section", {
|
|
7
|
+
className: `arkynPhoneInputContainer ${u} ${d} ${i || l || o ? "opacity" : ""} ${a ? "errored" : ""} ${s ? "focused" : ""} ${c}`.trim(),
|
|
8
|
+
onClick: r,
|
|
9
|
+
children: n
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as PhoneInputContainer };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/phoneInput/phoneInputContainer/index.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport \"./styles.css\";\n\ntype PhoneInputContainerProps = {\n\tchildren: ReactNode;\n\tonFocus: () => void;\n\tisError: boolean;\n\tdisabled: boolean;\n\treadOnly: boolean;\n\tisLoading: boolean;\n\tisFocused: boolean;\n\tclassName?: string;\n\tvariant: \"solid\" | \"outline\";\n\tsize: \"md\" | \"lg\";\n};\n\nfunction PhoneInputContainer(props: PhoneInputContainerProps) {\n\tconst {\n\t\tchildren,\n\t\tonFocus,\n\t\tdisabled,\n\t\tisError,\n\t\tisLoading,\n\t\tisFocused,\n\t\tclassName: baseClassName = \"\",\n\t\treadOnly,\n\t\tvariant,\n\t\tsize,\n\t} = props;\n\n\tconst errored = isError ? \"errored\" : \"\";\n\tconst opacity = disabled || readOnly || isLoading ? \"opacity\" : \"\";\n\tconst focused = isFocused ? \"focused\" : \"\";\n\n\tconst className = `arkynPhoneInputContainer ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;\n\n\treturn (\n\t\t<section className={className.trim()} onClick={onFocus}>\n\t\t\t{children}\n\t\t</section>\n\t);\n}\n\nexport { PhoneInputContainer };\n"],"mappings":";;;AAgBA,SAAS,EAAoB,GAAiC;CAC7D,IAAM,EACL,aACA,YACA,aACA,YACA,cACA,cACA,WAAW,IAAgB,IAC3B,aACA,YACA,YACG;CAQJ,OACC,kBAAC,WAAD;EAAS,WAAW,4BAHyB,EAAQ,GAAG,EAAK,GAH9C,KAAY,KAAY,IAAY,YAAY,GAGS,GAJzD,IAAU,YAAY,GAI8C,GAFpE,IAAY,YAAY,GAEuD,GAAG,IAGnE,KAAK;EAAG,SAAS;EAC7C;CACO,CAAA;AAEX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
let { isOpen: n, onClick: r } = t;
|
|
6
|
+
return n ? /* @__PURE__ */ e("aside", {
|
|
7
|
+
className: "arkynPhoneInputCountriesOverlay",
|
|
8
|
+
onClick: r
|
|
9
|
+
}) : null;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as PhoneInputCountriesOverlay };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/phoneInput/phoneInputCountriesOverlay/index.tsx"],"sourcesContent":["import \"./styles.css\";\n\ntype PhoneInputCountriesOverlayProps = {\n\tisOpen: boolean;\n\tonClick: () => void;\n};\n\nfunction PhoneInputCountriesOverlay(props: PhoneInputCountriesOverlayProps) {\n\tconst { isOpen, onClick } = props;\n\tif (!isOpen) return null;\n\treturn (\n\t\t<aside className=\"arkynPhoneInputCountriesOverlay\" onClick={onClick} />\n\t);\n}\n\nexport { PhoneInputCountriesOverlay };\n"],"mappings":";;;AAOA,SAAS,EAA2B,GAAwC;CAC3E,IAAM,EAAE,WAAQ,eAAY;CAE5B,OADK,IAEJ,kBAAC,SAAD;EAAO,WAAU;EAA2C;CAAU,CAAA,IAFnD;AAIrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer arkyn{.arkynPhoneInputCountriesOverlay{z-index:5;position:fixed;inset:0}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { Check as n } from "lucide-react";
|
|
4
|
+
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { country: i, isActive: a, handleChangeValue: o, size: s } = r;
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
onClick: () => o(i),
|
|
9
|
+
className: `arkynPhoneInputCountryOption ${s} ${a ? "active" : ""}`,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ e("img", {
|
|
12
|
+
src: i.flag,
|
|
13
|
+
alt: i.name,
|
|
14
|
+
className: "flag"
|
|
15
|
+
}),
|
|
16
|
+
i.name,
|
|
17
|
+
" ",
|
|
18
|
+
/* @__PURE__ */ e("span", { children: i.code }),
|
|
19
|
+
/* @__PURE__ */ e(n, { className: "check" })
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { r as PhoneInputCountryOption };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/phoneInput/phoneInputCountryOption/index.tsx"],"sourcesContent":["import { Check } from \"lucide-react\";\nimport \"./styles.css\";\n\ntype CountryType = {\n\tname: string;\n\tcode: string;\n\tiso: string;\n\tflag: string;\n\tmask: string | string[];\n};\n\ntype PhoneInputCountryOptionProps = {\n\tcountry: CountryType;\n\tsize: \"md\" | \"lg\";\n\tisActive: boolean;\n\thandleChangeValue: (country: CountryType) => void;\n};\n\nfunction PhoneInputCountryOption(props: PhoneInputCountryOptionProps) {\n\tconst { country, isActive, handleChangeValue, size } = props;\n\n\tconst hasActive = isActive ? \"active\" : \"\";\n\tconst className = `arkynPhoneInputCountryOption ${size} ${hasActive}`;\n\n\treturn (\n\t\t<div onClick={() => handleChangeValue(country)} className={className}>\n\t\t\t<img src={country.flag} alt={country.name} className=\"flag\" />\n\t\t\t{country.name} <span>{country.code}</span>\n\t\t\t<Check className=\"check\" />\n\t\t</div>\n\t);\n}\n\nexport { PhoneInputCountryOption };\n"],"mappings":";;;;AAkBA,SAAS,EAAwB,GAAqC;CACrE,IAAM,EAAE,YAAS,aAAU,sBAAmB,YAAS;CAKvD,OACC,kBAAC,OAAD;EAAK,eAAe,EAAkB,CAAO;EAAc,WAAA,gCAHV,EAAK,GADrC,IAAW,WAAW;YAIvC;GACC,kBAAC,OAAD;IAAK,KAAK,EAAQ;IAAM,KAAK,EAAQ;IAAM,WAAU;GAAQ,CAAA;GAC5D,EAAQ;GAAK;GAAC,kBAAC,QAAD,EAAA,UAAO,EAAQ,KAAW,CAAA;GACzC,kBAAC,GAAD,EAAO,WAAU,QAAS,CAAA;EACtB;;AAEP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useScrollLock as e } from "../../../hooks/useScrollLock.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
6
|
+
function o(o) {
|
|
7
|
+
let { children: s, isOpen: c, onSearch: l, search: u, placeholder: d } = o, f = n(null), [p, m] = r("bottom");
|
|
8
|
+
function h(e) {
|
|
9
|
+
l(e.target.value);
|
|
10
|
+
}
|
|
11
|
+
return e(c), t(() => {
|
|
12
|
+
c && (() => {
|
|
13
|
+
if (!f.current) return;
|
|
14
|
+
let e = f.current.parentElement;
|
|
15
|
+
if (!e) return;
|
|
16
|
+
let t = e.getBoundingClientRect();
|
|
17
|
+
window.innerHeight - t.bottom < 300 && t.top > 300 ? m("top") : m("bottom");
|
|
18
|
+
})();
|
|
19
|
+
}, [c]), c ? /* @__PURE__ */ a("div", {
|
|
20
|
+
className: `arkynPhoneInputCountryOptionsContainer ${p}`,
|
|
21
|
+
ref: f,
|
|
22
|
+
children: [/* @__PURE__ */ i("input", {
|
|
23
|
+
type: "search",
|
|
24
|
+
name: "search-select",
|
|
25
|
+
className: "arkynPhoneInputCountryOptionsContainerSearchSelect",
|
|
26
|
+
value: u,
|
|
27
|
+
id: "input-search",
|
|
28
|
+
placeholder: d,
|
|
29
|
+
onChange: h
|
|
30
|
+
}), s]
|
|
31
|
+
}) : null;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { o as PhoneInputCountryOptionsContainer };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx"],"sourcesContent":["import {\n\ttype ChangeEvent,\n\ttype ReactNode,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { useScrollLock } from \"../../../hooks/useScrollLock\";\nimport \"./styles.css\";\n\ntype PhoneInputCountryOptionsContainerProps = {\n\tisOpen: boolean;\n\tchildren: ReactNode;\n\tsearch: string;\n\tplaceholder: string;\n\tonSearch: (value: string) => void;\n};\n\nfunction PhoneInputCountryOptionsContainer(\n\tprops: PhoneInputCountryOptionsContainerProps,\n) {\n\tconst { children, isOpen, onSearch, search, placeholder } = props;\n\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst [position, setPosition] = useState<\"bottom\" | \"top\">(\"bottom\");\n\n\tfunction handleSearch(e: ChangeEvent<HTMLInputElement>) {\n\t\tonSearch(e.target.value);\n\t}\n\n\tuseScrollLock(isOpen);\n\n\tuseEffect(() => {\n\t\tif (!isOpen) return;\n\n\t\tconst checkContainerPosition = () => {\n\t\t\tif (!containerRef.current) return;\n\n\t\t\tconst parentElement = containerRef.current.parentElement;\n\t\t\tif (!parentElement) return;\n\n\t\t\tconst parentRect = parentElement.getBoundingClientRect();\n\t\t\tconst viewportHeight = window.innerHeight;\n\n\t\t\tconst estimatedContainerHeight = 300;\n\t\t\tconst spaceBelow = viewportHeight - parentRect.bottom;\n\n\t\t\tif (\n\t\t\t\tspaceBelow < estimatedContainerHeight &&\n\t\t\t\tparentRect.top > estimatedContainerHeight\n\t\t\t) {\n\t\t\t\tsetPosition(\"top\");\n\t\t\t} else {\n\t\t\t\tsetPosition(\"bottom\");\n\t\t\t}\n\t\t};\n\n\t\tcheckContainerPosition();\n\t}, [isOpen]);\n\n\tif (!isOpen) return null;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`arkynPhoneInputCountryOptionsContainer ${position}`}\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t<input\n\t\t\t\ttype=\"search\"\n\t\t\t\tname=\"search-select\"\n\t\t\t\tclassName=\"arkynPhoneInputCountryOptionsContainerSearchSelect\"\n\t\t\t\tvalue={search}\n\t\t\t\tid=\"input-search\"\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tonChange={handleSearch}\n\t\t\t/>\n\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { PhoneInputCountryOptionsContainer };\n"],"mappings":";;;;;AAkBA,SAAS,EACR,GACC;CACD,IAAM,EAAE,aAAU,WAAQ,aAAU,WAAQ,mBAAgB,GAEtD,IAAe,EAAuB,IAAI,GAC1C,CAAC,GAAU,KAAe,EAA2B,QAAQ;CAEnE,SAAS,EAAa,GAAkC;EACvD,EAAS,EAAE,OAAO,KAAK;CACxB;CAkCA,OAhCA,EAAc,CAAM,GAEpB,QAAgB;EACV,YAEgC;GACpC,IAAI,CAAC,EAAa,SAAS;GAE3B,IAAM,IAAgB,EAAa,QAAQ;GAC3C,IAAI,CAAC,GAAe;GAEpB,IAAM,IAAa,EAAc,sBAAsB;GAMvD,AALuB,OAAO,cAGM,EAAW,SAGjC,OACb,EAAW,MAAM,MAEjB,EAAY,KAAK,IAEjB,EAAY,QAAQ;EAEtB,EAEA,CAAuB;CACxB,GAAG,CAAC,CAAM,CAAC,GAEN,IAGJ,kBAAC,OAAD;EACC,WAAW,0CAA0C;EACrD,KAAK;YAFN,CAIC,kBAAC,SAAD;GACC,MAAK;GACL,MAAK;GACL,WAAU;GACV,OAAO;GACP,IAAG;GACU;GACb,UAAU;EACV,CAAA,GAEA,CACG;MAlBc;AAoBrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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)}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Divider as e } from "../../divider/index.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronDown as r } from "lucide-react";
|
|
5
|
+
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
6
|
+
function i(i) {
|
|
7
|
+
let { currentCountry: a, onClick: o } = i;
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: "phoneInputSelectCountry",
|
|
10
|
+
onClick: o,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ t("img", {
|
|
13
|
+
className: "flag",
|
|
14
|
+
src: a.flag,
|
|
15
|
+
alt: a.name
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ t(r, {
|
|
18
|
+
className: "chevronDown",
|
|
19
|
+
strokeWidth: 2.5
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ t(e, { orientation: "vertical" })
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as PhoneInputCountrySelector };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/phoneInput/phoneInputCountrySelector/index.tsx"],"sourcesContent":["import { ChevronDown } from \"lucide-react\";\n\nimport { Divider } from \"../../divider\";\nimport \"./styles.css\";\n\ntype CountryType = {\n\tname: string;\n\tcode: string;\n\tiso: string;\n\tflag: string;\n\tmask: string | string[];\n};\n\ntype PhoneInputCountrySelectorProps = {\n\tsize: \"md\" | \"lg\";\n\tcurrentCountry: CountryType;\n\tonClick: () => void;\n};\n\nfunction PhoneInputCountrySelector(props: PhoneInputCountrySelectorProps) {\n\tconst { currentCountry, onClick } = props;\n\n\treturn (\n\t\t<div className=\"phoneInputSelectCountry\" onClick={onClick}>\n\t\t\t<img\n\t\t\t\tclassName=\"flag\"\n\t\t\t\tsrc={currentCountry.flag}\n\t\t\t\talt={currentCountry.name}\n\t\t\t/>\n\t\t\t<ChevronDown className=\"chevronDown\" strokeWidth={2.5} />\n\t\t\t<Divider orientation=\"vertical\" />\n\t\t</div>\n\t);\n}\n\nexport { PhoneInputCountrySelector };\n"],"mappings":";;;;;AAmBA,SAAS,EAA0B,GAAuC;CACzE,IAAM,EAAE,mBAAgB,eAAY;CAEpC,OACC,kBAAC,OAAD;EAAK,WAAU;EAAmC;YAAlD;GACC,kBAAC,OAAD;IACC,WAAU;IACV,KAAK,EAAe;IACpB,KAAK,EAAe;GACpB,CAAA;GACD,kBAAC,GAAD;IAAa,WAAU;IAAc,aAAa;GAAM,CAAA;GACxD,kBAAC,GAAD,EAAS,aAAY,WAAY,CAAA;EAC7B;;AAEP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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}}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MAX_LENGTH as e, TYPES as t, applyMask as n, clear as r, getMask as i } from "../../../utils/phoneInputUtilities.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { forwardRef as a, useEffect as o, useRef as s } from "react";
|
|
4
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
+
import { InputMask as l } from "@react-input/mask";
|
|
6
|
+
//#region src/components/phoneInput/phoneInputMask/index.tsx
|
|
7
|
+
var u = a((e, t) => /* @__PURE__ */ c("input", {
|
|
8
|
+
ref: t,
|
|
9
|
+
...e
|
|
10
|
+
})), d = a((a, d) => {
|
|
11
|
+
let { onFocus: f, readonly: p, onBlur: m, size: h, onChange: g, value: _, currentCountry: v, disabled: y, id: b } = a, x = s(!0), S = s(g);
|
|
12
|
+
S.current = g;
|
|
13
|
+
let C = typeof v.mask == "string" ? v.mask : v.mask[0];
|
|
14
|
+
o(() => {
|
|
15
|
+
if (x.current) {
|
|
16
|
+
x.current = !1;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
S.current(C);
|
|
20
|
+
}, [C]);
|
|
21
|
+
let w = `phoneInputMask ${h}`;
|
|
22
|
+
function T(a) {
|
|
23
|
+
let o = r(a.target.value), s = i(o);
|
|
24
|
+
o.length > e || (o = n(o, t[s]), a.target.value = o, g(o));
|
|
25
|
+
}
|
|
26
|
+
return v.code === "+55" ? /* @__PURE__ */ c("input", {
|
|
27
|
+
id: b,
|
|
28
|
+
value: _,
|
|
29
|
+
onChange: T,
|
|
30
|
+
className: w,
|
|
31
|
+
onFocus: f,
|
|
32
|
+
onBlur: m,
|
|
33
|
+
disabled: y,
|
|
34
|
+
readOnly: p,
|
|
35
|
+
ref: d
|
|
36
|
+
}) : /* @__PURE__ */ c(l, {
|
|
37
|
+
id: b,
|
|
38
|
+
value: _,
|
|
39
|
+
readOnly: p,
|
|
40
|
+
onChange: (e) => g(e.target.value),
|
|
41
|
+
className: w,
|
|
42
|
+
component: u,
|
|
43
|
+
onFocus: f,
|
|
44
|
+
onBlur: m,
|
|
45
|
+
disabled: y,
|
|
46
|
+
mask: C,
|
|
47
|
+
showMask: !0,
|
|
48
|
+
replacement: { _: /\d/ },
|
|
49
|
+
ref: d
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { d as PhoneInputMask };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/phoneInput/phoneInputMask/index.tsx"],"sourcesContent":["import { InputMask } from \"@react-input/mask\";\nimport {\n\ttype ChangeEvent,\n\tforwardRef,\n\ttype InputHTMLAttributes,\n\tuseEffect,\n\tuseRef,\n} from \"react\";\n\nimport {\n\tapplyMask,\n\tclear,\n\tgetMask,\n\tMAX_LENGTH,\n\tTYPES,\n} from \"../../../utils/phoneInputUtilities\";\n\nimport \"./style.css\";\n\ntype CountryType = {\n\tname: string;\n\tcode: string;\n\tiso: string;\n\tflag: string;\n\tmask: string | string[];\n};\n\ntype PhoneInputMaskProps = {\n\tonFocus: () => void;\n\tonBlur: () => void;\n\tdisabled: boolean;\n\treadonly: boolean;\n\tsize: \"md\" | \"lg\";\n\tcurrentCountry: CountryType;\n\tvalue: string;\n\tonChange: (e: string) => void;\n\tid: string;\n};\n\nconst BaseInput = forwardRef<\n\tHTMLInputElement,\n\tInputHTMLAttributes<HTMLInputElement>\n>((props, ref) => {\n\treturn <input ref={ref} {...props} />;\n});\n\nconst PhoneInputMask = forwardRef<HTMLInputElement, PhoneInputMaskProps>(\n\t(props, ref) => {\n\t\tconst {\n\t\t\tonFocus,\n\t\t\treadonly,\n\t\t\tonBlur,\n\t\t\tsize,\n\t\t\tonChange,\n\t\t\tvalue,\n\t\t\tcurrentCountry,\n\t\t\tdisabled,\n\t\t\tid,\n\t\t} = props;\n\n\t\tconst isFirstRender = useRef(true);\n\t\tconst onChangeRef = useRef(onChange);\n\t\tonChangeRef.current = onChange;\n\n\t\tconst mask =\n\t\t\ttypeof currentCountry.mask === \"string\"\n\t\t\t\t? currentCountry.mask\n\t\t\t\t: currentCountry.mask[0];\n\n\t\tuseEffect(() => {\n\t\t\tif (isFirstRender.current) {\n\t\t\t\tisFirstRender.current = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonChangeRef.current(mask);\n\t\t}, [mask]);\n\n\t\tconst className = `phoneInputMask ${size}`;\n\n\t\tfunction handleChange(event: ChangeEvent<HTMLInputElement>) {\n\t\t\tlet value = clear(event.target.value);\n\t\t\tconst mask = getMask(value);\n\n\t\t\tconst nextLength = value.length;\n\t\t\tif (nextLength > MAX_LENGTH) return;\n\n\t\t\tvalue = applyMask(value, TYPES[mask] as \"EIGHT\" | \"NINE\");\n\t\t\tevent.target.value = value;\n\n\t\t\tonChange(value);\n\t\t}\n\n\t\tif (currentCountry.code === \"+55\") {\n\t\t\treturn (\n\t\t\t\t<input\n\t\t\t\t\tid={id}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tclassName={className}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\treadOnly={readonly}\n\t\t\t\t\tref={ref}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<InputMask\n\t\t\t\tid={id}\n\t\t\t\tvalue={value}\n\t\t\t\treadOnly={readonly}\n\t\t\t\tonChange={(e) => onChange(e.target.value)}\n\t\t\t\tclassName={className}\n\t\t\t\tcomponent={BaseInput}\n\t\t\t\tonFocus={onFocus}\n\t\t\t\tonBlur={onBlur}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tmask={mask}\n\t\t\t\tshowMask\n\t\t\t\treplacement={{ _: /\\d/ }}\n\t\t\t\tref={ref}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nexport { PhoneInputMask };\n"],"mappings":";;;;;;AAuCA,IAAM,IAAY,GAGf,GAAO,MACF,kBAAC,SAAD;CAAY;CAAK,GAAI;AAAQ,CAAA,CACpC,GAEK,IAAiB,GACrB,GAAO,MAAQ;CACf,IAAM,EACL,YACA,aACA,WACA,SACA,aACA,UACA,mBACA,aACA,UACG,GAEE,IAAgB,EAAO,EAAI,GAC3B,IAAc,EAAO,CAAQ;CACnC,EAAY,UAAU;CAEtB,IAAM,IACL,OAAO,EAAe,QAAS,WAC5B,EAAe,OACf,EAAe,KAAK;CAExB,QAAgB;EACf,IAAI,EAAc,SAAS;GAC1B,EAAc,UAAU;GACxB;EACD;EACA,EAAY,QAAQ,CAAI;CACzB,GAAG,CAAC,CAAI,CAAC;CAET,IAAM,IAAY,kBAAkB;CAEpC,SAAS,EAAa,GAAsC;EAC3D,IAAI,IAAQ,EAAM,EAAM,OAAO,KAAK,GAC9B,IAAO,EAAQ,CAAK;EAEP,EAAM,SACR,MAEjB,IAAQ,EAAU,GAAO,EAAM,EAAyB,GACxD,EAAM,OAAO,QAAQ,GAErB,EAAS,CAAK;CACf;CAkBA,OAhBI,EAAe,SAAS,QAE1B,kBAAC,SAAD;EACK;EACG;EACP,UAAU;EACC;EACF;EACD;EACE;EACV,UAAU;EACL;CACL,CAAA,IAKF,kBAAC,GAAD;EACK;EACG;EACP,UAAU;EACV,WAAW,MAAM,EAAS,EAAE,OAAO,KAAK;EAC7B;EACX,WAAW;EACF;EACD;EACE;EACJ;EACN,UAAA;EACA,aAAa,EAAE,GAAG,KAAK;EAClB;CACL,CAAA;AAEH,CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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}}
|